diff --git a/include/pangolin/gl/gl.hpp b/include/pangolin/gl/gl.hpp index eec13e15c..93afbdf3b 100644 --- a/include/pangolin/gl/gl.hpp +++ b/include/pangolin/gl/gl.hpp @@ -194,7 +194,7 @@ inline void GlTexture::Upload( GLenum data_format, GLenum data_type ) { Bind(); - glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, data_format, data_type, data); + glTexSubImage2D(GL_TEXTURE_2D,0,0,0,width,height,data_format,data_type,data); CheckGlDieOnError(); }