summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-02 23:04:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-02 23:04:19 +0300
commit3c9d042fff05fd3ead33b0ee301449345a1c06a9 (patch)
tree054e641bf09b0cddce51ccd307665cce38bac4dc /src/graphicsmanager.cpp
parentc5ba04d8c4f303ad621bfb295a37668bc1b3bb9c (diff)
downloadmv-3c9d042fff05fd3ead33b0ee301449345a1c06a9.tar.gz
mv-3c9d042fff05fd3ead33b0ee301449345a1c06a9.tar.bz2
mv-3c9d042fff05fd3ead33b0ee301449345a1c06a9.tar.xz
mv-3c9d042fff05fd3ead33b0ee301449345a1c06a9.zip
Add basic support for functions from OpenGL extension GL_EXT_direct_state_access.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp13
1 files changed, 13 insertions, 0 deletions
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");