| 1 | # Multiple Windows and Viewports Demo |
| 2 | |
| 3 | Demo of using the same 3D world inside 4 viewports, in 2 windows (containers). |
| 4 | |
| 5 | Technically this means that we have |
| 6 | - 1x TCastleRootTransform |
| 7 | - that is referenced by 4x instances of TCastleViewport, in TCastleViewport.Items |
| 8 | - we have 2x TCastleWindow. |
| 9 | |
| 10 | Each window corresponds to 1 TCastleContainer (so we have 2x TCastleContainer) in the application. |
| 11 | |
| 12 | Each window contains 2x TCastleViewport. |
| 13 | |
| 14 | Walk using AWSD - and note that it affects the navigation in the viewport under mouse. |
| 15 | |
| 16 | Drop physical box using Enter key. |
| 17 | |
| 18 |  |
| 19 | |
| 20 | Using [Castle Game Engine](https://castle-engine.io/). |
| 21 | |
| 22 | ## Building |
| 23 | |
| 24 | Compile by: |
| 25 | |
| 26 | - [CGE editor](https://castle-engine.io/editor). Just use menu items _"Compile"_ or _"Compile And Run"_. |
| 27 | |
| 28 | - Or use [CGE command-line build tool](https://castle-engine.io/build_tool). Run `castle-engine compile` in this directory. |
| 29 | |
| 30 | - Or use [Lazarus](https://www.lazarus-ide.org/). Open in Lazarus `multiple_windows_and_viewports_standalone.lpi` file and compile / run from Lazarus. Make sure to first register [CGE Lazarus packages](https://castle-engine.io/lazarus). |
| 31 | |
| 32 | - Or use [Delphi](https://www.embarcadero.com/products/Delphi). Open in Delphi `multiple_windows_and_viewports_standalone.dproj` file and compile / run from Delphi. See [CGE and Delphi](https://castle-engine.io/delphi) documentation for details. |