32
« on: February 01, 2021, 08:10:20 pm »
How can I draw a simple 1-pixel thick line?
I've tried the obvious but it draws a 2-pixel thick line thats the wrong color! (I'm trying to draw it white but it comes out grey instead).
BTW I'm using the C# bindings if that matters.
Vertex[] line = new Vertex[2];
line[0].Position.X = 10;
line[0].Position.Y = 10;
line[0].Color.R = col.R;
line[0].Color.G = col.G;
line[0].Color.B = col.B;
line[0].Color.A = col.A;
line[1].Position.X = 10;
line[1].Position.Y = 100;
line[1].Color.R = col.R;
line[1].Color.G = col.G;
line[1].Color.B = col.B;
line[1].Color.A = col.A;
currentRenderTarget.Draw(line,0, 2, PrimitiveType.Lines);