fixed bug that caused flickering textures

The ViewerGLWidget would receive raw GLuint textures while most of Olive uses
an OpenGLTexture C++ wrapper. Unfortunately this would lead to the C++ wrapper
getting destroyed since its instance wasn't kept in the ViewerGLWidget. This
meant by the time the ViewerGLWidget would re-draw, the texture would have
already been destroyed leading to some black frames. This is now fixed.
This commit is contained in:
itsmattkc
2019-12-27 05:11:42 +11:00
parent 549427353d
commit a4b3dc2ab4
3 changed files with 13 additions and 19 deletions
+1 -5
View File
@@ -205,11 +205,7 @@ VideoRenderBackend *ViewerWidget::video_renderer() const
void ViewerWidget::SetTexture(OpenGLTexturePtr tex)
{
if (tex == nullptr) {
gl_widget_->SetTexture(0);
} else {
gl_widget_->SetTexture(tex->texture());
}
gl_widget_->SetTexture(tex);
}
void ViewerWidget::UpdateTimeInternal(int64_t i)