Updating values rapidly would cause strange jitters as a byproduct of the viewer trying to update from the renderer while it was still working. Rather than the viewer trying to access the the renderer, we now send textures in the initial update signal to keep everything synchronized.
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#ifndef OPENGLBACKEND_H
|
|
#define OPENGLBACKEND_H
|
|
|
|
#include "../videorenderbackend.h"
|
|
#include "openglframebuffer.h"
|
|
#include "openglworker.h"
|
|
#include "opengltexture.h"
|
|
#include "openglshader.h"
|
|
#include "openglshadercache.h"
|
|
|
|
class OpenGLBackend : public VideoRenderBackend
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
OpenGLBackend(QObject* parent = nullptr);
|
|
|
|
virtual ~OpenGLBackend() override;
|
|
|
|
OpenGLTexturePtr GetCachedFrameAsTexture(const rational& time);
|
|
|
|
protected:
|
|
virtual bool InitInternal() override;
|
|
|
|
virtual void CloseInternal() override;
|
|
|
|
virtual bool CompileInternal() override;
|
|
|
|
virtual void DecompileInternal() override;
|
|
|
|
private:
|
|
bool TraverseCompiling(Node* n);
|
|
|
|
bool TimeIsCached(const TimeRange &time);
|
|
|
|
OpenGLTexturePtr master_texture_;
|
|
|
|
/*OpenGLFramebuffer copy_buffer_;
|
|
OpenGLShaderPtr copy_pipeline_;*/
|
|
|
|
OpenGLShaderCache shader_cache_;
|
|
|
|
private slots:
|
|
void ThreadCompletedFrame(NodeDependency path, QByteArray hash, QVariant value);
|
|
void ThreadCompletedDownload(NodeDependency dep, QByteArray hash);
|
|
void ThreadSkippedFrame();
|
|
void ThreadHashAlreadyExists(NodeDependency dep, QByteArray hash);
|
|
|
|
};
|
|
|
|
#endif // OPENGLBACKEND_H
|