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.
This commit is contained in:
Neil Roberts 2010-11-01 17:25:26 +00:00
parent 3be05abf60
commit 7379a5fc04
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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"