VirtualBox

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

Last change on this file since 55772 was 48999, checked in by vboxsync, 11 years ago

wddm: ensure all windows are initially hidden

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