reimplemented opacity without blending modes

This commit is contained in:
itsmattkc
2019-02-02 12:31:42 +11:00
parent b557979fb8
commit 064d1f229e
11 changed files with 60 additions and 50 deletions
+3 -3
View File
@@ -17,6 +17,7 @@
#include "mainwindow.h"
#include "io/math.h"
#include "io/clipboard.h"
#include "io/config.h"
#include "transition.h"
#include "effects/internal/transformeffect.h"
@@ -45,7 +46,6 @@
#include <QMenu>
#include <QApplication>
bool shaders_are_enabled = true;
QVector<EffectMeta> effects;
Effect* create_effect(Clip* c, const EffectMeta* em) {
@@ -627,7 +627,7 @@ void Effect::open() {
qWarning() << "Tried to open an effect that was already open";
close();
}
if (shaders_are_enabled && enable_shader) {
if (runtime_config.shaders_are_enabled && enable_shader) {
if (QOpenGLContext::currentContext() == nullptr) {
qWarning() << "No current context to create a shader program for - will retry next repaint";
} else {
@@ -685,7 +685,7 @@ void Effect::startEffect() {
open();
qWarning() << "Tried to start a closed effect - opening";
}
if (shaders_are_enabled
if (runtime_config.shaders_are_enabled
&& enable_shader
&& glslProgram->isLinked()) {
bound = glslProgram->bind();
-2
View File
@@ -34,8 +34,6 @@ struct EffectMeta {
int type;
int subtype;
};
extern bool shaders_are_enabled;
extern QVector<EffectMeta> effects;
double log_volume(double linear);
+2 -1
View File
@@ -6,6 +6,7 @@
#include "panels/panels.h"
#include "panels/effectcontrols.h"
#include "io/crossplatformlib.h"
#include "io/config.h"
#include <QDir>
#include <QXmlStreamReader>
@@ -18,7 +19,7 @@ typedef void (*f0rGetPluginInfo)(f0r_plugin_info_t* info);
#endif
void load_internal_effects() {
if (!shaders_are_enabled) qWarning() << "Shaders are disabled, some effects may be nonfunctional";
if (!runtime_config.shaders_are_enabled) qWarning() << "Shaders are disabled, some effects may be nonfunctional";
EffectMeta em;