summaryrefslogtreecommitdiff
path: root/src/render/mglfunctions.h
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/render/mglfunctions.h
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/render/mglfunctions.h')
-rw-r--r--src/render/mglfunctions.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/render/mglfunctions.h b/src/render/mglfunctions.h
index e68da7f11..59f05e190 100644
--- a/src/render/mglfunctions.h
+++ b/src/render/mglfunctions.h
@@ -43,5 +43,20 @@
else \
logger->log(std::string("assigned function: ") + name);
+#define assignFunctionEmu(func, name) m##func \
+ = reinterpret_cast<func##_t>(getFunction(name)); \
+ if (m##func == nullptr) \
+ { \
+ m##func = emu##func; \
+ logger->log(std::string("emulated function: ") + name); \
+ } \
+ else \
+ { \
+ logger->log(std::string("assigned function: ") + name); \
+ }
+
+#define emulateFunction(func) m##func = emu##func; \
+ logger->log("emulated function: #func")
+
#endif // USE_OPENGL
#endif // RENDER_MGLFUNCTIONS_H