Closed perandersson closed 11 years ago
The problem seems to originate from when an active texture is accidentally used more than once for the same GfxProgram. This causes the wrong texture to be bound to the wrong shader sampler2D object. The workaround is to let each GfxProgram use their own activeTextures instead of handing them out in a round-robin fashion (0 .. n, where n is the maximum amount of active textures).
Ignores this for now. This causes a small performance problem, but not enough to be a concern at this point.
The previous solution where we had a circular list of free active texture id's has been changed to simply have an active texture id from 0 -> n unique for each GfxProgram. Due to possible performance hits, the previous solution should be re-implemented when it works correctly.