Added new rendering context management

Fixed app state calls to render to avoid the black screen bug.
Support for rendering on many more devices.