preferences: add option to use glFinish

i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl i hate opengl
This commit is contained in:
itsmattkc
2022-11-05 12:49:30 -07:00
parent 3853ef023e
commit 1c4149a0fd
3 changed files with 13 additions and 1 deletions
+1
View File
@@ -104,6 +104,7 @@ void Config::SetDefaults()
SetEntryInternal(QStringLiteral("UseLegacyColorInInputTab"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("ReassocLinToNonLin"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("PreviewNonFloatDontAskAgain"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("UseGLFinish"), NodeValue::kBoolean, false);
SetEntryInternal(QStringLiteral("TimelineThumbnailMode"), NodeValue::kInt, Timeline::kThumbnailInOut);
SetEntryInternal(QStringLiteral("TimelineWaveformMode"), NodeValue::kInt, Timeline::kWaveformsEnabled);
@@ -107,6 +107,11 @@ PreferencesBehaviorTab::PreferencesBehaviorTab()
tr("Multiple clips can share the same nodes. Disable this to automatically share node "
"dependencies among clips when copying or splitting them."),
node_group);
QTreeWidgetItem* opengl_group = AddParent(tr("OpenGL"));
AddItem(tr("Use glFinish"),
QStringLiteral("UseGLFinish"),
opengl_group);
}
void PreferencesBehaviorTab::Accept(MultiUndoCommand *command)
+7 -1
View File
@@ -25,6 +25,8 @@
#include <QDebug>
#include <QOpenGLExtraFunctions>
#include "config/config.h"
namespace olive {
const int OpenGLRenderer::kTextureCacheMaxSize = 5000;
@@ -364,7 +366,11 @@ void OpenGLRenderer::Flush()
{
GL_PREAMBLE;
functions_->glFlush();
if (OLIVE_CONFIG("UseGLFinish").toBool()) {
functions_->glFinish();
} else {
functions_->glFlush();
}
}
Color OpenGLRenderer::GetPixelFromTexture(Texture *texture, const QPointF &pt)