PDA

View Full Version : Texture mapping problems



HellRaiZer
11-23-2001, 01:43 AM
Hello to everyone.
I have a little problem with texture mapping in big surfaces.Imagine a 40x40 square. Imagine a 128x128 texture. If you want to make the texture look like real (e.g. grass)you have to repeat the texture many times on the square. The problem is that when i specify big values for s and t coordinates the texture seems corrupted and uncontinued. It is not what i want. Is there anyone who had the same problem and can help me. There is no big problem when i specify the values manualy but there is a big problem when i load a model that has big s & t values. Thanks.

HellRaiZer

Inquisitor
11-23-2001, 06:13 AM
Sounds like you didn't activate texture-repeating for your textures. Insert these lines before your glTexImage2D-call.



glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL _REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL _REPEAT);