1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox Windows NT/2000/XP guest OpenGL ICD
|
---|
4 | *
|
---|
5 | * Simple buffered OpenGL functions
|
---|
6 | *
|
---|
7 | * Copyright (C) 2006-2007 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 | #include "VBoxOGL.h"
|
---|
23 |
|
---|
24 | /** @todo sync? */
|
---|
25 | GL_GEN_FUNC1(ReadBuffer, GLenum);
|
---|
26 |
|
---|
27 | /** @todo sync? */
|
---|
28 | GL_GEN_VPAR_FUNC5(CopyPixels, GLint, GLint, GLsizei, GLsizei, GLenum);
|
---|
29 |
|
---|
30 | GL_GEN_FUNC1(Enable, GLenum);
|
---|
31 | GL_GEN_FUNC1(Disable, GLenum);
|
---|
32 |
|
---|
33 | GL_GEN_VPAR_FUNC2(Accum, GLenum, GLfloat);
|
---|
34 | GL_GEN_VPAR_FUNC2(AlphaFunc, GLenum, GLclampf);
|
---|
35 | GL_GEN_VPAR_FUNC2(BindTexture, GLenum, GLuint);
|
---|
36 |
|
---|
37 | GL_GEN_FUNC1(ArrayElement, GLint);
|
---|
38 |
|
---|
39 | GL_GEN_FUNC1(Begin, GLenum);
|
---|
40 | GL_GEN_FUNC2(BlendFunc, GLenum);
|
---|
41 |
|
---|
42 | GL_GEN_FUNC1(CallList, GLuint);
|
---|
43 |
|
---|
44 | GL_GEN_FUNC3V(Color3b, GLbyte);
|
---|
45 | GL_GEN_FUNC3V(Color3d, GLdouble);
|
---|
46 | GL_GEN_FUNC3V(Color3f, GLfloat);
|
---|
47 | GL_GEN_FUNC3V(Color3i, GLint);
|
---|
48 | GL_GEN_FUNC3V(Color3s, GLshort);
|
---|
49 |
|
---|
50 | GL_GEN_FUNC3V(Color3ub, GLubyte);
|
---|
51 | GL_GEN_FUNC3V(Color3ui, GLuint);
|
---|
52 | GL_GEN_FUNC3V(Color3us, GLushort);
|
---|
53 |
|
---|
54 | GL_GEN_FUNC4V(Color4b, GLbyte);
|
---|
55 | GL_GEN_FUNC4V(Color4d, GLdouble);
|
---|
56 | GL_GEN_FUNC4V(Color4f, GLfloat);
|
---|
57 | GL_GEN_FUNC4V(Color4i, GLint);
|
---|
58 | GL_GEN_FUNC4V(Color4s, GLshort);
|
---|
59 |
|
---|
60 | GL_GEN_FUNC4V(Color4ub, GLubyte);
|
---|
61 | GL_GEN_FUNC4V(Color4ui, GLuint);
|
---|
62 | GL_GEN_FUNC4V(Color4us, GLushort);
|
---|
63 |
|
---|
64 | GL_GEN_FUNC1(Clear, GLbitfield);
|
---|
65 | GL_GEN_FUNC4(ClearAccum, GLfloat);
|
---|
66 | GL_GEN_FUNC4(ClearColor, GLclampf);
|
---|
67 | GL_GEN_FUNC1(ClearDepth, GLclampd);
|
---|
68 | GL_GEN_FUNC1(ClearIndex, GLfloat);
|
---|
69 | GL_GEN_FUNC1(ClearStencil, GLint);
|
---|
70 |
|
---|
71 | GL_GEN_FUNC2V(Vertex2d, GLdouble);
|
---|
72 | GL_GEN_FUNC2V(Vertex2f, GLfloat);
|
---|
73 | GL_GEN_FUNC2V(Vertex2i, GLint);
|
---|
74 | GL_GEN_FUNC2V(Vertex2s, GLshort);
|
---|
75 |
|
---|
76 | GL_GEN_FUNC3V(Vertex3d, GLdouble);
|
---|
77 | GL_GEN_FUNC3V(Vertex3f, GLfloat);
|
---|
78 | GL_GEN_FUNC3V(Vertex3i, GLint);
|
---|
79 | GL_GEN_FUNC3V(Vertex3s, GLshort);
|
---|
80 |
|
---|
81 | GL_GEN_FUNC4V(Vertex4d, GLdouble);
|
---|
82 | GL_GEN_FUNC4V(Vertex4f, GLfloat);
|
---|
83 | GL_GEN_FUNC4V(Vertex4i, GLint);
|
---|
84 | GL_GEN_FUNC4V(Vertex4s, GLshort);
|
---|
85 |
|
---|
86 | GL_GEN_FUNC1V(TexCoord1d, GLdouble);
|
---|
87 | GL_GEN_FUNC1V(TexCoord1f, GLfloat);
|
---|
88 | GL_GEN_FUNC1V(TexCoord1i, GLint);
|
---|
89 | GL_GEN_FUNC1V(TexCoord1s, GLshort);
|
---|
90 |
|
---|
91 | GL_GEN_FUNC2V(TexCoord2d, GLdouble);
|
---|
92 | GL_GEN_FUNC2V(TexCoord2f, GLfloat);
|
---|
93 | GL_GEN_FUNC2V(TexCoord2i, GLint);
|
---|
94 | GL_GEN_FUNC2V(TexCoord2s, GLshort);
|
---|
95 |
|
---|
96 | GL_GEN_FUNC3V(TexCoord3d, GLdouble);
|
---|
97 | GL_GEN_FUNC3V(TexCoord3f, GLfloat);
|
---|
98 | GL_GEN_FUNC3V(TexCoord3i, GLint);
|
---|
99 | GL_GEN_FUNC3V(TexCoord3s, GLshort);
|
---|
100 |
|
---|
101 | GL_GEN_FUNC4V(TexCoord4d, GLdouble);
|
---|
102 | GL_GEN_FUNC4V(TexCoord4f, GLfloat);
|
---|
103 | GL_GEN_FUNC4V(TexCoord4i, GLint);
|
---|
104 | GL_GEN_FUNC4V(TexCoord4s, GLshort);
|
---|
105 |
|
---|
106 | GL_GEN_FUNC3V(Normal3b, GLbyte);
|
---|
107 | GL_GEN_FUNC3V(Normal3d, GLdouble);
|
---|
108 | GL_GEN_FUNC3V(Normal3f, GLfloat);
|
---|
109 | GL_GEN_FUNC3V(Normal3i, GLint);
|
---|
110 | GL_GEN_FUNC3V(Normal3s, GLshort);
|
---|
111 |
|
---|
112 | GL_GEN_FUNC2V(RasterPos2d, GLdouble);
|
---|
113 | GL_GEN_FUNC2V(RasterPos2f, GLfloat);
|
---|
114 | GL_GEN_FUNC2V(RasterPos2i, GLint);
|
---|
115 | GL_GEN_FUNC2V(RasterPos2s, GLshort);
|
---|
116 |
|
---|
117 | GL_GEN_FUNC3V(RasterPos3d, GLdouble);
|
---|
118 | GL_GEN_FUNC3V(RasterPos3f, GLfloat);
|
---|
119 | GL_GEN_FUNC3V(RasterPos3i, GLint);
|
---|
120 | GL_GEN_FUNC3V(RasterPos3s, GLshort);
|
---|
121 |
|
---|
122 | GL_GEN_FUNC4V(RasterPos4d, GLdouble);
|
---|
123 | GL_GEN_FUNC4V(RasterPos4f, GLfloat);
|
---|
124 | GL_GEN_FUNC4V(RasterPos4i, GLint);
|
---|
125 | GL_GEN_FUNC4V(RasterPos4s, GLshort);
|
---|
126 |
|
---|
127 | GL_GEN_FUNC1V(EvalCoord1d, GLdouble);
|
---|
128 | GL_GEN_FUNC1V(EvalCoord1f, GLfloat);
|
---|
129 |
|
---|
130 | GL_GEN_FUNC2V(EvalCoord2d, GLdouble);
|
---|
131 | GL_GEN_FUNC2V(EvalCoord2f, GLfloat);
|
---|
132 |
|
---|
133 | GL_GEN_FUNC1(EvalPoint1, GLint);
|
---|
134 | GL_GEN_FUNC2(EvalPoint2, GLint);
|
---|
135 |
|
---|
136 | GL_GEN_FUNC1V(Indexd, GLdouble);
|
---|
137 | GL_GEN_FUNC1V(Indexf, GLfloat);
|
---|
138 | GL_GEN_FUNC1V(Indexi, GLint);
|
---|
139 | GL_GEN_FUNC1V(Indexs, GLshort);
|
---|
140 | GL_GEN_FUNC1V(Indexub, GLubyte);
|
---|
141 |
|
---|
142 | GL_GEN_FUNC4(Rotated, GLdouble);
|
---|
143 | GL_GEN_FUNC4(Rotatef, GLfloat);
|
---|
144 |
|
---|
145 | GL_GEN_FUNC3(Scaled, GLdouble);
|
---|
146 | GL_GEN_FUNC3(Scalef, GLfloat);
|
---|
147 |
|
---|
148 | GL_GEN_FUNC3(Translated, GLdouble);
|
---|
149 | GL_GEN_FUNC3(Translatef, GLfloat);
|
---|
150 |
|
---|
151 | GL_GEN_FUNC1(DepthFunc, GLenum);
|
---|
152 | GL_GEN_FUNC1(DepthMask, GLboolean);
|
---|
153 |
|
---|
154 | GL_GEN_FUNC1(CullFace, GLenum);
|
---|
155 |
|
---|
156 | GL_GEN_VPAR_FUNC2(DeleteLists, GLuint, GLsizei);
|
---|
157 |
|
---|
158 | GL_GEN_VPAR_FUNC2(DepthRange, GLclampd, GLclampd);
|
---|
159 | GL_GEN_VPAR_FUNC3(EvalMesh1, GLenum, GLint, GLint);
|
---|
160 | GL_GEN_VPAR_FUNC5(EvalMesh2, GLenum, GLint, GLint, GLint, GLint);
|
---|
161 | GL_GEN_VPAR_FUNC2(LineStipple, GLint, GLushort);
|
---|
162 | GL_GEN_FUNC1(LineWidth, GLfloat);
|
---|
163 | GL_GEN_FUNC1(ListBase, GLuint);
|
---|
164 |
|
---|
165 | GL_GEN_VPAR_FUNC2(Fogf, GLenum, GLfloat);
|
---|
166 | GL_GEN_VPAR_FUNC2(Fogi, GLenum, GLint);
|
---|
167 |
|
---|
168 |
|
---|
169 | GL_GEN_VPAR_FUNC2(LightModelf, GLenum, GLfloat);
|
---|
170 | GL_GEN_VPAR_FUNC2(LightModeli, GLenum, GLint);
|
---|
171 |
|
---|
172 |
|
---|
173 | GL_GEN_VPAR_FUNC3(Lightf, GLenum, GLenum, GLfloat);
|
---|
174 | GL_GEN_VPAR_FUNC3(Lighti, GLenum, GLenum, GLint);
|
---|
175 |
|
---|
176 |
|
---|
177 | GL_GEN_VPAR_FUNC3(DrawArrays, GLenum, GLint, GLsizei);
|
---|
178 |
|
---|
179 | GL_GEN_FUNC1(DrawBuffer, GLenum);
|
---|
180 |
|
---|
181 | GL_GEN_FUNC1V(EdgeFlag, GLboolean);
|
---|
182 |
|
---|
183 | GL_GEN_FUNC(End);
|
---|
184 | GL_GEN_FUNC(EndList);
|
---|
185 |
|
---|
186 | GL_GEN_FUNC1(FrontFace, GLenum);
|
---|
187 |
|
---|
188 |
|
---|
189 | GL_GEN_VPAR_FUNC7(CopyTexImage1D, GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLint );
|
---|
190 |
|
---|
191 | GL_GEN_VPAR_FUNC8(CopyTexImage2D, GLenum , GLint , GLenum , GLint , GLint , GLsizei , GLsizei , GLint );
|
---|
192 |
|
---|
193 | GL_GEN_VPAR_FUNC6(CopyTexSubImage1D, GLenum , GLint , GLint , GLint , GLint , GLsizei );
|
---|
194 |
|
---|
195 | GL_GEN_VPAR_FUNC8(CopyTexSubImage2D, GLenum , GLint , GLint , GLint , GLint , GLint , GLsizei , GLsizei );
|
---|
196 |
|
---|
197 | GL_GEN_VPAR_FUNC4(ColorMask, GLboolean , GLboolean , GLboolean , GLboolean );
|
---|
198 |
|
---|
199 | GL_GEN_VPAR_FUNC2(ColorMaterial, GLenum, GLenum );
|
---|
200 |
|
---|
201 | GL_GEN_FUNC1(LogicOp, GLenum);
|
---|
202 |
|
---|
203 | GL_GEN_VPAR_FUNC3(MapGrid1d, GLint, GLdouble, GLdouble);
|
---|
204 | GL_GEN_VPAR_FUNC3(MapGrid1f, GLint, GLfloat, GLfloat);
|
---|
205 |
|
---|
206 | GL_GEN_VPAR_FUNC6(MapGrid2d, GLint , GLdouble , GLdouble , GLint , GLdouble , GLdouble );
|
---|
207 |
|
---|
208 | GL_GEN_VPAR_FUNC6(MapGrid2f, GLint , GLfloat , GLfloat , GLint , GLfloat , GLfloat );
|
---|
209 |
|
---|
210 | GL_GEN_VPAR_FUNC3(Materialf, GLenum , GLenum , GLfloat );
|
---|
211 |
|
---|
212 | GL_GEN_VPAR_FUNC3(Materiali, GLenum , GLenum , GLint );
|
---|
213 |
|
---|
214 | GL_GEN_FUNC1(MatrixMode, GLenum);
|
---|
215 |
|
---|
216 | GL_GEN_VPAR_FUNC6(Ortho, GLdouble , GLdouble , GLdouble , GLdouble , GLdouble , GLdouble );
|
---|
217 |
|
---|
218 | GL_GEN_FUNC1(PassThrough, GLfloat);
|
---|
219 |
|
---|
220 | GL_GEN_VPAR_FUNC2(PixelStoref, GLenum, GLfloat);
|
---|
221 | GL_GEN_VPAR_FUNC2(PixelStorei, GLenum, GLint);
|
---|
222 | GL_GEN_VPAR_FUNC2(PixelTransferf, GLenum, GLfloat);
|
---|
223 | GL_GEN_VPAR_FUNC2(PixelTransferi, GLenum, GLint);
|
---|
224 |
|
---|
225 | GL_GEN_FUNC2(PixelZoom, GLfloat);
|
---|
226 | GL_GEN_FUNC1(PointSize, GLfloat);
|
---|
227 |
|
---|
228 | GL_GEN_FUNC2(PolygonMode, GLenum)
|
---|
229 | GL_GEN_FUNC2(PolygonOffset, GLfloat);
|
---|
230 |
|
---|
231 | GL_GEN_FUNC(PopAttrib);
|
---|
232 | GL_GEN_FUNC(PopClientAttrib);
|
---|
233 | GL_GEN_FUNC(PopMatrix);
|
---|
234 | GL_GEN_FUNC(PopName);
|
---|
235 |
|
---|
236 |
|
---|
237 | GL_GEN_FUNC1(PushAttrib, GLbitfield);
|
---|
238 | GL_GEN_FUNC1(PushClientAttrib, GLbitfield);
|
---|
239 | GL_GEN_FUNC (PushMatrix);
|
---|
240 | GL_GEN_FUNC1(PushName, GLuint);
|
---|
241 |
|
---|
242 | GL_GEN_VPAR_FUNC3(TexEnvf, GLenum , GLenum , GLfloat);
|
---|
243 | GL_GEN_VPAR_FUNC3(TexEnvi, GLenum , GLenum , GLint);
|
---|
244 | GL_GEN_VPAR_FUNC3(TexGend, GLenum , GLenum , GLdouble);
|
---|
245 | GL_GEN_VPAR_FUNC3(TexGenf, GLenum , GLenum , GLfloat);
|
---|
246 | GL_GEN_VPAR_FUNC3(TexGeni, GLenum , GLenum , GLint);
|
---|
247 |
|
---|
248 | GL_GEN_VPAR_FUNC3(TexParameterf, GLenum , GLenum , GLfloat );
|
---|
249 | GL_GEN_VPAR_FUNC3(TexParameteri, GLenum , GLenum , GLint );
|
---|
250 |
|
---|
251 | GL_GEN_FUNC (LoadIdentity);
|
---|
252 | GL_GEN_FUNC1(LoadName, GLuint);
|
---|
253 |
|
---|
254 | GL_GEN_FUNC1(ShadeModel, GLenum);
|
---|
255 | GL_GEN_VPAR_FUNC3(StencilFunc, GLenum, GLint, GLuint);
|
---|
256 | GL_GEN_FUNC1(StencilMask, GLuint);
|
---|
257 | GL_GEN_VPAR_FUNC3(StencilOp, GLenum, GLenum, GLenum);
|
---|
258 |
|
---|
259 | GL_GEN_VPAR_FUNC4(Viewport, GLint, GLint, GLsizei, GLsizei);
|
---|
260 | GL_GEN_VPAR_FUNC4(Scissor, GLint, GLint, GLsizei, GLsizei);
|
---|
261 |
|
---|
262 |
|
---|
263 | GL_GEN_FUNC4(Rectd, GLdouble);
|
---|
264 | GL_GEN_FUNC4(Rectf, GLfloat);
|
---|
265 | GL_GEN_FUNC4(Recti, GLint);
|
---|
266 | GL_GEN_FUNC4(Rects, GLshort);
|
---|
267 |
|
---|
268 | GL_GEN_VPAR_FUNC2(NewList, GLuint, GLenum);
|
---|
269 |
|
---|
270 | GL_GEN_FUNC2(Hint, GLenum);
|
---|
271 | GL_GEN_FUNC1(IndexMask, GLuint);
|
---|
272 | GL_GEN_FUNC(InitNames);
|
---|
273 |
|
---|
274 |
|
---|
275 | GL_GEN_FUNC6(Frustum, GLdouble);
|
---|
276 |
|
---|