Original Post
I need to texture the whole window (win_w,win_h). But My textured Quad have some artifacts with some portion of the texture having pattern of previously block of the texture. The following is the my texture mapping code.
glPushMatrix();
glLoadIdentity();
// Reset The View
glTranslatef(0.0f,0.0f,0.0f);
// Bind the texture to the polygons
glBindTexture( GL_TEXTURE_RECTANGLE_NV, texture[currenttexture]);
glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0);glVertex2f(0.0, 0.0);
glTexCoord2f(win_w, 0.0);glVertex2f(win_w, 0.0);
glTexCoord2f(win_w, win_h);glVertex2f(win_w, win_h);
glTexCoord2f(0.0, win_h);glVertex2f(0.0, win_h);
glEnd();
Any suggestions. Thanks in advance.
