fixed gcc compile

This commit is contained in:
itsmattkc
2019-03-20 11:26:44 +11:00
parent 7d337e6de2
commit f9591e4f1e
6 changed files with 29 additions and 3 deletions
+1
View File
@@ -2,6 +2,7 @@
#define QOPENGLSHADERPROGRAMPTR_H
#include <QOpenGLShaderProgram>
#include <memory>
using QOpenGLShaderProgramPtr = std::shared_ptr<QOpenGLShaderProgram>;
+4
View File
@@ -1013,6 +1013,10 @@ GLuint olive::rendering::OCIOBlit(QOpenGLShaderProgram *pipeline,
const FramebufferObject& fbo,
GLuint texture)
{
if (pipeline == nullptr) {
return 0;
}
QOpenGLContext* ctx = QOpenGLContext::currentContext();
QOpenGLExtraFunctions* xf = ctx->extraFunctions();
+15 -3
View File
@@ -52,8 +52,10 @@ RenderThread::RenderThread() :
ocio_shader(nullptr),
#endif
running(true),
front_buffer_switcher(false),
ocio_config_date(0)
#ifndef NO_OCIO
ocio_config_date(0),
#endif
front_buffer_switcher(false)
{
surface.create();
}
@@ -248,11 +250,21 @@ void RenderThread::paint() {
QMutex& active_mutex = front_buffer_switcher ? front_mutex1 : front_mutex2;
active_mutex.lock();
FramebufferObject& buffer = front_buffer_switcher ? front_buffer_1 : front_buffer_2;
// Convert linear frame to display color space
#ifndef NO_OCIO
olive::rendering::OCIOBlit(ocio_shader.get(),
ocio_lut_texture,
front_buffer_switcher ? front_buffer_1 : front_buffer_2,
buffer,
composite_buffer.texture());
#else
buffer.BindBuffer();
composite_buffer.BindTexture();
olive::rendering::Blit(pipeline_program.get());
composite_buffer.ReleaseTexture();
buffer.ReleaseBuffer();
#endif
// flush changes
f->glFinish();