Casual Info About How To Draw A Line In Xna
Draw a sprite with a large.
How to draw a line in xna. If we don't add 1 to our existing result, single point lines will not be drawn at all. Just create a quick texture, for example: Draw points, lines, and other 3d primitives which covers this.
To draw true 2d primitives, you can make your own vertex format that uses vector2ds and then use either your own shader or basiceffect. These lines will be one pixel thick. Texture2d simpletexture = new texture2d.
My ultimate goal is to draw some lines onto the screen which i will eventually transform with rotations, etc (by hand). However, for this first step. You can give it 2 points ( start and end point of course) and a color.
Well, you can do it in a very simple way without getting into the 3d horrible vector stuff. Basically linebatch uses a spritebatch to draw the lines by stretching a 1×1 white texture2d to your line size. Now i try to set the pointsize to make the line thicker but i can only find a solution for.
I need to simply draw the lines! In the xna docs, there is a topic called how to: