return;
}
+ FLUSH_VERTICES(ctx, _NEW_ARRAY);
ctx->Array.VertexAttrib[index].Enabled = GL_TRUE;
ctx->Array._Enabled |= _NEW_ARRAY_ATTRIB(index);
ctx->Array.NewState |= _NEW_ARRAY_ATTRIB(index);
return;
}
+ FLUSH_VERTICES(ctx, _NEW_ARRAY);
ctx->Array.VertexAttrib[index].Enabled = GL_FALSE;
ctx->Array._Enabled &= ~_NEW_ARRAY_ATTRIB(index);
ctx->Array.NewState |= _NEW_ARRAY_ATTRIB(index);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
if (target == GL_VERTEX_PROGRAM_ARB
&& ctx->Extensions.ARB_vertex_program) {
struct vertex_program *prog = ctx->VertexProgram.Current;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
if (target == GL_FRAGMENT_PROGRAM_ARB
&& ctx->Extensions.ARB_fragment_program) {
if (index >= ctx->Const.MaxFragmentProgramEnvParams) {
{
GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
if (!ctx->_CurrentProgram)
ASSERT_OUTSIDE_BEGIN_END(ctx);
struct program *prog;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
if ((target == GL_FRAGMENT_PROGRAM_NV
&& ctx->Extensions.NV_fragment_program) ||
(target == GL_FRAGMENT_PROGRAM_ARB
return;
}
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
vprog = (struct vertex_program *)
_mesa_HashLookup(ctx->Shared->Programs, id);
return;
}
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
prog = (struct program *) _mesa_HashLookup(ctx->Shared->Programs, id);
if (prog && prog->Target != 0 && prog->Target != target) {
if (target == GL_VERTEX_PROGRAM_NV && ctx->Extensions.NV_vertex_program) {
if (index < MAX_NV_VERTEX_PROGRAM_PARAMS) {
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
ASSIGN_4V(ctx->VertexProgram.Parameters[index], x, y, z, w);
}
else {
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
if (target == GL_VERTEX_PROGRAM_NV && ctx->Extensions.NV_vertex_program) {
if (address & 0x3) {
/* addr must be multiple of four */
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
prog = (struct program *) _mesa_HashLookup(ctx->Shared->Programs, id);
if (!prog || prog->Target != GL_FRAGMENT_PROGRAM_NV) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glProgramNamedParameterNV");
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ /* texture state is dependent on current fragment and vertex programs */
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_TEXTURE);
+
if ((target == GL_VERTEX_PROGRAM_NV
&& ctx->Extensions.NV_vertex_program) ||
(target == GL_VERTEX_PROGRAM_ARB
{
GLint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
if (n < 0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glDeleteProgramsNV" );