-
Notifications
You must be signed in to change notification settings - Fork 6
/
OPENGL32N.inc
1123 lines (983 loc) · 28 KB
/
OPENGL32N.inc
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
; OpenGL include file for the Netwide Assembler (NASM)
; Copyright 1992-1997 Silicon Graphics, Inc. All Rights Reserved.
; Transformed to this form by Sergey Chaban
; (C) hardCode/<BizarreCreations site> '99
; http://bizarrecreations.webjump.com
; e-mail: [email protected]
;** This file was made to give x86 Assembly coders the ability
;** to write OGL programs, not to get any profit from it.
;** In case there are any objections from SGI, it will be removed
;** from our web-page.
%ifndef _NASM_GL_
%define _NASM_GL_
%define GLenum DWORD
%define GLboolean BYTE
%define GLbitfield DWORD
%define GLbyte SBYTE
%define GLshort SWORD
%define GLint DWORD
%define GLsizei DWORD
%define GLubyte BYTE
%define GLushort WORD
%define GLuint DWORD
%define GLfloat DWORD
%define GLclampf DWORD ; float clamped to [0,1]
%define GLdouble QWORD
%define GLclampd QWORD ; double clamped to [0,1]
;%define GLvoid DWORD
; GL matrices are stored in column-major order.
; Members of this structure are named after D3DMATRIX members,
; what allows easy porting of matrix code from D3D.
STRUC glMATRIX
._11 resd 1
._21 resd 1
._31 resd 1
._41 resd 1
._12 resd 1
._22 resd 1
._32 resd 1
._42 resd 1
._13 resd 1
._23 resd 1
._33 resd 1
._43 resd 1
._14 resd 1
._24 resd 1
._34 resd 1
._44 resd 1
ENDSTRUC
STRUC glVec3f
.x resd 1
.y resd 1
.z resd 1
ENDSTRUC
;/* Extensions */
GL_VERSION_1_1 EQU 1
GL_EXT_abgr EQU 1
GL_EXT_bgra EQU 1
GL_EXT_packed_pixels EQU 1
GL_EXT_paletted_texture EQU 1
GL_EXT_vertex_array EQU 1
GL_SGI_compiled_vertex_array EQU 1
GL_SGI_cull_vertex EQU 1
GL_SGI_index_array_formats EQU 1
GL_SGI_index_func EQU 1
GL_SGI_index_material EQU 1
GL_SGI_index_texture EQU 1
GL_WIN_swap_hint EQU 1
;/* AttribMask */
GL_CURRENT_BIT EQU 000000001h
GL_POINT_BIT EQU 000000002h
GL_LINE_BIT EQU 000000004h
GL_POLYGON_BIT EQU 000000008h
GL_POLYGON_STIPPLE_BIT EQU 000000010h
GL_PIXEL_MODE_BIT EQU 000000020h
GL_LIGHTING_BIT EQU 000000040h
GL_FOG_BIT EQU 000000080h
GL_DEPTH_BUFFER_BIT EQU 000000100h
GL_ACCUM_BUFFER_BIT EQU 000000200h
GL_STENCIL_BUFFER_BIT EQU 000000400h
GL_VIEWPORT_BIT EQU 000000800h
GL_TRANSFORM_BIT EQU 000001000h
GL_ENABLE_BIT EQU 000002000h
GL_COLOR_BUFFER_BIT EQU 000004000h
GL_HINT_BIT EQU 000008000h
GL_EVAL_BIT EQU 000010000h
GL_LIST_BIT EQU 000020000h
GL_TEXTURE_BIT EQU 000040000h
GL_SCISSOR_BIT EQU 000080000h
GL_ALL_ATTRIB_BITS EQU 0000fffffh
;/* ClientAttribMask */
GL_CLIENT_PIXEL_STORE_BIT EQU 000000001h
GL_CLIENT_VERTEX_ARRAY_BIT EQU 000000002h
GL_CLIENT_ALL_ATTRIB_BITS EQU 0ffffffffh
;/* Boolean */
GL_FALSE EQU 0
GL_TRUE EQU 1
;/* BeginMode */
GL_POINTS EQU 000000000h
GL_LINES EQU 000000001h
GL_LINE_LOOP EQU 000000002h
GL_LINE_STRIP EQU 000000003h
GL_TRIANGLES EQU 000000004h
GL_TRIANGLE_STRIP EQU 000000005h
GL_TRIANGLE_FAN EQU 000000006h
GL_QUADS EQU 000000007h
GL_QUAD_STRIP EQU 000000008h
GL_POLYGON EQU 000000009h
;/* AccumOp */
GL_ACCUM EQU 000000100h
GL_LOAD EQU 000000101h
GL_RETURN EQU 000000102h
GL_MULT EQU 000000103h
GL_ADD EQU 000000104h
;/* AlphaFunction */
GL_NEVER EQU 000000200h
GL_LESS EQU 000000201h
GL_EQUAL EQU 000000202h
GL_LEQUAL EQU 000000203h
GL_GREATER EQU 000000204h
GL_NOTEQUAL EQU 000000205h
GL_GEQUAL EQU 000000206h
GL_ALWAYS EQU 000000207h
;/* BlendingFactorDest */
GL_ZERO EQU 0
GL_ONE EQU 1
GL_SRC_COLOR EQU 000000300h
GL_ONE_MINUS_SRC_COLOR EQU 000000301h
GL_SRC_ALPHA EQU 000000302h
GL_ONE_MINUS_SRC_ALPHA EQU 000000303h
GL_DST_ALPHA EQU 000000304h
GL_ONE_MINUS_DST_ALPHA EQU 000000305h
;/* BlendingFactorSrc */
GL_DST_COLOR EQU 000000306h
GL_ONE_MINUS_DST_COLOR EQU 000000307h
GL_SRC_ALPHA_SATURATE EQU 000000308h
;/* DrawBufferMode */
GL_NONE EQU 0
GL_FRONT_LEFT EQU 000000400h
GL_FRONT_RIGHT EQU 000000401h
GL_BACK_LEFT EQU 000000402h
GL_BACK_RIGHT EQU 000000403h
GL_FRONT EQU 000000404h
GL_BACK EQU 000000405h
GL_LEFT EQU 000000406h
GL_RIGHT EQU 000000407h
GL_FRONT_AND_BACK EQU 000000408h
GL_AUX0 EQU 000000409h
GL_AUX1 EQU 00000040ah
GL_AUX2 EQU 00000040bh
GL_AUX3 EQU 00000040ch
;/* ErrorCode */
GL_NO_ERROR EQU 0
GL_INVALID_ENUM EQU 000000500h
GL_INVALID_VALUE EQU 000000501h
GL_INVALID_OPERATION EQU 000000502h
GL_STACK_OVERFLOW EQU 000000503h
GL_STACK_UNDERFLOW EQU 000000504h
GL_OUT_OF_MEMORY EQU 000000505h
;/* FeedbackType */
GL_2D EQU 000000600h
GL_3D EQU 000000601h
GL_3D_COLOR EQU 000000602h
GL_3D_COLOR_TEXTURE EQU 000000603h
GL_4D_COLOR_TEXTURE EQU 000000604h
;/* FeedBackToken */
GL_PASS_THROUGH_TOKEN EQU 000000700h
GL_POINT_TOKEN EQU 000000701h
GL_LINE_TOKEN EQU 000000702h
GL_POLYGON_TOKEN EQU 000000703h
GL_BITMAP_TOKEN EQU 000000704h
GL_DRAW_PIXEL_TOKEN EQU 000000705h
GL_COPY_PIXEL_TOKEN EQU 000000706h
GL_LINE_RESET_TOKEN EQU 000000707h
;/* FogMode */
;GL_LINEAR
GL_EXP EQU 000000800h
GL_EXP2 EQU 000000801h
;/* FogParameter */
; GL_FOG_COLOR
; GL_FOG_DENSITY
; GL_FOG_END
; GL_FOG_INDEX
; GL_FOG_MODE
; GL_FOG_START
;/* FrontFaceDirection */
GL_CW EQU 000000900h
GL_CCW EQU 000000901h
;/* GetMapQuery */
GL_COEFF EQU 000000a00h
GL_ORDER EQU 000000a01h
GL_DOMAIN EQU 000000a02h
;/* GetPixelMap */
GL_PIXEL_MAP_I_TO_I EQU 000000c70h
GL_PIXEL_MAP_S_TO_S EQU 000000c71h
GL_PIXEL_MAP_I_TO_R EQU 000000c72h
GL_PIXEL_MAP_I_TO_G EQU 000000c73h
GL_PIXEL_MAP_I_TO_B EQU 000000c74h
GL_PIXEL_MAP_I_TO_A EQU 000000c75h
GL_PIXEL_MAP_R_TO_R EQU 000000c76h
GL_PIXEL_MAP_G_TO_G EQU 000000c77h
GL_PIXEL_MAP_B_TO_B EQU 000000c78h
GL_PIXEL_MAP_A_TO_A EQU 000000c79h
;/* GetPointervPName */
GL_VERTEX_ARRAY_POINTER EQU 00000808eh
GL_NORMAL_ARRAY_POINTER EQU 00000808fh
GL_COLOR_ARRAY_POINTER EQU 000008090h
GL_INDEX_ARRAY_POINTER EQU 000008091h
GL_TEXTURE_COORD_ARRAY_POINTER EQU 000008092h
GL_EDGE_FLAG_ARRAY_POINTER EQU 000008093h
;/* GetPName */
GL_CURRENT_COLOR EQU 000000b00h
GL_CURRENT_INDEX EQU 000000b01h
GL_CURRENT_NORMAL EQU 000000b02h
GL_CURRENT_TEXTURE_COORDS EQU 000000b03h
GL_CURRENT_RASTER_COLOR EQU 000000b04h
GL_CURRENT_RASTER_INDEX EQU 000000b05h
GL_CURRENT_RASTER_TEXTURE_COORDS EQU 000000b06h
GL_CURRENT_RASTER_POSITION EQU 000000b07h
GL_CURRENT_RASTER_POSITION_VALID EQU 000000b08h
GL_CURRENT_RASTER_DISTANCE EQU 000000b09h
GL_POINT_SMOOTH EQU 000000b10h
GL_POINT_SIZE EQU 000000b11h
GL_POINT_SIZE_RANGE EQU 000000b12h
GL_POINT_SIZE_GRANULARITY EQU 000000b13h
GL_LINE_SMOOTH EQU 000000b20h
GL_LINE_WIDTH EQU 000000b21h
GL_LINE_WIDTH_RANGE EQU 000000b22h
GL_LINE_WIDTH_GRANULARITY EQU 000000b23h
GL_LINE_STIPPLE EQU 000000b24h
GL_LINE_STIPPLE_PATTERN EQU 000000b25h
GL_LINE_STIPPLE_REPEAT EQU 000000b26h
GL_LIST_MODE EQU 000000b30h
GL_MAX_LIST_NESTING EQU 000000b31h
GL_LIST_BASE EQU 000000b32h
GL_LIST_INDEX EQU 000000b33h
GL_POLYGON_MODE EQU 000000b40h
GL_POLYGON_SMOOTH EQU 000000b41h
GL_POLYGON_STIPPLE EQU 000000b42h
GL_EDGE_FLAG EQU 000000b43h
GL_CULL_FACE EQU 000000b44h
GL_CULL_FACE_MODE EQU 000000b45h
GL_FRONT_FACE EQU 000000b46h
GL_LIGHTING EQU 000000b50h
GL_LIGHT_MODEL_LOCAL_VIEWER EQU 000000b51h
GL_LIGHT_MODEL_TWO_SIDE EQU 000000b52h
GL_LIGHT_MODEL_AMBIENT EQU 000000b53h
GL_SHADE_MODEL EQU 000000b54h
GL_COLOR_MATERIAL_FACE EQU 000000b55h
GL_COLOR_MATERIAL_PARAMETER EQU 000000b56h
GL_COLOR_MATERIAL EQU 000000b57h
GL_FOG EQU 000000b60h
GL_FOG_INDEX EQU 000000b61h
GL_FOG_DENSITY EQU 000000b62h
GL_FOG_START EQU 000000b63h
GL_FOG_END EQU 000000b64h
GL_FOG_MODE EQU 000000b65h
GL_FOG_COLOR EQU 000000b66h
GL_DEPTH_RANGE EQU 000000b70h
GL_DEPTH_TEST EQU 000000b71h
GL_DEPTH_WRITEMASK EQU 000000b72h
GL_DEPTH_CLEAR_VALUE EQU 000000b73h
GL_DEPTH_FUNC EQU 000000b74h
GL_ACCUM_CLEAR_VALUE EQU 000000b80h
GL_STENCIL_TEST EQU 000000b90h
GL_STENCIL_CLEAR_VALUE EQU 000000b91h
GL_STENCIL_FUNC EQU 000000b92h
GL_STENCIL_VALUE_MASK EQU 000000b93h
GL_STENCIL_FAIL EQU 000000b94h
GL_STENCIL_PASS_DEPTH_FAIL EQU 000000b95h
GL_STENCIL_PASS_DEPTH_PASS EQU 000000b96h
GL_STENCIL_REF EQU 000000b97h
GL_STENCIL_WRITEMASK EQU 000000b98h
GL_MATRIX_MODE EQU 000000ba0h
GL_NORMALIZE EQU 000000ba1h
GL_VIEWPORT EQU 000000ba2h
GL_MODELVIEW_STACK_DEPTH EQU 000000ba3h
GL_PROJECTION_STACK_DEPTH EQU 000000ba4h
GL_TEXTURE_STACK_DEPTH EQU 000000ba5h
GL_MODELVIEW_MATRIX EQU 000000ba6h
GL_PROJECTION_MATRIX EQU 000000ba7h
GL_TEXTURE_MATRIX EQU 000000ba8h
GL_ATTRIB_STACK_DEPTH EQU 000000bb0h
GL_CLIENT_ATTRIB_STACK_DEPTH EQU 000000bb1h
GL_ALPHA_TEST EQU 000000bc0h
GL_ALPHA_TEST_FUNC EQU 000000bc1h
GL_ALPHA_TEST_REF EQU 000000bc2h
GL_DITHER EQU 000000bd0h
GL_BLEND_DST EQU 000000be0h
GL_BLEND_SRC EQU 000000be1h
GL_BLEND EQU 000000be2h
GL_LOGIC_OP_MODE EQU 000000bf0h
GL_INDEX_LOGIC_OP EQU 000000bf1h
GL_LOGIC_OP EQU GL_INDEX_LOGIC_OP
GL_COLOR_LOGIC_OP EQU 000000bf2h
GL_AUX_BUFFERS EQU 000000c00h
GL_DRAW_BUFFER EQU 000000c01h
GL_READ_BUFFER EQU 000000c02h
GL_SCISSOR_BOX EQU 000000c10h
GL_SCISSOR_TEST EQU 000000c11h
GL_INDEX_CLEAR_VALUE EQU 000000c20h
GL_INDEX_WRITEMASK EQU 000000c21h
GL_COLOR_CLEAR_VALUE EQU 000000c22h
GL_COLOR_WRITEMASK EQU 000000c23h
GL_INDEX_MODE EQU 000000c30h
GL_RGBA_MODE EQU 000000c31h
GL_DOUBLEBUFFER EQU 000000c32h
GL_STEREO EQU 000000c33h
GL_RENDER_MODE EQU 000000c40h
GL_PERSPECTIVE_CORRECTION_HINT EQU 000000c50h
GL_POINT_SMOOTH_HINT EQU 000000c51h
GL_LINE_SMOOTH_HINT EQU 000000c52h
GL_POLYGON_SMOOTH_HINT EQU 000000c53h
GL_FOG_HINT EQU 000000c54h
GL_TEXTURE_GEN_S EQU 000000c60h
GL_TEXTURE_GEN_T EQU 000000c61h
GL_TEXTURE_GEN_R EQU 000000c62h
GL_TEXTURE_GEN_Q EQU 000000c63h
GL_PIXEL_MAP_I_TO_I_SIZE EQU 000000cb0h
GL_PIXEL_MAP_S_TO_S_SIZE EQU 000000cb1h
GL_PIXEL_MAP_I_TO_R_SIZE EQU 000000cb2h
GL_PIXEL_MAP_I_TO_G_SIZE EQU 000000cb3h
GL_PIXEL_MAP_I_TO_B_SIZE EQU 000000cb4h
GL_PIXEL_MAP_I_TO_A_SIZE EQU 000000cb5h
GL_PIXEL_MAP_R_TO_R_SIZE EQU 000000cb6h
GL_PIXEL_MAP_G_TO_G_SIZE EQU 000000cb7h
GL_PIXEL_MAP_B_TO_B_SIZE EQU 000000cb8h
GL_PIXEL_MAP_A_TO_A_SIZE EQU 000000cb9h
GL_UNPACK_SWAP_BYTES EQU 000000cf0h
GL_UNPACK_LSB_FIRST EQU 000000cf1h
GL_UNPACK_ROW_LENGTH EQU 000000cf2h
GL_UNPACK_SKIP_ROWS EQU 000000cf3h
GL_UNPACK_SKIP_PIXELS EQU 000000cf4h
GL_UNPACK_ALIGNMENT EQU 000000cf5h
GL_PACK_SWAP_BYTES EQU 000000d00h
GL_PACK_LSB_FIRST EQU 000000d01h
GL_PACK_ROW_LENGTH EQU 000000d02h
GL_PACK_SKIP_ROWS EQU 000000d03h
GL_PACK_SKIP_PIXELS EQU 000000d04h
GL_PACK_ALIGNMENT EQU 000000d05h
GL_MAP_COLOR EQU 000000d10h
GL_MAP_STENCIL EQU 000000d11h
GL_INDEX_SHIFT EQU 000000d12h
GL_INDEX_OFFSET EQU 000000d13h
GL_RED_SCALE EQU 000000d14h
GL_RED_BIAS EQU 000000d15h
GL_ZOOM_X EQU 000000d16h
GL_ZOOM_Y EQU 000000d17h
GL_GREEN_SCALE EQU 000000d18h
GL_GREEN_BIAS EQU 000000d19h
GL_BLUE_SCALE EQU 000000d1ah
GL_BLUE_BIAS EQU 000000d1bh
GL_ALPHA_SCALE EQU 000000d1ch
GL_ALPHA_BIAS EQU 000000d1dh
GL_DEPTH_SCALE EQU 000000d1eh
GL_DEPTH_BIAS EQU 000000d1fh
GL_MAX_EVAL_ORDER EQU 000000d30h
GL_MAX_LIGHTS EQU 000000d31h
GL_MAX_CLIP_PLANES EQU 000000d32h
GL_MAX_TEXTURE_SIZE EQU 000000d33h
GL_MAX_PIXEL_MAP_TABLE EQU 000000d34h
GL_MAX_ATTRIB_STACK_DEPTH EQU 000000d35h
GL_MAX_MODELVIEW_STACK_DEPTH EQU 000000d36h
GL_MAX_NAME_STACK_DEPTH EQU 000000d37h
GL_MAX_PROJECTION_STACK_DEPTH EQU 000000d38h
GL_MAX_TEXTURE_STACK_DEPTH EQU 000000d39h
GL_MAX_VIEWPORT_DIMS EQU 000000d3ah
GL_MAX_CLIENT_ATTRIB_STACK_DEPTH EQU 000000d3bh
GL_SUBPIXEL_BITS EQU 000000d50h
GL_INDEX_BITS EQU 000000d51h
GL_RED_BITS EQU 000000d52h
GL_GREEN_BITS EQU 000000d53h
GL_BLUE_BITS EQU 000000d54h
GL_ALPHA_BITS EQU 000000d55h
GL_DEPTH_BITS EQU 000000d56h
GL_STENCIL_BITS EQU 000000d57h
GL_ACCUM_RED_BITS EQU 000000d58h
GL_ACCUM_GREEN_BITS EQU 000000d59h
GL_ACCUM_BLUE_BITS EQU 000000d5ah
GL_ACCUM_ALPHA_BITS EQU 000000d5bh
GL_NAME_STACK_DEPTH EQU 000000d70h
GL_AUTO_NORMAL EQU 000000d80h
GL_MAP1_COLOR_4 EQU 000000d90h
GL_MAP1_INDEX EQU 000000d91h
GL_MAP1_NORMAL EQU 000000d92h
GL_MAP1_TEXTURE_COORD_1 EQU 000000d93h
GL_MAP1_TEXTURE_COORD_2 EQU 000000d94h
GL_MAP1_TEXTURE_COORD_3 EQU 000000d95h
GL_MAP1_TEXTURE_COORD_4 EQU 000000d96h
GL_MAP1_VERTEX_3 EQU 000000d97h
GL_MAP1_VERTEX_4 EQU 000000d98h
GL_MAP2_COLOR_4 EQU 000000db0h
GL_MAP2_INDEX EQU 000000db1h
GL_MAP2_NORMAL EQU 000000db2h
GL_MAP2_TEXTURE_COORD_1 EQU 000000db3h
GL_MAP2_TEXTURE_COORD_2 EQU 000000db4h
GL_MAP2_TEXTURE_COORD_3 EQU 000000db5h
GL_MAP2_TEXTURE_COORD_4 EQU 000000db6h
GL_MAP2_VERTEX_3 EQU 000000db7h
GL_MAP2_VERTEX_4 EQU 000000db8h
GL_MAP1_GRID_DOMAIN EQU 000000dd0h
GL_MAP1_GRID_SEGMENTS EQU 000000dd1h
GL_MAP2_GRID_DOMAIN EQU 000000dd2h
GL_MAP2_GRID_SEGMENTS EQU 000000dd3h
GL_TEXTURE_1D EQU 000000de0h
GL_TEXTURE_2D EQU 000000de1h
GL_FEEDBACK_BUFFER_POINTER EQU 000000df0h
GL_FEEDBACK_BUFFER_SIZE EQU 000000df1h
GL_FEEDBACK_BUFFER_TYPE EQU 000000df2h
GL_SELECTION_BUFFER_POINTER EQU 000000df3h
GL_SELECTION_BUFFER_SIZE EQU 000000df4h
GL_POLYGON_OFFSET_UNITS EQU 000002a00h
GL_POLYGON_OFFSET_POINT EQU 000002a01h
GL_POLYGON_OFFSET_LINE EQU 000002a02h
GL_POLYGON_OFFSET_FILL EQU 000008037h
GL_POLYGON_OFFSET_FACTOR EQU 000008038h
GL_TEXTURE_BINDING_1D EQU 000008068h
GL_TEXTURE_BINDING_2D EQU 000008069h
GL_VERTEX_ARRAY EQU 000008074h
GL_NORMAL_ARRAY EQU 000008075h
GL_COLOR_ARRAY EQU 000008076h
GL_INDEX_ARRAY EQU 000008077h
GL_TEXTURE_COORD_ARRAY EQU 000008078h
GL_EDGE_FLAG_ARRAY EQU 000008079h
GL_VERTEX_ARRAY_SIZE EQU 00000807ah
GL_VERTEX_ARRAY_TYPE EQU 00000807bh
GL_VERTEX_ARRAY_STRIDE EQU 00000807ch
GL_NORMAL_ARRAY_TYPE EQU 00000807eh
GL_NORMAL_ARRAY_STRIDE EQU 00000807fh
GL_COLOR_ARRAY_SIZE EQU 000008081h
GL_COLOR_ARRAY_TYPE EQU 000008082h
GL_COLOR_ARRAY_STRIDE EQU 000008083h
GL_INDEX_ARRAY_TYPE EQU 000008085h
GL_INDEX_ARRAY_STRIDE EQU 000008086h
GL_TEXTURE_COORD_ARRAY_SIZE EQU 000008088h
GL_TEXTURE_COORD_ARRAY_TYPE EQU 000008089h
GL_TEXTURE_COORD_ARRAY_STRIDE EQU 00000808ah
GL_EDGE_FLAG_ARRAY_STRIDE EQU 00000808ch
;/* GetTextureParameter */
GL_TEXTURE_WIDTH EQU 000001000h
GL_TEXTURE_HEIGHT EQU 000001001h
GL_TEXTURE_INTERNAL_FORMAT EQU 000001003h
GL_TEXTURE_COMPONENTS EQU 000001003h
GL_TEXTURE_BORDER_COLOR EQU 000001004h
GL_TEXTURE_BORDER EQU 000001005h
GL_TEXTURE_RED_SIZE EQU 00000805ch
GL_TEXTURE_GREEN_SIZE EQU 00000805dh
GL_TEXTURE_BLUE_SIZE EQU 00000805eh
GL_TEXTURE_ALPHA_SIZE EQU 00000805fh
GL_TEXTURE_LUMINANCE_SIZE EQU 000008060h
GL_TEXTURE_INTENSITY_SIZE EQU 000008061h
GL_TEXTURE_PRIORITY EQU 000008066h
GL_TEXTURE_RESIDENT EQU 000008067h
;/* HintMode */
GL_DONT_CARE EQU 000001100h
GL_FASTEST EQU 000001101h
GL_NICEST EQU 000001102h
;/* LightParameter */
GL_AMBIENT EQU 000001200h
GL_DIFFUSE EQU 000001201h
GL_SPECULAR EQU 000001202h
GL_POSITION EQU 000001203h
GL_SPOT_DIRECTION EQU 000001204h
GL_SPOT_EXPONENT EQU 000001205h
GL_SPOT_CUTOFF EQU 000001206h
GL_CONSTANT_ATTENUATION EQU 000001207h
GL_LINEAR_ATTENUATION EQU 000001208h
GL_QUADRATIC_ATTENUATION EQU 000001209h
;/* ListMode */
GL_COMPILE EQU 000001300h
GL_COMPILE_AND_EXECUTE EQU 000001301h
;/* DataType */
GL_BYTE EQU 000001400h
GL_UNSIGNED_BYTE EQU 000001401h
GL_SHORT EQU 000001402h
GL_UNSIGNED_SHORT EQU 000001403h
GL_INT EQU 000001404h
GL_UNSIGNED_INT EQU 000001405h
GL_FLOAT EQU 000001406h
GL_2_BYTES EQU 000001407h
GL_3_BYTES EQU 000001408h
GL_4_BYTES EQU 000001409h
GL_DOUBLE EQU 00000140ah
GL_DOUBLE_EXT EQU 00000140ah
;/* ListNameType */
; GL_BYTE
; GL_UNSIGNED_BYTE */
; GL_SHORT */
; GL_UNSIGNED_SHORT */
; GL_INT */
; GL_UNSIGNED_INT */
; GL_FLOAT */
; GL_2_BYTES */
; GL_3_BYTES */
; GL_4_BYTES */
;/* LogicOp */
GL_CLEAR EQU 000001500h
GL_AND EQU 000001501h
GL_AND_REVERSE EQU 000001502h
GL_COPY EQU 000001503h
GL_AND_INVERTED EQU 000001504h
GL_NOOP EQU 000001505h
GL_XOR EQU 000001506h
GL_OR EQU 000001507h
GL_NOR EQU 000001508h
GL_EQUIV EQU 000001509h
GL_INVERT EQU 00000150ah
GL_OR_REVERSE EQU 00000150bh
GL_COPY_INVERTED EQU 00000150ch
GL_OR_INVERTED EQU 00000150dh
GL_NAND EQU 00000150eh
GL_SET EQU 00000150fh
;/* MaterialParameter */
GL_EMISSION EQU 000001600h
GL_SHININESS EQU 000001601h
GL_AMBIENT_AND_DIFFUSE EQU 000001602h
GL_COLOR_INDEXES EQU 000001603h
; GL_AMBIENT
; GL_DIFFUSE
; GL_SPECULAR
;/* MatrixMode */
GL_MODELVIEW EQU 000001700h
GL_PROJECTION EQU 000001701h
GL_TEXTURE EQU 000001702h
;/* PixelCopyType */
GL_COLOR EQU 000001800h
GL_DEPTH EQU 000001801h
GL_STENCIL EQU 000001802h
;/* PixelFormat */
GL_COLOR_INDEX EQU 000001900h
GL_STENCIL_INDEX EQU 000001901h
GL_DEPTH_COMPONENT EQU 000001902h
GL_RED EQU 000001903h
GL_GREEN EQU 000001904h
GL_BLUE EQU 000001905h
GL_ALPHA EQU 000001906h
GL_RGB EQU 000001907h
GL_RGBA EQU 000001908h
GL_LUMINANCE EQU 000001909h
GL_LUMINANCE_ALPHA EQU 00000190ah
;/* PixelType */
GL_BITMAP EQU 000001a00h
;/* PolygonMode */
GL_POINT EQU 000001b00h
GL_LINE EQU 000001b01h
GL_FILL EQU 000001b02h
;/* RenderingMode */
GL_RENDER EQU 000001c00h
GL_FEEDBACK EQU 000001c01h
GL_SELECT EQU 000001c02h
;/* ShadingModel */
GL_FLAT EQU 000001d00h
GL_SMOOTH EQU 000001d01h
;/* StencilOp */
; GL_ZERO
GL_KEEP EQU 000001e00h
GL_REPLACE EQU 000001e01h
GL_INCR EQU 000001e02h
GL_DECR EQU 000001e03h
; GL_INVERT
;/* StringName */
GL_VENDOR EQU 000001f00h
GL_RENDERER EQU 000001f01h
GL_VERSION EQU 000001f02h
GL_EXTENSIONS EQU 000001f03h
;/* TextureCoordName */
GL_S EQU 000002000h
GL_T EQU 000002001h
GL_R EQU 000002002h
GL_Q EQU 000002003h
;/* TextureEnvMode */
GL_MODULATE EQU 000002100h
GL_DECAL EQU 000002101h
; GL_BLEND
; GL_REPLACE
; GL_ADD
;/* TextureEnvParameter */
GL_TEXTURE_ENV_MODE EQU 000002200h
GL_TEXTURE_ENV_COLOR EQU 000002201h
;/* TextureEnvTarget */
GL_TEXTURE_ENV EQU 000002300h
;/* TextureGenMode */
GL_EYE_LINEAR EQU 000002400h
GL_OBJECT_LINEAR EQU 000002401h
GL_SPHERE_MAP EQU 000002402h
;/* TextureGenParameter */
GL_TEXTURE_GEN_MODE EQU 000002500h
GL_OBJECT_PLANE EQU 000002501h
GL_EYE_PLANE EQU 000002502h
;/* TextureMagFilter */
GL_NEAREST EQU 000002600h
GL_LINEAR EQU 000002601h
;/* TextureMinFilter */
; GL_NEAREST
; GL_LINEAR
GL_NEAREST_MIPMAP_NEAREST EQU 000002700h
GL_LINEAR_MIPMAP_NEAREST EQU 000002701h
GL_NEAREST_MIPMAP_LINEAR EQU 000002702h
GL_LINEAR_MIPMAP_LINEAR EQU 000002703h
;/* TextureParameterName */
GL_TEXTURE_MAG_FILTER EQU 000002800h
GL_TEXTURE_MIN_FILTER EQU 000002801h
GL_TEXTURE_WRAP_S EQU 000002802h
GL_TEXTURE_WRAP_T EQU 000002803h
;/* TextureTarget */
GL_PROXY_TEXTURE_1D EQU 000008063h
GL_PROXY_TEXTURE_2D EQU 000008064h
;/* TextureWrapMode */
GL_CLAMP EQU 000002900h
GL_REPEAT EQU 000002901h
;/* PixelInternalFormat */
GL_R3_G3_B2 EQU 000002a10h
GL_ALPHA4 EQU 00000803bh
GL_ALPHA8 EQU 00000803ch
GL_ALPHA12 EQU 00000803dh
GL_ALPHA16 EQU 00000803eh
GL_LUMINANCE4 EQU 00000803fh
GL_LUMINANCE8 EQU 000008040h
GL_LUMINANCE12 EQU 000008041h
GL_LUMINANCE16 EQU 000008042h
GL_LUMINANCE4_ALPHA4 EQU 000008043h
GL_LUMINANCE6_ALPHA2 EQU 000008044h
GL_LUMINANCE8_ALPHA8 EQU 000008045h
GL_LUMINANCE12_ALPHA4 EQU 000008046h
GL_LUMINANCE12_ALPHA12 EQU 000008047h
GL_LUMINANCE16_ALPHA16 EQU 000008048h
GL_INTENSITY EQU 000008049h
GL_INTENSITY4 EQU 00000804ah
GL_INTENSITY8 EQU 00000804bh
GL_INTENSITY12 EQU 00000804ch
GL_INTENSITY16 EQU 00000804dh
GL_RGB4 EQU 00000804fh
GL_RGB5 EQU 000008050h
GL_RGB8 EQU 000008051h
GL_RGB10 EQU 000008052h
GL_RGB12 EQU 000008053h
GL_RGB16 EQU 000008054h
GL_RGBA2 EQU 000008055h
GL_RGBA4 EQU 000008056h
GL_RGB5_A1 EQU 000008057h
GL_RGBA8 EQU 000008058h
GL_RGB10_A2 EQU 000008059h
GL_RGBA12 EQU 00000805ah
GL_RGBA16 EQU 00000805bh
;/* InterleavedArrayFormat */
GL_V2F EQU 000002a20h
GL_V3F EQU 000002a21h
GL_C4UB_V2F EQU 000002a22h
GL_C4UB_V3F EQU 000002a23h
GL_C3F_V3F EQU 000002a24h
GL_N3F_V3F EQU 000002a25h
GL_C4F_N3F_V3F EQU 000002a26h
GL_T2F_V3F EQU 000002a27h
GL_T4F_V4F EQU 000002a28h
GL_T2F_C4UB_V3F EQU 000002a29h
GL_T2F_C3F_V3F EQU 000002a2ah
GL_T2F_N3F_V3F EQU 000002a2bh
GL_T2F_C4F_N3F_V3F EQU 000002a2ch
GL_T4F_C4F_N3F_V4F EQU 000002a2dh
;/* ClipPlaneName */
GL_CLIP_PLANE0 EQU 000003000h
GL_CLIP_PLANE1 EQU 000003001h
GL_CLIP_PLANE2 EQU 000003002h
GL_CLIP_PLANE3 EQU 000003003h
GL_CLIP_PLANE4 EQU 000003004h
GL_CLIP_PLANE5 EQU 000003005h
;/* LightName */
GL_LIGHT0 EQU 000004000h
GL_LIGHT1 EQU 000004001h
GL_LIGHT2 EQU 000004002h
GL_LIGHT3 EQU 000004003h
GL_LIGHT4 EQU 000004004h
GL_LIGHT5 EQU 000004005h
GL_LIGHT6 EQU 000004006h
GL_LIGHT7 EQU 000004007h
;/* EXT_abgr */
GL_ABGR_EXT EQU 000008000h
;/* EXT_packed_pixels */
GL_UNSIGNED_BYTE_3_3_2_EXT EQU 000008032h
GL_UNSIGNED_SHORT_4_4_4_4_EXT EQU 000008033h
GL_UNSIGNED_SHORT_5_5_5_1_EXT EQU 000008034h
GL_UNSIGNED_INT_8_8_8_8_EXT EQU 000008035h
GL_UNSIGNED_INT_10_10_10_2_EXT EQU 000008036h
;/* EXT_vertex_array */
GL_VERTEX_ARRAY_EXT EQU 000008074h
GL_NORMAL_ARRAY_EXT EQU 000008075h
GL_COLOR_ARRAY_EXT EQU 000008076h
GL_INDEX_ARRAY_EXT EQU 000008077h
GL_TEXTURE_COORD_ARRAY_EXT EQU 000008078h
GL_EDGE_FLAG_ARRAY_EXT EQU 000008079h
GL_VERTEX_ARRAY_SIZE_EXT EQU 00000807ah
GL_VERTEX_ARRAY_TYPE_EXT EQU 00000807bh
GL_VERTEX_ARRAY_STRIDE_EXT EQU 00000807ch
GL_VERTEX_ARRAY_COUNT_EXT EQU 00000807dh
GL_NORMAL_ARRAY_TYPE_EXT EQU 00000807eh
GL_NORMAL_ARRAY_STRIDE_EXT EQU 00000807fh
GL_NORMAL_ARRAY_COUNT_EXT EQU 000008080h
GL_COLOR_ARRAY_SIZE_EXT EQU 000008081h
GL_COLOR_ARRAY_TYPE_EXT EQU 000008082h
GL_COLOR_ARRAY_STRIDE_EXT EQU 000008083h
GL_COLOR_ARRAY_COUNT_EXT EQU 000008084h
GL_INDEX_ARRAY_TYPE_EXT EQU 000008085h
GL_INDEX_ARRAY_STRIDE_EXT EQU 000008086h
GL_INDEX_ARRAY_COUNT_EXT EQU 000008087h
GL_TEXTURE_COORD_ARRAY_SIZE_EXT EQU 000008088h
GL_TEXTURE_COORD_ARRAY_TYPE_EXT EQU 000008089h
GL_TEXTURE_COORD_ARRAY_STRIDE_EXT EQU 00000808ah
GL_TEXTURE_COORD_ARRAY_COUNT_EXT EQU 00000808bh
GL_EDGE_FLAG_ARRAY_STRIDE_EXT EQU 00000808ch
GL_EDGE_FLAG_ARRAY_COUNT_EXT EQU 00000808dh
GL_VERTEX_ARRAY_POINTER_EXT EQU 00000808eh
GL_NORMAL_ARRAY_POINTER_EXT EQU 00000808fh
GL_COLOR_ARRAY_POINTER_EXT EQU 000008090h
GL_INDEX_ARRAY_POINTER_EXT EQU 000008091h
GL_TEXTURE_COORD_ARRAY_POINTER_EXT EQU 000008092h
GL_EDGE_FLAG_ARRAY_POINTER_EXT EQU 000008093h
;/* EXT_color_table */
GL_TABLE_TOO_LARGE_EXT EQU 000008031h
GL_COLOR_TABLE_FORMAT_EXT EQU 0000080d8h
GL_COLOR_TABLE_WIDTH_EXT EQU 0000080d9h
GL_COLOR_TABLE_RED_SIZE_EXT EQU 0000080dah
GL_COLOR_TABLE_GREEN_SIZE_EXT EQU 0000080dbh
GL_COLOR_TABLE_BLUE_SIZE_EXT EQU 0000080dch
GL_COLOR_TABLE_ALPHA_SIZE_EXT EQU 0000080ddh
GL_COLOR_TABLE_LUMINANCE_SIZE_EXT EQU 0000080deh
GL_COLOR_TABLE_INTENSITY_SIZE_EXT EQU 0000080dfh
;/* EXT_bgra */
GL_BGR_EXT EQU 0000080e0h
GL_BGRA_EXT EQU 0000080e1h
;/* EXT_paletted_texture */
GL_COLOR_INDEX1_EXT EQU 0000080e2h
GL_COLOR_INDEX2_EXT EQU 0000080e3h
GL_COLOR_INDEX4_EXT EQU 0000080e4h
GL_COLOR_INDEX8_EXT EQU 0000080e5h
GL_COLOR_INDEX12_EXT EQU 0000080e6h
GL_COLOR_INDEX16_EXT EQU 0000080e7h
;/* SGI_compiled_vertex_array */
GL_ARRAY_ELEMENT_LOCK_FIRST_SGI EQU 0000081a8h
GL_ARRAY_ELEMENT_LOCK_COUNT_SGI EQU 0000081a9h
;/* SGI_index_array_formats */
GL_CULL_VERTEX_SGI EQU 0000081aah
GL_CULL_VERTEX_EYE_POSITION_SGI EQU 0000081abh
GL_CULL_VERTEX_OBJECT_POSITION_SGI EQU 0000081ach
GL_IUI_V2F_SGI EQU 0000081adh
GL_IUI_V3F_SGI EQU 0000081aeh
GL_IUI_N3F_V2F_SGI EQU 0000081afh
GL_IUI_N3F_V3F_SGI EQU 0000081b0h
GL_T2F_IUI_V2F_SGI EQU 0000081b1h
GL_T2F_IUI_V3F_SGI EQU 0000081b2h
GL_T2F_IUI_N3F_V2F_SGI EQU 0000081b3h
GL_T2F_IUI_N3F_V3F_SGI EQU 0000081b4h
;/* SGI_index_func */
GL_INDEX_TEST_SGI EQU 0000081b5h
GL_INDEX_TEST_FUNC_SGI EQU 0000081b6h
GL_INDEX_TEST_REF_SGI EQU 0000081b7h
;/* SGI_index_material */
GL_INDEX_MATERIAL_SGI EQU 0000081b8h
GL_INDEX_MATERIAL_PARAMETER_SGI EQU 0000081b9h
GL_INDEX_MATERIAL_FACE_SGI EQU 0000081bah
%macro gl_movf 2
db 0x68
dd %2
pop %1
%endmacro
%macro gl_fpush 1
push dword %1
%endmacro
%macro dpush 1
push dword %1
%endmacro
%macro gl_dpush 1
push dword %1+4
push dword %1
%endmacro
%macro _glFrustum 6
gl_dpush %6
gl_dpush %5
gl_dpush %4
gl_dpush %3
gl_dpush %2
gl_dpush %1
call glFrustum
%endmacro
%macro _glOrtho 6
gl_dpush %6
gl_dpush %5
gl_dpush %4
gl_dpush %3
gl_dpush %2
gl_dpush %1
call glOrtho
%endmacro
%macro _glDepthRange 2
gl_dpush %2
gl_dpush %1
call glDepthRange
%endmacro
%macro _glTranslatef 3
gl_fpush %3
gl_fpush %2
gl_fpush %1
call glTranslatef
%endmacro
%macro _glRotatef 4
gl_fpush %4
gl_fpush %3
gl_fpush %2
gl_fpush %1
call glRotatef
%endmacro
%macro _glNormal3f 3
gl_fpush %3
gl_fpush %2
gl_fpush %1
call glNormal3f
%endmacro
%macro _glVertex3f 3
gl_fpush %3
gl_fpush %2
gl_fpush %1
call glVertex3f
%endmacro
%macro _glVertex2f 2
gl_fpush %2
gl_fpush %1
call glVertex2f
%endmacro
%macro _glColor3f 3
gl_fpush %3
gl_fpush %2
gl_fpush %1
call glColor3f
%endmacro
%macro _glColor4f 4
gl_fpush %4
gl_fpush %3
gl_fpush %2
gl_fpush %1
call [glColor4f]
%endmacro
%macro _glTexCoord2f 2
gl_fpush %2
gl_fpush %1
call glTexCoord2f
%endmacro
%macro _glTexEnvfv 3
dpush %3
dpush %2
dpush %1
call glTexEnvfv
%endmacro
%macro _glTexEnvf 3
gl_fpush %3
dpush %2
dpush %1
call glTexEnvf
%endmacro
%macro _glTexEnvi 3
dpush %3
dpush %2
dpush %1
call glTexEnvf
%endmacro
%macro _glTexParameterf 3
gl_fpush %3
dpush %2
dpush %1
call glTexParameterf
%endmacro
%macro _glTexParameteri 3
dpush %3
dpush %2
dpush %1
call glTexParameteri
%endmacro
%macro _glBegin 1
dpush %1
call glBegin
%endmacro
%macro _glEnd 0
call glEnd
%endmacro