attempt to use fbo clear function

This commit is contained in:
itsmattkc
2019-12-10 21:32:21 +11:00
parent 91c7d8aa4d
commit f5d66436fa
8 changed files with 13 additions and 32 deletions
+2 -9
View File
@@ -111,13 +111,10 @@ void OpenGLWorker::FrameToValue(StreamPtr stream, FramePtr frame, NodeValueTable
// Set viewport for texture size
functions_->glViewport(0, 0, footage_tex_ref->texture()->width(), footage_tex_ref->texture()->height());
buffer_.Attach(associated_tex_ref->texture());
buffer_.Attach(associated_tex_ref->texture(), true);
buffer_.Bind();
footage_tex_ref->texture()->Bind();
functions_->glClearColor(0.0, 0.0, 0.0, 0.0);
functions_->glClear(GL_COLOR_BUFFER_BIT);
// Blit old texture to new texture through OCIO shader
color_processor->ProcessOpenGL();
@@ -156,13 +153,9 @@ void OpenGLWorker::RunNodeAccelerated(const Node *node, const NodeValueDatabase
// Create the output texture
OpenGLTextureCache::ReferencePtr output_ref = texture_cache_->Get(video_params());
buffer_.Attach(output_ref->texture());
buffer_.Attach(output_ref->texture(), true);
buffer_.Bind();
functions_->glClearColor(0.0, 0.0, 0.0, 0.0);
functions_->glClear(GL_COLOR_BUFFER_BIT);
// Lock the shader so no other thread interferes as we set parameters and draw (and we don't interfere with any others)
shader->Lock();
shader->bind();