]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texturecube_backend.cpp
Use default member initializers for simple types
[libs/gl.git] / source / backends / opengl / texturecube_backend.cpp
index b113f1bd21ba1a13f01effd610d67df8e7e01624..39169612a450b46b1216cdea9f22c1450475e42e 100644 (file)
@@ -31,6 +31,9 @@ void OpenGLTextureCube::allocate()
        unsigned size = static_cast<const TextureCube *>(this)->size;
        unsigned levels = static_cast<const TextureCube *>(this)->levels;
 
+       if(!id)
+               create();
+
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)
        {