Skip to content

toasti1973/DiligentEngine

 
 

Repository files navigation

Diligent Engine

A Modern Cross-Platform Low-Level 3D Graphics Library Tweet

Diligent Engine is a lightweight cross-platform graphics API abstraction library and rendering framework. 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. It is distributed under Apache 2.0 license and is free to use.

License Chat on gitter Chat on Discord Build Status Build Status Codacy Badge

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 (VS, PS, GS, HS, DS, CS) run on all platforms and all back-ends
  • 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
  • Clear and concise API
    • C/C++
    • Object-based
    • Stateless
  • Key graphics features:
  • Extensive validation and error reporting
  • Modern c++ features to make the code fast and reliable
  • Consistent high quality is ensured by continuous integration
    • Automated builds and unit testing
    • Source code formatting validation
    • Static analysis

High-level Rendering components

Supported Plaforms and Low-Level Graphics APIs

Platform D3D11 D3D12 OpenGL Vulkan OpenGLES Build Status
Win32 (Windows desktop) ✔️ ✔️ ✔️ ✔️ - Build Status
Universal Windows ✔️ ✔️ - - - Build Status
Linux - - ✔️ ✔️ - Build Status
MacOS - - ✔️ ✔️ (via MoltenVK) - Build Status
Android - - - ✔️ ✔️
iOS - - - ✔️ (via MoltenVK) ✔️ Build Status

Table of Contents

Cloning the Repository

This is the master repository that contains four submodules. To get the repository and all submodules, use the following command:

git clone --recursive https://github.com/DiligentGraphics/DiligentEngine.git

When updating existing repository, don't forget to update all submodules:

git pull
git submodule update --recursive

It is also a good idea to re-run CMake and perform clean rebuild after getting the latest version.

Repository Structure

Master repository includes the following submodules:

Build and Run Instructions

Diligent Engine uses CMake as a cross-platform build tool. To start using cmake, download the latest release (3.16 or later is required). Another build prerequisite is Python interpreter (3.0 or later is required). If after following the instuctions below you have build/run issues, please take a look at troubleshooting.

Win32

Build prerequisites:

  • Windows SDK 10.0.17763.0 or later (10.0.19041.0 is required for mesh shaders)
  • C++ build tools
  • Visual C++ ATL Support

Use either CMake GUI or command line tool to generate build files. For example, to generate Visual Studio 2019 64-bit solution and project files in build/Win64 folder, navigate to the engine's root folder and run the following command:

cmake -S . -B ./build/Win64 -G "Visual Studio 16 2019" -A x64

You can generate Win32 solution that targets Win8.1 SDK using the following command:

cmake -D CMAKE_SYSTEM_VERSION=8.1 -S . -B ./build/Win64_8.1 -G "Visual Studio 16 2019" -A x64

If you use MinGW, you can generate the make files using the command below (please be aware of some known build issues):

cmake -S . -B ./build/MinGW -D CMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"

WARNING! In current implementation, full path to cmake build folder must not contain white spaces.

To enable Vulkan validation layers, you will need to download Vulkan SDK and add environemt variable VK_LAYER_PATH that contains path to the Bin directory in VulkanSDK installation folder.

Open DiligentEngine.sln file in build/Win64 folder, select configuration and build the engine. Set the desired project as startup project (by default, GLTF Viewer will be selected) and run it.

By default, sample and tutorial applications will show rendering backend selection dialog box. Use the following command line options to force D3D11, D3D12, OpenGL, or Vulkan mode: -mode D3D11, -mode D3D12, -mode GL, or -mode Vk. If you want to run an application outside of Visual Studio environment, the application's assets folder must be set as working directory. (For Visual Studio, this is automatically configured by CMake). Alternatively, you can navigate to the build target or install folder and run the executable from there.

Universal Windows Platform

To generate build files for Universal Windows platform, you need to define the following two cmake variables:

  • CMAKE_SYSTEM_NAME=WindowsStore
  • CMAKE_SYSTEM_VERSION=< Windows SDK Version >

For example, to generate Visual Studio 2019 64-bit solution and project files in build/UWP64 folder, run the following command from the engine's root folder:

cmake -D CMAKE_SYSTEM_NAME=WindowsStore -D CMAKE_SYSTEM_VERSION=10.0 -S . -B ./build/UWP64 -G "Visual Studio 16 2019" -A x64

