Public Group

# draw circle and direct x

This topic is 3005 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I want to draw a very simple circle using directx 9.I have tried a few things I have found online but no luck. I also need to know if the following command is correct. D3DXVector3 pos (float x, float y, 0); I am still learning directx 9.

##### Share on other sites
I don't think you've looked hard enough. :-P

http://lmgtfy.com/?q=How+to+draw+a+circle+in+directx+9

##### Share on other sites
I need to know how to draw a circle to the screen using direct x9. I found some code that might work.

#define PI 3.14159f

float smoothness = 0.05f;

float center_x = 400.0f;
float center_y = 300.0f;

for(float angle = 0.0f; angle <= (2.0f * PI); angle += smoothness)
{
float x = center_x + (radius* (float) sin (angle));
float y = center_y + (radius* (float) cos (angle));
}

However I need to know the direct x command that actually prints to the screeen.

##### Share on other sites
See this tutorial, it explains how to draw the vertices you create for your circle: Tutorial 2: Rendering Vertices.

1. 1
2. 2
Rutin
21
3. 3
JoeJ
18
4. 4
5. 5

• 14
• 40
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631722
• Total Posts
3001892
×