PDA

View Full Version : optimization terrain engine



IronRaph
06-06-2002, 06:24 AM
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 )
thanks

Robbo
06-06-2002, 08:07 AM
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).

IronRaph
06-07-2002, 09:45 AM
ok thanks http://www.opengl.org/discussion_boards/ubb/wink.gif

IronRaph
06-07-2002, 02:04 PM
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).]

Jeffry J Brickley
06-08-2002, 07:15 PM
take a look at the emplementations at www.vterrain.org (http://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!

IronRaph
06-09-2002, 08:40 AM
thanks for textures I found the ultimate solution http://www.opengl.org/discussion_boards/ubb/wink.gif)
and it is strange but it is faster sur send 2 triangles than 1 quad