winterhell's picture

(Solved)Fixed Function rendering seems to disappear after calling GL.ActiveTexture(TextureUnit.Texture1);

I have some geometry that am rendering with shaders, and then HUD that is with fixed function.
Rendering with shaders using single textured geometry with GL.ActiveTexture(0) has no negative impact on the fixed function.
Calling TextureUnit.Texture1 or higher causes the fixed function to display empty flickering texture. The geometry rendered with the shader works fine either ways with single or multitexturing.

How can I reverse the GL state after I'm done with the multitexture shader?

Edit: It turned out that before using immediate mode the last GL.ActiveTexture() should be on TextureUnit.Texture0. GL.ActiveTexture(0) seems to do something different from GL.ActiveTexture(TextureUnit.Texture0);