Hi guys.
Sorry for my english.I don’t speak it as well as i wish.
My question is about texturing.I’ve write a program to show a few figures in 3D like spheres, torus,cube,etc, all made by triangles.
When i try to texture them, the image is repeated in every triangle, so i can’t see it well. I have tried to texture the whole figure with one time image but i don’t know how.I have read the Red Book but i can’t find any solution.Is it posible?Any idea?
I use
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, nTextureWidth, nTextureHeight, GL_BGR_EXT, GL_UNSIGNED_BYTE, pBitmapData);
to create the texture,and
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_2D);
to texture the figure.
Thanks in advance.