diff options
author | Stijn Buys <ingar@osirion.org> | 2007-10-21 15:20:20 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2007-10-21 15:20:20 +0000 |
commit | 084c6212afaa6f996091f36d0ff85ac845803a87 (patch) | |
tree | 224fa2e9b5d4e29657f2b3b040b45d41d57a5d10 | |
parent | f79c4c47f6f70ac07e521f06420bb80b1028a799 (diff) |
added glDisable and glBlendFunc
-rw-r--r-- | src/gl/osiriongl.cc | 18 | ||||
-rw-r--r-- | src/gl/osiriongl.h | 6 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/gl/osiriongl.cc b/src/gl/osiriongl.cc index 0917eec..95e12d1 100644 --- a/src/gl/osiriongl.cc +++ b/src/gl/osiriongl.cc @@ -18,6 +18,8 @@ typedef void (APIENTRY *glFrontFace_func)(GLenum); typedef void (APIENTRY *glCullFace_func)(GLenum); typedef void (APIENTRY *glShadeModel_func)(GLenum); typedef void (APIENTRY *glEnable_func)(GLenum); +typedef void (APIENTRY *glDisable_func)(GLenum); +typedef void (APIENTRY *glBlendFunc_func)(GLenum, GLenum); typedef void (APIENTRY *glClear_func)(GLbitfield); typedef void (APIENTRY *glClearColor_func)(GLclampf, GLclampf, GLclampf,GLclampf); typedef void (APIENTRY *glRotatef_func)(GLfloat, GLfloat, GLfloat, GLfloat); @@ -39,6 +41,8 @@ glFrontFace_func osglFrontFace = 0; glCullFace_func osglCullFace = 0; glShadeModel_func osglShadeModel = 0; glEnable_func osglEnable = 0; +glDisable_func osglDisable = 0; +glBlendFunc_func osglBlendFunc = 0; glClear_func osglClear = 0; glClearColor_func osglClearColor = 0; glRotatef_func osglRotatef = 0; @@ -63,6 +67,8 @@ void init() osglCullFace = (glCullFace_func) SDL_GL_GetProcAddress("glCullFace"); osglShadeModel = (glShadeModel_func) SDL_GL_GetProcAddress("glShadeModel"); osglEnable = (glEnable_func) SDL_GL_GetProcAddress("glEnable"); + osglDisable = (glDisable_func) SDL_GL_GetProcAddress("glDisable"); + osglBlendFunc = (glBlendFunc_func ) SDL_GL_GetProcAddress("glBlendFunc"); osglClear = (glClear_func) SDL_GL_GetProcAddress("glClear"); osglClearColor = (glClearColor_func) SDL_GL_GetProcAddress("glClearColor"); osglRotatef = (glRotatef_func) SDL_GL_GetProcAddress("glRotatef"); @@ -88,6 +94,8 @@ void shutdown() osglCullFace = 0; osglShadeModel = 0; osglEnable = 0; + osglDisable = 0; + osglBlendFunc = 0; osglClear = 0; osglClearColor = 0; osglRotatef = 0; @@ -135,11 +143,21 @@ void shademodel(GLenum mode) osglShadeModel(mode); } +void blendfunc(GLenum sfactor, GLenum dfactor) +{ + osglBlendFunc(sfactor, dfactor); +} + void enable(GLenum cap) { osglEnable(cap); } +void disable(GLenum cap) +{ + osglDisable(cap); +} + void clear (GLbitfield mask) { osglClear(mask); } diff --git a/src/gl/osiriongl.h b/src/gl/osiriongl.h index 92c0db3..26ff131 100644 --- a/src/gl/osiriongl.h +++ b/src/gl/osiriongl.h @@ -56,6 +56,9 @@ namespace gl /// glEnable void enable(GLenum cap); + /// glDisable + void disable(GLenum cap); + /// glShadeModel void shademodel(GLenum mode); @@ -69,6 +72,9 @@ namespace gl /// glDepthMask void depthmask(GLenum mode); + /// glBlendFunc + void blendfunc(GLenum sfactor, GLenum dfactor); + /// Delimite the start of a sequence of verteces describing a primitive or group of primitives /*! @param primitive The type of drawing primitive * @see end() |