-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgl.Version_3_3.cs
680 lines (593 loc) · 30.1 KB
/
gl.Version_3_3.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
#region Copyright and License
// Copyright (c) 2013-2014 The Khronos Group Inc.
// Copyright (c) of C# port 2014 by Shinta <shintadono@googlemail.com>
//
// 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.Runtime.InteropServices;
namespace OpenGL.Core
{
using Delegates;
namespace Delegates
{
/// <summary>
/// Binds a varying output variable to a fragment shader color number and index.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="colorNumber">The color number to bind the varying output variable to.</param>
/// <param name="index">The index of the color input to bind the varying output variable to.</param>
/// <param name="name">The name of the varing output variable.</param>
public delegate void glBindFragDataLocationIndexed(uint program, uint colorNumber, uint index, string name);
/// <summary>
/// Returns the color indices of varying output variables.
/// </summary>
/// <param name="program">The name of the program.</param>
/// <param name="name">The name of the varing output variable.</param>
/// <returns>The color index.</returns>
public delegate int glGetFragDataIndex(uint program, string name);
internal delegate void glGenSampler(int one, out uint sampler);
internal delegate void glGenSamplers(int count, uint[] samplers);
/// <summary>
/// Releases <paramref name="count"/> many sampler names.
/// </summary>
/// <param name="count">Number of sampler names to be released.</param>
/// <param name="samplers">Array of sampler names to be released.</param>
public delegate void glDeleteSamplers(int count, params uint[] samplers);
/// <summary>
/// Determines if a name is a sampler name.
/// </summary>
/// <param name="sampler">The maybe sampler name.</param>
/// <returns><b>true</b> if <paramref name="sampler"/> is a sampler name.</returns>
[return: MarshalAs(UnmanagedType.I1)]
public delegate bool glIsSampler(uint sampler);
/// <summary>
/// Binds a sampler to a texturing unit.
/// </summary>
/// <param name="unit">The texture unit.</param>
/// <param name="sampler">The name of the sampler.</param>
public delegate void glBindSampler(uint unit, uint sampler);
internal delegate void glSamplerParameteri(uint sampler, glTextureParameter pname, int param);
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="params">The value the parameter is set to.</param>
public delegate void glSamplerParameteriv(uint sampler, glTextureParameter pname, int[] @params);
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="param">The value the parameter is set to.</param>
public delegate void glSamplerParameterf(uint sampler, glTextureParameter pname, float param);
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="params">The value the parameter is set to.</param>
public delegate void glSamplerParameterfv(uint sampler, glTextureParameter pname, float[] @params);
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="params">The value the parameter is set to.</param>
public delegate void glSamplerParameterIiv(uint sampler, glTextureParameter pname, params int[] @params);
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="params">The value the parameter is set to.</param>
public delegate void glSamplerParameterIuiv(uint sampler, glTextureParameter pname, params uint[] @params);
internal delegate void glGetSamplerParameteri(uint sampler, glTextureParameter pname, out int param);
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetSamplerParameteriv(uint sampler, glTextureParameter pname, int[] @params);
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetSamplerParameterIi(uint sampler, glTextureParameter pname, out int param);
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetSamplerParameterIiv(uint sampler, glTextureParameter pname, int[] @params);
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetSamplerParameterf(uint sampler, glTextureParameter pname, out float param);
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetSamplerParameterfv(uint sampler, glTextureParameter pname, float[] @params);
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetSamplerParameterIui(uint sampler, glTextureParameter pname, out uint param);
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetSamplerParameterIuiv(uint sampler, glTextureParameter pname, uint[] @params);
/// <summary>
/// Records the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed.
/// </summary>
/// <param name="id">The name of the query object into which to record.</param>
/// <param name="target">Must by <see cref="glQueryTarget.TIMESTAMP"/></param>
public delegate void glQueryCounter(uint id, glQueryTarget target);
/// <summary>
/// Returns the value of parameters of query objects.
/// </summary>
/// <param name="id">The name of the query object.</param>
/// <param name="pname">A <see cref="glQueryObjectParameter"/> specifying the parameter.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetQueryObjecti64(uint id, glQueryObjectParameter pname, out long param);
/// <summary>
/// Returns the value(s) of parameters of query objects.
/// </summary>
/// <param name="id">The name of the query object.</param>
/// <param name="pname">A <see cref="glQueryObjectParameter"/> specifying the parameter.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetQueryObjecti64v(uint id, glQueryObjectParameter pname, long[] @params);
/// <summary>
/// Returns the value of parameters of query objects.
/// </summary>
/// <param name="id">The name of the query object.</param>
/// <param name="pname">A <see cref="glQueryObjectParameter"/> specifying the parameter.</param>
/// <param name="param">Returns the requested value.</param>
public delegate void glGetQueryObjectui64(uint id, glQueryObjectParameter pname, out ulong param);
/// <summary>
/// Returns the value(s) of parameters of query objects.
/// </summary>
/// <param name="id">The name of the query object.</param>
/// <param name="pname">A <see cref="glQueryObjectParameter"/> specifying the parameter.</param>
/// <param name="params">Returns the requested value(s).</param>
public delegate void glGetQueryObjectui64v(uint id, glQueryObjectParameter pname, ulong[] @params);
/// <summary>
/// Sets the rate at which vertex attributes advance during instanced rendering.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="divisor">The number of instances that will pass between updates.</param>
public delegate void glVertexAttribDivisor(uint index, uint divisor);
/// <summary>
/// Sets the value of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed value.</param>
/// <param name="normalized">Set <b>true</b> if the value are to be normalized on conversion to floating-point.</param>
/// <param name="value">The value to set.</param>
public delegate void glVertexAttribP1ui(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint value);
/// <summary>
/// Sets the value of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed value.</param>
/// <param name="normalized">Set <b>true</b> if the value are to be normalized on conversion to floating-point.</param>
/// <param name="value">The value to set.</param>
public delegate void glVertexAttribP1uiv(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint[] value);
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed values.</param>
/// <param name="normalized">Set <b>true</b> if the values are to be normalized on conversion to floating-point.</param>
/// <param name="value">The values to set.</param>
public delegate void glVertexAttribP2ui(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint value);
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed values.</param>
/// <param name="normalized">Set <b>true</b> if the values are to be normalized on conversion to floating-point.</param>
/// <param name="value">The values to set.</param>
public delegate void glVertexAttribP2uiv(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint[] value);
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed values.</param>
/// <param name="normalized">Set <b>true</b> if the values are to be normalized on conversion to floating-point.</param>
/// <param name="value">The values to set.</param>
public delegate void glVertexAttribP3ui(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint value);
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed values.</param>
/// <param name="normalized">Set <b>true</b> if the values are to be normalized on conversion to floating-point.</param>
/// <param name="value">The values to set.</param>
public delegate void glVertexAttribP3uiv(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint[] value);
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed values.</param>
/// <param name="normalized">Set <b>true</b> if the values are to be normalized on conversion to floating-point.</param>
/// <param name="value">The values to set.</param>
public delegate void glVertexAttribP4ui(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint value);
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
/// <param name="index">The index of the vertex attribute.</param>
/// <param name="type">A <see cref="glVertexAttribType"/> specifying the data type of the packed values.</param>
/// <param name="normalized">Set <b>true</b> if the values are to be normalized on conversion to floating-point.</param>
/// <param name="value">The values to set.</param>
public delegate void glVertexAttribP4uiv(uint index, glVertexAttribType type, [MarshalAs(UnmanagedType.I1)] bool normalized, uint[] value);
}
public static partial class gl
{
/// <summary>
/// Indicates if OpenGL version 3.3 is available.
/// </summary>
public static bool VERSION_3_3;
#region Delegates
/// <summary>
/// Binds a varying output variable to a fragment shader color number and index.
/// </summary>
public static glBindFragDataLocationIndexed BindFragDataLocationIndexed;
/// <summary>
/// Returns the color indices of varying output variables.
/// </summary>
public static glGetFragDataIndex GetFragDataIndex;
private static glGenSampler _GenSampler;
private static glGenSamplers _GenSamplers;
/// <summary>
/// Releases multiple sampler names at once.
/// </summary>
public static glDeleteSamplers DeleteSamplers;
/// <summary>
/// Determines if a name is a sampler name.
/// </summary>
public static glIsSampler IsSampler;
/// <summary>
/// Binds a sampler to a texturing unit.
/// </summary>
public static glBindSampler BindSampler;
private static glSamplerParameteri _SamplerParameteri;
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
public static glSamplerParameteriv SamplerParameteriv;
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
public static glSamplerParameterf SamplerParameterf;
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
public static glSamplerParameterfv SamplerParameterfv;
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
public static glSamplerParameterIiv SamplerParameterIiv;
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
public static glSamplerParameterIuiv SamplerParameterIuiv;
private static glGetSamplerParameteri _GetSamplerParameteri;
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
public static glGetSamplerParameteriv GetSamplerParameteriv;
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
public static glGetSamplerParameterIi GetSamplerParameterIi;
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
public static glGetSamplerParameterIiv GetSamplerParameterIiv;
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
public static glGetSamplerParameterf GetSamplerParameterf;
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
public static glGetSamplerParameterfv GetSamplerParameterfv;
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
public static glGetSamplerParameterIui GetSamplerParameterIui;
/// <summary>
/// Returns the value(s) of a texture parameter of a sampler.
/// </summary>
public static glGetSamplerParameterIuiv GetSamplerParameterIuiv;
/// <summary>
/// Records the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed.
/// </summary>
public static glQueryCounter QueryCounter;
/// <summary>
/// Returns the value of parameters of query objects.
/// </summary>
public static glGetQueryObjecti64 GetQueryObjecti64;
/// <summary>
/// Returns the value(s) of parameters of query objects.
/// </summary>
public static glGetQueryObjecti64v GetQueryObjecti64v;
/// <summary>
/// Returns the value of parameters of query objects.
/// </summary>
public static glGetQueryObjectui64 GetQueryObjectui64;
/// <summary>
/// Returns the value(s) of parameters of query objects.
/// </summary>
public static glGetQueryObjectui64v GetQueryObjectui64v;
/// <summary>
/// Sets the rate at which vertex attributes advance during instanced rendering.
/// </summary>
public static glVertexAttribDivisor VertexAttribDivisor;
/// <summary>
/// Sets the value of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP1ui VertexAttribP1ui;
/// <summary>
/// Sets the value of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP1uiv VertexAttribP1uiv;
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP2ui VertexAttribP2ui;
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP2uiv VertexAttribP2uiv;
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP3ui VertexAttribP3ui;
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP3uiv VertexAttribP3uiv;
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP4ui VertexAttribP4ui;
/// <summary>
/// Sets the values of a vertex attribute in packed form.
/// </summary>
public static glVertexAttribP4uiv VertexAttribP4uiv;
#endregion
#region Overloads
#region GenSampler(s)
/// <summary>
/// Generates one sampler name and returns it.
/// </summary>
/// <returns>The new sampler name.</returns>
public static uint GenSampler()
{
uint ret;
_GenSampler(1, out ret);
return ret;
}
/// <summary>
/// Generates one sampler name and returns it.
/// </summary>
/// <param name="sampler">The new sampler name.</param>
public static void GenSampler(out uint sampler)
{
_GenSampler(1, out sampler);
}
/// <summary>
/// Generates <paramref name="count"/> many sampler names and returns them as array.
/// </summary>
/// <param name="count">The number of sampler names to be generated.</param>
/// <returns>The new sampler names as array.</returns>
public static uint[] GenSamplers(int count)
{
uint[] ret = new uint[count];
_GenSamplers(count, ret);
return ret;
}
/// <summary>
/// Generates <paramref name="count"/> many sampler names.
/// </summary>
/// <param name="count">The number of sampler names to be generated.</param>
/// <param name="samplers">The array that will receive the new sampler names.</param>
public static void GenSamplers(int count, uint[] samplers)
{
_GenSamplers(count, samplers);
}
#endregion
#region GetSamplerParameteri
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="param">Returns the requested value.</param>
public static void GetSamplerParameteri(uint sampler, glTextureParameter pname, out int param)
{
_GetSamplerParameteri(sampler, pname, out param);
}
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="param">Returns the requested value.</param>
public static void GetSamplerParameteri(uint sampler, glTextureParameter pname, out glFilter param)
{
int p;
_GetSamplerParameteri(sampler, pname, out p);
param = (glFilter)p;
}
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> specifying the texture parameter.</param>
/// <param name="param">Returns the requested value.</param>
public static void GetSamplerParameteri(uint sampler, glTextureParameter pname, out glTextureWrapMode param)
{
int p;
_GetSamplerParameteri(sampler, pname, out p);
param = (glTextureWrapMode)p;
}
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">Must be <see cref="glTextureParameter.TEXTURE_COMPARE_MODE"/>.</param>
/// <param name="param">Returns the requested value.</param>
public static void GetSamplerParameteri(uint sampler, glTextureParameter pname, out glTextureCompareMode param)
{
int p;
_GetSamplerParameteri(sampler, pname, out p);
param = (glTextureCompareMode)p;
}
/// <summary>
/// Returns the value of a texture parameter of a sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">Must be <see cref="glTextureParameter.TEXTURE_COMPARE_FUNC"/>.</param>
/// <param name="param">Returns the requested value.</param>
public static void GetSamplerParameteri(uint sampler, glTextureParameter pname, out glFunc param)
{
int p;
_GetSamplerParameteri(sampler, pname, out p);
param = (glFunc)p;
}
#endregion
#region SamplerParameteri
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="param">The value the parameter is set to.</param>
public static void SamplerParameteri(uint sampler, glTextureParameter pname, int param)
{
_SamplerParameteri(sampler, pname, param);
}
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="param">The value the parameter is set to.</param>
public static void SamplerParameteri(uint sampler, glTextureParameter pname, glFilter param)
{
_SamplerParameteri(sampler, pname, (int)param);
}
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">A <see cref="glTextureParameter"/> selecting the parameter to be set.</param>
/// <param name="param">The value the parameter is set to.</param>
public static void SamplerParameteri(uint sampler, glTextureParameter pname, glTextureWrapMode param)
{
_SamplerParameteri(sampler, pname, (int)param);
}
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">Must be <see cref="glTextureParameter.TEXTURE_COMPARE_MODE"/>.</param>
/// <param name="param">The value the parameter is set to.</param>
public static void SamplerParameteri(uint sampler, glTextureParameter pname, glTextureCompareMode param)
{
_SamplerParameteri(sampler, pname, (int)param);
}
/// <summary>
/// Sets texture parameter for the sampler.
/// </summary>
/// <param name="sampler">The name of the sampler.</param>
/// <param name="pname">Must be <see cref="glTextureParameter.TEXTURE_COMPARE_FUNC"/>.</param>
/// <param name="param">The value the parameter is set to.</param>
public static void SamplerParameteri(uint sampler, glTextureParameter pname, glFunc param)
{
_SamplerParameteri(sampler, pname, (int)param);
}
#endregion
#endregion
private static void Load_VERSION_3_3()
{
BindFragDataLocationIndexed = GetAddress<glBindFragDataLocationIndexed>("glBindFragDataLocationIndexed");
GetFragDataIndex = GetAddress<glGetFragDataIndex>("glGetFragDataIndex");
_GenSampler = GetAddress<glGenSampler>("glGenSamplers");
_GenSamplers = GetAddress<glGenSamplers>("glGenSamplers");
DeleteSamplers = GetAddress<glDeleteSamplers>("glDeleteSamplers");
IsSampler = GetAddress<glIsSampler>("glIsSampler");
BindSampler = GetAddress<glBindSampler>("glBindSampler");
_SamplerParameteri = GetAddress<glSamplerParameteri>("glSamplerParameteri");
SamplerParameteriv = GetAddress<glSamplerParameteriv>("glSamplerParameteriv");
SamplerParameterf = GetAddress<glSamplerParameterf>("glSamplerParameterf");
SamplerParameterfv = GetAddress<glSamplerParameterfv>("glSamplerParameterfv");
SamplerParameterIiv = GetAddress<glSamplerParameterIiv>("glSamplerParameterIiv");
SamplerParameterIuiv = GetAddress<glSamplerParameterIuiv>("glSamplerParameterIuiv");
_GetSamplerParameteri = GetAddress<glGetSamplerParameteri>("glGetSamplerParameteriv");
GetSamplerParameteriv = GetAddress<glGetSamplerParameteriv>("glGetSamplerParameteriv");
GetSamplerParameterIi = GetAddress<glGetSamplerParameterIi>("glGetSamplerParameterIiv");
GetSamplerParameterIiv = GetAddress<glGetSamplerParameterIiv>("glGetSamplerParameterIiv");
GetSamplerParameterf = GetAddress<glGetSamplerParameterf>("glGetSamplerParameterfv");
GetSamplerParameterfv = GetAddress<glGetSamplerParameterfv>("glGetSamplerParameterfv");
GetSamplerParameterIui = GetAddress<glGetSamplerParameterIui>("glGetSamplerParameterIuiv");
GetSamplerParameterIuiv = GetAddress<glGetSamplerParameterIuiv>("glGetSamplerParameterIuiv");
QueryCounter = GetAddress<glQueryCounter>("glQueryCounter");
GetQueryObjecti64 = GetAddress<glGetQueryObjecti64>("glGetQueryObjecti64v");
GetQueryObjecti64v = GetAddress<glGetQueryObjecti64v>("glGetQueryObjecti64v");
GetQueryObjectui64 = GetAddress<glGetQueryObjectui64>("glGetQueryObjectui64v");
GetQueryObjectui64v = GetAddress<glGetQueryObjectui64v>("glGetQueryObjectui64v");
VertexAttribDivisor = GetAddress<glVertexAttribDivisor>("glVertexAttribDivisor");
VertexAttribP1ui = GetAddress<glVertexAttribP1ui>("glVertexAttribP1ui");
VertexAttribP1uiv = GetAddress<glVertexAttribP1uiv>("glVertexAttribP1uiv");
VertexAttribP2ui = GetAddress<glVertexAttribP2ui>("glVertexAttribP2ui");
VertexAttribP2uiv = GetAddress<glVertexAttribP2uiv>("glVertexAttribP2uiv");
VertexAttribP3ui = GetAddress<glVertexAttribP3ui>("glVertexAttribP3ui");
VertexAttribP3uiv = GetAddress<glVertexAttribP3uiv>("glVertexAttribP3uiv");
VertexAttribP4ui = GetAddress<glVertexAttribP4ui>("glVertexAttribP4ui");
VertexAttribP4uiv = GetAddress<glVertexAttribP4uiv>("glVertexAttribP4uiv");
VERSION_3_3 = VERSION_3_2 && BindFragDataLocationIndexed != null && GetFragDataIndex != null && _GenSamplers != null &&
DeleteSamplers != null && IsSampler != null && BindSampler != null && _SamplerParameteri != null &&
SamplerParameteriv != null && SamplerParameterf != null && SamplerParameterfv != null && SamplerParameterIiv != null &&
SamplerParameterIuiv != null && GetSamplerParameteriv != null && GetSamplerParameterIiv != null &&
GetSamplerParameterfv != null && GetSamplerParameterIuiv != null && QueryCounter != null &&
GetQueryObjecti64v != null && GetQueryObjectui64v != null && VertexAttribDivisor != null && VertexAttribP1uiv != null &&
VertexAttribP2uiv != null && VertexAttribP3uiv != null && VertexAttribP4uiv != null;
}
}
}