VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/DD_glc.py@ 19420

Last change on this file since 19420 was 18882, checked in by vboxsync, 15 years ago

crOpenGL: exported the remaining Additions bits to OSE

  • Property svn:eol-style set to native
File size: 3.4 KB
Line 
1print """
2/** @file
3 * VBox OpenGL chromium functions header
4 */
5
6/*
7 * Copyright (C) 2009 Sun Microsystems, Inc.
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21"""
22# Copyright (c) 2001, Stanford University
23# All rights reserved.
24#
25# See the file LICENSE.txt for information on redistributing this software.
26
27import sys
28
29import apiutil
30
31apiutil.CopyrightC()
32
33print """
34/* DO NOT EDIT - THIS FILE GENERATED BY THE DD_gl.py SCRIPT */
35
36#include "chromium.h"
37#include "cr_string.h"
38#include "cr_version.h"
39#include "stub.h"
40#include "dri_drv.h"
41#include "cr_gl.h"
42"""
43
44commoncall_special = [
45 "ArrayElement",
46 "Begin",
47 "CallList",
48 "CallLists",
49 "Color3f",
50 "Color3fv",
51 "Color4f",
52 "Color4fv",
53 "EdgeFlag",
54 "End",
55 "EvalCoord1f",
56 "EvalCoord1fv",
57 "EvalCoord2f",
58 "EvalCoord2fv",
59 "EvalPoint1",
60 "EvalPoint2",
61 "FogCoordfEXT",
62 "FogCoordfvEXT",
63 "Indexf",
64 "Indexfv",
65 "Materialfv",
66 "MultiTexCoord1fARB",
67 "MultiTexCoord1fvARB",
68 "MultiTexCoord2fARB",
69 "MultiTexCoord2fvARB",
70 "MultiTexCoord3fARB",
71 "MultiTexCoord3fvARB",
72 "MultiTexCoord4fARB",
73 "MultiTexCoord4fvARB",
74 "Normal3f",
75 "Normal3fv",
76 "SecondaryColor3fEXT",
77 "SecondaryColor3fvEXT",
78 "TexCoord1f",
79 "TexCoord1fv",
80 "TexCoord2f",
81 "TexCoord2fv",
82 "TexCoord3f",
83 "TexCoord3fv",
84 "TexCoord4f",
85 "TexCoord4fv",
86 "Vertex2f",
87 "Vertex2fv",
88 "Vertex3f",
89 "Vertex3fv",
90 "Vertex4f",
91 "Vertex4fv",
92 "VertexAttrib1fNV",
93 "VertexAttrib1fvNV",
94 "VertexAttrib2fNV",
95 "VertexAttrib2fvNV",
96 "VertexAttrib3fNV",
97 "VertexAttrib3fvNV",
98 "VertexAttrib4fNV",
99 "VertexAttrib4fvNV",
100 "VertexAttrib1fARB",
101 "VertexAttrib1fvARB",
102 "VertexAttrib2fARB",
103 "VertexAttrib2fvARB",
104 "VertexAttrib3fARB",
105 "VertexAttrib3fvARB",
106 "VertexAttrib4fARB",
107 "VertexAttrib4fvARB",
108 "EvalMesh1",
109 "EvalMesh2",
110 "Rectf",
111 "DrawArrays",
112 "DrawElements",
113 "DrawRangeElements"
114]
115
116keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
117
118for func_name in keys:
119 if "Chromium" == apiutil.Category(func_name):
120 continue
121 if func_name == "BoundsInfoCR":
122 continue
123
124 return_type = apiutil.ReturnType(func_name)
125 params = apiutil.Parameters(func_name)
126
127 if func_name in commoncall_special:
128 print "%s vboxDD_gl%s( %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params) )
129 else:
130 if apiutil.MakeDeclarationString(params)=="void":
131 print "%s vboxDD_gl%s( GLcontext *ctx )" % (return_type, func_name )
132 else:
133 print "%s vboxDD_gl%s( GLcontext *ctx, %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params) )
134 print "{"
135
136 if return_type != "void":
137 print "\treturn ",
138
139 print "\tcr_gl%s( %s );" % (func_name, apiutil.MakeCallString(params))
140 print "}"
141 print ""
142
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