Sub texture repeat

Started by
4 comments, last by Rattenhirn 15 years, 5 months ago
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.
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
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.
I limit the rendering with glscissor() and manualy tile the texture...
Not so bad, until someone have a better idea ...

Thanks.
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
Use a shader.
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 :)
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
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...)


This topic is closed to new replies.

Advertisement