Coop
05-16-2002, 01:46 AM
Hi
In my terrain renderer I split vertex data into 2 streams:
first stream with height only (1 word - GL_SHORT)
second stream with x,z coordinates (2 words).
I combine these 2 streams into vertex position in a vertex program. The gain is that I can reuse second stream in all terrain blocks (terrain is divided into 32x32 blocks).
Everything works fine unless I use vertex array range extension. The height stream (the one with one word) works like it gets only the first word in the stream, so all vertices in the block get height of the first vertex. The stream stride is 2 but according to var specs there's no stride or pointer alignment restriction on GeForce3 with recent drivers (I've got both).
Has anyone had similar problems or know any solution? Maybe I'm doing something wrong with stream setup, but the strange thing is that everything works fine without var.
Thanks in advance
coop
In my terrain renderer I split vertex data into 2 streams:
first stream with height only (1 word - GL_SHORT)
second stream with x,z coordinates (2 words).
I combine these 2 streams into vertex position in a vertex program. The gain is that I can reuse second stream in all terrain blocks (terrain is divided into 32x32 blocks).
Everything works fine unless I use vertex array range extension. The height stream (the one with one word) works like it gets only the first word in the stream, so all vertices in the block get height of the first vertex. The stream stride is 2 but according to var specs there's no stride or pointer alignment restriction on GeForce3 with recent drivers (I've got both).
Has anyone had similar problems or know any solution? Maybe I'm doing something wrong with stream setup, but the strange thing is that everything works fine without var.
Thanks in advance
coop