Here's an alternate proposal:
Add a new image state command called SetRect (or possibly SetSubimage): SetRect X,Y,Width,Height. This limits the part of the source image that is drawn, so you can essentially choose parts of a larger image. SetHandle is computed relative to this rectangle, so you can have an independent hotspot for each subimage.
The SetRect command could be used to implement animated images without breaking them up into separate textures. It could also be used to implement general image packing.
Or, as a second alternative, have a DrawSubImage command that also takes a rectangle as four parameters.
Thanks for listening!
Add a new image state command called SetRect (or possibly SetSubimage): SetRect X,Y,Width,Height. This limits the part of the source image that is drawn, so you can essentially choose parts of a larger image. SetHandle is computed relative to this rectangle, so you can have an independent hotspot for each subimage.
The SetRect command could be used to implement animated images without breaking them up into separate textures. It could also be used to implement general image packing.
Or, as a second alternative, have a DrawSubImage command that also takes a rectangle as four parameters.
Thanks for listening!