X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Frenderer.cpp;h=5e155f2e970ac75f4ba85b59d857e66aa3c30f0b;hb=77a534371433054384d213922a2e8c55f8a69ad6;hp=b142da75448652c3135a9aa3b30e796aa374f8ac;hpb=5bb193f930fb8738d099d630c4d625d82c1215b5;p=libs%2Fgl.git diff --git a/source/render/renderer.cpp b/source/render/renderer.cpp index b142da75..5e155f2e 100644 --- a/source/render/renderer.cpp +++ b/source/render/renderer.cpp @@ -1,7 +1,6 @@ #include "batch.h" #include "buffer.h" #include "camera.h" -#include "clipping.h" #include "error.h" #include "framebuffer.h" #include "lighting.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<clipping->get_n_planes())-1 : 0); if(state->texture_count