FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
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
{
39
GLENABLE
Enable
;
40
GLDISABLE
Disable
;
41
GLGETSTRING
GetString
;
42
GLVIEWPORT
Viewport
;
43
GLMATRIXMODE
MatrixMode
;
44
GLLOADIDENTITY
LoadIdentity
;
45
GLORTHO
Ortho
;
46
GLSHADEMODEL
ShadeModel
;
47
GLDEPTHMASK
DepthMask
;
48
GLCLEARCOLOR
ClearColor
;
49
GLCLEAR
Clear
;
50
GLGENTEXTURES
GenTextures
;
51
GLDELETETEXTURES
DeleteTextures
;
52
GLBINDTEXTURE
BindTexture
;
53
GLTEXIMAGE2D
TexImage2D
;
54
int
state
;
55
char
extensions
[
FBGL_EXTENSIONS_STRING_SIZE
];
56
}
FB_GL
;
57
58
typedef
struct
FB_GL_PARAMS
{
59
int
color_bits
;
60
int
color_red_bits
;
61
int
color_green_bits
;
62
int
color_blue_bits
;
63
int
color_alpha_bits
;
64
int
depth_bits
;
65
int
stencil_bits
;
66
int
accum_bits
;
67
int
accum_red_bits
;
68
int
accum_green_bits
;
69
int
accum_blue_bits
;
70
int
accum_alpha_bits
;
71
int
num_samples
;
72
}
FB_GL_PARAMS
;
73
74
extern
FB_GL
__fb_gl
;
75
extern
FB_GL_PARAMS
__fb_gl_params
;
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 */
gfxlib2
fb_gfx_gl.h
Generated on Thu Jan 23 2014 19:40:05 for FreeBASIC by
1.8.4