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
  
array funcEV = ({ 
  "glBegin", 
  "glCullFace", 
  "glDepthFunc", 
  "glDisable", 
  "glDisableClientState", 
  "glDrawBuffer", 
  "glEnable", 
  "glEnableClientState", 
  "glFrontFace", 
  "glLogicOp", 
  "glMatrixMode", 
  "glReadBuffer", 
  "glRenderMode", 
  "glShadeModel", 
}); 
array funcV = ({ 
  "glEnd", 
  "glEndList", 
  "glFinish", 
  "glFlush", 
  "glInitNames", 
  "glLoadIdentity", 
  "glPopAttrib", 
  "glPopClientAttrib", 
  "glPopMatrix", 
  "glPopName", 
  "glPushMatrix", 
}); 
array func_misc = ({ 
  ({"glAccum", "VEF"}), 
  ({"glAlphaFunc", "VEF"}), 
  ({"glArrayElement", "VI"}), 
  ({"glBindTexture","VEI"}), 
  ({"glBlendFunc", "VEE"}), 
  ({"glCallList","VI"}), 
  ({"glClear","VB"}), 
  ({"glClearAccum", "V+FFFF"}), 
  ({"glClearColor", "V+FFFF"}), 
  ({"glClearDepth", "VD"}), 
  ({"glClearIndex", "VF"}), 
  ({"glClearStencil", "VI"}), 
  ({"glClipPlane", "VE=DDDD"}), 
  ({"glColor", "V+ZZZZ"}), 
  ({"glColorMask", "VOOOO"}), 
  ({"glColorMaterial", "VEE"}), 
  ({"glCopyPixels", "VIIIIE"}), 
  ({"glCopyTexImage1D", "VEIEIIII"}), 
  ({"glCopyTexImage2D", "VEIEIIIII"}), 
  ({"glCopyTexSubImage1D", "VEIIIII"}), 
  ({"glCopyTexSubImage2D", "VEIIIIIII"}), 
  ({"glDeleteLists", "VII"}), 
  ({"glDepthMask", "VO"}), 
  ({"glDepthRange", "VDD"}), 
  ({"glDrawArrays", "VEII"}), 
  ({"glDrawPixels", "Vwhfti"}), 
  ({"glEdgeFlag", "VO"}), 
  ({"glEvalCoord", "V+RR"}), 
  ({"glEvalPoint", "V+II"}), 
  ({"glFog","VE@Q"}), 
  ({"glFrustum", "VDDDDDD"}), 
  ({"glGenLists", "II"}), 
  ({"glGetError", "E"}), 
  ({"glGetString", "SE"}), 
  ({"glGetTexImage", "VEIII&"}), 
  ({"glHint", "VEE"}), 
  ({"glIndex", "VZ"}), 
  ({"glIndexMask", "VI"}), 
  ({"glIsEnabled", "OE"}), 
  ({"glIsList", "OI"}), 
  ({"glIsTexture", "OI"}), 
  ({"glLight", "VEE@Q"}), 
  ({"glLightModel", "VE@Q"}), 
  ({"glLineStipple", "VII"}), 
  ({"glLineWidth", "VF"}), 
  ({"glListBase", "VI"}), 
  ({"glLoadMatrix", "V[16R"}), 
  ({"glLoadName", "VI"}), 
  ({"glMaterial", "VEE@Q"}), 
  ({"glMultMatrix", "V[16R"}), 
  ({"glNewList", "VIE"}), 
  ({"glNormal", "V#ZZZ"}), 
  ({"glOrtho", "VDDDDDD"}), 
  ({"glPassThrough", "VF"}), 
  ({"glPixelZoom", "VFF"}), 
  ({"glPointSize", "VF"}), 
  ({"glPolygonMode", "VEE"}), 
  ({"glPolygonOffset", "VFF"}), 
  ({"glPushAttrib", "VB"}), 
  ({"glPushClientAttrib", "VB"}), 
  ({"glPushName", "VI"}), 
  ({"glRasterPos", "V+ZZZ"}), 
  ({"glRotate", "V!RRRR"}), 
  ({"glScale", "V!RRR"}), 
  ({"glScissor", "VIIII"}), 
  ({"glStencilFunc", "VEII"}), 
  ({"glStencilMask", "VI"}), 
  ({"glStencilOp", "VEEE"}), 
  ({"glTexCoord", "V+Z"}), 
  ({"glTexEnv","VEE@Q"}), 
  ({"glTexGen","VEE@Z"}), 
  ({"glTexImage2D","VEIIwhIfti"}), 
  ({"glTexParameter","VEE@Q"}), 
  ({"glTexSubImage2D","VEIIIwhfti"}), 
  ({"glTranslate", "V!RRR"}), 
  ({"glVertex","V+ZZZ"}), 
  ({"glViewport", "VIIII"}), 
}); 
mapping func_cat = ([ 
  "VE":funcEV, 
  "V":funcV, 
]); 
 
/* 
  Not implemented: 
 
  glAreTexturesResident 
  glBitmap 
  glCallLists 
  glColorPointer 
  glDeleteTextures 
  glDrawElements 
  glEdgeFlagPointer 
  glEvalMesh 
  glFeedbackBuffer 
  glGenTextures 
  glGetClipPlane 
  glGetLight 
  glGetMap 
  glGetMaterial 
  glGetPixelMap 
  glGetPointer 
  glGetPolygonStipple 
  glGetTexEnv 
  glGetTexGen 
  glGetTexLevelParameter 
  glGetTexParameter 
  glIndexPointer 
  glInterleavedArrays 
  glMap1 
  glMap2 
  glMapGrid 
  glNormalPointer 
  glPixelMap 
  glPixelTransfer 
  glPolygonStipple 
  glPrioritizeTextures 
  glReadPixels 
  glRect 
  glSelectBuffer 
  glTexCoordPointer 
  glTexImage1D 
  glTexSubImage1D 
  glVertexPoint 
 
*/