This example shows using Castle Game Engine API with C++ Builder and TCastleWindow.
This allows to write a cross-platform applications using C++ language, and have a window that is completely rendered using Castle Game Engine. This is great if you want to create a complete application using Castle Game Engine for everything, including the window and user interface, and you want to use C++ language.
Just as with the sibling example, examples/delphi/cpp_builder/fmx: The full power of Castle Game Engine is available, thanks to the close integration of C++ Builder and Delphi. All CGE Pascal classes and just available for C++ code in a natural way, i.e. they are just C++ classes as well.
The source code shows a game designed using CGE editor and using multiple views. It is quite similar to the coding example in Pascal that we presented at the ITDevCon 2023 conference, but now it uses C++ for everything.
Make sure to build and install CGE packages first. Make sure to build the packages for all the platforms you want (like Win32, Win64). See the Delphi packages installation, Delphi packages documentation. Make sure in particular to build castle_engine_window.bpl package.
Note that for C++ Builder you need to Build the packages for all your target platforms. It is not enough to only Install them for Win32 (Delphi IDE architecture) which is enough to allow usage from Delphi / Pascal.
See C++ Builder documentation for more details.
Then open this project in C++ Builder and build and run as usual (hit F9).
