X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Ftexturecube_backend.cpp;h=39169612a450b46b1216cdea9f22c1450475e42e;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hp=b113f1bd21ba1a13f01effd610d67df8e7e01624;hpb=160e9eea29bd10034733d59507fa1bcca36be401;p=libs%2Fgl.git diff --git a/source/backends/opengl/texturecube_backend.cpp b/source/backends/opengl/texturecube_backend.cpp index b113f1bd..39169612 100644 --- a/source/backends/opengl/texturecube_backend.cpp +++ b/source/backends/opengl/texturecube_backend.cpp @@ -31,6 +31,9 @@ void OpenGLTextureCube::allocate() unsigned size = static_cast(this)->size; unsigned levels = static_cast(this)->levels; + if(!id) + create(); + GLenum gl_fmt = get_gl_pixelformat(storage_fmt); if(ARB_texture_storage) {