texture mapping

Started by
3 comments, last by ogl 22 years, 5 months ago
I''m trying to texture map walls of a room (just a box shaped) using a brick texture 256x256 but lose the pattern of the bricks as it is stretched- is there a way to preserve the detail? cheers
Advertisement
Tile the texture (set tex-coords > 1) or if you want to preserve the image as a whole, try altering your AOV via the perspective function.
Use Mip-Mapping to prevent this.
quote:Original post by wAVaRiaN
Tile the texture (set tex-coords > 1) or if you want to preserve the image as a whole, try altering your AOV via the perspective function.


I think I need to tile the texture - how do I set the texture coordinate to >1?
quote:Original post by ogl
I think I need to tile the texture - how do I set the texture coordinate to >1?


Just give a number greater than 1.0 to glTexCoord2f(...). Just make sure sure warp modes are set to GL_REPEAT before applying the texture :

glTexParameteri( GL_TEXTURE_2D, GL_WARP_S, GL_REPEAT);
glTexParameteri( GL_TEXTURE_2D, GL_WARP_T, GL_REPEAT);

This topic is closed to new replies.

Advertisement