   help with sending tangents and binormals to GLSL (I REALLY need this solved)
  This is a normal mapping question.Here is what I know I've done right:Normal, Bitangent and Tangent calculations.Here is the screen shot of the normal set of every 3rd vert.http://img83.imageshack.us/img83/8890/normalset4kl.jpgWhen I use this line in my GLSL shader I get this:gl_FragColor = vec4(vNormal, 1.0);http://img382.imageshack.us/img382/1086/shownormal4vo.jpgSo I'm almost sure the normals are working.However, if I use this:gl_FragColor = vec4(vBinormal, 1.0);orgl_FragColor = vec4(vTangent, 1.0);The teapot turns black.So that's why I think the binormals and tangents aren't being sent to the shaders.I'm using VBOs, so it makes things less obvious, what with the pointers and all.Here is the code I use to load the VBOs.glGenBuffers(1, &BufferObject);glBindBuffer(GL_ARRAY_BUFFER, BufferObject);glBufferData(GL_ARRAY_BUFFER, numFaces*3*3*sizeof(float) + //VertsnumFaces*3*2*sizeof(float) + //TexCoordsnumFaces*3*3*sizeof(float)*3,//Normals, Binormals, TangentsNULL, GL_STATIC_DRAW);.........//Verts, normals, tex coords, they are working so i'm saving some room.....for(unsigned int i = 0;i<numFaces;i++){data[(i*9)] = verts[faces.vert1].tangentY.x;data[(i*9)+1] = verts[faces.vert1].tangentY.y;data[(i*9)+2] = verts[faces.vert1].tangentY.z;data[(i*9)+3] = verts[faces.vert2].tangentY.x;data[(i*9)+4] = verts[faces.vert2].tangentY.y;data[(i*9)+5] = verts[faces.vert2].tangentY.z;data[(i*9)+6] = verts[faces.vert3].tangentY.x;data[(i*9)+7] = verts[faces.vert3].tangentY.y;data[(i*9)+8] = verts[faces.vert3].tangentY.z;}glBufferSubData(GL_ARRAY_BUFFER, 2*numFaces*9*sizeof(float)+numFaces*6*sizeof(float), numFaces*9*sizeof(float), data);//Load Tangentsfor(unsigned int i = 0;i<numFaces;i++){data[(i*9)] = verts[faces.vert1].tangentX.x;data[(i*9)+1] = verts[faces.vert1].tangentX.y;data[(i*9)+2] = verts[faces.vert1].tangentX.z;data[(i*9)+3] = verts[faces.vert2].tangentX.x;data[(i*9)+4] = verts[faces.vert2].tangentX.y;data[(i*9)+5] = verts[faces.vert2].tangentX.z;data[(i*9)+6] = verts[faces.vert3].tangentX.x;data[(i*9)+7] = verts[faces.vert3].tangentX.y;data[(i*9)+8] = verts[faces.vert3].tangentX.z;}glBufferSubData(GL_ARRAY_BUFFER, 3*numFaces*9*sizeof(float)+numFaces*6*sizeof(float), numFaces*9*sizeof(float), data);delete [] data;data = NULL;And here is the render code:void Obj::Draw(GLSLProgram *shader){shader->use();shader->sendUniform(shader->getUniformLocation("view_position"), 0.0f, 40.0f, 60.0f, 0.0f);shader->sendUniform(shader->getUniformLocation("lightPos"), -53.0f, 53.0f, -33.0f, 0.0f);shader->sendUniform(shader->getUniformLocation("lightDir"), 0.8f, -1.4f, -0.378f, 0.0f);glBindBuffer(GL_ARRAY_BUFFER, BufferObject);glEnableClientState(GL_VERTEX_ARRAY);glEnableClientState(GL_NORMAL_ARRAY);glEnableClientState(GL_TEXTURE_COORD_ARRAY);unsigned int facesDrawn = 0;for(unsigned short i = 0;i<numGroups;i++){glActiveTexture(GL_TEXTURE0);glBindTexture(GL_TEXTURE_2D, groups.mat->TexID);glActiveTexture(GL_TEXTURE1);glBindTexture(GL_TEXTURE_2D, groups.mat->BumpID);shader->sendUniform(shader->getUniformLocation("BaseMap"), 0);shader->sendUniform(shader->getUniformLocation("BumpMap"), 1);glVertexPointer(3, GL_FLOAT, 0, BUFFER_OFFSET(0));glNormalPointer(GL_FLOAT, 0, BUFFER_OFFSET(numFaces*9*sizeof(float)));glClientActiveTexture(GL_TEXTURE0);glTexCoordPointer(2, GL_FLOAT, 0, BUFFER_OFFSET(2*numFaces*9*sizeof(float)));glClientActiveTexture(GL_TEXTURE1);glTexCoordPointer(3, GL_FLOAT, 0, BUFFER_OFFSET(2*numFaces*9*sizeof(float)+numFaces*6*sizeof(float)));glClientActiveTexture(GL_TEXTURE2);glTexCoordPointer(3, GL_FLOAT, 0, BUFFER_OFFSET(3*numFaces*9*sizeof(float)+numFaces*6*sizeof(float)));glDrawArrays(GL_TRIANGLES, facesDrawn*3, groups.numFaces*3);facesDrawn+=groups.numFaces;}glDisableClientState(GL_VERTEX_ARRAY);glDisableClientState(GL_NORMAL_ARRAY);glDisableClientState(GL_TEXTURE_COORD_ARRAY);glBindBuffer(GL_ARRAY_BUFFER, 0);shader->disable();};This code looks fine to me.I'm sending the tangents and binormals as 3d tex coords and they are read in the shader like this:vec3 rm_Tangent = vec3(gl_MultiTexCoord1);vec3 rm_Binormal = vec3(gl_MultiTexCoord2);and passed to frag as a varying variable.Thank you for looking through this long post.EDIT:Posted image links.   
  stop reusing old attributes!define your own, it makes the code soooo much easier to follow, and while this might not solve your problem its better coding practise..   ;  I discovered something really weird.In this case,The tex coord 1 set works, and the 2nd set doesn'tglActiveTexture(GL_TEXTURE0);glBindTexture(GL_TEXTURE_2D, groups.mat->TexID);glActiveTexture(GL_TEXTURE1);glBindTexture(GL_TEXTURE_2D, groups.mat->BumpID);shader->sendUniform(shader->getUniformLocation("BaseMap"), 0);shader->sendUniform(shader->getUniformLocation("BumpMap"), 1);glVertexPointer(3, GL_FLOAT, 0, BUFFER_OFFSET(0));glNormalPointer(GL_FLOAT, 0, BUFFER_OFFSET(numFaces*9*sizeof(float)));glClientActiveTexture(GL_TEXTURE0);glTexCoordPointer(2, GL_FLOAT, 0, BUFFER_OFFSET(2*numFaces*9*sizeof(float)));glClientActiveTexture(GL_TEXTURE2);glTexCoordPointer(3, GL_FLOAT, 0, BUFFER_OFFSET((3*numFaces*9*sizeof(float))+(numFaces*6*sizeof(float))));glClientActiveTexture(GL_TEXTURE1);glTexCoordPointer(3, GL_FLOAT, 0, BUFFER_OFFSET((2*numFaces*9*sizeof(float))+(numFaces*6*sizeof(float))));and in the case the opposite is true:glActiveTexture(GL_TEXTURE0);glBindTexture(GL_TEXTURE_2D, groups.mat->TexID);glActiveTexture(GL_TEXTURE1);glBindTexture(GL_TEXTURE_2D, groups.mat->BumpID);shader->sendUniform(shader->getUniformLocation("BaseMap"), 0);shader->sendUniform(shader->getUniformLocation("BumpMap"), 1);glVertexPointer(3, GL_FLOAT, 0, BUFFER_OFFSET(0));glNormalPointer(GL_FLOAT, 0, BUFFER_OFFSET(numFaces*9*sizeof(float)));glClientActiveTexture(GL_TEXTURE0);glTexCoordPointer(2, GL_FLOAT, 0, BUFFER_OFFSET(2*numFaces*9*sizeof(float)));glClientActiveTexture(GL_TEXTURE1);glTexCoordPointer(3, GL_FLOAT, 0, BUFFER_OFFSET((2*numFaces*9*sizeof(float))+(numFaces*6*sizeof(float))));glClientActiveTexture(GL_TEXTURE2);glTexCoordPointer(3, GL_FLOAT, 0, BUFFER_OFFSET((3*numFaces*9*sizeof(float))+(numFaces*6*sizeof(float))));The set that is pointed to AFTER the first works and the one before doesn't.This is only true for the GL_TEXTURE1 and GL_TEXTURE2 ones....everything else is fine.!!!!!!I'm just totally confused now.   ;  I forgot to log in, but it's really me.   