I'm attempting to draw a 2d circle in C# using Managed DirectX. (yes it is outdated, and unsupported, i know)
Every single example i could find on the web is in C++. They use things like D3DTLVERTEX, Which my C# library does not seem to have. I have no clue how to convert Directx C++ to Directx C# as the seem to be very syntactically different.
I am using this simple method to draw a rectangle in C#
public static void DrawFilledBox(float x, float y, float w, float h, Color Color)
{
Vector2[] vLine = new Vector2[2];
line.GlLines = true;
if (h < 1)
h = 1;
if (w < 1)
w = 1;
line.Width = w;
vLine[0].X = x + w / 2;
vLine[0].Y = y;
vLine[1].X = x + w / 2;
vLine[1].Y = y + h;
line.Begin();
line.Draw(vLine, Color.ToArgb());
line.End();
}
I have tried again and again to draw a circle with no success. It doesn't matter to me if the circle if filled or just a circle outline. Thanks.