le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
Building le3d

le3d is written in C++ and suitable for retrocoding. As such one of the design goals is to enable compilation on old compilers/toolchains. All you need is a C++98 capable compiler.

CMake

The build system being used is cmake.

Running a cmake frontend like cmake-ui (windows) or ccmake on UNIX will show you a list of noteworthy options and a short explanation.

General build instructions

To compile the engine follow the instructions for your target system. On a UNIX system le3d can be built like this:

1 cd le3d
2 mkdir build
3 cd build
4 cmake -DCMAKE_BUILD_TYPE=Release ..
5 make -j4

This will compile the engine and the examples.

Please note that the example must be executed relative to the assets.

So to run the cube example:

1 # we are in the build directory
2 cd ../examples/cube
3 ../build/examples/cube/cube

Embedding le3d

A simple way to embed le3d in your project is to use cmake in your project. Then you can clone le3d into your root directory and create a CMakeLists.txt

Here is a template that gets you started:

1 project(my-game CXX)
2 cmake_minimum_required(VERSION 3.0)
3 set(CMAKE_CXX_STANDARD 98)
4 
5 # examples not necessary for your own projects
6 set(LE3D_BUILD_EXAMPLES Off)
7 add_subdirectory(le3d)
8 
9 # your sources
10 add_executable(main
11  main.cpp
12 )
13 
14 target_include_directories(main PUBLIC
15  ${CMAKE_SOURCE_DIR}
16 )
17 target_link_libraries(main
18  le3d
19 )

Platform specific notes

Amiga

The amiga version is targeting bebbos toolchain:

https://github.com/bebbo/amiga-gcc

Install the toolchain somewhere.

Then you have to run cmake and specify the amiga cross compile toolchain file:

1 cd le3d
2 mkdir build-amiga
3 cmake -DCMAKE_BUILD_TYPE=Release -DAMIGA_TOOLCHAIN_PATH=<ROOT_TOOLCHAIN_INSTALL_DIR> -DCMAKE_TOOLCHAIN_FILE=../amiga.cmake ../
4 make -j4