simulate: fix display of loading message

This commit is contained in:
Levi Burner
2023-09-25 18:13:29 -04:00
parent 8ed321d469
commit e7d1f2f110
5 changed files with 47 additions and 3 deletions
+10 -1
View File
@@ -62,10 +62,18 @@ class Simulate {
void UpdateMesh(int meshid);
void UpdateTexture(int texid);
// Request that the Simulate UI display a "loading" message
// Called prior to Load or LoadMessageClear
void LoadMessage(const char* displayed_filename);
// Request that the Simulate UI thread render a new model
// optionally delete the old model and data when done
void Load(mjModel* m, mjData* d, const char* displayed_filename);
// Clear the loading message
// Can be called instead of Load to clear the message without
// requesting the UI load a model
void LoadMessageClear(void);
// functions below are used by the renderthread
// load mjb or xml model that has been requested by load()
void LoadOnRenderThread();
@@ -173,6 +181,7 @@ class Simulate {
std::atomic_int uiloadrequest = 0;
// loadrequest
// 3: display a loading message
// 2: render thread asked to update its model
// 1: showing "loading" label, about to load
// 0: model loaded or no load requested.