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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user