Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
16 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: glapi.h
  3. *
  4. * OpenGL API function table indices and cached fast dispatch table
  5. *
  6. * Created: 12/27/1993
  7. * Author: Hock San Lee [hockl]
  8. *
  9. * Copyright (c) 1993 Microsoft Corporation
  10. \**************************************************************************/
  11. #ifndef __GLAPI_H__
  12. #define __GLAPI_H__
  13. // Opengl dispatch table indices
  14. #include "dispindx.h"
  15. // OpenGL fast function dispatch table in the TEB's glDispatchTable field.
  16. // These cached functions have less overhead because we can avoid
  17. // dereferencing the dispatch table pointer stored in the TEB (save one
  18. // level of indirection).
  19. //
  20. // NOTE: If you modify the table, you also need to modify the above fast
  21. // indices.
  22. typedef struct _GLDISPATCHTABLE_FAST {
  23. void (APIENTRY *glCallList )( GLuint list );
  24. void (APIENTRY *glCallLists )( GLsizei n, GLenum type, const GLvoid *lists );
  25. void (APIENTRY *glBegin )( GLenum mode );
  26. void (APIENTRY *glColor3b )( GLbyte red, GLbyte green, GLbyte blue );
  27. void (APIENTRY *glColor3bv )( const GLbyte *v );
  28. void (APIENTRY *glColor3d )( GLdouble red, GLdouble green, GLdouble blue );
  29. void (APIENTRY *glColor3dv )( const GLdouble *v );
  30. void (APIENTRY *glColor3f )( GLfloat red, GLfloat green, GLfloat blue );
  31. void (APIENTRY *glColor3fv )( const GLfloat *v );
  32. void (APIENTRY *glColor3i )( GLint red, GLint green, GLint blue );
  33. void (APIENTRY *glColor3iv )( const GLint *v );
  34. void (APIENTRY *glColor3s )( GLshort red, GLshort green, GLshort blue );
  35. void (APIENTRY *glColor3sv )( const GLshort *v );
  36. void (APIENTRY *glColor3ub )( GLubyte red, GLubyte green, GLubyte blue );
  37. void (APIENTRY *glColor3ubv )( const GLubyte *v );
  38. void (APIENTRY *glColor3ui )( GLuint red, GLuint green, GLuint blue );
  39. void (APIENTRY *glColor3uiv )( const GLuint *v );
  40. void (APIENTRY *glColor3us )( GLushort red, GLushort green, GLushort blue );
  41. void (APIENTRY *glColor3usv )( const GLushort *v );
  42. void (APIENTRY *glColor4b )( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha );
  43. void (APIENTRY *glColor4bv )( const GLbyte *v );
  44. void (APIENTRY *glColor4d )( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha );
  45. void (APIENTRY *glColor4dv )( const GLdouble *v );
  46. void (APIENTRY *glColor4f )( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
  47. void (APIENTRY *glColor4fv )( const GLfloat *v );
  48. void (APIENTRY *glColor4i )( GLint red, GLint green, GLint blue, GLint alpha );
  49. void (APIENTRY *glColor4iv )( const GLint *v );
  50. void (APIENTRY *glColor4s )( GLshort red, GLshort green, GLshort blue, GLshort alpha );
  51. void (APIENTRY *glColor4sv )( const GLshort *v );
  52. void (APIENTRY *glColor4ub )( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
  53. void (APIENTRY *glColor4ubv )( const GLubyte *v );
  54. void (APIENTRY *glColor4ui )( GLuint red, GLuint green, GLuint blue, GLuint alpha );
  55. void (APIENTRY *glColor4uiv )( const GLuint *v );
  56. void (APIENTRY *glColor4us )( GLushort red, GLushort green, GLushort blue, GLushort alpha );
  57. void (APIENTRY *glColor4usv )( const GLushort *v );
  58. void (APIENTRY *glEdgeFlag )( GLboolean flag );
  59. void (APIENTRY *glEdgeFlagv )( const GLboolean *flag );
  60. void (APIENTRY *glEnd )( void );
  61. void (APIENTRY *glIndexd )( GLdouble c );
  62. void (APIENTRY *glIndexdv )( const GLdouble *c );
  63. void (APIENTRY *glIndexf )( GLfloat c );
  64. void (APIENTRY *glIndexfv )( const GLfloat *c );
  65. void (APIENTRY *glIndexi )( GLint c );
  66. void (APIENTRY *glIndexiv )( const GLint *c );
  67. void (APIENTRY *glIndexs )( GLshort c );
  68. void (APIENTRY *glIndexsv )( const GLshort *c );
  69. void (APIENTRY *glNormal3b )( GLbyte nx, GLbyte ny, GLbyte nz );
  70. void (APIENTRY *glNormal3bv )( const GLbyte *v );
  71. void (APIENTRY *glNormal3d )( GLdouble nx, GLdouble ny, GLdouble nz );
  72. void (APIENTRY *glNormal3dv )( const GLdouble *v );
  73. void (APIENTRY *glNormal3f )( GLfloat nx, GLfloat ny, GLfloat nz );
  74. void (APIENTRY *glNormal3fv )( const GLfloat *v );
  75. void (APIENTRY *glNormal3i )( GLint nx, GLint ny, GLint nz );
  76. void (APIENTRY *glNormal3iv )( const GLint *v );
  77. void (APIENTRY *glNormal3s )( GLshort nx, GLshort ny, GLshort nz );
  78. void (APIENTRY *glNormal3sv )( const GLshort *v );
  79. void (APIENTRY *glTexCoord1d )( GLdouble s );
  80. void (APIENTRY *glTexCoord1dv )( const GLdouble *v );
  81. void (APIENTRY *glTexCoord1f )( GLfloat s );
  82. void (APIENTRY *glTexCoord1fv )( const GLfloat *v );
  83. void (APIENTRY *glTexCoord1i )( GLint s );
  84. void (APIENTRY *glTexCoord1iv )( const GLint *v );
  85. void (APIENTRY *glTexCoord1s )( GLshort s );
  86. void (APIENTRY *glTexCoord1sv )( const GLshort *v );
  87. void (APIENTRY *glTexCoord2d )( GLdouble s, GLdouble t );
  88. void (APIENTRY *glTexCoord2dv )( const GLdouble *v );
  89. void (APIENTRY *glTexCoord2f )( GLfloat s, GLfloat t );
  90. void (APIENTRY *glTexCoord2fv )( const GLfloat *v );
  91. void (APIENTRY *glTexCoord2i )( GLint s, GLint t );
  92. void (APIENTRY *glTexCoord2iv )( const GLint *v );
  93. void (APIENTRY *glTexCoord2s )( GLshort s, GLshort t );
  94. void (APIENTRY *glTexCoord2sv )( const GLshort *v );
  95. void (APIENTRY *glTexCoord3d )( GLdouble s, GLdouble t, GLdouble r );
  96. void (APIENTRY *glTexCoord3dv )( const GLdouble *v );
  97. void (APIENTRY *glTexCoord3f )( GLfloat s, GLfloat t, GLfloat r );
  98. void (APIENTRY *glTexCoord3fv )( const GLfloat *v );
  99. void (APIENTRY *glTexCoord3i )( GLint s, GLint t, GLint r );
  100. void (APIENTRY *glTexCoord3iv )( const GLint *v );
  101. void (APIENTRY *glTexCoord3s )( GLshort s, GLshort t, GLshort r );
  102. void (APIENTRY *glTexCoord3sv )( const GLshort *v );
  103. void (APIENTRY *glTexCoord4d )( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
  104. void (APIENTRY *glTexCoord4dv )( const GLdouble *v );
  105. void (APIENTRY *glTexCoord4f )( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
  106. void (APIENTRY *glTexCoord4fv )( const GLfloat *v );
  107. void (APIENTRY *glTexCoord4i )( GLint s, GLint t, GLint r, GLint q );
  108. void (APIENTRY *glTexCoord4iv )( const GLint *v );
  109. void (APIENTRY *glTexCoord4s )( GLshort s, GLshort t, GLshort r, GLshort q );
  110. void (APIENTRY *glTexCoord4sv )( const GLshort *v );
  111. void (APIENTRY *glVertex2d )( GLdouble x, GLdouble y );
  112. void (APIENTRY *glVertex2dv )( const GLdouble *v );
  113. void (APIENTRY *glVertex2f )( GLfloat x, GLfloat y );
  114. void (APIENTRY *glVertex2fv )( const GLfloat *v );
  115. void (APIENTRY *glVertex2i )( GLint x, GLint y );
  116. void (APIENTRY *glVertex2iv )( const GLint *v );
  117. void (APIENTRY *glVertex2s )( GLshort x, GLshort y );
  118. void (APIENTRY *glVertex2sv )( const GLshort *v );
  119. void (APIENTRY *glVertex3d )( GLdouble x, GLdouble y, GLdouble z );
  120. void (APIENTRY *glVertex3dv )( const GLdouble *v );
  121. void (APIENTRY *glVertex3f )( GLfloat x, GLfloat y, GLfloat z );
  122. void (APIENTRY *glVertex3fv )( const GLfloat *v );
  123. void (APIENTRY *glVertex3i )( GLint x, GLint y, GLint z );
  124. void (APIENTRY *glVertex3iv )( const GLint *v );
  125. void (APIENTRY *glVertex3s )( GLshort x, GLshort y, GLshort z );
  126. void (APIENTRY *glVertex3sv )( const GLshort *v );
  127. void (APIENTRY *glVertex4d )( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
  128. void (APIENTRY *glVertex4dv )( const GLdouble *v );
  129. void (APIENTRY *glVertex4f )( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
  130. void (APIENTRY *glVertex4fv )( const GLfloat *v );
  131. void (APIENTRY *glVertex4i )( GLint x, GLint y, GLint z, GLint w );
  132. void (APIENTRY *glVertex4iv )( const GLint *v );
  133. void (APIENTRY *glVertex4s )( GLshort x, GLshort y, GLshort z, GLshort w );
  134. void (APIENTRY *glVertex4sv )( const GLshort *v );
  135. void (APIENTRY *glMaterialf )( GLenum face, GLenum pname, GLfloat param );
  136. void (APIENTRY *glMaterialfv )( GLenum face, GLenum pname, const GLfloat *params );
  137. void (APIENTRY *glMateriali )( GLenum face, GLenum pname, GLint param );
  138. void (APIENTRY *glMaterialiv )( GLenum face, GLenum pname, const GLint *params );
  139. void (APIENTRY *glDisable )( GLenum cap );
  140. void (APIENTRY *glEnable )( GLenum cap );
  141. void (APIENTRY *glPopAttrib )( void );
  142. void (APIENTRY *glPushAttrib )( GLbitfield mask );
  143. void (APIENTRY *glEvalCoord1d )( GLdouble u );
  144. void (APIENTRY *glEvalCoord1dv )( const GLdouble *u );
  145. void (APIENTRY *glEvalCoord1f )( GLfloat u );
  146. void (APIENTRY *glEvalCoord1fv )( const GLfloat *u );
  147. void (APIENTRY *glEvalCoord2d )( GLdouble u, GLdouble v );
  148. void (APIENTRY *glEvalCoord2dv )( const GLdouble *u );
  149. void (APIENTRY *glEvalCoord2f )( GLfloat u, GLfloat v );
  150. void (APIENTRY *glEvalCoord2fv )( const GLfloat *u );
  151. void (APIENTRY *glEvalPoint1 )( GLint i );
  152. void (APIENTRY *glEvalPoint2 )( GLint i, GLint j );
  153. void (APIENTRY *glLoadIdentity )( void );
  154. void (APIENTRY *glLoadMatrixf )( const GLfloat *m );
  155. void (APIENTRY *glLoadMatrixd )( const GLdouble *m );
  156. void (APIENTRY *glMatrixMode )( GLenum mode );
  157. void (APIENTRY *glMultMatrixf )( const GLfloat *m );
  158. void (APIENTRY *glMultMatrixd )( const GLdouble *m );
  159. void (APIENTRY *glPopMatrix )( void );
  160. void (APIENTRY *glPushMatrix )( void );
  161. void (APIENTRY *glRotated )( GLdouble angle, GLdouble x, GLdouble y, GLdouble z );
  162. void (APIENTRY *glRotatef )( GLfloat angle, GLfloat x, GLfloat y, GLfloat z );
  163. void (APIENTRY *glScaled )( GLdouble x, GLdouble y, GLdouble z );
  164. void (APIENTRY *glScalef )( GLfloat x, GLfloat y, GLfloat z );
  165. void (APIENTRY *glTranslated )( GLdouble x, GLdouble y, GLdouble z );
  166. void (APIENTRY *glTranslatef )( GLfloat x, GLfloat y, GLfloat z );
  167. void (APIENTRY *glArrayElement )(GLint i);
  168. void (APIENTRY *glBindTexture )(GLenum target, GLuint texture);
  169. void (APIENTRY *glColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  170. void (APIENTRY *glDisableClientState )(GLenum array);
  171. void (APIENTRY *glDrawArrays )(GLenum mode, GLint first, GLsizei count);
  172. void (APIENTRY *glDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  173. void (APIENTRY *glEdgeFlagPointer )(GLsizei stride, const GLvoid* *pointer);
  174. void (APIENTRY *glEnableClientState )(GLenum array);
  175. void (APIENTRY *glIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  176. void (APIENTRY *glIndexub )(GLubyte c);
  177. void (APIENTRY *glIndexubv )(const GLubyte *c);
  178. void (APIENTRY *glInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
  179. void (APIENTRY *glNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  180. void (APIENTRY *glPolygonOffset )(GLfloat factor, GLfloat units);
  181. void (APIENTRY *glTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  182. void (APIENTRY *glVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  183. void (APIENTRY *glGetPointerv )(GLenum pname, GLvoid* *params);
  184. void (APIENTRY *glPopClientAttrib )(void);
  185. void (APIENTRY *glPushClientAttrib )(GLbitfield mask);
  186. void (APIENTRY *glDrawRangeElementsWIN)
  187. (GLenum mode, GLuint start, GLuint end, GLsizei count,
  188. GLenum type, const GLvoid *indices);
  189. void (APIENTRY *glColorTableEXT)
  190. (GLenum target, GLenum internalFormat, GLsizei width, GLenum format,
  191. GLenum type, const GLvoid *data);
  192. void (APIENTRY *glColorSubTableEXT)
  193. (GLenum target, GLsizei start, GLsizei count, GLenum format,
  194. GLenum type, const GLvoid *data);
  195. #ifdef GL_WIN_multiple_textures
  196. void (APIENTRY *glCurrentTextureIndexWIN)
  197. (GLuint index);
  198. void (APIENTRY *glBindNthTextureWIN)
  199. (GLenum index, GLenum target, GLuint texture);
  200. void (APIENTRY *glNthTexCombineFuncWIN)
  201. (GLenum index,
  202. GLenum leftColorFactor, GLenum colorOp, GLenum rightColorFactor,
  203. GLenum leftAlphaFactor, GLenum alphaOp, GLenum rightAlphaFactor);
  204. void (APIENTRY *glMultiTexCoord1fWIN)
  205. (GLbitfield mask, GLfloat s);
  206. void (APIENTRY *glMultiTexCoord1fvWIN)
  207. (GLbitfield mask, const GLfloat *v);
  208. void (APIENTRY *glMultiTexCoord1iWIN)
  209. (GLbitfield mask, GLint s);
  210. void (APIENTRY *glMultiTexCoord1ivWIN)
  211. (GLbitfield mask, const GLint *v);
  212. void (APIENTRY *glMultiTexCoord2fWIN)
  213. (GLbitfield mask, GLfloat s, GLfloat t);
  214. void (APIENTRY *glMultiTexCoord2fvWIN)
  215. (GLbitfield mask, const GLfloat *v);
  216. void (APIENTRY *glMultiTexCoord2iWIN)
  217. (GLbitfield mask, GLint s, GLint t);
  218. void (APIENTRY *glMultiTexCoord2ivWIN)
  219. (GLbitfield mask, const GLint *v);
  220. #endif // GL_WIN_multiple_textures
  221. } GLDISPATCHTABLE_FAST, *PGLDISPATCHTABLE_FAST;
  222. #endif /* !__GLAPI_H__ */