]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture3d_backend.cpp
Always delay texture creation until it is allocated
[libs/gl.git] / source / backends / opengl / texture3d_backend.cpp
index 6826993ae6d9c37c414d5e6ff5aa50f1c9b7ff09..1197405ee367ff192690437f37ccca89b677000f 100644 (file)
@@ -26,6 +26,9 @@ void OpenGLTexture3D::allocate()
        unsigned depth = static_cast<const Texture3D *>(this)->depth;
        unsigned levels = static_cast<const Texture3D *>(this)->levels;
 
+       if(!id)
+               generate_id();
+
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)
        {