-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenGL.pas
8655 lines (8254 loc) · 393 KB
/
OpenGL.pas
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
unit OpenGL;
interface
// generell options
{$H+,O+,X+}
{$DEFINE DGL_WIN}
uses
Windows;
const
OpenGL32='OpenGL32.dll';
type
GLenum = Cardinal;
GLboolean = BYTEBOOL;
GLbitfield = Cardinal;
GLbyte = Shortint;
GLshort = SmallInt;
GLint = Integer;
GLsizei = Integer;
GLubyte = Byte;
GLushort = Word;
GLuint = Cardinal;
GLfloat = Single;
GLclampf = Single;
GLdouble = Double;
GLclampd = Double;
GLvoid = Pointer;
GLint64 = Int64;
GLuint64 = UInt64;
TGLenum = GLenum;
TGLboolean = GLboolean;
TGLbitfield = GLbitfield;
TGLbyte = GLbyte;
TGLshort = GLshort;
TGLint = GLint;
TGLsizei = GLsizei;
TGLubyte = GLubyte;
TGLushort = GLushort;
TGLuint = GLuint;
TGLfloat = GLfloat;
TGLclampf = GLclampf;
TGLdouble = GLdouble;
TGLclampd = GLclampd;
TGLvoid = GLvoid;
TGLint64 = GLint64;
TGLuint64 = GLuint64;
PGLboolean = ^GLboolean;
PGLbyte = ^GLbyte;
PGLshort = ^GLshort;
PGLint = ^GLint;
PGLsizei = ^GLsizei;
PGLubyte = ^GLubyte;
PGLushort = ^GLushort;
PGLuint = ^GLuint;
PGLclampf = ^GLclampf;
PGLfloat = ^GLfloat;
PGLdouble = ^GLdouble;
PGLclampd = ^GLclampd;
PGLenum = ^GLenum;
PGLvoid = Pointer;
PPGLvoid = ^PGLvoid;
PGLint64 = ^GLint64;
PGLuint64 = ^GLuint64;
// GL_NV_half_float
GLhalfNV = WORD;
TGLhalfNV = GLhalfNV;
PGLhalfNV = ^GLhalfNV;
// GL_ARB_shader_objects
PGLHandleARB = ^GLHandleARB;
GLHandleARB = Integer;
GLcharARB = AnsiChar;
PGLcharARB = PAnsiChar;
PPGLcharARB = ^PGLcharARB;
// GL_VERSION_1_5
GLintptr = GLint;
PGLintptr = ^GLintptr;
GLsizeiptr = GLsizei;
// GL_ARB_vertex_buffer_object
GLintptrARB = GLint;
GLsizeiptrARB = GLsizei;
// GL_VERSION_2_0
GLHandle = Integer;
PGLchar = PAnsiChar;
PPGLchar = ^PGLChar;
// GL_EXT_timer_query
GLint64EXT = Int64;
TGLint64EXT = GLint64EXT;
PGLint64EXT = ^GLint64EXT;
GLuint64EXT = GLuint64;
TGLuint64EXT = GLuint64EXT;
PGLuint64EXT = ^GLuint64EXT;
// WGL_ARB_pbuffer
HPBUFFERARB = THandle;
// WGL_EXT_pbuffer
HPBUFFEREXT = THandle;
// WGL_NV_present_video
PHVIDEOOUTPUTDEVICENV = ^HVIDEOOUTPUTDEVICENV;
HVIDEOOUTPUTDEVICENV = THandle;
// WGL_NV_video_output
PHPVIDEODEV = ^HPVIDEODEV;
HPVIDEODEV = THandle;
// WGL_NV_gpu_affinity
PHPGPUNV = ^HPGPUNV;
PHGPUNV = ^HGPUNV;
// WGL_NV_video_capture
HVIDEOINPUTDEVICENV = THandle;
PHVIDEOINPUTDEVICENV = ^HVIDEOINPUTDEVICENV;
HPGPUNV = THandle;
HGPUNV = THandle;
// GL_ARB_sync
GLsync = Pointer;
// GL_ARB_cl_event
{ These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event }
_cl_context = record end;
_cl_event = record end;
p_cl_context = ^_cl_context;
p_cl_event = ^_cl_event;
// GL_ARB_compute_variable_group_size
TglDispatchComputeGroupSizeARB = procedure (num_groups_x : GLuint; num_groups_y : GLuint; num_groups_z : GLuint; group_size_x : GLuint; group_size_y : GLuint; group_size_z : GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
// GL_ARB_debug_output
TglDebugProcARB = procedure (source: GLenum; type_: GLenum; id: GLuint; severity: GLenum; length: GLsizei; const message_: PGLchar; userParam: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
// GL_AMD_debug_output
TglDebugProcAMD = procedure (id: GLuint; category: GLenum; severity: GLenum; length: GLsizei; const message_: PGLchar; userParam: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
// GL_KHR_debug (4.3)
TglDebugProc = procedure(source : GLEnum; type_ : GLEnum; id : GLUInt; severity : GLUInt; length : GLsizei; const message_ : PGLCHar; userParam : PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
// GL_NV_vdpau_interop
GLvdpauSurfaceNV = GLintptr;
PGLvdpauSurfaceNV = ^GLvdpauSurfaceNV;
// Datatypes corresponding to GL's types TGL(name)(type)(count)
TGLVectorub2 = array[0..1] of GLubyte;
TGLVectori2 = array[0..1] of GLint;
TGLVectorf2 = array[0..1] of GLfloat;
TGLVectord2 = array[0..1] of GLdouble;
TGLVectorp2 = array[0..1] of Pointer;
TGLVectorub3 = array[0..2] of GLubyte;
TGLVectori3 = array[0..2] of GLint;
TGLVectorf3 = array[0..2] of GLfloat;
TGLVectord3 = array[0..2] of GLdouble;
TGLVectorp3 = array[0..2] of Pointer;
TGLVectorub4 = array[0..3] of GLubyte;
TGLVectori4 = array[0..3] of GLint;
TGLVectorf4 = array[0..3] of GLfloat;
TGLVectord4 = array[0..3] of GLdouble;
TGLVectorp4 = array[0..3] of Pointer;
TGLArrayf4 = TGLVectorf4;
TGLArrayf3 = TGLVectorf3;
TGLArrayd3 = TGLVectord3;
TGLArrayi4 = TGLVectori4;
TGLArrayp4 = TGLVectorp4;
TGlMatrixub3 = array[0..2, 0..2] of GLubyte;
TGlMatrixi3 = array[0..2, 0..2] of GLint;
TGLMatrixf3 = array[0..2, 0..2] of GLfloat;
TGLMatrixd3 = array[0..2, 0..2] of GLdouble;
TGlMatrixub4 = array[0..3, 0..3] of GLubyte;
TGlMatrixi4 = array[0..3, 0..3] of GLint;
TGLMatrixf4 = array[0..3, 0..3] of GLfloat;
TGLMatrixd4 = array[0..3, 0..3] of GLdouble;
TGLVector3f = TGLVectorf3;
// Datatypes corresponding to OpenGL12.pas for easy porting
TVector3f = TGLVectorf3;
TVector3d = TGLVectord3;
TVector4i = TGLVectori4;
TVector4f = TGLVectorf4;
TVector4p = TGLVectorp4;
TMatrix4f = TGLMatrixf4;
TMatrix4d = TGLMatrixd4;
PGLMatrixd4 = ^TGLMatrixd4;
PVector4i = ^TVector4i;
{$IFDEF FPC}
TRect = packed record
Left, Top, Right, Bottom: Longint;
end;
{$ENDIF}
PGPU_DEVICE = ^GPU_DEVICE;
GPU_DEVICE = record
cb: DWORD;
DeviceName: array [0..31] of AnsiChar;
DeviceString: array [0..127] of AnsiChar;
Flags: DWORD;
rcVirtualScreen: TRect;
end;
type
{$IFDEF FPC}
{$IFDEF DGL_WIN}
PWGLSwap = ^TWGLSwap;
{$EXTERNALSYM _WGLSWAP}
_WGLSWAP = packed record
hdc: HDC;
uiFlags: UINT;
end;
TWGLSwap = _WGLSWAP;
{$EXTERNALSYM WGLSWAP}
WGLSWAP = _WGLSWAP;
{$ENDIF}
{$ENDIF}
// GLU types
TGLUNurbs = record
end;
TGLUQuadric = record
end;
TGLUTesselator = record
end;
PGLUNurbs = ^TGLUNurbs;
PGLUQuadric = ^TGLUQuadric;
PGLUTesselator = ^TGLUTesselator;
// backwards compatibility
TGLUNurbsObj = TGLUNurbs;
TGLUQuadricObj = TGLUQuadric;
TGLUTesselatorObj = TGLUTesselator;
TGLUTriangulatorObj = TGLUTesselator;
PGLUNurbsObj = PGLUNurbs;
PGLUQuadricObj = PGLUQuadric;
PGLUTesselatorObj = PGLUTesselator;
PGLUTriangulatorObj = PGLUTesselator;
// GLUQuadricCallback
TGLUQuadricErrorProc = procedure(errorCode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
// GLUTessCallback
TGLUTessBeginProc = procedure(AType: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessEdgeFlagProc = procedure(Flag: GLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessVertexProc = procedure(VertexData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessEndProc = procedure; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessErrorProc = procedure(ErrNo: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessCombineProc = procedure(Coords: TGLArrayd3; VertexData: TGLArrayp4; Weight: TGLArrayf4; OutData: PPointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessBeginDataProc = procedure(AType: GLenum; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessEdgeFlagDataProc = procedure(Flag: GLboolean; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessVertexDataProc = procedure(VertexData: Pointer; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessEndDataProc = procedure(UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessErrorDataProc = procedure(ErrNo: GLenum; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
TGLUTessCombineDataProc = procedure(Coords: TGLArrayd3; VertexData: TGLArrayp4; Weight: TGLArrayf4; OutData: PPointer; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
// GLUNurbsCallback
TGLUNurbsErrorProc = procedure(ErrorCode: GLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}
//WIGGLE
function wglGetProcAddress(ProcName: PAnsiChar): Pointer; stdcall;external OPenGL32;
function wglCopyContext(p1: HGLRC; p2: HGLRC; p3: Cardinal): BOOL; stdcall;external OPenGL32;
function wglCreateContext(DC: HDC): HGLRC; stdcall;external OPenGL32;
function wglCreateLayerContext(p1: HDC; p2: Integer): HGLRC; stdcall;external OPenGL32;
function wglDeleteContext(p1: HGLRC): BOOL; stdcall;external OPenGL32;
function wglDescribeLayerPlane(p1: HDC; p2, p3: Integer; p4: Cardinal; p5: PLayerPlaneDescriptor): BOOL; stdcall;external OPenGL32;
function wglGetCurrentContext: HGLRC; stdcall;external OPenGL32;
function wglGetCurrentDC: HDC; stdcall;external OPenGL32;
function wglGetLayerPaletteEntries(p1: HDC; p2, p3, p4: Integer; var pcr): Integer; stdcall;external OPenGL32;
function wglMakeCurrent(DC: HDC; p2: HGLRC): BOOL; stdcall;external OPenGL32;
function wglRealizeLayerPalette(p1: HDC; p2: Integer; p3: BOOL): BOOL; stdcall;external OPenGL32;
function wglSetLayerPaletteEntries(p1: HDC; p2, p3, p4: Integer; var pcr): Integer; stdcall;external OPenGL32;
function wglShareLists(p1, p2: HGLRC): BOOL; stdcall;external OPenGL32;
function wglSwapLayerBuffers(p1: HDC; p2: Cardinal): BOOL; stdcall;external OPenGL32;
function wglSwapMultipleBuffers(p1: UINT; const p2: PWGLSWAP): DWORD; stdcall;external OPenGL32;
function wglUseFontBitmapsA(DC: HDC; p2, p3, p4: DWORD): BOOL; stdcall;external OPenGL32;
function wglUseFontBitmapsW(DC: HDC; p2, p3, p4: DWORD): BOOL; stdcall;external OPenGL32;
function wglUseFontBitmaps(DC: HDC; p2, p3, p4: DWORD): BOOL; stdcall;external OPenGL32;
function wglUseFontOutlinesA(p1: HDC; p2, p3, p4: DWORD; p5, p6: Single; p7: Integer; p8: PGlyphMetricsFloat): BOOL; stdcall;external OPenGL32;
function wglUseFontOutlinesW(p1: HDC; p2, p3, p4: DWORD; p5, p6: Single; p7: Integer; p8: PGlyphMetricsFloat): BOOL; stdcall;external OPenGL32;
function wglUseFontOutlines(p1: HDC; p2, p3, p4: DWORD; p5, p6: Single; p7: Integer; p8: PGlyphMetricsFloat): BOOL; stdcall;external OPenGL32;
//DEPRECATED
procedure glAccum(op: GLenum; value: GLfloat);stdcall;external OPenGL32;
procedure glAlphaFunc(func: GLenum; ref: GLclampf);stdcall; external OPenGL32;
function glAreTexturesResident(n: GLsizei; const textures: PGLuint; residences: PGLboolean): GLboolean;stdcall; external OPenGL32;
procedure glArrayElement(i: GLint);stdcall; external OPenGL32;
procedure glBegin(mode: GLenum);stdcall; external OPenGL32;
procedure glBitmap(width: GLsizei; height: GLsizei; xorig: GLfloat; yorig: GLfloat; xmove: GLfloat; ymove: GLfloat; const bitmap: PGLubyte);stdcall; external OPenGL32;
procedure glCallList(list: GLuint);stdcall; external OPenGL32;
procedure glCallLists(n: GLsizei; _type: GLenum; const lists: PGLvoid);stdcall; external OPenGL32;
procedure glClearAccum(red: GLfloat; green: GLfloat; blue: GLfloat; alpha: GLfloat);stdcall; external OPenGL32;
procedure glClearIndex(c: GLfloat);stdcall; external OPenGL32;
procedure glClipPlane(plane: GLenum; const equation: PGLdouble);stdcall; external OPenGL32;
procedure glColor3b(red: GLbyte; green: GLbyte; blue: GLbyte);stdcall; external OPenGL32;
procedure glColor3bv(const v: PGLbyte);stdcall; external OPenGL32;
procedure glColor3d(red: GLdouble; green: GLdouble; blue: GLdouble);stdcall; external OPenGL32;
procedure glColor3dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glColor3f(red: GLfloat; green: GLfloat; blue: GLfloat);stdcall; external OPenGL32;
procedure glColor3fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glColor3i(red: GLint; green: GLint; blue: GLint);stdcall; external OPenGL32;
procedure glColor3iv(const v: PGLint);stdcall; external OPenGL32;
procedure glColor3s(red: GLshort; green: GLshort; blue: GLshort);stdcall; external OPenGL32;
procedure glColor3sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glColor3ub(red: GLubyte; green: GLubyte; blue: GLubyte);stdcall; external OPenGL32;
procedure glColor3ubv(const v: PGLubyte);stdcall; external OPenGL32;
procedure glColor3ui(red: GLuint; green: GLuint; blue: GLuint);stdcall; external OPenGL32;
procedure glColor3uiv(const v: PGLuint);stdcall; external OPenGL32;
procedure glColor3us(red: GLushort; green: GLushort; blue: GLushort);stdcall; external OPenGL32;
procedure glColor3usv(const v: PGLushort);stdcall; external OPenGL32;
procedure glColor4b(red: GLbyte; green: GLbyte; blue: GLbyte; alpha: GLbyte);stdcall; external OPenGL32;
procedure glColor4bv(const v: PGLbyte);stdcall; external OPenGL32;
procedure glColor4d(red: GLdouble; green: GLdouble; blue: GLdouble; alpha: GLdouble);stdcall; external OPenGL32;
procedure glColor4dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glColor4f(red: GLfloat; green: GLfloat; blue: GLfloat; alpha: GLfloat);stdcall; external OPenGL32;
procedure glColor4fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glColor4i(red: GLint; green: GLint; blue: GLint; alpha: GLint);stdcall; external OPenGL32;
procedure glColor4iv(const v: PGLint);stdcall; external OPenGL32;
procedure glColor4s(red: GLshort; green: GLshort; blue: GLshort; alpha: GLshort);stdcall; external OPenGL32;
procedure glColor4sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glColor4ub(red: GLubyte; green: GLubyte; blue: GLubyte; alpha: GLubyte);stdcall; external OPenGL32;
procedure glColor4ubv(const v: PGLubyte);stdcall; external OPenGL32;
procedure glColor4ui(red: GLuint; green: GLuint; blue: GLuint; alpha: GLuint);stdcall; external OPenGL32;
procedure glColor4uiv(const v: PGLuint);stdcall; external OPenGL32;
procedure glColor4us(red: GLushort; green: GLushort; blue: GLushort; alpha: GLushort);stdcall; external OPenGL32;
procedure glColor4usv(const v: PGLushort);stdcall; external OPenGL32;
procedure glColorMaterial(face: GLenum; mode: GLenum);stdcall; external OPenGL32;
procedure glColorPointer(size: GLint; _type: GLenum; stride: GLsizei; const _pointer: PGLvoid);stdcall; external OPenGL32;
procedure glCopyPixels(x: GLint; y: GLint; width: GLsizei; height: GLsizei; _type: GLenum);stdcall; external OPenGL32;
procedure glDeleteLists(list: GLuint; range: GLsizei);stdcall; external OPenGL32;
procedure glDisableClientState(_array: GLenum);stdcall; external OPenGL32;
procedure glDrawPixels(width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid);stdcall; external OPenGL32;
procedure glEdgeFlag(flag: GLboolean);stdcall; external OPenGL32;
procedure glEdgeFlagPointer(stride: GLsizei; const _pointer: PGLvoid);stdcall; external OPenGL32;
procedure glEdgeFlagv(const flag: PGLboolean);stdcall; external OPenGL32;
procedure glEnableClientState(_array: GLenum);stdcall; external OPenGL32;
procedure glEnd();stdcall; external OPenGL32;
procedure glEndList();stdcall; external OPenGL32;
procedure glEvalCoord1d(u: GLdouble);stdcall; external OPenGL32;
procedure glEvalCoord1dv(const u: PGLdouble);stdcall; external OPenGL32;
procedure glEvalCoord1f(u: GLfloat);stdcall; external OPenGL32;
procedure glEvalCoord1fv(const u: PGLfloat);stdcall; external OPenGL32;
procedure glEvalCoord2d(u: GLdouble; v: GLdouble);stdcall; external OPenGL32;
procedure glEvalCoord2dv(const u: PGLdouble);stdcall; external OPenGL32;
procedure glEvalCoord2f(u: GLfloat; v: GLfloat);stdcall; external OPenGL32;
procedure glEvalCoord2fv(const u: PGLfloat);stdcall; external OPenGL32;
procedure glEvalMesh1(mode: GLenum; i1: GLint; i2: GLint);stdcall; external OPenGL32;
procedure glEvalMesh2(mode: GLenum; i1: GLint; i2: GLint; j1: GLint; j2: GLint);stdcall; external OPenGL32;
procedure glEvalPoint1(i: GLint);stdcall; external OPenGL32;
procedure glEvalPoint2(i: GLint; j: GLint);stdcall; external OPenGL32;
procedure glFeedbackBuffer(size: GLsizei; _type: GLenum; buffer: PGLfloat);stdcall; external OPenGL32;
procedure glFogf(pname: GLenum; param: GLfloat);stdcall; external OPenGL32;
procedure glFogfv(pname: GLenum; const params: PGLfloat);stdcall; external OPenGL32;
procedure glFogi(pname: GLenum; param: GLint);stdcall; external OPenGL32;
procedure glFogiv(pname: GLenum; const params: PGLint);stdcall; external OPenGL32;
procedure glFrustum(left: GLdouble; right: GLdouble; bottom: GLdouble; top: GLdouble; zNear: GLdouble; zFar: GLdouble);stdcall; external OPenGL32;
procedure glFrontFace(mode: GLenum);stdcall; external OPenGL32;
function glGenLists(range: GLsizei): GLuint;stdcall; external OPenGL32;
procedure glGetClipPlane(plane: GLenum; equation: PGLdouble);stdcall; external OPenGL32;
procedure glGetLightfv(light: GLenum; pname: GLenum; params: PGLfloat);stdcall; external OPenGL32;
procedure glGetLightiv(light: GLenum; pname: GLenum; params: PGLint);stdcall; external OPenGL32;
procedure glGetMapdv(target: GLenum; query: GLenum; v: PGLdouble);stdcall; external OPenGL32;
procedure glGetMapfv(target: GLenum; query: GLenum; v: PGLfloat);stdcall; external OPenGL32;
procedure glGetMapiv(target: GLenum; query: GLenum; v: PGLint);stdcall; external OPenGL32;
procedure glGetMaterialfv(face: GLenum; pname: GLenum; params: PGLfloat);stdcall; external OPenGL32;
procedure glGetMaterialiv(face: GLenum; pname: GLenum; params: PGLint);stdcall; external OPenGL32;
procedure glGetPixelMapfv(map: GLenum; values: PGLfloat);stdcall; external OPenGL32;
procedure glGetPixelMapuiv(map: GLenum; values: PGLuint);stdcall; external OPenGL32;
procedure glGetPixelMapusv(map: GLenum; values: PGLushort);stdcall; external OPenGL32;
procedure glGetPolygonStipple(mask: PGLubyte);stdcall; external OPenGL32;
procedure glGetTexEnvfv(target: GLenum; pname: GLenum; params: PGLfloat);stdcall; external OPenGL32;
procedure glGetTexEnviv(target: GLenum; pname: GLenum; params: PGLint);stdcall; external OPenGL32;
procedure glGetTexGendv(coord: GLenum; pname: GLenum; params: PGLdouble);stdcall; external OPenGL32;
procedure glGetTexGenfv(coord: GLenum; pname: GLenum; params: PGLfloat);stdcall; external OPenGL32;
procedure glGetTexGeniv(coord: GLenum; pname: GLenum; params: PGLint);stdcall; external OPenGL32;
procedure glIndexMask(mask: GLuint);stdcall; external OPenGL32;
procedure glIndexPointer(_type: GLenum; stride: GLsizei; const _pointer: PGLvoid);stdcall; external OPenGL32;
procedure glIndexd(c: GLdouble);stdcall; external OPenGL32;
procedure glIndexdv(const c: PGLdouble);stdcall; external OPenGL32;
procedure glIndexf(c: GLfloat);stdcall; external OPenGL32;
procedure glIndexfv(const c: PGLfloat);stdcall; external OPenGL32;
procedure glIndexi(c: GLint);stdcall; external OPenGL32;
procedure glIndexiv(const c: PGLint);stdcall; external OPenGL32;
procedure glIndexs(c: GLshort);stdcall; external OPenGL32;
procedure glIndexsv(const c: PGLshort);stdcall; external OPenGL32;
procedure glIndexub(c: GLubyte);stdcall; external OPenGL32;
procedure glIndexubv(const c: PGLubyte);stdcall; external OPenGL32;
procedure glInitNames;stdcall; external OPenGL32;
procedure glInterleavedArrays(format: GLenum; stride: GLsizei; const _pointer: PGLvoid);stdcall; external OPenGL32;
function glIsList(list: GLuint): GLboolean;stdcall; external OPenGL32;
function glIsTexture(texture: GLuint): GLboolean;stdcall; external OPenGL32;
procedure glLightModelf(pname: GLenum; param: GLfloat);stdcall; external OPenGL32;
procedure glLightModelfv(pname: GLenum; const params: PGLfloat);stdcall; external OPenGL32;
procedure glLightModeli(pname: GLenum; param: GLint);stdcall; external OPenGL32;
procedure glLightModeliv(pname: GLenum; const params: PGLint);stdcall; external OPenGL32;
procedure glLightf(light: GLenum; pname: GLenum; param: GLfloat);stdcall; external OPenGL32;
procedure glLightfv(light: GLenum; pname: GLenum; const params: PGLfloat);stdcall; external OPenGL32;
procedure glLighti(light: GLenum; pname: GLenum; param: GLint);stdcall; external OPenGL32;
procedure glLightiv(light: GLenum; pname: GLenum; const params: PGLint);stdcall; external OPenGL32;
procedure glLineStipple(factor: GLint; pattern: GLushort);stdcall; external OPenGL32;
procedure glListBase(base: GLuint);stdcall; external OPenGL32;
procedure glLoadIdentity;stdcall; external OPenGL32;
procedure glLoadMatrixd(const m: PGLdouble);stdcall; external OPenGL32;
procedure glLoadMatrixf(const m: PGLfloat);stdcall; external OPenGL32;
procedure glLoadName(name: GLuint);stdcall; external OPenGL32;
procedure glMap1d(target: GLenum; u1: GLdouble; u2: GLdouble; stride: GLint; order: GLint; const points: PGLdouble);stdcall; external OPenGL32;
procedure glMap1f(target: GLenum; u1: GLfloat; u2: GLfloat; stride: GLint; order: GLint; const points: PGLfloat);stdcall; external OPenGL32;
procedure glMap2d(target: GLenum; u1: GLdouble; u2: GLdouble; ustride: GLint; uorder: GLint; v1: GLdouble; v2: GLdouble; vstride: GLint; vorder: GLint; const points: PGLdouble);stdcall; external OPenGL32;
procedure glMap2f(target: GLenum; u1: GLfloat; u2: GLfloat; ustride: GLint; uorder: GLint; v1: GLfloat; v2: GLfloat; vstride: GLint; vorder: GLint; const points: PGLfloat);stdcall; external OPenGL32;
procedure glMapGrid1d(un: GLint; u1: GLdouble; u2: GLdouble);stdcall; external OPenGL32;
procedure glMapGrid1f(un: GLint; u1: GLfloat; u2: GLfloat);stdcall; external OPenGL32;
procedure glMapGrid2d(un: GLint; u1: GLdouble; u2: GLdouble; vn: GLint; v1: GLdouble; v2: GLdouble);stdcall; external OPenGL32;
procedure glMapGrid2f(un: GLint; u1: GLfloat; u2: GLfloat; vn: GLint; v1: GLfloat; v2: GLfloat);stdcall; external OPenGL32;
procedure glMaterialf(face: GLenum; pname: GLenum; param: GLfloat);stdcall; external OPenGL32;
procedure glMaterialfv(face: GLenum; pname: GLenum; const params: PGLfloat);stdcall; external OPenGL32;
procedure glMateriali(face: GLenum; pname: GLenum; param: GLint);stdcall; external OPenGL32;
procedure glMaterialiv(face: GLenum; pname: GLenum; const params: PGLint);stdcall; external OPenGL32;
procedure glMatrixMode(mode: GLenum);stdcall; external OPenGL32;
procedure glMultMatrixd(const m: PGLdouble);stdcall; external OPenGL32;
procedure glMultMatrixf(const m: PGLfloat);stdcall; external OPenGL32;
procedure glNewList(list: GLuint; mode: GLenum);stdcall; external OPenGL32;
procedure glNormal3b(nx: GLbyte; ny: GLbyte; nz: GLbyte);stdcall; external OPenGL32;
procedure glNormal3bv(const v: PGLbyte);stdcall; external OPenGL32;
procedure glNormal3d(nx: GLdouble; ny: GLdouble; nz: GLdouble);stdcall; external OPenGL32;
procedure glNormal3dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glNormal3f(nx: GLfloat; ny: GLfloat; nz: GLfloat);stdcall; external OPenGL32;
procedure glNormal3fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glNormal3i(nx: GLint; ny: GLint; nz: GLint);stdcall; external OPenGL32;
procedure glNormal3iv(const v: PGLint);stdcall; external OPenGL32;
procedure glNormal3s(nx: GLshort; ny: GLshort; nz: GLshort);stdcall; external OPenGL32;
procedure glNormal3sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glNormalPointer(_type: GLenum; stride: GLsizei; const _pointer: PGLvoid);stdcall; external OPenGL32;
procedure glOrtho(left: GLdouble; right: GLdouble; bottom: GLdouble; top: GLdouble; zNear: GLdouble; zFar: GLdouble);stdcall; external OPenGL32;
procedure glPassThrough(token: GLfloat);stdcall; external OPenGL32;
procedure glPixelMapfv(map: GLenum; mapsize: GLsizei; const values: PGLfloat);stdcall; external OPenGL32;
procedure glPixelMapuiv(map: GLenum; mapsize: GLsizei; const values: PGLuint);stdcall; external OPenGL32;
procedure glPixelMapusv(map: GLenum; mapsize: GLsizei; const values: PGLushort);stdcall; external OPenGL32;
procedure glPixelTransferf(pname: GLenum; param: GLfloat);stdcall; external OPenGL32;
procedure glPixelTransferi(pname: GLenum; param: GLint);stdcall; external OPenGL32;
procedure glPixelZoom(xfactor: GLfloat; yfactor: GLfloat);stdcall; external OPenGL32;
procedure glPolygonStipple(const mask: PGLubyte);stdcall; external OPenGL32;
procedure glPopAttrib();stdcall; external OPenGL32;
procedure glPopClientAttrib();stdcall; external OPenGL32;
procedure glPopMatrix();stdcall; external OPenGL32;
procedure glPopName();stdcall; external OPenGL32;
procedure glPrioritizeTextures(n: GLsizei; const textures: PGLuint; const priorities: PGLclampf);stdcall; external OPenGL32;
procedure glPushAttrib(mask: GLbitfield);stdcall; external OPenGL32;
procedure glPushClientAttrib(mask: GLbitfield);stdcall; external OPenGL32;
procedure glPushMatrix();stdcall; external OPenGL32;
procedure glPushName(name: GLuint);stdcall; external OPenGL32;
procedure glRasterPos2d(x: GLdouble; y: GLdouble);stdcall; external OPenGL32;
procedure glRasterPos2dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glRasterPos2f(x: GLfloat; y: GLfloat);stdcall; external OPenGL32;
procedure glRasterPos2fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glRasterPos2i(x: GLint; y: GLint);stdcall; external OPenGL32;
procedure glRasterPos2iv(const v: PGLint);stdcall; external OPenGL32;
procedure glRasterPos2s(x: GLshort; y: GLshort);stdcall; external OPenGL32;
procedure glRasterPos2sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glRasterPos3d(x: GLdouble; y: GLdouble; z: GLdouble);stdcall; external OPenGL32;
procedure glRasterPos3dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glRasterPos3f(x: GLfloat; y: GLfloat; z: GLfloat);stdcall; external OPenGL32;
procedure glRasterPos3fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glRasterPos3i(x: GLint; y: GLint; z: GLint);stdcall; external OPenGL32;
procedure glRasterPos3iv(const v: PGLint);stdcall; external OPenGL32;
procedure glRasterPos3s(x: GLshort; y: GLshort; z: GLshort);stdcall; external OPenGL32;
procedure glRasterPos3sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glRasterPos4d(x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble);stdcall; external OPenGL32;
procedure glRasterPos4dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glRasterPos4f(x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat);stdcall; external OPenGL32;
procedure glRasterPos4fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glRasterPos4i(x: GLint; y: GLint; z: GLint; w: GLint);stdcall; external OPenGL32;
procedure glRasterPos4iv(const v: PGLint);stdcall; external OPenGL32;
procedure glRasterPos4s(x: GLshort; y: GLshort; z: GLshort; w: GLshort);stdcall; external OPenGL32;
procedure glRasterPos4sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glRectd(x1: GLdouble; y1: GLdouble; x2: GLdouble; y2: GLdouble);stdcall; external OPenGL32;
procedure glRectdv(const v1: PGLdouble; const v2: PGLdouble);stdcall; external OPenGL32;
procedure glRectf(x1: GLfloat; y1: GLfloat; x2: GLfloat; y2: GLfloat);stdcall; external OPenGL32;
procedure glRectfv(const v1: PGLfloat; const v2: PGLfloat);stdcall; external OPenGL32;
procedure glRecti(x1: GLint; y1: GLint; x2: GLint; y2: GLint);stdcall; external OPenGL32;
procedure glRectiv(const v1: PGLint; const v2: PGLint);stdcall; external OPenGL32;
procedure glRects(x1: GLshort; y1: GLshort; x2: GLshort; y2: GLshort);stdcall; external OPenGL32;
procedure glRectsv(const v1: PGLshort; const v2: PGLshort);stdcall; external OPenGL32;
function glRenderMode(mode: GLenum): GLint;stdcall; external OPenGL32;
procedure glRotated(angle: GLdouble; x: GLdouble; y: GLdouble; z: GLdouble);stdcall; external OPenGL32;
procedure glRotatef(angle: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat);stdcall; external OPenGL32;
procedure glScaled(x: GLdouble; y: GLdouble; z: GLdouble);stdcall; external OPenGL32;
procedure glScalef(x: GLfloat; y: GLfloat; z: GLfloat);stdcall; external OPenGL32;
procedure glSelectBuffer(size: GLsizei; buffer: PGLuint);stdcall; external OPenGL32;
procedure glShadeModel(mode: GLenum);stdcall; external OPenGL32;
procedure glTexCoord1d(s: GLdouble);stdcall; external OPenGL32;
procedure glTexCoord1dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glTexCoord1f(s: GLfloat);stdcall; external OPenGL32;
procedure glTexCoord1fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glTexCoord1i(s: GLint);stdcall; external OPenGL32;
procedure glTexCoord1iv(const v: PGLint);stdcall; external OPenGL32;
procedure glTexCoord1s(s: GLshort);stdcall; external OPenGL32;
procedure glTexCoord1sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glTexCoord2d(s: GLdouble; t: GLdouble);stdcall; external OPenGL32;
procedure glTexCoord2dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glTexCoord2f(s: GLfloat; t: GLfloat);stdcall; external OPenGL32;
procedure glTexCoord2fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glTexCoord2i(s: GLint; t: GLint);stdcall; external OPenGL32;
procedure glTexCoord2iv(const v: PGLint);stdcall; external OPenGL32;
procedure glTexCoord2s(s: GLshort; t: GLshort);stdcall; external OPenGL32;
procedure glTexCoord2sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glTexCoord3d(s: GLdouble; t: GLdouble; r: GLdouble);stdcall; external OPenGL32;
procedure glTexCoord3dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glTexCoord3f(s: GLfloat; t: GLfloat; r: GLfloat);stdcall; external OPenGL32;
const
GL_BUFFER_SIZE = $8764;
GL_BUFFER_USAGE = $8765;
GL_QUERY_COUNTER_BITS = $8864;
GL_CURRENT_QUERY = $8865;
GL_QUERY_RESULT = $8866;
GL_QUERY_RESULT_AVAILABLE = $8867;
GL_ARRAY_BUFFER = $8892;
GL_ELEMENT_ARRAY_BUFFER = $8893;
GL_ARRAY_BUFFER_BINDING = $8894;
GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895;
GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = $889F;
GL_READ_ONLY = $88B8;
GL_WRITE_ONLY = $88B9;
GL_READ_WRITE = $88BA;
GL_BUFFER_ACCESS = $88BB;
GL_BUFFER_MAPPED = $88BC;
GL_BUFFER_MAP_POINTER = $88BD;
GL_STREAM_DRAW = $88E0;
GL_STREAM_READ = $88E1;
GL_STREAM_COPY = $88E2;
GL_STATIC_DRAW = $88E4;
GL_STATIC_READ = $88E5;
GL_STATIC_COPY = $88E6;
GL_DYNAMIC_DRAW = $88E8;
GL_DYNAMIC_READ = $88E9;
GL_DYNAMIC_COPY = $88EA;
GL_SAMPLES_PASSED = $8914;
GL_VERTEX_ARRAY_BUFFER_BINDING = $8896;
GL_NORMAL_ARRAY_BUFFER_BINDING = $8897;
GL_COLOR_ARRAY_BUFFER_BINDING = $8898;
GL_INDEX_ARRAY_BUFFER_BINDING = $8899;
GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = $889A;
GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = $889B;
GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = $889C;
GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = $889D;
GL_WEIGHT_ARRAY_BUFFER_BINDING = $889E;
GL_FOG_COORD_SRC = $8450;
GL_FOG_COORD = $8451;
GL_CURRENT_FOG_COORD = $8453;
GL_FOG_COORD_ARRAY_TYPE = $8454;
GL_FOG_COORD_ARRAY_STRIDE = $8455;
GL_FOG_COORD_ARRAY_POINTER = $8456;
GL_FOG_COORD_ARRAY = $8457;
GL_FOG_COORD_ARRAY_BUFFER_BINDING = $889D;
GL_SRC0_RGB = $8580;
GL_SRC1_RGB = $8581;
GL_SRC2_RGB = $8582;
GL_SRC0_ALPHA = $8588;
GL_SRC1_ALPHA = $8589;
GL_SRC2_ALPHA = $858A;
procedure glTexCoord3i(s: GLint; t: GLint; r: GLint);stdcall; external OPenGL32;
procedure glTexCoord3iv(const v: PGLint);stdcall; external OPenGL32;
procedure glTexCoord3s(s: GLshort; t: GLshort; r: GLshort);stdcall; external OPenGL32;
procedure glTexCoord3sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glTexCoord4d(s: GLdouble; t: GLdouble; r: GLdouble; q: GLdouble);stdcall; external OPenGL32;
procedure glTexCoord4dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glTexCoord4f(s: GLfloat; t: GLfloat; r: GLfloat; q: GLfloat);stdcall; external OPenGL32;
procedure glTexCoord4fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glTexCoord4i(s: GLint; t: GLint; r: GLint; q: GLint);stdcall; external OPenGL32;
procedure glTexCoord4iv(const v: PGLint);stdcall; external OPenGL32;
procedure glTexCoord4s(s: GLshort; t: GLshort; r: GLshort; q: GLshort);stdcall; external OPenGL32;
procedure glTexCoord4sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glTexCoordPointer(size: GLint; _type: GLenum; stride: GLsizei; const _pointer: PGLvoid);stdcall; external OPenGL32;
procedure glTexEnvf(target: GLenum; pname: GLenum; param: GLfloat);stdcall; external OPenGL32;
procedure glTexEnvfv(target: GLenum; pname: GLenum; const params: PGLfloat);stdcall; external OPenGL32;
procedure glTexEnvi(target: GLenum; pname: GLenum; param: GLint);stdcall; external OPenGL32;
procedure glTexEnviv(target: GLenum; pname: GLenum; const params: PGLint);stdcall; external OPenGL32;
procedure glTexGend(coord: GLenum; pname: GLenum; param: GLdouble);stdcall; external OPenGL32;
procedure glTexGendv(coord: GLenum; pname: GLenum; const params: PGLdouble);stdcall; external OPenGL32;
procedure glTexGenf(coord: GLenum; pname: GLenum; param: GLfloat);stdcall; external OPenGL32;
procedure glTexGenfv(coord: GLenum; pname: GLenum; const params: PGLfloat);stdcall; external OPenGL32;
procedure glTexGeni(coord: GLenum; pname: GLenum; param: GLint);stdcall; external OPenGL32;
procedure glTexGeniv(coord: GLenum; pname: GLenum; const params: PGLint);stdcall; external OPenGL32;
procedure glTranslated(x: GLdouble; y: GLdouble; z: GLdouble);stdcall; external OPenGL32;
procedure glTranslatef(x: GLfloat; y: GLfloat; z: GLfloat);stdcall; external OPenGL32;
procedure glVertex2d(x: GLdouble; y: GLdouble);stdcall; external OPenGL32;
procedure glVertex2dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glVertex2f(x: GLfloat; y: GLfloat);stdcall; external OPenGL32;
procedure glVertex2fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glVertex2i(x: GLint; y: GLint);stdcall; external OPenGL32;
procedure glVertex2iv(const v: PGLint);stdcall; external OPenGL32;
procedure glVertex2s(x: GLshort; y: GLshort);stdcall; external OPenGL32;
procedure glVertex2sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glVertex3d(x: GLdouble; y: GLdouble; z: GLdouble);stdcall; external OPenGL32;
procedure glVertex3dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glVertex3f(x: GLfloat; y: GLfloat; z: GLfloat);stdcall; external OPenGL32;
procedure glVertex3fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glVertex3i(x: GLint; y: GLint; z: GLint);stdcall; external OPenGL32;
procedure glVertex3iv(const v: PGLint);stdcall; external OPenGL32;
procedure glVertex3s(x: GLshort; y: GLshort; z: GLshort);stdcall; external OPenGL32;
procedure glVertex3sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glVertex4d(x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble);stdcall; external OPenGL32;
procedure glVertex4dv(const v: PGLdouble);stdcall; external OPenGL32;
procedure glVertex4f(x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat);stdcall; external OPenGL32;
procedure glVertex4fv(const v: PGLfloat);stdcall; external OPenGL32;
procedure glVertex4i(x: GLint; y: GLint; z: GLint; w: GLint);stdcall; external OPenGL32;
procedure glVertex4iv(const v: PGLint);stdcall; external OPenGL32;
procedure glVertex4s(x: GLshort; y: GLshort; z: GLshort; w: GLshort);stdcall; external OPenGL32;
procedure glVertex4sv(const v: PGLshort);stdcall; external OPenGL32;
procedure glVertexPointer(size: GLint; _type: GLenum; stride: GLsizei; const _pointer: PGLvoid);stdcall; external OPenGL32;
// GL_VERSION_1_0
procedure glCullFace(mode: GLenum); stdcall;external OpenGL32;
procedure glHint(target: GLenum; mode: GLenum); stdcall;external OpenGL32;
procedure glLineWidth(width: GLfloat); stdcall;external OpenGL32;
procedure glPointSize(size: GLfloat); stdcall;external OpenGL32;
procedure glPolygonMode(face: GLenum; mode: GLenum); stdcall;external OpenGL32;
procedure glScissor(x: GLint; y: GLint; width: GLsizei; height: GLsizei); stdcall;external OpenGL32;
procedure glTexParameterf(target: GLenum; pname: GLenum; param: GLfloat); stdcall;external OpenGL32;
procedure glTexParameterfv(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall;external OpenGL32;
procedure glTexParameteri(target: GLenum; pname: GLenum; param: GLint); stdcall;external OpenGL32;
procedure glTexParameteriv(target: GLenum; pname: GLenum; const params: PGLint); stdcall;external OpenGL32;
procedure glTexImage1D(target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; border: GLint; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall;external OpenGL32;
procedure glTexImage2D(target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; height: GLsizei; border: GLint; format: GLenum; _type: GLenum;var pixels); stdcall;external OpenGL32;
procedure glDrawBuffer(mode: GLenum); stdcall;external OpenGL32;
procedure glClear(mask: GLbitfield); stdcall;external OpenGL32;
procedure glClearColor(red: GLclampf; green: GLclampf; blue: GLclampf; alpha: GLclampf); stdcall;external OpenGL32;
procedure glClearStencil(s: GLint); stdcall;external OpenGL32;
procedure glClearDepth(depth: GLclampd); stdcall;external OpenGL32;
procedure glStencilMask(mask: GLuint); stdcall;external OpenGL32;
procedure glColorMask(red: GLboolean; green: GLboolean; blue: GLboolean; alpha: GLboolean); stdcall;external OpenGL32;
procedure glDepthMask(flag: GLboolean); stdcall;external OpenGL32;
procedure glDisable(cap: GLenum); stdcall;external OpenGL32;
procedure glEnable(cap: GLenum); stdcall;external OpenGL32;
procedure glFinish; stdcall;external OpenGL32;
procedure glFlush; stdcall;external OpenGL32;
procedure glBlendFunc(sfactor: GLenum; dfactor: GLenum); stdcall;external OpenGL32;
procedure glLogicOp(opcode: GLenum); stdcall;external OpenGL32;
procedure glStencilFunc(func: GLenum; ref: GLint; mask: GLuint); stdcall;external OpenGL32;
procedure glStencilOp(fail: GLenum; zfail: GLenum; zpass: GLenum); stdcall;external OpenGL32;
procedure glDepthFunc(func: GLenum); stdcall;external OpenGL32;
procedure glPixelStoref(pname: GLenum; param: GLfloat); stdcall;external OpenGL32;
procedure glPixelStorei(pname: GLenum; param: GLint); stdcall;external OpenGL32;
procedure glReadBuffer(mode: GLenum); stdcall;external OpenGL32;
procedure glReadPixels(x: GLint; y: GLint; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; pixels: PGLvoid); stdcall;external OpenGL32;
procedure glGetBooleanv(pname: GLenum; params: PGLboolean); stdcall;external OpenGL32;
procedure glGetDoublev(pname: GLenum; params: PGLdouble); stdcall;external OpenGL32;
function glGetError: GLenum; stdcall;external OpenGL32;
procedure glGetFloatv(pname: GLenum; params: PGLfloat); stdcall;external OpenGL32;
procedure glGetIntegerv(pname: GLenum; params: PGLint); stdcall;external OpenGL32;
function glGetString(name: GLenum): PAnsiChar; stdcall;external OpenGL32;
procedure glGetTexImage(target: GLenum; level: GLint; format: GLenum; _type: GLenum; pixels: PGLvoid); stdcall;external OpenGL32;
procedure glGetTexParameteriv(target: GLenum; pname: GLenum; params: PGLint); stdcall;external OpenGL32;
procedure glGetTexParameterfv(target: GLenum; pname: GLenum; params: PGLfloat); stdcall;external OpenGL32;
procedure glGetTexLevelParameterfv(target: GLenum; level: GLint; pname: GLenum; params: PGLfloat); stdcall;external OpenGL32;
procedure glGetTexLevelParameteriv(target: GLenum; level: GLint; pname: GLenum; params: PGLint); stdcall;external OpenGL32;
function glIsEnabled(cap: GLenum): GLboolean; stdcall;external OpenGL32;
procedure glDepthRange(zNear: GLclampd; zFar: GLclampd); stdcall;external OpenGL32;
procedure glViewport(x: GLint; y: GLint; width: GLsizei; height: GLsizei); stdcall;external OpenGL32;
// GL_VERSION_1_1
procedure glDrawArrays(mode: GLenum; first: GLint; count: GLsizei); stdcall;external OpenGL32;
procedure glDrawElements(mode: GLenum; count: GLsizei; _type: GLenum; const indices: PGLvoid); stdcall;external OpenGL32;
procedure glGetPointerv(pname: GLenum; params: PGLvoid); stdcall;external OpenGL32;
procedure glPolygonOffset(factor: GLfloat; units: GLfloat); stdcall;external OpenGL32;
procedure glCopyTexImage1D(target: GLenum; level: GLint; internalFormat: GLenum; x: GLint; y: GLint; width: GLsizei; border: GLint); stdcall;external OpenGL32;
procedure glCopyTexImage2D(target: GLenum; level: GLint; internalFormat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei; border: GLint); stdcall;external OpenGL32;
procedure glCopyTexSubImage1D(target: GLenum; level: GLint; xoffset: GLint; x: GLint; y: GLint; width: GLsizei); stdcall;external OpenGL32;
procedure glCopyTexSubImage2D(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); stdcall;external OpenGL32;
procedure glTexSubImage1D(target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall;external OpenGL32;
procedure glTexSubImage2D(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall;external OpenGL32;
procedure glBindTexture(target: GLenum; texture: GLuint); stdcall;external OpenGL32;
procedure glDeleteTextures(n: GLsizei; const textures: PGLuint); stdcall;external OpenGL32;
procedure glGenTextures(n: GLsizei;out textures); stdcall;external OpenGL32;
var
GL_VERSION_1_0,
GL_VERSION_1_1,
GL_VERSION_1_2,
GL_VERSION_1_3,
GL_VERSION_1_4,
GL_VERSION_1_5,
GL_VERSION_2_0,
GL_VERSION_2_1,
GL_VERSION_3_0,
GL_VERSION_3_1,
GL_VERSION_3_2,
GL_VERSION_3_3,
GL_VERSION_4_0,
GL_VERSION_4_1,
GL_VERSION_4_2,
GL_VERSION_4_3,
GL_VERSION_4_4,
GL_VERSION_4_5,
GLU_VERSION_1_1,
GLU_VERSION_1_2,
GLU_VERSION_1_3,
GL_3DFX_multisample,
GL_3DFX_tbuffer,
GL_3DFX_texture_compression_FXT1,
GL_APPLE_client_storage,
GL_APPLE_element_array,
GL_APPLE_fence,
GL_APPLE_specular_vector,
GL_APPLE_transform_hint,
GL_APPLE_vertex_array_object,
GL_APPLE_vertex_array_range,
GL_APPLE_ycbcr_422,
GL_APPLE_texture_range,
GL_APPLE_float_pixels,
GL_APPLE_vertex_program_evaluators,
GL_APPLE_aux_depth_stencil,
GL_APPLE_object_purgeable,
GL_APPLE_row_bytes,
GL_APPLE_rgb_422,
GL_ARB_depth_texture,
GL_ARB_fragment_program,
GL_ARB_imaging,
GL_ARB_matrix_palette,
GL_ARB_multisample,
GL_ARB_multitexture,
GL_ARB_point_parameters,
GL_ARB_shadow,
GL_ARB_shadow_ambient,
GL_ARB_texture_border_clamp,
GL_ARB_texture_compression,
GL_ARB_texture_cube_map,
GL_ARB_texture_env_add,
GL_ARB_texture_env_combine,
GL_ARB_texture_env_crossbar,
GL_ARB_texture_env_dot3,
GL_ARB_texture_mirrored_repeat,
GL_ARB_transpose_matrix,
GL_ARB_vertex_blend,
GL_ARB_vertex_buffer_object,
GL_ARB_vertex_program,
GL_ARB_window_pos,
GL_ARB_shader_objects,
GL_ARB_vertex_shader,
GL_ARB_fragment_shader,
GL_ARB_shading_language_100,
GL_ARB_occlusion_query,
GL_ARB_texture_non_power_of_two,
GL_ARB_point_sprite,
GL_ARB_fragment_program_shadow,
GL_ARB_draw_buffers,
GL_ARB_texture_rectangle,
GL_ARB_color_buffer_float,
GL_ARB_half_float_pixel,
GL_ARB_texture_float,
GL_ARB_pixel_buffer_object,
GL_ARB_depth_buffer_float,
GL_ARB_draw_instanced,
GL_ARB_framebuffer_object,
GL_ARB_framebuffer_sRGB,
GL_ARB_geometry_shader4,
GL_ARB_half_float_vertex,
GL_ARB_instanced_arrays,
GL_ARB_map_buffer_range,
GL_ARB_texture_buffer_object,
GL_ARB_texture_compression_rgtc,
GL_ARB_texture_rg,
GL_ARB_vertex_array_object,
GL_ARB_uniform_buffer_object,
GL_ARB_compatibility,
GL_ARB_copy_buffer,
GL_ARB_shader_texture_lod,
GL_ARB_depth_clamp,
GL_ARB_draw_elements_base_vertex,
GL_ARB_fragment_coord_conventions,
GL_ARB_provoking_vertex,
GL_ARB_seamless_cube_map,
GL_ARB_sync,
GL_ARB_texture_multisample,
GL_ARB_vertex_array_bgra,
GL_ARB_draw_buffers_blend,
GL_ARB_sample_shading,
GL_ARB_texture_cube_map_array,
GL_ARB_texture_gather,
GL_ARB_texture_query_lod,
GL_ARB_shading_language_include,
GL_ARB_texture_compression_bptc,
GL_ARB_blend_func_extended,
GL_ARB_explicit_attrib_location,
GL_ARB_occlusion_query2,
GL_ARB_sampler_objects,
GL_ARB_shader_bit_encoding,
GL_ARB_texture_rgb10_a2ui,
GL_ARB_texture_swizzle,
GL_ARB_timer_query,
GL_ARB_vertex_type_2_10_10_10_rev,
GL_ARB_draw_indirect,
GL_ARB_gpu_shader5,
GL_ARB_gpu_shader_fp64,
GL_ARB_shader_subroutine,
GL_ARB_tessellation_shader,
GL_ARB_texture_buffer_object_rgb32,
GL_ARB_transform_feedback2,
GL_ARB_transform_feedback3,
GL_ARB_ES2_compatibility,
GL_ARB_get_program_binary,
GL_ARB_separate_shader_objects,
GL_ARB_shader_precision,
GL_ARB_vertex_attrib_64bit,
GL_ARB_viewport_array,
// GL 4.2
GL_ARB_base_instance,
GL_ARB_shading_language_420pack,
GL_ARB_transform_feedback_instanced,
GL_ARB_compressed_texture_pixel_storage,
GL_ARB_conservative_depth,
GL_ARB_internalformat_query,
GL_ARB_map_buffer_alignment,
GL_ARB_shader_atomic_counters,
GL_ARB_shader_image_load_store,
GL_ARB_shading_language_packing,
GL_ARB_texture_storage,
// GL 4.3
GL_ARB_arrays_of_arrays,
GL_ARB_fragment_layer_viewport,
GL_ARB_shader_image_size,
GL_ARB_ES3_compatibility,
GL_ARB_clear_buffer_object,
GL_ARB_compute_shader,
GL_ARB_copy_image,
GL_KHR_debug,
GL_ARB_explicit_uniform_location,
GL_ARB_framebuffer_no_attachments,
GL_ARB_internalformat_query2,
GL_ARB_invalidate_subdata,
GL_ARB_multi_draw_indirect,
GL_ARB_program_interface_query,
GL_ARB_robust_buffer_access_behavior,
GL_ARB_shader_storage_buffer_object,
GL_ARB_stencil_texturing,
GL_ARB_texture_buffer_range,
GL_ARB_texture_query_levels,
GL_ARB_texture_storage_multisample,
GL_ARB_texture_view,
GL_ARB_vertex_attrib_binding,
GL_NV_path_rendering,
GL_AMD_pinned_memory,
GL_AMD_stencil_operation_extended,
GL_AMD_vertex_shader_viewport_index,
GL_AMD_vertex_shader_layer,
GL_NV_bindless_texture,
GL_NV_shader_atomic_float,
GL_AMD_query_buffer_object,
// GL 4.4
GL_ARB_buffer_storage,
GL_ARB_clear_texture,
GL_ARB_enhanced_layouts,
GL_ARB_multi_bind,
GL_ARB_query_buffer_object,
GL_ARB_texture_mirror_clamp_to_edge,
GL_ARB_texture_stencil8,
GL_ARB_vertex_type_10f_11f_11f_rev,
GL_ARB_bindless_texture,
GL_ARB_sparse_texture,
// GL 4.5
GL_ARB_clip_control,
GL_ARB_cull_distance,
GL_ARB_ES3_1_compatibility,
GL_ARB_conditional_render_inverted,
GL_KHR_context_flush_control,
GL_ARB_derivative_control,
GL_ARB_direct_state_access,
GL_ARB_get_texture_sub_image,
GL_KHR_robustness,
GL_KHR_blend_equation_advanced,
GL_KHR_blend_equation_advanced_coherent,
GL_KHR_robust_buffer_access_behavior,
GL_ARB_shader_texture_image_samples,
GL_ARB_texture_barrier,
GL_ARB_cl_event,
GL_ARB_compute_variable_group_size,
GL_ARB_debug_output,
GL_ARB_robustness,
GL_ARB_shader_stencil_export,
GL_ATI_draw_buffers,
GL_ATI_element_array,
GL_ATI_envmap_bumpmap,
GL_ATI_fragment_shader,
GL_ATI_map_object_buffer,
GL_ATI_pn_triangles,
GL_ATI_separate_stencil,
GL_ATI_text_fragment_shader,
GL_ATI_texture_env_combine3,
GL_ATI_texture_float,
GL_ATI_texture_mirror_once,
GL_ATI_vertex_array_object,
GL_ATI_vertex_attrib_array_object,
GL_ATI_vertex_streams,
GL_ATI_meminfo,
GL_AMD_performance_monitor,
GL_AMD_texture_texture4,
GL_AMD_vertex_shader_tesselator,
GL_AMD_draw_buffers_blend,
GL_AMD_shader_stencil_export,
GL_AMD_seamless_cubemap_per_texture,
GL_AMD_conservative_depth,
GL_AMD_name_gen_delete,
GL_AMD_debug_output,
GL_AMD_transform_feedback3_lines_triangles,
GL_AMD_depth_clamp_separate,
GL_EXT_422_pixels,
GL_EXT_abgr,
GL_EXT_bgra,
GL_EXT_blend_color,
GL_EXT_blend_func_separate,
GL_EXT_blend_logic_op,
GL_EXT_blend_minmax,
GL_EXT_blend_subtract,
GL_EXT_clip_volume_hint,
GL_EXT_cmyka,
GL_EXT_color_matrix,
GL_EXT_color_subtable,
GL_EXT_compiled_vertex_array,
GL_EXT_convolution,
GL_EXT_coordinate_frame,
GL_EXT_copy_texture,
GL_EXT_cull_vertex,
GL_EXT_draw_range_elements,
GL_EXT_fog_coord,
GL_EXT_framebuffer_object,
GL_EXT_histogram,
GL_EXT_index_array_formats,
GL_EXT_index_func,
GL_EXT_index_material,
GL_EXT_index_texture,
GL_EXT_light_texture,
GL_EXT_misc_attribute,
GL_EXT_multi_draw_arrays,
GL_EXT_multisample,
GL_EXT_packed_pixels,
GL_EXT_paletted_texture,
GL_EXT_pixel_transform,
GL_EXT_pixel_transform_color_table,
GL_EXT_point_parameters,
GL_EXT_polygon_offset,
GL_EXT_rescale_normal,
GL_EXT_secondary_color,
GL_EXT_separate_specular_color,
GL_EXT_shadow_funcs,
GL_EXT_shared_texture_palette,
GL_EXT_stencil_two_side,
GL_EXT_stencil_wrap,
GL_EXT_subtexture,
GL_EXT_texture,
GL_EXT_texture3D,
GL_EXT_texture_compression_s3tc,
GL_EXT_texture_cube_map,
GL_EXT_texture_edge_clamp,
GL_EXT_texture_env_add,
GL_EXT_texture_env_combine,
GL_EXT_texture_env_dot3,
GL_EXT_texture_filter_anisotropic,
GL_EXT_texture_lod_bias,
GL_EXT_texture_object,
GL_EXT_texture_perturb_normal,
GL_EXT_texture_rectangle,
GL_EXT_vertex_array,
GL_EXT_vertex_shader,
GL_EXT_vertex_weighting,
GL_EXT_depth_bounds_test,
GL_EXT_texture_mirror_clamp,
GL_EXT_blend_equation_separate,
GL_EXT_pixel_buffer_object,
GL_EXT_texture_compression_dxt1,
GL_EXT_stencil_clear_tag,
GL_EXT_packed_depth_stencil,
GL_EXT_texture_sRGB,
GL_EXT_framebuffer_blit,