optimization terrain engine

I have 2 solution filling 3 matrix (texcoord,color and vertex)
with a loop 70*70 max
and drawing all the terrain with glDrawArrays( GL_QUADS_STRIP

or I do it basicaly (so I put in the loop glColor,glVertex,glTexCoord …)

what is the faster solution ??
(what about the pipeline )

Draw elements is quicker than draw arrays - you can index into your vertex set and won’t be sending quite so much data down the tube (like shared vertices).

ok thanks

and what is the best solution in order to have different texture for the ground like grass, rocks, sand etc ?
and there motions like grass to snow for example
and is it faster to use triangles or quads
(I am displaying the terrain with array)
thanks !!

[This message has been edited by IronRaph (edited 06-07-2002).]

take a look at the emplementations at www.vterrain.org and there are some different examples. what is the “best” entireley depends on what you want for your end result and the hardware. Multitexture is fast, popular, and reasonably easy to do. Large phototextures such as arial photographs are very easy, but work best on the new Nvidia cards with faster texture support (otherwise the large textures slow down your app). Texture paging is a pain in the … err… backside, and I would not recommend it until you are ready for it, and need it. You could probably using some blending options with shaders for some interesting effects, but I haven’t tried anything like that yet (though have debated on it recently).

Good luck!

thanks for textures I found the ultimate solution )
and it is strange but it is faster sur send 2 triangles than 1 quad