[Cogl] [PATCH] Fixup for setting point size

Neil Roberts neil at linux.intel.com
Thu Jun 20 10:35:16 PDT 2013


I messed up the comparison in the previous patch so that it would
still try to call glPointSize even if the pipeline has a zero point
size. This was causing GL errors but the conformance tests didn't pick
it up because apparently we haven't been setting
G_DEBUG=fatal-warnings since glib changed a year and a half ago! I'd
like to squash in this change to the patch.

---
 cogl/driver/gl/cogl-pipeline-vertend-fixed.c | 2 +-
 cogl/driver/gl/cogl-pipeline-vertend-glsl.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cogl/driver/gl/cogl-pipeline-vertend-fixed.c b/cogl/driver/gl/cogl-pipeline-vertend-fixed.c
index d6fa784..e84b816 100644
--- a/cogl/driver/gl/cogl-pipeline-vertend-fixed.c
+++ b/cogl/driver/gl/cogl-pipeline-vertend-fixed.c
@@ -71,7 +71,7 @@ _cogl_pipeline_vertend_fixed_end (CoglPipeline *pipeline,
       CoglPipeline *authority =
         _cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_POINT_SIZE);
 
-      if (authority->big_state->point_size >= 0.0f)
+      if (authority->big_state->point_size > 0.0f)
         GE( ctx, glPointSize (authority->big_state->point_size) );
     }
 
diff --git a/cogl/driver/gl/cogl-pipeline-vertend-glsl.c b/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
index 035ad4a..5dd7aee 100644
--- a/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
+++ b/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
@@ -517,7 +517,7 @@ _cogl_pipeline_vertend_glsl_end (CoglPipeline *pipeline,
       CoglPipeline *authority =
         _cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_POINT_SIZE);
 
-      if (authority->big_state->point_size >= 0.0f)
+      if (authority->big_state->point_size > 0.0f)
         GE( ctx, glPointSize (authority->big_state->point_size) );
     }
 #endif /* HAVE_COGL_GL */
-- 
1.7.11.3.g3c3efa5



More information about the Cogl mailing list