- TVertex Vert[10*((10+1)*2)]//pro quad werden 2 weitere punkte benötigt und es sind 2 startpunkte zusätzlich notwendig
- int ind=0;
- for (int x=0;x<10;x++)
- {
- for (int y=0;y<10;y++)
- {
- Vert[ind]=Vertex(x,GetHeight(x,y),y);
- ind++;
- Vert[ind]=Vertex(x+1,GetHeight(x+1,y),y);
- ind++
- }
- Vert[ind]=Vertex(x,GetHeight(x,y+1),y+1);
- ind++;
- Vert[ind]=Vertex(x+1,GetHeight(x+1,y+1),y+1);
- }
- for (int x=0;x<10;x++)
- {
- glBegin(GL_TRIANGLE_STRIP);
- for (int i=x*22;i<(x+1)*22;i++)
- glVertexf(Vert[i].x,Vert[i].y,Vert[i].z);
- glEnd();
- }