Fixed update of both canvas when compressed bed textures have been completely sent to gpu

This commit is contained in:
Enrico Turri 2019-08-30 14:10:59 +02:00
parent f26d5effd9
commit f1f1b515cd
2 changed files with 4 additions and 3 deletions

View File

@ -474,10 +474,10 @@ void Bed3D::render_texture(const std::string& filename, bool bottom, GLCanvas3D&
m_requires_canvas_update = true;
}
else if (m_requires_canvas_update && m_texture.all_compressed_data_sent_to_gpu())
{
canvas.stop_keeping_dirty();
m_requires_canvas_update = false;
}
if (m_texture.all_compressed_data_sent_to_gpu() && canvas.is_keeping_dirty())
canvas.stop_keeping_dirty();
if (m_triangles.get_vertices_count() > 0)
{

View File

@ -637,6 +637,7 @@ public:
void set_cursor(ECursorType type);
void msw_rescale();
bool is_keeping_dirty() const { return m_keep_dirty; }
void start_keeping_dirty() { m_keep_dirty = true; }
void stop_keeping_dirty() { m_keep_dirty = false; }