OPENGL: Fix warning when using builtin OpenGL functions

This commit is contained in:
Cameron Cawley 2019-10-18 16:49:12 +01:00
parent 5589c2bd60
commit 3d83d144a3

View File

@ -82,11 +82,11 @@ void OpenGLGraphicsManager::initializeGLContext() {
// We use horrible trickery to silence C++ compilers.
// See backends/plugins/sdl/sdl-provider.cpp for more information.
assert(sizeof(void (*)()) == sizeof(void *));
void *fn = nullptr;
#define LOAD_FUNC(name, loadName) \
fn = getProcAddress(#loadName); \
memcpy(&g_context.name, &fn, sizeof(fn))
#define LOAD_FUNC(name, loadName) { \
void *fn = getProcAddress(#loadName); \
memcpy(&g_context.name, &fn, sizeof(fn)); \
}
#define GL_EXT_FUNC_DEF(ret, name, param) LOAD_FUNC(name, name)