GL_TRIANGLE_STRIP Algorithms anyone??
i am looking for a nice generic piece of code to render terrain using GL_TRIANGLE_STRIPS. for instance if you have an array of structs, each member of the struct contains an x , y , z coordinate and i store them into this array of structs what would be a good way of using glVertex3f to draw the terrain using the above mentioned? .. thanks so much in advance?
oh yeah here is my problem. i have some data, 204*100;
in mydata for example i have stored all the info. the first element would be..
myData.x, myData.y, myData.depth.
where 0 goes from 0 - (204*100); i would like to use GL_TRIANGLE_STRIPS to draw them out.. thanks you guys so much in advance!
Re: GL_TRIANGLE_STRIP Algorithms anyone??
If the x, and y coordinates are organized on a grid you can march up and down the columns adding the corners of each row to the vertex list.
You may have better luck using indexes, and the corresponding functions.
If it's not on a regular grid then, you need to try to planarize the graph. Then try to convert the planar graph to psuedo-grid coordinates. Then march up and down the pseudo-grid columns.