Sign in to follow this  

draw circle and direct x

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 radius = 20.0f;
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 this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this