Original Post
My game engine is coming along nicely and I''m now to the issue of dynamic textures. What I mean are things like "unit selection circles" (in this case, a small pulsing circle under a selected unit).
I could do it with an actual flat circle mesh and scale it in realtime, but that seems wasteful. What I''ve currently done is used a simple flat square mesh with a texture on it. The texture is cycled between 4 different portions of an image, each displaying a different radius circle. the overall effect is of a pulsing circle. Note that all my textures are part of a single 256x256 texture and I simply modify my texture coords for the current portion that should be displayed based on the game clock.
Is there a way to generacize this? Currently, my bit of code is very specific to doing animation for my selection circles. What I really want is a way to give an image name and a count of frames or something like that and maybe a time (for how quickly the animation should play) and then have it done automatically.
Is this the right approach? Is there something built in to DX for this already? Ideas, feedback?
Thanks!
Onnel