- /*
- * NOTE: We don't handle the following here!
- * GL_UNPACK_SWAP_BYTES
- * GL_UNPACK_LSB_FIRST
- */
- /* Copy Mesa stipple pattern to an XImage then to Pixmap */
- {
- XMesaImage *stipple_ximage;
- GLuint stipple[32];
- int i;
- int shift = xmesa->xm_buffer->height % 32;
- for (i=0;i<32;i++) {
- stipple[31-i] = ctx->PolygonStipple[(i+shift) % 32];
- }
-#ifdef XFree86Server
- stipple_ximage = XMesaCreateImage(1, 32, 32, (char *)stipple);
-#else
- stipple_ximage = XCreateImage( xmesa->display,
- xmesa->xm_visual->visinfo->visual,
- 1, ZPixmap, 0,
- (char *)stipple,
- 32, 32, 8, 0 );
- stipple_ximage->byte_order = LSBFirst;
- stipple_ximage->bitmap_bit_order = LSBFirst;
- stipple_ximage->bitmap_unit = 32;
-#endif
- XMesaPutImage( xmesa->display,
- (XMesaDrawable)xmesa->xm_buffer->stipple_pixmap,
- xmesa->xm_buffer->stipple_gc,
- stipple_ximage, 0, 0, 0, 0, 32, 32 );
- stipple_ximage->data = NULL;
- XMesaDestroyImage( stipple_ximage );
- }