Archived

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

k0lpA

Using part of an image file for a texture

Recommended Posts

k0lpA    127
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
Fidelio66    164
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
k0lpA    127
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