pgdrive icon indicating copy to clipboard operation
pgdrive copied to clipboard

Formalize the flags indicating rendering

Open pengzhenghao opened this issue 4 years ago • 0 comments

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_render is True. Denoting using a popup window to visualize. It is impossible for a headless machine to have use_onscreen == True.

Object-specified Flags

  • object.rendered:
    • True: Can only be True when use_render is True. If an object has object.rendered == True, then two things are hold: (1) its model is loaded. therefore object.loader != None. (2) its model is attached to the engine.
    • False: This could happen even use_render is True. It saying that this object will not be rendered.

Flags in config system

  • use_render
  • use_onscreen

pengzhenghao avatar Jul 31 '21 11:07 pengzhenghao