From f9995b30756140724f41daf963fa06167912be7f Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 12 Oct 2010 12:26:10 -0400 Subject: Drop GLcontext typedef and use struct gl_context instead --- src/mesa/drivers/x11/xm_api.c | 14 +++++----- src/mesa/drivers/x11/xm_buffer.c | 6 ++--- src/mesa/drivers/x11/xm_dd.c | 58 ++++++++++++++++++++-------------------- src/mesa/drivers/x11/xm_line.c | 10 +++---- src/mesa/drivers/x11/xm_span.c | 20 +++++++------- src/mesa/drivers/x11/xm_tri.c | 4 +-- src/mesa/drivers/x11/xmesaP.h | 24 ++++++++--------- 7 files changed, 68 insertions(+), 68 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index f091c38bc4..cb474f7ce5 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1200,7 +1200,7 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b, * Convert an RGBA color to a pixel value. */ unsigned long -xmesa_color_to_pixel(GLcontext *ctx, +xmesa_color_to_pixel(struct gl_context *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLuint pixelFormat) { @@ -1481,7 +1481,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) { static GLboolean firstTime = GL_TRUE; XMesaContext c; - GLcontext *mesaCtx; + struct gl_context *mesaCtx; struct dd_function_table functions; TNLcontext *tnl; @@ -1490,7 +1490,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) firstTime = GL_FALSE; } - /* Note: the XMesaContext contains a Mesa GLcontext struct (inheritance) */ + /* Note: the XMesaContext contains a Mesa struct gl_context struct (inheritance) */ c = (XMesaContext) CALLOC_STRUCT(xmesa_context); if (!c) return NULL; @@ -1501,7 +1501,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) _mesa_init_driver_functions(&functions); xmesa_init_driver_functions(v, &functions); if (!_mesa_initialize_context(mesaCtx, &v->mesa_visual, - share_list ? &(share_list->mesa) : (GLcontext *) NULL, + share_list ? &(share_list->mesa) : (struct gl_context *) NULL, &functions, (void *) c)) { free(c); return NULL; @@ -1574,7 +1574,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) PUBLIC void XMesaDestroyContext( XMesaContext c ) { - GLcontext *mesaCtx = &c->mesa; + struct gl_context *mesaCtx = &c->mesa; #ifdef FX FXdestroyContext( XMESA_BUFFER(mesaCtx->DrawBuffer) ); @@ -1804,7 +1804,7 @@ xmesa_check_and_update_buffer_size(XMesaContext xmctx, XMesaBuffer drawBuffer) xmesa_get_window_size(drawBuffer->display, drawBuffer, &width, &height); if (drawBuffer->mesa_buffer.Width != width || drawBuffer->mesa_buffer.Height != height) { - GLcontext *ctx = xmctx ? &xmctx->mesa : NULL; + struct gl_context *ctx = xmctx ? &xmctx->mesa : NULL; _mesa_resize_framebuffer(ctx, &(drawBuffer->mesa_buffer), width, height); } drawBuffer->mesa_buffer.Initialized = GL_TRUE; /* XXX TEMPORARY? */ @@ -2252,7 +2252,7 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) { - GLcontext *ctx = &xmesa->mesa; + struct gl_context *ctx = &xmesa->mesa; GLint r = (GLint) (red * 255.0F); GLint g = (GLint) (green * 255.0F); GLint b = (GLint) (blue * 255.0F); diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index 3a696f7106..2683bd44d1 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++ b/src/mesa/drivers/x11/xm_buffer.c @@ -251,7 +251,7 @@ xmesa_delete_renderbuffer(struct gl_renderbuffer *rb) * Called via gl_renderbuffer::AllocStorage() */ static GLboolean -xmesa_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb, +xmesa_alloc_front_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) { struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); @@ -278,7 +278,7 @@ xmesa_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb, * Called via gl_renderbuffer::AllocStorage() */ static GLboolean -xmesa_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb, +xmesa_alloc_back_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) { struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb); @@ -323,7 +323,7 @@ xmesa_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb, struct xmesa_renderbuffer * -xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const struct gl_config *visual, +xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name, const struct gl_config *visual, GLboolean backBuffer) { struct xmesa_renderbuffer *xrb = CALLOC_STRUCT(xmesa_renderbuffer); diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 5edafb890b..4f43e80722 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -91,7 +91,7 @@ const int xmesa_kernel1[16] = { static void -finish_or_flush( GLcontext *ctx ) +finish_or_flush( struct gl_context *ctx ) { #ifdef XFree86Server /* NOT_NEEDED */ @@ -107,7 +107,7 @@ finish_or_flush( GLcontext *ctx ) static void -clear_color( GLcontext *ctx, const GLfloat color[4] ) +clear_color( struct gl_context *ctx, const GLfloat color[4] ) { if (ctx->DrawBuffer->Name == 0) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -134,7 +134,7 @@ clear_color( GLcontext *ctx, const GLfloat color[4] ) /* Implements glColorMask() */ static void -color_mask(GLcontext *ctx, +color_mask(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -173,7 +173,7 @@ color_mask(GLcontext *ctx, * Clear the front or back color buffer, if it's implemented with a pixmap. */ static void -clear_pixmap(GLcontext *ctx, struct xmesa_renderbuffer *xrb, +clear_pixmap(struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -193,7 +193,7 @@ clear_pixmap(GLcontext *ctx, struct xmesa_renderbuffer *xrb, static void -clear_8bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb, +clear_8bit_ximage( struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height ) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -206,7 +206,7 @@ clear_8bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb, static void -clear_HPCR_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb, +clear_HPCR_ximage( struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height ) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -227,7 +227,7 @@ clear_HPCR_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb, static void -clear_16bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb, +clear_16bit_ximage( struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -249,7 +249,7 @@ clear_16bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb, /* Optimized code provided by Nozomi Ytow */ static void -clear_24bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb, +clear_24bit_ximage(struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -282,7 +282,7 @@ clear_24bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb, static void -clear_32bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb, +clear_32bit_ximage(struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -326,7 +326,7 @@ clear_32bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb, static void -clear_nbit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb, +clear_nbit_ximage(struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -345,7 +345,7 @@ clear_nbit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb, static void -clear_buffers(GLcontext *ctx, GLbitfield buffers) +clear_buffers(struct gl_context *ctx, GLbitfield buffers) { if (ctx->DrawBuffer->Name == 0) { /* this is a window system framebuffer */ @@ -396,7 +396,7 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers) * Check if we can do an optimized glDrawPixels into an 8R8G8B visual. */ static GLboolean -can_do_DrawPixels_8R8G8B(GLcontext *ctx, GLenum format, GLenum type) +can_do_DrawPixels_8R8G8B(struct gl_context *ctx, GLenum format, GLenum type) { if (format == GL_BGRA && type == GL_UNSIGNED_BYTE && @@ -432,7 +432,7 @@ can_do_DrawPixels_8R8G8B(GLcontext *ctx, GLenum format, GLenum type) * The image format must be GL_BGRA to match the PF_8R8G8B pixel format. */ static void -xmesa_DrawPixels_8R8G8B( GLcontext *ctx, +xmesa_DrawPixels_8R8G8B( struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, @@ -529,7 +529,7 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx, * Check if we can do an optimized glDrawPixels into an 5R6G5B visual. */ static GLboolean -can_do_DrawPixels_5R6G5B(GLcontext *ctx, GLenum format, GLenum type) +can_do_DrawPixels_5R6G5B(struct gl_context *ctx, GLenum format, GLenum type) { if (format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 && @@ -567,7 +567,7 @@ can_do_DrawPixels_5R6G5B(GLcontext *ctx, GLenum format, GLenum type) * match the PF_5R6G5B pixel format. */ static void -xmesa_DrawPixels_5R6G5B( GLcontext *ctx, +xmesa_DrawPixels_5R6G5B( struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, @@ -662,7 +662,7 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx, * Determine if we can do an optimized glCopyPixels. */ static GLboolean -can_do_CopyPixels(GLcontext *ctx, GLenum type) +can_do_CopyPixels(struct gl_context *ctx, GLenum type) { if (type == GL_COLOR && ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */ @@ -701,7 +701,7 @@ can_do_CopyPixels(GLcontext *ctx, GLenum type) * We do support copying from one window to another, ala glXMakeCurrentRead. */ static void -xmesa_CopyPixels( GLcontext *ctx, +xmesa_CopyPixels( struct gl_context *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint destx, GLint desty, GLenum type ) { @@ -740,7 +740,7 @@ xmesa_CopyPixels( GLcontext *ctx, * return a meaningful GL_RENDERER string. */ static const GLubyte * -get_string( GLcontext *ctx, GLenum name ) +get_string( struct gl_context *ctx, GLenum name ) { (void) ctx; switch (name) { @@ -767,7 +767,7 @@ get_string( GLcontext *ctx, GLenum name ) * dither enable/disable. */ static void -enable( GLcontext *ctx, GLenum pname, GLboolean state ) +enable( struct gl_context *ctx, GLenum pname, GLboolean state ) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -785,7 +785,7 @@ enable( GLcontext *ctx, GLenum pname, GLboolean state ) static void -clear_color_HPCR_ximage( GLcontext *ctx, const GLfloat color[4] ) +clear_color_HPCR_ximage( struct gl_context *ctx, const GLfloat color[4] ) { int i; const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -819,7 +819,7 @@ clear_color_HPCR_ximage( GLcontext *ctx, const GLfloat color[4] ) static void -clear_color_HPCR_pixmap( GLcontext *ctx, const GLfloat color[4] ) +clear_color_HPCR_pixmap( struct gl_context *ctx, const GLfloat color[4] ) { int i; const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -863,7 +863,7 @@ clear_color_HPCR_pixmap( GLcontext *ctx, const GLfloat color[4] ) * flags. */ void -xmesa_update_state( GLcontext *ctx, GLbitfield new_state ) +xmesa_update_state( struct gl_context *ctx, GLbitfield new_state ) { const XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -954,7 +954,7 @@ xmesa_update_state( GLcontext *ctx, GLbitfield new_state ) * texels. */ static GLboolean -test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, +test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLenum format, GLenum type, GLint width, GLint height, GLint depth, GLint border) { @@ -988,7 +988,7 @@ test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, * In SW, we don't really compress GL_COMPRESSED_RGB[A] textures! */ static gl_format -choose_tex_format( GLcontext *ctx, GLint internalFormat, +choose_tex_format( struct gl_context *ctx, GLint internalFormat, GLenum format, GLenum type ) { switch (internalFormat) { @@ -1014,7 +1014,7 @@ choose_tex_format( GLcontext *ctx, GLint internalFormat, * That problem led to the GLX_MESA_resize_buffers extension. */ static void -xmesa_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h) +xmesa_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h) { XMesaContext xmctx = XMESA_CONTEXT(ctx); XMesaBuffer xmdrawbuf = XMESA_BUFFER(ctx->WinSysDrawBuffer); @@ -1044,7 +1044,7 @@ struct xmesa_query_object static struct gl_query_object * -xmesa_new_query_object(GLcontext *ctx, GLuint id) +xmesa_new_query_object(struct gl_context *ctx, GLuint id) { struct xmesa_query_object *q = CALLOC_STRUCT(xmesa_query_object); if (q) { @@ -1056,7 +1056,7 @@ xmesa_new_query_object(GLcontext *ctx, GLuint id) static void -xmesa_begin_query(GLcontext *ctx, struct gl_query_object *q) +xmesa_begin_query(struct gl_context *ctx, struct gl_query_object *q) { if (q->Target == GL_TIME_ELAPSED_EXT) { struct xmesa_query_object *xq = (struct xmesa_query_object *) q; @@ -1083,7 +1083,7 @@ time_diff(const struct timeval *t0, const struct timeval *t1) static void -xmesa_end_query(GLcontext *ctx, struct gl_query_object *q) +xmesa_end_query(struct gl_context *ctx, struct gl_query_object *q) { if (q->Target == GL_TIME_ELAPSED_EXT) { struct xmesa_query_object *xq = (struct xmesa_query_object *) q; @@ -1175,7 +1175,7 @@ xmesa_init_driver_functions( XMesaVisual xmvisual, * functions. * Called during context creation only. */ -void xmesa_register_swrast_functions( GLcontext *ctx ) +void xmesa_register_swrast_functions( struct gl_context *ctx ) { SWcontext *swrast = SWRAST_CONTEXT( ctx ); diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c index f643b6d3a7..f03f99f918 100644 --- a/src/mesa/drivers/x11/xm_line.c +++ b/src/mesa/drivers/x11/xm_line.c @@ -54,7 +54,7 @@ */ #if 000 /* XXX don't use this, it doesn't dither correctly */ -static void draw_points_ANY_pixmap( GLcontext *ctx, const SWvertex *vert ) +static void draw_points_ANY_pixmap( struct gl_context *ctx, const SWvertex *vert ) { XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaDisplay *dpy = xmesa->xm_visual->display; @@ -89,7 +89,7 @@ static void draw_points_ANY_pixmap( GLcontext *ctx, const SWvertex *vert ) * our internal point functions, otherwise fall back to the standard * swrast functions. */ -void xmesa_choose_point( GLcontext *ctx ) +void xmesa_choose_point( struct gl_context *ctx ) { #if 0 XMesaContext xmesa = XMESA_CONTEXT(ctx); @@ -546,7 +546,7 @@ void xmesa_choose_point( GLcontext *ctx ) * for the XSetLineAttributes() function call. */ static void -xor_line(GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1) +xor_line(struct gl_context *ctx, const SWvertex *vert0, const SWvertex *vert1) { XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaDisplay *dpy = xmesa->xm_visual->display; @@ -578,7 +578,7 @@ xor_line(GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1) * swrast fallback. */ static swrast_line_func -get_line_func(GLcontext *ctx) +get_line_func(struct gl_context *ctx) { #if CHAN_BITS == 8 SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -682,7 +682,7 @@ get_line_func(GLcontext *ctx) * standard swrast functions. */ void -xmesa_choose_line(GLcontext *ctx) +xmesa_choose_line(struct gl_context *ctx) { SWcontext *swrast = SWRAST_CONTEXT(ctx); diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c index c39d87c451..ab66c5e1f1 100644 --- a/src/mesa/drivers/x11/xm_span.c +++ b/src/mesa/drivers/x11/xm_span.c @@ -163,13 +163,13 @@ static unsigned long read_pixel( XMesaDisplay *dpy, #define PUT_ROW_ARGS \ - GLcontext *ctx, \ + struct gl_context *ctx, \ struct gl_renderbuffer *rb, \ GLuint n, GLint x, GLint y, \ const void *values, const GLubyte mask[] #define RGB_SPAN_ARGS \ - GLcontext *ctx, \ + struct gl_context *ctx, \ struct gl_renderbuffer *rb, \ GLuint n, GLint x, GLint y, \ const void *values, const GLubyte mask[] @@ -2242,7 +2242,7 @@ static void put_row_rgb_GRAYSCALE8_ximage( RGB_SPAN_ARGS ) #define PUT_VALUES_ARGS \ - GLcontext *ctx, struct gl_renderbuffer *rb, \ + struct gl_context *ctx, struct gl_renderbuffer *rb, \ GLuint n, const GLint x[], const GLint y[], \ const void *values, const GLubyte mask[] @@ -2829,7 +2829,7 @@ static void put_values_GRAYSCALE8_ximage( PUT_VALUES_ARGS ) /**********************************************************************/ #define PUT_MONO_ROW_ARGS \ - GLcontext *ctx, struct gl_renderbuffer *rb, \ + struct gl_context *ctx, struct gl_renderbuffer *rb, \ GLuint n, GLint x, GLint y, const void *value, \ const GLubyte mask[] @@ -3267,7 +3267,7 @@ static void put_mono_row_DITHER_5R6G5B_ximage( PUT_MONO_ROW_ARGS ) /**********************************************************************/ #define PUT_MONO_VALUES_ARGS \ - GLcontext *ctx, struct gl_renderbuffer *rb, \ + struct gl_context *ctx, struct gl_renderbuffer *rb, \ GLuint n, const GLint x[], const GLint y[], \ const void *value, const GLubyte mask[] @@ -3773,7 +3773,7 @@ static void put_values_ci_ximage( PUT_VALUES_ARGS ) * else return number of pixels to skip in the destination array. */ static int -clip_for_xgetimage(GLcontext *ctx, XMesaPixmap pixmap, GLuint *n, GLint *x, GLint *y) +clip_for_xgetimage(struct gl_context *ctx, XMesaPixmap pixmap, GLuint *n, GLint *x, GLint *y) { XMesaContext xmesa = XMESA_CONTEXT(ctx); XMesaBuffer source = XMESA_BUFFER(ctx->DrawBuffer); @@ -3813,7 +3813,7 @@ clip_for_xgetimage(GLcontext *ctx, XMesaPixmap pixmap, GLuint *n, GLint *x, GLin * Read a horizontal span of color-index pixels. */ static void -get_row_ci(GLcontext *ctx, struct gl_renderbuffer *rb, +get_row_ci(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint n, GLint x, GLint y, void *values) { GLuint *index = (GLuint *) values; @@ -3870,7 +3870,7 @@ get_row_ci(GLcontext *ctx, struct gl_renderbuffer *rb, * Read a horizontal span of color pixels. */ static void -get_row_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, +get_row_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint n, GLint x, GLint y, void *values) { GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; @@ -4272,7 +4272,7 @@ get_row_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, * Read an array of color index pixels. */ static void -get_values_ci(GLcontext *ctx, struct gl_renderbuffer *rb, +get_values_ci(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint n, const GLint x[], const GLint y[], void *values) { GLuint *indx = (GLuint *) values; @@ -4296,7 +4296,7 @@ get_values_ci(GLcontext *ctx, struct gl_renderbuffer *rb, static void -get_values_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, +get_values_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint n, const GLint x[], const GLint y[], void *values) { GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c index a6efb35e3c..98dece113d 100644 --- a/src/mesa/drivers/x11/xm_tri.c +++ b/src/mesa/drivers/x11/xm_tri.c @@ -1448,7 +1448,7 @@ do { \ * swrast fallback. */ static swrast_tri_func -get_triangle_func(GLcontext *ctx) +get_triangle_func(struct gl_context *ctx) { #if CHAN_BITS == 8 SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -1644,7 +1644,7 @@ get_triangle_func(GLcontext *ctx) * of our internal tri functions, otherwise fall back to the * standard swrast functions. */ -void xmesa_choose_triangle( GLcontext *ctx ) +void xmesa_choose_triangle( struct gl_context *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 37b7a587de..a24b6a1a96 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -54,7 +54,7 @@ struct xmesa_renderbuffer; /* Function pointer for clearing color buffers */ -typedef void (*ClearFunc)( GLcontext *ctx, struct xmesa_renderbuffer *xrb, +typedef void (*ClearFunc)( struct gl_context *ctx, struct xmesa_renderbuffer *xrb, GLint x, GLint y, GLint width, GLint height ); @@ -128,11 +128,11 @@ struct xmesa_visual { /** - * Context info, derived from GLcontext. + * Context info, derived from struct gl_context. * Basically corresponds to a GLXContext. */ struct xmesa_context { - GLcontext mesa; /* the core library context (containment) */ + struct gl_context mesa; /* the core library context (containment) */ XMesaVisual xm_visual; /* Describes the buffers */ XMesaBuffer xm_buffer; /* current span/point/line/triangle buffer */ @@ -495,7 +495,7 @@ extern const int xmesa_kernel1[16]; */ extern struct xmesa_renderbuffer * -xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const struct gl_config *visual, +xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name, const struct gl_config *visual, GLboolean backBuffer); extern void @@ -505,7 +505,7 @@ extern XMesaBuffer xmesa_find_buffer(XMesaDisplay *dpy, XMesaColormap cmap, XMesaBuffer notThis); extern unsigned long -xmesa_color_to_pixel( GLcontext *ctx, +xmesa_color_to_pixel( struct gl_context *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLuint pixelFormat ); @@ -521,7 +521,7 @@ xmesa_init_driver_functions( XMesaVisual xmvisual, struct dd_function_table *driver ); extern void -xmesa_update_state( GLcontext *ctx, GLbitfield new_state ); +xmesa_update_state( struct gl_context *ctx, GLbitfield new_state ); extern void xmesa_set_renderbuffer_funcs(struct xmesa_renderbuffer *xrb, @@ -542,11 +542,11 @@ xmesa_renderbuffer(struct gl_renderbuffer *rb) /** - * Return pointer to XMesaContext corresponding to a Mesa GLcontext. + * Return pointer to XMesaContext corresponding to a Mesa struct gl_context. * Since we're using structure containment, it's just a cast!. */ static INLINE XMesaContext -XMESA_CONTEXT(GLcontext *ctx) +XMESA_CONTEXT(struct gl_context *ctx) { return (XMesaContext) ctx; } @@ -566,12 +566,12 @@ XMESA_BUFFER(struct gl_framebuffer *b) /* Plugged into the software rasterizer. Try to use internal * swrast-style point, line and triangle functions. */ -extern void xmesa_choose_point( GLcontext *ctx ); -extern void xmesa_choose_line( GLcontext *ctx ); -extern void xmesa_choose_triangle( GLcontext *ctx ); +extern void xmesa_choose_point( struct gl_context *ctx ); +extern void xmesa_choose_line( struct gl_context *ctx ); +extern void xmesa_choose_triangle( struct gl_context *ctx ); -extern void xmesa_register_swrast_functions( GLcontext *ctx ); +extern void xmesa_register_swrast_functions( struct gl_context *ctx ); -- cgit v1.2.3