mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
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.
This commit is contained in:
parent
616eccdad6
commit
ec26466cdc
@ -32,7 +32,7 @@ struct _CoglShader
|
||||
{
|
||||
CoglHandleObject _parent;
|
||||
GLuint gl_handle;
|
||||
GLenum type;
|
||||
CoglShaderType type;
|
||||
};
|
||||
|
||||
CoglShader *_cogl_shader_pointer_from_handle (CoglHandle handle);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user