namespace Msp {
namespace GL {
+Tag Sequence::noclear_tag = "noclear";
+
Sequence::Sequence(unsigned w, unsigned h, const FrameFormat &f):
width(w),
height(h),
void Sequence::render(Renderer &renderer, Tag tag) const
{
- if(tag.id)
+ if(tag.id && tag!=noclear_tag)
return;
Renderer::Push _push(renderer);
if(target[0])
renderer.set_framebuffer(&(target_ms ? target_ms : target[0])->get_framebuffer());
- if(clear_enabled)
+ if(clear_enabled && tag!=noclear_tag)
{
const Framebuffer *target_fbo = renderer.get_framebuffer();
if(!target_fbo)
renderer.set_depth_test(&s.get_depth_test());
renderer.set_stencil_test(&s.get_stencil_test());
- renderer.set_blend(&s.get_blend());
- if (const Lighting *lighting = s.get_lighting())
+ if(const Lighting *lighting = s.get_lighting())
renderer.add_shader_data(lighting->get_shader_data());
- renderer.set_clipping(s.get_clipping());
if(const Renderable *renderable = s.get_renderable())
renderer.render(*renderable, s.get_tag());
Sequence::Step::Step(Tag t, Renderable *r):
tag(t),
lighting(0),
- clipping(0),
renderable(r)
{ }
stencil_test = st;
}
-void Sequence::Step::set_blend(const Blend &b)
-{
- blend = b;
-}
-
-void Sequence::Step::set_clipping(const Clipping *c)
-{
- clipping = c;
-}
-
} // namespace GL
} // namespace Msp