I had a question on Pixel Format, specifically the glPixelStorei function.
First some background, I’m creating my own Mipmap building routine because the app I’m working on creates many, many large textures at startup, and using the gluBuild2DMipmap functions is quite slow. So I’m working on my own scaling and Mipmap functions. This will also be nice as I will also be able to add filtering steps to the images used as textures at later stages in development.
Okay the question, I’ve run into an issue when building the last couple of textures in a a Mipmap and found that I need to make sure glPixelStore(GL_UNPACK_ALIGNMENT , ??) needs is set to 1. This is because my scale function doen’t pad images to word boundaries so the 2x2 image causes problems. If I set this to 1 everything works correctly. My question is this, is setting it to 1 a bad thing from a performance standpoint? Would I be better off padding the images so I can use a different alignment?
Also as a side question, does anyone know of resouces that I could track down to help in optimzing my scaling code, algorithms for scaling (RGB images only)?