You can target specific SDK version by refining CMAKE_SYSTEM_VERSION, for instance:

cmake -D CMAKE_SYSTEM_NAME=WindowsStore -D CMAKE_SYSTEM_VERSION=10.0.16299.0 -S . -B ./build/UWP64 -G "Visual Studio 16 2019" -A x64

Set the desired project as startup project (by default, GLTF Viewer will be selected) and run it.

By default, appplications will run in D3D12 mode. You can select D3D11 or D3D12 using the following command line options: -mode D3D11, -mode D3D12.

Note: it is possible to generate solution that targets Windows 8.1 by defining CMAKE_SYSTEM_VERSION=8.1 cmake variable, but it will fail to build as it will use Visual Studio 2013 (v120) toolset that lacks proper c++11 support.

Linux

Your Linux environment needs to be set up for c++ development. If it already is, make sure your c++ tools are up to date as Diligent Engine uses modern c++ features (gcc/g++ 7 or later is recommended). You may need to install the following packages:

  1. gcc, make and other essential c/c++ tools:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
  1. cmake
sudo apt-get install cmake
  1. Other required packages:
sudo apt-get install libx11-dev
sudo apt-get install mesa-common-dev
sudo apt-get install mesa-utils
sudo apt-get install libgl-dev
sudo apt-get install python3-distutils

To configure Vulkan you will also need to:

  • Install latest Vulkan drivers and libraries for your GPU
  • Install Vulkan SDK
    • To make sure that you system is properly configured you can try to build and run samples from the SDK

To generate make files for debug configuration, run the following CMake command from the engine's root folder:

cmake -S . -B ./build/Linux64 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Debug"

To build the engine, run the following command:

cmake --build ./build/Linux64

The engine's root folder contains Visual Studio Code settings files that configure the IDE to build the engine. You can run applications directly from the IDE. To run an application from the command line, the app's assets folder must be current directory.

Android

Please make sure that your machine is set up for Android development. Download Android Studio, install and configure the NDK and CMake and other required tools. If you are not using CMake version bundled with Android Studio, make sure your build files are properly configured. To verify that your environment is properly set up, try building the teapots sample as well as Vulkan Android tutorials.

Known issues:

  • If native build does not find python executable, add PYTHON_EXECUTABLE variable to CMake arguments in NativeApp's build.gradle file: -DPYTHON_EXECUTABLE=/Path/To/Your/Python36/python.exe
  • If native build messes up shader_list.h file, go to git and undo the changes.

Open DiligentSamples/Android folder with Android Studio to build and run tutorials and samples on Android.

By default, appplications will run in OpenGLES mode. To run them in Vulkan mode, add the following launch flags: --es mode vk (in Android Studio, go to Run->Edit Configurations menu)

MacOS

After you clone the repo, run the following command from the engine's root folder to generate Xcode project (you need to have CMake installed on the system):

cmake -S . -B ./build/MacOS -G "Xcode"

The project will be located in build/MacOS folder.

Configuring Vulkan Build Environment

By default there is no Vulkan implementation on MacOS. Diligent Engine links against Vulkan loader and can use a Vulkan Portability implementation such as MoltenVK or gfx-portability. Install VulkanSDK and make sure that your system is properly configured as described here. In particular, you may need to define the following environment variables (assuming that Vulkan SDK is installed at ~/LunarG/vulkansdk-macos and you want to use MoltenVK):

export VULKAN_SDK=~/LunarG/vulkansdk-macos/macOS
export PATH=$VULKAN_SDK/bin:$PATH
export DYLD_LIBRARY_PATH=$VULKAN_SDK/lib:$DYLD_LIBRARY_PATH
export VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json
export VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d

Note that environment variables set in the shell are not seen by the applications launched from Launchpad or other desktop GUI. Thus to make sure that an application finds Vulkan libraries, it needs to be started from the command line. Due to the same reason, the xcode project file should also be opened from the shell using open command. With Xcode versions 7 and later, this behavior may need to be enabled first using the following command:

defaults write com.apple.dt.Xcode UseSanitizedBuildSystemEnvironment -bool NO

Please refer to this page for more details.

Last tested LunarG SDK version: 1.2.135.0.

iOS

