VirtualBox

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

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