mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-05 19:27:57 -05:00
Fix black scene cache and FXAA frames under VirtualGL (#17508)
This commit is contained in:
1 parent
36815b4f03
commit
3936cd5f6a
6 files changed
+92
-11
No files matched your search
@@ -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 } };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user