From e1aec639800046236605a27f662744b245e72c7b Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 17 Mar 2010 15:39:55 -0400 Subject: [PATCH] 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 --- cogl/cogl-texture-2d.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c index f1ab08023..b151b098f 100644 --- a/cogl/cogl-texture-2d.c +++ b/cogl/cogl-texture-2d.c @@ -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,