#include "texture.h"
#include "texturing.h"
#include "vertexarray.h"
+#include "windingtest.h"
using namespace std;
Material::unbind();
Program::unbind();
Buffer::unbind_from(ELEMENT_ARRAY_BUFFER);
+ WindingTest::unbind();
}
void Renderer::set_texture(const Texture *t)
element_buffer = b;
}
+void Renderer::set_winding_test(const WindingTest *w)
+{
+ state->winding_test = w;
+}
+
void Renderer::push_state()
{
state_stack.push_back(state_stack.back());
// Until VertexArray acquires VAO support and becomes Bindable
if(vertex_array_changed)
+ {
vertex_array->apply();
+ vertex_array_changed = false;
+ }
if(element_buffer)
element_buffer->bind_to(ELEMENT_ARRAY_BUFFER);
else
Program::unbind();
+ if(state->winding_test)
+ state->winding_test->bind();
+ else
+ WindingTest::unbind();
+
if(mtx_changed)
{
MatrixStack::modelview() = mtx_stack.top();
texture(0),
texturing(0),
material(0),
- shprog(0)
+ shprog(0),
+ winding_test(0)
{ }