Texture Coordinate Generation

I have a smiley-face texture that I want to map onto a sphere. Is there a way to make the texture map only appear once on the surface of a sphere instead of tiling across its surface several times? Thanks in advance for the help…

EDIT: I just realized after further experimentation that sphere-mapping the texture kind of works, but of course it distorts it and can’t be the final solution…

[This message has been edited by Tokage (edited 01-25-2003).]

Don’t use texcoords outside of the 0-1 range, and set the glTexParameter GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T to GL_CLAMP and you should get no tiling.

There are two basic types of sphere geometry. One is like a football (soccer), with hexagonal grids made up of smaller triangles. The other is like the latitude and longitude lines on the globe. You will get different texture results depending on how your sphere’s geometry is made up. Experiment with the two different types of geometry to get the results you want.