-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.cpp
1613 lines (1372 loc) · 50.2 KB
/
main.cpp
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2016 The SwiftShader Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// main.cpp: DLL entry point and management of thread-local data.
#include "main.h"
#include "libGLES_CM.hpp"
#include "Framebuffer.h"
#include "common/Surface.hpp"
#include "Common/Thread.hpp"
#include "Common/SharedLibrary.hpp"
#include "common/debug.h"
#include <GLES/glext.h>
#if !defined(_MSC_VER)
#define CONSTRUCTOR __attribute__((constructor))
#define DESTRUCTOR __attribute__((destructor))
#else
#define CONSTRUCTOR
#define DESTRUCTOR
#endif
static void glAttachThread()
{
TRACE("()");
}
static void glDetachThread()
{
TRACE("()");
}
CONSTRUCTOR static void glAttachProcess()
{
TRACE("()");
glAttachThread();
}
DESTRUCTOR static void glDetachProcess()
{
TRACE("()");
glDetachThread();
}
#if defined(_WIN32)
extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
switch(reason)
{
case DLL_PROCESS_ATTACH:
glAttachProcess();
break;
case DLL_THREAD_ATTACH:
glAttachThread();
break;
case DLL_THREAD_DETACH:
glDetachThread();
break;
case DLL_PROCESS_DETACH:
glDetachProcess();
break;
default:
break;
}
return TRUE;
}
#endif
namespace es1
{
es1::Context *getContext()
{
egl::Context *context = libEGL->clientGetCurrentContext();
if(context && context->getClientVersion() == 1)
{
return static_cast<es1::Context*>(context);
}
return nullptr;
}
Device *getDevice()
{
Context *context = getContext();
return context ? context->getDevice() : nullptr;
}
// Records an error code
void error(GLenum errorCode)
{
es1::Context *context = es1::getContext();
if(context)
{
switch(errorCode)
{
case GL_INVALID_ENUM:
context->recordInvalidEnum();
TRACE("\t! Error generated: invalid enum\n");
break;
case GL_INVALID_VALUE:
context->recordInvalidValue();
TRACE("\t! Error generated: invalid value\n");
break;
case GL_INVALID_OPERATION:
context->recordInvalidOperation();
TRACE("\t! Error generated: invalid operation\n");
break;
case GL_OUT_OF_MEMORY:
context->recordOutOfMemory();
TRACE("\t! Error generated: out of memory\n");
break;
case GL_INVALID_FRAMEBUFFER_OPERATION_OES:
context->recordInvalidFramebufferOperation();
TRACE("\t! Error generated: invalid framebuffer operation\n");
break;
case GL_STACK_OVERFLOW:
context->recordMatrixStackOverflow();
TRACE("\t! Error generated: matrix stack overflow\n");
break;
case GL_STACK_UNDERFLOW:
context->recordMatrixStackUnderflow();
TRACE("\t! Error generated: matrix stack underflow\n");
break;
default: UNREACHABLE(errorCode);
}
}
}
}
namespace es1
{
void ActiveTexture(GLenum texture);
void AlphaFunc(GLenum func, GLclampf ref);
void AlphaFuncx(GLenum func, GLclampx ref);
void BindBuffer(GLenum target, GLuint buffer);
void BindFramebuffer(GLenum target, GLuint framebuffer);
void BindFramebufferOES(GLenum target, GLuint framebuffer);
void BindRenderbufferOES(GLenum target, GLuint renderbuffer);
void BindTexture(GLenum target, GLuint texture);
void BlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha);
void BlendEquationOES(GLenum mode);
void BlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha);
void BlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
void BlendFunc(GLenum sfactor, GLenum dfactor);
void BlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
void BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
GLenum CheckFramebufferStatusOES(GLenum target);
void Clear(GLbitfield mask);
void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
void ClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
void ClearDepthf(GLclampf depth);
void ClearDepthx(GLclampx depth);
void ClearStencil(GLint s);
void ClientActiveTexture(GLenum texture);
void ClipPlanef(GLenum plane, const GLfloat *equation);
void ClipPlanex(GLenum plane, const GLfixed *equation);
void Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
void Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
void ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
GLint border, GLsizei imageSize, const GLvoid* data);
void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
GLenum format, GLsizei imageSize, const GLvoid* data);
void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
void CullFace(GLenum mode);
void DeleteBuffers(GLsizei n, const GLuint* buffers);
void DeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
void DeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
void DeleteTextures(GLsizei n, const GLuint* textures);
void DepthFunc(GLenum func);
void DepthMask(GLboolean flag);
void DepthRangex(GLclampx zNear, GLclampx zFar);
void DepthRangef(GLclampf zNear, GLclampf zFar);
void Disable(GLenum cap);
void DisableClientState(GLenum array);
void DrawArrays(GLenum mode, GLint first, GLsizei count);
void DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
void Enable(GLenum cap);
void EnableClientState(GLenum array);
void Finish(void);
void Flush(void);
void FramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
void FramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
void Fogf(GLenum pname, GLfloat param);
void Fogfv(GLenum pname, const GLfloat *params);
void Fogx(GLenum pname, GLfixed param);
void Fogxv(GLenum pname, const GLfixed *params);
void FrontFace(GLenum mode);
void Frustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
void Frustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
void GenerateMipmapOES(GLenum target);
void GenBuffers(GLsizei n, GLuint* buffers);
void GenFramebuffersOES(GLsizei n, GLuint* framebuffers);
void GenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
void GenTextures(GLsizei n, GLuint* textures);
void GetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
void GetBooleanv(GLenum pname, GLboolean* params);
void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
void GetClipPlanef(GLenum pname, GLfloat eqn[4]);
void GetClipPlanex(GLenum pname, GLfixed eqn[4]);
GLenum GetError(void);
void GetFixedv(GLenum pname, GLfixed *params);
void GetFloatv(GLenum pname, GLfloat* params);
void GetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
void GetIntegerv(GLenum pname, GLint* params);
void GetLightfv(GLenum light, GLenum pname, GLfloat *params);
void GetLightxv(GLenum light, GLenum pname, GLfixed *params);
void GetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
void GetMaterialxv(GLenum face, GLenum pname, GLfixed *params);
void GetPointerv(GLenum pname, GLvoid **params);
const GLubyte* GetString(GLenum name);
void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
void GetTexParameteriv(GLenum target, GLenum pname, GLint* params);
void GetTexEnvfv(GLenum env, GLenum pname, GLfloat *params);
void GetTexEnviv(GLenum env, GLenum pname, GLint *params);
void GetTexEnvxv(GLenum env, GLenum pname, GLfixed *params);
void GetTexParameterxv(GLenum target, GLenum pname, GLfixed *params);
void Hint(GLenum target, GLenum mode);
GLboolean IsBuffer(GLuint buffer);
GLboolean IsEnabled(GLenum cap);
GLboolean IsFramebufferOES(GLuint framebuffer);
GLboolean IsTexture(GLuint texture);
GLboolean IsRenderbufferOES(GLuint renderbuffer);
void LightModelf(GLenum pname, GLfloat param);
void LightModelfv(GLenum pname, const GLfloat *params);
void LightModelx(GLenum pname, GLfixed param);
void LightModelxv(GLenum pname, const GLfixed *params);
void Lightf(GLenum light, GLenum pname, GLfloat param);
void Lightfv(GLenum light, GLenum pname, const GLfloat *params);
void Lightx(GLenum light, GLenum pname, GLfixed param);
void Lightxv(GLenum light, GLenum pname, const GLfixed *params);
void LineWidth(GLfloat width);
void LineWidthx(GLfixed width);
void LoadIdentity(void);
void LoadMatrixf(const GLfloat *m);
void LoadMatrixx(const GLfixed *m);
void LogicOp(GLenum opcode);
void Materialf(GLenum face, GLenum pname, GLfloat param);
void Materialfv(GLenum face, GLenum pname, const GLfloat *params);
void Materialx(GLenum face, GLenum pname, GLfixed param);
void Materialxv(GLenum face, GLenum pname, const GLfixed *params);
void MatrixMode(GLenum mode);
void MultMatrixf(const GLfloat *m);
void MultMatrixx(const GLfixed *m);
void MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
void MultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
void Normal3f(GLfloat nx, GLfloat ny, GLfloat nz);
void Normal3x(GLfixed nx, GLfixed ny, GLfixed nz);
void NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer);
void Orthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
void Orthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
void PixelStorei(GLenum pname, GLint param);
void PointParameterf(GLenum pname, GLfloat param);
void PointParameterfv(GLenum pname, const GLfloat *params);
void PointParameterx(GLenum pname, GLfixed param);
void PointParameterxv(GLenum pname, const GLfixed *params);
void PointSize(GLfloat size);
void PointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer);
void PointSizex(GLfixed size);
void PolygonOffset(GLfloat factor, GLfloat units);
void PolygonOffsetx(GLfixed factor, GLfixed units);
void PopMatrix(void);
void PushMatrix(void);
void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
void RenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
void Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
void Rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
void SampleCoverage(GLclampf value, GLboolean invert);
void SampleCoveragex(GLclampx value, GLboolean invert);
void Scalef(GLfloat x, GLfloat y, GLfloat z);
void Scalex(GLfixed x, GLfixed y, GLfixed z);
void Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
void ShadeModel(GLenum mode);
void StencilFunc(GLenum func, GLint ref, GLuint mask);
void StencilMask(GLuint mask);
void StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
void TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
void TexEnvf(GLenum target, GLenum pname, GLfloat param);
void TexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
void TexEnvi(GLenum target, GLenum pname, GLint param);
void TexEnvx(GLenum target, GLenum pname, GLfixed param);
void TexEnviv(GLenum target, GLenum pname, const GLint *params);
void TexEnvxv(GLenum target, GLenum pname, const GLfixed *params);
void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
GLint border, GLenum format, GLenum type, const GLvoid* pixels);
void TexParameterf(GLenum target, GLenum pname, GLfloat param);
void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
void TexParameteri(GLenum target, GLenum pname, GLint param);
void TexParameteriv(GLenum target, GLenum pname, const GLint* params);
void TexParameterx(GLenum target, GLenum pname, GLfixed param);
void TexParameterxv(GLenum target, GLenum pname, const GLfixed *params);
void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
GLenum format, GLenum type, const GLvoid* pixels);
void Translatef(GLfloat x, GLfloat y, GLfloat z);
void Translatex(GLfixed x, GLfixed y, GLfixed z);
void VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
void Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
void EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
void EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
void DrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
void DrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height);
void DrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
void DrawTexsvOES(const GLshort *coords);
void DrawTexivOES(const GLint *coords);
void DrawTexxvOES(const GLfixed *coords);
void DrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
void DrawTexfvOES(const GLfloat *coords);
}
egl::Context *es1CreateContext(egl::Display *display, const egl::Context *shareContext, const egl::Config *config);
extern "C" __eglMustCastToProperFunctionPointerType es1GetProcAddress(const char *procname);
egl::Image *createBackBuffer(int width, int height, sw::Format format, int multiSampleDepth);
egl::Image *createDepthStencil(int width, int height, sw::Format format, int multiSampleDepth);
sw::FrameBuffer *createFrameBuffer(void *nativeDisplay, EGLNativeWindowType window, int width, int height);
extern "C"
{
EGLAPI EGLint EGLAPIENTRY eglGetError(void)
{
return libEGL->eglGetError();
}
EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
{
return libEGL->eglGetDisplay(display_id);
}
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
{
return libEGL->eglInitialize(dpy, major, minor);
}
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
{
return libEGL->eglTerminate(dpy);
}
EGLAPI const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
{
return libEGL->eglQueryString(dpy, name);
}
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config)
{
return libEGL->eglGetConfigs(dpy, configs, config_size, num_config);
}
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
{
return libEGL->eglChooseConfig(dpy, attrib_list, configs, config_size, num_config);
}
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
{
return libEGL->eglGetConfigAttrib(dpy, config, attribute, value);
}
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType window, const EGLint *attrib_list)
{
return libEGL->eglCreateWindowSurface(dpy, config, window, attrib_list);
}
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
{
return libEGL->eglCreatePbufferSurface(dpy, config, attrib_list);
}
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list)
{
return libEGL->eglCreatePixmapSurface(dpy, config, pixmap, attrib_list);
}
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
{
return libEGL->eglDestroySurface(dpy, surface);
}
EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value)
{
return libEGL->eglQuerySurface(dpy, surface, attribute, value);
}
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
{
return libEGL->eglBindAPI(api);
}
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void)
{
return libEGL->eglQueryAPI();
}
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void)
{
return libEGL->eglWaitClient();
}
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void)
{
return libEGL->eglReleaseThread();
}
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list)
{
return libEGL->eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
}
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
{
return libEGL->eglSurfaceAttrib(dpy, surface, attribute, value);
}
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{
return libEGL->eglBindTexImage(dpy, surface, buffer);
}
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{
return libEGL->eglReleaseTexImage(dpy, surface, buffer);
}
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
{
return libEGL->eglSwapInterval(dpy, interval);
}
EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
{
return libEGL->eglCreateContext(dpy, config, share_context, attrib_list);
}
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
{
return libEGL->eglDestroyContext(dpy, ctx);
}
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
{
return libEGL->eglMakeCurrent(dpy, draw, read, ctx);
}
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void)
{
return libEGL->eglGetCurrentContext();
}
EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw)
{
return libEGL->eglGetCurrentSurface(readdraw);
}
EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void)
{
return libEGL->eglGetCurrentDisplay();
}
EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value)
{
return libEGL->eglQueryContext(dpy, ctx, attribute, value);
}
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void)
{
return libEGL->eglWaitGL();
}
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine)
{
return libEGL->eglWaitNative(engine);
}
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
{
return libEGL->eglSwapBuffers(dpy, surface);
}
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
{
return libEGL->eglCopyBuffers(dpy, surface, target);
}
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
{
return libEGL->eglCreateImageKHR(dpy, ctx, target, buffer, attrib_list);
}
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
{
return libEGL->eglDestroyImageKHR(dpy, image);
}
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
{
return libEGL->eglGetProcAddress(procname);
}
EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
{
return libEGL->eglCreateSyncKHR(dpy, type, attrib_list);
}
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
{
return libEGL->eglDestroySyncKHR(dpy, sync);
}
EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
{
return libEGL->eglClientWaitSyncKHR(dpy, sync, flags, timeout);
}
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
{
return libEGL->eglGetSyncAttribKHR(dpy, sync, attribute, value);
}
GL_API void GL_APIENTRY glActiveTexture(GLenum texture)
{
return es1::ActiveTexture(texture);
}
GL_API void GL_APIENTRY glAlphaFunc(GLenum func, GLclampf ref)
{
return es1::AlphaFunc(func, ref);
}
GL_API void GL_APIENTRY glAlphaFuncx(GLenum func, GLclampx ref)
{
return es1::AlphaFuncx(func, ref);
}
GL_API void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
{
return es1::BindBuffer(target, buffer);
}
GL_API void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
{
return es1::BindFramebuffer(target, framebuffer);
}
GL_API void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer)
{
return es1::BindFramebufferOES(target, framebuffer);
}
GL_API void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer)
{
return es1::BindRenderbufferOES(target, renderbuffer);
}
GL_API void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
{
return es1::BindTexture(target, texture);
}
GL_API void GL_APIENTRY glBlendEquationOES(GLenum mode)
{
return es1::BlendEquationSeparateOES(mode, mode);
}
GL_API void GL_APIENTRY glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha)
{
return es1::BlendEquationSeparateOES(modeRGB, modeAlpha);
}
GL_API void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
{
return es1::BlendFuncSeparateOES(sfactor, dfactor, sfactor, dfactor);
}
GL_API void GL_APIENTRY glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
return es1::BlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
}
GL_API void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
{
return es1::BufferData(target, size, data, usage);
}
GL_API void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
{
return es1::BufferSubData(target, offset, size, data);
}
GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target)
{
return es1::CheckFramebufferStatusOES(target);
}
GL_API void GL_APIENTRY glClear(GLbitfield mask)
{
return es1::Clear(mask);
}
GL_API void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
return es1::ClearColor(red, green, blue, alpha);
}
GL_API void GL_APIENTRY glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
{
return es1::ClearColorx(red, green, blue, alpha);
}
GL_API void GL_APIENTRY glClearDepthf(GLclampf depth)
{
return es1::ClearDepthf(depth);
}
GL_API void GL_APIENTRY glClearDepthx(GLclampx depth)
{
return es1::ClearDepthx(depth);
}
GL_API void GL_APIENTRY glClearStencil(GLint s)
{
return es1::ClearStencil(s);
}
GL_API void GL_APIENTRY glClientActiveTexture(GLenum texture)
{
return es1::ClientActiveTexture(texture);
}
GL_API void GL_APIENTRY glClipPlanef(GLenum plane, const GLfloat *equation)
{
return es1::ClipPlanef(plane, equation);
}
GL_API void GL_APIENTRY glClipPlanex(GLenum plane, const GLfixed *equation)
{
return es1::ClipPlanex(plane, equation);
}
GL_API void GL_APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
return es1::Color4f(red, green, blue, alpha);
}
GL_API void GL_APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
{
return es1::Color4ub(red, green, blue, alpha);
}
GL_API void GL_APIENTRY glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
{
return es1::Color4x(red, green, blue, alpha);
}
GL_API void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
{
return es1::ColorMask(red, green, blue, alpha);
}
GL_API void GL_APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
{
return es1::ColorPointer(size, type, stride, pointer);
}
GL_API void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
GLint border, GLsizei imageSize, const GLvoid* data)
{
return es1::CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
}
GL_API void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
GLenum format, GLsizei imageSize, const GLvoid* data)
{
return es1::CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
}
GL_API void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{
return es1::CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
}
GL_API void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{
return es1::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
}
GL_API void GL_APIENTRY glCullFace(GLenum mode)
{
return es1::CullFace(mode);
}
GL_API void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers)
{
return es1::DeleteBuffers(n, buffers);
}
GL_API void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers)
{
return es1::DeleteFramebuffersOES(n, framebuffers);
}
GL_API void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers)
{
return es1::DeleteRenderbuffersOES(n, renderbuffers);
}
GL_API void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures)
{
return es1::DeleteTextures(n, textures);
}
GL_API void GL_APIENTRY glDepthFunc(GLenum func)
{
return es1::DepthFunc(func);
}
GL_API void GL_APIENTRY glDepthMask(GLboolean flag)
{
return es1::DepthMask(flag);
}
GL_API void GL_APIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar)
{
return es1::DepthRangex(zNear, zFar);
}
GL_API void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
{
return es1::DepthRangef(zNear, zFar);
}
GL_API void GL_APIENTRY glDisable(GLenum cap)
{
return es1::Disable(cap);
}
GL_API void GL_APIENTRY glDisableClientState(GLenum array)
{
return es1::DisableClientState(array);
}
GL_API void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
{
return es1::DrawArrays(mode, first, count);
}
GL_API void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
{
return es1::DrawElements(mode, count, type, indices);
}
GL_API void GL_APIENTRY glEnable(GLenum cap)
{
return es1::Enable(cap);
}
GL_API void GL_APIENTRY glEnableClientState(GLenum array)
{
return es1::EnableClientState(array);
}
GL_API void GL_APIENTRY glFinish(void)
{
return es1::Finish();
}
GL_API void GL_APIENTRY glFlush(void)
{
return es1::Flush();
}
GL_API void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
{
return es1::FramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer);
}
GL_API void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
return es1::FramebufferTexture2DOES(target, attachment, textarget, texture, level);
}
GL_API void GL_APIENTRY glFogf(GLenum pname, GLfloat param)
{
return es1::Fogf(pname, param);
}
GL_API void GL_APIENTRY glFogfv(GLenum pname, const GLfloat *params)
{
return es1::Fogfv(pname, params);
}
GL_API void GL_APIENTRY glFogx(GLenum pname, GLfixed param)
{
return es1::Fogx(pname, param);
}
GL_API void GL_APIENTRY glFogxv(GLenum pname, const GLfixed *params)
{
return es1::Fogxv(pname, params);
}
GL_API void GL_APIENTRY glFrontFace(GLenum mode)
{
return es1::FrontFace(mode);
}
GL_API void GL_APIENTRY glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
{
return es1::Frustumf(left, right, bottom, top, zNear, zFar);
}
GL_API void GL_APIENTRY glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
{
return es1::Frustumx(left, right, bottom, top, zNear, zFar);
}
GL_API void GL_APIENTRY glGenerateMipmapOES(GLenum target)
{
return es1::GenerateMipmapOES(target);
}
GL_API void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers)
{
return es1::GenBuffers(n, buffers);
}
GL_API void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint* framebuffers)
{
return es1::GenFramebuffersOES(n, framebuffers);
}
GL_API void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers)
{
return es1::GenRenderbuffersOES(n, renderbuffers);
}
GL_API void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures)
{
return es1::GenTextures(n, textures);
}
GL_API void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params)
{
return es1::GetRenderbufferParameterivOES(target, pname, params);
}
GL_API void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
{
return es1::GetBooleanv(pname, params);
}
GL_API void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
return es1::GetBufferParameteriv(target, pname, params);
}
GL_API void GL_APIENTRY glGetClipPlanef(GLenum pname, GLfloat eqn[4])
{
return es1::GetClipPlanef(pname, eqn);
}
GL_API void GL_APIENTRY glGetClipPlanex(GLenum pname, GLfixed eqn[4])
{
return es1::GetClipPlanex(pname, eqn);
}
GL_API GLenum GL_APIENTRY glGetError(void)
{
return es1::GetError();
}
GL_API void GL_APIENTRY glGetFixedv(GLenum pname, GLfixed *params)
{
return es1::GetFixedv(pname, params);
}
GL_API void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
{
return es1::GetFloatv(pname, params);
}
GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params)
{
return es1::GetFramebufferAttachmentParameterivOES(target, attachment, pname, params);
}
GL_API void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
{
return es1::GetIntegerv(pname, params);
}
GL_API void GL_APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
{
return es1::GetLightfv(light, pname, params);
}
GL_API void GL_APIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed *params)
{
return es1::GetLightxv(light, pname, params);
}
GL_API void GL_APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
{
return es1::GetMaterialfv(face, pname, params);
}
GL_API void GL_APIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params)
{
return es1::GetMaterialxv(face, pname, params);
}
GL_API void GL_APIENTRY glGetPointerv(GLenum pname, GLvoid **params)
{
return es1::GetPointerv(pname, params);
}
GL_API const GLubyte* GL_APIENTRY glGetString(GLenum name)
{
return es1::GetString(name);
}
GL_API void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
{
return es1::GetTexParameterfv(target, pname, params);
}
GL_API void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
{
return es1::GetTexParameteriv(target, pname, params);
}
GL_API void GL_APIENTRY glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params)
{
return es1::GetTexEnvfv(env, pname, params);
}
GL_API void GL_APIENTRY glGetTexEnviv(GLenum env, GLenum pname, GLint *params)
{
return es1::GetTexEnviv(env, pname, params);
}
GL_API void GL_APIENTRY glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params)
{
return es1::GetTexEnvxv(env, pname, params);
}
GL_API void GL_APIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params)
{
return es1::GetTexParameterxv(target, pname, params);
}
GL_API void GL_APIENTRY glHint(GLenum target, GLenum mode)
{
return es1::Hint(target, mode);
}
GL_API GLboolean GL_APIENTRY glIsBuffer(GLuint buffer)
{
return es1::IsBuffer(buffer);
}
GL_API GLboolean GL_APIENTRY glIsEnabled(GLenum cap)
{
return es1::IsEnabled(cap);
}
GL_API GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer)
{
return es1::IsFramebufferOES(framebuffer);
}
GL_API GLboolean GL_APIENTRY glIsTexture(GLuint texture)
{
return es1::IsTexture(texture);
}
GL_API GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer)
{
return es1::IsRenderbufferOES(renderbuffer);