mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Linear interpolation (instead of dichotomy converge) for fading at Session update. Mixing View update reads value of session fading to animate the cursor (which was preventing other manipulation of fading). Cleanup fading in OSC controller, with animation options and fade-in and fade-out controls.
46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
#ifndef RENDERVIEW_H
|
|
#define RENDERVIEW_H
|
|
|
|
#include <vector>
|
|
#include <future>
|
|
|
|
#include "View.h"
|
|
|
|
class RenderView : public View
|
|
{
|
|
friend class Session;
|
|
|
|
// rendering FBO
|
|
FrameBuffer *frame_buffer_;
|
|
Surface *fading_overlay_;
|
|
|
|
// promises of returning thumbnails after an update
|
|
std::vector< std::promise<FrameBufferImage *> > thumbnailer_;
|
|
|
|
public:
|
|
RenderView ();
|
|
~RenderView ();
|
|
|
|
// render frame (in opengl context)
|
|
void draw () override;
|
|
bool canSelect(Source *) override { return false; }
|
|
|
|
void setResolution (glm::vec3 resolution = glm::vec3(0.f), bool useAlpha = false);
|
|
glm::vec3 resolution() const { return frame_buffer_->resolution(); }
|
|
|
|
|
|
// current frame
|
|
inline FrameBuffer *frame () const { return frame_buffer_; }
|
|
|
|
protected:
|
|
|
|
void setFading(float f = 0.f);
|
|
float fading() const;
|
|
|
|
// get a thumbnail outside of opengl context; wait for a promise to be fullfiled after draw
|
|
void drawThumbnail();
|
|
FrameBufferImage *thumbnail ();
|
|
};
|
|
|
|
#endif // RENDERVIEW_H
|