Archived

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

colinisinhere

Backface culling?

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