Jump to content
  • Advertisement
Sign in to follow this  

State block changes (dx8.1 to 9.0c)

This topic is 4773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, folks, Some of the state block stuff has disappeared between dx8.1 and dx9.0c. Specifically, I'm looking at dx8.1 code that uses DeleteStateBlock, CaptureStateBlock, and ApplyStateBlock. Can anyone point me to some info on how to accomplish what these methods were doing, now that they no longer appear in the sdk?? Respectfully,

Share this post


Link to post
Share on other sites
Advertisement
CreateStateBlock() now gives you back a COM object (IDirect3DStateBlock9) rather than a handle;

IDirect3DStateBlock9 has 3 methods itself:

IDirect3DStateBlock9::Apply()
IDirect3DStateBlock9::Capture()
IDirect3DStateBlock9::GetDevice()


IDirect3DStateBlock9 is inherited from IUnknown so also provides:

IUnknown::AddRef()
IUnknown::QueryInterface()
IUnknown::Release()


So:

d3dDevice->DeleteStateBlock(stateblockHandle) == stateblock->Release()
d3dDevice->CaptureStateBlock(stateblockHandle) == stateblock->Capture()
d3dDevice->ApplyStateBlock(stateblockHandle) == stateblock->Apply()


HTH

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!