Necessary if the same shader data object is used in successive draw
commands but the contained uniform values are changed.
++state->shdata_count;
else
{
- if(shdata_stack.size()>state->shdata_count)
- shdata_stack.erase(shdata_stack.begin()+state->shdata_count, shdata_stack.end());
+ flush_shader_data();
shdata_stack.push_back(&d);
state->shdata_count = shdata_stack.size();
changed |= SHADER_DATA;
}
}
+void Renderer::flush_shader_data()
+{
+ if(shdata_stack.size()>state->shdata_count)
+ shdata_stack.erase(shdata_stack.begin()+state->shdata_count, shdata_stack.end());
+}
+
void Renderer::set_mesh(const Mesh *m)
{
state->mesh = m;
Renderer state is popped. */
void add_shader_data(const ProgramData &data);
+ void flush_shader_data();
+
void set_mesh(const Mesh *);
void set_vertex_setup(const VertexSetup *);
void set_winding_test(const WindingTest *);