Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Setting device state with the fixed-function and programmable shader pipeline

This section provides the key differences between setting device state with the fixed-function and programmable shader pipeline.

Here are the device states that you can set for just a fixed-function pipeline:

Here are the device render states that you can set with IDirect3DDevice9::SetRenderState for both fixed-function and programmable shader pipelines:

  • Render Target state: D3DRS_COLORWRITEENABLE, D3DRS_COLORWRITEENABLE1, D3DRS_COLORWRITEENABLE2, D3DRS_COLORWRITEENABLE3, D3DRS_SRGBWRITEENABLE
  • Depth state: D3DRS_ZENABLE, D3DRS_ZWRITEENABLE, D3DRS_ZFUNC, D3DRS_SLOPESCALEDEPTHBIAS, D3DRS_DEPTHBIAS
  • Stencil state: D3DRS_STENCILENABLE, D3DRS_STENCILFAIL, D3DRS_STENCILZFAIL, D3DRS_STENCILPASS, D3DRS_STENCILFUNC, D3DRS_STENCILREF, D3DRS_STENCILMASK, D3DRS_STENCILWRITEMASK, D3DRS_TWOSIDEDSTENCILMODE, D3DRS_CCW_STENCILFAIL, D3DRS_CCW_STENCILZFAIL, D3DRS_CCW_STENCILPASS, D3DRS_CCW_STENCILFUNC
  • Alpha Blending: D3DRS_SRCBLEND, D3DRS_DESTBLEND, D3DRS_BLENDOP, D3DRS_BLENDFACTOR, D3DRS_SEPARATEALPHABLENDENABLE, D3DRS_SRCBLENDALPHA, D3DRS_DESTBLENDALPHA, D3DRS_BLENDOPALPHA
  • Alpha Test: D3DRS_ALPHATESTENABLE, D3DRS_ALPHAREF, D3DRS_ALPHAFUNC
  • Rasterizer state: D3DRS_FILLMODE, D3DRS_LASTPIXEL, D3DRS_DITHERENABLE (16-bit surfaces)
  • Culling: D3DRS_CULLMODE
  • Clipping: D3DRS_CLIPPING, D3DRS_CLIPPLANEENABLE
  • Scissors: D3DRS_SCISSORTESTENABLE
  • Texture samplers: D3DRS_WRAP0, D3DRS_WRAP1, D3DRS_WRAP2, D3DRS_WRAP3, D3DRS_WRAP4, D3DRS_WRAP5, D3DRS_WRAP6, D3DRS_WRAP7, D3DRS_WRAP8, D3DRS_WRAP9, D3DRS_WRAP10, D3DRS_WRAP11, D3DRS_WRAP12, D3DRS_WRAP13, D3DRS_WRAP14, D3DRS_WRAP15
  • Anti-aliasing: D3DRS_MULTISAMPLEANTIALIAS, D3DRS_MULTISAMPLEMASK, D3DRS_ANTIALIASEDLINEENABLE
  • Point sprites : D3DRS_POINTSIZE, D3DRS_POINTSIZE_MIN, D3DRS_POINTSPRITEENABLE, D3DRS_POINTSIZE_MAXD3DRS_POINTSCALEENABLE, D3DRS_POINTSCALE_A, D3DRS_POINTSCALE_B, D3DRS_POINTSCALE_C
  • N-patches: D3DRS_PATCHEDGESTYLE, D3DRS_POSITIONDEGREE, D3DRS_NORMALDEGREE, D3DRS_MINTESSELLATIONLEVEL, D3DRS_MAXTESSELLATIONLEVEL, D3DRS_ADAPTIVETESS_X, D3DRS_ADAPTIVETESS_Y, D3DRS_ADAPTIVETESS_Z, D3DRS_ADAPTIVETESS_W, D3DRS_ENABLEADAPTIVETESSELLATION

 

 

Community Additions

ADD
Show:
© 2015 Microsoft