| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef __glew_utils_h__ |
| #define __glew_utils_h__ |
| |
| #include <GL/glew.h> |
| #if defined(_WIN32) |
| # include <GL/wglew.h> |
| #elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) |
| # include <GL/glxew.h> |
| #endif |
| |
| |
| |
| |
| #ifdef GLEW_MX |
| # define glewGetContext() ctx |
| # ifdef _WIN32 |
| # define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext* ctx |
| # define GLEW_CONTEXT_ARG_VAR_INIT ctx |
| # define wglewGetContext() ctx |
| # define WGLEW_CONTEXT_ARG_DEF_INIT WGLEWContext* ctx |
| # define WGLEW_CONTEXT_ARG_DEF_LIST WGLEWContext* ctx |
| # else |
| # define GLEW_CONTEXT_ARG_DEF_INIT void |
| # define GLEW_CONTEXT_ARG_VAR_INIT |
| # define glxewGetContext() ctx |
| # define GLXEW_CONTEXT_ARG_DEF_INIT void |
| # define GLXEW_CONTEXT_ARG_DEF_LIST GLXEWContext* ctx |
| # endif |
| # define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx |
| #else |
| # define GLEW_CONTEXT_ARG_DEF_INIT void |
| # define GLEW_CONTEXT_ARG_VAR_INIT |
| # define GLEW_CONTEXT_ARG_DEF_LIST void |
| # define WGLEW_CONTEXT_ARG_DEF_INIT void |
| # define WGLEW_CONTEXT_ARG_DEF_LIST void |
| # define GLXEW_CONTEXT_ARG_DEF_INIT void |
| # define GLXEW_CONTEXT_ARG_DEF_LIST void |
| #endif |
| |
| |
| |
| |
| #if defined(_WIN32) |
| # define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name) |
| #else |
| # if defined(__APPLE__) |
| extern void* NSGLGetProcAddress (const GLubyte* name); |
| # define glewGetProcAddress(name) NSGLGetProcAddress(name) |
| # else |
| # if defined(__sgi) || defined(__sun) |
| extern void* dlGetProcAddress (const GLubyte* name); |
| # define glewGetProcAddress(name) dlGetProcAddress(name) |
| # else |
| # define glewGetProcAddress(name) (*glXGetProcAddressARB)(name) |
| # endif |
| # endif |
| #endif |
| |
| |
| |
| |
| |
| extern GLuint _glewStrLen (const GLubyte* s); |
| extern GLuint _glewStrCLen (const GLubyte* s, GLubyte c); |
| extern GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n); |
| extern GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb); |
| extern GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb); |
| extern GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) |
| |
| #endif |