#include "sequence.h"
#include "sequencebuilder.h"
#include "sequencetemplate.h"
+#include "view.h"
using namespace std;
Sequence *SequenceBuilder::build(const View &view) const
{
- RefPtr<Sequence> sequence = new Sequence(view, create_frame_format());
+ RefPtr<Sequence> sequence = new Sequence(view.get_width(), view.get_height(), create_frame_format());
build(*sequence);
return sequence.release();
}
Sequence *SequenceBuilder::build(const Framebuffer &fbo) const
{
- RefPtr<Sequence> sequence = new Sequence(fbo, create_frame_format());
+ RefPtr<Sequence> sequence = new Sequence(fbo.get_width(), fbo.get_height(), create_frame_format());
build(*sequence);
return sequence.release();
}
#include "renderer.h"
#include "sequence.h"
#include "texture2d.h"
-#include "view.h"
using namespace std;
namespace Msp {
namespace GL {
-Sequence::Sequence(unsigned w, unsigned h, const FrameFormat &f)
+Sequence::Sequence(unsigned w, unsigned h, const FrameFormat &f):
+ width(w),
+ height(h),
+ target_format(f)
{
- init(w, h, f);
-}
-
-Sequence::Sequence(const View &view, const FrameFormat &f)
-{
- init(view.get_width(), view.get_height(), f);
-}
-
-Sequence::Sequence(const Framebuffer &fbo, const FrameFormat &f)
-{
- init(fbo.get_width(), fbo.get_height(), f);
-}
-
-void Sequence::init(unsigned w, unsigned h, const FrameFormat &f)
-{
- width = w;
- height = h;
- target_format = f;
-
if(!target_format.empty())
{
FrameFormat postproc_fmt = target_format;
class Clipping;
class Lighting;
class PostProcessor;
-class View;
/**
Top-level content class. Typically a Sequence is used as the content
public:
Sequence(unsigned, unsigned, const FrameFormat & = FrameFormat());
- Sequence(const View &, const FrameFormat & = FrameFormat());
- Sequence(const Framebuffer &, const FrameFormat & = FrameFormat());
-private:
- void init(unsigned, unsigned, const FrameFormat &);
-public:
~Sequence();
const FrameFormat &get_target_format() { return target_format; }
if(!sequence)
{
- sequence = new GL::Sequence(view);
+ sequence = new GL::Sequence(view.get_width(), view.get_height());
GL::Sequence::Step &step = sequence->add_step(0, *renderable);
step.set_lighting(&lighting);
step.set_depth_test(GL::LEQUAL);