Tizen 2.0 Release
[profile/ivi/osmesa.git] / src / gallium / state_trackers / wgl / stw_icd.h
1 /**************************************************************************
2  *
3  * Copyright 2008-2009 Vmware, Inc.
4  * All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sub license, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  *
14  * The above copyright notice and this permission notice (including the
15  * next paragraph) shall be included in all copies or substantial portions
16  * of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21  * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25  *
26  **************************************************************************/
27
28 #ifndef STW_ICD_H
29 #define STW_ICD_H
30
31
32 #include <windows.h>
33
34 #include "GL/gl.h"
35
36
37 typedef ULONG DHGLRC;
38
39 #define OPENGL_VERSION_110_ENTRIES  336
40
41 struct __GLdispatchTableRec
42 {
43    void (GLAPIENTRY * NewList)(GLuint, GLenum);
44    void (GLAPIENTRY * EndList)(void);
45    void (GLAPIENTRY * CallList)(GLuint);
46    void (GLAPIENTRY * CallLists)(GLsizei, GLenum, const GLvoid *);
47    void (GLAPIENTRY * DeleteLists)(GLuint, GLsizei);
48    GLuint (GLAPIENTRY * GenLists)(GLsizei);
49    void (GLAPIENTRY * ListBase)(GLuint);
50    void (GLAPIENTRY * Begin)(GLenum);
51    void (GLAPIENTRY * Bitmap)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *);
52    void (GLAPIENTRY * Color3b)(GLbyte, GLbyte, GLbyte);
53    void (GLAPIENTRY * Color3bv)(const GLbyte *);
54    void (GLAPIENTRY * Color3d)(GLdouble, GLdouble, GLdouble);
55    void (GLAPIENTRY * Color3dv)(const GLdouble *);
56    void (GLAPIENTRY * Color3f)(GLfloat, GLfloat, GLfloat);
57    void (GLAPIENTRY * Color3fv)(const GLfloat *);
58    void (GLAPIENTRY * Color3i)(GLint, GLint, GLint);
59    void (GLAPIENTRY * Color3iv)(const GLint *);
60    void (GLAPIENTRY * Color3s)(GLshort, GLshort, GLshort);
61    void (GLAPIENTRY * Color3sv)(const GLshort *);
62    void (GLAPIENTRY * Color3ub)(GLubyte, GLubyte, GLubyte);
63    void (GLAPIENTRY * Color3ubv)(const GLubyte *);
64    void (GLAPIENTRY * Color3ui)(GLuint, GLuint, GLuint);
65    void (GLAPIENTRY * Color3uiv)(const GLuint *);
66    void (GLAPIENTRY * Color3us)(GLushort, GLushort, GLushort);
67    void (GLAPIENTRY * Color3usv)(const GLushort *);
68    void (GLAPIENTRY * Color4b)(GLbyte, GLbyte, GLbyte, GLbyte);
69    void (GLAPIENTRY * Color4bv)(const GLbyte *);
70    void (GLAPIENTRY * Color4d)(GLdouble, GLdouble, GLdouble, GLdouble);
71    void (GLAPIENTRY * Color4dv)(const GLdouble *);
72    void (GLAPIENTRY * Color4f)(GLfloat, GLfloat, GLfloat, GLfloat);
73    void (GLAPIENTRY * Color4fv)(const GLfloat *);
74    void (GLAPIENTRY * Color4i)(GLint, GLint, GLint, GLint);
75    void (GLAPIENTRY * Color4iv)(const GLint *);
76    void (GLAPIENTRY * Color4s)(GLshort, GLshort, GLshort, GLshort);
77    void (GLAPIENTRY * Color4sv)(const GLshort *);
78    void (GLAPIENTRY * Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
79    void (GLAPIENTRY * Color4ubv)(const GLubyte *);
80    void (GLAPIENTRY * Color4ui)(GLuint, GLuint, GLuint, GLuint);
81    void (GLAPIENTRY * Color4uiv)(const GLuint *);
82    void (GLAPIENTRY * Color4us)(GLushort, GLushort, GLushort, GLushort);
83    void (GLAPIENTRY * Color4usv)(const GLushort *);
84    void (GLAPIENTRY * EdgeFlag)(GLboolean);
85    void (GLAPIENTRY * EdgeFlagv)(const GLboolean *);
86    void (GLAPIENTRY * End)(void);
87    void (GLAPIENTRY * Indexd)(GLdouble);
88    void (GLAPIENTRY * Indexdv)(const GLdouble *);
89    void (GLAPIENTRY * Indexf)(GLfloat);
90    void (GLAPIENTRY * Indexfv)(const GLfloat *);
91    void (GLAPIENTRY * Indexi)(GLint);
92    void (GLAPIENTRY * Indexiv)(const GLint *);
93    void (GLAPIENTRY * Indexs)(GLshort);
94    void (GLAPIENTRY * Indexsv)(const GLshort *);
95    void (GLAPIENTRY * Normal3b)(GLbyte, GLbyte, GLbyte);
96    void (GLAPIENTRY * Normal3bv)(const GLbyte *);
97    void (GLAPIENTRY * Normal3d)(GLdouble, GLdouble, GLdouble);
98    void (GLAPIENTRY * Normal3dv)(const GLdouble *);
99    void (GLAPIENTRY * Normal3f)(GLfloat, GLfloat, GLfloat);
100    void (GLAPIENTRY * Normal3fv)(const GLfloat *);
101    void (GLAPIENTRY * Normal3i)(GLint, GLint, GLint);
102    void (GLAPIENTRY * Normal3iv)(const GLint *);
103    void (GLAPIENTRY * Normal3s)(GLshort, GLshort, GLshort);
104    void (GLAPIENTRY * Normal3sv)(const GLshort *);
105    void (GLAPIENTRY * RasterPos2d)(GLdouble, GLdouble);
106    void (GLAPIENTRY * RasterPos2dv)(const GLdouble *);
107    void (GLAPIENTRY * RasterPos2f)(GLfloat, GLfloat);
108    void (GLAPIENTRY * RasterPos2fv)(const GLfloat *);
109    void (GLAPIENTRY * RasterPos2i)(GLint, GLint);
110    void (GLAPIENTRY * RasterPos2iv)(const GLint *);
111    void (GLAPIENTRY * RasterPos2s)(GLshort, GLshort);
112    void (GLAPIENTRY * RasterPos2sv)(const GLshort *);
113    void (GLAPIENTRY * RasterPos3d)(GLdouble, GLdouble, GLdouble);
114    void (GLAPIENTRY * RasterPos3dv)(const GLdouble *);
115    void (GLAPIENTRY * RasterPos3f)(GLfloat, GLfloat, GLfloat);
116    void (GLAPIENTRY * RasterPos3fv)(const GLfloat *);
117    void (GLAPIENTRY * RasterPos3i)(GLint, GLint, GLint);
118    void (GLAPIENTRY * RasterPos3iv)(const GLint *);
119    void (GLAPIENTRY * RasterPos3s)(GLshort, GLshort, GLshort);
120    void (GLAPIENTRY * RasterPos3sv)(const GLshort *);
121    void (GLAPIENTRY * RasterPos4d)(GLdouble, GLdouble, GLdouble, GLdouble);
122    void (GLAPIENTRY * RasterPos4dv)(const GLdouble *);
123    void (GLAPIENTRY * RasterPos4f)(GLfloat, GLfloat, GLfloat, GLfloat);
124    void (GLAPIENTRY * RasterPos4fv)(const GLfloat *);
125    void (GLAPIENTRY * RasterPos4i)(GLint, GLint, GLint, GLint);
126    void (GLAPIENTRY * RasterPos4iv)(const GLint *);
127    void (GLAPIENTRY * RasterPos4s)(GLshort, GLshort, GLshort, GLshort);
128    void (GLAPIENTRY * RasterPos4sv)(const GLshort *);
129    void (GLAPIENTRY * Rectd)(GLdouble, GLdouble, GLdouble, GLdouble);
130    void (GLAPIENTRY * Rectdv)(const GLdouble *, const GLdouble *);
131    void (GLAPIENTRY * Rectf)(GLfloat, GLfloat, GLfloat, GLfloat);
132    void (GLAPIENTRY * Rectfv)(const GLfloat *, const GLfloat *);
133    void (GLAPIENTRY * Recti)(GLint, GLint, GLint, GLint);
134    void (GLAPIENTRY * Rectiv)(const GLint *, const GLint *);
135    void (GLAPIENTRY * Rects)(GLshort, GLshort, GLshort, GLshort);
136    void (GLAPIENTRY * Rectsv)(const GLshort *, const GLshort *);
137    void (GLAPIENTRY * TexCoord1d)(GLdouble);
138    void (GLAPIENTRY * TexCoord1dv)(const GLdouble *);
139    void (GLAPIENTRY * TexCoord1f)(GLfloat);
140    void (GLAPIENTRY * TexCoord1fv)(const GLfloat *);
141    void (GLAPIENTRY * TexCoord1i)(GLint);
142    void (GLAPIENTRY * TexCoord1iv)(const GLint *);
143    void (GLAPIENTRY * TexCoord1s)(GLshort);
144    void (GLAPIENTRY * TexCoord1sv)(const GLshort *);
145    void (GLAPIENTRY * TexCoord2d)(GLdouble, GLdouble);
146    void (GLAPIENTRY * TexCoord2dv)(const GLdouble *);
147    void (GLAPIENTRY * TexCoord2f)(GLfloat, GLfloat);
148    void (GLAPIENTRY * TexCoord2fv)(const GLfloat *);
149    void (GLAPIENTRY * TexCoord2i)(GLint, GLint);
150    void (GLAPIENTRY * TexCoord2iv)(const GLint *);
151    void (GLAPIENTRY * TexCoord2s)(GLshort, GLshort);
152    void (GLAPIENTRY * TexCoord2sv)(const GLshort *);
153    void (GLAPIENTRY * TexCoord3d)(GLdouble, GLdouble, GLdouble);
154    void (GLAPIENTRY * TexCoord3dv)(const GLdouble *);
155    void (GLAPIENTRY * TexCoord3f)(GLfloat, GLfloat, GLfloat);
156    void (GLAPIENTRY * TexCoord3fv)(const GLfloat *);
157    void (GLAPIENTRY * TexCoord3i)(GLint, GLint, GLint);
158    void (GLAPIENTRY * TexCoord3iv)(const GLint *);
159    void (GLAPIENTRY * TexCoord3s)(GLshort, GLshort, GLshort);
160    void (GLAPIENTRY * TexCoord3sv)(const GLshort *);
161    void (GLAPIENTRY * TexCoord4d)(GLdouble, GLdouble, GLdouble, GLdouble);
162    void (GLAPIENTRY * TexCoord4dv)(const GLdouble *);
163    void (GLAPIENTRY * TexCoord4f)(GLfloat, GLfloat, GLfloat, GLfloat);
164    void (GLAPIENTRY * TexCoord4fv)(const GLfloat *);
165    void (GLAPIENTRY * TexCoord4i)(GLint, GLint, GLint, GLint);
166    void (GLAPIENTRY * TexCoord4iv)(const GLint *);
167    void (GLAPIENTRY * TexCoord4s)(GLshort, GLshort, GLshort, GLshort);
168    void (GLAPIENTRY * TexCoord4sv)(const GLshort *);
169    void (GLAPIENTRY * Vertex2d)(GLdouble, GLdouble);
170    void (GLAPIENTRY * Vertex2dv)(const GLdouble *);
171    void (GLAPIENTRY * Vertex2f)(GLfloat, GLfloat);
172    void (GLAPIENTRY * Vertex2fv)(const GLfloat *);
173    void (GLAPIENTRY * Vertex2i)(GLint, GLint);
174    void (GLAPIENTRY * Vertex2iv)(const GLint *);
175    void (GLAPIENTRY * Vertex2s)(GLshort, GLshort);
176    void (GLAPIENTRY * Vertex2sv)(const GLshort *);
177    void (GLAPIENTRY * Vertex3d)(GLdouble, GLdouble, GLdouble);
178    void (GLAPIENTRY * Vertex3dv)(const GLdouble *);
179    void (GLAPIENTRY * Vertex3f)(GLfloat, GLfloat, GLfloat);
180    void (GLAPIENTRY * Vertex3fv)(const GLfloat *);
181    void (GLAPIENTRY * Vertex3i)(GLint, GLint, GLint);
182    void (GLAPIENTRY * Vertex3iv)(const GLint *);
183    void (GLAPIENTRY * Vertex3s)(GLshort, GLshort, GLshort);
184    void (GLAPIENTRY * Vertex3sv)(const GLshort *);
185    void (GLAPIENTRY * Vertex4d)(GLdouble, GLdouble, GLdouble, GLdouble);
186    void (GLAPIENTRY * Vertex4dv)(const GLdouble *);
187    void (GLAPIENTRY * Vertex4f)(GLfloat, GLfloat, GLfloat, GLfloat);
188    void (GLAPIENTRY * Vertex4fv)(const GLfloat *);
189    void (GLAPIENTRY * Vertex4i)(GLint, GLint, GLint, GLint);
190    void (GLAPIENTRY * Vertex4iv)(const GLint *);
191    void (GLAPIENTRY * Vertex4s)(GLshort, GLshort, GLshort, GLshort);
192    void (GLAPIENTRY * Vertex4sv)(const GLshort *);
193    void (GLAPIENTRY * ClipPlane)(GLenum, const GLdouble *);
194    void (GLAPIENTRY * ColorMaterial)(GLenum, GLenum);
195    void (GLAPIENTRY * CullFace)(GLenum);
196    void (GLAPIENTRY * Fogf)(GLenum, GLfloat);
197    void (GLAPIENTRY * Fogfv)(GLenum, const GLfloat *);
198    void (GLAPIENTRY * Fogi)(GLenum, GLint);
199    void (GLAPIENTRY * Fogiv)(GLenum, const GLint *);
200    void (GLAPIENTRY * FrontFace)(GLenum);
201    void (GLAPIENTRY * Hint)(GLenum, GLenum);
202    void (GLAPIENTRY * Lightf)(GLenum, GLenum, GLfloat);
203    void (GLAPIENTRY * Lightfv)(GLenum, GLenum, const GLfloat *);
204    void (GLAPIENTRY * Lighti)(GLenum, GLenum, GLint);
205    void (GLAPIENTRY * Lightiv)(GLenum, GLenum, const GLint *);
206    void (GLAPIENTRY * LightModelf)(GLenum, GLfloat);
207    void (GLAPIENTRY * LightModelfv)(GLenum, const GLfloat *);
208    void (GLAPIENTRY * LightModeli)(GLenum, GLint);
209    void (GLAPIENTRY * LightModeliv)(GLenum, const GLint *);
210    void (GLAPIENTRY * LineStipple)(GLint, GLushort);
211    void (GLAPIENTRY * LineWidth)(GLfloat);
212    void (GLAPIENTRY * Materialf)(GLenum, GLenum, GLfloat);
213    void (GLAPIENTRY * Materialfv)(GLenum, GLenum, const GLfloat *);
214    void (GLAPIENTRY * Materiali)(GLenum, GLenum, GLint);
215    void (GLAPIENTRY * Materialiv)(GLenum, GLenum, const GLint *);
216    void (GLAPIENTRY * PointSize)(GLfloat);
217    void (GLAPIENTRY * PolygonMode)(GLenum, GLenum);
218    void (GLAPIENTRY * PolygonStipple)(const GLubyte *);
219    void (GLAPIENTRY * Scissor)(GLint, GLint, GLsizei, GLsizei);
220    void (GLAPIENTRY * ShadeModel)(GLenum);
221    void (GLAPIENTRY * TexParameterf)(GLenum, GLenum, GLfloat);
222    void (GLAPIENTRY * TexParameterfv)(GLenum, GLenum, const GLfloat *);
223    void (GLAPIENTRY * TexParameteri)(GLenum, GLenum, GLint);
224    void (GLAPIENTRY * TexParameteriv)(GLenum, GLenum, const GLint *);
225    void (GLAPIENTRY * TexImage1D)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
226    void (GLAPIENTRY * TexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
227    void (GLAPIENTRY * TexEnvf)(GLenum, GLenum, GLfloat);
228    void (GLAPIENTRY * TexEnvfv)(GLenum, GLenum, const GLfloat *);
229    void (GLAPIENTRY * TexEnvi)(GLenum, GLenum, GLint);
230    void (GLAPIENTRY * TexEnviv)(GLenum, GLenum, const GLint *);
231    void (GLAPIENTRY * TexGend)(GLenum, GLenum, GLdouble);
232    void (GLAPIENTRY * TexGendv)(GLenum, GLenum, const GLdouble *);
233    void (GLAPIENTRY * TexGenf)(GLenum, GLenum, GLfloat);
234    void (GLAPIENTRY * TexGenfv)(GLenum, GLenum, const GLfloat *);
235    void (GLAPIENTRY * TexGeni)(GLenum, GLenum, GLint);
236    void (GLAPIENTRY * TexGeniv)(GLenum, GLenum, const GLint *);
237    void (GLAPIENTRY * FeedbackBuffer)(GLsizei, GLenum, GLfloat *);
238    void (GLAPIENTRY * SelectBuffer)(GLsizei, GLuint *);
239    GLint (GLAPIENTRY * RenderMode)(GLenum);
240    void (GLAPIENTRY * InitNames)(void);
241    void (GLAPIENTRY * LoadName)(GLuint);
242    void (GLAPIENTRY * PassThrough)(GLfloat);
243    void (GLAPIENTRY * PopName)(void);
244    void (GLAPIENTRY * PushName)(GLuint);
245    void (GLAPIENTRY * DrawBuffer)(GLenum);
246    void (GLAPIENTRY * Clear)(GLbitfield);
247    void (GLAPIENTRY * ClearAccum)(GLfloat, GLfloat, GLfloat, GLfloat);
248    void (GLAPIENTRY * ClearIndex)(GLfloat);
249    void (GLAPIENTRY * ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
250    void (GLAPIENTRY * ClearStencil)(GLint);
251    void (GLAPIENTRY * ClearDepth)(GLclampd);
252    void (GLAPIENTRY * StencilMask)(GLuint);
253    void (GLAPIENTRY * ColorMask)(GLboolean, GLboolean, GLboolean, GLboolean);
254    void (GLAPIENTRY * DepthMask)(GLboolean);
255    void (GLAPIENTRY * IndexMask)(GLuint);
256    void (GLAPIENTRY * Accum)(GLenum, GLfloat);
257    void (GLAPIENTRY * Disable)(GLenum);
258    void (GLAPIENTRY * Enable)(GLenum);
259    void (GLAPIENTRY * Finish)(void);
260    void (GLAPIENTRY * Flush)(void);
261    void (GLAPIENTRY * PopAttrib)(void);
262    void (GLAPIENTRY * PushAttrib)(GLbitfield);
263    void (GLAPIENTRY * Map1d)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
264    void (GLAPIENTRY * Map1f)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
265    void (GLAPIENTRY * Map2d)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
266    void (GLAPIENTRY * Map2f)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
267    void (GLAPIENTRY * MapGrid1d)(GLint, GLdouble, GLdouble);
268    void (GLAPIENTRY * MapGrid1f)(GLint, GLfloat, GLfloat);
269    void (GLAPIENTRY * MapGrid2d)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble);
270    void (GLAPIENTRY * MapGrid2f)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat);
271    void (GLAPIENTRY * EvalCoord1d)(GLdouble);
272    void (GLAPIENTRY * EvalCoord1dv)(const GLdouble *);
273    void (GLAPIENTRY * EvalCoord1f)(GLfloat);
274    void (GLAPIENTRY * EvalCoord1fv)(const GLfloat *);
275    void (GLAPIENTRY * EvalCoord2d)(GLdouble, GLdouble);
276    void (GLAPIENTRY * EvalCoord2dv)(const GLdouble *);
277    void (GLAPIENTRY * EvalCoord2f)(GLfloat, GLfloat);
278    void (GLAPIENTRY * EvalCoord2fv)(const GLfloat *);
279    void (GLAPIENTRY * EvalMesh1)(GLenum, GLint, GLint);
280    void (GLAPIENTRY * EvalPoint1)(GLint);
281    void (GLAPIENTRY * EvalMesh2)(GLenum, GLint, GLint, GLint, GLint);
282    void (GLAPIENTRY * EvalPoint2)(GLint, GLint);
283    void (GLAPIENTRY * AlphaFunc)(GLenum, GLclampf);
284    void (GLAPIENTRY * BlendFunc)(GLenum, GLenum);
285    void (GLAPIENTRY * LogicOp)(GLenum);
286    void (GLAPIENTRY * StencilFunc)(GLenum, GLint, GLuint);
287    void (GLAPIENTRY * StencilOp)(GLenum, GLenum, GLenum);
288    void (GLAPIENTRY * DepthFunc)(GLenum);
289    void (GLAPIENTRY * PixelZoom)(GLfloat, GLfloat);
290    void (GLAPIENTRY * PixelTransferf)(GLenum, GLfloat);
291    void (GLAPIENTRY * PixelTransferi)(GLenum, GLint);
292    void (GLAPIENTRY * PixelStoref)(GLenum, GLfloat);
293    void (GLAPIENTRY * PixelStorei)(GLenum, GLint);
294    void (GLAPIENTRY * PixelMapfv)(GLenum, GLint, const GLfloat *);
295    void (GLAPIENTRY * PixelMapuiv)(GLenum, GLint, const GLuint *);
296    void (GLAPIENTRY * PixelMapusv)(GLenum, GLint, const GLushort *);
297    void (GLAPIENTRY * ReadBuffer)(GLenum);
298    void (GLAPIENTRY * CopyPixels)(GLint, GLint, GLsizei, GLsizei, GLenum);
299    void (GLAPIENTRY * ReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *);
300    void (GLAPIENTRY * DrawPixels)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
301    void (GLAPIENTRY * GetBooleanv)(GLenum, GLboolean *);
302    void (GLAPIENTRY * GetClipPlane)(GLenum, GLdouble *);
303    void (GLAPIENTRY * GetDoublev)(GLenum, GLdouble *);
304    GLenum (GLAPIENTRY * GetError)(void);
305    void (GLAPIENTRY * GetFloatv)(GLenum, GLfloat *);
306    void (GLAPIENTRY * GetIntegerv)(GLenum, GLint *);
307    void (GLAPIENTRY * GetLightfv)(GLenum, GLenum, GLfloat *);
308    void (GLAPIENTRY * GetLightiv)(GLenum, GLenum, GLint *);
309    void (GLAPIENTRY * GetMapdv)(GLenum, GLenum, GLdouble *);
310    void (GLAPIENTRY * GetMapfv)(GLenum, GLenum, GLfloat *);
311    void (GLAPIENTRY * GetMapiv)(GLenum, GLenum, GLint *);
312    void (GLAPIENTRY * GetMaterialfv)(GLenum, GLenum, GLfloat *);
313    void (GLAPIENTRY * GetMaterialiv)(GLenum, GLenum, GLint *);
314    void (GLAPIENTRY * GetPixelMapfv)(GLenum, GLfloat *);
315    void (GLAPIENTRY * GetPixelMapuiv)(GLenum, GLuint *);
316    void (GLAPIENTRY * GetPixelMapusv)(GLenum, GLushort *);
317    void (GLAPIENTRY * GetPolygonStipple)(GLubyte *);
318    const GLubyte * (GLAPIENTRY * GetString)(GLenum);
319    void (GLAPIENTRY * GetTexEnvfv)(GLenum, GLenum, GLfloat *);
320    void (GLAPIENTRY * GetTexEnviv)(GLenum, GLenum, GLint *);
321    void (GLAPIENTRY * GetTexGendv)(GLenum, GLenum, GLdouble *);
322    void (GLAPIENTRY * GetTexGenfv)(GLenum, GLenum, GLfloat *);
323    void (GLAPIENTRY * GetTexGeniv)(GLenum, GLenum, GLint *);
324    void (GLAPIENTRY * GetTexImage)(GLenum, GLint, GLenum, GLenum, GLvoid *);
325    void (GLAPIENTRY * GetTexParameterfv)(GLenum, GLenum, GLfloat *);
326    void (GLAPIENTRY * GetTexParameteriv)(GLenum, GLenum, GLint *);
327    void (GLAPIENTRY * GetTexLevelParameterfv)(GLenum, GLint, GLenum, GLfloat *);
328    void (GLAPIENTRY * GetTexLevelParameteriv)(GLenum, GLint, GLenum, GLint *);
329    GLboolean (GLAPIENTRY * IsEnabled)(GLenum);
330    GLboolean (GLAPIENTRY * IsList)(GLuint);
331    void (GLAPIENTRY * DepthRange)(GLclampd, GLclampd);
332    void (GLAPIENTRY * Frustum)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
333    void (GLAPIENTRY * LoadIdentity)(void);
334    void (GLAPIENTRY * LoadMatrixf)(const GLfloat *);
335    void (GLAPIENTRY * LoadMatrixd)(const GLdouble *);
336    void (GLAPIENTRY * MatrixMode)(GLenum);
337    void (GLAPIENTRY * MultMatrixf)(const GLfloat *);
338    void (GLAPIENTRY * MultMatrixd)(const GLdouble *);
339    void (GLAPIENTRY * Ortho)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
340    void (GLAPIENTRY * PopMatrix)(void);
341    void (GLAPIENTRY * PushMatrix)(void);
342    void (GLAPIENTRY * Rotated)(GLdouble, GLdouble, GLdouble, GLdouble);
343    void (GLAPIENTRY * Rotatef)(GLfloat, GLfloat, GLfloat, GLfloat);
344    void (GLAPIENTRY * Scaled)(GLdouble, GLdouble, GLdouble);
345    void (GLAPIENTRY * Scalef)(GLfloat, GLfloat, GLfloat);
346    void (GLAPIENTRY * Translated)(GLdouble, GLdouble, GLdouble);
347    void (GLAPIENTRY * Translatef)(GLfloat, GLfloat, GLfloat);
348    void (GLAPIENTRY * Viewport)(GLint, GLint, GLsizei, GLsizei);
349    void (GLAPIENTRY * ArrayElement)(GLint);
350    void (GLAPIENTRY * BindTexture)(GLenum, GLuint);
351    void (GLAPIENTRY * ColorPointer)(GLint, GLenum, GLsizei, const GLvoid *);
352    void (GLAPIENTRY * DisableClientState)(GLenum);
353    void (GLAPIENTRY * DrawArrays)(GLenum, GLint, GLsizei);
354    void (GLAPIENTRY * DrawElements)(GLenum, GLsizei, GLenum, const GLvoid *);
355    void (GLAPIENTRY * EdgeFlagPointer)(GLsizei, const GLvoid *);
356    void (GLAPIENTRY * EnableClientState)(GLenum);
357    void (GLAPIENTRY * IndexPointer)(GLenum, GLsizei, const GLvoid *);
358    void (GLAPIENTRY * Indexub)(GLubyte);
359    void (GLAPIENTRY * Indexubv)(const GLubyte *);
360    void (GLAPIENTRY * InterleavedArrays)(GLenum, GLsizei, const GLvoid *);
361    void (GLAPIENTRY * NormalPointer)(GLenum, GLsizei, const GLvoid *);
362    void (GLAPIENTRY * PolygonOffset)(GLfloat, GLfloat);
363    void (GLAPIENTRY * TexCoordPointer)(GLint, GLenum, GLsizei, const GLvoid *);
364    void (GLAPIENTRY * VertexPointer)(GLint, GLenum, GLsizei, const GLvoid *);
365    GLboolean (GLAPIENTRY * AreTexturesResident)(GLsizei, const GLuint *, GLboolean *);
366    void (GLAPIENTRY * CopyTexImage1D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
367    void (GLAPIENTRY * CopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
368    void (GLAPIENTRY * CopyTexSubImage1D)(GLenum, GLint, GLint, GLint, GLint, GLsizei);
369    void (GLAPIENTRY * CopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
370    void (GLAPIENTRY * DeleteTextures)(GLsizei, const GLuint *);
371    void (GLAPIENTRY * GenTextures)(GLsizei, GLuint *);
372    void (GLAPIENTRY * GetPointerv)(GLenum, GLvoid **);
373    GLboolean (GLAPIENTRY * IsTexture)(GLuint);
374    void (GLAPIENTRY * PrioritizeTextures)(GLsizei, const GLuint *, const GLclampf *);
375    void (GLAPIENTRY * TexSubImage1D)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
376    void (GLAPIENTRY * TexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
377    void (GLAPIENTRY * PopClientAttrib)(void);
378    void (GLAPIENTRY * PushClientAttrib)(GLbitfield);
379 };
380
381 typedef struct __GLdispatchTableRec GLDISPATCHTABLE;
382
383 typedef struct _GLCLTPROCTABLE
384 {
385    int cEntries;
386    GLDISPATCHTABLE glDispatchTable;
387 } GLCLTPROCTABLE, * PGLCLTPROCTABLE;
388
389 typedef VOID (APIENTRY * PFN_SETPROCTABLE)(PGLCLTPROCTABLE);
390
391 /**
392  * Presentation data passed to opengl32!wglCbPresentBuffers.
393  *
394  * Pure software drivers don't need to worry about this -- if they stick to the
395  * GDI API then will integrate with the Desktop Window Manager (DWM) without
396  * problems. Hardware drivers, however, cannot present directly to the primary
397  * surface while the DWM is active, as DWM gets exclusive access to the primary
398  * surface.
399  *
400  * Proper DWM integration requires:
401  * - advertise the PFD_SUPPORT_COMPOSITION flag
402  * - redirect glFlush/glfinish/wglSwapBuffers into a surface shared with the
403  * DWM process.
404  *
405  * @sa http://www.opengl.org/pipeline/article/vol003_7/
406  * @sa http://blogs.msdn.com/greg_schechter/archive/2006/05/02/588934.aspx
407  */
408 typedef struct _GLCBPRESENTBUFFERSDATA
409 {
410    /**
411     * wglCbPresentBuffers enforces this to be 2.
412     */
413    DWORD magic1;
414
415    /**
416     * wglCbPresentBuffers enforces to be 0 or 1, but it is most commonly
417     * set to 0.
418     */
419    DWORD magic2;
420
421    /**
422     * Locally unique identifier (LUID) of the graphics adapter.
423     *
424     * This should contain the value returned by D3DKMTOpenAdapterFromHdc. It
425     * is passed to dwmapi!DwmpDxGetWindowSharedSurface in order to obtain
426     * the shared surface handle for the bound drawable (window).
427     *
428     * @sa http://msdn.microsoft.com/en-us/library/ms799177.aspx
429     */
430    LUID AdapterLuid;
431
432    /**
433     * This is passed unmodified to DrvPresentBuffers
434     */
435    LPVOID pPrivateData;
436
437    /**
438     * Client area rectangle to update, relative to the window upper-left corner.
439     */
440    RECT rect;
441 } GLCBPRESENTBUFFERSDATA, *PGLCBPRESENTBUFFERSDATA;
442
443 /**
444  * Callbacks supplied to DrvSetCallbackProcs by the OpenGL runtime.
445  *
446  * Pointers to several callback functions in opengl32.dll.
447  */
448 typedef struct _GLCALLBACKTABLE
449 {
450    /** Unused */
451    PROC wglCbSetCurrentValue;
452
453    /** Unused */
454    PROC wglCbGetCurrentValue;
455
456    /** Unused */
457    PROC wglCbGetDhglrc;
458
459    /** Unused */
460    PROC wglCbGetDdHandle;
461
462    /**
463     * Queue a present composition.
464     *
465     * Makes the runtime call DrvPresentBuffers with the composition information.
466     */
467    BOOL (APIENTRY *wglCbPresentBuffers)(HDC hdc, PGLCBPRESENTBUFFERSDATA data);
468
469 } GLCALLBACKTABLE;
470
471 typedef struct _GLPRESENTBUFFERSDATA
472 {
473    /**
474     * The shared surface handle.
475     *
476     * Return by dwmapi!DwmpDxGetWindowSharedSurface.
477     *
478     * @sa http://channel9.msdn.com/forums/TechOff/251261-Help-Getting-the-shared-window-texture-out-of-DWM-/
479     */
480    HANDLE hSharedSurface;
481
482    LUID AdapterLuid;
483
484    /**
485     * Present history token.
486     *
487     * This is returned by dwmapi!DwmpDxGetWindowSharedSurface and
488     * should be passed to D3DKMTRender in D3DKMT_RENDER::PresentHistoryToken.
489     *
490     * @sa http://msdn.microsoft.com/en-us/library/ms799176.aspx
491     */
492    ULONGLONG PresentHistoryToken;
493
494    /** Same as GLCBPRESENTBUFFERSDATA::pPrivateData */
495    LPVOID pPrivateData;
496 } GLPRESENTBUFFERSDATA, *PGLPRESENTBUFFERSDATA;
497
498 BOOL APIENTRY
499 DrvCopyContext(
500    DHGLRC dhrcSource,
501    DHGLRC dhrcDest,
502    UINT fuMask );
503
504 DHGLRC APIENTRY
505 DrvCreateLayerContext(
506    HDC hdc,
507    INT iLayerPlane );
508
509 DHGLRC APIENTRY
510 DrvCreateContext(
511    HDC hdc );
512
513 BOOL APIENTRY
514 DrvDeleteContext(
515    DHGLRC dhglrc );
516
517 BOOL APIENTRY
518 DrvDescribeLayerPlane(
519    HDC hdc,
520    INT iPixelFormat,
521    INT iLayerPlane,
522    UINT nBytes,
523    LPLAYERPLANEDESCRIPTOR plpd );
524
525 LONG APIENTRY
526 DrvDescribePixelFormat(
527    HDC hdc,
528    INT iPixelFormat,
529    ULONG cjpfd,
530    PIXELFORMATDESCRIPTOR *ppfd );
531
532 int APIENTRY
533 DrvGetLayerPaletteEntries(
534    HDC hdc,
535    INT iLayerPlane,
536    INT iStart,
537    INT cEntries,
538    COLORREF *pcr );
539
540 PROC APIENTRY
541 DrvGetProcAddress(
542    LPCSTR lpszProc );
543
544 BOOL APIENTRY
545 DrvPresentBuffers(HDC hdc, PGLPRESENTBUFFERSDATA data);
546
547 BOOL APIENTRY
548 DrvRealizeLayerPalette(
549    HDC hdc,
550    INT iLayerPlane,
551    BOOL bRealize );
552
553 BOOL APIENTRY
554 DrvReleaseContext(
555    DHGLRC dhglrc );
556
557 void APIENTRY
558 DrvSetCallbackProcs(
559    INT nProcs,
560    PROC *pProcs );
561
562 PGLCLTPROCTABLE APIENTRY
563 DrvSetContext(
564    HDC hdc,
565    DHGLRC dhglrc,
566    PFN_SETPROCTABLE pfnSetProcTable );
567
568 int APIENTRY
569 DrvSetLayerPaletteEntries(
570    HDC hdc,
571    INT iLayerPlane,
572    INT iStart,
573    INT cEntries,
574    CONST COLORREF *pcr );
575
576 BOOL APIENTRY
577 DrvSetPixelFormat(
578    HDC hdc,
579    LONG iPixelFormat );
580
581 BOOL APIENTRY
582 DrvShareLists(
583    DHGLRC dhglrc1,
584    DHGLRC dhglrc2 );
585
586 BOOL APIENTRY
587 DrvSwapBuffers(
588    HDC hdc );
589
590 BOOL APIENTRY
591 DrvSwapLayerBuffers(
592    HDC hdc,
593    UINT fuPlanes );
594
595 BOOL APIENTRY
596 DrvValidateVersion(
597    ULONG ulVersion );
598
599 #endif /* STW_ICD_H */