PageRenderTime 806ms CodeModel.GetById 131ms app.highlight 436ms RepoModel.GetById 233ms app.codeStats 0ms

/opengles/src/gl.cpp

http://ftk.googlecode.com/
C++ | 640 lines | 447 code | 153 blank | 40 comment | 3 complexity | 1bb7e625b5279b096cd9b6179d00b2aa MD5 | raw file
  1// ==========================================================================
  2//
  3// gl.cpp	EGL Client API entry points
  4//
  5// --------------------------------------------------------------------------
  6//
  7// 08-04-2003	Hans-Martin Will	initial version
  8//
  9// --------------------------------------------------------------------------
 10//
 11// Copyright (c) 2004, Hans-Martin Will. All rights reserved.
 12// 
 13// Redistribution and use in source and binary forms, with or without 
 14// modification, are permitted provided that the following conditions are 
 15// met:
 16// 
 17//	 *  Redistributions of source code must retain the above copyright
 18// 		notice, this list of conditions and the following disclaimer. 
 19//   *	Redistributions in binary form must reproduce the above copyright
 20// 		notice, this list of conditions and the following disclaimer in the 
 21// 		documentation and/or other materials provided with the distribution. 
 22// 
 23// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 24// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
 25// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
 26// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
 27// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
 28// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
 29// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 30// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
 31// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
 32// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
 33// THE POSSIBILITY OF SUCH DAMAGE.
 34//
 35// ==========================================================================
 36
 37
 38#include "stdafx.h"
 39#include "Context.h"
 40
 41
 42using namespace EGL;
 43
 44
 45#define CONTEXT_EXEC(func) \
 46	Context * context = Context::DefaultContext();						\
 47	if (context) {														\
 48		context->func;													\
 49	}
 50
 51#define CONTEXT_EXEC_RETURN(func) \
 52	Context * context = Context::DefaultContext();						\
 53	if (context) {														\
 54		return context->func;											\
 55	} else {															\
 56		return 0;														\
 57	}
 58
 59
 60GLAPI void APIENTRY glActiveTexture (GLenum texture) { 
 61	CONTEXT_EXEC(ActiveTexture(texture));
 62}
 63
 64GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref) { 
 65	CONTEXT_EXEC(AlphaFunc(func, ref));
 66}
 67
 68GLAPI void APIENTRY glAlphaFuncx (GLenum func, GLclampx ref) { 
 69	CONTEXT_EXEC(AlphaFuncx(func, ref));
 70}
 71
 72GLAPI void APIENTRY glBindBuffer(GLenum target, GLuint buffer) {
 73	CONTEXT_EXEC(BindBuffer(target, buffer));
 74}
 75
 76GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture) { 
 77	CONTEXT_EXEC(BindTexture(target, texture));
 78}
 79
 80GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor) { 
 81	CONTEXT_EXEC(BlendFunc(sfactor, dfactor));
 82}
 83
 84GLAPI void APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) {
 85	CONTEXT_EXEC(BufferData(target, size, data, usage));
 86}
 87
 88GLAPI void APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) {
 89	CONTEXT_EXEC(BufferSubData(target, offset, size, data));
 90}
 91
 92GLAPI void APIENTRY glClear (GLbitfield mask) { 
 93	CONTEXT_EXEC(Clear(mask));
 94}
 95
 96GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { 
 97	CONTEXT_EXEC(ClearColor(red, green, blue, alpha));
 98}
 99
