Archived

This topic is now archived and is closed to further replies.

Using part of an image file for a texture

This topic is 5015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive seen a way to use only a part of an image file to make sprites but forgot where :/ and would like to know if I can do the same for textures...

Share this post


Link to post
Share on other sites
If you use the ID3DXSprite interface, one of the parameters you use when drawing is sourcerect. So load in a 256x256 bitmap and make 16x16 or 32x32 rects for each object and use those when making the draw() call.

Share this post


Link to post
Share on other sites
Is there a way to do the same thing but with a texture ?

Edit : lol, yeah the first reply : changing the texture coordinates is working :/ I just didnt get it till now...

[edited by - k0lpA on March 22, 2004 11:00:04 AM]

Share this post


Link to post
Share on other sites