Hi Thaddy,
I would prefer your "second option", indeed.
In my edited code now, without "Parent := Panel2;" the right Cube does not appear.
Looks like "OpenGLcube:= TOpenGLcube.Create(Panel2)" does only set the owner, but not the parent (under Windows.. ?)
// manually create the SECOND OpenGL object :
//OpenGLcube:= TOpenGLcube.Create(Self);
OpenGLcube:= TOpenGLcube.Create(Panel2);
with OpenGLcube do begin
Name := 'OpenGLcube';
Align := alClient;
//Parent := Panel2;
AutoResizeViewport:= true;
And a remark (for people reading this):
it is not required to put the TOpenGLControl onto a panel,
TOpenGLControl itself is a Object with width and height.
But I wanted to put it onto a panel, in
my future use not with Align:= alClient but with fixed dimensions ..