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/render/mglfunctions.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/render/mglfunctions.h') 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(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 -- cgit v1.2.3-70-g09d2