Jump to content
  • Advertisement

Archived

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

ogl

texture mapping

This topic is 6085 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!