[Mesa-dev] [PATCH 02/13] mesa: use integers in glReadPixels for GL_RGBA with integer types
Jordan Justen
jordan.l.justen at intel.com
Mon Jun 25 17:34:33 PDT 2012
Previously if a format of GL_RGBA was used, then float data would
be returned, even if the type was an integer type.
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/main/readpix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 4058019..e3c4611 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -337,7 +337,7 @@ slow_read_rgba_pixels( struct gl_context *ctx,
goto done;
for (j = 0; j < height; j++) {
- if (_mesa_is_enum_format_integer(format)) {
+ if (_mesa_is_integer_format_or_type(format, type)) {
_mesa_unpack_uint_rgba_row(rbFormat, width, map, (GLuint (*)[4]) rgba);
_mesa_rebase_rgba_uint(width, (GLuint (*)[4]) rgba,
rb->_BaseFormat);
--
1.7.9.5
More information about the mesa-dev
mailing list