From: José Fonseca Date: Sat, 11 Jun 2011 11:10:12 +0000 (+0100) Subject: Add a note about reseting imaging state. X-Git-Tag: 2.0_alpha^2~782 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4405dfbccbc5edff1ebaa42011988a071bf3ef9;p=tools%2Fapitrace.git Add a note about reseting imaging state. --- diff --git a/glstate.cpp b/glstate.cpp index 2d55ce8..a55982a 100644 --- a/glstate.cpp +++ b/glstate.cpp @@ -582,6 +582,7 @@ getDrawBufferImage(GLenum format) { glGetIntegerv(GL_READ_BUFFER, &read_buffer); glReadBuffer(draw_buffer); + // TODO: reset imaging state too resetPixelPackState(); glReadPixels(0, 0, width, height, format, GL_UNSIGNED_BYTE, image->pixels); @@ -629,6 +630,7 @@ dumpReadBufferImage(JSONWriter &json, GLint width, GLint height, GLenum format) GLubyte *pixels = new GLubyte[width*height*channels]; + // TODO: reset imaging state too resetPixelPackState(); glReadPixels(0, 0, width, height, format, GL_UNSIGNED_BYTE, pixels);