Original Post
Hi,
I''m having a problem with large textures (larger than 256*256). What I do to handle them is breaking them up into smaller squares (let''s say two squares of 256*256 for a 512*256 texture). I then render them in two contiguous separate quads. Them problem is a the quad junction -> there is a visible dirty vertical line.
I''m rendering the quads the following way:
glBindTexture(GL_TEXTURE_2D, texture[0]);
glBegin(GL_QUADS);
// square 1
glTexCoord2f(0.0f, 0.0f); glVertex3f(-2.0f, -1.0f, 0.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 0.0f, -1.0f, 0.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 0.0f, 1.0f, 0.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-2.0f, 1.0f, 0.0f);
glEnd();
glBindTexture(GL_TEXTURE_2D, texture[1]);
glBegin(GL_QUADS);
// square 2
glTexCoord2f(0.0f, 0.0f); glVertex3f( 0.0f, -1.0f, 0.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 2.0f, -1.0f, 0.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 2.0f, 1.0f, 0.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f( 0.0f, 1.0f, 0.0f);
glEnd();
How can I get rid of the junction problem ?
Thanks,
Fred.