]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/renderer.cpp
Add functions to retrieve steps and postprocessors from Sequence
[libs/gl.git] / source / render / renderer.cpp
index 1d729200dc8909e78d875911942718c930a30ba0..5e155f2e970ac75f4ba85b59d857e66aa3c30f0b 100644 (file)
@@ -1,9 +1,8 @@
 #include "batch.h"
 #include "buffer.h"
 #include "camera.h"
-#include "clipping.h"
-#include "deviceinfo.h"
 #include "error.h"
+#include "framebuffer.h"
 #include "lighting.h"
 #include "material.h"
 #include "program.h"
@@ -124,13 +123,6 @@ void Renderer::set_lighting(const Lighting *l)
                add_shader_data(l->get_shader_data());
 }
 
-void Renderer::set_clipping(const Clipping *c)
-{
-       state->clipping = c;
-       if(c)
-               add_shader_data(c->get_shader_data());
-}
-
 void Renderer::set_shader_program(const Program *p, const ProgramData *d)
 {
        state->shprog = p;
@@ -245,6 +237,8 @@ void Renderer::render(const Renderable &renderable, Tag tag)
 void Renderer::clear(const ClearValue *values)
 {
        pipeline_state.set_framebuffer(state->framebuffer);
+       pipeline_state.set_viewport(state->viewport);
+       pipeline_state.set_scissor(state->scissor);
        commands.use_pipeline(&pipeline_state);
        commands.clear(values);
 }
@@ -322,7 +316,6 @@ void Renderer::apply_state()
 
        pipeline_state.set_front_face(state->front_face);
        pipeline_state.set_face_cull(state->face_cull);
-       pipeline_state.set_enabled_clip_planes(state->clipping ? (1<<state->clipping->get_n_planes())-1 : 0);
 
        if(state->texture_count<texture_stack.size())
                flush_textures();
@@ -357,36 +350,8 @@ void Renderer::apply_state()
 }
 
 
-Renderer::BoundTexture::BoundTexture():
-       unit(-1),
-       texture(0),
-       sampler(0),
-       replaced(-1)
-{ }
-
-
 Renderer::BoundProgramData::BoundProgramData(const ProgramData *d):
-       shdata(d),
-       generation(0)
-{ }
-
-
-Renderer::State::State():
-       camera(0),
-       framebuffer(0),
-       viewport(0),
-       scissor(0),
-       texture_count(0),
-       clipping(0),
-       shprog(0),
-       shdata_count(0),
-       vertex_setup(0),
-       front_face(NON_MANIFOLD),
-       face_cull(NO_CULL),
-       depth_test(0),
-       stencil_test(0),
-       blend(0),
-       object_lod_bias(0)
+       shdata(d)
 { }
 
 } // namespace GL