Tiled Textures

Hello,

when I’m scaling a Block or something that is Texturemapped, OpenGL stretch the Picture. Is there a way to tile it?

Sorry for my bad english, I hope you could understand my problem.

You have to change the texture coordinates.

You can scale the texture matrix the same way you scale the object.

glMatrixMode(GL_MODELVIEW);
glScale(S, S, S);
glMatrixMode(GL_TEXTURE);
glScale(S, S, S);

[This message has been edited by Bob (edited 06-05-2001).]

glTexParamteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT)
glTexParamteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_t,GL_REPEAT)
that should tile your texture instead of stretching it. you have to set your texture coordinates larger than 1.0 e.g. if you set them 0.0-5.0 the texture will be repated 5 times

Chris