Enables (or disables) the automatic 3D scene update feature.
Syntax |
void set_scene_auto_update(bool enable) |
---|---|
enable |
Enabling flag |
Result |
(none) |
Notes |
By default, this functionality is enabled. By disabling this feature, it is mandatory to call the meotodo update_scene() periodically so that the scene content is displayed, or it will never be updated. |
Example of use:
bool execute(pan3d::object @panel) { int last_id = 0; set_scene_auto_update(false); while (!should_end()) { /* Check if values are changed */ uint id = monitor_values_id(); if (id == last_id) { sleep_ms(100); continue; } last_id = id;
/* Update scene items ... */ ...
/* Update scene */ update_scene(); } } |