From c5a6f80e62fd9836a75058ac358d39dd5ec956b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 10 Dec 2015 17:56:00 +0300 Subject: Add pointer to OpenGL function glActiveTexture. --- src/graphicsmanager.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'src/graphicsmanager.cpp') 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"); -- cgit v1.2.3-70-g09d2