PDA

View Full Version : Texture unit 0 blending with Texture unit 1 problem



kackurot
10-31-2006, 01:52 AM
I am having a problem with texture 0 blending with 1. I use texture unit 1 for normal mapping, and gradient lookup in my glsl shaders. The problem is when I turn off unit 1, unit 0 blends with it even though I turned unit 1 off via glActiveTexture and glDisable with texture2d. I even tried binding a id 0 to unit 1 before I disable it. Has anyone had this problem or maybe can have some insight on it? Is there a function Im not calling that is directed towards texture blending of two units? I would appreciate some help on this one.

Komat
10-31-2006, 02:27 AM
The gldisable for texture units has no effect when glsl shaders are used, the shader specifies which units and targets (texture2d, texture3d,..) should be sampled regardless of theirs enabled or disabled state.

kackurot
10-31-2006, 11:59 AM
Sorry about the incomplete info, I forgot to say that it was happening when the shaders where off. The problem is happening when shaders are off and just fixed function pipeline is on.

sqrt[-1]
10-31-2006, 04:39 PM
Do a sanity check with GLIntercept.

Grab a XML frame and see what it has to say about what textures are bound and active during your problem render call.

kackurot
10-31-2006, 09:16 PM
Thanx aqrt[-1] man. Aparently, texture 1 was being bound some where else. GLIntercept is a life saver, thanks