Don't use the fixed function backend if there is a user program
authorNeil Roberts <neil@linux.intel.com>
Wed, 24 Nov 2010 17:33:07 +0000 (17:33 +0000)
committerNeil Roberts <neil@linux.intel.com>
Wed, 24 Nov 2010 18:06:44 +0000 (18:06 +0000)
The fixed function pipeline backend can't handle a user program so it
should bail out if one is given.

clutter/cogl/cogl/cogl-pipeline-fixed.c

index f925b1d..3893110 100644 (file)
@@ -72,6 +72,12 @@ _cogl_pipeline_backend_fixed_start (CoglPipeline *pipeline,
                                     unsigned long pipelines_difference,
                                     int n_tex_coord_attribs)
 {
+  CoglHandle user_program;
+
+  user_program = cogl_pipeline_get_user_program (pipeline);
+  if (user_program != COGL_INVALID_HANDLE)
+    return FALSE;
+
   _cogl_use_program (0, COGL_PIPELINE_PROGRAM_TYPE_FIXED);
   return TRUE;
 }