From a3a57df0be5c9d1d4ebbd153cabadbca48d16e79 Mon Sep 17 00:00:00 2001 From: Evan Goers Date: Mon, 26 Nov 2012 06:29:34 +0000 Subject: Abstracted many more GL functions. Added in useful texture unit info to State::init(). Cleaned up many non-abstracted GL functions used in draw.cc and state.cc. --- src/render/gl.h | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) (limited to 'src/render/gl.h') diff --git a/src/render/gl.h b/src/render/gl.h index 4dea544..8d8e48e 100644 --- a/src/render/gl.h +++ b/src/render/gl.h @@ -116,6 +116,12 @@ void enable(GLenum cap); /// glDisable void disable(GLenum cap); +/// glEnableClientState +void enableclientstate(GLenum cap); + +/// glDisableClientState +void disableclientstate(GLenum cap); + /// glShadeModel void shademodel(GLenum mode); @@ -174,6 +180,18 @@ void texcoord(const math::Vector2f& vector); /// glTexCoord void texcoord(const float x, const float y, const float z); +/// glTexCoordPointer +void texcoordpointer(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); + +/// glNormalPointer +void normalpointer(GLenum type, GLsizei stride, const GLvoid* pointer); + +/// glVertexPointer +void vertexpointer(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); + +/// glInterleavedArrays +void interleavedarrays(GLenum format, GLsizei stride, const GLvoid* pointer); + /// glNormal void normal(const math::Vector3f & vector); @@ -250,10 +268,42 @@ void loadidentity(); /// Perspective matrix void frustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble znear, GLdouble zfar); -/// Texture coordinate generation -void texgeni(GLenum coord, GLenum param, GLenum value); +/// Light model +void lightmodel(GLenum pname, GLfloat param); +void lightmodel(GLenum pname, GLint param); +void lightmodel(GLenum pname, const GLfloat* param); +void lightmodel(GLenum pname, const GLint* param); + +/// Polygon mode +void polygonmode(GLenum face, GLenum mode); + +/// Color material parameters +void colormaterial(GLenum face, GLenum mode); -void texgenfv(GLenum coord, GLenum param, const GLfloat* value); +/// Material parameters +void material(GLenum face, GLenum pname, GLfloat param); +void material(GLenum face, GLenum pname, GLint param); +void material(GLenum face, GLenum pname, const GLfloat* param); +void material(GLenum face, GLenum pname, const GLint* param); + +/// Texture environment parameters +void texenv(GLenum target, GLenum pname, GLfloat param); +void texenv(GLenum target, GLenum pname, GLint param); +void texenv(GLenum target, GLenum pname, const GLfloat* param); +void texenv(GLenum target, GLenum pname, const GLint* param); + +/// Texture coordinate generation +void texgen(GLenum coord, GLenum param, GLint value); +void texgen(GLenum coord, GLenum param, GLfloat value); +void texgen(GLenum coord, GLenum param, GLdouble value); +void texgen(GLenum coord, GLenum param, const GLint* value); +void texgen(GLenum coord, GLenum param, const GLfloat* value); +void texgen(GLenum coord, GLenum param, const GLdouble* value); + +/// Active server-side texture +void activetexture(GLenum texture); +/// Active client-side texture +void clientactivetexture(GLenum texture); typedef void (* APIENTRY genbuffers_func)(GLuint count, GLuint *id); typedef void (* APIENTRY deletebuffers_func)(GLuint count, GLuint *id); -- cgit v1.2.3