Sign in to follow this  

is it worth saving state changes anymore?

This topic is 4762 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, im just wondering if with todays hardware there is any point to try and sort your scene geometry every frame, to cut down on state changes and texture switches. Anyone know? Thanks in advance.

Share this post


Link to post
Share on other sites
It highly depends on the application.

If your application has bottlenecks elsewhere, if the state changes do not impact the speed of the game as much as other factors, always spend your time on those factors that would increase the speed of the game most.

It is unrealistic to hope to optimize every single thing in a program, you have to set up some priorities, and these priorities imply solving the most important problems first (unless there are trivial solutions to others). As a corollary to that last remark, if it is trivial for you to save state changes (trivial = easy to code, with minor or inexistent changes to the module interfaces), then do it.

On the other side, if profiling shows that the main bottleneck in your game is the amount of state changes, design and implement a solution for it.

Share this post


Link to post
Share on other sites
but thats not what im wondering, but thanks anyway. :-)

Let me put it like this: Would it be faster or slower to sort geometry each frame to save state changes. Or are they so cheap nowdays that the sorting overhead would infact make it slower to do that?

Share this post


Link to post
Share on other sites
It's exactly like ToohrVyk said.
Ideally you should be sorting, but if it takes longer to sort than to just send them anyway you get no gain.
Depends on your app.

Share this post


Link to post
Share on other sites

This topic is 4762 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this