Jump to content
  • Advertisement
Sign in to follow this  
Samurai Jack

State management (DX9)

This topic is 4006 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
the way i am handling this is that for everything that i am getting ready to render, i setup as so:

applyChanges GameDev.net


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!