cosmetics.
fixed compilation on Windows and simplified the code.
removed more inclusions of renderer/global/global.h and fixed #include statements.
added/removed #include statements as suggested by Google's IWYU.
removed unused source file.
added/removed #include statements as suggested by Google's IWYU.
minor code tweak.
code cleanups.