zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
glew_init_tail.c
Go to the documentation of this file.
1 /* ------------------------------------------------------------------------ */
2 
4 {
5  static const GLubyte* _glewErrorString[] =
6  {
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"
12  };
13  const int max_error = sizeof(_glewErrorString)/sizeof(*_glewErrorString) - 1;
14  return _glewErrorString[(int)error > max_error ? max_error : (int)error];
15 }
16 
18 {
19  static const GLubyte* _glewString[] =
20  {
21  (const GLubyte*)NULL,
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"
26  };
27  const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1;
28  return _glewString[(int)name > max_string ? 0 : (int)name];
29 }
30 
31 /* ------------------------------------------------------------------------ */
32 
34 
35 #if !defined(GLEW_MX)
36 
37 #if defined(_WIN32)
39 #elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
41 #endif /* _WIN32 */
42 
44 {
45  GLenum r;
46  r = glewContextInit();
47  if ( r != 0 ) return r;
48 #if defined(_WIN32)
49  return wglewContextInit();
50 #elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
51  return glxewContextInit();
52 #else
53  return r;
54 #endif /* _WIN32 */
55 }
56 
57 #endif /* !GLEW_MX */
#define GL_FALSE
Definition: gl2.h:50
unsigned int GLenum
Definition: gl2.h:23
#define NULL
Definition: ftobjs.h:61
GLboolean glewExperimental
unsigned char GLboolean
Definition: gl2.h:24
GLenum GLEWAPIENTRY wglewContextInit(WGLEW_CONTEXT_ARG_DEF_LIST)
Definition: glew_init_wgl.c:23
EGLImageKHR EGLint * name
Definition: eglext.h:284
static GLenum GLEWAPIENTRY glewContextInit(GLEW_CONTEXT_ARG_DEF_LIST)
Definition: glew_init_gl.c:19
khronos_uint8_t GLubyte
Definition: gl2.h:30
int
Definition: SDL_systhread.c:37
FT_Error error
Definition: cffdrivr.c:407
GLenum glxewContextInit(GLXEW_CONTEXT_ARG_DEF_LIST)
Definition: glew_init_glx.c:15
#define GLEWAPIENTRY
Definition: glew_head.h:178
const GLubyte *GLEWAPIENTRY glewGetErrorString(GLenum error)
Definition: glew_init_tail.c:3
GLdouble GLdouble GLdouble r
Definition: glew.h:1392
const GLubyte *GLEWAPIENTRY glewGetString(GLenum name)
GLenum GLEWAPIENTRY glewInit(void)