100GLAPI void APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) { 
101	CONTEXT_EXEC(ClearColorx(red, green, blue, alpha));
102}
103
104GLAPI void APIENTRY glClearDepthf (GLclampf depth) {
105	CONTEXT_EXEC(ClearDepthf(depth));
106}
107
108GLAPI void APIENTRY glClearDepthx (GLclampx depth) { 
109	CONTEXT_EXEC(ClearDepthx(depth));
110}
111
112GLAPI void APIENTRY glClearStencil (GLint s) { 
113	CONTEXT_EXEC(ClearStencil(s));
114}
115
116GLAPI void APIENTRY glClipPlanex(GLenum plane, const GLfixed *equation) {
117	CONTEXT_EXEC(ClipPlanex(plane, equation));
118}
119
120GLAPI void APIENTRY glClipPlanef(GLenum plane, const GLfloat *equation) {
121	CONTEXT_EXEC(ClipPlanef(plane, equation));
122}
123
124GLAPI void APIENTRY glClientActiveTexture (GLenum texture) { 
125	CONTEXT_EXEC(ClientActiveTexture(texture));
126}
127
128GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { 
129	CONTEXT_EXEC(Color4f(red, green, blue, alpha));
130}
131
132GLAPI void APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) { 
133	CONTEXT_EXEC(Color4x(red, green, blue, alpha));
134}
135
136GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { 
137	CONTEXT_EXEC(ColorMask(red, green , blue, alpha));
138}
139
140GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { 
141	CONTEXT_EXEC(ColorPointer(size, type, stride, pointer));
142}
143
144GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) { 
145	CONTEXT_EXEC(CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data));
146}
147
148GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) { 
149	CONTEXT_EXEC(CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data));
150}
151
152GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { 
153	CONTEXT_EXEC(CopyTexImage2D(target, level, internalformat, x, y, width, height, border));
154}
155
156GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { 
157	CONTEXT_EXEC(CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height));
158}
159
160GLAPI void APIENTRY glCullFace (GLenum mode) { 
161	CONTEXT_EXEC(CullFace(mode));
162}
163
164GLAPI void APIENTRY glDeleteBuffers(GLsizei n, const GLuint *buffers) {
165	CONTEXT_EXEC(DeleteBuffers(n, buffers));
166}
167
168GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures) { 
169	CONTEXT_EXEC(DeleteTextures(n, textures));
170}
171
172GLAPI void APIENTRY glDepthFunc (GLenum func) { 
173	CONTEXT_EXEC(DepthFunc(func));
174}
175
176GLAPI void APIENTRY glDepthMask (GLboolean flag) { 
177	CONTEXT_EXEC(DepthMask(flag));
178}
179
180GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar) { 
181	CONTEXT_EXEC(DepthRangef(zNear, zFar));
182}
183
184GLAPI void APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar) { 
185	CONTEXT_EXEC(DepthRangex(zNear, zFar));
186}
187
188GLAPI void APIENTRY glDisable (GLenum cap) { 
189	CONTEXT_EXEC(Disable(cap));
190}
191
192GLAPI void APIENTRY glDisableClientState (GLenum array) { 
193	CONTEXT_EXEC(DisableClientState(array));
194}
195
196GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count) { 
197	CONTEXT_EXEC(DrawArrays(mode, first, count));
198}
199
200GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) { 
201	CONTEXT_EXEC(DrawElements(mode, count, type, indices));
202}
203
204GLAPI void APIENTRY glEnable (GLenum cap) { 
205	CONTEXT_EXEC(Enable(cap));
206}
207
208GLAPI void APIENTRY glEnableClientState (GLenum array) { 
209	CONTEXT_EXEC(EnableClientState(array));
210}
211
212GLAPI void APIENTRY glFinish (void) { 
213	CONTEXT_EXEC(Finish());
214}
215
216GLAPI void APIENTRY glFlush (void) { 
217	CONTEXT_EXEC(Flush());
218}
219
220GLAPI void APIENTRY glFogf (GLenum pname, GLfloat param) { 
221	CONTEXT_EXEC(Fogf(pname, param));
222}
223
224GLAPI void APIENTRY glFogfv (GLenum pname, const GLfloat *params) { 
225	CONTEXT_EXEC(Fogfv(pname, params));
226}
227
228GLAPI void APIENTRY glFogx (GLenum pname, GLfixed param) { 
229	CONTEXT_EXEC(Fogx(pname, param));
230}
231
232GLAPI void APIENTRY glFogxv (GLenum pname, const GLfixed *params) { 
233	CONTEXT_EXEC(Fogxv(pname, params));
234}
235
236GLAPI void APIENTRY glFrontFace (GLenum mode) { 
237	CONTEXT_EXEC(FrontFace(mode));
238}
239
240GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { 
241	CONTEXT_EXEC(Frustumf(left, right, bottom, top, zNear, zFar));
242}
243
244GLAPI void APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { 
245	CONTEXT_EXEC(Frustumx(left, right, bottom, top, zNear, zFar));
246}
247
248GLAPI void APIENTRY glGetBooleanv(GLenum pname, GLboolean *params) {
249	CONTEXT_EXEC(GetBooleanv(pname, params));
250}
251
252GLAPI void APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) {
253	CONTEXT_EXEC(GetBufferParameteriv(target, pname, params));
254}
255
256GLAPI void APIENTRY glGetClipPlanef(GLenum pname, GLfloat eqn[4]) {
257	CONTEXT_EXEC(GetClipPlanef(pname, eqn));
258}
259
260GLAPI void APIENTRY glGetClipPlanex(GLenum pname, GLfixed eqn[4]) {
261	CONTEXT_EXEC(GetClipPlanex(pname, eqn));
262}
263
264GLAPI void APIENTRY glGenBuffers(GLsizei n, GLuint *buffers) {
265	CONTEXT_EXEC(GenBuffers(n, buffers));
266}
267
268GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures) { 
269	CONTEXT_EXEC(GenTextures(n, textures));
270}
271
272GLAPI GLenum APIENTRY glGetError (void) { 
273	CONTEXT_EXEC_RETURN(GetError());
274}
275
276GLAPI void APIENTRY glGetFixedv(GLenum pname, GLfixed *params) {
277	CONTEXT_EXEC(GetFixedv(pname, params));
278}
279
280GLAPI void APIENTRY glGetFloatv(GLenum pname, GLfloat *params) {
281	CONTEXT_EXEC(GetFloatv(pname, params));
282}
283
284GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params) {
285	CONTEXT_EXEC(GetIntegerv(pname, params));
286}
287
288GLAPI void APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
289	CONTEXT_EXEC(GetLightfv(light, pname, params));
290}
291
292GLAPI void APIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed *params) {
293	CONTEXT_EXEC(GetLightxv(light, pname, params));
294}
295
296GLAPI void APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
297	CONTEXT_EXEC(GetMaterialfv(face, pname, params));
298}
299
300GLAPI void APIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) {
301	CONTEXT_EXEC(GetMaterialxv(face, pname, params));
302}
303
304GLAPI void APIENTRY glGetPointerv(GLenum pname, void **params) {
305	CONTEXT_EXEC(GetPointerv(pname, params));
306}
307
308GLAPI const GLubyte * APIENTRY glGetString (GLenum name) { 
309	CONTEXT_EXEC_RETURN(GetString(name));
310}
311
312GLAPI void APIENTRY glGetTexEnviv(GLenum env, GLenum pname, GLint *params) {
313	CONTEXT_EXEC(GetTexEnviv(env, pname, params));
314}
315
316GLAPI void APIENTRY glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) {
317	CONTEXT_EXEC(GetTexEnvfv(env, pname, params));
318}
319
320GLAPI void APIENTRY glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) {
321	CONTEXT_EXEC(GetTexEnvxv(env, pname, params));
322}
323
324GLAPI void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) {
325	CONTEXT_EXEC(GetTexParameteriv(target, pname, params));
326}
327
328GLAPI void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) {
329	CONTEXT_EXEC(GetTexParameterfv(target, pname, params));
330}
331
332GLAPI void APIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) {
333	CONTEXT_EXEC(GetTexParameterxv(target, pname, params));
334}
335
336GLAPI void APIENTRY glHint (GLenum target, GLenum mode) { 
337	CONTEXT_EXEC(Hint(target, mode));
338}
339
340GLAPI GLboolean APIENTRY glIsBuffer(GLuint buffer) {
341	CONTEXT_EXEC_RETURN(IsBuffer(buffer));
342}
343
344GLAPI GLboolean APIENTRY glIsEnabled(GLenum cap) {
345	CONTEXT_EXEC_RETURN(IsEnabled(cap));
346}
347
348GLAPI GLboolean APIENTRY glIsTexture(GLuint texture) {
349	CONTEXT_EXEC_RETURN(IsTexture(texture));
350}
351
352GLAPI void APIENTRY glLightModelf (GLenum pname, GLfloat param) { 
353	CONTEXT_EXEC(LightModelf(pname, param));
354}
355
356GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params) { 
357	CONTEXT_EXEC(LightModelfv(pname, params));
358}
359
360GLAPI void APIENTRY glLightModelx (GLenum pname, GLfixed param) { 
361	CONTEXT_EXEC(LightModelx(pname, param));
362}
363
364GLAPI void APIENTRY glLightModelxv (GLenum pname, const GLfixed *params) { 
365	CONTEXT_EXEC(LightModelxv(pname, params));
366}
367
368GLAPI void APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param) { 
369	CONTEXT_EXEC(Lightf(light, pname, param));
370}
371
372GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params) { 
373	CONTEXT_EXEC(Lightfv(light, pname, params));
374}
375
376GLAPI void APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param) { 
377	CONTEXT_EXEC(Lightx(light, pname, param));
378}
379
380GLAPI void APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params) { 
381	CONTEXT_EXEC(Lightxv(light, pname, params));
382}
383
384GLAPI void APIENTRY glLineWidth (GLfloat width) { 
385	CONTEXT_EXEC(LineWidth(width));
386}
387
388GLAPI void APIENTRY glLineWidthx (GLfixed width) { 
389	CONTEXT_EXEC(LineWidthx(width));
390}
391
392GLAPI void APIENTRY glLoadIdentity (void) { 
393	CONTEXT_EXEC(LoadIdentity());
394}
395
396GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m) { 
397	CONTEXT_EXEC(LoadMatrixf(m));
398}
399
400GLAPI void APIENTRY glLoadMatrixx (const GLfixed *m) { 
401	CONTEXT_EXEC(LoadMatrixx(m));
402}
403
404GLAPI void APIENTRY glLogicOp (GLenum opcode) { 
405	CONTEXT_EXEC(LogicOp(opcode));
406}
407
408GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param) { 
409	CONTEXT_EXEC(Materialf(face, pname, param));
410}
411
412GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params) { 
413	CONTEXT_EXEC(Materialfv(face, pname, params));
414}
415
416GLAPI void APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param) { 
417	CONTEXT_EXEC(Materialx(face, pname, param));
418}
419
420GLAPI void APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params) { 
421	CONTEXT_EXEC(Materialxv(face, pname, params));
422}
423
424GLAPI void APIENTRY glMatrixMode (GLenum mode) { 
425	CONTEXT_EXEC(MatrixMode(mode));
426}
427
428GLAPI void APIENTRY glMultMatrixf (const GLfloat *m) { 
429	CONTEXT_EXEC(MultMatrixf(m));
430}
431
432GLAPI void APIENTRY glMultMatrixx (const GLfixed *m) { 
433	CONTEXT_EXEC(MultMatrixx(m));
434}
435
436GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) { 
437	CONTEXT_EXEC(MultiTexCoord4f(target, s, t, r, q));
438}
439
440GLAPI void APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) { 
441	CONTEXT_EXEC(MultiTexCoord4x(target, s, t, r, q));
442}
443
444GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz) { 
445	CONTEXT_EXEC(Normal3f(nx, ny, nz));
446}
447
448GLAPI void APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz) { 
449	CONTEXT_EXEC(Normal3x(nx, ny, nz));
450}
451
452GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer) { 
453	CONTEXT_EXEC(NormalPointer(type, stride, pointer));
454}
455
456GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { 
457	CONTEXT_EXEC(Orthof(left, right, bottom, top, zNear, zFar));
458}
459
460GLAPI void APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { 
461	CONTEXT_EXEC(Orthox(left, right, bottom, top, zNear, zFar));
462}
463
464GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param) { 
465	CONTEXT_EXEC(PixelStorei(pname, param));
466}
467
468GLAPI void APIENTRY glPointParameterf(GLenum pname, GLfloat param) {
469	CONTEXT_EXEC(PointParameterf(pname, param));
470}
471
472GLAPI void APIENTRY glPointParameterfv(GLenum pname, const GLfloat *params) {
473	CONTEXT_EXEC(PointParameterfv(pname, params));
474}
475
476GLAPI void APIENTRY glPointParameterx(GLenum pname, GLfixed param) {
477	CONTEXT_EXEC(PointParameterx(pname, param));
478}
479
480GLAPI void APIENTRY glPointParameterxv(GLenum pname, const GLfixed *params) {
481	CONTEXT_EXEC(PointParameterxv(pname, params));
482}
483
484GLAPI void APIENTRY glPointSize (GLfloat size) { 
485	CONTEXT_EXEC(PointSize(size));
486}
487
488GLAPI void APIENTRY glPointSizex (GLfixed size) { 
489	CONTEXT_EXEC(PointSizex(size));
490}
491
492GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units) { 
493	CONTEXT_EXEC(PolygonOffset(factor, units));
494}
495
496GLAPI void APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units) { 
497	CONTEXT_EXEC(PolygonOffsetx(factor, units));
498}
499
500GLAPI void APIENTRY glPopMatrix (void) { 
501	CONTEXT_EXEC(PopMatrix());
502}
503
504GLAPI void APIENTRY glPushMatrix (void) { 
505	CONTEXT_EXEC(PushMatrix());
506}
507
508GLAPI GLbitfield APIENTRY glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) {
509	CONTEXT_EXEC_RETURN(QueryMatrixx(mantissa, exponent));
510}
511
512GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) { 
513	CONTEXT_EXEC(ReadPixels(x, y, width, height, format, type, pixels));
514}
515
516GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { 
517	CONTEXT_EXEC(Rotatef(angle, x, y, z));
518}
519
520GLAPI void APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z) { 
521	CONTEXT_EXEC(Rotatex(angle, x, y, z));
522}
523
524GLAPI void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert) { 
525	CONTEXT_EXEC(SampleCoverage(value, invert));
526}
527
528GLAPI void APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert) { 
529	CONTEXT_EXEC(SampleCoveragex(value, invert));
530}
531
532GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z) { 
533	CONTEXT_EXEC(Scalef(x, y, z));
534}
535
536GLAPI void APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z) { 
537	CONTEXT_EXEC(Scalex(x, y, z));
538}
539
540GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height) { 
541	CONTEXT_EXEC(Scissor(x, y, width, height));
542}
543
544GLAPI void APIENTRY glShadeModel (GLenum mode) { 
545	CONTEXT_EXEC(ShadeModel(mode));
546}
547
548GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask) { 
549	CONTEXT_EXEC(StencilFunc(func, ref, mask));
550}
551
552GLAPI void APIENTRY glStencilMask (GLuint mask) { 
553	CONTEXT_EXEC(StencilMask(mask));
554}
555
556GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass) { 
557	CONTEXT_EXEC(StencilOp(fail, zfail, zpass));
558}
559
560GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { 
561	CONTEXT_EXEC(TexCoordPointer(size, type, stride, pointer));
562}
563
564GLAPI void APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param) { 
565	CONTEXT_EXEC(TexEnvf(target, pname, param));
566}
567
568GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params) { 
569	CONTEXT_EXEC(TexEnvfv(target, pname, params));
570}
571
572GLAPI void APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param) { 
573	CONTEXT_EXEC(TexEnvx(target, pname, param));
574}
575
576GLAPI void APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params) { 
577	CONTEXT_EXEC(TexEnvxv(target, pname, params));
578}
579
580GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { 
581	CONTEXT_EXEC(TexImage2D(target, level, internalformat, width, height, border, format, type, pixels));
582}
583
584GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param) { 
585	CONTEXT_EXEC(TexParameteri(target, pname, param));
586}
587
588GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param) { 
589	CONTEXT_EXEC(TexParameterf(target, pname, param));
590}
591
592GLAPI void APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param) { 
593	CONTEXT_EXEC(TexParameterx(target, pname, param));
594}
595
596GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) { 
597	CONTEXT_EXEC(TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels));
598}
599
600GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z) { 
601	CONTEXT_EXEC(Translatef(x, y, z));
602}
603
604GLAPI void APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z) { 
605	CONTEXT_EXEC(Translatex(x, y, z));
606}
607
608GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { 
609	CONTEXT_EXEC(VertexPointer(size, type, stride, pointer));
610}
611
612GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height) { 
613	CONTEXT_EXEC(Viewport(x, y, width, height));
614}
615
616/*****************************************************************************************/
617/*                                 OES extension functions                               */
618/*****************************************************************************************/
619
620/* OES_point_size_array */
621GLAPI void APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) {
622	CONTEXT_EXEC(PointSizePointer(type, stride, pointer));
623}
624
625/* OES_matrix_palette */
626GLAPI void APIENTRY glLoadPaletteFromModelViewMatrixOES(void) {
627	CONTEXT_EXEC(LoadPaletteFromModelViewMatrix());
628}
629
630GLAPI void APIENTRY glCurrentPaletteMatrixOES(GLuint index) {
631	CONTEXT_EXEC(CurrentPaletteMatrix(index));
632}
633
634GLAPI void APIENTRY glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
635	CONTEXT_EXEC(MatrixIndexPointer(size, type, stride, pointer));
636}
637
638GLAPI void APIENTRY glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
639	CONTEXT_EXEC(WeightPointer(size, type, stride, pointer));
640}