PDA

View Full Version : Scope of glTexParameter calls



Xarragon
05-01-2005, 10:58 AM
Hello, I feel somewhat uncertain about how texture parameters are applied on the OpenGL pipeline, and hoped some of you guys might be able to clear things up a bit.

Texture parameters, such as min/mag filtering and wrapping mode, are they specific for each texture id number, or specific for the target (GL_TEXTURE_2D etc)?

Let's say that I want mipmapping for some textures in my scene, but not for others. Provided parameters were specific for the texture id, I would simply bind the texture id, set parameters, and create the image and associated mipmaps. Then, during drawing, I would not need to consider the settings of glTexParameter-affected states, right?

Later, when I wanted to draw my objects, I just bind the texture appropiate for the object, and draw it, and depending on the paramters set for the texture, id would get mip-mapped or not?

Is this a correct view, or is the parameters applied in another scope, perhaps target-wize?

Any help appreciated
Martin Persson

Bob
05-01-2005, 10:52 PM
You are correct. glTexParameter set per-texture object parameters.