Mipmaps for 2D

Started by
1 comment, last by roos 18 years, 8 months ago
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
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
Cool, thanks very much!

This topic is closed to new replies.

Advertisement