1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
/*
* Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
* Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "GL/gl.h"
#include "GLContext.h"
extern GL::GLContext* g_gl_context;
void glEnable(GLenum cap)
{
g_gl_context->gl_enable(cap);
}
void glDisable(GLenum cap)
{
g_gl_context->gl_disable(cap);
}
GLboolean glIsEnabled(GLenum cap)
{
return g_gl_context->gl_is_enabled(cap);
}
void glFrontFace(GLenum mode)
{
g_gl_context->gl_front_face(mode);
}
void glCullFace(GLenum mode)
{
g_gl_context->gl_cull_face(mode);
}
void glClear(GLbitfield mask)
{
g_gl_context->gl_clear(mask);
}
void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
g_gl_context->gl_clear_color(red, green, blue, alpha);
}
void glClearDepth(GLdouble depth)
{
g_gl_context->gl_clear_depth(depth);
}
void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
{
g_gl_context->gl_color_mask(red, green, blue, alpha);
}
GLubyte* glGetString(GLenum name)
{
return g_gl_context->gl_get_string(name);
}
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
g_gl_context->gl_viewport(x, y, width, height);
}
GLenum glGetError()
{
return g_gl_context->gl_get_error();
}
void glFlush()
{
g_gl_context->gl_flush();
}
void glFinish()
{
g_gl_context->gl_finish();
}
void glHint(GLenum target, GLenum mode)
{
g_gl_context->gl_hint(target, mode);
}
void glReadBuffer(GLenum mode)
{
g_gl_context->gl_read_buffer(mode);
}
void glDrawBuffer(GLenum buffer)
{
g_gl_context->gl_draw_buffer(buffer);
}
void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
{
g_gl_context->gl_read_pixels(x, y, width, height, format, type, pixels);
}
void glGetBooleanv(GLenum pname, GLboolean* data)
{
g_gl_context->gl_get_booleanv(pname, data);
}
void glGetDoublev(GLenum pname, GLdouble* params)
{
g_gl_context->gl_get_doublev(pname, params);
}
void glGetFloatv(GLenum pname, GLfloat* params)
{
g_gl_context->gl_get_floatv(pname, params);
}
void glGetIntegerv(GLenum pname, GLint* data)
{
g_gl_context->gl_get_integerv(pname, data);
}
void glDepthMask(GLboolean flag)
{
g_gl_context->gl_depth_mask(flag);
}
void glEnableClientState(GLenum cap)
{
g_gl_context->gl_enable_client_state(cap);
}
void glDisableClientState(GLenum cap)
{
g_gl_context->gl_disable_client_state(cap);
}
void glDepthRange(GLdouble min, GLdouble max)
{
g_gl_context->gl_depth_range(min, max);
}
void glDepthFunc(GLenum func)
{
g_gl_context->gl_depth_func(func);
}
void glPolygonMode(GLenum face, GLenum mode)
{
g_gl_context->gl_polygon_mode(face, mode);
}
void glPolygonOffset(GLfloat factor, GLfloat units)
{
g_gl_context->gl_polygon_offset(factor, units);
}
void glPixelStorei(GLenum pname, GLint param)
{
g_gl_context->gl_pixel_storei(pname, param);
}
void glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
{
g_gl_context->gl_scissor(x, y, width, height);
}
|