dagon2 2.0.0-alpha1
3D game engine for D
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Dagon Engine 2
Work-in-progress SDL3 port of Dagon Engine. Feature-rich, easy to use, extensible desktop game development framework for D language based on Vulkan 1.0 and SDL3. Works on Windows and Linux.
If you like Dagon, support its development on Patreon or Liberapay. You can also make a one-time donation via NOWPayments. I appreciate any support. Thanks in advance!
Note: this project is not connected to Dagon engine by Senscape.
Screenshots
Features
Note: Dagon 2 is in active development, not all features of Dagon 1.0 are ported yet.
- Scene graph
- Virtual file system
- OBJ format support
- Textures in PNG, JPEG, WebP, AVIF, DDS, HDR, SVG and many other formats
- S3TC (DXTn), RGTC, BPTC, Basis Universal texture compression support. Built-in DXT1/DXT5/BC7 compressor and DDS exporter. Texture cache to accelerate loading
- Shaders in GLSL 4.60; SPIR-V cache
- Runs in windowed, fullscreen and borderless fullscreen modes
- Physically based rendering (PBR) with GGX microfacet BRDF. Metallic-roughness workflow. The rendered image is comparable to Blender's Eevee
- HDR rendering with AgX tonemapping
- HDRI environment maps. Equirectangular HDRI to cubemap conversion. GPU-based cubemap prefiltering with importance sampling. Loading prebaked cubemaps from DDS
- Directional lights with cascaded shadow mapping
- Normal mapping, parallax mapping
- Deferred decals with normal mapping and PBR material properties
- Input from keyboard, mouse and up to 4 gamepads
- Unicode text input
- Ownership memory model
- Built-in camera logics for easy navigation: freeview and first person views
- Rigid body physics using Jolt physics engine. Built-in character controller
- Native file open/save dialogs (for Windows, GTK, and Qt).
New features:
- Built-in GScript3 virtual machine and scripting API
- The renderer now leverages SDL GPU, targeting Vulkan instead of OpenGL
- Improvements and optimizations in almost every stage of the renderer. Many new features such as irradiance mapping, multiple scattering, specular occlusion, and adjustable f0
- Experimental HDR (scRGB) output support
- 2x supersampling support
- Temporal SSAO support
- BC7 texture compressor based on D port of Rich Geldreich's bc7enc
- Built-in texture caching. Abstract resource cache (
dagon.resource.cache) that can be used for any file types - Many new DDS/DXGI formats support
- Fog effect is now applied in a separate pass. Ground fog support
- Shadeless materials in deferred pipeline
- Window minimize/restore events.
Major changes from Dagon 0.x/1.x:
- Reimplemented
dagon.render. Deferred renderer, post-processing renderer and presentation renderer are now combined into one - Shader workflow is now based on GLSL 4.60 and includes built-in GLSL to SPIR-V compiler. SPIR-V modules are cached to disk for reuse
- Texture loader is fully based on SDL3_Image and doesn't use
dlib.image.io - Tonemapping is entirely based on AgX. Legacy tonemappers were removed
- Semantic of
SceneandWorldclasses is changed.Sceneis now just a container for Entities and other graphical data; for user input and game logicsWorldshould be used - All Entities are static by default, and their model matrices are not recalculated each frame to reduce CPU overhead. For dynamic updates enable
Entity.dynamicor use customEntityController(partly analogous to oldEntityComponent) - The renderer now uses separate irradiance cubemap
- BRDF LUT is now generated at runtime instead of loading from data/__internal
- Jolt Physics is now built-in as
dagon.joltpackage.
System Requirements
The recommended system requirements (for Full HD rendering at 60 fps):
- CPU: Intel Core i3-10100 / AMD Ryzen 3 3100
- RAM: application-dependent, usually 8 Gb minimum
- GPU: OpenGL 4.3 capable, tested on GeForce RTX 30
- VRAM: 8 Gb
- OS: 64-bit Windows 10 or higher / Linux.
Usage
TODO
Runtime Dependencies
- SDL 3.4
- SDL_Image 3.2
- FreeType 2.8.1
- GLSLang
- SPIRV-Cross
- Jolt Physics via joltc wrapper
Dependencies are automatically deployed on 64-bit Windows and Linux. Under Linux, if you want to use local libraries in Windows way (from application's working directory rather than from the system), add the following to your dub.json:
"lflags-linux": ["-rpath=$$ORIGIN"]
Known Limitations
- The engine doesn't support macOS yet. Although SDL GPU is a multi-backend API, Dagon 2 currently targets only Vulkan backend.
Documentation
HTML documentation can be generated from source code using ddox (dub build -b ddox). Be aware that documentation is currently incomplete.
License
Distributed under the Boost Software License, Version 1.0 (see accompanying file COPYING or at http://www.boost.org/LICENSE10.txt).
- 2.0.0-alpha1 released 34 days ago
- gecko0307/dagon2
- gecko0307.github.io/dagon
- BSL-1.0
- Authors:
- Dependencies:
- bindbc-spirvcross, dlib, bindbc-glslang, bindbc-sdl, bindbc-freetype
- Versions:
-
Show all 2 versions2.0.0-alpha1 2026-Apr-26 ~main 2026-May-11 - Download Stats:
-
-
1 downloads today
-
2 downloads this week
-
14 downloads this month
-
33 downloads total
-
- Score:
- 0.2
- Short URL:
- dagon2.dub.pm
