protected override void Draw(GameTime gameTime) { gamestime = gameTime; if (!Disable2DRendering) { //if (Landscape || StretchMode != StretchModes.None) GraphicsDevice.SetRenderTarget(_renderTarget); if (AutoClear) { GraphicsDevice.Clear(GameBackgroundColor); } if (AutoDraw) { SpriteBatch.Begin(); } } #if LIVE if (SignedInGamer.SignedInGamers.Count > 0 || !NeedSignIn || !ForceSignIn) #endif #if KINECT if (Kinect.Draw) { Kinect.Render(gameTime); } #endif Render(gameTime); if (!Disable2DRendering) { if (ShowMouse #if LIVE && !Guide.IsVisible #endif ) { #if WINDOWS DrawMouse(MousePosition); #endif } #if KINECT if (Touch.Enabled) { Touch.Draw(gameTime); } #endif if (AutoDraw) { SpriteBatch.End(); } #if WINDOWS if (HasConsole /* && Console.IsActive*/) { SpriteBatch.Begin(); Console.Draw(ShowConsoleOnBottom); SpriteBatch.End(); } SpriteBatch.Begin(); TextEffects.Draw(gameTime); ElegantTextEngine.Draw(gameTime); SpriteBatch.End(); #endif if (Landscape) { GraphicsDevice.SetRenderTarget(null); SpriteBatch.Begin(); SpriteBatch.Draw( _renderTarget, _vecDest, null, Color.White, MathHelper.PiOver2, _vecOrigin, 1f, SpriteEffects.None, 0); SpriteBatch.End(); } else if (_renderTarget != null)// if (StretchMode != StretchModes.None) { GraphicsDevice.SetRenderTarget(null); if (AutoClear) { Clear(OutputBackgroundColor); } SpriteBatch.Begin(); SpriteBatch.Draw( _renderTarget, GeometryHelper.Vectors2Rectangle(_vecDest, _vecSize), Color.White); SpriteBatch.End(); } } base.Draw(gameTime); }