#include <msp/core/algorithm.h>
#include <msp/core/maputils.h>
+#include <msp/strings/format.h>
+#include "deviceinfo.h"
#include "error.h"
#include "renderbuffer.h"
#include "sequence.h"
get_item(postprocessors, name) = &pproc;
}
+void SequenceBuilder::set_debug_name(const string &name)
+{
+#ifdef DEBUG
+ debug_name = name;
+#else
+ (void)name;
+#endif
+}
+
void SequenceBuilder::build(Sequence &sequence) const
{
+#ifdef DEBUG
+ if(!debug_name.empty())
+ sequence.set_debug_name(debug_name);
+#endif
+
sequence.set_hdr(tmpl.get_hdr());
sequence.set_alpha(tmpl.get_alpha());
- unsigned samples = min(tmpl.get_maximum_multisample(), Renderbuffer::get_max_samples());
+ unsigned samples = min(tmpl.get_maximum_multisample(), Limits::get_global().max_samples);
if(samples<tmpl.get_required_multisample())
throw invalid_operation("SequenceBuilder::build");
continue;
Sequence::Step &step = sequence.add_step(i->tag, *renderable);
- step.set_blend(i->blend.get());
- step.set_depth_test(i->depth_test.get());
+ step.set_blend(i->blend);
+ step.set_depth_test(i->depth_test);
+ step.set_stencil_test(i->stencil_test);
step.set_lighting(i->lighting);
}
{
proc = i->postprocessor_template->create(sequence.get_width(), sequence.get_height());
if(proc)
+ {
+#ifdef DEBUG
+ if(!debug_name.empty())
+ proc->set_debug_name(format("%s/%d.pproc", debug_name, i-postprocs.begin()));
+#endif
sequence.add_postprocessor_owned(proc);
+ }
}
}
}