tags:

views:

307

answers:

1

For a class assignment I want have a very simple demo with an Glut (glutSolidTeapot ) rendered with one texture.

When I do this the texture will map several times in the teapot as if it had several faces. This maybe ok for most common OpenGL usage but in my case I would like the texture to stretch all over the object (i.e. only one big image/texture all over it)

I have try GL_REPEAT, GL_LAMP... but no changes.

+1  A: 

You have to provide texture coordinates that range from zero to one. I think, on the good old OpenGL teapot, there are generated texture coordinates, that repeat themself. It's not possible to cover the teapot without repetition when using these repeating coordinates.

Nikolai Ruhe
so only providing it to the texture and later applying it?
Jordi
I'm sorry, I don't understand your question. What I mean is that you have to provide proper texture coordinates when sending you geometry.
Nikolai Ruhe
Jordi, if Nikolai is right then it's not an openGL problem, but a mesh problem. The teapot is made up of lots of triangles, and those triangles have been set to have texture coordinates from 0 and 1. What you want is a teapot mesh that has the range across the whole teapot, so it's individual tris only go from say 0.33 to 0.4 etc. Therefore you'll need to edit to model somehow. Though last time I used the OGL teapot, I'm sure the TC were across the whole model, rather than 0 to 1 for each triangle...
Pod