Jump to content
  • Advertisement
Sign in to follow this  
Slug

Power of 2 rule?

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

Hi, I know what the power of two rule mean but i use a 640x480 texture size and it work fine, what the heck?

Share this post


Link to post
Share on other sites
Advertisement
it depends what you use. opengl for example gets around it with the mipmap functions. dx allows non-aligned textures if the card supports it (otherwise soft-mode scaling) directly and does some unknown internal conversions to make it match what the card can do.

in general 2^x is the default and you should always aim for this to make your 3d-apps run the best. some cards allow non-aligned textures though and the 3d-apis do their best to hide this from you.

Share this post


Link to post
Share on other sites
>>t depends what you use. opengl for example gets around it with the mipmap functions<<

mipmaps need power of 2 sized textures as well, glubuildmipmaps rescales your image to a power of 2 size if it aint.

for a 640x480 texture ill use a 1024x512 sized texture and just use the bottom left of it ( u can fill up the rest of the t4exture with other images if u wish)

also non power of 2 sized textures are part of gl2.0, promoted ARB_non_power_of_texture extension

Share this post


Link to post
Share on other sites
I know this sounds silly but i read 'powers of 2' when i first started learning - about 4 weeks ago, and well i assumed that rectangular would be ok - but it wasn't - took me a while that it had to be a square image with powers of 2!

Still its all good now so i don't really know why i said that!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!