Jump to content
  • Advertisement
Sign in to follow this  
aewarnick

Formula for resizing image to power of 2

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

Advertisement
Quote:
Original post by aewarnick
Anyone know of how to calculate the lowest size?
Can the width and height be different?


1. Honestly if you want to resize a non power of 2, I would use mipmaps.
2. Yes.

Share this post


Link to post
Share on other sites
Maybe you should take a look at the OpenGL redbook. Google it. It will explain all the texture loading stuff for you.

Share this post


Link to post
Share on other sites
Quote:
Does mipmaps destroy the quality of the image by actually resizing the image itself or is it just padded?

it changes the imagesize thus the image is distorted (perhaps slight perhaps major)
if u want the best quality image as other haves said choose the next highest power of 2 sized image (and use a part of it) or use texture_rectange (part of gl 2.0)

Share this post


Link to post
Share on other sites
it considers on the graphic card if the card support the OGL 2.0 that mean you can use this extension..

Share this post


Link to post
Share on other sites
yes..
do like they said
Quote:

choose the next highest power of 2 sized image (and use a part of it)

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!