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