Fix black scene cache and FXAA frames under VirtualGL (#17508)

This commit is contained in:
Joseph Robertson authored and GitHub committed 2026-11-13 15:00:05 -03:00
1 parent 36815b4f03
commit 3936cd5f6a
6 files changed
+92 -11

No files matched your search

+5 -1
View File
@@ -21,7 +21,7 @@ void SceneCache::capture(Key key)
if (wxGetApp().get_shader("flat_texture") == nullptr)
return;
GLTexture::copy_from_framebuffer(m_texture_id, m_texture_size, key.size[0], key.size[1], GL_NEAREST);
GLTexture::copy_from_framebuffer(m_texture_id, m_framebuffer_id, m_texture_size, key.size[0], key.size[1], GL_NEAREST);
m_key = std::move(key);
m_valid = true;
@@ -57,6 +57,10 @@ void SceneCache::reset()
glsafe(::glDeleteTextures(1, &m_texture_id));
m_texture_id = 0;
}
if (m_framebuffer_id != 0) {
glsafe(::glDeleteFramebuffers(1, &m_framebuffer_id));
m_framebuffer_id = 0;
}
m_texture_size = { { 0, 0 } };
}