internal void begin() { Assert.isFalse(_renderers.Count == 0, "Scene has begun with no renderer. At least one renderer must be present before beginning a scene."); Physics.reset(); // prep our render textures and take care of centering the camera origin. we have to set the RenderTarget updateResolutionScaler(); Core.graphicsDevice.SetRenderTarget(_sceneRenderTarget); camera.centerOrigin(); if (entityProcessors != null) { entityProcessors.begin(); } Core.emitter.addObserver(CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset); }
internal void begin() { Assert.isFalse( _renderers.length == 0, "Scene has begun with no renderer. At least one renderer must be present before beginning a scene." ); Physics.reset(); // prep our render textures updateResolutionScaler(); Core.graphicsDevice.setRenderTarget( _sceneRenderTarget ); if( entityProcessors != null ) entityProcessors.begin(); Core.emitter.addObserver( CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset ); _didSceneBegin = true; onStart(); }
internal void begin() { if (_renderers.length == 0) { addRenderer(new DefaultRenderer()); Debug.warn("Scene has begun with no renderer. A DefaultRenderer was added automatically so that something is visible."); } Physics.reset(); // prep our render textures updateResolutionScaler(); Core.graphicsDevice.setRenderTarget(_sceneRenderTarget); if (entityProcessors != null) { entityProcessors.begin(); } Core.emitter.addObserver(CoreEvents.GraphicsDeviceReset, onGraphicsDeviceReset); _didSceneBegin = true; onStart(); }