Jump to content
  • Advertisement
Sign in to follow this  
tinywolf

drawing something at the same position

This topic is 3582 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 want to draw two circles at the same position like this glColor3f(1.0f, 0.0f, 0.0f); DrawCircle(10.0f); // draw a red circle with radius 10 on the x-z plane at (0, 0) glColor3f(0.0f, 1.0f, 0.0f); DrawCircle(5.0f); // draw a green circle with radius 5 on the x-z plane at (0, 0) but the green circle isn't not drawn properly how do i draw the green circle properly without disabling depth buffer?

Share this post


Link to post
Share on other sites
Advertisement
Define "properly"?

Are the circles meshes? Can you post a screen shot of what you get and explain what you are expecting?

Alan

Share this post


Link to post
Share on other sites
Try using polygon offset:

glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(1.0, 1.0); // Might have to change the values here,

glColor3f(1.0f, 0.0f, 0.0f);
DrawCircle(10.0f); // draw a red circle with radius 10 on the x-z plane at (0, 0)

glDisable(GL_POLYGON_OFFSET_FILL);


glColor3f(0.0f, 1.0f, 0.0f);
DrawCircle(5.0f); // draw a green circle with radius 5 on the x-z plane at (0, 0)


I used this when rendering a mesh and a surface simulatneously.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!