X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcore%2Ftexture2dmultisample.cpp;h=1c0106d7dda094396e52104d5d0989bf9a14ed8b;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hp=782a55694961e55a979ba772c5f28c5e766f5a51;hpb=009918e76dda88b0cb68fdaa20c63d6e952af260;p=libs%2Fgl.git diff --git a/source/core/texture2dmultisample.cpp b/source/core/texture2dmultisample.cpp index 782a5569..1c0106d7 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" @@ -10,14 +7,6 @@ using namespace std; 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) { if(width>0) @@ -36,23 +25,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)