Created
July 31, 2014 15:19
-
-
Save nothings/43f35d8b7010c7c024b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GDRAW_GL_EXTENSION_LIST \ | |
/* identifier import procname */ \ | |
/* GL_ARB_multitexture */ \ | |
GLE(ActiveTexture, "ActiveTextureARB", ACTIVETEXTUREARB) \ | |
/* GL_ARB_texture_compression */ \ | |
GLE(CompressedTexImage2D, "CompressedTexImage2DARB", COMPRESSEDTEXIMAGE2DARB) \ | |
/* GL_ARB_vertex_buffer_object */ \ | |
GLE(GenBuffers, "GenBuffersARB", GENBUFFERSARB) \ | |
GLE(DeleteBuffers, "DeleteBuffersARB", DELETEBUFFERSARB) \ | |
GLE(BindBuffer, "BindBufferARB", BINDBUFFERARB) \ | |
GLE(BufferData, "BufferDataARB", BUFFERDATAARB) \ | |
/* ... */ | |
#define GLE(id, import, procname) static PFNGL##procname##PROC gl##id; | |
GDRAW_GL_EXTENSION_LIST | |
#undef GLE | |
static void load_extensions(void) | |
{ | |
#define GLE(id, import, procname) gl##id = (PFNGL##procname##PROC) wglGetProcAddress("gl" import); | |
GDRAW_GL_EXTENSION_LIST | |
#undef GLE | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment