Tec
The Trillek Engine
Install / Use
/learn @trillek-team/TecREADME
Trillek Engine C
| Github actions | RTD docs | Code Coverage |
|-------|-------|-------|
||
|
|
Support
Head onto our Discord for extended support on building and usage.

Requirements
TEC requires cmake 3.19, a c++17 compatible compiler, and a few libraries GLFW3, GLM, ASIO, Protobuf, GLAD, Lua, Bullet, Dear ImGui, sol3, Spdlog and OpenAL.
The libraries are automatically installed when using CMake and VCPKG manifest mode.
Quick Start
OS Specific first steps
Windows
Potentially Download and install oalinst.zip OpenAL installer and install it.
MacOS
Prior to 11.0.1, run (NOT TESTED): sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
If bootstrap-vcpkg fails see here for more help
Linux
Install the following. This is a pretty extensive list and may be more than needed
build-essential pkg-config tar curl zip unzip gdb libgl1-mesa-dev xorg-dev libglu1-mesa-dev libxinerama-dev libxcursor-dev
Build Steps
- Install CMake
- Install VCPK -
git clone https://github.com/Microsoft/vcpkg.git VCPKG_ROOTmust be set a an environment variable, to wherever VCPKG was cloned to- Run
$(VCPKG_ROOT)/bootstrap-vcpkg.[bat|sh]to setup vcpkg. Use the correct extension for your OS.- [OPTIONAL]
$(VCPKG_ROOT)/./vcpkg integrate install
- [OPTIONAL]
- Open the folder in an editor OR see step 6
- Run CMake
- CLI
cmake --preset=ninja-multi-vcpkgcmake --build --preset=BUILD_PRESETsee presets
- GUI - This will only configure the project. CLI steps or Open in an editor are more useful.
- Set the source folder
- Set the build folder. The presets default to
builds/CONFIG_NAMEe.g.builds/msvc/ - Run Configure
- Pick the Ninja Multi-config generator
- Select Specify toolchain file for cross compiling
- The file input should be filled in, but if not point it to
$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake
- Run Generate
- Open generated solution and build the project(s)
- CLI
In depth
Build Tool Dependencies:
Linux / WSL Dependencies
gcc10 g++10orclang-13build-essential pkg-config tar curl zip unzip gdblibgl1-mesa-dev xorg-dev libglu1-mesa-dev libxinerama-dev libxcursor-dev p7zip-full
Supported editor(s)
- Visual Studio
- Visual Studio (CMake folder mode)
- Change Tools -> Options -> CMake -> General and enable "Prefer using CMake Presets..."
- Visual Studio Code
- On Windows you may need to add the CMake bin to the system path, for CTest to work.
- CLion
- Not tested, but CMake folder mode should work as expected
Presets
Config:
ninja-multi-vcpkg- Ninja multi-build config preset that references the vcpkg toolchain file relative to theVCPKG_ROOT
Build:
ninja-multi-vcpkg-debug- Debug configuration build preset that uses theninja-multi-vcpkgconfigninja-multi-vcpkg-release-dbginfo- Release with debug info configuration build preset that uses theninja-multi-vcpkgconfigninja-multi-vcpkg-release- Release configuration build preset that uses theninja-multi-vcpkgconfigninja-multi-docs- Doc build preset with the documentation custom targets
Test
test-base- Base test preset that all other tests derive from DO NOT USEninja-multi-vcpkg-debug- Debug configuration test presetninja-multi-vcpkg-release- Release configuration test preset
Documentation
Documentation is done via Doxygen for C++ code and supplementary docs must be maintained for the Lua API in docs/.
Engine documentation is generated with the with the ninja-multi-docs build config doxygen target, and is then
converted to markdown via doxybook2 with the ninja-multi-docs build config doxybook target.
All documentation is converted to mkdocs format with the ninja-multi-docs build config mkdocs target, and then
readthedocs hosts the mkdocs files.
Doxygen and mkdocs files are not committed, but can be generated locally for consumption/validation. Doxybook
generated engine docs and all other docs in docs/ are committed.
Documentation Dependencies
- doxygen 1.9.4
- doxybook2 1.4.0
- python 3.10.4 (Earlier version may work, but untested)
- pip 22.0.4 (Earlier version may work, but untested)
- pip-tools 6.8.0 (Earlier version may work, but untested)
- mkdocs 1.3.0 (see docs/requirements)
Readthedocs setup
To generate the python requirements for mkdocs to be used by readthedoc run pip-compile docs/requirements.in in the project root.
Documentation Targets
The following targets can be built when the CMake build preset is set to ninja-multi-docs
- doxygen - Generates full doxygen docs in
doxygen/ - doxybook - Generates markdown versions of doxygen docs and places them in
docs/engine/ - mkdocs - Generates mkdocs from
docs/in places themmkdocs/
Local Preview
To preview the mkdocs docs locally visit run mkdocs serve, in the project root.
Clang Format
The follow docker script will setup a docker container that will run clang format.
docker build -t clang-format-lint github.com/DoozyX/clang-format-lint-action
Windows
Run the following on windows to format all source files in the src dir
docker run -it --rm --workdir /src -v ${pwd}:/src clang-format-lint --clang-format-executable /clang-format/clang-format11 -r -i true .
Linux
Run the following on windows to format all source files in the src dir
docker run -it --rm --workdir /src -v $(pwd):/src clang-format-lint --clang-format-executable /clang-format/clang-format11 -r -i true .
