void __glXDispSwap_Map1f(GLbyte * pc) { GLint order, k; GLfloat u1, u2, *points; GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); target = *(GLenum *) (pc + 0); order = *(GLint *) (pc + 12); u1 = *(GLfloat *) (pc + 4); u2 = *(GLfloat *) (pc + 8); points = (GLfloat *) (pc + 16); k = __glMap1f_size(target); if (order <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; } else { compsize = order * k; } __GLX_SWAP_FLOAT_ARRAY(points, compsize); glMap1f(target, u1, u2, k, order, points); }
void __glXDispSwap_PixelZoom(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); }
void __glXDispSwap_PolygonOffset(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); }
void __glXDispSwap_MapGrid1f(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); }
void __glXDispSwap_Translatef(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); }
void __glXDispSwap_BlendColor(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); __GLX_SWAP_FLOAT(pc + 12); }
void __glXDispSwap_ClearAccum(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); __GLX_SWAP_FLOAT(pc + 12); }
void __glXDispSwap_LineWidth(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); }
void __glXDispSwap_PointSize(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); }
void __glXDispSwap_ClearIndex(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); }
void __glXDispSwap_PassThrough(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_FLOAT(pc + 0); }
static void swapArray(GLint numVals, GLenum datatype, GLint stride, GLint numVertexes, GLbyte * pc) { int i, j; __GLX_DECLARE_SWAP_VARIABLES; switch (datatype) { case GL_BYTE: case GL_UNSIGNED_BYTE: /* don't need to swap */ return; case GL_SHORT: case GL_UNSIGNED_SHORT: for (i = 0; i < numVertexes; i++) { GLshort *pVal = (GLshort *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_SHORT(&pVal[j]); } pc += stride; } break; case GL_INT: case GL_UNSIGNED_INT: for (i = 0; i < numVertexes; i++) { GLint *pVal = (GLint *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_INT(&pVal[j]); } pc += stride; } break; case GL_FLOAT: for (i = 0; i < numVertexes; i++) { GLfloat *pVal = (GLfloat *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_FLOAT(&pVal[j]); } pc += stride; } break; case GL_DOUBLE: for (i = 0; i < numVertexes; i++) { GLdouble *pVal = (GLdouble *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_DOUBLE(&pVal[j]); } pc += stride; } break; default: return; } }
void __glXDispSwap_LightModelf(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); }
void __glXDispSwap_PixelTransferf(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); }
void __glXDispSwap_AlphaFunc(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT(pc + 4); }
void __glXDispSwap_Map2f(GLbyte * pc) { GLint uorder, vorder, ustride, vstride, k; GLfloat u1, u2, v1, v2, *points; GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); __GLX_SWAP_INT(pc + 24); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); __GLX_SWAP_FLOAT(pc + 16); __GLX_SWAP_FLOAT(pc + 20); target = *(GLenum *) (pc + 0); uorder = *(GLint *) (pc + 12); vorder = *(GLint *) (pc + 24); u1 = *(GLfloat *) (pc + 4); u2 = *(GLfloat *) (pc + 8); v1 = *(GLfloat *) (pc + 16); v2 = *(GLfloat *) (pc + 20); points = (GLfloat *) (pc + 28); k = __glMap2f_size(target); ustride = vorder * k; vstride = k; if (vorder <= 0 || uorder <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; } else { compsize = uorder * vorder * k; } __GLX_SWAP_FLOAT_ARRAY(points, compsize); CALL_Map2f(GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points)); }
void __glXDispSwap_ConvolutionParameterf(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); }
void __glXDispSwap_Bitmap(GLbyte *pc) { __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); __GLX_SWAP_INT((GLbyte *)&hdr->alignment); __GLX_SWAP_INT((GLbyte *)&hdr->width); __GLX_SWAP_INT((GLbyte *)&hdr->height); __GLX_SWAP_FLOAT((GLbyte *)&hdr->xorig); __GLX_SWAP_FLOAT((GLbyte *)&hdr->yorig); __GLX_SWAP_FLOAT((GLbyte *)&hdr->xmove); __GLX_SWAP_FLOAT((GLbyte *)&hdr->ymove); hdr->swapBytes = !hdr->swapBytes; }
int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req; GLint vendorcode; __GLX_DECLARE_SWAP_VARIABLES; req = (xGLXVendorPrivateReq *) pc; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); vendorcode = req->vendorCode; #ifndef __DARWIN__ switch( vendorcode ) { case X_GLvop_SampleMaskSGIS: __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_INT(pc + 8); CALL_SampleMaskSGIS( GET_DISPATCH(), (*(GLfloat *)(pc + 4), *(GLboolean *)(pc + 8)) ); return Success; case X_GLvop_SamplePatternSGIS: __GLX_SWAP_INT(pc + 4); CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) ); return Success; case X_GLXvop_BindTexImageEXT: return __glXSwapBindTexImageEXT(cl, pc); case X_GLXvop_ReleaseTexImageEXT: return __glXSwapReleaseTexImageEXT(cl, pc); } #endif if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req); return Success; } cl->client->errorValue = req->vendorCode; return __glXUnsupportedPrivateRequest; }