From 8083167be98b92cc65a786b5b37e35c840bbbcf8 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 24 Nov 2010 17:37:55 +0000 Subject: [PATCH] Add a warning message when no usable Cogl pipeline backend is found If none of the pipeline backends can handle the state then it now displays a warning so the developer has a chance to work out what's going on. --- cogl/cogl-pipeline-opengl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cogl/cogl-pipeline-opengl.c b/cogl/cogl-pipeline-opengl.c index 39f7ec82c..8d57bff78 100644 --- a/cogl/cogl-pipeline-opengl.c +++ b/cogl/cogl-pipeline-opengl.c @@ -1165,6 +1165,9 @@ _cogl_pipeline_flush_gl_state (CoglPipeline *pipeline, break; } + if (G_UNLIKELY (i >= G_N_ELEMENTS (_cogl_pipeline_backends))) + g_warning ("No usable pipeline backend was found!"); + /* FIXME: This reference is actually resulting in lots of * copy-on-write reparenting because one-shot pipelines end up * living for longer than necessary and so any later modification of