X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Ftexture1d_backend.cpp;h=aa9e1f298f9f5a9a407ccc9b24262762bf86ac8f;hb=HEAD;hp=8e33d278984ca06c8f81c4222e01717d195b5b55;hpb=3b98e13c823d4cb7e4d2d4d14e8440b44bc71f91;p=libs%2Fgl.git diff --git a/source/backends/opengl/texture1d_backend.cpp b/source/backends/opengl/texture1d_backend.cpp index 8e33d278..aa9e1f29 100644 --- a/source/backends/opengl/texture1d_backend.cpp +++ b/source/backends/opengl/texture1d_backend.cpp @@ -25,20 +25,20 @@ void OpenGLTexture1D::allocate() if(ARB_texture_storage) { if(ARB_direct_state_access) - glTextureStorage1D(id, self.levels, gl_fmt, self.width); + glTextureStorage1D(id, n_levels, gl_fmt, self.width); else { bind_scratch(); - glTexStorage1D(target, self.levels, gl_fmt, self.width); + glTexStorage1D(target, n_levels, gl_fmt, self.width); } } else { bind_scratch(); - glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, self.levels-1); + glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, n_levels-1); 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; }