how to print a text string onto screen?
Posted: Sat Oct 10, 2015 1:57 pm
i just need to show something like FPS
Former forum of queegs; use github discussions now!
https://forum.bepuentertainment.com/
Code: Select all
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.BlendState = BlendState.AlphaBlend;
GraphicsDevice.Clear(Color.CornflowerBlue);
scene.Draw(gameTime);
spriteBatch.Begin();
DrawText("this is a good text example");
spriteBatch.End();
base.Draw(gameTime);
}
Code: Select all
GraphicsDevice.DepthStencilState = new DepthStencilState() { DepthBufferEnable = true };