4.05.2012

Progress

Pulled myself together and made most of the framework for implementing unique render commands in IGE. It's quite a challenge I have to say and the more detailed one-time commands you add for each item, the more performance it costs. It's similar to how you fill OpenGL or SDL with stuff, so in the end it's just an added convenience layer. However, SDL requires significantly more work and buffer management since it has no "bulk" commands like OpenGL to just pass a vertex array. Everything has to be done by hand, increasing the number of needed function calls. I think I found quite a nice way that's not that different from how you'd do it manually. What I'm concerned about is how command IDs will be checked. I know that GCC is smart enough to translate it to jump tables, but this will only work if every enum has a case in a switch block - or atleast a series of IDs with no gaps inbetween. I doubt they implemented something that does checks before just mapping to a jump table, so it may be a good idea to group stuff later and have two commands IDs. This would also simplify the filtering of command categories as I'm sure whether I want to allow matrix operations outside of direct display list rendering. Yep, I think two IDs is a good idea. Makes stuff light for the optimizer.

Also, it's the 1028th post! Though I should've celebrated the 1024th one, I'm gonna sacrifice my last chocolate bar for this unique event.

No comments: