Some cleanup and refactoring of the O2 rendering engine and other things.
Authored by: debug 2018-10-26
Parent: [r6066]
Child: [r6068]