diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-02 23:04:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-02 23:04:19 +0300 |
commit | 3c9d042fff05fd3ead33b0ee301449345a1c06a9 (patch) | |
tree | 054e641bf09b0cddce51ccd307665cce38bac4dc /src/render/mglfunctions.h | |
parent | c5ba04d8c4f303ad621bfb295a37668bc1b3bb9c (diff) | |
download | manaplus-3c9d042fff05fd3ead33b0ee301449345a1c06a9.tar.gz manaplus-3c9d042fff05fd3ead33b0ee301449345a1c06a9.tar.bz2 manaplus-3c9d042fff05fd3ead33b0ee301449345a1c06a9.tar.xz manaplus-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.h | 15 |
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 |