Archived

This topic is now archived and is closed to further replies.

ogl

texture mapping

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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);

Share this post


Link to post
Share on other sites