-/* $Id: xm_dd.c,v 1.46 2003/04/01 16:41:58 brianp Exp $ */
+/* $Id: xm_dd.c,v 1.47 2003/04/01 17:28:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
#ifdef XFree86Server
/* NOT_NEEDED */
#else
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (xmesa) {
_glthread_LOCK_MUTEX(_xmesa_lock);
XSync( xmesa->display, False );
#ifdef XFree86Server
/* NOT_NEEDED */
#else
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (xmesa) {
_glthread_LOCK_MUTEX(_xmesa_lock);
XFlush( xmesa->display );
* GLframebuffer is the first member in a XMesaBuffer struct.
*/
XMesaBuffer target = (XMesaBuffer) buffer;
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
/* This assignment tells the span/point/line/triangle functions
* which XMesaBuffer to use.
static void
clear_index( GLcontext *ctx, GLuint index )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
xmesa->clearpixel = (unsigned long) index;
XMesaSetForeground( xmesa->display, xmesa->xm_draw_buffer->cleargc,
(unsigned long) index );
static void
clear_color( GLcontext *ctx, const GLfloat color[4] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[0], color[0]);
CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[1], color[1]);
CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[2], color[2]);
static void
index_mask( GLcontext *ctx, GLuint mask )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (xmesa->xm_draw_buffer->buffer != XIMAGE) {
unsigned long m;
if (mask==0xffffffff) {
color_mask(GLcontext *ctx,
GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask)
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
int xclass = GET_VISUAL_CLASS(xmesa->xm_visual);
(void) amask;
clear_front_pixmap( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (all) {
XMesaFillRectangle( xmesa->display, xmesa->xm_draw_buffer->frontbuffer,
xmesa->xm_draw_buffer->cleargc,
clear_back_pixmap( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (all) {
XMesaFillRectangle( xmesa->display, xmesa->xm_draw_buffer->backpixmap,
xmesa->xm_draw_buffer->cleargc,
clear_8bit_ximage( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (all) {
size_t n = xmesa->xm_draw_buffer->backimage->bytes_per_line
* xmesa->xm_draw_buffer->backimage->height;
clear_HPCR_ximage( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (all) {
GLint i, c16 = (xmesa->xm_draw_buffer->backimage->bytes_per_line>>4)<<4;
GLubyte *ptr = (GLubyte *)xmesa->xm_draw_buffer->backimage->data;
clear_16bit_ximage( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint pixel = (GLuint) xmesa->clearpixel;
if (xmesa->swapbytes) {
pixel = ((pixel >> 8) & 0x00ff) | ((pixel << 8) & 0xff00);
clear_24bit_ximage( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = xmesa->clearcolor[0];
const GLubyte g = xmesa->clearcolor[1];
const GLubyte b = xmesa->clearcolor[2];
clear_32bit_ximage( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint pixel = (GLuint) xmesa->clearpixel;
if (xmesa->swapbytes) {
pixel = ((pixel >> 24) & 0x000000ff)
clear_nbit_ximage( GLcontext *ctx, GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_draw_buffer->backimage;
if (all) {
register int i, j;
clear_buffers( GLcontext *ctx, GLbitfield mask,
GLboolean all, GLint x, GLint y, GLint width, GLint height )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
if ((mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) &&
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_draw_buffer->buffer;
XMesaGC gc = xmesa->xm_draw_buffer->gc;
static void
enable( GLcontext *ctx, GLenum pname, GLboolean state )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
switch (pname) {
case GL_DITHER:
void xmesa_update_state( GLcontext *ctx, GLuint new_state )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
/* Propogate statechange information to swrast and swrast_setup
* modules. The X11 driver has no internal GL-dependent state.
ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d;
ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d;
- ctx->Driver.NewTextureObject = _mesa_new_texture_object;
- ctx->Driver.DeleteTexture = _mesa_delete_texture_object;
-
ctx->Driver.CompressedTexImage1D = _mesa_store_compressed_teximage1d;
ctx->Driver.CompressedTexImage2D = _mesa_store_compressed_teximage2d;
ctx->Driver.CompressedTexImage3D = _mesa_store_compressed_teximage3d;
-/* $Id: xm_span.c,v 1.19 2003/02/17 16:35:59 brianp Exp $ */
+/* $Id: xm_span.c,v 1.20 2003/04/01 17:28:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
*/
static void write_span_TRUECOLOR_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_TRUECOLOR_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_TRUEDITHER_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_TRUEDITHER_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_8A8B8G8R_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_8A8B8G8R_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_8R8G8B_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_8R8G8B24_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_8R8G8B_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_8R8G8B24_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_5R6G5B_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_DITHER_5R6G5B_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_5R6G5B_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_DITHER_5R6G5B_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_DITHER_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_DITHER_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_1BIT_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_1BIT_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_HPCR_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_HPCR_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_LOOKUP_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_LOOKUP_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_GRAYSCALE_pixmap( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_rgb_GRAYSCALE_pixmap( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_TRUECOLOR_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_rgb_TRUECOLOR_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_TRUEDITHER_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_rgb_TRUEDITHER_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_8A8B8G8R_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_rgb_8A8B8G8R_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_8R8G8B_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_8R8G8B24_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = (GLubyte *) PIXELADDR3( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_rgb_8R8G8B_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_rgb_8R8G8B24_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = (GLubyte *) PIXELADDR3( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_5R6G5B_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_DITHER_5R6G5B_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y );
const GLint y2 = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_rgb_5R6G5B_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_rgb_DITHER_5R6G5B_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_DITHER_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
int yy = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_rgb_DITHER_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
int yy = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_DITHER8_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
XDITHER_SETUP(y);
static void write_span_rgb_DITHER8_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
XDITHER_SETUP(y);
*/
static void write_span_1BIT_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
SETUP_1BIT;
*/
static void write_span_rgb_1BIT_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
SETUP_1BIT;
*/
static void write_span_HPCR_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_rgb_HPCR_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_LOOKUP_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
LOOKUP_SETUP;
*/
static void write_span_rgb_LOOKUP_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
LOOKUP_SETUP;
*/
static void write_span_LOOKUP8_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
LOOKUP_SETUP;
CONST GLubyte rgb[][3],
const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
LOOKUP_SETUP;
*/
static void write_span_GRAYSCALE_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_rgb_GRAYSCALE_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_GRAYSCALE8_ximage( RGBA_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_span_rgb_GRAYSCALE8_ximage( RGB_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer, x, y );
if (mask) {
*/
static void write_pixels_TRUECOLOR_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_TRUEDITHER_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_8A8B8G8R_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_8R8G8B_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_8R8G8B24_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_5R6G5B_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_DITHER_5R6G5B_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_DITHER_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_1BIT_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_HPCR_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_LOOKUP_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_GRAYSCALE_pixmap( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_TRUECOLOR_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
for (i=0;i<n;i++) {
*/
static void write_pixels_TRUEDITHER_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
for (i=0;i<n;i++) {
*/
static void write_pixels_8A8B8G8R_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
for (i=0;i<n;i++) {
if (mask[i]) {
*/
static void write_pixels_8R8G8B_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
for (i=0;i<n;i++) {
if (mask[i]) {
*/
static void write_pixels_8R8G8B24_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
for (i=0;i<n;i++) {
if (mask[i]) {
*/
static void write_pixels_5R6G5B_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
for (i=0;i<n;i++) {
if (mask[i]) {
*/
static void write_pixels_DITHER_5R6G5B_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
for (i=0;i<n;i++) {
if (mask[i]) {
*/
static void write_pixels_DITHER_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
DITHER_SETUP;
*/
static void write_pixels_DITHER8_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
DITHER_SETUP;
for (i=0;i<n;i++) {
*/
static void write_pixels_1BIT_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
SETUP_1BIT;
*/
static void write_pixels_HPCR_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
for (i=0;i<n;i++) {
if (mask[i]) {
*/
static void write_pixels_LOOKUP_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
LOOKUP_SETUP;
*/
static void write_pixels_LOOKUP8_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
LOOKUP_SETUP;
for (i=0;i<n;i++) {
*/
static void write_pixels_GRAYSCALE_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
for (i=0;i<n;i++) {
*/
static void write_pixels_GRAYSCALE8_ximage( RGBA_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
for (i=0;i<n;i++) {
if (mask[i]) {
*/
static void write_span_mono_pixmap( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
GLint x, GLint y, GLuint colorIndex,
const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_mono_TRUEDITHER_pixmap( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_mono_DITHER_pixmap( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_mono_1BIT_pixmap( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_mono_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP],
GLuint colorIndex,
const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_mono_TRUEDITHER_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
const GLint r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
GLuint i;
*/
static void write_span_mono_8A8B8G8R_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
GLuint i, *ptr;
const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP],
color[GCOMP], color[BCOMP], color[ACOMP], xmesa->pixelformat);
*/
static void write_span_mono_8R8G8B_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLuint pixel = PACK_8R8G8B(color[RCOMP], color[GCOMP], color[BCOMP]);
GLuint *ptr = PIXELADDR4( xmesa->xm_buffer, x, y );
GLuint i;
*/
static void write_span_mono_8R8G8B24_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP];
const GLubyte g = color[GCOMP];
const GLubyte b = color[BCOMP];
*/
static void write_span_mono_DITHER_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
XMesaImage *img = xmesa->xm_buffer->backimage;
int yy = FLIP(xmesa->xm_buffer, y);
*/
static void write_span_mono_DITHER8_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer,x,y);
register GLuint i;
*/
static void write_span_mono_LOOKUP8_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer,x,y);
GLubyte pixel;
*/
static void write_span_mono_1BIT_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
*/
static void write_span_mono_HPCR_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLubyte *ptr = PIXELADDR1( xmesa->xm_buffer,x,y);
register GLuint i;
*/
static void write_span_mono_GRAYSCALE8_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte p = GRAY_RGB(color[RCOMP], color[GCOMP], color[BCOMP]);
GLubyte *ptr = (GLubyte *) PIXELADDR1( xmesa->xm_buffer,x,y);
GLuint i;
*/
static void write_span_mono_DITHER_5R6G5B_ximage( MONO_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y );
const GLint r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
GLuint i;
*/
static void write_pixels_mono_pixmap( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
GLuint colorIndex,
const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_mono_TRUEDITHER_pixmap( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_mono_DITHER_pixmap( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_mono_1BIT_pixmap( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_mono_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
const unsigned long pixel = xmesa_color_to_pixel(xmesa, color[RCOMP],
GLuint colorIndex,
const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
for (i=0;i<n;i++) {
*/
static void write_pixels_mono_TRUEDITHER_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
const int r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
*/
static void write_pixels_mono_8A8B8G8R_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLuint p = PACK_8A8B8G8R(color[RCOMP], color[GCOMP],
color[BCOMP], color[ACOMP]);
register GLuint i;
*/
static void write_pixels_mono_8R8G8B_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
const GLuint p = PACK_8R8G8B(color[RCOMP], color[GCOMP], color[BCOMP]);
for (i=0;i<n;i++) {
*/
static void write_pixels_mono_8R8G8B24_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLuint i;
for (i=0;i<n;i++) {
*/
static void write_pixels_mono_DITHER_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
*/
static void write_pixels_mono_DITHER8_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLuint i;
DITHER_SETUP;
*/
static void write_pixels_mono_LOOKUP8_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
GLubyte pixel;
LOOKUP_SETUP;
*/
static void write_pixels_mono_1BIT_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
*/
static void write_pixels_mono_HPCR_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const GLubyte r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLuint i;
for (i=0;i<n;i++) {
*/
static void write_pixels_mono_GRAYSCALE8_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
register GLubyte p = GRAY_RGB(color[RCOMP], color[GCOMP], color[BCOMP]);
for (i=0;i<n;i++) {
*/
static void write_pixels_mono_DITHER_5R6G5B_ximage( MONO_PIXEL_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const int r = color[RCOMP], g = color[GCOMP], b = color[BCOMP];
register GLuint i;
for (i=0;i<n;i++) {
*/
static void write_span_index_pixmap( INDEX_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_index8_pixmap( INDEX8_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_span_index_ximage( INDEX_SPAN_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
y = FLIP(xmesa->xm_buffer, y);
GLint x, GLint y, const GLubyte index[],
const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
if (mask) {
GLuint i;
for (i=0;i<n;i++) {
GLint x, GLint y, const GLubyte index[],
const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
GLubyte *dst = PIXELADDR1( xmesa->xm_buffer,x,y);
if (mask) {
GLuint i;
*/
static void write_pixels_index_pixmap( INDEX_PIXELS_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaDrawable buffer = xmesa->xm_buffer->buffer;
XMesaGC gc = xmesa->xm_buffer->gc;
*/
static void write_pixels_index_ximage( INDEX_PIXELS_ARGS )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaImage *img = xmesa->xm_buffer->backimage;
register GLuint i;
for (i=0;i<n;i++) {
static void read_index_span( const GLcontext *ctx,
GLuint n, GLint x, GLint y, GLuint index[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaBuffer source = xmesa->xm_buffer;
GLuint i;
GLuint n, GLint x, GLint y,
GLubyte rgba[][4] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaBuffer source = xmesa->xm_buffer;
if (source->buffer) {
GLuint n, const GLint x[], const GLint y[],
GLuint indx[], const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
register GLuint i;
XMesaBuffer source = xmesa->xm_buffer;
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4], const GLubyte mask[] )
{
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
register GLuint i;
XMesaBuffer source = xmesa->xm_buffer;
clear_color_HPCR_ximage( GLcontext *ctx, const GLfloat color[4] )
{
int i;
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[0], color[0]);
CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[1], color[1]);
clear_color_HPCR_pixmap( GLcontext *ctx, const GLfloat color[4] )
{
int i;
- const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ const XMesaContext xmesa = XMESA_CONTEXT(ctx);
CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[0], color[0]);
CLAMPED_FLOAT_TO_UBYTE(xmesa->clearcolor[1], color[1]);
void xmesa_update_span_funcs( GLcontext *ctx )
{
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
int depth=GET_VISUAL_DEPTH(xmesa->xm_visual);
struct swrast_device_driver *dd = _swrast_GetDeviceDriverReference( ctx );
-/* $Id: xm_tri.c,v 1.32 2003/03/01 01:50:24 brianp Exp $ */
+/* $Id: xm_tri.c,v 1.33 2003/04/01 17:28:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE bgr_t
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
for (i = 0; i < span.end; i++) { \
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
for (i = 0; i < span.end; i++) { \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
LOOKUP_SETUP; \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage; \
unsigned long pixel; \
PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
unsigned long p = PACK_8B8G8R( v2->color[0], \
v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
unsigned long p = PACK_8R8G8B( v2->color[0], \
v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE bgr_t
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
const GLubyte *color = v2->color;
#define RENDER_SPAN( span ) \
GLuint i; \
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
unsigned long p = PACK_5R6G5B( v2->color[0], \
v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
const GLubyte *color = v2->color;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
GLuint i; \
#define INTERP_Z 1
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage; \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2];
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
LOOKUP_SETUP; \
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
#define NAME smooth_TRUECOLOR_triangle
#define INTERP_RGB 1
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
for (i = 0; i < span.end; i++) { \
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
for (i = 0; i < span.end; i++) { \
#define PIXEL_TYPE bgr_t
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
PIXEL_TYPE *pixel = pRow; \
#define NAME smooth_TRUEDITHER_triangle
#define INTERP_RGB 1
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
for (i = 0; i < span.end; i++) { \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
#define NAME smooth_DITHER_triangle
#define INTERP_RGB 1
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
LOOKUP_SETUP; \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
#define RENDER_SPAN( span ) \
GLuint i; \
GLint x = span.x, y = FLIP(xmesa->xm_buffer, span.y); \
*/
#define NAME flat_TRUECOLOR_triangle
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage; \
unsigned long pixel; \
PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
unsigned long p = PACK_8B8G8R( v2->color[0], \
v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE GLuint
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
unsigned long p = PACK_8R8G8B( v2->color[0], \
v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE bgr_t
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
const GLubyte *color = v2->color;
#define RENDER_SPAN( span ) \
GLuint i; \
*/
#define NAME flat_TRUEDITHER_triangle
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
unsigned long p = PACK_5R6G5B( v2->color[0], \
v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE GLushort
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
const GLubyte *color = v2->color;
#define RENDER_SPAN( span ) \
GLuint i; \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
GLuint i; \
*/
#define NAME flat_DITHER_triangle
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
XMesaImage *img = xmesa->xm_buffer->backimage; \
FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
#define RENDER_SPAN( span ) \
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
GLubyte b = v2->color[2];
#define PIXEL_TYPE GLubyte
#define BYTES_PER_ROW (xmesa->xm_buffer->backimage->bytes_per_line)
#define SETUP_CODE \
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; \
+ XMesaContext xmesa = XMESA_CONTEXT(ctx); \
LOOKUP_SETUP; \
GLubyte r = v2->color[0]; \
GLubyte g = v2->color[1]; \
static swrast_tri_func get_triangle_func( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
+ XMesaContext xmesa = XMESA_CONTEXT(ctx);
int depth = GET_VISUAL_DEPTH(xmesa->xm_visual);
(void) kernel1;