Advertisement

animated sprites & can I split a D3DTexture into new textures?

Started by February 16, 2003 08:20 PM
1 comment, last by Drastick 21 years, 9 months ago
I have been working on a 2D game with DirectDraw and have now started converting/redesiging it in D3D. I have read that there is a problem when you have a large image that holds all of the sprite animations when storing it as a texture. Where as it was not as much as a problem when i was using surfaces back with DDraw. Is there a way to load in the large sprite sheet to a texture then break it up and send each frame to an indiviual textue then unload the larger image? (which is much like what I did when I was using DDraw)
Yes, textures have a lot of size limitations. Older video cards often can't go higher than 256x256. This is particularly a problem when you want to load large background images.

My 2D engine works well by having its cSprite and cImage classes automatically slice large images into more manageable ones and reassemble them when it comes time to draw. (Reassembling takes a bit of mathematical manipulation when you factor in things like rotation and scaling).

I got the method for loading big images and dissecting them from here. The section of interest is "Big Bad Textures", and the source code of the demo that comes with it.


[edited by - micepick on February 16, 2003 9:38:39 PM]
Advertisement
Awsome that was just what I was looking for thanks!

This topic is closed to new replies.

Advertisement