Am Montag 27 November 2006 16:20 schrieben Sie:
I'm not directly opposed to the current setup, it's more that I'm wondering if going for separate tables for related states would perhaps result in cleaner / more flexible code. It would of course allow you to get rid of those macros :-)
Not so sure about that. Now there is one function for dirtifying states(markDirty). With different lists we'd need a number of simmilar, but yet different functions(markRenderStateDirty, markSamplerDirty, ...). In the same way drawPrim would have to check / work down a number of lists instead of one.
All the ugly things about the current setup are in the macros and in wasting some memory for table entries which are not supported by the hardware(like up to 128 samplers in dx10).
If no one puts a veto I'd go for the single list, and see what aj says. If I have to fall back to seperate lists well ok, its not much of an issue too.