Original Post
🔒 Locked
Culling
Advertisement
The only prerequisite for backface culling is that the vertices or indices (if you''re using indexed primitives) are defined in such a way that the winding on all the faces is clockwise (if you use D3DCULL_CCW, i.e. cull anything which is counterclockwise). D3D (actually the hardware which D3D exposes) uses only the order that the vertices are fetched in to cull, no need for normals etc.
--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
just to complete the circle to do culling in dX9 using C# you will have to set your Device Renderstate.Cullmode property to what ever you want, actually there are only three, clockwise,counterclockwise, and none which means you can turn it off.
Example
===============
Devicename.RenderState.Cull.Clockwise;
Devicename.RenderState.Cull.CounterClockwise;
Devicename.RenderState.Cull.None;
you will have to changed "Devicename" to the appropriate name that you are using.
dotnet Programmers Network
www.programmersnet.com
Example
===============
Devicename.RenderState.Cull.Clockwise;
Devicename.RenderState.Cull.CounterClockwise;
Devicename.RenderState.Cull.None;
you will have to changed "Devicename" to the appropriate name that you are using.
dotnet Programmers Network
www.programmersnet.com
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement