QGL_WIN.C 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. /*
  19. ** QGL_WIN.C
  20. **
  21. ** This file implements the operating system binding of GL to QGL function
  22. ** pointers. When doing a port of Quake2 you must implement the following
  23. ** two functions:
  24. **
  25. ** QGL_Init() - loads libraries, assigns function pointers, etc.
  26. ** QGL_Shutdown() - unloads libraries, NULLs function pointers
  27. */
  28. #include "qgl.h"
  29. #include <float.h>
  30. HMODULE g_hGLDLL;
  31. HMODULE g_hGLUDLL;
  32. # pragma warning (disable : 4113 4133 4047 )
  33. int ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *);
  34. int ( WINAPI * qwglDescribePixelFormat) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
  35. int ( WINAPI * qwglGetPixelFormat)(HDC);
  36. BOOL ( WINAPI * qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
  37. BOOL ( WINAPI * qwglSwapBuffers)(HDC);
  38. BOOL ( WINAPI * qwglCopyContext)(HGLRC, HGLRC, UINT);
  39. HGLRC ( WINAPI * qwglCreateContext)(HDC);
  40. HGLRC ( WINAPI * qwglCreateLayerContext)(HDC, int);
  41. BOOL ( WINAPI * qwglDeleteContext)(HGLRC);
  42. HGLRC ( WINAPI * qwglGetCurrentContext)(VOID);
  43. HDC ( WINAPI * qwglGetCurrentDC)(VOID);
  44. PROC ( WINAPI * qwglGetProcAddress)(LPCSTR);
  45. BOOL ( WINAPI * qwglMakeCurrent)(HDC, HGLRC);
  46. BOOL ( WINAPI * qwglShareLists)(HGLRC, HGLRC);
  47. BOOL ( WINAPI * qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD);
  48. BOOL ( WINAPI * qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT,
  49. FLOAT, int, LPGLYPHMETRICSFLOAT);
  50. BOOL ( WINAPI * qwglDescribeLayerPlane)(HDC, int, int, UINT,
  51. LPLAYERPLANEDESCRIPTOR);
  52. int ( WINAPI * qwglSetLayerPaletteEntries)(HDC, int, int, int,
  53. CONST COLORREF *);
  54. int ( WINAPI * qwglGetLayerPaletteEntries)(HDC, int, int, int,
  55. COLORREF *);
  56. BOOL ( WINAPI * qwglRealizeLayerPalette)(HDC, int, BOOL);
  57. BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT);
  58. void ( APIENTRY * qglAccum )(GLenum op, GLfloat value);
  59. void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref);
  60. GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
  61. void ( APIENTRY * qglArrayElement )(GLint i);
  62. void ( APIENTRY * qglBegin )(GLenum mode);
  63. void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture);
  64. void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
  65. void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor);
  66. void ( APIENTRY * qglCallList )(GLuint list);
  67. void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
  68. void ( APIENTRY * qglClear )(GLbitfield mask);
  69. void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  70. void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  71. void ( APIENTRY * qglClearDepth )(GLclampd depth);
  72. void ( APIENTRY * qglClearIndex )(GLfloat c);
  73. void ( APIENTRY * qglClearStencil )(GLint s);
  74. void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation);
  75. void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue);
  76. void ( APIENTRY * qglColor3bv )(const GLbyte *v);
  77. void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue);
  78. void ( APIENTRY * qglColor3dv )(const GLdouble *v);
  79. void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue);
  80. void ( APIENTRY * qglColor3fv )(const GLfloat *v);
  81. void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue);
  82. void ( APIENTRY * qglColor3iv )(const GLint *v);
  83. void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue);
  84. void ( APIENTRY * qglColor3sv )(const GLshort *v);
  85. void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
  86. void ( APIENTRY * qglColor3ubv )(const GLubyte *v);
  87. void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue);
  88. void ( APIENTRY * qglColor3uiv )(const GLuint *v);
  89. void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue);
  90. void ( APIENTRY * qglColor3usv )(const GLushort *v);
  91. void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
  92. void ( APIENTRY * qglColor4bv )(const GLbyte *v);
  93. void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
  94. void ( APIENTRY * qglColor4dv )(const GLdouble *v);
  95. void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  96. void ( APIENTRY * qglColor4fv )(const GLfloat *v);
  97. void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
  98. void ( APIENTRY * qglColor4iv )(const GLint *v);
  99. void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
  100. void ( APIENTRY * qglColor4sv )(const GLshort *v);
  101. void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
  102. void ( APIENTRY * qglColor4ubv )(const GLubyte *v);
  103. void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
  104. void ( APIENTRY * qglColor4uiv )(const GLuint *v);
  105. void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
  106. void ( APIENTRY * qglColor4usv )(const GLushort *v);
  107. void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  108. void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode);
  109. void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  110. void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
  111. void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
  112. void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  113. void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
  114. void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  115. void ( APIENTRY * qglCullFace )(GLenum mode);
  116. void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range);
  117. void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures);
  118. void ( APIENTRY * qglDepthFunc )(GLenum func);
  119. void ( APIENTRY * qglDepthMask )(GLboolean flag);
  120. void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar);
  121. void ( APIENTRY * qglDisable )(GLenum cap);
  122. void ( APIENTRY * qglDisableClientState )(GLenum array);
  123. void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count);
  124. void ( APIENTRY * qglDrawBuffer )(GLenum mode);
  125. void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  126. void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  127. void ( APIENTRY * qglEdgeFlag )(GLboolean flag);
  128. void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
  129. void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag);
  130. void ( APIENTRY * qglEnable )(GLenum cap);
  131. void ( APIENTRY * qglEnableClientState )(GLenum array);
  132. void ( APIENTRY * qglEnd )(void);
  133. void ( APIENTRY * qglEndList )(void);
  134. void ( APIENTRY * qglEvalCoord1d )(GLdouble u);
  135. void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u);
  136. void ( APIENTRY * qglEvalCoord1f )(GLfloat u);
  137. void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u);
  138. void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v);
  139. void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u);
  140. void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v);
  141. void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u);
  142. void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
  143. void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
  144. void ( APIENTRY * qglEvalPoint1 )(GLint i);
  145. void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j);
  146. void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
  147. void ( APIENTRY * qglFinish )(void);
  148. void ( APIENTRY * qglFlush )(void);
  149. void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param);
  150. void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params);
  151. void ( APIENTRY * qglFogi )(GLenum pname, GLint param);
  152. void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params);
  153. void ( APIENTRY * qglFrontFace )(GLenum mode);
  154. void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  155. GLuint ( APIENTRY * qglGenLists )(GLsizei range);
  156. void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures);
  157. void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params);
  158. void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation);
  159. void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params);
  160. GLenum ( APIENTRY * qglGetError )(void);
  161. void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params);
  162. void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params);
  163. void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
  164. void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params);
  165. void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v);
  166. void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v);
  167. void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v);
  168. void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
  169. void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
  170. void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values);
  171. void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values);
  172. void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values);
  173. void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params);
  174. void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask);
  175. const GLubyte * ( APIENTRY * qglGetString )(GLenum name);
  176. void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
  177. void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
  178. void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
  179. void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
  180. void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
  181. void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
  182. void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
  183. void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
  184. void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
  185. void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
  186. void ( APIENTRY * qglHint )(GLenum target, GLenum mode);
  187. void ( APIENTRY * qglIndexMask )(GLuint mask);
  188. void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  189. void ( APIENTRY * qglIndexd )(GLdouble c);
  190. void ( APIENTRY * qglIndexdv )(const GLdouble *c);
  191. void ( APIENTRY * qglIndexf )(GLfloat c);
  192. void ( APIENTRY * qglIndexfv )(const GLfloat *c);
  193. void ( APIENTRY * qglIndexi )(GLint c);
  194. void ( APIENTRY * qglIndexiv )(const GLint *c);
  195. void ( APIENTRY * qglIndexs )(GLshort c);
  196. void ( APIENTRY * qglIndexsv )(const GLshort *c);
  197. void ( APIENTRY * qglIndexub )(GLubyte c);
  198. void ( APIENTRY * qglIndexubv )(const GLubyte *c);
  199. void ( APIENTRY * qglInitNames )(void);
  200. void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
  201. GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap);
  202. GLboolean ( APIENTRY * qglIsList )(GLuint list);
  203. GLboolean ( APIENTRY * qglIsTexture )(GLuint texture);
  204. void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param);
  205. void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params);
  206. void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param);
  207. void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params);
  208. void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param);
  209. void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params);
  210. void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param);
  211. void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params);
  212. void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern);
  213. void ( APIENTRY * qglLineWidth )(GLfloat width);
  214. void ( APIENTRY * qglListBase )(GLuint base);
  215. void ( APIENTRY * qglLoadIdentity )(void);
  216. void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m);
  217. void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m);
  218. void ( APIENTRY * qglLoadName )(GLuint name);
  219. void ( APIENTRY * qglLogicOp )(GLenum opcode);
  220. void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
  221. void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
  222. void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
  223. void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
  224. void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
  225. void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
  226. void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
  227. void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
  228. void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param);
  229. void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
  230. void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param);
  231. void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params);
  232. void ( APIENTRY * qglMatrixMode )(GLenum mode);
  233. void ( APIENTRY * qglMultMatrixd )(const GLdouble *m);
  234. void ( APIENTRY * qglMultMatrixf )(const GLfloat *m);
  235. void ( APIENTRY * qglNewList )(GLuint list, GLenum mode);
  236. void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
  237. void ( APIENTRY * qglNormal3bv )(const GLbyte *v);
  238. void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
  239. void ( APIENTRY * qglNormal3dv )(const GLdouble *v);
  240. void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
  241. void ( APIENTRY * qglNormal3fv )(const GLfloat *v);
  242. void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz);
  243. void ( APIENTRY * qglNormal3iv )(const GLint *v);
  244. void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz);
  245. void ( APIENTRY * qglNormal3sv )(const GLshort *v);
  246. void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  247. void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  248. void ( APIENTRY * qglPassThrough )(GLfloat token);
  249. void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
  250. void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
  251. void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
  252. void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param);
  253. void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param);
  254. void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param);
  255. void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param);
  256. void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor);
  257. void ( APIENTRY * qglPointSize )(GLfloat size);
  258. void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode);
  259. void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units);
  260. void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask);
  261. void ( APIENTRY * qglPopAttrib )(void);
  262. void ( APIENTRY * qglPopClientAttrib )(void);
  263. void ( APIENTRY * qglPopMatrix )(void);
  264. void ( APIENTRY * qglPopName )(void);
  265. void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
  266. void ( APIENTRY * qglPushAttrib )(GLbitfield mask);
  267. void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask);
  268. void ( APIENTRY * qglPushMatrix )(void);
  269. void ( APIENTRY * qglPushName )(GLuint name);
  270. void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y);
  271. void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v);
  272. void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y);
  273. void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v);
  274. void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y);
  275. void ( APIENTRY * qglRasterPos2iv )(const GLint *v);
  276. void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y);
  277. void ( APIENTRY * qglRasterPos2sv )(const GLshort *v);
  278. void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
  279. void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v);
  280. void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
  281. void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v);
  282. void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z);
  283. void ( APIENTRY * qglRasterPos3iv )(const GLint *v);
  284. void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z);
  285. void ( APIENTRY * qglRasterPos3sv )(const GLshort *v);
  286. void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  287. void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v);
  288. void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  289. void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v);
  290. void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
  291. void ( APIENTRY * qglRasterPos4iv )(const GLint *v);
  292. void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
  293. void ( APIENTRY * qglRasterPos4sv )(const GLshort *v);
  294. void ( APIENTRY * qglReadBuffer )(GLenum mode);
  295. void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
  296. void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
  297. void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2);
  298. void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
  299. void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2);
  300. void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
  301. void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2);
  302. void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
  303. void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2);
  304. GLint ( APIENTRY * qglRenderMode )(GLenum mode);
  305. void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
  306. void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
  307. void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z);
  308. void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z);
  309. void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
  310. void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer);
  311. void ( APIENTRY * qglShadeModel )(GLenum mode);
  312. void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask);
  313. void ( APIENTRY * qglStencilMask )(GLuint mask);
  314. void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
  315. void ( APIENTRY * qglTexCoord1d )(GLdouble s);
  316. void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v);
  317. void ( APIENTRY * qglTexCoord1f )(GLfloat s);
  318. void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v);
  319. void ( APIENTRY * qglTexCoord1i )(GLint s);
  320. void ( APIENTRY * qglTexCoord1iv )(const GLint *v);
  321. void ( APIENTRY * qglTexCoord1s )(GLshort s);
  322. void ( APIENTRY * qglTexCoord1sv )(const GLshort *v);
  323. void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t);
  324. void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v);
  325. void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t);
  326. void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v);
  327. void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t);
  328. void ( APIENTRY * qglTexCoord2iv )(const GLint *v);
  329. void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t);
  330. void ( APIENTRY * qglTexCoord2sv )(const GLshort *v);
  331. void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
  332. void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v);
  333. void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
  334. void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v);
  335. void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r);
  336. void ( APIENTRY * qglTexCoord3iv )(const GLint *v);
  337. void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r);
  338. void ( APIENTRY * qglTexCoord3sv )(const GLshort *v);
  339. void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
  340. void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v);
  341. void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
  342. void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v);
  343. void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
  344. void ( APIENTRY * qglTexCoord4iv )(const GLint *v);
  345. void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
  346. void ( APIENTRY * qglTexCoord4sv )(const GLshort *v);
  347. void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  348. void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param);
  349. void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
  350. void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param);
  351. void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params);
  352. void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param);
  353. void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
  354. void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param);
  355. void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
  356. void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param);
  357. void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
  358. void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  359. void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  360. void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param);
  361. void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
  362. void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param);
  363. void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
  364. void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
  365. void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  366. void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z);
  367. void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z);
  368. void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y);
  369. void ( APIENTRY * qglVertex2dv )(const GLdouble *v);
  370. void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y);
  371. void ( APIENTRY * qglVertex2fv )(const GLfloat *v);
  372. void ( APIENTRY * qglVertex2i )(GLint x, GLint y);
  373. void ( APIENTRY * qglVertex2iv )(const GLint *v);
  374. void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y);
  375. void ( APIENTRY * qglVertex2sv )(const GLshort *v);
  376. void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z);
  377. void ( APIENTRY * qglVertex3dv )(const GLdouble *v);
  378. void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z);
  379. void ( APIENTRY * qglVertex3fv )(const GLfloat *v);
  380. void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z);
  381. void ( APIENTRY * qglVertex3iv )(const GLint *v);
  382. void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z);
  383. void ( APIENTRY * qglVertex3sv )(const GLshort *v);
  384. void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  385. void ( APIENTRY * qglVertex4dv )(const GLdouble *v);
  386. void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  387. void ( APIENTRY * qglVertex4fv )(const GLfloat *v);
  388. void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w);
  389. void ( APIENTRY * qglVertex4iv )(const GLint *v);
  390. void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
  391. void ( APIENTRY * qglVertex4sv )(const GLshort *v);
  392. void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  393. void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
  394. BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval );
  395. BOOL ( WINAPI * qwglGetDeviceGammaRampEXT)( unsigned char *, unsigned char *, unsigned char * );
  396. BOOL ( WINAPI * qwglSetDeviceGammaRampEXT)( const unsigned char *, const unsigned char *, const unsigned char * );
  397. void ( APIENTRY * qglPointParameterfEXT)( GLenum param, GLfloat value );
  398. void ( APIENTRY * qglPointParameterfvEXT)( GLenum param, const GLfloat *value );
  399. void ( APIENTRY * qglColorTableEXT)( int, int, int, int, int, const void * );
  400. void ( APIENTRY * qglSelectTextureSGIS)( GLenum );
  401. void ( APIENTRY * qglMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat );
  402. // glu stuff
  403. void (APIENTRY * qgluPerspective) (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
  404. int (APIENTRY * qgluBuild2DMipmaps) (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data);
  405. // added for plugins
  406. void (APIENTRY * qgluLookAt)(
  407. GLdouble eyex,
  408. GLdouble eyey,
  409. GLdouble eyez,
  410. GLdouble centerx,
  411. GLdouble centery,
  412. GLdouble centerz,
  413. GLdouble upx,
  414. GLdouble upy,
  415. GLdouble upz);
  416. /*
  417. ** QGL_Shutdown
  418. **
  419. ** Unloads the specified DLL then nulls out all the proc pointers.
  420. */
  421. void QGL_Shutdown()
  422. {
  423. if (g_hGLDLL)
  424. {
  425. FreeLibrary(g_hGLDLL);
  426. g_hGLDLL = NULL;
  427. }
  428. if (g_hGLUDLL)
  429. {
  430. FreeLibrary(g_hGLUDLL);
  431. g_hGLUDLL = NULL;
  432. }
  433. qglAccum = NULL;
  434. qglAlphaFunc = NULL;
  435. qglAreTexturesResident = NULL;
  436. qglArrayElement = NULL;
  437. qglBegin = NULL;
  438. qglBindTexture = NULL;
  439. qglBitmap = NULL;
  440. qglBlendFunc = NULL;
  441. qglCallList = NULL;
  442. qglCallLists = NULL;
  443. qglClear = NULL;
  444. qglClearAccum = NULL;
  445. qglClearColor = NULL;
  446. qglClearDepth = NULL;
  447. qglClearIndex = NULL;
  448. qglClearStencil = NULL;
  449. qglClipPlane = NULL;
  450. qglColor3b = NULL;
  451. qglColor3bv = NULL;
  452. qglColor3d = NULL;
  453. qglColor3dv = NULL;
  454. qglColor3f = NULL;
  455. qglColor3fv = NULL;
  456. qglColor3i = NULL;
  457. qglColor3iv = NULL;
  458. qglColor3s = NULL;
  459. qglColor3sv = NULL;
  460. qglColor3ub = NULL;
  461. qglColor3ubv = NULL;
  462. qglColor3ui = NULL;
  463. qglColor3uiv = NULL;
  464. qglColor3us = NULL;
  465. qglColor3usv = NULL;
  466. qglColor4b = NULL;
  467. qglColor4bv = NULL;
  468. qglColor4d = NULL;
  469. qglColor4dv = NULL;
  470. qglColor4f = NULL;
  471. qglColor4fv = NULL;
  472. qglColor4i = NULL;
  473. qglColor4iv = NULL;
  474. qglColor4s = NULL;
  475. qglColor4sv = NULL;
  476. qglColor4ub = NULL;
  477. qglColor4ubv = NULL;
  478. qglColor4ui = NULL;
  479. qglColor4uiv = NULL;
  480. qglColor4us = NULL;
  481. qglColor4usv = NULL;
  482. qglColorMask = NULL;
  483. qglColorMaterial = NULL;
  484. qglColorPointer = NULL;
  485. qglCopyPixels = NULL;
  486. qglCopyTexImage1D = NULL;
  487. qglCopyTexImage2D = NULL;
  488. qglCopyTexSubImage1D = NULL;
  489. qglCopyTexSubImage2D = NULL;
  490. qglCullFace = NULL;
  491. qglDeleteLists = NULL;
  492. qglDeleteTextures = NULL;
  493. qglDepthFunc = NULL;
  494. qglDepthMask = NULL;
  495. qglDepthRange = NULL;
  496. qglDisable = NULL;
  497. qglDisableClientState = NULL;
  498. qglDrawArrays = NULL;
  499. qglDrawBuffer = NULL;
  500. qglDrawElements = NULL;
  501. qglDrawPixels = NULL;
  502. qglEdgeFlag = NULL;
  503. qglEdgeFlagPointer = NULL;
  504. qglEdgeFlagv = NULL;
  505. qglEnable = NULL;
  506. qglEnableClientState = NULL;
  507. qglEnd = NULL;
  508. qglEndList = NULL;
  509. qglEvalCoord1d = NULL;
  510. qglEvalCoord1dv = NULL;
  511. qglEvalCoord1f = NULL;
  512. qglEvalCoord1fv = NULL;
  513. qglEvalCoord2d = NULL;
  514. qglEvalCoord2dv = NULL;
  515. qglEvalCoord2f = NULL;
  516. qglEvalCoord2fv = NULL;
  517. qglEvalMesh1 = NULL;
  518. qglEvalMesh2 = NULL;
  519. qglEvalPoint1 = NULL;
  520. qglEvalPoint2 = NULL;
  521. qglFeedbackBuffer = NULL;
  522. qglFinish = NULL;
  523. qglFlush = NULL;
  524. qglFogf = NULL;
  525. qglFogfv = NULL;
  526. qglFogi = NULL;
  527. qglFogiv = NULL;
  528. qglFrontFace = NULL;
  529. qglFrustum = NULL;
  530. qglGenLists = NULL;
  531. qglGenTextures = NULL;
  532. qglGetBooleanv = NULL;
  533. qglGetClipPlane = NULL;
  534. qglGetDoublev = NULL;
  535. qglGetError = NULL;
  536. qglGetFloatv = NULL;
  537. qglGetIntegerv = NULL;
  538. qglGetLightfv = NULL;
  539. qglGetLightiv = NULL;
  540. qglGetMapdv = NULL;
  541. qglGetMapfv = NULL;
  542. qglGetMapiv = NULL;
  543. qglGetMaterialfv = NULL;
  544. qglGetMaterialiv = NULL;
  545. qglGetPixelMapfv = NULL;
  546. qglGetPixelMapuiv = NULL;
  547. qglGetPixelMapusv = NULL;
  548. qglGetPointerv = NULL;
  549. qglGetPolygonStipple = NULL;
  550. qglGetString = NULL;
  551. qglGetTexEnvfv = NULL;
  552. qglGetTexEnviv = NULL;
  553. qglGetTexGendv = NULL;
  554. qglGetTexGenfv = NULL;
  555. qglGetTexGeniv = NULL;
  556. qglGetTexImage = NULL;
  557. qglGetTexLevelParameterfv = NULL;
  558. qglGetTexLevelParameteriv = NULL;
  559. qglGetTexParameterfv = NULL;
  560. qglGetTexParameteriv = NULL;
  561. qglHint = NULL;
  562. qglIndexMask = NULL;
  563. qglIndexPointer = NULL;
  564. qglIndexd = NULL;
  565. qglIndexdv = NULL;
  566. qglIndexf = NULL;
  567. qglIndexfv = NULL;
  568. qglIndexi = NULL;
  569. qglIndexiv = NULL;
  570. qglIndexs = NULL;
  571. qglIndexsv = NULL;
  572. qglIndexub = NULL;
  573. qglIndexubv = NULL;
  574. qglInitNames = NULL;
  575. qglInterleavedArrays = NULL;
  576. qglIsEnabled = NULL;
  577. qglIsList = NULL;
  578. qglIsTexture = NULL;
  579. qglLightModelf = NULL;
  580. qglLightModelfv = NULL;
  581. qglLightModeli = NULL;
  582. qglLightModeliv = NULL;
  583. qglLightf = NULL;
  584. qglLightfv = NULL;
  585. qglLighti = NULL;
  586. qglLightiv = NULL;
  587. qglLineStipple = NULL;
  588. qglLineWidth = NULL;
  589. qglListBase = NULL;
  590. qglLoadIdentity = NULL;
  591. qglLoadMatrixd = NULL;
  592. qglLoadMatrixf = NULL;
  593. qglLoadName = NULL;
  594. qglLogicOp = NULL;
  595. qglMap1d = NULL;
  596. qglMap1f = NULL;
  597. qglMap2d = NULL;
  598. qglMap2f = NULL;
  599. qglMapGrid1d = NULL;
  600. qglMapGrid1f = NULL;
  601. qglMapGrid2d = NULL;
  602. qglMapGrid2f = NULL;
  603. qglMaterialf = NULL;
  604. qglMaterialfv = NULL;
  605. qglMateriali = NULL;
  606. qglMaterialiv = NULL;
  607. qglMatrixMode = NULL;
  608. qglMultMatrixd = NULL;
  609. qglMultMatrixf = NULL;
  610. qglNewList = NULL;
  611. qglNormal3b = NULL;
  612. qglNormal3bv = NULL;
  613. qglNormal3d = NULL;
  614. qglNormal3dv = NULL;
  615. qglNormal3f = NULL;
  616. qglNormal3fv = NULL;
  617. qglNormal3i = NULL;
  618. qglNormal3iv = NULL;
  619. qglNormal3s = NULL;
  620. qglNormal3sv = NULL;
  621. qglNormalPointer = NULL;
  622. qglOrtho = NULL;
  623. qglPassThrough = NULL;
  624. qglPixelMapfv = NULL;
  625. qglPixelMapuiv = NULL;
  626. qglPixelMapusv = NULL;
  627. qglPixelStoref = NULL;
  628. qglPixelStorei = NULL;
  629. qglPixelTransferf = NULL;
  630. qglPixelTransferi = NULL;
  631. qglPixelZoom = NULL;
  632. qglPointSize = NULL;
  633. qglPolygonMode = NULL;
  634. qglPolygonOffset = NULL;
  635. qglPolygonStipple = NULL;
  636. qglPopAttrib = NULL;
  637. qglPopClientAttrib = NULL;
  638. qglPopMatrix = NULL;
  639. qglPopName = NULL;
  640. qglPrioritizeTextures = NULL;
  641. qglPushAttrib = NULL;
  642. qglPushClientAttrib = NULL;
  643. qglPushMatrix = NULL;
  644. qglPushName = NULL;
  645. qglRasterPos2d = NULL;
  646. qglRasterPos2dv = NULL;
  647. qglRasterPos2f = NULL;
  648. qglRasterPos2fv = NULL;
  649. qglRasterPos2i = NULL;
  650. qglRasterPos2iv = NULL;
  651. qglRasterPos2s = NULL;
  652. qglRasterPos2sv = NULL;
  653. qglRasterPos3d = NULL;
  654. qglRasterPos3dv = NULL;
  655. qglRasterPos3f = NULL;
  656. qglRasterPos3fv = NULL;
  657. qglRasterPos3i = NULL;
  658. qglRasterPos3iv = NULL;
  659. qglRasterPos3s = NULL;
  660. qglRasterPos3sv = NULL;
  661. qglRasterPos4d = NULL;
  662. qglRasterPos4dv = NULL;
  663. qglRasterPos4f = NULL;
  664. qglRasterPos4fv = NULL;
  665. qglRasterPos4i = NULL;
  666. qglRasterPos4iv = NULL;
  667. qglRasterPos4s = NULL;
  668. qglRasterPos4sv = NULL;
  669. qglReadBuffer = NULL;
  670. qglReadPixels = NULL;
  671. qglRectd = NULL;
  672. qglRectdv = NULL;
  673. qglRectf = NULL;
  674. qglRectfv = NULL;
  675. qglRecti = NULL;
  676. qglRectiv = NULL;
  677. qglRects = NULL;
  678. qglRectsv = NULL;
  679. qglRenderMode = NULL;
  680. qglRotated = NULL;
  681. qglRotatef = NULL;
  682. qglScaled = NULL;
  683. qglScalef = NULL;
  684. qglScissor = NULL;
  685. qglSelectBuffer = NULL;
  686. qglShadeModel = NULL;
  687. qglStencilFunc = NULL;
  688. qglStencilMask = NULL;
  689. qglStencilOp = NULL;
  690. qglTexCoord1d = NULL;
  691. qglTexCoord1dv = NULL;
  692. qglTexCoord1f = NULL;
  693. qglTexCoord1fv = NULL;
  694. qglTexCoord1i = NULL;
  695. qglTexCoord1iv = NULL;
  696. qglTexCoord1s = NULL;
  697. qglTexCoord1sv = NULL;
  698. qglTexCoord2d = NULL;
  699. qglTexCoord2dv = NULL;
  700. qglTexCoord2f = NULL;
  701. qglTexCoord2fv = NULL;
  702. qglTexCoord2i = NULL;
  703. qglTexCoord2iv = NULL;
  704. qglTexCoord2s = NULL;
  705. qglTexCoord2sv = NULL;
  706. qglTexCoord3d = NULL;
  707. qglTexCoord3dv = NULL;
  708. qglTexCoord3f = NULL;
  709. qglTexCoord3fv = NULL;
  710. qglTexCoord3i = NULL;
  711. qglTexCoord3iv = NULL;
  712. qglTexCoord3s = NULL;
  713. qglTexCoord3sv = NULL;
  714. qglTexCoord4d = NULL;
  715. qglTexCoord4dv = NULL;
  716. qglTexCoord4f = NULL;
  717. qglTexCoord4fv = NULL;
  718. qglTexCoord4i = NULL;
  719. qglTexCoord4iv = NULL;
  720. qglTexCoord4s = NULL;
  721. qglTexCoord4sv = NULL;
  722. qglTexCoordPointer = NULL;
  723. qglTexEnvf = NULL;
  724. qglTexEnvfv = NULL;
  725. qglTexEnvi = NULL;
  726. qglTexEnviv = NULL;
  727. qglTexGend = NULL;
  728. qglTexGendv = NULL;
  729. qglTexGenf = NULL;
  730. qglTexGenfv = NULL;
  731. qglTexGeni = NULL;
  732. qglTexGeniv = NULL;
  733. qglTexImage1D = NULL;
  734. qglTexImage2D = NULL;
  735. qglTexParameterf = NULL;
  736. qglTexParameterfv = NULL;
  737. qglTexParameteri = NULL;
  738. qglTexParameteriv = NULL;
  739. qglTexSubImage1D = NULL;
  740. qglTexSubImage2D = NULL;
  741. qglTranslated = NULL;
  742. qglTranslatef = NULL;
  743. qglVertex2d = NULL;
  744. qglVertex2dv = NULL;
  745. qglVertex2f = NULL;
  746. qglVertex2fv = NULL;
  747. qglVertex2i = NULL;
  748. qglVertex2iv = NULL;
  749. qglVertex2s = NULL;
  750. qglVertex2sv = NULL;
  751. qglVertex3d = NULL;
  752. qglVertex3dv = NULL;
  753. qglVertex3f = NULL;
  754. qglVertex3fv = NULL;
  755. qglVertex3i = NULL;
  756. qglVertex3iv = NULL;
  757. qglVertex3s = NULL;
  758. qglVertex3sv = NULL;
  759. qglVertex4d = NULL;
  760. qglVertex4dv = NULL;
  761. qglVertex4f = NULL;
  762. qglVertex4fv = NULL;
  763. qglVertex4i = NULL;
  764. qglVertex4iv = NULL;
  765. qglVertex4s = NULL;
  766. qglVertex4sv = NULL;
  767. qglVertexPointer = NULL;
  768. qglViewport = NULL;
  769. qwglCopyContext = NULL;
  770. qwglCreateContext = NULL;
  771. qwglCreateLayerContext = NULL;
  772. qwglDeleteContext = NULL;
  773. qwglDescribeLayerPlane = NULL;
  774. qwglGetCurrentContext = NULL;
  775. qwglGetCurrentDC = NULL;
  776. qwglGetLayerPaletteEntries = NULL;
  777. qwglGetProcAddress = NULL;
  778. qwglMakeCurrent = NULL;
  779. qwglRealizeLayerPalette = NULL;
  780. qwglSetLayerPaletteEntries = NULL;
  781. qwglShareLists = NULL;
  782. qwglSwapLayerBuffers = NULL;
  783. qwglUseFontBitmaps = NULL;
  784. qwglUseFontOutlines = NULL;
  785. qwglChoosePixelFormat = NULL;
  786. qwglDescribePixelFormat = NULL;
  787. qwglGetPixelFormat = NULL;
  788. qwglSetPixelFormat = NULL;
  789. qwglSwapBuffers = NULL;
  790. qwglSwapIntervalEXT = NULL;
  791. qwglGetDeviceGammaRampEXT = NULL;
  792. qwglSetDeviceGammaRampEXT = NULL;
  793. qgluPerspective = NULL;
  794. qgluBuild2DMipmaps = NULL;
  795. qgluLookAt = NULL;
  796. }
  797. # define GPA(h, a ) GetProcAddress( h, a )
  798. /*
  799. ** QGL_Init
  800. **
  801. ** This is responsible for binding our qgl function pointers to
  802. ** the appropriate GL stuff. In Windows this means doing a
  803. ** LoadLibrary and a bunch of calls to GetProcAddress. On other
  804. ** operating systems we need to do the right thing, whatever that
  805. ** might be.
  806. **
  807. */
  808. int QGL_Init(const char *dllname, const char* pGluName )
  809. {
  810. g_hGLDLL = LoadLibrary(dllname);
  811. if (g_hGLDLL == NULL)
  812. {
  813. return 0;
  814. }
  815. g_hGLUDLL = LoadLibrary(pGluName);
  816. if (g_hGLUDLL == NULL)
  817. {
  818. FreeLibrary(g_hGLDLL);
  819. g_hGLDLL = NULL;
  820. return 0;
  821. }
  822. qgluPerspective = GPA(g_hGLUDLL, "gluPerspective");
  823. qgluBuild2DMipmaps = GPA(g_hGLUDLL, "gluBuild2DMipmaps");
  824. // added for plugins
  825. qgluLookAt = GPA(g_hGLUDLL, "gluLookAt" );
  826. qglAccum = GPA(g_hGLDLL, "glAccum" );
  827. qglAlphaFunc = GPA(g_hGLDLL, "glAlphaFunc" );
  828. qglAreTexturesResident = GPA(g_hGLDLL, "glAreTexturesResident" );
  829. qglArrayElement = GPA(g_hGLDLL, "glArrayElement" );
  830. qglBegin = GPA(g_hGLDLL, "glBegin" );
  831. qglBindTexture = GPA(g_hGLDLL, "glBindTexture" );
  832. qglBitmap = GPA(g_hGLDLL, "glBitmap" );
  833. qglBlendFunc = GPA(g_hGLDLL, "glBlendFunc" );
  834. qglCallList = GPA(g_hGLDLL, "glCallList" );
  835. qglCallLists = GPA(g_hGLDLL, "glCallLists" );
  836. qglClear = GPA(g_hGLDLL, "glClear" );
  837. qglClearAccum = GPA(g_hGLDLL, "glClearAccum" );
  838. qglClearColor = GPA(g_hGLDLL, "glClearColor" );
  839. qglClearDepth = GPA(g_hGLDLL, "glClearDepth" );
  840. qglClearIndex = GPA(g_hGLDLL, "glClearIndex" );
  841. qglClearStencil = GPA(g_hGLDLL, "glClearStencil" );
  842. qglClipPlane = GPA(g_hGLDLL, "glClipPlane" );
  843. qglColor3b = GPA(g_hGLDLL, "glColor3b" );
  844. qglColor3bv = GPA(g_hGLDLL, "glColor3bv" );
  845. qglColor3d = GPA(g_hGLDLL, "glColor3d" );
  846. qglColor3dv = GPA(g_hGLDLL, "glColor3dv" );
  847. qglColor3f = GPA(g_hGLDLL, "glColor3f" );
  848. qglColor3fv = GPA(g_hGLDLL, "glColor3fv" );
  849. qglColor3i = GPA(g_hGLDLL, "glColor3i" );
  850. qglColor3iv = GPA(g_hGLDLL, "glColor3iv" );
  851. qglColor3s = GPA(g_hGLDLL, "glColor3s" );
  852. qglColor3sv = GPA(g_hGLDLL, "glColor3sv" );
  853. qglColor3ub = GPA(g_hGLDLL, "glColor3ub" );
  854. qglColor3ubv = GPA(g_hGLDLL, "glColor3ubv" );
  855. qglColor3ui = GPA(g_hGLDLL, "glColor3ui" );
  856. qglColor3uiv = GPA(g_hGLDLL, "glColor3uiv" );
  857. qglColor3us = GPA(g_hGLDLL, "glColor3us" );
  858. qglColor3usv = GPA(g_hGLDLL, "glColor3usv" );
  859. qglColor4b = GPA(g_hGLDLL, "glColor4b" );
  860. qglColor4bv = GPA(g_hGLDLL, "glColor4bv" );
  861. qglColor4d = GPA(g_hGLDLL, "glColor4d" );
  862. qglColor4dv = GPA(g_hGLDLL, "glColor4dv" );
  863. qglColor4f = GPA(g_hGLDLL, "glColor4f" );
  864. qglColor4fv = GPA(g_hGLDLL, "glColor4fv" );
  865. qglColor4i = GPA(g_hGLDLL, "glColor4i" );
  866. qglColor4iv = GPA(g_hGLDLL, "glColor4iv" );
  867. qglColor4s = GPA(g_hGLDLL, "glColor4s" );
  868. qglColor4sv = GPA(g_hGLDLL, "glColor4sv" );
  869. qglColor4ub = GPA(g_hGLDLL, "glColor4ub" );
  870. qglColor4ubv = GPA(g_hGLDLL, "glColor4ubv" );
  871. qglColor4ui = GPA(g_hGLDLL, "glColor4ui" );
  872. qglColor4uiv = GPA(g_hGLDLL, "glColor4uiv" );
  873. qglColor4us = GPA(g_hGLDLL, "glColor4us" );
  874. qglColor4usv = GPA(g_hGLDLL, "glColor4usv" );
  875. qglColorMask = GPA(g_hGLDLL, "glColorMask" );
  876. qglColorMaterial = GPA(g_hGLDLL, "glColorMaterial" );
  877. qglColorPointer = GPA(g_hGLDLL, "glColorPointer" );
  878. qglCopyPixels = GPA(g_hGLDLL, "glCopyPixels" );
  879. qglCopyTexImage1D = GPA(g_hGLDLL, "glCopyTexImage1D" );
  880. qglCopyTexImage2D = GPA(g_hGLDLL, "glCopyTexImage2D" );
  881. qglCopyTexSubImage1D = GPA(g_hGLDLL, "glCopyTexSubImage1D" );
  882. qglCopyTexSubImage2D = GPA(g_hGLDLL, "glCopyTexSubImage2D" );
  883. qglCullFace = GPA(g_hGLDLL, "glCullFace" );
  884. qglDeleteLists = GPA(g_hGLDLL, "glDeleteLists" );
  885. qglDeleteTextures = GPA(g_hGLDLL, "glDeleteTextures" );
  886. qglDepthFunc = GPA(g_hGLDLL, "glDepthFunc" );
  887. qglDepthMask = GPA(g_hGLDLL, "glDepthMask" );
  888. qglDepthRange = GPA(g_hGLDLL, "glDepthRange" );
  889. qglDisable = GPA(g_hGLDLL, "glDisable" );
  890. qglDisableClientState = GPA(g_hGLDLL, "glDisableClientState" );
  891. qglDrawArrays = GPA(g_hGLDLL, "glDrawArrays" );
  892. qglDrawBuffer = GPA(g_hGLDLL, "glDrawBuffer" );
  893. qglDrawElements = GPA(g_hGLDLL, "glDrawElements" );
  894. qglDrawPixels = GPA(g_hGLDLL, "glDrawPixels" );
  895. qglEdgeFlag = GPA(g_hGLDLL, "glEdgeFlag" );
  896. qglEdgeFlagPointer = GPA(g_hGLDLL, "glEdgeFlagPointer" );
  897. qglEdgeFlagv = GPA(g_hGLDLL, "glEdgeFlagv" );
  898. qglEnable = GPA(g_hGLDLL, "glEnable" );
  899. qglEnableClientState = GPA(g_hGLDLL, "glEnableClientState" );
  900. qglEnd = GPA(g_hGLDLL, "glEnd" );
  901. qglEndList = GPA(g_hGLDLL, "glEndList" );
  902. qglEvalCoord1d = GPA(g_hGLDLL, "glEvalCoord1d" );
  903. qglEvalCoord1dv = GPA(g_hGLDLL, "glEvalCoord1dv" );
  904. qglEvalCoord1f = GPA(g_hGLDLL, "glEvalCoord1f" );
  905. qglEvalCoord1fv = GPA(g_hGLDLL, "glEvalCoord1fv" );
  906. qglEvalCoord2d = GPA(g_hGLDLL, "glEvalCoord2d" );
  907. qglEvalCoord2dv = GPA(g_hGLDLL, "glEvalCoord2dv" );
  908. qglEvalCoord2f = GPA(g_hGLDLL, "glEvalCoord2f" );
  909. qglEvalCoord2fv = GPA(g_hGLDLL, "glEvalCoord2fv" );
  910. qglEvalMesh1 = GPA(g_hGLDLL, "glEvalMesh1" );
  911. qglEvalMesh2 = GPA(g_hGLDLL, "glEvalMesh2" );
  912. qglEvalPoint1 = GPA(g_hGLDLL, "glEvalPoint1" );
  913. qglEvalPoint2 = GPA(g_hGLDLL, "glEvalPoint2" );
  914. qglFeedbackBuffer = GPA(g_hGLDLL, "glFeedbackBuffer" );
  915. qglFinish = GPA(g_hGLDLL, "glFinish" );
  916. qglFlush = GPA(g_hGLDLL, "glFlush" );
  917. qglFogf = GPA(g_hGLDLL, "glFogf" );
  918. qglFogfv = GPA(g_hGLDLL, "glFogfv" );
  919. qglFogi = GPA(g_hGLDLL, "glFogi" );
  920. qglFogiv = GPA(g_hGLDLL, "glFogiv" );
  921. qglFrontFace = GPA(g_hGLDLL, "glFrontFace" );
  922. qglFrustum = GPA(g_hGLDLL, "glFrustum" );
  923. qglGenLists = GPA(g_hGLDLL, "glGenLists" );
  924. qglGenTextures = GPA(g_hGLDLL, "glGenTextures" );
  925. qglGetBooleanv = GPA(g_hGLDLL, "glGetBooleanv" );
  926. qglGetClipPlane = GPA(g_hGLDLL, "glGetClipPlane" );
  927. qglGetDoublev = GPA(g_hGLDLL, "glGetDoublev" );
  928. qglGetError = GPA(g_hGLDLL, "glGetError" );
  929. qglGetFloatv = GPA(g_hGLDLL, "glGetFloatv" );
  930. qglGetIntegerv = GPA(g_hGLDLL, "glGetIntegerv" );
  931. qglGetLightfv = GPA(g_hGLDLL, "glGetLightfv" );
  932. qglGetLightiv = GPA(g_hGLDLL, "glGetLightiv" );
  933. qglGetMapdv = GPA(g_hGLDLL, "glGetMapdv" );
  934. qglGetMapfv = GPA(g_hGLDLL, "glGetMapfv" );
  935. qglGetMapiv = GPA(g_hGLDLL, "glGetMapiv" );
  936. qglGetMaterialfv = GPA(g_hGLDLL, "glGetMaterialfv" );
  937. qglGetMaterialiv = GPA(g_hGLDLL, "glGetMaterialiv" );
  938. qglGetPixelMapfv = GPA(g_hGLDLL, "glGetPixelMapfv" );
  939. qglGetPixelMapuiv = GPA(g_hGLDLL, "glGetPixelMapuiv" );
  940. qglGetPixelMapusv = GPA(g_hGLDLL, "glGetPixelMapusv" );
  941. qglGetPointerv = GPA(g_hGLDLL, "glGetPointerv" );
  942. qglGetPolygonStipple = GPA(g_hGLDLL, "glGetPolygonStipple" );
  943. qglGetString = GPA(g_hGLDLL, "glGetString" );
  944. qglGetTexEnvfv = GPA(g_hGLDLL, "glGetTexEnvfv" );
  945. qglGetTexEnviv = GPA(g_hGLDLL, "glGetTexEnviv" );
  946. qglGetTexGendv = GPA(g_hGLDLL, "glGetTexGendv" );
  947. qglGetTexGenfv = GPA(g_hGLDLL, "glGetTexGenfv" );
  948. qglGetTexGeniv = GPA(g_hGLDLL, "glGetTexGeniv" );
  949. qglGetTexImage = GPA(g_hGLDLL, "glGetTexImage" );
  950. qglGetTexLevelParameterfv = GPA(g_hGLDLL, "glGetLevelParameterfv" );
  951. qglGetTexLevelParameteriv = GPA(g_hGLDLL, "glGetLevelParameteriv" );
  952. qglGetTexParameterfv = GPA(g_hGLDLL, "glGetTexParameterfv" );
  953. qglGetTexParameteriv = GPA(g_hGLDLL, "glGetTexParameteriv" );
  954. qglHint = GPA(g_hGLDLL, "glHint" );
  955. qglIndexMask = GPA(g_hGLDLL, "glIndexMask" );
  956. qglIndexPointer = GPA(g_hGLDLL, "glIndexPointer" );
  957. qglIndexd = GPA(g_hGLDLL, "glIndexd" );
  958. qglIndexdv = GPA(g_hGLDLL, "glIndexdv" );
  959. qglIndexf = GPA(g_hGLDLL, "glIndexf" );
  960. qglIndexfv = GPA(g_hGLDLL, "glIndexfv" );
  961. qglIndexi = GPA(g_hGLDLL, "glIndexi" );
  962. qglIndexiv = GPA(g_hGLDLL, "glIndexiv" );
  963. qglIndexs = GPA(g_hGLDLL, "glIndexs" );
  964. qglIndexsv = GPA(g_hGLDLL, "glIndexsv" );
  965. qglIndexub = GPA(g_hGLDLL, "glIndexub" );
  966. qglIndexubv = GPA(g_hGLDLL, "glIndexubv" );
  967. qglInitNames = GPA(g_hGLDLL, "glInitNames" );
  968. qglInterleavedArrays = GPA(g_hGLDLL, "glInterleavedArrays" );
  969. qglIsEnabled = GPA(g_hGLDLL, "glIsEnabled" );
  970. qglIsList = GPA(g_hGLDLL, "glIsList" );
  971. qglIsTexture = GPA(g_hGLDLL, "glIsTexture" );
  972. qglLightModelf = GPA(g_hGLDLL, "glLightModelf" );
  973. qglLightModelfv = GPA(g_hGLDLL, "glLightModelfv" );
  974. qglLightModeli = GPA(g_hGLDLL, "glLightModeli" );
  975. qglLightModeliv = GPA(g_hGLDLL, "glLightModeliv" );
  976. qglLightf = GPA(g_hGLDLL, "glLightf" );
  977. qglLightfv = GPA(g_hGLDLL, "glLightfv" );
  978. qglLighti = GPA(g_hGLDLL, "glLighti" );
  979. qglLightiv = GPA(g_hGLDLL, "glLightiv" );
  980. qglLineStipple = GPA(g_hGLDLL, "glLineStipple" );
  981. qglLineWidth = GPA(g_hGLDLL, "glLineWidth" );
  982. qglListBase = GPA(g_hGLDLL, "glListBase" );
  983. qglLoadIdentity = GPA(g_hGLDLL, "glLoadIdentity" );
  984. qglLoadMatrixd = GPA(g_hGLDLL, "glLoadMatrixd" );
  985. qglLoadMatrixf = GPA(g_hGLDLL, "glLoadMatrixf" );
  986. qglLoadName = GPA(g_hGLDLL, "glLoadName" );
  987. qglLogicOp = GPA(g_hGLDLL, "glLogicOp" );
  988. qglMap1d = GPA(g_hGLDLL, "glMap1d" );
  989. qglMap1f = GPA(g_hGLDLL, "glMap1f" );
  990. qglMap2d = GPA(g_hGLDLL, "glMap2d" );
  991. qglMap2f = GPA(g_hGLDLL, "glMap2f" );
  992. qglMapGrid1d = GPA(g_hGLDLL, "glMapGrid1d" );
  993. qglMapGrid1f = GPA(g_hGLDLL, "glMapGrid1f" );
  994. qglMapGrid2d = GPA(g_hGLDLL, "glMapGrid2d" );
  995. qglMapGrid2f = GPA(g_hGLDLL, "glMapGrid2f" );
  996. qglMaterialf = GPA(g_hGLDLL, "glMaterialf" );
  997. qglMaterialfv = GPA(g_hGLDLL, "glMaterialfv" );
  998. qglMateriali = GPA(g_hGLDLL, "glMateriali" );
  999. qglMaterialiv = GPA(g_hGLDLL, "glMaterialiv" );
  1000. qglMatrixMode = GPA(g_hGLDLL, "glMatrixMode" );
  1001. qglMultMatrixd = GPA(g_hGLDLL, "glMultMatrixd" );
  1002. qglMultMatrixf = GPA(g_hGLDLL, "glMultMatrixf" );
  1003. qglNewList = GPA(g_hGLDLL, "glNewList" );
  1004. qglNormal3b = GPA(g_hGLDLL, "glNormal3b" );
  1005. qglNormal3bv = GPA(g_hGLDLL, "glNormal3bv" );
  1006. qglNormal3d = GPA(g_hGLDLL, "glNormal3d" );
  1007. qglNormal3dv = GPA(g_hGLDLL, "glNormal3dv" );
  1008. qglNormal3f = GPA(g_hGLDLL, "glNormal3f" );
  1009. qglNormal3fv = GPA(g_hGLDLL, "glNormal3fv" );
  1010. qglNormal3i = GPA(g_hGLDLL, "glNormal3i" );
  1011. qglNormal3iv = GPA(g_hGLDLL, "glNormal3iv" );
  1012. qglNormal3s = GPA(g_hGLDLL, "glNormal3s" );
  1013. qglNormal3sv = GPA(g_hGLDLL, "glNormal3sv" );
  1014. qglNormalPointer = GPA(g_hGLDLL, "glNormalPointer" );
  1015. qglOrtho = GPA(g_hGLDLL, "glOrtho" );
  1016. qglPassThrough = GPA(g_hGLDLL, "glPassThrough" );
  1017. qglPixelMapfv = GPA(g_hGLDLL, "glPixelMapfv" );
  1018. qglPixelMapuiv = GPA(g_hGLDLL, "glPixelMapuiv" );
  1019. qglPixelMapusv = GPA(g_hGLDLL, "glPixelMapusv" );
  1020. qglPixelStoref = GPA(g_hGLDLL, "glPixelStoref" );
  1021. qglPixelStorei = GPA(g_hGLDLL, "glPixelStorei" );
  1022. qglPixelTransferf = GPA(g_hGLDLL, "glPixelTransferf" );
  1023. qglPixelTransferi = GPA(g_hGLDLL, "glPixelTransferi" );
  1024. qglPixelZoom = GPA(g_hGLDLL, "glPixelZoom" );
  1025. qglPointSize = GPA(g_hGLDLL, "glPointSize" );
  1026. qglPolygonMode = GPA(g_hGLDLL, "glPolygonMode" );
  1027. qglPolygonOffset = GPA(g_hGLDLL, "glPolygonOffset" );
  1028. qglPolygonStipple = GPA(g_hGLDLL, "glPolygonStipple" );
  1029. qglPopAttrib = GPA(g_hGLDLL, "glPopAttrib" );
  1030. qglPopClientAttrib = GPA(g_hGLDLL, "glPopClientAttrib" );
  1031. qglPopMatrix = GPA(g_hGLDLL, "glPopMatrix" );
  1032. qglPopName = GPA(g_hGLDLL, "glPopName" );
  1033. qglPrioritizeTextures = GPA(g_hGLDLL, "glPrioritizeTextures" );
  1034. qglPushAttrib = GPA(g_hGLDLL, "glPushAttrib" );
  1035. qglPushClientAttrib = GPA(g_hGLDLL, "glPushClientAttrib" );
  1036. qglPushMatrix = GPA(g_hGLDLL, "glPushMatrix" );
  1037. qglPushName = GPA(g_hGLDLL, "glPushName" );
  1038. qglRasterPos2d = GPA(g_hGLDLL, "glRasterPos2d" );
  1039. qglRasterPos2dv = GPA(g_hGLDLL, "glRasterPos2dv" );
  1040. qglRasterPos2f = GPA(g_hGLDLL, "glRasterPos2f" );
  1041. qglRasterPos2fv = GPA(g_hGLDLL, "glRasterPos2fv" );
  1042. qglRasterPos2i = GPA(g_hGLDLL, "glRasterPos2i" );
  1043. qglRasterPos2iv = GPA(g_hGLDLL, "glRasterPos2iv" );
  1044. qglRasterPos2s = GPA(g_hGLDLL, "glRasterPos2s" );
  1045. qglRasterPos2sv = GPA(g_hGLDLL, "glRasterPos2sv" );
  1046. qglRasterPos3d = GPA(g_hGLDLL, "glRasterPos3d" );
  1047. qglRasterPos3dv = GPA(g_hGLDLL, "glRasterPos3dv" );
  1048. qglRasterPos3f = GPA(g_hGLDLL, "glRasterPos3f" );
  1049. qglRasterPos3fv = GPA(g_hGLDLL, "glRasterPos3fv" );
  1050. qglRasterPos3i = GPA(g_hGLDLL, "glRasterPos3i" );
  1051. qglRasterPos3iv = GPA(g_hGLDLL, "glRasterPos3iv" );
  1052. qglRasterPos3s = GPA(g_hGLDLL, "glRasterPos3s" );
  1053. qglRasterPos3sv = GPA(g_hGLDLL, "glRasterPos3sv" );
  1054. qglRasterPos4d = GPA(g_hGLDLL, "glRasterPos4d" );
  1055. qglRasterPos4dv = GPA(g_hGLDLL, "glRasterPos4dv" );
  1056. qglRasterPos4f = GPA(g_hGLDLL, "glRasterPos4f" );
  1057. qglRasterPos4fv = GPA(g_hGLDLL, "glRasterPos4fv" );
  1058. qglRasterPos4i = GPA(g_hGLDLL, "glRasterPos4i" );
  1059. qglRasterPos4iv = GPA(g_hGLDLL, "glRasterPos4iv" );
  1060. qglRasterPos4s = GPA(g_hGLDLL, "glRasterPos4s" );
  1061. qglRasterPos4sv = GPA(g_hGLDLL, "glRasterPos4sv" );
  1062. qglReadBuffer = GPA(g_hGLDLL, "glReadBuffer" );
  1063. qglReadPixels = GPA(g_hGLDLL, "glReadPixels" );
  1064. qglRectd = GPA(g_hGLDLL, "glRectd" );
  1065. qglRectdv = GPA(g_hGLDLL, "glRectdv" );
  1066. qglRectf = GPA(g_hGLDLL, "glRectf" );
  1067. qglRectfv = GPA(g_hGLDLL, "glRectfv" );
  1068. qglRecti = GPA(g_hGLDLL, "glRecti" );
  1069. qglRectiv = GPA(g_hGLDLL, "glRectiv" );
  1070. qglRects = GPA(g_hGLDLL, "glRects" );
  1071. qglRectsv = GPA(g_hGLDLL, "glRectsv" );
  1072. qglRenderMode = GPA(g_hGLDLL, "glRenderMode" );
  1073. qglRotated = GPA(g_hGLDLL, "glRotated" );
  1074. qglRotatef = GPA(g_hGLDLL, "glRotatef" );
  1075. qglScaled = GPA(g_hGLDLL, "glScaled" );
  1076. qglScalef = GPA(g_hGLDLL, "glScalef" );
  1077. qglScissor = GPA(g_hGLDLL, "glScissor" );
  1078. qglSelectBuffer = GPA(g_hGLDLL, "glSelectBuffer" );
  1079. qglShadeModel = GPA(g_hGLDLL, "glShadeModel" );
  1080. qglStencilFunc = GPA(g_hGLDLL, "glStencilFunc" );
  1081. qglStencilMask = GPA(g_hGLDLL, "glStencilMask" );
  1082. qglStencilOp = GPA(g_hGLDLL, "glStencilOp" );
  1083. qglTexCoord1d = GPA(g_hGLDLL, "glTexCoord1d" );
  1084. qglTexCoord1dv = GPA(g_hGLDLL, "glTexCoord1dv" );
  1085. qglTexCoord1f = GPA(g_hGLDLL, "glTexCoord1f" );
  1086. qglTexCoord1fv = GPA(g_hGLDLL, "glTexCoord1fv" );
  1087. qglTexCoord1i = GPA(g_hGLDLL, "glTexCoord1i" );
  1088. qglTexCoord1iv = GPA(g_hGLDLL, "glTexCoord1iv" );
  1089. qglTexCoord1s = GPA(g_hGLDLL, "glTexCoord1s" );
  1090. qglTexCoord1sv = GPA(g_hGLDLL, "glTexCoord1sv" );
  1091. qglTexCoord2d = GPA(g_hGLDLL, "glTexCoord2d" );
  1092. qglTexCoord2dv = GPA(g_hGLDLL, "glTexCoord2dv" );
  1093. qglTexCoord2f = GPA(g_hGLDLL, "glTexCoord2f" );
  1094. qglTexCoord2fv = GPA(g_hGLDLL, "glTexCoord2fv" );
  1095. qglTexCoord2i = GPA(g_hGLDLL, "glTexCoord2i" );
  1096. qglTexCoord2iv = GPA(g_hGLDLL, "glTexCoord2iv" );
  1097. qglTexCoord2s = GPA(g_hGLDLL, "glTexCoord2s" );
  1098. qglTexCoord2sv = GPA(g_hGLDLL, "glTexCoord2sv" );
  1099. qglTexCoord3d = GPA(g_hGLDLL, "glTexCoord3d" );
  1100. qglTexCoord3dv = GPA(g_hGLDLL, "glTexCoord3dv" );
  1101. qglTexCoord3f = GPA(g_hGLDLL, "glTexCoord3f" );
  1102. qglTexCoord3fv = GPA(g_hGLDLL, "glTexCoord3fv" );
  1103. qglTexCoord3i = GPA(g_hGLDLL, "glTexCoord3i" );
  1104. qglTexCoord3iv = GPA(g_hGLDLL, "glTexCoord3iv" );
  1105. qglTexCoord3s = GPA(g_hGLDLL, "glTexCoord3s" );
  1106. qglTexCoord3sv = GPA(g_hGLDLL, "glTexCoord3sv" );
  1107. qglTexCoord4d = GPA(g_hGLDLL, "glTexCoord4d" );
  1108. qglTexCoord4dv = GPA(g_hGLDLL, "glTexCoord4dv" );
  1109. qglTexCoord4f = GPA(g_hGLDLL, "glTexCoord4f" );
  1110. qglTexCoord4fv = GPA(g_hGLDLL, "glTexCoord4fv" );
  1111. qglTexCoord4i = GPA(g_hGLDLL, "glTexCoord4i" );
  1112. qglTexCoord4iv = GPA(g_hGLDLL, "glTexCoord4iv" );
  1113. qglTexCoord4s = GPA(g_hGLDLL, "glTexCoord4s" );
  1114. qglTexCoord4sv = GPA(g_hGLDLL, "glTexCoord4sv" );
  1115. qglTexCoordPointer = GPA(g_hGLDLL, "glTexCoordPointer" );
  1116. qglTexEnvf = GPA(g_hGLDLL, "glTexEnvf" );
  1117. qglTexEnvfv = GPA(g_hGLDLL, "glTexEnvfv" );
  1118. qglTexEnvi = GPA(g_hGLDLL, "glTexEnvi" );
  1119. qglTexEnviv = GPA(g_hGLDLL, "glTexEnviv" );
  1120. qglTexGend = GPA(g_hGLDLL, "glTexGend" );
  1121. qglTexGendv = GPA(g_hGLDLL, "glTexGendv" );
  1122. qglTexGenf = GPA(g_hGLDLL, "glTexGenf" );
  1123. qglTexGenfv = GPA(g_hGLDLL, "glTexGenfv" );
  1124. qglTexGeni = GPA(g_hGLDLL, "glTexGeni" );
  1125. qglTexGeniv = GPA(g_hGLDLL, "glTexGeniv" );
  1126. qglTexImage1D = GPA(g_hGLDLL, "glTexImage1D" );
  1127. qglTexImage2D = GPA(g_hGLDLL, "glTexImage2D" );
  1128. qglTexParameterf = GPA(g_hGLDLL, "glTexParameterf" );
  1129. qglTexParameterfv = GPA(g_hGLDLL, "glTexParameterfv" );
  1130. qglTexParameteri = GPA(g_hGLDLL, "glTexParameteri" );
  1131. qglTexParameteriv = GPA(g_hGLDLL, "glTexParameteriv" );
  1132. qglTexSubImage1D = GPA(g_hGLDLL, "glTexSubImage1D" );
  1133. qglTexSubImage2D = GPA(g_hGLDLL, "glTexSubImage2D" );
  1134. qglTranslated = GPA(g_hGLDLL, "glTranslated" );
  1135. qglTranslatef = GPA(g_hGLDLL, "glTranslatef" );
  1136. qglVertex2d = GPA(g_hGLDLL, "glVertex2d" );
  1137. qglVertex2dv = GPA(g_hGLDLL, "glVertex2dv" );
  1138. qglVertex2f = GPA(g_hGLDLL, "glVertex2f" );
  1139. qglVertex2fv = GPA(g_hGLDLL, "glVertex2fv" );
  1140. qglVertex2i = GPA(g_hGLDLL, "glVertex2i" );
  1141. qglVertex2iv = GPA(g_hGLDLL, "glVertex2iv" );
  1142. qglVertex2s = GPA(g_hGLDLL, "glVertex2s" );
  1143. qglVertex2sv = GPA(g_hGLDLL, "glVertex2sv" );
  1144. qglVertex3d = GPA(g_hGLDLL, "glVertex3d" );
  1145. qglVertex3dv = GPA(g_hGLDLL, "glVertex3dv" );
  1146. qglVertex3f = GPA(g_hGLDLL, "glVertex3f" );
  1147. qglVertex3fv = GPA(g_hGLDLL, "glVertex3fv" );
  1148. qglVertex3i = GPA(g_hGLDLL, "glVertex3i" );
  1149. qglVertex3iv = GPA(g_hGLDLL, "glVertex3iv" );
  1150. qglVertex3s = GPA(g_hGLDLL, "glVertex3s" );
  1151. qglVertex3sv = GPA(g_hGLDLL, "glVertex3sv" );
  1152. qglVertex4d = GPA(g_hGLDLL, "glVertex4d" );
  1153. qglVertex4dv = GPA(g_hGLDLL, "glVertex4dv" );
  1154. qglVertex4f = GPA(g_hGLDLL, "glVertex4f" );
  1155. qglVertex4fv = GPA(g_hGLDLL, "glVertex4fv" );
  1156. qglVertex4i = GPA(g_hGLDLL, "glVertex4i" );
  1157. qglVertex4iv = GPA(g_hGLDLL, "glVertex4iv" );
  1158. qglVertex4s = GPA(g_hGLDLL, "glVertex4s" );
  1159. qglVertex4sv = GPA(g_hGLDLL, "glVertex4sv" );
  1160. qglVertexPointer = GPA(g_hGLDLL, "glVertexPointer" );
  1161. qglViewport = GPA(g_hGLDLL, "glViewport" );
  1162. qwglCopyContext = GPA(g_hGLDLL, "wglCopyContext" );
  1163. qwglCreateContext = GPA(g_hGLDLL, "wglCreateContext" );
  1164. qwglCreateLayerContext = GPA(g_hGLDLL, "wglCreateLayerContext" );
  1165. qwglDeleteContext = GPA(g_hGLDLL, "wglDeleteContext" );
  1166. qwglDescribeLayerPlane = GPA(g_hGLDLL, "wglDescribeLayerPlane" );
  1167. qwglGetCurrentContext = GPA(g_hGLDLL, "wglGetCurrentContext" );
  1168. qwglGetCurrentDC = GPA(g_hGLDLL, "wglGetCurrentDC" );
  1169. qwglGetLayerPaletteEntries = GPA(g_hGLDLL, "wglGetLayerPaletteEntries" );
  1170. qwglGetProcAddress = GPA(g_hGLDLL, "wglGetProcAddress" );
  1171. qwglMakeCurrent = GPA(g_hGLDLL, "wglMakeCurrent" );
  1172. qwglRealizeLayerPalette = GPA(g_hGLDLL, "wglRealizeLayerPalette" );
  1173. qwglSetLayerPaletteEntries = GPA(g_hGLDLL, "wglSetLayerPaletteEntries" );
  1174. qwglShareLists = GPA(g_hGLDLL, "wglShareLists" );
  1175. qwglSwapLayerBuffers = GPA(g_hGLDLL, "wglSwapLayerBuffers" );
  1176. qwglUseFontBitmaps = GPA(g_hGLDLL, "wglUseFontBitmapsA" );
  1177. qwglUseFontOutlines = GPA(g_hGLDLL, "wglUseFontOutlinesA" );
  1178. qwglChoosePixelFormat = GPA(g_hGLDLL, "wglChoosePixelFormat" );
  1179. qwglDescribePixelFormat = GPA(g_hGLDLL, "wglDescribePixelFormat" );
  1180. qwglGetPixelFormat = GPA(g_hGLDLL, "wglGetPixelFormat" );
  1181. qwglSetPixelFormat = GPA(g_hGLDLL, "wglSetPixelFormat" );
  1182. qwglSwapBuffers = GPA(g_hGLDLL, "wglSwapBuffers" );
  1183. qwglSwapIntervalEXT = 0;
  1184. qglPointParameterfEXT = 0;
  1185. qglPointParameterfvEXT = 0;
  1186. qglColorTableEXT = 0;
  1187. qglSelectTextureSGIS = 0;
  1188. qglMTexCoord2fSGIS = 0;
  1189. return 1;
  1190. }
  1191. #pragma warning (default : 4113 4133 4047 )