From 084c6212afaa6f996091f36d0ff85ac845803a87 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Oct 2007 15:20:20 +0000 Subject: added glDisable and glBlendFunc --- src/gl/osiriongl.cc | 18 ++++++++++++++++++ src/gl/osiriongl.h | 6 ++++++ 2 files changed, 24 insertions(+) (limited to 'src') 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() -- cgit v1.2.3