]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture1d_backend.cpp
Always delay texture creation until it is allocated
[libs/gl.git] / source / backends / opengl / texture1d_backend.cpp
index e44ceb4e757d6efefc4b54414d396894d8a9f019..bd754fde1091eb42b67fe6787ed2713b421d0f09 100644 (file)
@@ -19,6 +19,9 @@ void OpenGLTexture1D::allocate()
        unsigned width = static_cast<const Texture1D *>(this)->width;
        unsigned levels = static_cast<const Texture1D *>(this)->levels;
 
+       if(!id)
+               generate_id();
+
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)
        {