Brenta-Engine is written C++23 and uses cmake as it's
build system. You can compile the engine as a static or shared library
for both Windows and Linux. On windows, currently compilation with MSVC
is not supported because of an issue with missing inline assembly.
In order to build the engine, you will need:
A compiler for C++23
cmake >= 3.16
The rest of the dependencies, like assimp and glfw, are present in
the source tree as git submodules under the external/
directory. These will be automatically built by the build system.
Clone the project from GitHub, use --recurse-submodules
to pull the dependencies.
git clone --recurse-submodules -j8 https://github.com/San7o/Brenta-Engine.git
cd Brenta-EngineIf you already cloned the repo without
--recurse-submodules, you can still pull them with:
git submodule update --init --recursiveBuilding is done through cmake. To compile the dynamic
library, simply run:
cmake -Bbuild
cmake --build build -j$(nproc)For debug builds, specify -D CMAKE_BUILD_TYPE=Debug.
This will generate all debug information and enable address
sanitization.
For the static library:
cmake -Bbuild -DBUILD_SHARED_LIBS=off
cmake --build build -j$(nproc)To compile the examples:
cmake -Bbuild -D BRENTA_BUILD_EXAMPLES=on
cmake --build build -j$(nproc) --target <example-name>where example-name is the name of the .cpp
example file without extension. You can also omit the
--target option completely, this will build all
examples.
To build tests:
cmake -Bbuild -D BRENTA_BUILD_TESTS=on
cmake --build build -j$(nproc)
./buid/tests --no-multithreadBy default, the engine in compiled with support for ImGUI and ECS . If you want to disable
this (for example, if you want a smaller build and faster compile time)
you can pass BRENTA_USE_IMGUI=off and
BRENTA_USE_ECS=off to cmake:
cmake -Bbuild -D BRENTA_USE_ECS=offAfter compilation, all binaries will be generated in
build/ directory.
To build the wensite and documentation you need to have pandoc and doxygen installed. Then, build with:
make htmlThe index will be located in
docs / html / index.html.
To generate shaders bindings for C/C++, run the following command:
make shaders./>