   Multitexture shader question
  So, I have a shader that is supposed to be (for now) copying two different input textures to two outputs on the FBO.  However, it only seems to want to copy the first one to both.  Please tell me I'm just stupid and overlooked something.The shader:#extension GL_ARB_texture_rectangle : enableuniform sampler2DRect tex0;uniform sampler2DRect tex1;void main(){gl_FragData[0] = texture2DRect(tex0, gl_TexCoord[0].st) * .5 + vec4(0.5, 0, 0, .5);gl_FragData[1] = texture2DRect(tex1, gl_TexCoord[0].st) * .5 + vec4(0, 0.5, 0, .5);}The render code:... set upglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, outTexs[0], 0);glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_RECTANGLE_ARB, outTexs[1], 0);... load shaders, etcglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);glPushAttrib(GL_VIEWPORT_BIT | GL_ENABLE_BIT);glViewport(0,0,wid, hei);glMatrixMode(GL_PROJECTION);glPushMatrix();glLoadIdentity();glOrtho(0.0f,wid,hei,0.0f,-1.0f,1.0f);// draw to the buffersGLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT };glDrawBuffers(2, buffers);glUseProgram(program);// set up the multi-texturingglActiveTexture(GL_TEXTURE0);glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texs[0]);glActiveTexture(GL_TEXTURE1);glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texs[1]);// Render as normal here// output goes to the FBO and it’s attached buffersglBegin(GL_QUADS);glMultiTexCoord2i(GL_TEXTURE0,  0, hei); glVertex2i( 0,   0);glMultiTexCoord2i(GL_TEXTURE0,wid, hei); glVertex2i( wid, 0);glMultiTexCoord2i(GL_TEXTURE0,wid,   0); glVertex2i( wid, hei);glMultiTexCoord2i(GL_TEXTURE0,  0,   0); glVertex2i( 0,   hei);glEnd();glFlush();glPopMatrix();glMatrixMode(GL_MODELVIEW);glPopAttrib();glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);glUseProgram(0);glActiveTexture(GL_TEXTURE0);The two output textures are coming out with the right tint, but they both look like input one.  Do I need to do something extra to multitexture with rectangle textures?  If I use the input images (without the tinting), I correctly get two different images.  Any thoughts?   
  never mind, I'm an idiot.   ;  Since you didn't post your solution I'm going to go ahead and assume it was this:void main(){gl_FragData[0] = texture2DRect(tex0, gl_TexCoord[0].st) * .5 + vec4(0.5, 0, 0, .5);gl_FragData[1] = texture2DRect(tex1, gl_TexCoord[0].st) * .5 + vec4(0, 0.5, 0, .5);}which should bevoid main(){gl_FragData[0] = texture2DRect(tex0, gl_TexCoord[0].st) * .5 + vec4(0.5, 0, 0, .5);gl_FragData[1] = texture2DRect(tex1, gl_TexCoord[1].st) * .5 + vec4(0, 0.5, 0, .5);}If this is not the solution, please could you post it so others may learn   ;  No, the problem was that I forgot to assign values to the samplers, so both defaulted to using texture 0.  This would have been easier to figure out had they defaulted to an invalid value, but this would have been bad behavior with only one texture.  Updated code:glActiveTexture(GL_TEXTURE0);glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texs[0]);glUniform1i(glGetUniformLocation(program, "tex0"), 0);glActiveTexture(GL_TEXTURE1);glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texs[1]);glUniform1i(glGetUniformLocation(program, "tex1"), 1);glActiveTexture(GL_TEXTURE0);;  Fell into the same trap myself with GLSL, wrote a Dev Journal entry about it.Cheers for posting the solution   ;  Action herehttp://www.opengl.org/wiki/GLSL_:_common_mistakes