File: crossdissolvetransition.cpp

package info (click to toggle)
olive-editor 20181223-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 2,844 kB
  • sloc: cpp: 20,147; xml: 315; ansic: 16; makefile: 11
file content (18 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "crossdissolvetransition.h"

#include <QOpenGLFunctions>

CrossDissolveTransition::CrossDissolveTransition(Clip* c, Clip* s, const EffectMeta* em) : Transition(c, s, em) {
	enable_coords = true;

//    add_row("Smooth")->add_field(EFFECT_FIELD_BOOL, "smooth");
}

void CrossDissolveTransition::process_coords(double progress, GLTextureCoords&, int data) {
    if (!(data == TA_CLOSING_TRANSITION && secondary_clip != NULL)) {
        float color[4];
        glGetFloatv(GL_CURRENT_COLOR, color);
        if (data == TA_CLOSING_TRANSITION) progress = 1.0 - progress;
        glColor4f(1.0, 1.0, 1.0, color[3]*progress);
    }
}