Refactoring glxewIsSupported and wglewIsSupported for backwards compatibility.

This commit is contained in:
Nigel Stewart 2015-08-07 16:53:47 +10:00
parent 08806061a4
commit d4a0a8401c
4 changed files with 4 additions and 6 deletions

View File

@ -9,7 +9,7 @@
#if defined(GLEW_MX) #if defined(GLEW_MX)
GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name) GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name)
#else #else
GLboolean glxewContextIsSupported (const char* name) GLboolean glxewIsSupported (const char* name)
#endif #endif
{ {
const GLubyte* pos = (const GLubyte*)name; const GLubyte* pos = (const GLubyte*)name;

View File

@ -9,7 +9,7 @@
#if defined(GLEW_MX) #if defined(GLEW_MX)
GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext* ctx, const char* name) GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext* ctx, const char* name)
#else #else
GLboolean GLEWAPIENTRY wglewContextIsSupported (const char* name) GLboolean GLEWAPIENTRY wglewIsSupported (const char* name)
#endif #endif
{ {
const GLubyte* pos = (const GLubyte*)name; const GLubyte* pos = (const GLubyte*)name;

View File

@ -15,10 +15,9 @@ GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx,
#else /* GLEW_MX */ #else /* GLEW_MX */
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (); GLEWAPI GLenum GLEWAPIENTRY glxewContextInit ();
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const char *name); GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#define glxewInit() glxewContextInit() #define glxewInit() glxewContextInit()
#define glxewIsSupported(x) glxewContextIsSupported(x)
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x) #define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x #define GLXEW_GET_FUN(x) x

View File

@ -15,10 +15,9 @@ GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx,
#else /* GLEW_MX */ #else /* GLEW_MX */
GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (); GLEWAPI GLenum GLEWAPIENTRY wglewContextInit ();
GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const char *name); GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#define wglewInit() wglewContextInit() #define wglewInit() wglewContextInit()
#define wglewIsSupported(x) wglewContextIsSupported(x)
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define WGLEW_GET_FUN(x) x #define WGLEW_GET_FUN(x) x