*/
#define GLFUNCS_MACRO \
- X(glAccum, void, (GLenum op, GLfloat value), (op,value), 213, -1, 8) \
- X(glAlphaFunc, void, (GLenum func, GLclampf ref), (func,ref), 240, -1, 8) \
- X(glAreTexturesResident, GLboolean, (GLsizei n, const GLuint *textures, GLboolean *residences), (n,textures,residences), 322, -1, 12) \
- X(glArrayElement, void, (GLint i), (i), 306, 144, 4) \
- X(glBegin, void, (GLenum mode), (mode), 7, 2, 4) \
- X(glBindTexture, void, (GLenum target, GLuint texture), (target,texture), 307, 145, 8) \
- X(glBitmap, void, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap), (width,height,xorig,yorig,xmove,ymove,bitmap), 8, -1, 28) \
- X(glBlendFunc, void, (GLenum sfactor, GLenum dfactor), (sfactor,dfactor), 241, -1, 8) \
- X(glCallList, void, (GLuint list), (list), 2, 0, 4) \
- X(glCallLists, void, (GLsizei n, GLenum type, const GLvoid *lists), (n,type,lists), 3, 1, 12) \
- X(glClear, void, (GLbitfield mask), (mask), 203, -1, 4) \
- X(glClearAccum, void, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red,green,blue,alpha), 204, -1, 16) \
- X(glClearColor, void, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red,green,blue,alpha), 206, -1, 16) \
- X(glClearDepth, void, (GLclampd depth), (depth), 208, -1, 8) \
- X(glClearIndex, void, (GLfloat c), (c), 205, -1, 4) \
- X(glClearStencil, void, (GLint s), (s), 207, -1, 4) \
- X(glClipPlane, void, (GLenum plane, const GLdouble *equation), (plane,equation), 150, -1, 8) \
- X(glColor3b, void, (GLbyte red, GLbyte green, GLbyte blue), (red,green,blue), 9, 3, 12) \
- X(glColor3bv, void, (const GLbyte *v), (v), 10, 4, 4) \
- X(glColor3d, void, (GLdouble red, GLdouble green, GLdouble blue), (red,green,blue), 11, 5, 24) \
- X(glColor3dv, void, (const GLdouble *v), (v), 12, 6, 4) \
- X(glColor3f, void, (GLfloat red, GLfloat green, GLfloat blue), (red,green,blue), 13, 7, 12) \
- X(glColor3fv, void, (const GLfloat *v), (v), 14, 8, 4) \
- X(glColor3i, void, (GLint red, GLint green, GLint blue), (red,green,blue), 15, 9, 12) \
- X(glColor3iv, void, (const GLint *v), (v), 16, 10, 4) \
- X(glColor3s, void, (GLshort red, GLshort green, GLshort blue), (red,green,blue), 17, 11, 12) \
- X(glColor3sv, void, (const GLshort *v), (v), 18, 12, 4) \
- X(glColor3ub, void, (GLubyte red, GLubyte green, GLubyte blue), (red,green,blue), 19, 13, 12) \
- X(glColor3ubv, void, (const GLubyte *v), (v), 20, 14, 4) \
- X(glColor3ui, void, (GLuint red, GLuint green, GLuint blue), (red,green,blue), 21, 15, 12) \
- X(glColor3uiv, void, (const GLuint *v), (v), 22, 16, 4) \
- X(glColor3us, void, (GLushort red, GLushort green, GLushort blue), (red,green,blue), 23, 17, 12) \
- X(glColor3usv, void, (const GLushort *v), (v), 24, 18, 4) \
- X(glColor4b, void, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha), (red,green,blue,alpha), 25, 19, 16) \
- X(glColor4bv, void, (const GLbyte *v), (v), 26, 20, 4) \
- X(glColor4d, void, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha), (red,green,blue,alpha), 27, 21, 32) \
- X(glColor4dv, void, (const GLdouble *v), (v), 28, 22, 4) \
- X(glColor4f, void, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red,green,blue,alpha), 29, 23, 16) \
- X(glColor4fv, void, (const GLfloat *v), (v), 30, 24, 4) \
- X(glColor4i, void, (GLint red, GLint green, GLint blue, GLint alpha), (red,green,blue,alpha), 31, 25, 16) \
- X(glColor4iv, void, (const GLint *v), (v), 32, 26, 4) \
- X(glColor4s, void, (GLshort red, GLshort green, GLshort blue, GLshort alpha), (red,green,blue,alpha), 33, 27, 16) \
- X(glColor4sv, void, (const GLshort *v), (v), 34, 28, 4) \
- X(glColor4ub, void, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red,green,blue,alpha), 35, 29, 16) \
- X(glColor4ubv, void, (const GLubyte *v), (v), 36, 30, 4) \
- X(glColor4ui, void, (GLuint red, GLuint green, GLuint blue, GLuint alpha), (red,green,blue,alpha), 37, 31, 16) \
- X(glColor4uiv, void, (const GLuint *v), (v), 38, 32, 4) \
- X(glColor4us, void, (GLushort red, GLushort green, GLushort blue, GLushort alpha), (red,green,blue,alpha), 39, 33, 16) \
- X(glColor4usv, void, (const GLushort *v), (v), 40, 34, 4) \
- X(glColorMask, void, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha), (red,green,blue,alpha), 210, -1, 16) \
- X(glColorMaterial, void, (GLenum face, GLenum mode), (face,mode), 151, -1, 8) \
- X(glColorPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size,type,stride,pointer), 308, 146, 16) \
- X(glCopyPixels, void, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type), (x,y,width,height,type), 255, -1, 20) \
- X(glCopyTexImage1D, void, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border), (target,level,internalformat,x,y,width,border), 323, -1, 28) \
- X(glCopyTexImage2D, void, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border), (target,level,internalformat,x,y,width,height,border), 324, -1, 32) \
- X(glCopyTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width), (target,level,xoffset,x,y,width), 325, -1, 24) \
- X(glCopyTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target,level,xoffset,yoffset,x,y,width,height), 326, -1, 32) \
- X(glCullFace, void, (GLenum mode), (mode), 152, -1, 4) \
- X(glDeleteLists, void, (GLuint list, GLsizei range), (list,range), 4, -1, 8) \
- X(glDeleteTextures, void, (GLsizei n, const GLuint *textures), (n,textures), 327, -1, 8) \
- X(glDepthFunc, void, (GLenum func), (func), 245, -1, 4) \
- X(glDepthMask, void, (GLboolean flag), (flag), 211, -1, 4) \
- X(glDepthRange, void, (GLclampd zNear, GLclampd zFar), (zNear,zFar), 288, -1, 16) \
- X(glDisable, void, (GLenum cap), (cap), 214, 116, 4) \
- X(glDisableClientState, void, (GLenum array), (array), 309, 147, 4) \
- X(glDrawArrays, void, (GLenum mode, GLint first, GLsizei count), (mode,first,count), 310, 148, 12) \
- X(glDrawBuffer, void, (GLenum mode), (mode), 202, -1, 4) \
- X(glDrawElements, void, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices), (mode,count,type,indices), 311, 149, 16) \
- X(glDrawPixels, void, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (width,height,format,type,pixels), 257, -1, 20) \
- X(glEdgeFlag, void, (GLboolean flag), (flag), 41, 35, 4) \
- X(glEdgeFlagPointer, void, (GLsizei stride, const GLboolean *pointer), (stride,pointer), 312, 150, 8) \
- X(glEdgeFlagv, void, (const GLboolean *flag), (flag), 42, 36, 4) \
- X(glEnable, void, (GLenum cap), (cap), 215, 117, 4) \
- X(glEnableClientState, void, (GLenum array), (array), 313, 151, 4) \
- X(glEnd, void, (void), (), 43, 37, 0) \
- X(glEndList, void, (void), (), 1, -1, 0) \
- X(glEvalCoord1d, void, (GLdouble u), (u), 228, 120, 8) \
- X(glEvalCoord1dv, void, (const GLdouble *u), (u), 229, 121, 4) \
- X(glEvalCoord1f, void, (GLfloat u), (u), 230, 122, 4) \
- X(glEvalCoord1fv, void, (const GLfloat *u), (u), 231, 123, 4) \
- X(glEvalCoord2d, void, (GLdouble u, GLdouble v), (u,v), 232, 124, 16) \
- X(glEvalCoord2dv, void, (const GLdouble *u), (u), 233, 125, 4) \
- X(glEvalCoord2f, void, (GLfloat u, GLfloat v), (u,v), 234, 126, 8) \
- X(glEvalCoord2fv, void, (const GLfloat *u), (u), 235, 127, 4) \
- X(glEvalMesh1, void, (GLenum mode, GLint i1, GLint i2), (mode,i1,i2), 236, -1, 12) \
- X(glEvalMesh2, void, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2), (mode,i1,i2,j1,j2), 238, -1, 20) \
- X(glEvalPoint1, void, (GLint i), (i), 237, 128, 4) \
- X(glEvalPoint2, void, (GLint i, GLint j), (i,j), 239, 129, 8) \
- X(glFeedbackBuffer, void, (GLsizei size, GLenum type, GLfloat *buffer), (size,type,buffer), 194, -1, 12) \
- X(glFinish, void, (void), (), 216, -1, 0) \
- X(glFlush, void, (void), (), 217, -1, 0) \
- X(glFogf, void, (GLenum pname, GLfloat param), (pname,param), 153, -1, 8) \
- X(glFogfv, void, (GLenum pname, const GLfloat *params), (pname,params), 154, -1, 8) \
- X(glFogi, void, (GLenum pname, GLint param), (pname,param), 155, -1, 8) \
- X(glFogiv, void, (GLenum pname, const GLint *params), (pname,params), 156, -1, 8) \
- X(glFrontFace, void, (GLenum mode), (mode), 157, -1, 4) \
- X(glFrustum, void, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar), (left,right,bottom,top,zNear,zFar), 289, -1, 48) \
- X(glGenLists, GLuint, (GLsizei range), (range), 5, -1, 4) \
- X(glGenTextures, void, (GLsizei n, GLuint *textures), (n,textures), 328, -1, 8) \
- X(glGetBooleanv, void, (GLenum pname, GLboolean *params), (pname,params), 258, -1, 8) \
- X(glGetClipPlane, void, (GLenum plane, GLdouble *equation), (plane,equation), 259, -1, 8) \
- X(glGetDoublev, void, (GLenum pname, GLdouble *params), (pname,params), 260, -1, 8) \
- X(glGetError, GLenum, (void), (), 261, -1, 0) \
- X(glGetFloatv, void, (GLenum pname, GLfloat *params), (pname,params), 262, -1, 8) \
- X(glGetIntegerv, void, (GLenum pname, GLint *params), (pname,params), 263, -1, 8) \
- X(glGetLightfv, void, (GLenum light, GLenum pname, GLfloat *params), (light,pname,params), 264, -1, 12) \
- X(glGetLightiv, void, (GLenum light, GLenum pname, GLint *params), (light,pname,params), 265, -1, 12) \
- X(glGetMapdv, void, (GLenum target, GLenum query, GLdouble *v), (target,query,v), 266, -1, 12) \
- X(glGetMapfv, void, (GLenum target, GLenum query, GLfloat *v), (target,query,v), 267, -1, 12) \
- X(glGetMapiv, void, (GLenum target, GLenum query, GLint *v), (target,query,v), 268, -1, 12) \
- X(glGetMaterialfv, void, (GLenum face, GLenum pname, GLfloat *params), (face,pname,params), 269, -1, 12) \
- X(glGetMaterialiv, void, (GLenum face, GLenum pname, GLint *params), (face,pname,params), 270, -1, 12) \
- X(glGetPixelMapfv, void, (GLenum map, GLfloat *values), (map,values), 271, -1, 8) \
- X(glGetPixelMapuiv, void, (GLenum map, GLuint *values), (map,values), 272, -1, 8) \
- X(glGetPixelMapusv, void, (GLenum map, GLushort *values), (map,values), 273, -1, 8) \
- X(glGetPointerv, void, (GLenum pname, GLvoid* *params), (pname,params), 329, 160, 8) \
- X(glGetPolygonStipple, void, (GLubyte *mask), (mask), 274, -1, 4) \
- X(glGetString, const GLubyte *, (GLenum name), (name), 275, -1, 4) \
- X(glGetTexEnvfv, void, (GLenum target, GLenum pname, GLfloat *params), (target,pname,params), 276, -1, 12) \
- X(glGetTexEnviv, void, (GLenum target, GLenum pname, GLint *params), (target,pname,params), 277, -1, 12) \
- X(glGetTexGendv, void, (GLenum coord, GLenum pname, GLdouble *params), (coord,pname,params), 278, -1, 12) \
- X(glGetTexGenfv, void, (GLenum coord, GLenum pname, GLfloat *params), (coord,pname,params), 279, -1, 12) \
- X(glGetTexGeniv, void, (GLenum coord, GLenum pname, GLint *params), (coord,pname,params), 280, -1, 12) \
- X(glGetTexImage, void, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels), (target,level,format,type,pixels), 281, -1, 20) \
- X(glGetTexLevelParameterfv, void, (GLenum target, GLint level, GLenum pname, GLfloat *params), (target,level,pname,params), 284, -1, 16) \
- X(glGetTexLevelParameteriv, void, (GLenum target, GLint level, GLenum pname, GLint *params), (target,level,pname,params), 285, -1, 16) \
- X(glGetTexParameterfv, void, (GLenum target, GLenum pname, GLfloat *params), (target,pname,params), 282, -1, 12) \
- X(glGetTexParameteriv, void, (GLenum target, GLenum pname, GLint *params), (target,pname,params), 283, -1, 12) \
- X(glHint, void, (GLenum target, GLenum mode), (target,mode), 158, -1, 8) \
- X(glIndexMask, void, (GLuint mask), (mask), 212, -1, 4) \
- X(glIndexPointer, void, (GLenum type, GLsizei stride, const GLvoid *pointer), (type,stride,pointer), 314, 152, 12) \
- X(glIndexd, void, (GLdouble c), (c), 44, 38, 8) \
- X(glIndexdv, void, (const GLdouble *c), (c), 45, 39, 4) \
- X(glIndexf, void, (GLfloat c), (c), 46, 40, 4) \
- X(glIndexfv, void, (const GLfloat *c), (c), 47, 41, 4) \
- X(glIndexi, void, (GLint c), (c), 48, 42, 4) \
- X(glIndexiv, void, (const GLint *c), (c), 49, 43, 4) \
- X(glIndexs, void, (GLshort c), (c), 50, 44, 4) \
- X(glIndexsv, void, (const GLshort *c), (c), 51, 45, 4) \
- X(glIndexub, void, (GLubyte c), (c), 315, 153, 4) \
- X(glIndexubv, void, (const GLubyte *c), (c), 316, 154, 4) \
- X(glInitNames, void, (void), (), 197, -1, 0) \
- X(glInterleavedArrays, void, (GLenum format, GLsizei stride, const GLvoid *pointer), (format,stride,pointer), 317, 155, 12) \
- X(glIsEnabled, GLboolean, (GLenum cap), (cap), 286, -1, 4) \
- X(glIsList, GLboolean, (GLuint list), (list), 287, -1, 4) \
- X(glIsTexture, GLboolean, (GLuint texture), (texture), 330, -1, 4) \
- X(glLightModelf, void, (GLenum pname, GLfloat param), (pname,param), 163, -1, 8) \
- X(glLightModelfv, void, (GLenum pname, const GLfloat *params), (pname,params), 164, -1, 8) \
- X(glLightModeli, void, (GLenum pname, GLint param), (pname,param), 165, -1, 8) \
- X(glLightModeliv, void, (GLenum pname, const GLint *params), (pname,params), 166, -1, 8) \
- X(glLightf, void, (GLenum light, GLenum pname, GLfloat param), (light,pname,param), 159, -1, 12) \
- X(glLightfv, void, (GLenum light, GLenum pname, const GLfloat *params), (light,pname,params), 160, -1, 12) \
- X(glLighti, void, (GLenum light, GLenum pname, GLint param), (light,pname,param), 161, -1, 12) \
- X(glLightiv, void, (GLenum light, GLenum pname, const GLint *params), (light,pname,params), 162, -1, 12) \
- X(glLineStipple, void, (GLint factor, GLushort pattern), (factor,pattern), 167, -1, 8) \
- X(glLineWidth, void, (GLfloat width), (width), 168, -1, 4) \
- X(glListBase, void, (GLuint base), (base), 6, -1, 4) \
- X(glLoadIdentity, void, (void), (), 290, 130, 0) \
- X(glLoadMatrixd, void, (const GLdouble *m), (m), 292, 132, 4) \
- X(glLoadMatrixf, void, (const GLfloat *m), (m), 291, 131, 4) \
- X(glLoadName, void, (GLuint name), (name), 198, -1, 4) \
- X(glLogicOp, void, (GLenum opcode), (opcode), 242, -1, 4) \
- X(glMap1d, void, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points), (target,u1,u2,stride,order,points), 220, -1, 32) \
- X(glMap1f, void, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points), (target,u1,u2,stride,order,points), 221, -1, 24) \
- X(glMap2d, void, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points), (target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points), 222, -1, 56) \
- X(glMap2f, void, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points), (target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points), 223, -1, 40) \
- X(glMapGrid1d, void, (GLint un, GLdouble u1, GLdouble u2), (un,u1,u2), 224, -1, 20) \
- X(glMapGrid1f, void, (GLint un, GLfloat u1, GLfloat u2), (un,u1,u2), 225, -1, 12) \
- X(glMapGrid2d, void, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2), (un,u1,u2,vn,v1,v2), 226, -1, 40) \
- X(glMapGrid2f, void, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2), (un,u1,u2,vn,v1,v2), 227, -1, 24) \
- X(glMaterialf, void, (GLenum face, GLenum pname, GLfloat param), (face,pname,param), 169, 112, 12) \
- X(glMaterialfv, void, (GLenum face, GLenum pname, const GLfloat *params), (face,pname,params), 170, 113, 12) \
- X(glMateriali, void, (GLenum face, GLenum pname, GLint param), (face,pname,param), 171, 114, 12) \
- X(glMaterialiv, void, (GLenum face, GLenum pname, const GLint *params), (face,pname,params), 172, 115, 12) \
- X(glMatrixMode, void, (GLenum mode), (mode), 293, 133, 4) \
- X(glMultMatrixd, void, (const GLdouble *m), (m), 295, 135, 4) \
- X(glMultMatrixf, void, (const GLfloat *m), (m), 294, 134, 4) \
- X(glNewList, void, (GLuint list, GLenum mode), (list,mode), 0, -1, 8) \
- X(glNormal3b, void, (GLbyte nx, GLbyte ny, GLbyte nz), (nx,ny,nz), 52, 46, 12) \
- X(glNormal3bv, void, (const GLbyte *v), (v), 53, 47, 4) \
- X(glNormal3d, void, (GLdouble nx, GLdouble ny, GLdouble nz), (nx,ny,nz), 54, 48, 24) \
- X(glNormal3dv, void, (const GLdouble *v), (v), 55, 49, 4) \
- X(glNormal3f, void, (GLfloat nx, GLfloat ny, GLfloat nz), (nx,ny,nz), 56, 50, 12) \
- X(glNormal3fv, void, (const GLfloat *v), (v), 57, 51, 4) \
- X(glNormal3i, void, (GLint nx, GLint ny, GLint nz), (nx,ny,nz), 58, 52, 12) \
- X(glNormal3iv, void, (const GLint *v), (v), 59, 53, 4) \
- X(glNormal3s, void, (GLshort nx, GLshort ny, GLshort nz), (nx,ny,nz), 60, 54, 12) \
- X(glNormal3sv, void, (const GLshort *v), (v), 61, 55, 4) \
- X(glNormalPointer, void, (GLenum type, GLsizei stride, const GLvoid *pointer), (type,stride,pointer), 318, 156, 12) \
- X(glOrtho, void, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar), (left,right,bottom,top,zNear,zFar), 296, -1, 48) \
- X(glPassThrough, void, (GLfloat token), (token), 199, -1, 4) \
- X(glPixelMapfv, void, (GLenum map, GLint mapsize, const GLfloat *values), (map,mapsize,values), 251, -1, 12) \
- X(glPixelMapuiv, void, (GLenum map, GLint mapsize, const GLuint *values), (map,mapsize,values), 252, -1, 12) \
- X(glPixelMapusv, void, (GLenum map, GLint mapsize, const GLushort *values), (map,mapsize,values), 253, -1, 12) \
- X(glPixelStoref, void, (GLenum pname, GLfloat param), (pname,param), 249, -1, 8) \
- X(glPixelStorei, void, (GLenum pname, GLint param), (pname,param), 250, -1, 8) \
- X(glPixelTransferf, void, (GLenum pname, GLfloat param), (pname,param), 247, -1, 8) \
- X(glPixelTransferi, void, (GLenum pname, GLint param), (pname,param), 248, -1, 8) \
- X(glPixelZoom, void, (GLfloat xfactor, GLfloat yfactor), (xfactor,yfactor), 246, -1, 8) \
- X(glPointSize, void, (GLfloat size), (size), 173, -1, 4) \
- X(glPolygonMode, void, (GLenum face, GLenum mode), (face,mode), 174, -1, 8) \
- X(glPolygonOffset, void, (GLfloat factor, GLfloat units), (factor,units), 319, 157, 8) \
- X(glPolygonStipple, void, (const GLubyte *mask), (mask), 175, -1, 4) \
- X(glPopAttrib, void, (void), (), 218, 118, 0) \
- X(glPopClientAttrib, void, (void), (), 334, 161, 0) \
- X(glPopMatrix, void, (void), (), 297, 136, 0) \
- X(glPopName, void, (void), (), 200, -1, 0) \
- X(glPrioritizeTextures, void, (GLsizei n, const GLuint *textures, const GLclampf *priorities), (n,textures,priorities), 331, -1, 12) \
- X(glPushAttrib, void, (GLbitfield mask), (mask), 219, 119, 4) \
- X(glPushClientAttrib, void, (GLbitfield mask), (mask), 335, 162, 4) \
- X(glPushMatrix, void, (void), (), 298, 137, 0) \
- X(glPushName, void, (GLuint name), (name), 201, -1, 4) \
- X(glRasterPos2d, void, (GLdouble x, GLdouble y), (x,y), 62, -1, 16) \
- X(glRasterPos2dv, void, (const GLdouble *v), (v), 63, -1, 4) \
- X(glRasterPos2f, void, (GLfloat x, GLfloat y), (x,y), 64, -1, 8) \
- X(glRasterPos2fv, void, (const GLfloat *v), (v), 65, -1, 4) \
- X(glRasterPos2i, void, (GLint x, GLint y), (x,y), 66, -1, 8) \
- X(glRasterPos2iv, void, (const GLint *v), (v), 67, -1, 4) \
- X(glRasterPos2s, void, (GLshort x, GLshort y), (x,y), 68, -1, 8) \
- X(glRasterPos2sv, void, (const GLshort *v), (v), 69, -1, 4) \
- X(glRasterPos3d, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 70, -1, 24) \
- X(glRasterPos3dv, void, (const GLdouble *v), (v), 71, -1, 4) \
- X(glRasterPos3f, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 72, -1, 12) \
- X(glRasterPos3fv, void, (const GLfloat *v), (v), 73, -1, 4) \
- X(glRasterPos3i, void, (GLint x, GLint y, GLint z), (x,y,z), 74, -1, 12) \
- X(glRasterPos3iv, void, (const GLint *v), (v), 75, -1, 4) \
- X(glRasterPos3s, void, (GLshort x, GLshort y, GLshort z), (x,y,z), 76, -1, 12) \
- X(glRasterPos3sv, void, (const GLshort *v), (v), 77, -1, 4) \
- X(glRasterPos4d, void, (GLdouble x, GLdouble y, GLdouble z, GLdouble w), (x,y,z,w), 78, -1, 32) \
- X(glRasterPos4dv, void, (const GLdouble *v), (v), 79, -1, 4) \
- X(glRasterPos4f, void, (GLfloat x, GLfloat y, GLfloat z, GLfloat w), (x,y,z,w), 80, -1, 16) \
- X(glRasterPos4fv, void, (const GLfloat *v), (v), 81, -1, 4) \
- X(glRasterPos4i, void, (GLint x, GLint y, GLint z, GLint w), (x,y,z,w), 82, -1, 16) \
- X(glRasterPos4iv, void, (const GLint *v), (v), 83, -1, 4) \
- X(glRasterPos4s, void, (GLshort x, GLshort y, GLshort z, GLshort w), (x,y,z,w), 84, -1, 16) \
- X(glRasterPos4sv, void, (const GLshort *v), (v), 85, -1, 4) \
- X(glReadBuffer, void, (GLenum mode), (mode), 254, -1, 4) \
- X(glReadPixels, void, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels), (x,y,width,height,format,type,pixels), 256, -1, 28) \
- X(glRectd, void, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2), (x1,y1,x2,y2), 86, -1, 32) \
- X(glRectdv, void, (const GLdouble *v1, const GLdouble *v2), (v1,v2), 87, -1, 8) \
- X(glRectf, void, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2), (x1,y1,x2,y2), 88, -1, 16) \
- X(glRectfv, void, (const GLfloat *v1, const GLfloat *v2), (v1,v2), 89, -1, 8) \
- X(glRecti, void, (GLint x1, GLint y1, GLint x2, GLint y2), (x1,y1,x2,y2), 90, -1, 16) \
- X(glRectiv, void, (const GLint *v1, const GLint *v2), (v1,v2), 91, -1, 8) \
- X(glRects, void, (GLshort x1, GLshort y1, GLshort x2, GLshort y2), (x1,y1,x2,y2), 92, -1, 16) \
- X(glRectsv, void, (const GLshort *v1, const GLshort *v2), (v1,v2), 93, -1, 8) \
- X(glRenderMode, GLint, (GLenum mode), (mode), 196, -1, 4) \
- X(glRotated, void, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z), (angle,x,y,z), 299, 138, 32) \
- X(glRotatef, void, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle,x,y,z), 300, 139, 16) \
- X(glScaled, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 301, 140, 24) \
- X(glScalef, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 302, 141, 12) \
- X(glScissor, void, (GLint x, GLint y, GLsizei width, GLsizei height), (x,y,width,height), 176, -1, 16) \
- X(glSelectBuffer, void, (GLsizei size, GLuint *buffer), (size,buffer), 195, -1, 8) \
- X(glShadeModel, void, (GLenum mode), (mode), 177, -1, 4) \
- X(glStencilFunc, void, (GLenum func, GLint ref, GLuint mask), (func,ref,mask), 243, -1, 12) \
- X(glStencilMask, void, (GLuint mask), (mask), 209, -1, 4) \
- X(glStencilOp, void, (GLenum fail, GLenum zfail, GLenum zpass), (fail,zfail,zpass), 244, -1, 12) \
- X(glTexCoord1d, void, (GLdouble s), (s), 94, 56, 8) \
- X(glTexCoord1dv, void, (const GLdouble *v), (v), 95, 57, 4) \
- X(glTexCoord1f, void, (GLfloat s), (s), 96, 58, 4) \
- X(glTexCoord1fv, void, (const GLfloat *v), (v), 97, 59, 4) \
- X(glTexCoord1i, void, (GLint s), (s), 98, 60, 4) \
- X(glTexCoord1iv, void, (const GLint *v), (v), 99, 61, 4) \
- X(glTexCoord1s, void, (GLshort s), (s), 100, 62, 4) \
- X(glTexCoord1sv, void, (const GLshort *v), (v), 101, 63, 4) \
- X(glTexCoord2d, void, (GLdouble s, GLdouble t), (s,t), 102, 64, 16) \
- X(glTexCoord2dv, void, (const GLdouble *v), (v), 103, 65, 4) \
- X(glTexCoord2f, void, (GLfloat s, GLfloat t), (s,t), 104, 66, 8) \
- X(glTexCoord2fv, void, (const GLfloat *v), (v), 105, 67, 4) \
- X(glTexCoord2i, void, (GLint s, GLint t), (s,t), 106, 68, 8) \
- X(glTexCoord2iv, void, (const GLint *v), (v), 107, 69, 4) \
- X(glTexCoord2s, void, (GLshort s, GLshort t), (s,t), 108, 70, 8) \
- X(glTexCoord2sv, void, (const GLshort *v), (v), 109, 71, 4) \
- X(glTexCoord3d, void, (GLdouble s, GLdouble t, GLdouble r), (s,t,r), 110, 72, 24) \
- X(glTexCoord3dv, void, (const GLdouble *v), (v), 111, 73, 4) \
- X(glTexCoord3f, void, (GLfloat s, GLfloat t, GLfloat r), (s,t,r), 112, 74, 12) \
- X(glTexCoord3fv, void, (const GLfloat *v), (v), 113, 75, 4) \
- X(glTexCoord3i, void, (GLint s, GLint t, GLint r), (s,t,r), 114, 76, 12) \
- X(glTexCoord3iv, void, (const GLint *v), (v), 115, 77, 4) \
- X(glTexCoord3s, void, (GLshort s, GLshort t, GLshort r), (s,t,r), 116, 78, 12) \
- X(glTexCoord3sv, void, (const GLshort *v), (v), 117, 79, 4) \
- X(glTexCoord4d, void, (GLdouble s, GLdouble t, GLdouble r, GLdouble q), (s,t,r,q), 118, 80, 32) \
- X(glTexCoord4dv, void, (const GLdouble *v), (v), 119, 81, 4) \
- X(glTexCoord4f, void, (GLfloat s, GLfloat t, GLfloat r, GLfloat q), (s,t,r,q), 120, 82, 16) \
- X(glTexCoord4fv, void, (const GLfloat *v), (v), 121, 83, 4) \
- X(glTexCoord4i, void, (GLint s, GLint t, GLint r, GLint q), (s,t,r,q), 122, 84, 16) \
- X(glTexCoord4iv, void, (const GLint *v), (v), 123, 85, 4) \
- X(glTexCoord4s, void, (GLshort s, GLshort t, GLshort r, GLshort q), (s,t,r,q), 124, 86, 16) \
- X(glTexCoord4sv, void, (const GLshort *v), (v), 125, 87, 4) \
- X(glTexCoordPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size,type,stride,pointer), 320, 158, 16) \
- X(glTexEnvf, void, (GLenum target, GLenum pname, GLfloat param), (target,pname,param), 184, -1, 12) \
- X(glTexEnvfv, void, (GLenum target, GLenum pname, const GLfloat *params), (target,pname,params), 185, -1, 12) \
- X(glTexEnvi, void, (GLenum target, GLenum pname, GLint param), (target,pname,param), 186, -1, 12) \
- X(glTexEnviv, void, (GLenum target, GLenum pname, const GLint *params), (target,pname,params), 187, -1, 12) \
- X(glTexGend, void, (GLenum coord, GLenum pname, GLdouble param), (coord,pname,param), 188, -1, 16) \
- X(glTexGendv, void, (GLenum coord, GLenum pname, const GLdouble *params), (coord,pname,params), 189, -1, 12) \
- X(glTexGenf, void, (GLenum coord, GLenum pname, GLfloat param), (coord,pname,param), 190, -1, 12) \
- X(glTexGenfv, void, (GLenum coord, GLenum pname, const GLfloat *params), (coord,pname,params), 191, -1, 12) \
- X(glTexGeni, void, (GLenum coord, GLenum pname, GLint param), (coord,pname,param), 192, -1, 12) \
- X(glTexGeniv, void, (GLenum coord, GLenum pname, const GLint *params), (coord,pname,params), 193, -1, 12) \
- X(glTexImage1D, void, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels), (target,level,internalformat,width,border,format,type,pixels), 182, -1, 32) \
- X(glTexImage2D, void, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels), (target,level,internalformat,width,height,border,format,type,pixels), 183, -1, 36) \
- X(glTexParameterf, void, (GLenum target, GLenum pname, GLfloat param), (target,pname,param), 178, -1, 12) \
- X(glTexParameterfv, void, (GLenum target, GLenum pname, const GLfloat *params), (target,pname,params), 179, -1, 12) \
- X(glTexParameteri, void, (GLenum target, GLenum pname, GLint param), (target,pname,param), 180, -1, 12) \
- X(glTexParameteriv, void, (GLenum target, GLenum pname, const GLint *params), (target,pname,params), 181, -1, 12) \
- X(glTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels), (target,level,xoffset,width,format,type,pixels), 332, -1, 28) \
- X(glTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (target,level,xoffset,yoffset,width,height,format,type,pixels), 333, -1, 36) \
- X(glTranslated, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 303, 142, 24) \
- X(glTranslatef, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 304, 143, 12) \
- X(glVertex2d, void, (GLdouble x, GLdouble y), (x,y), 126, 88, 16) \
- X(glVertex2dv, void, (const GLdouble *v), (v), 127, 89, 4) \
- X(glVertex2f, void, (GLfloat x, GLfloat y), (x,y), 128, 90, 8) \
- X(glVertex2fv, void, (const GLfloat *v), (v), 129, 91, 4) \
- X(glVertex2i, void, (GLint x, GLint y), (x,y), 130, 92, 8) \
- X(glVertex2iv, void, (const GLint *v), (v), 131, 93, 4) \
- X(glVertex2s, void, (GLshort x, GLshort y), (x,y), 132, 94, 8) \
- X(glVertex2sv, void, (const GLshort *v), (v), 133, 95, 4) \
- X(glVertex3d, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 134, 96, 24) \
- X(glVertex3dv, void, (const GLdouble *v), (v), 135, 97, 4) \
- X(glVertex3f, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 136, 98, 12) \
- X(glVertex3fv, void, (const GLfloat *v), (v), 137, 99, 4) \
- X(glVertex3i, void, (GLint x, GLint y, GLint z), (x,y,z), 138, 100, 12) \
- X(glVertex3iv, void, (const GLint *v), (v), 139, 101, 4) \
- X(glVertex3s, void, (GLshort x, GLshort y, GLshort z), (x,y,z), 140, 102, 12) \
- X(glVertex3sv, void, (const GLshort *v), (v), 141, 103, 4) \
- X(glVertex4d, void, (GLdouble x, GLdouble y, GLdouble z, GLdouble w), (x,y,z,w), 142, 104, 32) \
- X(glVertex4dv, void, (const GLdouble *v), (v), 143, 105, 4) \
- X(glVertex4f, void, (GLfloat x, GLfloat y, GLfloat z, GLfloat w), (x,y,z,w), 144, 106, 16) \
- X(glVertex4fv, void, (const GLfloat *v), (v), 145, 107, 4) \
- X(glVertex4i, void, (GLint x, GLint y, GLint z, GLint w), (x,y,z,w), 146, 108, 16) \
- X(glVertex4iv, void, (const GLint *v), (v), 147, 109, 4) \
- X(glVertex4s, void, (GLshort x, GLshort y, GLshort z, GLshort w), (x,y,z,w), 148, 110, 16) \
- X(glVertex4sv, void, (const GLshort *v), (v), 149, 111, 4) \
- X(glVertexPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size,type,stride,pointer), 321, 159, 16) \
- X(glViewport, void, (GLint x, GLint y, GLsizei width, GLsizei height), (x,y,width,height), 305, -1, 16) \
+ X(glAccum, void, (GLenum op, GLfloat value), (op,value), 213, -1, 8) \
+ X(glAlphaFunc, void, (GLenum func, GLclampf ref), (func,ref), 240, -1, 8) \
+ X(glAreTexturesResident, GLboolean, (GLsizei n, const GLuint *textures, GLboolean *residences), (n,textures,residences), 322, -1, 12) \
+ X(glArrayElement, void, (GLint i), (i), 306, 144, 4) \
+ X(glBegin, void, (GLenum mode), (mode), 7, 2, 4) \
+ X(glBindTexture, void, (GLenum target, GLuint texture), (target,texture), 307, 145, 8) \
+ X(glBitmap, void, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap), (width,height,xorig,yorig,xmove,ymove,bitmap), 8, -1, 28) \
+ X(glBlendFunc, void, (GLenum sfactor, GLenum dfactor), (sfactor,dfactor), 241, -1, 8) \
+ X(glCallList, void, (GLuint list), (list), 2, 0, 4) \
+ X(glCallLists, void, (GLsizei n, GLenum type, const GLvoid *lists), (n,type,lists), 3, 1, 12) \
+ X(glClear, void, (GLbitfield mask), (mask), 203, -1, 4) \
+ X(glClearAccum, void, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red,green,blue,alpha), 204, -1, 16) \
+ X(glClearColor, void, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red,green,blue,alpha), 206, -1, 16) \
+ X(glClearDepth, void, (GLclampd depth), (depth), 208, -1, 8) \
+ X(glClearIndex, void, (GLfloat c), (c), 205, -1, 4) \
+ X(glClearStencil, void, (GLint s), (s), 207, -1, 4) \
+ X(glClipPlane, void, (GLenum plane, const GLdouble *equation), (plane,equation), 150, -1, 8) \
+ X(glColor3b, void, (GLbyte red, GLbyte green, GLbyte blue), (red,green,blue), 9, 3, 12) \
+ X(glColor3bv, void, (const GLbyte *v), (v), 10, 4, 4) \
+ X(glColor3d, void, (GLdouble red, GLdouble green, GLdouble blue), (red,green,blue), 11, 5, 24) \
+ X(glColor3dv, void, (const GLdouble *v), (v), 12, 6, 4) \
+ X(glColor3f, void, (GLfloat red, GLfloat green, GLfloat blue), (red,green,blue), 13, 7, 12) \
+ X(glColor3fv, void, (const GLfloat *v), (v), 14, 8, 4) \
+ X(glColor3i, void, (GLint red, GLint green, GLint blue), (red,green,blue), 15, 9, 12) \
+ X(glColor3iv, void, (const GLint *v), (v), 16, 10, 4) \
+ X(glColor3s, void, (GLshort red, GLshort green, GLshort blue), (red,green,blue), 17, 11, 12) \
+ X(glColor3sv, void, (const GLshort *v), (v), 18, 12, 4) \
+ X(glColor3ub, void, (GLubyte red, GLubyte green, GLubyte blue), (red,green,blue), 19, 13, 12) \
+ X(glColor3ubv, void, (const GLubyte *v), (v), 20, 14, 4) \
+ X(glColor3ui, void, (GLuint red, GLuint green, GLuint blue), (red,green,blue), 21, 15, 12) \
+ X(glColor3uiv, void, (const GLuint *v), (v), 22, 16, 4) \
+ X(glColor3us, void, (GLushort red, GLushort green, GLushort blue), (red,green,blue), 23, 17, 12) \
+ X(glColor3usv, void, (const GLushort *v), (v), 24, 18, 4) \
+ X(glColor4b, void, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha), (red,green,blue,alpha), 25, 19, 16) \
+ X(glColor4bv, void, (const GLbyte *v), (v), 26, 20, 4) \
+ X(glColor4d, void, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha), (red,green,blue,alpha), 27, 21, 32) \
+ X(glColor4dv, void, (const GLdouble *v), (v), 28, 22, 4) \
+ X(glColor4f, void, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red,green,blue,alpha), 29, 23, 16) \
+ X(glColor4fv, void, (const GLfloat *v), (v), 30, 24, 4) \
+ X(glColor4i, void, (GLint red, GLint green, GLint blue, GLint alpha), (red,green,blue,alpha), 31, 25, 16) \
+ X(glColor4iv, void, (const GLint *v), (v), 32, 26, 4) \
+ X(glColor4s, void, (GLshort red, GLshort green, GLshort blue, GLshort alpha), (red,green,blue,alpha), 33, 27, 16) \
+ X(glColor4sv, void, (const GLshort *v), (v), 34, 28, 4) \
+ X(glColor4ub, void, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red,green,blue,alpha), 35, 29, 16) \
+ X(glColor4ubv, void, (const GLubyte *v), (v), 36, 30, 4) \
+ X(glColor4ui, void, (GLuint red, GLuint green, GLuint blue, GLuint alpha), (red,green,blue,alpha), 37, 31, 16) \
+ X(glColor4uiv, void, (const GLuint *v), (v), 38, 32, 4) \
+ X(glColor4us, void, (GLushort red, GLushort green, GLushort blue, GLushort alpha), (red,green,blue,alpha), 39, 33, 16) \
+ X(glColor4usv, void, (const GLushort *v), (v), 40, 34, 4) \
+ X(glColorMask, void, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha), (red,green,blue,alpha), 210, -1, 16) \
+ X(glColorMaterial, void, (GLenum face, GLenum mode), (face,mode), 151, -1, 8) \
+ X(glColorPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size,type,stride,pointer), 308, 146, 16) \
+ X(glCopyPixels, void, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type), (x,y,width,height,type), 255, -1, 20) \
+ X(glCopyTexImage1D, void, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border), (target,level,internalformat,x,y,width,border), 323, -1, 28) \
+ X(glCopyTexImage2D, void, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border), (target,level,internalformat,x,y,width,height,border), 324, -1, 32) \
+ X(glCopyTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width), (target,level,xoffset,x,y,width), 325, -1, 24) \
+ X(glCopyTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target,level,xoffset,yoffset,x,y,width,height), 326, -1, 32) \
+ X(glCullFace, void, (GLenum mode), (mode), 152, -1, 4) \
+ X(glDeleteLists, void, (GLuint list, GLsizei range), (list,range), 4, -1, 8) \
+ X(glDeleteTextures, void, (GLsizei n, const GLuint *textures), (n,textures), 327, -1, 8) \
+ X(glDepthFunc, void, (GLenum func), (func), 245, -1, 4) \
+ X(glDepthMask, void, (GLboolean flag), (flag), 211, -1, 4) \
+ X(glDepthRange, void, (GLclampd zNear, GLclampd zFar), (zNear,zFar), 288, -1, 16) \
+ X(glDisable, void, (GLenum cap), (cap), 214, 116, 4) \
+ X(glDisableClientState, void, (GLenum array), (array), 309, 147, 4) \
+ X(glDrawArrays, void, (GLenum mode, GLint first, GLsizei count), (mode,first,count), 310, 148, 12) \
+ X(glDrawBuffer, void, (GLenum mode), (mode), 202, -1, 4) \
+ X(glDrawElements, void, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices), (mode,count,type,indices), 311, 149, 16) \
+ X(glDrawPixels, void, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (width,height,format,type,pixels), 257, -1, 20) \
+ X(glEdgeFlag, void, (GLboolean flag), (flag), 41, 35, 4) \
+ X(glEdgeFlagPointer, void, (GLsizei stride, const GLboolean *pointer), (stride,pointer), 312, 150, 8) \
+ X(glEdgeFlagv, void, (const GLboolean *flag), (flag), 42, 36, 4) \
+ X(glEnable, void, (GLenum cap), (cap), 215, 117, 4) \
+ X(glEnableClientState, void, (GLenum array), (array), 313, 151, 4) \
+ X(glEnd, void, (void), (), 43, 37, 0) \
+ X(glEndList, void, (void), (), 1, -1, 0) \
+ X(glEvalCoord1d, void, (GLdouble u), (u), 228, 120, 8) \
+ X(glEvalCoord1dv, void, (const GLdouble *u), (u), 229, 121, 4) \
+ X(glEvalCoord1f, void, (GLfloat u), (u), 230, 122, 4) \
+ X(glEvalCoord1fv, void, (const GLfloat *u), (u), 231, 123, 4) \
+ X(glEvalCoord2d, void, (GLdouble u, GLdouble v), (u,v), 232, 124, 16) \
+ X(glEvalCoord2dv, void, (const GLdouble *u), (u), 233, 125, 4) \
+ X(glEvalCoord2f, void, (GLfloat u, GLfloat v), (u,v), 234, 126, 8) \
+ X(glEvalCoord2fv, void, (const GLfloat *u), (u), 235, 127, 4) \
+ X(glEvalMesh1, void, (GLenum mode, GLint i1, GLint i2), (mode,i1,i2), 236, -1, 12) \
+ X(glEvalMesh2, void, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2), (mode,i1,i2,j1,j2), 238, -1, 20) \
+ X(glEvalPoint1, void, (GLint i), (i), 237, 128, 4) \
+ X(glEvalPoint2, void, (GLint i, GLint j), (i,j), 239, 129, 8) \
+ X(glFeedbackBuffer, void, (GLsizei size, GLenum type, GLfloat *buffer), (size,type,buffer), 194, -1, 12) \
+ X(glFinish, void, (void), (), 216, -1, 0) \
+ X(glFlush, void, (void), (), 217, -1, 0) \
+ X(glFogf, void, (GLenum pname, GLfloat param), (pname,param), 153, -1, 8) \
+ X(glFogfv, void, (GLenum pname, const GLfloat *params), (pname,params), 154, -1, 8) \
+ X(glFogi, void, (GLenum pname, GLint param), (pname,param), 155, -1, 8) \
+ X(glFogiv, void, (GLenum pname, const GLint *params), (pname,params), 156, -1, 8) \
+ X(glFrontFace, void, (GLenum mode), (mode), 157, -1, 4) \
+ X(glFrustum, void, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar), (left,right,bottom,top,zNear,zFar), 289, -1, 48) \
+ X(glGenLists, GLuint, (GLsizei range), (range), 5, -1, 4) \
+ X(glGenTextures, void, (GLsizei n, GLuint *textures), (n,textures), 328, -1, 8) \
+ X(glGetBooleanv, void, (GLenum pname, GLboolean *params), (pname,params), 258, -1, 8) \
+ X(glGetClipPlane, void, (GLenum plane, GLdouble *equation), (plane,equation), 259, -1, 8) \
+ X(glGetDoublev, void, (GLenum pname, GLdouble *params), (pname,params), 260, -1, 8) \
+ X(glGetError, GLenum, (void), (), 261, -1, 0) \
+ X(glGetFloatv, void, (GLenum pname, GLfloat *params), (pname,params), 262, -1, 8) \
+ X(glGetIntegerv, void, (GLenum pname, GLint *params), (pname,params), 263, -1, 8) \
+ X(glGetLightfv, void, (GLenum light, GLenum pname, GLfloat *params), (light,pname,params), 264, -1, 12) \
+ X(glGetLightiv, void, (GLenum light, GLenum pname, GLint *params), (light,pname,params), 265, -1, 12) \
+ X(glGetMapdv, void, (GLenum target, GLenum query, GLdouble *v), (target,query,v), 266, -1, 12) \
+ X(glGetMapfv, void, (GLenum target, GLenum query, GLfloat *v), (target,query,v), 267, -1, 12) \
+ X(glGetMapiv, void, (GLenum target, GLenum query, GLint *v), (target,query,v), 268, -1, 12) \
+ X(glGetMaterialfv, void, (GLenum face, GLenum pname, GLfloat *params), (face,pname,params), 269, -1, 12) \
+ X(glGetMaterialiv, void, (GLenum face, GLenum pname, GLint *params), (face,pname,params), 270, -1, 12) \
+ X(glGetPixelMapfv, void, (GLenum map, GLfloat *values), (map,values), 271, -1, 8) \
+ X(glGetPixelMapuiv, void, (GLenum map, GLuint *values), (map,values), 272, -1, 8) \
+ X(glGetPixelMapusv, void, (GLenum map, GLushort *values), (map,values), 273, -1, 8) \
+ X(glGetPointerv, void, (GLenum pname, GLvoid* *params), (pname,params), 329, 160, 8) \
+ X(glGetPolygonStipple, void, (GLubyte *mask), (mask), 274, -1, 4) \
+ X(glGetString, const GLubyte *, (GLenum name), (name), 275, -1, 4) \
+ X(glGetTexEnvfv, void, (GLenum target, GLenum pname, GLfloat *params), (target,pname,params), 276, -1, 12) \
+ X(glGetTexEnviv, void, (GLenum target, GLenum pname, GLint *params), (target,pname,params), 277, -1, 12) \
+ X(glGetTexGendv, void, (GLenum coord, GLenum pname, GLdouble *params), (coord,pname,params), 278, -1, 12) \
+ X(glGetTexGenfv, void, (GLenum coord, GLenum pname, GLfloat *params), (coord,pname,params), 279, -1, 12) \
+ X(glGetTexGeniv, void, (GLenum coord, GLenum pname, GLint *params), (coord,pname,params), 280, -1, 12) \
+ X(glGetTexImage, void, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels), (target,level,format,type,pixels), 281, -1, 20) \
+ X(glGetTexLevelParameterfv, void, (GLenum target, GLint level, GLenum pname, GLfloat *params), (target,level,pname,params), 284, -1, 16) \
+ X(glGetTexLevelParameteriv, void, (GLenum target, GLint level, GLenum pname, GLint *params), (target,level,pname,params), 285, -1, 16) \
+ X(glGetTexParameterfv, void, (GLenum target, GLenum pname, GLfloat *params), (target,pname,params), 282, -1, 12) \
+ X(glGetTexParameteriv, void, (GLenum target, GLenum pname, GLint *params), (target,pname,params), 283, -1, 12) \
+ X(glHint, void, (GLenum target, GLenum mode), (target,mode), 158, -1, 8) \
+ X(glIndexMask, void, (GLuint mask), (mask), 212, -1, 4) \
+ X(glIndexPointer, void, (GLenum type, GLsizei stride, const GLvoid *pointer), (type,stride,pointer), 314, 152, 12) \
+ X(glIndexd, void, (GLdouble c), (c), 44, 38, 8) \
+ X(glIndexdv, void, (const GLdouble *c), (c), 45, 39, 4) \
+ X(glIndexf, void, (GLfloat c), (c), 46, 40, 4) \
+ X(glIndexfv, void, (const GLfloat *c), (c), 47, 41, 4) \
+ X(glIndexi, void, (GLint c), (c), 48, 42, 4) \
+ X(glIndexiv, void, (const GLint *c), (c), 49, 43, 4) \
+ X(glIndexs, void, (GLshort c), (c), 50, 44, 4) \
+ X(glIndexsv, void, (const GLshort *c), (c), 51, 45, 4) \
+ X(glIndexub, void, (GLubyte c), (c), 315, 153, 4) \
+ X(glIndexubv, void, (const GLubyte *c), (c), 316, 154, 4) \
+ X(glInitNames, void, (void), (), 197, -1, 0) \
+ X(glInterleavedArrays, void, (GLenum format, GLsizei stride, const GLvoid *pointer), (format,stride,pointer), 317, 155, 12) \
+ X(glIsEnabled, GLboolean, (GLenum cap), (cap), 286, -1, 4) \
+ X(glIsList, GLboolean, (GLuint list), (list), 287, -1, 4) \
+ X(glIsTexture, GLboolean, (GLuint texture), (texture), 330, -1, 4) \
+ X(glLightModelf, void, (GLenum pname, GLfloat param), (pname,param), 163, -1, 8) \
+ X(glLightModelfv, void, (GLenum pname, const GLfloat *params), (pname,params), 164, -1, 8) \
+ X(glLightModeli, void, (GLenum pname, GLint param), (pname,param), 165, -1, 8) \
+ X(glLightModeliv, void, (GLenum pname, const GLint *params), (pname,params), 166, -1, 8) \
+ X(glLightf, void, (GLenum light, GLenum pname, GLfloat param), (light,pname,param), 159, -1, 12) \
+ X(glLightfv, void, (GLenum light, GLenum pname, const GLfloat *params), (light,pname,params), 160, -1, 12) \
+ X(glLighti, void, (GLenum light, GLenum pname, GLint param), (light,pname,param), 161, -1, 12) \
+ X(glLightiv, void, (GLenum light, GLenum pname, const GLint *params), (light,pname,params), 162, -1, 12) \
+ X(glLineStipple, void, (GLint factor, GLushort pattern), (factor,pattern), 167, -1, 8) \
+ X(glLineWidth, void, (GLfloat width), (width), 168, -1, 4) \
+ X(glListBase, void, (GLuint base), (base), 6, -1, 4) \
+ X(glLoadIdentity, void, (void), (), 290, 130, 0) \
+ X(glLoadMatrixd, void, (const GLdouble *m), (m), 292, 132, 4) \
+ X(glLoadMatrixf, void, (const GLfloat *m), (m), 291, 131, 4) \
+ X(glLoadName, void, (GLuint name), (name), 198, -1, 4) \
+ X(glLogicOp, void, (GLenum opcode), (opcode), 242, -1, 4) \
+ X(glMap1d, void, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points), (target,u1,u2,stride,order,points), 220, -1, 32) \
+ X(glMap1f, void, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points), (target,u1,u2,stride,order,points), 221, -1, 24) \
+ X(glMap2d, void, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points), (target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points), 222, -1, 56) \
+ X(glMap2f, void, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points), (target,u1,u2,ustride,uorder,v1,v2,vstride,vorder,points), 223, -1, 40) \
+ X(glMapGrid1d, void, (GLint un, GLdouble u1, GLdouble u2), (un,u1,u2), 224, -1, 20) \
+ X(glMapGrid1f, void, (GLint un, GLfloat u1, GLfloat u2), (un,u1,u2), 225, -1, 12) \
+ X(glMapGrid2d, void, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2), (un,u1,u2,vn,v1,v2), 226, -1, 40) \
+ X(glMapGrid2f, void, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2), (un,u1,u2,vn,v1,v2), 227, -1, 24) \
+ X(glMaterialf, void, (GLenum face, GLenum pname, GLfloat param), (face,pname,param), 169, 112, 12) \
+ X(glMaterialfv, void, (GLenum face, GLenum pname, const GLfloat *params), (face,pname,params), 170, 113, 12) \
+ X(glMateriali, void, (GLenum face, GLenum pname, GLint param), (face,pname,param), 171, 114, 12) \
+ X(glMaterialiv, void, (GLenum face, GLenum pname, const GLint *params), (face,pname,params), 172, 115, 12) \
+ X(glMatrixMode, void, (GLenum mode), (mode), 293, 133, 4) \
+ X(glMultMatrixd, void, (const GLdouble *m), (m), 295, 135, 4) \
+ X(glMultMatrixf, void, (const GLfloat *m), (m), 294, 134, 4) \
+ X(glNewList, void, (GLuint list, GLenum mode), (list,mode), 0, -1, 8) \
+ X(glNormal3b, void, (GLbyte nx, GLbyte ny, GLbyte nz), (nx,ny,nz), 52, 46, 12) \
+ X(glNormal3bv, void, (const GLbyte *v), (v), 53, 47, 4) \
+ X(glNormal3d, void, (GLdouble nx, GLdouble ny, GLdouble nz), (nx,ny,nz), 54, 48, 24) \
+ X(glNormal3dv, void, (const GLdouble *v), (v), 55, 49, 4) \
+ X(glNormal3f, void, (GLfloat nx, GLfloat ny, GLfloat nz), (nx,ny,nz), 56, 50, 12) \
+ X(glNormal3fv, void, (const GLfloat *v), (v), 57, 51, 4) \
+ X(glNormal3i, void, (GLint nx, GLint ny, GLint nz), (nx,ny,nz), 58, 52, 12) \
+ X(glNormal3iv, void, (const GLint *v), (v), 59, 53, 4) \
+ X(glNormal3s, void, (GLshort nx, GLshort ny, GLshort nz), (nx,ny,nz), 60, 54, 12) \
+ X(glNormal3sv, void, (const GLshort *v), (v), 61, 55, 4) \
+ X(glNormalPointer, void, (GLenum type, GLsizei stride, const GLvoid *pointer), (type,stride,pointer), 318, 156, 12) \
+ X(glOrtho, void, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar), (left,right,bottom,top,zNear,zFar), 296, -1, 48) \
+ X(glPassThrough, void, (GLfloat token), (token), 199, -1, 4) \
+ X(glPixelMapfv, void, (GLenum map, GLint mapsize, const GLfloat *values), (map,mapsize,values), 251, -1, 12) \
+ X(glPixelMapuiv, void, (GLenum map, GLint mapsize, const GLuint *values), (map,mapsize,values), 252, -1, 12) \
+ X(glPixelMapusv, void, (GLenum map, GLint mapsize, const GLushort *values), (map,mapsize,values), 253, -1, 12) \
+ X(glPixelStoref, void, (GLenum pname, GLfloat param), (pname,param), 249, -1, 8) \
+ X(glPixelStorei, void, (GLenum pname, GLint param), (pname,param), 250, -1, 8) \
+ X(glPixelTransferf, void, (GLenum pname, GLfloat param), (pname,param), 247, -1, 8) \
+ X(glPixelTransferi, void, (GLenum pname, GLint param), (pname,param), 248, -1, 8) \
+ X(glPixelZoom, void, (GLfloat xfactor, GLfloat yfactor), (xfactor,yfactor), 246, -1, 8) \
+ X(glPointSize, void, (GLfloat size), (size), 173, -1, 4) \
+ X(glPolygonMode, void, (GLenum face, GLenum mode), (face,mode), 174, -1, 8) \
+ X(glPolygonOffset, void, (GLfloat factor, GLfloat units), (factor,units), 319, 157, 8) \
+ X(glPolygonStipple, void, (const GLubyte *mask), (mask), 175, -1, 4) \
+ X(glPopAttrib, void, (void), (), 218, 118, 0) \
+ X(glPopClientAttrib, void, (void), (), 334, 161, 0) \
+ X(glPopMatrix, void, (void), (), 297, 136, 0) \
+ X(glPopName, void, (void), (), 200, -1, 0) \
+ X(glPrioritizeTextures, void, (GLsizei n, const GLuint *textures, const GLclampf *priorities), (n,textures,priorities), 331, -1, 12) \
+ X(glPushAttrib, void, (GLbitfield mask), (mask), 219, 119, 4) \
+ X(glPushClientAttrib, void, (GLbitfield mask), (mask), 335, 162, 4) \
+ X(glPushMatrix, void, (void), (), 298, 137, 0) \
+ X(glPushName, void, (GLuint name), (name), 201, -1, 4) \
+ X(glRasterPos2d, void, (GLdouble x, GLdouble y), (x,y), 62, -1, 16) \
+ X(glRasterPos2dv, void, (const GLdouble *v), (v), 63, -1, 4) \
+ X(glRasterPos2f, void, (GLfloat x, GLfloat y), (x,y), 64, -1, 8) \
+ X(glRasterPos2fv, void, (const GLfloat *v), (v), 65, -1, 4) \
+ X(glRasterPos2i, void, (GLint x, GLint y), (x,y), 66, -1, 8) \
+ X(glRasterPos2iv, void, (const GLint *v), (v), 67, -1, 4) \
+ X(glRasterPos2s, void, (GLshort x, GLshort y), (x,y), 68, -1, 8) \
+ X(glRasterPos2sv, void, (const GLshort *v), (v), 69, -1, 4) \
+ X(glRasterPos3d, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 70, -1, 24) \
+ X(glRasterPos3dv, void, (const GLdouble *v), (v), 71, -1, 4) \
+ X(glRasterPos3f, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 72, -1, 12) \
+ X(glRasterPos3fv, void, (const GLfloat *v), (v), 73, -1, 4) \
+ X(glRasterPos3i, void, (GLint x, GLint y, GLint z), (x,y,z), 74, -1, 12) \
+ X(glRasterPos3iv, void, (const GLint *v), (v), 75, -1, 4) \
+ X(glRasterPos3s, void, (GLshort x, GLshort y, GLshort z), (x,y,z), 76, -1, 12) \
+ X(glRasterPos3sv, void, (const GLshort *v), (v), 77, -1, 4) \
+ X(glRasterPos4d, void, (GLdouble x, GLdouble y, GLdouble z, GLdouble w), (x,y,z,w), 78, -1, 32) \
+ X(glRasterPos4dv, void, (const GLdouble *v), (v), 79, -1, 4) \
+ X(glRasterPos4f, void, (GLfloat x, GLfloat y, GLfloat z, GLfloat w), (x,y,z,w), 80, -1, 16) \
+ X(glRasterPos4fv, void, (const GLfloat *v), (v), 81, -1, 4) \
+ X(glRasterPos4i, void, (GLint x, GLint y, GLint z, GLint w), (x,y,z,w), 82, -1, 16) \
+ X(glRasterPos4iv, void, (const GLint *v), (v), 83, -1, 4) \
+ X(glRasterPos4s, void, (GLshort x, GLshort y, GLshort z, GLshort w), (x,y,z,w), 84, -1, 16) \
+ X(glRasterPos4sv, void, (const GLshort *v), (v), 85, -1, 4) \
+ X(glReadBuffer, void, (GLenum mode), (mode), 254, -1, 4) \
+ X(glReadPixels, void, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels), (x,y,width,height,format,type,pixels), 256, -1, 28) \
+ X(glRectd, void, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2), (x1,y1,x2,y2), 86, -1, 32) \
+ X(glRectdv, void, (const GLdouble *v1, const GLdouble *v2), (v1,v2), 87, -1, 8) \
+ X(glRectf, void, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2), (x1,y1,x2,y2), 88, -1, 16) \
+ X(glRectfv, void, (const GLfloat *v1, const GLfloat *v2), (v1,v2), 89, -1, 8) \
+ X(glRecti, void, (GLint x1, GLint y1, GLint x2, GLint y2), (x1,y1,x2,y2), 90, -1, 16) \
+ X(glRectiv, void, (const GLint *v1, const GLint *v2), (v1,v2), 91, -1, 8) \
+ X(glRects, void, (GLshort x1, GLshort y1, GLshort x2, GLshort y2), (x1,y1,x2,y2), 92, -1, 16) \
+ X(glRectsv, void, (const GLshort *v1, const GLshort *v2), (v1,v2), 93, -1, 8) \
+ X(glRenderMode, GLint, (GLenum mode), (mode), 196, -1, 4) \
+ X(glRotated, void, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z), (angle,x,y,z), 299, 138, 32) \
+ X(glRotatef, void, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle,x,y,z), 300, 139, 16) \
+ X(glScaled, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 301, 140, 24) \
+ X(glScalef, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 302, 141, 12) \
+ X(glScissor, void, (GLint x, GLint y, GLsizei width, GLsizei height), (x,y,width,height), 176, -1, 16) \
+ X(glSelectBuffer, void, (GLsizei size, GLuint *buffer), (size,buffer), 195, -1, 8) \
+ X(glShadeModel, void, (GLenum mode), (mode), 177, -1, 4) \
+ X(glStencilFunc, void, (GLenum func, GLint ref, GLuint mask), (func,ref,mask), 243, -1, 12) \
+ X(glStencilMask, void, (GLuint mask), (mask), 209, -1, 4) \
+ X(glStencilOp, void, (GLenum fail, GLenum zfail, GLenum zpass), (fail,zfail,zpass), 244, -1, 12) \
+ X(glTexCoord1d, void, (GLdouble s), (s), 94, 56, 8) \
+ X(glTexCoord1dv, void, (const GLdouble *v), (v), 95, 57, 4) \
+ X(glTexCoord1f, void, (GLfloat s), (s), 96, 58, 4) \
+ X(glTexCoord1fv, void, (const GLfloat *v), (v), 97, 59, 4) \
+ X(glTexCoord1i, void, (GLint s), (s), 98, 60, 4) \
+ X(glTexCoord1iv, void, (const GLint *v), (v), 99, 61, 4) \
+ X(glTexCoord1s, void, (GLshort s), (s), 100, 62, 4) \
+ X(glTexCoord1sv, void, (const GLshort *v), (v), 101, 63, 4) \
+ X(glTexCoord2d, void, (GLdouble s, GLdouble t), (s,t), 102, 64, 16) \
+ X(glTexCoord2dv, void, (const GLdouble *v), (v), 103, 65, 4) \
+ X(glTexCoord2f, void, (GLfloat s, GLfloat t), (s,t), 104, 66, 8) \
+ X(glTexCoord2fv, void, (const GLfloat *v), (v), 105, 67, 4) \
+ X(glTexCoord2i, void, (GLint s, GLint t), (s,t), 106, 68, 8) \
+ X(glTexCoord2iv, void, (const GLint *v), (v), 107, 69, 4) \
+ X(glTexCoord2s, void, (GLshort s, GLshort t), (s,t), 108, 70, 8) \
+ X(glTexCoord2sv, void, (const GLshort *v), (v), 109, 71, 4) \
+ X(glTexCoord3d, void, (GLdouble s, GLdouble t, GLdouble r), (s,t,r), 110, 72, 24) \
+ X(glTexCoord3dv, void, (const GLdouble *v), (v), 111, 73, 4) \
+ X(glTexCoord3f, void, (GLfloat s, GLfloat t, GLfloat r), (s,t,r), 112, 74, 12) \
+ X(glTexCoord3fv, void, (const GLfloat *v), (v), 113, 75, 4) \
+ X(glTexCoord3i, void, (GLint s, GLint t, GLint r), (s,t,r), 114, 76, 12) \
+ X(glTexCoord3iv, void, (const GLint *v), (v), 115, 77, 4) \
+ X(glTexCoord3s, void, (GLshort s, GLshort t, GLshort r), (s,t,r), 116, 78, 12) \
+ X(glTexCoord3sv, void, (const GLshort *v), (v), 117, 79, 4) \
+ X(glTexCoord4d, void, (GLdouble s, GLdouble t, GLdouble r, GLdouble q), (s,t,r,q), 118, 80, 32) \
+ X(glTexCoord4dv, void, (const GLdouble *v), (v), 119, 81, 4) \
+ X(glTexCoord4f, void, (GLfloat s, GLfloat t, GLfloat r, GLfloat q), (s,t,r,q), 120, 82, 16) \
+ X(glTexCoord4fv, void, (const GLfloat *v), (v), 121, 83, 4) \
+ X(glTexCoord4i, void, (GLint s, GLint t, GLint r, GLint q), (s,t,r,q), 122, 84, 16) \
+ X(glTexCoord4iv, void, (const GLint *v), (v), 123, 85, 4) \
+ X(glTexCoord4s, void, (GLshort s, GLshort t, GLshort r, GLshort q), (s,t,r,q), 124, 86, 16) \
+ X(glTexCoord4sv, void, (const GLshort *v), (v), 125, 87, 4) \
+ X(glTexCoordPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size,type,stride,pointer), 320, 158, 16) \
+ X(glTexEnvf, void, (GLenum target, GLenum pname, GLfloat param), (target,pname,param), 184, -1, 12) \
+ X(glTexEnvfv, void, (GLenum target, GLenum pname, const GLfloat *params), (target,pname,params), 185, -1, 12) \
+ X(glTexEnvi, void, (GLenum target, GLenum pname, GLint param), (target,pname,param), 186, -1, 12) \
+ X(glTexEnviv, void, (GLenum target, GLenum pname, const GLint *params), (target,pname,params), 187, -1, 12) \
+ X(glTexGend, void, (GLenum coord, GLenum pname, GLdouble param), (coord,pname,param), 188, -1, 16) \
+ X(glTexGendv, void, (GLenum coord, GLenum pname, const GLdouble *params), (coord,pname,params), 189, -1, 12) \
+ X(glTexGenf, void, (GLenum coord, GLenum pname, GLfloat param), (coord,pname,param), 190, -1, 12) \
+ X(glTexGenfv, void, (GLenum coord, GLenum pname, const GLfloat *params), (coord,pname,params), 191, -1, 12) \
+ X(glTexGeni, void, (GLenum coord, GLenum pname, GLint param), (coord,pname,param), 192, -1, 12) \
+ X(glTexGeniv, void, (GLenum coord, GLenum pname, const GLint *params), (coord,pname,params), 193, -1, 12) \
+ X(glTexImage1D, void, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels), (target,level,internalformat,width,border,format,type,pixels), 182, -1, 32) \
+ X(glTexImage2D, void, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels), (target,level,internalformat,width,height,border,format,type,pixels), 183, -1, 36) \
+ X(glTexParameterf, void, (GLenum target, GLenum pname, GLfloat param), (target,pname,param), 178, -1, 12) \
+ X(glTexParameterfv, void, (GLenum target, GLenum pname, const GLfloat *params), (target,pname,params), 179, -1, 12) \
+ X(glTexParameteri, void, (GLenum target, GLenum pname, GLint param), (target,pname,param), 180, -1, 12) \
+ X(glTexParameteriv, void, (GLenum target, GLenum pname, const GLint *params), (target,pname,params), 181, -1, 12) \
+ X(glTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels), (target,level,xoffset,width,format,type,pixels), 332, -1, 28) \
+ X(glTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (target,level,xoffset,yoffset,width,height,format,type,pixels), 333, -1, 36) \
+ X(glTranslated, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 303, 142, 24) \
+ X(glTranslatef, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 304, 143, 12) \
+ X(glVertex2d, void, (GLdouble x, GLdouble y), (x,y), 126, 88, 16) \
+ X(glVertex2dv, void, (const GLdouble *v), (v), 127, 89, 4) \
+ X(glVertex2f, void, (GLfloat x, GLfloat y), (x,y), 128, 90, 8) \
+ X(glVertex2fv, void, (const GLfloat *v), (v), 129, 91, 4) \
+ X(glVertex2i, void, (GLint x, GLint y), (x,y), 130, 92, 8) \
+ X(glVertex2iv, void, (const GLint *v), (v), 131, 93, 4) \
+ X(glVertex2s, void, (GLshort x, GLshort y), (x,y), 132, 94, 8) \
+ X(glVertex2sv, void, (const GLshort *v), (v), 133, 95, 4) \
+ X(glVertex3d, void, (GLdouble x, GLdouble y, GLdouble z), (x,y,z), 134, 96, 24) \
+ X(glVertex3dv, void, (const GLdouble *v), (v), 135, 97, 4) \
+ X(glVertex3f, void, (GLfloat x, GLfloat y, GLfloat z), (x,y,z), 136, 98, 12) \
+ X(glVertex3fv, void, (const GLfloat *v), (v), 137, 99, 4) \
+ X(glVertex3i, void, (GLint x, GLint y, GLint z), (x,y,z), 138, 100, 12) \
+ X(glVertex3iv, void, (const GLint *v), (v), 139, 101, 4) \
+ X(glVertex3s, void, (GLshort x, GLshort y, GLshort z), (x,y,z), 140, 102, 12) \
+ X(glVertex3sv, void, (const GLshort *v), (v), 141, 103, 4) \
+ X(glVertex4d, void, (GLdouble x, GLdouble y, GLdouble z, GLdouble w), (x,y,z,w), 142, 104, 32) \
+ X(glVertex4dv, void, (const GLdouble *v), (v), 143, 105, 4) \
+ X(glVertex4f, void, (GLfloat x, GLfloat y, GLfloat z, GLfloat w), (x,y,z,w), 144, 106, 16) \
+ X(glVertex4fv, void, (const GLfloat *v), (v), 145, 107, 4) \
+ X(glVertex4i, void, (GLint x, GLint y, GLint z, GLint w), (x,y,z,w), 146, 108, 16) \
+ X(glVertex4iv, void, (const GLint *v), (v), 147, 109, 4) \
+ X(glVertex4s, void, (GLshort x, GLshort y, GLshort z, GLshort w), (x,y,z,w), 148, 110, 16) \
+ X(glVertex4sv, void, (const GLshort *v), (v), 149, 111, 4) \
+ X(glVertexPointer, void, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size,type,stride,pointer), 321, 159, 16) \
+ X(glViewport, void, (GLint x, GLint y, GLsizei width, GLsizei height), (x,y,width,height), 305, -1, 16) \
/* EOF */
typedef struct _OPENGL_INFO
{
- DWORD Version; /*!< Driver interface version */
- DWORD DriverVersion; /*!< Driver version */
- WCHAR DriverName[256]; /*!< Driver name */
+ DWORD Version; /*!< Driver interface version */
+ DWORD DriverVersion; /*!< Driver version */
+ WCHAR DriverName[256]; /*!< Driver name */
} OPENGL_INFO, *POPENGL_INFO;
void
ROSGL_AppendContext( GLRC *glrc )
{
- /* synchronize */
- if (WaitForSingleObject( OPENGL32_processdata.glrc_mutex, INFINITE ) ==
- WAIT_FAILED)
- {
- DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
- return; /* FIXME: do we have to expect such an error and handle it? */
- }
-
- if (OPENGL32_processdata.glrc_list == NULL)
- OPENGL32_processdata.glrc_list = glrc;
- else
- {
- GLRC *p = OPENGL32_processdata.glrc_list;
- while (p->next != NULL)
- p = p->next;
- p->next = glrc;
- }
-
- /* release mutex */
- if (!ReleaseMutex( OPENGL32_processdata.glrc_mutex ))
- DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
+ /* synchronize */
+ if (WaitForSingleObject( OPENGL32_processdata.glrc_mutex, INFINITE ) ==
+ WAIT_FAILED)
+ {
+ DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
+ return; /* FIXME: do we have to expect such an error and handle it? */
+ }
+
+ if (OPENGL32_processdata.glrc_list == NULL)
+ OPENGL32_processdata.glrc_list = glrc;
+ else
+ {
+ GLRC *p = OPENGL32_processdata.glrc_list;
+ while (p->next != NULL)
+ p = p->next;
+ p->next = glrc;
+ }
+
+ /* release mutex */
+ if (!ReleaseMutex( OPENGL32_processdata.glrc_mutex ))
+ DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
}
void
ROSGL_RemoveContext( GLRC *glrc )
{
- /* synchronize */
- if (WaitForSingleObject( OPENGL32_processdata.glrc_mutex, INFINITE ) ==
- WAIT_FAILED)
- {
- DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
- return; /* FIXME: do we have to expect such an error and handle it? */
- }
-
- if (glrc == OPENGL32_processdata.glrc_list)
- OPENGL32_processdata.glrc_list = glrc->next;
- else
- {
- GLRC *p = OPENGL32_processdata.glrc_list;
- while (p != NULL)
- {
- if (p->next == glrc)
- {
- p->next = glrc->next;
- break;
- }
- p = p->next;
- }
- if (p == NULL)
- DBGPRINT( "Error: GLRC 0x%08x not found in list!", glrc );
- }
-
- /* release mutex */
- if (!ReleaseMutex( OPENGL32_processdata.glrc_mutex ))
- DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
+ /* synchronize */
+ if (WaitForSingleObject( OPENGL32_processdata.glrc_mutex, INFINITE ) ==
+ WAIT_FAILED)
+ {
+ DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
+ return; /* FIXME: do we have to expect such an error and handle it? */
+ }
+
+ if (glrc == OPENGL32_processdata.glrc_list)
+ OPENGL32_processdata.glrc_list = glrc->next;
+ else
+ {
+ GLRC *p = OPENGL32_processdata.glrc_list;
+ while (p != NULL)
+ {
+ if (p->next == glrc)
+ {
+ p->next = glrc->next;
+ break;
+ }
+ p = p->next;
+ }
+ if (p == NULL)
+ DBGPRINT( "Error: GLRC 0x%08x not found in list!", glrc );
+ }
+
+ /* release mutex */
+ if (!ReleaseMutex( OPENGL32_processdata.glrc_mutex ))
+ DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
}
GLRC *
ROSGL_NewContext(void)
{
- GLRC *glrc;
+ GLRC *glrc;
- /* allocate GLRC */
- glrc = (GLRC*)HeapAlloc( GetProcessHeap(),
- HEAP_ZERO_MEMORY | HEAP_GENERATE_EXCEPTIONS, sizeof (GLRC) );
+ /* allocate GLRC */
+ glrc = (GLRC*)HeapAlloc( GetProcessHeap(),
+ HEAP_ZERO_MEMORY | HEAP_GENERATE_EXCEPTIONS, sizeof (GLRC) );
- /* append to list */
- ROSGL_AppendContext( glrc );
+ /* append to list */
+ ROSGL_AppendContext( glrc );
- return glrc;
+ return glrc;
}
/*! \brief Delete all GLDCDATA with this IDC
VOID
ROSGL_DeleteDCDataForICD( GLDRIVERDATA *icd )
{
- GLDCDATA *p, **pptr;
-
- /* synchronize */
- if (WaitForSingleObject( OPENGL32_processdata.dcdata_mutex, INFINITE ) ==
- WAIT_FAILED)
- {
- DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
- return;
- }
-
- p = OPENGL32_processdata.dcdata_list;
- pptr = &OPENGL32_processdata.dcdata_list;
- while (p != NULL)
- {
- if (p->icd == icd)
- {
- *pptr = p->next;
- OPENGL32_UnloadICD( p->icd );
-
- if (!HeapFree( GetProcessHeap(), 0, p ))
- DBGPRINT( "Warning: HeapFree() on GLDCDATA failed (%d)",
- GetLastError() );
-
- p = *pptr;
- }
- else
- {
- pptr = &p->next;
- p = p->next;
- }
- }
-
- /* release mutex */
- if (!ReleaseMutex( OPENGL32_processdata.dcdata_mutex ))
- DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
+ GLDCDATA *p, **pptr;
+
+ /* synchronize */
+ if (WaitForSingleObject( OPENGL32_processdata.dcdata_mutex, INFINITE ) ==
+ WAIT_FAILED)
+ {
+ DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
+ return;
+ }
+
+ p = OPENGL32_processdata.dcdata_list;
+ pptr = &OPENGL32_processdata.dcdata_list;
+ while (p != NULL)
+ {
+ if (p->icd == icd)
+ {
+ *pptr = p->next;
+ OPENGL32_UnloadICD( p->icd );
+
+ if (!HeapFree( GetProcessHeap(), 0, p ))
+ DBGPRINT( "Warning: HeapFree() on GLDCDATA failed (%d)",
+ GetLastError() );
+
+ p = *pptr;
+ }
+ else
+ {
+ pptr = &p->next;
+ p = p->next;
+ }
+ }
+
+ /* release mutex */
+ if (!ReleaseMutex( OPENGL32_processdata.dcdata_mutex ))
+ DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
}
BOOL
ROSGL_DeleteContext( GLRC *glrc )
{
- /* unload icd */
- if (glrc->icd != NULL)
- ROSGL_DeleteDCDataForICD( glrc->icd );
+ /* unload icd */
+ if (glrc->icd != NULL)
+ ROSGL_DeleteDCDataForICD( glrc->icd );
- /* remove from list */
- ROSGL_RemoveContext( glrc );
+ /* remove from list */
+ ROSGL_RemoveContext( glrc );
- /* free memory */
- HeapFree( GetProcessHeap(), 0, glrc );
+ /* free memory */
+ HeapFree( GetProcessHeap(), 0, glrc );
- return TRUE;
+ return TRUE;
}
BOOL
ROSGL_ContainsContext( GLRC *glrc )
{
- GLRC *p;
- BOOL found = FALSE;
-
- /* synchronize */
- if (WaitForSingleObject( OPENGL32_processdata.glrc_mutex, INFINITE ) ==
- WAIT_FAILED)
- {
- DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
- return FALSE; /* FIXME: do we have to expect such an error and handle it? */
- }
-
- p = OPENGL32_processdata.glrc_list;
- while (p != NULL)
- {
- if (p == glrc)
- {
- found = TRUE;
- break;
- }
- p = p->next;
- }
-
- /* release mutex */
- if (!ReleaseMutex( OPENGL32_processdata.glrc_mutex ))
- DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
-
- return found;
+ GLRC *p;
+ BOOL found = FALSE;
+
+ /* synchronize */
+ if (WaitForSingleObject( OPENGL32_processdata.glrc_mutex, INFINITE ) ==
+ WAIT_FAILED)
+ {
+ DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
+ return FALSE; /* FIXME: do we have to expect such an error and handle it? */
+ }
+
+ p = OPENGL32_processdata.glrc_list;
+ while (p != NULL)
+ {
+ if (p == glrc)
+ {
+ found = TRUE;
+ break;
+ }
+ p = p->next;
+ }
+
+ /* release mutex */
+ if (!ReleaseMutex( OPENGL32_processdata.glrc_mutex ))
+ DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
+
+ return found;
}
GLDCDATA *
ROSGL_GetPrivateDCData( HDC hdc )
{
- GLDCDATA *data;
-
- /* check hdc */
- if (GetObjectType( hdc ) != OBJ_DC && GetObjectType( hdc ) != OBJ_MEMDC)
- {
- DBGPRINT( "Error: hdc is not a DC handle!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* synchronize */
- if (WaitForSingleObject( OPENGL32_processdata.dcdata_mutex, INFINITE ) ==
- WAIT_FAILED)
- {
- DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
- return NULL; /* FIXME: do we have to expect such an error and handle it? */
- }
-
- /* look for data in list */
- data = OPENGL32_processdata.dcdata_list;
- while (data != NULL)
- {
- if (data->hdc == hdc) /* found */
- break;
- data = data->next;
- }
-
- /* allocate new data if not found in list */
- if (data == NULL)
- {
- data = HeapAlloc( GetProcessHeap(),
- HEAP_ZERO_MEMORY | HEAP_GENERATE_EXCEPTIONS,
- sizeof (GLDCDATA) );
- if (data == NULL)
- {
- DBGPRINT( "Error: HeapAlloc() failed (%d)", GetLastError() );
- }
- else
- {
- data->hdc = hdc;
-
- /* append data to list */
- if (OPENGL32_processdata.dcdata_list == NULL)
- OPENGL32_processdata.dcdata_list = data;
- else
- {
- GLDCDATA *p = OPENGL32_processdata.dcdata_list;
- while (p->next != NULL)
- p = p->next;
- p->next = data;
- }
- }
- }
-
- /* release mutex */
- if (!ReleaseMutex( OPENGL32_processdata.dcdata_mutex ))
- DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
-
- return data;
+ GLDCDATA *data;
+
+ /* check hdc */
+ if (GetObjectType( hdc ) != OBJ_DC && GetObjectType( hdc ) != OBJ_MEMDC)
+ {
+ DBGPRINT( "Error: hdc is not a DC handle!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* synchronize */
+ if (WaitForSingleObject( OPENGL32_processdata.dcdata_mutex, INFINITE ) ==
+ WAIT_FAILED)
+ {
+ DBGPRINT( "Error: WaitForSingleObject() failed (%d)", GetLastError() );
+ return NULL; /* FIXME: do we have to expect such an error and handle it? */
+ }
+
+ /* look for data in list */
+ data = OPENGL32_processdata.dcdata_list;
+ while (data != NULL)
+ {
+ if (data->hdc == hdc) /* found */
+ break;
+ data = data->next;
+ }
+
+ /* allocate new data if not found in list */
+ if (data == NULL)
+ {
+ data = HeapAlloc( GetProcessHeap(),
+ HEAP_ZERO_MEMORY | HEAP_GENERATE_EXCEPTIONS,
+ sizeof (GLDCDATA) );
+ if (data == NULL)
+ {
+ DBGPRINT( "Error: HeapAlloc() failed (%d)", GetLastError() );
+ }
+ else
+ {
+ data->hdc = hdc;
+
+ /* append data to list */
+ if (OPENGL32_processdata.dcdata_list == NULL)
+ OPENGL32_processdata.dcdata_list = data;
+ else
+ {
+ GLDCDATA *p = OPENGL32_processdata.dcdata_list;
+ while (p->next != NULL)
+ p = p->next;
+ p->next = data;
+ }
+ }
+ }
+
+ /* release mutex */
+ if (!ReleaseMutex( OPENGL32_processdata.dcdata_mutex ))
+ DBGPRINT( "Error: ReleaseMutex() failed (%d)", GetLastError() );
+
+ return data;
}
GLDRIVERDATA *
ROSGL_ICDForHDC( HDC hdc )
{
- GLDCDATA *dcdata;
- GLDRIVERDATA *drvdata;
-
- dcdata = ROSGL_GetPrivateDCData( hdc );
- if (dcdata == NULL)
- return NULL;
-
- if (dcdata->icd == NULL)
- {
- LPCWSTR driverName;
- OPENGL_INFO info;
-
- /* NOTE: This might be done by multiple threads simultaneously, but only the fastest
- actually gets to set the ICD! */
-
- driverName = _wgetenv( L"OPENGL32_DRIVER" );
- if (driverName == NULL)
- {
- DWORD dwInput;
- LONG ret;
-
- /* get driver name */
- dwInput = OPENGL_GETINFO;
- ret = ExtEscape( hdc, QUERYESCSUPPORT, sizeof (dwInput), (LPCSTR)&dwInput, 0, NULL );
- if (ret > 0)
- {
- dwInput = 0;
- ret = ExtEscape( hdc, OPENGL_GETINFO, sizeof (dwInput),
- (LPCSTR)&dwInput, sizeof (OPENGL_INFO),
- (LPSTR)&info );
- }
- if (ret <= 0)
- {
- HKEY hKey;
- DWORD type, size;
-
- if (ret < 0)
- {
- DBGPRINT( "Warning: ExtEscape to get the drivername failed! (%d)", GetLastError() );
- if (MessageBox( WindowFromDC( hdc ), L"Couldn't get installable client driver name!\nUsing default driver.",
- L"OPENGL32.dll: Warning", MB_OKCANCEL | MB_ICONWARNING ) == IDCANCEL)
- {
- return NULL;
- }
- }
-
- /* open registry key */
- ret = RegOpenKeyExW( HKEY_LOCAL_MACHINE, OPENGL_DRIVERS_SUBKEY, 0, KEY_QUERY_VALUE, &hKey );
- if (ret != ERROR_SUCCESS)
- {
- DBGPRINT( "Error: Couldn't open registry key '%ws'", OPENGL_DRIVERS_SUBKEY );
- SetLastError( ret );
- return NULL;
- }
-
- /* query value */
- size = sizeof (info.DriverName);
- ret = RegQueryValueExW( hKey, L"DefaultDriver", 0, &type, (LPBYTE)info.DriverName, &size );
- RegCloseKey( hKey );
- if (ret != ERROR_SUCCESS || type != REG_SZ)
- {
- DBGPRINT( "Error: Couldn't query DefaultDriver value or not a string" );
- SetLastError( ret );
- return NULL;
- }
- }
- }
- else
- {
- wcsncpy( info.DriverName, driverName, sizeof (info.DriverName) / sizeof (info.DriverName[0]) );
- }
- /* load driver (or get a reference) */
- drvdata = OPENGL32_LoadICD( info.DriverName );
- if (drvdata == NULL)
- {
- WCHAR Buffer[256];
- snwprintf(Buffer, sizeof(Buffer)/sizeof(WCHAR),
- L"Couldn't load driver \"%s\".", driverName);
- MessageBox(WindowFromDC( hdc ), Buffer,
- L"OPENGL32.dll: Warning",
- MB_OK | MB_ICONWARNING);
- }
- else
- {
- /* Atomically set the ICD!!! */
- if (InterlockedCompareExchangePointer((PVOID*)&dcdata->icd,
- (PVOID)drvdata,
- NULL) != NULL)
- {
- /* Too bad, somebody else was faster... */
- OPENGL32_UnloadICD(drvdata);
- }
- }
- }
-
- return dcdata->icd;
+ GLDCDATA *dcdata;
+ GLDRIVERDATA *drvdata;
+
+ dcdata = ROSGL_GetPrivateDCData( hdc );
+ if (dcdata == NULL)
+ return NULL;
+
+ if (dcdata->icd == NULL)
+ {
+ LPCWSTR driverName;
+ OPENGL_INFO info;
+
+ /* NOTE: This might be done by multiple threads simultaneously, but only the fastest
+ actually gets to set the ICD! */
+
+ driverName = _wgetenv( L"OPENGL32_DRIVER" );
+ if (driverName == NULL)
+ {
+ DWORD dwInput;
+ LONG ret;
+
+ /* get driver name */
+ dwInput = OPENGL_GETINFO;
+ ret = ExtEscape( hdc, QUERYESCSUPPORT, sizeof (dwInput), (LPCSTR)&dwInput, 0, NULL );
+ if (ret > 0)
+ {
+ dwInput = 0;
+ ret = ExtEscape( hdc, OPENGL_GETINFO, sizeof (dwInput),
+ (LPCSTR)&dwInput, sizeof (OPENGL_INFO),
+ (LPSTR)&info );
+ }
+ if (ret <= 0)
+ {
+ HKEY hKey;
+ DWORD type, size;
+
+ if (ret < 0)
+ {
+ DBGPRINT( "Warning: ExtEscape to get the drivername failed! (%d)", GetLastError() );
+ if (MessageBox( WindowFromDC( hdc ), L"Couldn't get installable client driver name!\nUsing default driver.",
+ L"OPENGL32.dll: Warning", MB_OKCANCEL | MB_ICONWARNING ) == IDCANCEL)
+ {
+ return NULL;
+ }
+ }
+
+ /* open registry key */
+ ret = RegOpenKeyExW( HKEY_LOCAL_MACHINE, OPENGL_DRIVERS_SUBKEY, 0, KEY_QUERY_VALUE, &hKey );
+ if (ret != ERROR_SUCCESS)
+ {
+ DBGPRINT( "Error: Couldn't open registry key '%ws'", OPENGL_DRIVERS_SUBKEY );
+ SetLastError( ret );
+ return NULL;
+ }
+
+ /* query value */
+ size = sizeof (info.DriverName);
+ ret = RegQueryValueExW( hKey, L"DefaultDriver", 0, &type, (LPBYTE)info.DriverName, &size );
+ RegCloseKey( hKey );
+ if (ret != ERROR_SUCCESS || type != REG_SZ)
+ {
+ DBGPRINT( "Error: Couldn't query DefaultDriver value or not a string" );
+ SetLastError( ret );
+ return NULL;
+ }
+ }
+ }
+ else
+ {
+ wcsncpy( info.DriverName, driverName, sizeof (info.DriverName) / sizeof (info.DriverName[0]) );
+ }
+ /* load driver (or get a reference) */
+ drvdata = OPENGL32_LoadICD( info.DriverName );
+ if (drvdata == NULL)
+ {
+ WCHAR Buffer[256];
+ snwprintf(Buffer, sizeof(Buffer)/sizeof(WCHAR),
+ L"Couldn't load driver \"%s\".", driverName);
+ MessageBox(WindowFromDC( hdc ), Buffer,
+ L"OPENGL32.dll: Warning",
+ MB_OK | MB_ICONWARNING);
+ }
+ else
+ {
+ /* Atomically set the ICD!!! */
+ if (InterlockedCompareExchangePointer((PVOID*)&dcdata->icd,
+ (PVOID)drvdata,
+ NULL) != NULL)
+ {
+ /* Too bad, somebody else was faster... */
+ OPENGL32_UnloadICD(drvdata);
+ }
+ }
+ }
+
+ return dcdata->icd;
}
CALLBACK
ROSGL_SetContextCallBack( const ICDTable *table )
{
- TEB *teb;
- PROC *tebTable, *tebDispatchTable;
- INT size;
-
- teb = NtCurrentTeb();
- tebTable = (PROC *)teb->glTable;
- tebDispatchTable = (PROC *)teb->glDispatchTable;
-
- DBGTRACE( "Called!" );
-
- if (table != NULL)
- {
- DBGPRINT( "Function count: %d\n", table->num_funcs );
-
- /* save table */
- size = sizeof (PROC) * table->num_funcs;
- memcpy( tebTable, table->dispatch_table, size );
- memset( tebTable + table->num_funcs, 0,
- sizeof (table->dispatch_table) - size );
- }
- else
- {
- DBGPRINT( "Unsetting current context" );
- memset( tebTable, 0, sizeof (table->dispatch_table) );
- }
-
- /* put in empty functions as long as we dont have a fallback */
- #define X(func, ret, typeargs, args, icdidx, tebidx, stack) \
- if (tebTable[icdidx] == NULL) \
- { \
- if (table != NULL) \
- DBGPRINT( "Warning: GL proc '%s' is NULL", #func ); \
- tebTable[icdidx] = (PROC)glEmptyFunc##stack; \
- }
- GLFUNCS_MACRO
- #undef X
-
- /* fill teb->glDispatchTable for fast calls */
- #define X(func, ret, typeargs, args, icdidx, tebidx, stack) \
- if (tebidx >= 0) \
- tebDispatchTable[tebidx] = tebTable[icdidx];
- GLFUNCS_MACRO
- #undef X
-
- DBGPRINT( "Done." );
-
- return ERROR_SUCCESS;
+ TEB *teb;
+ PROC *tebTable, *tebDispatchTable;
+ INT size;
+
+ teb = NtCurrentTeb();
+ tebTable = (PROC *)teb->glTable;
+ tebDispatchTable = (PROC *)teb->glDispatchTable;
+
+ DBGTRACE( "Called!" );
+
+ if (table != NULL)
+ {
+ DBGPRINT( "Function count: %d\n", table->num_funcs );
+
+ /* save table */
+ size = sizeof (PROC) * table->num_funcs;
+ memcpy( tebTable, table->dispatch_table, size );
+ memset( tebTable + table->num_funcs, 0,
+ sizeof (table->dispatch_table) - size );
+ }
+ else
+ {
+ DBGPRINT( "Unsetting current context" );
+ memset( tebTable, 0, sizeof (table->dispatch_table) );
+ }
+
+ /* put in empty functions as long as we dont have a fallback */
+ #define X(func, ret, typeargs, args, icdidx, tebidx, stack) \
+ if (tebTable[icdidx] == NULL) \
+ { \
+ if (table != NULL) \
+ DBGPRINT( "Warning: GL proc '%s' is NULL", #func ); \
+ tebTable[icdidx] = (PROC)glEmptyFunc##stack; \
+ }
+ GLFUNCS_MACRO
+#undef X
+
+ /* fill teb->glDispatchTable for fast calls */
+#define X(func, ret, typeargs, args, icdidx, tebidx, stack) \
+ if (tebidx >= 0) \
+ tebDispatchTable[tebidx] = tebTable[icdidx];
+ GLFUNCS_MACRO
+#undef X
+
+ DBGPRINT( "Done." );
+
+ return ERROR_SUCCESS;
}
* \retval 0 Failed to find a suitable format
*/
#define BUFFERDEPTH_SCORE(want, have) \
- ((want == 0) ? (0) : ((want < have) ? (1) : ((want > have) ? (3) : (0))))
+ ((want == 0) ? (0) : ((want < have) ? (1) : ((want > have) ? (3) : (0))))
int
APIENTRY
rosglChoosePixelFormat( HDC hdc, CONST PIXELFORMATDESCRIPTOR *pfd )
{
- GLDRIVERDATA *icd;
- PIXELFORMATDESCRIPTOR icdPfd;
- int i;
- int best = 0;
- int score, bestScore = 0x7fff; /* used to choose a pfd if no exact match */
- int icdNumFormats;
- const DWORD compareFlags = PFD_DRAW_TO_WINDOW | PFD_DRAW_TO_BITMAP |
- PFD_SUPPORT_GDI | PFD_SUPPORT_OPENGL;
-
- DBGTRACE( "Called!" );
-
- /* load ICD */
- icd = ROSGL_ICDForHDC( hdc );
- if (icd == NULL)
- return 0;
-
- /* check input */
- if (pfd->nSize != sizeof (PIXELFORMATDESCRIPTOR) || pfd->nVersion != 1)
- {
- SetLastError( ERROR_INVALID_PARAMETER );
- return 0;
- }
-
- /* get number of formats */
- icdNumFormats = icd->DrvDescribePixelFormat( hdc, 1,
- sizeof (PIXELFORMATDESCRIPTOR), &icdPfd );
- if (icdNumFormats == 0)
- {
- DBGPRINT( "Error: DrvDescribePixelFormat failed (%d)", GetLastError() );
- return 0;
- }
- DBGPRINT( "Info: Enumerating %d pixelformats", icdNumFormats );
-
- /* try to find best format */
- for (i = 0; i < icdNumFormats; i++)
- {
- if (icd->DrvDescribePixelFormat( hdc, i + 1,
- sizeof (PIXELFORMATDESCRIPTOR), &icdPfd ) == 0)
- {
- DBGPRINT( "Warning: DrvDescribePixelFormat failed (%d)",
- GetLastError() );
- break;
- }
-
- if ((pfd->dwFlags & PFD_GENERIC_ACCELERATED) != 0) /* we do not support such kind of drivers */
- {
- continue;
- }
-
- /* compare flags */
- if ((pfd->dwFlags & compareFlags) != (icdPfd.dwFlags & compareFlags))
- continue;
- if (!(pfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) &&
- ((pfd->dwFlags & PFD_DOUBLEBUFFER) != (icdPfd.dwFlags & PFD_DOUBLEBUFFER)))
- continue;
- if (!(pfd->dwFlags & PFD_STEREO_DONTCARE) &&
- ((pfd->dwFlags & PFD_STEREO) != (icdPfd.dwFlags & PFD_STEREO)))
- continue;
-
- /* check other attribs */
- score = 0; /* higher is worse */
- if (pfd->iPixelType != icdPfd.iPixelType)
- score += 5; /* this is really bad i think */
- if (pfd->iLayerType != icdPfd.iLayerType)
- score += 15; /* this is very very bad ;) */
-
- score += BUFFERDEPTH_SCORE(pfd->cAlphaBits, icdPfd.cAlphaBits);
- score += BUFFERDEPTH_SCORE(pfd->cAccumBits, icdPfd.cAccumBits);
- score += BUFFERDEPTH_SCORE(pfd->cDepthBits, icdPfd.cDepthBits);
- score += BUFFERDEPTH_SCORE(pfd->cStencilBits, icdPfd.cStencilBits);
- score += BUFFERDEPTH_SCORE(pfd->cAuxBuffers, icdPfd.cAuxBuffers);
-
- /* check score */
- if (score < bestScore)
- {
- bestScore = score;
- best = i + 1;
- if (bestScore == 0)
- break;
- }
- }
-
- if (best == 0)
- SetLastError( 0 ); /* FIXME: set appropriate error */
-
- DBGPRINT( "Info: Suggesting pixelformat %d", best );
- return best;
+ GLDRIVERDATA *icd;
+ PIXELFORMATDESCRIPTOR icdPfd;
+ int i;
+ int best = 0;
+ int score, bestScore = 0x7fff; /* used to choose a pfd if no exact match */
+ int icdNumFormats;
+ const DWORD compareFlags = PFD_DRAW_TO_WINDOW | PFD_DRAW_TO_BITMAP |
+ PFD_SUPPORT_GDI | PFD_SUPPORT_OPENGL;
+
+ DBGTRACE( "Called!" );
+
+ /* load ICD */
+ icd = ROSGL_ICDForHDC( hdc );
+ if (icd == NULL)
+ return 0;
+
+ /* check input */
+ if (pfd->nSize != sizeof (PIXELFORMATDESCRIPTOR) || pfd->nVersion != 1)
+ {
+ SetLastError( ERROR_INVALID_PARAMETER );
+ return 0;
+ }
+
+ /* get number of formats */
+ icdNumFormats = icd->DrvDescribePixelFormat( hdc, 1,
+ sizeof (PIXELFORMATDESCRIPTOR), &icdPfd );
+ if (icdNumFormats == 0)
+ {
+ DBGPRINT( "Error: DrvDescribePixelFormat failed (%d)", GetLastError() );
+ return 0;
+ }
+ DBGPRINT( "Info: Enumerating %d pixelformats", icdNumFormats );
+
+ /* try to find best format */
+ for (i = 0; i < icdNumFormats; i++)
+ {
+ if (icd->DrvDescribePixelFormat( hdc, i + 1,
+ sizeof (PIXELFORMATDESCRIPTOR), &icdPfd ) == 0)
+ {
+ DBGPRINT( "Warning: DrvDescribePixelFormat failed (%d)",
+ GetLastError() );
+ break;
+ }
+
+ if ((pfd->dwFlags & PFD_GENERIC_ACCELERATED) != 0) /* we do not support such kind of drivers */
+ {
+ continue;
+ }
+
+ /* compare flags */
+ if ((pfd->dwFlags & compareFlags) != (icdPfd.dwFlags & compareFlags))
+ continue;
+ if (!(pfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) &&
+ ((pfd->dwFlags & PFD_DOUBLEBUFFER) != (icdPfd.dwFlags & PFD_DOUBLEBUFFER)))
+ continue;
+ if (!(pfd->dwFlags & PFD_STEREO_DONTCARE) &&
+ ((pfd->dwFlags & PFD_STEREO) != (icdPfd.dwFlags & PFD_STEREO)))
+ continue;
+
+ /* check other attribs */
+ score = 0; /* higher is worse */
+ if (pfd->iPixelType != icdPfd.iPixelType)
+ score += 5; /* this is really bad i think */
+ if (pfd->iLayerType != icdPfd.iLayerType)
+ score += 15; /* this is very very bad ;) */
+
+ score += BUFFERDEPTH_SCORE(pfd->cAlphaBits, icdPfd.cAlphaBits);
+ score += BUFFERDEPTH_SCORE(pfd->cAccumBits, icdPfd.cAccumBits);
+ score += BUFFERDEPTH_SCORE(pfd->cDepthBits, icdPfd.cDepthBits);
+ score += BUFFERDEPTH_SCORE(pfd->cStencilBits, icdPfd.cStencilBits);
+ score += BUFFERDEPTH_SCORE(pfd->cAuxBuffers, icdPfd.cAuxBuffers);
+
+ /* check score */
+ if (score < bestScore)
+ {
+ bestScore = score;
+ best = i + 1;
+ if (bestScore == 0)
+ break;
+ }
+ }
+
+ if (best == 0)
+ SetLastError( 0 ); /* FIXME: set appropriate error */
+
+ DBGPRINT( "Info: Suggesting pixelformat %d", best );
+ return best;
}
APIENTRY
rosglCopyContext( HGLRC hsrc, HGLRC hdst, UINT mask )
{
- GLRC *src = (GLRC *)hsrc;
- GLRC *dst = (GLRC *)hdst;
-
- /* check glrcs */
- if (!ROSGL_ContainsContext( src ))
- {
- DBGPRINT( "Error: src GLRC not found!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
- if (!ROSGL_ContainsContext( dst ))
- {
- DBGPRINT( "Error: dst GLRC not found!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* I think this is only possible within one ICD */
- if (src->icd != dst->icd)
- {
- DBGPRINT( "Error: src and dst GLRC use different ICDs!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* copy data (call ICD) */
- return src->icd->DrvCopyContext( src->hglrc, dst->hglrc, mask );
+ GLRC *src = (GLRC *)hsrc;
+ GLRC *dst = (GLRC *)hdst;
+
+ /* check glrcs */
+ if (!ROSGL_ContainsContext( src ))
+ {
+ DBGPRINT( "Error: src GLRC not found!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+ if (!ROSGL_ContainsContext( dst ))
+ {
+ DBGPRINT( "Error: dst GLRC not found!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* I think this is only possible within one ICD */
+ if (src->icd != dst->icd)
+ {
+ DBGPRINT( "Error: src and dst GLRC use different ICDs!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* copy data (call ICD) */
+ return src->icd->DrvCopyContext( src->hglrc, dst->hglrc, mask );
}
APIENTRY
rosglCreateLayerContext( HDC hdc, int layer )
{
- GLDRIVERDATA *icd = NULL;
- GLRC *glrc;
- HGLRC drvHglrc = NULL;
+ GLDRIVERDATA *icd = NULL;
+ GLRC *glrc;
+ HGLRC drvHglrc = NULL;
- DBGTRACE( "Called!" );
+ DBGTRACE( "Called!" );
/* if (GetObjectType( hdc ) != OBJ_DC)
- {
- DBGPRINT( "Error: hdc is not a DC handle!" );
- return NULL;
- }
+ {
+ DBGPRINT( "Error: hdc is not a DC handle!" );
+ return NULL;
+ }
*/
- /* create new GLRC */
- glrc = ROSGL_NewContext();
- if (glrc == NULL)
- return NULL;
-
- /* load ICD */
- icd = ROSGL_ICDForHDC( hdc );
- if (icd == NULL)
- {
- ROSGL_DeleteContext( glrc );
- DBGPRINT( "Couldn't get ICD by HDC :-(" );
- /* FIXME: fallback? */
- return NULL;
- }
-
- /* create context */
- if (icd->DrvCreateLayerContext != NULL)
- drvHglrc = icd->DrvCreateLayerContext( hdc, layer );
- if (drvHglrc == NULL)
- {
- if (layer == 0 && icd->DrvCreateContext != NULL)
- drvHglrc = icd->DrvCreateContext( hdc );
- else
- DBGPRINT( "Warning: CreateLayerContext not supported by ICD!" );
- }
-
- if (drvHglrc == NULL)
- {
- /* FIXME: fallback to mesa? */
- DBGPRINT( "Error: DrvCreate[Layer]Context failed! (%d)", GetLastError() );
- ROSGL_DeleteContext( glrc );
- return NULL;
- }
-
- /* we have our GLRC in glrc and the ICD's GLRC in drvHglrc */
- glrc->hglrc = drvHglrc;
- glrc->icd = icd;
-
- return (HGLRC)glrc;
+ /* create new GLRC */
+ glrc = ROSGL_NewContext();
+ if (glrc == NULL)
+ return NULL;
+
+ /* load ICD */
+ icd = ROSGL_ICDForHDC( hdc );
+ if (icd == NULL)
+ {
+ ROSGL_DeleteContext( glrc );
+ DBGPRINT( "Couldn't get ICD by HDC :-(" );
+ /* FIXME: fallback? */
+ return NULL;
+ }
+
+ /* create context */
+ if (icd->DrvCreateLayerContext != NULL)
+ drvHglrc = icd->DrvCreateLayerContext( hdc, layer );
+ if (drvHglrc == NULL)
+ {
+ if (layer == 0 && icd->DrvCreateContext != NULL)
+ drvHglrc = icd->DrvCreateContext( hdc );
+ else
+ DBGPRINT( "Warning: CreateLayerContext not supported by ICD!" );
+ }
+
+ if (drvHglrc == NULL)
+ {
+ /* FIXME: fallback to mesa? */
+ DBGPRINT( "Error: DrvCreate[Layer]Context failed! (%d)", GetLastError() );
+ ROSGL_DeleteContext( glrc );
+ return NULL;
+ }
+
+ /* we have our GLRC in glrc and the ICD's GLRC in drvHglrc */
+ glrc->hglrc = drvHglrc;
+ glrc->icd = icd;
+
+ return (HGLRC)glrc;
}
APIENTRY
rosglCreateContext( HDC hdc )
{
- return rosglCreateLayerContext( hdc, 0 );
+ return rosglCreateLayerContext( hdc, 0 );
}
APIENTRY
rosglDeleteContext( HGLRC hglrc )
{
- GLRC *glrc = (GLRC *)hglrc;
-
- /* check if we know about this context */
- if (!ROSGL_ContainsContext( glrc ))
- {
- DBGPRINT( "Error: hglrc not found!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* make sure GLRC is not current for some thread */
- if (glrc->is_current)
- {
- DBGPRINT( "Error: GLRC is current for DC 0x%08x", glrc->hdc );
- SetLastError( ERROR_INVALID_FUNCTION );
- return FALSE;
- }
-
- /* release ICD's context */
- if (glrc->hglrc != NULL)
- {
- if (!glrc->icd->DrvDeleteContext( glrc->hglrc ))
- {
- DBGPRINT( "Warning: DrvDeleteContext() failed (%d)", GetLastError() );
- return FALSE;
- }
- }
-
- /* free resources */
- return ROSGL_DeleteContext( glrc );
+ GLRC *glrc = (GLRC *)hglrc;
+
+ /* check if we know about this context */
+ if (!ROSGL_ContainsContext( glrc ))
+ {
+ DBGPRINT( "Error: hglrc not found!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* make sure GLRC is not current for some thread */
+ if (glrc->is_current)
+ {
+ DBGPRINT( "Error: GLRC is current for DC 0x%08x", glrc->hdc );
+ SetLastError( ERROR_INVALID_FUNCTION );
+ return FALSE;
+ }
+
+ /* release ICD's context */
+ if (glrc->hglrc != NULL)
+ {
+ if (!glrc->icd->DrvDeleteContext( glrc->hglrc ))
+ {
+ DBGPRINT( "Warning: DrvDeleteContext() failed (%d)", GetLastError() );
+ return FALSE;
+ }
+ }
+
+ /* free resources */
+ return ROSGL_DeleteContext( glrc );
}
rosglDescribeLayerPlane( HDC hdc, int iPixelFormat, int iLayerPlane,
UINT nBytes, LPLAYERPLANEDESCRIPTOR plpd )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return FALSE;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
}
rosglDescribePixelFormat( HDC hdc, int iFormat, UINT nBytes,
LPPIXELFORMATDESCRIPTOR pfd )
{
- int ret = 0;
- GLDRIVERDATA *icd = ROSGL_ICDForHDC( hdc );
-
- if (icd != NULL)
- {
- ret = icd->DrvDescribePixelFormat( hdc, iFormat, nBytes, pfd );
- if (ret == 0)
- DBGPRINT( "Error: DrvDescribePixelFormat(format=%d) failed (%d)", iFormat, GetLastError() );
- }
- else
- {
- SetLastError( ERROR_INVALID_FUNCTION );
- }
-
- return ret;
+ int ret = 0;
+ GLDRIVERDATA *icd = ROSGL_ICDForHDC( hdc );
+
+ if (icd != NULL)
+ {
+ ret = icd->DrvDescribePixelFormat( hdc, iFormat, nBytes, pfd );
+ if (ret == 0)
+ DBGPRINT( "Error: DrvDescribePixelFormat(format=%d) failed (%d)", iFormat, GetLastError() );
+ }
+ else
+ {
+ SetLastError( ERROR_INVALID_FUNCTION );
+ }
+
+ return ret;
}
APIENTRY
rosglGetCurrentContext()
{
- return (HGLRC)(OPENGL32_threaddata->glrc);
+ return (HGLRC)(OPENGL32_threaddata->glrc);
}
APIENTRY
rosglGetCurrentDC()
{
- /* FIXME: is it correct to return NULL when there is no current GLRC or
- is there another way to find out the wanted HDC? */
- if (OPENGL32_threaddata->glrc == NULL)
- return NULL;
- return (HDC)(OPENGL32_threaddata->glrc->hdc);
+ /* FIXME: is it correct to return NULL when there is no current GLRC or
+ is there another way to find out the wanted HDC? */
+ if (OPENGL32_threaddata->glrc == NULL)
+ return NULL;
+ return (HDC)(OPENGL32_threaddata->glrc->hdc);
}
rosglGetLayerPaletteEntries( HDC hdc, int iLayerPlane, int iStart,
int cEntries, COLORREF *pcr )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return 0;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return 0;
}
WINAPI
rosglGetPixelFormat( HDC hdc )
{
- GLDCDATA *dcdata;
+ GLDCDATA *dcdata;
- DBGTRACE( "Called!" );
+ DBGTRACE( "Called!" );
- dcdata = ROSGL_GetPrivateDCData( hdc );
- if (dcdata == NULL)
- {
- DBGPRINT( "Error: ROSGL_GetPrivateDCData failed!" );
- return 0;
- }
+ dcdata = ROSGL_GetPrivateDCData( hdc );
+ if (dcdata == NULL)
+ {
+ DBGPRINT( "Error: ROSGL_GetPrivateDCData failed!" );
+ return 0;
+ }
- return dcdata->pixel_format;
+ return dcdata->pixel_format;
}
APIENTRY
rosglGetProcAddress( LPCSTR proc )
{
- PROC func;
- GLDRIVERDATA *icd;
-
- /* FIXME we should Flush the gl here */
-
- if (OPENGL32_threaddata->glrc == NULL)
- {
- DBGPRINT( "Error: No current GLRC!" );
- SetLastError( ERROR_INVALID_FUNCTION );
- return NULL;
- }
-
- icd = OPENGL32_threaddata->glrc->icd;
- func = icd->DrvGetProcAddress( proc );
- if (func != NULL)
- {
- DBGPRINT( "Info: Proc \"%s\" loaded from ICD.", proc );
- return func;
- }
-
- /* FIXME: Should we return wgl/gl 1.1 functions? */
- SetLastError( ERROR_PROC_NOT_FOUND );
- return NULL;
+ PROC func;
+ GLDRIVERDATA *icd;
+
+ /* FIXME we should Flush the gl here */
+
+ if (OPENGL32_threaddata->glrc == NULL)
+ {
+ DBGPRINT( "Error: No current GLRC!" );
+ SetLastError( ERROR_INVALID_FUNCTION );
+ return NULL;
+ }
+
+ icd = OPENGL32_threaddata->glrc->icd;
+ func = icd->DrvGetProcAddress( proc );
+ if (func != NULL)
+ {
+ DBGPRINT( "Info: Proc \"%s\" loaded from ICD.", proc );
+ return func;
+ }
+
+ /* FIXME: Should we return wgl/gl 1.1 functions? */
+ SetLastError( ERROR_PROC_NOT_FOUND );
+ return NULL;
}
PROC
APIENTRY
rosglGetDefaultProcAddress( LPCSTR proc )
{
- PROC func;
- GLDRIVERDATA *icd;
-
- /* wglGetDefaultProcAddress does not flush the gl */
-
- if (OPENGL32_threaddata->glrc == NULL)
- {
- DBGPRINT( "Error: No current GLRC!" );
- SetLastError( ERROR_INVALID_FUNCTION );
- return NULL;
- }
-
- icd = OPENGL32_threaddata->glrc->icd;
- func = icd->DrvGetProcAddress( proc );
- if (func != NULL)
- {
- DBGPRINT( "Info: Proc \"%s\" loaded from ICD.", proc );
- return func;
- }
-
- /* FIXME: Should we return wgl/gl 1.1 functions? */
- SetLastError( ERROR_PROC_NOT_FOUND );
- return NULL;
+ PROC func;
+ GLDRIVERDATA *icd;
+
+ /* wglGetDefaultProcAddress does not flush the gl */
+
+ if (OPENGL32_threaddata->glrc == NULL)
+ {
+ DBGPRINT( "Error: No current GLRC!" );
+ SetLastError( ERROR_INVALID_FUNCTION );
+ return NULL;
+ }
+
+ icd = OPENGL32_threaddata->glrc->icd;
+ func = icd->DrvGetProcAddress( proc );
+ if (func != NULL)
+ {
+ DBGPRINT( "Info: Proc \"%s\" loaded from ICD.", proc );
+ return func;
+ }
+
+ /* FIXME: Should we return wgl/gl 1.1 functions? */
+ SetLastError( ERROR_PROC_NOT_FOUND );
+ return NULL;
}
APIENTRY
rosglMakeCurrent( HDC hdc, HGLRC hglrc )
{
- GLRC *glrc = (GLRC *)hglrc;
- ICDTable *icdTable = NULL;
-
- DBGTRACE( "Called!" );
-
- if (OPENGL32_threaddata == NULL)
- return FALSE;
-
- /* flush current context */
- if (OPENGL32_threaddata->glrc != NULL)
- {
- glFlush();
- }
-
- /* check if current context is unset */
- if (glrc == NULL)
- {
- if (OPENGL32_threaddata->glrc != NULL)
- {
- glrc = OPENGL32_threaddata->glrc;
- glrc->icd->DrvReleaseContext( glrc->hglrc );
- glrc->is_current = FALSE;
- OPENGL32_threaddata->glrc = NULL;
- }
- }
- else
- {
- /* check hdc */
- if (GetObjectType( hdc ) != OBJ_DC && GetObjectType( hdc ) != OBJ_MEMDC)
- {
- DBGPRINT( "Error: hdc is not a DC handle!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* check if we know about this glrc */
- if (!ROSGL_ContainsContext( glrc ))
- {
- DBGPRINT( "Error: hglrc not found!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* check if it is available */
- if (glrc->is_current && glrc->thread_id != GetCurrentThreadId()) /* used by another thread */
- {
- DBGPRINT( "Error: hglrc is current for thread 0x%08x", glrc->thread_id );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* call the ICD */
- if (glrc->hglrc != NULL)
- {
- DBGPRINT( "Info: Calling DrvSetContext!" );
- SetLastError( ERROR_SUCCESS );
- icdTable = glrc->icd->DrvSetContext( hdc, glrc->hglrc,
- (void *)ROSGL_SetContextCallBack );
- if (icdTable == NULL)
- {
- DBGPRINT( "Error: DrvSetContext failed (%d)\n", GetLastError() );
- return FALSE;
- }
- DBGPRINT( "Info: DrvSetContext succeeded!" );
- }
-
- /* make it current */
- if (OPENGL32_threaddata->glrc != NULL)
- OPENGL32_threaddata->glrc->is_current = FALSE;
- glrc->is_current = TRUE;
- glrc->thread_id = GetCurrentThreadId();
- glrc->hdc = hdc;
- OPENGL32_threaddata->glrc = glrc;
- }
-
- if (ROSGL_SetContextCallBack( icdTable ) != ERROR_SUCCESS && icdTable == NULL)
- {
- DBGPRINT( "Warning: ROSGL_SetContextCallBack failed!" );
- }
-
- return TRUE;
+ GLRC *glrc = (GLRC *)hglrc;
+ ICDTable *icdTable = NULL;
+
+ DBGTRACE( "Called!" );
+
+ if (OPENGL32_threaddata == NULL)
+ return FALSE;
+
+ /* flush current context */
+ if (OPENGL32_threaddata->glrc != NULL)
+ {
+ glFlush();
+ }
+
+ /* check if current context is unset */
+ if (glrc == NULL)
+ {
+ if (OPENGL32_threaddata->glrc != NULL)
+ {
+ glrc = OPENGL32_threaddata->glrc;
+ glrc->icd->DrvReleaseContext( glrc->hglrc );
+ glrc->is_current = FALSE;
+ OPENGL32_threaddata->glrc = NULL;
+ }
+ }
+ else
+ {
+ /* check hdc */
+ if (GetObjectType( hdc ) != OBJ_DC && GetObjectType( hdc ) != OBJ_MEMDC)
+ {
+ DBGPRINT( "Error: hdc is not a DC handle!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* check if we know about this glrc */
+ if (!ROSGL_ContainsContext( glrc ))
+ {
+ DBGPRINT( "Error: hglrc not found!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* check if it is available */
+ if (glrc->is_current && glrc->thread_id != GetCurrentThreadId()) /* used by another thread */
+ {
+ DBGPRINT( "Error: hglrc is current for thread 0x%08x", glrc->thread_id );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* call the ICD */
+ if (glrc->hglrc != NULL)
+ {
+ DBGPRINT( "Info: Calling DrvSetContext!" );
+ SetLastError( ERROR_SUCCESS );
+ icdTable = glrc->icd->DrvSetContext( hdc, glrc->hglrc,
+ (void *)ROSGL_SetContextCallBack );
+ if (icdTable == NULL)
+ {
+ DBGPRINT( "Error: DrvSetContext failed (%d)\n", GetLastError() );
+ return FALSE;
+ }
+ DBGPRINT( "Info: DrvSetContext succeeded!" );
+ }
+
+ /* make it current */
+ if (OPENGL32_threaddata->glrc != NULL)
+ OPENGL32_threaddata->glrc->is_current = FALSE;
+ glrc->is_current = TRUE;
+ glrc->thread_id = GetCurrentThreadId();
+ glrc->hdc = hdc;
+ OPENGL32_threaddata->glrc = glrc;
+ }
+
+ if (ROSGL_SetContextCallBack( icdTable ) != ERROR_SUCCESS && icdTable == NULL)
+ {
+ DBGPRINT( "Warning: ROSGL_SetContextCallBack failed!" );
+ }
+
+ return TRUE;
}
APIENTRY
rosglRealizeLayerPalette( HDC hdc, int iLayerPlane, BOOL bRealize )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return FALSE;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
}
rosglSetLayerPaletteEntries( HDC hdc, int iLayerPlane, int iStart,
int cEntries, CONST COLORREF *pcr )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return 0;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return 0;
}
WINAPI
rosglSetPixelFormat( HDC hdc, int iFormat, CONST PIXELFORMATDESCRIPTOR *pfd )
{
- GLDRIVERDATA *icd;
- GLDCDATA *dcdata;
-
- DBGTRACE( "Called!" );
-
- /* load ICD */
- icd = ROSGL_ICDForHDC( hdc );
- if (icd == NULL)
- {
- DBGPRINT( "Warning: ICDForHDC() failed" );
- return FALSE;
- }
-
- /* call ICD */
- if (!icd->DrvSetPixelFormat( hdc, iFormat, pfd ))
- {
- DBGPRINT( "Warning: DrvSetPixelFormat(format=%d) failed (%d)",
- iFormat, GetLastError() );
- return FALSE;
- }
-
- /* store format in private DC data */
- dcdata = ROSGL_GetPrivateDCData( hdc );
- if (dcdata == NULL)
- {
- DBGPRINT( "Error: ROSGL_GetPrivateDCData() failed!" );
- return FALSE;
- }
- dcdata->pixel_format = iFormat;
-
- return TRUE;
+ GLDRIVERDATA *icd;
+ GLDCDATA *dcdata;
+
+ DBGTRACE( "Called!" );
+
+ /* load ICD */
+ icd = ROSGL_ICDForHDC( hdc );
+ if (icd == NULL)
+ {
+ DBGPRINT( "Warning: ICDForHDC() failed" );
+ return FALSE;
+ }
+
+ /* call ICD */
+ if (!icd->DrvSetPixelFormat( hdc, iFormat, pfd ))
+ {
+ DBGPRINT( "Warning: DrvSetPixelFormat(format=%d) failed (%d)",
+ iFormat, GetLastError() );
+ return FALSE;
+ }
+
+ /* store format in private DC data */
+ dcdata = ROSGL_GetPrivateDCData( hdc );
+ if (dcdata == NULL)
+ {
+ DBGPRINT( "Error: ROSGL_GetPrivateDCData() failed!" );
+ return FALSE;
+ }
+ dcdata->pixel_format = iFormat;
+
+ return TRUE;
}
APIENTRY
rosglShareLists( HGLRC hglrc1, HGLRC hglrc2 )
{
- GLRC *glrc1 = (GLRC *)hglrc1;
- GLRC *glrc2 = (GLRC *)hglrc2;
-
- /* check glrcs */
- if (!ROSGL_ContainsContext( glrc1 ))
- {
- DBGPRINT( "Error: hglrc1 not found!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
- if (!ROSGL_ContainsContext( glrc2 ))
- {
- DBGPRINT( "Error: hglrc2 not found!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* I think this is only possible within one ICD */
- if (glrc1->icd != glrc2->icd)
- {
- DBGPRINT( "Error: hglrc1 and hglrc2 use different ICDs!" );
- SetLastError( ERROR_INVALID_HANDLE );
- return FALSE;
- }
-
- /* share lists (call ICD) */
- return glrc1->icd->DrvShareLists( glrc1->hglrc, glrc2->hglrc );
+ GLRC *glrc1 = (GLRC *)hglrc1;
+ GLRC *glrc2 = (GLRC *)hglrc2;
+
+ /* check glrcs */
+ if (!ROSGL_ContainsContext( glrc1 ))
+ {
+ DBGPRINT( "Error: hglrc1 not found!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+ if (!ROSGL_ContainsContext( glrc2 ))
+ {
+ DBGPRINT( "Error: hglrc2 not found!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* I think this is only possible within one ICD */
+ if (glrc1->icd != glrc2->icd)
+ {
+ DBGPRINT( "Error: hglrc1 and hglrc2 use different ICDs!" );
+ SetLastError( ERROR_INVALID_HANDLE );
+ return FALSE;
+ }
+
+ /* share lists (call ICD) */
+ return glrc1->icd->DrvShareLists( glrc1->hglrc, glrc2->hglrc );
}
APIENTRY
rosglSwapBuffers( HDC hdc )
{
- GLDRIVERDATA *icd = ROSGL_ICDForHDC( hdc );
- DBGTRACE( "Called!" );
- if (icd != NULL)
- {
- DBGPRINT( "Swapping buffers!" );
- if (!icd->DrvSwapBuffers( hdc ))
- {
- DBGPRINT( "Error: DrvSwapBuffers failed (%d)", GetLastError() );
- return FALSE;
- }
- return TRUE;
- }
-
- /* FIXME: implement own functionality? */
- SetLastError( ERROR_INVALID_FUNCTION );
- return FALSE;
+ GLDRIVERDATA *icd = ROSGL_ICDForHDC( hdc );
+ DBGTRACE( "Called!" );
+ if (icd != NULL)
+ {
+ DBGPRINT( "Swapping buffers!" );
+ if (!icd->DrvSwapBuffers( hdc ))
+ {
+ DBGPRINT( "Error: DrvSwapBuffers failed (%d)", GetLastError() );
+ return FALSE;
+ }
+ return TRUE;
+ }
+
+ /* FIXME: implement own functionality? */
+ SetLastError( ERROR_INVALID_FUNCTION );
+ return FALSE;
}
APIENTRY
rosglSwapLayerBuffers( HDC hdc, UINT fuPlanes )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return FALSE;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
}
APIENTRY
rosglUseFontBitmapsA( HDC hdc, DWORD first, DWORD count, DWORD listBase )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return FALSE;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
}
APIENTRY
rosglUseFontBitmapsW( HDC hdc, DWORD first, DWORD count, DWORD listBase )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return FALSE;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
}
FLOAT deviation, FLOAT extrusion, int format,
GLYPHMETRICSFLOAT *pgmf )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return FALSE;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
}
FLOAT deviation, FLOAT extrusion, int format,
GLYPHMETRICSFLOAT *pgmf )
{
- UNIMPLEMENTED;
- SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
- return FALSE;
+ UNIMPLEMENTED;
+ SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
+ return FALSE;
}
#ifdef __cplusplus