So, a couple of minor technical things:
- Switched from the manual filling of a dynamic vertex buffer (and subsequently calling DrawPrimitives) to just calling DrawUserPrimitives every frame. I fill my vertex buffer every frame since I don't really have any static content (tiles may seem static, but the programming model allows me to manipulate every sprite for every frame). Performance is about the same, as expected.
- Since everything is a quad right now, it made sense to use DrawUserIndexedPrimitives instead. Slight performance boost.
- And here's the stuff I really hate doing: handling 'lost device' exceptions (from ctrl+alt+del, for example), properly releasing and re-allocating all device-dependent resources, etc. Anyway, it works now, so that's out of the way. Full screen alt+tab is still a little messed up, but I'll save that one for another night.
Next up is some really fun stuff that I'm looking forward to implementing: scripting.
No comments:
Post a Comment