summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-04 21:04:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-04 21:04:12 +0300
commit5dbe8005e02b29da820fb4ed09fd3b0645683f70 (patch)
tree8a563efaeb63fa17eaf18466da9a825f9f5f91d1 /src/graphicsmanager.cpp
parentec5b0e17ff735e58de139b7f8ce0598928958bcc (diff)
downloadmanaverse-5dbe8005e02b29da820fb4ed09fd3b0645683f70.tar.gz
manaverse-5dbe8005e02b29da820fb4ed09fd3b0645683f70.tar.bz2
manaverse-5dbe8005e02b29da820fb4ed09fd3b0645683f70.tar.xz
manaverse-5dbe8005e02b29da820fb4ed09fd3b0645683f70.zip
Add shader related OpenGL functions and some other.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp34
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");