zenilib: zenilib/jni/external/glew/auto/src/glewinfo_head.c Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
glewinfo_head.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <GL/glew.h>
5 #if defined(_WIN32)
6 #include <GL/wglew.h>
7 #elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
8 #include <GL/glxew.h>
9 #endif
10
11 #ifdef GLEW_REGAL
12 #include <GL/Regal.h>
13 #endif
14
15 static FILE* f;
16
17 #ifdef GLEW_MX
18 GLEWContext _glewctx;
19 #define glewGetContext() (&_glewctx)
20 #ifdef _WIN32
21 WGLEWContext _wglewctx;
22 #define wglewGetContext() (&_wglewctx)
23 #elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
24 GLXEWContext _glxewctx;
25 #define glxewGetContext() (&_glxewctx)
26 #endif
27 #endif
28
29 #if defined(_WIN32)
30 GLboolean glewCreateContext (int* pixelformat);
31 #elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
32 GLboolean glewCreateContext (const char* display, int* visual);
33 #else
34 GLboolean glewCreateContext ();
35 #endif
36
37 #if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
38 GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual);
39 #endif
40
41 void glewDestroyContext ();
42
43 /* ------------------------------------------------------------------------- */
44
45 static void glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLboolean def3)
46 {
47 unsigned int i;
48 fprintf(f, "\n%s:", name);
49 for (i=0; i<62-strlen(name); i++) fprintf(f, " ");
50 fprintf(f, "%s ", def1 ? "OK" : "MISSING");
51 if (def1 != def2)
52 fprintf(f, "[%s] ", def2 ? "OK" : "MISSING");
53 if (def1 != def3)
54 fprintf(f, "[%s]\n", def3 ? "OK" : "MISSING");
55 else
56 fprintf(f, "\n");
57 for (i=0; i<strlen(name)+1; i++) fprintf(f, "-");
58 fprintf(f, "\n");
59 fflush(f);
60 }
61
62 static void glewInfoFunc (const char* name, GLint undefined)
63 {
64 unsigned int i;
65 fprintf(f, " %s:", name);
66 for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
67 fprintf(f, "%s\n", undefined ? "MISSING" : "OK");
68 fflush(f);
69 }
70
71 /* ----------------------------- GL_VERSION_1_1 ---------------------------- */
72
73 #ifdef GL_VERSION_1_1
74
75 static void _glewInfo_GL_VERSION_1_1 (void)
76 {
77 glewPrintExt("GL_VERSION_1_1", GLEW_VERSION_1_1, GLEW_VERSION_1_1, GLEW_VERSION_1_1);
78 }
79
80 #endif /* GL_VERSION_1_1 */
81
GLEW_VERSION_1_1
#define GLEW_VERSION_1_1
Definition: glew_head.h:1099
f
GLclampf f
Definition: glew.h:3390
GLboolean
unsigned char GLboolean
Definition: gl2.h:24
glewDestroyContext
void glewDestroyContext()
Definition: glewinfo.c:10669
name
EGLImageKHR EGLint * name
Definition: eglext.h:284
glewPrintExt
static void glewPrintExt(const char *name, GLboolean def1, GLboolean def2, GLboolean def3)
Definition: glewinfo_head.c:45
display
char * display
Definition: visualinfo.c:85
glewInfoFunc
static void glewInfoFunc(const char *name, GLint undefined)
Definition: glewinfo_head.c:62
GLint
int GLint
Definition: gl2.h:28
String.h
glewCreateContext
GLboolean glewCreateContext(const char *display, int *visual)
Definition: glewinfo.c:10625
glewParseArgs
GLboolean glewParseArgs(int argc, char **argv, char **display, int *visual)
Definition: glewinfo.c:10491
i
int i
Definition: pngrutil.c:1377
visual
int visual
Definition: visualinfo.c:86