summaryrefslogtreecommitdiff
path: root/src/render/opengl/naclglfunctions.h
blob: d1dad707b5ac3648d97b15a62e745b6ab748a6e7 (plain) (blame)
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
/*
 *  The ManaPlus Client
 *  Copyright (C) 2014-2015  The ManaPlus Developers
 *
 *  This file is part of The ManaPlus Client.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef RENDER_OPENGL_NACLGLFUNCTIONS_H
#define RENDER_OPENGL_NACLGLFUNCTIONS_H

#if defined(__native_client__) && defined(USE_OPENGL)

#include <ppapi/c/ppb_opengles2.h>

extern const struct PPB_OpenGLES2* gles2Interface;
extern PP_Resource gles2Context;

#define mglDrawArrays(...) \
    gles2Interface->DrawArrays(gles2Context, __VA_ARGS__)
#define mglEnableVertexAttribArray(...) \
    gles2Interface->EnableVertexAttribArray(gles2Context, __VA_ARGS__)
#define mglVertexAttribPointer(...) \
    gles2Interface->VertexAttribPointer(gles2Context, __VA_ARGS__)
#define mglUseProgram(...) \
    gles2Interface->UseProgram(gles2Context, __VA_ARGS__)
#define mglViewport(...) \
    gles2Interface->Viewport(gles2Context, __VA_ARGS__)
#define mglGenBuffers(...) \
    gles2Interface->GenBuffers(gles2Context, __VA_ARGS__)
#define mglBindBuffer(...) \
    gles2Interface->BindBuffer(gles2Context, __VA_ARGS__)
#define mglBufferData(...) \
    gles2Interface->BufferData(gles2Context, __VA_ARGS__)
#define mglDeleteBuffers(...) \
    gles2Interface->DeleteBuffers(gles2Context, __VA_ARGS__)
#define mglGetUniformLocation(...) \
    gles2Interface->GetUniformLocation(gles2Context, __VA_ARGS__)
#define mglCreateShader(...) \
    gles2Interface->CreateShader(gles2Context, __VA_ARGS__)
#define mglShaderSource(...) \
    gles2Interface->ShaderSource(gles2Context, __VA_ARGS__)
#define mglCompileShader(...) \
    gles2Interface->CompileShader(gles2Context, __VA_ARGS__)
#define mglGetShaderiv(...) \
    gles2Interface->GetShaderiv(gles2Context, __VA_ARGS__)
#define mglAttachShader(...) \
    gles2Interface->AttachShader(gles2Context, __VA_ARGS__)
#define mglBindAttribLocation(...) \
    gles2Interface->BindAttribLocation(gles2Context, __VA_ARGS__)
#define mglLinkProgram(...) \
    gles2Interface->LinkProgram(gles2Context, __VA_ARGS__)
#define mglGetProgramiv(...) \
    gles2Interface->GetProgramiv(gles2Context, __VA_ARGS__)
#define mglClearColor(...) \
    gles2Interface->ClearColor(gles2Context, __VA_ARGS__)
#define mglUniform1f(...) \
    gles2Interface->Uniform1f(gles2Context, __VA_ARGS__)
#define mglUniform2f(...) \
    gles2Interface->Uniform2f(gles2Context, __VA_ARGS__)
#define mglUniform3f(...) \
    gles2Interface->Uniform3f(gles2Context, __VA_ARGS__)
#define mglUniform4f(...) \
    gles2Interface->Uniform4f(gles2Context, __VA_ARGS__)
#define mglUniform1i(...) \
    gles2Interface->Uniform1i(gles2Context, __VA_ARGS__)
#define mglUniform2i(...) \
    gles2Interface->Uniform2i(gles2Context, __VA_ARGS__)
#define mglUniform3i(...) \
    gles2Interface->Uniform3i(gles2Context, __VA_ARGS__)
#define mglUniform4i(...) \
    gles2Interface->Uniform4i(gles2Context, __VA_ARGS__)
#define mglUniform1fv(...) \
    gles2Interface->Uniform1fv(gles2Context, __VA_ARGS__)
#define mglUniform2fv(...) \
    gles2Interface->Uniform2fv(gles2Context, __VA_ARGS__)
#define mglUniform3fv(...) \
    gles2Interface->Uniform3fv(gles2Context, __VA_ARGS__)
#define mglUniform4fv(...) \
    gles2Interface->Uniform4fv(gles2Context, __VA_ARGS__)
#define mglUniform1iv(...) \
    gles2Interface->Uniform1iv(gles2Context, __VA_ARGS__)
#define mglUniform2iv(...) \
    gles2Interface->Uniform2iv(gles2Context, __VA_ARGS__)
#define mglUniform3iv(...) \
    gles2Interface->Uniform3iv(gles2Context, __VA_ARGS__)
#define mglUniform4iv(...) \
    gles2Interface->Uniform4iv(gles2Context, __VA_ARGS__)
#define mglActiveTexture(...) \
    gles2Interface->ActiveTexture(gles2Context, __VA_ARGS__)
#define mglBindTexture(...) \
    gles2Interface->BindTexture(gles2Context, __VA_ARGS__)
#define mglEnable(...) \
    gles2Interface->Enable(gles2Context, __VA_ARGS__)
#define mglClear(...) \
    gles2Interface->Clear(gles2Context, __VA_ARGS__)
#define mglValidateProgram(...) \
    gles2Interface->ValidateProgram(gles2Context, __VA_ARGS__)
#define mglDeleteProgram(...) \
    gles2Interface->DeleteProgram(gles2Context, __VA_ARGS__)
#define mglCreateProgram() \
    gles2Interface->CreateProgram(gles2Context)
#define mglGetProgramInfoLog(...) \
    gles2Interface->GetProgramInfoLog(gles2Context, __VA_ARGS__)
#define mglDisable(...) \
    gles2Interface->Disable(gles2Context, __VA_ARGS__)
#define mglHint(...) \
    gles2Interface->Hint(gles2Context, __VA_ARGS__)
#define mglScissor(...) \
    gles2Interface->Scissor(gles2Context, __VA_ARGS__)
#define mglEnable(...) \
    gles2Interface->Enable(gles2Context, __VA_ARGS__)
#define mglGetIntegerv(...) \
    gles2Interface->GetIntegerv(gles2Context, __VA_ARGS__)
#define mglGetString(...) \
    gles2Interface->GetString(gles2Context, __VA_ARGS__)
#define mglBindFramebuffer(...) \
    gles2Interface->BindFramebuffer(gles2Context, __VA_ARGS__)
#define mglBindRenderbuffer(...) \
    gles2Interface->BindRenderbuffer(gles2Context, __VA_ARGS__)
#define mglBlendColor(...) \
    gles2Interface->BlendColor(gles2Context, __VA_ARGS__)
#define mglBlendEquation(...) \
    gles2Interface->BlendEquation(gles2Context, __VA_ARGS__)
#define mglBlendEquationSeparate(...) \
    gles2Interface->BlendEquationSeparate(gles2Context, __VA_ARGS__)
#define mglBlendFunc(...) \
    gles2Interface->BlendFunc(gles2Context, __VA_ARGS__)
#define mglBlendFuncSeparate(...) \
    gles2Interface->BlendFuncSeparate(gles2Context, __VA_ARGS__)
#define mglBufferSubData(...) \
    gles2Interface->BufferSubData(gles2Context, __VA_ARGS__)
#define mglCheckFramebufferStatus(...) \
    gles2Interface->CheckFramebufferStatus(gles2Context, __VA_ARGS__)
#define mglClearDepthf(...) \
    gles2Interface->ClearDepthf(gles2Context, __VA_ARGS__)
#define mglClearStencil(...) \
    gles2Interface->ClearStencil(gles2Context, __VA_ARGS__)
#define mglColorMask(...) \
    gles2Interface->ColorMask(gles2Context, __VA_ARGS__)
#define mglCompressedTexImage2D(...) \
    gles2Interface->CompressedTexImage2D(gles2Context, __VA_ARGS__)
#define mglCompressedTexSubImage2D(...) \
    gles2Interface->CompressedTexSubImage2D(gles2Context, __VA_ARGS__)
#define mglCopyTexImage2D(...) \
    gles2Interface->CopyTexImage2D(gles2Context, __VA_ARGS__)
#define mglCopyTexSubImage2D(...) \
    gles2Interface->CopyTexSubImage2D(gles2Context, __VA_ARGS__)
#define mglCullFace(...) \
    gles2Interface->CullFace(gles2Context, __VA_ARGS__)
#define mglDeleteFramebuffers(...) \
    gles2Interface->DeleteFramebuffers(gles2Context, __VA_ARGS__)
#define mglDeleteRenderbuffers(...) \
    gles2Interface->DeleteRenderbuffers(gles2Context, __VA_ARGS__)
#define mglDeleteShader(...) \
    gles2Interface->DeleteShader(gles2Context, __VA_ARGS__)
#define mglDeleteTextures(...) \
    gles2Interface->DeleteTextures(gles2Context, __VA_ARGS__)
#define mglDepthFunc(...) \
    gles2Interface->DepthFunc(gles2Context, __VA_ARGS__)
#define mglDepthMask(...) \
    gles2Interface->DepthMask(gles2Context, __VA_ARGS__)
#define mglDepthRangef(...) \
    gles2Interface->DepthRangef(gles2Context, __VA_ARGS__)
#define mglDetachShader(...) \
    gles2Interface->DetachShader(gles2Context, __VA_ARGS__)
#define mglDisableVertexAttribArray(...) \
    gles2Interface->DisableVertexAttribArray(gles2Context, __VA_ARGS__)
#define mglDrawElements(...) \
    gles2Interface->DrawElements(gles2Context, __VA_ARGS__)
#define mglFinish(...) \
    gles2Interface->Finish(gles2Context, __VA_ARGS__)
#define mglFlush(...) \
    gles2Interface->Flush(gles2Context, __VA_ARGS__)
#define mglFramebufferRenderbuffer(...) \
    gles2Interface->FramebufferRenderbuffer(gles2Context, __VA_ARGS__)
#define mglFramebufferTexture2D(...) \
    gles2Interface->FramebufferTexture2D(gles2Context, __VA_ARGS__)
#define mglFrontFace(...) \
    gles2Interface->FrontFace(gles2Context, __VA_ARGS__)
#define mglGenerateMipmap(...) \
    gles2Interface->GenerateMipmap(gles2Context, __VA_ARGS__)
#define mglGenFramebuffers(...) \
    gles2Interface->GenFramebuffers(gles2Context, __VA_ARGS__)
#define mglGenRenderbuffers(...) \
    gles2Interface->GenRenderbuffers(gles2Context, __VA_ARGS__)
#define mglGenTextures(...) \
    gles2Interface->GenTextures(gles2Context, __VA_ARGS__)
#define mglGetActiveAttrib(...) \
    gles2Interface->GetActiveAttrib(gles2Context, __VA_ARGS__)
#define mglGetActiveUniform(...) \
    gles2Interface->GetActiveUniform(gles2Context, __VA_ARGS__)
#define mglGetAttachedShaders(...) \
    gles2Interface->GetAttachedShaders(gles2Context, __VA_ARGS__)
#define mglGetAttribLocation(...) \
    gles2Interface->GetAttribLocation(gles2Context, __VA_ARGS__)
#define mglGetBooleanv(...) \
    gles2Interface->GetBooleanv(gles2Context, __VA_ARGS__)
#define mglGetBufferParameteriv(...) \
    gles2Interface->GetBufferParameteriv(gles2Context, __VA_ARGS__)
#define mglGetError(...) \
    gles2Interface->GetError(gles2Context, __VA_ARGS__)
#define mglGetFloatv(...) \
    gles2Interface->GetFloatv(gles2Context, __VA_ARGS__)
#define mglGetFramebufferAttachmentParameteriv(...) \
    gles2Interface->GetFramebufferAttachmentParameteriv(gles2Context, \
    __VA_ARGS__)
#define mglGetIntegerv(...) \
    gles2Interface->GetIntegerv(gles2Context, __VA_ARGS__)
#define mglGetRenderbufferParameteriv(...) \
    gles2Interface->GetRenderbufferParameteriv(gles2Context, __VA_ARGS__)
#define mglGetShaderInfoLog(...) \
    gles2Interface->GetShaderInfoLog(gles2Context, __VA_ARGS__)
#define mglGetShaderPrecisionFormat(...) \
    gles2Interface->GetShaderPrecisionFormat(gles2Context, __VA_ARGS__)
#define mglGetShaderSource(...) \
    gles2Interface->GetShaderSource(gles2Context, __VA_ARGS__)
#define mglGetTexParameterfv(...) \
    gles2Interface->GetTexParameterfv(gles2Context, __VA_ARGS__)
#define mglGetTexParameteriv(...) \
    gles2Interface->GetTexParameteriv(gles2Context, __VA_ARGS__)
#define mglGetUniformfv(...) \
    gles2Interface->GetUniformfv(gles2Context, __VA_ARGS__)
#define mglGetUniformiv(...) \
    gles2Interface->GetUniformiv(gles2Context, __VA_ARGS__)
#define mglGetVertexAttribfv(...) \
    gles2Interface->GetVertexAttribfv(gles2Context, __VA_ARGS__)
#define mglGetVertexAttribiv(...) \
    gles2Interface->GetVertexAttribiv(gles2Context, __VA_ARGS__)
#define mglGetVertexAttribPointerv(...) \
    gles2Interface->GetVertexAttribPointerv(gles2Context, __VA_ARGS__)
#define mglIsBuffer(...) \
    gles2Interface->IsBuffer(gles2Context, __VA_ARGS__)
#define mglIsEnabled(...) \
    gles2Interface->IsEnabled(gles2Context, __VA_ARGS__)
#define mglIsFramebuffer(...) \
    gles2Interface->IsFramebuffer(gles2Context, __VA_ARGS__)
#define mglIsProgram(...) \
    gles2Interface->IsProgram(gles2Context, __VA_ARGS__)
#define mglIsRenderbuffer(...) \
    gles2Interface->IsRenderbuffer(gles2Context, __VA_ARGS__)
#define mglIsShader(...) \
    gles2Interface->IsShader(gles2Context, __VA_ARGS__)
#define mglIsTexture(...) \
    gles2Interface->IsTexture(gles2Context, __VA_ARGS__)
#define mglLineWidth(...) \
    gles2Interface->LineWidth(gles2Context, __VA_ARGS__)
#define mglPixelStorei(...) \
    gles2Interface->PixelStorei(gles2Context, __VA_ARGS__)
#define mglPolygonOffset(...) \
    gles2Interface->PolygonOffset(gles2Context, __VA_ARGS__)
#define mglReadPixels(...) \
    gles2Interface->ReadPixels(gles2Context, __VA_ARGS__)
#define mglReleaseShaderCompiler(...) \
    gles2Interface->ReleaseShaderCompiler(gles2Context, __VA_ARGS__)
#define mglRenderbufferStorage(...) \
    gles2Interface->RenderbufferStorage(gles2Context, __VA_ARGS__)
#define mglSampleCoverage(...) \
    gles2Interface->SampleCoverage(gles2Context, __VA_ARGS__)
#define mglShaderBinary(...) \
    gles2Interface->ShaderBinary(gles2Context, __VA_ARGS__)
#define mglStencilFunc(...) \
    gles2Interface->StencilFunc(gles2Context, __VA_ARGS__)
#define mglStencilFuncSeparate(...) \
    gles2Interface->StencilFuncSeparate(gles2Context, __VA_ARGS__)
#define mglStencilMask(...) \
    gles2Interface->StencilMask(gles2Context, __VA_ARGS__)
#define mglStencilMaskSeparate(...) \
    gles2Interface->StencilMaskSeparate(gles2Context, __VA_ARGS__)
#define mglStencilOp(...) \
    gles2Interface->StencilOp(gles2Context, __VA_ARGS__)
#define mglStencilOpSeparate(...) \
    gles2Interface->StencilOpSeparate(gles2Context, __VA_ARGS__)
#define mglTexImage2D(...) \
    gles2Interface->TexImage2D(gles2Context, __VA_ARGS__)
#define mglTexParameterf(...) \
    gles2Interface->TexParameterf(gles2Context, __VA_ARGS__)
#define mglTexParameterfv(...) \
    gles2Interface->TexParameterfv(gles2Context, __VA_ARGS__)
#define mglTexParameteri(...) \
    gles2Interface->TexParameteri(gles2Context, __VA_ARGS__)
#define mglTexParameteriv(...) \
    gles2Interface->TexParameteriv(gles2Context, __VA_ARGS__)
#define mglTexSubImage2D(...) \
    gles2Interface->TexSubImage2D(gles2Context, __VA_ARGS__)
#define mglUniformMatrix2fv(...) \
    gles2Interface->UniformMatrix2fv(gles2Context, __VA_ARGS__)
#define mglUniformMatrix3fv(...) \
    gles2Interface->UniformMatrix3fv(gles2Context, __VA_ARGS__)
#define mglUniformMatrix4fv(...) \
    gles2Interface->UniformMatrix4fv(gles2Context, __VA_ARGS__)
#define mglVertexAttrib1f(...) \
    gles2Interface->VertexAttrib1f(gles2Context, __VA_ARGS__)
#define mglVertexAttrib2f(...) \
    gles2Interface->VertexAttrib2f(gles2Context, __VA_ARGS__)
#define mglVertexAttrib3f(...) \
    gles2Interface->VertexAttrib3f(gles2Context, __VA_ARGS__)
#define mglVertexAttrib4f(...) \
    gles2Interface->VertexAttrib4f(gles2Context, __VA_ARGS__)
#define mglVertexAttrib1fv(...) \
    gles2Interface->VertexAttrib1fv(gles2Context, __VA_ARGS__)
#define mglVertexAttrib2fv(...) \
    gles2Interface->VertexAttrib2fv(gles2Context, __VA_ARGS__)
#define mglVertexAttrib3fv(...) \
    gles2Interface->VertexAttrib3fv(gles2Context, __VA_ARGS__)
#define mglVertexAttrib4fv(...) \
    gles2Interface->VertexAttrib4fv(gles2Context, __VA_ARGS__)

#endif  // defined(__native_client__) && defined(USE_OPENGL)
#endif  // RENDER_OPENGL_NACLGLFUNCTIONS_H