Diligent Engine - A Modern Cross-Platform Graphics Library

Discussion in 'Rendering Technology and APIs' started by diligent, Jan 19, 2018.

  1. diligent

    Jan 18, 2018
    Likes Received:

    I would like to introduce Diligent Engine, a light-weight cross-platform graphics library that was designed to take advantages of the next-generation APIs such as Direct3D12 and Vulkan, but at the same time provide support for older platforms via Direct3D11, OpenGL and OpenGLES. Diligent Engine exposes common C++ front-end for all supported platforms and provides interoperability with the underlying native APIs. It also supports integration with Unity and can be used as graphics subsystem in a standalone game engine, Unity native plugin or any other 3D application.

    The engine design was driven by the following key principles:
    • Lightweight abstractions: the API should be as close to the underlying native APIs as possible to allow the application leverage all available low-level functionality.
    • Low overhead: the abstraction layer needs to be efficient from performance point of view.
    • Convenience: the API needs to be convenient to use. It needs to assist developers in achieving their goals not limiting their control of the graphics hardware.
    • Multithreading: ability to efficiently parallelize work is in the core of Direct3D12 and Vulkan and one of the main selling points of the new APIs. Support for multithreading in a cross-platform layer is a must.
    • Extensibility: no matter how well the API is designed, it still introduces some level of abstraction. In some cases the most efficient way to implement some functionality is to directly use native API. The abstraction layer needs to provide access to the underlying native API objects to provide a way for the app to add features that may be missing.
    The engine currently supports the following platforms and low-level graphics APIs: Win32 ( D3D11, D3D12, OpenGL), Universal Windows (D3D11, D3D12), Linux (OpenGL), Android (OpenGLES).

    Source Code

    Full engine source code is available for download at GitHub and is free to use. The repository contains tutorials, sample applications, asteroids performance benchmark and an example Unity project that uses Diligent Engine in native plugin.


    01 - Hello Triangle
    This basic tutorial shows how to render a simple triangle using Diligent Engine API

    02 - Cube
    This tutorial demonstrates how to render an actual 3D object, a cube. It shows how to load shaders from files, create and use vertex, index and uniform buffers.

    03 - Texturing
    This tutorial demonstrates how to apply a texture to a 3D object. It shows how to load a texture from file, create shader resource binding object and how to sample a texture in the shader.

    04 - Instancing
    This tutorial demonstrates how to use instancing to render multiple copies of one object using unique transformation matrix for every copy.

    05 - Texture Array
    This tutorial demonstrates how to combine instancing with texture arrays to use unique texture for every instance.

    06 - Multithreading
    This tutorial shows how to generate command lists in parallel from multiple threads.

    07 - Geometry Shader
    This tutorial shows how to use geometry shader to render smooth wireframe.

    08 - Tessellation
    This tutorial shows how to use hardware tessellation to implement simple adaptive terrain rendering algorithm.

    Atmospheric Light Scattering Sample
    The sample demonstrates how Diligent Engine can be used to implement various rendering tasks: loading textures from files, using complex shaders, rendering to textures, using compute shaders and unordered access views, etc.

    Asteroids Performance Benchmark
    The benchmark is based on this demo developed by Intel . It renders 50,000 unique textured asteroids and lets compare performance of D3D11 and D3D12 implementations. Every asteroid is a combination of one of 1000 unique meshes and one of 10 unique textures.

    You can fin more information about the engine on its web site as well as in GitHub repository. This article talks more about design principles and gives examples of the API usage.

    Diligent Engine now supports MacOS!


    Diligent Engine now also runs on iOS!


    Added one more tutorial: 2D Quads


    Diligent Engine now supports Vulkan! It was quite a task, but the results look very encouraging. In Asteroids benchmark, single-threaded Vulkan mode is faster than native Ditrect3D11 implementation while multithreaded is on par with Direct3D12.

    #1 diligent, Jan 19, 2018
    Last edited by a moderator: Jul 9, 2018

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.