- Procedure Draw;
- Var
- VertexList : array of TVector3f;
- x,y,c : integer;
- begin
- C := 0;
- SetLength(VertexList,NumOfVertexs); //NumOfVertexs = Amount in Vertexs array, we set it to the max amount since setting it over and over will cause lag
- for x := 0 to NumOfFaces-1 do
- If Face[x].Draw then
- for y := Face[x].VertexStart to Face[x].VertexStart+Face[x].NumOfVerts-1 do
- begin
- VertexList[c] := Vertexs[y];
- inc(c);
- end;
- Pass VertexList to array with c as the count
- ...
- Etc
- end;