Original Post
I'm texture mapping a quad with an image, but if the quad is distorted the texture map goes like this, see image below:
http://tim.fxhome.com/distortedTexture.jpg
Is there any way to get rid of the kinks in the image and make it smooth??
I'm making my textures like this
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA8, texImage[textureID].sizeX, texImage[textureID].sizeY, GL_RGBA, GL_UNSIGNED_BYTE, texImage[textureID].data);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
gluBuild2DMipmaps is used as the texture isn't of the size 2^n x 2^m
and drawing the QUAD like this...
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex2f(point1x, point1y);
glTexCoord2f(0.0f, 1.0f); glVertex2f(point2x, point2y);
glTexCoord2f(1.0f, 1.0f); glVertex2f(point3x, point3y);
glTexCoord2f(1.0f, 0.0f); glVertex2f(point4x, point4y);
glEnd();
Would NURBS surfaces be the way to go??
Any advice would be gratefully received
Thank you,
- Tim
[edited by - timbuk2 on January 3, 2004 7:37:16 AM]