void __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_StencilFunc,16); __GLX_PUT_LONG(4,func); __GLX_PUT_LONG(8,ref); __GLX_PUT_LONG(12,mask); __GLX_END(16); }
void __indirect_glRectiv(const GLint *v1, const GLint *v2) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_Rectiv,20); __GLX_PUT_LONG(4,v1[0]); __GLX_PUT_LONG(8,v1[1]); __GLX_PUT_LONG(12,v2[0]); __GLX_PUT_LONG(16,v2[1]); __GLX_END(20); }
void __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_Histogram,20); __GLX_PUT_LONG(4,target); __GLX_PUT_LONG(8,width); __GLX_PUT_LONG(12,internalformat); __GLX_PUT_CHAR(16,sink); __GLX_END(20); }
void __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_Viewport,20); __GLX_PUT_LONG(4,x); __GLX_PUT_LONG(8,y); __GLX_PUT_LONG(12,width); __GLX_PUT_LONG(16,height); __GLX_END(20); }
void __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_CopyPixels,24); __GLX_PUT_LONG(4,x); __GLX_PUT_LONG(8,y); __GLX_PUT_LONG(12,width); __GLX_PUT_LONG(16,height); __GLX_PUT_LONG(20,type); __GLX_END(24); }
void __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_CopyColorSubTable,24); __GLX_PUT_LONG(4,target); __GLX_PUT_LONG(8,start); __GLX_PUT_LONG(12,x); __GLX_PUT_LONG(16,y); __GLX_PUT_LONG(20,width); __GLX_END(24); }
void __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_CopyConvolutionFilter1D,24); __GLX_PUT_LONG(4,target); __GLX_PUT_LONG(8,internalformat); __GLX_PUT_LONG(12,x); __GLX_PUT_LONG(16,y); __GLX_PUT_LONG(20,width); __GLX_END(24); }
void __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_MapGrid2d,44); __GLX_PUT_DOUBLE(4,u1); __GLX_PUT_DOUBLE(12,u2); __GLX_PUT_DOUBLE(20,v1); __GLX_PUT_DOUBLE(28,v2); __GLX_PUT_LONG(36,un); __GLX_PUT_LONG(40,vn); __GLX_END(44); }
void __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_MapGrid2f,28); __GLX_PUT_LONG(4,un); __GLX_PUT_FLOAT(8,u1); __GLX_PUT_FLOAT(12,u2); __GLX_PUT_LONG(16,vn); __GLX_PUT_FLOAT(20,v1); __GLX_PUT_FLOAT(24,v2); __GLX_END(28); }
void __indirect_glDisable(GLenum cap) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); if (!gc->currentDpy) return; switch (cap) { case GL_COLOR_ARRAY: case GL_EDGE_FLAG_ARRAY: case GL_INDEX_ARRAY: case GL_NORMAL_ARRAY: case GL_TEXTURE_COORD_ARRAY: case GL_VERTEX_ARRAY: case GL_SECONDARY_COLOR_ARRAY: case GL_FOG_COORD_ARRAY: __indirect_glDisableClientState(cap); return; default: break; } __GLX_BEGIN(X_GLrop_Disable, 8); __GLX_PUT_LONG(4, cap); __GLX_END(8); }
void __indirect_glLineStipple(GLint factor, GLushort pattern) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_LineStipple,12); __GLX_PUT_LONG(4,factor); __GLX_PUT_SHORT(8,pattern); __GLX_END(12); }
void __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_MapGrid1f,16); __GLX_PUT_LONG(4,un); __GLX_PUT_FLOAT(8,u1); __GLX_PUT_FLOAT(12,u2); __GLX_END(16); }
void __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_MapGrid1d,24); __GLX_PUT_DOUBLE(4,u1); __GLX_PUT_DOUBLE(12,u2); __GLX_PUT_LONG(20,un); __GLX_END(24); }
void __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_CopyTexSubImage3D,40); __GLX_PUT_LONG(4,target); __GLX_PUT_LONG(8,level); __GLX_PUT_LONG(12,xoffset); __GLX_PUT_LONG(16,yoffset); __GLX_PUT_LONG(20,zoffset); __GLX_PUT_LONG(24,x); __GLX_PUT_LONG(28,y); __GLX_PUT_LONG(32,width); __GLX_PUT_LONG(36,height); __GLX_END(40); }
void __indirect_glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); if (n < 0) return; cmdlen = 8+n*4+n*4; __GLX_BEGIN(X_GLrop_PrioritizeTextures,cmdlen); __GLX_PUT_LONG(4,n); __GLX_PUT_LONG_ARRAY(8,textures,n); __GLX_PUT_FLOAT_ARRAY(8+n*4,priorities,n); __GLX_END(cmdlen); }
static void emit_header(GLubyte * pc, const struct array_info * arrays, GLsizei num_arrays, GLsizei count, GLenum mode) { __GLXdispatchDrawArraysComponentHeader *arrayInfo; GLsizei i; __GLX_PUT_LONG(0, count); __GLX_PUT_LONG(4, num_arrays); __GLX_PUT_LONG(8, mode); arrayInfo = (__GLXdispatchDrawArraysComponentHeader *) (pc + __GLX_DRAWARRAYS_HDR_SIZE); /* Write the ARRAY_INFO data. */ for ( i = 0 ; i < num_arrays ; i++ ) { arrayInfo[i] = arrays[i].ai; } }
void __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_CopyTexImage2D,36); __GLX_PUT_LONG(4,target); __GLX_PUT_LONG(8,level); __GLX_PUT_LONG(12,internalformat); __GLX_PUT_LONG(16,x); __GLX_PUT_LONG(20,y); __GLX_PUT_LONG(24,width); __GLX_PUT_LONG(28,height); __GLX_PUT_LONG(32,border); __GLX_END(36); }
void __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); __GLX_BEGIN(X_GLrop_CopyTexSubImage1D,28); __GLX_PUT_LONG(4,target); __GLX_PUT_LONG(8,level); __GLX_PUT_LONG(12,xoffset); __GLX_PUT_LONG(16,x); __GLX_PUT_LONG(20,y); __GLX_PUT_LONG(24,width); __GLX_END(28); }
/** * Internal function used for \c glCompressedTexImage1D and * \c glCompressedTexImage2D. */ static void CompressedTexImage1D2D( GLenum target, GLint level, GLenum internal_format, GLsizei width, GLsizei height, GLint border, GLsizei image_size, const GLvoid *data, CARD32 rop ) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); if ( gc->currentDpy == NULL ) { return; } if ( (target == GL_PROXY_TEXTURE_1D) || (target == GL_PROXY_TEXTURE_2D) || (target == GL_PROXY_TEXTURE_CUBE_MAP) ) { compsize = 0; } else { compsize = image_size; } cmdlen = __GLX_PAD( __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE + compsize ); if ( cmdlen <= gc->maxSmallRenderCommandSize ) { __GLX_BEGIN_VARIABLE( rop, cmdlen ); __GLX_PUT_LONG( 4, target ); __GLX_PUT_LONG( 8, level ); __GLX_PUT_LONG( 12, internal_format ); __GLX_PUT_LONG( 16, width ); __GLX_PUT_LONG( 20, height ); __GLX_PUT_LONG( 24, border ); __GLX_PUT_LONG( 28, image_size ); if ( compsize != 0 ) { __GLX_PUT_CHAR_ARRAY( __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE, data, image_size ); } __GLX_END( cmdlen ); } else { assert( compsize != 0 ); __GLX_BEGIN_VARIABLE_LARGE( rop, cmdlen + 4 ); __GLX_PUT_LONG( 8, target ); __GLX_PUT_LONG( 12, level ); __GLX_PUT_LONG( 16, internal_format ); __GLX_PUT_LONG( 20, width ); __GLX_PUT_LONG( 24, height ); __GLX_PUT_LONG( 28, border ); __GLX_PUT_LONG( 32, image_size ); __glXSendLargeCommand( gc, gc->pc, __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE + 4, data, image_size ); } }
void __indirect_glCompressedTexSubImage3DARB( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei image_size, const GLvoid *data ) { __GLX_DECLARE_VARIABLES(); __GLX_LOAD_VARIABLES(); if ( gc->currentDpy == NULL ) { return; } cmdlen = __GLX_PAD( __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE + image_size ); if ( cmdlen <= gc->maxSmallRenderCommandSize ) { __GLX_BEGIN_VARIABLE( X_GLrop_CompressedTexSubImage3D, cmdlen ); __GLX_PUT_LONG( 4, target ); __GLX_PUT_LONG( 8, level ); __GLX_PUT_LONG( 12, xoffset ); __GLX_PUT_LONG( 16, yoffset ); __GLX_PUT_LONG( 20, zoffset ); __GLX_PUT_LONG( 24, width ); __GLX_PUT_LONG( 28, height ); __GLX_PUT_LONG( 32, depth ); __GLX_PUT_LONG( 36, format ); __GLX_PUT_LONG( 40, image_size ); if ( image_size != 0 ) { __GLX_PUT_CHAR_ARRAY( __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE, data, image_size ); } __GLX_END( cmdlen ); } else { __GLX_BEGIN_VARIABLE_LARGE( X_GLrop_CompressedTexSubImage3D, cmdlen + 4 ); __GLX_PUT_LONG( 8, target ); __GLX_PUT_LONG( 12, level ); __GLX_PUT_LONG( 16, xoffset ); __GLX_PUT_LONG( 20, yoffset ); __GLX_PUT_LONG( 24, zoffset ); __GLX_PUT_LONG( 28, width ); __GLX_PUT_LONG( 32, height ); __GLX_PUT_LONG( 36, depth ); __GLX_PUT_LONG( 40, format ); __GLX_PUT_LONG( 44, image_size ); __glXSendLargeCommand( gc, gc->pc, __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE + 4, data, image_size ); } }
void __indirect_glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * pnts) { __GLX_DECLARE_VARIABLES(); GLint k; __GLX_LOAD_VARIABLES(); k = __glMap1f_size(target); if (k == 0) { __glXSetError(gc, GL_INVALID_ENUM); return; } else if (stride < k || order <= 0) { __glXSetError(gc, GL_INVALID_VALUE); return; } compsize = k * order * __GLX_SIZE_FLOAT32; cmdlen = 20 + compsize; if (!gc->currentDpy) return; /* ** The order that arguments are packed is different from the order ** for glMap1d. */ if (cmdlen <= gc->maxSmallRenderCommandSize) { /* Use GLXRender protocol to send small command */ __GLX_BEGIN_VARIABLE(X_GLrop_Map1f, cmdlen); __GLX_PUT_LONG(4, target); __GLX_PUT_FLOAT(8, u1); __GLX_PUT_FLOAT(12, u2); __GLX_PUT_LONG(16, order); __glFillMap1f(k, order, stride, pnts, (GLubyte *) (pc + 20)); __GLX_END(cmdlen); } else { /* Use GLXRenderLarge protocol to send command */ __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map1f, cmdlen + 4); __GLX_PUT_LONG(8, target); __GLX_PUT_FLOAT(12, u1); __GLX_PUT_FLOAT(16, u2); __GLX_PUT_LONG(20, order); if (stride != k) { GLubyte *buf; buf = (GLubyte *) Xmalloc(compsize); if (!buf) { __glXSetError(gc, GL_OUT_OF_MEMORY); return; } __glFillMap1f(k, order, stride, pnts, buf); __glXSendLargeCommand(gc, pc, 24, buf, compsize); Xfree((char *) buf); } else { /* Data is already packed. Just send it out */ __glXSendLargeCommand(gc, pc, 24, pnts, compsize); } } }
void __indirect_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, GLdouble v1, GLdouble v2, GLint vstr, GLint vord, const GLdouble * pnts) { __GLX_DECLARE_VARIABLES(); GLint k; __GLX_LOAD_VARIABLES(); k = __glMap2d_size(target); if (k == 0) { __glXSetError(gc, GL_INVALID_ENUM); return; } else if (vstr < k || ustr < k || vord <= 0 || uord <= 0) { __glXSetError(gc, GL_INVALID_VALUE); return; } compsize = k * uord * vord * __GLX_SIZE_FLOAT64; cmdlen = 48 + compsize; if (!gc->currentDpy) return; if (cmdlen <= gc->maxSmallRenderCommandSize) { /* Use GLXRender protocol to send small command */ __GLX_BEGIN_VARIABLE(X_GLrop_Map2d, cmdlen); __GLX_PUT_DOUBLE(4, u1); __GLX_PUT_DOUBLE(12, u2); __GLX_PUT_DOUBLE(20, v1); __GLX_PUT_DOUBLE(28, v2); __GLX_PUT_LONG(36, target); __GLX_PUT_LONG(40, uord); __GLX_PUT_LONG(44, vord); /* ** Pack into a u-major ordering. ** NOTE: the doubles that follow are not aligned because of 5 ** longs preceeding */ __glFillMap2d(k, uord, vord, ustr, vstr, pnts, (GLdouble *) (pc + 48)); __GLX_END(cmdlen); } else { /* Use GLXRenderLarge protocol to send command */ __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map2d, cmdlen + 4); __GLX_PUT_DOUBLE(8, u1); __GLX_PUT_DOUBLE(16, u2); __GLX_PUT_DOUBLE(24, v1); __GLX_PUT_DOUBLE(32, v2); __GLX_PUT_LONG(40, target); __GLX_PUT_LONG(44, uord); __GLX_PUT_LONG(48, vord); /* ** NOTE: the doubles that follow are not aligned because of 5 ** longs preceeding */ if ((vstr != k) || (ustr != k * vord)) { GLdouble *buf; buf = (GLdouble *) Xmalloc(compsize); if (!buf) { __glXSetError(gc, GL_OUT_OF_MEMORY); return; } /* ** Pack into a u-major ordering. */ __glFillMap2d(k, uord, vord, ustr, vstr, pnts, buf); __glXSendLargeCommand(gc, pc, 52, buf, compsize); Xfree((char *) buf); } else { /* Data is already packed. Just send it out */ __glXSendLargeCommand(gc, pc, 52, pnts, compsize); } } }
void __indirect_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, GLfloat v1, GLfloat v2, GLint vstr, GLint vord, const GLfloat * pnts) { __GLX_DECLARE_VARIABLES(); GLint k; __GLX_LOAD_VARIABLES(); k = __glMap2f_size(target); if (k == 0) { __glXSetError(gc, GL_INVALID_ENUM); return; } else if (vstr < k || ustr < k || vord <= 0 || uord <= 0) { __glXSetError(gc, GL_INVALID_VALUE); return; } compsize = k * uord * vord * __GLX_SIZE_FLOAT32; cmdlen = 32 + compsize; if (!gc->currentDpy) return; /* ** The order that arguments are packed is different from the order ** for glMap2d. */ if (cmdlen <= gc->maxSmallRenderCommandSize) { /* Use GLXRender protocol to send small command */ __GLX_BEGIN_VARIABLE(X_GLrop_Map2f, cmdlen); __GLX_PUT_LONG(4, target); __GLX_PUT_FLOAT(8, u1); __GLX_PUT_FLOAT(12, u2); __GLX_PUT_LONG(16, uord); __GLX_PUT_FLOAT(20, v1); __GLX_PUT_FLOAT(24, v2); __GLX_PUT_LONG(28, vord); /* ** Pack into a u-major ordering. */ __glFillMap2f(k, uord, vord, ustr, vstr, pnts, (GLfloat *) (pc + 32)); __GLX_END(cmdlen); } else { /* Use GLXRenderLarge protocol to send command */ __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map2f, cmdlen + 4); __GLX_PUT_LONG(8, target); __GLX_PUT_FLOAT(12, u1); __GLX_PUT_FLOAT(16, u2); __GLX_PUT_LONG(20, uord); __GLX_PUT_FLOAT(24, v1); __GLX_PUT_FLOAT(28, v2); __GLX_PUT_LONG(32, vord); if ((vstr != k) || (ustr != k * vord)) { GLfloat *buf; buf = (GLfloat *) Xmalloc(compsize); if (!buf) { __glXSetError(gc, GL_OUT_OF_MEMORY); return; } /* ** Pack into a u-major ordering. */ __glFillMap2f(k, uord, vord, ustr, vstr, pnts, buf); __glXSendLargeCommand(gc, pc, 36, buf, compsize); Xfree((char *) buf); } else { /* Data is already packed. Just send it out */ __glXSendLargeCommand(gc, pc, 36, pnts, compsize); } } }
void __indirect_glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * pnts) { __GLX_DECLARE_VARIABLES(); GLint k; __GLX_LOAD_VARIABLES(); k = __glMap1d_size(target); if (k == 0) { __glXSetError(gc, GL_INVALID_ENUM); return; } else if (stride < k || order <= 0) { __glXSetError(gc, GL_INVALID_VALUE); return; } compsize = k * order * __GLX_SIZE_FLOAT64; cmdlen = 28 + compsize; if (!gc->currentDpy) return; if (cmdlen <= gc->maxSmallRenderCommandSize) { /* Use GLXRender protocol to send small command */ __GLX_BEGIN_VARIABLE(X_GLrop_Map1d, cmdlen); __GLX_PUT_DOUBLE(4, u1); __GLX_PUT_DOUBLE(12, u2); __GLX_PUT_LONG(20, target); __GLX_PUT_LONG(24, order); /* ** NOTE: the doubles that follow are not aligned because of 3 ** longs preceeding */ __glFillMap1d(k, order, stride, pnts, (pc + 28)); __GLX_END(cmdlen); } else { /* Use GLXRenderLarge protocol to send command */ __GLX_BEGIN_VARIABLE_LARGE(X_GLrop_Map1d, cmdlen + 4); __GLX_PUT_DOUBLE(8, u1); __GLX_PUT_DOUBLE(16, u2); __GLX_PUT_LONG(24, target); __GLX_PUT_LONG(28, order); /* ** NOTE: the doubles that follow are not aligned because of 3 ** longs preceeding */ if (stride != k) { GLubyte *buf; buf = (GLubyte *) Xmalloc(compsize); if (!buf) { __glXSetError(gc, GL_OUT_OF_MEMORY); return; } __glFillMap1d(k, order, stride, pnts, buf); __glXSendLargeCommand(gc, pc, 32, buf, compsize); Xfree((char *) buf); } else { /* Data is already packed. Just send it out */ __glXSendLargeCommand(gc, pc, 32, pnts, compsize); } } }
/** * Implement GLX protocol for \c glSeparableFilter2D. */ void __indirect_glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) { __GLX_DECLARE_VARIABLES(); GLuint compsize2, hdrlen, totalhdrlen, image1len, image2len; __GLX_LOAD_VARIABLES(); compsize = __glImageSize(width, 1, 1, format, type, 0); compsize2 = __glImageSize(height, 1, 1, format, type, 0); totalhdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); hdrlen = __GLX_PAD(__GLX_CONV_FILT_HDR_SIZE); image1len = __GLX_PAD(compsize); image2len = __GLX_PAD(compsize2); cmdlen = totalhdrlen + image1len + image2len; if (!gc->currentDpy) return; if (cmdlen <= gc->maxSmallRenderCommandSize) { /* Use GLXRender protocol to send small command */ __GLX_BEGIN_VARIABLE_WITH_PIXEL(X_GLrop_SeparableFilter2D, cmdlen); __GLX_PUT_LONG(0, target); __GLX_PUT_LONG(4, internalformat); __GLX_PUT_LONG(8, width); __GLX_PUT_LONG(12, height); __GLX_PUT_LONG(16, format); __GLX_PUT_LONG(20, type); pc += hdrlen; if (compsize > 0) { (*gc->fillImage) (gc, 1, width, 1, 1, format, type, row, pc, pixelHeaderPC); pc += image1len; } if (compsize2 > 0) { (*gc->fillImage) (gc, 1, height, 1, 1, format, type, column, pc, NULL); pc += image2len; } if ((compsize == 0) && (compsize2 == 0)) { /* Setup default store modes */ (void) memcpy(pixelHeaderPC, __glXDefaultPixelStore + 4, 20); } __GLX_END(0); } else { GLubyte *buf; const GLint bufsize = image1len + image2len; /* Use GLXRenderLarge protocol to send command */ __GLX_BEGIN_VARIABLE_LARGE_WITH_PIXEL(X_GLrop_SeparableFilter2D, cmdlen + 4); __GLX_PUT_LONG(0, target); __GLX_PUT_LONG(4, internalformat); __GLX_PUT_LONG(8, width); __GLX_PUT_LONG(12, height); __GLX_PUT_LONG(16, format); __GLX_PUT_LONG(20, type); pc += hdrlen; /* Allocate a temporary holding buffer */ buf = malloc(bufsize); if (!buf) { __glXSetError(gc, GL_OUT_OF_MEMORY); return; } (*gc->fillImage) (gc, 1, width, 1, 1, format, type, row, buf, pixelHeaderPC); (*gc->fillImage) (gc, 1, height, 1, 1, format, type, column, buf + image1len, pixelHeaderPC); /* Send large command */ __glXSendLargeCommand(gc, gc->pc, (GLint) (pc - gc->pc), buf, bufsize); /* Free buffer */ free((char *) buf); } }