Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: optimization terrain engine

  1. #1
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    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 )
    thanks
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jul 2001
    Posts
    533

    Re: optimization terrain engine

    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).

  3. #3
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    Re: optimization terrain engine

    ok thanks
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

  4. #4
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    Re: optimization terrain engine

    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).]
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

  5. #5
    Intern Contributor
    Join Date
    Jun 2002
    Location
    Alamogordo, NM USA
    Posts
    67

    Re: optimization terrain engine

    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!
    Japanese Proverb: "Talk about things of tomorrow and the mice in the ceiling laugh."

  6. #6
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    Re: optimization terrain engine

    thanks for textures I found the ultimate solution )
    and it is strange but it is faster sur send 2 triangles than 1 quad
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •