summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-10 17:56:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-10 17:56:00 +0300
commitc5a6f80e62fd9836a75058ac358d39dd5ec956b5 (patch)
treec36aab0291b39571fff3f577620da6149c32fb63 /src/graphicsmanager.cpp
parent18808109d12835d18d9d1ada96ed394a082a7740 (diff)
downloadManaVerse-c5a6f80e62fd9836a75058ac358d39dd5ec956b5.tar.gz
ManaVerse-c5a6f80e62fd9836a75058ac358d39dd5ec956b5.tar.bz2
ManaVerse-c5a6f80e62fd9836a75058ac358d39dd5ec956b5.tar.xz
ManaVerse-c5a6f80e62fd9836a75058ac358d39dd5ec956b5.zip
Add pointer to OpenGL function glActiveTexture.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index bd7347e53..70c4346bf 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -896,6 +896,7 @@ void GraphicsManager::initOpenGLFunctions()
const bool is10 = checkGLVersion(1, 0);
const bool is11 = checkGLVersion(1, 1);
const bool is12 = checkGLVersion(1, 2);
+ const bool is13 = checkGLVersion(1, 3);
const bool is15 = checkGLVersion(1, 5);
const bool is20 = checkGLVersion(2, 0);
const bool is21 = checkGLVersion(2, 1);
@@ -936,6 +937,7 @@ void GraphicsManager::initOpenGLFunctions()
{
mSupportModernOpengl = false;
emulateFunction(glTextureSubImage2D);
+ emulateFunction(glActiveTexture);
return;
}
@@ -978,12 +980,6 @@ void GraphicsManager::initOpenGLFunctions()
}
}
- if (is20 || supportExtension("GL_ARB_explicit_attrib_location"))
- {
- logger->log1("found GL_ARB_explicit_attrib_location");
- assignFunction(glBindAttribLocation);
- }
-
if (is12 && (is42 || supportExtension("GL_ARB_texture_storage")))
{
logger->log1("found GL_ARB_texture_storage");
@@ -993,6 +989,28 @@ void GraphicsManager::initOpenGLFunctions()
{
logger->log1("GL_ARB_texture_storage not found");
}
+
+ if (is13 || supportExtension("GL_ARB_multitexture"))
+ {
+ logger->log1("found GL_ARB_multitexture or OpenGL 1.3");
+ assignFunction(glActiveTexture);
+ }
+ else
+ {
+ emulateFunction(glActiveTexture);
+ logger->log1("GL_ARB_multitexture not found");
+ }
+
+ if (is20 || supportExtension("GL_ARB_explicit_attrib_location"))
+ {
+ logger->log1("found GL_ARB_explicit_attrib_location or OpenGL 2.0");
+ assignFunction(glBindAttribLocation);
+ }
+ else
+ {
+ logger->log1("GL_ARB_explicit_attrib_location not found");
+ }
+
if (is30 || supportExtension("GL_ARB_framebuffer_object"))
{ // frame buffer supported
logger->log1("found GL_ARB_framebuffer_object");