Archived

This topic is now archived and is closed to further replies.

State Blocks

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

OK, well, I was attempting to use state blocks as a method for easy management of states in my particle engine. However, I have found that, at least on my card (GF4Ti), the act of Capture() for a state block is suicidal to my framerate. The call itself takes about a half a second (pretty bad). Now, I know that driver support is fairly flaky among various cards, but should a penalty that is THIS high be expected when it''s not fully supported? Does anyone know whether late Nvidia cards support state blocks?
Gamedev for learning. libGDN for putting it all together. An opensource, cross platform, cross API game development library.

Share this post


Link to post
Share on other sites
You''re only supposed to run capture once.

You set the render state (via SetRenderState, SetTextureStageState, and SetSamplerState) to how you want it in the state block, then Capture() it.

Then, every frame, you Apply() it to restore the state to what you captured earlier.

Don''t capture every frame. It kinda defeats the purpose

Share this post


Link to post
Share on other sites
Hehe, ok, cool, found my answer about 5 mins after posting this. Thanks



Gamedev for learning.
libGDN for putting it all together.
An opensource, cross platform, cross API game development library.

Share this post


Link to post
Share on other sites