Hi Robert! Welcome back
To change to which component will Asphyre Sphinx 3 render you need to use code similar like this:
I quickly modified code of the Basic example which comes with Asphyre Sphinx 3 so that it renders to Panel1 instead of directly rendering to the MainForm. I have left original code lines as comens so you can easily see what was changed and how.
Code:
procedure TMainForm.OnDeviceInit(Sender: TObject; Param: Pointer;
var Handled: Boolean);
begin
//DisplaySize:= Point2px(ClientWidth, ClientHeight);
DisplaySize:= Point2px(Panel1.ClientWidth, Panel1.ClientHeight);
//GameDevice.SwapChains.Add(Self.Handle, DisplaySize);
GameDevice.SwapChains.Add(Panel1.Handle, DisplaySize);
end;
Bookmarks