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
+4
View File
@@ -157,6 +157,7 @@ void PreferencesDialog::delete_previews(PreviewDeleteTypes type) {
}
}
#ifndef NO_OCIO
void PreferencesDialog::populate_ocio_menus(OCIO::ConstConfigRcPtr config)
{
// Get current display name (if the config is empty, get the current default display)
@@ -228,6 +229,7 @@ void PreferencesDialog::update_ocio_config(const QString &s)
} catch (OCIO::Exception& e) {}
}
}
#endif
void PreferencesDialog::setup_kbd_shortcuts(QMenuBar* menubar) {
QList<QAction*> menus = menubar->actions();
@@ -588,10 +590,12 @@ void PreferencesDialog::browse_ocio_config()
}
}
#ifndef NO_OCIO
void PreferencesDialog::update_ocio_view_menu()
{
update_ocio_view_menu(OCIO::GetCurrentConfig());
}
#endif
void PreferencesDialog::delete_all_previews() {
if (QMessageBox::question(this,
+4
View File
@@ -76,9 +76,11 @@ private slots:
void browse_ocio_config();
// OCIO function
#ifndef NO_OCIO
void update_ocio_view_menu();
void update_ocio_view_menu(OCIO::ConstConfigRcPtr config);
void update_ocio_config(const QString&);
#endif
private:
void setup_ui();
@@ -102,7 +104,9 @@ private:
*/
void delete_previews(PreviewDeleteTypes type);
#ifndef NO_OCIO
void populate_ocio_menus(OCIO::ConstConfigRcPtr config);
#endif
QLineEdit* custom_css_fn;
QLineEdit* imgSeqFormatEdit;
+1
View File
@@ -35,6 +35,7 @@ enum GizmoType {
#include <QRect>
#include <QPoint>
#include <QVector>
#include <QVector3D>
#include <QColor>
class DoubleField;
+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();