Microsoft DirectX 8.0 (C++) |
Geometry blending is disabled by default. To enable geometry blending, call the IDirect3DDevice8::SetRenderState method to set the D3DRS_VERTEXBLEND render state to a value from the D3DVERTEXBLENDFLAGS enumerated type. The following code example shows what this call might look like when setting the render state for a blend between two world matrices.
d3dDevice->SetRenderState( D3DRS_VERTEXBLEND, D3DVBF_1WEIGHTS );
When D3DRS_VERTEXBLEND is set to any value other than D3DVBF_DISABLE, the system assumes that the appropriate number of blending weights will be included in the vertex format. It is your responsibility to provide a compliant vertex format, and to provide a proper description of that format to the Microsoft® Direct3D® rendering methods. For more information, see Defining Vertices for Blending.
When enabled, the system performs geometry blending for all objects rendered by the DrawPrimitive rendering methods.