pgdrive
pgdrive copied to clipboard
Formalize the flags indicating rendering
Currently, we use so many flags to denote whether some object or the whole environment is rendered. I think we should formalize those flags. Here is a little plan:
Global Flags
use_render:- True: onscreen or offscreen. even in headless screen this can also be True.
- False: no rendering, no RGB observation, no popup windows, no top-down view or so.
use_onscreen:- True: Can only be True when
use_renderis True. Denoting using a popup window to visualize. It is impossible for a headless machine to haveuse_onscreen == True.
- True: Can only be True when
Object-specified Flags
object.rendered:- True: Can only be True when
use_renderis True. If an object hasobject.rendered == True, then two things are hold: (1) its model is loaded. thereforeobject.loader != None. (2) its model is attached to the engine. - False: This could happen even
use_renderis True. It saying that this object will not be rendered.
- True: Can only be True when
Flags in config system
use_renderuse_onscreen