[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:
Robert Bragg 2009-10-31 00:01:44 +00:00
parent ae57c30e93
commit fec13f6202

View File

@ -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);