From 3c9d042fff05fd3ead33b0ee301449345a1c06a9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Jul 2014 23:04:19 +0300 Subject: Add basic support for functions from OpenGL extension GL_EXT_direct_state_access. --- src/graphicsmanager.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/graphicsmanager.cpp') diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 7ebdcbdc3..af016fb34 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -44,6 +44,7 @@ #include "render/graphics.h" #include "render/mgl.h" +#include "render/mglemu.h" #include "render/mobileopenglgraphics.h" #include "render/modernopenglgraphics.h" #include "render/normalopenglgraphics.h" @@ -842,6 +843,7 @@ void GraphicsManager::initOpenGLFunctions() const bool is42 = checkGLVersion(4, 2); const bool is43 = checkGLVersion(4, 3); const bool is44 = checkGLVersion(4, 4); + const bool isDao = supportExtension("GL_EXT_direct_state_access"); mSupportModernOpengl = true; // Texture sampler @@ -866,6 +868,17 @@ void GraphicsManager::initOpenGLFunctions() if (!is11) return; + if (isDao) + { + logger->log1("found GL_EXT_direct_state_access"); + assignFunctionEmu(glTextureSubImage2D, "glTextureSubImage2DEXT"); + } + else + { + logger->log1("GL_EXT_direct_state_access not found"); + emulateFunction(glTextureSubImage2D); + } + if (is12 && (is42 || supportExtension("GL_ARB_texture_storage"))) { logger->log1("found GL_ARB_texture_storage"); -- cgit v1.2.3-70-g09d2