3D game engine for D
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Build Status DUB Package DUB Downloads License


The goal of this project is creating a modern, easy to use, extendable 3D game engine for D language due to the lack of such. Dagon is based on OpenGL 4.0 core profile, SDL2 and Freetype 2.8.1. It works on Windows and Linux, both 32 and 64-bit. It doesn't support macOS because Apple doesn't support OpenGL anymore.

If you like Dagon, please support its development on Patreon or Liberapay. You can also make one-time donation via PayPal. I appreciate any support. Thanks in advance!

Currently Dagon has the following features:

  • Static and animated meshes, OBJ and IQM formats support
  • Textures in PNG, JPG, TGA, BMP, HDR formats
  • Own asset format with Blender exporter
  • Flexible material system with simple user-defined abstract API and different backends. You can implement custom materials, with your own shaders and parameters
  • Deferred shading
  • Physically based rendering (PBR)
  • HDR rendering with auto-exposure (eye adaptation), Reinhard, Hable/Uncharted and ACES tonemapping operators
  • Equirectangular HDRI environment maps support
  • Spherical area lights
  • Normal/parallax mapping, parallax occlusion mapping
  • Cascaded shadow maps for directional light
  • Dynamic skydome with sun and day/night cycle
  • Particle system with force fields. Blended particles, soft particles, shaded particles with normal map support, particle shadows
  • Post-processing (FXAA, SSAO, lens distortion, motion blur, glow, LUT color grading)
  • UTF-8 text rendering using TTF fonts via Freetype
  • Ownership memory model - every object belongs to some object (owner), and deleting the owner will delete all of its owned objects. This allows semi-automatic memory management - you have to manually delete only root owners
  • Entity-component model that allows game objects behave differently and combine many behaviours
  • Scene management. Any scene has its own assets, entities and logical context
  • Live asset reloading - asset can be automatically reloaded when the file is modified with external application
  • Built-in camera logics for quick and easy navigation (freeview and first person style view)
  • Box container support for assets.

Planned in future:

  • Screen-space reflections
  • Terrain renderer


Screenshot1 Screenshot2 Screenshot3



Dagon is still under development and lacks a lot of important functionality. Currently it is not recommended to use Dagon in production due to unstable API.


To use latest stable Dagon, add the following dependency to your dub.json:

"dagon": "0.8.3"

If you want to test new features, use "dagon": "~master". The master should be stable enough to compile a working application, but be ready for breaking changes at any time.

If you want to contribute, please send pull requests to smartshader branch, which is current development branch. Bug fixes to Dagon 0.8.x series should be sent to dev_0.8 branch.


A test application that demonstrates Dagon's features is hosted here. If you are starting from scratch, we recommend to use it for learning purposes.


See Tutorials.


Copyright (c) 2016-2018 Timur Gafarov. Distributed under the Boost Software License, Version 1.0 (see accompanying file COPYING or at http://www.boost.org/LICENSE_1_0.txt).


Kumar Sookram, Aleksandr Kovalev