JCipriani2
03-05-2008, 09:14 AM
Do things I change with glTexParameter only apply to the currently bound texture? Do they stay associated with that texture even if I bind to a different texture? For example, if I do (texa and texb are valid texture names):
glBindTexture(GL_TEXTURE_2D, texa);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindTexture(GL_TEXTURE_2D, texb);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
Is 'texa' always going to use linear filtering and 'texb' always going to use GL_NEAREST from now on? Or do I need to reset glTexParameter every time I call glBindTexture?
What about glTexEnv and glPixelStore? I'm assuming that those are completely independent of whatever texture is currently selected, right (because glTexEnv doesn't take a texture target, and glPixelStore applies to more than just texture data transfers)?
Thanks!
Jason
glBindTexture(GL_TEXTURE_2D, texa);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindTexture(GL_TEXTURE_2D, texb);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
Is 'texa' always going to use linear filtering and 'texb' always going to use GL_NEAREST from now on? Or do I need to reset glTexParameter every time I call glBindTexture?
What about glTexEnv and glPixelStore? I'm assuming that those are completely independent of whatever texture is currently selected, right (because glTexEnv doesn't take a texture target, and glPixelStore applies to more than just texture data transfers)?
Thanks!
Jason