1
/* ------------------------------------------------------------------------ */
3
const GLubyte* glewGetErrorString (GLenum error)
5
static const GLubyte* _glewErrorString[] =
7
(const GLubyte*)"No error",
8
(const GLubyte*)"Missing GL version",
9
(const GLubyte*)"GL 1.1 and up are not supported",
10
(const GLubyte*)"GLX 1.2 and up are not supported",
11
(const GLubyte*)"Unknown error"
13
const int max_error = sizeof(_glewErrorString)/sizeof(*_glewErrorString) - 1;
14
return _glewErrorString[(int)error > max_error ? max_error : (int)error];
17
const GLubyte* glewGetString (GLenum name)
19
static const GLubyte* _glewString[] =
22
(const GLubyte*)"GLEW_VERSION_STRING",
23
(const GLubyte*)"GLEW_VERSION_MAJOR_STRING",
24
(const GLubyte*)"GLEW_VERSION_MINOR_STRING",
25
(const GLubyte*)"GLEW_VERSION_MICRO_STRING"
27
const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1;
28
return _glewString[(int)name > max_string ? 0 : (int)name];
31
/* ------------------------------------------------------------------------ */
33
GLboolean glewExperimental = GL_FALSE;
38
extern GLenum wglewContextInit (void);
39
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
40
extern GLenum glxewContextInit (void);
46
if ( (r = glewContextInit()) ) return r;
48
return wglewContextInit();
49
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
50
return glxewContextInit();
1
/* ------------------------------------------------------------------------ */
3
const GLubyte* glewGetErrorString (GLenum error)
5
static const GLubyte* _glewErrorString[] =
7
(const GLubyte*)"No error",
8
(const GLubyte*)"Missing GL version",
9
(const GLubyte*)"GL 1.1 and up are not supported",
10
(const GLubyte*)"GLX 1.2 and up are not supported",
11
(const GLubyte*)"Unknown error"
13
const int max_error = sizeof(_glewErrorString)/sizeof(*_glewErrorString) - 1;
14
return _glewErrorString[(int)error > max_error ? max_error : (int)error];
17
const GLubyte* glewGetString (GLenum name)
19
static const GLubyte* _glewString[] =
22
(const GLubyte*)"GLEW_VERSION_STRING",
23
(const GLubyte*)"GLEW_VERSION_MAJOR_STRING",
24
(const GLubyte*)"GLEW_VERSION_MINOR_STRING",
25
(const GLubyte*)"GLEW_VERSION_MICRO_STRING"
27
const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1;
28
return _glewString[(int)name > max_string ? 0 : (int)name];
31
/* ------------------------------------------------------------------------ */
33
GLboolean glewExperimental = GL_FALSE;
38
extern GLenum wglewContextInit (void);
39
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
40
extern GLenum glxewContextInit (void);
46
if ( (r = glewContextInit()) ) return r;
48
return wglewContextInit();
49
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */
50
return glxewContextInit();