aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/colortab.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-07-22 03:51:46 +0000
committerBrian Paul <[email protected]>2003-07-22 03:51:46 +0000
commit05944c031cd6bea985050f0e88a19f0794f57887 (patch)
tree23b1def1e5c7fe1efe19deb67c366f811e21cdc0 /src/mesa/main/colortab.c
parentf7fda86c6dcb7894157bd35a0cf15d003d48b441 (diff)
Restore more code lost during last big merge.
Rename colortable-related functions.
Diffstat (limited to 'src/mesa/main/colortab.c')
-rw-r--r--src/mesa/main/colortab.c40
1 files changed, 24 insertions, 16 deletions
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 9a1734bf4be..cc268557268 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -1332,7 +1332,7 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
void
-_mesa_init_one_colortable( struct gl_color_table *p )
+_mesa_init_colortable( struct gl_color_table *p )
{
p->FloatTable = GL_FALSE;
p->Table = NULL;
@@ -1343,7 +1343,7 @@ _mesa_init_one_colortable( struct gl_color_table *p )
void
-_mesa_free_one_colortable( struct gl_color_table *p )
+_mesa_free_colortable_data( struct gl_color_table *p )
{
if (p->Table) {
FREE(p->Table);
@@ -1351,23 +1351,31 @@ _mesa_free_one_colortable( struct gl_color_table *p )
}
}
-void _mesa_init_colortable( GLcontext * ctx )
+
+/*
+ * Initialize all colortables for a context.
+ */
+void _mesa_init_colortables( GLcontext * ctx )
{
/* Color tables */
- _mesa_init_one_colortable(&ctx->ColorTable);
- _mesa_init_one_colortable(&ctx->ProxyColorTable);
- _mesa_init_one_colortable(&ctx->PostConvolutionColorTable);
- _mesa_init_one_colortable(&ctx->ProxyPostConvolutionColorTable);
- _mesa_init_one_colortable(&ctx->PostColorMatrixColorTable);
- _mesa_init_one_colortable(&ctx->ProxyPostColorMatrixColorTable);
+ _mesa_init_colortable(&ctx->ColorTable);
+ _mesa_init_colortable(&ctx->ProxyColorTable);
+ _mesa_init_colortable(&ctx->PostConvolutionColorTable);
+ _mesa_init_colortable(&ctx->ProxyPostConvolutionColorTable);
+ _mesa_init_colortable(&ctx->PostColorMatrixColorTable);
+ _mesa_init_colortable(&ctx->ProxyPostColorMatrixColorTable);
}
-void _mesa_free_colortable_data( GLcontext *ctx )
+
+/*
+ * Free all colortable data for a context
+ */
+void _mesa_free_colortables_data( GLcontext *ctx )
{
- _mesa_free_one_colortable( &ctx->ColorTable );
- _mesa_free_one_colortable( &ctx->ProxyColorTable );
- _mesa_free_one_colortable( &ctx->PostConvolutionColorTable );
- _mesa_free_one_colortable( &ctx->ProxyPostConvolutionColorTable );
- _mesa_free_one_colortable( &ctx->PostColorMatrixColorTable );
- _mesa_free_one_colortable( &ctx->ProxyPostColorMatrixColorTable );
+ _mesa_free_colortable_data(&ctx->ColorTable);
+ _mesa_free_colortable_data(&ctx->ProxyColorTable);
+ _mesa_free_colortable_data(&ctx->PostConvolutionColorTable);
+ _mesa_free_colortable_data(&ctx->ProxyPostConvolutionColorTable);
+ _mesa_free_colortable_data(&ctx->PostColorMatrixColorTable);
+ _mesa_free_colortable_data(&ctx->ProxyPostColorMatrixColorTable);
}