Run the command below from the engine's root folder to generate Xcode project configured for iOS build (you need to have CMake installed on your Mac):

cmake -DCMAKE_TOOLCHAIN_FILE=DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=OS64 -H. -Bbuild/IOS -GXcode

Open Xcode project file in build/IOS folder and build the engine. To run the applications on an iOS device, you will need to set appropriate development team in the project settings.

Configuring Vulkan Build Environment

To enable Vulkan on iOS, download and install VulkanSDK. There is no Vulkan loader on iOS, and Diligent Engine links directly with MoltenVK static library (as recommended by MoltenVk install guide) that implements Vulkan on Metal. Note that MoltenVK libraries are only provided for arm64 architecture. To enable Vulkan in Diligent Engine on iOS, specify the path to Vulkan SDK when running CMake, for example (assuming that Vulkan SDK is installed at /LunarG/vulkansdk-macos):

cmake -DCMAKE_TOOLCHAIN_FILE=DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=OS64 -DIOS_ARCH=arm64 -DVULKAN_SDK=/LunarG/vulkansdk-macos -H. -Bbuild/IOS -GXcode

By default, the engine will link with static version of MoltenVK library located in LunarG SDK. If this is not desired or an application wants to use a library from a specific location, it can provide the full path to the library via MoltenVK_LIBRARY CMake variable. When MoltenVK_LIBRARY is defined, VULKAN_SDK is ignored.

Refer to MoltenVK user guide for more information about MoltenVK installation and usage.

Last tested LunarG SDK version: 1.2.135.0.

Integrating Diligent Engine with Existing Build System

Diligent has modular structure, so for your project you can only use these submodules that implement the required functionality. The diagram below shows the dependencies between modules.

  Core
   |
   +------>Tools----------.
   |        |             |
   |        V             |
   +------->FX---------.  |
   |                   |  |
   |                   V  V
   '----------------->Samples

Your Project Uses Cmake

If your project uses CMake, adding Diligent Engine requires just few lines of code. Suppose that the directory structure looks like this:

|
+-DiligentCore
+-HelloDiligent.cpp

Then the following steps need to be done:

  • Call add_subdirectory(DiligentCore)
  • Add DiligentCore to the list of include directories
  • Add dependencies on the targets implementing required rendering backends

Below is an example of a CMake file:

cmake_minimum_required (VERSION 3.6)

project(HelloDiligent CXX)

add_subdirectory(DiligentCore)

add_executable(HelloDiligent WIN32 HelloDiligent.cpp)
target_compile_options(HelloDiligent PRIVATE -DUNICODE -DENGINE_DLL)
target_include_directories(HelloDiligent PRIVATE "DiligentCore")

target_link_libraries(HelloDiligent
PRIVATE
    Diligent-GraphicsEngineD3D11-shared
    Diligent-GraphicsEngineOpenGL-shared
    Diligent-GraphicsEngineD3D12-shared
    Diligent-GraphicsEngineVk-shared
)
copy_required_dlls(HelloDiligent)

copy_required_dlls() is a convenience function that copies shared libraries next to the executable so that the system can find and load them. Alternatively, you can link against static (as well as shared) versions of libraries using target_link_libraries() command. In this case there is no need to explicitly add DiligentCore to the list of include directories as the targets export all required include paths. Please also take a look at getting started tutorials for Windows and Linux.

Your Project Does Not Use Cmake

If your project doesn't use CMake, it is recommended to build libraries with CMake and add them to your build system. For Windows platforms, you can download the latest build artifacts from appveyor.

Global CMake installation directory is controlled by CMAKE_INTALL_PREFIX variable. Note that it defaults to /usr/local on UNIX and c:/Program Files/${PROJECT_NAME} on Windows, which may not be what you want. Use -D CMAKE_INSTALL_PREFIX=install to use local install folder instead:

cmake -S . -B ./build/Win64 -D CMAKE_INSTALL_PREFIX=install -G "Visual Studio 16 2019" -A x64

To install libraries and header files, run the following CMake command from the build folder:

cmake --build . --target install

DiligentCore installation directory will contain everything required to integrate the engine:

  • include subdirectory will contain all required header files. Add this directory to your include search directories.
  • lib subdirectory will contain static libraries.
  • bin subdirectory will contain dynamic libraries.

