Sequence doesn't pass on the tag it receives, so it can be used to
control the sequence's own behaviour instead.
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)
float clear_depth = 1.0f;
int clear_stencil = 0;
+ static Tag noclear_tag;
+
public:
Sequence() = default;
Sequence(unsigned, unsigned, const FrameFormat &);