X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Ftexture2dmultisample.cpp;h=5ea37e90e3d82e81f2674f94691f2051c25f1a69;hp=782a55694961e55a979ba772c5f28c5e766f5a51;hb=160e9eea29bd10034733d59507fa1bcca36be401;hpb=93448d16e72e38afbaecbccf6fdedd46d6a82a73 diff --git a/source/core/texture2dmultisample.cpp b/source/core/texture2dmultisample.cpp index 782a5569..5ea37e90 100644 --- a/source/core/texture2dmultisample.cpp +++ b/source/core/texture2dmultisample.cpp @@ -1,6 +1,3 @@ -#include -#include -#include #include "deviceinfo.h" #include "error.h" #include "texture2dmultisample.h" @@ -11,12 +8,9 @@ namespace Msp { namespace GL { Texture2DMultisample::Texture2DMultisample(): - Texture(GL_TEXTURE_2D_MULTISAMPLE), width(0), height(0) -{ - static Require _req(ARB_texture_multisample); -} +{ } void Texture2DMultisample::storage(PixelFormat fmt, unsigned wd, unsigned ht, unsigned sm) { @@ -36,23 +30,7 @@ void Texture2DMultisample::storage(PixelFormat fmt, unsigned wd, unsigned ht, un height = ht; samples = sm; - GLenum gl_fmt = get_gl_pixelformat(storage_fmt); - if(ARB_texture_storage_multisample) - { - if(ARB_direct_state_access) - glTextureStorage2DMultisample(id, samples, gl_fmt, width, height, false); - else - { - bind_scratch(); - glTexStorage2DMultisample(target, samples, gl_fmt, width, height, false); - } - } - else - { - bind_scratch(); - glTexImage2DMultisample(target, samples, gl_fmt, width, height, false); - } - apply_swizzle(); + allocate(); } void Texture2DMultisample::image(const Graphics::Image &, unsigned)