exporting complete

This commit is contained in:
itsmattkc
2019-01-17 09:42:30 +11:00
parent 6a98e33959
commit 37ceca48da
5 changed files with 43 additions and 16 deletions
+17 -8
View File
@@ -206,16 +206,14 @@ GLuint compose_sequence(Viewer* viewer,
int half_width = s->width/2;
int half_height = s->height/2;
if (rendering || !nests.isEmpty()) half_height = -half_height; // invert vertical
glPushMatrix();
glLoadIdentity();
glOrtho(-half_width, half_width, half_height, -half_height, -1, 10);
if (video) {
glPushMatrix();
glLoadIdentity();
glOrtho(-half_width, half_width, -half_height, half_height, -1, 10);
}
for (int i=0;i<current_clips.size();i++) {
ctx->functions()->GL_DEFAULT_BLEND;
glColor4f(1.0, 1.0, 1.0, 1.0);
Clip* c = current_clips.at(i);
if (c->media != nullptr && c->media->get_type() == MEDIA_TYPE_FOOTAGE && !c->finished_opening) {
@@ -223,6 +221,9 @@ GLuint compose_sequence(Viewer* viewer,
texture_failed = true;
} else {
if (c->track < 0) {
ctx->functions()->GL_DEFAULT_BLEND;
glColor4f(1.0, 1.0, 1.0, 1.0);
GLuint textureID = 0;
int video_width = c->getWidth();
int video_height = c->getHeight();
@@ -488,7 +489,9 @@ GLuint compose_sequence(Viewer* viewer,
viewer->play_wake();
}
glPopMatrix();
if (video) {
glPopMatrix();
}
if (!nests.isEmpty() && nests.last()->fbo != nullptr) {
// returns nested clip's texture
@@ -497,3 +500,9 @@ GLuint compose_sequence(Viewer* viewer,
return 0;
}
void compose_audio(Viewer* viewer, Sequence* seq, bool render_audio) {
QVector<Clip*> nests;
bool texture_failed;
compose_sequence(viewer, nullptr, seq, nests, false, render_audio, nullptr, texture_failed, audio_rendering);
}
+2
View File
@@ -19,4 +19,6 @@ GLuint compose_sequence(Viewer* viewer,
bool &texture_failed,
bool rendering);
void compose_audio(Viewer* viewer, Sequence* seq, bool render_audio);
#endif // RENDERFUNCTIONS_H
+2 -5
View File
@@ -223,9 +223,7 @@ void ViewerWidget::frame_update() {
renderer->start_render(context(), viewer->seq);
// render the audio
QVector<Clip*> nests;
bool texture_failed;
compose_sequence(viewer, context(), viewer->seq, nests, false, render_audio, &gizmos, texture_failed, audio_rendering);
compose_audio(viewer, viewer->seq, render_audio);
}
}
@@ -445,9 +443,8 @@ void ViewerWidget::paintGL() {
glEnable(GL_TEXTURE_2D);
// set screen coords to widget size
glLoadIdentity();
glOrtho(0, 1, 1, 0, -1, 1);
glOrtho(0, 1, 0, 1, -1, 1);
// draw texture from render thread
+1 -1
View File
@@ -21,7 +21,7 @@ void ViewerWindow::paintGL() {
glBindTexture(GL_TEXTURE_2D, texture);
glLoadIdentity();
glOrtho(0, 1, 1, 0, -1, 1);
glOrtho(0, 1, 0, 1, -1, 1);
glBegin(GL_QUADS);