TNL module needs to implement ctx->Driver.ProgramStringNotify() function

so that calls to glProgramStringARB() to specify a new program causes the
TNL-attached data to get recomputed.
This commit is contained in:
Brian Paul
2005-10-28 14:32:49 +00:00
parent f51bf9e23c
commit b5ee368baf
3 changed files with 22 additions and 0 deletions

View File

@@ -43,6 +43,7 @@
#include "t_pipeline.h"
#include "t_vb_arbprogram.h"
#define DISASSEM 0
/*--------------------------------------------------------------------------- */
@@ -1459,3 +1460,20 @@ const struct tnl_pipeline_stage _tnl_arb_vertex_program_stage =
validate_vertex_program, /* validate */
run_arb_vertex_program /* run */
};
/**
* Called via ctx->Driver.ProgramStringNotify() after a new vertex program
* string has been parsed.
*/
void
_tnl_program_string(GLcontext *ctx, GLenum target, struct program *program)
{
if (target == GL_VERTEX_PROGRAM_ARB) {
/* free any existing tnl data hanging off the program */
struct vertex_program *vprog = (struct vertex_program *) program;
if (vprog->TnlData) {
free_tnl_data(vprog);
}
}
}