/
glapi.py
3077 lines (2805 loc) · 331 KB
/
glapi.py
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 2011 Jose Fonseca
# Copyright 2008-2010 VMware, Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
##########################################################################/
"""GL API description.
Most of these were automatically generated from Khronos OpenGL spec files by
the specs/scripts/glspec.py script, and then manually edited to cover the
corner cases correctly.
"""
from stdapi import *
from gltypes import *
import glparams
def GlFunction(*args, **kwargs):
kwargs.setdefault('call', 'APIENTRY')
return Function(*args, **kwargs)
def InGlString(charType, length, argName):
# Helper function to describe input strings, where string length can be
# passed as argument.
lengthExpr = '((%s) >= 0 ? (%s) : strlen(%s))' % (length, length, argName)
return In(String(Const(charType), lengthExpr), argName)
def OutGlString(charType, lengthPtr, argName):
# Helper function to describe output strings, where string length can be
# returned as a pointer.
lengthExpr = '((%s) ? *(%s) : strlen(%s))' % (lengthPtr, lengthPtr, argName)
return Out(String(charType, lengthExpr), argName)
glapi = Module('GL')
glapi.addFunctions([
# GL_VERSION_1_0
GlFunction(Void, "glCullFace", [(GLenum, "mode")]),
GlFunction(Void, "glFrontFace", [(GLenum, "mode")]),
GlFunction(Void, "glHint", [(GLenum, "target"), (GLenum, "mode")]),
GlFunction(Void, "glLineWidth", [(GLfloat, "width")]),
GlFunction(Void, "glPointSize", [(GLfloat, "size")]),
GlFunction(Void, "glPolygonMode", [(GLenum, "face"), (GLenum, "mode")]),
GlFunction(Void, "glScissor", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
GlFunction(Void, "glTexParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum_int, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexImage1D_size(format, type, width)"), "pixels")]),
GlFunction(Void, "glTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum_int, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexImage2D_size(format, type, width, height)"), "pixels")]),
GlFunction(Void, "glDrawBuffer", [(GLenum, "mode")]),
GlFunction(Void, "glClear", [(GLbitfield_attrib, "mask")]),
GlFunction(Void, "glClearColor", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
GlFunction(Void, "glClearStencil", [(GLint, "s")]),
GlFunction(Void, "glClearDepth", [(GLdouble, "depth")]),
GlFunction(Void, "glStencilMask", [(GLuint, "mask")]),
GlFunction(Void, "glColorMask", [(GLboolean, "red"), (GLboolean, "green"), (GLboolean, "blue"), (GLboolean, "alpha")]),
GlFunction(Void, "glDepthMask", [(GLboolean, "flag")]),
GlFunction(Void, "glDisable", [(GLenum, "cap")]),
GlFunction(Void, "glEnable", [(GLenum, "cap")]),
GlFunction(Void, "glFinish", []),
GlFunction(Void, "glFlush", []),
GlFunction(Void, "glBlendFunc", [(GLenum, "sfactor"), (GLenum, "dfactor")]),
GlFunction(Void, "glLogicOp", [(GLenum, "opcode")]),
GlFunction(Void, "glStencilFunc", [(GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]),
GlFunction(Void, "glStencilOp", [(GLenum, "fail"), (GLenum, "zfail"), (GLenum, "zpass")]),
GlFunction(Void, "glDepthFunc", [(GLenum, "func")]),
GlFunction(Void, "glPixelStoref", [(GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glPixelStorei", [(GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glReadBuffer", [(GLenum, "mode")]),
GlFunction(Void, "glReadPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), Out(GLpointer, "pixels")]),
GlFunction(Void, "glGetBooleanv", [(GLenum, "pname"), Out(Array(GLboolean, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetDoublev", [(GLenum, "pname"), Out(Array(GLdouble, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(GLenum_error, "glGetError", [], sideeffects=False),
GlFunction(Void, "glGetFloatv", [(GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetIntegerv", [(GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(String(Const(GLubyte)), "glGetString", [(GLenum, "name")], sideeffects=False),
GlFunction(Void, "glGetTexImage", [(GLenum, "target"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), Out(GLpointer, "pixels")]),
GlFunction(Void, "glGetTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexLevelParameterfv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexLevelParameteriv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(GLboolean, "glIsEnabled", [(GLenum, "cap")], sideeffects=False),
GlFunction(Void, "glDepthRange", [(GLdouble, "zNear"), (GLdouble, "zFar")]),
GlFunction(Void, "glViewport", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
# GL_VERSION_1_0_DEPRECATED
GlFunction(Void, "glNewList", [(GLlist, "list"), (GLenum, "mode")]),
GlFunction(Void, "glEndList", []),
GlFunction(Void, "glCallList", [(GLlist, "list")]),
GlFunction(Void, "glCallLists", [(GLsizei, "n"), (GLenum, "type"), (Blob(Const(GLvoid), "_glCallLists_size(n, type)"), "lists")]),
GlFunction(Void, "glDeleteLists", [(GLlist, "list"), (GLsizei, "range")]),
GlFunction(Handle("list", GLuint, "range"), "glGenLists", [(GLsizei, "range")]),
GlFunction(Void, "glListBase", [(GLuint, "base")]),
GlFunction(Void, "glBegin", [(GLenum_mode, "mode")]),
GlFunction(Void, "glBitmap", [(GLsizei, "width"), (GLsizei, "height"), (GLfloat, "xorig"), (GLfloat, "yorig"), (GLfloat, "xmove"), (GLfloat, "ymove"), (Blob(Const(GLubyte), "_glBitmap_size(width, height)"), "bitmap")]),
GlFunction(Void, "glColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
GlFunction(Void, "glColor3bv", [(Array(Const(GLbyte), 3), "v")]),
GlFunction(Void, "glColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
GlFunction(Void, "glColor3dv", [(Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
GlFunction(Void, "glColor3fv", [(Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
GlFunction(Void, "glColor3iv", [(Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
GlFunction(Void, "glColor3sv", [(Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
GlFunction(Void, "glColor3ubv", [(Array(Const(GLubyte), 3), "v")]),
GlFunction(Void, "glColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
GlFunction(Void, "glColor3uiv", [(Array(Const(GLuint), 3), "v")]),
GlFunction(Void, "glColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
GlFunction(Void, "glColor3usv", [(Array(Const(GLushort), 3), "v")]),
GlFunction(Void, "glColor4b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue"), (GLbyte, "alpha")]),
GlFunction(Void, "glColor4bv", [(Array(Const(GLbyte), 4), "v")]),
GlFunction(Void, "glColor4d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue"), (GLdouble, "alpha")]),
GlFunction(Void, "glColor4dv", [(Array(Const(GLdouble), 4), "v")]),
GlFunction(Void, "glColor4f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
GlFunction(Void, "glColor4fv", [(Array(Const(GLfloat), 4), "v")]),
GlFunction(Void, "glColor4i", [(GLint, "red"), (GLint, "green"), (GLint, "blue"), (GLint, "alpha")]),
GlFunction(Void, "glColor4iv", [(Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glColor4s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue"), (GLshort, "alpha")]),
GlFunction(Void, "glColor4sv", [(Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glColor4ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue"), (GLubyte, "alpha")]),
GlFunction(Void, "glColor4ubv", [(Array(Const(GLubyte), 4), "v")]),
GlFunction(Void, "glColor4ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue"), (GLuint, "alpha")]),
GlFunction(Void, "glColor4uiv", [(Array(Const(GLuint), 4), "v")]),
GlFunction(Void, "glColor4us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue"), (GLushort, "alpha")]),
GlFunction(Void, "glColor4usv", [(Array(Const(GLushort), 4), "v")]),
GlFunction(Void, "glEdgeFlag", [(GLboolean, "flag")]),
GlFunction(Void, "glEdgeFlagv", [(Pointer(Const(GLboolean)), "flag")]),
GlFunction(Void, "glEnd", []),
GlFunction(Void, "glIndexd", [(GLdouble, "c")]),
GlFunction(Void, "glIndexdv", [(Pointer(Const(GLdouble)), "c")]),
GlFunction(Void, "glIndexf", [(GLfloat, "c")]),
GlFunction(Void, "glIndexfv", [(Pointer(Const(GLfloat)), "c")]),
GlFunction(Void, "glIndexi", [(GLint, "c")]),
GlFunction(Void, "glIndexiv", [(Pointer(Const(GLint)), "c")]),
GlFunction(Void, "glIndexs", [(GLshort, "c")]),
GlFunction(Void, "glIndexsv", [(Pointer(Const(GLshort)), "c")]),
GlFunction(Void, "glNormal3b", [(GLbyte, "nx"), (GLbyte, "ny"), (GLbyte, "nz")]),
GlFunction(Void, "glNormal3bv", [(Array(Const(GLbyte), 3), "v")]),
GlFunction(Void, "glNormal3d", [(GLdouble, "nx"), (GLdouble, "ny"), (GLdouble, "nz")]),
GlFunction(Void, "glNormal3dv", [(Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glNormal3f", [(GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz")]),
GlFunction(Void, "glNormal3fv", [(Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glNormal3i", [(GLint, "nx"), (GLint, "ny"), (GLint, "nz")]),
GlFunction(Void, "glNormal3iv", [(Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glNormal3s", [(GLshort, "nx"), (GLshort, "ny"), (GLshort, "nz")]),
GlFunction(Void, "glNormal3sv", [(Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glRasterPos2d", [(GLdouble, "x"), (GLdouble, "y")]),
GlFunction(Void, "glRasterPos2dv", [(Array(Const(GLdouble), 2), "v")]),
GlFunction(Void, "glRasterPos2f", [(GLfloat, "x"), (GLfloat, "y")]),
GlFunction(Void, "glRasterPos2fv", [(Array(Const(GLfloat), 2), "v")]),
GlFunction(Void, "glRasterPos2i", [(GLint, "x"), (GLint, "y")]),
GlFunction(Void, "glRasterPos2iv", [(Array(Const(GLint), 2), "v")]),
GlFunction(Void, "glRasterPos2s", [(GLshort, "x"), (GLshort, "y")]),
GlFunction(Void, "glRasterPos2sv", [(Array(Const(GLshort), 2), "v")]),
GlFunction(Void, "glRasterPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glRasterPos3dv", [(Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glRasterPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
GlFunction(Void, "glRasterPos3fv", [(Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glRasterPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
GlFunction(Void, "glRasterPos3iv", [(Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glRasterPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
GlFunction(Void, "glRasterPos3sv", [(Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glRasterPos4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
GlFunction(Void, "glRasterPos4dv", [(Array(Const(GLdouble), 4), "v")]),
GlFunction(Void, "glRasterPos4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
GlFunction(Void, "glRasterPos4fv", [(Array(Const(GLfloat), 4), "v")]),
GlFunction(Void, "glRasterPos4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
GlFunction(Void, "glRasterPos4iv", [(Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glRasterPos4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
GlFunction(Void, "glRasterPos4sv", [(Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glRectd", [(GLdouble, "x1"), (GLdouble, "y1"), (GLdouble, "x2"), (GLdouble, "y2")]),
GlFunction(Void, "glRectdv", [(Array(Const(GLdouble), 2), "v1"), (Array(Const(GLdouble), 2), "v2")]),
GlFunction(Void, "glRectf", [(GLfloat, "x1"), (GLfloat, "y1"), (GLfloat, "x2"), (GLfloat, "y2")]),
GlFunction(Void, "glRectfv", [(Array(Const(GLfloat), 2), "v1"), (Array(Const(GLfloat), 2), "v2")]),
GlFunction(Void, "glRecti", [(GLint, "x1"), (GLint, "y1"), (GLint, "x2"), (GLint, "y2")]),
GlFunction(Void, "glRectiv", [(Array(Const(GLint), 2), "v1"), (Array(Const(GLint), 2), "v2")]),
GlFunction(Void, "glRects", [(GLshort, "x1"), (GLshort, "y1"), (GLshort, "x2"), (GLshort, "y2")]),
GlFunction(Void, "glRectsv", [(Array(Const(GLshort), 2), "v1"), (Array(Const(GLshort), 2), "v2")]),
GlFunction(Void, "glTexCoord1d", [(GLdouble, "s")]),
GlFunction(Void, "glTexCoord1dv", [(Pointer(Const(GLdouble)), "v")]),
GlFunction(Void, "glTexCoord1f", [(GLfloat, "s")]),
GlFunction(Void, "glTexCoord1fv", [(Pointer(Const(GLfloat)), "v")]),
GlFunction(Void, "glTexCoord1i", [(GLint, "s")]),
GlFunction(Void, "glTexCoord1iv", [(Pointer(Const(GLint)), "v")]),
GlFunction(Void, "glTexCoord1s", [(GLshort, "s")]),
GlFunction(Void, "glTexCoord1sv", [(Pointer(Const(GLshort)), "v")]),
GlFunction(Void, "glTexCoord2d", [(GLdouble, "s"), (GLdouble, "t")]),
GlFunction(Void, "glTexCoord2dv", [(Array(Const(GLdouble), 2), "v")]),
GlFunction(Void, "glTexCoord2f", [(GLfloat, "s"), (GLfloat, "t")]),
GlFunction(Void, "glTexCoord2fv", [(Array(Const(GLfloat), 2), "v")]),
GlFunction(Void, "glTexCoord2i", [(GLint, "s"), (GLint, "t")]),
GlFunction(Void, "glTexCoord2iv", [(Array(Const(GLint), 2), "v")]),
GlFunction(Void, "glTexCoord2s", [(GLshort, "s"), (GLshort, "t")]),
GlFunction(Void, "glTexCoord2sv", [(Array(Const(GLshort), 2), "v")]),
GlFunction(Void, "glTexCoord3d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
GlFunction(Void, "glTexCoord3dv", [(Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glTexCoord3f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
GlFunction(Void, "glTexCoord3fv", [(Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glTexCoord3i", [(GLint, "s"), (GLint, "t"), (GLint, "r")]),
GlFunction(Void, "glTexCoord3iv", [(Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glTexCoord3s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
GlFunction(Void, "glTexCoord3sv", [(Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glTexCoord4d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
GlFunction(Void, "glTexCoord4dv", [(Array(Const(GLdouble), 4), "v")]),
GlFunction(Void, "glTexCoord4f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
GlFunction(Void, "glTexCoord4fv", [(Array(Const(GLfloat), 4), "v")]),
GlFunction(Void, "glTexCoord4i", [(GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
GlFunction(Void, "glTexCoord4iv", [(Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glTexCoord4s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
GlFunction(Void, "glTexCoord4sv", [(Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glVertex2d", [(GLdouble, "x"), (GLdouble, "y")]),
GlFunction(Void, "glVertex2dv", [(Array(Const(GLdouble), 2), "v")]),
GlFunction(Void, "glVertex2f", [(GLfloat, "x"), (GLfloat, "y")]),
GlFunction(Void, "glVertex2fv", [(Array(Const(GLfloat), 2), "v")]),
GlFunction(Void, "glVertex2i", [(GLint, "x"), (GLint, "y")]),
GlFunction(Void, "glVertex2iv", [(Array(Const(GLint), 2), "v")]),
GlFunction(Void, "glVertex2s", [(GLshort, "x"), (GLshort, "y")]),
GlFunction(Void, "glVertex2sv", [(Array(Const(GLshort), 2), "v")]),
GlFunction(Void, "glVertex3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glVertex3dv", [(Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glVertex3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
GlFunction(Void, "glVertex3fv", [(Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glVertex3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
GlFunction(Void, "glVertex3iv", [(Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glVertex3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
GlFunction(Void, "glVertex3sv", [(Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glVertex4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
GlFunction(Void, "glVertex4dv", [(Array(Const(GLdouble), 4), "v")]),
GlFunction(Void, "glVertex4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
GlFunction(Void, "glVertex4fv", [(Array(Const(GLfloat), 4), "v")]),
GlFunction(Void, "glVertex4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
GlFunction(Void, "glVertex4iv", [(Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glVertex4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
GlFunction(Void, "glVertex4sv", [(Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glClipPlane", [(GLenum, "plane"), (Array(Const(GLdouble), 4), "equation")]),
GlFunction(Void, "glColorMaterial", [(GLenum, "face"), (GLenum, "mode")]),
GlFunction(Void, "glFogf", [(GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glFogfv", [(GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glFogi", [(GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glFogiv", [(GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glLightf", [(GLenum, "light"), (GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glLightfv", [(GLenum, "light"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glLighti", [(GLenum, "light"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glLightiv", [(GLenum, "light"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glLightModelf", [(GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glLightModelfv", [(GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glLightModeli", [(GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glLightModeliv", [(GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glLineStipple", [(GLint, "factor"), (GLushort, "pattern")]),
GlFunction(Void, "glMaterialf", [(GLenum, "face"), (GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glMaterialfv", [(GLenum, "face"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glMateriali", [(GLenum, "face"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glMaterialiv", [(GLenum, "face"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glPolygonStipple", [(Array(Const(GLubyte), "_glPolygonStipple_size()"), "mask")]),
GlFunction(Void, "glShadeModel", [(GLenum, "mode")]),
GlFunction(Void, "glTexEnvf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexEnvi", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glTexEnviv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexGend", [(GLenum, "coord"), (GLenum, "pname"), (GLdouble, "param")]),
GlFunction(Void, "glTexGendv", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLdouble), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexGenf", [(GLenum, "coord"), (GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexGeni", [(GLenum, "coord"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glFeedbackBuffer", [(GLsizei, "size"), (GLenum, "type"), Out(Array(GLfloat, "size"), "buffer")]),
GlFunction(Void, "glSelectBuffer", [(GLsizei, "size"), Out(Array(GLuint, "size"), "buffer")]),
GlFunction(Alias("GLint", GLenum), "glRenderMode", [(GLenum, "mode")]),
GlFunction(Void, "glInitNames", []),
GlFunction(Void, "glLoadName", [(GLuint, "name")]),
GlFunction(Void, "glPassThrough", [(GLfloat, "token")]),
GlFunction(Void, "glPopName", []),
GlFunction(Void, "glPushName", [(GLuint, "name")]),
GlFunction(Void, "glClearAccum", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
GlFunction(Void, "glClearIndex", [(GLfloat, "c")]),
GlFunction(Void, "glIndexMask", [(GLuint, "mask")]),
GlFunction(Void, "glAccum", [(GLenum, "op"), (GLfloat, "value")]),
GlFunction(Void, "glPopAttrib", []),
GlFunction(Void, "glPushAttrib", [(GLbitfield_attrib, "mask")]),
GlFunction(Void, "glMap1d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "stride"), (GLint, "order"), (Array(Const(GLdouble), "_glMap1d_size(target, stride, order)"), "points")]),
GlFunction(Void, "glMap1f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "stride"), (GLint, "order"), (Array(Const(GLfloat), "_glMap1f_size(target, stride, order)"), "points")]),
GlFunction(Void, "glMap2d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLdouble, "v1"), (GLdouble, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Array(Const(GLdouble), "_glMap2d_size(target, ustride, uorder, vstride, vorder)"), "points")]),
GlFunction(Void, "glMap2f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLfloat, "v1"), (GLfloat, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Array(Const(GLfloat), "_glMap2f_size(target, ustride, uorder, vstride, vorder)"), "points")]),
GlFunction(Void, "glMapGrid1d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2")]),
GlFunction(Void, "glMapGrid1f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2")]),
GlFunction(Void, "glMapGrid2d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "vn"), (GLdouble, "v1"), (GLdouble, "v2")]),
GlFunction(Void, "glMapGrid2f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "vn"), (GLfloat, "v1"), (GLfloat, "v2")]),
GlFunction(Void, "glEvalCoord1d", [(GLdouble, "u")]),
GlFunction(Void, "glEvalCoord1dv", [(Pointer(Const(GLdouble)), "u")]),
GlFunction(Void, "glEvalCoord1f", [(GLfloat, "u")]),
GlFunction(Void, "glEvalCoord1fv", [(Pointer(Const(GLfloat)), "u")]),
GlFunction(Void, "glEvalCoord2d", [(GLdouble, "u"), (GLdouble, "v")]),
GlFunction(Void, "glEvalCoord2dv", [(Array(Const(GLdouble), 2), "u")]),
GlFunction(Void, "glEvalCoord2f", [(GLfloat, "u"), (GLfloat, "v")]),
GlFunction(Void, "glEvalCoord2fv", [(Array(Const(GLfloat), 2), "u")]),
GlFunction(Void, "glEvalMesh1", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2")]),
GlFunction(Void, "glEvalPoint1", [(GLint, "i")]),
GlFunction(Void, "glEvalMesh2", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2"), (GLint, "j1"), (GLint, "j2")]),
GlFunction(Void, "glEvalPoint2", [(GLint, "i"), (GLint, "j")]),
GlFunction(Void, "glAlphaFunc", [(GLenum, "func"), (GLfloat, "ref")]),
GlFunction(Void, "glPixelZoom", [(GLfloat, "xfactor"), (GLfloat, "yfactor")]),
GlFunction(Void, "glPixelTransferf", [(GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glPixelTransferi", [(GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glPixelMapfv", [(GLenum, "map"), (GLsizei, "mapsize"), (Array(Const(GLfloat), "mapsize"), "values")]),
GlFunction(Void, "glPixelMapuiv", [(GLenum, "map"), (GLsizei, "mapsize"), (Array(Const(GLuint), "mapsize"), "values")]),
GlFunction(Void, "glPixelMapusv", [(GLenum, "map"), (GLsizei, "mapsize"), (Array(Const(GLushort), "mapsize"), "values")]),
GlFunction(Void, "glCopyPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "type")]),
GlFunction(Void, "glDrawPixels", [(GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glDrawPixels_size(format, type, width, height)"), "pixels")]),
GlFunction(Void, "glGetClipPlane", [(GLenum, "plane"), Out(Array(GLdouble, 4), "equation")], sideeffects=False),
GlFunction(Void, "glGetLightfv", [(GLenum, "light"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetLightiv", [(GLenum, "light"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetMapdv", [(GLenum, "target"), (GLenum, "query"), Out(Pointer(GLdouble), "v")], sideeffects=False),
GlFunction(Void, "glGetMapfv", [(GLenum, "target"), (GLenum, "query"), Out(Pointer(GLfloat), "v")], sideeffects=False),
GlFunction(Void, "glGetMapiv", [(GLenum, "target"), (GLenum, "query"), Out(Pointer(GLint), "v")], sideeffects=False),
GlFunction(Void, "glGetMaterialfv", [(GLenum, "face"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetMaterialiv", [(GLenum, "face"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetPixelMapfv", [(GLenum, "map"), Out(Pointer(GLfloat), "values")]),
GlFunction(Void, "glGetPixelMapuiv", [(GLenum, "map"), Out(Pointer(GLuint), "values")]),
GlFunction(Void, "glGetPixelMapusv", [(GLenum, "map"), Out(Pointer(GLushort), "values")]),
GlFunction(Void, "glGetPolygonStipple", [Out(OpaquePointer(GLubyte), "mask")]),
GlFunction(Void, "glGetTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexEnviv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexGendv", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLdouble, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(GLboolean, "glIsList", [(GLlist, "list")], sideeffects=False),
GlFunction(Void, "glFrustum", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
GlFunction(Void, "glLoadIdentity", []),
GlFunction(Void, "glLoadMatrixf", [(Array(Const(GLfloat), 16), "m")]),
GlFunction(Void, "glLoadMatrixd", [(Array(Const(GLdouble), 16), "m")]),
GlFunction(Void, "glMatrixMode", [(GLenum, "mode")]),
GlFunction(Void, "glMultMatrixf", [(Array(Const(GLfloat), 16), "m")]),
GlFunction(Void, "glMultMatrixd", [(Array(Const(GLdouble), 16), "m")]),
GlFunction(Void, "glOrtho", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
GlFunction(Void, "glPopMatrix", []),
GlFunction(Void, "glPushMatrix", []),
GlFunction(Void, "glRotated", [(GLdouble, "angle"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glRotatef", [(GLfloat, "angle"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
GlFunction(Void, "glScaled", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glScalef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
GlFunction(Void, "glTranslated", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glTranslatef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
# GL_VERSION_1_1
GlFunction(Void, "glDrawArrays", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count")]),
GlFunction(Void, "glDrawElements", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices")]),
GlFunction(Void, "glGetPointerv", [(GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
GlFunction(Void, "glPolygonOffset", [(GLfloat, "factor"), (GLfloat, "units")]),
GlFunction(Void, "glCopyTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLint, "border")]),
GlFunction(Void, "glCopyTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border")]),
GlFunction(Void, "glCopyTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
GlFunction(Void, "glCopyTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
GlFunction(Void, "glTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexSubImage1D_size(format, type, width)"), "pixels")]),
GlFunction(Void, "glTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexSubImage2D_size(format, type, width, height)"), "pixels")]),
GlFunction(Void, "glBindTexture", [(GLenum, "target"), (GLtexture, "texture")]),
GlFunction(Void, "glDeleteTextures", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures")]),
GlFunction(Void, "glGenTextures", [(GLsizei, "n"), Out(Array(GLtexture, "n"), "textures")]),
GlFunction(GLboolean, "glIsTexture", [(GLtexture, "texture")], sideeffects=False),
# GL_VERSION_1_1_DEPRECATED
GlFunction(Void, "glArrayElement", [(GLint, "i")]),
GlFunction(Void, "glColorPointer", [(size_bgra, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glDisableClientState", [(GLenum, "array")]),
GlFunction(Void, "glEdgeFlagPointer", [(GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glEnableClientState", [(GLenum, "array")]),
GlFunction(Void, "glIndexPointer", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glInterleavedArrays", [(GLenum, "format"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glNormalPointer", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glTexCoordPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glVertexPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures"), Out(Array(GLboolean, "n"), "residences")], sideeffects=False),
GlFunction(Void, "glPrioritizeTextures", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures"), (Array(Const(GLclampf), "n"), "priorities")]),
GlFunction(Void, "glIndexub", [(GLubyte, "c")]),
GlFunction(Void, "glIndexubv", [(Pointer(Const(GLubyte)), "c")]),
GlFunction(Void, "glPopClientAttrib", []),
GlFunction(Void, "glPushClientAttrib", [(GLbitfield_client_attrib, "mask")]),
# GL_VERSION_1_2
GlFunction(Void, "glBlendColor", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
GlFunction(Void, "glBlendEquation", [(GLenum, "mode")]),
GlFunction(Void, "glDrawRangeElements", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices")]),
GlFunction(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLenum_int, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexImage3D_size(format, type, width, height, depth)"), "pixels")]),
GlFunction(Void, "glTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glTexSubImage3D_size(format, type, width, height, depth)"), "pixels")]),
GlFunction(Void, "glCopyTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
# GL_VERSION_1_2_DEPRECATED
GlFunction(Void, "glColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glColorTable_size(format, type, width)"), "table")]),
GlFunction(Void, "glColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glCopyColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
GlFunction(Void, "glGetColorTable", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "_glGetColorTable_size(target, format, type)"), "table")], sideeffects=False),
GlFunction(Void, "glGetColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLsizei, "count"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glColorSubTable_size(format, type, count)"), "data")]),
GlFunction(Void, "glCopyColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
GlFunction(Void, "glConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glConvolutionFilter1D_size(format, type, width)"), "image")]),
GlFunction(Void, "glConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glConvolutionFilter2D_size(format, type, width, height)"), "image")]),
GlFunction(Void, "glConvolutionParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "params")]),
GlFunction(Void, "glConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glConvolutionParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "params")]),
GlFunction(Void, "glConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glCopyConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
GlFunction(Void, "glCopyConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
GlFunction(Void, "glGetConvolutionFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "_glGetConvolutionFilter_size(target, format, type)"), "image")]),
GlFunction(Void, "glGetConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetSeparableFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "_glGetSeparableFilter_size(target, format, type)"), "row"), Out(OpaqueBlob(GLvoid, "_glGetSeparableFilter_size(target, format, type)"), "column"), Out(GLpointer, "span")]),
GlFunction(Void, "glSeparableFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glConvolutionFilter1D_size(format, type, width)"), "row"), (Blob(Const(GLvoid), "_glConvolutionFilter1D_size(format, type, height)"), "column")]),
GlFunction(Void, "glGetHistogram", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "_glGetHistogram_size(target, format, type)"), "values")]),
GlFunction(Void, "glGetHistogramParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetHistogramParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetMinmax", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "_glGetMinmax_size(target, format, type)"), "values")]),
GlFunction(Void, "glGetMinmaxParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetMinmaxParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glHistogram", [(GLenum, "target"), (GLsizei, "width"), (GLenum, "internalformat"), (GLboolean, "sink")]),
GlFunction(Void, "glMinmax", [(GLenum, "target"), (GLenum, "internalformat"), (GLboolean, "sink")]),
GlFunction(Void, "glResetHistogram", [(GLenum, "target")]),
GlFunction(Void, "glResetMinmax", [(GLenum, "target")]),
# GL_VERSION_1_3
GlFunction(Void, "glActiveTexture", [(GLenum, "texture")]),
GlFunction(Void, "glSampleCoverage", [(GLfloat, "value"), (GLboolean, "invert")]),
GlFunction(Void, "glCompressedTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
GlFunction(Void, "glCompressedTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
GlFunction(Void, "glCompressedTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
GlFunction(Void, "glCompressedTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
GlFunction(Void, "glCompressedTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
GlFunction(Void, "glCompressedTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
GlFunction(Void, "glGetCompressedTexImage", [(GLenum, "target"), (GLint, "level"), Out(OpaqueBlob(GLvoid, "_glGetCompressedTexImage_size(target, level)"), "img")]),
# GL_VERSION_1_3_DEPRECATED
GlFunction(Void, "glClientActiveTexture", [(GLenum, "texture")]),
GlFunction(Void, "glMultiTexCoord1d", [(GLenum, "target"), (GLdouble, "s")]),
GlFunction(Void, "glMultiTexCoord1dv", [(GLenum, "target"), (Pointer(Const(GLdouble)), "v")]),
GlFunction(Void, "glMultiTexCoord1f", [(GLenum, "target"), (GLfloat, "s")]),
GlFunction(Void, "glMultiTexCoord1fv", [(GLenum, "target"), (Pointer(Const(GLfloat)), "v")]),
GlFunction(Void, "glMultiTexCoord1i", [(GLenum, "target"), (GLint, "s")]),
GlFunction(Void, "glMultiTexCoord1iv", [(GLenum, "target"), (Pointer(Const(GLint)), "v")]),
GlFunction(Void, "glMultiTexCoord1s", [(GLenum, "target"), (GLshort, "s")]),
GlFunction(Void, "glMultiTexCoord1sv", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]),
GlFunction(Void, "glMultiTexCoord2d", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t")]),
GlFunction(Void, "glMultiTexCoord2dv", [(GLenum, "target"), (Array(Const(GLdouble), 2), "v")]),
GlFunction(Void, "glMultiTexCoord2f", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t")]),
GlFunction(Void, "glMultiTexCoord2fv", [(GLenum, "target"), (Array(Const(GLfloat), 2), "v")]),
GlFunction(Void, "glMultiTexCoord2i", [(GLenum, "target"), (GLint, "s"), (GLint, "t")]),
GlFunction(Void, "glMultiTexCoord2iv", [(GLenum, "target"), (Array(Const(GLint), 2), "v")]),
GlFunction(Void, "glMultiTexCoord2s", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t")]),
GlFunction(Void, "glMultiTexCoord2sv", [(GLenum, "target"), (Array(Const(GLshort), 2), "v")]),
GlFunction(Void, "glMultiTexCoord3d", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
GlFunction(Void, "glMultiTexCoord3dv", [(GLenum, "target"), (Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glMultiTexCoord3f", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
GlFunction(Void, "glMultiTexCoord3fv", [(GLenum, "target"), (Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glMultiTexCoord3i", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r")]),
GlFunction(Void, "glMultiTexCoord3iv", [(GLenum, "target"), (Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glMultiTexCoord3s", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
GlFunction(Void, "glMultiTexCoord3sv", [(GLenum, "target"), (Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glMultiTexCoord4d", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
GlFunction(Void, "glMultiTexCoord4dv", [(GLenum, "target"), (Array(Const(GLdouble), 4), "v")]),
GlFunction(Void, "glMultiTexCoord4f", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
GlFunction(Void, "glMultiTexCoord4fv", [(GLenum, "target"), (Array(Const(GLfloat), 4), "v")]),
GlFunction(Void, "glMultiTexCoord4i", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
GlFunction(Void, "glMultiTexCoord4iv", [(GLenum, "target"), (Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glMultiTexCoord4s", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
GlFunction(Void, "glMultiTexCoord4sv", [(GLenum, "target"), (Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glLoadTransposeMatrixf", [(Array(Const(GLfloat), 16), "m")]),
GlFunction(Void, "glLoadTransposeMatrixd", [(Array(Const(GLdouble), 16), "m")]),
GlFunction(Void, "glMultTransposeMatrixf", [(Array(Const(GLfloat), 16), "m")]),
GlFunction(Void, "glMultTransposeMatrixd", [(Array(Const(GLdouble), 16), "m")]),
# GL_VERSION_1_4
GlFunction(Void, "glBlendFuncSeparate", [(GLenum, "sfactorRGB"), (GLenum, "dfactorRGB"), (GLenum, "sfactorAlpha"), (GLenum, "dfactorAlpha")]),
GlFunction(Void, "glMultiDrawArrays", [(GLenum_mode, "mode"), (Array(Const(GLint), "drawcount"), "first"), (Array(Const(GLsizei), "drawcount"), "count"), (GLsizei, "drawcount")]),
GlFunction(Void, "glMultiDrawElements", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "drawcount"), "count"), (GLenum, "type"), (Array(Const(GLindexBuffer("count[{i}]", "type")), "drawcount"), "indices"), (GLsizei, "drawcount")]),
GlFunction(Void, "glPointParameterf", [(GLenum, "pname"), (GLfloat, "param")]),
GlFunction(Void, "glPointParameterfv", [(GLenum, "pname"), (Array(Const(GLfloat), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glPointParameteri", [(GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glPointParameteriv", [(GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
# GL_VERSION_1_4_DEPRECATED
GlFunction(Void, "glFogCoordf", [(GLfloat, "coord")]),
GlFunction(Void, "glFogCoordfv", [(Pointer(Const(GLfloat)), "coord")]),
GlFunction(Void, "glFogCoordd", [(GLdouble, "coord")]),
GlFunction(Void, "glFogCoorddv", [(Pointer(Const(GLdouble)), "coord")]),
GlFunction(Void, "glFogCoordPointer", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glSecondaryColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
GlFunction(Void, "glSecondaryColor3bv", [(Array(Const(GLbyte), 3), "v")]),
GlFunction(Void, "glSecondaryColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
GlFunction(Void, "glSecondaryColor3dv", [(Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glSecondaryColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
GlFunction(Void, "glSecondaryColor3fv", [(Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glSecondaryColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
GlFunction(Void, "glSecondaryColor3iv", [(Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glSecondaryColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
GlFunction(Void, "glSecondaryColor3sv", [(Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glSecondaryColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
GlFunction(Void, "glSecondaryColor3ubv", [(Array(Const(GLubyte), 3), "v")]),
GlFunction(Void, "glSecondaryColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
GlFunction(Void, "glSecondaryColor3uiv", [(Array(Const(GLuint), 3), "v")]),
GlFunction(Void, "glSecondaryColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
GlFunction(Void, "glSecondaryColor3usv", [(Array(Const(GLushort), 3), "v")]),
GlFunction(Void, "glSecondaryColorPointer", [(size_bgra, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glWindowPos2d", [(GLdouble, "x"), (GLdouble, "y")]),
GlFunction(Void, "glWindowPos2dv", [(Array(Const(GLdouble), 2), "v")]),
GlFunction(Void, "glWindowPos2f", [(GLfloat, "x"), (GLfloat, "y")]),
GlFunction(Void, "glWindowPos2fv", [(Array(Const(GLfloat), 2), "v")]),
GlFunction(Void, "glWindowPos2i", [(GLint, "x"), (GLint, "y")]),
GlFunction(Void, "glWindowPos2iv", [(Array(Const(GLint), 2), "v")]),
GlFunction(Void, "glWindowPos2s", [(GLshort, "x"), (GLshort, "y")]),
GlFunction(Void, "glWindowPos2sv", [(Array(Const(GLshort), 2), "v")]),
GlFunction(Void, "glWindowPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glWindowPos3dv", [(Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glWindowPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
GlFunction(Void, "glWindowPos3fv", [(Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glWindowPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
GlFunction(Void, "glWindowPos3iv", [(Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glWindowPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
GlFunction(Void, "glWindowPos3sv", [(Array(Const(GLshort), 3), "v")]),
# GL_VERSION_1_5
GlFunction(Void, "glGenQueries", [(GLsizei, "n"), Out(Array(GLquery, "n"), "ids")]),
GlFunction(Void, "glDeleteQueries", [(GLsizei, "n"), (Array(Const(GLquery), "n"), "ids")]),
GlFunction(GLboolean, "glIsQuery", [(GLquery, "id")], sideeffects=False),
GlFunction(Void, "glBeginQuery", [(GLenum, "target"), (GLquery, "id")]),
GlFunction(Void, "glEndQuery", [(GLenum, "target")]),
GlFunction(Void, "glGetQueryiv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetQueryObjectiv", [(GLquery, "id"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetQueryObjectuiv", [(GLquery, "id"), (GLenum, "pname"), Out(Array(GLuint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glBindBuffer", [(GLenum, "target"), (GLbuffer, "buffer")]),
GlFunction(Void, "glDeleteBuffers", [(GLsizei, "n"), (Array(Const(GLbuffer), "n"), "buffer")]),
GlFunction(Void, "glGenBuffers", [(GLsizei, "n"), Out(Array(GLbuffer, "n"), "buffer")]),
GlFunction(GLboolean, "glIsBuffer", [(GLbuffer, "buffer")], sideeffects=False),
GlFunction(Void, "glBufferData", [(GLenum, "target"), (GLsizeiptr, "size"), (Blob(Const(GLvoid), "size"), "data"), (GLenum, "usage")]),
GlFunction(Void, "glBufferSubData", [(GLenum, "target"), (GLintptr, "offset"), (GLsizeiptr, "size"), (Blob(Const(GLvoid), "size"), "data")]),
GlFunction(Void, "glGetBufferSubData", [(GLenum, "target"), (GLintptr, "offset"), (GLsizeiptr, "size"), Out(OpaqueBlob(GLvoid, "size"), "data")], sideeffects=False),
GlFunction(GLmap, "glMapBuffer", [(GLenum, "target"), (GLenum, "access")]),
GlFunction(GLboolean, "glUnmapBuffer", [(GLenum, "target")]),
GlFunction(Void, "glGetBufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetBufferPointerv", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
# GL_VERSION_2_0
GlFunction(Void, "glBlendEquationSeparate", [(GLenum, "modeRGB"), (GLenum, "modeAlpha")]),
GlFunction(Void, "glDrawBuffers", [(GLsizei, "n"), (Array(Const(GLenum), "n"), "bufs")]),
GlFunction(Void, "glStencilOpSeparate", [(GLenum, "face"), (GLenum, "sfail"), (GLenum, "dpfail"), (GLenum, "dppass")]),
GlFunction(Void, "glStencilFuncSeparate", [(GLenum, "face"), (GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]),
GlFunction(Void, "glStencilMaskSeparate", [(GLenum, "face"), (GLuint, "mask")]),
GlFunction(Void, "glAttachShader", [(GLprogram, "program"), (GLshader, "shader")]),
GlFunction(Void, "glBindAttribLocation", [(GLprogram, "program"), (GLuint, "index"), (GLstringConst, "name")]),
GlFunction(Void, "glCompileShader", [(GLshader, "shader")]),
GlFunction(GLprogram, "glCreateProgram", []),
GlFunction(GLshader, "glCreateShader", [(GLenum, "type")]),
GlFunction(Void, "glDeleteProgram", [(GLprogram, "program")]),
GlFunction(Void, "glDeleteShader", [(GLshader, "shader")]),
GlFunction(Void, "glDetachShader", [(GLprogram, "program"), (GLshader, "shader")]),
GlFunction(Void, "glDisableVertexAttribArray", [(GLuint, "index")]),
GlFunction(Void, "glEnableVertexAttribArray", [(GLuint, "index")]),
GlFunction(Void, "glGetActiveAttrib", [(GLprogram, "program"), (GLuint, "index"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(Pointer(GLint), "size"), Out(Pointer(GLenum), "type"), OutGlString(GLchar, "length", "name")], sideeffects=False),
GlFunction(Void, "glGetActiveUniform", [(GLprogram, "program"), (GLuint, "index"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(Pointer(GLint), "size"), Out(Pointer(GLenum), "type"), OutGlString(GLchar, "length", "name")], sideeffects=False),
GlFunction(Void, "glGetAttachedShaders", [(GLprogram, "program"), (GLsizei, "maxCount"), Out(Pointer(GLsizei), "count"), Out(Array(GLuint, "(count ? *count : maxCount)"), "obj")], sideeffects=False),
GlFunction(GLint, "glGetAttribLocation", [(GLprogram, "program"), (GLstringConst, "name")]),
GlFunction(Void, "glGetProgramiv", [(GLprogram, "program"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetProgramInfoLog", [(GLprogram, "program"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), OutGlString(GLchar, "length", "infoLog")], sideeffects=False),
GlFunction(Void, "glGetShaderiv", [(GLshader, "shader"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetShaderInfoLog", [(GLshader, "shader"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), OutGlString(GLchar, "length", "infoLog")], sideeffects=False),
GlFunction(Void, "glGetShaderSource", [(GLshader, "shader"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), OutGlString(GLchar, "length", "source")], sideeffects=False),
GlFunction(GLlocation, "glGetUniformLocation", [(GLprogram, "program"), (GLstringConst, "name")]),
GlFunction(Void, "glGetUniformfv", [(GLprogram, "program"), (GLlocation, "location"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False),
GlFunction(Void, "glGetUniformiv", [(GLprogram, "program"), (GLlocation, "location"), Out(OpaquePointer(GLint), "params")], sideeffects=False),
GlFunction(Void, "glGetVertexAttribdv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetVertexAttribfv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetVertexAttribiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetVertexAttribPointerv", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLpointer), "pointer")], sideeffects=False),
GlFunction(GLboolean, "glIsProgram", [(GLprogram, "program")], sideeffects=False),
GlFunction(GLboolean, "glIsShader", [(GLshader, "shader")], sideeffects=False),
GlFunction(Void, "glLinkProgram", [(GLprogram, "program")]),
GlFunction(Void, "glShaderSource", [(GLshader, "shader"), (GLsizei, "count"), (Array(Const(String(Const(GLchar), "_glShaderSource_length(string, length, {i})")), "count"), "string"), (Array(Const(GLint), "count"), "length")]),
GlFunction(Void, "glUseProgram", [(GLprogram, "program")]),
GlFunction(Void, "glUniform1f", [(GLlocation, "location"), (GLfloat, "v0")]),
GlFunction(Void, "glUniform2f", [(GLlocation, "location"), (GLfloat, "v0"), (GLfloat, "v1")]),
GlFunction(Void, "glUniform3f", [(GLlocation, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2")]),
GlFunction(Void, "glUniform4f", [(GLlocation, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2"), (GLfloat, "v3")]),
GlFunction(Void, "glUniform1i", [(GLlocation, "location"), (GLint, "v0")]),
GlFunction(Void, "glUniform2i", [(GLlocation, "location"), (GLint, "v0"), (GLint, "v1")]),
GlFunction(Void, "glUniform3i", [(GLlocation, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2")]),
GlFunction(Void, "glUniform4i", [(GLlocation, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2"), (GLint, "v3")]),
GlFunction(Void, "glUniform1fv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLfloat), "count"), "value")]),
GlFunction(Void, "glUniform2fv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLfloat), "count*2"), "value")]),
GlFunction(Void, "glUniform3fv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLfloat), "count*3"), "value")]),
GlFunction(Void, "glUniform4fv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLfloat), "count*4"), "value")]),
GlFunction(Void, "glUniform1iv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLint), "count"), "value")]),
GlFunction(Void, "glUniform2iv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLint), "count*2"), "value")]),
GlFunction(Void, "glUniform3iv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLint), "count*3"), "value")]),
GlFunction(Void, "glUniform4iv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLint), "count*4"), "value")]),
GlFunction(Void, "glUniformMatrix2fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*2*2"), "value")]),
GlFunction(Void, "glUniformMatrix3fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*3*3"), "value")]),
GlFunction(Void, "glUniformMatrix4fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*4*4"), "value")]),
GlFunction(Void, "glValidateProgram", [(GLprogram, "program")]),
GlFunction(Void, "glVertexAttrib1d", [(GLuint, "index"), (GLdouble, "x")]),
GlFunction(Void, "glVertexAttrib1dv", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
GlFunction(Void, "glVertexAttrib1f", [(GLuint, "index"), (GLfloat, "x")]),
GlFunction(Void, "glVertexAttrib1fv", [(GLuint, "index"), (Pointer(Const(GLfloat)), "v")]),
GlFunction(Void, "glVertexAttrib1s", [(GLuint, "index"), (GLshort, "x")]),
GlFunction(Void, "glVertexAttrib1sv", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
GlFunction(Void, "glVertexAttrib2d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
GlFunction(Void, "glVertexAttrib2dv", [(GLuint, "index"), (Array(Const(GLdouble), 2), "v")]),
GlFunction(Void, "glVertexAttrib2f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
GlFunction(Void, "glVertexAttrib2fv", [(GLuint, "index"), (Array(Const(GLfloat), 2), "v")]),
GlFunction(Void, "glVertexAttrib2s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
GlFunction(Void, "glVertexAttrib2sv", [(GLuint, "index"), (Array(Const(GLshort), 2), "v")]),
GlFunction(Void, "glVertexAttrib3d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glVertexAttrib3dv", [(GLuint, "index"), (Array(Const(GLdouble), 3), "v")]),
GlFunction(Void, "glVertexAttrib3f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
GlFunction(Void, "glVertexAttrib3fv", [(GLuint, "index"), (Array(Const(GLfloat), 3), "v")]),
GlFunction(Void, "glVertexAttrib3s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
GlFunction(Void, "glVertexAttrib3sv", [(GLuint, "index"), (Array(Const(GLshort), 3), "v")]),
GlFunction(Void, "glVertexAttrib4Nbv", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
GlFunction(Void, "glVertexAttrib4Niv", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glVertexAttrib4Nsv", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glVertexAttrib4Nub", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
GlFunction(Void, "glVertexAttrib4Nubv", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
GlFunction(Void, "glVertexAttrib4Nuiv", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
GlFunction(Void, "glVertexAttrib4Nusv", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
GlFunction(Void, "glVertexAttrib4bv", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
GlFunction(Void, "glVertexAttrib4d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
GlFunction(Void, "glVertexAttrib4dv", [(GLuint, "index"), (Array(Const(GLdouble), 4), "v")]),
GlFunction(Void, "glVertexAttrib4f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
GlFunction(Void, "glVertexAttrib4fv", [(GLuint, "index"), (Array(Const(GLfloat), 4), "v")]),
GlFunction(Void, "glVertexAttrib4iv", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glVertexAttrib4s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
GlFunction(Void, "glVertexAttrib4sv", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glVertexAttrib4ubv", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
GlFunction(Void, "glVertexAttrib4uiv", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
GlFunction(Void, "glVertexAttrib4usv", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
GlFunction(Void, "glVertexAttribPointer", [(GLuint, "index"), (size_bgra, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
# GL_VERSION_2_1
GlFunction(Void, "glUniformMatrix2x3fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*2*3"), "value")]),
GlFunction(Void, "glUniformMatrix3x2fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*3*2"), "value")]),
GlFunction(Void, "glUniformMatrix2x4fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*2*4"), "value")]),
GlFunction(Void, "glUniformMatrix4x2fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*4*2"), "value")]),
GlFunction(Void, "glUniformMatrix3x4fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*3*4"), "value")]),
GlFunction(Void, "glUniformMatrix4x3fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*4*3"), "value")]),
# GL_VERSION_3_0
GlFunction(Void, "glColorMaski", [(GLuint, "index"), (GLboolean, "r"), (GLboolean, "g"), (GLboolean, "b"), (GLboolean, "a")]),
GlFunction(Void, "glGetBooleani_v", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLboolean, "_gl_param_size(target)"), "data")], sideeffects=False),
GlFunction(Void, "glGetIntegeri_v", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLint, "_gl_param_size(target)"), "data")], sideeffects=False),
GlFunction(Void, "glEnablei", [(GLenum, "target"), (GLuint, "index")]),
GlFunction(Void, "glDisablei", [(GLenum, "target"), (GLuint, "index")]),
GlFunction(GLboolean, "glIsEnabledi", [(GLenum, "target"), (GLuint, "index")], sideeffects=False),
GlFunction(Void, "glBeginTransformFeedback", [(GLenum_mode, "primitiveMode")]),
GlFunction(Void, "glEndTransformFeedback", []),
GlFunction(Void, "glBindBufferRange", [(GLenum, "target"), (GLuint, "index"), (GLbuffer, "buffer"), (GLintptr, "offset"), (GLsizeiptr, "size")]),
GlFunction(Void, "glBindBufferBase", [(GLenum, "target"), (GLuint, "index"), (GLbuffer, "buffer")]),
GlFunction(Void, "glTransformFeedbackVaryings", [(GLprogram, "program"), (GLsizei, "count"), (Array(Const(GLstringConst), "count"), "varyings"), (GLenum, "bufferMode")]),
GlFunction(Void, "glGetTransformFeedbackVarying", [(GLprogram, "program"), (GLuint, "index"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(Pointer(GLsizei), "size"), Out(Pointer(GLenum), "type"), OutGlString(GLchar, "length", "name")], sideeffects=False),
GlFunction(Void, "glClampColor", [(GLenum, "target"), (GLenum, "clamp")]),
GlFunction(Void, "glBeginConditionalRender", [(GLquery, "id"), (GLenum, "mode")]),
GlFunction(Void, "glEndConditionalRender", []),
GlFunction(Void, "glVertexAttribIPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
GlFunction(Void, "glGetVertexAttribIiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetVertexAttribIuiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLuint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glVertexAttribI1i", [(GLuint, "index"), (GLint, "x")]),
GlFunction(Void, "glVertexAttribI2i", [(GLuint, "index"), (GLint, "x"), (GLint, "y")]),
GlFunction(Void, "glVertexAttribI3i", [(GLuint, "index"), (GLint, "x"), (GLint, "y"), (GLint, "z")]),
GlFunction(Void, "glVertexAttribI4i", [(GLuint, "index"), (GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
GlFunction(Void, "glVertexAttribI1ui", [(GLuint, "index"), (GLuint, "x")]),
GlFunction(Void, "glVertexAttribI2ui", [(GLuint, "index"), (GLuint, "x"), (GLuint, "y")]),
GlFunction(Void, "glVertexAttribI3ui", [(GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z")]),
GlFunction(Void, "glVertexAttribI4ui", [(GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z"), (GLuint, "w")]),
GlFunction(Void, "glVertexAttribI1iv", [(GLuint, "index"), (Pointer(Const(GLint)), "v")]),
GlFunction(Void, "glVertexAttribI2iv", [(GLuint, "index"), (Array(Const(GLint), 2), "v")]),
GlFunction(Void, "glVertexAttribI3iv", [(GLuint, "index"), (Array(Const(GLint), 3), "v")]),
GlFunction(Void, "glVertexAttribI4iv", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
GlFunction(Void, "glVertexAttribI1uiv", [(GLuint, "index"), (Pointer(Const(GLuint)), "v")]),
GlFunction(Void, "glVertexAttribI2uiv", [(GLuint, "index"), (Array(Const(GLuint), 2), "v")]),
GlFunction(Void, "glVertexAttribI3uiv", [(GLuint, "index"), (Array(Const(GLuint), 3), "v")]),
GlFunction(Void, "glVertexAttribI4uiv", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
GlFunction(Void, "glVertexAttribI4bv", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
GlFunction(Void, "glVertexAttribI4sv", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
GlFunction(Void, "glVertexAttribI4ubv", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
GlFunction(Void, "glVertexAttribI4usv", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
GlFunction(Void, "glGetUniformuiv", [(GLprogram, "program"), (GLlocation, "location"), Out(OpaqueArray(GLuint, "_glGetUniformuiv_size(program, location)"), "params")], sideeffects=False),
GlFunction(Void, "glBindFragDataLocation", [(GLprogram, "program"), (GLuint, "color"), (GLstringConst, "name")]),
GlFunction(GLlocation, "glGetFragDataLocation", [(GLprogram, "program"), (GLstringConst, "name")]),
GlFunction(Void, "glUniform1ui", [(GLlocation, "location"), (GLuint, "v0")]),
GlFunction(Void, "glUniform2ui", [(GLlocation, "location"), (GLuint, "v0"), (GLuint, "v1")]),
GlFunction(Void, "glUniform3ui", [(GLlocation, "location"), (GLuint, "v0"), (GLuint, "v1"), (GLuint, "v2")]),
GlFunction(Void, "glUniform4ui", [(GLlocation, "location"), (GLuint, "v0"), (GLuint, "v1"), (GLuint, "v2"), (GLuint, "v3")]),
GlFunction(Void, "glUniform1uiv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLuint), "count"), "value")]),
GlFunction(Void, "glUniform2uiv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLuint), "count*2"), "value")]),
GlFunction(Void, "glUniform3uiv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLuint), "count*3"), "value")]),
GlFunction(Void, "glUniform4uiv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLuint), "count*4"), "value")]),
GlFunction(Void, "glTexParameterIiv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glTexParameterIuiv", [(GLenum, "target"), (GLenum, "pname"), (Array(Const(GLuint), "_gl_param_size(pname)"), "params")]),
GlFunction(Void, "glGetTexParameterIiv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGetTexParameterIuiv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLuint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glClearBufferiv", [(GLenum, "buffer"), (GLint, "drawbuffer"), (Array(Const(GLint), "_glClearBuffer_size(buffer)"), "value")]),
GlFunction(Void, "glClearBufferuiv", [(GLenum, "buffer"), (GLint, "drawbuffer"), (Array(Const(GLuint), "_glClearBuffer_size(buffer)"), "value")]),
GlFunction(Void, "glClearBufferfv", [(GLenum, "buffer"), (GLint, "drawbuffer"), (Array(Const(GLfloat), "_glClearBuffer_size(buffer)"), "value")]),
GlFunction(Void, "glClearBufferfi", [(GLenum, "buffer"), (GLint, "drawbuffer"), (GLfloat, "depth"), (GLint, "stencil")]),
GlFunction(String(Const(GLubyte)), "glGetStringi", [(GLenum, "name"), (GLuint, "index")], sideeffects=False),
# GL_VERSION_3_1
GlFunction(Void, "glDrawArraysInstanced", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count"), (GLsizei, "primcount")]),
GlFunction(Void, "glDrawElementsInstanced", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices"), (GLsizei, "primcount")]),
GlFunction(Void, "glTexBuffer", [(GLenum, "target"), (GLenum, "internalformat"), (GLbuffer, "buffer")]),
GlFunction(Void, "glPrimitiveRestartIndex", [(GLuint, "index")]),
# GL_VERSION_3_2
GlFunction(Void, "glGetInteger64i_v", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLint64, "_gl_param_size(target)"), "data")], sideeffects=False),
GlFunction(Void, "glGetBufferParameteri64v", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint64, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glFramebufferTexture", [(GLenum, "target"), (GLenum, "attachment"), (GLtexture, "texture"), (GLint, "level")]),
# GL_VERSION_3_3
GlFunction(Void, "glVertexAttribDivisor", [(GLuint, "index"), (GLuint, "divisor")]),
# GL_VERSION_4_0
GlFunction(Void, "glMinSampleShading", [(GLfloat, "value")]),
GlFunction(Void, "glBlendEquationi", [(GLuint, "buf"), (GLenum, "mode")]),
GlFunction(Void, "glBlendEquationSeparatei", [(GLuint, "buf"), (GLenum, "modeRGB"), (GLenum, "modeAlpha")]),
GlFunction(Void, "glBlendFunci", [(GLuint, "buf"), (GLenum, "src"), (GLenum, "dst")]),
GlFunction(Void, "glBlendFuncSeparatei", [(GLuint, "buf"), (GLenum, "srcRGB"), (GLenum, "dstRGB"), (GLenum, "srcAlpha"), (GLenum, "dstAlpha")]),
# GL_3DFX_tbuffer
GlFunction(Void, "glTbufferMask3DFX", [(GLuint, "mask")]),
# GL_AMD_debug_output
GlFunction(Void, "glDebugMessageEnableAMD", [(GLenum, "category"), (GLenum, "severity"), (GLsizei, "count"), (Array(Const(GLuint), "count"), "ids"), (GLboolean, "enabled")], sideeffects=True),
GlFunction(Void, "glDebugMessageInsertAMD", [(GLenum, "category"), (GLenum, "severity"), (GLuint, "id"), (GLsizei, "length"), InGlString(GLchar, "length", "buf")], sideeffects=True),
GlFunction(Void, "glDebugMessageCallbackAMD", [(GLDEBUGPROCAMD, "callback"), (GLpointer, "userParam")], sideeffects=False),
GlFunction(GLuint, "glGetDebugMessageLogAMD", [(GLuint, "count"), (GLsizei, "bufsize"), Out(Array(GLenum, "count"), "categories"), Out(Array(GLuint, "count"), "severities"), Out(Array(GLuint, "count"), "ids"), Out(Array(GLsizei, "count"), "lengths"), Out(String(GLchar, "_glGetDebugMessageLog_length(message, lengths, _result)"), "message")], sideeffects=False, fail=0),
# GL_AMD_draw_buffers_blend
GlFunction(Void, "glBlendFuncIndexedAMD", [(GLuint, "buf"), (GLenum, "src"), (GLenum, "dst")]),
GlFunction(Void, "glBlendFuncSeparateIndexedAMD", [(GLuint, "buf"), (GLenum, "srcRGB"), (GLenum, "dstRGB"), (GLenum, "srcAlpha"), (GLenum, "dstAlpha")]),
GlFunction(Void, "glBlendEquationIndexedAMD", [(GLuint, "buf"), (GLenum, "mode")]),
GlFunction(Void, "glBlendEquationSeparateIndexedAMD", [(GLuint, "buf"), (GLenum, "modeRGB"), (GLenum, "modeAlpha")]),
# GL_AMD_multi_draw_indirect
GlFunction(Void, "glMultiDrawArraysIndirectAMD", [(GLenum_mode, "mode"), (GLpointerConst, "indirect"), (GLsizei, "primcount"), (GLsizei, "stride")]),
GlFunction(Void, "glMultiDrawElementsIndirectAMD", [(GLenum_mode, "mode"), (GLenum, "type"), (GLpointerConst, "indirect"), (GLsizei, "primcount"), (GLsizei, "stride")]),
# GL_AMD_name_gen_delete
GlFunction(Void, "glGenNamesAMD", [(GLenum, "identifier"), (GLuint, "num"), Out(Array(GLuint, "num"), "names")]),
GlFunction(Void, "glDeleteNamesAMD", [(GLenum, "identifier"), (GLuint, "num"), (Array(Const(GLuint), "num"), "names")]),
GlFunction(GLboolean, "glIsNameAMD", [(GLenum, "identifier"), (GLuint, "name")], sideeffects=False),
# GL_AMD_performance_monitor
GlFunction(Void, "glGetPerfMonitorGroupsAMD", [Out(Pointer(GLint), "numGroups"), (GLsizei, "groupsSize"), Out(Array(GLuint, "groupsSize"), "groups")], sideeffects=False),
GlFunction(Void, "glGetPerfMonitorCountersAMD", [(GLuint, "group"), Out(Pointer(GLint), "numCounters"), Out(Pointer(GLint), "maxActiveCounters"), (GLsizei, "counterSize"), Out(Array(GLuint, "counterSize"), "counters")], sideeffects=False),
GlFunction(Void, "glGetPerfMonitorGroupStringAMD", [(GLuint, "group"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), OutGlString(GLchar, "length", "groupString")], sideeffects=False),
GlFunction(Void, "glGetPerfMonitorCounterStringAMD", [(GLuint, "group"), (GLuint, "counter"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), OutGlString(GLchar, "length", "counterString")], sideeffects=False),
GlFunction(Void, "glGetPerfMonitorCounterInfoAMD", [(GLuint, "group"), (GLuint, "counter"), (GLenum, "pname"), Out(GLperfMonitorCounterInfoAMD, "data")], sideeffects=False),
GlFunction(Void, "glGenPerfMonitorsAMD", [(GLsizei, "n"), Out(Array(GLuint, "n"), "monitors")]),
GlFunction(Void, "glDeletePerfMonitorsAMD", [(GLsizei, "n"), (Array(GLuint, "n"), "monitors")]),
GlFunction(Void, "glSelectPerfMonitorCountersAMD", [(GLuint, "monitor"), (GLboolean, "enable"), (GLuint, "group"), (GLint, "numCounters"), (Array(GLuint, "numCounters"), "counterList")]),
GlFunction(Void, "glBeginPerfMonitorAMD", [(GLuint, "monitor")]),
GlFunction(Void, "glEndPerfMonitorAMD", [(GLuint, "monitor")]),
GlFunction(Void, "glGetPerfMonitorCounterDataAMD", [(GLuint, "monitor"), (GLenum, "pname"), (GLsizei, "dataSize"), Out(Array(GLuint, "dataSize"), "data"), Out(Pointer(GLint), "bytesWritten")], sideeffects=False),
# GL_AMD_sample_positions
GlFunction(Void, "glSetMultisamplefvAMD", [(GLenum, "pname"), (GLuint, "index"), (Array(Const(GLfloat), 2), "val")]),
# GL_AMD_sparse_texture
GlFunction(Void, "glTexStorageSparseAMD", [(GLenum, "target"), (GLenum, "internalFormat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLsizei, "layers"), (GLbitfield_texStorageSparse, "flags")]),
GlFunction(Void, "glTextureStorageSparseAMD", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "internalFormat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLsizei, "layers"), (GLbitfield_texStorageSparse, "flags")]),
# GL_AMD_stencil_operation_extended
GlFunction(Void, "glStencilOpValueAMD", [(GLenum, "face"), (GLuint, "value")]),
# GL_AMD_vertex_shader_tesselator
GlFunction(Void, "glTessellationFactorAMD", [(GLfloat, "factor")]),
GlFunction(Void, "glTessellationModeAMD", [(GLenum, "mode")]),
# GL_APPLE_element_array
GlFunction(Void, "glElementPointerAPPLE", [(GLenum, "type"), (Blob(Const(GLvoid), "type"), "pointer")]),
GlFunction(Void, "glDrawElementArrayAPPLE", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count")]),
GlFunction(Void, "glDrawRangeElementArrayAPPLE", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLint, "first"), (GLsizei, "count")]),
GlFunction(Void, "glMultiDrawElementArrayAPPLE", [(GLenum_mode, "mode"), (Array(Const(GLint), "primcount"), "first"), (Array(Const(GLsizei), "primcount"), "count"), (GLsizei, "primcount")]),
GlFunction(Void, "glMultiDrawRangeElementArrayAPPLE", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (Array(Const(GLint), "primcount"), "first"), (Array(Const(GLsizei), "primcount"), "count"), (GLsizei, "primcount")]),
# GL_APPLE_fence
GlFunction(Void, "glGenFencesAPPLE", [(GLsizei, "n"), Out(Array(GLfence, "n"), "fences")]),
GlFunction(Void, "glDeleteFencesAPPLE", [(GLsizei, "n"), (Array(Const(GLfence), "n"), "fences")]),
GlFunction(Void, "glSetFenceAPPLE", [(GLfence, "fence")]),
GlFunction(GLboolean, "glIsFenceAPPLE", [(GLfence, "fence")], sideeffects=False),
GlFunction(GLboolean, "glTestFenceAPPLE", [(GLfence, "fence")]),
GlFunction(Void, "glFinishFenceAPPLE", [(GLfence, "fence")]),
GlFunction(GLboolean, "glTestObjectAPPLE", [(GLenum, "object"), (GLuint, "name")]), # XXX: name needs swizzling
GlFunction(Void, "glFinishObjectAPPLE", [(GLenum, "object"), (GLint, "name")]), # XXX: name needs swizzling
# GL_APPLE_flush_buffer_range
GlFunction(Void, "glBufferParameteriAPPLE", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glFlushMappedBufferRangeAPPLE", [(GLenum, "target"), (GLintptr, "offset"), (GLsizeiptr, "size")]),
# GL_APPLE_flush_render
GlFunction(Void, "glFlushRenderAPPLE", []),
GlFunction(Void, "glFinishRenderAPPLE", []),
GlFunction(Void, "glSwapAPPLE", []),
# GL_APPLE_object_purgeable
GlFunction(GLenum, "glObjectPurgeableAPPLE", [(GLenum, "objectType"), (GLuint, "name"), (GLenum, "option")]),
GlFunction(GLenum, "glObjectUnpurgeableAPPLE", [(GLenum, "objectType"), (GLuint, "name"), (GLenum, "option")]),
GlFunction(Void, "glGetObjectParameterivAPPLE", [(GLenum, "objectType"), (GLuint, "name"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
# GL_APPLE_texture_range
GlFunction(Void, "glTextureRangeAPPLE", [(GLenum, "target"), (GLsizei, "length"), (Blob(Const(GLvoid), "length"), "pointer")]),
GlFunction(Void, "glGetTexParameterPointervAPPLE", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
# GL_APPLE_vertex_array_object
GlFunction(Void, "glBindVertexArrayAPPLE", [(GLarrayAPPLE, "array")]),
GlFunction(Void, "glDeleteVertexArraysAPPLE", [(GLsizei, "n"), (Array(Const(GLarrayAPPLE), "n"), "arrays")]),
GlFunction(Void, "glGenVertexArraysAPPLE", [(GLsizei, "n"), Out(Array(GLarrayAPPLE, "n"), "arrays")]),
GlFunction(GLboolean, "glIsVertexArrayAPPLE", [(GLarrayAPPLE, "array")], sideeffects=False),
# GL_APPLE_vertex_array_range
GlFunction(Void, "glVertexArrayRangeAPPLE", [(GLsizei, "length"), (GLpointer, "pointer")]),
GlFunction(Void, "glFlushVertexArrayRangeAPPLE", [(GLsizei, "length"), (GLpointer, "pointer")]),
GlFunction(Void, "glVertexArrayParameteriAPPLE", [(GLenum, "pname"), (GLint, "param")]),
# GL_APPLE_vertex_program_evaluators
GlFunction(Void, "glEnableVertexAttribAPPLE", [(GLuint, "index"), (GLenum, "pname")]),
GlFunction(Void, "glDisableVertexAttribAPPLE", [(GLuint, "index"), (GLenum, "pname")]),
GlFunction(GLboolean, "glIsVertexAttribEnabledAPPLE", [(GLuint, "index"), (GLenum, "pname")], sideeffects=False),
GlFunction(Void, "glMapVertexAttrib1dAPPLE", [(GLuint, "index"), (GLuint, "size"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "stride"), (GLint, "order"), (OpaqueArray(Const(GLdouble), "_glMapVertexAttrib1dAPPLE_size(size, stride, order)"), "points")]),
GlFunction(Void, "glMapVertexAttrib1fAPPLE", [(GLuint, "index"), (GLuint, "size"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "stride"), (GLint, "order"), (OpaqueArray(Const(GLfloat), "_glMapVertexAttrib1fAPPLE_size(size, stride, order)"), "points")]),
GlFunction(Void, "glMapVertexAttrib2dAPPLE", [(GLuint, "index"), (GLuint, "size"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLdouble, "v1"), (GLdouble, "v2"), (GLint, "vstride"), (GLint, "vorder"), (OpaqueArray(Const(GLdouble), "_glMapVertexAttrib2dAPPLE_size(size, ustride, uorder, vstride, vorder)"), "points")]),
GlFunction(Void, "glMapVertexAttrib2fAPPLE", [(GLuint, "index"), (GLuint, "size"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLfloat, "v1"), (GLfloat, "v2"), (GLint, "vstride"), (GLint, "vorder"), (OpaqueArray(Const(GLfloat), "_glMapVertexAttrib2fAPPLE_size(size, ustride, uorder, vstride, vorder)"), "points")]),
# GL_ARB_ES2_compatibility
GlFunction(Void, "glReleaseShaderCompiler", []),
GlFunction(Void, "glShaderBinary", [(GLsizei, "count"), (Array(Const(GLuint), "count"), "shaders"), (GLenum, "binaryformat"), (Blob(Const(GLvoid), "length"), "binary"), (GLsizei, "length")]),
GlFunction(Void, "glGetShaderPrecisionFormat", [(GLenum, "shadertype"), (GLenum, "precisiontype"), Out(Array(GLint, 2), "range"), Out(Array(GLint, 2), "precision")], sideeffects=False),
GlFunction(Void, "glDepthRangef", [(GLfloat, "n"), (GLfloat, "f")]),
GlFunction(Void, "glClearDepthf", [(GLfloat, "d")]),
# GL_ARB_base_instance
GlFunction(Void, "glDrawArraysInstancedBaseInstance", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count"), (GLsizei, "primcount"), (GLuint, "baseinstance")]),
GlFunction(Void, "glDrawElementsInstancedBaseInstance", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices"), (GLsizei, "primcount"), (GLuint, "baseinstance")]),
GlFunction(Void, "glDrawElementsInstancedBaseVertexBaseInstance", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices"), (GLsizei, "primcount"), (GLint, "basevertex"), (GLuint, "baseinstance")]),
# GL_ARB_bindless_texture
GlFunction(GLtextureHandle, "glGetTextureHandleARB", [(GLtexture, "texture")]),
GlFunction(GLtextureHandle, "glGetTextureSamplerHandleARB", [(GLtexture, "texture"), (GLsampler, "sampler")]),
GlFunction(Void, "glMakeTextureHandleResidentARB", [(GLtextureHandle, "handle")]),
GlFunction(Void, "glMakeTextureHandleNonResidentARB", [(GLtextureHandle, "handle")]),
GlFunction(GLtextureHandle, "glGetImageHandleARB", [(GLtexture, "texture"), (GLint, "level"), (GLboolean, "layered"), (GLint, "layer"), (GLenum, "format")]),
GlFunction(Void, "glMakeImageHandleResidentARB", [(GLtextureHandle, "handle"), (GLenum, "access")]),
GlFunction(Void, "glMakeImageHandleNonResidentARB", [(GLtextureHandle, "handle")]),
GlFunction(Void, "glUniformHandleui64ARB", [(GLlocation, "location"), (GLtextureHandle, "value")]),
GlFunction(Void, "glUniformHandleui64vARB", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLtextureHandle), "count"), "value")]),
GlFunction(Void, "glProgramUniformHandleui64ARB", [(GLprogram, "program"), (GLlocation, "location"), (GLtextureHandle, "value")]),
GlFunction(Void, "glProgramUniformHandleui64vARB", [(GLprogram, "program"), (GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLtextureHandle), "count"), "values")]),
GlFunction(GLboolean, "glIsTextureHandleResidentARB", [(GLtextureHandle, "handle")]),
GlFunction(GLboolean, "glIsImageHandleResidentARB", [(GLtextureHandle, "handle")]),
GlFunction(Void, "glVertexAttribL1ui64ARB", [(GLprogram, "index"), (GLuint64EXT, "x")]),
GlFunction(Void, "glVertexAttribL1ui64vARB", [(GLprogram, "index"), (Pointer(Const(GLuint64EXT)), "v")]),
GlFunction(Void, "glGetVertexAttribLui64vARB", [(GLprogram, "index"), (GLenum, "pname"), Out(Array(GLuint64EXT, "_gl_param_size(pname)"), "params")]),
# GL_ARB_blend_func_extended
GlFunction(Void, "glBindFragDataLocationIndexed", [(GLprogram, "program"), (GLuint, "colorNumber"), (GLuint, "index"), (GLstringConst, "name")]),
GlFunction(GLint, "glGetFragDataIndex", [(GLprogram, "program"), (GLstringConst, "name")], sideeffects=False),
# GL_ARB_buffer_storage
GlFunction(Void, "glBufferStorage", [ (GLenum, "target"), (GLsizeiptr, "size"), (Blob(Const(GLvoid), "size"), "data"), (GLbitfield_storage, "flags")]),
GlFunction(Void, "glNamedBufferStorageEXT", [ (GLbuffer, "buffer"), (GLsizeiptr, "size"), (Blob(Const(GLvoid), "size"), "data"), (GLbitfield_storage, "flags")]),
# GL_ARB_cl_event
#GlFunction(GLsync, "glCreateSyncFromCLeventARB", [(OpaquePointer("struct _cl_context"), "context"), (OpaquePointer("struct _cl_event"), "event"), (GLbitfield, "flags")]),
# GL_ARB_clear_buffer_object
GlFunction(Void, "glClearBufferData", [(GLenum, "target"), (GLenum, "internalformat"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(Void), "_glClearBufferData_size(format, type)"), "data")]),
GlFunction(Void, "glClearBufferSubData", [(GLenum, "target"), (GLenum, "internalformat"), (GLintptr, "offset"), (GLsizeiptr, "size"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(Void), "_glClearBufferData_size(format, type)"), "data")]),
GlFunction(Void, "glClearNamedBufferDataEXT", [(GLbuffer, "buffer"), (GLenum, "internalformat"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(Void), "_glClearBufferData_size(format, type)"), "data")]),
GlFunction(Void, "glClearNamedBufferSubDataEXT", [(GLbuffer, "buffer"), (GLenum, "internalformat"), (GLsizeiptr, "offset"), (GLsizeiptr, "size"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(Void), "_glClearBufferData_size(format, type)"), "data")]),
# GL_ARB_clear_texture
GlFunction(Void, "glClearTexImage", [ (GLtexture, "texture"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glClearBufferData_size(format, type)"), "data")]),
GlFunction(Void, "glClearTexSubImage", [ (GLtexture, "texture"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "_glClearBufferData_size(format, type)"), "data")]),
# GL_ARB_color_buffer_float
GlFunction(Void, "glClampColorARB", [(GLenum, "target"), (GLenum, "clamp")]),
# GL_ARB_compute_shader
GlFunction(Void, "glDispatchCompute", [(GLuint, "num_groups_x"), (GLuint, "num_groups_y"), (GLuint, "num_groups_z")]),
GlFunction(Void, "glDispatchComputeIndirect", [(GLintptr, "indirect")]),
# GL_ARB_compute_variable_group_size
GlFunction(Void, "glDispatchComputeGroupSizeARB", [(GLuint, "num_groups_x"), (GLuint, "num_groups_y"), (GLuint, "num_groups_z"), (GLuint, "group_size_x"), (GLuint, "group_size_y"), (GLuint, "group_size_z")]),
# GL_ARB_copy_buffer
GlFunction(Void, "glCopyBufferSubData", [(GLenum, "readTarget"), (GLenum, "writeTarget"), (GLintptr, "readOffset"), (GLintptr, "writeOffset"), (GLsizeiptr, "size")]),
# GL_ARB_copy_image
GlFunction(Void, "glCopyImageSubData", [(GLname("srcTarget"), "srcName"), (GLenum, "srcTarget"), (GLint, "srcLevel"), (GLint, "srcX"), (GLint, "srcY"), (GLint, "srcZ"), (GLname("dstTarget"), "dstName"), (GLenum, "dstTarget"), (GLint, "dstLevel"), (GLint, "dstX"), (GLint, "dstY"), (GLint, "dstZ"), (GLsizei, "srcWidth"), (GLsizei, "srcHeight"), (GLsizei, "srcDepth")]),
# GL_ARB_debug_output
GlFunction(Void, "glDebugMessageControlARB", [(GLenum, "source"), (GLenum, "type"), (GLenum, "severity"), (GLsizei, "count"), (Array(Const(GLuint), "count"), "ids"), (GLboolean, "enabled")], sideeffects=True),
GlFunction(Void, "glDebugMessageInsertARB", [(GLenum, "source"), (GLenum, "type"), (GLuint, "id"), (GLenum, "severity"), (GLsizei, "length"), InGlString(GLchar, "length", "buf")], sideeffects=True),
GlFunction(Void, "glDebugMessageCallbackARB", [(GLDEBUGPROCARB, "callback"), (GLpointerConst, "userParam")], sideeffects=False),
GlFunction(GLuint, "glGetDebugMessageLogARB", [(GLuint, "count"), (GLsizei, "bufsize"), Out(Array(GLenum, "count"), "sources"), Out(Array(GLenum, "count"), "types"), Out(Array(GLuint, "count"), "ids"), Out(Array(GLenum, "count"), "severities"), Out(Array(GLsizei, "count"), "lengths"), Out(String(GLchar, "_glGetDebugMessageLog_length(messageLog, lengths, _result)"), "messageLog")], sideeffects=False, fail=0),
# GL_ARB_draw_buffers
GlFunction(Void, "glDrawBuffersARB", [(GLsizei, "n"), (Array(Const(GLenum), "n"), "bufs")]),
# GL_ARB_draw_buffers_blend
GlFunction(Void, "glBlendEquationiARB", [(GLuint, "buf"), (GLenum, "mode")]),
GlFunction(Void, "glBlendEquationSeparateiARB", [(GLuint, "buf"), (GLenum, "modeRGB"), (GLenum, "modeAlpha")]),
GlFunction(Void, "glBlendFunciARB", [(GLuint, "buf"), (GLenum, "src"), (GLenum, "dst")]),
GlFunction(Void, "glBlendFuncSeparateiARB", [(GLuint, "buf"), (GLenum, "srcRGB"), (GLenum, "dstRGB"), (GLenum, "srcAlpha"), (GLenum, "dstAlpha")]),
# GL_ARB_draw_elements_base_vertex
GlFunction(Void, "glDrawElementsBaseVertex", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices"), (GLint, "basevertex")]),
GlFunction(Void, "glDrawRangeElementsBaseVertex", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices"), (GLint, "basevertex")]),
GlFunction(Void, "glDrawElementsInstancedBaseVertex", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices"), (GLsizei, "primcount"), (GLint, "basevertex")]),
GlFunction(Void, "glMultiDrawElementsBaseVertex", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "drawcount"), "count"), (GLenum, "type"), (Array(Const(GLindexBuffer("count[{i}]", "type")), "drawcount"), "indices"), (GLsizei, "drawcount"), (Array(Const(GLint), "drawcount"), "basevertex")]),
# GL_ARB_draw_indirect
GlFunction(Void, "glDrawArraysIndirect", [(GLenum_mode, "mode"), (GLpointerConst, "indirect")]),
GlFunction(Void, "glDrawElementsIndirect", [(GLenum_mode, "mode"), (GLenum, "type"), (GLpointerConst, "indirect")]),
# GL_ARB_draw_instanced
GlFunction(Void, "glDrawArraysInstancedARB", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count"), (GLsizei, "primcount")]),
GlFunction(Void, "glDrawElementsInstancedARB", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLindexBuffer("count", "type"), "indices"), (GLsizei, "primcount")]),
# GL_ARB_framebuffer_no_attachments
GlFunction(Void, "glFramebufferParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glGetFramebufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glNamedFramebufferParameteriEXT", [(GLframebuffer, "framebuffer"), (GLenum, "pname"), (GLint, "param")]),
GlFunction(Void, "glGetNamedFramebufferParameterivEXT", [(GLframebuffer, "framebuffer"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
# GL_ARB_framebuffer_object
GlFunction(GLboolean, "glIsRenderbuffer", [(GLrenderbuffer, "renderbuffer")], sideeffects=False),
GlFunction(Void, "glBindRenderbuffer", [(GLenum, "target"), (GLrenderbuffer, "renderbuffer")]),
GlFunction(Void, "glDeleteRenderbuffers", [(GLsizei, "n"), (Array(Const(GLrenderbuffer), "n"), "renderbuffers")]),
GlFunction(Void, "glGenRenderbuffers", [(GLsizei, "n"), Out(Array(GLrenderbuffer, "n"), "renderbuffers")]),
GlFunction(Void, "glRenderbufferStorage", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
GlFunction(Void, "glGetRenderbufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(GLboolean, "glIsFramebuffer", [(GLframebuffer, "framebuffer")], sideeffects=False),
GlFunction(Void, "glBindFramebuffer", [(GLenum, "target"), (GLframebuffer, "framebuffer")]),
GlFunction(Void, "glDeleteFramebuffers", [(GLsizei, "n"), (Array(Const(GLframebuffer), "n"), "framebuffers")]),
GlFunction(Void, "glGenFramebuffers", [(GLsizei, "n"), Out(Array(GLframebuffer, "n"), "framebuffers")]),
GlFunction(GLenum, "glCheckFramebufferStatus", [(GLenum, "target")]),
GlFunction(Void, "glFramebufferTexture1D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level")]),
GlFunction(Void, "glFramebufferTexture2D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level")]),
GlFunction(Void, "glFramebufferTexture3D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level"), (GLint, "zoffset")]),
GlFunction(Void, "glFramebufferRenderbuffer", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "renderbuffertarget"), (GLrenderbuffer, "renderbuffer")]),
GlFunction(Void, "glGetFramebufferAttachmentParameteriv", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), Out(Array(GLint, "_gl_param_size(pname)"), "params")], sideeffects=False),
GlFunction(Void, "glGenerateMipmap", [(GLenum, "target")]),
GlFunction(Void, "glBlitFramebuffer", [(GLint, "srcX0"), (GLint, "srcY0"), (GLint, "srcX1"), (GLint, "srcY1"), (GLint, "dstX0"), (GLint, "dstY0"), (GLint, "dstX1"), (GLint, "dstY1"), (GLbitfield_attrib, "mask"), (GLenum, "filter")]),
GlFunction(Void, "glRenderbufferStorageMultisample", [(GLenum, "target"), (GLsizei, "samples"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
GlFunction(Void, "glFramebufferTextureLayer", [(GLenum, "target"), (GLenum, "attachment"), (GLtexture, "texture"), (GLint, "level"), (GLint, "layer")]),
# GL_ARB_geometry_shader4
GlFunction(Void, "glProgramParameteriARB", [(GLprogram, "program"), (GLenum, "pname"), (GLint, "value")]),
GlFunction(Void, "glFramebufferTextureARB", [(GLenum, "target"), (GLenum, "attachment"), (GLtexture, "texture"), (GLint, "level")]),
GlFunction(Void, "glFramebufferTextureLayerARB", [(GLenum, "target"), (GLenum, "attachment"), (GLtexture, "texture"), (GLint, "level"), (GLint, "layer")]),
GlFunction(Void, "glFramebufferTextureFaceARB", [(GLenum, "target"), (GLenum, "attachment"), (GLtexture, "texture"), (GLint, "level"), (GLenum, "face")]),
# GL_ARB_get_program_binary
GlFunction(Void, "glGetProgramBinary", [(GLprogram, "program"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(Pointer(GLenum), "binaryFormat"), Out(OpaqueArray(GLvoid, "_glGetProgramBinary_size(length)"), "binary")], sideeffects=False),
GlFunction(Void, "glProgramBinary", [(GLprogram, "program"), (GLenum, "binaryFormat"), (Blob(Const(GLvoid), "length"), "binary"), (GLsizei, "length")]),
GlFunction(Void, "glProgramParameteri", [(GLprogram, "program"), (GLenum, "pname"), (GLint, "value")]),
# GL_ARB_gpu_shader_fp64
GlFunction(Void, "glUniform1d", [(GLlocation, "location"), (GLdouble, "x")]),
GlFunction(Void, "glUniform2d", [(GLlocation, "location"), (GLdouble, "x"), (GLdouble, "y")]),
GlFunction(Void, "glUniform3d", [(GLlocation, "location"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
GlFunction(Void, "glUniform4d", [(GLlocation, "location"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
GlFunction(Void, "glUniform1dv", [(GLlocation, "location"), (GLsizei, "count"), (Array(Const(GLdouble), "count"), "value")]),