I want to render two neighor planes be joined on one border.Both planes are textured using texture mapping with the same parameter. when the code is excuted,there is a black line on the joined border between the textured planes.
my question is :how to eliminate the black line.
my code is :
glGenTextures(2,texture_objects);
glBindTexture(GL_TEXTURE_2D, texture_objects[0]);
glTexImage2D(GL_TEXTURE_2D,0,3,widthleft,heightleft,0,GL_BGR_EXT,GL_UNSIGNED_BYTE,BitmapBitsLeft);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR );
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR );
//glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE GL_DECAL);
glBindTexture(GL_TEXTURE_2D, texture_objects[1] );
glTexImage2D(GL_TEXTURE_2D,0,3,widthback,heightback,0,GL_BGR_EXT,GL_UNSIGNED_BYTE,BitmapBitsBack);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR );
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR );
glBindTexture(GL_TEXTURE_2D, texture_objects[0]);
glBegin(GL_POLYGON);
glTexCoord2f(0,0);
glVertex3f(m_vertices[5].x,m_vertices[5].y,m_vertices[5].z);
glTexCoord2f(0,1);
glVertex3f(m_vertices[11].x,m_vertices[11].y,m_vertices[11].z);
glTexCoord2f(1,1);
glVertex3f(m_vertices[7].x,m_vertices[7].y,m_vertices[7].z);
glTexCoord2f(1,0);
glVertex3i(m_vertices[1].x,m_vertices[1].y,m_vertices[1].z);
glEnd( );
glBindTexture(GL_TEXTURE_2D, texture_objects[1] );
glBegin(GL_POLYGON);
glTexCoord2f(0,0);
glVertex3f(m_vertices[2].x,m_vertices[2].y,m_vertices[2].z);
glTexCoord2f(1,0);
glVertex3f(m_vertices[1].x,m_vertices[1].y,m_vertices[1].z);
glTexCoord2f(1,1);
glVertex3f(m_vertices[7].x,m_vertices[7].y,m_vertices[7].z);
glTexCoord2f(0,1);
glVertex3f(m_vertices[8].x,m_vertices[8].y,m_vertices[8].z);
glEnd( );
glDeleteTextures(2,texture_objects);