Jump to content
  • Advertisement
Sign in to follow this  
Chum

OpenGL One sided surfaces

This topic is 4395 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'm drawing a cube, but winding the triangles (each side is 2 tris) CLOCKWISE, because I want the cube to be "inside out." That is, I want it to be facing so that "normally" the viewer is in the center looking at the "inside" of the box (similar to a skybox.) The difference is, for debugging purposes, I'm looking at this box from OUTSIDE -- basically, it's acting as my "rotating cube" in a sample app. Since I'm doing glPolygonMode(GL_FRONT, GL_FILL), I'd EXPECT to only be able to see the back-sides of the cube -- that is, I'd think that the sides nearest me would be invisible, and I'd only see the 3 sides furthest from me. Instead, that sort-a/kind-a works, but I get this weird sort of distorted view that seems to show all 6-sides, kind-of, but not quite exactly -- the near ones have a sort of transparency to them. The texture I'm using on my cube can be seen here and a screenshot is here. Can someone explain why I'm getting these odd results? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Duh. Nevermind...

I thought CullFace was on by default. gl.glEnable (GL.GL_CULL_FACE); fixed the problem.

I was going to delete this post, but decided to leave it up, with the solution, for anyone searching the archives.

Sorry for the interruption...

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!