Switch between texture filtering modes

Hi,

Is it possible to switch between texture filtering modes?

What I want to do is draw some textures using mipmaps and others using just linear filtering.

I call glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);

when I want to draw textures using mipmap filtering

and glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

when I want to draw textures using using linear filtering.

But it doesn’t seem to work.

Any idea why?

Yes it is possible.

But for mipmaping to work, you should upload all texture lod levels.

Can you precisely define what means “it doesn’t seem to work” in both cases ?

Thanks for the reply and sorry for my vague description,

When I draw the whole scene with linear filtering everything works fine.

Then I decide to use mipmap filtering on some of the textures. What happens then is that the mipmap textures draws correctly, but some(not all) of the textures using linear filter is all white.

I build the mipmapped texture using:
gluBuild2DMipmaps
and the linear filtering textures using:
glTexImage2D

I also set the texture enviroment parameter GL_TEXTURE_MIN_FILTER before I build the texture and before I draw the texture.