From fec13f6202067f0700514db6676d3984b78a26df Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Sat, 31 Oct 2009 00:01:44 +0000 Subject: [PATCH] [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. --- clutter/cogl/cogl/cogl-texture-2d-sliced.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/cogl-texture-2d-sliced.c b/clutter/cogl/cogl/cogl-texture-2d-sliced.c index 9b70860e8..52eec49fe 100644 --- a/clutter/cogl/cogl/cogl-texture-2d-sliced.c +++ b/clutter/cogl/cogl/cogl-texture-2d-sliced.c @@ -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);