mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[cogl-texture-2d-sliced] allow COGL_FORMAT_ANY with _new_with_size()
It's useful when initialzing offscreen draw buffers to be able to ask Cogl to create a texture of a given size and with the default internal pixel format.
This commit is contained in:
parent
ae57c30e93
commit
fec13f6202
@ -907,7 +907,7 @@ _cogl_texture_2d_sliced_new_with_size (unsigned int width,
|
||||
|
||||
/* Since no data, we need some internal format */
|
||||
if (internal_format == COGL_PIXEL_FORMAT_ANY)
|
||||
return COGL_INVALID_HANDLE;
|
||||
internal_format = COGL_PIXEL_FORMAT_RGBA_8888_PRE;
|
||||
|
||||
/* Rowstride from width */
|
||||
bpp = _cogl_get_format_bpp (internal_format);
|
||||
|
Loading…
Reference in New Issue
Block a user