An easier way is to link with dynamic libraries. When linking statically, you will need to list DiligentCore as well as all third-party libraries used by the engine. Besides that, you will also need to specify platform-specific system libraries. For example, for Windows platform, the list of libraries your project will need to link against may look like this:

DiligentCore.lib glslang.lib HLSL.lib OGLCompiler.lib OSDependent.lib spirv-cross-core.lib SPIRV.lib SPIRV-Tools-opt.lib SPIRV-Tools.lib glew-static.lib GenericCodeGen.lib MachineIndependent.lib vulkan-1.lib dxgi.lib d3d11.lib d3d12.lib d3dcompiler.lib opengl32.lib

Vulkan libraries can be found in DiligentCore/ThirdParty/vulkan/libs directory.

Diligent Engine headers require one of the following platform macros to be defined as 1: PLATFORM_WIN32, PLATFORM_UNIVERSAL_WINDOWS, PLATFORM_ANDROID, PLATFORM_LINUX, PLATFORM_MACOS, PLATFORM_IOS.

You can control which components of the engine you want to install using the following CMake options: DILIGENT_INSTALL_CORE, DILIGENT_INSTALL_FX, DILIGENT_INSTALL_SAMPLES, and DILIGENT_INSTALL_TOOLS.

Another way to intergrate the engine is to generate build files (such as Visual Studio projects) and add them to your build system. Build customization described below can help tweak the settings for your specific needs.

Build Options

By default, all back-ends available on current platform are built. To disable specific back-ends, use the following options: DILIGENT_NO_DIRECT3D11, DILIGENT_NO_DIRECT3D12, DILIGENT_NO_OPENGL, DILIGENT_NO_VULKAN, DILIGENT_NO_METAL. The options can be set through cmake UI or from the command line as in the example below:

cmake -D DILIGENT_NO_DIRECT3D11=TRUE -S . -B ./build/Win64 -G "Visual Studio 16 2019" -A x64

Additionally, individual engine components can be enabled or disabled using the following options: DILIGENT_BUILD_TOOLS, DILIGENT_BUILD_FX, DILIGENT_BUILD_SAMPLES, DILIGENT_BUILD_DEMOS, DILIGENT_BUILD_UNITY_PLUGIN. If you only want to build SampleBase project, you can use DILIGENT_BUILD_SAMPLE_BASE_ONLY option.

By default Vulkan back-end is linked with glslang that enables compiling HLSL and GLSL shaders to SPIRV at run time. If run-time compilation is not required, glslang can be disabled with DILIGENT_NO_GLSLANG cmake option. Additionally, HLSL support in non-Direct3D backends can be disabled with DILIGENT_NO_HLSL option. Enabling the options significantly reduces the size of Vulkan and OpenGL back-end binaries, which may be especailly important for mobile applications.

Diligent Engine uses clang-format to ensure consistent formatting throught the code base. The validation can be disabled using DILIGENT_NO_FORMAT_VALIDATION CMake option. Note that any pool request will fail if formatting issues are found.

Customizing Build

Diligent Engine allows clients to customize build settings by providing configuration script file that defines the following optional cmake functions:

  • custom_configure_build() - defines global build properties such as build configurations, c/c++ compile flags, link flags etc.
  • custom_pre_configure_target() - defines custom settings for every target in the build and is called before the engine's build system starts configuring the target.
  • custom_post_configure_target() - called after the engine's build system has configured the target to let the client override properties set by the engine.

The path to the configuration script should be provided through BUILD_CONFIGURATION_FILE variable when running cmake and must be relative to the cmake root folder, for example:

cmake -D BUILD_CONFIGURATION_FILE=BuildConfig.cmake -S . -B ./build/Win64 -G "Visual Studio 16 2019" -A x64

Customizing global build settings with custom_configure_build() function

If defined, custom_configure_build() function is called before any build target is added. By default, cmake defines the following four configurations: Debug, Release, RelWithDebInfo, MinSizeRel. If you want, you can define your own build configurations by setting CMAKE_CONFIGURATION_TYPES variable. For instance, if you want to have only two configuration: Debug and ReleaseMT, add the following line to the custom_configure_build() function:

set(CMAKE_CONFIGURATION_TYPES Debug ReleaseMT CACHE STRING "Configuration types: Debug, ReleaseMT" FORCE)

