fixed multithreaded download issue

This commit is contained in:
itsmattkc
2019-08-29 20:12:44 +10:00
parent b81d0598b3
commit b8d46eeb34
3 changed files with 6 additions and 5 deletions
-1
View File
@@ -106,7 +106,6 @@ QVariant RendererProcessor::Value(NodeOutput* output, const rational& time)
return QVariant::fromValue(master_texture_);
}
}
}
@@ -67,9 +67,9 @@ void RendererDownloadThread::ProcessLoop()
// Download the texture
f->glBindFramebuffer(GL_FRAMEBUFFER, read_buffer_);
f->glBindFramebuffer(GL_READ_FRAMEBUFFER, read_buffer_);
xf->glFramebufferTexture2D(GL_FRAMEBUFFER,
xf->glFramebufferTexture2D(GL_READ_FRAMEBUFFER,
GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D,
working_texture->texture(),
@@ -83,13 +83,13 @@ void RendererDownloadThread::ProcessLoop()
format_info.pixel_type,
data_buffer.data());
xf->glFramebufferTexture2D(GL_FRAMEBUFFER,
xf->glFramebufferTexture2D(GL_READ_FRAMEBUFFER,
GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D,
0,
0);
f->glBindFramebuffer(GL_FRAMEBUFFER, 0);
f->glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
std::string working_fn_std = working_filename.toStdString();
@@ -83,6 +83,8 @@ void RendererProcessThread::ProcessLoop()
// Get the requested value
output_to_process->get_value(path_.time());
render_instance()->context()->functions()->glFinish();
emit FinishedPath();
}
}