mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-10 15:50:33 +01:00
mesa: Rename gl_context::swtnl_im to vbo_context; use proper type.
The main GL context's swtnl_im field is the VBO module's vbo_context
structure. Using the name "swtnl" in the name is confusing since
some drivers use hardware texturing and lighting, but still rely on the
VBO module for drawing.
v2: Forward declare the type and use that instead of void *
(suggested by Eric Anholt).
v3: Remove unnecessary cast (pointed out by by Topi Pohjolainen).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
parent
6e143af66d
commit
644fbbd3eb
3 changed files with 5 additions and 4 deletions
|
|
@ -80,6 +80,7 @@ struct prog_instruction;
|
|||
struct gl_program_parameter_list;
|
||||
struct set;
|
||||
struct set_entry;
|
||||
struct vbo_context;
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
|
@ -3669,7 +3670,7 @@ struct gl_context
|
|||
void *swrast_context;
|
||||
void *swsetup_context;
|
||||
void *swtnl_context;
|
||||
void *swtnl_im;
|
||||
struct vbo_context *vbo_context;
|
||||
struct st_context *st;
|
||||
void *aelt_context;
|
||||
/*@}*/
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ GLboolean _vbo_CreateContext( struct gl_context *ctx )
|
|||
{
|
||||
struct vbo_context *vbo = CALLOC_STRUCT(vbo_context);
|
||||
|
||||
ctx->swtnl_im = (void *)vbo;
|
||||
ctx->vbo_context = vbo;
|
||||
|
||||
/* Initialize the arrayelt helper
|
||||
*/
|
||||
|
|
@ -224,7 +224,7 @@ void _vbo_DestroyContext( struct gl_context *ctx )
|
|||
if (ctx->API == API_OPENGL_COMPAT)
|
||||
vbo_save_destroy(ctx);
|
||||
free(vbo);
|
||||
ctx->swtnl_im = NULL;
|
||||
ctx->vbo_context = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ struct vbo_context {
|
|||
|
||||
static inline struct vbo_context *vbo_context(struct gl_context *ctx)
|
||||
{
|
||||
return (struct vbo_context *)(ctx->swtnl_im);
|
||||
return ctx->vbo_context;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue