diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-04 21:04:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-04 21:04:12 +0300 |
commit | 5dbe8005e02b29da820fb4ed09fd3b0645683f70 (patch) | |
tree | 8a563efaeb63fa17eaf18466da9a825f9f5f91d1 /src/graphicsmanager.cpp | |
parent | ec5b0e17ff735e58de139b7f8ce0598928958bcc (diff) | |
download | manaplus-5dbe8005e02b29da820fb4ed09fd3b0645683f70.tar.gz manaplus-5dbe8005e02b29da820fb4ed09fd3b0645683f70.tar.bz2 manaplus-5dbe8005e02b29da820fb4ed09fd3b0645683f70.tar.xz manaplus-5dbe8005e02b29da820fb4ed09fd3b0645683f70.zip |
Add shader related OpenGL functions and some other.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index f7c877c1f..a628c25a7 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -901,6 +901,40 @@ void GraphicsManager::initOpenGLFunctions() assignFunction(glBindBuffer, "glBindBuffer"); assignFunction(glBufferData, "glBufferData"); } + if (checkGLVersion(2, 0)) + { + assignFunction(glCreateShader, "glCreateShader"); + assignFunction(glDeleteShader, "glDeleteShader"); + assignFunction(glGetShaderiv, "glGetShaderiv"); + assignFunction(glGetShaderInfoLog, "glGetShaderInfoLog"); + assignFunction(glGetShaderSource, "glGetShaderSource"); + assignFunction(glShaderSource, "glShaderSource"); + assignFunction(glCompileShader, "glCompileShader"); + assignFunction(glLinkProgram, "glLinkProgram"); + assignFunction(glDeleteProgram, "glDeleteProgram"); + assignFunction(glCreateProgram, "glCreateProgram"); + assignFunction(glAttachShader, "glAttachShader"); + assignFunction(glDetachShader, "glDetachShader"); + assignFunction(glGetAttachedShaders, "glGetAttachedShaders"); + assignFunction(glGetUniformLocation, "glGetUniformLocation"); + assignFunction(glGetActiveUniform, "glGetActiveUniform"); + assignFunction(glGetProgramiv, "glGetProgramiv"); + assignFunction(glUseProgram, "glUseProgram"); + assignFunction(glValidateProgram, "glValidateProgram"); + assignFunction(glGetAttribLocation, "glGetAttribLocation"); + } + if (checkGLVersion(3, 0)) + { + assignFunction(glBindFragDataLocation, "glBindFragDataLocation"); + } + if (checkGLVersion(4, 0) + || supportExtension("GL_ARB_separate_shader_objects")) + { + assignFunction(glUniform1f, "glUniform1f"); + assignFunction(glUniform2f, "glUniform2f"); + assignFunction(glUniform3f, "glUniform3f"); + assignFunction(glUniform4f, "glUniform4f"); + } #ifdef WIN32 assignFunction(wglGetExtensionsString, "wglGetExtensionsStringARB"); |