Autor Beitrag
Niels_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 117



BeitragVerfasst: Mi 08.06.05 12:30 
Hallo - ich erstelle runtim ein TGLcube, das dann ein Child bekommt - ebenfalls ein TGLcube. Ein Tut sagt folgendes:

ausblenden Delphi-Quelltext
1:
Object2 := lObject.AddNewChild(TGLcube);					


(glscenehelp.sourcefo...ntimeObjectCreation)

jedoch bekomme ich, dass TGLcube nicht mit GTLBaseSceneObject kompatibel ist...
Weiß jedoch nicht, was ich falsch mache. Wenn ich das 2. Object normal create, und dann sage, dass es als Parent das object1 hat, kommen zwar keine Fehler, es geht jedoch nich :(

Desweiteren wundert mich, dass das tut ebenfalls sagt, man solle Object1 so erstellen:
ausblenden Delphi-Quelltext
1:
Object1 := GLScene.Objects.AddNewChild(TGLCube);					

was ebenfalls den gleichen Fehler hervorbringt!

Kann mir da jemand helfen?! Thx.
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 09.06.05 11:51 
Hi,

versuchs mal so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var Object1 :TGLCube;
    Object2 :TGLcube;
begin
  Object1 := GLScene2.Objects.AddNewChild(TGLCube) as TGLCube;
  Object2 := Object1.AddNewChild(TGLCube) as TGLCube;
end;


Gruß, jjturbo

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...