]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture1d_backend.cpp
Rename OpenGLTexture::generate_id to create
[libs/gl.git] / source / backends / opengl / texture1d_backend.cpp
index e44ceb4e757d6efefc4b54414d396894d8a9f019..a94a5c44ac9d99610d38003b632b2a1d7dfe9dd1 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)
+               create();
+
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)
        {