Sign in to follow this  

state change time

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

Hi all, I'm busy on a very simple OO 3D engine. I use a renderqueue that gets sorted by material. A material doesn't only contain textures, etc but all the state changes. I planned to order it by creating an int that contains bits for all the state changes. The most expensive state changes will be the leftmost bits and the cheapest the rightmost. This would give me numbers after sorting that are sorted by most expensive state change. Now, this is all sorted out, exept I don't know how expensive the state changes are compared to eachother, so I can't make it work yet. Can anyone tell me the order of expensiveness of state changes, or just a couple that are really expensive/inexpensive? Thanx a lot, Marty

Share this post


Link to post
Share on other sites
Quote:
Original post by Marty666
Hi all,

I'm busy on a very simple OO 3D engine. I use a renderqueue that gets sorted by material. A material doesn't only contain textures, etc but all the state changes. I planned to order it by creating an int that contains bits for all the state changes. The most expensive state changes will be the leftmost bits and the cheapest the rightmost. This would give me numbers after sorting that are sorted by most expensive state change.
Now, this is all sorted out, exept I don't know how expensive the state changes are compared to eachother, so I can't make it work yet. Can anyone tell me the order of expensiveness of state changes, or just a couple that are really expensive/inexpensive?

Thanx a lot,
Marty


Answers can be found in the forum FAQ.

Succes ;)

Tom

Share this post


Link to post
Share on other sites
Thanx a lot Tom,

I should have read the FAQ more carefully. Now I've read this i see it only mentions a couple of state changes that are most expensive.
I think it would be a good idear to order the rest aswell since i got plenty bits in my flags. I'll just dump 'm all in right now, but if anyone has some advice on the order sorting for other state changes, please tell me.

thanx,
Marty

Share this post


Link to post
Share on other sites
Quote:
Original post by Marty666
Now I've read this i see it only mentions a couple of state changes that are most expensive. I think it would be a good idear to order the rest aswell since i got plenty bits in my flags. I'll just dump 'm all in right now, but if anyone has some advice on the order sorting for other state changes, please tell me.


Although it may not matter much for many applications, I have encountered situations where (offline-)sorting based upon the 'Everything else' category could indeed improve performance. However, I don't believe there is that much importance in the order of sorting within that category. Anyway, if you implement it properly, switching the sorting order should be trivial if you ever find that my last statement is not true afterall :)

Tom

Share this post


Link to post
Share on other sites

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