commit For testing the new iteration, the texture cache disk download was written into the main thread instead of into the separate threads. Now they're back in separate threads again. Also I think some of these files probably should have been in the previous commit.
62 lines
1.3 KiB
C++
62 lines
1.3 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 void GenerateFrame(const rational& time) override;
|
|
|
|
virtual bool CompileInternal() override;
|
|
|
|
virtual void DecompileInternal() override;
|
|
|
|
private:
|
|
bool TraverseCompiling(Node* n);
|
|
|
|
QVector<OpenGLWorker*> processors_;
|
|
|
|
OpenGLTexturePtr master_texture_;
|
|
rational push_time_;
|
|
|
|
OpenGLFramebuffer copy_buffer_;
|
|
OpenGLShaderPtr copy_pipeline_;
|
|
|
|
OpenGLShaderCache shader_cache_;
|
|
|
|
bool compiled_;
|
|
|
|
private slots:
|
|
void ThreadCompletedFrame(NodeDependency path);
|
|
void ThreadRequestedSibling(NodeDependency dep);
|
|
|
|
|
|
|
|
void ThreadCallback(OpenGLTexturePtr texture, const rational& time, const QByteArray& hash);
|
|
|
|
|
|
void ThreadSkippedFrame(const rational &time, const QByteArray &hash);
|
|
|
|
void DownloadThreadComplete(const QByteArray &hash);
|
|
};
|
|
|
|
#endif // OPENGLBACKEND_H
|