From e926c1dab449abbfeb61429c2a79cf288adb3c3c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 21 Jun 2013 17:46:19 +0100 Subject: [PATCH] Fix the alpha value in the default texture data When a layer is added to a pipeline without setting a texture it ends up sampling from a default 1x1 texture which is meant to be solid white. However for some reason we were creating the texture with 0 opacity which is effectively an invalid premultiplied colour. This would make the blending behave oddly if it was used. https://bugzilla.gnome.org/show_bug.cgi?id=702570 Reviewed-by: Robert Bragg (cherry picked from commit 2ffc77565fb6395b986d3274f8bdb6eee6addbf9) --- cogl/cogl-context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c index 87041c6bc..fe2bee974 100644 --- a/cogl/cogl-context.c +++ b/cogl/cogl-context.c @@ -136,7 +136,7 @@ cogl_context_new (CoglDisplay *display, CoglError **error) { CoglContext *context; - GLubyte default_texture_data[] = { 0xff, 0xff, 0xff, 0x0 }; + uint8_t default_texture_data[] = { 0xff, 0xff, 0xff, 0xff }; CoglBitmap *default_texture_bitmap; const CoglWinsysVtable *winsys; int i;