camera(c),
state_stack(1),
vertex_array(0),
- vertex_array_changed(false),
element_buffer(0)
{
state_stack.reserve(16);
void Renderer::set_vertex_array(const VertexArray *a)
{
- vertex_array_changed = (a!=vertex_array);
vertex_array = a;
}
apply_state();
- // Until VertexArray acquires VAO support and becomes Bindable
- if(vertex_array_changed)
- {
- vertex_array->apply();
- vertex_array_changed = false;
- }
+ vertex_array->apply();
if(element_buffer)
element_buffer->bind_to(ELEMENT_ARRAY_BUFFER);
std::vector<const ProgramData *> shdata_stack;
bool shdata_changed;
const VertexArray *vertex_array;
- bool vertex_array_changed;
const Buffer *element_buffer;
std::set<const Renderable *> excluded;