-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgl.Version_4_1.cs
1504 lines (1307 loc) · 67.1 KB
/
gl.Version_4_1.cs
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
#region Copyright and License
// Copyright (c) 2013-2014 The Khronos Group Inc.
// Copyright (c) of C# port 2014 by Shinta <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are 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 Materials.
//
// THE MATERIALS ARE 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
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#endregion
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace OpenGL.Core
{
using Delegates;
namespace Delegates
{
/// <summary>
/// Releases resources consumed by the shader compiler.
/// </summary>
public delegate void glReleaseShaderCompiler();
/// <summary>
/// Loads pre-compiled shader binaries.
/// </summary>
/// <param name="count">Number of shader objects.</param>
/// <param name="shaders">Array of <paramref name="count"/> shader objects.</param>
/// <param name="binaryFormat">The format of the binary.</param>
/// <param name="binary">The data block containing the pre-compiled shader(s).</param>
/// <param name="length">The size of <paramref name="binary"/> in bytes.</param>
public delegate void glShaderBinary(int count, uint[] shaders, int binaryFormat, byte[] binary, int length);
/// <summary>
/// Returns the range and precision for numeric formats supported by the shader compiler.
/// </summary>
/// <param name="shadertype">A <see cref="glShaderType"/> specifying the type of the shader.</param>
/// <param name="precisiontype">A <see cref="glShaderPrecisionType"/> specifying the precision type.</param>
/// <param name="range">Returns the requested range.</param>
/// <param name="precision">Returns the requested precision.</param>
public delegate void glGetShaderPrecisionFormat(glShaderType shadertype, glShaderPrecisionType precisiontype, int[] range, out int precision);
/// <summary>
/// Sets the depth range.
/// </summary>
/// <param name="zNear">The near value.</param>
/// <param name="zFar">The far value.</param>
public delegate void glDepthRangef(float zNear, float zFar);
/// <summary>
/// Sets the depth value for clear operations on depth buffers.
/// </summary>
/// <param name="depth">Depth value.</param>
public delegate void glClearDepthf(float depth);
/// <summary>
/// Returns the compiled binary of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="bufSize">The size of the buffer used to retrieve <paramref name="binary"/>.</param>
/// <param name="length">Returns the actual length of the result in <paramref name="binary"/>.</param>
/// <param name="binaryFormat">Returns the format of the binary.</param>
/// <param name="binary">Returns the binary of the program.</param>
public delegate void glGetProgramBinary(uint program, int bufSize, out int length, out int binaryFormat, byte[] binary);
/// <summary>
/// Loads pre-compiled program binary.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="binaryFormat">The format of the binary.</param>
/// <param name="binary">The data block containing the pre-compiled program.</param>
/// <param name="length">The size of <paramref name="binary"/> in bytes.</param>
public delegate void glProgramBinary(uint program, int binaryFormat, byte[] binary, int length);
/// <summary>
/// Sets parameters of program objects.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="pname">A <see cref="glProgramParameter"/> specifying the parameter.</param>
/// <param name="value">The value to set.</param>
public delegate void glProgramParameteri(uint program, glProgramParameter pname, int value);
/// <summary>
/// Binds stages of a program object to a program pipeline.
/// </summary>
/// <param name="pipeline">The name of the program pipeline.</param>
/// <param name="stages">A mask of <see cref="glProgramStageMask"/>s specifying the program stages to be bound.</param>
/// <param name="program">The name of the program.</param>
public delegate void glUseProgramStages(uint pipeline, glProgramStageMask stages, uint program);
/// <summary>
/// Sets the active program object for a program pipline object.
/// </summary>
/// <param name="pipeline">The name of the program pipeline.</param>
/// <param name="program">The name of the program.</param>
public delegate void glActiveShaderProgram(uint pipeline, uint program);
/// <summary>
/// Creates a program from an array of source code strings.
/// </summary>
/// <param name="type">A <see cref="glShaderType"/> specifying the type of the shader.</param>
/// <param name="count">The number of source code strings in <paramref name="strings"/>.</param>
/// <param name="strings">The source code strings.</param>
/// <returns>The name of the program.</returns>
public delegate uint glCreateShaderProgramv(glShaderType type, int count, string[] strings);
/// <summary>
/// Binds a program pipeline to the current context.
/// </summary>
/// <param name="pipeline">The name of the pipeline.</param>
public delegate void glBindProgramPipeline(uint pipeline);
/// <summary>
/// Releases <paramref name="count"/> many pipeline names.
/// </summary>
/// <param name="count">Number of pipeline names to be released.</param>
/// <param name="pipelines">Array of pipeline names to be released.</param>
public delegate void glDeleteProgramPipelines(int count, params uint[] pipelines);
internal delegate void glGenProgramPipeline(int one, out uint pipeline);
internal delegate void glGenProgramPipelines(int count, uint[] pipelines);
/// <summary>
/// Determines if a name is a pipeline name.
/// </summary>
/// <param name="pipeline">The maybe pipeline name.</param>
/// <returns><b>true</b> if <paramref name="pipeline"/> is a pipeline name.</returns>
[return: MarshalAs(UnmanagedType.I1)]
public delegate bool glIsProgramPipeline(uint pipeline);
/// <summary>
/// Returns the value of a program pipeline parameter.
/// </summary>
/// <param name="pipeline">The name pf the pipeline.</param>
/// <param name="pname">A <see cref="glProgramPipelineParameter"/> specifying the parameter.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetProgramPipelinei(uint pipeline, glProgramPipelineParameter pname, out int param);
/// <summary>
/// Returns the value(s) of a program pipeline parameter.
/// </summary>
/// <param name="pipeline">The name pf the pipeline.</param>
/// <param name="pname">A <see cref="glProgramPipelineParameter"/> specifying the parameter.</param>
/// <param name="params">The requested value(s).</param>
public delegate void glGetProgramPipelineiv(uint pipeline, glProgramPipelineParameter pname, int[] @params);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">The value to set.</param>
public delegate void glProgramUniform1i(uint program, int location, int v0);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform1iv(uint program, int location, int count, params int[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">The value to set.</param>
public delegate void glProgramUniform1f(uint program, int location, float v0);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform1fv(uint program, int location, int count, params float[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">The value to set.</param>
public delegate void glProgramUniform1d(uint program, int location, double v0);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform1dv(uint program, int location, int count, params double[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">The value to set.</param>
public delegate void glProgramUniform1ui(uint program, int location, uint v0);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform1uiv(uint program, int location, int count, params uint[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
public delegate void glProgramUniform2i(uint program, int location, int v0, int v1);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform2iv(uint program, int location, int count, params int[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
public delegate void glProgramUniform2f(uint program, int location, float v0, float v1);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform2fv(uint program, int location, int count, params float[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
public delegate void glProgramUniform2d(uint program, int location, double v0, double v1);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform2dv(uint program, int location, int count, params double[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
public delegate void glProgramUniform2ui(uint program, int location, uint v0, uint v1);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform2uiv(uint program, int location, int count, params uint[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
public delegate void glProgramUniform3i(uint program, int location, int v0, int v1, int v2);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform3iv(uint program, int location, int count, params int[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
public delegate void glProgramUniform3f(uint program, int location, float v0, float v1, float v2);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform3fv(uint program, int location, int count, params float[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
public delegate void glProgramUniform3d(uint program, int location, double v0, double v1, double v2);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform3dv(uint program, int location, int count, params double[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
public delegate void glProgramUniform3ui(uint program, int location, uint v0, uint v1, uint v2);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform3uiv(uint program, int location, int count, params uint[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
/// <param name="v3">Fourth value of a tuple to set.</param>
public delegate void glProgramUniform4i(uint program, int location, int v0, int v1, int v2, int v3);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform4iv(uint program, int location, int count, params int[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
/// <param name="v3">Fourth value of a tuple to set.</param>
public delegate void glProgramUniform4f(uint program, int location, float v0, float v1, float v2, float v3);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform4fv(uint program, int location, int count, params float[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
/// <param name="v3">Fourth value of a tuple to set.</param>
public delegate void glProgramUniform4d(uint program, int location, double v0, double v1, double v2, double v3);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform4dv(uint program, int location, int count, params double[] value);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="v0">First value of a tuple to set.</param>
/// <param name="v1">Second value of a tuple to set.</param>
/// <param name="v2">Third value of a tuple to set.</param>
/// <param name="v3">Fourth value of a tuple to set.</param>
public delegate void glProgramUniform4ui(uint program, int location, uint v0, uint v1, uint v2, uint v3);
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">The number of values to be set. (>1 if uniform is an array)</param>
/// <param name="value">The value(s) to set.</param>
public delegate void glProgramUniform4uiv(uint program, int location, int count, params uint[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix2fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix3fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix4fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix2dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix3dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix4dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix2x3fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix3x2fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix2x4fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix4x2fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix3x4fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix4x3fv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params float[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix2x3dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix3x2dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix2x4dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix4x2dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix3x4dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Sets a uniform matrix value of a program.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="location">The location of the uniform.</param>
/// <param name="count">Number of matrices to be loaded. (>1 if uniform is array of matrices)</param>
/// <param name="transpose">Set <b>true</b> if the matrix is to be transposed.</param>
/// <param name="value">The values of the matrix.</param>
public delegate void glProgramUniformMatrix4x3dv(uint program, int location, int count, [MarshalAs(UnmanagedType.I1)] bool transpose, params double[] value);
/// <summary>
/// Validates a program pipeline against current GL state.
/// </summary>
/// <param name="pipeline">The name of the pipeline.</param>
public delegate void glValidateProgramPipeline(uint pipeline);
internal delegate void glGetProgramPipelineInfoLog(uint pipeline, int bufSize, out int length, StringBuilder infoLog);
/// <summary>
/// Sets the value of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="x">The value to set.</param>
public delegate void glVertexAttribL1d(uint index, double x);
/// <summary>
/// Sets the values of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="x">First value to set.</param>
/// <param name="y">Second value to set.</param>
public delegate void glVertexAttribL2d(uint index, double x, double y);
/// <summary>
/// Sets the values of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="x">First value to set.</param>
/// <param name="y">Second value to set.</param>
/// <param name="z">Third value to set.</param>
public delegate void glVertexAttribL3d(uint index, double x, double y, double z);
/// <summary>
/// Sets the values of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="x">First value to set.</param>
/// <param name="y">Second value to set.</param>
/// <param name="z">Third value to set.</param>
/// <param name="w">Fourth value to set.</param>
public delegate void glVertexAttribL4d(uint index, double x, double y, double z, double w);
/// <summary>
/// Sets the value of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="v">The value to set.</param>
public delegate void glVertexAttribL1dv(uint index, double[] v);
/// <summary>
/// Sets the values of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="v">The values to set.</param>
public delegate void glVertexAttribL2dv(uint index, double[] v);
/// <summary>
/// Sets the values of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="v">The values to set.</param>
public delegate void glVertexAttribL3dv(uint index, double[] v);
/// <summary>
/// Sets the values of a vertex attribute.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="v">The values to set.</param>
public delegate void glVertexAttribL4dv(uint index, double[] v);
internal delegate void glVertexAttribLPointer_32(uint index, int size, glVertexAttribType type, int stride, int pointer);
internal delegate void glVertexAttribLPointer_64(uint index, int size, glVertexAttribType type, int stride, long pointer);
/// <summary>
/// Returns parameters of vertex attributes.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="pname">A <see cref="glVertexAttribParameter"/> specifying the parameter.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetVertexAttribLd(uint index, glVertexAttribParameter pname, out double param);
/// <summary>
/// Returns parameters of vertex attributes.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="pname">A <see cref="glVertexAttribParameter"/> specifying the parameter.</param>
/// <param name="params">The requested value(s).</param>
public delegate void glGetVertexAttribLdv(uint index, glVertexAttribParameter pname, double[] @params);
/// <summary>
/// Sets multiple viewports at once.
/// </summary>
/// <param name="first">Number of the first viewport.</param>
/// <param name="count">Number of viewport to set.</param>
/// <param name="v">The parameter of the viewports.</param>
public delegate void glViewportArrayv(uint first, int count, params float[] v);
/// <summary>
/// Sets the parameter of an indexed viewport.
/// </summary>
/// <param name="index">The index of the viewport.</param>
/// <param name="x">The start position in x-direction.</param>
/// <param name="y">The start position in y-direction.</param>
/// <param name="width">The width of the viewport.</param>
/// <param name="height">The height of the viewport.</param>
public delegate void glViewportIndexedf(uint index, float x, float y, float width, float height);
/// <summary>
/// Sets the parameter of an indexed viewport.
/// </summary>
/// <param name="index">The index of the viewport.</param>
/// <param name="v">Array with the parameters.</param>
public delegate void glViewportIndexedfv(uint index, float[] v);
/// <summary>
/// Sets the scissor rectangle for multiple viewports at once.
/// </summary>
/// <param name="first">Number of the first viewport.</param>
/// <param name="count">Number of scissor rectangles to set.</param>
/// <param name="v">The parameter of the scissor rectangles.</param>
public delegate void glScissorArrayv(uint first, int count, params int[] v);
/// <summary>
/// Sets the scissor rectangle for an indexed viewport.
/// </summary>
/// <param name="index">The index of the viewport.</param>
/// <param name="left">Left start position of rectangle.</param>
/// <param name="bottom">Bottom start position of rectangle.</param>
/// <param name="width">Width of rectangle.</param>
/// <param name="height">Height of rectangle.</param>
public delegate void glScissorIndexed(uint index, int left, int bottom, int width, int height);
/// <summary>
/// Sets the scissor rectangle for an indexed viewport.
/// </summary>
/// <param name="index">The index of the viewport.</param>
/// <param name="v">Array with the parameters.</param>
public delegate void glScissorIndexedv(uint index, int[] v);
/// <summary>
/// Sets the depth range for multiple viewports at once.
/// </summary>
/// <param name="first">Number of the first viewport.</param>
/// <param name="count">Number of depth ranges to set.</param>
/// <param name="v">The parameter of the depth ranges.</param>
public delegate void glDepthRangeArrayv(uint first, int count, params double[] v);
/// <summary>
/// Sets the depth range for an indexed viewport.
/// </summary>
/// <param name="index">The index of the viewport.</param>
/// <param name="zNear">The near value.</param>
/// <param name="zFar">The far value.</param>
public delegate void glDepthRangeIndexed(uint index, double zNear, double zFar);
/// <summary>
/// Returns the value of a indexed parameter.
/// </summary>
/// <param name="pname">A <see cref="glGetFloatIndexedParameter"/> specifying the parameter.</param>
/// <param name="index">The index.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetFloati_(glGetFloatIndexedParameter pname, uint index, out float param);
/// <summary>
/// Returns the value(s) of a indexed parameter.
/// </summary>
/// <param name="pname">A <see cref="glGetFloatIndexedParameter"/> specifying the parameter.</param>
/// <param name="index">The index.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetFloati_v(glGetFloatIndexedParameter pname, uint index, float[] @params);
/// <summary>
/// Returns the value of a indexed parameter.
/// </summary>
/// <param name="pname">A <see cref="glGetFloatIndexedParameter"/> specifying the parameter.</param>
/// <param name="index">The index.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetDoublei_(glGetFloatIndexedParameter pname, uint index, out double param);
/// <summary>
/// Returns the value(s) of a indexed parameter.
/// </summary>
/// <param name="pname">A <see cref="glGetFloatIndexedParameter"/> specifying the parameter.</param>
/// <param name="index">The index.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetDoublei_v(glGetFloatIndexedParameter pname, uint index, double[] @params);
}
public static partial class gl
{
/// <summary>
/// Indicates if OpenGL version 4.1 is available.
/// </summary>
public static bool VERSION_4_1;
#region Delegates
/// <summary>
/// Releases resources consumed by the shader compiler.
/// </summary>
public static glReleaseShaderCompiler ReleaseShaderCompiler;
/// <summary>
/// Loads pre-compiled shader binaries.
/// </summary>
public static glShaderBinary ShaderBinary;
/// <summary>
/// Returns the range and precision for numeric formats supported by the shader compiler.
/// </summary>
public static glGetShaderPrecisionFormat GetShaderPrecisionFormat;
/// <summary>
/// Sets the depth range.
/// </summary>
public static glDepthRangef DepthRangef;
/// <summary>
/// Sets the depth value for clear operations on depth buffers.
/// </summary>
public static glClearDepthf ClearDepthf;
/// <summary>
/// Returns the compiled binary of a program.
/// </summary>
public static glGetProgramBinary GetProgramBinary;
/// <summary>
/// Loads pre-compiled program binary.
/// </summary>
public static glProgramBinary ProgramBinary;
/// <summary>
/// Sets parameters of program objects.
/// </summary>
public static glProgramParameteri ProgramParameteri;
/// <summary>
/// Binds stages of a program object to a program pipeline.
/// </summary>
public static glUseProgramStages UseProgramStages;
/// <summary>
/// Sets the active program object for a program pipline object.
/// </summary>
public static glActiveShaderProgram ActiveShaderProgram;
/// <summary>
/// Creates a program from an array of source code strings.
/// </summary>
public static glCreateShaderProgramv CreateShaderProgramv;
/// <summary>
/// Binds a program pipeline to the current context.
/// </summary>
public static glBindProgramPipeline BindProgramPipeline;
/// <summary>
/// Releases multiple pipeline names at once.
/// </summary>
public static glDeleteProgramPipelines DeleteProgramPipelines;
private static glGenProgramPipeline _GenProgramPipeline;
private static glGenProgramPipelines _GenProgramPipelines;
/// <summary>
/// Determines if a name is a pipeline name.
/// </summary>
public static glIsProgramPipeline IsProgramPipeline;
/// <summary>
/// Returns the value of a program pipeline parameter.
/// </summary>
public static glGetProgramPipelinei GetProgramPipelinei;
/// <summary>
/// Returns the value(s) of a program pipeline parameter.
/// </summary>
public static glGetProgramPipelineiv GetProgramPipelineiv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1i ProgramUniform1i;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1iv ProgramUniform1iv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1f ProgramUniform1f;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1fv ProgramUniform1fv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1d ProgramUniform1d;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1dv ProgramUniform1dv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1ui ProgramUniform1ui;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform1uiv ProgramUniform1uiv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2i ProgramUniform2i;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2iv ProgramUniform2iv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2f ProgramUniform2f;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2fv ProgramUniform2fv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2d ProgramUniform2d;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2dv ProgramUniform2dv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2ui ProgramUniform2ui;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>
public static glProgramUniform2uiv ProgramUniform2uiv;
/// <summary>
/// Sets a uniform value of a program.
/// </summary>