diff --git a/dialogs/preferencesdialog.cpp b/dialogs/preferencesdialog.cpp index 24ff80e64..e306463df 100644 --- a/dialogs/preferencesdialog.cpp +++ b/dialogs/preferencesdialog.cpp @@ -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 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, diff --git a/dialogs/preferencesdialog.h b/dialogs/preferencesdialog.h index da3439f74..3d502854d 100644 --- a/dialogs/preferencesdialog.h +++ b/dialogs/preferencesdialog.h @@ -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; diff --git a/effects/effectgizmo.h b/effects/effectgizmo.h index e32732e6c..115676609 100644 --- a/effects/effectgizmo.h +++ b/effects/effectgizmo.h @@ -35,6 +35,7 @@ enum GizmoType { #include #include #include +#include #include class DoubleField; diff --git a/rendering/qopenglshaderprogramptr.h b/rendering/qopenglshaderprogramptr.h index 25c8fc6ff..d0b9152d0 100644 --- a/rendering/qopenglshaderprogramptr.h +++ b/rendering/qopenglshaderprogramptr.h @@ -2,6 +2,7 @@ #define QOPENGLSHADERPROGRAMPTR_H #include +#include using QOpenGLShaderProgramPtr = std::shared_ptr; diff --git a/rendering/renderfunctions.cpp b/rendering/renderfunctions.cpp index 2751987c5..ece03b568 100644 --- a/rendering/renderfunctions.cpp +++ b/rendering/renderfunctions.cpp @@ -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(); diff --git a/rendering/renderthread.cpp b/rendering/renderthread.cpp index a4b0dc7ac..1130f1f83 100644 --- a/rendering/renderthread.cpp +++ b/rendering/renderthread.cpp @@ -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();