diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-10 18:43:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-10 18:43:08 +0300 |
commit | 9753fa87b8d1e396e8dfa74a845556ce2b000267 (patch) | |
tree | 67f6c38dfe63b3e582d33a71a93798611b6abca0 | |
parent | 6ccc6e73a226c40c2f3538f6d6126bb2774edd52 (diff) | |
download | manaplus-9753fa87b8d1e396e8dfa74a845556ce2b000267.tar.gz manaplus-9753fa87b8d1e396e8dfa74a845556ce2b000267.tar.bz2 manaplus-9753fa87b8d1e396e8dfa74a845556ce2b000267.tar.xz manaplus-9753fa87b8d1e396e8dfa74a845556ce2b000267.zip |
Add OpenGL functions glProgramUniformXf.
-rw-r--r-- | src/graphicsmanager.cpp | 8 | ||||
-rw-r--r-- | src/render/mgl.cpp | 4 | ||||
-rw-r--r-- | src/render/mgl.h | 4 | ||||
-rw-r--r-- | src/render/mgltypes.h | 8 |
4 files changed, 24 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index ed9768473..c7e4777e1 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -1021,6 +1021,14 @@ void GraphicsManager::initOpenGLFunctions() { logger->log1("GL_ARB_separate_shader_objects not supported"); } + if (checkGLVersion(4, 1) + || supportExtension("GL_ARB_separate_shader_objects")) + { + assignFunction(glProgramUniform1f, "glProgramUniform1f"); + assignFunction(glProgramUniform2f, "glProgramUniform2f"); + assignFunction(glProgramUniform3f, "glProgramUniform3f"); + assignFunction(glProgramUniform4f, "glProgramUniform4f"); + } } else { diff --git a/src/render/mgl.cpp b/src/render/mgl.cpp index d18763051..fc67c36cd 100644 --- a/src/render/mgl.cpp +++ b/src/render/mgl.cpp @@ -84,6 +84,10 @@ defName(glUniform3f); defName(glUniform4f); defName(glCheckFramebufferStatus); defName(glGetProgramInfoLog); +defName(glProgramUniform1f); +defName(glProgramUniform2f); +defName(glProgramUniform3f); +defName(glProgramUniform4f); #ifdef WIN32 defName(wglGetExtensionsString); diff --git a/src/render/mgl.h b/src/render/mgl.h index a72ef0331..2bc275629 100644 --- a/src/render/mgl.h +++ b/src/render/mgl.h @@ -87,6 +87,10 @@ defNameE(glUniform3f); defNameE(glUniform4f); defNameE(glCheckFramebufferStatus); defNameE(glGetProgramInfoLog); +defNameE(glProgramUniform1f); +defNameE(glProgramUniform2f); +defNameE(glProgramUniform3f); +defNameE(glProgramUniform4f); #ifdef WIN32 defNameE(wglGetExtensionsString); diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h index 321739845..b4b300a96 100644 --- a/src/render/mgltypes.h +++ b/src/render/mgltypes.h @@ -123,6 +123,14 @@ typedef void (APIENTRY *glUniform4f_t) (GLint location, typedef GLenum (APIENTRY *glCheckFramebufferStatus_t) (GLenum target); typedef void (APIENTRY *glGetProgramInfoLog_t) (GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog); +typedef void (APIENTRY *glProgramUniform1f_t) (GLuint program, + GLint location, GLfloat v0); +typedef void (APIENTRY *glProgramUniform2f_t) (GLuint program, + GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRY *glProgramUniform3f_t) (GLuint program, + GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRY *glProgramUniform4f_t) (GLuint program, + GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); // callback typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id, |