Initial integration of Mixer, Views and Source classes.

First tests with user interface and Mixing View
This commit is contained in:
brunoherbelin
2020-04-19 00:49:55 +02:00
parent c7a69c1ac8
commit 4f5a71970d
29 changed files with 1211 additions and 630 deletions

52
View.h Normal file
View File

@@ -0,0 +1,52 @@
#ifndef VIEW_H
#define VIEW_H
#include <glm/glm.hpp>
#include "Scene.h"
class FrameBuffer;
class View
{
public:
View();
virtual void update (float dt);
virtual void draw () = 0;
virtual void zoom (float) {}
virtual void drag (glm::vec2, glm::vec2) {}
Scene scene;
protected:
Group backgound_;
Group foreground_;
};
class MixingView : public View
{
public:
MixingView();
~MixingView();
void draw () override;
void zoom (float factor);
void drag (glm::vec2 from, glm::vec2 to);
};
class RenderView : public View
{
FrameBuffer *frame_buffer_;
public:
RenderView ();
~RenderView ();
void draw () override;
void setResolution (uint width, uint height);
inline FrameBuffer *frameBuffer () const { return frame_buffer_; }
};
#endif // VIEW_H