mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-29 18:07:08 +00:00
Refactoring wglewInit, glxewInit for better consistency.
This commit is contained in:
parent
54b537afda
commit
08806061a4
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user