FreeBASIC  0.91.0
fb_gfx_gl.h
Go to the documentation of this file.
1 /* internal OpenGL gfx definitions */
2 
3 #ifndef DISABLE_OPENGL
4 
5 #ifdef HOST_DARWIN
6  #include <OpenGL/gl.h>
7  /* Mac GL headers don't define APIENTRY, so we do it manually */
8  #define APIENTRY
9 #else
10  #include <GL/gl.h>
11 #endif
12 #include "../rtlib/fb_private_hdynload.h"
13 
14 #define FBGL_EXTENSIONS_STRING_SIZE 16384
15 
16 #ifndef GL_ARB_multisample
17 #define GL_ARB_multisample
18 #define GL_MULTISAMPLE_ARB 0x809D
19 #endif
20 
21 typedef void (APIENTRY *GLENABLE)(GLenum);
22 typedef void (APIENTRY *GLDISABLE)(GLenum);
23 typedef const GLubyte *(APIENTRY *GLGETSTRING)(GLenum);
24 typedef void (APIENTRY *GLVIEWPORT)(GLint,GLint,GLsizei,GLsizei);
25 typedef void (APIENTRY *GLMATRIXMODE)(GLenum);
26 typedef void (APIENTRY *GLLOADIDENTITY)(void);
27 typedef void (APIENTRY *GLORTHO)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble);
28 typedef void (APIENTRY *GLSHADEMODEL)(GLenum);
29 typedef void (APIENTRY *GLDEPTHMASK)(GLboolean);
30 typedef void (APIENTRY *GLCLEARCOLOR)(GLclampf,GLclampf,GLclampf,GLclampf);
31 typedef void (APIENTRY *GLCLEAR)(GLbitfield);
32 typedef void (APIENTRY *GLGENTEXTURES)(GLsizei,GLuint *);
33 typedef void (APIENTRY *GLDELETETEXTURES)(GLsizei,GLuint *);
34 typedef void (APIENTRY *GLBINDTEXTURE)(GLenum,GLuint);
35 typedef void (APIENTRY *GLTEXIMAGE2D)(GLenum,GLint,GLint,GLsizei,GLsizei,GLint,GLenum,GLenum,const GLvoid *);
36 
37 
38 typedef struct FB_GL {
54  int state;
56 } FB_GL;
57 
58 typedef struct FB_GL_PARAMS {
72 } FB_GL_PARAMS;
73 
74 extern FB_GL __fb_gl;
76 
77 extern void fb_hGL_NormalizeParameters(int gl_options);
78 extern int fb_hGL_Init(FB_DYLIB lib, char *os_extensions);
79 extern int fb_hGL_ExtensionSupported(const char *extension);
80 extern void *fb_hGL_GetProcAddress(const char *proc);
81 
82 #endif /* not DISABLE_OPENGL */