[cogl-texture] use the right format when downloading sliced textures from GL

_cogl_texture_download_from_gl needs to create transient CoglBitmaps when
downloading sliced textures from GL, and then copies these as subregions
into the final target_bitmap. _cogl_texture_download_from_gl also supports
target_bitmaps with a different format to the source CoglTexture being
downloaded.

The problem was that in the case of slice textures we were always looking
at the format of the CoglTexture, not of the target_bitmap when setting
up the transient slice bitmap.
This commit is contained in:
Robert Bragg 2009-06-19 16:39:37 +01:00
parent 24ca92951f
commit 4680b34046

View File

@ -397,7 +397,7 @@ _cogl_texture_download_from_gl (CoglTexture *tex,
if (y_span->waste != 0 || x_span->waste != 0)
{
/* Setup temp bitmap for slice subregion */
slice_bmp.format = tex->bitmap.format;
slice_bmp.format = target_bmp->format;
slice_bmp.width = x_span->size;
slice_bmp.height = y_span->size;
slice_bmp.rowstride = bpp * slice_bmp.width;