Original Post
I wrote a basic terrain engine that initially just used immediate mode functions over and over in a loop to render the terrain: it called glVertex3f(...) etc. to draw a number of triangle fans. I can get about 6.5 MTris/sec. I rewrote the engine to use indexed vertex arrays (uses glDrawElements to render) and it could only manage like 2.5 MTris/sec!?! I did another rewrite to have it use compiled vertex arrays and that got me up to maybe 3-3.5, but that is still terrible. Why is this slower?? I thought immediate mode functions were the slowest by far... The arrays are pretty big: 800k or so for the vertex and texture coord arrays each, and a couple megs for the index array (this is at maximum terrain size of about 130,000 triangles) Could the slowdown be a result of a constant need for data copying? I thought using compiled vertex arrays was supposed to take care of that. Anyone have any thoughts on what could be causing the problem? And what are my options? I thought indexed arrays was about the only way to go because otherwise I would start hogging tons of memory. Any help would be appreciated!!