- // Was soll im Panel gerendert werden?
- procedure TForm1.Render_Viewport1;
- begin
- glClear(GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT);
- glLoadIdentity;
- glTranslatef(0.0, 0.0, -10);
-
- glBegin(GL_Lines);
- glColor3f(1,1,1);
- glVertex3f(Punkt[1].x, Punkt[1].y, Punkt[1].z);
- glVertex3f(Punkt[2].x, Punkt[2].y, Punkt[2].z);
- glEnd;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- var i,j:Integer;
- begin
- ...
- //Versuch zu zeichnen!!!
- with StringGrid1 DO Begin
- Punkt[1].x := StrToFloat(Cells[1,1]);
- Punkt[1].y := StrToFloat(Cells[2,1]);
- Punkt[1].z := StrToFloat(Cells[3,1]);
- Punkt[2].x := StrToFloat(Cells[4,1]);
- Punkt[2].y := StrToFloat(Cells[5,1]);
- Punkt[2].z := StrToFloat(Cells[6,1]);
- end;
- end;