Mercurial > touhou
diff pytouhou/lib/opengl.pxd @ 424:f4d76d3d6f2a
Make the Shader class use cython too.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 16 Jul 2013 21:07:15 +0200 |
parents | d8630c086926 |
children | 5d7bb2fd74f7 |
line wrap: on
line diff
--- a/pytouhou/lib/opengl.pxd +++ b/pytouhou/lib/opengl.pxd @@ -70,6 +70,12 @@ cdef extern from 'GL/gl.h': GL_VERTEX_ARRAY GL_TEXTURE_COORD_ARRAY + GL_VERTEX_SHADER + GL_FRAGMENT_SHADER + GL_INFO_LOG_LENGTH + GL_COMPILE_STATUS + GL_LINK_STATUS + void glVertexPointer(GLint size, GLenum type_, GLsizei stride, GLvoid *pointer) void glTexCoordPointer(GLint size, GLenum type_, GLsizei stride, GLvoid *pointer) void glColorPointer(GLint size, GLenum type_, GLsizei stride, GLvoid *pointer) @@ -106,3 +112,22 @@ cdef extern from 'GL/gl.h': void glHint(GLenum target, GLenum mode) void glEnableClientState(GLenum cap) + + GLuint glCreateProgram() + GLuint glCreateShader(GLenum shaderType) + void glLinkProgram(GLuint program) + void glUseProgram(GLuint program) + void glGetProgramiv(GLuint program, GLenum pname, GLint *params) + void glGetProgramInfoLog(GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog) + + void glShaderSource(GLuint shader, GLsizei count, const GLchar **string, const GLint *length) + void glCompileShader(GLuint shader) + void glGetShaderiv(GLuint shader, GLenum pname, GLint *params) + void glGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog) + void glAttachShader(GLuint program, GLuint shader) + + GLint glGetUniformLocation(GLuint program, const GLchar *name) + void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name) + void glUniform1fv(GLint location, GLsizei count, const GLfloat *value) + void glUniform4fv(GLint location, GLsizei count, const GLfloat *value) + void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)