Jump to content
  • Advertisement
Sign in to follow this  

Mipmaps for 2D

This topic is 4676 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 am working on a 2D game, so is there any point in using mipmaps? I am just wondering because the previous graphics programmer on the project used gluBuild2DMipmaps (or whatever the exact function name is) instead of glTexImage2D, but I can't think of a good reason since the images aren't really ever scaled much like they would be in 3D. Thanks roos

Share this post


Link to post
Share on other sites
Advertisement
for 2d depending on what you are doing. if you are not going to scale your images at all then you won't need it but make sure that your images are in the power of 2 if u are not going to used gluBuild2DMipmap,Otherwise from my experience the image will look blurry and distorted when you load it up. Also if you have mipmap enabled you can filter the texture using glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
because by default the filtering is set to GL_LINEAR and you may not want that for a 2d game. Hope that helps

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!