mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-09 13:05:00 -06:00
Fix black bed texture if svg file (#11166)
* Fix blank bed texture if svg file * Refresh scene once the texture compression is completed
This commit is contained in:
parent
99863163b2
commit
05533a7fd3
5 changed files with 19 additions and 5 deletions
|
|
@ -101,6 +101,8 @@ void GLTexture::Compressor::send_compressed_data_to_gpu()
|
|||
this->reset();
|
||||
}
|
||||
|
||||
std::atomic<bool> GLTexture::Compressor::m_dirty = false;
|
||||
|
||||
void GLTexture::Compressor::compress()
|
||||
{
|
||||
// reference: https://github.com/Cyan4973/RygsDXTc
|
||||
|
|
@ -123,6 +125,11 @@ void GLTexture::Compressor::compress()
|
|||
level.src_data.clear();
|
||||
++ m_num_levels_compressed;
|
||||
}
|
||||
|
||||
// Trigger an idle event to refresh the scene once the texture data is ready
|
||||
// This fixes the issue that the bed texture is black after switching printer model until mouse moves to the 3d scene
|
||||
m_dirty = true;
|
||||
wxWakeUpIdle();
|
||||
}
|
||||
|
||||
GLTexture::Quad_UVs GLTexture::FullTextureUVs = { { 0.0f, 1.0f }, { 1.0f, 1.0f }, { 1.0f, 0.0f }, { 0.0f, 0.0f } };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue