VirtualBox

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

Last change on this file since 79120 was 69310, checked in by vboxsync, 7 years ago

common/crOpenGL: scm updates

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