PDA

View Full Version : multitexture problem



MoeTM
03-31-2011, 08:59 AM
Hello,

I have problem using multitexture in a shader. In my programm I render a scene into a gbuffer(colour, position, normal) und finally I use this data to perform lighting. My problem is this only works when I use glActiveTextureARB(GL_TEXTURE1_ARB) to glActiveTextureARB(GL_TEXTURE3_ARB), glActiveTextureARB(GL_TEXTURE0_ARB) does not work, but I dont know why. I use GL_TEXTURE_RECTANGLE_NV in my gbuffer to store the informations. My program works this way:

makeGbufferCurrent()
renderScene()
till here everything works.
RenderAllLayersTogether(Colour, Position, Normal);
This works only when I use glActiveTextureARB(GL_TEXTURE1_ARB to GL_TEXTURE3_ARB) not glActiveTextureARB(GL_TEXTURE0_ARB)
Moreover glActiveTextureARB(GL_TEXTURE0_ARB) and bindtexture(GL_TEXTURE_2D) doesnt work in any case