1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, GLScene, GLObjects, GLMisc, GLWin32Viewer, StdCtrls;
type TForm1 = class(TForm) GLSceneViewer1: TGLSceneViewer; GLScene1: TGLScene; GLCamera1: TGLCamera; Cube1: TCube; GLLightSource1: TGLLightSource; Label1: TLabel; procedure GLSceneViewer1Click(Sender: TObject); private { Private-Deklarationen } public { Public-Deklarationen } end;
var Form1: TForm1; Box : array[1..10] of TCube;
implementation
{$R *.DFM}
procedure TForm1.GLSceneViewer1Click(Sender: TObject); var i : integer; begin for i := 1 to 10 do begin Box[i] := TCube.Create(GLScene1); Box[i].NewInstance; Box[i].Position.X := i*2; end; end;
end. |