projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e9cff0
)
fix glReadPixels parameters to handle odd-width windows correctly
author
Brian
<brian.paul@tungstengraphics.com>
Fri, 8 Jun 2007 19:10:01 +0000
(13:10 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Fri, 8 Jun 2007 19:10:01 +0000
(13:10 -0600)
progs/tests/drawbuffers.c
patch
|
blob
|
history
diff --git
a/progs/tests/drawbuffers.c
b/progs/tests/drawbuffers.c
index d2e826fadfe2e8afa085d52be3d5b9c9d8a48094..5e89569380a48da3730b20808845698157ae2004 100644
(file)
--- a/
progs/tests/drawbuffers.c
+++ b/
progs/tests/drawbuffers.c
@@
-74,8
+74,9
@@
Display(void)
buffer);
/* top half = colorbuffer 1 */
glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
- glReadPixels(0, Height/2, Width, Height / 2, GL_RGBA, GL_UNSIGNED_BYTE,
- buffer + Width * Height / 2 * 4);
+ glReadPixels(0, Height/2, Width, Height - Height / 2,
+ GL_RGBA, GL_UNSIGNED_BYTE,
+ buffer + Width * (Height / 2) * 4);
/* draw to window */
glUseProgram_func(0);