VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/defs.py@ 17610

Last change on this file since 17610 was 15820, checked in by vboxsync, 16 years ago

crOpenGL: reverted r41328 - this brokes OpenGL on win32 guests.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.4 KB
Line 
1# Copyright (c) 2001, Stanford University
2# All rights reserved.
3#
4# See the file LICENSE.txt for information on redistributing this software.
5
6import sys
7
8import apiutil
9
10apiutil.CopyrightDef()
11
12print "LIBRARY VBoxOGL"
13print "DESCRIPTION \"\""
14print "EXPORTS"
15
16# XXX can't these values be automatically computed by analyzing parameters?
17
18stack_sizes = {
19 'Accum': 8,
20 'AlphaFunc': 8,
21 'AreTexturesResident': 12,
22 'ArrayElement': 4,
23 'Begin': 4,
24 'BindTexture': 8,
25 'Bitmap': 28,
26 'BlendFunc': 8,
27 'CallList': 4,
28 'CallLists': 12,
29 'Clear': 4,
30 'ClearAccum': 16,
31 'ClearColor': 16,
32 'ClearDepth': 8,
33 'ClearIndex': 4,
34 'ClearStencil': 4,
35 'ClipPlane': 8,
36 'Color3b': 12,
37 'Color3bv': 4,
38 'Color3d': 24,
39 'Color3dv': 4,
40 'Color3f': 12,
41 'Color3fv': 4,
42 'Color3i': 12,
43 'Color3iv': 4,
44 'Color3s': 12,
45 'Color3sv': 4,
46 'Color3ub': 12,
47 'Color3ubv': 4,
48 'Color3ui': 12,
49 'Color3uiv': 4,
50 'Color3us': 12,
51 'Color3usv': 4,
52 'Color4b': 16,
53 'Color4bv': 4,
54 'Color4d': 32,
55 'Color4dv': 4,
56 'Color4f': 16,
57 'Color4fv': 4,
58 'Color4i': 16,
59 'Color4iv': 4,
60 'Color4s': 16,
61 'Color4sv': 4,
62 'Color4ub': 16,
63 'Color4ubv': 4,
64 'Color4ui': 16,
65 'Color4uiv': 4,
66 'Color4us': 16,
67 'Color4usv': 4,
68 'ColorMask': 16,
69 'ColorMaterial': 8,
70 'ColorPointer': 16,
71 'CopyPixels': 20,
72 'CopyTexImage1D': 28,
73 'CopyTexImage2D': 32,
74 'CopyTexSubImage1D': 24,
75 'CopyTexSubImage2D': 32,
76 'CullFace': 4,
77 'DebugEntry': 8,
78 'DeleteLists': 8,
79 'DeleteTextures': 8,
80 'DepthFunc': 4,
81 'DepthMask': 4,
82 'DepthRange': 16,
83 'Disable': 4,
84 'DisableClientState': 4,
85 'DrawArrays': 12,
86 'DrawBuffer': 4,
87 'DrawElements': 16,
88 'DrawPixels': 20,
89 'EdgeFlag': 4,
90 'EdgeFlagPointer': 8,
91 'EdgeFlagv': 4,
92 'Enable': 4,
93 'EnableClientState': 4,
94 'End': 0,
95 'EndList': 0,
96 'EvalCoord1d': 8,
97 'EvalCoord1dv': 4,
98 'EvalCoord1f': 4,
99 'EvalCoord1fv': 4,
100 'EvalCoord2d': 16,
101 'EvalCoord2dv': 4,
102 'EvalCoord2f': 8,
103 'EvalCoord2fv': 4,
104 'EvalMesh1': 12,
105 'EvalMesh2': 20,
106 'EvalPoint1': 4,
107 'EvalPoint2': 8,
108 'FeedbackBuffer': 12,
109 'Finish': 0,
110 'Flush': 0,
111 'Fogf': 8,
112 'Fogfv': 8,
113 'Fogi': 8,
114 'Fogiv': 8,
115 'FrontFace': 4,
116 'Frustum': 48,
117 'GenLists': 4,
118 'GenTextures': 8,
119 'GetBooleanv': 8,
120 'GetClipPlane': 8,
121 'GetDoublev': 8,
122 'GetError': 0,
123 'GetFloatv': 8,
124 'GetIntegerv': 8,
125 'GetLightfv': 12,
126 'GetLightiv': 12,
127 'GetMapdv': 12,
128 'GetMapfv': 12,
129 'GetMapiv': 12,
130 'GetMaterialfv': 12,
131 'GetMaterialiv': 12,
132 'GetPixelMapfv': 8,
133 'GetPixelMapuiv': 8,
134 'GetPixelMapusv': 8,
135 'GetPointerv': 8,
136 'GetPolygonStipple': 4,
137 'GetString': 4,
138 'GetTexEnvfv': 12,
139 'GetTexEnviv': 12,
140 'GetTexGendv': 12,
141 'GetTexGenfv': 12,
142 'GetTexGeniv': 12,
143 'GetTexImage': 20,
144 'GetTexLevelParameterfv': 16,
145 'GetTexLevelParameteriv': 16,
146 'GetTexParameterfv': 12,
147 'GetTexParameteriv': 12,
148 'Hint': 8,
149 'IndexMask': 4,
150 'IndexPointer': 12,
151 'Indexd': 8,
152 'Indexdv': 4,
153 'Indexf': 4,
154 'Indexfv': 4,
155 'Indexi': 4,
156 'Indexiv': 4,
157 'Indexs': 4,
158 'Indexsv': 4,
159 'Indexub': 4,
160 'Indexubv': 4,
161 'InitNames': 0,
162 'InterleavedArrays': 12,
163 'IsEnabled': 4,
164 'IsList': 4,
165 'IsTexture': 4,
166 'LightModelf': 8,
167 'LightModelfv': 8,
168 'LightModeli': 8,
169 'LightModeliv': 8,
170 'Lightf': 12,
171 'Lightfv': 12,
172 'Lighti': 12,
173 'Lightiv': 12,
174 'LineStipple': 8,
175 'LineWidth': 4,
176 'ListBase': 4,
177 'LoadIdentity': 0,
178 'LoadMatrixd': 4,
179 'LoadMatrixf': 4,
180 'LoadName': 4,
181 'LogicOp': 4,
182 'Map1d': 32,
183 'Map1f': 24,
184 'Map2d': 56,
185 'Map2f': 40,
186 'MapGrid1d': 20,
187 'MapGrid1f': 12,
188 'MapGrid2d': 40,
189 'MapGrid2f': 24,
190 'Materialf': 12,
191 'Materialfv': 12,
192 'Materiali': 12,
193 'Materialiv': 12,
194 'MatrixMode': 4,
195 'MultMatrixd': 4,
196 'MultMatrixf': 4,
197 'NewList': 8,
198 'Normal3b': 12,
199 'Normal3bv': 4,
200 'Normal3d': 24,
201 'Normal3dv': 4,
202 'Normal3f': 12,
203 'Normal3fv': 4,
204 'Normal3i': 12,
205 'Normal3iv': 4,
206 'Normal3s': 12,
207 'Normal3sv': 4,
208 'NormalPointer': 12,
209 'Ortho': 48,
210 'PassThrough': 4,
211 'PixelMapfv': 12,
212 'PixelMapuiv': 12,
213 'PixelMapusv': 12,
214 'PixelStoref': 8,
215 'PixelStorei': 8,
216 'PixelTransferf': 8,
217 'PixelTransferi': 8,
218 'PixelZoom': 8,
219 'PointSize': 4,
220 'PolygonMode': 8,
221 'PolygonOffset': 8,
222 'PolygonStipple': 4,
223 'PopAttrib': 0,
224 'PopClientAttrib': 0,
225 'PopMatrix': 0,
226 'PopName': 0,
227 'PrioritizeTextures': 12,
228 'PushAttrib': 4,
229 'PushClientAttrib': 4,
230 'PushMatrix': 0,
231 'PushName': 4,
232 'RasterPos2d': 16,
233 'RasterPos2dv': 4,
234 'RasterPos2f': 8,
235 'RasterPos2fv': 4,
236 'RasterPos2i': 8,
237 'RasterPos2iv': 4,
238 'RasterPos2s': 8,
239 'RasterPos2sv': 4,
240 'RasterPos3d': 24,
241 'RasterPos3dv': 4,
242 'RasterPos3f': 12,
243 'RasterPos3fv': 4,
244 'RasterPos3i': 12,
245 'RasterPos3iv': 4,
246 'RasterPos3s': 12,
247 'RasterPos3sv': 4,
248 'RasterPos4d': 32,
249 'RasterPos4dv': 4,
250 'RasterPos4f': 16,
251 'RasterPos4fv': 4,
252 'RasterPos4i': 16,
253 'RasterPos4iv': 4,
254 'RasterPos4s': 16,
255 'RasterPos4sv': 4,
256 'ReadBuffer': 4,
257 'ReadPixels': 28,
258 'Rectd': 32,
259 'Rectdv': 8,
260 'Rectf': 16,
261 'Rectfv': 8,
262 'Recti': 16,
263 'Rectiv': 8,
264 'Rects': 16,
265 'Rectsv': 8,
266 'RenderMode': 4,
267 'Rotated': 32,
268 'Rotatef': 16,
269 'Scaled': 24,
270 'Scalef': 12,
271 'Scissor': 16,
272 'SelectBuffer': 8,
273 'ShadeModel': 4,
274 'StencilFunc': 12,
275 'StencilMask': 4,
276 'StencilOp': 12,
277 'TexCoord1d': 8,
278 'TexCoord1dv': 4,
279 'TexCoord1f': 4,
280 'TexCoord1fv': 4,
281 'TexCoord1i': 4,
282 'TexCoord1iv': 4,
283 'TexCoord1s': 4,
284 'TexCoord1sv': 4,
285 'TexCoord2d': 16,
286 'TexCoord2dv': 4,
287 'TexCoord2f': 8,
288 'TexCoord2fv': 4,
289 'TexCoord2i': 8,
290 'TexCoord2iv': 4,
291 'TexCoord2s': 8,
292 'TexCoord2sv': 4,
293 'TexCoord3d': 24,
294 'TexCoord3dv': 4,
295 'TexCoord3f': 12,
296 'TexCoord3fv': 4,
297 'TexCoord3i': 12,
298 'TexCoord3iv': 4,
299 'TexCoord3s': 12,
300 'TexCoord3sv': 4,
301 'TexCoord4d': 32,
302 'TexCoord4dv': 4,
303 'TexCoord4f': 16,
304 'TexCoord4fv': 4,
305 'TexCoord4i': 16,
306 'TexCoord4iv': 4,
307 'TexCoord4s': 16,
308 'TexCoord4sv': 4,
309 'TexCoordPointer': 16,
310 'TexEnvf': 12,
311 'TexEnvfv': 12,
312 'TexEnvi': 12,
313 'TexEnviv': 12,
314 'TexGend': 16,
315 'TexGendv': 12,
316 'TexGenf': 12,
317 'TexGenfv': 12,
318 'TexGeni': 12,
319 'TexGeniv': 12,
320 'TexImage1D': 32,
321 'TexImage2D': 36,
322 'TexImage3D': 36,
323 'TexParameterf': 12,
324 'TexParameterfv': 12,
325 'TexParameteri': 12,
326 'TexParameteriv': 12,
327 'TexSubImage1D': 28,
328 'TexSubImage2D': 36,
329 'Translated': 24,
330 'Translatef': 12,
331 'Vertex2d': 16,
332 'Vertex2dv': 4,
333 'Vertex2f': 8,
334 'Vertex2fv': 4,
335 'Vertex2i': 8,
336 'Vertex2iv': 4,
337 'Vertex2s': 8,
338 'Vertex2sv': 4,
339 'Vertex3d': 24,
340 'Vertex3dv': 4,
341 'Vertex3f': 12,
342 'Vertex3fv': 4,
343 'Vertex3i': 12,
344 'Vertex3iv': 4,
345 'Vertex3s': 12,
346 'Vertex3sv': 4,
347 'Vertex4d': 32,
348 'Vertex4dv': 4,
349 'Vertex4f': 16,
350 'Vertex4fv': 4,
351 'Vertex4i': 16,
352 'Vertex4iv': 4,
353 'Vertex4s': 16,
354 'Vertex4sv': 4,
355 'VertexPointer': 16,
356 'Viewport': 16,
357 'wglChoosePixelFormat': 8,
358 'wglCopyContext': 12,
359 'wglCreateContext': 4,
360 'wglCreateLayerContext': 8,
361 'wglDeleteContext': 4,
362 'wglDescribeLayerPlane': 20,
363 'wglDescribePixelFormat': 16,
364 'wglGetCurrentContext': 0,
365 'wglGetCurrentDC': 0,
366 'wglGetDefaultProcAddress': 4,
367 'wglGetLayerPaletteEntries': 20,
368 'wglGetPixelFormat': 4,
369 'wglGetProcAddress': 4,
370 'wglMakeCurrent': 8,
371 'wglRealizeLayerPalette': 12,
372 'wglSetLayerPaletteEntries': 20,
373 'wglSetPixelFormat': 12,
374 'wglShareLists': 8,
375 'wglSwapBuffers': 4,
376 'wglSwapLayerBuffers': 8,
377 'wglSwapMultipleBuffers': 8,
378 'wglUseFontBitmapsA': 16,
379 'wglUseFontBitmapsW': 16,
380 'wglUseFontOutlinesA': 32,
381 'wglUseFontOutlinesW': 32,
382 'wglChoosePixelFormatEXT' : 24,
383 'wglGetPixelFormatAttribivEXT' : 24,
384 'wglGetPixelFormatAttribfvEXT' : 24,
385 'wglGetExtensionsStringEXT' : 4,
386 'CopyContext' : 12,
387 'CreateContext' : 4,
388 'CreateLayerContext' : 8,
389 'DeleteContext' : 4,
390 'DescribeLayerPlane' : 20,
391 'DescribePixelFormat' : 16,
392 'GetLayerPaletteEntries' : 20,
393 'GetProcAddress' : 4,
394 'RealizeLayerPalette' : 12,
395 'ReleaseContext' : 4,
396 'SetContext' : 12,
397 'SetLayerPaletteEntries' : 20,
398 'SetPixelFormat' : 12,
399 'ShareLists' : 8,
400 'SwapBuffers' : 4,
401 'SwapLayerBuffers' : 8,
402 'ValidateVersion' : 4,
403}
404
405noexport_special = [
406 "BoundsInfoCR",
407 "CreateContext",
408 "DestroyContext",
409 "MakeCurrent",
410 "WindowCreate",
411 "WindowDestroy",
412 "WindowSize",
413 "WindowPosition",
414 "WindowVisibleRegion",
415 "WindowShow",
416 "SwapBuffers"
417]
418
419keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
420
421for func_name in keys:
422 if func_name in noexport_special:
423 continue
424 try:
425 print "gl%s@%d = cr_gl%s" % (func_name,stack_sizes[func_name],func_name)
426 except KeyError:
427 pass
428
429for func_name in ( "wglChoosePixelFormat",
430 "wglCopyContext",
431 "wglCreateContext",
432 "wglCreateLayerContext",
433 "wglDeleteContext",
434 "wglDescribeLayerPlane",
435 "wglDescribePixelFormat",
436 "wglGetCurrentContext",
437 "wglGetCurrentDC",
438 "wglGetLayerPaletteEntries",
439 "wglGetPixelFormat",
440 "wglGetProcAddress",
441 "wglMakeCurrent",
442 "wglRealizeLayerPalette",
443 "wglSetLayerPaletteEntries",
444 "wglSetPixelFormat",
445 "wglShareLists",
446 "wglSwapBuffers",
447 "wglSwapLayerBuffers",
448 "wglSwapMultipleBuffers",
449 "wglUseFontBitmapsA",
450 "wglUseFontBitmapsW",
451 "wglUseFontOutlinesA",
452 "wglUseFontOutlinesW",
453 "wglChoosePixelFormatEXT",
454 "wglGetPixelFormatAttribivEXT",
455 "wglGetPixelFormatAttribfvEXT",
456 "wglGetExtensionsStringEXT" ):
457 print "%s@%d = %s_prox" % (func_name,stack_sizes[func_name],func_name)
458
459"""
460for func_name in ( "CopyContext",
461 "CreateContext",
462 "CreateLayerContext",
463 "DeleteContext",
464 "DescribeLayerPlane",
465 "DescribePixelFormat",
466 "GetLayerPaletteEntries",
467 "GetProcAddress",
468 "RealizeLayerPalette",
469 "SetLayerPaletteEntries",
470 "ShareLists",
471 "SwapBuffers",
472 "SwapLayerBuffers"):
473 print "Drv%s@%d = wgl%s_prox" % (func_name,stack_sizes[func_name],func_name)
474"""
475
476print """DrvCopyContext
477DrvCreateContext
478DrvCreateLayerContext
479DrvDeleteContext
480DrvDescribeLayerPlane
481DrvDescribePixelFormat
482DrvGetLayerPaletteEntries
483DrvGetProcAddress = wglGetProcAddress_prox
484DrvRealizeLayerPalette
485DrvSetLayerPaletteEntries
486DrvShareLists
487DrvSwapBuffers
488DrvSwapLayerBuffers
489DrvReleaseContext@4 = DrvReleaseContext
490DrvSetContext@12 = DrvSetContext
491DrvValidateVersion@4 = DrvValidateVersion
492DrvSetPixelFormat@8 = DrvSetPixelFormat"""
493
494print """crCreateContext
495crMakeCurrent
496crSwapBuffers
497crGetProcAddress"""
498#print "DllMain"
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette