请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

ESFKAMI

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

ESFX

ESF: Xenoverse

ESF123

ESF1.2.3

EVM2.1

EVM2.1

ECXSSJ

ECX: TeamSSJ

ECX2.2

ECX RC2

ECX2.3

ECX RC3

查看: 260|回复: 1

[MetaHook]Quake OpenGL Function

[复制链接]

206

主题

211

帖子

889

积分

ESFKAMI

Rank: 8Rank: 8

积分
889
发表于 2017-7-14 16:44:01 | 显示全部楼层 |阅读模式
Thanks to hzqst

Remember to call QGL_Init while loading Client


qgl.h

  1. #ifndef QGL_H
  2. #define QGL_H

  3. #include <gl/gl.h>
  4. #include <gl/glext.h>

  5. extern void (APIENTRY *qglAccum)(GLenum op, GLfloat value);
  6. extern void (APIENTRY *qglAlphaFunc)(GLenum func, GLclampf ref);
  7. extern GLboolean (APIENTRY *qglAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences);
  8. extern void (APIENTRY *qglArrayElement)(GLint i);
  9. extern void (APIENTRY *qglBegin)(GLenum mode);
  10. extern void (APIENTRY *qglBindTexture)(GLenum target, GLuint texture);
  11. extern void (APIENTRY *qglBitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
  12. extern void (APIENTRY *qglBlendFunc)(GLenum sfactor, GLenum dfactor);
  13. extern void (APIENTRY *qglCallList)(GLuint list);
  14. extern void (APIENTRY *qglCallLists)(GLsizei n, GLenum type, const GLvoid *lists);
  15. extern void (APIENTRY *qglClear)(GLbitfield mask);
  16. extern void (APIENTRY *qglClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  17. extern void (APIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  18. extern void (APIENTRY *qglClearDepth)(GLclampd depth);
  19. extern void (APIENTRY *qglClearIndex)(GLfloat c);
  20. extern void (APIENTRY *qglClearStencil)(GLint s);
  21. extern void (APIENTRY *qglClipPlane)(GLenum plane, const GLdouble *equation);
  22. extern void (APIENTRY *qglColor3b)(GLbyte red, GLbyte green, GLbyte blue);
  23. extern void (APIENTRY *qglColor3bv)(const GLbyte *v);
  24. extern void (APIENTRY *qglColor3d)(GLdouble red, GLdouble green, GLdouble blue);
  25. extern void (APIENTRY *qglColor3dv)(const GLdouble *v);
  26. extern void (APIENTRY *qglColor3f)(GLfloat red, GLfloat green, GLfloat blue);
  27. extern void (APIENTRY *qglColor3fv)(const GLfloat *v);
  28. extern void (APIENTRY *qglColor3i)(GLint red, GLint green, GLint blue);
  29. extern void (APIENTRY *qglColor3iv)(const GLint *v);
  30. extern void (APIENTRY *qglColor3s)(GLshort red, GLshort green, GLshort blue);
  31. extern void (APIENTRY *qglColor3sv)(const GLshort *v);
  32. extern void (APIENTRY *qglColor3ub)(GLubyte red, GLubyte green, GLubyte blue);
  33. extern void (APIENTRY *qglColor3ubv)(const GLubyte *v);
  34. extern void (APIENTRY *qglColor3ui)(GLuint red, GLuint green, GLuint blue);
  35. extern void (APIENTRY *qglColor3uiv)(const GLuint *v);
  36. extern void (APIENTRY *qglColor3us)(GLushort red, GLushort green, GLushort blue);
  37. extern void (APIENTRY *qglColor3usv)(const GLushort *v);
  38. extern void (APIENTRY *qglColor4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
  39. extern void (APIENTRY *qglColor4bv)(const GLbyte *v);
  40. extern void (APIENTRY *qglColor4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
  41. extern void (APIENTRY *qglColor4dv)(const GLdouble *v);
  42. extern void (APIENTRY *qglColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  43. extern void (APIENTRY *qglColor4fv)(const GLfloat *v);
  44. extern void (APIENTRY *qglColor4i)(GLint red, GLint green, GLint blue, GLint alpha);
  45. extern void (APIENTRY *qglColor4iv)(const GLint *v);
  46. extern void (APIENTRY *qglColor4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
  47. extern void (APIENTRY *qglColor4sv)(const GLshort *v);
  48. extern void (APIENTRY *qglColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
  49. extern void (APIENTRY *qglColor4ubv)(const GLubyte *v);
  50. extern void (APIENTRY *qglColor4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
  51. extern void (APIENTRY *qglColor4uiv)(const GLuint *v);
  52. extern void (APIENTRY *qglColor4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
  53. extern void (APIENTRY *qglColor4usv)(const GLushort *v);
  54. extern void (APIENTRY *qglColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  55. extern void (APIENTRY *qglColorMaterial)(GLenum face, GLenum mode);
  56. extern void (APIENTRY *qglColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  57. extern void (APIENTRY *qglCopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
  58. extern void (APIENTRY *qglCopyTexImage1D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
  59. extern void (APIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  60. extern void (APIENTRY *qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
  61. extern void (APIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  62. extern void (APIENTRY *qglCullFace)(GLenum mode);
  63. extern void (APIENTRY *qglDeleteLists)(GLuint list, GLsizei range);
  64. extern void (APIENTRY *qglDeleteTextures)(GLsizei n, const GLuint *textures);
  65. extern void (APIENTRY *qglDepthFunc)(GLenum func);
  66. extern void (APIENTRY *qglDepthMask)(GLboolean flag);
  67. extern void (APIENTRY *qglDepthRange)(GLclampd zNear, GLclampd zFar);
  68. extern void (APIENTRY *qglDisable)(GLenum cap);
  69. extern void (APIENTRY *qglDisableClientState)(GLenum array);
  70. extern void (APIENTRY *qglDrawArrays)(GLenum mode, GLint first, GLsizei count);
  71. extern void (APIENTRY *qglDrawBuffer)(GLenum mode);
  72. extern void (APIENTRY *qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  73. extern void (APIENTRY *qglDrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  74. extern void (APIENTRY *qglEdgeFlag)(GLboolean flag);
  75. extern void (APIENTRY *qglEdgeFlagPointer)(GLsizei stride, const GLvoid *pointer);
  76. extern void (APIENTRY *qglEdgeFlagv)(const GLboolean *flag);
  77. extern void (APIENTRY *qglEnable)(GLenum cap);
  78. extern void (APIENTRY *qglEnableClientState)(GLenum array);
  79. extern void (APIENTRY *qglEnd)(void);
  80. extern void (APIENTRY *qglEndList)(void);
  81. extern void (APIENTRY *qglEvalCoord1d)(GLdouble u);
  82. extern void (APIENTRY *qglEvalCoord1dv)(const GLdouble *u);
  83. extern void (APIENTRY *qglEvalCoord1f)(GLfloat u);
  84. extern void (APIENTRY *qglEvalCoord1fv)(const GLfloat *u);
  85. extern void (APIENTRY *qglEvalCoord2d)(GLdouble u, GLdouble v);
  86. extern void (APIENTRY *qglEvalCoord2dv)(const GLdouble *u);
  87. extern void (APIENTRY *qglEvalCoord2f)(GLfloat u, GLfloat v);
  88. extern void (APIENTRY *qglEvalCoord2fv)(const GLfloat *u);
  89. extern void (APIENTRY *qglEvalMesh1)(GLenum mode, GLint i1, GLint i2);
  90. extern void (APIENTRY *qglEvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
  91. extern void (APIENTRY *qglEvalPoint1)(GLint i);
  92. extern void (APIENTRY *qglEvalPoint2)(GLint i, GLint j);
  93. extern void (APIENTRY *qglFeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer);
  94. extern void (APIENTRY *qglFinish)(void);
  95. extern void (APIENTRY *qglFlush)(void);
  96. extern void (APIENTRY *qglFogf)(GLenum pname, GLfloat param);
  97. extern void (APIENTRY *qglFogfv)(GLenum pname, const GLfloat *params);
  98. extern void (APIENTRY *qglFogi)(GLenum pname, GLint param);
  99. extern void (APIENTRY *qglFogiv)(GLenum pname, const GLint *params);
  100. extern void (APIENTRY *qglFrontFace)(GLenum mode);
  101. extern void (APIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  102. extern GLuint (APIENTRY *qglGenLists)(GLsizei range);
  103. extern void (APIENTRY *qglGenTextures)(GLsizei n, GLuint *textures);
  104. extern void (APIENTRY *qglGetBooleanv)(GLenum pname, GLboolean *params);
  105. extern void (APIENTRY *qglGetClipPlane)(GLenum plane, GLdouble *equation);
  106. extern void (APIENTRY *qglGetDoublev)(GLenum pname, GLdouble *params);
  107. extern GLenum (APIENTRY *qglGetError)(void);
  108. extern void (APIENTRY *qglGetFloatv)(GLenum pname, GLfloat *params);
  109. extern void (APIENTRY *qglGetIntegerv)(GLenum pname, GLint *params);
  110. extern void (APIENTRY *qglGetLightfv)(GLenum light, GLenum pname, GLfloat *params);
  111. extern void (APIENTRY *qglGetLightiv)(GLenum light, GLenum pname, GLint *params);
  112. extern void (APIENTRY *qglGetMapdv)(GLenum target, GLenum query, GLdouble *v);
  113. extern void (APIENTRY *qglGetMapfv)(GLenum target, GLenum query, GLfloat *v);
  114. extern void (APIENTRY *qglGetMapiv)(GLenum target, GLenum query, GLint *v);
  115. extern void (APIENTRY *qglGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params);
  116. extern void (APIENTRY *qglGetMaterialiv)(GLenum face, GLenum pname, GLint *params);
  117. extern void (APIENTRY *qglGetPixelMapfv)(GLenum map, GLfloat *values);
  118. extern void (APIENTRY *qglGetPixelMapuiv)(GLenum map, GLuint *values);
  119. extern void (APIENTRY *qglGetPixelMapusv)(GLenum map, GLushort *values);
  120. extern void (APIENTRY *qglGetPointerv)(GLenum pname, GLvoid* *params);
  121. extern void (APIENTRY *qglGetPolygonStipple)(GLubyte *mask);
  122. extern const GLubyte * (APIENTRY *qglGetString)(GLenum name);
  123. extern void (APIENTRY *qglGetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params);
  124. extern void (APIENTRY *qglGetTexEnviv)(GLenum target, GLenum pname, GLint *params);
  125. extern void (APIENTRY *qglGetTexGendv)(GLenum coord, GLenum pname, GLdouble *params);
  126. extern void (APIENTRY *qglGetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params);
  127. extern void (APIENTRY *qglGetTexGeniv)(GLenum coord, GLenum pname, GLint *params);
  128. extern void (APIENTRY *qglGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
  129. extern void (APIENTRY *qglGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params);
  130. extern void (APIENTRY *qglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
  131. extern void (APIENTRY *qglGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
  132. extern void (APIENTRY *qglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
  133. extern void (APIENTRY *qglHint)(GLenum target, GLenum mode);
  134. extern void (APIENTRY *qglIndexMask)(GLuint mask);
  135. extern void (APIENTRY *qglIndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
  136. extern void (APIENTRY *qglIndexd)(GLdouble c);
  137. extern void (APIENTRY *qglIndexdv)(const GLdouble *c);
  138. extern void (APIENTRY *qglIndexf)(GLfloat c);
  139. extern void (APIENTRY *qglIndexfv)(const GLfloat *c);
  140. extern void (APIENTRY *qglIndexi)(GLint c);
  141. extern void (APIENTRY *qglIndexiv)(const GLint *c);
  142. extern void (APIENTRY *qglIndexs)(GLshort c);
  143. extern void (APIENTRY *qglIndexsv)(const GLshort *c);
  144. extern void (APIENTRY *qglIndexub)(GLubyte c);
  145. extern void (APIENTRY *qglIndexubv)(const GLubyte *c);
  146. extern void (APIENTRY *qglInitNames)(void);
  147. extern void (APIENTRY *qglInterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer);
  148. extern GLboolean (APIENTRY *qglIsEnabled)(GLenum cap);
  149. extern GLboolean (APIENTRY *qglIsList)(GLuint list);
  150. extern GLboolean (APIENTRY *qglIsTexture)(GLuint texture);
  151. extern void (APIENTRY *qglLightModelf)(GLenum pname, GLfloat param);
  152. extern void (APIENTRY *qglLightModelfv)(GLenum pname, const GLfloat *params);
  153. extern void (APIENTRY *qglLightModeli)(GLenum pname, GLint param);
  154. extern void (APIENTRY *qglLightModeliv)(GLenum pname, const GLint *params);
  155. extern void (APIENTRY *qglLightf)(GLenum light, GLenum pname, GLfloat param);
  156. extern void (APIENTRY *qglLightfv)(GLenum light, GLenum pname, const GLfloat *params);
  157. extern void (APIENTRY *qglLighti)(GLenum light, GLenum pname, GLint param);
  158. extern void (APIENTRY *qglLightiv)(GLenum light, GLenum pname, const GLint *params);
  159. extern void (APIENTRY *qglLineStipple)(GLint factor, GLushort pattern);
  160. extern void (APIENTRY *qglLineWidth)(GLfloat width);
  161. extern void (APIENTRY *qglListBase)(GLuint base);
  162. extern void (APIENTRY *qglLoadIdentity)(void);
  163. extern void (APIENTRY *qglLoadMatrixd)(const GLdouble *m);
  164. extern void (APIENTRY *qglLoadMatrixf)(const GLfloat *m);
  165. extern void (APIENTRY *qglLoadName)(GLuint name);
  166. extern void (APIENTRY *qglLogicOp)(GLenum opcode);
  167. extern void (APIENTRY *qglMap1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
  168. extern void (APIENTRY *qglMap1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
  169. extern void (APIENTRY *qglMap2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
  170. extern void (APIENTRY *qglMap2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
  171. extern void (APIENTRY *qglMapGrid1d)(GLint un, GLdouble u1, GLdouble u2);
  172. extern void (APIENTRY *qglMapGrid1f)(GLint un, GLfloat u1, GLfloat u2);
  173. extern void (APIENTRY *qglMapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
  174. extern void (APIENTRY *qglMapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
  175. extern void (APIENTRY *qglMaterialf)(GLenum face, GLenum pname, GLfloat param);
  176. extern void (APIENTRY *qglMaterialfv)(GLenum face, GLenum pname, const GLfloat *params);
  177. extern void (APIENTRY *qglMateriali)(GLenum face, GLenum pname, GLint param);
  178. extern void (APIENTRY *qglMaterialiv)(GLenum face, GLenum pname, const GLint *params);
  179. extern void (APIENTRY *qglMatrixMode)(GLenum mode);
  180. extern void (APIENTRY *qglMultMatrixd)(const GLdouble *m);
  181. extern void (APIENTRY *qglMultMatrixf)(const GLfloat *m);
  182. extern void (APIENTRY *qglNewList)(GLuint list, GLenum mode);
  183. extern void (APIENTRY *qglNormal3b)(GLbyte nx, GLbyte ny, GLbyte nz);
  184. extern void (APIENTRY *qglNormal3bv)(const GLbyte *v);
  185. extern void (APIENTRY *qglNormal3d)(GLdouble nx, GLdouble ny, GLdouble nz);
  186. extern void (APIENTRY *qglNormal3dv)(const GLdouble *v);
  187. extern void (APIENTRY *qglNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz);
  188. extern void (APIENTRY *qglNormal3fv)(const GLfloat *v);
  189. extern void (APIENTRY *qglNormal3i)(GLint nx, GLint ny, GLint nz);
  190. extern void (APIENTRY *qglNormal3iv)(const GLint *v);
  191. extern void (APIENTRY *qglNormal3s)(GLshort nx, GLshort ny, GLshort nz);
  192. extern void (APIENTRY *qglNormal3sv)(const GLshort *v);
  193. extern void (APIENTRY *qglNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
  194. extern void (APIENTRY *qglOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  195. extern void (APIENTRY *qglPassThrough)(GLfloat token);
  196. extern void (APIENTRY *qglPixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values);
  197. extern void (APIENTRY *qglPixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values);
  198. extern void (APIENTRY *qglPixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values);
  199. extern void (APIENTRY *qglPixelStoref)(GLenum pname, GLfloat param);
  200. extern void (APIENTRY *qglPixelStorei)(GLenum pname, GLint param);
  201. extern void (APIENTRY *qglPixelTransferf)(GLenum pname, GLfloat param);
  202. extern void (APIENTRY *qglPixelTransferi)(GLenum pname, GLint param);
  203. extern void (APIENTRY *qglPixelZoom)(GLfloat xfactor, GLfloat yfactor);
  204. extern void (APIENTRY *qglPointSize)(GLfloat size);
  205. extern void (APIENTRY *qglPolygonMode)(GLenum face, GLenum mode);
  206. extern void (APIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units);
  207. extern void (APIENTRY *qglPolygonStipple)(const GLubyte *mask);
  208. extern void (APIENTRY *qglPopAttrib)(void);
  209. extern void (APIENTRY *qglPopClientAttrib)(void);
  210. extern void (APIENTRY *qglPopMatrix)(void);
  211. extern void (APIENTRY *qglPopName)(void);
  212. extern void (APIENTRY *qglPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities);
  213. extern void (APIENTRY *qglPushAttrib)(GLbitfield mask);
  214. extern void (APIENTRY *qglPushClientAttrib)(GLbitfield mask);
  215. extern void (APIENTRY *qglPushMatrix)(void);
  216. extern void (APIENTRY *qglPushName)(GLuint name);
  217. extern void (APIENTRY *qglRasterPos2d)(GLdouble x, GLdouble y);
  218. extern void (APIENTRY *qglRasterPos2dv)(const GLdouble *v);
  219. extern void (APIENTRY *qglRasterPos2f)(GLfloat x, GLfloat y);
  220. extern void (APIENTRY *qglRasterPos2fv)(const GLfloat *v);
  221. extern void (APIENTRY *qglRasterPos2i)(GLint x, GLint y);
  222. extern void (APIENTRY *qglRasterPos2iv)(const GLint *v);
  223. extern void (APIENTRY *qglRasterPos2s)(GLshort x, GLshort y);
  224. extern void (APIENTRY *qglRasterPos2sv)(const GLshort *v);
  225. extern void (APIENTRY *qglRasterPos3d)(GLdouble x, GLdouble y, GLdouble z);
  226. extern void (APIENTRY *qglRasterPos3dv)(const GLdouble *v);
  227. extern void (APIENTRY *qglRasterPos3f)(GLfloat x, GLfloat y, GLfloat z);
  228. extern void (APIENTRY *qglRasterPos3fv)(const GLfloat *v);
  229. extern void (APIENTRY *qglRasterPos3i)(GLint x, GLint y, GLint z);
  230. extern void (APIENTRY *qglRasterPos3iv)(const GLint *v);
  231. extern void (APIENTRY *qglRasterPos3s)(GLshort x, GLshort y, GLshort z);
  232. extern void (APIENTRY *qglRasterPos3sv)(const GLshort *v);
  233. extern void (APIENTRY *qglRasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  234. extern void (APIENTRY *qglRasterPos4dv)(const GLdouble *v);
  235. extern void (APIENTRY *qglRasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  236. extern void (APIENTRY *qglRasterPos4fv)(const GLfloat *v);
  237. extern void (APIENTRY *qglRasterPos4i)(GLint x, GLint y, GLint z, GLint w);
  238. extern void (APIENTRY *qglRasterPos4iv)(const GLint *v);
  239. extern void (APIENTRY *qglRasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w);
  240. extern void (APIENTRY *qglRasterPos4sv)(const GLshort *v);
  241. extern void (APIENTRY *qglReadBuffer)(GLenum mode);
  242. extern void (APIENTRY *qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
  243. extern void (APIENTRY *qglRectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
  244. extern void (APIENTRY *qglRectdv)(const GLdouble *v1, const GLdouble *v2);
  245. extern void (APIENTRY *qglRectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
  246. extern void (APIENTRY *qglRectfv)(const GLfloat *v1, const GLfloat *v2);
  247. extern void (APIENTRY *qglRecti)(GLint x1, GLint y1, GLint x2, GLint y2);
  248. extern void (APIENTRY *qglRectiv)(const GLint *v1, const GLint *v2);
  249. extern void (APIENTRY *qglRects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
  250. extern void (APIENTRY *qglRectsv)(const GLshort *v1, const GLshort *v2);
  251. extern GLint (APIENTRY *qglRenderMode)(GLenum mode);
  252. extern void (APIENTRY *qglRotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
  253. extern void (APIENTRY *qglRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
  254. extern void (APIENTRY *qglScaled)(GLdouble x, GLdouble y, GLdouble z);
  255. extern void (APIENTRY *qglScalef)(GLfloat x, GLfloat y, GLfloat z);
  256. extern void (APIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
  257. extern void (APIENTRY *qglSelectBuffer)(GLsizei size, GLuint *buffer);
  258. extern void (APIENTRY *qglShadeModel)(GLenum mode);
  259. extern void (APIENTRY *qglStencilFunc)(GLenum func, GLint ref, GLuint mask);
  260. extern void (APIENTRY *qglStencilMask)(GLuint mask);
  261. extern void (APIENTRY *qglStencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
  262. extern void (APIENTRY *qglTexCoord1d)(GLdouble s);
  263. extern void (APIENTRY *qglTexCoord1dv)(const GLdouble *v);
  264. extern void (APIENTRY *qglTexCoord1f)(GLfloat s);
  265. extern void (APIENTRY *qglTexCoord1fv)(const GLfloat *v);
  266. extern void (APIENTRY *qglTexCoord1i)(GLint s);
  267. extern void (APIENTRY *qglTexCoord1iv)(const GLint *v);
  268. extern void (APIENTRY *qglTexCoord1s)(GLshort s);
  269. extern void (APIENTRY *qglTexCoord1sv)(const GLshort *v);
  270. extern void (APIENTRY *qglTexCoord2d)(GLdouble s, GLdouble t);
  271. extern void (APIENTRY *qglTexCoord2dv)(const GLdouble *v);
  272. extern void (APIENTRY *qglTexCoord2f)(GLfloat s, GLfloat t);
  273. extern void (APIENTRY *qglTexCoord2fv)(const GLfloat *v);
  274. extern void (APIENTRY *qglTexCoord2i)(GLint s, GLint t);
  275. extern void (APIENTRY *qglTexCoord2iv)(const GLint *v);
  276. extern void (APIENTRY *qglTexCoord2s)(GLshort s, GLshort t);
  277. extern void (APIENTRY *qglTexCoord2sv)(const GLshort *v);
  278. extern void (APIENTRY *qglTexCoord3d)(GLdouble s, GLdouble t, GLdouble r);
  279. extern void (APIENTRY *qglTexCoord3dv)(const GLdouble *v);
  280. extern void (APIENTRY *qglTexCoord3f)(GLfloat s, GLfloat t, GLfloat r);
  281. extern void (APIENTRY *qglTexCoord3fv)(const GLfloat *v);
  282. extern void (APIENTRY *qglTexCoord3i)(GLint s, GLint t, GLint r);
  283. extern void (APIENTRY *qglTexCoord3iv)(const GLint *v);
  284. extern void (APIENTRY *qglTexCoord3s)(GLshort s, GLshort t, GLshort r);
  285. extern void (APIENTRY *qglTexCoord3sv)(const GLshort *v);
  286. extern void (APIENTRY *qglTexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
  287. extern void (APIENTRY *qglTexCoord4dv)(const GLdouble *v);
  288. extern void (APIENTRY *qglTexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
  289. extern void (APIENTRY *qglTexCoord4fv)(const GLfloat *v);
  290. extern void (APIENTRY *qglTexCoord4i)(GLint s, GLint t, GLint r, GLint q);
  291. extern void (APIENTRY *qglTexCoord4iv)(const GLint *v);
  292. extern void (APIENTRY *qglTexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q);
  293. extern void (APIENTRY *qglTexCoord4sv)(const GLshort *v);
  294. extern void (APIENTRY *qglTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  295. extern void (APIENTRY *qglTexEnvf)(GLenum target, GLenum pname, GLfloat param);
  296. extern void (APIENTRY *qglTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params);
  297. extern void (APIENTRY *qglTexEnvi)(GLenum target, GLenum pname, GLint param);
  298. extern void (APIENTRY *qglTexEnviv)(GLenum target, GLenum pname, const GLint *params);
  299. extern void (APIENTRY *qglTexGend)(GLenum coord, GLenum pname, GLdouble param);
  300. extern void (APIENTRY *qglTexGendv)(GLenum coord, GLenum pname, const GLdouble *params);
  301. extern void (APIENTRY *qglTexGenf)(GLenum coord, GLenum pname, GLfloat param);
  302. extern void (APIENTRY *qglTexGenfv)(GLenum coord, GLenum pname, const GLfloat *params);
  303. extern void (APIENTRY *qglTexGeni)(GLenum coord, GLenum pname, GLint param);
  304. extern void (APIENTRY *qglTexGeniv)(GLenum coord, GLenum pname, const GLint *params);
  305. extern void (APIENTRY *qglTexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  306. extern void (APIENTRY *qglTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  307. extern void (APIENTRY *qglTexParameterf)(GLenum target, GLenum pname, GLfloat param);
  308. extern void (APIENTRY *qglTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
  309. extern void (APIENTRY *qglTexParameteri)(GLenum target, GLenum pname, GLint param);
  310. extern void (APIENTRY *qglTexParameteriv)(GLenum target, GLenum pname, const GLint *params);
  311. extern void (APIENTRY *qglTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
  312. extern void (APIENTRY *qglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  313. extern void (APIENTRY *qglTranslated)(GLdouble x, GLdouble y, GLdouble z);
  314. extern void (APIENTRY *qglTranslatef)(GLfloat x, GLfloat y, GLfloat z);
  315. extern void (APIENTRY *qglVertex2d)(GLdouble x, GLdouble y);
  316. extern void (APIENTRY *qglVertex2dv)(const GLdouble *v);
  317. extern void (APIENTRY *qglVertex2f)(GLfloat x, GLfloat y);
  318. extern void (APIENTRY *qglVertex2fv)(const GLfloat *v);
  319. extern void (APIENTRY *qglVertex2i)(GLint x, GLint y);
  320. extern void (APIENTRY *qglVertex2iv)(const GLint *v);
  321. extern void (APIENTRY *qglVertex2s)(GLshort x, GLshort y);
  322. extern void (APIENTRY *qglVertex2sv)(const GLshort *v);
  323. extern void (APIENTRY *qglVertex3d)(GLdouble x, GLdouble y, GLdouble z);
  324. extern void (APIENTRY *qglVertex3dv)(const GLdouble *v);
  325. extern void (APIENTRY *qglVertex3f)(GLfloat x, GLfloat y, GLfloat z);
  326. extern void (APIENTRY *qglVertex3fv)(const GLfloat *v);
  327. extern void (APIENTRY *qglVertex3i)(GLint x, GLint y, GLint z);
  328. extern void (APIENTRY *qglVertex3iv)(const GLint *v);
  329. extern void (APIENTRY *qglVertex3s)(GLshort x, GLshort y, GLshort z);
  330. extern void (APIENTRY *qglVertex3sv)(const GLshort *v);
  331. extern void (APIENTRY *qglVertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  332. extern void (APIENTRY *qglVertex4dv)(const GLdouble *v);
  333. extern void (APIENTRY *qglVertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  334. extern void (APIENTRY *qglVertex4fv)(const GLfloat *v);
  335. extern void (APIENTRY *qglVertex4i)(GLint x, GLint y, GLint z, GLint w);
  336. extern void (APIENTRY *qglVertex4iv)(const GLint *v);
  337. extern void (APIENTRY *qglVertex4s)(GLshort x, GLshort y, GLshort z, GLshort w);
  338. extern void (APIENTRY *qglVertex4sv)(const GLshort *v);
  339. extern void (APIENTRY *qglVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  340. extern void (APIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);

  341. extern void (APIENTRY *qglActiveTexture)(GLenum texture);
  342. extern void (APIENTRY *qglSampleCoverage)(GLclampf value, GLboolean invert);
  343. extern void (APIENTRY *qglCompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
  344. extern void (APIENTRY *qglCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
  345. extern void (APIENTRY *qglCompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
  346. extern void (APIENTRY *qglCompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
  347. extern void (APIENTRY *qglCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
  348. extern void (APIENTRY *qglCompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
  349. extern void (APIENTRY *qglGetCompressedTexImage)(GLenum target, GLint level, GLvoid *img);

  350. extern GLboolean (APIENTRY *qglIsRenderbuffer)(GLuint renderbuffer);
  351. extern void (APIENTRY *qglBindRenderbuffer)(GLenum target, GLuint renderbuffer);
  352. extern void (APIENTRY *qglDeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers);
  353. extern void (APIENTRY *qglGenRenderbuffers)(GLsizei n, GLuint *renderbuffers);
  354. extern void (APIENTRY *qglRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
  355. extern void (APIENTRY *qglGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params);
  356. extern GLboolean (APIENTRY *qglIsFramebuffer)(GLuint framebuffer);
  357. extern void (APIENTRY *qglBindFramebuffer)(GLenum target, GLuint framebuffer);
  358. extern void (APIENTRY *qglDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers);
  359. extern void (APIENTRY *qglGenFramebuffers)(GLsizei n, GLuint *framebuffers);
  360. extern GLenum (APIENTRY *qglCheckFramebufferStatus)(GLenum target);
  361. extern void (APIENTRY *qglFramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
  362. extern void (APIENTRY *qglFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
  363. extern void (APIENTRY *qglFramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
  364. extern void (APIENTRY *qglFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
  365. extern void (APIENTRY *qglGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
  366. extern void (APIENTRY *qglGenerateMipmap)(GLenum target);
  367. extern void (APIENTRY *qglBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
  368. extern void (APIENTRY *qglRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
  369. extern void (APIENTRY *qglFramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);

  370. void QGL_Init(void);

  371. #endif
复制代码
qgl.cpp

  1. #include <metahook.h>

  2. #include <gl/gl.h>
  3. #include <gl/glext.h>

  4. void (APIENTRY *qglAccum)(GLenum op, GLfloat value) = 0;
  5. void (APIENTRY *qglAlphaFunc)(GLenum func, GLclampf ref) = 0;
  6. GLboolean (APIENTRY *qglAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences) = 0;
  7. void (APIENTRY *qglArrayElement)(GLint i) = 0;
  8. void (APIENTRY *qglBegin)(GLenum mode) = 0;
  9. void (APIENTRY *qglBindTexture)(GLenum target, GLuint texture) = 0;
  10. void (APIENTRY *qglBitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) = 0;
  11. void (APIENTRY *qglBlendFunc)(GLenum sfactor, GLenum dfactor) = 0;
  12. void (APIENTRY *qglCallList)(GLuint list) = 0;
  13. void (APIENTRY *qglCallLists)(GLsizei n, GLenum type, const GLvoid *lists) = 0;
  14. void (APIENTRY *qglClear)(GLbitfield mask) = 0;
  15. void (APIENTRY *qglClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) = 0;
  16. void (APIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = 0;
  17. void (APIENTRY *qglClearDepth)(GLclampd depth) = 0;
  18. void (APIENTRY *qglClearIndex)(GLfloat c) = 0;
  19. void (APIENTRY *qglClearStencil)(GLint s) = 0;
  20. void (APIENTRY *qglClipPlane)(GLenum plane, const GLdouble *equation) = 0;
  21. void (APIENTRY *qglColor3b)(GLbyte red, GLbyte green, GLbyte blue) = 0;
  22. void (APIENTRY *qglColor3bv)(const GLbyte *v) = 0;
  23. void (APIENTRY *qglColor3d)(GLdouble red, GLdouble green, GLdouble blue) = 0;
  24. void (APIENTRY *qglColor3dv)(const GLdouble *v) = 0;
  25. void (APIENTRY *qglColor3f)(GLfloat red, GLfloat green, GLfloat blue) = 0;
  26. void (APIENTRY *qglColor3fv)(const GLfloat *v) = 0;
  27. void (APIENTRY *qglColor3i)(GLint red, GLint green, GLint blue) = 0;
  28. void (APIENTRY *qglColor3iv)(const GLint *v) = 0;
  29. void (APIENTRY *qglColor3s)(GLshort red, GLshort green, GLshort blue) = 0;
  30. void (APIENTRY *qglColor3sv)(const GLshort *v) = 0;
  31. void (APIENTRY *qglColor3ub)(GLubyte red, GLubyte green, GLubyte blue) = 0;
  32. void (APIENTRY *qglColor3ubv)(const GLubyte *v) = 0;
  33. void (APIENTRY *qglColor3ui)(GLuint red, GLuint green, GLuint blue) = 0;
  34. void (APIENTRY *qglColor3uiv)(const GLuint *v) = 0;
  35. void (APIENTRY *qglColor3us)(GLushort red, GLushort green, GLushort blue) = 0;
  36. void (APIENTRY *qglColor3usv)(const GLushort *v) = 0;
  37. void (APIENTRY *qglColor4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) = 0;
  38. void (APIENTRY *qglColor4bv)(const GLbyte *v) = 0;
  39. void (APIENTRY *qglColor4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) = 0;
  40. void (APIENTRY *qglColor4dv)(const GLdouble *v) = 0;
  41. void (APIENTRY *qglColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) = 0;
  42. void (APIENTRY *qglColor4fv)(const GLfloat *v) = 0;
  43. void (APIENTRY *qglColor4i)(GLint red, GLint green, GLint blue, GLint alpha) = 0;
  44. void (APIENTRY *qglColor4iv)(const GLint *v) = 0;
  45. void (APIENTRY *qglColor4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha) = 0;
  46. void (APIENTRY *qglColor4sv)(const GLshort *v) = 0;
  47. void (APIENTRY *qglColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) = 0;
  48. void (APIENTRY *qglColor4ubv)(const GLubyte *v) = 0;
  49. void (APIENTRY *qglColor4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha) = 0;
  50. void (APIENTRY *qglColor4uiv)(const GLuint *v) = 0;
  51. void (APIENTRY *qglColor4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha) = 0;
  52. void (APIENTRY *qglColor4usv)(const GLushort *v) = 0;
  53. void (APIENTRY *qglColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = 0;
  54. void (APIENTRY *qglColorMaterial)(GLenum face, GLenum mode) = 0;
  55. void (APIENTRY *qglColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) = 0;
  56. void (APIENTRY *qglCopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) = 0;
  57. void (APIENTRY *qglCopyTexImage1D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border) = 0;
  58. void (APIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = 0;
  59. void (APIENTRY *qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) = 0;
  60. void (APIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) = 0;
  61. void (APIENTRY *qglCullFace)(GLenum mode) = 0;
  62. void (APIENTRY *qglDeleteLists)(GLuint list, GLsizei range) = 0;
  63. void (APIENTRY *qglDeleteTextures)(GLsizei n, const GLuint *textures) = 0;
  64. void (APIENTRY *qglDepthFunc)(GLenum func) = 0;
  65. void (APIENTRY *qglDepthMask)(GLboolean flag) = 0;
  66. void (APIENTRY *qglDepthRange)(GLclampd zNear, GLclampd zFar) = 0;
  67. void (APIENTRY *qglDisable)(GLenum cap) = 0;
  68. void (APIENTRY *qglDisableClientState)(GLenum array) = 0;
  69. void (APIENTRY *qglDrawArrays)(GLenum mode, GLint first, GLsizei count) = 0;
  70. void (APIENTRY *qglDrawBuffer)(GLenum mode) = 0;
  71. void (APIENTRY *qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) = 0;
  72. void (APIENTRY *qglDrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) = 0;
  73. void (APIENTRY *qglEdgeFlag)(GLboolean flag) = 0;
  74. void (APIENTRY *qglEdgeFlagPointer)(GLsizei stride, const GLvoid *pointer) = 0;
  75. void (APIENTRY *qglEdgeFlagv)(const GLboolean *flag) = 0;
  76. void (APIENTRY *qglEnable)(GLenum cap) = 0;
  77. void (APIENTRY *qglEnableClientState)(GLenum array) = 0;
  78. void (APIENTRY *qglEnd)(void) = 0;
  79. void (APIENTRY *qglEndList)(void) = 0;
  80. void (APIENTRY *qglEvalCoord1d)(GLdouble u) = 0;
  81. void (APIENTRY *qglEvalCoord1dv)(const GLdouble *u) = 0;
  82. void (APIENTRY *qglEvalCoord1f)(GLfloat u) = 0;
  83. void (APIENTRY *qglEvalCoord1fv)(const GLfloat *u) = 0;
  84. void (APIENTRY *qglEvalCoord2d)(GLdouble u, GLdouble v) = 0;
  85. void (APIENTRY *qglEvalCoord2dv)(const GLdouble *u) = 0;
  86. void (APIENTRY *qglEvalCoord2f)(GLfloat u, GLfloat v) = 0;
  87. void (APIENTRY *qglEvalCoord2fv)(const GLfloat *u) = 0;
  88. void (APIENTRY *qglEvalMesh1)(GLenum mode, GLint i1, GLint i2) = 0;
  89. void (APIENTRY *qglEvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) = 0;
  90. void (APIENTRY *qglEvalPoint1)(GLint i) = 0;
  91. void (APIENTRY *qglEvalPoint2)(GLint i, GLint j) = 0;
  92. void (APIENTRY *qglFeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer) = 0;
  93. void (APIENTRY *qglFinish)(void) = 0;
  94. void (APIENTRY *qglFlush)(void) = 0;
  95. void (APIENTRY *qglFogf)(GLenum pname, GLfloat param) = 0;
  96. void (APIENTRY *qglFogfv)(GLenum pname, const GLfloat *params) = 0;
  97. void (APIENTRY *qglFogi)(GLenum pname, GLint param) = 0;
  98. void (APIENTRY *qglFogiv)(GLenum pname, const GLint *params) = 0;
  99. void (APIENTRY *qglFrontFace)(GLenum mode) = 0;
  100. void (APIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) = 0;
  101. GLuint (APIENTRY *qglGenLists)(GLsizei range) = 0;
  102. void (APIENTRY *qglGenTextures)(GLsizei n, GLuint *textures) = 0;
  103. void (APIENTRY *qglGetBooleanv)(GLenum pname, GLboolean *params) = 0;
  104. void (APIENTRY *qglGetClipPlane)(GLenum plane, GLdouble *equation) = 0;
  105. void (APIENTRY *qglGetDoublev)(GLenum pname, GLdouble *params) = 0;
  106. GLenum (APIENTRY *qglGetError)(void) = 0;
  107. void (APIENTRY *qglGetFloatv)(GLenum pname, GLfloat *params) = 0;
  108. void (APIENTRY *qglGetIntegerv)(GLenum pname, GLint *params) = 0;
  109. void (APIENTRY *qglGetLightfv)(GLenum light, GLenum pname, GLfloat *params) = 0;
  110. void (APIENTRY *qglGetLightiv)(GLenum light, GLenum pname, GLint *params) = 0;
  111. void (APIENTRY *qglGetMapdv)(GLenum target, GLenum query, GLdouble *v) = 0;
  112. void (APIENTRY *qglGetMapfv)(GLenum target, GLenum query, GLfloat *v) = 0;
  113. void (APIENTRY *qglGetMapiv)(GLenum target, GLenum query, GLint *v) = 0;
  114. void (APIENTRY *qglGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params) = 0;
  115. void (APIENTRY *qglGetMaterialiv)(GLenum face, GLenum pname, GLint *params) = 0;
  116. void (APIENTRY *qglGetPixelMapfv)(GLenum map, GLfloat *values) = 0;
  117. void (APIENTRY *qglGetPixelMapuiv)(GLenum map, GLuint *values) = 0;
  118. void (APIENTRY *qglGetPixelMapusv)(GLenum map, GLushort *values) = 0;
  119. void (APIENTRY *qglGetPointerv)(GLenum pname, GLvoid* *params) = 0;
  120. void (APIENTRY *qglGetPolygonStipple)(GLubyte *mask) = 0;
  121. const GLubyte * (APIENTRY *qglGetString)(GLenum name) = 0;
  122. void (APIENTRY *qglGetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params) = 0;
  123. void (APIENTRY *qglGetTexEnviv)(GLenum target, GLenum pname, GLint *params) = 0;
  124. void (APIENTRY *qglGetTexGendv)(GLenum coord, GLenum pname, GLdouble *params) = 0;
  125. void (APIENTRY *qglGetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params) = 0;
  126. void (APIENTRY *qglGetTexGeniv)(GLenum coord, GLenum pname, GLint *params) = 0;
  127. void (APIENTRY *qglGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels) = 0;
  128. void (APIENTRY *qglGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params) = 0;
  129. void (APIENTRY *qglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params) = 0;
  130. void (APIENTRY *qglGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) = 0;
  131. void (APIENTRY *qglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params) = 0;
  132. void (APIENTRY *qglHint)(GLenum target, GLenum mode) = 0;
  133. void (APIENTRY *qglIndexMask)(GLuint mask) = 0;
  134. void (APIENTRY *qglIndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) = 0;
  135. void (APIENTRY *qglIndexd)(GLdouble c) = 0;
  136. void (APIENTRY *qglIndexdv)(const GLdouble *c) = 0;
  137. void (APIENTRY *qglIndexf)(GLfloat c) = 0;
  138. void (APIENTRY *qglIndexfv)(const GLfloat *c) = 0;
  139. void (APIENTRY *qglIndexi)(GLint c) = 0;
  140. void (APIENTRY *qglIndexiv)(const GLint *c) = 0;
  141. void (APIENTRY *qglIndexs)(GLshort c) = 0;
  142. void (APIENTRY *qglIndexsv)(const GLshort *c) = 0;
  143. void (APIENTRY *qglIndexub)(GLubyte c) = 0;
  144. void (APIENTRY *qglIndexubv)(const GLubyte *c) = 0;
  145. void (APIENTRY *qglInitNames)(void) = 0;
  146. void (APIENTRY *qglInterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer) = 0;
  147. GLboolean (APIENTRY *qglIsEnabled)(GLenum cap) = 0;
  148. GLboolean (APIENTRY *qglIsList)(GLuint list) = 0;
  149. GLboolean (APIENTRY *qglIsTexture)(GLuint texture) = 0;
  150. void (APIENTRY *qglLightModelf)(GLenum pname, GLfloat param) = 0;
  151. void (APIENTRY *qglLightModelfv)(GLenum pname, const GLfloat *params) = 0;
  152. void (APIENTRY *qglLightModeli)(GLenum pname, GLint param) = 0;
  153. void (APIENTRY *qglLightModeliv)(GLenum pname, const GLint *params) = 0;
  154. void (APIENTRY *qglLightf)(GLenum light, GLenum pname, GLfloat param) = 0;
  155. void (APIENTRY *qglLightfv)(GLenum light, GLenum pname, const GLfloat *params) = 0;
  156. void (APIENTRY *qglLighti)(GLenum light, GLenum pname, GLint param) = 0;
  157. void (APIENTRY *qglLightiv)(GLenum light, GLenum pname, const GLint *params) = 0;
  158. void (APIENTRY *qglLineStipple)(GLint factor, GLushort pattern) = 0;
  159. void (APIENTRY *qglLineWidth)(GLfloat width) = 0;
  160. void (APIENTRY *qglListBase)(GLuint base) = 0;
  161. void (APIENTRY *qglLoadIdentity)(void) = 0;
  162. void (APIENTRY *qglLoadMatrixd)(const GLdouble *m) = 0;
  163. void (APIENTRY *qglLoadMatrixf)(const GLfloat *m) = 0;
  164. void (APIENTRY *qglLoadName)(GLuint name) = 0;
  165. void (APIENTRY *qglLogicOp)(GLenum opcode) = 0;
  166. void (APIENTRY *qglMap1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) = 0;
  167. void (APIENTRY *qglMap1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) = 0;
  168. void (APIENTRY *qglMap2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) = 0;
  169. void (APIENTRY *qglMap2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) = 0;
  170. void (APIENTRY *qglMapGrid1d)(GLint un, GLdouble u1, GLdouble u2) = 0;
  171. void (APIENTRY *qglMapGrid1f)(GLint un, GLfloat u1, GLfloat u2) = 0;
  172. void (APIENTRY *qglMapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) = 0;
  173. void (APIENTRY *qglMapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) = 0;
  174. void (APIENTRY *qglMaterialf)(GLenum face, GLenum pname, GLfloat param) = 0;
  175. void (APIENTRY *qglMaterialfv)(GLenum face, GLenum pname, const GLfloat *params) = 0;
  176. void (APIENTRY *qglMateriali)(GLenum face, GLenum pname, GLint param) = 0;
  177. void (APIENTRY *qglMaterialiv)(GLenum face, GLenum pname, const GLint *params) = 0;
  178. void (APIENTRY *qglMatrixMode)(GLenum mode) = 0;
  179. void (APIENTRY *qglMultMatrixd)(const GLdouble *m) = 0;
  180. void (APIENTRY *qglMultMatrixf)(const GLfloat *m) = 0;
  181. void (APIENTRY *qglNewList)(GLuint list, GLenum mode) = 0;
  182. void (APIENTRY *qglNormal3b)(GLbyte nx, GLbyte ny, GLbyte nz) = 0;
  183. void (APIENTRY *qglNormal3bv)(const GLbyte *v) = 0;
  184. void (APIENTRY *qglNormal3d)(GLdouble nx, GLdouble ny, GLdouble nz) = 0;
  185. void (APIENTRY *qglNormal3dv)(const GLdouble *v) = 0;
  186. void (APIENTRY *qglNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz) = 0;
  187. void (APIENTRY *qglNormal3fv)(const GLfloat *v) = 0;
  188. void (APIENTRY *qglNormal3i)(GLint nx, GLint ny, GLint nz) = 0;
  189. void (APIENTRY *qglNormal3iv)(const GLint *v) = 0;
  190. void (APIENTRY *qglNormal3s)(GLshort nx, GLshort ny, GLshort nz) = 0;
  191. void (APIENTRY *qglNormal3sv)(const GLshort *v) = 0;
  192. void (APIENTRY *qglNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) = 0;
  193. void (APIENTRY *qglOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) = 0;
  194. void (APIENTRY *qglPassThrough)(GLfloat token) = 0;
  195. void (APIENTRY *qglPixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values) = 0;
  196. void (APIENTRY *qglPixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values) = 0;
  197. void (APIENTRY *qglPixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values) = 0;
  198. void (APIENTRY *qglPixelStoref)(GLenum pname, GLfloat param) = 0;
  199. void (APIENTRY *qglPixelStorei)(GLenum pname, GLint param) = 0;
  200. void (APIENTRY *qglPixelTransferf)(GLenum pname, GLfloat param) = 0;
  201. void (APIENTRY *qglPixelTransferi)(GLenum pname, GLint param) = 0;
  202. void (APIENTRY *qglPixelZoom)(GLfloat xfactor, GLfloat yfactor) = 0;
  203. void (APIENTRY *qglPointSize)(GLfloat size) = 0;
  204. void (APIENTRY *qglPolygonMode)(GLenum face, GLenum mode) = 0;
  205. void (APIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units) = 0;
  206. void (APIENTRY *qglPolygonStipple)(const GLubyte *mask) = 0;
  207. void (APIENTRY *qglPopAttrib)(void) = 0;
  208. void (APIENTRY *qglPopClientAttrib)(void) = 0;
  209. void (APIENTRY *qglPopMatrix)(void) = 0;
  210. void (APIENTRY *qglPopName)(void) = 0;
  211. void (APIENTRY *qglPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities) = 0;
  212. void (APIENTRY *qglPushAttrib)(GLbitfield mask) = 0;
  213. void (APIENTRY *qglPushClientAttrib)(GLbitfield mask) = 0;
  214. void (APIENTRY *qglPushMatrix)(void) = 0;
  215. void (APIENTRY *qglPushName)(GLuint name) = 0;
  216. void (APIENTRY *qglRasterPos2d)(GLdouble x, GLdouble y) = 0;
  217. void (APIENTRY *qglRasterPos2dv)(const GLdouble *v) = 0;
  218. void (APIENTRY *qglRasterPos2f)(GLfloat x, GLfloat y) = 0;
  219. void (APIENTRY *qglRasterPos2fv)(const GLfloat *v) = 0;
  220. void (APIENTRY *qglRasterPos2i)(GLint x, GLint y) = 0;
  221. void (APIENTRY *qglRasterPos2iv)(const GLint *v) = 0;
  222. void (APIENTRY *qglRasterPos2s)(GLshort x, GLshort y) = 0;
  223. void (APIENTRY *qglRasterPos2sv)(const GLshort *v) = 0;
  224. void (APIENTRY *qglRasterPos3d)(GLdouble x, GLdouble y, GLdouble z) = 0;
  225. void (APIENTRY *qglRasterPos3dv)(const GLdouble *v) = 0;
  226. void (APIENTRY *qglRasterPos3f)(GLfloat x, GLfloat y, GLfloat z) = 0;
  227. void (APIENTRY *qglRasterPos3fv)(const GLfloat *v) = 0;
  228. void (APIENTRY *qglRasterPos3i)(GLint x, GLint y, GLint z) = 0;
  229. void (APIENTRY *qglRasterPos3iv)(const GLint *v) = 0;
  230. void (APIENTRY *qglRasterPos3s)(GLshort x, GLshort y, GLshort z) = 0;
  231. void (APIENTRY *qglRasterPos3sv)(const GLshort *v) = 0;
  232. void (APIENTRY *qglRasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) = 0;
  233. void (APIENTRY *qglRasterPos4dv)(const GLdouble *v) = 0;
  234. void (APIENTRY *qglRasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
  235. void (APIENTRY *qglRasterPos4fv)(const GLfloat *v) = 0;
  236. void (APIENTRY *qglRasterPos4i)(GLint x, GLint y, GLint z, GLint w) = 0;
  237. void (APIENTRY *qglRasterPos4iv)(const GLint *v) = 0;
  238. void (APIENTRY *qglRasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w) = 0;
  239. void (APIENTRY *qglRasterPos4sv)(const GLshort *v) = 0;
  240. void (APIENTRY *qglReadBuffer)(GLenum mode) = 0;
  241. void (APIENTRY *qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) = 0;
  242. void (APIENTRY *qglRectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) = 0;
  243. void (APIENTRY *qglRectdv)(const GLdouble *v1, const GLdouble *v2) = 0;
  244. void (APIENTRY *qglRectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) = 0;
  245. void (APIENTRY *qglRectfv)(const GLfloat *v1, const GLfloat *v2) = 0;
  246. void (APIENTRY *qglRecti)(GLint x1, GLint y1, GLint x2, GLint y2) = 0;
  247. void (APIENTRY *qglRectiv)(const GLint *v1, const GLint *v2) = 0;
  248. void (APIENTRY *qglRects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2) = 0;
  249. void (APIENTRY *qglRectsv)(const GLshort *v1, const GLshort *v2) = 0;
  250. GLint (APIENTRY *qglRenderMode)(GLenum mode) = 0;
  251. void (APIENTRY *qglRotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) = 0;
  252. void (APIENTRY *qglRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) = 0;
  253. void (APIENTRY *qglScaled)(GLdouble x, GLdouble y, GLdouble z) = 0;
  254. void (APIENTRY *qglScalef)(GLfloat x, GLfloat y, GLfloat z) = 0;
  255. void (APIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height) = 0;
  256. void (APIENTRY *qglSelectBuffer)(GLsizei size, GLuint *buffer) = 0;
  257. void (APIENTRY *qglShadeModel)(GLenum mode) = 0;
  258. void (APIENTRY *qglStencilFunc)(GLenum func, GLint ref, GLuint mask) = 0;
  259. void (APIENTRY *qglStencilMask)(GLuint mask) = 0;
  260. void (APIENTRY *qglStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) = 0;
  261. void (APIENTRY *qglTexCoord1d)(GLdouble s) = 0;
  262. void (APIENTRY *qglTexCoord1dv)(const GLdouble *v) = 0;
  263. void (APIENTRY *qglTexCoord1f)(GLfloat s) = 0;
  264. void (APIENTRY *qglTexCoord1fv)(const GLfloat *v) = 0;
  265. void (APIENTRY *qglTexCoord1i)(GLint s) = 0;
  266. void (APIENTRY *qglTexCoord1iv)(const GLint *v) = 0;
  267. void (APIENTRY *qglTexCoord1s)(GLshort s) = 0;
  268. void (APIENTRY *qglTexCoord1sv)(const GLshort *v) = 0;
  269. void (APIENTRY *qglTexCoord2d)(GLdouble s, GLdouble t) = 0;
  270. void (APIENTRY *qglTexCoord2dv)(const GLdouble *v) = 0;
  271. void (APIENTRY *qglTexCoord2f)(GLfloat s, GLfloat t) = 0;
  272. void (APIENTRY *qglTexCoord2fv)(const GLfloat *v) = 0;
  273. void (APIENTRY *qglTexCoord2i)(GLint s, GLint t) = 0;
  274. void (APIENTRY *qglTexCoord2iv)(const GLint *v) = 0;
  275. void (APIENTRY *qglTexCoord2s)(GLshort s, GLshort t) = 0;
  276. void (APIENTRY *qglTexCoord2sv)(const GLshort *v) = 0;
  277. void (APIENTRY *qglTexCoord3d)(GLdouble s, GLdouble t, GLdouble r) = 0;
  278. void (APIENTRY *qglTexCoord3dv)(const GLdouble *v) = 0;
  279. void (APIENTRY *qglTexCoord3f)(GLfloat s, GLfloat t, GLfloat r) = 0;
  280. void (APIENTRY *qglTexCoord3fv)(const GLfloat *v) = 0;
  281. void (APIENTRY *qglTexCoord3i)(GLint s, GLint t, GLint r) = 0;
  282. void (APIENTRY *qglTexCoord3iv)(const GLint *v) = 0;
  283. void (APIENTRY *qglTexCoord3s)(GLshort s, GLshort t, GLshort r) = 0;
  284. void (APIENTRY *qglTexCoord3sv)(const GLshort *v) = 0;
  285. void (APIENTRY *qglTexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q) = 0;
  286. void (APIENTRY *qglTexCoord4dv)(const GLdouble *v) = 0;
  287. void (APIENTRY *qglTexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q) = 0;
  288. void (APIENTRY *qglTexCoord4fv)(const GLfloat *v) = 0;
  289. void (APIENTRY *qglTexCoord4i)(GLint s, GLint t, GLint r, GLint q) = 0;
  290. void (APIENTRY *qglTexCoord4iv)(const GLint *v) = 0;
  291. void (APIENTRY *qglTexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q) = 0;
  292. void (APIENTRY *qglTexCoord4sv)(const GLshort *v) = 0;
  293. void (APIENTRY *qglTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) = 0;
  294. void (APIENTRY *qglTexEnvf)(GLenum target, GLenum pname, GLfloat param) = 0;
  295. void (APIENTRY *qglTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params) = 0;
  296. void (APIENTRY *qglTexEnvi)(GLenum target, GLenum pname, GLint param) = 0;
  297. void (APIENTRY *qglTexEnviv)(GLenum target, GLenum pname, const GLint *params) = 0;
  298. void (APIENTRY *qglTexGend)(GLenum coord, GLenum pname, GLdouble param) = 0;
  299. void (APIENTRY *qglTexGendv)(GLenum coord, GLenum pname, const GLdouble *params) = 0;
  300. void (APIENTRY *qglTexGenf)(GLenum coord, GLenum pname, GLfloat param) = 0;
  301. void (APIENTRY *qglTexGenfv)(GLenum coord, GLenum pname, const GLfloat *params) = 0;
  302. void (APIENTRY *qglTexGeni)(GLenum coord, GLenum pname, GLint param) = 0;
  303. void (APIENTRY *qglTexGeniv)(GLenum coord, GLenum pname, const GLint *params) = 0;
  304. void (APIENTRY *qglTexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) = 0;
  305. void (APIENTRY *qglTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) = 0;
  306. void (APIENTRY *qglTexParameterf)(GLenum target, GLenum pname, GLfloat param) = 0;
  307. void (APIENTRY *qglTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) = 0;
  308. void (APIENTRY *qglTexParameteri)(GLenum target, GLenum pname, GLint param) = 0;
  309. void (APIENTRY *qglTexParameteriv)(GLenum target, GLenum pname, const GLint *params) = 0;
  310. void (APIENTRY *qglTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) = 0;
  311. void (APIENTRY *qglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) = 0;
  312. void (APIENTRY *qglTranslated)(GLdouble x, GLdouble y, GLdouble z) = 0;
  313. void (APIENTRY *qglTranslatef)(GLfloat x, GLfloat y, GLfloat z) = 0;
  314. void (APIENTRY *qglVertex2d)(GLdouble x, GLdouble y) = 0;
  315. void (APIENTRY *qglVertex2dv)(const GLdouble *v) = 0;
  316. void (APIENTRY *qglVertex2f)(GLfloat x, GLfloat y) = 0;
  317. void (APIENTRY *qglVertex2fv)(const GLfloat *v) = 0;
  318. void (APIENTRY *qglVertex2i)(GLint x, GLint y) = 0;
  319. void (APIENTRY *qglVertex2iv)(const GLint *v) = 0;
  320. void (APIENTRY *qglVertex2s)(GLshort x, GLshort y) = 0;
  321. void (APIENTRY *qglVertex2sv)(const GLshort *v) = 0;
  322. void (APIENTRY *qglVertex3d)(GLdouble x, GLdouble y, GLdouble z) = 0;
  323. void (APIENTRY *qglVertex3dv)(const GLdouble *v) = 0;
  324. void (APIENTRY *qglVertex3f)(GLfloat x, GLfloat y, GLfloat z) = 0;
  325. void (APIENTRY *qglVertex3fv)(const GLfloat *v) = 0;
  326. void (APIENTRY *qglVertex3i)(GLint x, GLint y, GLint z) = 0;
  327. void (APIENTRY *qglVertex3iv)(const GLint *v) = 0;
  328. void (APIENTRY *qglVertex3s)(GLshort x, GLshort y, GLshort z) = 0;
  329. void (APIENTRY *qglVertex3sv)(const GLshort *v) = 0;
  330. void (APIENTRY *qglVertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) = 0;
  331. void (APIENTRY *qglVertex4dv)(const GLdouble *v) = 0;
  332. void (APIENTRY *qglVertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) = 0;
  333. void (APIENTRY *qglVertex4fv)(const GLfloat *v) = 0;
  334. void (APIENTRY *qglVertex4i)(GLint x, GLint y, GLint z, GLint w) = 0;
  335. void (APIENTRY *qglVertex4iv)(const GLint *v) = 0;
  336. void (APIENTRY *qglVertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) = 0;
  337. void (APIENTRY *qglVertex4sv)(const GLshort *v) = 0;
  338. void (APIENTRY *qglVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) = 0;
  339. void (APIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height) = 0;

  340. PROC (WINAPI *qwglGetProcAddress)(LPCSTR) = 0;

  341. void (APIENTRY *qglActiveTexture)(GLenum texture) = 0;
  342. void (APIENTRY *qglSampleCoverage)(GLclampf value, GLboolean invert) = 0;
  343. void (APIENTRY *qglCompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) = 0;
  344. void (APIENTRY *qglCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) = 0;
  345. void (APIENTRY *qglCompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data) = 0;
  346. void (APIENTRY *qglCompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) = 0;
  347. void (APIENTRY *qglCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) = 0;
  348. void (APIENTRY *qglCompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data) = 0;
  349. void (APIENTRY *qglGetCompressedTexImage)(GLenum target, GLint level, GLvoid *img) = 0;

  350. GLboolean (APIENTRY *qglIsRenderbuffer)(GLuint renderbuffer) = 0;
  351. void (APIENTRY *qglBindRenderbuffer)(GLenum target, GLuint renderbuffer) = 0;
  352. void (APIENTRY *qglDeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers) = 0;
  353. void (APIENTRY *qglGenRenderbuffers)(GLsizei n, GLuint *renderbuffers) = 0;
  354. void (APIENTRY *qglRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = 0;
  355. void (APIENTRY *qglGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params) = 0;
  356. GLboolean (APIENTRY *qglIsFramebuffer)(GLuint framebuffer) = 0;
  357. void (APIENTRY *qglBindFramebuffer)(GLenum target, GLuint framebuffer) = 0;
  358. void (APIENTRY *qglDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers) = 0;
  359. void (APIENTRY *qglGenFramebuffers)(GLsizei n, GLuint *framebuffers) = 0;
  360. GLenum (APIENTRY *qglCheckFramebufferStatus)(GLenum target) = 0;
  361. void (APIENTRY *qglFramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) = 0;
  362. void (APIENTRY *qglFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) = 0;
  363. void (APIENTRY *qglFramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) = 0;
  364. void (APIENTRY *qglFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) = 0;
  365. void (APIENTRY *qglGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params) = 0;
  366. void (APIENTRY *qglGenerateMipmap)(GLenum target) = 0;
  367. void (APIENTRY *qglBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) = 0;
  368. void (APIENTRY *qglRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) = 0;
  369. void (APIENTRY *qglFramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) = 0;

  370. void QGL_InitExtension(void);

  371. void QGL_Init(void)
  372. {
  373.     HMODULE hOpenGL = GetModuleHandleA("opengl32.dll");

  374.     if (hOpenGL)
  375.     {
  376.         qglAccum = (void (APIENTRY *)(GLenum, GLfloat))GetProcAddress(hOpenGL, "glAccum");
  377.         qglAlphaFunc = (void (APIENTRY *)(GLenum, GLclampf))GetProcAddress(hOpenGL, "glAlphaFunc");
  378.         qglAreTexturesResident = (GLboolean (APIENTRY *)(GLsizei, const GLuint *, GLboolean *))GetProcAddress(hOpenGL, "glAreTexturesResident");
  379.         qglArrayElement = (void (APIENTRY *)(GLint))GetProcAddress(hOpenGL, "glArrayElement");
  380.         qglBegin = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glBegin");
  381.         qglBindTexture = (void (APIENTRY *)(GLenum, GLuint))GetProcAddress(hOpenGL, "glBindTexture");
  382.         qglBitmap = (void (APIENTRY *)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *))GetProcAddress(hOpenGL, "glBitmap");
  383.         qglBlendFunc = (void (APIENTRY *)(GLenum, GLenum))GetProcAddress(hOpenGL, "glBlendFunc");
  384.         qglCallList = (void (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glCallList");
  385.         qglCallLists = (void (APIENTRY *)(GLsizei, GLenum, const GLvoid *))GetProcAddress(hOpenGL, "glCallLists");
  386.         qglClear = (void (APIENTRY *)(GLbitfield))GetProcAddress(hOpenGL, "glClear");
  387.         qglClearAccum = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glClearAccum");
  388.         qglClearColor = (void (APIENTRY *)(GLclampf, GLclampf, GLclampf, GLclampf))GetProcAddress(hOpenGL, "glClearColor");
  389.         qglClearDepth = (void (APIENTRY *)(GLclampd))GetProcAddress(hOpenGL, "glClearDepth");
  390.         qglClearIndex = (void (APIENTRY *)(GLfloat))GetProcAddress(hOpenGL, "glClearIndex");
  391.         qglClearStencil = (void (APIENTRY *)(GLint))GetProcAddress(hOpenGL, "glClearStencil");
  392.         qglClipPlane = (void (APIENTRY *)(GLenum, const GLdouble *))GetProcAddress(hOpenGL, "glClipPlane");
  393.         qglColor3b = (void (APIENTRY *)(GLbyte, GLbyte, GLbyte))GetProcAddress(hOpenGL, "glColor3b");
  394.         qglColor3bv = (void (APIENTRY *)(const GLbyte *))GetProcAddress(hOpenGL, "glColor3bv");
  395.         qglColor3d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glColor3d");
  396.         qglColor3dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glColor3dv");
  397.         qglColor3f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glColor3f");
  398.         qglColor3fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glColor3fv");
  399.         qglColor3i = (void (APIENTRY *)(GLint, GLint, GLint))GetProcAddress(hOpenGL, "glColor3i");
  400.         qglColor3iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glColor3iv");
  401.         qglColor3s = (void (APIENTRY *)(GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glColor3s");
  402.         qglColor3sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glColor3sv");
  403.         qglColor3ub = (void (APIENTRY *)(GLubyte, GLubyte, GLubyte))GetProcAddress(hOpenGL, "glColor3ub");
  404.         qglColor3ubv = (void (APIENTRY *)(const GLubyte *))GetProcAddress(hOpenGL, "glColor3ubv");
  405.         qglColor3ui = (void (APIENTRY *)(GLuint, GLuint, GLuint))GetProcAddress(hOpenGL, "glColor3ui");
  406.         qglColor3uiv = (void (APIENTRY *)(const GLuint *))GetProcAddress(hOpenGL, "glColor3uiv");
  407.         qglColor3us = (void (APIENTRY *)(GLushort, GLushort, GLushort))GetProcAddress(hOpenGL, "glColor3us");
  408.         qglColor3usv = (void (APIENTRY *)(const GLushort *))GetProcAddress(hOpenGL, "glColor3usv");
  409.         qglColor4b = (void (APIENTRY *)(GLbyte, GLbyte, GLbyte, GLbyte))GetProcAddress(hOpenGL, "glColor4b");
  410.         qglColor4bv = (void (APIENTRY *)(const GLbyte *))GetProcAddress(hOpenGL, "glColor4bv");
  411.         qglColor4d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glColor4d");
  412.         qglColor4dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glColor4dv");
  413.         qglColor4f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glColor4f");
  414.         qglColor4fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glColor4fv");
  415.         qglColor4i = (void (APIENTRY *)(GLint, GLint, GLint, GLint))GetProcAddress(hOpenGL, "glColor4i");
  416.         qglColor4iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glColor4iv");
  417.         qglColor4s = (void (APIENTRY *)(GLshort, GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glColor4s");
  418.         qglColor4sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glColor4sv");
  419.         qglColor4ub = (void (APIENTRY *)(GLubyte, GLubyte, GLubyte, GLubyte))GetProcAddress(hOpenGL, "glColor4ub");
  420.         qglColor4ubv = (void (APIENTRY *)(const GLubyte *))GetProcAddress(hOpenGL, "glColor4ubv");
  421.         qglColor4ui = (void (APIENTRY *)(GLuint, GLuint, GLuint, GLuint))GetProcAddress(hOpenGL, "glColor4ui");
  422.         qglColor4uiv = (void (APIENTRY *)(const GLuint *))GetProcAddress(hOpenGL, "glColor4uiv");
  423.         qglColor4us = (void (APIENTRY *)(GLushort, GLushort, GLushort, GLushort))GetProcAddress(hOpenGL, "glColor4us");
  424.         qglColor4usv = (void (APIENTRY *)(const GLushort *))GetProcAddress(hOpenGL, "glColor4usv");
  425.         qglColorMask = (void (APIENTRY *)(GLboolean, GLboolean, GLboolean, GLboolean))GetProcAddress(hOpenGL, "glColorMask");
  426.         qglColorMaterial = (void (APIENTRY *)(GLenum, GLenum))GetProcAddress(hOpenGL, "glColorMaterial");
  427.         qglColorPointer = (void (APIENTRY *)(GLint, GLenum, GLsizei, const GLvoid *))GetProcAddress(hOpenGL, "glColorPointer");
  428.         qglCopyPixels = (void (APIENTRY *)(GLint, GLint, GLsizei, GLsizei, GLenum))GetProcAddress(hOpenGL, "glCopyPixels");
  429.         qglCopyTexImage1D = (void (APIENTRY *)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint))GetProcAddress(hOpenGL, "glCopyTexImage1D");
  430.         qglCopyTexImage2D = (void (APIENTRY *)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint))GetProcAddress(hOpenGL, "glCopyTexImage2D");
  431.         qglCopyTexSubImage1D = (void (APIENTRY *)(GLenum, GLint, GLint, GLint, GLint, GLsizei))GetProcAddress(hOpenGL, "glCopyTexSubImage1D");
  432.         qglCopyTexSubImage2D = (void (APIENTRY *)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei))GetProcAddress(hOpenGL, "glCopyTexSubImage2D");
  433.         qglCullFace = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glCullFace");
  434.         qglDeleteLists = (void (APIENTRY *)(GLuint, GLsizei))GetProcAddress(hOpenGL, "glDeleteLists");
  435.         qglDeleteTextures = (void (APIENTRY *)(GLsizei, const GLuint *))GetProcAddress(hOpenGL, "glDeleteTextures");
  436.         qglDepthFunc = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glDepthFunc");
  437.         qglDepthMask = (void (APIENTRY *)(GLboolean))GetProcAddress(hOpenGL, "glDepthMask");
  438.         qglDepthRange = (void (APIENTRY *)(GLclampd, GLclampd))GetProcAddress(hOpenGL, "glDepthRange");
  439.         qglDisable = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glDisable");
  440.         qglDisableClientState = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glDisableClientState");
  441.         qglDrawArrays = (void (APIENTRY *)(GLenum, GLint, GLsizei))GetProcAddress(hOpenGL, "glDrawArrays");
  442.         qglDrawBuffer = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glDrawBuffer");
  443.         qglDrawElements = (void (APIENTRY *)(GLenum, GLsizei, GLenum, const GLvoid *))GetProcAddress(hOpenGL, "glDrawElements");
  444.         qglDrawPixels = (void (APIENTRY *)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *))GetProcAddress(hOpenGL, "glDrawPixels");
  445.         qglEdgeFlag = (void (APIENTRY *)(GLboolean))GetProcAddress(hOpenGL, "glEdgeFlag");
  446.         qglEdgeFlagPointer = (void (APIENTRY *)(GLsizei, const GLvoid *))GetProcAddress(hOpenGL, "glEdgeFlagPointer");
  447.         qglEdgeFlagv = (void (APIENTRY *)(const GLboolean *))GetProcAddress(hOpenGL, "glEdgeFlagv");
  448.         qglEnable = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glEnable");
  449.         qglEnableClientState = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glEnableClientState");
  450.         qglEnd = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glEnd");
  451.         qglEndList = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glEndList");
  452.         qglEvalCoord1d = (void (APIENTRY *)(GLdouble))GetProcAddress(hOpenGL, "glEvalCoord1d");
  453.         qglEvalCoord1dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glEvalCoord1dv");
  454.         qglEvalCoord1f = (void (APIENTRY *)(GLfloat))GetProcAddress(hOpenGL, "glEvalCoord1f");
  455.         qglEvalCoord1fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glEvalCoord1fv");
  456.         qglEvalCoord2d = (void (APIENTRY *)(GLdouble, GLdouble))GetProcAddress(hOpenGL, "glEvalCoord2d");
  457.         qglEvalCoord2dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glEvalCoord2dv");
  458.         qglEvalCoord2f = (void (APIENTRY *)(GLfloat, GLfloat))GetProcAddress(hOpenGL, "glEvalCoord2f");
  459.         qglEvalCoord2fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glEvalCoord2fv");
  460.         qglEvalMesh1 = (void (APIENTRY *)(GLenum, GLint, GLint))GetProcAddress(hOpenGL, "glEvalMesh1");
  461.         qglEvalMesh2 = (void (APIENTRY *)(GLenum, GLint, GLint, GLint, GLint))GetProcAddress(hOpenGL, "glEvalMesh2");
  462.         qglEvalPoint1 = (void (APIENTRY *)(GLint))GetProcAddress(hOpenGL, "glEvalPoint1");
  463.         qglEvalPoint2 = (void (APIENTRY *)(GLint, GLint))GetProcAddress(hOpenGL, "glEvalPoint2");
  464.         qglFeedbackBuffer = (void (APIENTRY *)(GLsizei, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glFeedbackBuffer");
  465.         qglFinish = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glFinish");
  466.         qglFlush = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glFlush");
  467.         qglFogf = (void (APIENTRY *)(GLenum, GLfloat))GetProcAddress(hOpenGL, "glFogf");
  468.         qglFogfv = (void (APIENTRY *)(GLenum, const GLfloat *))GetProcAddress(hOpenGL, "glFogfv");
  469.         qglFogi = (void (APIENTRY *)(GLenum, GLint))GetProcAddress(hOpenGL, "glFogi");
  470.         qglFogiv = (void (APIENTRY *)(GLenum, const GLint *))GetProcAddress(hOpenGL, "glFogiv");
  471.         qglFrontFace = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glFrontFace");
  472.         qglFrustum = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glFrustum");
  473.         qglGenLists = (GLuint (APIENTRY *)(GLsizei))GetProcAddress(hOpenGL, "glGenLists");
  474.         qglGenTextures = (void (APIENTRY *)(GLsizei, GLuint *))GetProcAddress(hOpenGL, "glGenTextures");
  475.         qglGetBooleanv = (void (APIENTRY *)(GLenum, GLboolean *))GetProcAddress(hOpenGL, "glGetBooleanv");
  476.         qglGetClipPlane = (void (APIENTRY *)(GLenum, GLdouble *))GetProcAddress(hOpenGL, "glGetClipPlane");
  477.         qglGetDoublev = (void (APIENTRY *)(GLenum, GLdouble *))GetProcAddress(hOpenGL, "glGetDoublev");
  478.         qglGetError = (GLenum (APIENTRY *)(void))GetProcAddress(hOpenGL, "glGetError");
  479.         qglGetFloatv = (void (APIENTRY *)(GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetFloatv");
  480.         qglGetIntegerv = (void (APIENTRY *)(GLenum, GLint *))GetProcAddress(hOpenGL, "glGetIntegerv");
  481.         qglGetLightfv = (void (APIENTRY *)(GLenum, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetLightfv");
  482.         qglGetLightiv = (void (APIENTRY *)(GLenum, GLenum, GLint *))GetProcAddress(hOpenGL, "glGetLightiv");
  483.         qglGetMapdv = (void (APIENTRY *)(GLenum, GLenum, GLdouble *))GetProcAddress(hOpenGL, "glGetMapdv");
  484.         qglGetMapfv = (void (APIENTRY *)(GLenum, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetMapfv");
  485.         qglGetMapiv = (void (APIENTRY *)(GLenum, GLenum, GLint *))GetProcAddress(hOpenGL, "glGetMapiv");
  486.         qglGetMaterialfv = (void (APIENTRY *)(GLenum, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetMaterialfv");
  487.         qglGetMaterialiv = (void (APIENTRY *)(GLenum, GLenum, GLint *))GetProcAddress(hOpenGL, "glGetMaterialiv");
  488.         qglGetPixelMapfv = (void (APIENTRY *)(GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetPixelMapfv");
  489.         qglGetPixelMapuiv = (void (APIENTRY *)(GLenum, GLuint *))GetProcAddress(hOpenGL, "glGetPixelMapuiv");
  490.         qglGetPixelMapusv = (void (APIENTRY *)(GLenum, GLushort *))GetProcAddress(hOpenGL, "glGetPixelMapusv");
  491.         qglGetPointerv = (void (APIENTRY *)(GLenum, GLvoid* *))GetProcAddress(hOpenGL, "glGetPointerv");
  492.         qglGetPolygonStipple = (void (APIENTRY *)(GLubyte *))GetProcAddress(hOpenGL, "glGetPolygonStipple");
  493.         qglGetString = (const GLubyte * (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glGetString");
  494.         qglGetTexEnvfv = (void (APIENTRY *)(GLenum, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetTexEnvfv");
  495.         qglGetTexEnviv = (void (APIENTRY *)(GLenum, GLenum, GLint *))GetProcAddress(hOpenGL, "glGetTexEnviv");
  496.         qglGetTexGendv = (void (APIENTRY *)(GLenum, GLenum, GLdouble *))GetProcAddress(hOpenGL, "glGetTexGendv");
  497.         qglGetTexGenfv = (void (APIENTRY *)(GLenum, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetTexGenfv");
  498.         qglGetTexGeniv = (void (APIENTRY *)(GLenum, GLenum, GLint *))GetProcAddress(hOpenGL, "glGetTexGeniv");
  499.         qglGetTexImage = (void (APIENTRY *)(GLenum, GLint, GLenum, GLenum, GLvoid *))GetProcAddress(hOpenGL, "glGetTexImage");
  500.         qglGetTexLevelParameterfv = (void (APIENTRY *)(GLenum, GLint, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetTexLevelParameterfv");
  501.         qglGetTexLevelParameteriv = (void (APIENTRY *)(GLenum, GLint, GLenum, GLint *))GetProcAddress(hOpenGL, "glGetTexLevelParameteriv");
  502.         qglGetTexParameterfv = (void (APIENTRY *)(GLenum, GLenum, GLfloat *))GetProcAddress(hOpenGL, "glGetTexParameterfv");
  503.         qglGetTexParameteriv = (void (APIENTRY *)(GLenum, GLenum, GLint *))GetProcAddress(hOpenGL, "glGetTexParameteriv");
  504.         qglHint = (void (APIENTRY *)(GLenum, GLenum))GetProcAddress(hOpenGL, "glHint");
  505.         qglIndexMask = (void (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glIndexMask");
  506.         qglIndexPointer = (void (APIENTRY *)(GLenum, GLsizei, const GLvoid *))GetProcAddress(hOpenGL, "glIndexPointer");
  507.         qglIndexd = (void (APIENTRY *)(GLdouble))GetProcAddress(hOpenGL, "glIndexd");
  508.         qglIndexdv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glIndexdv");
  509.         qglIndexf = (void (APIENTRY *)(GLfloat))GetProcAddress(hOpenGL, "glIndexf");
  510.         qglIndexfv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glIndexfv");
  511.         qglIndexi = (void (APIENTRY *)(GLint))GetProcAddress(hOpenGL, "glIndexi");
  512.         qglIndexiv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glIndexiv");
  513.         qglIndexs = (void (APIENTRY *)(GLshort))GetProcAddress(hOpenGL, "glIndexs");
  514.         qglIndexsv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glIndexsv");
  515.         qglIndexub = (void (APIENTRY *)(GLubyte))GetProcAddress(hOpenGL, "glIndexub");
  516.         qglIndexubv = (void (APIENTRY *)(const GLubyte *))GetProcAddress(hOpenGL, "glIndexubv");
  517.         qglInitNames = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glInitNames");
  518.         qglInterleavedArrays = (void (APIENTRY *)(GLenum, GLsizei, const GLvoid *))GetProcAddress(hOpenGL, "glInterleavedArrays");
  519.         qglIsEnabled = (GLboolean (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glIsEnabled");
  520.         qglIsList = (GLboolean (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glIsList");
  521.         qglIsTexture = (GLboolean (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glIsTexture");
  522.         qglLightModelf = (void (APIENTRY *)(GLenum, GLfloat))GetProcAddress(hOpenGL, "glLightModelf");
  523.         qglLightModelfv = (void (APIENTRY *)(GLenum, const GLfloat *))GetProcAddress(hOpenGL, "glLightModelfv");
  524.         qglLightModeli = (void (APIENTRY *)(GLenum, GLint))GetProcAddress(hOpenGL, "glLightModeli");
  525.         qglLightModeliv = (void (APIENTRY *)(GLenum, const GLint *))GetProcAddress(hOpenGL, "glLightModeliv");
  526.         qglLightf = (void (APIENTRY *)(GLenum, GLenum, GLfloat))GetProcAddress(hOpenGL, "glLightf");
  527.         qglLightfv = (void (APIENTRY *)(GLenum, GLenum, const GLfloat *))GetProcAddress(hOpenGL, "glLightfv");
  528.         qglLighti = (void (APIENTRY *)(GLenum, GLenum, GLint))GetProcAddress(hOpenGL, "glLighti");
  529.         qglLightiv = (void (APIENTRY *)(GLenum, GLenum, const GLint *))GetProcAddress(hOpenGL, "glLightiv");
  530.         qglLineStipple = (void (APIENTRY *)(GLint, GLushort))GetProcAddress(hOpenGL, "glLineStipple");
  531.         qglLineWidth = (void (APIENTRY *)(GLfloat))GetProcAddress(hOpenGL, "glLineWidth");
  532.         qglListBase = (void (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glListBase");
  533.         qglLoadIdentity = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glLoadIdentity");
  534.         qglLoadMatrixd = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glLoadMatrixd");
  535.         qglLoadMatrixf = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glLoadMatrixf");
  536.         qglLoadName = (void (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glLoadName");
  537.         qglLogicOp = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glLogicOp");
  538.         qglMap1d = (void (APIENTRY *)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *))GetProcAddress(hOpenGL, "glMap1d");
  539.         qglMap1f = (void (APIENTRY *)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *))GetProcAddress(hOpenGL, "glMap1f");
  540.         qglMap2d = (void (APIENTRY *)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *))GetProcAddress(hOpenGL, "glMap2d");
  541.         qglMap2f = (void (APIENTRY *)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *))GetProcAddress(hOpenGL, "glMap2f");
  542.         qglMapGrid1d = (void (APIENTRY *)(GLint, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glMapGrid1d");
  543.         qglMapGrid1f = (void (APIENTRY *)(GLint, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glMapGrid1f");
  544.         qglMapGrid2d = (void (APIENTRY *)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glMapGrid2d");
  545.         qglMapGrid2f = (void (APIENTRY *)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glMapGrid2f");
  546.         qglMaterialf = (void (APIENTRY *)(GLenum, GLenum, GLfloat))GetProcAddress(hOpenGL, "glMaterialf");
  547.         qglMaterialfv = (void (APIENTRY *)(GLenum, GLenum, const GLfloat *))GetProcAddress(hOpenGL, "glMaterialfv");
  548.         qglMateriali = (void (APIENTRY *)(GLenum, GLenum, GLint))GetProcAddress(hOpenGL, "glMateriali");
  549.         qglMaterialiv = (void (APIENTRY *)(GLenum, GLenum, const GLint *))GetProcAddress(hOpenGL, "glMaterialiv");
  550.         qglMatrixMode = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glMatrixMode");
  551.         qglMultMatrixd = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glMultMatrixd");
  552.         qglMultMatrixf = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glMultMatrixf");
  553.         qglNewList = (void (APIENTRY *)(GLuint, GLenum))GetProcAddress(hOpenGL, "glNewList");
  554.         qglNormal3b = (void (APIENTRY *)(GLbyte, GLbyte, GLbyte))GetProcAddress(hOpenGL, "glNormal3b");
  555.         qglNormal3bv = (void (APIENTRY *)(const GLbyte *))GetProcAddress(hOpenGL, "glNormal3bv");
  556.         qglNormal3d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glNormal3d");
  557.         qglNormal3dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glNormal3dv");
  558.         qglNormal3f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glNormal3f");
  559.         qglNormal3fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glNormal3fv");
  560.         qglNormal3i = (void (APIENTRY *)(GLint, GLint, GLint))GetProcAddress(hOpenGL, "glNormal3i");
  561.         qglNormal3iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glNormal3iv");
  562.         qglNormal3s = (void (APIENTRY *)(GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glNormal3s");
  563.         qglNormal3sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glNormal3sv");
  564.         qglNormalPointer = (void (APIENTRY *)(GLenum, GLsizei, const GLvoid *))GetProcAddress(hOpenGL, "glNormalPointer");
  565.         qglOrtho = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glOrtho");
  566.         qglPassThrough = (void (APIENTRY *)(GLfloat))GetProcAddress(hOpenGL, "glPassThrough");
  567.         qglPixelMapfv = (void (APIENTRY *)(GLenum, GLsizei, const GLfloat *))GetProcAddress(hOpenGL, "glPixelMapfv");
  568.         qglPixelMapuiv = (void (APIENTRY *)(GLenum, GLsizei, const GLuint *))GetProcAddress(hOpenGL, "glPixelMapuiv");
  569.         qglPixelMapusv = (void (APIENTRY *)(GLenum, GLsizei, const GLushort *))GetProcAddress(hOpenGL, "glPixelMapusv");
  570.         qglPixelStoref = (void (APIENTRY *)(GLenum, GLfloat))GetProcAddress(hOpenGL, "glPixelStoref");
  571.         qglPixelStorei = (void (APIENTRY *)(GLenum, GLint))GetProcAddress(hOpenGL, "glPixelStorei");
  572.         qglPixelTransferf = (void (APIENTRY *)(GLenum, GLfloat))GetProcAddress(hOpenGL, "glPixelTransferf");
  573.         qglPixelTransferi = (void (APIENTRY *)(GLenum, GLint))GetProcAddress(hOpenGL, "glPixelTransferi");
  574.         qglPixelZoom = (void (APIENTRY *)(GLfloat, GLfloat))GetProcAddress(hOpenGL, "glPixelZoom");
  575.         qglPointSize = (void (APIENTRY *)(GLfloat))GetProcAddress(hOpenGL, "glPointSize");
  576.         qglPolygonMode = (void (APIENTRY *)(GLenum, GLenum))GetProcAddress(hOpenGL, "glPolygonMode");
  577.         qglPolygonOffset = (void (APIENTRY *)(GLfloat, GLfloat))GetProcAddress(hOpenGL, "glPolygonOffset");
  578.         qglPolygonStipple = (void (APIENTRY *)(const GLubyte *))GetProcAddress(hOpenGL, "glPolygonStipple");
  579.         qglPopAttrib = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glPopAttrib");
  580.         qglPopClientAttrib = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glPopClientAttrib");
  581.         qglPopMatrix = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glPopMatrix");
  582.         qglPopName = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glPopName");
  583.         qglPrioritizeTextures = (void (APIENTRY *)(GLsizei, const GLuint *, const GLclampf *))GetProcAddress(hOpenGL, "glPrioritizeTextures");
  584.         qglPushAttrib = (void (APIENTRY *)(GLbitfield))GetProcAddress(hOpenGL, "glPushAttrib");
  585.         qglPushClientAttrib = (void (APIENTRY *)(GLbitfield))GetProcAddress(hOpenGL, "glPushClientAttrib");
  586.         qglPushMatrix = (void (APIENTRY *)(void))GetProcAddress(hOpenGL, "glPushMatrix");
  587.         qglPushName = (void (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glPushName");
  588.         qglRasterPos2d = (void (APIENTRY *)(GLdouble, GLdouble))GetProcAddress(hOpenGL, "glRasterPos2d");
  589.         qglRasterPos2dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glRasterPos2dv");
  590.         qglRasterPos2f = (void (APIENTRY *)(GLfloat, GLfloat))GetProcAddress(hOpenGL, "glRasterPos2f");
  591.         qglRasterPos2fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glRasterPos2fv");
  592.         qglRasterPos2i = (void (APIENTRY *)(GLint, GLint))GetProcAddress(hOpenGL, "glRasterPos2i");
  593.         qglRasterPos2iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glRasterPos2iv");
  594.         qglRasterPos2s = (void (APIENTRY *)(GLshort, GLshort))GetProcAddress(hOpenGL, "glRasterPos2s");
  595.         qglRasterPos2sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glRasterPos2sv");
  596.         qglRasterPos3d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glRasterPos3d");
  597.         qglRasterPos3dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glRasterPos3dv");
  598.         qglRasterPos3f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glRasterPos3f");
  599.         qglRasterPos3fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glRasterPos3fv");
  600.         qglRasterPos3i = (void (APIENTRY *)(GLint, GLint, GLint))GetProcAddress(hOpenGL, "glRasterPos3i");
  601.         qglRasterPos3iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glRasterPos3iv");
  602.         qglRasterPos3s = (void (APIENTRY *)(GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glRasterPos3s");
  603.         qglRasterPos3sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glRasterPos3sv");
  604.         qglRasterPos4d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glRasterPos4d");
  605.         qglRasterPos4dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glRasterPos4dv");
  606.         qglRasterPos4f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glRasterPos4f");
  607.         qglRasterPos4fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glRasterPos4fv");
  608.         qglRasterPos4i = (void (APIENTRY *)(GLint, GLint, GLint, GLint))GetProcAddress(hOpenGL, "glRasterPos4i");
  609.         qglRasterPos4iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glRasterPos4iv");
  610.         qglRasterPos4s = (void (APIENTRY *)(GLshort, GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glRasterPos4s");
  611.         qglRasterPos4sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glRasterPos4sv");
  612.         qglReadBuffer = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glReadBuffer");
  613.         qglReadPixels = (void (APIENTRY *)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *))GetProcAddress(hOpenGL, "glReadPixels");
  614.         qglRectd = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glRectd");
  615.         qglRectdv = (void (APIENTRY *)(const GLdouble *, const GLdouble *))GetProcAddress(hOpenGL, "glRectdv");
  616.         qglRectf = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glRectf");
  617.         qglRectfv = (void (APIENTRY *)(const GLfloat *, const GLfloat *))GetProcAddress(hOpenGL, "glRectfv");
  618.         qglRecti = (void (APIENTRY *)(GLint, GLint, GLint, GLint))GetProcAddress(hOpenGL, "glRecti");
  619.         qglRectiv = (void (APIENTRY *)(const GLint *, const GLint *))GetProcAddress(hOpenGL, "glRectiv");
  620.         qglRects = (void (APIENTRY *)(GLshort, GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glRects");
  621.         qglRectsv = (void (APIENTRY *)(const GLshort *, const GLshort *))GetProcAddress(hOpenGL, "glRectsv");
  622.         qglRenderMode = (GLint (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glRenderMode");
  623.         qglRotated = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glRotated");
  624.         qglRotatef = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glRotatef");
  625.         qglScaled = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glScaled");
  626.         qglScalef = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glScalef");
  627.         qglScissor = (void (APIENTRY *)(GLint, GLint, GLsizei, GLsizei))GetProcAddress(hOpenGL, "glScissor");
  628.         qglSelectBuffer = (void (APIENTRY *)(GLsizei, GLuint *))GetProcAddress(hOpenGL, "glSelectBuffer");
  629.         qglShadeModel = (void (APIENTRY *)(GLenum))GetProcAddress(hOpenGL, "glShadeModel");
  630.         qglStencilFunc = (void (APIENTRY *)(GLenum, GLint, GLuint))GetProcAddress(hOpenGL, "glStencilFunc");
  631.         qglStencilMask = (void (APIENTRY *)(GLuint))GetProcAddress(hOpenGL, "glStencilMask");
  632.         qglStencilOp = (void (APIENTRY *)(GLenum, GLenum, GLenum))GetProcAddress(hOpenGL, "glStencilOp");
  633.         qglTexCoord1d = (void (APIENTRY *)(GLdouble))GetProcAddress(hOpenGL, "glTexCoord1d");
  634.         qglTexCoord1dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glTexCoord1dv");
  635.         qglTexCoord1f = (void (APIENTRY *)(GLfloat))GetProcAddress(hOpenGL, "glTexCoord1f");
  636.         qglTexCoord1fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glTexCoord1fv");
  637.         qglTexCoord1i = (void (APIENTRY *)(GLint))GetProcAddress(hOpenGL, "glTexCoord1i");
  638.         qglTexCoord1iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glTexCoord1iv");
  639.         qglTexCoord1s = (void (APIENTRY *)(GLshort))GetProcAddress(hOpenGL, "glTexCoord1s");
  640.         qglTexCoord1sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glTexCoord1sv");
  641.         qglTexCoord2d = (void (APIENTRY *)(GLdouble, GLdouble))GetProcAddress(hOpenGL, "glTexCoord2d");
  642.         qglTexCoord2dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glTexCoord2dv");
  643.         qglTexCoord2f = (void (APIENTRY *)(GLfloat, GLfloat))GetProcAddress(hOpenGL, "glTexCoord2f");
  644.         qglTexCoord2fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glTexCoord2fv");
  645.         qglTexCoord2i = (void (APIENTRY *)(GLint, GLint))GetProcAddress(hOpenGL, "glTexCoord2i");
  646.         qglTexCoord2iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glTexCoord2iv");
  647.         qglTexCoord2s = (void (APIENTRY *)(GLshort, GLshort))GetProcAddress(hOpenGL, "glTexCoord2s");
  648.         qglTexCoord2sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glTexCoord2sv");
  649.         qglTexCoord3d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glTexCoord3d");
  650.         qglTexCoord3dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glTexCoord3dv");
  651.         qglTexCoord3f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glTexCoord3f");
  652.         qglTexCoord3fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glTexCoord3fv");
  653.         qglTexCoord3i = (void (APIENTRY *)(GLint, GLint, GLint))GetProcAddress(hOpenGL, "glTexCoord3i");
  654.         qglTexCoord3iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glTexCoord3iv");
  655.         qglTexCoord3s = (void (APIENTRY *)(GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glTexCoord3s");
  656.         qglTexCoord3sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glTexCoord3sv");
  657.         qglTexCoord4d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glTexCoord4d");
  658.         qglTexCoord4dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glTexCoord4dv");
  659.         qglTexCoord4f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glTexCoord4f");
  660.         qglTexCoord4fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glTexCoord4fv");
  661.         qglTexCoord4i = (void (APIENTRY *)(GLint, GLint, GLint, GLint))GetProcAddress(hOpenGL, "glTexCoord4i");
  662.         qglTexCoord4iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glTexCoord4iv");
  663.         qglTexCoord4s = (void (APIENTRY *)(GLshort, GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glTexCoord4s");
  664.         qglTexCoord4sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glTexCoord4sv");
  665.         qglTexCoordPointer = (void (APIENTRY *)(GLint, GLenum, GLsizei, const GLvoid *))GetProcAddress(hOpenGL, "glTexCoordPointer");
  666.         qglTexEnvf = (void (APIENTRY *)(GLenum, GLenum, GLfloat))GetProcAddress(hOpenGL, "glTexEnvf");
  667.         qglTexEnvfv = (void (APIENTRY *)(GLenum, GLenum, const GLfloat *))GetProcAddress(hOpenGL, "glTexEnvfv");
  668.         qglTexEnvi = (void (APIENTRY *)(GLenum, GLenum, GLint))GetProcAddress(hOpenGL, "glTexEnvi");
  669.         qglTexEnviv = (void (APIENTRY *)(GLenum, GLenum, const GLint *))GetProcAddress(hOpenGL, "glTexEnviv");
  670.         qglTexGend = (void (APIENTRY *)(GLenum, GLenum, GLdouble))GetProcAddress(hOpenGL, "glTexGend");
  671.         qglTexGendv = (void (APIENTRY *)(GLenum, GLenum, const GLdouble *))GetProcAddress(hOpenGL, "glTexGendv");
  672.         qglTexGenf = (void (APIENTRY *)(GLenum, GLenum, GLfloat))GetProcAddress(hOpenGL, "glTexGenf");
  673.         qglTexGenfv = (void (APIENTRY *)(GLenum, GLenum, const GLfloat *))GetProcAddress(hOpenGL, "glTexGenfv");
  674.         qglTexGeni = (void (APIENTRY *)(GLenum, GLenum, GLint))GetProcAddress(hOpenGL, "glTexGeni");
  675.         qglTexGeniv = (void (APIENTRY *)(GLenum, GLenum, const GLint *))GetProcAddress(hOpenGL, "glTexGeniv");
  676.         qglTexImage1D = (void (APIENTRY *)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *))GetProcAddress(hOpenGL, "glTexImage1D");
  677.         qglTexImage2D = (void (APIENTRY *)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *))GetProcAddress(hOpenGL, "glTexImage2D");
  678.         qglTexParameterf = (void (APIENTRY *)(GLenum, GLenum, GLfloat))GetProcAddress(hOpenGL, "glTexParameterf");
  679.         qglTexParameterfv = (void (APIENTRY *)(GLenum, GLenum, const GLfloat *))GetProcAddress(hOpenGL, "glTexParameterfv");
  680.         qglTexParameteri = (void (APIENTRY *)(GLenum, GLenum, GLint))GetProcAddress(hOpenGL, "glTexParameteri");
  681.         qglTexParameteriv = (void (APIENTRY *)(GLenum, GLenum, const GLint *))GetProcAddress(hOpenGL, "glTexParameteriv");
  682.         qglTexSubImage1D = (void (APIENTRY *)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *))GetProcAddress(hOpenGL, "glTexSubImage1D");
  683.         qglTexSubImage2D = (void (APIENTRY *)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *))GetProcAddress(hOpenGL, "glTexSubImage2D");
  684.         qglTranslated = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glTranslated");
  685.         qglTranslatef = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glTranslatef");
  686.         qglVertex2d = (void (APIENTRY *)(GLdouble, GLdouble))GetProcAddress(hOpenGL, "glVertex2d");
  687.         qglVertex2dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glVertex2dv");
  688.         qglVertex2f = (void (APIENTRY *)(GLfloat, GLfloat))GetProcAddress(hOpenGL, "glVertex2f");
  689.         qglVertex2fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glVertex2fv");
  690.         qglVertex2i = (void (APIENTRY *)(GLint, GLint))GetProcAddress(hOpenGL, "glVertex2i");
  691.         qglVertex2iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glVertex2iv");
  692.         qglVertex2s = (void (APIENTRY *)(GLshort, GLshort))GetProcAddress(hOpenGL, "glVertex2s");
  693.         qglVertex2sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glVertex2sv");
  694.         qglVertex3d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glVertex3d");
  695.         qglVertex3dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glVertex3dv");
  696.         qglVertex3f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glVertex3f");
  697.         qglVertex3fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glVertex3fv");
  698.         qglVertex3i = (void (APIENTRY *)(GLint, GLint, GLint))GetProcAddress(hOpenGL, "glVertex3i");
  699.         qglVertex3iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glVertex3iv");
  700.         qglVertex3s = (void (APIENTRY *)(GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glVertex3s");
  701.         qglVertex3sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glVertex3sv");
  702.         qglVertex4d = (void (APIENTRY *)(GLdouble, GLdouble, GLdouble, GLdouble))GetProcAddress(hOpenGL, "glVertex4d");
  703.         qglVertex4dv = (void (APIENTRY *)(const GLdouble *))GetProcAddress(hOpenGL, "glVertex4dv");
  704.         qglVertex4f = (void (APIENTRY *)(GLfloat, GLfloat, GLfloat, GLfloat))GetProcAddress(hOpenGL, "glVertex4f");
  705.         qglVertex4fv = (void (APIENTRY *)(const GLfloat *))GetProcAddress(hOpenGL, "glVertex4fv");
  706.         qglVertex4i = (void (APIENTRY *)(GLint, GLint, GLint, GLint))GetProcAddress(hOpenGL, "glVertex4i");
  707.         qglVertex4iv = (void (APIENTRY *)(const GLint *))GetProcAddress(hOpenGL, "glVertex4iv");
  708.         qglVertex4s = (void (APIENTRY *)(GLshort, GLshort, GLshort, GLshort))GetProcAddress(hOpenGL, "glVertex4s");
  709.         qglVertex4sv = (void (APIENTRY *)(const GLshort *))GetProcAddress(hOpenGL, "glVertex4sv");
  710.         qglVertexPointer = (void (APIENTRY *)(GLint, GLenum, GLsizei, const GLvoid *))GetProcAddress(hOpenGL, "glVertexPointer");
  711.         qglViewport = (void (APIENTRY *)(GLint, GLint, GLsizei, GLsizei))GetProcAddress(hOpenGL, "glViewport");

  712.         qwglGetProcAddress = (PROC (WINAPI *)(LPCSTR))GetProcAddress(hOpenGL, "wglGetProcAddress");

  713.         QGL_InitExtension();
  714.     }
  715. }

  716. void QGL_InitExtension(void)
  717. {
  718.     const char *version = (const char *)qglGetString(GL_VERSION);
  719.     const char *extensions = (const char *)qglGetString(GL_EXTENSIONS);

  720.     if (version[0] > '1' && version[2] > '3')
  721.     {
  722.         qglActiveTexture = (void (APIENTRY *)(GLenum))qwglGetProcAddress("glActiveTexture");
  723.         qglSampleCoverage = (void (APIENTRY *)(GLclampf, GLboolean))qwglGetProcAddress("glSampleCoverage");
  724.         qglCompressedTexImage3D = (void (APIENTRY *)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *))qwglGetProcAddress("glCompressedTexImage3D");
  725.         qglCompressedTexImage2D = (void (APIENTRY *)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *))qwglGetProcAddress("glCompressedTexImage2D");
  726.         qglCompressedTexImage1D = (void (APIENTRY *)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *))qwglGetProcAddress("glCompressedTexImage1D");
  727.         qglCompressedTexSubImage3D = (void (APIENTRY *)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *))qwglGetProcAddress("glCompressedTexSubImage3D");
  728.         qglCompressedTexSubImage2D = (void (APIENTRY *)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *))qwglGetProcAddress("glCompressedTexSubImage2D");
  729.         qglCompressedTexSubImage1D = (void (APIENTRY *)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *))qwglGetProcAddress("glCompressedTexSubImage1D");
  730.         qglGetCompressedTexImage = (void (APIENTRY *)(GLenum, GLint, GLvoid *))qwglGetProcAddress("glGetCompressedTexImage");
  731.     }

  732.     if (strstr(extensions, "GL_ARB_framebuffer_object"))
  733.     {
  734.         qglIsRenderbuffer = (GLboolean (APIENTRY *)(GLuint))qwglGetProcAddress("glIsRenderbuffer");
  735.         qglBindRenderbuffer = (void (APIENTRY *)(GLenum, GLuint))qwglGetProcAddress("glBindRenderbuffer");
  736.         qglDeleteRenderbuffers = (void (APIENTRY *)(GLsizei, const GLuint *))qwglGetProcAddress("glDeleteRenderbuffers");
  737.         qglGenRenderbuffers = (void (APIENTRY *)(GLsizei, GLuint *))qwglGetProcAddress("glGenRenderbuffers");
  738.         qglRenderbufferStorage = (void (APIENTRY *)(GLenum, GLenum, GLsizei, GLsizei))qwglGetProcAddress("glRenderbufferStorage");
  739.         qglGetRenderbufferParameteriv = (void (APIENTRY *)(GLenum, GLenum, GLint *))qwglGetProcAddress("glGetRenderbufferParameteriv");
  740.         qglIsFramebuffer = (GLboolean (APIENTRY *)(GLuint))qwglGetProcAddress("glIsFramebuffer");
  741.         qglBindFramebuffer = (void (APIENTRY *)(GLenum, GLuint))qwglGetProcAddress("glBindFramebuffer");
  742.         qglDeleteFramebuffers = (void (APIENTRY *)(GLsizei, const GLuint *))qwglGetProcAddress("glDeleteFramebuffers");
  743.         qglGenFramebuffers = (void (APIENTRY *)(GLsizei, GLuint *))qwglGetProcAddress("glGenFramebuffers");
  744.         qglCheckFramebufferStatus = (GLenum (APIENTRY *)(GLenum))qwglGetProcAddress("glCheckFramebufferStatus");
  745.         qglFramebufferTexture1D = (void (APIENTRY *)(GLenum, GLenum, GLenum, GLuint, GLint))qwglGetProcAddress("glFramebufferTexture1D");
  746.         qglFramebufferTexture2D = (void (APIENTRY *)(GLenum, GLenum, GLenum, GLuint, GLint))qwglGetProcAddress("glFramebufferTexture2D");
  747.         qglFramebufferTexture3D = (void (APIENTRY *)(GLenum, GLenum, GLenum, GLuint, GLint, GLint))qwglGetProcAddress("glFramebufferTexture3D");
  748.         qglFramebufferRenderbuffer = (void (APIENTRY *)(GLenum, GLenum, GLenum, GLuint))qwglGetProcAddress("glFramebufferRenderbuffer");
  749.         qglGetFramebufferAttachmentParameteriv = (void (APIENTRY *)(GLenum, GLenum, GLenum, GLint *))qwglGetProcAddress("glGetFramebufferAttachmentParameteriv");
  750.         qglGenerateMipmap = (void (APIENTRY *)(GLenum))qwglGetProcAddress("glGenerateMipmap");
  751.         qglBlitFramebuffer = (void (APIENTRY *)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum))qwglGetProcAddress("glBlitFramebuffer");
  752.         qglRenderbufferStorageMultisample = (void (APIENTRY *)(GLenum, GLsizei, GLenum, GLsizei, GLsizei))qwglGetProcAddress("glRenderbufferStorageMultisample");
  753.         qglFramebufferTextureLayer = (void (APIENTRY *)(GLenum, GLenum, GLuint, GLint, GLint))qwglGetProcAddress("glFramebufferTextureLayer");
  754.     }
  755. }
复制代码
回复

使用道具 举报

206

主题

211

帖子

889

积分

ESFKAMI

Rank: 8Rank: 8

积分
889
 楼主| 发表于 2017-9-18 17:14:46 | 显示全部楼层
This is the better one by hzqst:

qgl.h:

  1. #include <winsani_in.h>
  2. #include <windows.h>
  3. #include <winsani_out.h>
  4. #include <gl/gl.h>
  5. #include <gl/glext.h>

  6. #ifdef __cplusplus
  7. extern "C"
  8. {
  9. #endif
  10. extern void (APIENTRY *qglAccum)(GLenum op, GLfloat value);
  11. extern void (APIENTRY *qglAlphaFunc)(GLenum func, GLclampf ref);
  12. extern GLboolean (APIENTRY *qglAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences);
  13. extern void (APIENTRY *qglArrayElement)(GLint i);
  14. extern void (APIENTRY *qglBegin)(GLenum mode);
  15. extern void (APIENTRY *qglBindTexture)(GLenum target, GLuint texture);
  16. extern void (APIENTRY *qglBitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
  17. extern void (APIENTRY *qglBlendFunc)(GLenum sfactor, GLenum dfactor);
  18. extern void (APIENTRY *qglCallList)(GLuint list);
  19. extern void (APIENTRY *qglCallLists)(GLsizei n, GLenum type, const GLvoid *lists);
  20. extern void (APIENTRY *qglClear)(GLbitfield mask);
  21. extern void (APIENTRY *qglClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  22. extern void (APIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  23. extern void (APIENTRY *qglClearDepth)(GLclampd depth);
  24. extern void (APIENTRY *qglClearIndex)(GLfloat c);
  25. extern void (APIENTRY *qglClearStencil)(GLint s);
  26. extern void (APIENTRY *qglClipPlane)(GLenum plane, const GLdouble *equation);
  27. extern void (APIENTRY *qglColor3b)(GLbyte red, GLbyte green, GLbyte blue);
  28. extern void (APIENTRY *qglColor3bv)(const GLbyte *v);
  29. extern void (APIENTRY *qglColor3d)(GLdouble red, GLdouble green, GLdouble blue);
  30. extern void (APIENTRY *qglColor3dv)(const GLdouble *v);
  31. extern void (APIENTRY *qglColor3f)(GLfloat red, GLfloat green, GLfloat blue);
  32. extern void (APIENTRY *qglColor3fv)(const GLfloat *v);
  33. extern void (APIENTRY *qglColor3i)(GLint red, GLint green, GLint blue);
  34. extern void (APIENTRY *qglColor3iv)(const GLint *v);
  35. extern void (APIENTRY *qglColor3s)(GLshort red, GLshort green, GLshort blue);
  36. extern void (APIENTRY *qglColor3sv)(const GLshort *v);
  37. extern void (APIENTRY *qglColor3ub)(GLubyte red, GLubyte green, GLubyte blue);
  38. extern void (APIENTRY *qglColor3ubv)(const GLubyte *v);
  39. extern void (APIENTRY *qglColor3ui)(GLuint red, GLuint green, GLuint blue);
  40. extern void (APIENTRY *qglColor3uiv)(const GLuint *v);
  41. extern void (APIENTRY *qglColor3us)(GLushort red, GLushort green, GLushort blue);
  42. extern void (APIENTRY *qglColor3usv)(const GLushort *v);
  43. extern void (APIENTRY *qglColor4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
  44. extern void (APIENTRY *qglColor4bv)(const GLbyte *v);
  45. extern void (APIENTRY *qglColor4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
  46. extern void (APIENTRY *qglColor4dv)(const GLdouble *v);
  47. extern void (APIENTRY *qglColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  48. extern void (APIENTRY *qglColor4fv)(const GLfloat *v);
  49. extern void (APIENTRY *qglColor4i)(GLint red, GLint green, GLint blue, GLint alpha);
  50. extern void (APIENTRY *qglColor4iv)(const GLint *v);
  51. extern void (APIENTRY *qglColor4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
  52. extern void (APIENTRY *qglColor4sv)(const GLshort *v);
  53. extern void (APIENTRY *qglColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
  54. extern void (APIENTRY *qglColor4ubv)(const GLubyte *v);
  55. extern void (APIENTRY *qglColor4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
  56. extern void (APIENTRY *qglColor4uiv)(const GLuint *v);
  57. extern void (APIENTRY *qglColor4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
  58. extern void (APIENTRY *qglColor4usv)(const GLushort *v);
  59. extern void (APIENTRY *qglColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  60. extern void (APIENTRY *qglColorMaterial)(GLenum face, GLenum mode);
  61. extern void (APIENTRY *qglColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  62. extern void (APIENTRY *qglCopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
  63. extern void (APIENTRY *qglCopyTexImage1D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
  64. extern void (APIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  65. extern void (APIENTRY *qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
  66. extern void (APIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  67. extern void (APIENTRY *qglCullFace)(GLenum mode);
  68. extern void (APIENTRY *qglDeleteLists)(GLuint list, GLsizei range);
  69. extern void (APIENTRY *qglDeleteTextures)(GLsizei n, const GLuint *textures);
  70. extern void (APIENTRY *qglDepthFunc)(GLenum func);
  71. extern void (APIENTRY *qglDepthMask)(GLboolean flag);
  72. extern void (APIENTRY *qglDepthRange)(GLclampd zNear, GLclampd zFar);
  73. extern void (APIENTRY *qglDisable)(GLenum cap);
  74. extern void (APIENTRY *qglDisableClientState)(GLenum array);
  75. extern void (APIENTRY *qglDrawArrays)(GLenum mode, GLint first, GLsizei count);
  76. extern void (APIENTRY *qglDrawBuffer)(GLenum mode);
  77. extern void (APIENTRY *qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  78. extern void (APIENTRY *qglDrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  79. extern void (APIENTRY *qglEdgeFlag)(GLboolean flag);
  80. extern void (APIENTRY *qglEdgeFlagPointer)(GLsizei stride, const GLvoid *pointer);
  81. extern void (APIENTRY *qglEdgeFlagv)(const GLboolean *flag);
  82. extern void (APIENTRY *qglEnable)(GLenum cap);
  83. extern void (APIENTRY *qglEnableClientState)(GLenum array);
  84. extern void (APIENTRY *qglEnd)(void);
  85. extern void (APIENTRY *qglEndList)(void);
  86. extern void (APIENTRY *qglEvalCoord1d)(GLdouble u);
  87. extern void (APIENTRY *qglEvalCoord1dv)(const GLdouble *u);
  88. extern void (APIENTRY *qglEvalCoord1f)(GLfloat u);
  89. extern void (APIENTRY *qglEvalCoord1fv)(const GLfloat *u);
  90. extern void (APIENTRY *qglEvalCoord2d)(GLdouble u, GLdouble v);
  91. extern void (APIENTRY *qglEvalCoord2dv)(const GLdouble *u);
  92. extern void (APIENTRY *qglEvalCoord2f)(GLfloat u, GLfloat v);
  93. extern void (APIENTRY *qglEvalCoord2fv)(const GLfloat *u);
  94. extern void (APIENTRY *qglEvalMesh1)(GLenum mode, GLint i1, GLint i2);
  95. extern void (APIENTRY *qglEvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
  96. extern void (APIENTRY *qglEvalPoint1)(GLint i);
  97. extern void (APIENTRY *qglEvalPoint2)(GLint i, GLint j);
  98. extern void (APIENTRY *qglFeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer);
  99. extern void (APIENTRY *qglFinish)(void);
  100. extern void (APIENTRY *qglFlush)(void);
  101. extern void (APIENTRY *qglFogf)(GLenum pname, GLfloat param);
  102. extern void (APIENTRY *qglFogfv)(GLenum pname, const GLfloat *params);
  103. extern void (APIENTRY *qglFogi)(GLenum pname, GLint param);
  104. extern void (APIENTRY *qglFogiv)(GLenum pname, const GLint *params);
  105. extern void (APIENTRY *qglFrontFace)(GLenum mode);
  106. extern void (APIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  107. extern GLuint (APIENTRY *qglGenLists)(GLsizei range);
  108. extern void (APIENTRY *qglGenTextures)(GLsizei n, GLuint *textures);
  109. extern void (APIENTRY *qglGetBooleanv)(GLenum pname, GLboolean *params);
  110. extern void (APIENTRY *qglGetClipPlane)(GLenum plane, GLdouble *equation);
  111. extern void (APIENTRY *qglGetDoublev)(GLenum pname, GLdouble *params);
  112. extern GLenum (APIENTRY *qglGetError)(void);
  113. extern void (APIENTRY *qglGetFloatv)(GLenum pname, GLfloat *params);
  114. extern void (APIENTRY *qglGetIntegerv)(GLenum pname, GLint *params);
  115. extern void (APIENTRY *qglGetLightfv)(GLenum light, GLenum pname, GLfloat *params);
  116. extern void (APIENTRY *qglGetLightiv)(GLenum light, GLenum pname, GLint *params);
  117. extern void (APIENTRY *qglGetMapdv)(GLenum target, GLenum query, GLdouble *v);
  118. extern void (APIENTRY *qglGetMapfv)(GLenum target, GLenum query, GLfloat *v);
  119. extern void (APIENTRY *qglGetMapiv)(GLenum target, GLenum query, GLint *v);
  120. extern void (APIENTRY *qglGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params);
  121. extern void (APIENTRY *qglGetMaterialiv)(GLenum face, GLenum pname, GLint *params);
  122. extern void (APIENTRY *qglGetPixelMapfv)(GLenum map, GLfloat *values);
  123. extern void (APIENTRY *qglGetPixelMapuiv)(GLenum map, GLuint *values);
  124. extern void (APIENTRY *qglGetPixelMapusv)(GLenum map, GLushort *values);
  125. extern void (APIENTRY *qglGetPointerv)(GLenum pname, GLvoid* *params);
  126. extern void (APIENTRY *qglGetPolygonStipple)(GLubyte *mask);
  127. extern const GLubyte * (APIENTRY *qglGetString)(GLenum name);
  128. extern void (APIENTRY *qglGetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params);
  129. extern void (APIENTRY *qglGetTexEnviv)(GLenum target, GLenum pname, GLint *params);
  130. extern void (APIENTRY *qglGetTexGendv)(GLenum coord, GLenum pname, GLdouble *params);
  131. extern void (APIENTRY *qglGetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params);
  132. extern void (APIENTRY *qglGetTexGeniv)(GLenum coord, GLenum pname, GLint *params);
  133. extern void (APIENTRY *qglGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
  134. extern void (APIENTRY *qglGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params);
  135. extern void (APIENTRY *qglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
  136. extern void (APIENTRY *qglGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
  137. extern void (APIENTRY *qglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
  138. extern void (APIENTRY *qglHint)(GLenum target, GLenum mode);
  139. extern void (APIENTRY *qglIndexMask)(GLuint mask);
  140. extern void (APIENTRY *qglIndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
  141. extern void (APIENTRY *qglIndexd)(GLdouble c);
  142. extern void (APIENTRY *qglIndexdv)(const GLdouble *c);
  143. extern void (APIENTRY *qglIndexf)(GLfloat c);
  144. extern void (APIENTRY *qglIndexfv)(const GLfloat *c);
  145. extern void (APIENTRY *qglIndexi)(GLint c);
  146. extern void (APIENTRY *qglIndexiv)(const GLint *c);
  147. extern void (APIENTRY *qglIndexs)(GLshort c);
  148. extern void (APIENTRY *qglIndexsv)(const GLshort *c);
  149. extern void (APIENTRY *qglIndexub)(GLubyte c);
  150. extern void (APIENTRY *qglIndexubv)(const GLubyte *c);
  151. extern void (APIENTRY *qglInitNames)(void);
  152. extern void (APIENTRY *qglInterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer);
  153. extern GLboolean (APIENTRY *qglIsEnabled)(GLenum cap);
  154. extern GLboolean (APIENTRY *qglIsList)(GLuint list);
  155. extern GLboolean (APIENTRY *qglIsTexture)(GLuint texture);
  156. extern void (APIENTRY *qglLightModelf)(GLenum pname, GLfloat param);
  157. extern void (APIENTRY *qglLightModelfv)(GLenum pname, const GLfloat *params);
  158. extern void (APIENTRY *qglLightModeli)(GLenum pname, GLint param);
  159. extern void (APIENTRY *qglLightModeliv)(GLenum pname, const GLint *params);
  160. extern void (APIENTRY *qglLightf)(GLenum light, GLenum pname, GLfloat param);
  161. extern void (APIENTRY *qglLightfv)(GLenum light, GLenum pname, const GLfloat *params);
  162. extern void (APIENTRY *qglLighti)(GLenum light, GLenum pname, GLint param);
  163. extern void (APIENTRY *qglLightiv)(GLenum light, GLenum pname, const GLint *params);
  164. extern void (APIENTRY *qglLineStipple)(GLint factor, GLushort pattern);
  165. extern void (APIENTRY *qglLineWidth)(GLfloat width);
  166. extern void (APIENTRY *qglListBase)(GLuint base);
  167. extern void (APIENTRY *qglLoadIdentity)(void);
  168. extern void (APIENTRY *qglLoadMatrixd)(const GLdouble *m);
  169. extern void (APIENTRY *qglLoadMatrixf)(const GLfloat *m);
  170. extern void (APIENTRY *qglLoadName)(GLuint name);
  171. extern void (APIENTRY *qglLogicOp)(GLenum opcode);
  172. extern void (APIENTRY *qglMap1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
  173. extern void (APIENTRY *qglMap1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
  174. extern void (APIENTRY *qglMap2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
  175. extern void (APIENTRY *qglMap2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
  176. extern void (APIENTRY *qglMapGrid1d)(GLint un, GLdouble u1, GLdouble u2);
  177. extern void (APIENTRY *qglMapGrid1f)(GLint un, GLfloat u1, GLfloat u2);
  178. extern void (APIENTRY *qglMapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
  179. extern void (APIENTRY *qglMapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
  180. extern void (APIENTRY *qglMaterialf)(GLenum face, GLenum pname, GLfloat param);
  181. extern void (APIENTRY *qglMaterialfv)(GLenum face, GLenum pname, const GLfloat *params);
  182. extern void (APIENTRY *qglMateriali)(GLenum face, GLenum pname, GLint param);
  183. extern void (APIENTRY *qglMaterialiv)(GLenum face, GLenum pname, const GLint *params);
  184. extern void (APIENTRY *qglMatrixMode)(GLenum mode);
  185. extern void (APIENTRY *qglMultMatrixd)(const GLdouble *m);
  186. extern void (APIENTRY *qglMultMatrixf)(const GLfloat *m);
  187. extern void (APIENTRY *qglNewList)(GLuint list, GLenum mode);
  188. extern void (APIENTRY *qglNormal3b)(GLbyte nx, GLbyte ny, GLbyte nz);
  189. extern void (APIENTRY *qglNormal3bv)(const GLbyte *v);
  190. extern void (APIENTRY *qglNormal3d)(GLdouble nx, GLdouble ny, GLdouble nz);
  191. extern void (APIENTRY *qglNormal3dv)(const GLdouble *v);
  192. extern void (APIENTRY *qglNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz);
  193. extern void (APIENTRY *qglNormal3fv)(const GLfloat *v);
  194. extern void (APIENTRY *qglNormal3i)(GLint nx, GLint ny, GLint nz);
  195. extern void (APIENTRY *qglNormal3iv)(const GLint *v);
  196. extern void (APIENTRY *qglNormal3s)(GLshort nx, GLshort ny, GLshort nz);
  197. extern void (APIENTRY *qglNormal3sv)(const GLshort *v);
  198. extern void (APIENTRY *qglNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
  199. extern void (APIENTRY *qglOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  200. extern void (APIENTRY *qglPassThrough)(GLfloat token);
  201. extern void (APIENTRY *qglPixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values);
  202. extern void (APIENTRY *qglPixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values);
  203. extern void (APIENTRY *qglPixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values);
  204. extern void (APIENTRY *qglPixelStoref)(GLenum pname, GLfloat param);
  205. extern void (APIENTRY *qglPixelStorei)(GLenum pname, GLint param);
  206. extern void (APIENTRY *qglPixelTransferf)(GLenum pname, GLfloat param);
  207. extern void (APIENTRY *qglPixelTransferi)(GLenum pname, GLint param);
  208. extern void (APIENTRY *qglPixelZoom)(GLfloat xfactor, GLfloat yfactor);
  209. extern void (APIENTRY *qglPointSize)(GLfloat size);
  210. extern void (APIENTRY *qglPolygonMode)(GLenum face, GLenum mode);
  211. extern void (APIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units);
  212. extern void (APIENTRY *qglPolygonStipple)(const GLubyte *mask);
  213. extern void (APIENTRY *qglPopAttrib)(void);
  214. extern void (APIENTRY *qglPopClientAttrib)(void);
  215. extern void (APIENTRY *qglPopMatrix)(void);
  216. extern void (APIENTRY *qglPopName)(void);
  217. extern void (APIENTRY *qglPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities);
  218. extern void (APIENTRY *qglPushAttrib)(GLbitfield mask);
  219. extern void (APIENTRY *qglPushClientAttrib)(GLbitfield mask);
  220. extern void (APIENTRY *qglPushMatrix)(void);
  221. extern void (APIENTRY *qglPushName)(GLuint name);
  222. extern void (APIENTRY *qglRasterPos2d)(GLdouble x, GLdouble y);
  223. extern void (APIENTRY *qglRasterPos2dv)(const GLdouble *v);
  224. extern void (APIENTRY *qglRasterPos2f)(GLfloat x, GLfloat y);
  225. extern void (APIENTRY *qglRasterPos2fv)(const GLfloat *v);
  226. extern void (APIENTRY *qglRasterPos2i)(GLint x, GLint y);
  227. extern void (APIENTRY *qglRasterPos2iv)(const GLint *v);
  228. extern void (APIENTRY *qglRasterPos2s)(GLshort x, GLshort y);
  229. extern void (APIENTRY *qglRasterPos2sv)(const GLshort *v);
  230. extern void (APIENTRY *qglRasterPos3d)(GLdouble x, GLdouble y, GLdouble z);
  231. extern void (APIENTRY *qglRasterPos3dv)(const GLdouble *v);
  232. extern void (APIENTRY *qglRasterPos3f)(GLfloat x, GLfloat y, GLfloat z);
  233. extern void (APIENTRY *qglRasterPos3fv)(const GLfloat *v);
  234. extern void (APIENTRY *qglRasterPos3i)(GLint x, GLint y, GLint z);
  235. extern void (APIENTRY *qglRasterPos3iv)(const GLint *v);
  236. extern void (APIENTRY *qglRasterPos3s)(GLshort x, GLshort y, GLshort z);
  237. extern void (APIENTRY *qglRasterPos3sv)(const GLshort *v);
  238. extern void (APIENTRY *qglRasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  239. extern void (APIENTRY *qglRasterPos4dv)(const GLdouble *v);
  240. extern void (APIENTRY *qglRasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  241. extern void (APIENTRY *qglRasterPos4fv)(const GLfloat *v);
  242. extern void (APIENTRY *qglRasterPos4i)(GLint x, GLint y, GLint z, GLint w);
  243. extern void (APIENTRY *qglRasterPos4iv)(const GLint *v);
  244. extern void (APIENTRY *qglRasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w);
  245. extern void (APIENTRY *qglRasterPos4sv)(const GLshort *v);
  246. extern void (APIENTRY *qglReadBuffer)(GLenum mode);
  247. extern void (APIENTRY *qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
  248. extern void (APIENTRY *qglRectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
  249. extern void (APIENTRY *qglRectdv)(const GLdouble *v1, const GLdouble *v2);
  250. extern void (APIENTRY *qglRectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
  251. extern void (APIENTRY *qglRectfv)(const GLfloat *v1, const GLfloat *v2);
  252. extern void (APIENTRY *qglRecti)(GLint x1, GLint y1, GLint x2, GLint y2);
  253. extern void (APIENTRY *qglRectiv)(const GLint *v1, const GLint *v2);
  254. extern void (APIENTRY *qglRects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
  255. extern void (APIENTRY *qglRectsv)(const GLshort *v1, const GLshort *v2);
  256. extern GLint (APIENTRY *qglRenderMode)(GLenum mode);
  257. extern void (APIENTRY *qglRotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
  258. extern void (APIENTRY *qglRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
  259. extern void (APIENTRY *qglScaled)(GLdouble x, GLdouble y, GLdouble z);
  260. extern void (APIENTRY *qglScalef)(GLfloat x, GLfloat y, GLfloat z);
  261. extern void (APIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
  262. extern void (APIENTRY *qglSelectBuffer)(GLsizei size, GLuint *buffer);
  263. extern void (APIENTRY *qglShadeModel)(GLenum mode);
  264. extern void (APIENTRY *qglStencilFunc)(GLenum func, GLint ref, GLuint mask);
  265. extern void (APIENTRY *qglStencilMask)(GLuint mask);
  266. extern void (APIENTRY *qglStencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
  267. extern void (APIENTRY *qglTexCoord1d)(GLdouble s);
  268. extern void (APIENTRY *qglTexCoord1dv)(const GLdouble *v);
  269. extern void (APIENTRY *qglTexCoord1f)(GLfloat s);
  270. extern void (APIENTRY *qglTexCoord1fv)(const GLfloat *v);
  271. extern void (APIENTRY *qglTexCoord1i)(GLint s);
  272. extern void (APIENTRY *qglTexCoord1iv)(const GLint *v);
  273. extern void (APIENTRY *qglTexCoord1s)(GLshort s);
  274. extern void (APIENTRY *qglTexCoord1sv)(const GLshort *v);
  275. extern void (APIENTRY *qglTexCoord2d)(GLdouble s, GLdouble t);
  276. extern void (APIENTRY *qglTexCoord2dv)(const GLdouble *v);
  277. extern void (APIENTRY *qglTexCoord2f)(GLfloat s, GLfloat t);
  278. extern void (APIENTRY *qglTexCoord2fv)(const GLfloat *v);
  279. extern void (APIENTRY *qglTexCoord2i)(GLint s, GLint t);
  280. extern void (APIENTRY *qglTexCoord2iv)(const GLint *v);
  281. extern void (APIENTRY *qglTexCoord2s)(GLshort s, GLshort t);
  282. extern void (APIENTRY *qglTexCoord2sv)(const GLshort *v);
  283. extern void (APIENTRY *qglTexCoord3d)(GLdouble s, GLdouble t, GLdouble r);
  284. extern void (APIENTRY *qglTexCoord3dv)(const GLdouble *v);
  285. extern void (APIENTRY *qglTexCoord3f)(GLfloat s, GLfloat t, GLfloat r);
  286. extern void (APIENTRY *qglTexCoord3fv)(const GLfloat *v);
  287. extern void (APIENTRY *qglTexCoord3i)(GLint s, GLint t, GLint r);
  288. extern void (APIENTRY *qglTexCoord3iv)(const GLint *v);
  289. extern void (APIENTRY *qglTexCoord3s)(GLshort s, GLshort t, GLshort r);
  290. extern void (APIENTRY *qglTexCoord3sv)(const GLshort *v);
  291. extern void (APIENTRY *qglTexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
  292. extern void (APIENTRY *qglTexCoord4dv)(const GLdouble *v);
  293. extern void (APIENTRY *qglTexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
  294. extern void (APIENTRY *qglTexCoord4fv)(const GLfloat *v);
  295. extern void (APIENTRY *qglTexCoord4i)(GLint s, GLint t, GLint r, GLint q);
  296. extern void (APIENTRY *qglTexCoord4iv)(const GLint *v);
  297. extern void (APIENTRY *qglTexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q);
  298. extern void (APIENTRY *qglTexCoord4sv)(const GLshort *v);
  299. extern void (APIENTRY *qglTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  300. extern void (APIENTRY *qglTexEnvf)(GLenum target, GLenum pname, GLfloat param);
  301. extern void (APIENTRY *qglTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params);
  302. extern void (APIENTRY *qglTexEnvi)(GLenum target, GLenum pname, GLint param);
  303. extern void (APIENTRY *qglTexEnviv)(GLenum target, GLenum pname, const GLint *params);
  304. extern void (APIENTRY *qglTexGend)(GLenum coord, GLenum pname, GLdouble param);
  305. extern void (APIENTRY *qglTexGendv)(GLenum coord, GLenum pname, const GLdouble *params);
  306. extern void (APIENTRY *qglTexGenf)(GLenum coord, GLenum pname, GLfloat param);
  307. extern void (APIENTRY *qglTexGenfv)(GLenum coord, GLenum pname, const GLfloat *params);
  308. extern void (APIENTRY *qglTexGeni)(GLenum coord, GLenum pname, GLint param);
  309. extern void (APIENTRY *qglTexGeniv)(GLenum coord, GLenum pname, const GLint *params);
  310. extern void (APIENTRY *qglTexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  311. extern void (APIENTRY *qglTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  312. extern void (APIENTRY *qglTexParameterf)(GLenum target, GLenum pname, GLfloat param);
  313. extern void (APIENTRY *qglTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
  314. extern void (APIENTRY *qglTexParameteri)(GLenum target, GLenum pname, GLint param);
  315. extern void (APIENTRY *qglTexParameteriv)(GLenum target, GLenum pname, const GLint *params);
  316. extern void (APIENTRY *qglTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
  317. extern void (APIENTRY *qglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  318. extern void (APIENTRY *qglTranslated)(GLdouble x, GLdouble y, GLdouble z);
  319. extern void (APIENTRY *qglTranslatef)(GLfloat x, GLfloat y, GLfloat z);
  320. extern void (APIENTRY *qglVertex2d)(GLdouble x, GLdouble y);
  321. extern void (APIENTRY *qglVertex2dv)(const GLdouble *v);
  322. extern void (APIENTRY *qglVertex2f)(GLfloat x, GLfloat y);
  323. extern void (APIENTRY *qglVertex2fv)(const GLfloat *v);
  324. extern void (APIENTRY *qglVertex2i)(GLint x, GLint y);
  325. extern void (APIENTRY *qglVertex2iv)(const GLint *v);
  326. extern void (APIENTRY *qglVertex2s)(GLshort x, GLshort y);
  327. extern void (APIENTRY *qglVertex2sv)(const GLshort *v);
  328. extern void (APIENTRY *qglVertex3d)(GLdouble x, GLdouble y, GLdouble z);
  329. extern void (APIENTRY *qglVertex3dv)(const GLdouble *v);
  330. extern void (APIENTRY *qglVertex3f)(GLfloat x, GLfloat y, GLfloat z);
  331. extern void (APIENTRY *qglVertex3fv)(const GLfloat *v);
  332. extern void (APIENTRY *qglVertex3i)(GLint x, GLint y, GLint z);
  333. extern void (APIENTRY *qglVertex3iv)(const GLint *v);
  334. extern void (APIENTRY *qglVertex3s)(GLshort x, GLshort y, GLshort z);
  335. extern void (APIENTRY *qglVertex3sv)(const GLshort *v);
  336. extern void (APIENTRY *qglVertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  337. extern void (APIENTRY *qglVertex4dv)(const GLdouble *v);
  338. extern void (APIENTRY *qglVertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  339. extern void (APIENTRY *qglVertex4fv)(const GLfloat *v);
  340. extern void (APIENTRY *qglVertex4i)(GLint x, GLint y, GLint z, GLint w);
  341. extern void (APIENTRY *qglVertex4iv)(const GLint *v);
  342. extern void (APIENTRY *qglVertex4s)(GLshort x, GLshort y, GLshort z, GLshort w);
  343. extern void (APIENTRY *qglVertex4sv)(const GLshort *v);
  344. extern void (APIENTRY *qglVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  345. extern void (APIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
  346. #ifdef __cplusplus
  347. }
  348. #endif

  349. #ifdef __cplusplus
  350. extern "C"
  351. #endif
  352. {
  353. extern int (WINAPI *qwglChoosePixelFormat)(HDC, CONST PIXELFORMATDESCRIPTOR *);
  354. extern int (WINAPI *qwglDescribePixelFormat)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
  355. extern int (WINAPI *qwglGetPixelFormat)(HDC);
  356. extern BOOL (WINAPI *qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
  357. extern BOOL (WINAPI *qwglSwapBuffers)(HDC);

  358. extern BOOL (WINAPI *qwglCopyContext)(HGLRC, HGLRC, UINT);
  359. extern HGLRC (WINAPI *qwglCreateContext)(HDC);
  360. extern HGLRC (WINAPI *qwglCreateLayerContext)(HDC, int);
  361. extern BOOL (WINAPI *qwglDeleteContext)(HGLRC);
  362. extern HGLRC (WINAPI *qwglGetCurrentContext)(VOID);
  363. extern HDC (WINAPI *qwglGetCurrentDC)(VOID);
  364. extern PROC (WINAPI *qwglGetProcAddress)(LPCSTR);
  365. extern BOOL (WINAPI *qwglMakeCurrent)(HDC, HGLRC);
  366. extern BOOL (WINAPI *qwglShareLists)(HGLRC, HGLRC);
  367. extern BOOL (WINAPI *qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD);

  368. extern BOOL (WINAPI *qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPGLYPHMETRICSFLOAT);

  369. extern BOOL (WINAPI *qwglDescribeLayerPlane)(HDC, int, int, UINT, LPLAYERPLANEDESCRIPTOR);
  370. extern int (WINAPI *qwglSetLayerPaletteEntries)(HDC, int, int, int, CONST COLORREF *);
  371. extern int (WINAPI *qwglGetLayerPaletteEntries)(HDC, int, int, int, COLORREF *);
  372. extern BOOL (WINAPI *qwglRealizeLayerPalette)(HDC, int, BOOL);
  373. extern BOOL (WINAPI *qwglSwapLayerBuffers)(HDC, UINT);

  374. extern BOOL (WINAPI *qwglSwapIntervalEXT)(int);
  375. #ifdef __cplusplus
  376. }
  377. #endif

  378. extern PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB;
  379. extern PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB;
  380. extern PFNGLMULTITEXCOORD2FARBPROC qglMultiTexCoord2fARB;
  381. extern PFNGLMULTITEXCOORD3FARBPROC qglMultiTexCoord3fARB;
  382. extern PFNGLBINDBUFFERARBPROC qglBindBufferARB;
  383. extern PFNGLGENBUFFERSARBPROC qglGenBuffersARB;
  384. extern PFNGLBUFFERDATAARBPROC qglBufferDataARB;
  385. extern PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB;
  386. extern PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT;
  387. extern PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT;
  388. extern PFNGLTEXIMAGE3DEXTPROC qglTexImage3DEXT;
  389. extern PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
  390. extern PFNGLBINDPROGRAMARBPROC qglBindProgramARB;
  391. extern PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB;
  392. extern PFNGLGETPROGRAMIVARBPROC qglGetProgramivARB;
  393. extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC qglProgramLocalParameter4fARB;
  394. extern PFNGLFOGCOORDPOINTEREXTPROC qglFogCoordPointer;
  395. extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
  396. extern PFNGLPROGRAMENVPARAMETER4FARBPROC qglProgramEnvParameter4fARB;
  397. extern PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB;
  398. extern PFNGLDELETEFRAMEBUFFERSEXTPROC qglDeleteFramebuffersEXT;
  399. extern PFNGLDELETERENDERBUFFERSEXTPROC qglDeleteRenderbuffersEXT;
  400. extern PFNGLGENFRAMEBUFFERSEXTPROC qglGenFramebuffersEXT;
  401. extern PFNGLBINDFRAMEBUFFEREXTPROC qglBindFramebufferEXT;
  402. extern PFNGLGENRENDERBUFFERSEXTPROC qglGenRenderbuffersEXT;
  403. extern PFNGLBINDRENDERBUFFEREXTPROC qglBindRenderbufferEXT;
  404. extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC qglFramebufferRenderbufferEXT;
  405. extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC qglCheckFramebufferStatusEXT;
  406. extern PFNGLRENDERBUFFERSTORAGEEXTPROC qglRenderbufferStorageEXT;
  407. extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC qglFramebufferTexture2DEXT;
  408. extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC qglRenderbufferStorageMultisampleEXT;
  409. extern PFNGLBLITFRAMEBUFFEREXTPROC qglBlitFramebufferEXT;
  410. extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC qglRenderbufferStorageMultisampleCoverageNV;

  411. extern PFNGLCREATESHADEROBJECTARBPROC qglCreateShaderObjectARB;
  412. extern PFNGLDETACHOBJECTARBPROC qglDetachObjectARB;
  413. extern PFNGLDELETEOBJECTARBPROC qglDeleteObjectARB;
  414. extern PFNGLSHADERSOURCEARBPROC qglShaderSourceARB;
  415. extern PFNGLCOMPILESHADERARBPROC qglCompileShaderARB;
  416. extern PFNGLCREATEPROGRAMOBJECTARBPROC qglCreateProgramObjectARB;
  417. extern PFNGLATTACHOBJECTARBPROC qglAttachObjectARB;
  418. extern PFNGLLINKPROGRAMARBPROC qglLinkProgramARB;
  419. extern PFNGLUSEPROGRAMOBJECTARBPROC qglUseProgramObjectARB;
  420. extern PFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB;
  421. extern PFNGLGETATTRIBLOCATIONARBPROC qglGetAttribLocationARB;
  422. extern PFNGLUNIFORM1IARBPROC qglUniform1iARB;
  423. extern PFNGLUNIFORM2IARBPROC qglUniform2iARB;
  424. extern PFNGLUNIFORM3IARBPROC qglUniform3iARB;
  425. extern PFNGLUNIFORM4IARBPROC qglUniform4iARB;
  426. extern PFNGLUNIFORM1FARBPROC qglUniform1fARB;
  427. extern PFNGLUNIFORM2FARBPROC qglUniform2fARB;
  428. extern PFNGLUNIFORM3FARBPROC qglUniform3fARB;
  429. extern PFNGLUNIFORM4FARBPROC qglUniform4fARB;
  430. extern PFNGLUNIFORM3FVARBPROC qglUniform3fvARB;
  431. extern PFNGLUNIFORM4FVARBPROC qglUniform4fvARB;
  432. extern PFNGLVERTEXATTRIB3FPROC qglVertexAttrib3f;
  433. extern PFNGLVERTEXATTRIB3FVPROC qglVertexAttrib3fv;
  434. extern PFNGLGETSHADERIVPROC qglGetShaderiv;
  435. extern PFNGLGETSHADERINFOLOGPROC qglGetShaderInfoLog;
  436. extern PFNGLGETINFOLOGARBPROC qglGetInfoLogARB;

  437. //extern int gl_mtexable;
  438. void QGL_Init(void);
  439. void QGL_InitExtension(void);
复制代码
qgl.cpp:

  1. #include <metahook.h>
  2. #include <gl/gl.h>
  3. #include <gl/glext.h>
  4. #include "qgl.h"

  5. #ifdef _DEBUG
  6. #pragma comment(lib, "opengl32.lib")
  7. #endif

  8. extern "C"
  9. {
  10.         void (APIENTRY *qglAccum)(GLenum op, GLfloat value) = NULL;
  11.         void (APIENTRY *qglAlphaFunc)(GLenum func, GLclampf ref) = NULL;
  12.         GLboolean (APIENTRY *qglAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences) = NULL;
  13.         void (APIENTRY *qglArrayElement)(GLint i) = NULL;
  14.         void (APIENTRY *qglBegin)(GLenum mode) = NULL;
  15.         void (APIENTRY *qglBindTexture)(GLenum target, GLuint texture) = NULL;
  16.         void (APIENTRY *qglBitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) = NULL;
  17.         void (APIENTRY *qglBlendFunc)(GLenum sfactor, GLenum dfactor) = NULL;
  18.         void (APIENTRY *qglCallList)(GLuint list) = NULL;
  19.         void (APIENTRY *qglCallLists)(GLsizei n, GLenum type, const GLvoid *lists) = NULL;
  20.         void (APIENTRY *qglClear)(GLbitfield mask) = NULL;
  21.         void (APIENTRY *qglClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) = NULL;
  22.         void (APIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = NULL;
  23.         void (APIENTRY *qglClearDepth)(GLclampd depth) = NULL;
  24.         void (APIENTRY *qglClearIndex)(GLfloat c) = NULL;
  25.         void (APIENTRY *qglClearStencil)(GLint s) = NULL;
  26.         void (APIENTRY *qglClipPlane)(GLenum plane, const GLdouble *equation) = NULL;
  27.         void (APIENTRY *qglColor3b)(GLbyte red, GLbyte green, GLbyte blue) = NULL;
  28.         void (APIENTRY *qglColor3bv)(const GLbyte *v) = NULL;
  29.         void (APIENTRY *qglColor3d)(GLdouble red, GLdouble green, GLdouble blue) = NULL;
  30.         void (APIENTRY *qglColor3dv)(const GLdouble *v) = NULL;
  31.         void (APIENTRY *qglColor3f)(GLfloat red, GLfloat green, GLfloat blue) = NULL;
  32.         void (APIENTRY *qglColor3fv)(const GLfloat *v) = NULL;
  33.         void (APIENTRY *qglColor3i)(GLint red, GLint green, GLint blue) = NULL;
  34.         void (APIENTRY *qglColor3iv)(const GLint *v) = NULL;
  35.         void (APIENTRY *qglColor3s)(GLshort red, GLshort green, GLshort blue) = NULL;
  36.         void (APIENTRY *qglColor3sv)(const GLshort *v) = NULL;
  37.         void (APIENTRY *qglColor3ub)(GLubyte red, GLubyte green, GLubyte blue) = NULL;
  38.         void (APIENTRY *qglColor3ubv)(const GLubyte *v) = NULL;
  39.         void (APIENTRY *qglColor3ui)(GLuint red, GLuint green, GLuint blue) = NULL;
  40.         void (APIENTRY *qglColor3uiv)(const GLuint *v) = NULL;
  41.         void (APIENTRY *qglColor3us)(GLushort red, GLushort green, GLushort blue) = NULL;
  42.         void (APIENTRY *qglColor3usv)(const GLushort *v) = NULL;
  43.         void (APIENTRY *qglColor4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) = NULL;
  44.         void (APIENTRY *qglColor4bv)(const GLbyte *v) = NULL;
  45.         void (APIENTRY *qglColor4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) = NULL;
  46.         void (APIENTRY *qglColor4dv)(const GLdouble *v) = NULL;
  47.         void (APIENTRY *qglColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) = NULL;
  48.         void (APIENTRY *qglColor4fv)(const GLfloat *v) = NULL;
  49.         void (APIENTRY *qglColor4i)(GLint red, GLint green, GLint blue, GLint alpha) = NULL;
  50.         void (APIENTRY *qglColor4iv)(const GLint *v) = NULL;
  51.         void (APIENTRY *qglColor4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha) = NULL;
  52.         void (APIENTRY *qglColor4sv)(const GLshort *v) = NULL;
  53.         void (APIENTRY *qglColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) = NULL;
  54.         void (APIENTRY *qglColor4ubv)(const GLubyte *v) = NULL;
  55.         void (APIENTRY *qglColor4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha) = NULL;
  56.         void (APIENTRY *qglColor4uiv)(const GLuint *v) = NULL;
  57.         void (APIENTRY *qglColor4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha) = NULL;
  58.         void (APIENTRY *qglColor4usv)(const GLushort *v) = NULL;
  59.         void (APIENTRY *qglColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = NULL;
  60.         void (APIENTRY *qglColorMaterial)(GLenum face, GLenum mode) = NULL;
  61.         void (APIENTRY *qglColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) = NULL;
  62.         void (APIENTRY *qglCopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) = NULL;
  63.         void (APIENTRY *qglCopyTexImage1D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border) = NULL;
  64.         void (APIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = NULL;
  65.         void (APIENTRY *qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) = NULL;
  66.         void (APIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
  67.         void (APIENTRY *qglCullFace)(GLenum mode) = NULL;
  68.         void (APIENTRY *qglDeleteLists)(GLuint list, GLsizei range) = NULL;
  69.         void (APIENTRY *qglDeleteTextures)(GLsizei n, const GLuint *textures) = NULL;
  70.         void (APIENTRY *qglDepthFunc)(GLenum func) = NULL;
  71.         void (APIENTRY *qglDepthMask)(GLboolean flag) = NULL;
  72.         void (APIENTRY *qglDepthRange)(GLclampd zNear, GLclampd zFar) = NULL;
  73.         void (APIENTRY *qglDisable)(GLenum cap) = NULL;
  74.         void (APIENTRY *qglDisableClientState)(GLenum array) = NULL;
  75.         void (APIENTRY *qglDrawArrays)(GLenum mode, GLint first, GLsizei count) = NULL;
  76.         void (APIENTRY *qglDrawBuffer)(GLenum mode) = NULL;
  77.         void (APIENTRY *qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) = NULL;
  78.         void (APIENTRY *qglDrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) = NULL;
  79.         void (APIENTRY *qglEdgeFlag)(GLboolean flag) = NULL;
  80.         void (APIENTRY *qglEdgeFlagPointer)(GLsizei stride, const GLvoid *pointer) = NULL;
  81.         void (APIENTRY *qglEdgeFlagv)(const GLboolean *flag) = NULL;
  82.         void (APIENTRY *qglEnable)(GLenum cap) = NULL;
  83.         void (APIENTRY *qglEnableClientState)(GLenum array) = NULL;
  84.         void (APIENTRY *qglEnd)(void) = NULL;
  85.         void (APIENTRY *qglEndList)(void) = NULL;
  86.         void (APIENTRY *qglEvalCoord1d)(GLdouble u) = NULL;
  87.         void (APIENTRY *qglEvalCoord1dv)(const GLdouble *u) = NULL;
  88.         void (APIENTRY *qglEvalCoord1f)(GLfloat u) = NULL;
  89.         void (APIENTRY *qglEvalCoord1fv)(const GLfloat *u) = NULL;
  90.         void (APIENTRY *qglEvalCoord2d)(GLdouble u, GLdouble v) = NULL;
  91.         void (APIENTRY *qglEvalCoord2dv)(const GLdouble *u) = NULL;
  92.         void (APIENTRY *qglEvalCoord2f)(GLfloat u, GLfloat v) = NULL;
  93.         void (APIENTRY *qglEvalCoord2fv)(const GLfloat *u) = NULL;
  94.         void (APIENTRY *qglEvalMesh1)(GLenum mode, GLint i1, GLint i2) = NULL;
  95.         void (APIENTRY *qglEvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) = NULL;
  96.         void (APIENTRY *qglEvalPoint1)(GLint i) = NULL;
  97.         void (APIENTRY *qglEvalPoint2)(GLint i, GLint j) = NULL;
  98.         void (APIENTRY *qglFeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer) = NULL;
  99.         void (APIENTRY *qglFinish)(void) = NULL;
  100.         void (APIENTRY *qglFlush)(void) = NULL;
  101.         void (APIENTRY *qglFogf)(GLenum pname, GLfloat param) = NULL;
  102.         void (APIENTRY *qglFogfv)(GLenum pname, const GLfloat *params) = NULL;
  103.         void (APIENTRY *qglFogi)(GLenum pname, GLint param) = NULL;
  104.         void (APIENTRY *qglFogiv)(GLenum pname, const GLint *params) = NULL;
  105.         void (APIENTRY *qglFrontFace)(GLenum mode) = NULL;
  106.         void (APIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) = NULL;
  107.         GLuint (APIENTRY *qglGenLists)(GLsizei range) = NULL;
  108.         void (APIENTRY *qglGenTextures)(GLsizei n, GLuint *textures) = NULL;
  109.         void (APIENTRY *qglGetBooleanv)(GLenum pname, GLboolean *params) = NULL;
  110.         void (APIENTRY *qglGetClipPlane)(GLenum plane, GLdouble *equation) = NULL;
  111.         void (APIENTRY *qglGetDoublev)(GLenum pname, GLdouble *params) = NULL;
  112.         GLenum (APIENTRY *qglGetError)(void) = NULL;
  113.         void (APIENTRY *qglGetFloatv)(GLenum pname, GLfloat *params) = NULL;
  114.         void (APIENTRY *qglGetIntegerv)(GLenum pname, GLint *params) = NULL;
  115.         void (APIENTRY *qglGetLightfv)(GLenum light, GLenum pname, GLfloat *params) = NULL;
  116.         void (APIENTRY *qglGetLightiv)(GLenum light, GLenum pname, GLint *params) = NULL;
  117.         void (APIENTRY *qglGetMapdv)(GLenum target, GLenum query, GLdouble *v) = NULL;
  118.         void (APIENTRY *qglGetMapfv)(GLenum target, GLenum query, GLfloat *v) = NULL;
  119.         void (APIENTRY *qglGetMapiv)(GLenum target, GLenum query, GLint *v) = NULL;
  120.         void (APIENTRY *qglGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params) = NULL;
  121.         void (APIENTRY *qglGetMaterialiv)(GLenum face, GLenum pname, GLint *params) = NULL;
  122.         void (APIENTRY *qglGetPixelMapfv)(GLenum map, GLfloat *values) = NULL;
  123.         void (APIENTRY *qglGetPixelMapuiv)(GLenum map, GLuint *values) = NULL;
  124.         void (APIENTRY *qglGetPixelMapusv)(GLenum map, GLushort *values) = NULL;
  125.         void (APIENTRY *qglGetPointerv)(GLenum pname, GLvoid* *params) = NULL;
  126.         void (APIENTRY *qglGetPolygonStipple)(GLubyte *mask) = NULL;
  127.         const GLubyte * (APIENTRY *qglGetString)(GLenum name) = NULL;
  128.         void (APIENTRY *qglGetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params) = NULL;
  129.         void (APIENTRY *qglGetTexEnviv)(GLenum target, GLenum pname, GLint *params) = NULL;
  130.         void (APIENTRY *qglGetTexGendv)(GLenum coord, GLenum pname, GLdouble *params) = NULL;
  131.         void (APIENTRY *qglGetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params) = NULL;
  132.         void (APIENTRY *qglGetTexGeniv)(GLenum coord, GLenum pname, GLint *params) = NULL;
  133.         void (APIENTRY *qglGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels) = NULL;
  134.         void (APIENTRY *qglGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params) = NULL;
  135.         void (APIENTRY *qglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params) = NULL;
  136.         void (APIENTRY *qglGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) = NULL;
  137.         void (APIENTRY *qglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params) = NULL;
  138.         void (APIENTRY *qglHint)(GLenum target, GLenum mode) = NULL;
  139.         void (APIENTRY *qglIndexMask)(GLuint mask) = NULL;
  140.         void (APIENTRY *qglIndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) = NULL;
  141.         void (APIENTRY *qglIndexd)(GLdouble c) = NULL;
  142.         void (APIENTRY *qglIndexdv)(const GLdouble *c) = NULL;
  143.         void (APIENTRY *qglIndexf)(GLfloat c) = NULL;
  144.         void (APIENTRY *qglIndexfv)(const GLfloat *c) = NULL;
  145.         void (APIENTRY *qglIndexi)(GLint c) = NULL;
  146.         void (APIENTRY *qglIndexiv)(const GLint *c) = NULL;
  147.         void (APIENTRY *qglIndexs)(GLshort c) = NULL;
  148.         void (APIENTRY *qglIndexsv)(const GLshort *c) = NULL;
  149.         void (APIENTRY *qglIndexub)(GLubyte c) = NULL;
  150.         void (APIENTRY *qglIndexubv)(const GLubyte *c) = NULL;
  151.         void (APIENTRY *qglInitNames)(void) = NULL;
  152.         void (APIENTRY *qglInterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer) = NULL;
  153.         GLboolean (APIENTRY *qglIsEnabled)(GLenum cap) = NULL;
  154.         GLboolean (APIENTRY *qglIsList)(GLuint list) = NULL;
  155.         GLboolean (APIENTRY *qglIsTexture)(GLuint texture) = NULL;
  156.         void (APIENTRY *qglLightModelf)(GLenum pname, GLfloat param) = NULL;
  157.         void (APIENTRY *qglLightModelfv)(GLenum pname, const GLfloat *params) = NULL;
  158.         void (APIENTRY *qglLightModeli)(GLenum pname, GLint param) = NULL;
  159.         void (APIENTRY *qglLightModeliv)(GLenum pname, const GLint *params) = NULL;
  160.         void (APIENTRY *qglLightf)(GLenum light, GLenum pname, GLfloat param) = NULL;
  161.         void (APIENTRY *qglLightfv)(GLenum light, GLenum pname, const GLfloat *params) = NULL;
  162.         void (APIENTRY *qglLighti)(GLenum light, GLenum pname, GLint param) = NULL;
  163.         void (APIENTRY *qglLightiv)(GLenum light, GLenum pname, const GLint *params) = NULL;
  164.         void (APIENTRY *qglLineStipple)(GLint factor, GLushort pattern) = NULL;
  165.         void (APIENTRY *qglLineWidth)(GLfloat width) = NULL;
  166.         void (APIENTRY *qglListBase)(GLuint base) = NULL;
  167.         void (APIENTRY *qglLoadIdentity)(void) = NULL;
  168.         void (APIENTRY *qglLoadMatrixd)(const GLdouble *m) = NULL;
  169.         void (APIENTRY *qglLoadMatrixf)(const GLfloat *m) = NULL;
  170.         void (APIENTRY *qglLoadName)(GLuint name) = NULL;
  171.         void (APIENTRY *qglLogicOp)(GLenum opcode) = NULL;
  172.         void (APIENTRY *qglMap1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) = NULL;
  173.         void (APIENTRY *qglMap1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) = NULL;
  174.         void (APIENTRY *qglMap2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) = NULL;
  175.         void (APIENTRY *qglMap2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) = NULL;
  176.         void (APIENTRY *qglMapGrid1d)(GLint un, GLdouble u1, GLdouble u2) = NULL;
  177.         void (APIENTRY *qglMapGrid1f)(GLint un, GLfloat u1, GLfloat u2) = NULL;
  178.         void (APIENTRY *qglMapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) = NULL;
  179.         void (APIENTRY *qglMapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) = NULL;
  180.         void (APIENTRY *qglMaterialf)(GLenum face, GLenum pname, GLfloat param) = NULL;
  181.         void (APIENTRY *qglMaterialfv)(GLenum face, GLenum pname, const GLfloat *params) = NULL;
  182.         void (APIENTRY *qglMateriali)(GLenum face, GLenum pname, GLint param) = NULL;
  183.         void (APIENTRY *qglMaterialiv)(GLenum face, GLenum pname, const GLint *params) = NULL;
  184.         void (APIENTRY *qglMatrixMode)(GLenum mode) = NULL;
  185.         void (APIENTRY *qglMultMatrixd)(const GLdouble *m) = NULL;
  186.         void (APIENTRY *qglMultMatrixf)(const GLfloat *m) = NULL;
  187.         void (APIENTRY *qglNewList)(GLuint list, GLenum mode) = NULL;
  188.         void (APIENTRY *qglNormal3b)(GLbyte nx, GLbyte ny, GLbyte nz) = NULL;
  189.         void (APIENTRY *qglNormal3bv)(const GLbyte *v) = NULL;
  190.         void (APIENTRY *qglNormal3d)(GLdouble nx, GLdouble ny, GLdouble nz) = NULL;
  191.         void (APIENTRY *qglNormal3dv)(const GLdouble *v) = NULL;
  192.         void (APIENTRY *qglNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz) = NULL;
  193.         void (APIENTRY *qglNormal3fv)(const GLfloat *v) = NULL;
  194.         void (APIENTRY *qglNormal3i)(GLint nx, GLint ny, GLint nz) = NULL;
  195.         void (APIENTRY *qglNormal3iv)(const GLint *v) = NULL;
  196.         void (APIENTRY *qglNormal3s)(GLshort nx, GLshort ny, GLshort nz) = NULL;
  197.         void (APIENTRY *qglNormal3sv)(const GLshort *v) = NULL;
  198.         void (APIENTRY *qglNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) = NULL;
  199.         void (APIENTRY *qglOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) = NULL;
  200.         void (APIENTRY *qglPassThrough)(GLfloat token) = NULL;
  201.         void (APIENTRY *qglPixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values) = NULL;
  202.         void (APIENTRY *qglPixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values) = NULL;
  203.         void (APIENTRY *qglPixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values) = NULL;
  204.         void (APIENTRY *qglPixelStoref)(GLenum pname, GLfloat param) = NULL;
  205.         void (APIENTRY *qglPixelStorei)(GLenum pname, GLint param) = NULL;
  206.         void (APIENTRY *qglPixelTransferf)(GLenum pname, GLfloat param) = NULL;
  207.         void (APIENTRY *qglPixelTransferi)(GLenum pname, GLint param) = NULL;
  208.         void (APIENTRY *qglPixelZoom)(GLfloat xfactor, GLfloat yfactor) = NULL;
  209.         void (APIENTRY *qglPointSize)(GLfloat size) = NULL;
  210.         void (APIENTRY *qglPolygonMode)(GLenum face, GLenum mode) = NULL;
  211.         void (APIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units) = NULL;
  212.         void (APIENTRY *qglPolygonStipple)(const GLubyte *mask) = NULL;
  213.         void (APIENTRY *qglPopAttrib)(void) = NULL;
  214.         void (APIENTRY *qglPopClientAttrib)(void) = NULL;
  215.         void (APIENTRY *qglPopMatrix)(void) = NULL;
  216.         void (APIENTRY *qglPopName)(void) = NULL;
  217.         void (APIENTRY *qglPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities) = NULL;
  218.         void (APIENTRY *qglPushAttrib)(GLbitfield mask) = NULL;
  219.         void (APIENTRY *qglPushClientAttrib)(GLbitfield mask) = NULL;
  220.         void (APIENTRY *qglPushMatrix)(void) = NULL;
  221.         void (APIENTRY *qglPushName)(GLuint name) = NULL;
  222.         void (APIENTRY *qglRasterPos2d)(GLdouble x, GLdouble y) = NULL;
  223.         void (APIENTRY *qglRasterPos2dv)(const GLdouble *v) = NULL;
  224.         void (APIENTRY *qglRasterPos2f)(GLfloat x, GLfloat y) = NULL;
  225.         void (APIENTRY *qglRasterPos2fv)(const GLfloat *v) = NULL;
  226.         void (APIENTRY *qglRasterPos2i)(GLint x, GLint y) = NULL;
  227.         void (APIENTRY *qglRasterPos2iv)(const GLint *v) = NULL;
  228.         void (APIENTRY *qglRasterPos2s)(GLshort x, GLshort y) = NULL;
  229.         void (APIENTRY *qglRasterPos2sv)(const GLshort *v) = NULL;
  230.         void (APIENTRY *qglRasterPos3d)(GLdouble x, GLdouble y, GLdouble z) = NULL;
  231.         void (APIENTRY *qglRasterPos3dv)(const GLdouble *v) = NULL;
  232.         void (APIENTRY *qglRasterPos3f)(GLfloat x, GLfloat y, GLfloat z) = NULL;
  233.         void (APIENTRY *qglRasterPos3fv)(const GLfloat *v) = NULL;
  234.         void (APIENTRY *qglRasterPos3i)(GLint x, GLint y, GLint z) = NULL;
  235.         void (APIENTRY *qglRasterPos3iv)(const GLint *v) = NULL;
  236.         void (APIENTRY *qglRasterPos3s)(GLshort x, GLshort y, GLshort z) = NULL;
  237.         void (APIENTRY *qglRasterPos3sv)(const GLshort *v) = NULL;
  238.         void (APIENTRY *qglRasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) = NULL;
  239.         void (APIENTRY *qglRasterPos4dv)(const GLdouble *v) = NULL;
  240.         void (APIENTRY *qglRasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL;
  241.         void (APIENTRY *qglRasterPos4fv)(const GLfloat *v) = NULL;
  242.         void (APIENTRY *qglRasterPos4i)(GLint x, GLint y, GLint z, GLint w) = NULL;
  243.         void (APIENTRY *qglRasterPos4iv)(const GLint *v) = NULL;
  244.         void (APIENTRY *qglRasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w) = NULL;
  245.         void (APIENTRY *qglRasterPos4sv)(const GLshort *v) = NULL;
  246.         void (APIENTRY *qglReadBuffer)(GLenum mode) = NULL;
  247.         void (APIENTRY *qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) = NULL;
  248.         void (APIENTRY *qglRectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) = NULL;
  249.         void (APIENTRY *qglRectdv)(const GLdouble *v1, const GLdouble *v2) = NULL;
  250.         void (APIENTRY *qglRectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) = NULL;
  251.         void (APIENTRY *qglRectfv)(const GLfloat *v1, const GLfloat *v2) = NULL;
  252.         void (APIENTRY *qglRecti)(GLint x1, GLint y1, GLint x2, GLint y2) = NULL;
  253.         void (APIENTRY *qglRectiv)(const GLint *v1, const GLint *v2) = NULL;
  254.         void (APIENTRY *qglRects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2) = NULL;
  255.         void (APIENTRY *qglRectsv)(const GLshort *v1, const GLshort *v2) = NULL;
  256.         GLint (APIENTRY *qglRenderMode)(GLenum mode) = NULL;
  257.         void (APIENTRY *qglRotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) = NULL;
  258.         void (APIENTRY *qglRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) = NULL;
  259.         void (APIENTRY *qglScaled)(GLdouble x, GLdouble y, GLdouble z) = NULL;
  260.         void (APIENTRY *qglScalef)(GLfloat x, GLfloat y, GLfloat z) = NULL;
  261.         void (APIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
  262.         void (APIENTRY *qglSelectBuffer)(GLsizei size, GLuint *buffer) = NULL;
  263.         void (APIENTRY *qglShadeModel)(GLenum mode) = NULL;
  264.         void (APIENTRY *qglStencilFunc)(GLenum func, GLint ref, GLuint mask) = NULL;
  265.         void (APIENTRY *qglStencilMask)(GLuint mask) = NULL;
  266.         void (APIENTRY *qglStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) = NULL;
  267.         void (APIENTRY *qglTexCoord1d)(GLdouble s) = NULL;
  268.         void (APIENTRY *qglTexCoord1dv)(const GLdouble *v) = NULL;
  269.         void (APIENTRY *qglTexCoord1f)(GLfloat s) = NULL;
  270.         void (APIENTRY *qglTexCoord1fv)(const GLfloat *v) = NULL;
  271.         void (APIENTRY *qglTexCoord1i)(GLint s) = NULL;
  272.         void (APIENTRY *qglTexCoord1iv)(const GLint *v) = NULL;
  273.         void (APIENTRY *qglTexCoord1s)(GLshort s) = NULL;
  274.         void (APIENTRY *qglTexCoord1sv)(const GLshort *v) = NULL;
  275.         void (APIENTRY *qglTexCoord2d)(GLdouble s, GLdouble t) = NULL;
  276.         void (APIENTRY *qglTexCoord2dv)(const GLdouble *v) = NULL;
  277.         void (APIENTRY *qglTexCoord2f)(GLfloat s, GLfloat t) = NULL;
  278.         void (APIENTRY *qglTexCoord2fv)(const GLfloat *v) = NULL;
  279.         void (APIENTRY *qglTexCoord2i)(GLint s, GLint t) = NULL;
  280.         void (APIENTRY *qglTexCoord2iv)(const GLint *v) = NULL;
  281.         void (APIENTRY *qglTexCoord2s)(GLshort s, GLshort t) = NULL;
  282.         void (APIENTRY *qglTexCoord2sv)(const GLshort *v) = NULL;
  283.         void (APIENTRY *qglTexCoord3d)(GLdouble s, GLdouble t, GLdouble r) = NULL;
  284.         void (APIENTRY *qglTexCoord3dv)(const GLdouble *v) = NULL;
  285.         void (APIENTRY *qglTexCoord3f)(GLfloat s, GLfloat t, GLfloat r) = NULL;
  286.         void (APIENTRY *qglTexCoord3fv)(const GLfloat *v) = NULL;
  287.         void (APIENTRY *qglTexCoord3i)(GLint s, GLint t, GLint r) = NULL;
  288.         void (APIENTRY *qglTexCoord3iv)(const GLint *v) = NULL;
  289.         void (APIENTRY *qglTexCoord3s)(GLshort s, GLshort t, GLshort r) = NULL;
  290.         void (APIENTRY *qglTexCoord3sv)(const GLshort *v) = NULL;
  291.         void (APIENTRY *qglTexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q) = NULL;
  292.         void (APIENTRY *qglTexCoord4dv)(const GLdouble *v) = NULL;
  293.         void (APIENTRY *qglTexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q) = NULL;
  294.         void (APIENTRY *qglTexCoord4fv)(const GLfloat *v) = NULL;
  295.         void (APIENTRY *qglTexCoord4i)(GLint s, GLint t, GLint r, GLint q) = NULL;
  296.         void (APIENTRY *qglTexCoord4iv)(const GLint *v) = NULL;
  297.         void (APIENTRY *qglTexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q) = NULL;
  298.         void (APIENTRY *qglTexCoord4sv)(const GLshort *v) = NULL;
  299.         void (APIENTRY *qglTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) = NULL;
  300.         void (APIENTRY *qglTexEnvf)(GLenum target, GLenum pname, GLfloat param) = NULL;
  301.         void (APIENTRY *qglTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params) = NULL;
  302.         void (APIENTRY *qglTexEnvi)(GLenum target, GLenum pname, GLint param) = NULL;
  303.         void (APIENTRY *qglTexEnviv)(GLenum target, GLenum pname, const GLint *params) = NULL;
  304.         void (APIENTRY *qglTexGend)(GLenum coord, GLenum pname, GLdouble param) = NULL;
  305.         void (APIENTRY *qglTexGendv)(GLenum coord, GLenum pname, const GLdouble *params) = NULL;
  306.         void (APIENTRY *qglTexGenf)(GLenum coord, GLenum pname, GLfloat param) = NULL;
  307.         void (APIENTRY *qglTexGenfv)(GLenum coord, GLenum pname, const GLfloat *params) = NULL;
  308.         void (APIENTRY *qglTexGeni)(GLenum coord, GLenum pname, GLint param) = NULL;
  309.         void (APIENTRY *qglTexGeniv)(GLenum coord, GLenum pname, const GLint *params) = NULL;
  310.         void (APIENTRY *qglTexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) = NULL;
  311.         void (APIENTRY *qglTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) = NULL;
  312.         void (APIENTRY *qglTexParameterf)(GLenum target, GLenum pname, GLfloat param) = NULL;
  313.         void (APIENTRY *qglTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) = NULL;
  314.         void (APIENTRY *qglTexParameteri)(GLenum target, GLenum pname, GLint param) = NULL;
  315.         void (APIENTRY *qglTexParameteriv)(GLenum target, GLenum pname, const GLint *params) = NULL;
  316.         void (APIENTRY *qglTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) = NULL;
  317.         void (APIENTRY *qglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) = NULL;
  318.         void (APIENTRY *qglTranslated)(GLdouble x, GLdouble y, GLdouble z) = NULL;
  319.         void (APIENTRY *qglTranslatef)(GLfloat x, GLfloat y, GLfloat z) = NULL;
  320.         void (APIENTRY *qglVertex2d)(GLdouble x, GLdouble y) = NULL;
  321.         void (APIENTRY *qglVertex2dv)(const GLdouble *v) = NULL;
  322.         void (APIENTRY *qglVertex2f)(GLfloat x, GLfloat y) = NULL;
  323.         void (APIENTRY *qglVertex2fv)(const GLfloat *v) = NULL;
  324.         void (APIENTRY *qglVertex2i)(GLint x, GLint y) = NULL;
  325.         void (APIENTRY *qglVertex2iv)(const GLint *v) = NULL;
  326.         void (APIENTRY *qglVertex2s)(GLshort x, GLshort y) = NULL;
  327.         void (APIENTRY *qglVertex2sv)(const GLshort *v) = NULL;
  328.         void (APIENTRY *qglVertex3d)(GLdouble x, GLdouble y, GLdouble z) = NULL;
  329.         void (APIENTRY *qglVertex3dv)(const GLdouble *v) = NULL;
  330.         void (APIENTRY *qglVertex3f)(GLfloat x, GLfloat y, GLfloat z) = NULL;
  331.         void (APIENTRY *qglVertex3fv)(const GLfloat *v) = NULL;
  332.         void (APIENTRY *qglVertex3i)(GLint x, GLint y, GLint z) = NULL;
  333.         void (APIENTRY *qglVertex3iv)(const GLint *v) = NULL;
  334.         void (APIENTRY *qglVertex3s)(GLshort x, GLshort y, GLshort z) = NULL;
  335.         void (APIENTRY *qglVertex3sv)(const GLshort *v) = NULL;
  336.         void (APIENTRY *qglVertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) = NULL;
  337.         void (APIENTRY *qglVertex4dv)(const GLdouble *v) = NULL;
  338.         void (APIENTRY *qglVertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL;
  339.         void (APIENTRY *qglVertex4fv)(const GLfloat *v) = NULL;
  340.         void (APIENTRY *qglVertex4i)(GLint x, GLint y, GLint z, GLint w) = NULL;
  341.         void (APIENTRY *qglVertex4iv)(const GLint *v) = NULL;
  342.         void (APIENTRY *qglVertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) = NULL;
  343.         void (APIENTRY *qglVertex4sv)(const GLshort *v) = NULL;
  344.         void (APIENTRY *qglVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) = NULL;
  345.         void (APIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
  346. }

  347. extern "C"
  348. {
  349.         int (WINAPI *qwglChoosePixelFormat)(HDC, CONST PIXELFORMATDESCRIPTOR *) = NULL;
  350.         int (WINAPI *qwglDescribePixelFormat)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR) = NULL;
  351.         int (WINAPI *qwglGetPixelFormat)(HDC) = NULL;
  352.         BOOL (WINAPI *qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *) = NULL;
  353.         BOOL (WINAPI *qwglSwapBuffers)(HDC) = NULL;

  354.         BOOL (WINAPI *qwglCopyContext)(HGLRC, HGLRC, UINT) = NULL;
  355.         HGLRC (WINAPI *qwglCreateContext)(HDC) = NULL;
  356.         HGLRC (WINAPI *qwglCreateLayerContext)(HDC, int) = NULL;
  357.         BOOL (WINAPI *qwglDeleteContext)(HGLRC) = NULL;
  358.         HGLRC (WINAPI *qwglGetCurrentContext)(VOID) = NULL;
  359.         HDC (WINAPI *qwglGetCurrentDC)(VOID) = NULL;
  360.         PROC (WINAPI *qwglGetProcAddress)(LPCSTR) = NULL;
  361.         BOOL (WINAPI *qwglMakeCurrent)(HDC, HGLRC) = NULL;
  362.         BOOL (WINAPI *qwglShareLists)(HGLRC, HGLRC) = NULL;
  363.         BOOL (WINAPI *qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD) = NULL;

  364.         BOOL (WINAPI *qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPGLYPHMETRICSFLOAT) = NULL;

  365.         BOOL (WINAPI *qwglDescribeLayerPlane)(HDC, int, int, UINT, LPLAYERPLANEDESCRIPTOR) = NULL;
  366.         int (WINAPI *qwglSetLayerPaletteEntries)(HDC, int, int, int, CONST COLORREF *) = NULL;
  367.         int (WINAPI *qwglGetLayerPaletteEntries)(HDC, int, int, int, COLORREF *) = NULL;
  368.         BOOL (WINAPI *qwglRealizeLayerPalette)(HDC, int, BOOL) = NULL;
  369.         BOOL (WINAPI *qwglSwapLayerBuffers)(HDC, UINT) = NULL;

  370.         BOOL (WINAPI *qwglSwapIntervalEXT)(int) = NULL;
  371. }

  372. PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB = NULL;
  373. PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB = NULL;
  374. PFNGLMULTITEXCOORD2FARBPROC qglMultiTexCoord2fARB = NULL;
  375. PFNGLMULTITEXCOORD3FARBPROC qglMultiTexCoord3fARB = NULL;
  376. PFNGLBINDBUFFERARBPROC qglBindBufferARB = NULL;
  377. PFNGLGENBUFFERSARBPROC qglGenBuffersARB = NULL;
  378. PFNGLBUFFERDATAARBPROC qglBufferDataARB = NULL;
  379. PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB = NULL;
  380. PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT = NULL;
  381. PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT = NULL;
  382. PFNGLTEXIMAGE3DEXTPROC qglTexImage3DEXT = NULL;
  383. PFNGLGENPROGRAMSARBPROC qglGenProgramsARB = NULL;
  384. PFNGLBINDPROGRAMARBPROC qglBindProgramARB = NULL;
  385. PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB = NULL;
  386. PFNGLGETPROGRAMIVARBPROC qglGetProgramivARB = NULL;
  387. PFNGLPROGRAMLOCALPARAMETER4FARBPROC qglProgramLocalParameter4fARB = NULL;
  388. PFNGLFOGCOORDPOINTEREXTPROC qglFogCoordPointer = NULL;
  389. PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB = NULL;
  390. PFNGLPROGRAMENVPARAMETER4FARBPROC qglProgramEnvParameter4fARB = NULL;
  391. PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB = NULL;
  392. PFNGLDELETEFRAMEBUFFERSEXTPROC qglDeleteFramebuffersEXT = NULL;
  393. PFNGLDELETERENDERBUFFERSEXTPROC qglDeleteRenderbuffersEXT = NULL;
  394. PFNGLGENFRAMEBUFFERSEXTPROC qglGenFramebuffersEXT = NULL;
  395. PFNGLBINDFRAMEBUFFEREXTPROC qglBindFramebufferEXT = NULL;
  396. PFNGLGENRENDERBUFFERSEXTPROC qglGenRenderbuffersEXT = NULL;
  397. PFNGLBINDRENDERBUFFEREXTPROC qglBindRenderbufferEXT = NULL;
  398. PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC qglFramebufferRenderbufferEXT = NULL;
  399. PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC qglCheckFramebufferStatusEXT = NULL;
  400. PFNGLRENDERBUFFERSTORAGEEXTPROC qglRenderbufferStorageEXT = NULL;
  401. PFNGLFRAMEBUFFERTEXTURE2DEXTPROC qglFramebufferTexture2DEXT = NULL;
  402. PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC qglRenderbufferStorageMultisampleEXT = NULL;
  403. PFNGLBLITFRAMEBUFFEREXTPROC qglBlitFramebufferEXT = NULL;
  404. PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC qglRenderbufferStorageMultisampleCoverageNV = NULL;

  405. //Shader ARB funcs
  406. PFNGLCREATESHADEROBJECTARBPROC qglCreateShaderObjectARB = NULL;
  407. PFNGLDETACHOBJECTARBPROC qglDetachObjectARB = NULL;
  408. PFNGLDELETEOBJECTARBPROC qglDeleteObjectARB = NULL;
  409. PFNGLSHADERSOURCEARBPROC qglShaderSourceARB = NULL;
  410. PFNGLCOMPILESHADERARBPROC qglCompileShaderARB = NULL;
  411. PFNGLCREATEPROGRAMOBJECTARBPROC qglCreateProgramObjectARB = NULL;
  412. PFNGLATTACHOBJECTARBPROC qglAttachObjectARB = NULL;
  413. PFNGLLINKPROGRAMARBPROC qglLinkProgramARB = NULL;
  414. PFNGLUSEPROGRAMOBJECTARBPROC qglUseProgramObjectARB = NULL;
  415. PFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB = NULL;
  416. PFNGLGETATTRIBLOCATIONARBPROC qglGetAttribLocationARB = NULL;
  417. PFNGLUNIFORM1IARBPROC qglUniform1iARB = NULL;
  418. PFNGLUNIFORM2IARBPROC qglUniform2iARB = NULL;
  419. PFNGLUNIFORM3IARBPROC qglUniform3iARB = NULL;
  420. PFNGLUNIFORM4IARBPROC qglUniform4iARB = NULL;
  421. PFNGLUNIFORM1FARBPROC qglUniform1fARB = NULL;
  422. PFNGLUNIFORM2FARBPROC qglUniform2fARB = NULL;
  423. PFNGLUNIFORM3FARBPROC qglUniform3fARB = NULL;
  424. PFNGLUNIFORM4FARBPROC qglUniform4fARB = NULL;
  425. PFNGLUNIFORM3FVARBPROC qglUniform3fvARB = NULL;
  426. PFNGLUNIFORM4FVARBPROC qglUniform4fvARB = NULL;
  427. PFNGLVERTEXATTRIB3FPROC qglVertexAttrib3f = NULL;
  428. PFNGLVERTEXATTRIB3FVPROC qglVertexAttrib3fv = NULL;
  429. PFNGLGETSHADERIVPROC qglGetShaderiv = NULL;
  430. PFNGLGETSHADERINFOLOGPROC qglGetShaderInfoLog = NULL;
  431. PFNGLGETINFOLOGARBPROC qglGetInfoLogARB = NULL;

  432. void QGL_Init(void)
  433. {
  434.         HMODULE hOpenGL = GetModuleHandle("opengl32.dll");

  435.         if (hOpenGL)
  436.         {
  437.                 *(FARPROC *)&qglAccum = GetProcAddress(hOpenGL, "glAccum");
  438.                 *(FARPROC *)&qglAlphaFunc = GetProcAddress(hOpenGL, "glAlphaFunc");
  439.                 *(FARPROC *)&qglAreTexturesResident = GetProcAddress(hOpenGL, "glAreTexturesResident");
  440.                 *(FARPROC *)&qglArrayElement = GetProcAddress(hOpenGL, "glArrayElement");
  441.                 *(FARPROC *)&qglBegin = GetProcAddress(hOpenGL, "glBegin");
  442.                 *(FARPROC *)&qglBindTexture = GetProcAddress(hOpenGL, "glBindTexture");
  443.                 *(FARPROC *)&qglBitmap = GetProcAddress(hOpenGL, "glBitmap");
  444.                 *(FARPROC *)&qglBlendFunc = GetProcAddress(hOpenGL, "glBlendFunc");
  445.                 *(FARPROC *)&qglCallList = GetProcAddress(hOpenGL, "glCallList");
  446.                 *(FARPROC *)&qglCallLists = GetProcAddress(hOpenGL, "glCallLists");
  447.                 *(FARPROC *)&qglClear = GetProcAddress(hOpenGL, "glClear");
  448.                 *(FARPROC *)&qglClearAccum = GetProcAddress(hOpenGL, "glClearAccum");
  449.                 *(FARPROC *)&qglClearColor = GetProcAddress(hOpenGL, "glClearColor");
  450.                 *(FARPROC *)&qglClearDepth = GetProcAddress(hOpenGL, "glClearDepth");
  451.                 *(FARPROC *)&qglClearIndex = GetProcAddress(hOpenGL, "glClearIndex");
  452.                 *(FARPROC *)&qglClearStencil = GetProcAddress(hOpenGL, "glClearStencil");
  453.                 *(FARPROC *)&qglClipPlane = GetProcAddress(hOpenGL, "glClipPlane");
  454.                 *(FARPROC *)&qglColor3b = GetProcAddress(hOpenGL, "glColor3b");
  455.                 *(FARPROC *)&qglColor3bv = GetProcAddress(hOpenGL, "glColor3bv");
  456.                 *(FARPROC *)&qglColor3d = GetProcAddress(hOpenGL, "glColor3d");
  457.                 *(FARPROC *)&qglColor3dv = GetProcAddress(hOpenGL, "glColor3dv");
  458.                 *(FARPROC *)&qglColor3f = GetProcAddress(hOpenGL, "glColor3f");
  459.                 *(FARPROC *)&qglColor3fv = GetProcAddress(hOpenGL, "glColor3fv");
  460.                 *(FARPROC *)&qglColor3i = GetProcAddress(hOpenGL, "glColor3i");
  461.                 *(FARPROC *)&qglColor3iv = GetProcAddress(hOpenGL, "glColor3iv");
  462.                 *(FARPROC *)&qglColor3s = GetProcAddress(hOpenGL, "glColor3s");
  463.                 *(FARPROC *)&qglColor3sv = GetProcAddress(hOpenGL, "glColor3sv");
  464.                 *(FARPROC *)&qglColor3ub = GetProcAddress(hOpenGL, "glColor3ub");
  465.                 *(FARPROC *)&qglColor3ubv = GetProcAddress(hOpenGL, "glColor3ubv");
  466.                 *(FARPROC *)&qglColor3ui = GetProcAddress(hOpenGL, "glColor3ui");
  467.                 *(FARPROC *)&qglColor3uiv = GetProcAddress(hOpenGL, "glColor3uiv");
  468.                 *(FARPROC *)&qglColor3us = GetProcAddress(hOpenGL, "glColor3us");
  469.                 *(FARPROC *)&qglColor3usv = GetProcAddress(hOpenGL, "glColor3usv");
  470.                 *(FARPROC *)&qglColor4b = GetProcAddress(hOpenGL, "glColor4b");
  471.                 *(FARPROC *)&qglColor4bv = GetProcAddress(hOpenGL, "glColor4bv");
  472.                 *(FARPROC *)&qglColor4d = GetProcAddress(hOpenGL, "glColor4d");
  473.                 *(FARPROC *)&qglColor4dv = GetProcAddress(hOpenGL, "glColor4dv");
  474.                 *(FARPROC *)&qglColor4f = GetProcAddress(hOpenGL, "glColor4f");
  475.                 *(FARPROC *)&qglColor4fv = GetProcAddress(hOpenGL, "glColor4fv");
  476.                 *(FARPROC *)&qglColor4i = GetProcAddress(hOpenGL, "glColor4i");
  477.                 *(FARPROC *)&qglColor4iv = GetProcAddress(hOpenGL, "glColor4iv");
  478.                 *(FARPROC *)&qglColor4s = GetProcAddress(hOpenGL, "glColor4s");
  479.                 *(FARPROC *)&qglColor4sv = GetProcAddress(hOpenGL, "glColor4sv");
  480.                 *(FARPROC *)&qglColor4ub = GetProcAddress(hOpenGL, "glColor4ub");
  481.                 *(FARPROC *)&qglColor4ubv = GetProcAddress(hOpenGL, "glColor4ubv");
  482.                 *(FARPROC *)&qglColor4ui = GetProcAddress(hOpenGL, "glColor4ui");
  483.                 *(FARPROC *)&qglColor4uiv = GetProcAddress(hOpenGL, "glColor4uiv");
  484.                 *(FARPROC *)&qglColor4us = GetProcAddress(hOpenGL, "glColor4us");
  485.                 *(FARPROC *)&qglColor4usv = GetProcAddress(hOpenGL, "glColor4usv");
  486.                 *(FARPROC *)&qglColorMask = GetProcAddress(hOpenGL, "glColorMask");
  487.                 *(FARPROC *)&qglColorMaterial = GetProcAddress(hOpenGL, "glColorMaterial");
  488.                 *(FARPROC *)&qglColorPointer = GetProcAddress(hOpenGL, "glColorPointer");
  489.                 *(FARPROC *)&qglCopyPixels = GetProcAddress(hOpenGL, "glCopyPixels");
  490.                 *(FARPROC *)&qglCopyTexImage1D = GetProcAddress(hOpenGL, "glCopyTexImage1D");
  491.                 *(FARPROC *)&qglCopyTexImage2D = GetProcAddress(hOpenGL, "glCopyTexImage2D");
  492.                 *(FARPROC *)&qglCopyTexSubImage1D = GetProcAddress(hOpenGL, "glCopyTexSubImage1D");
  493.                 *(FARPROC *)&qglCopyTexSubImage2D = GetProcAddress(hOpenGL, "glCopyTexSubImage2D");
  494.                 *(FARPROC *)&qglCullFace = GetProcAddress(hOpenGL, "glCullFace");
  495.                 *(FARPROC *)&qglDeleteLists = GetProcAddress(hOpenGL, "glDeleteLists");
  496.                 *(FARPROC *)&qglDeleteTextures = GetProcAddress(hOpenGL, "glDeleteTextures");
  497.                 *(FARPROC *)&qglDepthFunc = GetProcAddress(hOpenGL, "glDepthFunc");
  498.                 *(FARPROC *)&qglDepthMask = GetProcAddress(hOpenGL, "glDepthMask");
  499.                 *(FARPROC *)&qglDepthRange = GetProcAddress(hOpenGL, "glDepthRange");
  500.                 *(FARPROC *)&qglDisable = GetProcAddress(hOpenGL, "glDisable");
  501.                 *(FARPROC *)&qglDisableClientState = GetProcAddress(hOpenGL, "glDisableClientState");
  502.                 *(FARPROC *)&qglDrawArrays = GetProcAddress(hOpenGL, "glDrawArrays");
  503.                 *(FARPROC *)&qglDrawBuffer = GetProcAddress(hOpenGL, "glDrawBuffer");
  504.                 *(FARPROC *)&qglDrawElements = GetProcAddress(hOpenGL, "glDrawElements");
  505.                 *(FARPROC *)&qglDrawPixels = GetProcAddress(hOpenGL, "glDrawPixels");
  506.                 *(FARPROC *)&qglEdgeFlag = GetProcAddress(hOpenGL, "glEdgeFlag");
  507.                 *(FARPROC *)&qglEdgeFlagPointer = GetProcAddress(hOpenGL, "glEdgeFlagPointer");
  508.                 *(FARPROC *)&qglEdgeFlagv = GetProcAddress(hOpenGL, "glEdgeFlagv");
  509.                 *(FARPROC *)&qglEnable = GetProcAddress(hOpenGL, "glEnable");
  510.                 *(FARPROC *)&qglEnableClientState = GetProcAddress(hOpenGL, "glEnableClientState");
  511.                 *(FARPROC *)&qglEnd = GetProcAddress(hOpenGL, "glEnd");
  512.                 *(FARPROC *)&qglEndList = GetProcAddress(hOpenGL, "glEndList");
  513.                 *(FARPROC *)&qglEvalCoord1d = GetProcAddress(hOpenGL, "glEvalCoord1d");
  514.                 *(FARPROC *)&qglEvalCoord1dv = GetProcAddress(hOpenGL, "glEvalCoord1dv");
  515.                 *(FARPROC *)&qglEvalCoord1f = GetProcAddress(hOpenGL, "glEvalCoord1f");
  516.                 *(FARPROC *)&qglEvalCoord1fv = GetProcAddress(hOpenGL, "glEvalCoord1fv");
  517.                 *(FARPROC *)&qglEvalCoord2d = GetProcAddress(hOpenGL, "glEvalCoord2d");
  518.                 *(FARPROC *)&qglEvalCoord2dv = GetProcAddress(hOpenGL, "glEvalCoord2dv");
  519.                 *(FARPROC *)&qglEvalCoord2f = GetProcAddress(hOpenGL, "glEvalCoord2f");
  520.                 *(FARPROC *)&qglEvalCoord2fv = GetProcAddress(hOpenGL, "glEvalCoord2fv");
  521.                 *(FARPROC *)&qglEvalMesh1 = GetProcAddress(hOpenGL, "glEvalMesh1");
  522.                 *(FARPROC *)&qglEvalMesh2 = GetProcAddress(hOpenGL, "glEvalMesh2");
  523.                 *(FARPROC *)&qglEvalPoint1 = GetProcAddress(hOpenGL, "glEvalPoint1");
  524.                 *(FARPROC *)&qglEvalPoint2 = GetProcAddress(hOpenGL, "glEvalPoint2");
  525.                 *(FARPROC *)&qglFeedbackBuffer = GetProcAddress(hOpenGL, "glFeedbackBuffer");
  526.                 *(FARPROC *)&qglFinish = GetProcAddress(hOpenGL, "glFinish");
  527.                 *(FARPROC *)&qglFlush = GetProcAddress(hOpenGL, "glFlush");
  528.                 *(FARPROC *)&qglFogf = GetProcAddress(hOpenGL, "glFogf");
  529.                 *(FARPROC *)&qglFogfv = GetProcAddress(hOpenGL, "glFogfv");
  530.                 *(FARPROC *)&qglFogi = GetProcAddress(hOpenGL, "glFogi");
  531.                 *(FARPROC *)&qglFogiv = GetProcAddress(hOpenGL, "glFogiv");
  532.                 *(FARPROC *)&qglFrontFace = GetProcAddress(hOpenGL, "glFrontFace");
  533.                 *(FARPROC *)&qglFrustum = GetProcAddress(hOpenGL, "glFrustum");
  534.                 *(FARPROC *)&qglGenLists = GetProcAddress(hOpenGL, "glGenLists");
  535.                 *(FARPROC *)&qglGenTextures = GetProcAddress(hOpenGL, "glGenTextures");
  536.                 *(FARPROC *)&qglGetBooleanv = GetProcAddress(hOpenGL, "glGetBooleanv");
  537.                 *(FARPROC *)&qglGetClipPlane = GetProcAddress(hOpenGL, "glGetClipPlane");
  538.                 *(FARPROC *)&qglGetDoublev = GetProcAddress(hOpenGL, "glGetDoublev");
  539.                 *(FARPROC *)&qglGetError = GetProcAddress(hOpenGL, "glGetError");
  540.                 *(FARPROC *)&qglGetFloatv = GetProcAddress(hOpenGL, "glGetFloatv");
  541.                 *(FARPROC *)&qglGetIntegerv = GetProcAddress(hOpenGL, "glGetIntegerv");
  542.                 *(FARPROC *)&qglGetLightfv = GetProcAddress(hOpenGL, "glGetLightfv");
  543.                 *(FARPROC *)&qglGetLightiv = GetProcAddress(hOpenGL, "glGetLightiv");
  544.                 *(FARPROC *)&qglGetMapdv = GetProcAddress(hOpenGL, "glGetMapdv");
  545.                 *(FARPROC *)&qglGetMapfv = GetProcAddress(hOpenGL, "glGetMapfv");
  546.                 *(FARPROC *)&qglGetMapiv = GetProcAddress(hOpenGL, "glGetMapiv");
  547.                 *(FARPROC *)&qglGetMaterialfv = GetProcAddress(hOpenGL, "glGetMaterialfv");
  548.                 *(FARPROC *)&qglGetMaterialiv = GetProcAddress(hOpenGL, "glGetMaterialiv");
  549.                 *(FARPROC *)&qglGetPixelMapfv = GetProcAddress(hOpenGL, "glGetPixelMapfv");
  550.                 *(FARPROC *)&qglGetPixelMapuiv = GetProcAddress(hOpenGL, "glGetPixelMapuiv");
  551.                 *(FARPROC *)&qglGetPixelMapusv = GetProcAddress(hOpenGL, "glGetPixelMapusv");
  552.                 *(FARPROC *)&qglGetPointerv = GetProcAddress(hOpenGL, "glGetPointerv");
  553.                 *(FARPROC *)&qglGetPolygonStipple = GetProcAddress(hOpenGL, "glGetPolygonStipple");
  554.                 *(FARPROC *)&qglGetString = GetProcAddress(hOpenGL, "glGetString");
  555.                 *(FARPROC *)&qglGetTexEnvfv = GetProcAddress(hOpenGL, "glGetTexEnvfv");
  556.                 *(FARPROC *)&qglGetTexEnviv = GetProcAddress(hOpenGL, "glGetTexEnviv");
  557.                 *(FARPROC *)&qglGetTexGendv = GetProcAddress(hOpenGL, "glGetTexGendv");
  558.                 *(FARPROC *)&qglGetTexGenfv = GetProcAddress(hOpenGL, "glGetTexGenfv");
  559.                 *(FARPROC *)&qglGetTexGeniv = GetProcAddress(hOpenGL, "glGetTexGeniv");
  560.                 *(FARPROC *)&qglGetTexImage = GetProcAddress(hOpenGL, "glGetTexImage");
  561.                 *(FARPROC *)&qglGetTexLevelParameterfv = GetProcAddress(hOpenGL, "glGetLevelParameterfv");
  562.                 *(FARPROC *)&qglGetTexLevelParameteriv = GetProcAddress(hOpenGL, "glGetLevelParameteriv");
  563.                 *(FARPROC *)&qglGetTexParameterfv = GetProcAddress(hOpenGL, "glGetTexParameterfv");
  564.                 *(FARPROC *)&qglGetTexParameteriv = GetProcAddress(hOpenGL, "glGetTexParameteriv");
  565.                 *(FARPROC *)&qglHint = GetProcAddress(hOpenGL, "glHint");
  566.                 *(FARPROC *)&qglIndexMask = GetProcAddress(hOpenGL, "glIndexMask");
  567.                 *(FARPROC *)&qglIndexPointer = GetProcAddress(hOpenGL, "glIndexPointer");
  568.                 *(FARPROC *)&qglIndexd = GetProcAddress(hOpenGL, "glIndexd");
  569.                 *(FARPROC *)&qglIndexdv = GetProcAddress(hOpenGL, "glIndexdv");
  570.                 *(FARPROC *)&qglIndexf = GetProcAddress(hOpenGL, "glIndexf");
  571.                 *(FARPROC *)&qglIndexfv = GetProcAddress(hOpenGL, "glIndexfv");
  572.                 *(FARPROC *)&qglIndexi = GetProcAddress(hOpenGL, "glIndexi");
  573.                 *(FARPROC *)&qglIndexiv = GetProcAddress(hOpenGL, "glIndexiv");
  574.                 *(FARPROC *)&qglIndexs = GetProcAddress(hOpenGL, "glIndexs");
  575.                 *(FARPROC *)&qglIndexsv = GetProcAddress(hOpenGL, "glIndexsv");
  576.                 *(FARPROC *)&qglIndexub = GetProcAddress(hOpenGL, "glIndexub");
  577.                 *(FARPROC *)&qglIndexubv = GetProcAddress(hOpenGL, "glIndexubv");
  578.                 *(FARPROC *)&qglInitNames = GetProcAddress(hOpenGL, "glInitNames");
  579.                 *(FARPROC *)&qglInterleavedArrays = GetProcAddress(hOpenGL, "glInterleavedArrays");
  580.                 *(FARPROC *)&qglIsEnabled = GetProcAddress(hOpenGL, "glIsEnabled");
  581.                 *(FARPROC *)&qglIsList = GetProcAddress(hOpenGL, "glIsList");
  582.                 *(FARPROC *)&qglIsTexture = GetProcAddress(hOpenGL, "glIsTexture");
  583.                 *(FARPROC *)&qglLightModelf = GetProcAddress(hOpenGL, "glLightModelf");
  584.                 *(FARPROC *)&qglLightModelfv = GetProcAddress(hOpenGL, "glLightModelfv");
  585.                 *(FARPROC *)&qglLightModeli = GetProcAddress(hOpenGL, "glLightModeli");
  586.                 *(FARPROC *)&qglLightModeliv = GetProcAddress(hOpenGL, "glLightModeliv");
  587.                 *(FARPROC *)&qglLightf = GetProcAddress(hOpenGL, "glLightf");
  588.                 *(FARPROC *)&qglLightfv = GetProcAddress(hOpenGL, "glLightfv");
  589.                 *(FARPROC *)&qglLighti = GetProcAddress(hOpenGL, "glLighti");
  590.                 *(FARPROC *)&qglLightiv = GetProcAddress(hOpenGL, "glLightiv");
  591.                 *(FARPROC *)&qglLineStipple = GetProcAddress(hOpenGL, "glLineStipple");
  592.                 *(FARPROC *)&qglLineWidth = GetProcAddress(hOpenGL, "glLineWidth");
  593.                 *(FARPROC *)&qglListBase = GetProcAddress(hOpenGL, "glListBase");
  594.                 *(FARPROC *)&qglLoadIdentity = GetProcAddress(hOpenGL, "glLoadIdentity");
  595.                 *(FARPROC *)&qglLoadMatrixd = GetProcAddress(hOpenGL, "glLoadMatrixd");
  596.                 *(FARPROC *)&qglLoadMatrixf = GetProcAddress(hOpenGL, "glLoadMatrixf");
  597.                 *(FARPROC *)&qglLoadName = GetProcAddress(hOpenGL, "glLoadName");
  598.                 *(FARPROC *)&qglLogicOp = GetProcAddress(hOpenGL, "glLogicOp");
  599.                 *(FARPROC *)&qglMap1d = GetProcAddress(hOpenGL, "glMap1d");
  600.                 *(FARPROC *)&qglMap1f = GetProcAddress(hOpenGL, "glMap1f");
  601.                 *(FARPROC *)&qglMap2d = GetProcAddress(hOpenGL, "glMap2d");
  602.                 *(FARPROC *)&qglMap2f = GetProcAddress(hOpenGL, "glMap2f");
  603.                 *(FARPROC *)&qglMapGrid1d = GetProcAddress(hOpenGL, "glMapGrid1d");
  604.                 *(FARPROC *)&qglMapGrid1f = GetProcAddress(hOpenGL, "glMapGrid1f");
  605.                 *(FARPROC *)&qglMapGrid2d = GetProcAddress(hOpenGL, "glMapGrid2d");
  606.                 *(FARPROC *)&qglMapGrid2f = GetProcAddress(hOpenGL, "glMapGrid2f");
  607.                 *(FARPROC *)&qglMaterialf = GetProcAddress(hOpenGL, "glMaterialf");
  608.                 *(FARPROC *)&qglMaterialfv = GetProcAddress(hOpenGL, "glMaterialfv");
  609.                 *(FARPROC *)&qglMateriali = GetProcAddress(hOpenGL, "glMateriali");
  610.                 *(FARPROC *)&qglMaterialiv = GetProcAddress(hOpenGL, "glMaterialiv");
  611.                 *(FARPROC *)&qglMatrixMode = GetProcAddress(hOpenGL, "glMatrixMode");
  612.                 *(FARPROC *)&qglMultMatrixd = GetProcAddress(hOpenGL, "glMultMatrixd");
  613.                 *(FARPROC *)&qglMultMatrixf = GetProcAddress(hOpenGL, "glMultMatrixf");
  614.                 *(FARPROC *)&qglNewList = GetProcAddress(hOpenGL, "glNewList");
  615.                 *(FARPROC *)&qglNormal3b = GetProcAddress(hOpenGL, "glNormal3b");
  616.                 *(FARPROC *)&qglNormal3bv = GetProcAddress(hOpenGL, "glNormal3bv");
  617.                 *(FARPROC *)&qglNormal3d = GetProcAddress(hOpenGL, "glNormal3d");
  618.                 *(FARPROC *)&qglNormal3dv = GetProcAddress(hOpenGL, "glNormal3dv");
  619.                 *(FARPROC *)&qglNormal3f = GetProcAddress(hOpenGL, "glNormal3f");
  620.                 *(FARPROC *)&qglNormal3fv = GetProcAddress(hOpenGL, "glNormal3fv");
  621.                 *(FARPROC *)&qglNormal3i = GetProcAddress(hOpenGL, "glNormal3i");
  622.                 *(FARPROC *)&qglNormal3iv = GetProcAddress(hOpenGL, "glNormal3iv");
  623.                 *(FARPROC *)&qglNormal3s = GetProcAddress(hOpenGL, "glNormal3s");
  624.                 *(FARPROC *)&qglNormal3sv = GetProcAddress(hOpenGL, "glNormal3sv");
  625.                 *(FARPROC *)&qglNormalPointer = GetProcAddress(hOpenGL, "glNormalPointer");
  626.                 *(FARPROC *)&qglOrtho = GetProcAddress(hOpenGL, "glOrtho");
  627.                 *(FARPROC *)&qglPassThrough = GetProcAddress(hOpenGL, "glPassThrough");
  628.                 *(FARPROC *)&qglPixelMapfv = GetProcAddress(hOpenGL, "glPixelMapfv");
  629.                 *(FARPROC *)&qglPixelMapuiv = GetProcAddress(hOpenGL, "glPixelMapuiv");
  630.                 *(FARPROC *)&qglPixelMapusv = GetProcAddress(hOpenGL, "glPixelMapusv");
  631.                 *(FARPROC *)&qglPixelStoref = GetProcAddress(hOpenGL, "glPixelStoref");
  632.                 *(FARPROC *)&qglPixelStorei = GetProcAddress(hOpenGL, "glPixelStorei");
  633.                 *(FARPROC *)&qglPixelTransferf = GetProcAddress(hOpenGL, "glPixelTransferf");
  634.                 *(FARPROC *)&qglPixelTransferi = GetProcAddress(hOpenGL, "glPixelTransferi");
  635.                 *(FARPROC *)&qglPixelZoom = GetProcAddress(hOpenGL, "glPixelZoom");
  636.                 *(FARPROC *)&qglPointSize = GetProcAddress(hOpenGL, "glPointSize");
  637.                 *(FARPROC *)&qglPolygonMode = GetProcAddress(hOpenGL, "glPolygonMode");
  638.                 *(FARPROC *)&qglPolygonOffset = GetProcAddress(hOpenGL, "glPolygonOffset");
  639.                 *(FARPROC *)&qglPolygonStipple = GetProcAddress(hOpenGL, "glPolygonStipple");
  640.                 *(FARPROC *)&qglPopAttrib = GetProcAddress(hOpenGL, "glPopAttrib");
  641.                 *(FARPROC *)&qglPopClientAttrib = GetProcAddress(hOpenGL, "glPopClientAttrib");
  642.                 *(FARPROC *)&qglPopMatrix = GetProcAddress(hOpenGL, "glPopMatrix");
  643.                 *(FARPROC *)&qglPopName = GetProcAddress(hOpenGL, "glPopName");
  644.                 *(FARPROC *)&qglPrioritizeTextures = GetProcAddress(hOpenGL, "glPrioritizeTextures");
  645.                 *(FARPROC *)&qglPushAttrib = GetProcAddress(hOpenGL, "glPushAttrib");
  646.                 *(FARPROC *)&qglPushClientAttrib = GetProcAddress(hOpenGL, "glPushClientAttrib");
  647.                 *(FARPROC *)&qglPushMatrix = GetProcAddress(hOpenGL, "glPushMatrix");
  648.                 *(FARPROC *)&qglPushName = GetProcAddress(hOpenGL, "glPushName");
  649.                 *(FARPROC *)&qglRasterPos2d = GetProcAddress(hOpenGL, "glRasterPos2d");
  650.                 *(FARPROC *)&qglRasterPos2dv = GetProcAddress(hOpenGL, "glRasterPos2dv");
  651.                 *(FARPROC *)&qglRasterPos2f = GetProcAddress(hOpenGL, "glRasterPos2f");
  652.                 *(FARPROC *)&qglRasterPos2fv = GetProcAddress(hOpenGL, "glRasterPos2fv");
  653.                 *(FARPROC *)&qglRasterPos2i = GetProcAddress(hOpenGL, "glRasterPos2i");
  654.                 *(FARPROC *)&qglRasterPos2iv = GetProcAddress(hOpenGL, "glRasterPos2iv");
  655.                 *(FARPROC *)&qglRasterPos2s = GetProcAddress(hOpenGL, "glRasterPos2s");
  656.                 *(FARPROC *)&qglRasterPos2sv = GetProcAddress(hOpenGL, "glRasterPos2sv");
  657.                 *(FARPROC *)&qglRasterPos3d = GetProcAddress(hOpenGL, "glRasterPos3d");
  658.                 *(FARPROC *)&qglRasterPos3dv = GetProcAddress(hOpenGL, "glRasterPos3dv");
  659.                 *(FARPROC *)&qglRasterPos3f = GetProcAddress(hOpenGL, "glRasterPos3f");
  660.                 *(FARPROC *)&qglRasterPos3fv = GetProcAddress(hOpenGL, "glRasterPos3fv");
  661.                 *(FARPROC *)&qglRasterPos3i = GetProcAddress(hOpenGL, "glRasterPos3i");
  662.                 *(FARPROC *)&qglRasterPos3iv = GetProcAddress(hOpenGL, "glRasterPos3iv");
  663.                 *(FARPROC *)&qglRasterPos3s = GetProcAddress(hOpenGL, "glRasterPos3s");
  664.                 *(FARPROC *)&qglRasterPos3sv = GetProcAddress(hOpenGL, "glRasterPos3sv");
  665.                 *(FARPROC *)&qglRasterPos4d = GetProcAddress(hOpenGL, "glRasterPos4d");
  666.                 *(FARPROC *)&qglRasterPos4dv = GetProcAddress(hOpenGL, "glRasterPos4dv");
  667.                 *(FARPROC *)&qglRasterPos4f = GetProcAddress(hOpenGL, "glRasterPos4f");
  668.                 *(FARPROC *)&qglRasterPos4fv = GetProcAddress(hOpenGL, "glRasterPos4fv");
  669.                 *(FARPROC *)&qglRasterPos4i = GetProcAddress(hOpenGL, "glRasterPos4i");
  670.                 *(FARPROC *)&qglRasterPos4iv = GetProcAddress(hOpenGL, "glRasterPos4iv");
  671.                 *(FARPROC *)&qglRasterPos4s = GetProcAddress(hOpenGL, "glRasterPos4s");
  672.                 *(FARPROC *)&qglRasterPos4sv = GetProcAddress(hOpenGL, "glRasterPos4sv");
  673.                 *(FARPROC *)&qglReadBuffer = GetProcAddress(hOpenGL, "glReadBuffer");
  674.                 *(FARPROC *)&qglReadPixels = GetProcAddress(hOpenGL, "glReadPixels");
  675.                 *(FARPROC *)&qglRectd = GetProcAddress(hOpenGL, "glRectd");
  676.                 *(FARPROC *)&qglRectdv = GetProcAddress(hOpenGL, "glRectdv");
  677.                 *(FARPROC *)&qglRectf = GetProcAddress(hOpenGL, "glRectf");
  678.                 *(FARPROC *)&qglRectfv = GetProcAddress(hOpenGL, "glRectfv");
  679.                 *(FARPROC *)&qglRecti = GetProcAddress(hOpenGL, "glRecti");
  680.                 *(FARPROC *)&qglRectiv = GetProcAddress(hOpenGL, "glRectiv");
  681.                 *(FARPROC *)&qglRects = GetProcAddress(hOpenGL, "glRects");
  682.                 *(FARPROC *)&qglRectsv = GetProcAddress(hOpenGL, "glRectsv");
  683.                 *(FARPROC *)&qglRenderMode = GetProcAddress(hOpenGL, "glRenderMode");
  684.                 *(FARPROC *)&qglRotated = GetProcAddress(hOpenGL, "glRotated");
  685.                 *(FARPROC *)&qglRotatef = GetProcAddress(hOpenGL, "glRotatef");
  686.                 *(FARPROC *)&qglScaled = GetProcAddress(hOpenGL, "glScaled");
  687.                 *(FARPROC *)&qglScalef = GetProcAddress(hOpenGL, "glScalef");
  688.                 *(FARPROC *)&qglScissor = GetProcAddress(hOpenGL, "glScissor");
  689.                 *(FARPROC *)&qglSelectBuffer = GetProcAddress(hOpenGL, "glSelectBuffer");
  690.                 *(FARPROC *)&qglShadeModel = GetProcAddress(hOpenGL, "glShadeModel");
  691.                 *(FARPROC *)&qglStencilFunc = GetProcAddress(hOpenGL, "glStencilFunc");
  692.                 *(FARPROC *)&qglStencilMask = GetProcAddress(hOpenGL, "glStencilMask");
  693.                 *(FARPROC *)&qglStencilOp = GetProcAddress(hOpenGL, "glStencilOp");
  694.                 *(FARPROC *)&qglTexCoord1d = GetProcAddress(hOpenGL, "glTexCoord1d");
  695.                 *(FARPROC *)&qglTexCoord1dv = GetProcAddress(hOpenGL, "glTexCoord1dv");
  696.                 *(FARPROC *)&qglTexCoord1f = GetProcAddress(hOpenGL, "glTexCoord1f");
  697.                 *(FARPROC *)&qglTexCoord1fv = GetProcAddress(hOpenGL, "glTexCoord1fv");
  698.                 *(FARPROC *)&qglTexCoord1i = GetProcAddress(hOpenGL, "glTexCoord1i");
  699.                 *(FARPROC *)&qglTexCoord1iv = GetProcAddress(hOpenGL, "glTexCoord1iv");
  700.                 *(FARPROC *)&qglTexCoord1s = GetProcAddress(hOpenGL, "glTexCoord1s");
  701.                 *(FARPROC *)&qglTexCoord1sv = GetProcAddress(hOpenGL, "glTexCoord1sv");
  702.                 *(FARPROC *)&qglTexCoord2d = GetProcAddress(hOpenGL, "glTexCoord2d");
  703.                 *(FARPROC *)&qglTexCoord2dv = GetProcAddress(hOpenGL, "glTexCoord2dv");
  704.                 *(FARPROC *)&qglTexCoord2f = GetProcAddress(hOpenGL, "glTexCoord2f");
  705.                 *(FARPROC *)&qglTexCoord2fv = GetProcAddress(hOpenGL, "glTexCoord2fv");
  706.                 *(FARPROC *)&qglTexCoord2i = GetProcAddress(hOpenGL, "glTexCoord2i");
  707.                 *(FARPROC *)&qglTexCoord2iv = GetProcAddress(hOpenGL, "glTexCoord2iv");
  708.                 *(FARPROC *)&qglTexCoord2s = GetProcAddress(hOpenGL, "glTexCoord2s");
  709.                 *(FARPROC *)&qglTexCoord2sv = GetProcAddress(hOpenGL, "glTexCoord2sv");
  710.                 *(FARPROC *)&qglTexCoord3d = GetProcAddress(hOpenGL, "glTexCoord3d");
  711.                 *(FARPROC *)&qglTexCoord3dv = GetProcAddress(hOpenGL, "glTexCoord3dv");
  712.                 *(FARPROC *)&qglTexCoord3f = GetProcAddress(hOpenGL, "glTexCoord3f");
  713.                 *(FARPROC *)&qglTexCoord3fv = GetProcAddress(hOpenGL, "glTexCoord3fv");
  714.                 *(FARPROC *)&qglTexCoord3i = GetProcAddress(hOpenGL, "glTexCoord3i");
  715.                 *(FARPROC *)&qglTexCoord3iv = GetProcAddress(hOpenGL, "glTexCoord3iv");
  716.                 *(FARPROC *)&qglTexCoord3s = GetProcAddress(hOpenGL, "glTexCoord3s");
  717.                 *(FARPROC *)&qglTexCoord3sv = GetProcAddress(hOpenGL, "glTexCoord3sv");
  718.                 *(FARPROC *)&qglTexCoord4d = GetProcAddress(hOpenGL, "glTexCoord4d");
  719.                 *(FARPROC *)&qglTexCoord4dv = GetProcAddress(hOpenGL, "glTexCoord4dv");
  720.                 *(FARPROC *)&qglTexCoord4f = GetProcAddress(hOpenGL, "glTexCoord4f");
  721.                 *(FARPROC *)&qglTexCoord4fv = GetProcAddress(hOpenGL, "glTexCoord4fv");
  722.                 *(FARPROC *)&qglTexCoord4i = GetProcAddress(hOpenGL, "glTexCoord4i");
  723.                 *(FARPROC *)&qglTexCoord4iv = GetProcAddress(hOpenGL, "glTexCoord4iv");
  724.                 *(FARPROC *)&qglTexCoord4s = GetProcAddress(hOpenGL, "glTexCoord4s");
  725.                 *(FARPROC *)&qglTexCoord4sv = GetProcAddress(hOpenGL, "glTexCoord4sv");
  726.                 *(FARPROC *)&qglTexCoordPointer = GetProcAddress(hOpenGL, "glTexCoordPointer");
  727.                 *(FARPROC *)&qglTexEnvf = GetProcAddress(hOpenGL, "glTexEnvf");
  728.                 *(FARPROC *)&qglTexEnvfv = GetProcAddress(hOpenGL, "glTexEnvfv");
  729.                 *(FARPROC *)&qglTexEnvi = GetProcAddress(hOpenGL, "glTexEnvi");
  730.                 *(FARPROC *)&qglTexEnviv = GetProcAddress(hOpenGL, "glTexEnviv");
  731.                 *(FARPROC *)&qglTexGend = GetProcAddress(hOpenGL, "glTexGend");
  732.                 *(FARPROC *)&qglTexGendv = GetProcAddress(hOpenGL, "glTexGendv");
  733.                 *(FARPROC *)&qglTexGenf = GetProcAddress(hOpenGL, "glTexGenf");
  734.                 *(FARPROC *)&qglTexGenfv = GetProcAddress(hOpenGL, "glTexGenfv");
  735.                 *(FARPROC *)&qglTexGeni = GetProcAddress(hOpenGL, "glTexGeni");
  736.                 *(FARPROC *)&qglTexGeniv = GetProcAddress(hOpenGL, "glTexGeniv");
  737.                 *(FARPROC *)&qglTexImage1D = GetProcAddress(hOpenGL, "glTexImage1D");
  738.                 *(FARPROC *)&qglTexImage2D = GetProcAddress(hOpenGL, "glTexImage2D");
  739.                 *(FARPROC *)&qglTexParameterf = GetProcAddress(hOpenGL, "glTexParameterf");
  740.                 *(FARPROC *)&qglTexParameterfv = GetProcAddress(hOpenGL, "glTexParameterfv");
  741.                 *(FARPROC *)&qglTexParameteri = GetProcAddress(hOpenGL, "glTexParameteri");
  742.                 *(FARPROC *)&qglTexParameteriv = GetProcAddress(hOpenGL, "glTexParameteriv");
  743.                 *(FARPROC *)&qglTexSubImage1D = GetProcAddress(hOpenGL, "glTexSubImage1D");
  744.                 *(FARPROC *)&qglTexSubImage2D = GetProcAddress(hOpenGL, "glTexSubImage2D");
  745.                 *(FARPROC *)&qglTranslated = GetProcAddress(hOpenGL, "glTranslated");
  746.                 *(FARPROC *)&qglTranslatef = GetProcAddress(hOpenGL, "glTranslatef");
  747.                 *(FARPROC *)&qglVertex2d = GetProcAddress(hOpenGL, "glVertex2d");
  748.                 *(FARPROC *)&qglVertex2dv = GetProcAddress(hOpenGL, "glVertex2dv");
  749.                 *(FARPROC *)&qglVertex2f = GetProcAddress(hOpenGL, "glVertex2f");
  750.                 *(FARPROC *)&qglVertex2fv = GetProcAddress(hOpenGL, "glVertex2fv");
  751.                 *(FARPROC *)&qglVertex2i = GetProcAddress(hOpenGL, "glVertex2i");
  752.                 *(FARPROC *)&qglVertex2iv = GetProcAddress(hOpenGL, "glVertex2iv");
  753.                 *(FARPROC *)&qglVertex2s = GetProcAddress(hOpenGL, "glVertex2s");
  754.                 *(FARPROC *)&qglVertex2sv = GetProcAddress(hOpenGL, "glVertex2sv");
  755.                 *(FARPROC *)&qglVertex3d = GetProcAddress(hOpenGL, "glVertex3d");
  756.                 *(FARPROC *)&qglVertex3dv = GetProcAddress(hOpenGL, "glVertex3dv");
  757.                 *(FARPROC *)&qglVertex3f = GetProcAddress(hOpenGL, "glVertex3f");
  758.                 *(FARPROC *)&qglVertex3fv = GetProcAddress(hOpenGL, "glVertex3fv");
  759.                 *(FARPROC *)&qglVertex3i = GetProcAddress(hOpenGL, "glVertex3i");
  760.                 *(FARPROC *)&qglVertex3iv = GetProcAddress(hOpenGL, "glVertex3iv");
  761.                 *(FARPROC *)&qglVertex3s = GetProcAddress(hOpenGL, "glVertex3s");
  762.                 *(FARPROC *)&qglVertex3sv = GetProcAddress(hOpenGL, "glVertex3sv");
  763.                 *(FARPROC *)&qglVertex4d = GetProcAddress(hOpenGL, "glVertex4d");
  764.                 *(FARPROC *)&qglVertex4dv = GetProcAddress(hOpenGL, "glVertex4dv");
  765.                 *(FARPROC *)&qglVertex4f = GetProcAddress(hOpenGL, "glVertex4f");
  766.                 *(FARPROC *)&qglVertex4fv = GetProcAddress(hOpenGL, "glVertex4fv");
  767.                 *(FARPROC *)&qglVertex4i = GetProcAddress(hOpenGL, "glVertex4i");
  768.                 *(FARPROC *)&qglVertex4iv = GetProcAddress(hOpenGL, "glVertex4iv");
  769.                 *(FARPROC *)&qglVertex4s = GetProcAddress(hOpenGL, "glVertex4s");
  770.                 *(FARPROC *)&qglVertex4sv = GetProcAddress(hOpenGL, "glVertex4sv");
  771.                 *(FARPROC *)&qglVertexPointer = GetProcAddress(hOpenGL, "glVertexPointer");
  772.                 *(FARPROC *)&qglViewport = GetProcAddress(hOpenGL, "glViewport");

  773.                 *(FARPROC *)&qwglCopyContext = GetProcAddress(hOpenGL, "wglCopyContext");
  774.                 *(FARPROC *)&qwglCreateContext = GetProcAddress(hOpenGL, "wglCreateContext");
  775.                 *(FARPROC *)&qwglCreateLayerContext = GetProcAddress(hOpenGL, "wglCreateLayerContext");
  776.                 *(FARPROC *)&qwglDeleteContext = GetProcAddress(hOpenGL, "wglDeleteContext");
  777.                 *(FARPROC *)&qwglDescribeLayerPlane = GetProcAddress(hOpenGL, "wglDescribeLayerPlane");
  778.                 *(FARPROC *)&qwglGetCurrentContext = GetProcAddress(hOpenGL, "wglGetCurrentContext");
  779.                 *(FARPROC *)&qwglGetCurrentDC = GetProcAddress(hOpenGL, "wglGetCurrentDC");
  780.                 *(FARPROC *)&qwglGetLayerPaletteEntries = GetProcAddress(hOpenGL, "wglGetLayerPaletteEntries");
  781.                 *(FARPROC *)&qwglGetProcAddress = GetProcAddress(hOpenGL, "wglGetProcAddress");
  782.                 *(FARPROC *)&qwglMakeCurrent = GetProcAddress(hOpenGL, "wglMakeCurrent");
  783.                 *(FARPROC *)&qwglRealizeLayerPalette = GetProcAddress(hOpenGL, "wglRealizeLayerPalette");
  784.                 *(FARPROC *)&qwglSetLayerPaletteEntries = GetProcAddress(hOpenGL, "wglSetLayerPaletteEntries");
  785.                 *(FARPROC *)&qwglShareLists = GetProcAddress(hOpenGL, "wglShareLists");
  786.                 *(FARPROC *)&qwglSwapLayerBuffers = GetProcAddress(hOpenGL, "wglSwapLayerBuffers");
  787.                 *(FARPROC *)&qwglUseFontBitmaps = GetProcAddress(hOpenGL, "wglUseFontBitmapsA");
  788.                 *(FARPROC *)&qwglUseFontOutlines = GetProcAddress(hOpenGL, "wglUseFontOutlinesA");

  789.                 *(FARPROC *)&qwglChoosePixelFormat = GetProcAddress(hOpenGL, "wglChoosePixelFormat");
  790.                 *(FARPROC *)&qwglDescribePixelFormat = GetProcAddress(hOpenGL, "wglDescribePixelFormat");
  791.                 *(FARPROC *)&qwglGetPixelFormat = GetProcAddress(hOpenGL, "wglGetPixelFormat");
  792.                 *(FARPROC *)&qwglSetPixelFormat = GetProcAddress(hOpenGL, "wglSetPixelFormat");
  793.                 *(FARPROC *)&qwglSwapBuffers = GetProcAddress(hOpenGL, "wglSwapBuffers");

  794.                 *(FARPROC *)&qwglSwapIntervalEXT = qwglGetProcAddress("wglSwapIntervalEXT");
  795.         }

  796.         QGL_InitExtension();
  797. }

  798. qboolean gl_framebuffer_object = false;
  799. qboolean gl_shader_support = false;
  800. qboolean gl_program_support = false;
  801. qboolean gl_msaa_support = false;
  802. qboolean gl_msaa_blit_support = false;
  803. qboolean gl_csaa_support = false;
  804. qboolean gl_float_buffer_support = false;
  805. void QGL_InitExtension(void)
  806. {
  807.         const char *extension = (const char *)qglGetString(GL_EXTENSIONS);

  808.         if (strstr(extension, "GL_ARB_multitexture"))
  809.         {
  810.                 qglActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)qwglGetProcAddress("glActiveTextureARB");
  811.                 qglClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)qwglGetProcAddress("glClientActiveTextureARB");
  812.                 qglMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC)qwglGetProcAddress("glMultiTexCoord2fARB");
  813.                 qglMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC)qwglGetProcAddress("glMultiTexCoord3fARB");

  814.                 //qglGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_mtexable);
  815.         }

  816.         if (strstr(extension, "GL_ARB_vertex_buffer_object"))
  817.         {
  818.                 qglBindBufferARB = (PFNGLBINDBUFFERARBPROC)qwglGetProcAddress("glBindBufferARB");
  819.                 qglGenBuffersARB = (PFNGLGENBUFFERSARBPROC)qwglGetProcAddress("glGenBuffersARB");
  820.                 qglBufferDataARB = (PFNGLBUFFERDATAARBPROC)qwglGetProcAddress("glBufferDataARB");
  821.                 qglDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)qwglGetProcAddress("glDeleteBuffersARB");
  822.         }

  823.         if (strstr(extension, "GL_EXT_compiled_vertex_array"))
  824.         {
  825.                 qglLockArraysEXT = (PFNGLLOCKARRAYSEXTPROC)qwglGetProcAddress("glLockArraysEXT");
  826.                 qglUnlockArraysEXT = (PFNGLUNLOCKARRAYSEXTPROC)qwglGetProcAddress("glUnlockArraysEXT");
  827.         }

  828.         if (strstr(extension, "GL_EXT_texture3D"))
  829.         {
  830.                 qglTexImage3DEXT = (PFNGLTEXIMAGE3DEXTPROC)qwglGetProcAddress("glTexImage3DEXT");
  831.         }

  832.         if (strstr(extension, "GL_ARB_vertex_program") && strstr(extension, "GL_ARB_fragment_program"))
  833.         {
  834.                 qglGenProgramsARB = (PFNGLGENPROGRAMSARBPROC)qwglGetProcAddress("glGenProgramsARB");
  835.                 qglBindProgramARB = (PFNGLBINDPROGRAMARBPROC)qwglGetProcAddress("glBindProgramARB");
  836.                 qglProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC)qwglGetProcAddress("glProgramStringARB");
  837.                 qglGetProgramivARB = (PFNGLGETPROGRAMIVARBPROC)qwglGetProcAddress("glGetProgramivARB");
  838.                 qglProgramLocalParameter4fARB = (PFNGLPROGRAMLOCALPARAMETER4FARBPROC)qwglGetProcAddress("glProgramLocalParameter4fARB");
  839.                 qglProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC)qwglGetProcAddress("glProgramEnvParameter4fARB");
  840.                 qglDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC)qwglGetProcAddress("glDeleteProgramsARB");

  841.                 gl_program_support = true;
  842.         }

  843.         if (strstr(extension, "GL_ARB_shader_objects") && strstr(extension, "GL_ARB_vertex_shader") && strstr(extension, "GL_ARB_fragment_shader"))
  844.         {
  845.                 qglCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)qwglGetProcAddress("glCreateShaderObjectARB");
  846.                 qglDetachObjectARB = (PFNGLDETACHOBJECTARBPROC)qwglGetProcAddress("glDetachObjectARB");
  847.                 qglDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC)qwglGetProcAddress("glDeleteObjectARB");
  848.                 qglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)qwglGetProcAddress("glShaderSourceARB");
  849.                 qglCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)qwglGetProcAddress("glCompileShaderARB");
  850.                 qglCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)qwglGetProcAddress("glCreateProgramObjectARB");
  851.                 qglAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)qwglGetProcAddress("glAttachObjectARB");
  852.                 qglLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)qwglGetProcAddress("glLinkProgramARB");
  853.                 qglUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)qwglGetProcAddress("glUseProgramObjectARB");
  854.                 qglGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC)qwglGetProcAddress("glGetUniformLocationARB");

  855.                 qglUniform1iARB = (PFNGLUNIFORM1IARBPROC)qwglGetProcAddress("glUniform1iARB");
  856.                 qglUniform2iARB = (PFNGLUNIFORM2IARBPROC)qwglGetProcAddress("glUniform2iARB");
  857.                 qglUniform3iARB = (PFNGLUNIFORM3IARBPROC)qwglGetProcAddress("glUniform3iARB");
  858.                 qglUniform4iARB = (PFNGLUNIFORM4IARBPROC)qwglGetProcAddress("glUniform4iARB");
  859.                 qglUniform1fARB = (PFNGLUNIFORM1FARBPROC)qwglGetProcAddress("glUniform1fARB");
  860.                 qglUniform2fARB = (PFNGLUNIFORM2FARBPROC)qwglGetProcAddress("glUniform2fARB");
  861.                 qglUniform3fARB = (PFNGLUNIFORM3FARBPROC)qwglGetProcAddress("glUniform3fARB");
  862.                 qglUniform4fARB = (PFNGLUNIFORM4FARBPROC)qwglGetProcAddress("glUniform4fARB");
  863.                 qglUniform3fvARB = (PFNGLUNIFORM3FVARBPROC)qwglGetProcAddress("glUniform3fvARB");
  864.                 qglUniform4fvARB = (PFNGLUNIFORM4FVARBPROC)qwglGetProcAddress("glUniform4fvARB");

  865.                 qglGetShaderiv = (PFNGLGETSHADERIVPROC)qwglGetProcAddress("glGetShaderiv");
  866.                 qglGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)qwglGetProcAddress("glGetShaderInfoLog");
  867.                 qglGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)qwglGetProcAddress("glGetInfoLogARB");
  868.                 qglGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)qwglGetProcAddress("glGetAttribLocationARB");
  869.                 qglVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)qwglGetProcAddress("glVertexAttrib3f");
  870.                 qglVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)qwglGetProcAddress("glVertexAttrib3fv");

  871.                 gl_shader_support = true;
  872.         }

  873.         if (strstr(extension, "GL_ARB_texture_compression"))
  874.         {
  875.                 qglCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)qwglGetProcAddress("glCompressedTexImage2DARB");
  876.         }

  877.         if (strstr(extension, "GL_EXT_framebuffer_object"))
  878.         {
  879.                 qglDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)qwglGetProcAddress("glDeleteFramebuffersEXT");
  880.                 qglDeleteRenderbuffersEXT = (PFNGLDELETERENDERBUFFERSEXTPROC)qwglGetProcAddress("glDeleteRenderbuffersEXT");
  881.                 qglGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)qwglGetProcAddress("glGenFramebuffersEXT");
  882.                 qglBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)qwglGetProcAddress("glBindFramebufferEXT");
  883.                 qglGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC)qwglGetProcAddress("glGenRenderbuffersEXT");
  884.                 qglBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC)qwglGetProcAddress("glBindRenderbufferEXT");
  885.                 qglFramebufferRenderbufferEXT = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)qwglGetProcAddress("glFramebufferRenderbufferEXT");
  886.                 qglCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)qwglGetProcAddress("glCheckFramebufferStatusEXT");
  887.                 qglRenderbufferStorageEXT = (PFNGLRENDERBUFFERSTORAGEEXTPROC)qwglGetProcAddress("glRenderbufferStorageEXT");
  888.                 qglFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)qwglGetProcAddress("glFramebufferTexture2DEXT");

  889.                 gl_framebuffer_object = true;
  890.         }

  891.         if (strstr(extension, "GL_EXT_framebuffer_multisample"))
  892.         {
  893.                 qglRenderbufferStorageMultisampleEXT = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)qwglGetProcAddress("glRenderbufferStorageMultisampleEXT");
  894.                 gl_msaa_support = true;
  895.         }

  896.         if (strstr(extension, "GL_EXT_framebuffer_blit"))
  897.         {
  898.                 qglBlitFramebufferEXT = (PFNGLBLITFRAMEBUFFEREXTPROC)qwglGetProcAddress("glBlitFramebufferEXT");
  899.         }

  900.         if (strstr(extension, "GL_EXT_framebuffer_multisample_blit_scaled"))
  901.         {
  902.                 gl_msaa_blit_support = true;
  903.         }

  904.         if(strstr(extension, "GL_NV_framebuffer_multisample_coverage"))
  905.         {
  906.                 gl_csaa_support = true;
  907.                 qglRenderbufferStorageMultisampleCoverageNV = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC)qwglGetProcAddress("glRenderbufferStorageMultisampleCoverageNV");
  908.         }

  909.         if(strstr(extension, "GL_NV_float_buffer"))
  910.         {
  911.                 gl_float_buffer_support = true;;
  912.         }
  913. }
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|ESFKAMI    

GMT+8, 2017-10-19 04:10 , Processed in 0.415302 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表