mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 04:02:36 +00:00
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:
parent
89519a1d33
commit
e1aec63980
@ -558,6 +558,9 @@ _cogl_texture_2d_get_data (CoglTexture *tex,
|
|||||||
target_bmp.data = g_malloc (target_bmp.height * target_bmp.rowstride);
|
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) );
|
GE( glBindTexture (GL_TEXTURE_2D, tex_2d->gl_texture) );
|
||||||
if (!_cogl_texture_driver_gl_get_tex_image (GL_TEXTURE_2D,
|
if (!_cogl_texture_driver_gl_get_tex_image (GL_TEXTURE_2D,
|
||||||
closest_gl_format,
|
closest_gl_format,
|
||||||
|
Loading…
Reference in New Issue
Block a user