comparison pytouhou/ui/opengl/shader.pxd @ 584:538b52aafbca

Split GLenum into subtypes, in order to add type safety when calling OpenGL functions.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 08 Oct 2014 13:21:03 +0200
parents 6e3b3d5d4691
children a6af3ff86612
comparison
equal deleted inserted replaced
583:47cf4e3d159d 584:538b52aafbca
1 from pytouhou.lib.opengl cimport GLuint, GLint, GLchar, GLenum, GLfloat 1 from pytouhou.lib.opengl cimport GLuint, GLint, GLchar, GLenum_shader, GLfloat
2 from pytouhou.utils.matrix cimport Matrix 2 from pytouhou.utils.matrix cimport Matrix
3 3
4 cdef class Shader: 4 cdef class Shader:
5 cdef GLuint handle 5 cdef GLuint handle
6 cdef bint linked 6 cdef bint linked
7 cdef dict location_cache 7 cdef dict location_cache
8 8
9 cdef void create_shader(self, const GLchar *string, GLenum shader_type) except * 9 cdef void create_shader(self, const GLchar *string, GLenum_shader shader_type) except *
10 cdef void link(self) except * 10 cdef void link(self) except *
11 cdef GLint get_uniform_location(self, name) except -1 11 cdef GLint get_uniform_location(self, name) except -1
12 cdef void bind(self) nogil 12 cdef void bind(self) nogil
13 cdef void uniform_1(self, name, GLfloat val) except * 13 cdef void uniform_1(self, name, GLfloat val) except *
14 cdef void uniform_4(self, name, GLfloat a, GLfloat b, GLfloat c, GLfloat d) except * 14 cdef void uniform_4(self, name, GLfloat a, GLfloat b, GLfloat c, GLfloat d) except *