Added misc. GL functions

This commit is contained in:
Runar Tenfjord 2013-01-29 21:37:42 +01:00
parent 7d29e3b81b
commit 4373f59cdb
4 changed files with 17 additions and 1 deletions

View file

@ -21,6 +21,7 @@ cdef extern from "GL/glfw3.h":
void glClear(GLbitfield mask)
void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
void glClearDepth(GLclampd depth)
void glDepthFunc(GLenum func)
void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
void glDisable(GLenum cap)
void glDrawArrays(GLenum mode, GLint first, GLsizei count)
@ -28,6 +29,7 @@ cdef extern from "GL/glfw3.h":
void glEnable(GLenum cap)
void glGetIntegerv(GLenum pname, GLint *params)
void glHint(GLenum target, GLenum mode)
void glPointSize(GLfloat size)
void glLineWidth(GLfloat width)
void glLightf(GLenum light, GLenum pname, GLfloat param)
void glLightfv(GLenum light, GLenum pname, GLfloat *params )

View file

@ -89,7 +89,7 @@ cdef class ColorRGBA:
self.red = value & 0x000000FF
self.green = (value & 0x0000FF00) >> 8
self.blue = (value & 0x00FF0000) >> 16
self.alpha = (value & 0xFF000000) >> 14
self.alpha = (value & 0xFF000000) >> 24
cpdef tuple toFloatVector(self):
'''

View file

@ -57,6 +57,12 @@ cpdef ClearDepth(double depth):
'''
glClearDepth(depth)
cpdef DepthFunc(int func):
'''
Specify the value used for depth buffer comparisons
'''
glDepthFunc(func)
cpdef Color(ColorRGBA col):
'''
Sets the current color.
@ -110,6 +116,12 @@ cpdef Hint(int target, int mode):
'''
glHint(target, mode)
cpdef PointSize(float width):
'''
Specify the diameter of rasterized points
'''
glPointSize(width)
cpdef LineWidth(float width):
'''
Specify the width of rasterized lines

View file

@ -150,12 +150,14 @@ cpdef BlendFunc(unsigned int sfactor, unsigned int dfactor)
cpdef Clear(unsigned int mask)
cpdef ClearColor(ColorRGBA col)
cpdef ClearDepth(double depth)
cpdef DepthFunc(int func)
cpdef Color(ColorRGBA col)
cpdef Disable(unsigned int cap)
cpdef DrawArrays(unsigned int mode, int first, int count)
cpdef DrawElements(unsigned int mode, int count, int type, indices)
cpdef Enable(unsigned int cap)
cpdef Hint(int target, int mode)
cpdef PointSize(float width)
cpdef LineWidth(float width)
cpdef LightModeli(int pname, int param)
cpdef LoadIdentity()