| 1 | # Basic Application To View 3D Model |
| 2 | |
| 3 | Demo how to load and render a 3D model. This is just a single program source file (`view_3d_model_basic.dpr`). |
| 4 | |
| 5 | This presents the simplest code that manually sets up |
| 6 | |
| 7 | - TCastleWindow (window where Castle Game Engine can work) |
| 8 | - TCastleViewport |
| 9 | - TCastleScene |
| 10 | |
| 11 | If you want to create a 3D viewer application yourself, we highly recommend starting from the Castle Game Engine editor _"New Project -> 3D Model Viewer"_ template, and thus have something cross-platform and with a UI designed in CGE editor. This demo presents a different approach, more manual, just to show that we can: this example is *not* designed using CGE editor. |
| 12 | |
| 13 | Using [Castle Game Engine](https://castle-engine.io/). |
| 14 | |
| 15 | ## Building |
| 16 | |
| 17 | Compile by: |
| 18 | |
| 19 | - [CGE editor](https://castle-engine.io/editor). Just use menu items _"Compile"_ or _"Compile And Run"_. |
| 20 | |
| 21 | - Or use [CGE command-line build tool](https://castle-engine.io/build_tool). Run `castle-engine compile` in this directory. |
| 22 | |
| 23 | - Or use [Lazarus](https://www.lazarus-ide.org/). Open in Lazarus `cars_demo_standalone.lpi` file and compile / run from Lazarus. Make sure to first register [CGE Lazarus packages](https://castle-engine.io/lazarus). |