VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/DD_glh.py@ 77819

Last change on this file since 77819 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#ifndef __DD_GL_H__
33#define __DD_GL_H__
34
35#include "chromium.h"
36#include "cr_string.h"
37#include "cr_version.h"
38#include "stub.h"
39
40""")
41
42commoncall_special = [
43 "ArrayElement",
44 "Begin",
45 "CallList",
46 "CallLists",
47 "Color3f",
48 "Color3fv",
49 "Color4f",
50 "Color4fv",
51 "EdgeFlag",
52 "End",
53 "EvalCoord1f",
54 "EvalCoord1fv",
55 "EvalCoord2f",
56 "EvalCoord2fv",
57 "EvalPoint1",
58 "EvalPoint2",
59 "FogCoordfEXT",
60 "FogCoordfvEXT",
61 "Indexf",
62 "Indexfv",
63 "Materialfv",
64 "MultiTexCoord1fARB",
65 "MultiTexCoord1fvARB",
66 "MultiTexCoord2fARB",
67 "MultiTexCoord2fvARB",
68 "MultiTexCoord3fARB",
69 "MultiTexCoord3fvARB",
70 "MultiTexCoord4fARB",
71 "MultiTexCoord4fvARB",
72 "Normal3f",
73 "Normal3fv",
74 "SecondaryColor3fEXT",
75 "SecondaryColor3fvEXT",
76 "TexCoord1f",
77 "TexCoord1fv",
78 "TexCoord2f",
79 "TexCoord2fv",
80 "TexCoord3f",
81 "TexCoord3fv",
82 "TexCoord4f",
83 "TexCoord4fv",
84 "Vertex2f",
85 "Vertex2fv",
86 "Vertex3f",
87 "Vertex3fv",
88 "Vertex4f",
89 "Vertex4fv",
90 "VertexAttrib1fNV",
91 "VertexAttrib1fvNV",
92 "VertexAttrib2fNV",
93 "VertexAttrib2fvNV",
94 "VertexAttrib3fNV",
95 "VertexAttrib3fvNV",
96 "VertexAttrib4fNV",
97 "VertexAttrib4fvNV",
98 "VertexAttrib1fARB",
99 "VertexAttrib1fvARB",
100 "VertexAttrib2fARB",
101 "VertexAttrib2fvARB",
102 "VertexAttrib3fARB",
103 "VertexAttrib3fvARB",
104 "VertexAttrib4fARB",
105 "VertexAttrib4fvARB",
106 "EvalMesh1",
107 "EvalMesh2",
108 "Rectf",
109 "DrawArrays",
110 "DrawElements",
111 "DrawRangeElements"
112]
113
114# Extern-like declarations
115keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
116
117for func_name in keys:
118 if "Chromium" == apiutil.Category(func_name):
119 continue
120 if func_name == "BoundsInfoCR":
121 continue
122
123 return_type = apiutil.ReturnType(func_name)
124 params = apiutil.Parameters(func_name)
125
126 if func_name in commoncall_special:
127 print("extern %s vboxDD_gl%s(%s);" % (return_type, func_name,
128 apiutil.MakeDeclarationString( params )))
129 else:
130 if apiutil.MakeDeclarationString(params)=="void":
131 print("extern %s vboxDD_gl%s(GLcontext *ctx);" % (return_type, func_name))
132 else:
133 print("extern %s vboxDD_gl%s(GLcontext *ctx, %s);" % (return_type, func_name,
134 apiutil.MakeDeclarationString( params )))
135
136print("#endif /* __DD_GL_H__ */")
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