Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

colinisinhere

Backface culling?

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

From what i''ve heard, it is a method of only showing polygons facing the camera and not showing the back faces. Is this done through Opengl/DirectX or programmed in the engine? And if its done with OpenGL how do you enable it?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
glCullFace(GL_BACK);

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glfunc01_9yxx.asp

Share this post


Link to post
Share on other sites
And in DirectX: dev->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );

On all graphics hardware manufactured since around 1996/7, backface culling has been performed by the HARDWARE. So neither OpenGL or DirectX actually do the work, your graphics card does (when it''s assembling vertices and indices into polygons).


BTW: Backface culling, what it does and how to use it is fully documented in the documentation for both DirectX and OpenGL.

--
Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites

  • 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!