Structural
01-09-2003, 12:05 AM
I have never in my life used a quad or triangle strip so I was wondering how and which one I should use for a terrain/ripple like shape.
My idea is to make a 2D grid array that represents the height of the terrain at a certain gridpoint.
Example:
int a[][] = {
{ 0, 1, 0, 1, 0 },
{ 1, 0, 0, 0, 1 },
{ 1, 0, 0, 0, 1 },
{ 1, 0, 0, 0, 1 },
{ 0, 1, 1, 1, 0 }
};
I was actually thinking that a QUAD strip would cause convex (if that's the right word for it, QUAD with non-coplanar points) quads and would mess up the view.
On the other hand I believe that the triangle solution would give problems with the order of giving the vertices to OGL. The order of giving the tri's to OGL should be different in the corners of the terrain.
In my book (OpenGL game programming) I have also read a bit about NURBS and curved surfaces. Would this be an option for rendering this? I don't want this to effect framerate too much so I'm having doubts
(plus I don't have a clue if this is physically possible with NURBS/curved surfaces).
Any help/tips would be very appreciated.
Thanks!
My idea is to make a 2D grid array that represents the height of the terrain at a certain gridpoint.
Example:
int a[][] = {
{ 0, 1, 0, 1, 0 },
{ 1, 0, 0, 0, 1 },
{ 1, 0, 0, 0, 1 },
{ 1, 0, 0, 0, 1 },
{ 0, 1, 1, 1, 0 }
};
I was actually thinking that a QUAD strip would cause convex (if that's the right word for it, QUAD with non-coplanar points) quads and would mess up the view.
On the other hand I believe that the triangle solution would give problems with the order of giving the vertices to OGL. The order of giving the tri's to OGL should be different in the corners of the terrain.
In my book (OpenGL game programming) I have also read a bit about NURBS and curved surfaces. Would this be an option for rendering this? I don't want this to effect framerate too much so I'm having doubts
(plus I don't have a clue if this is physically possible with NURBS/curved surfaces).
Any help/tips would be very appreciated.
Thanks!