Jump to content
  • Advertisement


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


Texture Size Problem

This topic is 6117 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

Must the texture image dimensions be the nth order of power 2. But if the source image isnot that dimension. How can I create a texture and use it.

Share this post

Link to post
Share on other sites

You basically have 2 options:
1)Add blank space around the image until the dimensions are powers of 2. Then you just change the texture coordinates to leave off the blank space. Very easy to do. It can be incredibly wasteful in terms of memory use though. For example, if your source image was 1026 pixels wide, you''d have to extend it to 2048, that''s a lot of waste. Situations like that are rare though.

2)Slice your image up into 2 or more sub-images that are powers of 2. This requires more effort, but you don''t waste tons of memory and it makes your large images more likely to work on something like a Voodoo (since they can''t handle textures larger than 256x256).

I guess there is a 3rd option, squish your image down to be a power of 2, but that''s rarely acceptable.

Stay Casual,

Drunken Hyena

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!