Jump to content
  • Advertisement
Sign in to follow this  
iliak

Sub texture repeat

This topic is 3635 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

Hi How can I repeat a portion of my texture (horizontaly and verticaly) like GL_REPEAT ? I want tiling a sub rectangle of my texture on the screen.

Share this post


Link to post
Share on other sites
Advertisement
Since you cannot simply tile by adjusting the UV texture coordinates you are going to have to draw a series of quads each textured with the exact portion of the texture you want to tile.

Share this post


Link to post
Share on other sites
I limit the rendering with glscissor() and manualy tile the texture...
Not so bad, until someone have a better idea ...

Thanks.

Share this post


Link to post
Share on other sites
The shader solution would be nice, but in my project, I dont use shader.
But I keep the solution in a corner of my head, thanks :)

Share this post


Link to post
Share on other sites
Quote:
Original post by iliak
The shader solution would be nice, but in my project, I dont use shader.
But I keep the solution in a corner of my head, thanks :)


Ok. You could also render the part of the texture you want to tile into a new texture and use that one. Should be reasonable fast too (depending on your hardware of course...)


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!