{"id":13436409,"url":"https://github.com/DiligentGraphics/DiligentEngine","last_synced_at":"2025-03-18T21:30:28.479Z","repository":{"id":37388749,"uuid":"44292772","full_name":"DiligentGraphics/DiligentEngine","owner":"DiligentGraphics","description":"A modern cross-platform low-level graphics library and rendering framework","archived":false,"fork":false,"pushed_at":"2024-10-29T00:13:22.000Z","size":10022,"stargazers_count":3594,"open_issues_count":19,"forks_count":328,"subscribers_count":119,"default_branch":"master","last_synced_at":"2024-10-29T15:10:34.918Z","etag":null,"topics":["3d-engine","d3d11","d3d12","directx","directx11","directx12","gamedev","graphics-engine","graphics-library","graphics-programming","ibl","opengl","opengl-es","pbr","ray-tracing","raytracing","renderer","rendering","vulkan","vulkan-game-engine"],"latest_commit_sha":null,"homepage":"http://diligentgraphics.com/diligent-engine/","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiligentGraphics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-15T03:57:56.000Z","updated_at":"2024-10-29T03:18:46.000Z","dependencies_parsed_at":"2023-12-24T22:32:04.226Z","dependency_job_id":"860cf3f3-8985-4d5d-9cc8-fd072ef4118d","html_url":"https://github.com/DiligentGraphics/DiligentEngine","commit_stats":{"total_commits":1715,"total_committers":15,"mean_commits":"114.33333333333333","dds":"0.49504373177842564","last_synced_commit":"0e1a4d2cc78ba86e3f57c0e909a1edcdf0d2a81e"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiligentGraphics%2FDiligentEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiligentGraphics%2FDiligentEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiligentGraphics%2FDiligentEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiligentGraphics%2FDiligentEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiligentGraphics","download_url":"https://codeload.github.com/DiligentGraphics/DiligentEngine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166175,"owners_count":20409161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-engine","d3d11","d3d12","directx","directx11","directx12","gamedev","graphics-engine","graphics-library","graphics-programming","ibl","opengl","opengl-es","pbr","ray-tracing","raytracing","renderer","rendering","vulkan","vulkan-game-engine"],"created_at":"2024-07-31T03:00:47.837Z","updated_at":"2025-03-18T21:30:28.471Z","avatar_url":"https://github.com/DiligentGraphics.png","language":"Batchfile","readme":"# Diligent Engine \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/diligentgraphics-logo.png\" height=64 align=\"right\" valign=\"middle\"\u003e\n**A Modern Cross-Platform Low-Level 3D Graphics Library and Rendering Framework**\n[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=An%20easy-to-use%20cross-platform%20graphics%20library%20that%20takes%20full%20advantage%20of%20%23Direct3D12%20and%20%23VulkanAPI\u0026url=https://github.com/DiligentGraphics/DiligentEngine)\n\n[Diligent Engine](http://diligentgraphics.com/diligent-engine/) is a lightweight cross-platform graphics\nAPI abstraction library and rendering framework. It is designed to take full advantage of Direct3D12, Vulkan,\nMetal and WebGPU, while supporting older platforms via Direct3D11, OpenGL, OpenGLES and WebGL. Diligent Engine\nexposes common front-end  API and uses HLSL as universal shading language on all platforms and rendering back-ends. \nPlatform-specific shader representations (GLSL, MSL, DX bytecode or SPIRV) can be used with corresponding back-ends.\nThe engine is intended to be used as graphics subsystem in a game engine or any other 3D application. \nIt is distributed under [Apache 2.0 license](License.txt) and is free to use.\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](License.txt)\n[![Chat on Discord](https://img.shields.io/discord/730091778081947680?logo=discord)](https://discord.gg/t7HGBK7)\n[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/DiligentGraphics/DiligentEngine?svg=true)](https://ci.appveyor.com/project/DiligentGraphics/diligentengine)\n\n## Supported Platforms and Low-Level Graphics APIs\n\n| Platform                                                                                                                                     | D3D11              | D3D12              |  OpenGL/GLES       | Vulkan                          | Metal                           | WebGPU                          |  Build Status                    |\n| -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |------------------- | ------------------ | ------------------------------- | ------------------------------- | ------------------------------- | -------------------------------- |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/windows-logo.png\" width=24 valign=\"middle\"\u003e Windows             | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:              | -                               | :heavy_check_mark: \u003csup\u003e3\u003c/sup\u003e |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-windows.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-windows.yml?query=branch%3Amaster) |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/uwindows-logo.png\" width=24 valign=\"middle\"\u003e Universal Windows  | :heavy_check_mark: | :heavy_check_mark: | -                  | -                               | -                               | -                               |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-windows.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-windows.yml?query=branch%3Amaster) |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/linux-logo.png\" width=24 valign=\"middle\"\u003e Linux                 | -                  | -                  | :heavy_check_mark: | :heavy_check_mark:              | -                               | :heavy_check_mark: \u003csup\u003e3\u003c/sup\u003e |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-linux.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-linux.yml?query=branch%3Amaster) |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/android-logo.png\" width=24 valign=\"middle\"\u003e Android             | -                  | -                  | :heavy_check_mark: | :heavy_check_mark:              | -                               | -                               |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-android.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-android.yml?query=branch%3Amaster) |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/macos-logo.png\" width=24 valign=\"middle\"\u003e MacOS                 | -                  | -                  | :heavy_check_mark: | :heavy_check_mark: \u003csup\u003e1\u003c/sup\u003e | :heavy_check_mark: \u003csup\u003e2\u003c/sup\u003e | :heavy_check_mark: \u003csup\u003e3\u003c/sup\u003e |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-apple.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-apple.yml?query=branch%3Amaster) |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/apple-logo.png\" width=24 valign=\"middle\"\u003e iOS                   | -                  | -                  | :heavy_check_mark: | :heavy_check_mark: \u003csup\u003e1\u003c/sup\u003e | :heavy_check_mark: \u003csup\u003e2\u003c/sup\u003e | -                               |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-apple.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-apple.yml?query=branch%3Amaster) |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/tvos-logo.png\" width=24 valign=\"middle\"\u003e tvOS                   | -                  | -                  | -                  | :heavy_check_mark: \u003csup\u003e1\u003c/sup\u003e | :heavy_check_mark: \u003csup\u003e2\u003c/sup\u003e | -                               |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-apple.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-apple.yml?query=branch%3Amaster) |\n| \u003cimg src=\"https://github.com/DiligentGraphics/DiligentCore/blob/master/media/emscripten-logo.png\" width=24 valign=\"middle\"\u003e Web              | -                  | -                  | :heavy_check_mark: | -                               | -                               | :heavy_check_mark:              |  [![Build Status](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-emscripten.yml/badge.svg?branch=master)](https://github.com/DiligentGraphics/DiligentEngine/actions/workflows/build-emscripten.yml?query=branch%3Amaster) |\n\n\n\u003csup\u003e1\u003c/sup\u003e Vulkan API is not natively supported on MacOS, iOS and tvOS platforms and requires a Vulkan portability implementation such as [MoltenVK](https://github.com/KhronosGroup/MoltenVK)\nor [gfx-portability](https://github.com/gfx-rs/portability).\n\n\u003csup\u003e2\u003c/sup\u003e Available under commercial license - please contact us for details.\n\n\u003csup\u003e3\u003c/sup\u003e Requires a native implementation of WebGPU, [Dawn](https://dawn.googlesource.com/dawn) is recommended.\n\n## Features\n\n* Cross-platform\n  * Exact same client code for all supported platforms and rendering backends\n    * No `#if defined(_WIN32)` ... `#elif defined(LINUX)` ... `#elif defined(ANDROID)` ...\n    * No `#if defined(D3D11)` ... `#elif defined(D3D12)` ... `#elif defined(OPENGL)` ...\n  * Exact same HLSL shaders (VS, PS, GS, HS, DS, CS) run on all platforms and all back-ends \n* High performance\n* Modular design\n  * Components are clearly separated logically and physically and can be used as needed\n  * Only take what you need for your project\n* Clear and concise API\n  * C/C++/C#\n  * Object-based\n  * Stateless\n* Key graphics features:\n  * [Automatic shader resource binding](http://diligentgraphics.com/2016/03/23/resource-binding-model-in-diligent-engine-2-0/) designed to leverage next-generation graphics APIs\n  * Multithreaded command buffer generation\n  * Multithreaded resource creation\n  * [Automatic or explicit control over resource state transitions](http://diligentgraphics.com/2018/12/09/resource-state-management/)\n  * Descriptor and memory management\n  * Shader resource reflection\n  * Async compute and multiple command queues\n  * Ray-tracing, mesh shaders, tile shaders, bindless resources, variable rate shading, sparse resources,\n    wave operations, and other state-of-the-art capabilities\n* JSON-based render state description language and state packaging tool\n* Extensive validation and error reporting\n* Modern c++ features to make the code fast and reliable\n* Consistent high quality is ensured by continuous integration\n  * Automated builds and unit testing\n  * Source code formatting validation\n  * Static analysis\n\n\nMinimum supported low-level API versions:\n* OpenGL 4.1\n* OpenGLES 3.0\n* WebGL 2.0\n* Direct3D11.1\n* Direct3D12 with SDK version 10.0.17763.0\n* Vulkan 1.0\n* Metal 1.0\n\n\n## High-level Rendering components\n\n* [Screen-Space Reflections](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/ScreenSpaceReflection)\n* [Screen-Space Ambient Occlusion](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/ScreenSpaceAmbientOcclusion)\n* [Depth of Field](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/DepthOfField)\n* [Bloom](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/Bloom)\n* [Temporal Anti-Aliasing](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/TemporalAntiAliasing)\n* [Atmospheric light scattering post-effect](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/EpipolarLightScattering)\n* [Tone mapping utilities](https://github.com/DiligentGraphics/DiligentFX/tree/master/Shaders/PostProcess/ToneMapping/public)\n* [PBR renderer](https://github.com/DiligentGraphics/DiligentFX/tree/master/PBR)\n* [Hydrogent](https://github.com/DiligentGraphics/DiligentFX/tree/master/Hydrogent), an implementation of the Hydra rendering API in Diligent Engine.\n* [Shadows](https://github.com/DiligentGraphics/DiligentFX/tree/master/Components#shadows)\n* [Integration with Dear Imgui](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/ImguiDemo)\n  [and Nuklear](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/NuklearDemo)\n\n\n# Table of Contents\n\n- [Cloning the Repository](#cloning)\n  - [Repository Structure](#repository_structure)\n- [Build and Run Instructions](#build_and_run)\n  - [Win32](#build_and_run_win32)\n  - [Universal Windows Platform](#build_and_run_uwp)\n  - [Linux](#build_and_run_linux)\n  - [Android](#build_and_run_android)\n  - [MacOS](#build_and_run_macos)\n  - [iOS](#build_and_run_ios)\n  - [Web](#build_and_run_web)\n  - [Integrating Diligent Engine with Existing Build System](#build_and_run_integration)\n  - [Build Options](#build_option)\n  - [Customizing Build](#build_and_run_customizing)\n- [Getting started with the API](#getting_started)\n- [Render State Notation](#render_state_notation)\n- [Tutorials](#tutorials)\n- [Samples](#samples)\n- [High-Level Rendering Components](#high_level_components)\n- [Products Using Diligent Engine](#products-using-diligent-engine)\n- [License](#license)\n- [Contributing](#contributing)\n- [References](#references)\n- [Release History](#release_history)\n\n\u003ca name=\"cloning\"\u003e\u003c/a\u003e\n# Cloning the Repository\n\nThis is the master repository that contains four [submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules). To get the repository and all submodules, use the following command:\n\n```\ngit clone --recursive https://github.com/DiligentGraphics/DiligentEngine.git\n```\n\nWhen updating existing repository, don't forget to update all submodules:\n\n```\ngit pull\ngit submodule update --recursive\n```\n\nIt is also a good idea to re-run CMake and perform clean rebuild after getting the latest version.\n\n\u003ca name=\"repository_structure\"\u003e\u003c/a\u003e\n## Repository Structure\n\nMaster repository includes the following submodules:\n\n* [Core](https://github.com/DiligentGraphics/DiligentCore) submodule implements \n  [Direct3D11](https://github.com/DiligentGraphics/DiligentCore/tree/master/Graphics/GraphicsEngineD3D11), \n  [Direct3D12](https://github.com/DiligentGraphics/DiligentCore/tree/master/Graphics/GraphicsEngineD3D12),\n  [OpenGL/GLES](https://github.com/DiligentGraphics/DiligentCore/tree/master/Graphics/GraphicsEngineOpenGL), and\n  [Vulkan](https://github.com/DiligentGraphics/DiligentCore/tree/master/Graphics/GraphicsEngineVulkan) back-ends.\n  The module is self-contained and can be built by its own.\n* [Tools](https://github.com/DiligentGraphics/DiligentTools) submodule contains \n  [texture loading library](https://github.com/DiligentGraphics/DiligentTools/tree/master/TextureLoader),\n  [asset loading library](https://github.com/DiligentGraphics/DiligentTools/blob/master/AssetLoader),\n  [dear imgui implementation](https://github.com/DiligentGraphics/DiligentTools/blob/master/Imgui),\n  [native application implementation](https://github.com/DiligentGraphics/DiligentTools/blob/master/NativeApp),\n  [Diligent render state notation parser](https://github.com/DiligentGraphics/DiligentTools/tree/master/RenderStateNotation) and\n  [offline render state packaging tool](https://github.com/DiligentGraphics/DiligentTools/tree/master/RenderStatePackager).\n* [DiligentFX](https://github.com/DiligentGraphics/DiligentFX) is a high-level rendering framework that implements\n  various rendering components. The module depends on Core and Tools modules.\n* [Samples](https://github.com/DiligentGraphics/DiligentSamples) submodule contains tutorials and sample applications \n  intended to demonstrate the usage of the Diligent Engine API. The module depends on Core, Tools and DiligentFX modules.\n\n\u003ca name=\"build_and_run\"\u003e\u003c/a\u003e\n# Build and Run Instructions\n\nDiligent Engine uses [CMake](https://cmake.org/) as a cross-platform build tool. \nTo start using cmake, download the [latest release](https://cmake.org/download/) (3.20 or later is required).\nAnother build prerequisite is [Python interpreter](https://www.python.org/downloads/) (3.0 or later is required).\nIf after following the instructions below you have build/run issues, please take a look at [troubleshooting](Troubleshooting.md).\n\n\u003ca name=\"build_and_run_win32\"\u003e\u003c/a\u003e\n## Win32\n\nBuild prerequisites:\n\n* Windows SDK 10.0.17763.0 or later (10.0.19041.0 is required for mesh shaders)\n* C++ build tools\n* Visual C++ ATL Support\n\n.NET support requires .NET SDK 6.0 or later.\n\nUse either CMake GUI or command line tool to generate build files. For example, to generate \n[Visual Studio 2022](https://visualstudio.microsoft.com/) 64-bit solution and project files in *build/Win64* folder, \nnavigate to the engine's root folder and run the following command:\n\n```\ncmake -S . -B ./build/Win64 -G \"Visual Studio 17 2022\" -A x64\n```\n\nYou can generate Win32 solution that targets Win8.1 SDK using the following command:\n\n```\ncmake -D CMAKE_SYSTEM_VERSION=8.1 -S . -B ./build/Win64_8.1 -G \"Visual Studio 17 2022\" -A x64\n```\n\nIf you use MinGW, you can generate the make files using the command below (note however that the functionality\nwill be limited and that MinGW is not a recommended way to build the engine):\n\n```\ncmake -S . -B ./build/MinGW -D CMAKE_BUILD_TYPE=Release -G \"MinGW Makefiles\"\n```\n\n:warning: In current implementation, full path to cmake build folder **must not contain white spaces**.\n\nTo enable Vulkan validation layers, you will need to download the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) and add environment\nvariable `VK_LAYER_PATH` that contains the path to the *Bin* directory in VulkanSDK installation folder.\n\nOpen *DiligentEngine.sln* file in *build/Win64* folder, select configuration and build the engine. Set the desired project\nas startup project (by default, GLTF Viewer will be selected) and run it. \n\nBy default, sample and tutorial applications will show rendering backend selection dialog box. Use the following command line options to force\nD3D11, D3D12, OpenGL, or Vulkan mode: **--mode d3d11**, **--mode d3d12**, **--mode gl**, or **--mode vk**. If you want to run an application\noutside of Visual Studio environment, the application's assets folder must be set as working directory. (For Visual Studio, this \nis automatically configured by CMake). Alternatively, you can navigate to the build target or install folder and run the executable from there.\n\n\n\u003ca name=\"build_and_run_uwp\"\u003e\u003c/a\u003e\n## Universal Windows Platform\n\nTo generate build files for Universal Windows platform, you need to define the following two cmake variables:\n\n* `CMAKE_SYSTEM_NAME=WindowsStore`\n* `CMAKE_SYSTEM_VERSION=\u003c Windows Version \u003e`\n\nFor example, to generate Visual Studio 2022 64-bit solution and project files in *build/UWP64* folder, run the following command\nfrom the engine's root folder:\n\n```\ncmake -D CMAKE_SYSTEM_NAME=WindowsStore -D CMAKE_SYSTEM_VERSION=10.0 -S . -B ./build/UWP64 -G \"Visual Studio 17 2022\" -A x64\n```\n\nSet the desired project as startup project (by default, GLTF Viewer will be selected) and run it. \n\nBy default, applications will run in D3D12 mode. You can select D3D11 or D3D12 using the following command line options:\n**--mode d3d11**, **--mode d3d12**.\n\nNote: it is possible to generate solution that targets Windows 8.1 by defining CMAKE_SYSTEM_VERSION=8.1 cmake variable, but it will fail\nto build as it will use Visual Studio 2013 (v120) toolset that lacks proper c++14 support.\n\n\n\u003ca name=\"build_and_run_linux\"\u003e\u003c/a\u003e\n## Linux\n\nYour Linux environment needs to be set up for c++ development. If it already is, make sure your c++ tools are up to date\nas Diligent Engine uses modern c++ features (clang 10 or later is recommended).\n\n:warning: gcc 9 and above seemingly produces invalid binary code with O2 and O3 optimization levels. To avoid crashes,\noptimization level is downgraded to O1 in release configurations. It is recommended to use clang or gcc 7 or 8.\n\nYou may need to install the following packages:\n\n1. gcc, clang, make and other essential c/c++ tools:\n\n```\nsudo apt-get update\nsudo apt-get upgrade\nsudo apt-get install build-essential\n```\n\n2. cmake\n\n```\nsudo apt-get install cmake\n```\n\n3. Other required packages:\n\n```\nsudo apt-get install libx11-dev\nsudo apt-get install mesa-common-dev\nsudo apt-get install mesa-utils\nsudo apt-get install libgl-dev\nsudo apt-get install python3-distutils\nsudo apt-get install libgl1-mesa-dev\nsudo apt-get install libxrandr-dev\nsudo apt-get install libxinerama-dev\nsudo apt-get install libxcursor-dev\nsudo apt-get install libxi-dev\n```\n\nTo configure Vulkan you will also need to:\n\n* Install latest Vulkan drivers and libraries for your GPU\n* Install [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/)\n  * To make sure that you system is properly configured you can try to build and run samples from the SDK\n\nTo generate make files for debug configuration, run the following CMake command from the engine's root folder:\n\n```\ncmake -S . -B ./build -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=\"Debug\"\n```\n\nTo build the engine, run the following command:\n\n```\ncmake --build ./build\n```\n\nOn Ubuntu 23 and newer, it may crash if you don't have libtinfo5 installed, you'll need to [add it](https://askubuntu.com/questions/1491254/installing-cuda-on-ubuntu-23-10-libt5info-not-installable).\n \n\nThe engine's root folder contains [Visual Studio Code](https://code.visualstudio.com/) settings files that configure\nthe IDE to build the engine. You can run applications directly from the IDE. To run an application from the command line,\nthe app's assets folder must be current directory.\n\n\n\u003ca name=\"build_and_run_android\"\u003e\u003c/a\u003e\n## Android\n\nPlease make sure that your machine is set up for Android development. Download \n[Android Studio](https://developer.android.com/studio/index.html),\n[install and configure the NDK and CMake](https://developer.android.com/studio/projects/install-ndk)\nand other required tools. NDK r24 or later is required. If you are not using CMake version bundled with Android Studio, make sure\nyour build files are [properly configured](https://developer.android.com/studio/projects/add-native-code.html#use_a_custom_cmake_version).\nTo verify that your environment is properly set up, try building the\n[teapots sample](https://github.com/googlesamples/android-ndk/tree/master/teapots) as well as\n[Vulkan Android tutorials](https://github.com/googlesamples/android-vulkan-tutorials).\n\nOpen *DiligentSamples/Android* folder with Android Studio to build and run tutorials and samples on Android.\n\nBy default, applications will run in Vulkan mode. To run them in Vulkan mode, add the following launch flags:\n`--es mode gles` (in Android Studio, go to Run-\u003eEdit Configurations menu)\n\n\u003ca name=\"build_and_run_macos\"\u003e\u003c/a\u003e\n## MacOS\n\nPrerequisites:\n\n* Xcode 14 or later\n* Vulkan SDK 1.3.290.0 or later to enable Vulkan\n\nAfter you clone the repo, run the following command from the engine's root folder to generate Xcode project:\n\n```\ncmake -S . -B ./build/MacOS -G \"Xcode\"\n```\n\nThe project will be located in `build/MacOS` folder.\n\nNote that if CMake fails to find the compiler, you may need to run the following command:\n\n```\nsudo xcode-select --reset\n```\n\n### Configuring Vulkan Build Environment\n\nBy default there is no Vulkan implementation on MacOS. Diligent Engine loads Vulkan dynamically\nand can use a Vulkan Portability implementation such as [MoltenVK](https://github.com/KhronosGroup/MoltenVK)\nor [gfx-portability](https://github.com/gfx-rs/portability). Install [VulkanSDK](https://vulkan.lunarg.com/sdk/home#mac)\nand make sure that your system is properly configured as described\n[here](https://vulkan.lunarg.com/doc/view/latest/mac/getting_started.html#user-content-sdk-system-paths).\nIn particular, you may need to define the following environment variables (assuming that Vulkan SDK is installed at\n`/Users/MyName/VulkanSDK/1.3.290.0` and you want to use MoltenVK):\n\n```\nexport VULKAN_SDK=/Users/MyName/VulkanSDK/1.3.290.0/macOS\nexport PATH=$VULKAN_SDK/bin:$PATH\nexport DYLD_LIBRARY_PATH=$VULKAN_SDK/lib:$DYLD_LIBRARY_PATH\nexport VK_ADD_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d\nexport VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json\nexport VK_DRIVER_FILES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json\n```\n\nNote that environment variables set in the shell are not seen by the applications launched from Launchpad\nor other desktop GUI. Thus to make sure that an application finds Vulkan libraries, it needs to be started from \nthe command line. Due to the same reason, the xcode project file should also be opened from the shell using \n`open` command. With Xcode versions 7 and later, this behavior may need to be enabled first using the\nfollowing command:\n\n```\ndefaults write com.apple.dt.Xcode UseSanitizedBuildSystemEnvironment -bool NO\n```\n\nPlease refer to [this page](https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html) for more details.\n\n:warning: `DYLD_LIBRARY_PATH` and `LD_LIBRARY_PATH` environment variables are ignored on MacOS unless\nSystem Integrity Protection is disabled (which generally is not recommended). In order for executables to find the\nVulkan library, it must be in rpath. If `VULKAN_SDK` environment variable is set and points to correct location, Diligent\nEngine will configure the rpath for all applications automatically.\n\nLatest tested Vulkan SDK version: 1.3.290.0.\n\n:warning: There are known issues with later versions of the SDK, so it is recommended to use the latest tested version.\n\n\u003ca name=\"build_and_run_ios\"\u003e\u003c/a\u003e\n## iOS\n\nPrerequisites:\n\n* Xcode 14 or later\n* Vulkan SDK 1.3.290.0 or later to enable Vulkan\n\nRun the command below from the engine's root folder to generate Xcode project configured for\n[iOS build](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-or-watchos):\n\n```cmake\ncmake -S . -B ./build/iOS -DCMAKE_SYSTEM_NAME=iOS -G \"Xcode\"\n```\n\nIf needed, you can provide iOS deployment target (13.0 or later is required) as well as other parameters, e.g.:\n\n```cmake\ncmake -S . -B ./build/iOS -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 -G \"Xcode\"\n```\n\n:warning: To build for iPhone simulator, use the `iphonesimulator` system root. You may also use the\n`CMAKE_OSX_ARCHITECTURES` variable to specify target architecture, for example:\n\n```cmake\ncmake -S . -B ./build/iOSSim -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=arm64 -G \"Xcode\"\n```\n\nOpen Xcode project file in `build/IOS` folder and build the engine. To run the applications on an iOS device,\nyou will need to set appropriate development team in the project settings.\n\n### Configuring Vulkan Build Environment\n\nTo enable Vulkan on iOS, download and install the [VulkanSDK](https://vulkan.lunarg.com/sdk/home#mac). There is no Vulkan loader\non iOS, and Diligent Engine links directly with MoltenVK XCFramework (see\n[MoltenVk install guide](https://github.com/KhronosGroup/MoltenVK/blob/master/Docs/MoltenVK_Runtime_UserGuide.md#install-moltenvk-as-a-universal-xcframework))\nthat implements Vulkan on Metal. To enable Vulkan in Diligent Engine on iOS, specify the path to Vulkan SDK \nwhen running CMake, for example (assuming that Vulkan SDK is installed at `/Users/MyName/VulkanSDK/1.3.290.0`):\n\n```cmake\ncmake -DCMAKE_SYSTEM_NAME=iOS -DVULKAN_SDK=/Users/MyName/VulkanSDK/1.3.290.0 -S . -B ./build/iOS -G \"Xcode\"\n```\n\nBy default, the engine links with MoltenVK XCFramework located in Vulkan SDK. If this is not desired or an application wants\nto use a specific library, it can provide the full path to the library via `MOLTENVK_LIBRARY` CMake variable.\n\nRefer to [MoltenVK user guide](https://github.com/KhronosGroup/MoltenVK/blob/master/Docs/MoltenVK_Runtime_UserGuide.md#install)\nfor more information about MoltenVK installation and usage.\n\nLatest tested Vulkan SDK version: 1.3.290.0.\n\n:warning: There are known issues with later versions of the SDK, so it is recommended to use the latest tested version.\n\n\u003ca name=\"build_and_run_web\"\u003e\u003c/a\u003e\n## Web\nBuild prerequisites:\n\n* Emscripten SDK 3.1.65\n* Ninja 1.10.2\n\nTo activate PATH and other environment variables in the current terminal\n````bash\nsource ${PATH_TO_EMSDK}/emsdk/emsdk_env.sh\n````\n:warning: On Windows, run `${PATH_TO_EMSDK}/emsdk/emsdk_env.bat` instead of `source ${PATH_TO_EMSDK}/emsdk/emsdk_env.sh`\n\n\nTo generate project, run the following CMake command from the engine's root folder:\n\n```cmake\nemcmake cmake -S . -B ./build/Emscripten -G \"Ninja\"\n```\n\nTo build the engine, run the following command:\n\n```cmake\ncmake --build ./build/Emscripten\n```\n\nTo test Web applications, run a basic web server\n\n```bash\ncd ./build/Emscripten\npython https_server.py\n```\n\nOpen a browser and navigate to `http://localhost`\n\nFor example, the Hello Triangle tutorial will be available at \n\n```\nhttp://localhost/DiligentSamples/Tutorials/Tutorial01_HelloTriangle/Tutorial01_HelloTriangle.html\n```\n\nTo access the server from another computer on the local network, use the HTTPS server.\nTo enable this, first install the `cryptography` module. You can do so by running the following command:\n\n```bash\npip install cryptography\n```\n\nTo start the HTTPS server, use the following command:\n\n```bash\npython https_server.py --mode=https\n```\n\nUse the HTTPS protocol to open the pages. For example:\n\n```\nhttps://localhost/DiligentSamples/Tutorials/Tutorial01_HelloTriangle/Tutorial01_HelloTriangle.html\n```\n\nWhen using the HTTPS server, unlike with the HTTP server, you may encounter the following error\nwhen loading the page: `net::ERR_CERT_AUTHORITY_INVALID`.\n\nThere are two ways to resolve this issue:\n1. Click the `Advanced` button and then select `Proceed to localhost (unsafe)`.\n2. Alternatively, start the terminal as administrator and run the following command:\n\n```bash\npython https_server.py --mode=https --register\n```\n\nWe use the default ports for HTTP/HTTPS protocols, `80` and `443` respectively. \nIf you already have a server running on those ports, you may specify a different port number using the `--port`\nargument and include the corresponding port number in the URL after the IP address. For example:\n\n```\nhttp://localhost:${YOUR_PORT}/DiligentSamples/Tutorials/Tutorial01_HelloTriangle/Tutorial01_HelloTriangle.html\n```\n\n\u003ca name=\"build_and_run_integration\"\u003e\u003c/a\u003e\n## Integrating Diligent Engine with Existing Build System\n\nDiligent has modular structure, so for your project you can only use those \nsubmodules that implement the required functionality.\nThe diagram below shows the dependencies between modules.\n\n```\n  Core\n   |\n   +------\u003eTools----------.\n   |        |             |\n   |        V             |\n   +-------\u003eFX---------.  |\n   |                   |  |\n   |                   V  V\n   '-----------------\u003eSamples\n```\n\nDon't forget to recursively initialize submodules if you are adding Diligent repos\nas submodules to your project.\n\n### Your Project Uses Cmake\n\nIf your project uses CMake, adding Diligent Engine requires just few lines of code. \nSuppose that the directory structure looks like this:\n\n```\n|\n+-DiligentCore\n+-HelloDiligent.cpp\n```\n\nThen the following steps need to be done:\n* Call `add_subdirectory(DiligentCore)`\n* Add dependencies on the targets implementing required rendering backends\n\nBelow is an example of a CMake file:\n\n```cmake\ncmake_minimum_required (VERSION 3.6)\n\nproject(HelloDiligent CXX)\n\nadd_subdirectory(DiligentCore)\n\nadd_executable(HelloDiligent WIN32 HelloDiligent.cpp)\ntarget_compile_options(HelloDiligent PRIVATE -DUNICODE)\n\ntarget_link_libraries(HelloDiligent\nPRIVATE\n    Diligent-GraphicsEngineD3D11-shared\n    Diligent-GraphicsEngineOpenGL-shared\n    Diligent-GraphicsEngineD3D12-shared\n    Diligent-GraphicsEngineVk-shared\n)\ncopy_required_dlls(HelloDiligent)\n```\n\n`copy_required_dlls()` is a convenience function that copies shared libraries next to\nthe executable so that the system can find and load them. \nPlease also take a look at getting started tutorials for \n[Windows](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial00_HelloWin32) and \n[Linux](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial00_HelloLinux).\n\n#### Static vs Dynamic Linking\n\nOn most platforms, core engine libraries are built in both static and dynamic versions\n(for example, `Diligent-GraphicsEngineD3D12-static` and `Diligent-GraphicsEngineD3D12-shared`).\nYou can choose which version to link with by changing the target name in `target_link_libraries()` CMake command.\nWhen linking with dynamic libraries, the `ENGINE_DLL` macro will be defined, and the libraries will need to be loaded\nat runtime. For example, for Direct3D12 backend:\n\n```cpp\n#if ENGINE_DLL\n// Load the dll and import GetEngineFactoryD3D12() function\nauto GetEngineFactoryD3D12 = LoadGraphicsEngineD3D12();\n#endif\nauto* pFactoryD3D12 = GetEngineFactoryD3D12();\n```\n\nWhen using static linking, the `ENGINE_DLL` macro will not be defined, and the `GetEngineFactoryD3D12` function will be\nstatically linked with the executable.\n\n[SampleApp.cpp](https://github.com/DiligentGraphics/DiligentSamples/blob/master/SampleBase/src/SampleApp.cpp) file provides\nan example of how to initialize the engine on different platforms using static or dynamic linking.\n\n#### Using FetchContent\n\nYou can use [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) to download Diligent Engine modules.\nThe only caveat is that you need to specify the source directory for each module to be the same as the module name,\nso that header files can be found. Below is an example of a CMake file that uses FetchContent:\n\n```cmake\ncmake_minimum_required (VERSION 3.6)\n\nproject(HelloDiligent CXX)\n\ninclude(FetchContent)\nFetchContent_Declare(\n    DiligentCore\n    GIT_REPOSITORY https://github.com/DiligentGraphics/DiligentCore.git\n    SOURCE_DIR _deps/DiligentCore\n)\nFetchContent_Declare(\n    DiligentTools\n    GIT_REPOSITORY https://github.com/DiligentGraphics/DiligentTools.git\n    SOURCE_DIR _deps/DiligentTools\n)\nFetchContent_Declare(\n    DiligentFX\n    GIT_REPOSITORY https://github.com/DiligentGraphics/DiligentFX.git\n    SOURCE_DIR _deps/DiligentFX\n)\nFetchContent_MakeAvailable(DiligentCore DiligentTools DiligentFX)\n\nadd_executable(HelloDiligent WIN32 HelloDiligent.cpp)\ntarget_include_directories(HelloDiligent\nPRIVATE\n    ${diligentcore_SOURCE_DIR}\n    ${diligenttools_SOURCE_DIR}\n    ${diligentfx_SOURCE_DIR}\n)\n\ntarget_compile_definitions(HelloDiligent PRIVATE UNICODE)\n\ntarget_link_libraries(HelloDiligent\nPRIVATE\n    Diligent-BuildSettings\n    Diligent-GraphicsEngineD3D11-shared\n    Diligent-GraphicsEngineD3D12-shared\n    Diligent-GraphicsEngineOpenGL-shared\n    Diligent-GraphicsEngineVk-shared\n    DiligentFX\n)\ncopy_required_dlls(HelloDiligent)\n```\n\n### Your Project Does Not Use Cmake\n\nIf your project doesn't use CMake, it is recommended to build libraries with CMake and add them to your build system.\nYou can download the latest build artifacts from [GitHub](https://github.com/DiligentGraphics/DiligentCore/actions?query=branch%3Amaster).\n\nGlobal CMake installation directory is controlled by\n[CMAKE_INTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) variable. \nNote that it defaults to `/usr/local` on UNIX and `c:/Program Files/${PROJECT_NAME}` on Windows, which may not\nbe what you want. Use `-D CMAKE_INSTALL_PREFIX=install` to use local `install` folder instead:\n\n```\ncmake -S . -B ./build/Win64 -D CMAKE_INSTALL_PREFIX=install -G \"Visual Studio 17 2022\" -A x64\n```\n\nTo install libraries and header files, run the following CMake command from the build folder:\n\n```cmake\ncmake --build . --target install\n```\n\nDiligentCore installation directory will contain everything required to integrate the engine:\n\n* *include* subdirectory will contain all required header files. Add this directory to your include search directories.\n* *lib* subdirectory will contain static libraries.\n* *bin* subdirectory will contain dynamic libraries.\n\nAn easier way is to link with dynamic libraries. When linking statically, you will need to list DiligentCore as well \nas all third-party libraries used by the engine. Besides that, you will also need to specify platform-specific system libraries. \nFor example, for Windows platform, the list of libraries your project will need to link against may look like this:\n\n```\nDiligentCore.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 dxgi.lib d3d11.lib d3d12.lib d3dcompiler.lib opengl32.lib\n```\n\nDiligent Engine headers require one of the following platform macros to be defined as `1`:\n`PLATFORM_WIN32`, `PLATFORM_UNIVERSAL_WINDOWS`, `PLATFORM_ANDROID`, `PLATFORM_LINUX`, `PLATFORM_MACOS`, `PLATFORM_IOS`.\n\nYou can control which components of the engine you want to install using the following CMake options:\n`DILIGENT_INSTALL_CORE`, `DILIGENT_INSTALL_FX`, `DILIGENT_INSTALL_SAMPLES`, and `DILIGENT_INSTALL_TOOLS`.\n\nAnother way to integrate the engine is to generate build files (such as Visual Studio projects) and add them to your\nbuild system. Build customization described below can help tweak the settings for your specific needs.\n\n\n\u003ca name=\"build_option\"\u003e\u003c/a\u003e\n## Build Options\n\nAvailable CMake options are summarized in the table below:\n\n| Option                                  |Default value |     Description                                              |\n|-----------------------------------------|--------------|--------------------------------------------------------------|\n| `DILIGENT_NO_DIRECT3D11`                |     No       | Do not build Direct3D11 backend                              |\n| `DILIGENT_NO_DIRECT3D12`                |     No       | Do not build Direct3D12 backend                              |\n| `DILIGENT_NO_OPENGL`                    |     No       | Do not build OpenGL backend                                  |\n| `DILIGENT_NO_VULKAN`                    |     No       | Do not build Vulkan backend                                  |\n| `DILIGENT_NO_METAL`                     |     No       | Do not build Metal backend                                   |\n| `DILIGENT_NO_WEBGPU`                    |     No       | Do not build WebGPU backend                                  |\n| `DILIGENT_NO_ARCHIVER`                  |     No       | Do not build Archiver                                        |\n| `DILIGENT_NO_RENDER_STATE_PACKAGER`     |     No       | Do not build Render State Packager tool                      |\n| `DILIGENT_ENABLE_DRACO`                 |     No       | Enable Draco compression support in GLTF loader              |\n| `DILIGENT_USE_RAPIDJSON`                |     No       | Use rapidjson parser in GLTF loader                          |\n| `DILIGENT_BUILD_TOOLS`                  |     Yes      | Build Tools module                                           |\n| `DILIGENT_BUILD_FX`                     |     Yes      | Build FX module                                              |\n| `DILIGENT_BUILD_SAMPLES`                |     Yes      | Build Samples module                                         |\n| `DILIGENT_BUILD_SAMPLE_BASE_ONLY`       |     No       | Build only SampleBase project and no other samples/tutorials |\n| `DILIGENT_BUILD_TESTS`                  |     No       | Build Unit Tests                                             |\n| `DILIGENT_NO_GLSLANG`                   |     No       | Do not build GLSLang and SPRIV-Tools                         |\n| `DILIGENT_NO_HLSL`                      |     No       | Disable HLSL support in non-Direct3D backends                |\n| `DILIGENT_NO_FORMAT_VALIDATION`         |     Yes      | Disable source code formatting validation                    |\n| `DILIGENT_LOAD_PIX_EVENT_RUNTIME`       |     No       | Enable PIX event support                                     |\n| `DILIGENT_NVAPI_PATH`                   |              | Path to NVAPI SDK                                            |\n| `DILIGENT_INSTALL_CORE`                 |     Yes      | Install core module                                          |\n| `DILIGENT_INSTALL_TOOLS`                |     Yes      | Install tools module                                         |\n| `DILIGENT_INSTALL_FX`                   |     Yes      | Install FX module                                            |\n| `DILIGENT_INSTALL_SAMPLES`              |     Yes      | Install Samples module                                       |\n| `DILIGENT_INSTALL_PDB`                  |     No       | Install program debug database                               |\n| `DILIGENT_DEAR_IMGUI_PATH`              |              | Optional path to a user-provided dear imgui project          |\n| `DILIGENT_ARGS_DIR`                     |              | Optional path to a user-provided args project                |\n| `DILIGENT_NUKLEAR_DIR`                  |              | Optional path to a user-provided nuklear project             |\n| `DILIGENT_MSVC_COMPILE_OPTIONS`         |              | Additional MSVC compile options for all configurations       |\n| `DILIGENT_MSVC_DEBUG_COMPILE_OPTIONS`   |              | Additional MSVC compile options for debug configuration      |\n| `DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS` |/GL /arch:AVX2| Additional MSVC compile options for release configurations   |\n| `DILIGENT_CLANG_COMPILE_OPTIONS`        |              | Additional Clang compile options for all configurations      |\n| `DILIGENT_CLANG_DEBUG_COMPILE_OPTIONS`  |              | Additional Clang compile options for debug configuration     |\n| `DILIGENT_CLANG_RELEASE_COMPILE_OPTIONS`|    -mavx2    | Additional Clang compile options for release configurations  |\n| `DILIGENT_USD_PATH`                     |              | Path to USD installation folder                              |\n\nBy default, all back-ends available on the current platform are built. To disable specific back-ends,\nuse the following options: `DILIGENT_NO_DIRECT3D11`, `DILIGENT_NO_DIRECT3D12`, `DILIGENT_NO_OPENGL`,\n`DILIGENT_NO_VULKAN`, `DILIGENT_NO_METAL`, `DILIGENT_NO_WEBGPU`. WebGPU backend is enabled by default when building\nfor the Web. To enable it on other platforms, use `DILIGENT_NO_WEBGPU=OFF`.\nThe options can be set through cmake UI or from the command line as in the example below:\n\n```\ncmake -D DILIGENT_NO_DIRECT3D11=TRUE -S . -B ./build/Win64 -G \"Visual Studio 17 2022\" -A x64\n```\n\nAdditionally, individual engine components can be enabled or disabled using the following options:\n`DILIGENT_BUILD_TOOLS`, `DILIGENT_BUILD_FX`, `DILIGENT_BUILD_SAMPLES`.\nIf you only want to build `SampleBase` project, you can use `DILIGENT_BUILD_SAMPLE_BASE_ONLY` option.\n\nBy default Vulkan back-end is linked with glslang that enables compiling HLSL and GLSL shaders to SPIRV at run time.\nIf run-time compilation is not required, glslang can be disabled with `DILIGENT_NO_GLSLANG` cmake option. \nAdditionally, HLSL support in non-Direct3D backends can be disabled with `DILIGENT_NO_HLSL` option.\nEnabling the options significantly reduces the size of Vulkan and OpenGL back-end binaries, which may be\nespecially important for mobile applications.\n\nDiligent Engine uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to ensure consistent\nformatting throughout the code base. The validation can be disabled using `DILIGENT_NO_FORMAT_VALIDATION`\nCMake option. Note that any pull request will fail if formatting issues are found.\n\nDiligent Engine uses extensive validation that is always enabled in Debug build. Some of the checks may be\nenabled in release configurations by setting `DILIGENT_DEVELOPMENT` CMake option.\n\nTo enable PIX events support, set `DILIGENT_LOAD_PIX_EVENT_RUNTIME` CMake flag.\n\nTo enable some advanced features on NVidia GPUs (such as native multi draw indirect support in Direct3D11),\ndownload [NVAPI](https://developer.nvidia.com/nvapi) and set the `DILIGENT_NVAPI_PATH` CMake variable. \n\nDiligent Engine uses multiple third-party libraries. If an application's CMake file defines any of\nthose libraries, Diligent will use existing targets. The application will need to make sure that\nbuild settings are compatible with Diligent.\n\n\u003ca name=\"build_and_run_customizing\"\u003e\u003c/a\u003e\n## Customizing Build\n\nDiligent Engine allows clients to customize build settings by providing configuration script file that defines the following optional \n[cmake functions](https://cmake.org/cmake/help/latest/command/function.html):\n\n* `custom_configure_build()` - defines global build properties such as build configurations, c/c++ compile flags, link flags etc.\n* `custom_pre_configure_target()` - defines custom settings for every target in the build and is called before the engine's\n                                    build system starts configuring the target.\n* `custom_post_configure_target()` - called after the engine's build system has configured the target to let the client\n                                     override properties set by the engine.\n\nThe path to the configuration script should be provided through `BUILD_CONFIGURATION_FILE` variable when running \ncmake and must be relative to the cmake root folder, for example:\n\n```\ncmake -D BUILD_CONFIGURATION_FILE=BuildConfig.cmake -S . -B ./build/Win64 -G \"Visual Studio 17 2022\" -A x64\n```\n\n### Customizing global build settings with custom_configure_build() function\n\nIf defined, `custom_configure_build()` function is called before any build target is added. By default,\ncmake defines the following four configurations: Debug, Release, RelWithDebInfo, MinSizeRel. If you want, \nyou can define your own build configurations by setting `CMAKE_CONFIGURATION_TYPES` variable. For instance,\nif you want to have only two configuration: Debug and ReleaseMT, add the following line to the `custom_configure_build()`\nfunction:\n\n```cmake\nset(CMAKE_CONFIGURATION_TYPES Debug ReleaseMT CACHE STRING \"Configuration types: Debug, ReleaseMT\" FORCE)\n```\n\nThe build system needs to know the list of debug and release (optimized) configurations, so the following\ntwo variables must also be set when `CMAKE_CONFIGURATION_TYPES` variable is defined:\n\n```cmake\nset(DEBUG_CONFIGURATIONS DEBUG CACHE INTERNAL \"\" FORCE)\nset(RELEASE_CONFIGURATIONS RELEASEMT CACHE INTERNAL \"\" FORCE)\n```\n\nNote that due to cmake specifics, configuration names listed in `DEBUG_CONFIGURATIONS` and `RELEASE_CONFIGURATIONS`\n**must be capitalized**.\n\nIf you define any configuration other than four standard cmake ones, you also need to set the following variables, for every\nnew configuration:\n\n* `CMAKE_C_FLAGS_\u003cConfig\u003e` - c compile flags\n* `CMAKE_CXX_FLAGS_\u003cConfig\u003e` - c++ compile flags\n* `CMAKE_EXE_LINKER_FLAGS_\u003cConfig\u003e` - executable link flags\n* `CMAKE_SHARED_LINKER_FLAGS_\u003cConfig\u003e` - shared library link flags\n\nFor instance:\n\n```cmake\nset(CMAKE_C_FLAGS_RELEASEMT \"/MT\" CACHE INTERNAL \"\" FORCE)\nset(CMAKE_CXX_FLAGS_RELEASEMT \"/MT\" CACHE INTERNAL \"\" FORCE)\nset(CMAKE_EXE_LINKER_FLAGS_RELEASEMT \"/OPT:REF\" CACHE INTERNAL \"\" FORCE)\nset(CMAKE_SHARED_LINKER_FLAGS_RELEASEMT \"/OPT:REF\" CACHE INTERNAL \"\" FORCE)\n```\n\nBelow is an example of custom_configure_build() function:\n\n```cmake\nfunction(custom_configure_build)\n    if(CMAKE_CONFIGURATION_TYPES)\n        # Debug configurations\n        set(DEBUG_CONFIGURATIONS DEBUG CACHE INTERNAL \"\" FORCE)\n        # Release (optimized) configurations\n        set(RELEASE_CONFIGURATIONS RELEASEMT CACHE INTERNAL \"\" FORCE)\n        # CMAKE_CONFIGURATION_TYPES variable defines build configurations generated by cmake\n        set(CMAKE_CONFIGURATION_TYPES Debug ReleaseMT CACHE STRING \"Configuration types: Debug, ReleaseMT\" FORCE)\n\n        set(CMAKE_CXX_FLAGS_RELEASEMT \"/MT\" CACHE INTERNAL \"\" FORCE)\n        set(CMAKE_C_FLAGS_RELEASEMT \"/MT\" CACHE INTERNAL \"\" FORCE)\n        set(CMAKE_EXE_LINKER_FLAGS_RELEASEMT \"/OPT:REF\" CACHE INTERNAL \"\" FORCE)\n        set(CMAKE_SHARED_LINKER_FLAGS_RELEASEMT \"/OPT:REF\" CACHE INTERNAL \"\" FORCE)\n    endif()\nendfunction()\n```\n\n\n### Customizing individual target build settings with custom_pre_configure_target() and custom_post_configure_target() functions\n\nIf defined, `custom_pre_configure_target()` is called for every target created by the build system and\nallows configuring target-specific properties.\n\nBy default, the build system sets some target properties. If `custom_pre_configure_target()` sets all required properties,\nit can tell the build system that no further processing is required by setting `TARGET_CONFIGURATION_COMPLETE`\n[parent scope](https://cmake.org/cmake/help/latest/command/set.html#set-normal-variable) variable to `TRUE`:\n\n```cmake\nset(TARGET_CONFIGURATION_COMPLETE TRUE PARENT_SCOPE)\n```\n\nThe following is an example of `custom_pre_configure_target()` function:\n\n```cmake\nfunction(custom_pre_configure_target TARGET)\n    set_target_properties(${TARGET} PROPERTIES\n        STATIC_LIBRARY_FLAGS_RELEASEMT /LTCG\n    )\n    set(TARGET_CONFIGURATION_COMPLETE TRUE PARENT_SCOPE)   \nendfunction()\n```\n\nIf the client only needs to override some settings, it may define `custom_post_configure_target()` function that is called\nafter the engine has completed configuring the target, for example:\n\n```cmake\nfunction(custom_post_configure_target TARGET)\n    set_target_properties(${TARGET} PROPERTIES\n        CXX_STANDARD 17\n    )\nendfunction()\n```\n\n\n\u003ca name=\"getting_started\"\u003e\u003c/a\u003e\n# Getting started with the API\n\nPlease refer to [this page](https://github.com/DiligentGraphics/DiligentCore#api-basics). Also, tutorials and samples listed below is a good place to start.\n\n\n\u003ca name=\"render_state_notation\"\u003e\u003c/a\u003e\n# Render State Notation\n\nDiligent Render State Notation is a JSON-based language that describes shaders, pipeline states,\nresource signatures and other objects in a convenient form, e.g.:\n\n```json\n{\n    \"Shaders\": [\n        {\n            \"Desc\": {\n                \"Name\": \"My Vertex shader\",\n                \"ShaderType\": \"VERTEX\"\n            },\n            \"SourceLanguage\": \"HLSL\",\n            \"FilePath\": \"cube.vsh\"\n        },\n        {\n            \"Desc\": {\n                \"Name\": \"My Pixel shader\",\n                \"ShaderType\": \"PIXEL\"\n            },\n            \"SourceLanguage\": \"HLSL\",\n            \"FilePath\": \"cube.psh\",\n        }\n    ],\n    \"Pipeleines\": [\n        {\n            \"GraphicsPipeline\": {\n                \"DepthStencilDesc\": {\n                    \"DepthEnable\": true\n                },\n                \"RTVFormats\": {\n                    \"0\": \"RGBA8_UNORM_SRGB\"\n                },\n                \"RasterizerDesc\": {\n                    \"CullMode\": \"FRONT\"\n                },\n                \"BlendDesc\": {\n                    \"RenderTargets\": {\n                        \"0\": {\n                            \"BlendEnable\": true\n                        }\n                    }\n                }\n            },\n            \"PSODesc\": {\n                \"Name\": \"My Pipeline State\",\n                \"PipelineType\": \"GRAPHICS\"\n            },\n            \"pVS\": \"My Vertex shader\",\n            \"pPS\": \"My Pixel shader\"\n        }\n    ]\n}\n```\n\nJSON files can be [parsed dynamically at run time](https://github.com/DiligentGraphics/DiligentTools/tree/master/RenderStateNotation/interface).\nAlternatively, an application can use the [packager tool](https://github.com/DiligentGraphics/DiligentTools/tree/master/RenderStatePackager) to preprocess pipeline\ndescriptions (compile shaders for target platforms, define internal resource layouts, etc.) into a binary archive optimized for run-time loading performance.\n\n\n\u003ca name=\"tutorials\"\u003e\u003c/a\u003e\n# [Tutorials](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials)\n\n| Tutorial   | Screenshot  | Description          |\n|------------|-------------|----------------------|\n| [01 - Hello Triangle](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial01_HelloTriangle) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial01_HelloTriangle/Tutorial01_HelloTriangle.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial01_HelloTriangle/Screenshot.png) | This tutorial shows how to render simple triangle using Diligent Engine API. |\n| [02 - Cube](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial02_Cube) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial02_Cube/Tutorial02_Cube.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial02_Cube/Animation_Small.gif) | 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. |\n| [03 - Texturing](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial03_Texturing) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial03_Texturing/Tutorial03_Texturing.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial03_Texturing/Animation_Small.gif) | 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. |\n| [03 - Texturing-C](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial03_Texturing-C) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial03_Texturing/Animation_Small.gif) | This tutorial is identical to Tutorial03, but is implemented using C API. |\n| [03 - Texturing-DotNet](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial03_Texturing-DotNet) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial03_Texturing/Animation_Small.gif) | This tutorial demonstrates how to use the Diligent Engine API in .NET applications. |\n| [04 - Instancing](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial04_Instancing) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial04_Instancing/Tutorial04_Instancing.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial04_Instancing/Animation_Small.gif) | This tutorial demonstrates how to use instancing to render multiple copies of one object using unique transformation matrix for every copy. |\n| [05 - Texture Array](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial05_TextureArray) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial05_TextureArray/Tutorial05_TextureArray.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial05_TextureArray/Animation_Small.gif) | This tutorial demonstrates how to combine instancing with texture arrays to use unique texture for every instance. |\n| [06 - Multithreading](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial06_Multithreading) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial06_Multithreading/Tutorial06_Multithreading.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial06_Multithreading/Animation_Small.gif) | This tutorial shows how to generate command lists in parallel from multiple threads. |\n| [07 - Geometry Shader](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial07_GeometryShader) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial07_GeometryShader/Animation_Small.gif) | This tutorial shows how to use geometry shader to render smooth wireframe. |\n| [08 - Tessellation](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial08_Tessellation) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial08_Tessellation/Animation_Small.gif) | This tutorial shows how to use hardware tessellation to implement simple adaptive terrain rendering algorithm. |\n| [09 - Quads](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial09_Quads) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial09_Quads/Tutorial09_Quads.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial09_Quads/Animation_Small.gif) | This tutorial shows how to render multiple 2D quads, frequently switching textures and blend modes. |\n| [10 - Data Streaming](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial10_DataStreaming) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial10_DataStreaming/Tutorial10_DataStreaming.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial10_DataStreaming/Animation_Small.gif) | 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. |\n| [11 - Resource Updates](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial11_ResourceUpdates) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial11_ResourceUpdates/Tutorial11_ResourceUpdates.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial11_ResourceUpdates/Animation_Small.gif) | 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. |\n| [12 - Render Target](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial12_RenderTarget) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial12_RenderTarget/Tutorial12_RenderTarget.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial12_RenderTarget/Animation_Small.gif) | This tutorial demonstrates how to render a 3d cube into an offscreen render target and do a simple post-processing effect. |\n| [13 - Shadow Map](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial13_ShadowMap) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial13_ShadowMap/Tutorial13_ShadowMap.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial13_ShadowMap/Animation_Small.gif) | This tutorial demonstrates how to render basic shadows using a shadow map. |\n| [14 - Compute Shader](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial14_ComputeShader) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial14_ComputeShader/Tutorial14_ComputeShader.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial14_ComputeShader/Animation_Small.gif) | This tutorial shows how to implement a simple particle simulation system using compute shaders. |\n| [15 - Multiple Windows](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial15_MultipleWindows) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial15_MultipleWindows/Screenshot.png) | This tutorial demonstrates how to use Diligent Engine to render to multiple windows. |\n| [16 - Bindless Resources](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial16_BindlessResources) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial16_BindlessResources/Tutorial16_BindlessResources.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial16_BindlessResources/Animation_Small.gif) | 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. |\n| [17 - MSAA](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial17_MSAA)  \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial17_MSAA/Tutorial17_MSAA.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial17_MSAA/Animation_Small.gif) | This tutorial demonstrates how to use multisample anti-aliasing (MSAA) to make geometrical edges look smoother and more temporarily stable. |\n| [18 - Queries](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial18_Queries) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial18_Queries/Tutorial18_Queries.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial18_Queries/Animation_Small.gif) | 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. |\n| [19 - Render Passes](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial19_RenderPasses) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial19_RenderPasses/Tutorial19_RenderPasses.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial19_RenderPasses/Animation_Small.gif) | This tutorial demonstrates how to use the render passes API to implement simple deferred shading. |\n| [20 - Mesh Shader](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial20_MeshShader) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial20_MeshShader/Animation_Small.gif) | 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. |\n| [21 - Ray Tracing](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial21_RayTracing) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial21_RayTracing/Animation_Small.gif) | This tutorial demonstrates the basics of using ray tracing API in Diligent Engine. |\n| [22 - Hybrid Rendering](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial22_HybridRendering) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial22_HybridRendering/Animation_Small.gif) | This tutorial demonstrates how to implement a simple hybrid renderer that combines rasterization with ray tracing. |\n| [23 - Command Queues](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial23_CommandQueues) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial23_CommandQueues/Animation_Small.gif) | This tutorial demonstrates how to use multiple command queues to perform rendering in parallel with copy and compute operations. |\n| [24 - Variable Rate Shading](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial24_VRS) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial24_VRS/Animation_Small.gif) | This tutorial demonstrates how to use variable rate shading to reduce the pixel shading load. |\n| [25 - Render State Packager](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial25_StatePackager) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial25_StatePackager/Screenshot.jpg) | This tutorial shows how to create and archive pipeline states with the render state packager off-line tool on the example of a simple path tracer. |\n| [26 - Render State Cache](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial26_StateCache) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial26_StateCache/Tutorial26_StateCache.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial26_StateCache/Screenshot.jpg) | This tutorial expands the path tracing technique implemented in previous tutorial and demonstrates how to use the render state cache to save pipeline states created at run time and load them when the application starts. |\n| [27 - Post-Processing](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial27_PostProcessing) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial27_PostProcessing/Tutorial27_PostProcessing.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial27_PostProcessing/Screenshot.jpg) | This tutorial demonstrates how to use post-processing effects from the DiligentFX module. |\n| [28 - OpenXR](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial28_HelloOpenXR) |    | This tutorial demonstrates how to use Diligent Engine with OpenXR API to render a simple scene in a VR headset. |\n| [29 - OIT](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial29_OIT) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Tutorial29_OIT/Tutorial29_OIT.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Tutorials/Tutorial29_OIT/Animation_Small.gif) | This tutorial demonstrates how to implement order-independent transparency (OIT) methods to render transparent objects without sorting. |\n\n\u003ca name=\"samples\"\u003e\u003c/a\u003e\n# [Samples](https://github.com/DiligentGraphics/DiligentSamples)\n\n| Sample     | Screenshot  | Description          |\n|------------|-------------|----------------------|\n| [Atmosphere Sample](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/Atmosphere) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Atmosphere/Atmosphere.html) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/Atmosphere/Animation_Small.gif) | This sample demonstrates how to integrate [Epipolar Light Scattering](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/EpipolarLightScattering) post-processing effect into an application to render physically-based atmosphere. |\n| [GLFW Demo](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/GLFWDemo) | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/GLFWDemo/Animation_Small.gif) | This maze mini-game demonstrates how to use GLFW to create window and handle keyboard and mouse input. |\n| [GLTF Viewer](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/GLTFViewer) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/GLTFViewer/GLTFViewer.html) | \u003cimg src=\"https://github.com/DiligentGraphics/DiligentFX/blob/master/PBR/screenshots/flight_helmet.jpg\" width=240\u003e | This sample demonstrates how to use the [Asset Loader](https://github.com/DiligentGraphics/DiligentTools/tree/master/AssetLoader) and [PBR Renderer](https://github.com/DiligentGraphics/DiligentFX/tree/master/PBR) to load and render GLTF models. |\n| [USD Viewer](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/USDViewer) | \u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/USDViewer/Screenshot.jpg\" width=240\u003e | This sample demonstrates how to render USD files using [Hydrogent](https://github.com/DiligentGraphics/DiligentFX/tree/master/Hydrogent), an implementation of the Hydra rendering API in Diligent Engine. |\n| [Shadows](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/Shadows) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/Shadows/Shadows.html) | \u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/Shadows/Screenshot.jpg\" width=240\u003e | This sample demonstrates how to use the [Shadowing component](https://github.com/DiligentGraphics/DiligentFX/tree/master/Components#shadows) to render high-quality shadows. |\n| [Dear ImGui Demo](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/ImguiDemo) \u003cbr /\u003e\u003cbr /\u003e [:arrow_forward: Run](https://diligentgraphics.github.io/wasm-modules/ImguiDemo/ImguiDemo.html) | \u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/ImguiDemo/Screenshot.png\" width=240\u003e | This sample demonstrates the integration of the engine with [dear imgui](https://github.com/ocornut/imgui) UI library. |\n| [Nuklear Demo](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/NuklearDemo)  | \u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/NuklearDemo/Screenshot.png\" width=240\u003e | This sample demonstrates the integration of the engine with [nuklear](https://github.com/vurtun/nuklear) UI library. |\n| [Hello AR](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Android/HelloAR) | \u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/Android/HelloAR/Screenshot.png\" width=240\u003e | This sample demonstrates how to use Diligent Engine in a basic Android AR application. |\n| [Asteroids](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/Asteroids) |  \u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/Asteroids/Screenshot.png\" width=240\u003e | This sampple is a performance benchmark that renders 50,000 unique textured asteroids and allows comparing performance of different rendering modes. |\n| [Unity Integration Demo](https://github.com/DiligentGraphics/DiligentSamples/tree/master/UnityPlugin) | \u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/UnityPlugin/GhostCubePlugin/Screenshot.png\" width=240\u003e | This project demonstrates integration of Diligent Engine with Unity. |\n\n\n\u003ca name=\"high_level_components\"\u003e\u003c/a\u003e\n# High-Level Rendering Components\n\nHigh-level rendering functionality is implemented by [DiligentFX module](https://github.com/DiligentGraphics/DiligentFX).\nThe following components are now available:\n\n\u003ca name=\"gltf_loader_and_renderer\"\u003e\u003c/a\u003e\n* [GLTF2.0 Loader](https://github.com/DiligentGraphics/DiligentTools/tree/master/AssetLoader)\n  and [Physically-based renderer with image-based lighting](https://github.com/DiligentGraphics/DiligentFX/tree/master/PBR).\n  \n|||\n|-----------------|-----------------|\n| ![](https://github.com/DiligentGraphics/DiligentFX/blob/master/PBR/screenshots/damaged_helmet.jpg) | ![](https://github.com/DiligentGraphics/DiligentFX/blob/master/PBR/screenshots/flight_helmet.jpg) |\n| ![](https://github.com/DiligentGraphics/DiligentFX/blob/master/PBR/screenshots/mr_spheres.jpg)     | ![](https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/GLTFViewer/screenshots/cesium_man_large.gif)  |\n\n\n* [Hydrogent](https://github.com/DiligentGraphics/DiligentFX/tree/master/Hydrogent), an implementation of the Hydra rendering API in Diligent Engine.\n\u003cimg src=\"https://github.com/DiligentGraphics/DiligentSamples/blob/master/Samples/USDViewer/Screenshot.jpg\" width=400\u003e\n\n* [Shadows](https://github.com/DiligentGraphics/DiligentFX/tree/master/Components#shadows)\n\u003cimg src=\"https://github.com/DiligentGraphics/DiligentFX/blob/master/Components/media/Powerplant-Shadows.jpg\" width=400\u003e\n\n### Post-processing effects\n\n* [Screen-Space Reflections](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/ScreenSpaceReflection)\n\u003cimg src=\"https://github.com/DiligentGraphics/DiligentFX/blob/master/PostProcess/ScreenSpaceReflection/media/ssr-logo.jpg\" width=400\u003e\n\n* [Screen-Space Ambient Occlusion](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/ScreenSpaceAmbientOcclusion)\n\u003cimg src=\"https://github.com/DiligentGraphics/DiligentFX/blob/master/PostProcess/ScreenSpaceAmbientOcclusion/media/ssao-kitchen.jpg\" width=400\u003e\n\n* [Depth of Field](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/DepthOfField)\n\u003cimg src=\"https://github.com/DiligentGraphics/DiligentFX/blob/master/PostProcess/DepthOfField/media/depth_of_field.jpg\" width=400\u003e\n\n* [Bloom](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/Bloom)\n\u003cimg src=\"https://github.com/DiligentGraphics/DiligentFX/blob/master/PostProcess/Bloom/media/bloom.jpg\" width=400\u003e\n\n* [Epipolar light scattering](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/EpipolarLightScattering)\n\u003cimg src=\"https://github.com/DiligentGraphics/DiligentFX/blob/master/PostProcess/EpipolarLightScattering/media/LightScattering.png\" width=400\u003e\n\n* [Temporal Anti-Aliasing](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/TemporalAntiAliasing)\n\n* [Tone mapping shader utilities](https://github.com/DiligentGraphics/DiligentFX/tree/master/Shaders/PostProcess/ToneMapping/public)\n\n\n\u003ca name=\"products\"\u003e\u003c/a\u003e\n# Products using Diligent Engine\n\nWe would appreciate it if you could send us a link in case your product uses Diligent Engine.\n\n* Large-scale terrain visualization system for pilot training simulators by [Elbit Systems](https://elbitsystems.com/)\n  \u003cimg src=\"https://github.com/DiligentGraphics/DiligentEngine/blob/master/Media/DiligentTerrain.jpg\" width=600\u003e\n\n* [LumenRT](https://www.bentley.com/software/bentley-lumenrt/): A Visualization and Reality Modeling Software by [Bentley Systems](https://www.bentley.com/)\n\n* [Godus](https://apps.apple.com/gb/app/godus/id815181808): An award-winning sandbox game by [22cans](http://22cans.com/)  \n  \u003cimg src=\"http://22cans.com/wp-content/uploads/2016/11/godus_header1-01.jpg\" width=600\u003e\n\n* [Vrmac Graphics](https://github.com/Const-me/Vrmac): A cross-platform graphics library for .NET  \n  \u003cimg src=\"https://github.com/Const-me/Vrmac/blob/master/screenshots/Linux/TigerFullHD-1.png\" width=600\u003e\n\n\n\u003ca name=\"disclaimer\"\u003e\u003c/a\u003e\n## Disclaimer\n\nDiligent Engine is an open project that may be freely used by everyone. We started it to empower the community\nand help people achieve their goals. Sadly enough, not everyone's goals are worthy. Please don't associate us with\nsuspicious projects you may find on the Web that appear to be using Diligent Engine. We neither can possibly track\nall such uses nor can we really do anything about them because our permissive license does not give us a lot of leverage. \n\n\n\u003ca name=\"license\"\u003e\u003c/a\u003e\n# License\n\nSee [Apache 2.0 license](License.txt).\n\nEach module has some third-party dependencies, each of which may have independent licensing:\n\n* [Core module](https://github.com/DiligentGraphics/DiligentCore#license)\n* [Tools module](https://github.com/DiligentGraphics/DiligentTools#license)\n* [Samples module](https://github.com/DiligentGraphics/DiligentSamples#license)\n\n\u003ca name=\"contributing\"\u003e\u003c/a\u003e\n# Contributing\n\nTo contribute your code, submit a [Pull Request](https://github.com/DiligentGraphics/DiligentEngine/pulls) \nto this repository. **Diligent Engine** is licensed under the [Apache 2.0 license](License.txt) that guarantees \nthat content in the **DiligentEngine** repository is free of Intellectual Property encumbrances.\nIn submitting any content to this repository,\n[you license that content under the same terms](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-terms-of-service#6-contributions-under-repository-license),\nand you agree that the content is free of any Intellectual Property claims and you have the right to license it under those terms. \n\nDiligent Engine uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to ensure\nconsistent source code style throughout the code base. The format is validated by CI\nfor each commit and pull request, and the build will fail if any code formatting issue is found. Please refer\nto [this page](https://github.com/DiligentGraphics/DiligentCore/blob/master/doc/code_formatting.md) for instructions\non how to set up clang-format and automatic code formatting.\n\n\u003ca name=\"references\"\u003e\u003c/a\u003e\n# References\n\n[Coding Guidelines](https://github.com/DiligentGraphics/DiligentCore/blob/master/doc/CodingGuidelines.md)\n\n[Performance Best Practices](https://github.com/DiligentGraphics/DiligentCore/blob/master/doc/PerformanceGuide.md)\n\n[Code Formatting](https://github.com/DiligentGraphics/DiligentCore/blob/master/doc/code_formatting.md)\n\n\n\u003ca name=\"release_history\"\u003e\u003c/a\u003e\n# Release History\n\nSee [Release History](ReleaseHistory.md)\n\n------------------------------\n\n[diligentgraphics.com](http://diligentgraphics.com)\n\n[![Diligent Engine on Twitter](https://github.com/DiligentGraphics/DiligentCore/blob/master/media/twitter.png)](https://twitter.com/diligentengine)\n[![Diligent Engine on Facebook](https://github.com/DiligentGraphics/DiligentCore/blob/master/media/facebook.png)](https://www.facebook.com/DiligentGraphics/)\n","funding_links":[],"categories":["Graphics","Batchfile","Code","GameEngine Design","Libraries \u0026 Frameworks:","Computer Graphics","Libraries","Engines","Bachelor-Level","**Engines**"],"sub_categories":["Engines and Frameworks","Graphics","Graphics Rendering Libraries/Frameworks","C++","B.Sc.: Bonusliste"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDiligentGraphics%2FDiligentEngine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDiligentGraphics%2FDiligentEngine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDiligentGraphics%2FDiligentEngine/lists"}