Refactoring wglewInit, glxewInit for better consistency.

This commit is contained in:
Nigel Stewart 2015-08-07 16:41:04 +10:00
parent 54b537afda
commit 08806061a4
5 changed files with 13 additions and 10 deletions

View File

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

View File

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

View File

@ -195,7 +195,7 @@ GLboolean glewCreateContext (struct createParams* params)
int contextAttrs[20];
int i;
wglewContextInit();
wglewInit();
/* Intel HD 3000 has WGL_ARB_create_context, but not WGL_ARB_create_context_profile */
if (!wglewGetExtension("WGL_ARB_create_context"))
@ -368,7 +368,7 @@ GLboolean glewCreateContext (struct createParams *params)
int contextAttrs[20];
int nelems, i;
glxewContextInit();
glxewInit();
if (!glxewGetExtension("GLX_ARB_create_context"))
return GL_TRUE;

View File

@ -17,11 +17,12 @@ GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx,
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit ();
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const char *name);
#define glxewInit() glxewContextInit()
#define glxewIsSupported(x) glxewContextIsSupported(x)
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#endif /* GLEW_MX */
GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);

View File

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