Ok, this surely is one of those stupid newbie questions but after having read all kinds of documents on terrain rendering I’ve got an idea how to do LOD geometry and all kinds of other stuff but the thing that stumps me is texturing large terrains.
Of course you could go for one big texture that you “drape” over your terrain either with or without a high-detail “noise texture”, but that’s not what I’m looking for.
What I want is a tile-based terrain where each tile can have its own texture. The problem that I have is that the only way to render this I can think of is also the slowest:
so far I used plain GL_TRIANGLES and bound the correct the correct texture to each triangle. This works of course and putting everything in a display list speeds thing up as well, but…
it is too slow!
Switching to just one big texture and rendering the terrain as one big triangle strip speeds things up immensely. Using vertex arrays manages to squeeze out even more Fps.
But I just can’t think of any way of using the speed I get with triangle strips / vertex arrays with the ability to choose a separate texture for each triangle.
I must be overlooking a possibility somewhere. Anybody feel like pointing me in the right direction?
PS: While writing this I suddenly thought of a possibility: maybe I could use one big texture that contains a whole lot of smaller textures and then use the texture coordinates to select the (sub)texture I want to render? Of course this still leaves triangle strips out but at least I could use vertex arrays or even vertex objects which I assume are still quite a bit faster than a bunch of glVertex calls each frame.