// in unit 2
uses ....,
opengl,.....;
var From2 : TForm2;
_Mesh_Mode : Cardinal = GL_POINTS;
implementation
uses unit1;
procedure TForm2.ComboBox1Change(Sender: TObject);
begin
case ComboBox1.ItemIndex
of
0:_Mesh_Mode := GL_POINTS;
1:_Mesh_Mode := GL_LINES;
2:_Mesh_Mode := GL_LINE_STRIP;
3:_Mesh_Mode := GL_LINE_LOOP;
4:_Mesh_Mode := GL_TRIANGLES;
5:_Mesh_Mode := GL_TRIANGLE_STRIP;
6:_Mesh_Mode := GL_TRIANGLE_FAN;
7:_Mesh_Mode := GL_QUADS;
8:_Mesh_Mode := GL_QUAD_STRIP;
9:_Mesh_Mode := GL_POLYGON;
end;
end;
// in unit1
procedure tform1.pointlist;
var
i: integer;
begin
glBegin(_Mesh_Mode);
//(stringreplace(templist[1],'.',',',[rfReplaceAll]))
for i:=0
to numofpoints
do
begin
templist.DelimitedText:=finalpoint[i];
glcolor3f(r,g,b);
glloadname(Punkt);
//neu
glvertex3f(tpointlist[i,1],tpointlist[i,2],tpointlist[i,0]);
//glvertex3f(tpointlist[i,2],tpointlist[i,3],tpointlist[i,1]);
//glvertex3f(strtofloat(templist[2]),strtofloat(templist[3]),strtofloat(templist[1]));
end;
glend;
end;