From ec26466cdce5b701af7c82bce4588cb6f2e3180c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 14 Jul 2010 19:39:24 +0100 Subject: [PATCH] gles/cogl-shader.c: Store the shader type in CoglShader Nothing was storing the shader type when a shader was created so it would get confused about whether it was a custom vertex or fragment shader. Also the 'type' member of CoglShader was a GLenum but the only place that read it was treating it as if it was CoglShaderType. This changes it be CoglShaderType. --- clutter/cogl/cogl/driver/gles/cogl-shader-private.h | 2 +- clutter/cogl/cogl/driver/gles/cogl-shader.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/driver/gles/cogl-shader-private.h b/clutter/cogl/cogl/driver/gles/cogl-shader-private.h index cf00c4842..878ab5552 100644 --- a/clutter/cogl/cogl/driver/gles/cogl-shader-private.h +++ b/clutter/cogl/cogl/driver/gles/cogl-shader-private.h @@ -32,7 +32,7 @@ struct _CoglShader { CoglHandleObject _parent; GLuint gl_handle; - GLenum type; + CoglShaderType type; }; CoglShader *_cogl_shader_pointer_from_handle (CoglHandle handle); diff --git a/clutter/cogl/cogl/driver/gles/cogl-shader.c b/clutter/cogl/cogl/driver/gles/cogl-shader.c index 5b2214e3d..a86104d07 100644 --- a/clutter/cogl/cogl/driver/gles/cogl-shader.c +++ b/clutter/cogl/cogl/driver/gles/cogl-shader.c @@ -69,6 +69,7 @@ cogl_create_shader (CoglShaderType type) shader = g_slice_new (CoglShader); shader->gl_handle = glCreateShader (gl_type); + shader->type = type; return _cogl_shader_handle_new (shader); }