Output session fading fixed for OSC and animation.

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.
This commit is contained in:
Bruno Herbelin
2021-12-26 00:41:02 +01:00
parent 3d05444f30
commit 1cb448c42e
11 changed files with 124 additions and 64 deletions

View File

@@ -8,6 +8,8 @@
class RenderView : public View
{
friend class Session;
// rendering FBO
FrameBuffer *frame_buffer_;
Surface *fading_overlay_;
@@ -26,12 +28,15 @@ public:
void setResolution (glm::vec3 resolution = glm::vec3(0.f), bool useAlpha = false);
glm::vec3 resolution() const { return frame_buffer_->resolution(); }
void setFading(float f = 0.f);
float fading() const;
// 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 ();