Files
oak-editor/app/render/backend/opengl/openglbackend.h
T
itsmattkc 7385e3dc56 fixes jitters by using signals/slots to pass image buffers around
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.
2019-11-18 02:14:54 +09:00

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