Help me about 3D polyline in OpenGL

Hi all,

I am OpenGL beginner and my English is not good. I have exported a DEM file to my own xyz file format that contains huge number of xyz polylines. I would like to use OpenGL to display them. I am OpenGL beginner so that I do not know where I should begin.

If you can help me, Please mail me thanhnt@zapo.net.

Thank you in advance.

Hi,

okay, if I get it right you have a number of points (x, y, z). What I would try first is to load the data into a list. From there I would setup a second list from where you index the order of vertices to draw.

so if you draw it would be like that:

  1. Horizontal lines

.—.—.—.
.—.—.—.
.—.—.—.
.—.—.—.

  1. Vertical lines

I—I—I—I
I—I—I—I
I—I—I—I
I—I—I—I

  1. Display

But first of all you might want to try with a smaller grid. If it works for one grid and a second bigger grid, it will work for all grids!

Greets,

Martin

Thank you for your helps
Thanh