forked from james34602/panzerGL22
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OtherOGL.cpp
4240 lines (3542 loc) · 114 KB
/
OtherOGL.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
/*
* Game-Deception Blank Wrapper v2
* Copyright (c) Crusader 2002
*/
/*
* Functions not mainly used by half-life, or functions that would allow limited to no
* advantage by hooking.
* Todo? : These functions should be naked to save on time/space
*/
#include "opengl32.h"
HMODULE hOriginalDll = 0;
func_glActiveTextureARB_t orig_glActiveTextureARB;
func_BindTextureEXT_t orig_BindTextureEXT;
func_glMultiTexCoord2fARB_t orig_glMultiTexCoord2fARB;
func_glAccum_t orig_glAccum;
func_glAlphaFunc_t orig_glAlphaFunc;
func_glAreTexturesResident_t orig_glAreTexturesResident;
func_glArrayElement_t orig_glArrayElement;
func_glBegin_t orig_glBegin;
func_glBindTexture_t orig_glBindTexture;
func_glBitmap_t orig_glBitmap;
func_glBlendFunc_t orig_glBlendFunc;
func_glCallList_t orig_glCallList;
func_glCallLists_t orig_glCallLists;
func_glClear_t orig_glClear;
func_glClearAccum_t orig_glClearAccum;
func_glClearColor_t orig_glClearColor;
func_glClearDepth_t orig_glClearDepth;
func_glClearIndex_t orig_glClearIndex;
func_glClearStencil_t orig_glClearStencil;
func_glClipPlane_t orig_glClipPlane;
func_glColor3b_t orig_glColor3b;
func_glColor3bv_t orig_glColor3bv;
func_glColor3d_t orig_glColor3d;
func_glColor3dv_t orig_glColor3dv;
func_glColor3f_t orig_glColor3f;
func_glColor3fv_t orig_glColor3fv;
func_glColor3i_t orig_glColor3i;
func_glColor3iv_t orig_glColor3iv;
func_glColor3s_t orig_glColor3s;
func_glColor3sv_t orig_glColor3sv;
func_glColor3ub_t orig_glColor3ub;
func_glColor3ubv_t orig_glColor3ubv;
func_glColor3ui_t orig_glColor3ui;
func_glColor3uiv_t orig_glColor3uiv;
func_glColor3us_t orig_glColor3us;
func_glColor3usv_t orig_glColor3usv;
func_glColor4b_t orig_glColor4b;
func_glColor4bv_t orig_glColor4bv;
func_glColor4d_t orig_glColor4d;
func_glColor4dv_t orig_glColor4dv;
func_glColor4f_t orig_glColor4f;
func_glColor4fv_t orig_glColor4fv;
func_glColor4i_t orig_glColor4i;
func_glColor4iv_t orig_glColor4iv;
func_glColor4s_t orig_glColor4s;
func_glColor4sv_t orig_glColor4sv;
func_glColor4ub_t orig_glColor4ub;
func_glColor4ubv_t orig_glColor4ubv;
func_glColor4ui_t orig_glColor4ui;
func_glColor4uiv_t orig_glColor4uiv;
func_glColor4us_t orig_glColor4us;
func_glColor4usv_t orig_glColor4usv;
func_glColorMask_t orig_glColorMask;
func_glColorMaterial_t orig_glColorMaterial;
func_glColorPointer_t orig_glColorPointer;
func_glCopyPixels_t orig_glCopyPixels;
func_glCopyTexImage1D_t orig_glCopyTexImage1D;
func_glCopyTexImage2D_t orig_glCopyTexImage2D;
func_glCopyTexSubImage1D_t orig_glCopyTexSubImage1D;
func_glCopyTexSubImage2D_t orig_glCopyTexSubImage2D;
func_glCullFace_t orig_glCullFace;
func_glDebugEntry_t orig_glDebugEntry;
func_glDeleteLists_t orig_glDeleteLists;
func_glDeleteTextures_t orig_glDeleteTextures;
func_glDepthFunc_t orig_glDepthFunc;
func_glDepthMask_t orig_glDepthMask;
func_glDepthRange_t orig_glDepthRange;
func_glDisable_t orig_glDisable;
func_glDisableClientState_t orig_glDisableClientState;
func_glDrawArrays_t orig_glDrawArrays;
func_glDrawBuffer_t orig_glDrawBuffer;
func_glDrawElements_t orig_glDrawElements;
func_glDrawPixels_t orig_glDrawPixels;
func_glEdgeFlag_t orig_glEdgeFlag;
func_glEdgeFlagPointer_t orig_glEdgeFlagPointer;
func_glEdgeFlagv_t orig_glEdgeFlagv;
func_glEnable_t orig_glEnable;
func_glEnableClientState_t orig_glEnableClientState;
func_glEnd_t orig_glEnd;
func_glEndList_t orig_glEndList;
func_glEvalCoord1d_t orig_glEvalCoord1d;
func_glEvalCoord1dv_t orig_glEvalCoord1dv;
func_glEvalCoord1f_t orig_glEvalCoord1f;
func_glEvalCoord1fv_t orig_glEvalCoord1fv;
func_glEvalCoord2d_t orig_glEvalCoord2d;
func_glEvalCoord2dv_t orig_glEvalCoord2dv;
func_glEvalCoord2f_t orig_glEvalCoord2f;
func_glEvalCoord2fv_t orig_glEvalCoord2fv;
func_glEvalMesh1_t orig_glEvalMesh1;
func_glEvalMesh2_t orig_glEvalMesh2;
func_glEvalPoint1_t orig_glEvalPoint1;
func_glEvalPoint2_t orig_glEvalPoint2;
func_glFeedbackBuffer_t orig_glFeedbackBuffer;
func_glFinish_t orig_glFinish;
func_glFlush_t orig_glFlush;
func_glFogf_t orig_glFogf;
func_glFogfv_t orig_glFogfv;
func_glFogi_t orig_glFogi;
func_glFogiv_t orig_glFogiv;
func_glFrontFace_t orig_glFrontFace;
func_glFrustum_t orig_glFrustum;
func_glGenLists_t orig_glGenLists;
func_glGenTextures_t orig_glGenTextures;
func_glGetBooleanv_t orig_glGetBooleanv;
func_glGetClipPlane_t orig_glGetClipPlane;
func_glGetDoublev_t orig_glGetDoublev;
func_glGetError_t orig_glGetError;
func_glGetFloatv_t orig_glGetFloatv;
func_glGetIntegerv_t orig_glGetIntegerv;
func_glGetLightfv_t orig_glGetLightfv;
func_glGetLightiv_t orig_glGetLightiv;
func_glGetMapdv_t orig_glGetMapdv;
func_glGetMapfv_t orig_glGetMapfv;
func_glGetMapiv_t orig_glGetMapiv;
func_glGetMaterialfv_t orig_glGetMaterialfv;
func_glGetMaterialiv_t orig_glGetMaterialiv;
func_glGetPixelMapfv_t orig_glGetPixelMapfv;
func_glGetPixelMapuiv_t orig_glGetPixelMapuiv;
func_glGetPixelMapusv_t orig_glGetPixelMapusv;
func_glGetPointerv_t orig_glGetPointerv;
func_glGetPolygonStipple_t orig_glGetPolygonStipple;
func_glGetString_t orig_glGetString;
func_glGetTexEnvfv_t orig_glGetTexEnvfv;
func_glGetTexEnviv_t orig_glGetTexEnviv;
func_glGetTexGendv_t orig_glGetTexGendv;
func_glGetTexGenfv_t orig_glGetTexGenfv;
func_glGetTexGeniv_t orig_glGetTexGeniv;
func_glGetTexImage_t orig_glGetTexImage;
func_glGetTexLevelParameterfv_t orig_glGetTexLevelParameterfv;
func_glGetTexLevelParameteriv_t orig_glGetTexLevelParameteriv;
func_glGetTexParameterfv_t orig_glGetTexParameterfv;
func_glGetTexParameteriv_t orig_glGetTexParameteriv;
func_glHint_t orig_glHint;
func_glIndexMask_t orig_glIndexMask;
func_glIndexPointer_t orig_glIndexPointer;
func_glIndexd_t orig_glIndexd;
func_glIndexdv_t orig_glIndexdv;
func_glIndexf_t orig_glIndexf;
func_glIndexfv_t orig_glIndexfv;
func_glIndexi_t orig_glIndexi;
func_glIndexiv_t orig_glIndexiv;
func_glIndexs_t orig_glIndexs;
func_glIndexsv_t orig_glIndexsv;
func_glIndexub_t orig_glIndexub;
func_glIndexubv_t orig_glIndexubv;
func_glInitNames_t orig_glInitNames;
func_glInterleavedArrays_t orig_glInterleavedArrays;
func_glIsEnabled_t orig_glIsEnabled;
func_glIsList_t orig_glIsList;
func_glIsTexture_t orig_glIsTexture;
func_glLightModelf_t orig_glLightModelf;
func_glLightModelfv_t orig_glLightModelfv;
func_glLightModeli_t orig_glLightModeli;
func_glLightModeliv_t orig_glLightModeliv;
func_glLightf_t orig_glLightf;
func_glLightfv_t orig_glLightfv;
func_glLighti_t orig_glLighti;
func_glLightiv_t orig_glLightiv;
func_glLineStipple_t orig_glLineStipple;
func_glLineWidth_t orig_glLineWidth;
func_glListBase_t orig_glListBase;
func_glLoadIdentity_t orig_glLoadIdentity;
func_glLoadMatrixd_t orig_glLoadMatrixd;
func_glLoadMatrixf_t orig_glLoadMatrixf;
func_glLoadName_t orig_glLoadName;
func_glLogicOp_t orig_glLogicOp;
func_glMap1d_t orig_glMap1d;
func_glMap1f_t orig_glMap1f;
func_glMap2d_t orig_glMap2d;
func_glMap2f_t orig_glMap2f;
func_glMapGrid1d_t orig_glMapGrid1d;
func_glMapGrid1f_t orig_glMapGrid1f;
func_glMapGrid2d_t orig_glMapGrid2d;
func_glMapGrid2f_t orig_glMapGrid2f;
func_glMaterialf_t orig_glMaterialf;
func_glMaterialfv_t orig_glMaterialfv;
func_glMateriali_t orig_glMateriali;
func_glMaterialiv_t orig_glMaterialiv;
func_glMatrixMode_t orig_glMatrixMode;
func_glMultMatrixd_t orig_glMultMatrixd;
func_glMultMatrixf_t orig_glMultMatrixf;
func_glNewList_t orig_glNewList;
func_glNormal3b_t orig_glNormal3b;
func_glNormal3bv_t orig_glNormal3bv;
func_glNormal3d_t orig_glNormal3d;
func_glNormal3dv_t orig_glNormal3dv;
func_glNormal3f_t orig_glNormal3f;
func_glNormal3fv_t orig_glNormal3fv;
func_glNormal3i_t orig_glNormal3i;
func_glNormal3iv_t orig_glNormal3iv;
func_glNormal3s_t orig_glNormal3s;
func_glNormal3sv_t orig_glNormal3sv;
func_glNormalPointer_t orig_glNormalPointer;
func_glOrtho_t orig_glOrtho;
func_glPassThrough_t orig_glPassThrough;
func_glPixelMapfv_t orig_glPixelMapfv;
func_glPixelMapuiv_t orig_glPixelMapuiv;
func_glPixelMapusv_t orig_glPixelMapusv;
func_glPixelStoref_t orig_glPixelStoref;
func_glPixelStorei_t orig_glPixelStorei;
func_glPixelTransferf_t orig_glPixelTransferf;
func_glPixelTransferi_t orig_glPixelTransferi;
func_glPixelZoom_t orig_glPixelZoom;
func_glPointSize_t orig_glPointSize;
func_glPolygonMode_t orig_glPolygonMode;
func_glPolygonOffset_t orig_glPolygonOffset;
func_glPolygonStipple_t orig_glPolygonStipple;
func_glPopAttrib_t orig_glPopAttrib;
func_glPopClientAttrib_t orig_glPopClientAttrib;
func_glPopMatrix_t orig_glPopMatrix;
func_glPopName_t orig_glPopName;
func_glPrioritizeTextures_t orig_glPrioritizeTextures;
func_glPushAttrib_t orig_glPushAttrib;
func_glPushClientAttrib_t orig_glPushClientAttrib;
func_glPushMatrix_t orig_glPushMatrix;
func_glPushName_t orig_glPushName;
func_glRasterPos2d_t orig_glRasterPos2d;
func_glRasterPos2dv_t orig_glRasterPos2dv;
func_glRasterPos2f_t orig_glRasterPos2f;
func_glRasterPos2fv_t orig_glRasterPos2fv;
func_glRasterPos2i_t orig_glRasterPos2i;
func_glRasterPos2iv_t orig_glRasterPos2iv;
func_glRasterPos2s_t orig_glRasterPos2s;
func_glRasterPos2sv_t orig_glRasterPos2sv;
func_glRasterPos3d_t orig_glRasterPos3d;
func_glRasterPos3dv_t orig_glRasterPos3dv;
func_glRasterPos3f_t orig_glRasterPos3f;
func_glRasterPos3fv_t orig_glRasterPos3fv;
func_glRasterPos3i_t orig_glRasterPos3i;
func_glRasterPos3iv_t orig_glRasterPos3iv;
func_glRasterPos3s_t orig_glRasterPos3s;
func_glRasterPos3sv_t orig_glRasterPos3sv;
func_glRasterPos4d_t orig_glRasterPos4d;
func_glRasterPos4dv_t orig_glRasterPos4dv;
func_glRasterPos4f_t orig_glRasterPos4f;
func_glRasterPos4fv_t orig_glRasterPos4fv;
func_glRasterPos4i_t orig_glRasterPos4i;
func_glRasterPos4iv_t orig_glRasterPos4iv;
func_glRasterPos4s_t orig_glRasterPos4s;
func_glRasterPos4sv_t orig_glRasterPos4sv;
func_glReadBuffer_t orig_glReadBuffer;
func_glReadPixels_t orig_glReadPixels;
func_glRectd_t orig_glRectd;
func_glRectdv_t orig_glRectdv;
func_glRectf_t orig_glRectf;
func_glRectfv_t orig_glRectfv;
func_glRecti_t orig_glRecti;
func_glRectiv_t orig_glRectiv;
func_glRects_t orig_glRects;
func_glRectsv_t orig_glRectsv;
func_glRenderMode_t orig_glRenderMode;
func_glRotated_t orig_glRotated;
func_glRotatef_t orig_glRotatef;
func_glScaled_t orig_glScaled;
func_glScalef_t orig_glScalef;
func_glScissor_t orig_glScissor;
func_glSelectBuffer_t orig_glSelectBuffer;
func_glShadeModel_t orig_glShadeModel;
func_glStencilFunc_t orig_glStencilFunc;
func_glStencilMask_t orig_glStencilMask;
func_glStencilOp_t orig_glStencilOp;
func_glTexCoord1d_t orig_glTexCoord1d;
func_glTexCoord1dv_t orig_glTexCoord1dv;
func_glTexCoord1f_t orig_glTexCoord1f;
func_glTexCoord1fv_t orig_glTexCoord1fv;
func_glTexCoord1i_t orig_glTexCoord1i;
func_glTexCoord1iv_t orig_glTexCoord1iv;
func_glTexCoord1s_t orig_glTexCoord1s;
func_glTexCoord1sv_t orig_glTexCoord1sv;
func_glTexCoord2d_t orig_glTexCoord2d;
func_glTexCoord2dv_t orig_glTexCoord2dv;
func_glTexCoord2f_t orig_glTexCoord2f;
func_glTexCoord2fv_t orig_glTexCoord2fv;
func_glTexCoord2i_t orig_glTexCoord2i;
func_glTexCoord2iv_t orig_glTexCoord2iv;
func_glTexCoord2s_t orig_glTexCoord2s;
func_glTexCoord2sv_t orig_glTexCoord2sv;
func_glTexCoord3d_t orig_glTexCoord3d;
func_glTexCoord3dv_t orig_glTexCoord3dv;
func_glTexCoord3f_t orig_glTexCoord3f;
func_glTexCoord3fv_t orig_glTexCoord3fv;
func_glTexCoord3i_t orig_glTexCoord3i;
func_glTexCoord3iv_t orig_glTexCoord3iv;
func_glTexCoord3s_t orig_glTexCoord3s;
func_glTexCoord3sv_t orig_glTexCoord3sv;
func_glTexCoord4d_t orig_glTexCoord4d;
func_glTexCoord4dv_t orig_glTexCoord4dv;
func_glTexCoord4f_t orig_glTexCoord4f;
func_glTexCoord4fv_t orig_glTexCoord4fv;
func_glTexCoord4i_t orig_glTexCoord4i;
func_glTexCoord4iv_t orig_glTexCoord4iv;
func_glTexCoord4s_t orig_glTexCoord4s;
func_glTexCoord4sv_t orig_glTexCoord4sv;
func_glTexCoordPointer_t orig_glTexCoordPointer;
func_glTexEnvf_t orig_glTexEnvf;
func_glTexEnvfv_t orig_glTexEnvfv;
func_glTexEnvi_t orig_glTexEnvi;
func_glTexEnviv_t orig_glTexEnviv;
func_glTexGend_t orig_glTexGend;
func_glTexGendv_t orig_glTexGendv;
func_glTexGenf_t orig_glTexGenf;
func_glTexGenfv_t orig_glTexGenfv;
func_glTexGeni_t orig_glTexGeni;
func_glTexGeniv_t orig_glTexGeniv;
func_glTexImage1D_t orig_glTexImage1D;
func_glTexImage2D_t orig_glTexImage2D;
func_glTexParameterf_t orig_glTexParameterf;
func_glTexParameterfv_t orig_glTexParameterfv;
func_glTexParameteri_t orig_glTexParameteri;
func_glTexParameteriv_t orig_glTexParameteriv;
func_glTexSubImage1D_t orig_glTexSubImage1D;
func_glTexSubImage2D_t orig_glTexSubImage2D;
func_glTranslated_t orig_glTranslated;
func_glTranslatef_t orig_glTranslatef;
func_glVertex2d_t orig_glVertex2d;
func_glVertex2dv_t orig_glVertex2dv;
func_glVertex2f_t orig_glVertex2f;
func_glVertex2fv_t orig_glVertex2fv;
func_glVertex2i_t orig_glVertex2i;
func_glVertex2iv_t orig_glVertex2iv;
func_glVertex2s_t orig_glVertex2s;
func_glVertex2sv_t orig_glVertex2sv;
func_glVertex3d_t orig_glVertex3d;
func_glVertex3dv_t orig_glVertex3dv;
func_glVertex3f_t orig_glVertex3f;
func_glVertex3fv_t orig_glVertex3fv;
func_glVertex3i_t orig_glVertex3i;
func_glVertex3iv_t orig_glVertex3iv;
func_glVertex3s_t orig_glVertex3s;
func_glVertex3sv_t orig_glVertex3sv;
func_glVertex4d_t orig_glVertex4d;
func_glVertex4dv_t orig_glVertex4dv;
func_glVertex4f_t orig_glVertex4f;
func_glVertex4fv_t orig_glVertex4fv;
func_glVertex4i_t orig_glVertex4i;
func_glVertex4iv_t orig_glVertex4iv;
func_glVertex4s_t orig_glVertex4s;
func_glVertex4sv_t orig_glVertex4sv;
func_glVertexPointer_t orig_glVertexPointer;
func_glViewport_t orig_glViewport;
func_wglChoosePixelFormat_t orig_wglChoosePixelFormat;
func_wglCopyContext_t orig_wglCopyContext;
func_wglCreateContext_t orig_wglCreateContext;
func_wglCreateLayerContext_t orig_wglCreateLayerContext;
func_wglDeleteContext_t orig_wglDeleteContext;
func_wglDescribeLayerPlane_t orig_wglDescribeLayerPlane;
func_wglDescribePixelFormat_t orig_wglDescribePixelFormat;
func_wglGetCurrentContext_t orig_wglGetCurrentContext;
func_wglGetCurrentDC_t orig_wglGetCurrentDC;
func_wglGetDefaultProcAddress_t orig_wglGetDefaultProcAddress;
func_wglGetLayerPaletteEntries_t orig_wglGetLayerPaletteEntries;
func_wglGetPixelFormat_t orig_wglGetPixelFormat;
func_wglGetProcAddress_t orig_wglGetProcAddress;
func_wglMakeCurrent_t orig_wglMakeCurrent;
func_wglRealizeLayerPalette_t orig_wglRealizeLayerPalette;
func_wglSetLayerPaletteEntries_t orig_wglSetLayerPaletteEntries;
func_wglSetPixelFormat_t orig_wglSetPixelFormat;
func_wglShareLists_t orig_wglShareLists;
func_wglSwapBuffers_t orig_wglSwapBuffers;
func_wglSwapLayerBuffers_t orig_wglSwapLayerBuffers;
func_wglUseFontBitmapsA_t orig_wglUseFontBitmapsA;
func_wglUseFontBitmapsW_t orig_wglUseFontBitmapsW;
func_wglUseFontOutlinesA_t orig_wglUseFontOutlinesA;
func_wglUseFontOutlinesW_t orig_wglUseFontOutlinesW;
void sys_glAccum (GLenum op, GLfloat value)
{
(*orig_glAccum) (op, value);
}
GLboolean sys_glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences)
{
return (*orig_glAreTexturesResident) (n, textures, residences);
}
void sys_glArrayElement (GLint i)
{
(*orig_glArrayElement) (i);
}
void sys_glBindTexture (GLenum target, GLuint texture)
{
(*orig_glBindTexture) (target, texture);
}
void sys_glCallList (GLuint list)
{
(*orig_glCallList) (list);
}
void sys_glCallLists (GLsizei n, GLenum type, const GLvoid *lists)
{
(*orig_glCallLists) (n, type, lists);
}
void sys_glClearDepth (GLclampd depth)
{
(*orig_glClearDepth) (depth);
}
void sys_glClearIndex (GLfloat c)
{
(*orig_glClearIndex) (c);
}
void sys_glClearStencil (GLint s)
{
(*orig_glClearStencil) (s);
}
void sys_glClipPlane (GLenum plane, const GLdouble *equation)
{
(*orig_glClipPlane) (plane, equation);
}
void sys_glColor3b (GLbyte red, GLbyte green, GLbyte blue)
{
(*orig_glColor3b) (red, green, blue);
}
void sys_glColor3bv (const GLbyte *v)
{
(*orig_glColor3bv) (v);
}
void sys_glColor3d (GLdouble red, GLdouble green, GLdouble blue)
{
(*orig_glColor3d) (red, green, blue);
}
void sys_glColor3dv (const GLdouble *v)
{
(*orig_glColor3dv) (v);
}
void sys_glColor3fv (const GLfloat *v)
{
(*orig_glColor3fv) (v);
}
void sys_glColor3i (GLint red, GLint green, GLint blue)
{
(*orig_glColor3i) (red, green, blue);
}
void sys_glColor3iv (const GLint *v)
{
(*orig_glColor3iv) (v);
}
void sys_glColor3s (GLshort red, GLshort green, GLshort blue)
{
(*orig_glColor3s) (red, green, blue);
}
void sys_glColor3sv (const GLshort *v)
{
(*orig_glColor3sv) (v);
}
void sys_glColor3ui (GLuint red, GLuint green, GLuint blue)
{
(*orig_glColor3ui) (red, green, blue);
}
void sys_glColor3uiv (const GLuint *v)
{
(*orig_glColor3uiv) (v);
}
void sys_glColor3us (GLushort red, GLushort green, GLushort blue)
{
(*orig_glColor3us) (red, green, blue);
}
void sys_glColor3usv (const GLushort *v)
{
(*orig_glColor3usv) (v);
}
void sys_glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
{
(*orig_glColor4b) (red, green, blue, alpha);
}
void sys_glColor4bv (const GLbyte *v)
{
(*orig_glColor4bv) (v);
}
void sys_glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
{
(*orig_glColor4d) (red, green, blue, alpha);
}
void sys_glColor4dv (const GLdouble *v)
{
(*orig_glColor4dv) (v);
}
void sys_glColor4fv (const GLfloat *v)
{
(*orig_glColor4fv) (v);
}
void sys_glColor4i (GLint red, GLint green, GLint blue, GLint alpha)
{
(*orig_glColor4i) (red, green, blue, alpha);
}
void sys_glColor4iv (const GLint *v)
{
(*orig_glColor4iv) (v);
}
void sys_glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha)
{
(*orig_glColor4s) (red, green, blue, alpha);
}
void sys_glColor4sv (const GLshort *v)
{
(*orig_glColor4sv) (v);
}
void sys_glColor4ubv (const GLubyte *v)
{
(*orig_glColor4ubv) (v);
}
void sys_glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha)
{
(*orig_glColor4ui) (red, green, blue, alpha);
}
void sys_glColor4uiv (const GLuint *v)
{
(*orig_glColor4uiv) (v);
}
void sys_glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha)
{
(*orig_glColor4us) (red, green, blue, alpha);
}
void sys_glColor4usv (const GLushort *v)
{
(*orig_glColor4usv) (v);
}
void sys_glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
{
(*orig_glColorMask) (red, green, blue, alpha);
}
void sys_glColorMaterial (GLenum face, GLenum mode)
{
(*orig_glColorMaterial) (face, mode);
}
void sys_glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
{
(*orig_glColorPointer) (size, type, stride, pointer);
}
void sys_glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
{
(*orig_glCopyPixels) (x, y, width, height, type);
}
void sys_glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)
{
(*orig_glCopyTexImage1D) (target, level, internalFormat, x, y, width, border);
}
void sys_glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{
(*orig_glCopyTexImage2D) (target, level, internalFormat, x, y, width, height, border);
}
void sys_glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
{
(*orig_glCopyTexSubImage1D) (target, level, xoffset, x, y, width);
}
void sys_glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{
(*orig_glCopyTexSubImage2D) (target, level, xoffset, yoffset, x, y, width, height);
}
__declspec(naked) void sys_glDebugEntry(void)
{
__asm
{
jmp [orig_glDebugEntry]
}
}
void sys_glDeleteLists (GLuint list, GLsizei range)
{
(*orig_glDeleteLists) (list, range);
}
void sys_glDisableClientState (GLenum array)
{
(*orig_glDisableClientState) (array);
}
void sys_glDrawArrays (GLenum mode, GLint first, GLsizei count)
{
(*orig_glDrawArrays) (mode, first, count);
}
void sys_glDrawBuffer (GLenum mode)
{
(*orig_glDrawBuffer) (mode);
}
void sys_glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
{
(*orig_glDrawElements) (mode, count, type, indices);
}
void sys_glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
{
(*orig_glDrawPixels) (width, height, format, type, pixels);
}
void sys_glEdgeFlag (GLboolean flag)
{
(*orig_glEdgeFlag) (flag);
}
void sys_glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer)
{
(*orig_glEdgeFlagPointer) (stride, pointer);
}
void sys_glEdgeFlagv (const GLboolean *flag)
{
(*orig_glEdgeFlagv) (flag);
}
void sys_glEnableClientState (GLenum array)
{
(*orig_glEnableClientState) (array);
}
void sys_glEndList (void)
{
(*orig_glEndList) ();
}
void sys_glEvalCoord1d (GLdouble u)
{
(*orig_glEvalCoord1d) (u);
}
void sys_glEvalCoord1dv (const GLdouble *u)
{
(*orig_glEvalCoord1dv) (u);
}
void sys_glEvalCoord1f (GLfloat u)
{
(*orig_glEvalCoord1f) (u);
}
void sys_glEvalCoord1fv (const GLfloat *u)
{
(*orig_glEvalCoord1fv) (u);
}
void sys_glEvalCoord2d (GLdouble u, GLdouble v)
{
(*orig_glEvalCoord2d) (u, v);
}
void sys_glEvalCoord2dv (const GLdouble *u)
{
(*orig_glEvalCoord2dv) (u);
}
void sys_glEvalCoord2f (GLfloat u, GLfloat v)
{
(*orig_glEvalCoord2f) (u, v);
}
void sys_glEvalCoord2fv (const GLfloat *u)
{
(*orig_glEvalCoord2fv) (u);
}
void sys_glEvalMesh1 (GLenum mode, GLint i1, GLint i2)
{
(*orig_glEvalMesh1) (mode, i1, i2);
}
void sys_glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
{
(*orig_glEvalMesh2) (mode, i1, i2, j1, j2);
}
void sys_glEvalPoint1 (GLint i)
{
(*orig_glEvalPoint1) (i);
}
void sys_glEvalPoint2 (GLint i, GLint j)
{
(*orig_glEvalPoint2) (i, j);
}
void sys_glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer)
{
(*orig_glFeedbackBuffer) (size, type, buffer);
}
void sys_glFinish (void)
{
(*orig_glFinish) ();
}
void sys_glFlush (void)
{
(*orig_glFlush) ();
}
void sys_glFogf (GLenum pname, GLfloat param)
{
(*orig_glFogf) (pname, param);
}
void sys_glFogfv (GLenum pname, const GLfloat *params)
{
(*orig_glFogfv) (pname, params);
}
void sys_glFogi (GLenum pname, GLint param)
{
(*orig_glFogi) (pname, param);
}
void sys_glFogiv (GLenum pname, const GLint *params)
{
(*orig_glFogiv) (pname, params);
}
void sys_glFrontFace (GLenum mode)
{
(*orig_glFrontFace) (mode);
}
GLuint sys_glGenLists (GLsizei range)
{
return (*orig_glGenLists) (range);
}
void sys_glGenTextures (GLsizei n, GLuint *textures)
{
(*orig_glGenTextures) (n, textures);
}
void sys_glGetBooleanv (GLenum pname, GLboolean *params)
{
(*orig_glGetBooleanv) (pname, params);
}
void sys_glGetClipPlane (GLenum plane, GLdouble *equation)
{
(*orig_glGetClipPlane) (plane, equation);
}
void sys_glGetDoublev (GLenum pname, GLdouble *params)
{
(*orig_glGetDoublev) (pname, params);
}
GLenum sys_glGetError (void)
{
return (*orig_glGetError) ();
}
void sys_glGetFloatv (GLenum pname, GLfloat *params)
{
(*orig_glGetFloatv) (pname, params);
}
void sys_glGetIntegerv (GLenum pname, GLint *params)
{
(*orig_glGetIntegerv) (pname, params);
}
void sys_glGetLightfv (GLenum light, GLenum pname, GLfloat *params)
{
(*orig_glGetLightfv) (light, pname, params);
}
void sys_glGetLightiv (GLenum light, GLenum pname, GLint *params)
{
(*orig_glGetLightiv) (light, pname, params);
}
void sys_glGetMapdv (GLenum target, GLenum query, GLdouble *v)
{
(*orig_glGetMapdv) (target, query, v);
}
void sys_glGetMapfv (GLenum target, GLenum query, GLfloat *v)
{
(*orig_glGetMapfv) (target, query, v);
}
void sys_glGetMapiv (GLenum target, GLenum query, GLint *v)
{
(*orig_glGetMapiv) (target, query, v);
}
void sys_glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params)
{
(*orig_glGetMaterialfv) (face, pname, params);
}
void sys_glGetMaterialiv (GLenum face, GLenum pname, GLint *params)
{
(*orig_glGetMaterialiv) (face, pname, params);
}
void sys_glGetPixelMapfv (GLenum map, GLfloat *values)
{
(*orig_glGetPixelMapfv) (map, values);
}
void sys_glGetPixelMapuiv (GLenum map, GLuint *values)
{
(*orig_glGetPixelMapuiv) (map, values);
}
void sys_glGetPixelMapusv (GLenum map, GLushort *values)
{
(*orig_glGetPixelMapusv) (map, values);
}
void sys_glGetPointerv (GLenum pname, GLvoid* *params)
{
(*orig_glGetPointerv) (pname, params);
}
void sys_glGetPolygonStipple (GLubyte *mask)
{
(*orig_glGetPolygonStipple) (mask);
}
const GLubyte * sys_glGetString (GLenum name)
{
return (*orig_glGetString) (name);
}
void sys_glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params)
{
(*orig_glGetTexEnvfv) (target, pname, params);
}
void sys_glGetTexEnviv (GLenum target, GLenum pname, GLint *params)
{
(*orig_glGetTexEnviv) (target, pname, params);
}
void sys_glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params)
{
(*orig_glGetTexGendv) (coord, pname, params);
}
void sys_glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params)
{
(*orig_glGetTexGenfv) (coord, pname, params);
}
void sys_glGetTexGeniv (GLenum coord, GLenum pname, GLint *params)
{
(*orig_glGetTexGeniv) (coord, pname, params);
}
void sys_glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
{
(*orig_glGetTexImage) (target, level, format, type, pixels);
}
void sys_glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params)
{
(*orig_glGetTexLevelParameterfv) (target, level, pname, params);
}
void sys_glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params)
{
(*orig_glGetTexLevelParameteriv) (target, level, pname, params);
}
void sys_glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params)
{
(*orig_glGetTexParameterfv) (target, pname, params);
}
void sys_glGetTexParameteriv (GLenum target, GLenum pname, GLint *params)
{
(*orig_glGetTexParameteriv) (target, pname, params);
}
void sys_glHint (GLenum target, GLenum mode)
{
(*orig_glHint) (target, mode);
}
void sys_glIndexMask (GLuint mask)
{
(*orig_glIndexMask) (mask);
}
void sys_glIndexPointer (GLenum type, GLsizei stride, const GLvoid *pointer)
{
(*orig_glIndexPointer) (type, stride, pointer);
}
void sys_glIndexd (GLdouble c)
{
(*orig_glIndexd) (c);
}
void sys_glIndexdv (const GLdouble *c)
{
(*orig_glIndexdv) (c);
}
void sys_glIndexf (GLfloat c)
{
(*orig_glIndexf) (c);
}
void sys_glIndexfv (const GLfloat *c)
{
(*orig_glIndexfv) (c);
}
void sys_glIndexi (GLint c)
{
(*orig_glIndexi) (c);
}
void sys_glIndexiv (const GLint *c)
{
(*orig_glIndexiv) (c);
}
void sys_glIndexs (GLshort c)
{
(*orig_glIndexs) (c);
}
void sys_glIndexsv (const GLshort *c)
{
(*orig_glIndexsv) (c);
}
void sys_glIndexub (GLubyte c)
{
(*orig_glIndexub) (c);
}
void sys_glIndexubv (const GLubyte *c)
{
(*orig_glIndexubv) (c);
}
void sys_glInitNames (void)
{
(*orig_glInitNames) ();
}
void sys_glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer)
{
(*orig_glInterleavedArrays) (format, stride, pointer);