Jump to content
  • Advertisement
Sign in to follow this  
Himura-San

OpenGL texturing the front and back face...

This topic is 4521 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´ve wrapped a cilinder with a world map texture. I realized that the texture appear inside too but it appears inverted, like the cilinder was traslucent. Is the OpenGL actually applying the texture in both faces ? if so, is there a way to tell OpenGL to texture only the front face? Thanks in advance !

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure if you could tell OGL to texture just the front face but couldn't you just turn on back face culling? That way you won't need to even render the polygon let alone texture it. Also have a look at glMaterial. glLightModel lets you set what faces to light so that might be useful as well.

Share this post


Link to post
Share on other sites
So OpenGL texture both faces ?

But in my case the back face culling wont solve cause the user actually see both faces.

What I want is to texture the front face, and see the back face solid.
is it possible?

:D


Share this post


Link to post
Share on other sites
Turn on back face culling and set it to cull back faces. Turn on texturing and draw the object. Change the culling to cull front faces, disable texturing, and draw the object again. Now you have textured front face, and non-textured back face.

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!