]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/sequence.cpp
Some tweaks to vector component handling
[libs/gl.git] / source / render / sequence.cpp
index 2a5b351c888d2b7e3c609706061f8ae352301bda..e2986a249904a8c1fae136c6ef90e21a6d5c26bb 100644 (file)
@@ -12,7 +12,7 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-Tag Sequence::noclear_tag = "noclear";
+const Tag Sequence::noclear_tag = "noclear";
 
 Sequence::Sequence(unsigned w, unsigned h, const FrameFormat &f):
        width(w),
@@ -65,7 +65,7 @@ void Sequence::set_clear_stencil(int s)
 
 Sequence::Step &Sequence::add_step(Tag tag, Renderable &r)
 {
-       steps.push_back(Step(tag, &r));
+       steps.emplace_back(tag, &r);
        return steps.back();
 }
 
@@ -109,7 +109,7 @@ void Sequence::render(Renderer &renderer, Tag tag) const
                        throw invalid_operation("Sequence::render");
 
                const FrameFormat &format = target_fbo->get_format();
-               ClearValue clear_values[7];
+               ClearValue clear_values[FrameFormat::MAX_ATTACHMENTS];
                unsigned i = 0;
                Color default_color = (clear_colors.empty() ? Color(0.0f, 0.0f, 0.0f, 0.0f) : clear_colors.front());
                ClearValue *cv = clear_values;