add Singleton and Shared base class and use it. texture and shader is
based on Shared now
modify example code for engine modify