Set pixel store parameters before calling glGetTexImage

We need to set up the rowstride and alignment properly in
CoglTexture2D before reading texture data.

http://bugzilla.openedhand.com/show_bug.cgi?id=2036

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
Owen W. Taylor 2010-03-17 15:39:55 -04:00 committed by Emmanuele Bassi
parent 9e0385304f
commit bfd2b19290

View File

@ -558,6 +558,9 @@ _cogl_texture_2d_get_data (CoglTexture *tex,
target_bmp.data = g_malloc (target_bmp.height * target_bmp.rowstride);
}
_cogl_texture_driver_prep_gl_for_pixels_download (target_bmp.rowstride,
closest_bpp);
GE( glBindTexture (GL_TEXTURE_2D, tex_2d->gl_texture) );
if (!_cogl_texture_driver_gl_get_tex_image (GL_TEXTURE_2D,
closest_gl_format,