If you have processed your triangle data to match the order as expected by strips, then use GL_TRIANGLE_STRIP otherwise use GL_TRIANGLES. this is irrespective of vertex array usage.
neogl
vertex array example
You need to seperate your data filling from your drawing calls.
Fill your vertex list first, then afterwards call your draw routines.
I don''t think you can just make one call to DrawArray unless you''ve set things up correctly, which I don''t think you''ve done. Look into glArrayElement() (I think) to actually do the "drawing" part for you. hint: you''ll need to have 256 triangle strips. think of these as being along either y or x. each would have 512(?) vertices, sorta "stitching" two columns together back and forth...
Fill your vertex list first, then afterwards call your draw routines.
I don''t think you can just make one call to DrawArray unless you''ve set things up correctly, which I don''t think you''ve done. Look into glArrayElement() (I think) to actually do the "drawing" part for you. hint: you''ll need to have 256 triangle strips. think of these as being along either y or x. each would have 512(?) vertices, sorta "stitching" two columns together back and forth...
i got it to work, i studied a nice example at www.prima-tech.com and now everything works just fine. Now the terrain engine performs really fast, almost 85fps, previously only at 45 !
Thanks to you all !!!
glHorizon_Project

www.web-discovery.net
Thanks to you all !!!
glHorizon_Project

www.web-discovery.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement