From d3245c66244970d04922572c47d68efc9ad19122 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 10 Mar 2009 17:53:51 +0000 Subject: [PATCH] [cogl] Initialize boolean flag in CoglContext The private CoglContext is created using g_malloc() and not zeroed; this means we have to initialize the values we are going to check, to avoid hitting garbage. Thanks to Tommi Komulainen. --- clutter/cogl/gl/cogl-context.c | 2 ++ clutter/cogl/gles/cogl-context.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/clutter/cogl/gl/cogl-context.c b/clutter/cogl/gl/cogl-context.c index 14d6cbd38..bf24225ae 100644 --- a/clutter/cogl/gl/cogl-context.c +++ b/clutter/cogl/gl/cogl-context.c @@ -56,6 +56,8 @@ cogl_create_context () _context->enable_flags = 0; + _context->enable_backface_culling = FALSE; + _context->material_handles = NULL; _context->material_layer_handles = NULL; _context->default_material = cogl_material_new (); diff --git a/clutter/cogl/gles/cogl-context.c b/clutter/cogl/gles/cogl-context.c index ed8553e48..498896e61 100644 --- a/clutter/cogl/gles/cogl-context.c +++ b/clutter/cogl/gles/cogl-context.c @@ -58,6 +58,8 @@ cogl_create_context () _context->enable_flags = 0; + _context->enable_backface_culling = FALSE; + _context->material_handles = NULL; _context->material_layer_handles = NULL; _context->default_material = cogl_material_new ();