Microsoft DirectX 8.0 (C++) |
Computes normals for each vertex in a mesh.
HRESULT D3DXComputeNormals( LPD3DXBASEMESH pMesh );
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be one D3DERR_INVALIDCALL.
Note The input mesh must have the D3DFVF_NORMAL flag specified in its FVF.
A normal for a vertex is generated by averaging the normals of all faces that share that vertex.
Header: Declared in D3dx8mesh.h.
Import Library: Use D3dx8.lib.