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