Brenta Engine Design Guide Build Data structures Files Github

Building the engine

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.

Dependencies

In order to build the engine, you will need:

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 repo

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-Engine

If you already cloned the repo without --recurse-submodules, you can still pull them with:

git submodule update --init --recursive

Build

Building 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-multithread

By 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=off

After compilation, all binaries will be generated in build/ directory.

Building website documentation

To build the wensite and documentation you need to have pandoc and doxygen installed. Then, build with:

make html

The index will be located in docs / html / index.html.

Generating shaders

To generate shaders bindings for C/C++, run the following command:

make shaders
./>