The build system needs to know the list of debug and release (optimized) configurations, so the following two variables must also be set when CMAKE_CONFIGURATION_TYPES variable is defined:

set(DEBUG_CONFIGURATIONS DEBUG CACHE INTERNAL "" FORCE)
set(RELEASE_CONFIGURATIONS RELEASEMT CACHE INTERNAL "" FORCE)

Note that due to cmake specifics, configuration names listed in DEBUG_CONFIGURATIONS and RELEASE_CONFIGURATIONS must be capitalized.

If you define any configuration other than four standard cmake ones, you also need to set the following variables, for every new configuration:

  • CMAKE_C_FLAGS_<Config> - c compile flags
  • CMAKE_CXX_FLAGS_<Config> - c++ compile flags
  • CMAKE_EXE_LINKER_FLAGS_<Config> - executable link flags
  • CMAKE_SHARED_LINKER_FLAGS_<Config> - shared library link flags

For instance:

set(CMAKE_C_FLAGS_RELEASEMT "/MT" CACHE INTERNAL "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASEMT "/MT" CACHE INTERNAL "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_RELEASEMT "/OPT:REF" CACHE INTERNAL "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASEMT "/OPT:REF" CACHE INTERNAL "" FORCE)

Below is an example of custom_configure_build() function:

function(custom_configure_build)
    if(CMAKE_CONFIGURATION_TYPES)
        # Debug configurations
        set(DEBUG_CONFIGURATIONS DEBUG CACHE INTERNAL "" FORCE)
        # Release (optimized) configurations
        set(RELEASE_CONFIGURATIONS RELEASEMT CACHE INTERNAL "" FORCE)
        # CMAKE_CONFIGURATION_TYPES variable defines build configurations generated by cmake
        set(CMAKE_CONFIGURATION_TYPES Debug ReleaseMT CACHE STRING "Configuration types: Debug, ReleaseMT" FORCE)

        set(CMAKE_CXX_FLAGS_RELEASEMT "/MT" CACHE INTERNAL "" FORCE)
        set(CMAKE_C_FLAGS_RELEASEMT "/MT" CACHE INTERNAL "" FORCE)
        set(CMAKE_EXE_LINKER_FLAGS_RELEASEMT "/OPT:REF" CACHE INTERNAL "" FORCE)
        set(CMAKE_SHARED_LINKER_FLAGS_RELEASEMT "/OPT:REF" CACHE INTERNAL "" FORCE)
    endif()
endfunction()

Customizing individual target build settings with custom_pre_configure_target() and custom_post_configure_target() functions

If defined, custom_pre_configure_target() is called for every target created by the build system and allows configuring target-specific properties.

By default, the build system sets some target properties. If custom_pre_configure_target() sets all required properties, it can tell the build system that no further processing is required by setting TARGET_CONFIGURATION_COMPLETE parent scope variable to TRUE:

set(TARGET_CONFIGURATION_COMPLETE TRUE PARENT_SCOPE)

The following is an example of custom_pre_configure_target() function:

function(custom_pre_configure_target TARGET)
    set_target_properties(${TARGET} PROPERTIES
        STATIC_LIBRARY_FLAGS_RELEASEMT /LTCG
    )
    set(TARGET_CONFIGURATION_COMPLETE TRUE PARENT_SCOPE)   
endfunction()

If the client only needs to override some settings, it may define custom_post_configure_target() function that is called after the engine has completed configuring the target, for example:

function(custom_post_configure_target TARGET)
    set_target_properties(${TARGET} PROPERTIES
        CXX_STANDARD 17
    )
endfunction()

Getting started with the API

Please refer to this page. Also, tutorials and samples listed below is a good place to start.

Tutorial Screenshot Description
01 - Hello Triangle This tutorial shows how to render 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.
03 - Texturing-C This tutorial is identical to Tutorial03, but is implemented using C API.
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.
09 - Quads This tutorial shows how to render multiple 2D quads, frequently swithcing textures and blend modes.
10 - Data Streaming This tutorial shows dynamic buffer mapping strategy using MAP_FLAG_DISCARD and MAP_FLAG_DO_NOT_SYNCHRONIZE flags to efficiently stream varying amounts of data to GPU.
11 - Resource Updates This tutorial demonstrates different ways to update buffers and textures in Diligent Engine and explains important internal details and performance implications related to each method.
12 - Render Target This tutorial demonstrates how to render a 3d cube into an offscreen render target and do a simple post-processing effect.
13 - Shadow Map This tutorial demonstrates how to render basic shadows using a shadow map.
14 - Compute Shader This tutorial shows how to implement a simple particle simulation system using compute shaders.
15 - Multiple Windows This tutorial demonstrates how to use Diligent Engine to render to multiple windows.
16 - Bindless Resources This tutorial shows how to implement bindless resources, a technique that leverages dynamic shader resource indexing feature enabled by the next-gen APIs to significantly improve rendering performance.
17 - MSAA This tutorial demonstrates how to use multisample anti-aliasing (MSAA) to make geometrical edges look smoother and more temporarily stable.
18 - Queries This tutorial demonstrates how to use queries to retrieve various information about the GPU operation, such as the number of primitives rendered, command processing duration, etc.
19 - Render Passes This tutorial demonstrates how to use the render passes API to implement simple deferred shading.
20 - Mesh Shader This tutorial demonstrates how to use amplification and mesh shaders, the new programmable stages, to implement view frustum culling and object LOD calculation on the GPU.

Sample Screenshot Description
Atmosphere Sample This sample demonstrates how to integrate Epipolar Light Scattering post-processing effect into an application to render physically-based atmosphere.
GLTF Viewer This sample demonstrates how to use the Asset Loader and GLTF PBR Renderer to load and render GLTF models.
Shadows This sample demonstrates how to use the Shadowing component to render high-quality shadows.
Dear ImGui Demo This sample demonstrates the integration of the engine with dear imgui UI library.
Nuklear Demo This sample demonstrates the integration of the engine with nuklear UI library.
Hello AR This sample demonstrates how to use Diligent Engine in a basic Android AR application.

Demos

Project Screenshot Description
Asteroids Performance Benchmark This demo is designed to be a performance benchmark and is based on this demo developed by Intel. It renders 50,000 unique textured asteroids. Every asteroid is a combination of one of 1000 unique meshes and one of 10 unique textures. The sample uses original D3D11 and D3D12 native implementations, and adds implementation using Diligent Engine API to allow comparing performance of different rendering modes.
Unity Integration Demo This project demonstrates integration of Diligent Engine with Unity

High-Level Rendering Components

High-level rendering functionality is implemented by DiligentFX module. The following components are now available:

Products using Diligent Engine

We would appreciate it if you could send us a link in case your product uses Diligent Engine.

  • Vrmac Graphics: A cross-platform graphics library for .NET
  • Your product here (please submit a PR)!

License

See Apache 2.0 license.

This project has some third-party dependencies, each of which may have independent licensing:

  • Core module:
    • SPIRV-Cross: SPIRV parsing and cross-compilation tools.
    • SPIRV-Headers: SPIRV header files.
    • SPIRV-Tools: SPIRV optimization and validation tools.
    • glslang: Khronos reference compiler and validator for GLSL, ESSL, and HLSL.
    • glew: OpenGL Extension Wrangler Library.
  • Tools module:
    • libjpeg: C library for reading and writing JPEG image files.
    • libtiff: TIFF Library and Utilities.
    • libpng: Official PNG reference library.
    • zlib: A compression library.
    • tinygltf: A header only C++11 glTF 2.0 library.
    • dear imgui: A bloat-free immediate mode graphical user interface library.

Contributing

To contribute your code, submit a Pull Request to this repository. Diligent Engine is licensed under the Apache 2.0 license that guarantees that code in the DiligentEngine repository is free of Intellectual Property encumbrances. In submitting code to this repository, you are agreeing that the code is free of any Intellectual Property claims.

Diligent Engine uses clang-format to ensure consistent source code style throught the code base. The format is validated by appveyor and travis for each commit and pull request, and the build will fail if any code formatting issue is found. Please refer to this page for instructions on how to set up clang-format and automatic code formatting.

References

API Reference

Release History

See Release History


diligentgraphics.com

Diligent Engine on Twitter Diligent Engine on Facebook

About

A modern cross-platform low-level graphics library and rendering framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 86.9%
  • C 5.4%
  • CMake 2.7%
  • C# 1.5%
  • HLSL 1.5%
  • Objective-C++ 0.6%
  • Other 1.4%