This is a toy 3D game engine created for study purposes. It's written in C++ and uses bgfx for rendering. Currently runs on Windows and Linux and supports OpenGL 2.1, DirectX 9, DirectX 11, DirectX 12 and Vulkan.
It's still on an early stage of development, but already supports:
- asset management
- 3d model loading
- basic blinn-phong shading
- shadow maps
- simple scene editor
- minecraft-style voxels
- premake5
- python 3.8 / pip3
First of all, update all submodules and download Python dependencies:
git submodule init && git submodule update
python -m pip install -r tools/requirements.txt
Generate the Visual Studio solution:
premake5 vs2019
Open the solution located at .\build\vs2019\annileen-engine.sln
and build.
Now, generate the assets:
python tools/asset_tools.py
Now you can run the projects on Visual Studio.
Install dependecies:
sudo apt install libglu1-mesa-dev freeglut3-dev mesa-common-dev xorg-dev libglew-dev libx11-dev libxrandr-dev libxcursor-dev libxinerama-dev
Build:
premake5 gmake
make
python tools/asset_tools.py
Still in development.
In order to build all the assets available at the ./assets
folder, run:
python tools/asset_tools.py
It will generate a build_assets
folder in the project root and will also create a assets.toml
with a description of all the assets and their types.
All the other the specific tools will accept an asset name, no need to include the full path of the file, it will find the asset within the asset
folder and build it to its corresponding built folder, but note: it will not update the assets.toml
descriptor file.
Run python tools/asset_tools.py -w
to launch a service that will keep watching for asset changes and will recompile it automatically.
python tools/shader.py
usage: shader.py [-h] [-s [SHADER [SHADER ...]]] [-f] [-a] [-p {auto,android,asm.js,ios,linux,orbis,osx,windows}]
[-m {auto,s_3_0,s_4_0,s_4_0_level,s_5_0,metal,pssl,spirv,120}]
Annileen Shader Tools
optional arguments:
-h, --help show this help message and exit
-s [SHADER [SHADER ...]], --shader [SHADER [SHADER ...]]
compiles the shader specified
-f, --force force rebuild
-a, --all compiles all the available shaders
-p {auto,android,asm.js,ios,linux,orbis,osx,windows}, --platform {auto,android,asm.js,ios,linux,orbis,osx,windows}
compiles the mesh specified
-m {auto,s_3_0,s_4_0,s_4_0_level,s_5_0,metal,pssl,spirv,120}, --model {auto,s_3_0,s_4_0,s_4_0_level,s_5_0,metal,pssl,spirv,120}
shader model
If no platform
is specified, it will build for tre host platform. The default build model is OpenGL (GLSL), for other APIs, use:
- DirectX:
s_5_0
- Vulkan:
spirv
- Metal:
metal
python tools/mesh.py
usage: mesh.py [-h] [-m [MESH [MESH ...]]] [-a] [-f] [-v VIEW]
Annileen Mesh Tools
optional arguments:
-h, --help show this help message and exit
-m [MESH [MESH ...]], --mesh [MESH [MESH ...]]
compiles the mesh specified
-a, --all compiles all the available meshes
-f, --force force rebuild
-v VIEW, --view VIEW view the specified mesh
python tools/texture.py
usage: texture.py [-h] [-t [TEXTURE ...]] [-a] [-f] [-v VIEW]
Annileen Texture Tools
options:
-h, --help show this help message and exit
-t [TEXTURE ...], --texture [TEXTURE ...]
compiles the texture specified
-a, --all compiles all the available textures
-f, --force force compiling all textures
-v VIEW, --view VIEW view the specified texture
python tools/cubemap.py
usage: cubemap.py [-h] [-c [CUBEMAP [CUBEMAP ...]]] [-a] [-v VIEW]
Annileen Cubemap Tools
optional arguments:
-h, --help show this help message and exit
-c [CUBEMAP [CUBEMAP ...]], --cubemap [CUBEMAP [CUBEMAP ...]]
compiles the cubemap specified
-a, --all compiles all the available cubemaps
-v VIEW, --view VIEW view the specified cubemap
python tools/font.py
usage: font.py [-h] [-f [FONT [FONT ...]]] [-a]
Annileen Font Tools
optional arguments:
-h, --help show this help message and exit
-f [FONT [FONT ...]], --font [FONT [FONT ...]]
compiles the font specified
-a, --all compiles all the available fonts
When built, the project will generate binaries for the examples. Simply run the example binaries from the root directory.
Annileen is licensed under the MIT License
Annileen uses the following libraries: