Jump to content
  • Advertisement
Sign in to follow this  
Nuclear_Subset

Black Spots

This topic is 4842 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, i recently implemented a polygonization algorithm in order to render an implicit surface in opengl. This algorithm returns three vertices each time it computes a valid polygon, and using GL_TRIANGLES I try to render them. However, I get black spots in my model. I am enabling lights, giving each vertex a normal normalized according to the gradient of the surface in that point, checking the vertex order according to the right hand rule, but I can't remove these spots yet. Also, when I change the location of the viewer with gluLookAt using the arrow keys I observe that some polygons that had been rendered well now become black spots, and viceversa. What's wrong? I hope someone can help me.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
That will work for a simple convex models (a sphere) but may break for complex models.

Check if you are enabling the depth buffer
glEnable(GL_DEPTH_TEST);

and if your window has depth buffer support.

-- Steven Ashley

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!