Commit 08806061 authored by Nigel Stewart's avatar Nigel Stewart
Browse files

Refactoring wglewInit, glxewInit for better consistency.

parent 54b537af
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment