Answer the question
In order to leave comments, you need to log in
Why glitches instead of symbols (monogame drawtext)?
You need to sign the axes, at the moment, for an example, hello should be written with each picture, but I have this krakozyabra.
When I change the RasterizerState, the text may disappear, glitches appeared when I specified the effect in the sprite.Begin method, but without this, he simply drew in the window, and I have world coordinates
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Black);
spriteBatch.Begin(SpriteSortMode.Texture, null, null, null, RasterizerState.CullClockwise, effect, null);
foreach (var pass in effect.CurrentTechnique.Passes)
{
pass.Apply();
graphics.GraphicsDevice.DrawUserPrimitives(PrimitiveType.LineList, axes, 0, axes.Length / 2);
foreach (var timestamp in timestamps)
{
MouseState mouse = Mouse.GetState();
var pos = timestamp.Key.ToArray();
graphics.GraphicsDevice.DrawUserPrimitives(PrimitiveType.LineStrip, pos, 0, timestamp.Key.Count / 2);
spriteBatch.DrawString(textBlock, "Hello", new Vector2(pos[0].Position.X, pos[0].Position.Y), pos[0].Color);
Console.WriteLine(camera.GetMouse(mouse.Position.ToVector2()));
}
foreach (var graph in graphs)
{
if (graph.Length >= 2)
graphics.GraphicsDevice.DrawUserPrimitives(PrimitiveType.LineList, graph, 0, graph.Length / 2);
}
}
base.Draw(gameTime);
spriteBatch.End();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question