Advertisement Jump to content
Sign in to follow this  
Samurai Jack

State management (DX9)

This topic is 4101 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

Hello! Does DirectX 9 support somekind of push/pop state management? I know there was something regarding with fonts. You could push the states and then just pop then. What was it? Is some kind of mechanism slow or is it fast ? The idea is: ChangeTexture(one.dds) - change ChangeTexture(one.dds) - don't change, active texture is allready one.dds ChangeTexture(two.dds) - change etc.. The same for SetLight, SetVB, SetIB etc... I don't want to write a wrapper for each and every function like this: PSEUDO: ChangeTexture(newTexture) if CurrentTexture != newTexture : DoTheChange And also for the State Management sample in DX it is way to complicated. Does anyone have a better/easier solution?

Share this post


Link to post
Share on other sites
Advertisement
the way i am handling this is that for everything that i am getting ready to render, i setup as so:

setshader
settexture
setvb
setib
setvf
applyChanges GameDev.net

Social

Copyright © 1999-2018 GameDev.net, LLC

We've detected an ad blocker!
We've detected an ad blocker.
Please whitelist GameDev.net for access to our game development community.
Don't like ads? Consider our GDNet+ Memberships for a no-ad experience.
Yes, I'll Whitelist

Copyright (c) 1999-2018 GameDev.net, LLC Powered by Invision Community

×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!