]> git.tdb.fi Git - libs/gl.git/commitdiff
Always use RGBA color format when building Sequences
authorMikko Rasa <tdb@tdb.fi>
Fri, 12 Nov 2021 16:24:23 +0000 (18:24 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 12 Nov 2021 16:34:00 +0000 (18:34 +0200)
source/builders/sequencebuilder.cpp
source/builders/sequencetemplate.cpp
source/builders/sequencetemplate.h

index 65aeaa13d01a02d1dfa12198dfb4ec8fc4f39be6..c80e2f09a07ad4c69164fdf63686017f692f2211 100644 (file)
@@ -171,9 +171,8 @@ FrameFormat SequenceBuilder::create_frame_format() const
        if(samples<tmpl.get_required_multisample())
                throw invalid_operation("SequenceBuilder::create_frame_format");
 
-       PixelComponents color_comp = (tmpl.get_alpha() ? RGBA : RGB);
        DataType color_type = (tmpl.get_hdr() ? HALF_FLOAT : UNSIGNED_BYTE);
-       PixelFormat color_pf = make_pixelformat(color_comp, color_type);
+       PixelFormat color_pf = make_pixelformat(RGBA, color_type);
 
        return (COLOR_ATTACHMENT,color_pf, DEPTH_ATTACHMENT).set_samples(samples);
 }
index 999d2ae7693baaeea5e0c37229dd54d5b84f5a75..3f96f0bbb9a8d85bf14efdd27be337ada6d837bc 100644 (file)
@@ -74,7 +74,6 @@ SequenceTemplate::Loader::Loader(SequenceTemplate &t, Collection &c):
 void SequenceTemplate::Loader::init_actions()
 {
        add("hdr", &SequenceTemplate::hdr);
-       add("alpha", &SequenceTemplate::alpha);
        add("clear", &Loader::clear);
        add("effect", &Loader::effect);
        add("multisample", &Loader::multisample);
index 5c13aebebc2263677447e93e33ab96de25883cf0..34e4924befc521902d5f5827af46b88b2c032946 100644 (file)
@@ -138,7 +138,6 @@ private:
        };
 
        bool hdr = false;
-       bool alpha = false;
        unsigned required_multisample = 0;
        unsigned max_multisample = 0;
        std::vector<Renderable> renderables;
@@ -153,7 +152,6 @@ public:
        ~SequenceTemplate();
 
        bool get_hdr() const { return hdr; }
-       bool get_alpha() const { return alpha; }
        unsigned get_required_multisample() const { return required_multisample; }
        unsigned get_maximum_multisample() const { return max_multisample; }
        const std::vector<Renderable> &get_renderables() const { return renderables; }