projects
/
tools
/
apitrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6faa6a1
)
Add a note about reseting imaging state.
author
José Fonseca
<jose.r.fonseca@gmail.com>
Sat, 11 Jun 2011 11:10:12 +0000
(12:10 +0100)
committer
José Fonseca
<jose.r.fonseca@gmail.com>
Sat, 11 Jun 2011 11:10:12 +0000
(12:10 +0100)
glstate.cpp
patch
|
blob
|
history
diff --git
a/glstate.cpp
b/glstate.cpp
index
2d55ce8
..
a55982a
100644
(file)
--- 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);