mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
cogl-texture-2d-sliced: Store the internal format not image format
The 'format' member of CoglTexture2DSliced is returned by cogl_texture_get_format. All of the other backends return the internal format of the GL texture in this case. However the sliced backend was returning the format of the image data used to create the texture. It doesn't make any sense to retain this information because it doesn't necessarily indicate the format of the actual texture. This patch changes it to store the internal format instead.
This commit is contained in:
parent
7d269c6315
commit
41cd2ae2c8
@ -986,10 +986,10 @@ _cogl_texture_2d_sliced_upload_from_data
|
||||
else
|
||||
{
|
||||
/* Find closest GL format match */
|
||||
_cogl_pixel_format_to_gl (internal_format,
|
||||
&gl_intformat,
|
||||
&gl_format,
|
||||
&gl_type);
|
||||
internal_format = _cogl_pixel_format_to_gl (internal_format,
|
||||
&gl_intformat,
|
||||
&gl_format,
|
||||
&gl_type);
|
||||
|
||||
/* Create slices for the given format and size */
|
||||
if (!_cogl_texture_2d_sliced_slices_create (tex_2ds,
|
||||
@ -1004,7 +1004,7 @@ _cogl_texture_2d_sliced_upload_from_data
|
||||
tex_2ds->gl_format = gl_intformat;
|
||||
tex_2ds->width = bmp->width;
|
||||
tex_2ds->height = bmp->height;
|
||||
tex_2ds->format = bmp->format;
|
||||
tex_2ds->format = internal_format;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user