From ac81f3b936b7efb287d4c81973f5fd84166f52d5 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 13 Jan 2011 14:12:10 +0000 Subject: [PATCH] cogl-context: Don't enable point sprites on GLES2 On GLES2 there's no builtin mechanism to replace texture coordinates with point sprite coordinates so calling glEnable(GL_POINT_SPRITE) isn't valid. Instead the point sprite coords are implemented by using a special builtin varying variable in GLSL. --- cogl/cogl-context.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c index c8fb1d75e..d246dcfb0 100644 --- a/cogl/cogl-context.c +++ b/cogl/cogl-context.c @@ -292,9 +292,12 @@ cogl_create_context (void) layer. Therefore it seems like it should be ok to just leave it enabled all the time instead of having to have a set property on each pipeline to track whether any layers have point sprite - coords enabled */ + coords enabled. We don't need to do this for GLES2 because point + sprites are handled using a builtin varying in the shader. */ +#ifndef HAVE_COGL_GLES2 if (cogl_features_available (COGL_FEATURE_POINT_SPRITE)) GE (glEnable (GL_POINT_SPRITE)); +#endif return TRUE; }