X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Ftexture3d_backend.cpp;h=81783850383c0db70670768e0e318b7cd8e88b13;hb=HEAD;hp=f446e653cfc4a90df6cabc3ce3fe8661541de24d;hpb=3b98e13c823d4cb7e4d2d4d14e8440b44bc71f91;p=libs%2Fgl.git diff --git a/source/backends/opengl/texture3d_backend.cpp b/source/backends/opengl/texture3d_backend.cpp index f446e653..81783850 100644 --- a/source/backends/opengl/texture3d_backend.cpp +++ b/source/backends/opengl/texture3d_backend.cpp @@ -30,11 +30,11 @@ void OpenGLTexture3D::allocate() if(ARB_texture_storage) { if(ARB_direct_state_access) - glTextureStorage3D(id, self.levels, gl_fmt, self.width, self.height, self.depth); + glTextureStorage3D(id, n_levels, gl_fmt, self.width, self.height, self.depth); else { bind_scratch(); - glTexStorage3D(target, self.levels, gl_fmt, self.width, self.height, self.depth); + glTexStorage3D(target, n_levels, gl_fmt, self.width, self.height, self.depth); } } else @@ -42,12 +42,12 @@ void OpenGLTexture3D::allocate() bind_scratch(); GLenum comp = get_gl_components(get_components(storage_fmt)); GLenum type = get_gl_type(get_component_type(storage_fmt)); - for(unsigned i=0; i>=2) + for(unsigned i=0; i>=2) total_size += level_size; return total_size; }