Skip to content

Commit

Permalink
Revert "Use glTexImage2D rather than glTexSubImage2D when uploading a…
Browse files Browse the repository at this point in the history
… full texture"

This was causing some code to break with GL_INVALID_OPERATION under some conditions.
See https://www.opengl.org/wiki/Common_Mistakes#Updating_a_texture

This reverts commit 74becf7.
  • Loading branch information
stevenlovegrove committed Aug 23, 2016
1 parent 66b8acf commit 49aa366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pangolin/gl/gl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 49aa366

Please sign in to comment.