Join the D[ark] side of game dev!

Dagon is a 3D game development framework for D language based on OpenGL 4.0 core profile, SDL2 and Freetype 2.8.1.

The goal of this project is creating a modern, easy to use, extendable game engine for D due to the lack of such.

Please keep in mind that Dagon is still under development and not production-ready. Follow Dagon development on Trello to see priority tasks.

To see what Dagon is capable to at the moment, check out the demo application or watch the video:


Note: the following list includes features from current development branch

  • 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 data model (interface) and shaders (backend). You can implement custom materials, with your own shaders and parameters
  • Deferred pipeline for opaque materials, forward pipeline for transparent materials and materials with custom shaders
  • Physically based rendering (PBR)
  • HDR rendering with auto-exposure (eye adaptation), Reinhard, Hable/Uncharted and ACES tonemapping operators
  • Cube and equirectangular HDRI environment maps
  • Cubemap baking
  • Directional lights with cascaded shadow mapping
  • Spherical and tube area lights
  • Spot lights
  • Normal/parallax mapping, parallax occlusion mapping
  • Deferred decals with normal mapping and PBR material properties
  • Dynamic skydome with sun and day/night cycle. Simple and Rayleigh sky models
  • Particle system with force fields. Blended particles, soft particles, shaded particles with normal map support, particle shadows
  • Terrain rendering. Procedural terrain using OpenSimplex noise or any custom height field
  • Water rendering
  • Post-processing (FXAA, SSAO, lens distortion, motion blur, glow, LUT color grading)
  • UTF-8 text rendering using TTF fonts via Freetype
  • GUI based on Nuklear
  • 2D canvas framework that renders vector shapes - lines, Bézier curves, rectangles, circles, arcs, triangles, and polygons
  • Keyboard, mouse, joystick input, Unicode text input
  • 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
  • Built-in physics engine.


Head on to releases page and grab the latest source tarball. You may also use dub package instead - add the following dependency to your dub.json:

"dagon": "~>0.10.3"

If you want to test new features, use master branch: "dagon": "~master".

Basic Application

Loading and rendering an OBJ model:

import dagon;

class TestScene: Scene
    OBJAsset aOBJSuzanne;

    this(SceneManager smngr)

    override void onAssetsRequest()
        aOBJSuzanne = addOBJAsset("data/suzanne.obj");

    override void onAllocate()
        view = New!Freeview(eventManager, assetManager);
        mainSun = createLightSun(Quaternionf.identity, environment.sunColor, environment.sunEnergy);
        mainSun.shadow = true;
        environment.setDayTime(9, 00, 00);
        auto eSuzanne = createEntity3D();
        eSuzanne.drawable = aOBJSuzanne.mesh;

class MyApplication: SceneApplication
    this(string[] args)
        super(1280, 720, false, "Dagon Application", args);
        TestScene test = New!TestScene(sceneManager);
        sceneManager.addScene(test, "TestScene");

void main(string[] args)
    MyApplication app = New!MyApplication(args);;


We have some documentation here.


Dagon is distributed under the Boost Software License, Version 1.0. You are free to use, copy, modify and redistribute Dagon, even in closed-source products. The only requirement is to keep the license and copyright notice in all source code copies.

Found a bug?

Please, create an issue here. PRs are welcome.

Become a Patron!

If you like Dagon, please support its development on Patreon and get a reward depending on your donation amount. Supporters who donate $10 and more will be listed on this page as Sponsors. You can also make one-time donation via PayPal. Thanks in advance!

Sponsors and Contributors

Big thanks to these awesome people for supporting Dagon: Rafał Ziemniewski, Kumar Sookram, Aleksandr Kovalev, Robert Georges, Jan Jurzitza (WebFreak), Rais Safiullin (SARFEX).

Dagon was created by Timur Gafarov and contributors: Rafał Ziemniewski, Mateusz Muszyński, Björn Roberg, dayllenger, my-ijet.

Also thanks to Lawrence Aberba, Andrey Penechko, Robert Schadek, RUSshy, isaacs-dev for PRs and bug reports.