1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 
19 */
20 /*
21 ** QGL_WIN.C
22 **
23 ** This file implements the operating system binding of GL to QGL function
24 ** pointers.  When doing a port of Quake2 you must implement the following
25 ** two functions:
26 **
27 ** QGL_Init() - loads libraries, assigns function pointers, etc.
28 ** QGL_Shutdown() - unloads libraries, NULLs function pointers
29 */
30 #include <float.h>
31 #include "../ref_gl/gl_local.h"
32 
33 
34 #include "glw_win.h"
35 
36 int   ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *);
37 int   ( WINAPI * qwglDescribePixelFormat) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
38 int   ( WINAPI * qwglGetPixelFormat)(HDC);
39 BOOL  ( WINAPI * qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
40 BOOL  ( WINAPI * qwglSwapBuffers)(HDC);
41 
42 BOOL  ( WINAPI * qwglCopyContext)(HGLRC, HGLRC, UINT);
43 HGLRC ( WINAPI * qwglCreateContext)(HDC);
44 HGLRC ( WINAPI * qwglCreateLayerContext)(HDC, int);
45 BOOL  ( WINAPI * qwglDeleteContext)(HGLRC);
46 HGLRC ( WINAPI * qwglGetCurrentContext)(VOID);
47 HDC   ( WINAPI * qwglGetCurrentDC)(VOID);
48 PROC  ( WINAPI * qwglGetProcAddress)(LPCSTR);
49 BOOL  ( WINAPI * qwglMakeCurrent)(HDC, HGLRC);
50 BOOL  ( WINAPI * qwglShareLists)(HGLRC, HGLRC);
51 BOOL  ( WINAPI * qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD);
52 
53 BOOL  ( WINAPI * qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT,
54                                            FLOAT, int, LPGLYPHMETRICSFLOAT);
55 
56 BOOL ( WINAPI * qwglDescribeLayerPlane)(HDC, int, int, UINT,
57                                             LPLAYERPLANEDESCRIPTOR);
58 int  ( WINAPI * qwglSetLayerPaletteEntries)(HDC, int, int, int,
59                                                 CONST COLORREF *);
60 int  ( WINAPI * qwglGetLayerPaletteEntries)(HDC, int, int, int,
61                                                 COLORREF *);
62 BOOL ( WINAPI * qwglRealizeLayerPalette)(HDC, int, BOOL);
63 BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT);
64 
65 //void ( APIENTRY * qglAccum )(GLenum op, GLfloat value);
66 void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref);
67 GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
68 void ( APIENTRY * qglArrayElement )(GLint i);
69 void ( APIENTRY * qglBegin )(GLenum mode);
70 void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture);
71 void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
72 void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor);
73 void ( APIENTRY * qglCallList )(GLuint list);
74 void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
75 void ( APIENTRY * qglClear )(GLbitfield mask);
76 void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
77 void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
78 void ( APIENTRY * qglClearDepth )(GLclampd depth);
79 void ( APIENTRY * qglClearIndex )(GLfloat c);
80 void ( APIENTRY * qglClearStencil )(GLint s);
81 void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation);
82 void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue);
83 void ( APIENTRY * qglColor3bv )(const GLbyte *v);
84 void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue);
85 void ( APIENTRY * qglColor3dv )(const GLdouble *v);
86 void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue);
87 void ( APIENTRY * qglColor3fv )(const GLfloat *v);
88 void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue);
89 void ( APIENTRY * qglColor3iv )(const GLint *v);
90 void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue);
91 void ( APIENTRY * qglColor3sv )(const GLshort *v);
92 void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
93 void ( APIENTRY * qglColor3ubv )(const GLubyte *v);
94 void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue);
95 void ( APIENTRY * qglColor3uiv )(const GLuint *v);
96 void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue);
97 void ( APIENTRY * qglColor3usv )(const GLushort *v);
98 void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
99 void ( APIENTRY * qglColor4bv )(const GLbyte *v);
100 void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
101 void ( APIENTRY * qglColor4dv )(const GLdouble *v);
102 void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
103 void ( APIENTRY * qglColor4fv )(const GLfloat *v);
104 void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
105 void ( APIENTRY * qglColor4iv )(const GLint *v);
106 void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
107 void ( APIENTRY * qglColor4sv )(const GLshort *v);
108 void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
109 void ( APIENTRY * qglColor4ubv )(const GLubyte *v);
110 void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
111 void ( APIENTRY * qglColor4uiv )(const GLuint *v);
112 void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
113 void ( APIENTRY * qglColor4usv )(const GLushort *v);
114 void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
115 void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode);
116 void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
117 void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
118 void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
119 void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
120 void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
121 void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
122 void ( APIENTRY * qglCullFace )(GLenum mode);
123 void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range);
124 void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures);
125 void ( APIENTRY * qglDepthFunc )(GLenum func);
126 void ( APIENTRY * qglDepthMask )(GLboolean flag);
127 void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar);
128 void ( APIENTRY * qglDisable )(GLenum cap);
129 void ( APIENTRY * qglDisableClientState )(GLenum array);
130 void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count);
131 void ( APIENTRY * qglDrawBuffer )(GLenum mode);
132 void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
133 void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
134 void ( APIENTRY * qglEdgeFlag )(GLboolean flag);
135 void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
136 void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag);
137 void ( APIENTRY * qglEnable )(GLenum cap);
138 void ( APIENTRY * qglEnableClientState )(GLenum array);
139 void ( APIENTRY * qglEnd )(void);
140 void ( APIENTRY * qglEndList )(void);
141 /*void ( APIENTRY * qglEvalCoord1d )(GLdouble u);
142 void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u);
143 void ( APIENTRY * qglEvalCoord1f )(GLfloat u);
144 void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u);
145 void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v);
146 void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u);
147 void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v);
148 void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u);
149 void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
150 void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
151 void ( APIENTRY * qglEvalPoint1 )(GLint i);
152 void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j);*/
153 void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
154 void ( APIENTRY * qglFinish )(void);
155 void ( APIENTRY * qglFlush )(void);
156 void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param);
157 void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params);
158 void ( APIENTRY * qglFogi )(GLenum pname, GLint param);
159 void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params);
160 void ( APIENTRY * qglFrontFace )(GLenum mode);
161 void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
162 GLuint ( APIENTRY * qglGenLists )(GLsizei range);
163 void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures);
164 void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params);
165 void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation);
166 void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params);
167 GLenum ( APIENTRY * qglGetError )(void);
168 void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params);
169 void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params);
170 void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
171 void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params);
172 void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v);
173 void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v);
174 void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v);
175 void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
176 void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
177 void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values);
178 void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values);
179 void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values);
180 void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params);
181 void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask);
182 const GLubyte * ( APIENTRY * qglGetString )(GLenum name);
183 void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
184 void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
185 void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
186 void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
187 void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
188 void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
189 //void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
190 //void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
191 void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
192 void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
193 void ( APIENTRY * qglHint )(GLenum target, GLenum mode);
194 void ( APIENTRY * qglIndexMask )(GLuint mask);
195 void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
196 void ( APIENTRY * qglIndexd )(GLdouble c);
197 void ( APIENTRY * qglIndexdv )(const GLdouble *c);
198 void ( APIENTRY * qglIndexf )(GLfloat c);
199 void ( APIENTRY * qglIndexfv )(const GLfloat *c);
200 void ( APIENTRY * qglIndexi )(GLint c);
201 void ( APIENTRY * qglIndexiv )(const GLint *c);
202 void ( APIENTRY * qglIndexs )(GLshort c);
203 void ( APIENTRY * qglIndexsv )(const GLshort *c);
204 void ( APIENTRY * qglIndexub )(GLubyte c);
205 void ( APIENTRY * qglIndexubv )(const GLubyte *c);
206 void ( APIENTRY * qglInitNames )(void);
207 void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
208 GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap);
209 GLboolean ( APIENTRY * qglIsList )(GLuint list);
210 GLboolean ( APIENTRY * qglIsTexture )(GLuint texture);
211 void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param);
212 void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params);
213 void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param);
214 void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params);
215 void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param);
216 void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params);
217 void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param);
218 void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params);
219 void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern);
220 void ( APIENTRY * qglLineWidth )(GLfloat width);
221 void ( APIENTRY * qglListBase )(GLuint base);
222 void ( APIENTRY * qglLoadIdentity )(void);
223 void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m);
224 void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m);
225 void ( APIENTRY * qglLoadName )(GLuint name);
226 void ( APIENTRY * qglLogicOp )(GLenum opcode);
227 /*void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
228 void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
229 void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
230 void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
231 void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
232 void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
233 void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
234 void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
235 void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param);
236 void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
237 void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param);
238 void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params);*/
239 void ( APIENTRY * qglMatrixMode )(GLenum mode);
240 void ( APIENTRY * qglMultMatrixd )(const GLdouble *m);
241 void ( APIENTRY * qglMultMatrixf )(const GLfloat *m);
242 void ( APIENTRY * qglNewList )(GLuint list, GLenum mode);
243 /*void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
244 void ( APIENTRY * qglNormal3bv )(const GLbyte *v);
245 void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
246 void ( APIENTRY * qglNormal3dv )(const GLdouble *v);
247 void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
248 void ( APIENTRY * qglNormal3fv )(const GLfloat *v);
249 void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz);
250 void ( APIENTRY * qglNormal3iv )(const GLint *v);
251 void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz);
252 void ( APIENTRY * qglNormal3sv )(const GLshort *v);*/
253 void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
254 void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
255 void ( APIENTRY * qglPassThrough )(GLfloat token);
256 void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
257 void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
258 void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
259 void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param);
260 void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param);
261 void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param);
262 void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param);
263 void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor);
264 void ( APIENTRY * qglPointSize )(GLfloat size);
265 void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode);
266 void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units);
267 void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask);
268 void ( APIENTRY * qglPopAttrib )(void);
269 void ( APIENTRY * qglPopClientAttrib )(void);
270 void ( APIENTRY * qglPopMatrix )(void);
271 void ( APIENTRY * qglPopName )(void);
272 void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
273 void ( APIENTRY * qglPushAttrib )(GLbitfield mask);
274 void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask);
275 void ( APIENTRY * qglPushMatrix )(void);
276 void ( APIENTRY * qglPushName )(GLuint name);
277 /*void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y);
278 void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v);
279 void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y);
280 void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v);
281 void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y);
282 void ( APIENTRY * qglRasterPos2iv )(const GLint *v);
283 void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y);
284 void ( APIENTRY * qglRasterPos2sv )(const GLshort *v);
285 void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
286 void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v);
287 void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
288 void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v);
289 void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z);
290 void ( APIENTRY * qglRasterPos3iv )(const GLint *v);
291 void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z);
292 void ( APIENTRY * qglRasterPos3sv )(const GLshort *v);
293 void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
294 void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v);
295 void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
296 void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v);
297 void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
298 void ( APIENTRY * qglRasterPos4iv )(const GLint *v);
299 void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
300 void ( APIENTRY * qglRasterPos4sv )(const GLshort *v);*/
301 void ( APIENTRY * qglReadBuffer )(GLenum mode);
302 void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
303 void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
304 void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2);
305 void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
306 void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2);
307 void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
308 void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2);
309 void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
310 void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2);
311 GLint ( APIENTRY * qglRenderMode )(GLenum mode);
312 void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
313 void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
314 void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z);
315 void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z);
316 void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
317 void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer);
318 void ( APIENTRY * qglShadeModel )(GLenum mode);
319 void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask);
320 void ( APIENTRY * qglStencilMask )(GLuint mask);
321 void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
322 void ( APIENTRY * qglTexCoord1d )(GLdouble s);
323 void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v);
324 void ( APIENTRY * qglTexCoord1f )(GLfloat s);
325 void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v);
326 void ( APIENTRY * qglTexCoord1i )(GLint s);
327 void ( APIENTRY * qglTexCoord1iv )(const GLint *v);
328 void ( APIENTRY * qglTexCoord1s )(GLshort s);
329 void ( APIENTRY * qglTexCoord1sv )(const GLshort *v);
330 void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t);
331 void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v);
332 void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t);
333 void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v);
334 void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t);
335 void ( APIENTRY * qglTexCoord2iv )(const GLint *v);
336 void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t);
337 void ( APIENTRY * qglTexCoord2sv )(const GLshort *v);
338 void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
339 void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v);
340 void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
341 void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v);
342 void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r);
343 void ( APIENTRY * qglTexCoord3iv )(const GLint *v);
344 void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r);
345 void ( APIENTRY * qglTexCoord3sv )(const GLshort *v);
346 void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
347 void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v);
348 void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
349 void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v);
350 void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
351 void ( APIENTRY * qglTexCoord4iv )(const GLint *v);
352 void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
353 void ( APIENTRY * qglTexCoord4sv )(const GLshort *v);
354 void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
355 void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param);
356 void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
357 void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param);
358 void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params);
359 void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param);
360 void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
361 void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param);
362 void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
363 void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param);
364 void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
365 void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
366 void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
367 void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param);
368 void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
369 void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param);
370 void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
371 void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
372 void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
373 void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z);
374 void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z);
375 void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y);
376 void ( APIENTRY * qglVertex2dv )(const GLdouble *v);
377 void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y);
378 void ( APIENTRY * qglVertex2fv )(const GLfloat *v);
379 void ( APIENTRY * qglVertex2i )(GLint x, GLint y);
380 void ( APIENTRY * qglVertex2iv )(const GLint *v);
381 void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y);
382 void ( APIENTRY * qglVertex2sv )(const GLshort *v);
383 void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z);
384 void ( APIENTRY * qglVertex3dv )(const GLdouble *v);
385 void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z);
386 void ( APIENTRY * qglVertex3fv )(const GLfloat *v);
387 void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z);
388 void ( APIENTRY * qglVertex3iv )(const GLint *v);
389 void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z);
390 void ( APIENTRY * qglVertex3sv )(const GLshort *v);
391 void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
392 void ( APIENTRY * qglVertex4dv )(const GLdouble *v);
393 void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
394 void ( APIENTRY * qglVertex4fv )(const GLfloat *v);
395 void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w);
396 void ( APIENTRY * qglVertex4iv )(const GLint *v);
397 void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
398 void ( APIENTRY * qglVertex4sv )(const GLshort *v);
399 void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
400 void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
401 
402 void ( APIENTRY * qglLockArraysEXT)( int, int);
403 void ( APIENTRY * qglUnlockArraysEXT) ( void );
404 
405 BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval );
406 BOOL ( WINAPI * qwglGetDeviceGammaRampEXT)( unsigned char *, unsigned char *, unsigned char * );
407 BOOL ( WINAPI * qwglSetDeviceGammaRampEXT)( const unsigned char *, const unsigned char *, const unsigned char * );
408 void ( APIENTRY * qglPointParameterfEXT)( GLenum param, GLfloat value );
409 void ( APIENTRY * qglPointParameterfvEXT)( GLenum param, const GLfloat *value );
410 void ( APIENTRY * qglColorTableEXT)( int, int, int, int, int, const void * );
411 void ( APIENTRY * qglSelectTextureSGIS)( GLenum );
412 void ( APIENTRY * qglMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat );
413 void ( APIENTRY * qglMTexCoord2fvSGIS)( GLenum, GLfloat *);
414 void ( APIENTRY * qglActiveTextureARB) ( GLenum );
415 void ( APIENTRY * qglClientActiveTextureARB) ( GLenum );
416 
417 //r1ch
418 void ( APIENTRY * qglPointParameterfARB) (GLenum, GLfloat);
419 void ( APIENTRY * qglPointParameterfvARB) (GLenum, const GLfloat *);
420 
421 void  (APIENTRY *qglGenQueriesARB) (GLsizei, GLuint *);
422 void (APIENTRY *qglDeleteQueriesARB) (GLsizei, const GLuint *);
423 GLboolean (APIENTRY *qglIsQueryARB) (GLuint);
424 void (APIENTRY *qglBeginQueryARB) (GLenum, GLuint);
425 void (APIENTRY *qglEndQueryARB) (GLenum);
426 void (APIENTRY *qglGetQueryivARB) (GLenum, GLenum, GLint *);
427 void (APIENTRY *qglGetQueryObjectivARB) (GLuint, GLenum, GLint *);
428 void (APIENTRY *qglGetQueryObjectuivARB) (GLuint, GLenum, GLuint *);
429 
430 
431 /*static void ( APIENTRY * dllAccum )(GLenum op, GLfloat value);
432 static void ( APIENTRY * dllAlphaFunc )(GLenum func, GLclampf ref);
433 GLboolean ( APIENTRY * dllAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
434 static void ( APIENTRY * dllArrayElement )(GLint i);
435 static void ( APIENTRY * dllBegin )(GLenum mode);
436 static void ( APIENTRY * dllBindTexture )(GLenum target, GLuint texture);
437 static void ( APIENTRY * dllBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
438 static void ( APIENTRY * dllBlendFunc )(GLenum sfactor, GLenum dfactor);
439 static void ( APIENTRY * dllCallList )(GLuint list);
440 static void ( APIENTRY * dllCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
441 static void ( APIENTRY * dllClear )(GLbitfield mask);
442 static void ( APIENTRY * dllClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
443 static void ( APIENTRY * dllClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
444 static void ( APIENTRY * dllClearDepth )(GLclampd depth);
445 static void ( APIENTRY * dllClearIndex )(GLfloat c);
446 static void ( APIENTRY * dllClearStencil )(GLint s);
447 static void ( APIENTRY * dllClipPlane )(GLenum plane, const GLdouble *equation);
448 static void ( APIENTRY * dllColor3b )(GLbyte red, GLbyte green, GLbyte blue);
449 static void ( APIENTRY * dllColor3bv )(const GLbyte *v);
450 static void ( APIENTRY * dllColor3d )(GLdouble red, GLdouble green, GLdouble blue);
451 static void ( APIENTRY * dllColor3dv )(const GLdouble *v);
452 static void ( APIENTRY * dllColor3f )(GLfloat red, GLfloat green, GLfloat blue);
453 static void ( APIENTRY * dllColor3fv )(const GLfloat *v);
454 static void ( APIENTRY * dllColor3i )(GLint red, GLint green, GLint blue);
455 static void ( APIENTRY * dllColor3iv )(const GLint *v);
456 static void ( APIENTRY * dllColor3s )(GLshort red, GLshort green, GLshort blue);
457 static void ( APIENTRY * dllColor3sv )(const GLshort *v);
458 static void ( APIENTRY * dllColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
459 static void ( APIENTRY * dllColor3ubv )(const GLubyte *v);
460 static void ( APIENTRY * dllColor3ui )(GLuint red, GLuint green, GLuint blue);
461 static void ( APIENTRY * dllColor3uiv )(const GLuint *v);
462 static void ( APIENTRY * dllColor3us )(GLushort red, GLushort green, GLushort blue);
463 static void ( APIENTRY * dllColor3usv )(const GLushort *v);
464 static void ( APIENTRY * dllColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
465 static void ( APIENTRY * dllColor4bv )(const GLbyte *v);
466 static void ( APIENTRY * dllColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
467 static void ( APIENTRY * dllColor4dv )(const GLdouble *v);
468 static void ( APIENTRY * dllColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
469 static void ( APIENTRY * dllColor4fv )(const GLfloat *v);
470 static void ( APIENTRY * dllColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
471 static void ( APIENTRY * dllColor4iv )(const GLint *v);
472 static void ( APIENTRY * dllColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
473 static void ( APIENTRY * dllColor4sv )(const GLshort *v);
474 static void ( APIENTRY * dllColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
475 static void ( APIENTRY * dllColor4ubv )(const GLubyte *v);
476 static void ( APIENTRY * dllColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
477 static void ( APIENTRY * dllColor4uiv )(const GLuint *v);
478 static void ( APIENTRY * dllColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
479 static void ( APIENTRY * dllColor4usv )(const GLushort *v);
480 static void ( APIENTRY * dllColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
481 static void ( APIENTRY * dllColorMaterial )(GLenum face, GLenum mode);
482 static void ( APIENTRY * dllColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
483 static void ( APIENTRY * dllCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
484 static void ( APIENTRY * dllCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
485 static void ( APIENTRY * dllCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
486 static void ( APIENTRY * dllCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
487 static void ( APIENTRY * dllCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
488 static void ( APIENTRY * dllCullFace )(GLenum mode);
489 static void ( APIENTRY * dllDeleteLists )(GLuint list, GLsizei range);
490 static void ( APIENTRY * dllDeleteTextures )(GLsizei n, const GLuint *textures);
491 static void ( APIENTRY * dllDepthFunc )(GLenum func);
492 static void ( APIENTRY * dllDepthMask )(GLboolean flag);
493 static void ( APIENTRY * dllDepthRange )(GLclampd zNear, GLclampd zFar);
494 static void ( APIENTRY * dllDisable )(GLenum cap);
495 static void ( APIENTRY * dllDisableClientState )(GLenum array);
496 static void ( APIENTRY * dllDrawArrays )(GLenum mode, GLint first, GLsizei count);
497 static void ( APIENTRY * dllDrawBuffer )(GLenum mode);
498 static void ( APIENTRY * dllDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
499 static void ( APIENTRY * dllDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
500 static void ( APIENTRY * dllEdgeFlag )(GLboolean flag);
501 static void ( APIENTRY * dllEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
502 static void ( APIENTRY * dllEdgeFlagv )(const GLboolean *flag);
503 static void ( APIENTRY * dllEnable )(GLenum cap);
504 static void ( APIENTRY * dllEnableClientState )(GLenum array);
505 static void ( APIENTRY * dllEnd )(void);
506 static void ( APIENTRY * dllEndList )(void);
507 //static void ( APIENTRY * dllEvalCoord1d )(GLdouble u);
508 //static void ( APIENTRY * dllEvalCoord1dv )(const GLdouble *u);
509 //static void ( APIENTRY * dllEvalCoord1f )(GLfloat u);
510 //static void ( APIENTRY * dllEvalCoord1fv )(const GLfloat *u);
511 //static void ( APIENTRY * dllEvalCoord2d )(GLdouble u, GLdouble v);
512 //static void ( APIENTRY * dllEvalCoord2dv )(const GLdouble *u);
513 //static void ( APIENTRY * dllEvalCoord2f )(GLfloat u, GLfloat v);
514 //static void ( APIENTRY * dllEvalCoord2fv )(const GLfloat *u);
515 //static void ( APIENTRY * dllEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
516 //static void ( APIENTRY * dllEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
517 //static void ( APIENTRY * dllEvalPoint1 )(GLint i);
518 //static void ( APIENTRY * dllEvalPoint2 )(GLint i, GLint j);
519 static void ( APIENTRY * dllFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
520 static void ( APIENTRY * dllFinish )(void);
521 static void ( APIENTRY * dllFlush )(void);
522 static void ( APIENTRY * dllFogf )(GLenum pname, GLfloat param);
523 static void ( APIENTRY * dllFogfv )(GLenum pname, const GLfloat *params);
524 static void ( APIENTRY * dllFogi )(GLenum pname, GLint param);
525 static void ( APIENTRY * dllFogiv )(GLenum pname, const GLint *params);
526 static void ( APIENTRY * dllFrontFace )(GLenum mode);
527 static void ( APIENTRY * dllFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
528 //GLuint ( APIENTRY * dllGenLists )(GLsizei range);
529 static void ( APIENTRY * dllGenTextures )(GLsizei n, GLuint *textures);
530 static void ( APIENTRY * dllGetBooleanv )(GLenum pname, GLboolean *params);
531 static void ( APIENTRY * dllGetClipPlane )(GLenum plane, GLdouble *equation);
532 static void ( APIENTRY * dllGetDoublev )(GLenum pname, GLdouble *params);
533 //GLenum ( APIENTRY * dllGetError )(void);
534 static void ( APIENTRY * dllGetFloatv )(GLenum pname, GLfloat *params);
535 static void ( APIENTRY * dllGetIntegerv )(GLenum pname, GLint *params);
536 static void ( APIENTRY * dllGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
537 static void ( APIENTRY * dllGetLightiv )(GLenum light, GLenum pname, GLint *params);
538 static void ( APIENTRY * dllGetMapdv )(GLenum target, GLenum query, GLdouble *v);
539 static void ( APIENTRY * dllGetMapfv )(GLenum target, GLenum query, GLfloat *v);
540 static void ( APIENTRY * dllGetMapiv )(GLenum target, GLenum query, GLint *v);
541 static void ( APIENTRY * dllGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
542 static void ( APIENTRY * dllGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
543 static void ( APIENTRY * dllGetPixelMapfv )(GLenum map, GLfloat *values);
544 static void ( APIENTRY * dllGetPixelMapuiv )(GLenum map, GLuint *values);
545 static void ( APIENTRY * dllGetPixelMapusv )(GLenum map, GLushort *values);
546 static void ( APIENTRY * dllGetPointerv )(GLenum pname, GLvoid* *params);
547 static void ( APIENTRY * dllGetPolygonStipple )(GLubyte *mask);
548 //const GLubyte * ( APIENTRY * dllGetString )(GLenum name);
549 static void ( APIENTRY * dllGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
550 static void ( APIENTRY * dllGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
551 static void ( APIENTRY * dllGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
552 static void ( APIENTRY * dllGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
553 static void ( APIENTRY * dllGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
554 static void ( APIENTRY * dllGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
555 //static void ( APIENTRY * dllGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
556 //static void ( APIENTRY * dllGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
557 static void ( APIENTRY * dllGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
558 static void ( APIENTRY * dllGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
559 static void ( APIENTRY * dllHint )(GLenum target, GLenum mode);
560 static void ( APIENTRY * dllIndexMask )(GLuint mask);
561 static void ( APIENTRY * dllIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
562 static void ( APIENTRY * dllIndexd )(GLdouble c);
563 static void ( APIENTRY * dllIndexdv )(const GLdouble *c);
564 static void ( APIENTRY * dllIndexf )(GLfloat c);
565 static void ( APIENTRY * dllIndexfv )(const GLfloat *c);
566 static void ( APIENTRY * dllIndexi )(GLint c);
567 static void ( APIENTRY * dllIndexiv )(const GLint *c);
568 static void ( APIENTRY * dllIndexs )(GLshort c);
569 static void ( APIENTRY * dllIndexsv )(const GLshort *c);
570 static void ( APIENTRY * dllIndexub )(GLubyte c);
571 static void ( APIENTRY * dllIndexubv )(const GLubyte *c);
572 static void ( APIENTRY * dllInitNames )(void);
573 static void ( APIENTRY * dllInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
574 //GLboolean ( APIENTRY * dllIsEnabled )(GLenum cap);
575 //GLboolean ( APIENTRY * dllIsList )(GLuint list);
576 //GLboolean ( APIENTRY * dllIsTexture )(GLuint texture);
577 static void ( APIENTRY * dllLightModelf )(GLenum pname, GLfloat param);
578 static void ( APIENTRY * dllLightModelfv )(GLenum pname, const GLfloat *params);
579 static void ( APIENTRY * dllLightModeli )(GLenum pname, GLint param);
580 static void ( APIENTRY * dllLightModeliv )(GLenum pname, const GLint *params);
581 static void ( APIENTRY * dllLightf )(GLenum light, GLenum pname, GLfloat param);
582 static void ( APIENTRY * dllLightfv )(GLenum light, GLenum pname, const GLfloat *params);
583 static void ( APIENTRY * dllLighti )(GLenum light, GLenum pname, GLint param);
584 static void ( APIENTRY * dllLightiv )(GLenum light, GLenum pname, const GLint *params);
585 static void ( APIENTRY * dllLineStipple )(GLint factor, GLushort pattern);
586 static void ( APIENTRY * dllLineWidth )(GLfloat width);
587 static void ( APIENTRY * dllListBase )(GLuint base);
588 static void ( APIENTRY * dllLoadIdentity )(void);
589 static void ( APIENTRY * dllLoadMatrixd )(const GLdouble *m);
590 static void ( APIENTRY * dllLoadMatrixf )(const GLfloat *m);
591 static void ( APIENTRY * dllLoadName )(GLuint name);
592 static void ( APIENTRY * dllLogicOp )(GLenum opcode);
593 //static void ( APIENTRY * dllMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
594 //static void ( APIENTRY * dllMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
595 //static void ( APIENTRY * dllMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
596 //static void ( APIENTRY * dllMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
597 //static void ( APIENTRY * dllMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
598 //static void ( APIENTRY * dllMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
599 //static void ( APIENTRY * dllMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
600 //static void ( APIENTRY * dllMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
601 //static void ( APIENTRY * dllMaterialf )(GLenum face, GLenum pname, GLfloat param);
602 //static void ( APIENTRY * dllMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
603 //static void ( APIENTRY * dllMateriali )(GLenum face, GLenum pname, GLint param);
604 //static void ( APIENTRY * dllMaterialiv )(GLenum face, GLenum pname, const GLint *params);
605 static void ( APIENTRY * dllMatrixMode )(GLenum mode);
606 static void ( APIENTRY * dllMultMatrixd )(const GLdouble *m);
607 static void ( APIENTRY * dllMultMatrixf )(const GLfloat *m);
608 static void ( APIENTRY * dllNewList )(GLuint list, GLenum mode);
609 static void ( APIENTRY * dllNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
610 static void ( APIENTRY * dllNormal3bv )(const GLbyte *v);
611 static void ( APIENTRY * dllNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
612 static void ( APIENTRY * dllNormal3dv )(const GLdouble *v);
613 static void ( APIENTRY * dllNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
614 static void ( APIENTRY * dllNormal3fv )(const GLfloat *v);
615 static void ( APIENTRY * dllNormal3i )(GLint nx, GLint ny, GLint nz);
616 static void ( APIENTRY * dllNormal3iv )(const GLint *v);
617 static void ( APIENTRY * dllNormal3s )(GLshort nx, GLshort ny, GLshort nz);
618 static void ( APIENTRY * dllNormal3sv )(const GLshort *v);
619 static void ( APIENTRY * dllNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
620 static void ( APIENTRY * dllOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
621 static void ( APIENTRY * dllPassThrough )(GLfloat token);
622 static void ( APIENTRY * dllPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
623 static void ( APIENTRY * dllPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
624 static void ( APIENTRY * dllPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
625 static void ( APIENTRY * dllPixelStoref )(GLenum pname, GLfloat param);
626 static void ( APIENTRY * dllPixelStorei )(GLenum pname, GLint param);
627 static void ( APIENTRY * dllPixelTransferf )(GLenum pname, GLfloat param);
628 static void ( APIENTRY * dllPixelTransferi )(GLenum pname, GLint param);
629 static void ( APIENTRY * dllPixelZoom )(GLfloat xfactor, GLfloat yfactor);
630 static void ( APIENTRY * dllPointSize )(GLfloat size);
631 static void ( APIENTRY * dllPolygonMode )(GLenum face, GLenum mode);
632 static void ( APIENTRY * dllPolygonOffset )(GLfloat factor, GLfloat units);
633 static void ( APIENTRY * dllPolygonStipple )(const GLubyte *mask);
634 static void ( APIENTRY * dllPopAttrib )(void);
635 static void ( APIENTRY * dllPopClientAttrib )(void);
636 static void ( APIENTRY * dllPopMatrix )(void);
637 static void ( APIENTRY * dllPopName )(void);
638 static void ( APIENTRY * dllPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
639 static void ( APIENTRY * dllPushAttrib )(GLbitfield mask);
640 static void ( APIENTRY * dllPushClientAttrib )(GLbitfield mask);
641 static void ( APIENTRY * dllPushMatrix )(void);
642 static void ( APIENTRY * dllPushName )(GLuint name);
643 //static void ( APIENTRY * dllRasterPos2d )(GLdouble x, GLdouble y);
644 //static void ( APIENTRY * dllRasterPos2dv )(const GLdouble *v);
645 //static void ( APIENTRY * dllRasterPos2f )(GLfloat x, GLfloat y);
646 //static void ( APIENTRY * dllRasterPos2fv )(const GLfloat *v);
647 //static void ( APIENTRY * dllRasterPos2i )(GLint x, GLint y);
648 //static void ( APIENTRY * dllRasterPos2iv )(const GLint *v);
649 //static void ( APIENTRY * dllRasterPos2s )(GLshort x, GLshort y);
650 //static void ( APIENTRY * dllRasterPos2sv )(const GLshort *v);
651 //static void ( APIENTRY * dllRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
652 //static void ( APIENTRY * dllRasterPos3dv )(const GLdouble *v);
653 //static void ( APIENTRY * dllRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
654 //static void ( APIENTRY * dllRasterPos3fv )(const GLfloat *v);
655 //static void ( APIENTRY * dllRasterPos3i )(GLint x, GLint y, GLint z);
656 //static void ( APIENTRY * dllRasterPos3iv )(const GLint *v);
657 //static void ( APIENTRY * dllRasterPos3s )(GLshort x, GLshort y, GLshort z);
658 //static void ( APIENTRY * dllRasterPos3sv )(const GLshort *v);
659 //static void ( APIENTRY * dllRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
660 //static void ( APIENTRY * dllRasterPos4dv )(const GLdouble *v);
661 //static void ( APIENTRY * dllRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
662 //static void ( APIENTRY * dllRasterPos4fv )(const GLfloat *v);
663 //static void ( APIENTRY * dllRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
664 //static void ( APIENTRY * dllRasterPos4iv )(const GLint *v);
665 //static void ( APIENTRY * dllRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
666 //static void ( APIENTRY * dllRasterPos4sv )(const GLshort *v);
667 static void ( APIENTRY * dllReadBuffer )(GLenum mode);
668 static void ( APIENTRY * dllReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
669 static void ( APIENTRY * dllRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
670 static void ( APIENTRY * dllRectdv )(const GLdouble *v1, const GLdouble *v2);
671 static void ( APIENTRY * dllRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
672 static void ( APIENTRY * dllRectfv )(const GLfloat *v1, const GLfloat *v2);
673 static void ( APIENTRY * dllRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
674 static void ( APIENTRY * dllRectiv )(const GLint *v1, const GLint *v2);
675 static void ( APIENTRY * dllRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
676 static void ( APIENTRY * dllRectsv )(const GLshort *v1, const GLshort *v2);
677 //GLint ( APIENTRY * dllRenderMode )(GLenum mode);
678 static void ( APIENTRY * dllRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
679 static void ( APIENTRY * dllRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
680 static void ( APIENTRY * dllScaled )(GLdouble x, GLdouble y, GLdouble z);
681 static void ( APIENTRY * dllScalef )(GLfloat x, GLfloat y, GLfloat z);
682 static void ( APIENTRY * dllScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
683 static void ( APIENTRY * dllSelectBuffer )(GLsizei size, GLuint *buffer);
684 static void ( APIENTRY * dllShadeModel )(GLenum mode);
685 static void ( APIENTRY * dllStencilFunc )(GLenum func, GLint ref, GLuint mask);
686 static void ( APIENTRY * dllStencilMask )(GLuint mask);
687 static void ( APIENTRY * dllStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
688 static void ( APIENTRY * dllTexCoord1d )(GLdouble s);
689 static void ( APIENTRY * dllTexCoord1dv )(const GLdouble *v);
690 static void ( APIENTRY * dllTexCoord1f )(GLfloat s);
691 static void ( APIENTRY * dllTexCoord1fv )(const GLfloat *v);
692 static void ( APIENTRY * dllTexCoord1i )(GLint s);
693 static void ( APIENTRY * dllTexCoord1iv )(const GLint *v);
694 static void ( APIENTRY * dllTexCoord1s )(GLshort s);
695 static void ( APIENTRY * dllTexCoord1sv )(const GLshort *v);
696 static void ( APIENTRY * dllTexCoord2d )(GLdouble s, GLdouble t);
697 static void ( APIENTRY * dllTexCoord2dv )(const GLdouble *v);
698 static void ( APIENTRY * dllTexCoord2f )(GLfloat s, GLfloat t);
699 static void ( APIENTRY * dllTexCoord2fv )(const GLfloat *v);
700 static void ( APIENTRY * dllTexCoord2i )(GLint s, GLint t);
701 static void ( APIENTRY * dllTexCoord2iv )(const GLint *v);
702 static void ( APIENTRY * dllTexCoord2s )(GLshort s, GLshort t);
703 static void ( APIENTRY * dllTexCoord2sv )(const GLshort *v);
704 static void ( APIENTRY * dllTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
705 static void ( APIENTRY * dllTexCoord3dv )(const GLdouble *v);
706 static void ( APIENTRY * dllTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
707 static void ( APIENTRY * dllTexCoord3fv )(const GLfloat *v);
708 static void ( APIENTRY * dllTexCoord3i )(GLint s, GLint t, GLint r);
709 static void ( APIENTRY * dllTexCoord3iv )(const GLint *v);
710 static void ( APIENTRY * dllTexCoord3s )(GLshort s, GLshort t, GLshort r);
711 static void ( APIENTRY * dllTexCoord3sv )(const GLshort *v);
712 static void ( APIENTRY * dllTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
713 static void ( APIENTRY * dllTexCoord4dv )(const GLdouble *v);
714 static void ( APIENTRY * dllTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
715 static void ( APIENTRY * dllTexCoord4fv )(const GLfloat *v);
716 static void ( APIENTRY * dllTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
717 static void ( APIENTRY * dllTexCoord4iv )(const GLint *v);
718 static void ( APIENTRY * dllTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
719 static void ( APIENTRY * dllTexCoord4sv )(const GLshort *v);
720 static void ( APIENTRY * dllTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
721 static void ( APIENTRY * dllTexEnvf )(GLenum target, GLenum pname, GLfloat param);
722 static void ( APIENTRY * dllTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
723 static void ( APIENTRY * dllTexEnvi )(GLenum target, GLenum pname, GLint param);
724 static void ( APIENTRY * dllTexEnviv )(GLenum target, GLenum pname, const GLint *params);
725 static void ( APIENTRY * dllTexGend )(GLenum coord, GLenum pname, GLdouble param);
726 static void ( APIENTRY * dllTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
727 static void ( APIENTRY * dllTexGenf )(GLenum coord, GLenum pname, GLfloat param);
728 static void ( APIENTRY * dllTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
729 static void ( APIENTRY * dllTexGeni )(GLenum coord, GLenum pname, GLint param);
730 static void ( APIENTRY * dllTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
731 static void ( APIENTRY * dllTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
732 static void ( APIENTRY * dllTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
733 static void ( APIENTRY * dllTexParameterf )(GLenum target, GLenum pname, GLfloat param);
734 static void ( APIENTRY * dllTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
735 static void ( APIENTRY * dllTexParameteri )(GLenum target, GLenum pname, GLint param);
736 static void ( APIENTRY * dllTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
737 static void ( APIENTRY * dllTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
738 static void ( APIENTRY * dllTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
739 static void ( APIENTRY * dllTranslated )(GLdouble x, GLdouble y, GLdouble z);
740 static void ( APIENTRY * dllTranslatef )(GLfloat x, GLfloat y, GLfloat z);
741 static void ( APIENTRY * dllVertex2d )(GLdouble x, GLdouble y);
742 static void ( APIENTRY * dllVertex2dv )(const GLdouble *v);
743 static void ( APIENTRY * dllVertex2f )(GLfloat x, GLfloat y);
744 static void ( APIENTRY * dllVertex2fv )(const GLfloat *v);
745 static void ( APIENTRY * dllVertex2i )(GLint x, GLint y);
746 static void ( APIENTRY * dllVertex2iv )(const GLint *v);
747 static void ( APIENTRY * dllVertex2s )(GLshort x, GLshort y);
748 static void ( APIENTRY * dllVertex2sv )(const GLshort *v);
749 static void ( APIENTRY * dllVertex3d )(GLdouble x, GLdouble y, GLdouble z);
750 static void ( APIENTRY * dllVertex3dv )(const GLdouble *v);
751 static void ( APIENTRY * dllVertex3f )(GLfloat x, GLfloat y, GLfloat z);
752 static void ( APIENTRY * dllVertex3fv )(const GLfloat *v);
753 static void ( APIENTRY * dllVertex3i )(GLint x, GLint y, GLint z);
754 static void ( APIENTRY * dllVertex3iv )(const GLint *v);
755 static void ( APIENTRY * dllVertex3s )(GLshort x, GLshort y, GLshort z);
756 static void ( APIENTRY * dllVertex3sv )(const GLshort *v);
757 static void ( APIENTRY * dllVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
758 static void ( APIENTRY * dllVertex4dv )(const GLdouble *v);
759 static void ( APIENTRY * dllVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
760 static void ( APIENTRY * dllVertex4fv )(const GLfloat *v);
761 static void ( APIENTRY * dllVertex4i )(GLint x, GLint y, GLint z, GLint w);
762 static void ( APIENTRY * dllVertex4iv )(const GLint *v);
763 static void ( APIENTRY * dllVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
764 static void ( APIENTRY * dllVertex4sv )(const GLshort *v);
765 static void ( APIENTRY * dllVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
766 static void ( APIENTRY * dllViewport )(GLint x, GLint y, GLsizei width, GLsizei height);*/
767 
768 /*
769 ** QGL_Shutdown
770 **
771 ** Unloads the specified DLL then nulls out all the proc pointers.
772 */
QGL_Shutdown(void)773 void QGL_Shutdown( void )
774 {
775 	if ( glw_state.hinstOpenGL )
776 	{
777 		FreeLibrary( glw_state.hinstOpenGL );
778 		glw_state.hinstOpenGL = NULL;
779 	}
780 
781 	glw_state.hinstOpenGL = NULL;
782 
783 	//qglAccum                     = NULL;
784 	qglAlphaFunc                 = NULL;
785 	qglAreTexturesResident       = NULL;
786 	qglArrayElement              = NULL;
787 	qglBegin                     = NULL;
788 	qglBindTexture               = NULL;
789 	qglBitmap                    = NULL;
790 	qglBlendFunc                 = NULL;
791 	qglCallList                  = NULL;
792 	qglCallLists                 = NULL;
793 	qglClear                     = NULL;
794 	qglClearAccum                = NULL;
795 	qglClearColor                = NULL;
796 	qglClearDepth                = NULL;
797 	qglClearIndex                = NULL;
798 	qglClearStencil              = NULL;
799 	qglClipPlane                 = NULL;
800 	qglColor3b                   = NULL;
801 	qglColor3bv                  = NULL;
802 	qglColor3d                   = NULL;
803 	qglColor3dv                  = NULL;
804 	qglColor3f                   = NULL;
805 	qglColor3fv                  = NULL;
806 	qglColor3i                   = NULL;
807 	qglColor3iv                  = NULL;
808 	qglColor3s                   = NULL;
809 	qglColor3sv                  = NULL;
810 	qglColor3ub                  = NULL;
811 	qglColor3ubv                 = NULL;
812 	qglColor3ui                  = NULL;
813 	qglColor3uiv                 = NULL;
814 	qglColor3us                  = NULL;
815 	qglColor3usv                 = NULL;
816 	qglColor4b                   = NULL;
817 	qglColor4bv                  = NULL;
818 	qglColor4d                   = NULL;
819 	qglColor4dv                  = NULL;
820 	qglColor4f                   = NULL;
821 	qglColor4fv                  = NULL;
822 	qglColor4i                   = NULL;
823 	qglColor4iv                  = NULL;
824 	qglColor4s                   = NULL;
825 	qglColor4sv                  = NULL;
826 	qglColor4ub                  = NULL;
827 	qglColor4ubv                 = NULL;
828 	qglColor4ui                  = NULL;
829 	qglColor4uiv                 = NULL;
830 	qglColor4us                  = NULL;
831 	qglColor4usv                 = NULL;
832 	qglColorMask                 = NULL;
833 	qglColorMaterial             = NULL;
834 	qglColorPointer              = NULL;
835 	qglCopyPixels                = NULL;
836 	qglCopyTexImage1D            = NULL;
837 	qglCopyTexImage2D            = NULL;
838 	qglCopyTexSubImage1D         = NULL;
839 	qglCopyTexSubImage2D         = NULL;
840 	qglCullFace                  = NULL;
841 	qglDeleteLists               = NULL;
842 	qglDeleteTextures            = NULL;
843 	qglDepthFunc                 = NULL;
844 	qglDepthMask                 = NULL;
845 	qglDepthRange                = NULL;
846 	qglDisable                   = NULL;
847 	qglDisableClientState        = NULL;
848 	qglDrawArrays                = NULL;
849 	qglDrawBuffer                = NULL;
850 	qglDrawElements              = NULL;
851 	qglDrawPixels                = NULL;
852 	//qglEdgeFlag                  = NULL;
853 	//qglEdgeFlagPointer           = NULL;
854 	//qglEdgeFlagv                 = NULL;
855 	qglEnable                    = NULL;
856 	qglEnableClientState         = NULL;
857 	qglEnd                       = NULL;
858 	qglEndList                   = NULL;
859 	/*qglEvalCoord1d               = NULL;
860 	qglEvalCoord1dv              = NULL;
861 	qglEvalCoord1f               = NULL;
862 	qglEvalCoord1fv              = NULL;
863 	qglEvalCoord2d               = NULL;
864 	qglEvalCoord2dv              = NULL;
865 	qglEvalCoord2f               = NULL;
866 	qglEvalCoord2fv              = NULL;
867 	qglEvalMesh1                 = NULL;
868 	qglEvalMesh2                 = NULL;
869 	qglEvalPoint1                = NULL;
870 	qglEvalPoint2                = NULL;*/
871 	qglFeedbackBuffer            = NULL;
872 	qglFinish                    = NULL;
873 	qglFlush                     = NULL;
874 	qglFogf                      = NULL;
875 	qglFogfv                     = NULL;
876 	qglFogi                      = NULL;
877 	qglFogiv                     = NULL;
878 	qglFrontFace                 = NULL;
879 	qglFrustum                   = NULL;
880 	qglGenLists                  = NULL;
881 	qglGenTextures               = NULL;
882 	qglGetBooleanv               = NULL;
883 	qglGetClipPlane              = NULL;
884 	qglGetDoublev                = NULL;
885 	qglGetError                  = NULL;
886 	qglGetFloatv                 = NULL;
887 	qglGetIntegerv               = NULL;
888 	qglGetLightfv                = NULL;
889 	qglGetLightiv                = NULL;
890 	qglGetMapdv                  = NULL;
891 	qglGetMapfv                  = NULL;
892 	qglGetMapiv                  = NULL;
893 	qglGetMaterialfv             = NULL;
894 	qglGetMaterialiv             = NULL;
895 	qglGetPixelMapfv             = NULL;
896 	qglGetPixelMapuiv            = NULL;
897 	qglGetPixelMapusv            = NULL;
898 	qglGetPointerv               = NULL;
899 	qglGetPolygonStipple         = NULL;
900 	qglGetString                 = NULL;
901 	qglGetTexEnvfv               = NULL;
902 	qglGetTexEnviv               = NULL;
903 	qglGetTexGendv               = NULL;
904 	qglGetTexGenfv               = NULL;
905 	qglGetTexGeniv               = NULL;
906 	qglGetTexImage               = NULL;
907 	//qglGetTexLevelParameterfv    = NULL;
908 	//qglGetTexLevelParameteriv    = NULL;
909 	qglGetTexParameterfv         = NULL;
910 	qglGetTexParameteriv         = NULL;
911 	qglHint                      = NULL;
912 	qglIndexMask                 = NULL;
913 	qglIndexPointer              = NULL;
914 	qglIndexd                    = NULL;
915 	qglIndexdv                   = NULL;
916 	qglIndexf                    = NULL;
917 	qglIndexfv                   = NULL;
918 	qglIndexi                    = NULL;
919 	qglIndexiv                   = NULL;
920 	qglIndexs                    = NULL;
921 	qglIndexsv                   = NULL;
922 	qglIndexub                   = NULL;
923 	qglIndexubv                  = NULL;
924 	qglInitNames                 = NULL;
925 	qglInterleavedArrays         = NULL;
926 	qglIsEnabled                 = NULL;
927 	qglIsList                    = NULL;
928 	qglIsTexture                 = NULL;
929 	qglLightModelf               = NULL;
930 	qglLightModelfv              = NULL;
931 	qglLightModeli               = NULL;
932 	qglLightModeliv              = NULL;
933 	qglLightf                    = NULL;
934 	qglLightfv                   = NULL;
935 	qglLighti                    = NULL;
936 	qglLightiv                   = NULL;
937 	qglLineStipple               = NULL;
938 	qglLineWidth                 = NULL;
939 	qglListBase                  = NULL;
940 	qglLoadIdentity              = NULL;
941 	qglLoadMatrixd               = NULL;
942 	qglLoadMatrixf               = NULL;
943 	qglLoadName                  = NULL;
944 	qglLogicOp                   = NULL;
945 	/*qglMap1d                     = NULL;
946 	qglMap1f                     = NULL;
947 	qglMap2d                     = NULL;
948 	qglMap2f                     = NULL;
949 	qglMapGrid1d                 = NULL;
950 	qglMapGrid1f                 = NULL;
951 	qglMapGrid2d                 = NULL;
952 	qglMapGrid2f                 = NULL;
953 	qglMaterialf                 = NULL;
954 	qglMaterialfv                = NULL;
955 	qglMateriali                 = NULL;
956 	qglMaterialiv                = NULL;*/
957 	qglMatrixMode                = NULL;
958 	qglMultMatrixd               = NULL;
959 	qglMultMatrixf               = NULL;
960 	qglNewList                   = NULL;
961 	/*qglNormal3b                  = NULL;
962 	qglNormal3bv                 = NULL;
963 	qglNormal3d                  = NULL;
964 	qglNormal3dv                 = NULL;
965 	qglNormal3f                  = NULL;
966 	qglNormal3fv                 = NULL;
967 	qglNormal3i                  = NULL;
968 	qglNormal3iv                 = NULL;
969 	qglNormal3s                  = NULL;
970 	qglNormal3sv                 = NULL;*/
971 	qglNormalPointer             = NULL;
972 	qglOrtho                     = NULL;
973 	qglPassThrough               = NULL;
974 	qglPixelMapfv                = NULL;
975 	qglPixelMapuiv               = NULL;
976 	qglPixelMapusv               = NULL;
977 	qglPixelStoref               = NULL;
978 	qglPixelStorei               = NULL;
979 	qglPixelTransferf            = NULL;
980 	qglPixelTransferi            = NULL;
981 	qglPixelZoom                 = NULL;
982 	qglPointSize                 = NULL;
983 	qglPolygonMode               = NULL;
984 	qglPolygonOffset             = NULL;
985 	qglPolygonStipple            = NULL;
986 	qglPopAttrib                 = NULL;
987 	qglPopClientAttrib           = NULL;
988 	qglPopMatrix                 = NULL;
989 	qglPopName                   = NULL;
990 	qglPrioritizeTextures        = NULL;
991 	qglPushAttrib                = NULL;
992 	qglPushClientAttrib          = NULL;
993 	qglPushMatrix                = NULL;
994 	qglPushName                  = NULL;
995 	/*qglRasterPos2d               = NULL;
996 	qglRasterPos2dv              = NULL;
997 	qglRasterPos2f               = NULL;
998 	qglRasterPos2fv              = NULL;
999 	qglRasterPos2i               = NULL;
1000 	qglRasterPos2iv              = NULL;
1001 	qglRasterPos2s               = NULL;
1002 	qglRasterPos2sv              = NULL;
1003 	qglRasterPos3d               = NULL;
1004 	qglRasterPos3dv              = NULL;
1005 	qglRasterPos3f               = NULL;
1006 	qglRasterPos3fv              = NULL;
1007 	qglRasterPos3i               = NULL;
1008 	qglRasterPos3iv              = NULL;
1009 	qglRasterPos3s               = NULL;
1010 	qglRasterPos3sv              = NULL;
1011 	qglRasterPos4d               = NULL;
1012 	qglRasterPos4dv              = NULL;
1013 	qglRasterPos4f               = NULL;
1014 	qglRasterPos4fv              = NULL;
1015 	qglRasterPos4i               = NULL;
1016 	qglRasterPos4iv              = NULL;
1017 	qglRasterPos4s               = NULL;
1018 	qglRasterPos4sv              = NULL;*/
1019 	qglReadBuffer                = NULL;
1020 	qglReadPixels                = NULL;
1021 	qglRectd                     = NULL;
1022 	qglRectdv                    = NULL;
1023 	qglRectf                     = NULL;
1024 	qglRectfv                    = NULL;
1025 	qglRecti                     = NULL;
1026 	qglRectiv                    = NULL;
1027 	qglRects                     = NULL;
1028 	qglRectsv                    = NULL;
1029 	qglRenderMode                = NULL;
1030 	qglRotated                   = NULL;
1031 	qglRotatef                   = NULL;
1032 	qglScaled                    = NULL;
1033 	qglScalef                    = NULL;
1034 	qglScissor                   = NULL;
1035 	qglSelectBuffer              = NULL;
1036 	qglShadeModel                = NULL;
1037 	qglStencilFunc               = NULL;
1038 	qglStencilMask               = NULL;
1039 	qglStencilOp                 = NULL;
1040 	qglTexCoord1d                = NULL;
1041 	qglTexCoord1dv               = NULL;
1042 	qglTexCoord1f                = NULL;
1043 	qglTexCoord1fv               = NULL;
1044 	qglTexCoord1i                = NULL;
1045 	qglTexCoord1iv               = NULL;
1046 	qglTexCoord1s                = NULL;
1047 	qglTexCoord1sv               = NULL;
1048 	qglTexCoord2d                = NULL;
1049 	qglTexCoord2dv               = NULL;
1050 	qglTexCoord2f                = NULL;
1051 	qglTexCoord2fv               = NULL;
1052 	qglTexCoord2i                = NULL;
1053 	qglTexCoord2iv               = NULL;
1054 	qglTexCoord2s                = NULL;
1055 	qglTexCoord2sv               = NULL;
1056 	qglTexCoord3d                = NULL;
1057 	qglTexCoord3dv               = NULL;
1058 	qglTexCoord3f                = NULL;
1059 	qglTexCoord3fv               = NULL;
1060 	qglTexCoord3i                = NULL;
1061 	qglTexCoord3iv               = NULL;
1062 	qglTexCoord3s                = NULL;
1063 	qglTexCoord3sv               = NULL;
1064 	qglTexCoord4d                = NULL;
1065 	qglTexCoord4dv               = NULL;
1066 	qglTexCoord4f                = NULL;
1067 	qglTexCoord4fv               = NULL;
1068 	qglTexCoord4i                = NULL;
1069 	qglTexCoord4iv               = NULL;
1070 	qglTexCoord4s                = NULL;
1071 	qglTexCoord4sv               = NULL;
1072 	qglTexCoordPointer           = NULL;
1073 	qglTexEnvf                   = NULL;
1074 	qglTexEnvfv                  = NULL;
1075 	qglTexEnvi                   = NULL;
1076 	qglTexEnviv                  = NULL;
1077 	qglTexGend                   = NULL;
1078 	qglTexGendv                  = NULL;
1079 	qglTexGenf                   = NULL;
1080 	qglTexGenfv                  = NULL;
1081 	qglTexGeni                   = NULL;
1082 	qglTexGeniv                  = NULL;
1083 	qglTexImage1D                = NULL;
1084 	qglTexImage2D                = NULL;
1085 	qglTexParameterf             = NULL;
1086 	qglTexParameterfv            = NULL;
1087 	qglTexParameteri             = NULL;
1088 	qglTexParameteriv            = NULL;
1089 	qglTexSubImage1D             = NULL;
1090 	qglTexSubImage2D             = NULL;
1091 	qglTranslated                = NULL;
1092 	qglTranslatef                = NULL;
1093 	qglVertex2d                  = NULL;
1094 	qglVertex2dv                 = NULL;
1095 	qglVertex2f                  = NULL;
1096 	qglVertex2fv                 = NULL;
1097 	qglVertex2i                  = NULL;
1098 	qglVertex2iv                 = NULL;
1099 	qglVertex2s                  = NULL;
1100 	qglVertex2sv                 = NULL;
1101 	qglVertex3d                  = NULL;
1102 	qglVertex3dv                 = NULL;
1103 	qglVertex3f                  = NULL;
1104 	qglVertex3fv                 = NULL;
1105 	qglVertex3i                  = NULL;
1106 	qglVertex3iv                 = NULL;
1107 	qglVertex3s                  = NULL;
1108 	qglVertex3sv                 = NULL;
1109 	qglVertex4d                  = NULL;
1110 	qglVertex4dv                 = NULL;
1111 	qglVertex4f                  = NULL;
1112 	qglVertex4fv                 = NULL;
1113 	qglVertex4i                  = NULL;
1114 	qglVertex4iv                 = NULL;
1115 	qglVertex4s                  = NULL;
1116 	qglVertex4sv                 = NULL;
1117 	qglVertexPointer             = NULL;
1118 	qglViewport                  = NULL;
1119 
1120 	qglGenQueriesARB			 = NULL;
1121 	qglGetQueryObjectivARB		 = NULL;
1122 	qglBeginQueryARB			 = NULL;
1123 	qglEndQueryARB				 = NULL;
1124 
1125 	qwglCopyContext              = NULL;
1126 	qwglCreateContext            = NULL;
1127 	qwglCreateLayerContext       = NULL;
1128 	qwglDeleteContext            = NULL;
1129 	qwglDescribeLayerPlane       = NULL;
1130 	qwglGetCurrentContext        = NULL;
1131 	qwglGetCurrentDC             = NULL;
1132 	qwglGetLayerPaletteEntries   = NULL;
1133 	qwglGetProcAddress           = NULL;
1134 	qwglMakeCurrent              = NULL;
1135 	qwglRealizeLayerPalette      = NULL;
1136 	qwglSetLayerPaletteEntries   = NULL;
1137 	qwglShareLists               = NULL;
1138 	qwglSwapLayerBuffers         = NULL;
1139 	qwglUseFontBitmaps           = NULL;
1140 	qwglUseFontOutlines          = NULL;
1141 
1142 	qwglChoosePixelFormat        = NULL;
1143 	qwglDescribePixelFormat      = NULL;
1144 	qwglGetPixelFormat           = NULL;
1145 	qwglSetPixelFormat           = NULL;
1146 	qwglSwapBuffers              = NULL;
1147 
1148 	qwglSwapIntervalEXT	= NULL;
1149 
1150 	qwglGetDeviceGammaRampEXT = NULL;
1151 	qwglSetDeviceGammaRampEXT = NULL;
1152 }
1153 
1154 #pragma warning (disable : 4113 4133 4047 )
1155 #define GPA( a ) GetProcAddress( glw_state.hinstOpenGL, a )
1156 
1157 /*
1158 ** QGL_Init
1159 **
1160 ** This is responsible for binding our qgl function pointers to
1161 ** the appropriate GL stuff.  In Windows this means doing a
1162 ** LoadLibrary and a bunch of calls to GetProcAddress.  On other
1163 ** operating systems we need to do the right thing, whatever that
1164 ** might be.
1165 **
1166 */
QGL_Init(const char * dllname)1167 qboolean QGL_Init( const char *dllname )
1168 {
1169 	char envbuffer[16];
1170 	float g;
1171 	char pathbuff[MAX_PATH];
1172 
1173 	g = 2.00f * ( 0.8f - ( vid_gamma->value - 0.5f ) ) + 1.0F;
1174 
1175 	Com_sprintf( envbuffer, sizeof(envbuffer), "%g", g );
1176 
1177 	SetEnvironmentVariable ("SSTV2_GAMMA", envbuffer);
1178 	SetEnvironmentVariable ("SST_GAMMA", envbuffer);
1179 
1180 	GetCurrentDirectory (sizeof(pathbuff)-16, pathbuff);
1181 	strcat (pathbuff, "\\opengl32.dll");
1182 
1183 	if (GetFileAttributes (pathbuff) != INVALID_FILE_ATTRIBUTES)
1184 	{
1185 		ri.Con_Printf ( PRINT_ALL, "WARNING: An OpenGL DLL was loaded from the current directory. This may be a wrapper DLL and cause problems. It is recommended you delete '%s'.\n", pathbuff);
1186 		ri.Cvar_Get ("vid_localgl", "1", CVAR_NOSET);
1187 	}
1188 
1189 	if ( ( glw_state.hinstOpenGL = LoadLibrary( dllname ) ) == 0 )
1190 	{
1191 		char *buf = NULL;
1192 
1193 		FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0, NULL);
1194 		ri.Con_Printf( PRINT_ALL, "%s\n", buf );
1195 		return false;
1196 	}
1197 
1198 	//gl_config.allow_cds = true;
1199 
1200 	//qglAccum                     =  GPA( "glAccum" );
1201 	qglAlphaFunc                 =  GPA( "glAlphaFunc" );
1202 	qglAreTexturesResident       = GPA( "glAreTexturesResident" );
1203 	qglArrayElement              = GPA( "glArrayElement" );
1204 	qglBegin                     = GPA( "glBegin" );
1205 	qglBindTexture               = GPA( "glBindTexture" );
1206 	qglBitmap                    = GPA( "glBitmap" );
1207 	qglBlendFunc                 = GPA( "glBlendFunc" );
1208 	qglCallList                  = GPA( "glCallList" );
1209 	qglCallLists                 = GPA( "glCallLists" );
1210 	qglClear                     = GPA( "glClear" );
1211 	qglClearAccum                = GPA( "glClearAccum" );
1212 	qglClearColor                = GPA( "glClearColor" );
1213 	qglClearDepth                = GPA( "glClearDepth" );
1214 	qglClearIndex                = GPA( "glClearIndex" );
1215 	qglClearStencil              = GPA( "glClearStencil" );
1216 	qglClipPlane                 = GPA( "glClipPlane" );
1217 	qglColor3b                   = GPA( "glColor3b" );
1218 	qglColor3bv                  = GPA( "glColor3bv" );
1219 	qglColor3d                   = GPA( "glColor3d" );
1220 	qglColor3dv                  = GPA( "glColor3dv" );
1221 	qglColor3f                   = GPA( "glColor3f" );
1222 	qglColor3fv                  = GPA( "glColor3fv" );
1223 	qglColor3i                   = GPA( "glColor3i" );
1224 	qglColor3iv                  = GPA( "glColor3iv" );
1225 	qglColor3s                   = GPA( "glColor3s" );
1226 	qglColor3sv                  = GPA( "glColor3sv" );
1227 	qglColor3ub                  = GPA( "glColor3ub" );
1228 	qglColor3ubv                 = GPA( "glColor3ubv" );
1229 	qglColor3ui                  = GPA( "glColor3ui" );
1230 	qglColor3uiv                 = GPA( "glColor3uiv" );
1231 	qglColor3us                  = GPA( "glColor3us" );
1232 	qglColor3usv                 = GPA( "glColor3usv" );
1233 	qglColor4b                   = GPA( "glColor4b" );
1234 	qglColor4bv                  = GPA( "glColor4bv" );
1235 	qglColor4d                   = GPA( "glColor4d" );
1236 	qglColor4dv                  = GPA( "glColor4dv" );
1237 	qglColor4f                   = GPA( "glColor4f" );
1238 	qglColor4fv                  = GPA( "glColor4fv" );
1239 	qglColor4i                   = GPA( "glColor4i" );
1240 	qglColor4iv                  = GPA( "glColor4iv" );
1241 	qglColor4s                   = GPA( "glColor4s" );
1242 	qglColor4sv                  = GPA( "glColor4sv" );
1243 	qglColor4ub                  = GPA( "glColor4ub" );
1244 	qglColor4ubv                 = GPA( "glColor4ubv" );
1245 	qglColor4ui                  = GPA( "glColor4ui" );
1246 	qglColor4uiv                 = GPA( "glColor4uiv" );
1247 	qglColor4us                  = GPA( "glColor4us" );
1248 	qglColor4usv                 = GPA( "glColor4usv" );
1249 	qglColorMask                 = GPA( "glColorMask" );
1250 	qglColorMaterial             = GPA( "glColorMaterial" );
1251 	qglColorPointer              = GPA( "glColorPointer" );
1252 	qglCopyPixels                = GPA( "glCopyPixels" );
1253 	qglCopyTexImage1D            = GPA( "glCopyTexImage1D" );
1254 	qglCopyTexImage2D            = GPA( "glCopyTexImage2D" );
1255 	qglCopyTexSubImage1D         = GPA( "glCopyTexSubImage1D" );
1256 	qglCopyTexSubImage2D         = GPA( "glCopyTexSubImage2D" );
1257 	qglCullFace                  = GPA( "glCullFace" );
1258 	qglDeleteLists               = GPA( "glDeleteLists" );
1259 	qglDeleteTextures            = GPA( "glDeleteTextures" );
1260 	qglDepthFunc                 = GPA( "glDepthFunc" );
1261 	qglDepthMask                 = GPA( "glDepthMask" );
1262 	qglDepthRange                = GPA( "glDepthRange" );
1263 	qglDisable                   = GPA( "glDisable" );
1264 	/*qglDisable = R1LogDisable;
1265 	GPA ("glDisable");*/
1266 	qglDisableClientState        = GPA( "glDisableClientState" );
1267 	qglDrawArrays                = GPA( "glDrawArrays" );
1268 	qglDrawBuffer                = GPA( "glDrawBuffer" );
1269 	qglDrawElements              = GPA( "glDrawElements" );
1270 	qglDrawPixels                = GPA( "glDrawPixels" );
1271 	//qglEdgeFlag                  = GPA( "glEdgeFlag" );
1272 	//qglEdgeFlagPointer           = GPA( "glEdgeFlagPointer" );
1273 	//qglEdgeFlagv                 = GPA( "glEdgeFlagv" );
1274 	qglEnable                    = 	GPA( "glEnable" );
1275 	/*qglEnable = R1LogEnable;
1276 	GPA( "glEnable" );*/
1277 	qglEnableClientState         = 	GPA( "glEnableClientState" );
1278 	qglEnd                       = 	GPA( "glEnd" );
1279 	qglEndList                   = 	GPA( "glEndList" );
1280 	/*qglEvalCoord1d				 = 	GPA( "glEvalCoord1d" );
1281 	qglEvalCoord1dv              = 	GPA( "glEvalCoord1dv" );
1282 	qglEvalCoord1f               = 	GPA( "glEvalCoord1f" );
1283 	qglEvalCoord1fv              = 	GPA( "glEvalCoord1fv" );
1284 	qglEvalCoord2d               = 	GPA( "glEvalCoord2d" );
1285 	qglEvalCoord2dv              = 	GPA( "glEvalCoord2dv" );
1286 	qglEvalCoord2f               = 	GPA( "glEvalCoord2f" );
1287 	qglEvalCoord2fv              = 	GPA( "glEvalCoord2fv" );
1288 	qglEvalMesh1                 = 	GPA( "glEvalMesh1" );
1289 	qglEvalMesh2                 = 	GPA( "glEvalMesh2" );
1290 	qglEvalPoint1                = 	GPA( "glEvalPoint1" );
1291 	qglEvalPoint2                = 	GPA( "glEvalPoint2" );*/
1292 	qglFeedbackBuffer            = 	GPA( "glFeedbackBuffer" );
1293 	qglFinish                    = 	GPA( "glFinish" );
1294 	qglFlush                     = 	GPA( "glFlush" );
1295 	qglFogf                      = 	GPA( "glFogf" );
1296 	qglFogfv                     = 	GPA( "glFogfv" );
1297 	qglFogi                      = 	GPA( "glFogi" );
1298 	qglFogiv                     = 	GPA( "glFogiv" );
1299 	qglFrontFace                 = 	GPA( "glFrontFace" );
1300 	qglFrustum                   = 	GPA( "glFrustum" );
1301 	qglGenLists                  = 	GPA( "glGenLists" );
1302 	qglGenTextures               = 	GPA( "glGenTextures" );
1303 	qglGetBooleanv               = 	GPA( "glGetBooleanv" );
1304 	qglGetClipPlane              = 	GPA( "glGetClipPlane" );
1305 	qglGetDoublev                = 	GPA( "glGetDoublev" );
1306 	qglGetError                  = 	GPA( "glGetError" );
1307 	qglGetFloatv                 = 	GPA( "glGetFloatv" );
1308 	qglGetIntegerv               = 	GPA( "glGetIntegerv" );
1309 	qglGetLightfv                = 	GPA( "glGetLightfv" );
1310 	qglGetLightiv                = 	GPA( "glGetLightiv" );
1311 	qglGetMapdv                  = 	GPA( "glGetMapdv" );
1312 	qglGetMapfv                  = 	GPA( "glGetMapfv" );
1313 	qglGetMapiv                  = 	GPA( "glGetMapiv" );
1314 	qglGetMaterialfv             = 	GPA( "glGetMaterialfv" );
1315 	qglGetMaterialiv             = 	GPA( "glGetMaterialiv" );
1316 	qglGetPixelMapfv             = 	GPA( "glGetPixelMapfv" );
1317 	qglGetPixelMapuiv            = 	GPA( "glGetPixelMapuiv" );
1318 	qglGetPixelMapusv            = 	GPA( "glGetPixelMapusv" );
1319 	qglGetPointerv               = 	GPA( "glGetPointerv" );
1320 	qglGetPolygonStipple         = 	GPA( "glGetPolygonStipple" );
1321 	qglGetString                 = 	GPA( "glGetString" );
1322 	qglGetTexEnvfv               = 	GPA( "glGetTexEnvfv" );
1323 	qglGetTexEnviv               = 	GPA( "glGetTexEnviv" );
1324 	qglGetTexGendv               = 	GPA( "glGetTexGendv" );
1325 	qglGetTexGenfv               = 	GPA( "glGetTexGenfv" );
1326 	qglGetTexGeniv               = 	GPA( "glGetTexGeniv" );
1327 	qglGetTexImage               = 	GPA( "glGetTexImage" );
1328 	//qglGetTexLevelParameterfv    = 	GPA( "glGetLevelParameterfv" );
1329 	//qglGetTexLevelParameteriv    = 	GPA( "glGetLevelParameteriv" );
1330 	qglGetTexParameterfv         = 	GPA( "glGetTexParameterfv" );
1331 	qglGetTexParameteriv         = 	GPA( "glGetTexParameteriv" );
1332 	qglHint                      = 	GPA( "glHint" );
1333 	qglIndexMask                 = 	GPA( "glIndexMask" );
1334 	qglIndexPointer              = 	GPA( "glIndexPointer" );
1335 	qglIndexd                    = 	GPA( "glIndexd" );
1336 	qglIndexdv                   = 	GPA( "glIndexdv" );
1337 	qglIndexf                    = 	GPA( "glIndexf" );
1338 	qglIndexfv                   = 	GPA( "glIndexfv" );
1339 	qglIndexi                    = 	GPA( "glIndexi" );
1340 	qglIndexiv                   = 	GPA( "glIndexiv" );
1341 	qglIndexs                    = 	GPA( "glIndexs" );
1342 	qglIndexsv                   = 	GPA( "glIndexsv" );
1343 	qglIndexub                   = 	GPA( "glIndexub" );
1344 	qglIndexubv                  = 	GPA( "glIndexubv" );
1345 	qglInitNames                 = 	GPA( "glInitNames" );
1346 	qglInterleavedArrays         = 	GPA( "glInterleavedArrays" );
1347 	qglIsEnabled                 = 	GPA( "glIsEnabled" );
1348 	qglIsList                    = 	GPA( "glIsList" );
1349 	qglIsTexture                 = 	GPA( "glIsTexture" );
1350 	qglLightModelf               = 	GPA( "glLightModelf" );
1351 	qglLightModelfv              = 	GPA( "glLightModelfv" );
1352 	qglLightModeli               = 	GPA( "glLightModeli" );
1353 	qglLightModeliv              = 	GPA( "glLightModeliv" );
1354 	qglLightf                    = 	GPA( "glLightf" );
1355 	qglLightfv                   = 	GPA( "glLightfv" );
1356 	qglLighti                    = 	GPA( "glLighti" );
1357 	qglLightiv                   = 	GPA( "glLightiv" );
1358 	qglLineStipple               = 	GPA( "glLineStipple" );
1359 	qglLineWidth                 = 	GPA( "glLineWidth" );
1360 	qglListBase                  = 	GPA( "glListBase" );
1361 	qglLoadIdentity              = 	GPA( "glLoadIdentity" );
1362 	qglLoadMatrixd               = 	GPA( "glLoadMatrixd" );
1363 	qglLoadMatrixf               = 	GPA( "glLoadMatrixf" );
1364 	qglLoadName                  = 	GPA( "glLoadName" );
1365 	qglLogicOp                   = 	GPA( "glLogicOp" );
1366 	/*qglMap1d                     = 	GPA( "glMap1d" );
1367 	qglMap1f                     = 	GPA( "glMap1f" );
1368 	qglMap2d                     = 	GPA( "glMap2d" );
1369 	qglMap2f                     = 	GPA( "glMap2f" );
1370 	qglMapGrid1d                 = 	GPA( "glMapGrid1d" );
1371 	qglMapGrid1f                 = 	GPA( "glMapGrid1f" );
1372 	qglMapGrid2d                 = 	GPA( "glMapGrid2d" );
1373 	qglMapGrid2f                 = 	GPA( "glMapGrid2f" );
1374 	qglMaterialf                 = 	GPA( "glMaterialf" );
1375 	qglMaterialfv                = 	GPA( "glMaterialfv" );
1376 	qglMateriali                 = 	GPA( "glMateriali" );
1377 	qglMaterialiv                = 	GPA( "glMaterialiv" );*/
1378 	qglMatrixMode                = 	GPA( "glMatrixMode" );
1379 	qglMultMatrixd               = 	GPA( "glMultMatrixd" );
1380 	qglMultMatrixf               = 	GPA( "glMultMatrixf" );
1381 	qglNewList                   = 	GPA( "glNewList" );
1382 	/*qglNormal3b                  = 	GPA( "glNormal3b" );
1383 	qglNormal3bv                 = 	GPA( "glNormal3bv" );
1384 	qglNormal3d                  = 	GPA( "glNormal3d" );
1385 	qglNormal3dv                 = 	GPA( "glNormal3dv" );
1386 	qglNormal3f                  = 	GPA( "glNormal3f" );
1387 	qglNormal3fv                 = 	GPA( "glNormal3fv" );
1388 	qglNormal3i                  = 	GPA( "glNormal3i" );
1389 	qglNormal3iv                 = 	GPA( "glNormal3iv" );
1390 	qglNormal3s                  = 	GPA( "glNormal3s" );
1391 	qglNormal3sv                 = 	GPA( "glNormal3sv" );*/
1392 	qglNormalPointer             = 	GPA( "glNormalPointer" );
1393 	qglOrtho                     = 	GPA( "glOrtho" );
1394 	qglPassThrough               = 	GPA( "glPassThrough" );
1395 	qglPixelMapfv                = 	GPA( "glPixelMapfv" );
1396 	qglPixelMapuiv               = 	GPA( "glPixelMapuiv" );
1397 	qglPixelMapusv               = 	GPA( "glPixelMapusv" );
1398 	qglPixelStoref               = 	GPA( "glPixelStoref" );
1399 	qglPixelStorei               = 	GPA( "glPixelStorei" );
1400 	qglPixelTransferf            = 	GPA( "glPixelTransferf" );
1401 	qglPixelTransferi            = 	GPA( "glPixelTransferi" );
1402 	qglPixelZoom                 = 	GPA( "glPixelZoom" );
1403 	qglPointSize                 = 	GPA( "glPointSize" );
1404 	qglPolygonMode               = 	GPA( "glPolygonMode" );
1405 	qglPolygonOffset             = 	GPA( "glPolygonOffset" );
1406 	qglPolygonStipple            = 	GPA( "glPolygonStipple" );
1407 	qglPopAttrib                 = 	GPA( "glPopAttrib" );
1408 	qglPopClientAttrib           = 	GPA( "glPopClientAttrib" );
1409 	qglPopMatrix                 = 	GPA( "glPopMatrix" );
1410 	qglPopName                   = 	GPA( "glPopName" );
1411 	qglPrioritizeTextures        = 	GPA( "glPrioritizeTextures" );
1412 	qglPushAttrib                = 	GPA( "glPushAttrib" );
1413 	qglPushClientAttrib          = 	GPA( "glPushClientAttrib" );
1414 	qglPushMatrix                = 	GPA( "glPushMatrix" );
1415 	qglPushName                  = 	GPA( "glPushName" );
1416 	/*qglRasterPos2d               = 	GPA( "glRasterPos2d" );
1417 	qglRasterPos2dv              = 	GPA( "glRasterPos2dv" );
1418 	qglRasterPos2f               = 	GPA( "glRasterPos2f" );
1419 	qglRasterPos2fv              = 	GPA( "glRasterPos2fv" );
1420 	qglRasterPos2i               = 	GPA( "glRasterPos2i" );
1421 	qglRasterPos2iv              = 	GPA( "glRasterPos2iv" );
1422 	qglRasterPos2s               = 	GPA( "glRasterPos2s" );
1423 	qglRasterPos2sv              = 	GPA( "glRasterPos2sv" );
1424 	qglRasterPos3d               = 	GPA( "glRasterPos3d" );
1425 	qglRasterPos3dv              = 	GPA( "glRasterPos3dv" );
1426 	qglRasterPos3f               = 	GPA( "glRasterPos3f" );
1427 	qglRasterPos3fv              = 	GPA( "glRasterPos3fv" );
1428 	qglRasterPos3i               = 	GPA( "glRasterPos3i" );
1429 	qglRasterPos3iv              = 	GPA( "glRasterPos3iv" );
1430 	qglRasterPos3s               = 	GPA( "glRasterPos3s" );
1431 	qglRasterPos3sv              = 	GPA( "glRasterPos3sv" );
1432 	qglRasterPos4d               = 	GPA( "glRasterPos4d" );
1433 	qglRasterPos4dv              = 	GPA( "glRasterPos4dv" );
1434 	qglRasterPos4f               = 	GPA( "glRasterPos4f" );
1435 	qglRasterPos4fv              = 	GPA( "glRasterPos4fv" );
1436 	qglRasterPos4i               = 	GPA( "glRasterPos4i" );
1437 	qglRasterPos4iv              = 	GPA( "glRasterPos4iv" );
1438 	qglRasterPos4s               = 	GPA( "glRasterPos4s" );
1439 	qglRasterPos4sv              = 	GPA( "glRasterPos4sv" );*/
1440 	qglReadBuffer                = 	GPA( "glReadBuffer" );
1441 	qglReadPixels                = 	GPA( "glReadPixels" );
1442 	qglRectd                     = 	GPA( "glRectd" );
1443 	qglRectdv                    = 	GPA( "glRectdv" );
1444 	qglRectf                     = 	GPA( "glRectf" );
1445 	qglRectfv                    = 	GPA( "glRectfv" );
1446 	qglRecti                     = 	GPA( "glRecti" );
1447 	qglRectiv                    = 	GPA( "glRectiv" );
1448 	qglRects                     = 	GPA( "glRects" );
1449 	qglRectsv                    = 	GPA( "glRectsv" );
1450 	qglRenderMode                = 	GPA( "glRenderMode" );
1451 	qglRotated                   = 	GPA( "glRotated" );
1452 	qglRotatef                   = 	GPA( "glRotatef" );
1453 	qglScaled                    = 	GPA( "glScaled" );
1454 	qglScalef                    = 	GPA( "glScalef" );
1455 	qglScissor                   = 	GPA( "glScissor" );
1456 	qglSelectBuffer              = 	GPA( "glSelectBuffer" );
1457 	qglShadeModel                = 	GPA( "glShadeModel" );
1458 	qglStencilFunc               = 	GPA( "glStencilFunc" );
1459 	qglStencilMask               = 	GPA( "glStencilMask" );
1460 	qglStencilOp                 = 	GPA( "glStencilOp" );
1461 	qglTexCoord1d                = 	GPA( "glTexCoord1d" );
1462 	qglTexCoord1dv               = 	GPA( "glTexCoord1dv" );
1463 	qglTexCoord1f                = 	GPA( "glTexCoord1f" );
1464 	qglTexCoord1fv               = 	GPA( "glTexCoord1fv" );
1465 	qglTexCoord1i                = 	GPA( "glTexCoord1i" );
1466 	qglTexCoord1iv               = 	GPA( "glTexCoord1iv" );
1467 	qglTexCoord1s                = 	GPA( "glTexCoord1s" );
1468 	qglTexCoord1sv               = 	GPA( "glTexCoord1sv" );
1469 	qglTexCoord2d                = 	GPA( "glTexCoord2d" );
1470 	qglTexCoord2dv               = 	GPA( "glTexCoord2dv" );
1471 	qglTexCoord2f                = 	GPA( "glTexCoord2f" );
1472 	qglTexCoord2fv               = 	GPA( "glTexCoord2fv" );
1473 	qglTexCoord2i                = 	GPA( "glTexCoord2i" );
1474 	qglTexCoord2iv               = 	GPA( "glTexCoord2iv" );
1475 	qglTexCoord2s                = 	GPA( "glTexCoord2s" );
1476 	qglTexCoord2sv               = 	GPA( "glTexCoord2sv" );
1477 	qglTexCoord3d                = 	GPA( "glTexCoord3d" );
1478 	qglTexCoord3dv               = 	GPA( "glTexCoord3dv" );
1479 	qglTexCoord3f                = 	GPA( "glTexCoord3f" );
1480 	qglTexCoord3fv               = 	GPA( "glTexCoord3fv" );
1481 	qglTexCoord3i                = 	GPA( "glTexCoord3i" );
1482 	qglTexCoord3iv               = 	GPA( "glTexCoord3iv" );
1483 	qglTexCoord3s                = 	GPA( "glTexCoord3s" );
1484 	qglTexCoord3sv               = 	GPA( "glTexCoord3sv" );
1485 	qglTexCoord4d                = 	GPA( "glTexCoord4d" );
1486 	qglTexCoord4dv               = 	GPA( "glTexCoord4dv" );
1487 	qglTexCoord4f                = 	GPA( "glTexCoord4f" );
1488 	qglTexCoord4fv               = 	GPA( "glTexCoord4fv" );
1489 	qglTexCoord4i                = 	GPA( "glTexCoord4i" );
1490 	qglTexCoord4iv               = 	GPA( "glTexCoord4iv" );
1491 	qglTexCoord4s                = 	GPA( "glTexCoord4s" );
1492 	qglTexCoord4sv               = 	GPA( "glTexCoord4sv" );
1493 	qglTexCoordPointer           = 	GPA( "glTexCoordPointer" );
1494 	qglTexEnvf                   = 	GPA( "glTexEnvf" );
1495 	qglTexEnvfv                  = 	GPA( "glTexEnvfv" );
1496 	qglTexEnvi                   = 	GPA( "glTexEnvi" );
1497 	qglTexEnviv                  = 	GPA( "glTexEnviv" );
1498 	qglTexGend                   = 	GPA( "glTexGend" );
1499 	qglTexGendv                  = 	GPA( "glTexGendv" );
1500 	qglTexGenf                   = 	GPA( "glTexGenf" );
1501 	qglTexGenfv                  = 	GPA( "glTexGenfv" );
1502 	qglTexGeni                   = 	GPA( "glTexGeni" );
1503 	qglTexGeniv                  = 	GPA( "glTexGeniv" );
1504 	qglTexImage1D                = 	GPA( "glTexImage1D" );
1505 	qglTexImage2D                = 	GPA( "glTexImage2D" );
1506 	qglTexParameterf             = 	GPA( "glTexParameterf" );
1507 	qglTexParameterfv            = 	GPA( "glTexParameterfv" );
1508 	qglTexParameteri             = 	GPA( "glTexParameteri" );
1509 	qglTexParameteriv            = 	GPA( "glTexParameteriv" );
1510 	qglTexSubImage1D             = 	GPA( "glTexSubImage1D" );
1511 	qglTexSubImage2D             = 	GPA( "glTexSubImage2D" );
1512 	qglTranslated                = 	GPA( "glTranslated" );
1513 	qglTranslatef                = 	GPA( "glTranslatef" );
1514 	qglVertex2d                  = 	GPA( "glVertex2d" );
1515 	qglVertex2dv                 = 	GPA( "glVertex2dv" );
1516 	qglVertex2f                  = 	GPA( "glVertex2f" );
1517 	qglVertex2fv                 = 	GPA( "glVertex2fv" );
1518 	qglVertex2i                  = 	GPA( "glVertex2i" );
1519 	qglVertex2iv                 = 	GPA( "glVertex2iv" );
1520 	qglVertex2s                  = 	GPA( "glVertex2s" );
1521 	qglVertex2sv                 = 	GPA( "glVertex2sv" );
1522 	qglVertex3d                  = 	GPA( "glVertex3d" );
1523 	qglVertex3dv                 = 	GPA( "glVertex3dv" );
1524 	qglVertex3f                  = 	GPA( "glVertex3f" );
1525 	qglVertex3fv                 = 	GPA( "glVertex3fv" );
1526 	qglVertex3i                  = 	GPA( "glVertex3i" );
1527 	qglVertex3iv                 = 	GPA( "glVertex3iv" );
1528 	qglVertex3s                  = 	GPA( "glVertex3s" );
1529 	qglVertex3sv                 = 	GPA( "glVertex3sv" );
1530 	qglVertex4d                  = 	GPA( "glVertex4d" );
1531 	qglVertex4dv                 = 	GPA( "glVertex4dv" );
1532 	qglVertex4f                  = 	GPA( "glVertex4f" );
1533 	qglVertex4fv                 = 	GPA( "glVertex4fv" );
1534 	qglVertex4i                  = 	GPA( "glVertex4i" );
1535 	qglVertex4iv                 = 	GPA( "glVertex4iv" );
1536 	qglVertex4s                  = 	GPA( "glVertex4s" );
1537 	qglVertex4sv                 = 	GPA( "glVertex4sv" );
1538 	qglVertexPointer             = 	GPA( "glVertexPointer" );
1539 	qglViewport                  = 	GPA( "glViewport" );
1540 
1541 	qwglCopyContext              = GPA( "wglCopyContext" );
1542 	qwglCreateContext            = GPA( "wglCreateContext" );
1543 	qwglCreateLayerContext       = GPA( "wglCreateLayerContext" );
1544 	qwglDeleteContext            = GPA( "wglDeleteContext" );
1545 	qwglDescribeLayerPlane       = GPA( "wglDescribeLayerPlane" );
1546 	qwglGetCurrentContext        = GPA( "wglGetCurrentContext" );
1547 	qwglGetCurrentDC             = GPA( "wglGetCurrentDC" );
1548 	qwglGetLayerPaletteEntries   = GPA( "wglGetLayerPaletteEntries" );
1549 	qwglGetProcAddress           = GPA( "wglGetProcAddress" );
1550 	qwglMakeCurrent              = GPA( "wglMakeCurrent" );
1551 	qwglRealizeLayerPalette      = GPA( "wglRealizeLayerPalette" );
1552 	qwglSetLayerPaletteEntries   = GPA( "wglSetLayerPaletteEntries" );
1553 	qwglShareLists               = GPA( "wglShareLists" );
1554 	qwglSwapLayerBuffers         = GPA( "wglSwapLayerBuffers" );
1555 	qwglUseFontBitmaps           = GPA( "wglUseFontBitmapsA" );
1556 	qwglUseFontOutlines          = GPA( "wglUseFontOutlinesA" );
1557 
1558 	qwglChoosePixelFormat        = GPA( "wglChoosePixelFormat" );
1559 	qwglDescribePixelFormat      = GPA( "wglDescribePixelFormat" );
1560 	qwglGetPixelFormat           = GPA( "wglGetPixelFormat" );
1561 	qwglSetPixelFormat           = GPA( "wglSetPixelFormat" );
1562 	qwglSwapBuffers              = GPA( "wglSwapBuffers" );
1563 
1564 	qwglSwapIntervalEXT = NULL;
1565 	qglPointParameterfEXT = NULL;
1566 	qglPointParameterfvEXT = NULL;
1567 	qglColorTableEXT = NULL;
1568 	qglSelectTextureSGIS = NULL;
1569 	qglMTexCoord2fSGIS = NULL;
1570 	qglMTexCoord2fvSGIS = NULL;
1571 	qglBeginQueryARB = NULL;
1572 	qglEndQueryARB = NULL;
1573 	qglGenQueriesARB = NULL;
1574 	qglGetQueryivARB = NULL;
1575 	qglGetQueryObjectivARB = NULL;
1576 	qglGetQueryObjectuivARB = NULL;
1577 
1578 	return true;
1579 }
1580 
1581 #pragma warning (default : 4113 4133 4047 )
1582 
1583