]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture2dmultisample_backend.cpp
Always delay texture creation until it is allocated
[libs/gl.git] / source / backends / opengl / texture2dmultisample_backend.cpp
index c4a4e42380d227666790386c6b9e1697617a80f2..71f9e138abddee50a7c157c0ef7e33b0dfda7a3a 100644 (file)
@@ -19,6 +19,9 @@ void OpenGLTexture2DMultisample::allocate()
        unsigned height = static_cast<const Texture2DMultisample *>(this)->height;
        unsigned samples = static_cast<const Texture2DMultisample *>(this)->samples;
 
+       if(!id)
+               generate_id();
+
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage_multisample)
        {