Goombert
Goombert

Reputation: 334

Direct3D 9.0 Return To The Fixed Function Pipeline

How does one return to the ffp after using a shader? In OpenGL you simply bind shader 0 and the same for textures, this is not made obvious in DX whether or not it is the same I can not discern.

Upvotes: 1

Views: 410

Answers (1)

Nico Schertler
Nico Schertler

Reputation: 32627

If you use effects, appropriate calls to effect->Begin() and effect->End() should save and restore the pipeline state. If you use FFP before Begin(), this state should be restored after End().

If you don't use effects, you can set null shaders. From MSDN:

To set a fixed-function vertex shader (after having set a programmable vertex shader), call IDirect3DDevice9::SetVertexShader(NULL) to release the programmable shader, and then call IDirect3DDevice9::SetFVF with the fixed-function vertex format.

Upvotes: 3

Related Questions