PDA

View Full Version : VBO's and texture tiling: possible ?



Alessandro_dup1
09-28-2005, 07:58 AM
Hi, i used to have a terrain engine built on a heightmap. In order to have quite some detail, i decided not to apply a single texture, but to have 64 tiled textures. According to current x and y terrain coordinates, the corresponding texture is bind.

Decided to move to VBO's, to enhance performances. As i understood it, geometry is loaded at init time in the buffer object and rendered later. So what i can do is just apply a unique large texture. No more texture tiling ...

Is this correct or there is a way to have texture tiling with VBO's ?

Thanks for any help and/or clarification

Jackis
09-28-2005, 08:50 AM
You can use one VBO for all patches, but when drawing, you switch textures and you make offset in FBO. It's the most optimal way in your situation, I hope.

Alessandro_dup1
09-30-2005, 07:30 AM
Hi Jackis, what do you mean by

and you make offset in FBO

dronus
09-30-2005, 09:14 AM
i dont know what command you use for actually drawing the data
for example, glDrawElements provides a form where it takes index numbers, limiting the range of verticies and faces drawn. there are arguments called count and buffer_offset if i remember right. buffer_offset can be set to something other than zero to begin drawing with a latter element of your array. so you build only one large vertex array, but draw it in several passes each time selecting an other texture and cutting the wantend "slice" of faces of your array by setting buffer_offset and count apropriate. thats what i think Jackis meant with "offset".

hope this helpes,
Paul

Jackis
10-01-2005, 01:43 AM
Alessandro
I mean "VBO", not "FBO", that was a misprint )))
Thanks go to dronus, he explained more concretely, what I was talking about.