/// <summary> /// Processes a Render. /// </summary> /// <param name="spriteBatch">The SpriteBatch.</param> /// <param name="gameTime">The GameTime.</param> public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { if (ActiveScene != null) { ActiveScene.Draw(spriteBatch, gameTime); } }
/// <summary> /// Draw everything. /// Note: need to be called after clearing the device. /// </summary> /// <param name="clearBuffer">If true, will also clear buffer.</param> public void Draw(bool clearBuffer = true) { // get graphic device GraphicsDevice device = Core.Graphics.GraphicsManager.GraphicsDevice; // call the before-draw update function ActiveScene.BeforeDraw(); // start drawing frame Core.Graphics.GraphicsManager.StartDrawFrame(); // reset diagnostic drawings count Diagnostic.ResetDrawCounters(); // render everything ActiveScene.Draw(); // end drawing frame (will also draw all rendering queues) Core.Graphics.GraphicsManager.EndDrawFrame(); // reset stencil state device.DepthStencilState = DepthStencilState.Default; // draw ui if (UiEnabled) { UI.UserInterface.Active.Draw(_spriteBatch); } }
public static void Draw() { if (ActiveScene != null) { //draw bg particle //if (ActiveScene.bg_particle != null) //{ // ActiveScene.DrawBGParticle(RenderContext); //} //draw HUD Belakang RenderContext.SpriteBatch.Begin(); ActiveScene.DrawHUDBack(RenderContext); RenderContext.SpriteBatch.End(); if (CameraManager.getInstance().camera.Focus == null) { RenderContext.SpriteBatch.Begin(); ActiveScene.Draw(RenderContext); RenderContext.SpriteBatch.End(); } else { RenderContext.SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, CameraManager.getInstance().camera.Transform); ActiveScene.Draw(RenderContext); RenderContext.SpriteBatch.End(); } //draw HUD Depan RenderContext.SpriteBatch.Begin(); ActiveScene.DrawHUDFront(RenderContext); RenderContext.SpriteBatch.End(); //ActiveScene.DrawParticle(RenderContext); } }
public void Draw(SpriteBatch spriteBatch) { ActiveScene.Draw(spriteBatch); }
/// <summary> /// Drawws the active scene. /// </summary> /// <param name="gameTime"></param> public override void Draw(GameTime gameTime) { base.Draw(gameTime); ActiveScene?.Draw(spriteBatch); }
public void Draw(GameTime time, SpriteBatch batch) { ActiveScene.Draw(time, batch); }