Diligent Engine

Diligent Engine is a lightweight cross-platform graphics API abstraction library. It is designed to take full advantage of Direct3D12, Vulkan and Metal, while supporting older platforms via Direct3D11, OpenGL and OpenGLES. Diligent Engine exposes common front-end API and uses HLSL as universal shading language on all platforms and rendering back-ends. Platform-specific shader representations (GLSL, DX bytecode or SPIRV) can be used with corresponding back-ends. The engine is intended to be used as graphics subsystem in a game engine or any other 3D application. Full source code is available on GitHub. It is distributed under Apache 2.0 license and is free to use.

Features

  • Cross-platform
    • Exact same client code for all supported platforms and rendering backends
      • No #if defined(_WIN32)  … #elif defined(LINUX)  … #elif defined(ANDROID)  …
      • No #if defined(D3D11)  … #elif defined(D3D12)  … #elif defined(OPENGL)  …
    • Exact same HLSL shaders run on all platforms and all backends
  • High performance
  • Modular design
    • Components are clearly separated logically and physically and can be used as needed
      • Only take what you need for your project (do not want to keep samples and tutorials in your codebase? Simply remove Samples submodule. Only need core functionality? Use only Core submodule)
      • No 15000 lines-of-code files
  • Clear and concise API
    • C/C++
    • Object-based
    • Stateless
  • Key graphics features:
  • Modern c++ features to make code fast and reliable

High-level Rendering Components

Diligent Engine vs BGFX

BGFX is one of the most successful open-source graphics API abstraction libraries that has been around for years, so why Diligent? The answer is that Diligent was designed from scratch to take advantages of the next-generation APIs. Diligent Engine relates to BGFX as Direct3D12 relates to Direct3D11 and Vulkan relates to OpenGL. Some of the advantages that Diligent Engine offers:

  • Better abstractions (such as one monolithic pipeline state object vs numerous fine-grain states) that map directly to next-generation APIs and reduce run-time overhead
  • Explicit control of resource state transitions.
  • Efficient shader resource binding model that takes advantage of descriptor tables in Direct3D12 and descriptor sets in Vulkan.
  • Multithreaded command list recording.
  • HLSL (VS, PS, GS, DS, HS, CS) as common shading language on all platforms and back-ends.
  • Vulkan back-end.

The following platforms and graphics APIs are currently supported

Platform Supported APIs
Windows Desktop Direct3D11, Direct3D12, OpenGL4.2+, Vulkan
Universal Windows Platform Direct3D11, Direct3D12
Linux OpenGL4.2+, Vulkan
Android OpenGLES3.0+
MacOS OpenGL4.1 (no compute shaders), Vulkan (via MoltenVK), Metal
iOS OpenGLES3.0 (vertex and fragment shaders only), Vulkan (via MoltenVK), Metal