Jump to content
  • Advertisement

Archived

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

k0lpA

Using part of an image file for a texture

This topic is 5233 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
Advertisement
i think he wants to "slice" an image and use only pieces of it... i could explain how to do this, if your using SDL. but your probably not. tell which API/language your using if you want any help

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!