Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-12-15 23:18:16 +0000
committerStijn Buys <ingar@osirion.org>2012-12-15 23:18:16 +0000
commit982a578a6d9c400919da3ac8ec24ef016ef8d696 (patch)
tree290087a6aef0232b708b6c34f71f13ad6cf0a950 /src/render
parenta70c15874a4a5eb9d96858ef8efd23018b476af1 (diff)
esolved an OpenGL-related build problem on windowesolved an OpenGL-related build problem on windows
Diffstat (limited to 'src/render')
-rw-r--r--src/render/gl.cc12
-rw-r--r--src/render/gl.h9
-rw-r--r--src/render/state.cc4
3 files changed, 10 insertions, 15 deletions
diff --git a/src/render/gl.cc b/src/render/gl.cc
index b0550da..932fe34 100644
--- a/src/render/gl.cc
+++ b/src/render/gl.cc
@@ -18,6 +18,8 @@ genbuffers_func genbuffers = 0;
deletebuffers_func deletebuffers = 0;
bindbuffer_func bindbuffer = 0;
bufferdata_func bufferdata = 0;
+activetexture_func activetexture = 0;
+clientactivetexture_func clientactivetexture = 0;
std::string renderer()
{
@@ -423,15 +425,5 @@ void texparameter(GLenum target, GLenum pname, const GLint* params)
glTexParameteriv(target, pname, params);
}
-void activetexture(GLenum texture)
-{
- glActiveTexture(texture);
-}
-
-void clientactivetexture(GLenum texture)
-{
- glClientActiveTexture(texture);
-}
-
} // namespace gl
diff --git a/src/render/gl.h b/src/render/gl.h
index 2d19a45..c5da4db 100644
--- a/src/render/gl.h
+++ b/src/render/gl.h
@@ -313,20 +313,19 @@ void texparameter(GLenum target, GLenum pname, GLint param);
void texparameter(GLenum target, GLenum pname, const GLfloat* params);
void texparameter(GLenum target, GLenum pname, const GLint* params);
-/// 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);
typedef void (* APIENTRY bindbuffer_func)(GLenum target, GLuint id);
typedef void (* APIENTRY bufferdata_func)(GLenum target, GLsizei size, const GLvoid *data, GLenum usage);
+typedef void (*APIENTRY activetexture_func)(GLenum texture);
+typedef void (*APIENTRY clientactivetexture_func)(GLenum texture);
extern genbuffers_func genbuffers;
extern deletebuffers_func deletebuffers;
extern bindbuffer_func bindbuffer;
extern bufferdata_func bufferdata;
+extern activetexture_func activetexture;
+extern clientactivetexture_func clientactivetexture;
}
diff --git a/src/render/state.cc b/src/render/state.cc
index 8cafefe..7720722 100644
--- a/src/render/state.cc
+++ b/src/render/state.cc
@@ -105,6 +105,10 @@ void State::init(int width, int height)
gl::getinteger(GL_MAX_TEXTURE_UNITS, &state_maxtextureunits);
con_debug << " maximum number of OpenGL texture units is " << state_maxtextureunits << std::endl;
+ // bind multitexture functions
+ gl::activetexture = (gl::activetexture_func) SDL_GL_GetProcAddress("glActiveTexture");
+ gl::clientactivetexture = (gl::activetexture_func) SDL_GL_GetProcAddress("glClientActiveTexture");
+
// Generate VBO
if (state_has_vbo)
gl::genbuffers(1, &state_vbo);