Jump to content
  • Advertisement
Sign in to follow this  
lack the hack

gluDisk(inner radius color)

This topic is 4838 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

hello when your using quadrics and the gluDisk() function, i was wondering if you can make the inner radius have a different color than your background? well that's all that i have to ask, so see you later thanks:-)

Share this post


Link to post
Share on other sites
Advertisement
You probably can... it might need to be coded in a more brute force kinda way but I could be wrong. Its late so I'll try to do it myself in the morning. Night.

Share this post


Link to post
Share on other sites
You would actually create multiple circles to get the look you want. Let's say you want to draw a target with three rings.


glColor3ub(255, 0, 0);

gluDisk(obj, //I assume you already created the object
0, //center has no inner circle
20, //size of circle
....);

glColor3ub(255, 255, 255);

gluDisk(obj, //I assume you already created the object
20, //inner circle equal to center circle size
40, //size of outer circle
....);

glColor3ub(255, 0, 0);
gluDisk(obj, //I assume you already created the object
40, //size of previous
60, //size of outer circle
....);

This should work. Yes, it is a brute force method. Hope it helps. There's probably a better way, but this is the easiest and most direct way that I know of.






Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!