The D3DSTATE_OVERRIDE macro overrides the state of the rasterization, lighting, or transformation module. Applications can use this macro to lock and unlock a state.
D3DSTATE_OVERRIDE(type) (D3DRENDERSTATETYPE)(((DWORD) (type) + D3DSTATE_OVERRIDE_BIAS))
No return value.
An application might, for example, use the STATE_DATA helper macro (defined in the D3dmacs.h header file in the Misc directory of the DirectX Programmer's Reference sample code) and D3DSTATE_OVERRIDE to lock and unlock the D3DRENDERSTATE_SHADEMODE render state:
// Lock the shade mode.
STATE_DATA(D3DSTATE_OVERRIDE(D3DRENDERSTATE_SHADEMODE), TRUE, lpBuffer);
// Work with the shade mode and unlock it when read-only status is not required.
STATE_DATA(D3DSTATE_OVERRIDE(D3DRENDERSTATE_SHADEMODE), FALSE, lpBuffer);
For more information about overriding rendering states, see States and State Overrides.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in d3dtypes.h.