xref: /reactos/dll/opengl/opengl32/glapi_x86.s (revision ba3f0743)
1/*
2 * COPYRIGHT:            See COPYING in the top level directory
3 * PROJECT:              ReactOS
4 * FILE:                 dll/opengl/opengl32/glapi_x86.s
5 * PURPOSE:              OpenGL32 DLL
6 */
7
8/* X86 opengl API entry points, fast forward to the current thread's dispatch table */
9#include <asm.inc>
10#include <ks386.inc>
11
12.data
13ASSUME nothing
14
15.align 16
16
17.code
18
19MACRO(USE_GL_FUNC, name, offset, stack)
20PUBLIC _gl&name&@&stack
21.PROC _gl&name&@&stack
22
23    FPO 0, 0, 0, 0, 0, FRAME_FPO
24
25    /* Get the TEB */
26    mov eax, fs:[TEB_SELF]
27    /* Get the GL table */
28    mov eax, [eax + TEB_GL_TABLE]
29
30    /* If we don't have a dispatch table, this is a nop */
31    test eax, eax
32    jz name&_fast_ret
33    /* Jump into the ICD */
34    jmp dword ptr [eax+4*VAL(offset)]
35name&_fast_ret:
36    ret VAL(stack)
37.ENDP
38ENDM
39
40USE_GL_FUNC Accum, 213, 8
41USE_GL_FUNC AlphaFunc, 240, 8
42USE_GL_FUNC AreTexturesResident, 322, 12
43USE_GL_FUNC ArrayElement, 306, 4
44USE_GL_FUNC Begin, 7, 4
45USE_GL_FUNC BindTexture, 307, 8
46USE_GL_FUNC Bitmap, 8, 28
47USE_GL_FUNC BlendFunc, 241, 8
48USE_GL_FUNC CallList, 2, 4
49USE_GL_FUNC CallLists, 3, 12
50USE_GL_FUNC Clear, 203, 4
51USE_GL_FUNC ClearAccum, 204, 16
52USE_GL_FUNC ClearColor, 206, 16
53USE_GL_FUNC ClearDepth, 208, 8
54USE_GL_FUNC ClearIndex, 205, 4
55USE_GL_FUNC ClearStencil, 207, 4
56USE_GL_FUNC ClipPlane, 150, 8
57USE_GL_FUNC Color3b, 9, 12
58USE_GL_FUNC Color3bv, 10, 4
59USE_GL_FUNC Color3d, 11, 24
60USE_GL_FUNC Color3dv, 12, 4
61USE_GL_FUNC Color3f, 13, 12
62USE_GL_FUNC Color3fv, 14, 4
63USE_GL_FUNC Color3i, 15, 12
64USE_GL_FUNC Color3iv, 16, 4
65USE_GL_FUNC Color3s, 17, 12
66USE_GL_FUNC Color3sv, 18, 4
67USE_GL_FUNC Color3ub, 19, 12
68USE_GL_FUNC Color3ubv, 20, 4
69USE_GL_FUNC Color3ui, 21, 12
70USE_GL_FUNC Color3uiv, 22, 4
71USE_GL_FUNC Color3us, 23, 12
72USE_GL_FUNC Color3usv, 24, 4
73USE_GL_FUNC Color4b, 25, 16
74USE_GL_FUNC Color4bv, 26, 4
75USE_GL_FUNC Color4d, 27, 32
76USE_GL_FUNC Color4dv, 28, 4
77USE_GL_FUNC Color4f, 29, 16
78USE_GL_FUNC Color4fv, 30, 4
79USE_GL_FUNC Color4i, 31, 16
80USE_GL_FUNC Color4iv, 32, 4
81USE_GL_FUNC Color4s, 33, 16
82USE_GL_FUNC Color4sv, 34, 4
83USE_GL_FUNC Color4ub, 35, 16
84USE_GL_FUNC Color4ubv, 36, 4
85USE_GL_FUNC Color4ui, 37, 16
86USE_GL_FUNC Color4uiv, 38, 4
87USE_GL_FUNC Color4us, 39, 16
88USE_GL_FUNC Color4usv, 40, 4
89USE_GL_FUNC ColorMask, 210, 16
90USE_GL_FUNC ColorMaterial, 151, 8
91USE_GL_FUNC ColorPointer, 308, 16
92USE_GL_FUNC CopyPixels, 255, 20
93USE_GL_FUNC CopyTexImage1D, 323, 28
94USE_GL_FUNC CopyTexImage2D, 324, 32
95USE_GL_FUNC CopyTexSubImage1D, 325, 24
96USE_GL_FUNC CopyTexSubImage2D, 326, 32
97USE_GL_FUNC CullFace, 152, 4
98USE_GL_FUNC DeleteLists, 4, 8
99USE_GL_FUNC DeleteTextures, 327, 8
100USE_GL_FUNC DepthFunc, 245, 4
101USE_GL_FUNC DepthMask, 211, 4
102USE_GL_FUNC DepthRange, 288, 16
103USE_GL_FUNC Disable, 214, 4
104USE_GL_FUNC DisableClientState, 309, 4
105USE_GL_FUNC DrawArrays, 310, 12
106USE_GL_FUNC DrawBuffer, 202, 4
107USE_GL_FUNC DrawElements, 311, 16
108USE_GL_FUNC DrawPixels, 257, 20
109USE_GL_FUNC EdgeFlag, 41, 4
110USE_GL_FUNC EdgeFlagPointer, 312, 8
111USE_GL_FUNC EdgeFlagv, 42, 4
112USE_GL_FUNC Enable, 215, 4
113USE_GL_FUNC EnableClientState, 313, 4
114USE_GL_FUNC End, 43, 0
115USE_GL_FUNC EndList, 1, 0
116USE_GL_FUNC EvalCoord1d, 228, 8
117USE_GL_FUNC EvalCoord1dv, 229, 4
118USE_GL_FUNC EvalCoord1f, 230, 4
119USE_GL_FUNC EvalCoord1fv, 231, 4
120USE_GL_FUNC EvalCoord2d, 232, 16
121USE_GL_FUNC EvalCoord2dv, 233, 4
122USE_GL_FUNC EvalCoord2f, 234, 8
123USE_GL_FUNC EvalCoord2fv, 235, 4
124USE_GL_FUNC EvalMesh1, 236, 12
125USE_GL_FUNC EvalMesh2, 238, 20
126USE_GL_FUNC EvalPoint1, 237, 4
127USE_GL_FUNC EvalPoint2, 239, 8
128USE_GL_FUNC FeedbackBuffer, 194, 12
129USE_GL_FUNC Finish, 216, 0
130USE_GL_FUNC Flush, 217, 0
131USE_GL_FUNC Fogf, 153, 8
132USE_GL_FUNC Fogfv, 154, 8
133USE_GL_FUNC Fogi, 155, 8
134USE_GL_FUNC Fogiv, 156, 8
135USE_GL_FUNC FrontFace, 157, 4
136USE_GL_FUNC Frustum, 289, 48
137USE_GL_FUNC GenLists, 5, 4
138USE_GL_FUNC GenTextures, 328, 8
139USE_GL_FUNC GetBooleanv, 258, 8
140USE_GL_FUNC GetClipPlane, 259, 8
141USE_GL_FUNC GetDoublev, 260, 8
142USE_GL_FUNC GetError, 261, 0
143USE_GL_FUNC GetFloatv, 262, 8
144USE_GL_FUNC GetIntegerv, 263, 8
145USE_GL_FUNC GetLightfv, 264, 12
146USE_GL_FUNC GetLightiv, 265, 12
147USE_GL_FUNC GetMapdv, 266, 12
148USE_GL_FUNC GetMapfv, 267, 12
149USE_GL_FUNC GetMapiv, 268, 12
150USE_GL_FUNC GetMaterialfv, 269, 12
151USE_GL_FUNC GetMaterialiv, 270, 12
152USE_GL_FUNC GetPixelMapfv, 271, 8
153USE_GL_FUNC GetPixelMapuiv, 272, 8
154USE_GL_FUNC GetPixelMapusv, 273, 8
155USE_GL_FUNC GetPointerv, 329, 8
156USE_GL_FUNC GetPolygonStipple, 274, 4
157USE_GL_FUNC GetString, 275, 4
158USE_GL_FUNC GetTexEnvfv, 276, 12
159USE_GL_FUNC GetTexEnviv, 277, 12
160USE_GL_FUNC GetTexGendv, 278, 12
161USE_GL_FUNC GetTexGenfv, 279, 12
162USE_GL_FUNC GetTexGeniv, 280, 12
163USE_GL_FUNC GetTexImage, 281, 20
164USE_GL_FUNC GetTexLevelParameterfv, 284, 16
165USE_GL_FUNC GetTexLevelParameteriv, 285, 16
166USE_GL_FUNC GetTexParameterfv, 282, 12
167USE_GL_FUNC GetTexParameteriv, 283, 12
168USE_GL_FUNC Hint, 158, 8
169USE_GL_FUNC IndexMask, 212, 4
170USE_GL_FUNC IndexPointer, 314, 12
171USE_GL_FUNC Indexd, 44, 8
172USE_GL_FUNC Indexdv, 45, 4
173USE_GL_FUNC Indexf, 46, 4
174USE_GL_FUNC Indexfv, 47, 4
175USE_GL_FUNC Indexi, 48, 4
176USE_GL_FUNC Indexiv, 49, 4
177USE_GL_FUNC Indexs, 50, 4
178USE_GL_FUNC Indexsv, 51, 4
179USE_GL_FUNC Indexub, 315, 4
180USE_GL_FUNC Indexubv, 316, 4
181USE_GL_FUNC InitNames, 197, 0
182USE_GL_FUNC InterleavedArrays, 317, 12
183USE_GL_FUNC IsEnabled, 286, 4
184USE_GL_FUNC IsList, 287, 4
185USE_GL_FUNC IsTexture, 330, 4
186USE_GL_FUNC LightModelf, 163, 8
187USE_GL_FUNC LightModelfv, 164, 8
188USE_GL_FUNC LightModeli, 165, 8
189USE_GL_FUNC LightModeliv, 166, 8
190USE_GL_FUNC Lightf, 159, 12
191USE_GL_FUNC Lightfv, 160, 12
192USE_GL_FUNC Lighti, 161, 12
193USE_GL_FUNC Lightiv, 162, 12
194USE_GL_FUNC LineStipple, 167, 8
195USE_GL_FUNC LineWidth, 168, 4
196USE_GL_FUNC ListBase, 6, 4
197USE_GL_FUNC LoadIdentity, 290, 0
198USE_GL_FUNC LoadMatrixd, 292, 4
199USE_GL_FUNC LoadMatrixf, 291, 4
200USE_GL_FUNC LoadName, 198, 4
201USE_GL_FUNC LogicOp, 242, 4
202USE_GL_FUNC Map1d, 220, 32
203USE_GL_FUNC Map1f, 221, 24
204USE_GL_FUNC Map2d, 222, 56
205USE_GL_FUNC Map2f, 223, 40
206USE_GL_FUNC MapGrid1d, 224, 20
207USE_GL_FUNC MapGrid1f, 225, 12
208USE_GL_FUNC MapGrid2d, 226, 40
209USE_GL_FUNC MapGrid2f, 227, 24
210USE_GL_FUNC Materialf, 169, 12
211USE_GL_FUNC Materialfv, 170, 12
212USE_GL_FUNC Materiali, 171, 12
213USE_GL_FUNC Materialiv, 172, 12
214USE_GL_FUNC MatrixMode, 293, 4
215USE_GL_FUNC MultMatrixd, 295, 4
216USE_GL_FUNC MultMatrixf, 294, 4
217USE_GL_FUNC NewList, 0, 8
218USE_GL_FUNC Normal3b, 52, 12
219USE_GL_FUNC Normal3bv, 53, 4
220USE_GL_FUNC Normal3d, 54, 24
221USE_GL_FUNC Normal3dv, 55, 4
222USE_GL_FUNC Normal3f, 56, 12
223USE_GL_FUNC Normal3fv, 57, 4
224USE_GL_FUNC Normal3i, 58, 12
225USE_GL_FUNC Normal3iv, 59, 4
226USE_GL_FUNC Normal3s, 60, 12
227USE_GL_FUNC Normal3sv, 61, 4
228USE_GL_FUNC NormalPointer, 318, 12
229USE_GL_FUNC Ortho, 296, 48
230USE_GL_FUNC PassThrough, 199, 4
231USE_GL_FUNC PixelMapfv, 251, 12
232USE_GL_FUNC PixelMapuiv, 252, 12
233USE_GL_FUNC PixelMapusv, 253, 12
234USE_GL_FUNC PixelStoref, 249, 8
235USE_GL_FUNC PixelStorei, 250, 8
236USE_GL_FUNC PixelTransferf, 247, 8
237USE_GL_FUNC PixelTransferi, 248, 8
238USE_GL_FUNC PixelZoom, 246, 8
239USE_GL_FUNC PointSize, 173, 4
240USE_GL_FUNC PolygonMode, 174, 8
241USE_GL_FUNC PolygonOffset, 319, 8
242USE_GL_FUNC PolygonStipple, 175, 4
243USE_GL_FUNC PopAttrib, 218, 0
244USE_GL_FUNC PopClientAttrib, 334, 0
245USE_GL_FUNC PopMatrix, 297, 0
246USE_GL_FUNC PopName, 200, 0
247USE_GL_FUNC PrioritizeTextures, 331, 12
248USE_GL_FUNC PushAttrib, 219, 4
249USE_GL_FUNC PushClientAttrib, 335, 4
250USE_GL_FUNC PushMatrix, 298, 0
251USE_GL_FUNC PushName, 201, 4
252USE_GL_FUNC RasterPos2d, 62, 16
253USE_GL_FUNC RasterPos2dv, 63, 4
254USE_GL_FUNC RasterPos2f, 64, 8
255USE_GL_FUNC RasterPos2fv, 65, 4
256USE_GL_FUNC RasterPos2i, 66, 8
257USE_GL_FUNC RasterPos2iv, 67, 4
258USE_GL_FUNC RasterPos2s, 68, 8
259USE_GL_FUNC RasterPos2sv, 69, 4
260USE_GL_FUNC RasterPos3d, 70, 24
261USE_GL_FUNC RasterPos3dv, 71, 4
262USE_GL_FUNC RasterPos3f, 72, 12
263USE_GL_FUNC RasterPos3fv, 73, 4
264USE_GL_FUNC RasterPos3i, 74, 12
265USE_GL_FUNC RasterPos3iv, 75, 4
266USE_GL_FUNC RasterPos3s, 76, 12
267USE_GL_FUNC RasterPos3sv, 77, 4
268USE_GL_FUNC RasterPos4d, 78, 32
269USE_GL_FUNC RasterPos4dv, 79, 4
270USE_GL_FUNC RasterPos4f, 80, 16
271USE_GL_FUNC RasterPos4fv, 81, 4
272USE_GL_FUNC RasterPos4i, 82, 16
273USE_GL_FUNC RasterPos4iv, 83, 4
274USE_GL_FUNC RasterPos4s, 84, 16
275USE_GL_FUNC RasterPos4sv, 85, 4
276USE_GL_FUNC ReadBuffer, 254, 4
277USE_GL_FUNC ReadPixels, 256, 28
278USE_GL_FUNC Rectd, 86, 32
279USE_GL_FUNC Rectdv, 87, 8
280USE_GL_FUNC Rectf, 88, 16
281USE_GL_FUNC Rectfv, 89, 8
282USE_GL_FUNC Recti, 90, 16
283USE_GL_FUNC Rectiv, 91, 8
284USE_GL_FUNC Rects, 92, 16
285USE_GL_FUNC Rectsv, 93, 8
286USE_GL_FUNC RenderMode, 196, 4
287USE_GL_FUNC Rotated, 299, 32
288USE_GL_FUNC Rotatef, 300, 16
289USE_GL_FUNC Scaled, 301, 24
290USE_GL_FUNC Scalef, 302, 12
291USE_GL_FUNC Scissor, 176, 16
292USE_GL_FUNC SelectBuffer, 195, 8
293USE_GL_FUNC ShadeModel, 177, 4
294USE_GL_FUNC StencilFunc, 243, 12
295USE_GL_FUNC StencilMask, 209, 4
296USE_GL_FUNC StencilOp, 244, 12
297USE_GL_FUNC TexCoord1d, 94, 8
298USE_GL_FUNC TexCoord1dv, 95, 4
299USE_GL_FUNC TexCoord1f, 96, 4
300USE_GL_FUNC TexCoord1fv, 97, 4
301USE_GL_FUNC TexCoord1i, 98, 4
302USE_GL_FUNC TexCoord1iv, 99, 4
303USE_GL_FUNC TexCoord1s, 100, 4
304USE_GL_FUNC TexCoord1sv, 101, 4
305USE_GL_FUNC TexCoord2d, 102, 16
306USE_GL_FUNC TexCoord2dv, 103, 4
307USE_GL_FUNC TexCoord2f, 104, 8
308USE_GL_FUNC TexCoord2fv, 105, 4
309USE_GL_FUNC TexCoord2i, 106, 8
310USE_GL_FUNC TexCoord2iv, 107, 4
311USE_GL_FUNC TexCoord2s, 108, 8
312USE_GL_FUNC TexCoord2sv, 109, 4
313USE_GL_FUNC TexCoord3d, 110, 24
314USE_GL_FUNC TexCoord3dv, 111, 4
315USE_GL_FUNC TexCoord3f, 112, 12
316USE_GL_FUNC TexCoord3fv, 113, 4
317USE_GL_FUNC TexCoord3i, 114, 12
318USE_GL_FUNC TexCoord3iv, 115, 4
319USE_GL_FUNC TexCoord3s, 116, 12
320USE_GL_FUNC TexCoord3sv, 117, 4
321USE_GL_FUNC TexCoord4d, 118, 32
322USE_GL_FUNC TexCoord4dv, 119, 4
323USE_GL_FUNC TexCoord4f, 120, 16
324USE_GL_FUNC TexCoord4fv, 121, 4
325USE_GL_FUNC TexCoord4i, 122, 16
326USE_GL_FUNC TexCoord4iv, 123, 4
327USE_GL_FUNC TexCoord4s, 124, 16
328USE_GL_FUNC TexCoord4sv, 125, 4
329USE_GL_FUNC TexCoordPointer, 320, 16
330USE_GL_FUNC TexEnvf, 184, 12
331USE_GL_FUNC TexEnvfv, 185, 12
332USE_GL_FUNC TexEnvi, 186, 12
333USE_GL_FUNC TexEnviv, 187, 12
334USE_GL_FUNC TexGend, 188, 16
335USE_GL_FUNC TexGendv, 189, 12
336USE_GL_FUNC TexGenf, 190, 12
337USE_GL_FUNC TexGenfv, 191, 12
338USE_GL_FUNC TexGeni, 192, 12
339USE_GL_FUNC TexGeniv, 193, 12
340USE_GL_FUNC TexImage1D, 182, 32
341USE_GL_FUNC TexImage2D, 183, 36
342USE_GL_FUNC TexParameterf, 178, 12
343USE_GL_FUNC TexParameterfv, 179, 12
344USE_GL_FUNC TexParameteri, 180, 12
345USE_GL_FUNC TexParameteriv, 181, 12
346USE_GL_FUNC TexSubImage1D, 332, 28
347USE_GL_FUNC TexSubImage2D, 333, 36
348USE_GL_FUNC Translated, 303, 24
349USE_GL_FUNC Translatef, 304, 12
350USE_GL_FUNC Vertex2d, 126, 16
351USE_GL_FUNC Vertex2dv, 127, 4
352USE_GL_FUNC Vertex2f, 128, 8
353USE_GL_FUNC Vertex2fv, 129, 4
354USE_GL_FUNC Vertex2i, 130, 8
355USE_GL_FUNC Vertex2iv, 131, 4
356USE_GL_FUNC Vertex2s, 132, 8
357USE_GL_FUNC Vertex2sv, 133, 4
358USE_GL_FUNC Vertex3d, 134, 24
359USE_GL_FUNC Vertex3dv, 135, 4
360USE_GL_FUNC Vertex3f, 136, 12
361USE_GL_FUNC Vertex3fv, 137, 4
362USE_GL_FUNC Vertex3i, 138, 12
363USE_GL_FUNC Vertex3iv, 139, 4
364USE_GL_FUNC Vertex3s, 140, 12
365USE_GL_FUNC Vertex3sv, 141, 4
366USE_GL_FUNC Vertex4d, 142, 32
367USE_GL_FUNC Vertex4dv, 143, 4
368USE_GL_FUNC Vertex4f, 144, 16
369USE_GL_FUNC Vertex4fv, 145, 4
370USE_GL_FUNC Vertex4i, 146, 16
371USE_GL_FUNC Vertex4iv, 147, 4
372USE_GL_FUNC Vertex4s, 148, 16
373USE_GL_FUNC Vertex4sv, 149, 4
374USE_GL_FUNC VertexPointer, 321, 16
375USE_GL_FUNC Viewport, 305, 16
376
377END
378