Texture Parameter Scope

Hi All,

Been looking for an answer to this in several books but can’t actually find it - just little hints at how it works.

I am wondering the scoping of specifying texture parameters using functions such as glTexParameteri and glTexParameterf (e.g. specifying MIN and MAG filters for bilinear, trlinear filtering and anisotropic filtering).

By this I mean if they are called are they configured for the current texture (bound by glBindTexture) only. Or are they bound to the current texture unit (changed using multitexture extension function).

Do I need to call these for each texture object I create?
Or just once per texture unit I am using?

I have tried writing some test code and they seem to imply that they are per texture unit, unless I am not binding the textures correctly when specifying them.

Thanks in advance for the help.
dhm

As far as I know it goes to the current texture unit, so you only need to set it one time.

No!
glTexParameter modifies the bound object (on the currently active unit, in the multitexturing case).
glTexEnvParameter and glTexEnv modify the current texture unit.

Of course it does, some day I will have to learn to read…

Hi,

Thanks for your response. I’ll have a go and testing it again, and checking my calls to glBindTexture prior to retrieving filtering parameters.

Cheers,
dhm