FLAMEGPU / FLAMEGPU2-visualiser

Cross platform real-time OpenGL visualiser for FLAMEGPU2 models.
1 stars 2 forks source link

Init with simulation paused #41

Closed Robadob closed 3 years ago

Robadob commented 3 years ago

This option is useful if trying to video a visualisation and you don't want to miss the start.

I hackily achieved this by adding this to Visualiser::renderAgentStates(), but the proper version will need to be implemented as part of ModelCfg.

    if(texture_unit_counter == 1)
        pause_guard = new std::lock_guard<std::mutex>(render_buffer_mutex);
Robadob commented 3 years ago

Unsure, whether this will require extra work in the main library side, to allow compiling of RTC models prior to the pause being applied.

Robadob commented 3 years ago

Have tested my fix, and it does allow RTC functions to be compiled during pause. Although there is no way of knowing whether they have finished compiling or not (besides looking at CPU usage/temp dir).