From e57a132f940d1b0f1c66720096c446e4f04bf4dc Mon Sep 17 00:00:00 2001 From: Neil Roberts <neil@linux.intel.com> Date: Mon, 1 Nov 2010 17:25:26 +0000 Subject: [PATCH] cogl: Rename arbfp_source_buffer to fragment_source_buffer Only one of the material backends can be generating code at the same time so it seems to make sense to share the same source buffer between arbfp and glsl. The new name is fragment_source_buffer in case we later want to create a new buffer for the vertex shader. That probably couldn't share the same buffer because it will likely need to be generated at the same time. --- clutter/cogl/cogl/cogl-context.c | 2 +- clutter/cogl/cogl/cogl-context.h | 2 +- clutter/cogl/cogl/cogl-pipeline-arbfp.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clutter/cogl/cogl/cogl-context.c b/clutter/cogl/cogl/cogl-context.c index bc6f34d72..074c3c61c 100644 --- a/clutter/cogl/cogl/cogl-context.c +++ b/clutter/cogl/cogl/cogl-context.c @@ -132,7 +132,7 @@ cogl_create_context (void) _context->opaque_color_pipeline = cogl_pipeline_new (); _context->blended_color_pipeline = cogl_pipeline_new (); _context->texture_pipeline = cogl_pipeline_new (); - _context->arbfp_source_buffer = g_string_new (""); + _context->fragment_source_buffer = g_string_new (""); _context->source_stack = NULL; _context->legacy_state_set = 0; diff --git a/clutter/cogl/cogl/cogl-context.h b/clutter/cogl/cogl/cogl-context.h index 75fcd22ec..3b06f1425 100644 --- a/clutter/cogl/cogl/cogl-context.h +++ b/clutter/cogl/cogl/cogl-context.h @@ -86,7 +86,7 @@ typedef struct CoglPipeline *opaque_color_pipeline; /* used for set_source_color */ CoglPipeline *blended_color_pipeline; /* used for set_source_color */ CoglPipeline *texture_pipeline; /* used for set_source_texture */ - GString *arbfp_source_buffer; + GString *fragment_source_buffer; GList *source_stack; int legacy_state_set; diff --git a/clutter/cogl/cogl/cogl-pipeline-arbfp.c b/clutter/cogl/cogl/cogl-pipeline-arbfp.c index 97b5e3693..fb2c72ac6 100644 --- a/clutter/cogl/cogl/cogl-pipeline-arbfp.c +++ b/clutter/cogl/cogl/cogl-pipeline-arbfp.c @@ -396,9 +396,9 @@ _cogl_pipeline_backend_arbfp_start (CoglPipeline *pipeline, { int i; - /* We reuse a single grow-only GString for ARBfp code-gen */ - g_string_set_size (ctx->arbfp_source_buffer, 0); - arbfp_program_state->source = ctx->arbfp_source_buffer; + /* We reuse a single grow-only GString for code-gen */ + g_string_set_size (ctx->fragment_source_buffer, 0); + arbfp_program_state->source = ctx->fragment_source_buffer; g_string_append (arbfp_program_state->source, "!!ARBfp1.0\n" "TEMP output;\n"