added cross dissolve transitions (but they're uneditable)

This commit is contained in:
itsmattkc
2018-07-03 06:45:32 +01:00
parent 0ae230ac29
commit 5a60e2d2c6
16 changed files with 123 additions and 34 deletions
+9
View File
@@ -0,0 +1,9 @@
#include "transition.h"
#include <QOpenGLFunctions>
void CrossDissolveTransition::process_transition(float progress) {
float color[4];
glGetFloatv(GL_CURRENT_COLOR, color);
glColor4f(1.0, 1.0, 1.0, color[3]*progress);
}
+3 -1
View File
@@ -205,5 +205,7 @@ void TransformEffect::process_gl(int* anchor_x, int* anchor_y) {
}
// opacity
glColor4f(1.0, 1.0, 1.0, opacity->value()*0.01);
float color[4];
glGetFloatv(GL_CURRENT_COLOR, color);
glColor4f(1.0, 1.0, 1.0, color[3]*(opacity->value()*0.01));
}
+7
View File
@@ -0,0 +1,7 @@
#include "transition.h"
Transition::Transition() {
length = 30;
}
void Transition::process_transition(float) {}
+17
View File
@@ -0,0 +1,17 @@
#ifndef TRANSITION_H
#define TRANSITION_H
class Transition
{
public:
Transition();
int length;
virtual void process_transition(float);
};
class CrossDissolveTransition : public Transition {
public:
void process_transition(float);
};
#endif // TRANSITION_H