mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05: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
023510636c
commit
a2c2797105
@ -32,7 +32,7 @@ struct _CoglShader
|
|||||||
{
|
{
|
||||||
CoglHandleObject _parent;
|
CoglHandleObject _parent;
|
||||||
GLuint gl_handle;
|
GLuint gl_handle;
|
||||||
GLenum type;
|
CoglShaderType type;
|
||||||
};
|
};
|
||||||
|
|
||||||
CoglShader *_cogl_shader_pointer_from_handle (CoglHandle handle);
|
CoglShader *_cogl_shader_pointer_from_handle (CoglHandle handle);
|
||||||
|
@ -69,6 +69,7 @@ cogl_create_shader (CoglShaderType type)
|
|||||||
|
|
||||||
shader = g_slice_new (CoglShader);
|
shader = g_slice_new (CoglShader);
|
||||||
shader->gl_handle = glCreateShader (gl_type);
|
shader->gl_handle = glCreateShader (gl_type);
|
||||||
|
shader->type = type;
|
||||||
|
|
||||||
return _cogl_shader_handle_new (shader);
|
return _cogl_shader_handle_new (shader);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user