├── .clang-format ├── .github ├── issue_template.md └── workflows │ ├── build-android.yml │ ├── build-apple.yml │ ├── build-emscripten.yml │ ├── build-linux.yml │ ├── build-windows.yml │ └── trigger-build-web-page.yml ├── .gitignore ├── .gitmodules ├── .vscode ├── .gitignore ├── launch.json ├── settings.json └── tasks.json ├── CMakeLists.txt ├── Doc ├── .gitignore ├── CMakeLists.txt ├── README.md ├── doxygen.cfg ├── footer.html ├── md_filter.py ├── md_pages.py └── md_utils.py ├── License.txt ├── Media └── DiligentTerrain.jpg ├── README.md ├── ReleaseHistory.md ├── Tests ├── test_all.bat └── test_samples.bat ├── Troubleshooting.md └── appveyor.yml /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # https://clang.llvm.org/docs/ClangFormatStyleOptions.html 3 | 4 | Language: Cpp 5 | # BasedOnStyle: Microsoft 6 | 7 | # The extra indent or outdent of access modifiers, e.g. public:. 8 | AccessModifierOffset: -4 9 | # class 10 | # { 11 | # public: 12 | # 13 | 14 | 15 | # If true, horizontally aligns arguments after an open bracket. 16 | # This applies to round brackets (parentheses), angle brackets and square brackets. 17 | AlignAfterOpenBracket: Align 18 | # Align: 19 | # someLongFunction(argument1, 20 | # argument2); 21 | 22 | 23 | # If true, aligns consecutive C/C++ preprocessor macros. 24 | AlignConsecutiveMacros: true 25 | # true: 26 | # #define SHORT_NAME 42 27 | # #define LONGER_NAME 0x007f 28 | # #define EVEN_LONGER_NAME (2) 29 | # #define foo(x) (x * x) 30 | # #define bar(y, z) (y + z) 31 | 32 | 33 | # If true, aligns consecutive assignments. 34 | AlignConsecutiveAssignments: true 35 | # true: 36 | # int aaaa = 12; 37 | # int b = 23; 38 | # int ccc = 23; 39 | 40 | 41 | # If true, aligns consecutive declarations. 42 | AlignConsecutiveDeclarations: true 43 | # true: 44 | # int aaaa = 12; 45 | # float b = 23; 46 | # std::string ccc = 23; 47 | 48 | 49 | AlignEscapedNewlines: Left 50 | # Left: 51 | # #define A \ 52 | # int aaaa; \ 53 | # int b; \ 54 | # int dddddddddd; 55 | 56 | 57 | # If true, horizontally align operands of binary and ternary expressions. 58 | AlignOperands: false 59 | 60 | 61 | # If true, aligns trailing comments. 62 | AlignTrailingComments: true 63 | # true: 64 | # int a; // My comment a 65 | # int b = 2; // comment b 66 | 67 | 68 | # If a function call or braced initializer list doesn't fit on a line, 69 | # allow putting all arguments onto the next line, even if BinPackArguments is false. 70 | AllowAllArgumentsOnNextLine: true 71 | # true: 72 | # callFunction(a, 73 | # b, 74 | # c, 75 | # d); 76 | 77 | 78 | # If a constructor definition with a member initializer list doesn't fit on a single line, 79 | # allow putting all member initializers onto the next line, if 'ConstructorInitializerAllOnOneLineOrOnePerLine' 80 | # is true. Note that this parameter has no effect if 'ConstructorInitializerAllOnOneLineOrOnePerLine' is false. 81 | AllowAllConstructorInitializersOnNextLine: true 82 | # true: 83 | # MyClass::MyClass() : 84 | # member0(0), member1(2) {} 85 | 86 | 87 | # If the function declaration doesn't fit on a line, allow putting all parameters 88 | # of a function declaration onto the next line even if BinPackParameters is false. 89 | AllowAllParametersOfDeclarationOnNextLine: false 90 | #false: 91 | #void myFunction(int a, 92 | # int b, 93 | # int c); 94 | 95 | 96 | AllowShortBlocksOnASingleLine: Always 97 | # Always: 98 | # while (true) {} 99 | # while (true) {continue;} 100 | 101 | 102 | AllowShortCaseLabelsOnASingleLine: true 103 | # true: 104 | # switch (a) 105 | # { 106 | # case 1: x = 1; break; 107 | 108 | 109 | AllowShortFunctionsOnASingleLine: All 110 | AllowShortLambdasOnASingleLine: Inline 111 | AllowShortIfStatementsOnASingleLine: Always 112 | AllowShortLoopsOnASingleLine: true 113 | 114 | # The function definition return type breaking style to use. 115 | # This option is deprecated and is retained for backwards compatibility. 116 | AlwaysBreakAfterDefinitionReturnType: None 117 | 118 | AlwaysBreakAfterReturnType: None 119 | AlwaysBreakBeforeMultilineStrings: false 120 | AlwaysBreakTemplateDeclarations: No 121 | 122 | # If false, a function call's arguments will either be all on the same line or will have one line each. 123 | BinPackArguments: true 124 | # false: 125 | # void f() { 126 | # f(aaaaaaaaaaaaaaaaaaaa, 127 | # aaaaaaaaaaaaaaaaaaaa, 128 | # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); 129 | # } 130 | 131 | 132 | # If false, a function declaration's or function definition's parameters will 133 | # either all be on the same line or will have one line each. 134 | BinPackParameters: false 135 | # false: 136 | # void f(int aaaaaaaaaaaaaaaaaaaa, 137 | # int aaaaaaaaaaaaaaaaaaaa, 138 | # int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {} 139 | 140 | 141 | # Cuatom: Configure each individual brace in BraceWrapping. 142 | BreakBeforeBraces: Custom 143 | 144 | BraceWrapping: 145 | AfterCaseLabel: true 146 | # true: 147 | # case 1 148 | # { 149 | # bar(); 150 | # break; 151 | # } 152 | 153 | 154 | AfterClass: true 155 | # true: 156 | # class A 157 | # { 158 | 159 | 160 | # Only wrap braces after a multi-line control statement. 161 | AfterControlStatement: Always 162 | # MultiLine: 163 | # if (foo && bar) 164 | # { 165 | # quux(); 166 | # } 167 | # while (foo || bar) 168 | # {} 169 | 170 | 171 | AfterEnum: true 172 | # true: 173 | # enum X : int 174 | # { 175 | # B 176 | # }; 177 | 178 | 179 | AfterFunction: true 180 | # void foo() 181 | # { 182 | # bar(); 183 | # bar2(); 184 | # } 185 | 186 | 187 | AfterNamespace: true 188 | # true: 189 | # namespace 190 | # { 191 | # int foo(); 192 | 193 | 194 | # Wrap ObjC definitions (interfaces, implementations...). @autoreleasepool and @synchronized 195 | # blocks are wrapped according to AfterControlStatement flag. 196 | AfterObjCDeclaration: true 197 | 198 | 199 | AfterStruct: true 200 | # true: 201 | # struct foo 202 | # { 203 | # int x; 204 | # }; 205 | 206 | 207 | AfterUnion: true 208 | # true: 209 | # union foo 210 | # { 211 | # int x; 212 | # } 213 | 214 | 215 | AfterExternBlock: true 216 | # true: 217 | # extern "C" 218 | # { 219 | # int foo(); 220 | # } 221 | 222 | 223 | BeforeCatch: true 224 | # true: 225 | # } 226 | # catch () 227 | 228 | 229 | BeforeElse: true 230 | # true: 231 | # } 232 | # else 233 | 234 | 235 | # Indent the wrapped braces themselves. 236 | IndentBraces: false 237 | 238 | # If false, empty function body can be put on a single line 239 | SplitEmptyFunction: false 240 | 241 | # If false, empty record (e.g. class, struct or union) body can be put on a single line. 242 | SplitEmptyRecord: false 243 | 244 | # If false, empty namespace body can be put on a single line. 245 | SplitEmptyNamespace: false 246 | 247 | # The way to wrap binary operators. 248 | BreakBeforeBinaryOperators: None 249 | 250 | 251 | BreakBeforeInheritanceComma: false 252 | 253 | BreakInheritanceList: AfterColon 254 | # AfterColon: 255 | # class Foo : 256 | # Base1, 257 | # Base2 258 | # {}; 259 | 260 | 261 | # If true, ternary operators will be placed after line breaks. 262 | BreakBeforeTernaryOperators: false 263 | # false: 264 | # veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongDescription ? 265 | # firstValue : 266 | # SecondValueVeryVeryVeryVeryLong; 267 | 268 | BreakConstructorInitializersBeforeComma: false 269 | 270 | BreakConstructorInitializers: AfterColon 271 | # Constructor() : 272 | # initializer1(), 273 | # initializer2() 274 | 275 | BreakAfterJavaFieldAnnotations: false 276 | 277 | # Allow breaking string literals when formatting. 278 | BreakStringLiterals: false 279 | 280 | # A column limit of 0 means that there is no column limit. In this case, clang-format will 281 | # respect the input's line breaking decisions within statements unless they contradict other rules. 282 | ColumnLimit: 0 283 | 284 | # A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed. 285 | CommentPragmas: '^ IWYU pragma:' 286 | 287 | # If true, consecutive namespace declarations will be on the same line. 288 | CompactNamespaces: false 289 | # false: 290 | # namespace Foo 291 | # { 292 | # namespace Bar 293 | # { 294 | # } 295 | # } 296 | 297 | # If the constructor initializers don't fit on a line, put each initializer on its own line. 298 | ConstructorInitializerAllOnOneLineOrOnePerLine: true 299 | 300 | ConstructorInitializerIndentWidth: 4 301 | ContinuationIndentWidth: 4 302 | 303 | # If true, format braced lists as best suited for C++11 braced lists. 304 | Cpp11BracedListStyle: true 305 | DerivePointerAlignment: false 306 | DisableFormat: false 307 | ExperimentalAutoDetectBinPacking: false 308 | # If true, clang-format adds missing namespace end comments and fixes invalid existing ones. 309 | FixNamespaceComments: true 310 | 311 | # A vector of macros that should be interpreted as foreach loops instead of as function calls. 312 | ForEachMacros: 313 | - foreach 314 | - Q_FOREACH 315 | - BOOST_FOREACH 316 | 317 | IncludeBlocks: Preserve 318 | IncludeCategories: 319 | - Regex: '^"(llvm|llvm-c|clang|clang-c)/' 320 | Priority: 2 321 | SortPriority: 0 322 | - Regex: '^(<|"(gtest|gmock|isl|json)/)' 323 | Priority: 3 324 | SortPriority: 0 325 | - Regex: '.*' 326 | Priority: 1 327 | SortPriority: 0 328 | IncludeIsMainRegex: '(Test)?$' 329 | 330 | # Indent case labels one level from the switch statement. 331 | IndentCaseLabels: true 332 | # true: 333 | # switch(foo) 334 | # { 335 | # case bar: 336 | 337 | IndentGotoLabels: true 338 | 339 | # The preprocessor directive indenting style to use. 340 | IndentPPDirectives: AfterHash 341 | # #if FOO 342 | # # if BAR 343 | # # include 344 | # # endif 345 | # #endif 346 | 347 | 348 | IndentWidth: 4 349 | IndentWrappedFunctionNames: false 350 | JavaScriptQuotes: Leave 351 | JavaScriptWrapImports: true 352 | 353 | # If true, the empty line at the start of blocks is kept. 354 | KeepEmptyLinesAtTheStartOfBlocks: true 355 | MacroBlockBegin: '' 356 | MacroBlockEnd: '' 357 | 358 | # The maximum number of consecutive empty lines to keep. 359 | MaxEmptyLinesToKeep: 10000 360 | 361 | # The indentation used for namespaces. 362 | NamespaceIndentation: None 363 | 364 | ObjCBinPackProtocolList: Auto 365 | ObjCBlockIndentWidth: 4 366 | ObjCSpaceAfterProperty: false 367 | ObjCSpaceBeforeProtocolList: true 368 | PenaltyBreakAssignment: 2 369 | PenaltyBreakBeforeFirstCallParameter: 19 370 | PenaltyBreakComment: 300 371 | PenaltyBreakFirstLessLess: 120 372 | PenaltyBreakString: 1000 373 | PenaltyBreakTemplateDeclaration: 10 374 | PenaltyExcessCharacter: 1000000 375 | PenaltyReturnTypeOnItsOwnLine: 1000 376 | 377 | PointerAlignment: Left 378 | # left: 379 | # int* a; 380 | # int& b; 381 | 382 | # If true, clang-format will attempt to re-flow comments. 383 | ReflowComments: false 384 | 385 | SortIncludes: false 386 | SortUsingDeclarations: false 387 | SpaceAfterCStyleCast: false 388 | # false: 389 | # (int)i; 390 | 391 | 392 | SpaceAfterLogicalNot: false 393 | # false: 394 | # !bar(); 395 | 396 | SpaceAfterTemplateKeyword: true 397 | # true: 398 | # template 399 | 400 | 401 | SpaceBeforeAssignmentOperators: true 402 | # true: 403 | # int a = 404 | 405 | # If true, a space will be inserted before a C++11 braced list used to 406 | # initialize an object (after the preceding identifier or type). 407 | SpaceBeforeCpp11BracedList: false 408 | # false: 409 | # vector{1, 2, 3}; 410 | 411 | 412 | SpaceBeforeCtorInitializerColon: true 413 | # true: 414 | # Foo::Foo() : a(a) {} 415 | 416 | 417 | SpaceBeforeInheritanceColon: true 418 | # true: 419 | # class Foo : Bar {} 420 | 421 | 422 | # Put a space before opening parentheses only after control statement keywords (for/if/while...) 423 | SpaceBeforeParens: ControlStatements 424 | # ControlStatements: 425 | # void f() { 426 | # if (true) { 427 | # f(); 428 | # } 429 | # } 430 | 431 | 432 | SpaceBeforeRangeBasedForLoopColon: true 433 | # true: 434 | # for (auto v : values) {} 435 | 436 | 437 | SpaceInEmptyBlock: false 438 | # false: 439 | # void f() {} 440 | 441 | 442 | SpaceInEmptyParentheses: false 443 | # false: 444 | # f(); 445 | 446 | SpacesBeforeTrailingComments: 1 447 | 448 | SpacesInAngles: false 449 | # false: 450 | # static_cast(arg); 451 | 452 | 453 | SpacesInContainerLiterals: false 454 | # false: 455 | # var arr = [1, 2, 3]; 456 | 457 | 458 | SpacesInCStyleCastParentheses: false 459 | # false: 460 | # x = (int32)y 461 | 462 | 463 | SpacesInParentheses: false 464 | # false: 465 | # t f(Deleted &) & = delete; 466 | 467 | SpacesInSquareBrackets: false 468 | # false: 469 | # int a[5]; 470 | 471 | 472 | Standard: Latest 473 | 474 | StatementMacros: 475 | - Q_UNUSED 476 | - QT_REQUIRE_VERSION 477 | TabWidth: 4 478 | UseTab: Never 479 | ... 480 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | (Click "Preview" to turn any URL into a clickable link) 2 | 3 | If you have build or run problems, please read [troubleshooting](https://github.com/DiligentGraphics/DiligentEngine/blob/master/Troubleshooting.md) first. 4 | 5 | Please double-check that your [code is up-to-date, including all submodules](https://github.com/DiligentGraphics/DiligentEngine#cloning-the-repository). 6 | 7 | If you have a question that does not require creating an issue, you may ask it on [discord](https://discord.gg/t7HGBK7). 8 | 9 | For performance issues, please make sure you are running release builds. Debug builds may be significantly slower, especially on Windows. 10 | 11 | For GPU-related problems, please make sure you have up-to-date drivers. 12 | 13 | Please provide the following information: 14 | 15 | - OS and version you are running (e.g. Windows 10.0.18362, MacOS Catalina 10.15, etc.) 16 | - Build tools and configuration you used to build the engine (e.g. Visual Studio 2017 Debug x64 + CMake 3.15.4) 17 | - GPU and driver version you have installed on your system 18 | - Debug output, especially messages from Diligent 19 | - Call stack (if available) 20 | - If you experience a problem with one back-end, please try running other back-ends and see if the same issue arises 21 | -------------------------------------------------------------------------------- /.github/workflows/build-android.yml: -------------------------------------------------------------------------------- 1 | name: Android build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-24.04 8 | 9 | strategy: 10 | matrix: 11 | include: 12 | - name: "ARM32" 13 | arch: "armeabi-v7a" 14 | 15 | - name: "ARM64" 16 | arch: "arm64-v8a" 17 | 18 | name: Linux -> Android-${{ matrix.name }} 19 | 20 | steps: 21 | - name: Clean Disk 22 | uses: DiligentGraphics/github-action/clean-disk-ubuntu@v7 23 | 24 | - name: Clone repository 25 | uses: actions/checkout@v4 26 | with: 27 | submodules: recursive 28 | 29 | - name: Set up build environment 30 | if: success() 31 | uses: DiligentGraphics/github-action/setup-build-env@v7 32 | with: 33 | platform: Android 34 | 35 | - name: Build with Gradle 36 | if: success() 37 | env: 38 | ANDROID_ARCH: ${{ matrix.arch }} 39 | run: | 40 | cd $GITHUB_WORKSPACE/DiligentSamples/Android 41 | chmod +x gradlew 42 | ./gradlew buildRelease 43 | echo -e "\nRemaining disk space: $(df -BG / | awk 'NR==2 {print $4}' | sed 's/G//') GB" 44 | -------------------------------------------------------------------------------- /.github/workflows/build-apple.yml: -------------------------------------------------------------------------------- 1 | name: MacOS/iOS/tvOS build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | precheks: 7 | runs-on: macos-14 8 | name: MacOS -> Pre-Checks 9 | 10 | steps: 11 | - name: Clone repository 12 | uses: actions/checkout@v4 13 | with: 14 | submodules: true # only need direct submodules 15 | 16 | - name: DiligentCore format validation 17 | working-directory: ${{github.workspace}}/DiligentCore/BuildTools/FormatValidation 18 | shell: bash 19 | run: ./validate_format_mac.sh 20 | 21 | - name: DiligentTools format validation 22 | working-directory: ${{github.workspace}}/DiligentTools/BuildTools/FormatValidation 23 | shell: bash 24 | run: ./validate_format_mac.sh 25 | 26 | - name: DiligentFX format validation 27 | working-directory: ${{github.workspace}}/DiligentFX/BuildTools/FormatValidation 28 | shell: bash 29 | run: ./validate_format_mac.sh 30 | 31 | - name: DiligentSamples format validation 32 | working-directory: ${{github.workspace}}/DiligentSamples/BuildTools/FormatValidation 33 | shell: bash 34 | run: ./validate_format_mac.sh 35 | 36 | 37 | build: 38 | needs: precheks 39 | runs-on: macos-14 40 | 41 | strategy: 42 | matrix: 43 | platform: ["MacOS", "iOS", "tvOS"] 44 | build_type: ["Debug", "Release"] 45 | 46 | exclude: 47 | # Exclude tvOS-Release 48 | - platform: "tvOS" 49 | build_type: "Release" 50 | 51 | include: 52 | - platform: "MacOS" 53 | build_type: "Debug" 54 | cmake_args: "-DDILIGENT_BUILD_TESTS=ON" 55 | 56 | - platform: "MacOS" 57 | build_type: "Release" 58 | # For some reason AVX2 causes invalid instruction exception on CI in CoreTest, so disable it 59 | cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_BUILD_TOOLS_TESTS=ON -DDILIGENT_CLANG_RELEASE_COMPILE_OPTIONS=\"\"" 60 | 61 | - platform: "iOS" 62 | cmake_args: "" 63 | 64 | - platform: "tvOS" 65 | cmake_args: "" 66 | 67 | name: MacOS -> ${{ matrix.platform }}-${{ matrix.build_type }} 68 | 69 | steps: 70 | - name: Clone repository 71 | uses: actions/checkout@v4 72 | with: 73 | submodules: recursive 74 | 75 | - name: Set up build environment 76 | if: success() 77 | uses: DiligentGraphics/github-action/setup-build-env@v7 78 | with: 79 | platform: ${{ matrix.platform }} 80 | 81 | - name: Configure CMake 82 | if: success() 83 | uses: DiligentGraphics/github-action/configure-cmake@v7 84 | with: 85 | build-type: ${{ matrix.build_type }} 86 | cmake-args: ${{ matrix.cmake_args }} 87 | 88 | - name: Build 89 | if: success() 90 | uses: DiligentGraphics/github-action/build@v7 91 | 92 | - name: DiligentCoreTest 93 | if: ${{ success() && matrix.platform == 'MacOS' }} 94 | uses: DiligentGraphics/github-action/run-core-tests@v7 95 | 96 | - name: DiligentToolsTest 97 | if: ${{ success() && matrix.platform == 'MacOS' }} 98 | uses: DiligentGraphics/github-action/run-tools-tests@v7 99 | 100 | - name: HLSL2GLSLConverterTest 101 | if: ${{ success() && matrix.platform == 'MacOS' }} 102 | uses: DiligentGraphics/github-action/run-hlsl2glsl-converter-test@v7 103 | -------------------------------------------------------------------------------- /.github/workflows/build-emscripten.yml: -------------------------------------------------------------------------------- 1 | name: Emscripten build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | strategy: 8 | matrix: 9 | os: ["windows-latest", "ubuntu-24.04", "macos-14"] 10 | build_type: ["Debug", "Release"] 11 | 12 | exclude: 13 | # Exclude MacOS-Release 14 | - os: "macos-14" 15 | build_type: "Release" 16 | 17 | include: 18 | - os: "windows-latest" 19 | build_type: "Release" 20 | host_name: "Win10" 21 | # Do not build WebGPU on Windows/Release as it is extremely slow 22 | cmake_args: "-DDILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO=ON -DDILIGENT_NO_WEBGPU=ON" 23 | 24 | - os: "windows-latest" 25 | build_type: "Debug" 26 | host_name: "Win10" 27 | cmake_args: "-DDILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO=ON" 28 | 29 | - os: "ubuntu-24.04" 30 | host_name: "Linux" 31 | cmake_args: "-DDILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO=ON -DDILIGENT_EMSCRIPTEN_INCLUDE_COI_SERVICE_WORKER=ON" 32 | 33 | - os: "macos-14" 34 | host_name: "MacOS" 35 | cmake_args: "-DDILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO=ON" 36 | 37 | runs-on: ${{ matrix.os }} 38 | name: ${{ matrix.host_name }} -> Emscripten, ${{ matrix.build_type }} 39 | 40 | steps: 41 | - name: Clone repository 42 | uses: actions/checkout@v4 43 | with: 44 | submodules: recursive 45 | 46 | - name: Set up build environment 47 | if: success() 48 | uses: DiligentGraphics/github-action/setup-build-env@v7 49 | with: 50 | platform: Web 51 | 52 | - name: Configure CMake 53 | if: success() 54 | uses: DiligentGraphics/github-action/configure-cmake@v7 55 | with: 56 | build-type: ${{ matrix.build_type }} 57 | cmake-args: ${{ matrix.cmake_args }} 58 | 59 | - name: Build 60 | if: success() 61 | uses: DiligentGraphics/github-action/build@v7 62 | 63 | - name: Pack Web Artifacts 64 | if: ${{ success() && (matrix.host_name == 'Linux') && (matrix.build_type == 'Release') }} 65 | working-directory: ${{github.workspace}} 66 | run: | 67 | python ./DiligentSamples/BuildTools/Emscripten/pack-artifacts.py -s ${{ env.DILIGENT_BUILD_DIR }}/DiligentSamples -o ./WebArtifacts 68 | 69 | - name: Upload Web Artifacts 70 | if: ${{ success() && (matrix.host_name == 'Linux') && (matrix.build_type == 'Release') }} 71 | uses: actions/upload-artifact@v4 72 | with: 73 | name: WasmModules-DiligentGraphics.github.io 74 | path: | 75 | ${{github.workspace}}/WebArtifacts 76 | retention-days: 14 77 | -------------------------------------------------------------------------------- /.github/workflows/build-linux.yml: -------------------------------------------------------------------------------- 1 | name: Linux build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | precheks: 7 | runs-on: ubuntu-24.04 8 | name: Linux -> Pre-checks 9 | 10 | steps: 11 | - name: Clone repository 12 | uses: actions/checkout@v4 13 | with: 14 | submodules: true # only need direct submodules 15 | 16 | - name: DiligentCore format validation 17 | working-directory: ${{github.workspace}}/DiligentCore/BuildTools/FormatValidation 18 | shell: bash 19 | run: ./validate_format_linux.sh 20 | 21 | - name: DiligentTools format validation 22 | working-directory: ${{github.workspace}}/DiligentTools/BuildTools/FormatValidation 23 | shell: bash 24 | run: ./validate_format_linux.sh 25 | 26 | - name: DiligentFX format validation 27 | working-directory: ${{github.workspace}}/DiligentFX/BuildTools/FormatValidation 28 | shell: bash 29 | run: ./validate_format_linux.sh 30 | 31 | - name: DiligentSamples format validation 32 | working-directory: ${{github.workspace}}/DiligentSamples/BuildTools/FormatValidation 33 | shell: bash 34 | run: ./validate_format_linux.sh 35 | 36 | - name: Codespell 37 | uses: codespell-project/actions-codespell@master 38 | with: 39 | check_filenames: true 40 | ignore_words_list: lod,thirdparty 41 | skip: ./.git,./DiligentCore,./DiligentTools,./DiligentFX,./DiligentSamples 42 | path: . 43 | 44 | 45 | build: 46 | needs: precheks 47 | runs-on: ubuntu-24.04 48 | 49 | strategy: 50 | fail-fast: false 51 | matrix: 52 | name: ["GCC", "Clang"] 53 | build_type: ["Debug", "Release"] 54 | cmake_args: ["-DDILIGENT_BUILD_TESTS=ON"] 55 | include: 56 | - name: "GCC" 57 | cmake_generator: "Unix Makefiles" 58 | cc: "gcc-14" 59 | cxx: "g++-14" 60 | 61 | - name: "Clang" 62 | cmake_generator: "Ninja" 63 | cc: "clang-18" 64 | cxx: "clang++-18" 65 | 66 | name: Linux -> ${{ matrix.name }}-x64, ${{ matrix.build_type }} 67 | 68 | steps: 69 | - name: Clone repository 70 | uses: actions/checkout@v4 71 | with: 72 | submodules: recursive 73 | 74 | - name: Clone Test Data 75 | if: success() 76 | uses: actions/checkout@v4 77 | with: 78 | repository: DiligentGraphics/DiligentTestData 79 | path: DiligentTestData 80 | 81 | - name: Set up build environment 82 | if: success() 83 | uses: DiligentGraphics/github-action/setup-build-env@v7 84 | with: 85 | platform: Linux 86 | cmake-generator: ${{ matrix.cmake_generator }} 87 | 88 | - name: Configure CMake 89 | if: success() 90 | uses: DiligentGraphics/github-action/configure-cmake@v7 91 | with: 92 | cc: ${{ matrix.cc }} 93 | cxx: ${{ matrix.cxx }} 94 | generator: ${{ matrix.cmake_generator }} 95 | build-type: ${{ matrix.build_type }} 96 | cmake-args: ${{ matrix.cmake_args }} 97 | 98 | - name: Build 99 | id: build 100 | if: success() 101 | uses: DiligentGraphics/github-action/build@v7 102 | 103 | # Core tests 104 | - name: DiligentCoreTest 105 | if: success() 106 | uses: DiligentGraphics/github-action/run-core-tests@v7 107 | 108 | - name: DiligentCoreAPITest VK 109 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 110 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 111 | with: 112 | mode: vk_sw 113 | 114 | - name: DiligentCoreAPITest VK Compatibility 115 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }} 116 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 117 | with: 118 | mode: vk_sw 119 | vk-compatibility: true 120 | 121 | - name: DiligentCoreAPITest GL 122 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 123 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 124 | with: 125 | mode: gl 126 | 127 | - name: DiligentCoreAPITest GL with Non-Separable Programs 128 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 129 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 130 | with: 131 | mode: gl 132 | non-separable-progs: true 133 | 134 | # Tools tests 135 | - name: DiligentToolsTest 136 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 137 | uses: DiligentGraphics/github-action/run-tools-tests@v7 138 | 139 | - name: DiligentToolsGPUTest VK 140 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 141 | uses: DiligentGraphics/github-action/run-tools-gpu-tests@v7 142 | with: 143 | mode: vk_sw 144 | 145 | - name: DiligentToolsGPUTest GL 146 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 147 | uses: DiligentGraphics/github-action/run-tools-gpu-tests@v7 148 | with: 149 | mode: gl 150 | 151 | - name: HLSL2GLSLConverterTest 152 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 153 | uses: DiligentGraphics/github-action/run-hlsl2glsl-converter-test@v7 154 | 155 | 156 | # Samples tests 157 | - name: Sample Tests Vk 158 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 159 | uses: DiligentGraphics/github-action/run-sample-tests@v7 160 | with: 161 | mode: "vk_sw" 162 | 163 | - name: Sample Tests Vk Compatibility 164 | if: success() 165 | uses: DiligentGraphics/github-action/run-sample-tests@v7 166 | with: 167 | mode: "vk_sw" 168 | vk-compatibility: "true" 169 | 170 | - name: Sample Tests GL 171 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 172 | uses: DiligentGraphics/github-action/run-sample-tests@v7 173 | with: 174 | mode: "gl" 175 | 176 | - name: Sample Tests GL with Non-Separable Programs 177 | if: ${{ success() || failure() && steps.build.outcome == 'success' }} 178 | uses: DiligentGraphics/github-action/run-sample-tests@v7 179 | with: 180 | mode: "gl" 181 | non-separable-progs: "true" 182 | -------------------------------------------------------------------------------- /.github/workflows/build-windows.yml: -------------------------------------------------------------------------------- 1 | name: Win32/UWP build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | precheks: 7 | runs-on: windows-latest 8 | name: Win10 -> Pre-checks 9 | 10 | steps: 11 | - name: Clone repository 12 | uses: actions/checkout@v4 13 | with: 14 | submodules: true # only need direct submodules 15 | 16 | - name: DiligentCore format validation 17 | shell: cmd 18 | working-directory: ${{github.workspace}}\DiligentCore\BuildTools\FormatValidation 19 | run: validate_format_win.bat 20 | 21 | - name: DiligentTools format validation 22 | working-directory: ${{github.workspace}}\DiligentTools\BuildTools\FormatValidation 23 | shell: cmd 24 | run: validate_format_win.bat 25 | 26 | - name: DiligentFX format validation 27 | working-directory: ${{github.workspace}}\DiligentFX\BuildTools\FormatValidation 28 | shell: cmd 29 | run: validate_format_win.bat 30 | 31 | - name: DiligentSamples format validation 32 | working-directory: ${{github.workspace}}\DiligentSamples\BuildTools\FormatValidation 33 | shell: cmd 34 | run: validate_format_win.bat 35 | 36 | 37 | build: 38 | needs: precheks 39 | runs-on: windows-2022 40 | 41 | strategy: 42 | fail-fast: false 43 | matrix: 44 | name: ["Win10"] 45 | toolset: ["Win32", "x64"] 46 | build_type: ["Debug", "Release"] 47 | cmake_generator: ["Visual Studio 17 2022"] 48 | cmake_args: ["-DDILIGENT_BUILD_TESTS=ON -DDILIGENT_NO_WEBGPU=OFF"] 49 | platform: ["Win32"] 50 | build_args: ["-- -restore"] 51 | 52 | include: 53 | - name: "Win10-Dev" 54 | platform: "Win32" 55 | toolset: "x64" 56 | build_type: "RelWithDebInfo" 57 | cmake_generator: "Visual Studio 17 2022" 58 | cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_BUILD_TOOLS_TESTS=ON -DDILIGENT_DEVELOPMENT=ON" 59 | build_args: "-- -restore" 60 | 61 | - name: "Win10-Ninja" 62 | platform: "Win32" 63 | toolset: "x64" 64 | build_type: "Debug" 65 | cmake_generator: "Ninja" 66 | cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_BUILD_TOOLS_TESTS=ON" 67 | 68 | - name: "MinGW" 69 | platform: "Win32" 70 | toolset: "x64" 71 | build_type: "Release" # Debug build is unbelievably slow 72 | cmake_generator: "MinGW Makefiles" 73 | cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_BUILD_TOOLS_TESTS=ON" 74 | 75 | - name: "UWP" 76 | platform: "UWP" 77 | toolset: "x64" 78 | build_type: "Debug" 79 | cmake_generator: "Visual Studio 17 2022" 80 | cmake_args: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0" 81 | 82 | - name: "UWP" 83 | platform: "UWP" 84 | toolset: "x64" 85 | build_type: "Release" 86 | cmake_generator: "Visual Studio 17 2022" 87 | cmake_args: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0" 88 | 89 | name: Win10 -> ${{ matrix.name }}-${{ matrix.toolset }}, ${{ matrix.build_type }} 90 | 91 | steps: 92 | - name: Clone repository 93 | uses: actions/checkout@v4 94 | with: 95 | submodules: recursive 96 | 97 | - name: Clone Test Data 98 | if: success() 99 | uses: actions/checkout@v4 100 | with: 101 | repository: DiligentGraphics/DiligentTestData 102 | path: DiligentTestData 103 | 104 | - name: Set up build environment 105 | if: success() 106 | uses: DiligentGraphics/github-action/setup-build-env@v7 107 | with: 108 | platform: ${{ matrix.platform }} 109 | cmake-generator: ${{ matrix.cmake_generator }} 110 | ninja-vs-arch: ${{ matrix.toolset }} 111 | 112 | - name: Configure CMake 113 | if: success() 114 | uses: DiligentGraphics/github-action/configure-cmake@v7 115 | with: 116 | generator: ${{ matrix.cmake_generator }} 117 | vs-arch: ${{ matrix.toolset }} 118 | build-type: ${{ matrix.build_type }} 119 | cmake-args: ${{ matrix.cmake_args }} 120 | 121 | - name: Build 122 | id: build 123 | if: success() 124 | uses: DiligentGraphics/github-action/build@v7 125 | with: 126 | build-args: ${{ matrix.build_args }} 127 | 128 | # Core tests 129 | - name: DiligentCoreTest 130 | if: ${{ success() && matrix.name != 'UWP'}} 131 | uses: DiligentGraphics/github-action/run-core-tests@v7 132 | 133 | - name: DiligentCoreAPITest D3D11 134 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} 135 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 136 | with: 137 | mode: d3d11_sw 138 | 139 | - name: DiligentCoreAPITest D3D12 140 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} 141 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 142 | with: 143 | mode: d3d12_sw 144 | 145 | - name: DiligentCoreAPITest D3D12 DXC 146 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} 147 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 148 | with: 149 | mode: d3d12_sw 150 | use-dxc: true 151 | # Disable texture creation tests that are not relevant for DXC to save time 152 | args: --gtest_filter=-TextureCreation* 153 | 154 | - name: DiligentCoreAPITest WebGPU 155 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} 156 | uses: DiligentGraphics/github-action/run-core-gpu-tests@v7 157 | with: 158 | mode: wgpu 159 | 160 | 161 | # Tools tests 162 | - name: DiligentToolsTest 163 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name != 'UWP'}} 164 | uses: DiligentGraphics/github-action/run-tools-tests@v7 165 | 166 | - name: DiligentToolsGPUTest D3D11 167 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} 168 | uses: DiligentGraphics/github-action/run-tools-gpu-tests@v7 169 | with: 170 | mode: d3d11_sw 171 | 172 | - name: DiligentToolsGPUTest D3D12 173 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} 174 | uses: DiligentGraphics/github-action/run-tools-gpu-tests@v7 175 | with: 176 | mode: d3d12_sw 177 | 178 | - name: DiligentToolsGPUTest WebGPU 179 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name == 'Win10' }} 180 | uses: DiligentGraphics/github-action/run-tools-gpu-tests@v7 181 | with: 182 | mode: wgpu 183 | 184 | - name: HLSL2GLSLConverterTest 185 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && matrix.name != 'UWP'}} 186 | uses: DiligentGraphics/github-action/run-hlsl2glsl-converter-test@v7 187 | 188 | 189 | # Samples tests 190 | - name: Sample Tests D3D11 191 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} 192 | uses: DiligentGraphics/github-action/run-sample-tests@v7 193 | with: 194 | mode: "d3d11_sw" 195 | 196 | - name: Sample Tests D3D12 197 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} 198 | uses: DiligentGraphics/github-action/run-sample-tests@v7 199 | with: 200 | mode: "d3d12_sw" 201 | 202 | - name: Sample Tests WebGPU 203 | if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10') }} 204 | uses: DiligentGraphics/github-action/run-sample-tests@v7 205 | with: 206 | mode: "wgpu" 207 | -------------------------------------------------------------------------------- /.github/workflows/trigger-build-web-page.yml: -------------------------------------------------------------------------------- 1 | name: Trigger Build Web Page 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Emscripten build"] 6 | types: 7 | - completed 8 | 9 | jobs: 10 | send-notify: 11 | runs-on: ubuntu-latest 12 | if: ${{ github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'master' }} 13 | steps: 14 | - name: Send notification to DiligentGraphics.github.io 15 | env: 16 | TARGET_REPO_TOKEN: ${{ secrets.PAGES_BUILD_AND_DEPLOY }} 17 | run: | 18 | curl -L \ 19 | -X POST \ 20 | -H "Accept: application/vnd.github+json" \ 21 | -H "Authorization: Bearer $TARGET_REPO_TOKEN" \ 22 | -H "X-GitHub-Api-Version: 2022-11-28" \ 23 | https://api.github.com/repos/DiligentGraphics/DiligentGraphics.github.io/dispatches \ 24 | --data '{ "event_type": "rebuild-wasm-modules" }' 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | out 3 | .vs 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "DiligentCore"] 2 | path = DiligentCore 3 | url = https://github.com/DiligentGraphics/DiligentCore.git 4 | [submodule "DiligentTools"] 5 | path = DiligentTools 6 | url = https://github.com/DiligentGraphics/DiligentTools.git 7 | [submodule "DiligentSamples"] 8 | path = DiligentSamples 9 | url = https://github.com/DiligentGraphics/DiligentSamples.git 10 | [submodule "DiligentFX"] 11 | path = DiligentFX 12 | url = https://github.com/DiligentGraphics/DiligentFX.git 13 | -------------------------------------------------------------------------------- /.vscode/.gitignore: -------------------------------------------------------------------------------- 1 | .cmaketools.json 2 | ipch 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "inputs": [ 7 | { 8 | "id": "graphicsMode", 9 | "type": "pickString", 10 | "description": "Select graphics mode", 11 | "options": ["vk", "vk_sw", "gl"], 12 | "default": "vk" 13 | } 14 | ], 15 | "configurations": [ 16 | { 17 | "name": "Atmosphere", 18 | "type": "cppdbg", 19 | "request": "launch", 20 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Samples/Atmosphere/Atmosphere", 21 | "args": ["--mode", "${input:graphicsMode}"], 22 | "stopAtEntry": false, 23 | "cwd": "${workspaceFolder}/DiligentSamples/Samples/Atmosphere/assets", 24 | "environment": [], 25 | "externalConsole": true, 26 | "MIMode": "gdb", 27 | "setupCommands": [ 28 | { 29 | "description": "Enable pretty-printing for gdb", 30 | "text": "-enable-pretty-printing", 31 | "ignoreFailures": true 32 | } 33 | ], 34 | "preLaunchTask": "Build Atmosphere" 35 | }, 36 | { 37 | "name": "GLTFViewer", 38 | "type": "cppdbg", 39 | "request": "launch", 40 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Samples/GLTFViewer/GLTFViewer", 41 | "args": ["--mode", "${input:graphicsMode}"], 42 | "stopAtEntry": false, 43 | "cwd": "${workspaceFolder}/DiligentSamples/Samples/GLTFViewer/assets", 44 | "environment": [], 45 | "externalConsole": true, 46 | "MIMode": "gdb", 47 | "setupCommands": [ 48 | { 49 | "description": "Enable pretty-printing for gdb", 50 | "text": "-enable-pretty-printing", 51 | "ignoreFailures": true 52 | } 53 | ], 54 | "preLaunchTask": "Build GLTFViewer" 55 | }, 56 | { 57 | "name": "Shadows", 58 | "type": "cppdbg", 59 | "request": "launch", 60 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Samples/Shadows/Shadows", 61 | "args": ["--mode", "${input:graphicsMode}"], 62 | "stopAtEntry": false, 63 | "cwd": "${workspaceFolder}/DiligentSamples/Samples/Shadows/assets", 64 | "environment": [], 65 | "externalConsole": true, 66 | "MIMode": "gdb", 67 | "setupCommands": [ 68 | { 69 | "description": "Enable pretty-printing for gdb", 70 | "text": "-enable-pretty-printing", 71 | "ignoreFailures": true 72 | } 73 | ], 74 | "preLaunchTask": "Build Shadows" 75 | }, 76 | { 77 | "name": "ImguiDemo", 78 | "type": "cppdbg", 79 | "request": "launch", 80 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Samples/ImguiDemo/ImguiDemo", 81 | "args": ["--mode", "${input:graphicsMode}"], 82 | "stopAtEntry": false, 83 | "cwd": "${workspaceFolder}/DiligentSamples/Samples/ImguiDemo/assets", 84 | "environment": [], 85 | "externalConsole": true, 86 | "MIMode": "gdb", 87 | "setupCommands": [ 88 | { 89 | "description": "Enable pretty-printing for gdb", 90 | "text": "-enable-pretty-printing", 91 | "ignoreFailures": true 92 | } 93 | ], 94 | "preLaunchTask": "Build ImguiDemo" 95 | }, 96 | { 97 | "name": "NuklearDemo", 98 | "type": "cppdbg", 99 | "request": "launch", 100 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Samples/NuklearDemo/NuklearDemo", 101 | "args": ["--mode", "${input:graphicsMode}"], 102 | "stopAtEntry": false, 103 | "cwd": "${workspaceFolder}/DiligentSamples/Samples/NuklearDemo/assets", 104 | "environment": [], 105 | "externalConsole": true, 106 | "MIMode": "gdb", 107 | "setupCommands": [ 108 | { 109 | "description": "Enable pretty-printing for gdb", 110 | "text": "-enable-pretty-printing", 111 | "ignoreFailures": true 112 | } 113 | ], 114 | "preLaunchTask": "Build NuklearDemo" 115 | }, 116 | { 117 | "name": "GLFWDemo", 118 | "type": "cppdbg", 119 | "request": "launch", 120 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Samples/GLFWDemo/GLFWDemo", 121 | "args": ["--mode", "vk"], 122 | "stopAtEntry": false, 123 | "cwd": "${workspaceFolder}/DiligentSamples/Samples/GLFWDemo/assets", 124 | "environment": [], 125 | "externalConsole": true, 126 | "MIMode": "gdb", 127 | "setupCommands": [ 128 | { 129 | "description": "Enable pretty-printing for gdb", 130 | "text": "-enable-pretty-printing", 131 | "ignoreFailures": true 132 | } 133 | ], 134 | "preLaunchTask": "Build GLFWDemo" 135 | }, 136 | { 137 | "name": "GhostCubeScene", 138 | "type": "cppdbg", 139 | "request": "launch", 140 | "program": "${command:cmake.buildDirectory}/DiligentSamples/UnityPlugin/GhostCubeScene/GhostCubeScene", 141 | "args": ["--mode", "gl"], 142 | "stopAtEntry": false, 143 | "cwd": "${workspaceFolder}/DiligentSamples/UnityPlugin/GhostCubeScene/assets", 144 | "environment": [], 145 | "externalConsole": true, 146 | "MIMode": "gdb", 147 | "setupCommands": [ 148 | { 149 | "description": "Enable pretty-printing for gdb", 150 | "text": "-enable-pretty-printing", 151 | "ignoreFailures": true 152 | } 153 | ], 154 | "preLaunchTask": "Build GhostCubeScene" 155 | }, 156 | { 157 | "name": "Tutorial00_HelloLinux", 158 | "type": "cppdbg", 159 | "request": "launch", 160 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial00_HelloLinux/Tutorial00_HelloLinux", 161 | "args": ["--mode", "${input:graphicsMode}"], 162 | "stopAtEntry": false, 163 | "cwd": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial00_HelloLinux", 164 | "environment": [], 165 | "externalConsole": true, 166 | "MIMode": "gdb", 167 | "setupCommands": [ 168 | { 169 | "description": "Enable pretty-printing for gdb", 170 | "text": "-enable-pretty-printing", 171 | "ignoreFailures": true 172 | } 173 | ], 174 | "preLaunchTask": "Build Tutorial00_HelloLinux" 175 | }, 176 | { 177 | "name": "Tutorial01_HelloTriangle", 178 | "type": "cppdbg", 179 | "request": "launch", 180 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial01_HelloTriangle/Tutorial01_HelloTriangle", 181 | "args": ["--mode", "${input:graphicsMode}"], 182 | "stopAtEntry": false, 183 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial01_HelloTriangle/assets", 184 | "environment": [], 185 | "externalConsole": true, 186 | "MIMode": "gdb", 187 | "setupCommands": [ 188 | { 189 | "description": "Enable pretty-printing for gdb", 190 | "text": "-enable-pretty-printing", 191 | "ignoreFailures": true 192 | } 193 | ], 194 | "preLaunchTask": "Build Tutorial01_HelloTriangle" 195 | }, 196 | { 197 | "name": "Tutorial02_Cube", 198 | "type": "cppdbg", 199 | "request": "launch", 200 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial02_Cube/Tutorial02_Cube", 201 | "args": ["--mode", "${input:graphicsMode}"], 202 | "stopAtEntry": false, 203 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial02_Cube/assets", 204 | "environment": [], 205 | "externalConsole": true, 206 | "MIMode": "gdb", 207 | "setupCommands": [ 208 | { 209 | "description": "Enable pretty-printing for gdb", 210 | "text": "-enable-pretty-printing", 211 | "ignoreFailures": true 212 | } 213 | ], 214 | "preLaunchTask": "Build Tutorial02_Cube" 215 | }, 216 | { 217 | "name": "Tutorial03_Texturing", 218 | "type": "cppdbg", 219 | "request": "launch", 220 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial03_Texturing/Tutorial03_Texturing", 221 | "args": ["--mode", "${input:graphicsMode}"], 222 | "stopAtEntry": false, 223 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial03_Texturing/assets", 224 | "environment": [], 225 | "externalConsole": true, 226 | "MIMode": "gdb", 227 | "setupCommands": [ 228 | { 229 | "description": "Enable pretty-printing for gdb", 230 | "text": "-enable-pretty-printing", 231 | "ignoreFailures": true 232 | } 233 | ], 234 | "preLaunchTask": "Build Tutorial03_Texturing" 235 | }, 236 | { 237 | "name": "Tutorial03_Texturing-C", 238 | "type": "cppdbg", 239 | "request": "launch", 240 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial03_Texturing-C/Tutorial03_Texturing-C", 241 | "args": ["--mode", "${input:graphicsMode}"], 242 | "stopAtEntry": false, 243 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial03_Texturing-C/assets", 244 | "environment": [], 245 | "externalConsole": true, 246 | "MIMode": "gdb", 247 | "setupCommands": [ 248 | { 249 | "description": "Enable pretty-printing for gdb", 250 | "text": "-enable-pretty-printing", 251 | "ignoreFailures": true 252 | } 253 | ], 254 | "preLaunchTask": "Build Tutorial03_Texturing-C" 255 | }, 256 | { 257 | "name": "Tutorial04_Instancing", 258 | "type": "cppdbg", 259 | "request": "launch", 260 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial04_Instancing/Tutorial04_Instancing", 261 | "args": ["--mode", "${input:graphicsMode}"], 262 | "stopAtEntry": false, 263 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial04_Instancing/assets", 264 | "environment": [], 265 | "externalConsole": true, 266 | "MIMode": "gdb", 267 | "setupCommands": [ 268 | { 269 | "description": "Enable pretty-printing for gdb", 270 | "text": "-enable-pretty-printing", 271 | "ignoreFailures": true 272 | } 273 | ], 274 | "preLaunchTask": "Build Tutorial04_Instancing" 275 | }, 276 | { 277 | "name": "Tutorial05_TextureArray", 278 | "type": "cppdbg", 279 | "request": "launch", 280 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial05_TextureArray/Tutorial05_TextureArray", 281 | "args": ["--mode", "${input:graphicsMode}"], 282 | "stopAtEntry": false, 283 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial05_TextureArray/assets", 284 | "environment": [], 285 | "externalConsole": true, 286 | "MIMode": "gdb", 287 | "setupCommands": [ 288 | { 289 | "description": "Enable pretty-printing for gdb", 290 | "text": "-enable-pretty-printing", 291 | "ignoreFailures": true 292 | } 293 | ], 294 | "preLaunchTask": "Build Tutorial05_TextureArray" 295 | }, 296 | { 297 | "name": "Tutorial06_Multithreading", 298 | "type": "cppdbg", 299 | "request": "launch", 300 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial06_Multithreading/Tutorial06_Multithreading", 301 | "args": ["--mode", "${input:graphicsMode}"], 302 | "stopAtEntry": false, 303 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial06_Multithreading/assets", 304 | "environment": [], 305 | "externalConsole": true, 306 | "MIMode": "gdb", 307 | "setupCommands": [ 308 | { 309 | "description": "Enable pretty-printing for gdb", 310 | "text": "-enable-pretty-printing", 311 | "ignoreFailures": true 312 | } 313 | ], 314 | "preLaunchTask": "Build Tutorial06_Multithreading" 315 | }, 316 | { 317 | "name": "Tutorial07_GeometryShader", 318 | "type": "cppdbg", 319 | "request": "launch", 320 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial07_GeometryShader/Tutorial07_GeometryShader", 321 | "args": ["--mode", "${input:graphicsMode}"], 322 | "stopAtEntry": false, 323 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial07_GeometryShader/assets", 324 | "environment": [], 325 | "externalConsole": true, 326 | "MIMode": "gdb", 327 | "setupCommands": [ 328 | { 329 | "description": "Enable pretty-printing for gdb", 330 | "text": "-enable-pretty-printing", 331 | "ignoreFailures": true 332 | } 333 | ], 334 | "preLaunchTask": "Build Tutorial07_GeometryShader" 335 | }, 336 | { 337 | "name": "Tutorial08_Tessellation", 338 | "type": "cppdbg", 339 | "request": "launch", 340 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial08_Tessellation/Tutorial08_Tessellation", 341 | "args": ["--mode", "${input:graphicsMode}"], 342 | "stopAtEntry": false, 343 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial08_Tessellation/assets", 344 | "environment": [], 345 | "externalConsole": true, 346 | "MIMode": "gdb", 347 | "setupCommands": [ 348 | { 349 | "description": "Enable pretty-printing for gdb", 350 | "text": "-enable-pretty-printing", 351 | "ignoreFailures": true 352 | } 353 | ], 354 | "preLaunchTask": "Build Tutorial08_Tessellation" 355 | }, 356 | { 357 | "name": "Tutorial09_Quads", 358 | "type": "cppdbg", 359 | "request": "launch", 360 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial09_Quads/Tutorial09_Quads", 361 | "args": ["--mode", "${input:graphicsMode}"], 362 | "stopAtEntry": false, 363 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial09_Quads/assets", 364 | "environment": [], 365 | "externalConsole": true, 366 | "MIMode": "gdb", 367 | "setupCommands": [ 368 | { 369 | "description": "Enable pretty-printing for gdb", 370 | "text": "-enable-pretty-printing", 371 | "ignoreFailures": true 372 | } 373 | ], 374 | "preLaunchTask": "Build Tutorial09_Quads" 375 | }, 376 | { 377 | "name": "Tutorial10_DataStreaming", 378 | "type": "cppdbg", 379 | "request": "launch", 380 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial10_DataStreaming/Tutorial10_DataStreaming", 381 | "args": ["--mode", "${input:graphicsMode}"], 382 | "stopAtEntry": false, 383 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial10_DataStreaming/assets", 384 | "environment": [], 385 | "externalConsole": true, 386 | "MIMode": "gdb", 387 | "setupCommands": [ 388 | { 389 | "description": "Enable pretty-printing for gdb", 390 | "text": "-enable-pretty-printing", 391 | "ignoreFailures": true 392 | } 393 | ], 394 | "preLaunchTask": "Build Tutorial10_DataStreaming" 395 | }, 396 | { 397 | "name": "Tutorial11_ResourceUpdates", 398 | "type": "cppdbg", 399 | "request": "launch", 400 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial11_ResourceUpdates/Tutorial11_ResourceUpdates", 401 | "args": ["--mode", "${input:graphicsMode}"], 402 | "stopAtEntry": false, 403 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial11_ResourceUpdates/assets", 404 | "environment": [], 405 | "externalConsole": true, 406 | "MIMode": "gdb", 407 | "setupCommands": [ 408 | { 409 | "description": "Enable pretty-printing for gdb", 410 | "text": "-enable-pretty-printing", 411 | "ignoreFailures": true 412 | } 413 | ], 414 | "preLaunchTask": "Build Tutorial11_ResourceUpdates" 415 | }, 416 | { 417 | "name": "Tutorial12_RenderTarget", 418 | "type": "cppdbg", 419 | "request": "launch", 420 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial12_RenderTarget/Tutorial12_RenderTarget", 421 | "args": ["--mode", "${input:graphicsMode}"], 422 | "stopAtEntry": false, 423 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial12_RenderTarget/assets", 424 | "environment": [], 425 | "externalConsole": true, 426 | "MIMode": "gdb", 427 | "setupCommands": [ 428 | { 429 | "description": "Enable pretty-printing for gdb", 430 | "text": "-enable-pretty-printing", 431 | "ignoreFailures": true 432 | } 433 | ], 434 | "preLaunchTask": "Build Tutorial12_RenderTarget" 435 | }, 436 | { 437 | "name": "Tutorial13_ShadowMap", 438 | "type": "cppdbg", 439 | "request": "launch", 440 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial13_ShadowMap/Tutorial13_ShadowMap", 441 | "args": ["--mode", "${input:graphicsMode}"], 442 | "stopAtEntry": false, 443 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial13_ShadowMap/assets", 444 | "environment": [], 445 | "externalConsole": true, 446 | "MIMode": "gdb", 447 | "setupCommands": [ 448 | { 449 | "description": "Enable pretty-printing for gdb", 450 | "text": "-enable-pretty-printing", 451 | "ignoreFailures": true 452 | } 453 | ], 454 | "preLaunchTask": "Build Tutorial13_ShadowMap" 455 | }, 456 | { 457 | "name": "Tutorial14_ComputeShader", 458 | "type": "cppdbg", 459 | "request": "launch", 460 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial14_ComputeShader/Tutorial14_ComputeShader", 461 | "args": ["--mode", "${input:graphicsMode}"], 462 | "stopAtEntry": false, 463 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial14_ComputeShader/assets", 464 | "environment": [], 465 | "externalConsole": true, 466 | "MIMode": "gdb", 467 | "setupCommands": [ 468 | { 469 | "description": "Enable pretty-printing for gdb", 470 | "text": "-enable-pretty-printing", 471 | "ignoreFailures": true 472 | } 473 | ], 474 | "preLaunchTask": "Build Tutorial14_ComputeShader" 475 | }, 476 | { 477 | "name": "Tutorial16_BindlessResources", 478 | "type": "cppdbg", 479 | "request": "launch", 480 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial16_BindlessResources/Tutorial16_BindlessResources", 481 | "args": ["--mode", "${input:graphicsMode}"], 482 | "stopAtEntry": false, 483 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial16_BindlessResources/assets", 484 | "environment": [], 485 | "externalConsole": true, 486 | "MIMode": "gdb", 487 | "setupCommands": [ 488 | { 489 | "description": "Enable pretty-printing for gdb", 490 | "text": "-enable-pretty-printing", 491 | "ignoreFailures": true 492 | } 493 | ], 494 | "preLaunchTask": "Build Tutorial16_BindlessResources" 495 | }, 496 | { 497 | "name": "Tutorial17_MSAA", 498 | "type": "cppdbg", 499 | "request": "launch", 500 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial17_MSAA/Tutorial17_MSAA", 501 | "args": ["--mode", "${input:graphicsMode}"], 502 | "stopAtEntry": false, 503 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial17_MSAA/assets", 504 | "environment": [], 505 | "externalConsole": true, 506 | "MIMode": "gdb", 507 | "setupCommands": [ 508 | { 509 | "description": "Enable pretty-printing for gdb", 510 | "text": "-enable-pretty-printing", 511 | "ignoreFailures": true 512 | } 513 | ], 514 | "preLaunchTask": "Build Tutorial17_MSAA" 515 | }, 516 | { 517 | "name": "Tutorial18_Queries", 518 | "type": "cppdbg", 519 | "request": "launch", 520 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial18_Queries/Tutorial18_Queries", 521 | "args": ["--mode", "${input:graphicsMode}"], 522 | "stopAtEntry": false, 523 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial18_Queries/assets", 524 | "environment": [], 525 | "externalConsole": true, 526 | "MIMode": "gdb", 527 | "setupCommands": [ 528 | { 529 | "description": "Enable pretty-printing for gdb", 530 | "text": "-enable-pretty-printing", 531 | "ignoreFailures": true 532 | } 533 | ], 534 | "preLaunchTask": "Build Tutorial18_Queries" 535 | }, 536 | { 537 | "name": "Tutorial19_RenderPasses", 538 | "type": "cppdbg", 539 | "request": "launch", 540 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial19_RenderPasses/Tutorial19_RenderPasses", 541 | "args": ["--mode", "${input:graphicsMode}"], 542 | "stopAtEntry": false, 543 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial19_RenderPasses/assets", 544 | "environment": [], 545 | "externalConsole": true, 546 | "MIMode": "gdb", 547 | "setupCommands": [ 548 | { 549 | "description": "Enable pretty-printing for gdb", 550 | "text": "-enable-pretty-printing", 551 | "ignoreFailures": true 552 | } 553 | ], 554 | "preLaunchTask": "Build Tutorial19_RenderPasses" 555 | }, 556 | { 557 | "name": "Tutorial20_MeshShader", 558 | "type": "cppdbg", 559 | "request": "launch", 560 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial20_MeshShader/Tutorial20_MeshShader", 561 | "args": ["--mode", "${input:graphicsMode}"], 562 | "stopAtEntry": false, 563 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial20_MeshShader/assets", 564 | "environment": [], 565 | "externalConsole": true, 566 | "MIMode": "gdb", 567 | "setupCommands": [ 568 | { 569 | "description": "Enable pretty-printing for gdb", 570 | "text": "-enable-pretty-printing", 571 | "ignoreFailures": true 572 | } 573 | ], 574 | "preLaunchTask": "Build Tutorial20_MeshShader" 575 | }, 576 | { 577 | "name": "Tutorial21_RayTracing", 578 | "type": "cppdbg", 579 | "request": "launch", 580 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial21_RayTracing/Tutorial21_RayTracing", 581 | "args": ["--mode", "${input:graphicsMode}"], 582 | "stopAtEntry": false, 583 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial21_RayTracing/assets", 584 | "environment": [], 585 | "externalConsole": true, 586 | "MIMode": "gdb", 587 | "setupCommands": [ 588 | { 589 | "description": "Enable pretty-printing for gdb", 590 | "text": "-enable-pretty-printing", 591 | "ignoreFailures": true 592 | } 593 | ], 594 | "preLaunchTask": "Build Tutorial21_RayTracing" 595 | }, 596 | { 597 | "name": "Tutorial22_HybridRendering", 598 | "type": "cppdbg", 599 | "request": "launch", 600 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial22_HybridRendering/Tutorial22_HybridRendering", 601 | "args": ["--mode", "${input:graphicsMode}"], 602 | "stopAtEntry": false, 603 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial22_HybridRendering/assets", 604 | "environment": [], 605 | "externalConsole": true, 606 | "MIMode": "gdb", 607 | "setupCommands": [ 608 | { 609 | "description": "Enable pretty-printing for gdb", 610 | "text": "-enable-pretty-printing", 611 | "ignoreFailures": true 612 | } 613 | ], 614 | "preLaunchTask": "Build Tutorial22_HybridRendering" 615 | }, 616 | { 617 | "name": "Tutorial23_CommandQueues", 618 | "type": "cppdbg", 619 | "request": "launch", 620 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial23_CommandQueues/Tutorial23_CommandQueues", 621 | "args": ["--mode", "${input:graphicsMode}"], 622 | "stopAtEntry": false, 623 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial23_CommandQueues/assets", 624 | "environment": [], 625 | "externalConsole": true, 626 | "MIMode": "gdb", 627 | "setupCommands": [ 628 | { 629 | "description": "Enable pretty-printing for gdb", 630 | "text": "-enable-pretty-printing", 631 | "ignoreFailures": true 632 | } 633 | ], 634 | "preLaunchTask": "Build Tutorial23_CommandQueues" 635 | }, 636 | { 637 | "name": "Tutorial24_VRS", 638 | "type": "cppdbg", 639 | "request": "launch", 640 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial24_VRS/Tutorial24_VRS", 641 | "args": ["--mode", "${input:graphicsMode}"], 642 | "stopAtEntry": false, 643 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial24_VRS/assets", 644 | "environment": [], 645 | "externalConsole": true, 646 | "MIMode": "gdb", 647 | "setupCommands": [ 648 | { 649 | "description": "Enable pretty-printing for gdb", 650 | "text": "-enable-pretty-printing", 651 | "ignoreFailures": true 652 | } 653 | ], 654 | "preLaunchTask": "Build Tutorial24_VRS" 655 | }, 656 | { 657 | "name": "Tutorial25_StatePackager", 658 | "type": "cppdbg", 659 | "request": "launch", 660 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial25_StatePackager/Tutorial25_StatePackager", 661 | "args": ["--mode", "${input:graphicsMode}"], 662 | "stopAtEntry": false, 663 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial25_StatePackager/assets", 664 | "environment": [], 665 | "externalConsole": true, 666 | "MIMode": "gdb", 667 | "setupCommands": [ 668 | { 669 | "description": "Enable pretty-printing for gdb", 670 | "text": "-enable-pretty-printing", 671 | "ignoreFailures": true 672 | } 673 | ], 674 | "preLaunchTask": "Build Tutorial25_StatePackager" 675 | }, 676 | { 677 | "name": "Tutorial26_StateCache", 678 | "type": "cppdbg", 679 | "request": "launch", 680 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial26_StateCache/Tutorial26_StateCache", 681 | "args": ["--mode", "${input:graphicsMode}"], 682 | "stopAtEntry": false, 683 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial26_StateCache/assets", 684 | "environment": [], 685 | "externalConsole": true, 686 | "MIMode": "gdb", 687 | "setupCommands": [ 688 | { 689 | "description": "Enable pretty-printing for gdb", 690 | "text": "-enable-pretty-printing", 691 | "ignoreFailures": true 692 | } 693 | ], 694 | "preLaunchTask": "Build Tutorial26_StateCache" 695 | }, 696 | { 697 | "name": "Tutorial27_PostProcessing", 698 | "type": "cppdbg", 699 | "request": "launch", 700 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial27_PostProcessing/Tutorial27_PostProcessing", 701 | "args": ["--mode", "${input:graphicsMode}"], 702 | "stopAtEntry": false, 703 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial27_PostProcessing/assets", 704 | "environment": [], 705 | "externalConsole": true, 706 | "MIMode": "gdb", 707 | "setupCommands": [ 708 | { 709 | "description": "Enable pretty-printing for gdb", 710 | "text": "-enable-pretty-printing", 711 | "ignoreFailures": true 712 | } 713 | ], 714 | "preLaunchTask": "Build Tutorial27_PostProcessing" 715 | }, 716 | { 717 | "name": "Tutorial29_OIT", 718 | "type": "cppdbg", 719 | "request": "launch", 720 | "program": "${command:cmake.buildDirectory}/DiligentSamples/Tutorials/Tutorial29_OIT/Tutorial29_OIT", 721 | "args": ["--mode", "${input:graphicsMode}"], 722 | "stopAtEntry": false, 723 | "cwd": "${workspaceFolder}/DiligentSamples/Tutorials/Tutorial29_OIT/assets", 724 | "environment": [], 725 | "externalConsole": true, 726 | "MIMode": "gdb", 727 | "setupCommands": [ 728 | { 729 | "description": "Enable pretty-printing for gdb", 730 | "text": "-enable-pretty-printing", 731 | "ignoreFailures": true 732 | } 733 | ], 734 | "preLaunchTask": "Build Tutorial29_OIT" 735 | }, 736 | { 737 | "name": "DiligentCoreTest", 738 | "type": "cppdbg", 739 | "request": "launch", 740 | "program": "${command:cmake.buildDirectory}/DiligentCore/Tests/DiligentCoreTest/DiligentCoreTest", 741 | "args": [""], 742 | "stopAtEntry": false, 743 | "cwd": "${workspaceFolder}/DiligentCore/Tests/DiligentCoreTest/assets", 744 | "environment": [], 745 | "externalConsole": true, 746 | "MIMode": "gdb", 747 | "setupCommands": [ 748 | { 749 | "description": "Enable pretty-printing for gdb", 750 | "text": "-enable-pretty-printing", 751 | "ignoreFailures": true 752 | } 753 | ], 754 | "preLaunchTask": "Build DiligentCoreTest" 755 | }, 756 | { 757 | "name": "DiligentCoreAPITest", 758 | "type": "cppdbg", 759 | "request": "launch", 760 | "program": "${command:cmake.buildDirectory}/DiligentCore/Tests/DiligentCoreAPITest/DiligentCoreAPITest", 761 | "args": ["--mode=${input:graphicsMode}"], 762 | "stopAtEntry": false, 763 | "cwd": "${workspaceFolder}/DiligentCore/Tests/DiligentCoreAPITest/assets", 764 | "environment": [], 765 | "externalConsole": true, 766 | "MIMode": "gdb", 767 | "setupCommands": [ 768 | { 769 | "description": "Enable pretty-printing for gdb", 770 | "text": "-enable-pretty-printing", 771 | "ignoreFailures": true 772 | } 773 | ], 774 | "preLaunchTask": "Build DiligentCoreAPITest" 775 | }, 776 | { 777 | "name": "DiligentToolsTest", 778 | "type": "cppdbg", 779 | "request": "launch", 780 | "program": "${command:cmake.buildDirectory}/DiligentTools/Tests/DiligentToolsTest/DiligentToolsTest", 781 | "args": ["--gtest_filter=*.*"], 782 | "stopAtEntry": false, 783 | "cwd": "${workspaceFolder}/DiligentTools/Tests/DiligentToolsTest/assets", 784 | "environment": [], 785 | "externalConsole": true, 786 | "MIMode": "gdb", 787 | "setupCommands": [ 788 | { 789 | "description": "Enable pretty-printing for gdb", 790 | "text": "-enable-pretty-printing", 791 | "ignoreFailures": true 792 | } 793 | ], 794 | "preLaunchTask": "Build DiligentToolsTest" 795 | }, 796 | { 797 | "name": "DiligentToolsGPUTest", 798 | "type": "cppdbg", 799 | "request": "launch", 800 | "program": "${command:cmake.buildDirectory}/DiligentTools/Tests/DiligentToolsGPUTest/DiligentToolsGPUTest", 801 | "args": ["--mode=${input:graphicsMode}"], 802 | "stopAtEntry": false, 803 | "cwd": "${workspaceFolder}/DiligentTools/Tests/DiligentToolsGPUTest/assets", 804 | "environment": [], 805 | "externalConsole": true, 806 | "MIMode": "gdb", 807 | "setupCommands": [ 808 | { 809 | "description": "Enable pretty-printing for gdb", 810 | "text": "-enable-pretty-printing", 811 | "ignoreFailures": true 812 | } 813 | ], 814 | "preLaunchTask": "Build DiligentToolsGPUTest" 815 | }, 816 | { 817 | "name": "HLSL2GLSLConverter", 818 | "type": "cppdbg", 819 | "request": "launch", 820 | "program": "${command:cmake.buildDirectory}/DiligentTools/HLSL2GLSLConverter/HLSL2GLSLConverter", 821 | "args": ["-i", "ConverterTest.fx", "-e", "TestPS", "-t", "ps", "-c"], 822 | "stopAtEntry": false, 823 | "cwd": "${workspaceFolder}/DiligentTools/HLSL2GLSLConverter/testshaders", 824 | "environment": [], 825 | "externalConsole": true, 826 | "MIMode": "gdb", 827 | "setupCommands": [ 828 | { 829 | "description": "Enable pretty-printing for gdb", 830 | "text": "-enable-pretty-printing", 831 | "ignoreFailures": true 832 | } 833 | ], 834 | "preLaunchTask": "Build HLSL2GLSLConverter" 835 | }, 836 | { 837 | "name": "RenderStatePackager", 838 | "type": "cppdbg", 839 | "request": "launch", 840 | "program": "${command:cmake.buildDirectory}/DiligentTools/RenderStatePackager/Diligent-RenderStatePackager", 841 | "args": [""], 842 | "stopAtEntry": false, 843 | "cwd": "${workspaceFolder}/DiligentTools/RenderStatePackager", 844 | "environment": [], 845 | "externalConsole": true, 846 | "MIMode": "gdb", 847 | "setupCommands": [ 848 | { 849 | "description": "Enable pretty-printing for gdb", 850 | "text": "-enable-pretty-printing", 851 | "ignoreFailures": true 852 | } 853 | ], 854 | "preLaunchTask": "Build RenderStatePackager" 855 | }, 856 | ] 857 | } 858 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmake.buildDirectory": "${workspaceRoot}/build/${buildType}", 3 | "cmake.configureSettings": { "DILIGENT_BUILD_TESTS": "TRUE", "DILIGENT_NO_FORMAT_VALIDATION": "FALSE", "CMAKE_INSTALL_PREFIX": "install"}, 4 | "files.associations": { 5 | "*.tcc": "cpp", 6 | "ostream": "cpp", 7 | "typeinfo": "cpp", 8 | "array": "cpp", 9 | "atomic": "cpp", 10 | "cctype": "cpp", 11 | "chrono": "cpp", 12 | "cinttypes": "cpp", 13 | "clocale": "cpp", 14 | "cmath": "cpp", 15 | "codecvt": "cpp", 16 | "condition_variable": "cpp", 17 | "csignal": "cpp", 18 | "cstddef": "cpp", 19 | "cstdio": "cpp", 20 | "cstdlib": "cpp", 21 | "cstring": "cpp", 22 | "ctime": "cpp", 23 | "cwchar": "cpp", 24 | "cwctype": "cpp", 25 | "exception": "cpp", 26 | "fstream": "cpp", 27 | "functional": "cpp", 28 | "future": "cpp", 29 | "initializer_list": "cpp", 30 | "iomanip": "cpp", 31 | "iosfwd": "cpp", 32 | "iostream": "cpp", 33 | "istream": "cpp", 34 | "limits": "cpp", 35 | "memory": "cpp", 36 | "mutex": "cpp", 37 | "new": "cpp", 38 | "numeric": "cpp", 39 | "optional": "cpp", 40 | "ratio": "cpp", 41 | "sstream": "cpp", 42 | "stdexcept": "cpp", 43 | "streambuf": "cpp", 44 | "string_view": "cpp", 45 | "system_error": "cpp", 46 | "thread": "cpp", 47 | "tuple": "cpp", 48 | "type_traits": "cpp", 49 | "utility": "cpp", 50 | "*.fxh": "cpp", 51 | "xcb.h": "c", 52 | "xcb_keysyms.h": "c", 53 | "deque": "cpp", 54 | "forward_list": "cpp", 55 | "list": "cpp", 56 | "string": "cpp", 57 | "unordered_map": "cpp", 58 | "unordered_set": "cpp", 59 | "vector": "cpp", 60 | "valarray": "cpp", 61 | "bitset": "cpp", 62 | "cstdarg": "cpp", 63 | "algorithm": "cpp", 64 | "iterator": "cpp", 65 | "map": "cpp", 66 | "memory_resource": "cpp", 67 | "random": "cpp", 68 | "set": "cpp", 69 | "cfenv": "cpp", 70 | "style.c": "cpp", 71 | "overview.c": "cpp", 72 | "*.mm": "cpp", 73 | "bit": "cpp", 74 | "compare": "cpp", 75 | "concepts": "cpp", 76 | "numbers": "cpp", 77 | "semaphore": "cpp", 78 | "span": "cpp", 79 | "stop_token": "cpp", 80 | "typeindex": "cpp", 81 | "variant": "cpp", 82 | "regex": "cpp" 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Build Atmosphere", 6 | "type": "shell", 7 | "command": "cmake", 8 | "args": [ 9 | "--build", "${command:cmake.buildDirectory}/", 10 | "--config", "${command:cmake.buildType}", 11 | "--target", "Atmosphere" 12 | ], 13 | "group": { 14 | "kind": "build" 15 | }, 16 | "problemMatcher": ["$gcc"], 17 | "detail": "Builds Atmosphere CMake target" 18 | }, 19 | { 20 | "label": "Build GLTFViewer", 21 | "type": "shell", 22 | "command": "cmake", 23 | "args": [ 24 | "--build", "${command:cmake.buildDirectory}/", 25 | "--config", "${command:cmake.buildType}", 26 | "--target", "GLTFViewer" 27 | ], 28 | "group": { 29 | "kind": "build" 30 | }, 31 | "problemMatcher": ["$gcc"], 32 | "detail": "Builds GLTFViewer CMake target" 33 | }, 34 | { 35 | "label": "Build Shadows", 36 | "type": "shell", 37 | "command": "cmake", 38 | "args": [ 39 | "--build", "${command:cmake.buildDirectory}/", 40 | "--config", "${command:cmake.buildType}", 41 | "--target", "Shadows" 42 | ], 43 | "group": { 44 | "kind": "build" 45 | }, 46 | "problemMatcher": ["$gcc"], 47 | "detail": "Builds Shadows CMake target" 48 | }, 49 | { 50 | "label": "Build ImguiDemo", 51 | "type": "shell", 52 | "command": "cmake", 53 | "args": [ 54 | "--build", "${command:cmake.buildDirectory}/", 55 | "--config", "${command:cmake.buildType}", 56 | "--target", "ImguiDemo" 57 | ], 58 | "group": { 59 | "kind": "build" 60 | }, 61 | "problemMatcher": ["$gcc"], 62 | "detail": "Builds ImguiDemo CMake target" 63 | }, 64 | { 65 | "label": "Build NuklearDemo", 66 | "type": "shell", 67 | "command": "cmake", 68 | "args": [ 69 | "--build", "${command:cmake.buildDirectory}/", 70 | "--config", "${command:cmake.buildType}", 71 | "--target", "NuklearDemo" 72 | ], 73 | "group": { 74 | "kind": "build" 75 | }, 76 | "problemMatcher": ["$gcc"], 77 | "detail": "Builds NuklearDemo CMake target" 78 | }, 79 | { 80 | "label": "Build GLFWDemo", 81 | "type": "shell", 82 | "command": "cmake", 83 | "args": [ 84 | "--build", "${command:cmake.buildDirectory}/", 85 | "--config", "${command:cmake.buildType}", 86 | "--target", "GLFWDemo" 87 | ], 88 | "group": { 89 | "kind": "build" 90 | }, 91 | "problemMatcher": ["$gcc"], 92 | "detail": "Builds GLFWDemo CMake target" 93 | }, 94 | { 95 | "label": "Build GhostCubeScene", 96 | "type": "shell", 97 | "command": "cmake", 98 | "args": [ 99 | "--build", "${command:cmake.buildDirectory}/", 100 | "--config", "${command:cmake.buildType}", 101 | "--target", "GhostCubeScene" 102 | ], 103 | "group": { 104 | "kind": "build" 105 | }, 106 | "problemMatcher": ["$gcc"], 107 | "detail": "Builds GhostCubeScene CMake target" 108 | }, 109 | { 110 | "label": "Build Tutorial00_HelloLinux", 111 | "type": "shell", 112 | "command": "cmake", 113 | "args": [ 114 | "--build", "${command:cmake.buildDirectory}/", 115 | "--config", "${command:cmake.buildType}", 116 | "--target", "Tutorial00_HelloLinux" 117 | ], 118 | "group": { 119 | "kind": "build" 120 | }, 121 | "problemMatcher": ["$gcc"], 122 | "detail": "Builds Tutorial00_HelloLinux CMake target" 123 | }, 124 | { 125 | "label": "Build Tutorial01_HelloTriangle", 126 | "type": "shell", 127 | "command": "cmake", 128 | "args": [ 129 | "--build", "${command:cmake.buildDirectory}/", 130 | "--config", "${command:cmake.buildType}", 131 | "--target", "Tutorial01_HelloTriangle" 132 | ], 133 | "group": { 134 | "kind": "build" 135 | }, 136 | "problemMatcher": ["$gcc"], 137 | "detail": "Builds Tutorial01_HelloTriangle CMake target" 138 | }, 139 | { 140 | "label": "Build Tutorial02_Cube", 141 | "type": "shell", 142 | "command": "cmake", 143 | "args": [ 144 | "--build", "${command:cmake.buildDirectory}/", 145 | "--config", "${command:cmake.buildType}", 146 | "--target", "Tutorial02_Cube" 147 | ], 148 | "group": { 149 | "kind": "build" 150 | }, 151 | "problemMatcher": ["$gcc"], 152 | "detail": "Builds Tutorial02_Cube CMake target" 153 | }, 154 | { 155 | "label": "Build Tutorial03_Texturing", 156 | "type": "shell", 157 | "command": "cmake", 158 | "args": [ 159 | "--build", "${command:cmake.buildDirectory}/", 160 | "--config", "${command:cmake.buildType}", 161 | "--target", "Tutorial03_Texturing" 162 | ], 163 | "group": { 164 | "kind": "build" 165 | }, 166 | "problemMatcher": ["$gcc"], 167 | "detail": "Builds Tutorial03_Texturing CMake target" 168 | }, 169 | { 170 | "label": "Build Tutorial03_Texturing-C", 171 | "type": "shell", 172 | "command": "cmake", 173 | "args": [ 174 | "--build", "${command:cmake.buildDirectory}/", 175 | "--config", "${command:cmake.buildType}", 176 | "--target", "Tutorial03_Texturing-C" 177 | ], 178 | "group": { 179 | "kind": "build" 180 | }, 181 | "problemMatcher": ["$gcc"], 182 | "detail": "Builds Tutorial03_Texturing-C CMake target" 183 | }, 184 | { 185 | "label": "Build Tutorial04_Instancing", 186 | "type": "shell", 187 | "command": "cmake", 188 | "args": [ 189 | "--build", "${command:cmake.buildDirectory}/", 190 | "--config", "${command:cmake.buildType}", 191 | "--target", "Tutorial04_Instancing" 192 | ], 193 | "group": { 194 | "kind": "build" 195 | }, 196 | "problemMatcher": ["$gcc"], 197 | "detail": "Builds Tutorial04_Instancing CMake target" 198 | }, 199 | { 200 | "label": "Build Tutorial05_TextureArray", 201 | "type": "shell", 202 | "command": "cmake", 203 | "args": [ 204 | "--build", "${command:cmake.buildDirectory}/", 205 | "--config", "${command:cmake.buildType}", 206 | "--target", "Tutorial05_TextureArray" 207 | ], 208 | "group": { 209 | "kind": "build" 210 | }, 211 | "problemMatcher": ["$gcc"], 212 | "detail": "Builds Tutorial05_TextureArray CMake target" 213 | }, 214 | { 215 | "label": "Build Tutorial06_Multithreading", 216 | "type": "shell", 217 | "command": "cmake", 218 | "args": [ 219 | "--build", "${command:cmake.buildDirectory}/", 220 | "--config", "${command:cmake.buildType}", 221 | "--target", "Tutorial06_Multithreading" 222 | ], 223 | "group": { 224 | "kind": "build" 225 | }, 226 | "problemMatcher": ["$gcc"], 227 | "detail": "Builds Tutorial06_Multithreading CMake target" 228 | }, 229 | { 230 | "label": "Build Tutorial07_GeometryShader", 231 | "type": "shell", 232 | "command": "cmake", 233 | "args": [ 234 | "--build", "${command:cmake.buildDirectory}/", 235 | "--config", "${command:cmake.buildType}", 236 | "--target", "Tutorial07_GeometryShader" 237 | ], 238 | "group": { 239 | "kind": "build" 240 | }, 241 | "problemMatcher": ["$gcc"], 242 | "detail": "Builds Tutorial07_GeometryShader CMake target" 243 | }, 244 | { 245 | "label": "Build Tutorial08_Tessellation", 246 | "type": "shell", 247 | "command": "cmake", 248 | "args": [ 249 | "--build", "${command:cmake.buildDirectory}/", 250 | "--config", "${command:cmake.buildType}", 251 | "--target", "Tutorial08_Tessellation" 252 | ], 253 | "group": { 254 | "kind": "build" 255 | }, 256 | "problemMatcher": ["$gcc"], 257 | "detail": "Builds Tutorial08_Tessellation CMake target" 258 | }, 259 | { 260 | "label": "Build Tutorial09_Quads", 261 | "type": "shell", 262 | "command": "cmake", 263 | "args": [ 264 | "--build", "${command:cmake.buildDirectory}/", 265 | "--config", "${command:cmake.buildType}", 266 | "--target", "Tutorial09_Quads" 267 | ], 268 | "group": { 269 | "kind": "build" 270 | }, 271 | "problemMatcher": ["$gcc"], 272 | "detail": "Builds Tutorial09_Quads CMake target" 273 | }, 274 | { 275 | "label": "Build Tutorial10_DataStreaming", 276 | "type": "shell", 277 | "command": "cmake", 278 | "args": [ 279 | "--build", "${command:cmake.buildDirectory}/", 280 | "--config", "${command:cmake.buildType}", 281 | "--target", "Tutorial10_DataStreaming" 282 | ], 283 | "group": { 284 | "kind": "build" 285 | }, 286 | "problemMatcher": ["$gcc"], 287 | "detail": "Builds Tutorial10_DataStreaming CMake target" 288 | }, 289 | { 290 | "label": "Build Tutorial11_ResourceUpdates", 291 | "type": "shell", 292 | "command": "cmake", 293 | "args": [ 294 | "--build", "${command:cmake.buildDirectory}/", 295 | "--config", "${command:cmake.buildType}", 296 | "--target", "Tutorial11_ResourceUpdates" 297 | ], 298 | "group": { 299 | "kind": "build" 300 | }, 301 | "problemMatcher": ["$gcc"], 302 | "detail": "Builds Tutorial11_ResourceUpdates CMake target" 303 | }, 304 | { 305 | "label": "Build Tutorial12_RenderTarget", 306 | "type": "shell", 307 | "command": "cmake", 308 | "args": [ 309 | "--build", "${command:cmake.buildDirectory}/", 310 | "--config", "${command:cmake.buildType}", 311 | "--target", "Tutorial12_RenderTarget" 312 | ], 313 | "group": { 314 | "kind": "build" 315 | }, 316 | "problemMatcher": ["$gcc"], 317 | "detail": "Builds Tutorial12_RenderTarget CMake target" 318 | }, 319 | { 320 | "label": "Build Tutorial13_ShadowMap", 321 | "type": "shell", 322 | "command": "cmake", 323 | "args": [ 324 | "--build", "${command:cmake.buildDirectory}/", 325 | "--config", "${command:cmake.buildType}", 326 | "--target", "Tutorial13_ShadowMap" 327 | ], 328 | "group": { 329 | "kind": "build" 330 | }, 331 | "problemMatcher": ["$gcc"], 332 | "detail": "Builds Tutorial13_ShadowMap CMake target" 333 | }, 334 | { 335 | "label": "Build Tutorial14_ComputeShader", 336 | "type": "shell", 337 | "command": "cmake", 338 | "args": [ 339 | "--build", "${command:cmake.buildDirectory}/", 340 | "--config", "${command:cmake.buildType}", 341 | "--target", "Tutorial14_ComputeShader" 342 | ], 343 | "group": { 344 | "kind": "build" 345 | }, 346 | "problemMatcher": ["$gcc"], 347 | "detail": "Builds Tutorial14_ComputeShader CMake target" 348 | }, 349 | { 350 | "label": "Build Tutorial16_BindlessResources", 351 | "type": "shell", 352 | "command": "cmake", 353 | "args": [ 354 | "--build", "${command:cmake.buildDirectory}/", 355 | "--config", "${command:cmake.buildType}", 356 | "--target", "Tutorial16_BindlessResources" 357 | ], 358 | "group": { 359 | "kind": "build" 360 | }, 361 | "problemMatcher": ["$gcc"], 362 | "detail": "Builds Tutorial16_BindlessResources CMake target" 363 | }, 364 | { 365 | "label": "Build Tutorial17_MSAA", 366 | "type": "shell", 367 | "command": "cmake", 368 | "args": [ 369 | "--build", "${command:cmake.buildDirectory}/", 370 | "--config", "${command:cmake.buildType}", 371 | "--target", "Tutorial17_MSAA" 372 | ], 373 | "group": { 374 | "kind": "build" 375 | }, 376 | "problemMatcher": ["$gcc"], 377 | "detail": "Builds Tutorial17_MSAA CMake target" 378 | }, 379 | { 380 | "label": "Build Tutorial18_Queries", 381 | "type": "shell", 382 | "command": "cmake", 383 | "args": [ 384 | "--build", "${command:cmake.buildDirectory}/", 385 | "--config", "${command:cmake.buildType}", 386 | "--target", "Tutorial18_Queries" 387 | ], 388 | "group": { 389 | "kind": "build" 390 | }, 391 | "problemMatcher": ["$gcc"], 392 | "detail": "Builds Tutorial18_Queries CMake target" 393 | }, 394 | { 395 | "label": "Build Tutorial19_RenderPasses", 396 | "type": "shell", 397 | "command": "cmake", 398 | "args": [ 399 | "--build", "${command:cmake.buildDirectory}/", 400 | "--config", "${command:cmake.buildType}", 401 | "--target", "Tutorial19_RenderPasses" 402 | ], 403 | "group": { 404 | "kind": "build" 405 | }, 406 | "problemMatcher": ["$gcc"], 407 | "detail": "Builds Tutorial19_RenderPasses CMake target" 408 | }, 409 | { 410 | "label": "Build Tutorial20_MeshShader", 411 | "type": "shell", 412 | "command": "cmake", 413 | "args": [ 414 | "--build", "${command:cmake.buildDirectory}/", 415 | "--config", "${command:cmake.buildType}", 416 | "--target", "Tutorial20_MeshShader" 417 | ], 418 | "group": { 419 | "kind": "build" 420 | }, 421 | "problemMatcher": ["$gcc"], 422 | "detail": "Builds Tutorial20_MeshShader CMake target" 423 | }, 424 | { 425 | "label": "Build Tutorial21_RayTracing", 426 | "type": "shell", 427 | "command": "cmake", 428 | "args": [ 429 | "--build", "${command:cmake.buildDirectory}/", 430 | "--config", "${command:cmake.buildType}", 431 | "--target", "Tutorial21_RayTracing" 432 | ], 433 | "group": { 434 | "kind": "build" 435 | }, 436 | "problemMatcher": ["$gcc"], 437 | "detail": "Builds Tutorial21_RayTracing CMake target" 438 | }, 439 | { 440 | "label": "Build Tutorial22_HybridRendering", 441 | "type": "shell", 442 | "command": "cmake", 443 | "args": [ 444 | "--build", "${command:cmake.buildDirectory}/", 445 | "--config", "${command:cmake.buildType}", 446 | "--target", "Tutorial22_HybridRendering" 447 | ], 448 | "group": { 449 | "kind": "build" 450 | }, 451 | "problemMatcher": ["$gcc"], 452 | "detail": "Builds Tutorial22_HybridRendering CMake target" 453 | }, 454 | { 455 | "label": "Build Tutorial23_CommandQueues", 456 | "type": "shell", 457 | "command": "cmake", 458 | "args": [ 459 | "--build", "${command:cmake.buildDirectory}/", 460 | "--config", "${command:cmake.buildType}", 461 | "--target", "Tutorial23_CommandQueues" 462 | ], 463 | "group": { 464 | "kind": "build" 465 | }, 466 | "problemMatcher": ["$gcc"], 467 | "detail": "Builds Tutorial23_CommandQueues CMake target" 468 | }, 469 | { 470 | "label": "Build Tutorial24_VRS", 471 | "type": "shell", 472 | "command": "cmake", 473 | "args": [ 474 | "--build", "${command:cmake.buildDirectory}/", 475 | "--config", "${command:cmake.buildType}", 476 | "--target", "Tutorial24_VRS" 477 | ], 478 | "group": { 479 | "kind": "build" 480 | }, 481 | "problemMatcher": ["$gcc"], 482 | "detail": "Builds Tutorial24_VRS CMake target" 483 | }, 484 | { 485 | "label": "Build Tutorial25_StatePackager", 486 | "type": "shell", 487 | "command": "cmake", 488 | "args": [ 489 | "--build", "${command:cmake.buildDirectory}/", 490 | "--config", "${command:cmake.buildType}", 491 | "--target", "Tutorial25_StatePackager" 492 | ], 493 | "group": { 494 | "kind": "build" 495 | }, 496 | "problemMatcher": ["$gcc"], 497 | "detail": "Builds Tutorial25_StatePackager CMake target" 498 | }, 499 | { 500 | "label": "Build Tutorial26_StateCache", 501 | "type": "shell", 502 | "command": "cmake", 503 | "args": [ 504 | "--build", "${command:cmake.buildDirectory}/", 505 | "--config", "${command:cmake.buildType}", 506 | "--target", "Tutorial26_StateCache" 507 | ], 508 | "group": { 509 | "kind": "build" 510 | }, 511 | "problemMatcher": ["$gcc"], 512 | "detail": "Builds Tutorial26_StateCache CMake target" 513 | }, 514 | { 515 | "label": "Build Tutorial27_PostProcessing", 516 | "type": "shell", 517 | "command": "cmake", 518 | "args": [ 519 | "--build", "${command:cmake.buildDirectory}/", 520 | "--config", "${command:cmake.buildType}", 521 | "--target", "Tutorial27_PostProcessing" 522 | ], 523 | "group": { 524 | "kind": "build" 525 | }, 526 | "problemMatcher": ["$gcc"], 527 | "detail": "Builds Tutorial27_PostProcessing CMake target" 528 | }, 529 | { 530 | "label": "Build Tutorial29_OIT", 531 | "type": "shell", 532 | "command": "cmake", 533 | "args": [ 534 | "--build", "${command:cmake.buildDirectory}/", 535 | "--config", "${command:cmake.buildType}", 536 | "--target", "Tutorial29_OIT" 537 | ], 538 | "group": { 539 | "kind": "build" 540 | }, 541 | "problemMatcher": ["$gcc"], 542 | "detail": "Builds Tutorial29_OIT CMake target" 543 | }, 544 | { 545 | "label": "Build DiligentCoreTest", 546 | "type": "shell", 547 | "command": "cmake", 548 | "args": [ 549 | "--build", "${command:cmake.buildDirectory}/", 550 | "--config", "${command:cmake.buildType}", 551 | "--target", "DiligentCoreTest" 552 | ], 553 | "group": { 554 | "kind": "build" 555 | }, 556 | "problemMatcher": ["$gcc"], 557 | "detail": "Builds DiligentCoreTest CMake target" 558 | }, 559 | { 560 | "label": "Build DiligentCoreAPITest", 561 | "type": "shell", 562 | "command": "cmake", 563 | "args": [ 564 | "--build", "${command:cmake.buildDirectory}/", 565 | "--config", "${command:cmake.buildType}", 566 | "--target", "DiligentCoreAPITest" 567 | ], 568 | "group": { 569 | "kind": "build" 570 | }, 571 | "problemMatcher": ["$gcc"], 572 | "detail": "Builds DiligentCoreAPITest CMake target" 573 | }, 574 | { 575 | "label": "Build DiligentToolsTest", 576 | "type": "shell", 577 | "command": "cmake", 578 | "args": [ 579 | "--build", "${command:cmake.buildDirectory}/", 580 | "--config", "${command:cmake.buildType}", 581 | "--target", "DiligentToolsTest" 582 | ], 583 | "group": { 584 | "kind": "build" 585 | }, 586 | "problemMatcher": ["$gcc"], 587 | "detail": "Builds DiligentToolsTest CMake target" 588 | }, 589 | { 590 | "label": "Build DiligentToolsGPUTest", 591 | "type": "shell", 592 | "command": "cmake", 593 | "args": [ 594 | "--build", "${command:cmake.buildDirectory}/", 595 | "--config", "${command:cmake.buildType}", 596 | "--target", "DiligentToolsGPUTest" 597 | ], 598 | "group": { 599 | "kind": "build" 600 | }, 601 | "problemMatcher": ["$gcc"], 602 | "detail": "Builds DiligentToolsGPUTest CMake target" 603 | }, 604 | { 605 | "label": "Build HLSL2GLSLConverter", 606 | "type": "shell", 607 | "command": "cmake", 608 | "args": [ 609 | "--build", "${command:cmake.buildDirectory}/", 610 | "--config", "${command:cmake.buildType}", 611 | "--target", "HLSL2GLSLConverter" 612 | ], 613 | "group": { 614 | "kind": "build" 615 | }, 616 | "problemMatcher": ["$gcc"], 617 | "detail": "Builds HLSL2GLSLConverter CMake target" 618 | }, 619 | { 620 | "label": "Build RenderStatePackager", 621 | "type": "shell", 622 | "command": "cmake", 623 | "args": [ 624 | "--build", "${command:cmake.buildDirectory}/", 625 | "--config", "${command:cmake.buildType}", 626 | "--target", "RenderStatePackager" 627 | ], 628 | "group": { 629 | "kind": "build" 630 | }, 631 | "problemMatcher": ["$gcc"], 632 | "detail": "Builds RenderStatePackager CMake target" 633 | }, 634 | ] 635 | } 636 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.10) 2 | 3 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 4 | 5 | # Generate XCode schema files 6 | set(CMAKE_XCODE_GENERATE_SCHEME TRUE) 7 | # Make malloc write 0xAA to newly allocated memory and 0x55 to deallocated memory 8 | set(CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE YES) 9 | # Place guard pages on each side of large (4096 bytes or more) buffers 10 | set(CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES YES) 11 | 12 | project(DiligentEngine) 13 | 14 | option(DILIGENT_BUILD_TOOLS "Build DiligentTools module" ON) 15 | option(DILIGENT_BUILD_FX "Build DiligentFX module" ON) 16 | option(DILIGENT_BUILD_SAMPLES "Build DiligentSamples module" ON) 17 | option(DILIGENT_BUILD_DOCS "Build documentation" OFF) 18 | 19 | add_subdirectory(DiligentCore) 20 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/DiligentCorePro") 21 | add_subdirectory(DiligentCorePro) 22 | endif() 23 | 24 | if(${DILIGENT_BUILD_TOOLS}) 25 | add_subdirectory(DiligentTools) 26 | else() 27 | if(${DILIGENT_BUILD_FX}) 28 | message("Disabling DiligentFX module as it requires DiligentTools module to be enabled") 29 | set(DILIGENT_BUILD_FX OFF CACHE BOOL "Build DiligentFX module" FORCE) 30 | endif() 31 | 32 | if (${DILIGENT_BUILD_SAMPLES}) 33 | message("Disabling DiligentSamples module as it requires DiligentTools module to be enabled") 34 | set(DILIGENT_BUILD_SAMPLES OFF CACHE BOOL "Build DiligentSamples module" FORCE) 35 | endif() 36 | 37 | if (${DILIGENT_BUILD_UNITY_PLUGIN}) 38 | message("Disabling unity plugin as it requires DiligentTools module to be enabled") 39 | set(DILIGENT_BUILD_UNITY_PLUGIN OFF CACHE BOOL "Build Unity plugin" FORCE) 40 | endif() 41 | endif() 42 | 43 | if(${DILIGENT_BUILD_FX}) 44 | add_subdirectory(DiligentFX) 45 | endif() 46 | 47 | if(${DILIGENT_BUILD_SAMPLES}) 48 | add_subdirectory(DiligentSamples) 49 | endif() 50 | 51 | if(${DILIGENT_BUILD_DOCS}) 52 | add_subdirectory(Doc) 53 | endif() 54 | 55 | if(TARGET GLTFViewer) 56 | set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT GLTFViewer) 57 | elseif(TARGET Asteroids) 58 | set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT Asteroids) 59 | elseif(TARGET Atmosphere) 60 | set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT Atmosphere) 61 | endif() 62 | 63 | if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/DiligentCommunity") 64 | add_subdirectory(DiligentCommunity) 65 | endif() 66 | -------------------------------------------------------------------------------- /Doc/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | pages.dox -------------------------------------------------------------------------------- /Doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.10) 2 | 3 | set(DOXYGEN_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg") 4 | set(MD_PAGES_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/md_pages.py") 5 | set(PAGES_DOX "${CMAKE_CURRENT_SOURCE_DIR}/pages.dox") 6 | 7 | add_custom_target(DiligentDocs 8 | WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.." # Need to run in the root of the repo 9 | COMMAND python "${MD_PAGES_SCRIPT}" "${PAGES_DOX}" 10 | COMMAND doxygen "${DOXYGEN_CONFIG_FILE}" 11 | COMMENT "Building documentation..." 12 | ) 13 | -------------------------------------------------------------------------------- /Doc/README.md: -------------------------------------------------------------------------------- 1 | # Building Documentation 2 | 3 | To build the documentation, install [Doxygen](https://www.doxygen.nl). 4 | Check the required version in the [GitHub Action file](https://github.com/DiligentGraphics/github-action/blob/master/install-doxygen/action.yml). 5 | 6 | Then, from the **root** of the repository, run the following commands: 7 | 8 | **1. Generate the Markdown pages list** 9 | 10 | By default, Doxygen lists all Markdown files in a flat, arbitrary order, which can look messy and isn't 11 | very user-friendly. Use the script below to organize the Markdown files into a tree structure and generate 12 | the `Doc/pages.dox` file: 13 | 14 | ```bash 15 | python Doc/md_pages.py Doc/pages.dox 16 | ``` 17 | 18 | **2. Build the documentation** 19 | 20 | ```bash 21 | doxygen Doc/doxygen.cfg 22 | ``` 23 | 24 | Alternatively, you can enable the `DILIGENT_BUILD_DOCS` CMake option to add the `DiligentDocs` target. 25 | 26 | The generated documentation will be placed in `build/docs/html`. 27 | Open `build/docs/html/index.html` in your browser to view the documentation. 28 | -------------------------------------------------------------------------------- /Doc/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Doc/md_filter.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import re 4 | 5 | from md_utils import get_project_root, compute_page_id 6 | 7 | def replace_special_symbols(text): 8 | # Define your symbol mappings using Unicode escape sequences. 9 | replacements = { 10 | ":arrow_forward:": "\u25B6", 11 | ":heavy_check_mark:": "\u2714", 12 | } 13 | for key, value in replacements.items(): 14 | text = text.replace(key, value) 15 | return text 16 | 17 | 18 | def replace_github_blob_urls(text): 19 | """ 20 | Replaces '/blob/' with '/raw/' in GitHub image URLs. 21 | 22 | For example: 23 | https://github.com/DiligentGraphics/DiligentSamples/blob/master/... 24 | becomes: 25 | https://github.com/DiligentGraphics/DiligentSamples/raw/master/... 26 | """ 27 | # This regex looks for URLs starting with https://github.com/ 28 | # that have the structure: ///blob/ 29 | pattern = r'(https://github\.com/[^/]+/[^/]+/)(blob)/(.*?)' 30 | # Replace the matched 'blob' with 'raw' 31 | return re.sub(pattern, r'\1raw/\3', text) 32 | 33 | 34 | def replace_relative_image_paths(text, root_dir, input_filepath): 35 | """ 36 | Replaces relative image paths in Markdown image references with GitHub URLs. 37 | 38 | Markdown references of the form: 39 | ![Alt Text](relative/image/path) 40 | 41 | are replaced as follows: 42 | 1. Compute the full relative path of the image with respect to the project root. 43 | The project root is defined as one level up from the directory of this script. 44 | 2. If the first-level folder in the computed path starts with "Diligent", treat it as a submodule: 45 | https://github.com/DiligentGraphics//raw/master/ 46 | Otherwise, assume it belongs to the root module: 47 | https://github.com/DiligentGraphics/raw/master/ 48 | """ 49 | 50 | # Regular expression to match Markdown image references. 51 | pattern = r'!\[([^\]]*)\]\(([^)]+)\)' 52 | 53 | def repl(match): 54 | alt_text = match.group(1) 55 | image_path = match.group(2) 56 | # If the path is already absolute (starts with "http"), leave it unchanged. 57 | if image_path.startswith("http"): 58 | return match.group(0) 59 | 60 | # Compute the full path of the image relative to the project root. 61 | # The image path is relative to the input file location. 62 | input_dir = os.path.dirname(os.path.abspath(input_filepath)) 63 | full_image_path = os.path.join(input_dir, image_path) 64 | # Now compute the relative path from the project root. 65 | relative_path = os.path.relpath(full_image_path, root_dir) 66 | # Convert OS-specific path separators to forward slashes. 67 | relative_path_url = relative_path.replace(os.sep, '/') 68 | 69 | # Split the path to check the first folder. 70 | parts = relative_path_url.split('/') 71 | if parts and parts[0].startswith("Diligent"): 72 | module = parts[0] 73 | rest = '/'.join(parts[1:]) 74 | new_url = f"https://github.com/DiligentGraphics/{module}/raw/master/{rest}" 75 | else: 76 | new_url = f"https://github.com/DiligentGraphics/raw/master/{relative_path_url}" 77 | 78 | return f"![{alt_text}]({new_url})" 79 | 80 | # Replace all Markdown image references in the text. 81 | return re.sub(pattern, repl, text) 82 | 83 | def clean_header_title(text): 84 | """ 85 | Remove HTML tags, markdown image/link syntax and extra whitespace 86 | from the input header text, leaving only plain text. 87 | 88 | For example: 89 | "Diligent Core [![Tweet](https://...)](https://...) " 90 | becomes: 91 | "Diligent Core" 92 | """ 93 | # Remove HTML tags. 94 | text = re.sub(r'<[^>]+>', '', text) 95 | # Remove markdown images: ![...](...) 96 | text = re.sub(r'!\[[^\]]*\]\([^\)]*\)', '', text) 97 | # Remove markdown links: [...](...) 98 | text = re.sub(r'\[[^\]]*\]\([^\)]*\)', '', text) 99 | # Remove extra whitespace. 100 | return text.strip() 101 | 102 | TITLE_REPLACEMENTS = { 103 | "Diligent Engine": "Overview", 104 | "Diligent Core": "Overview", 105 | "Diligent Tools": "Overview", 106 | "Diligent FX": "Overview", 107 | "Diligent Samples": "Overview" 108 | } 109 | 110 | def process_content(input_filepath, lines): 111 | root_dir = get_project_root() 112 | 113 | page_id = compute_page_id(root_dir, input_filepath) 114 | output_lines = [] 115 | header_regex = re.compile(r'^\s*(#+)\s*(.+?)\s*$') 116 | header_replaced = False 117 | 118 | for line in lines: 119 | # Apply symbol replacement for every line. 120 | line = replace_special_symbols(line) 121 | 122 | # Fix image URLs. 123 | line = replace_github_blob_urls(line) 124 | 125 | # Replace relative image paths in Markdown image references with GitHub URLs. 126 | line = replace_relative_image_paths(line, root_dir, input_filepath) 127 | 128 | # Look for the first non-empty line that starts with a Markdown header. 129 | if not header_replaced and line.strip(): 130 | match = header_regex.match(line) 131 | if match: 132 | header_title = clean_header_title(match.group(2)) 133 | if header_title in TITLE_REPLACEMENTS: 134 | header_title = TITLE_REPLACEMENTS[header_title] 135 | # Replace the header with the \page command. 136 | output_lines.append(f"\\page {page_id} {header_title}\n") 137 | header_replaced = True 138 | continue 139 | output_lines.append(line) 140 | 141 | return output_lines 142 | 143 | def main(): 144 | if len(sys.argv) < 2: 145 | sys.stderr.write("Usage: {} \n".format(sys.argv[0])) 146 | sys.exit(1) 147 | 148 | input_filepath = sys.argv[1] 149 | 150 | # Open and read the file using the provided file path. 151 | try: 152 | with open(input_filepath, "r", encoding="utf-8") as f: 153 | content = f.readlines() 154 | except Exception as e: 155 | sys.stderr.write(f"Error reading {input_filepath}: {e}\n") 156 | sys.exit(1) 157 | 158 | filtered_content = process_content(input_filepath, content) 159 | # Write the filtered content to standard output. 160 | sys.stdout.reconfigure(encoding='utf-8') 161 | sys.stdout.writelines(filtered_content) 162 | 163 | if __name__ == "__main__": 164 | main() 165 | -------------------------------------------------------------------------------- /Doc/md_pages.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import fnmatch 4 | from md_utils import get_project_root, compute_page_id 5 | #import json 6 | 7 | # Directories to exclude explicitly (relative to the project root). 8 | EXCLUDED_DIRS = [ 9 | "Media", 10 | "DiligentCore/BuildTools/Android", 11 | "DiligentSamples/Android", 12 | "DiligentSamples/Samples/Asteroids/SDK", 13 | "DiligentFX/Shaders/PostProcess/SuperResolution/private/fsr1", 14 | "DiligentTools/NativeApp/Android", 15 | "Tests" 16 | ] 17 | 18 | # Additional exclusion patterns. 19 | EXCLUDE_DIR_PATTERNS = [ 20 | "build/*", 21 | "*/build/*", 22 | "*/ThirdParty/*", 23 | ".*/*", 24 | "*/.*/*", 25 | "DiligentSamples/*/assets/*", 26 | "*/Tests/*", 27 | "*/__pycache__/*" 28 | ] 29 | 30 | EXLUDED_FILES = [ 31 | "DiligentCore/ReleaseHistory.md", 32 | "DiligentSamples/ReleaseHistory.md" 33 | ] 34 | 35 | def should_exclude_dir(rel_dir): 36 | """ 37 | Return True if the given relative directory (relative to the project root) 38 | should be excluded based on explicit directories, additional patterns, 39 | or if any directory component starts with a dot. 40 | """ 41 | # Normalize to forward slashes. 42 | norm_rel_dir = rel_dir.replace(os.sep, '/') 43 | 44 | # Check explicit exclusions. 45 | for ex in EXCLUDED_DIRS: 46 | if norm_rel_dir == ex or norm_rel_dir.startswith(ex + '/'): 47 | return True 48 | 49 | # Check additional patterns. 50 | for pattern in EXCLUDE_DIR_PATTERNS: 51 | if fnmatch.fnmatch(norm_rel_dir, pattern) or fnmatch.fnmatch(norm_rel_dir + '/', pattern): 52 | return True 53 | 54 | return False 55 | 56 | def should_exclude_file(rel_file): 57 | """ 58 | Return True if the given relative file (relative to the project root) 59 | should be excluded based on explicit files or additional patterns. 60 | """ 61 | # Normalize to forward slashes. 62 | norm_rel_file = rel_file.replace(os.sep, '/') 63 | 64 | # Check explicit exclusions. 65 | for ex in EXLUDED_FILES: 66 | if norm_rel_file == ex: 67 | return True 68 | 69 | return False 70 | 71 | def build_md_tree(root_dir, rel_dir=""): 72 | """ 73 | Recursively build a tree structure starting at root_dir. 74 | 75 | Parameters: 76 | - root_dir: the absolute path to the project root. 77 | - rel_dir: the relative directory path from the root (default is "", meaning the root itself). 78 | 79 | Returns: 80 | A dictionary node with keys: 81 | "path": the relative path of the node, 82 | "files": a sorted list of Markdown file names in that directory, 83 | "subdirs": a list of child nodes (for subdirectories that contain Markdown files), 84 | or None if neither the current directory nor any of its subdirectories contain Markdown files. 85 | """ 86 | current_path = os.path.join(root_dir, rel_dir) 87 | 88 | # Skip if the current relative directory should be excluded. 89 | if rel_dir and should_exclude_dir(rel_dir): 90 | return None 91 | 92 | try: 93 | entries = os.listdir(current_path) 94 | except Exception as e: 95 | # If we cannot list the directory, skip it. 96 | return None 97 | 98 | files = [] 99 | subdirs = [] 100 | for entry in entries: 101 | full_path = os.path.join(current_path, entry) 102 | if os.path.isfile(full_path) and entry.lower().endswith('.md'): 103 | child_rel = os.path.join(rel_dir, entry) if rel_dir else entry 104 | if not should_exclude_file(child_rel): 105 | files.append(entry) 106 | elif os.path.isdir(full_path): 107 | subdirs.append(entry) 108 | 109 | # Recursively build nodes for subdirectories. 110 | children = [] 111 | for d in sorted(subdirs): 112 | child_rel = os.path.join(rel_dir, d) if rel_dir else d 113 | child_node = build_md_tree(root_dir, child_rel) 114 | if child_node is not None: 115 | children.append(child_node) 116 | 117 | # If there are no markdown files here and no children with markdown files, skip this directory. 118 | if not files and not children: 119 | return None 120 | 121 | return { 122 | "path": rel_dir, 123 | "files": sorted(files), 124 | "subdirs": children 125 | } 126 | 127 | 128 | def clean_level1(name): 129 | """If a level-1 folder name starts with 'Diligent' (case-insensitive), remove that prefix.""" 130 | if name.lower().startswith("diligent"): 131 | return name[len("Diligent"):] 132 | return name 133 | 134 | 135 | def compute_container(node, root_dir, level = 0): 136 | """ 137 | Recursively process the tree node and compute its container ID and page text. 138 | 139 | Rules: 140 | - If the node contains exactly one Markdown file and no subdirectories, 141 | then its page text is empty (the file's page will be used as a subpage) 142 | and the function returns that file's page ID. 143 | - Otherwise, a container page is generated. Its page text is a block 144 | that starts with a \page definition (using a synthetic container ID and 145 | a title) and then lists as subpages all container IDs returned from: 146 | * Each Markdown file in the node 147 | * Each child node (from recursive invocation) 148 | The container ID is stored in node["container_id"] and the page text in node["page_text"]. 149 | The function returns the container ID. 150 | """ 151 | files = node.get("files", []) 152 | children = node.get("subdirs", []) 153 | rel_path = node.get("path", "") # relative path from the project root 154 | 155 | # Case 1: Leaf node (exactly one Markdown file and no subdirectories). 156 | if len(files) == 1 and not children: 157 | md_file = files[0] 158 | full_path = os.path.join(root_dir, rel_path, md_file) if rel_path else os.path.join(root_dir, md_file) 159 | file_id = compute_page_id(root_dir, full_path) 160 | node["container_id"] = file_id 161 | node["page_text"] = "" # no container page text for a single-file node 162 | return file_id 163 | 164 | # Case 2: Container node. 165 | # Create a synthetic container ID. 166 | if rel_path == "": 167 | container_id = "root" 168 | title = "User Guide" 169 | else: 170 | container_id = "dir_" + rel_path.replace(os.sep, "_") 171 | title = os.path.basename(rel_path) 172 | if level == 1: 173 | title = clean_level1(title) 174 | node["container_id"] = container_id 175 | 176 | # Gather subpage IDs from local Markdown files. 177 | subpage_ids = [] 178 | for f in files: 179 | full_path = os.path.join(root_dir, rel_path, f) if rel_path else os.path.join(root_dir, f) 180 | file_id = compute_page_id(root_dir, full_path) 181 | subpage_ids.append(file_id) 182 | 183 | # Recurse into each child node. 184 | for child in children: 185 | child_id = compute_container(child, root_dir, level + 1) 186 | subpage_ids.append(child_id) 187 | 188 | # Construct the page text for this container node. 189 | # It defines a page with the container ID and title, and lists subpages. 190 | lines = [] 191 | lines.append("/**\n") 192 | lines.append(f" * \\page {container_id} {title}\n") 193 | for sp in subpage_ids: 194 | lines.append(f" *\n") 195 | lines.append(f" * \\subpage {sp}\n") 196 | lines.append(" */\n\n") 197 | page_text = "".join(lines) 198 | node["page_text"] = page_text 199 | 200 | return container_id 201 | 202 | def write_pages(node, out_stream): 203 | """ 204 | Recursively traverse the tree and write out the page text for each node, 205 | if non-empty. 206 | """ 207 | if node.get("page_text"): 208 | out_stream.write(node["page_text"]) 209 | for child in node.get("subdirs", []): 210 | write_pages(child, out_stream) 211 | 212 | 213 | def main(): 214 | project_root = get_project_root() 215 | output_file = sys.argv[1] if len(sys.argv) >= 2 else None 216 | 217 | tree = build_md_tree(project_root) 218 | if tree is None: 219 | sys.stderr.write("No Markdown files found in the project.\n") 220 | return 221 | 222 | #print(json.dumps(tree, indent=4)) 223 | 224 | compute_container(tree, project_root) 225 | 226 | if output_file: 227 | out_stream = open(output_file, 'w', encoding='utf-8') 228 | else: 229 | out_stream = sys.stdout 230 | write_pages(tree, out_stream) 231 | 232 | if __name__ == "__main__": 233 | main() 234 | -------------------------------------------------------------------------------- /Doc/md_utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def compute_page_id(root_dir, input_filepath): 4 | """ 5 | Compute a unique page id based on the file's path relative to the project root. 6 | 7 | For example, if input_filepath is: 8 | /Path/To/page.md 9 | then the returned page id becomes: 10 | Path_To_page 11 | """ # Compute the file's absolute path and then its relative path from the root directory. 12 | abs_input_path = os.path.abspath(input_filepath) 13 | rel_path = os.path.relpath(abs_input_path, root_dir) 14 | # Remove the file extension. 15 | rel_path_no_ext, _ = os.path.splitext(rel_path) 16 | # Replace path separators with underscores. 17 | page_id = rel_path_no_ext.replace(os.sep, "_") 18 | return page_id 19 | 20 | def get_project_root(): 21 | """ 22 | Get the project root directory. 23 | 24 | The project root is defined as the directory containing the script. 25 | """ 26 | # Determine the directory of this script. 27 | script_dir = os.path.dirname(os.path.abspath(__file__)) 28 | # The project root is one level up. 29 | return os.path.dirname(script_dir) -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | -------------------------------------------------------------------------------- /Media/DiligentTerrain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DiligentGraphics/DiligentEngine/ed4d790d7bf4b72e19240b24bffd1b99569b1efd/Media/DiligentTerrain.jpg -------------------------------------------------------------------------------- /ReleaseHistory.md: -------------------------------------------------------------------------------- 1 | # Release Notes 2 | 3 | ## v2.5.6 4 | 5 | ### API Changes 6 | 7 | * Implemented WebGPU backend 8 | * Added `EngineWebGPUCreateInfo` 9 | * Added `IEngineFactoryWebGPU` interface 10 | * Added `RENDER_DEVICE_TYPE_WEBGPU`, `SHADER_SOURCE_LANGUAGE_WGSL`, `SHADER_VARIABLE_FLAG_UNFILTERABLE_FLOAT_TEXTURE_WEBGPU`, 11 | `SHADER_VARIABLE_FLAG_NON_FILTERING_SAMPLER_WEBGPU` enum values 12 | * Added `WEB_GPU_BINDING_TYPE` enum, `WebGPUResourceAttribs` struct, and 13 | `WebGPUResourceAttribs WebGPUAttribs` member to `PipelineResourceDesc` struct 14 | * Added WebGPU-specific interfaces (`IRenderDeviceWebGPU`, `IDeviceContextWebGPU`, etc.) 15 | * Enabled asynchronous shdare and pipeline state compilation (API255001) 16 | * Added `AsyncShaderCompilation` render device feature 17 | * Added `pAsyncShaderCompilationThreadPool` and `NumAsyncShaderCompilerThreads` members to `EngineCreateInfo` struct 18 | * Added `SHADER_COMPILE_FLAG_ASYNCHRONOUS` and `PSO_CREATE_FLAG_ASYNCHRONOUS` flags 19 | * Added `SHADER_STATUS` and `PIPELINE_STATE_STATUS` enums 20 | * Added `IShader::GetStatus` and `IPipelineState::GetStatus` methods 21 | 22 | ### Samples and Tutorials 23 | 24 | Added [samples and tutorials web page](https://diligentgraphics.github.io/) 25 | 26 | 27 | ## v2.5.5 28 | 29 | ### API Changes 30 | 31 | * Added `MultiDraw` and `MultiDrawIndexed` commands (API254006) 32 | * Added `SerializationDeviceGLInfo` struct (API254005) 33 | * The `ValidateShaders` member allows disabling time-consuming shader compilation 34 | * Replaced `AnisotropicFilteringSupported` member of `SamplerProperties` struct with `MaxAnisotropy` (API254004) 35 | * Added `TextureSubresourceViews` device feature (API254003) 36 | * Added device context rendering statistics (API254002) 37 | * Added `DeviceContextStats` struct 38 | * Added `IDeviceContext::ClearStats` and `IDeviceContext::GetStats` methods 39 | * `IDeviceContext::TransitionShaderResources`: removed unused `pPipelineState` parameter (API254001) 40 | 41 | ### Samples and Tutorials 42 | 43 | * Added [Tutorial27 - Post Processing](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial27_PostProcessing) 44 | * Added [USD Viewer](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/USDViewer) 45 | 46 | ### FX 47 | 48 | * Added Post Processing effects: 49 | * [Screen-Space Reflections](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/ScreenSpaceReflection) 50 | * [Screen-Space Ambient Occlusion](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/ScreenSpaceAmbientOcclusion) 51 | * [Depth of Field](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/DepthOfField) 52 | * [Bloom](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/Bloom) 53 | * [Temporal Anti-Aliasing](https://github.com/DiligentGraphics/DiligentFX/tree/master/PostProcess/TemporalAntiAliasing) 54 | * Added [Hydrogent](https://github.com/DiligentGraphics/DiligentFX/tree/master/Hydrogent), an implementation of the Hydra rendering API in Diligent Engine. 55 | * PBR Material Improvements: 56 | * Clear-Coat 57 | * Sheen (aka fuzz) 58 | * Iridescence (aka thin layer) 59 | * Anisotropy 60 | 61 | 62 | ## v2.5.4 63 | 64 | ### API Changes 65 | 66 | * Use thread group count X/Y/Z for mesh draw commands (API253012) 67 | * Added `ShaderMacroArray` struct (API253011) 68 | * The `Macros` member of `ShaderCreateInfo` struct is now of type `ShaderMacroArray` 69 | * Replaced `ResourceMappingDesc` with `ResourceMappingCreateInfo` (API253010) 70 | * Use `ResourceMappingCreateInfo::NumEntries` to define the number of entries instead of the trailing null entry 71 | * Removed `ShaderCreateInfo::ppConversionStream` (API253009) 72 | * Removed `ppCompilerOutput` member of the `ShaderCreateInfo` struct and added it as parameter to the `IRenderDevice::CreateShader` method (API253008) 73 | * Added `IPipelineStateGL::GetGLProgramHandle` and `IShaderGL::GetGLShaderHandle` methods (API253007) 74 | * Enabled read-only depth-stencil buffers (API253006) 75 | * Added `TEXTURE_VIEW_READ_ONLY_DEPTH_STENCIL` view type 76 | * Added `UseReadOnlyDSV` member to `GraphicsPipelineDesc` struct 77 | * Added `PSO_CACHE_FLAGS` enum and `PipelineStateCacheDesc::Flags` member (API253005) 78 | * Archiver and render state cache: added content version (API253004) 79 | * Added `RenderDeviceShaderVersionInfo` struct and `RenderDeviceInfo::MaxShaderVersion` member (API253003) 80 | * Added texture component swizzle (API253002) 81 | * Added `TEXTURE_COMPONENT_SWIZZLE` enum and `TextureComponentMapping` struct 82 | * Added `Swizzle` member to `TextureViewDesc` struct 83 | * Added `TextureComponentSwizzle` member to `DeviceFeatures` struct 84 | * Added shader constant buffer reflection API (API253001) 85 | * Added `SHADER_CODE_BASIC_TYPE` and `SHADER_CODE_VARIABLE_CLASS` enums 86 | * Added `ShaderCodeVariableDesc` and `ShaderCodeBufferDesc` structs 87 | * Added `IShader::GetConstantBufferDesc` method 88 | 89 | ### Samples and Tutorials 90 | 91 | * Added [Tutorial03 - Texturing for DotNet](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial03_Texturing-DotNet) 92 | 93 | 94 | ## v2.5.3 95 | 96 | ### API Changes 97 | 98 | * Added `RENDER_STATE_CACHE_LOG_LEVEL` enum, replaced `EnableLogging` member of `RenderStateCacheCreateInfo` struct with `LoggingLevel` (API252009) 99 | * Added `IPipelineResourceSignature::CopyStaticResources` and `IPipelineState::CopyStaticResources` methods (API252008) 100 | * Added render state cache (`IRenderStateCache` interface and related data types) (API252007) 101 | * Moved `UseCombinedTextureSamplers` and `CombinedSamplerSuffix` members from `ShaderCreateInfo` to `ShaderDesc` (API252006) 102 | * Added `IntanceLayerCount` and `ppInstanceLayerNames` members to EngineVkCreateInfo struct (API252005) 103 | * Added `IgnoreDebugMessageCount` and `ppIgnoreDebugMessageNames` to `EngineVkCreateInfo` struct (API252004) 104 | * Refactored archiver API (removed `IDeviceObjectArchive` and `IArchive`; enabled dearchiver 105 | to load multiple archives to allow storing signatures and pipelines separately) (API252003) 106 | * Added `SET_SHADER_RESOURCES_FLAGS` enum and `Flags` parameter to `IShaderResourceVariable::Set` 107 | and `IShaderResourceVariable::SetArray` methods (API252002) 108 | * Added primitive topologies with adjacency (API252001) 109 | 110 | ### Samples and Tutorials 111 | 112 | * Added [Tutorial25 - Render State Packager](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial25_StatePackager) 113 | * Added [Tutorial26 - Render State Cache](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial26_StateCache) 114 | 115 | 116 | ## v2.5.2 117 | 118 | ### API Changes 119 | 120 | * Added `SamplerDesc::UnnormalizedCoords` parameter (API Version 250014) 121 | * Added device object serialization/deserialization (API Version 250013) 122 | * Added pipeline state cache (API Version 250012) 123 | 124 | 125 | ## v2.5.1 126 | 127 | ### API Changes 128 | 129 | * Enabled emscripten platform 130 | * Added subsampled render targets for VRS (API Version 250011) 131 | * Added sparse resources (API Version 250010) 132 | * Updated API to use 64bit offsets for GPU memory (API Version 250009) 133 | * Reworked draw indirect command attributes (moved buffers into the attribs structs), removed DrawMeshIndirectCount (API Version 250008) 134 | * Enabled indirect multidraw commands (API Version 250007) 135 | * Enabled variable rate shading (API Version 250006) 136 | * Added 'TransferQueueTimestampQueries' feature (API Version 250005) 137 | * Added 'RESOURCE_STATE_COMMON' state; added `STATE_TRANSITION_FLAGS` enum and replaced 138 | `StateTransitionDesc::UpdateResourceState` with `STATE_TRANSITION_FLAGS Flags` (API Version 250004) 139 | * Added `ComputeShaderProperties` struct (API Version 250003) 140 | * Added `IShaderResourceBinding::CheckResources` method and `SHADER_RESOURCE_VARIABLE_TYPE_FLAGS` enum (API Version 250002) 141 | * Removed `IShaderResourceVariable::IsBound` with `IShaderResourceVariable::Get` (API Version 250001) 142 | 143 | ### Samples and Tutorials 144 | 145 | * Added [Tutorial23 - Command Queues](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial23_CommandQueues) 146 | * Added [Tutorial24 - Variable rate shading](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial24_VRS) 147 | 148 | 149 | ## v2.5 150 | 151 | ### API Changes 152 | 153 | * Removed `RayTracing2` device feature and added `RAY_TRACING_CAP_FLAGS` enum (API Version 240099) 154 | * Added tile shaders (API Version 240098) 155 | * Added `PIPELINE_TYPE_TILE` and `SHADER_TYPE_TILE` enum values 156 | * Added `TileShaders` device feature 157 | * Added `TilePipelineDesc`, `TilePipelineStateCreateInfo` and `DispatchTileAttribs` structs 158 | * Added `IRenderDevice::CreateTilePipelineState`, `IPipelineState::GetTilePipelineDesc`, 159 | `IDeviceContext::DispatchTile` and `IDeviceContext::GetTileSize` methods 160 | * Removed `GetNextFenceValue`, `GetCompletedFenceValue`, and `IsFenceSignaled` methods from `IRenderDeviceD3D12` and `IRenderDeviceVk` interfaces 161 | as they are now in `ICommandQueue` interface (API Version 240097) 162 | * Added `ICommandQueue` interface, `IDeviceContext::LockCommandQueue` and `IDeviceContext::UnlockCommandQueue` methods, 163 | removed fence query methods from `IRenderDeviceVk`, `IRenderDeviceD3D12`, and `IRenderDeviceMtl` (API Version 240096) 164 | * Added multiple immediate device contexts and refactored adapter queries (API Version 240095) 165 | * `CommandQueueMask` member of `TextureDesc`, `BufferDesc`, `PipelineStateDesc`, `TopLevelASDesc`, 166 | and `BottomLevelASDesc`, was renamed to `ImmediateContextMask` 167 | * Added `pContext` member to `TextureData` and `BufferData` structs to indicate which context to 168 | use for initialization. 169 | * Removed `GetDeviceCaps` and `GetDeviceProperties` `IDeviceContext` methods and added 170 | `GetDeviceInfo` and `GetAdapterInfo` methods; added `RenderDeviceInfo` struct. 171 | * Renamed `SamplerCaps` to `SamplerProperties, `TextureCaps` to `TextureProperties`; added `BufferProperties`, 172 | `RayTracingProperties`, and `MeshShaderProperties` structs 173 | * Removed `DeviceLimits` struct 174 | * Removed `DeviceCaps` struct and moved its members to `GraphicsAdapterInfo` and `RenderDeviceInfo` structs 175 | * Added `NativeFence` to `DeviceFeatures` 176 | * Added `CommandQueueInfo` struct 177 | * Added `COMMAND_QUEUE_TYPE` and `QUEUE_PRIORITY` enums 178 | * Renamed `ShaderVersion` struct to `Version` 179 | * Reworked `GraphicsAdapterInfo` struct 180 | * Added `ImmediateContextCreateInfo` struct and `pImmediateContextInfo`, `NumImmediateContexts` members to `EngineCreateInfo` struct 181 | * Added `AdapterId` and `GraphicsAPIVersion` members to `EngineCreateInfo` struct 182 | * Removed `DIRECT3D_FEATURE_LEVEL` enum 183 | * Added `FENCE_TYPE` enum 184 | * Renamed `IFence::Reset` to `IFence::Signal`; added `IFence::Wait` method 185 | * Added `IEngineFactory::EnumerateAdapters` method 186 | * Added `DeviceContextDesc` struct and `IDeviceContext::GetDesc` method 187 | * Added `IDeviceContext::Begin` method, renamed `IDeviceContext::SignalFence` to `IDeviceContext::EnqueueSignal` 188 | * Added debug annotations `IDeviceContext::BeginDebugGroup`, `IDeviceContext::EndDebugGroup`, 189 | `IDeviceContext::InsertDebugLabel` (API Version 240095) 190 | * Added `DefaultVariableMergeStages` member to `PipelineResourceLayoutDesc` struct (API240094) 191 | * Added `IShaderResourceVariable::SetBufferRange` and `IShaderResourceVariable::SetBufferOffset` methods, 192 | added `DeviceLimits` struct (API240093) 193 | * Updated API to allow explicitly flushing/invlidating mapped buffer memory range : 194 | added `MEMORY_PROPERTIES` enum, `IBuffer::GetMemoryProperties()`, `IBuffer::FlushMappedRange()`, 195 | and `IBuffer::InvalidateMappedRange()` methods (API240092) 196 | * Added `IDeviceContext::SetUserData()` and `IDeviceContext::GetUserData()` methods (API240091) 197 | * Added `SHADER_VARIABLE_FLAGS` enum and `SHADER_VARIABLE_FLAGS Flags` member to ShaderResourceVariableDesc struct (API240090) 198 | * Reworked validation options (API240089) 199 | * Added `VALIDATION_FLAGS` and `D3D12_VALIDATION_FLAGS` enums; renamed `D3D11_DEBUG_FLAGS` to `D3D11_VALIDATION_FLAGS` 200 | * Added `VALIDATION_FLAGS ValidationFlags` and `bool EnableValidation` to `EngineCreateInfo` 201 | * Added `D3D12_VALIDATION_FLAGS D3D12ValidationFlags` to `EngineD3D12CreateInfo`; removed `EnableDebugLayer`, `EnableGPUBasedValidation`, 202 | `BreakOnError`, `BreakOnCorruption` 203 | * Added `VALIDATION_LEVEL` enum and `SetValidationLevel()` create info structs' helper functions 204 | * Removed `EngineGLCreateInfo::CreateDebugContext` member (it is replaced with `EnableValidation`) 205 | * Added `MtlThreadGroupSizeX`, `MtlThreadGroupSizeY`, and `MtlThreadGroupSizeZ` members to 206 | `DispatchComputeAttribs` and `DispatchComputeIndirectAttribs` structs (API Version 240088) 207 | * Added InstanceDataStepRate device feature (API Version 240087) 208 | * Added WaveOp device feature (API Version 240086) 209 | * Added UpdateSBT command (API Version 240085) 210 | * Removed `EngineD3D12CreateInfo::NumCommandsToFlushCmdList` and `EngineVkCreateInfo::NumCommandsToFlushCmdBuffer` as flushing 211 | the context based on the number of commands is unreasonable (API Version 240084) 212 | * Added pipeline resource signatures, enabled inline ray tracing, added indirect draw mesh command (API Version 240083) 213 | * Replaced `IDeviceContext::ExecuteCommandList()` with `IDeviceContext::ExecuteCommandLists()` method that takes 214 | an array of command lists instead of one (API Version 240082) 215 | * Added `IDeviceObject::SetUserData()` and `IDeviceObject::GetUserData()` methods (API Version 240081) 216 | 217 | ### Samples and Tutorials 218 | 219 | * Added [Tutorial22 - Hybrid Rendering](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial22_HybridRendering) 220 | 221 | 222 | ## v2.4.g 223 | 224 | ### API Changes 225 | 226 | * Enabled ray tracing (API Version 240080) 227 | * Added `IDeviceContext::GetFrameNumber` method (API Version 240079) 228 | * Added `ShaderResourceQueries` device feature and `EngineGLCreateInfo::ForceNonSeparablePrograms` parameter (API Version 240078) 229 | 230 | * Renamed `USAGE_STATIC` to `USAGE_IMMUTABLE` (API Version 240077) 231 | 232 | * Renamed static samplers into immutable samplers (API Version 240076) 233 | * Renamed `StaticSamplerDesc` -> `ImmutableSamplerDesc` 234 | * Renamed `PipelineResourceLayoutDesc::NumStaticSamplers` -> `PipelineResourceLayoutDesc::NumImmutableSamplers` 235 | * Renamed `PipelineResourceLayoutDesc::StaticSamplers` -> `PipelineResourceLayoutDesc::ImmutableSamplers` 236 | 237 | * Refactored pipeline state creation (API Version 240075) 238 | * Replaced `PipelineStateCreateInfo` with `GraphicsPipelineStateCreateInfo` and `ComputePipelineStateCreateInfo` 239 | * Replaced `IRenderDevice::CreatePipelineState` with `IRenderDevice::CreateGraphicsPipelineState` and `IRenderDevice::CreateComputePipelineState` 240 | * `pVS`, `pGS`, `pHS`, `pDS`, `pPS`, `pAS`, `pMS` were moved from `GraphicsPipelineDesc` to `GraphicsPipelineStateCreateInfo` 241 | * `GraphicsPipelineDesc GraphicsPipeline` was moved from `PipelineStateDesc` to `GraphicsPipelineStateCreateInfo` 242 | * `pCS` is now a member of `ComputePipelineStateCreateInfo`, `ComputePipelineDesc` was removed 243 | * Added `IPipelineState::GetGraphicsPipelineDesc` method 244 | 245 | Old API for graphics pipeline initialization: 246 | ```cpp 247 | PipelineStateCreateInfo PSOCreateInfo; 248 | PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; 249 | 250 | PSODesc.GraphicsPipeline.pVS = pVS; 251 | PSODesc.GraphicsPipeline.pPS = pVS; 252 | // ... 253 | Device->CreatePipelineState(PSOCreateInfo, &pPSO); 254 | ``` 255 | 256 | New API for graphics pipeline initialization: 257 | ```cpp 258 | GraphicsPipelineStateCreateInfo PSOCreateInfo; 259 | // ... 260 | PSOCreateInfo.pVS = pVS; 261 | PSOCreateInfo.pPS = pVS; 262 | Device->CreateGraphicsPipelineState(PSOCreateInfo, &pPSO); 263 | ``` 264 | 265 | Old API for compute pipeline initialization: 266 | ```cpp 267 | PipelineStateCreateInfo PSOCreateInfo; 268 | PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; 269 | 270 | PSODesc.ComputePipeline.pCS = pCS; 271 | // ... 272 | Device->CreatePipelineState(PSOCreateInfo, &pPSO); 273 | ``` 274 | 275 | New API for compute pipeline initialization: 276 | ```cpp 277 | ComputePipelineStateCreateInfo PSOCreateInfo; 278 | 279 | PSOCreateInfo.pCS = pCS; 280 | Device->CreateComputePipelineState(PSOCreateInfo, &pPSO); 281 | ``` 282 | 283 | * Added `ShaderInt8`, `ResourceBuffer8BitAccess`, and `UniformBuffer8BitAccess` device features. (API Version 240074) 284 | * Added `ShaderFloat16`, `ResourceBuffer16BitAccess`, `UniformBuffer16BitAccess`, and `ShaderInputOutput16` device features. (API Version 240073) 285 | 286 | 287 | ### Samples and Tutorials 288 | 289 | * Added [Tutorial21 - Ray Tracing](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial21_RayTracing) 290 | 291 | 292 | ## v2.4.f 293 | 294 | ### API Changes 295 | 296 | * Added `UnifiedMemoryCPUAccess` member to `GraphicsAdapterInfo` struct (API Version 240072) 297 | * An application should check allowed unified memory access types before creating unified buffers 298 | * Added GPU vendor and memory size detection (API Version 240071) 299 | * Added `ADAPTER_VENDOR` enum 300 | * Added `GraphicsAdapterInfo` struct 301 | * Added `GraphicsAdapterInfo AdapterInfo` member to `DeviceCaps` struct 302 | * Removed `ADAPTER_TYPE AdaterType` from `DeviceCaps` struct 303 | * Reworked texture format properties (API Version 240070) 304 | * Added `RESOURCE_DIMENSION_SUPPORT` enum 305 | * Reworked `TextureFormatInfoExt` struct 306 | * Added option to disable/enable device features during initialization (API Version 240069) 307 | * Added `DEVICE_FEATURE_STATE` enum 308 | * Changed the types of members of `DeviceFeatures` struct from bool to `DEVICE_FEATURE_STATE` 309 | * Added `DeviceFeatures Features` member to `EngineCreateInfo` struct 310 | * Enabled mesh shaders (API Version 240068) 311 | * Added `PIPELINE_TYPE` enum 312 | * Replaced `IsComputePipline` member of `PipelineStateDesc` struct with `PIPELINE_TYPE PipelineType` 313 | * Added new mesh shader types 314 | * Added mesh shader draw commands 315 | * Added `QUERY_TYPE_DURATION` query type (API Version 240067) 316 | * Added `USAGE_UNIFIED` usage type (API Version 240066) 317 | * Added render passes (API Version 240065) 318 | * Added `CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS` enum and `IShaderSourceInputStreamFactory::CreateInputStream2` method (API Version 240064) 319 | * Added `ISwapChain::SetMaximumFrameLatency` function (API Version 240061) 320 | * Added `EngineGLCreateInfo::CreateDebugContext` member (API Version 240060) 321 | * Added `SHADER_SOURCE_LANGUAGE_GLSL_VERBATIM` value (API Version 240059). 322 | * Added `GLBindTarget` parameter to `IRenderDeviceGL::CreateTextureFromGLHandle` method (API Version 240058). 323 | 324 | ### Samples and Tutorials 325 | 326 | * Added [HelloAR Android sample](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Android/HelloAR) 327 | * Added [Tutorial19 - Render Passes](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial19_RenderPasses) 328 | * Added [Tutorial20 - Mesh Shader](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial20_MeshShader) 329 | 330 | 331 | ## v2.4.e 332 | 333 | ### General 334 | 335 | * Enabled Vulkan on Android 336 | * Added C Interface (API Version 240052) 337 | 338 | ### API Changes 339 | 340 | * Added `PreTransform` parameter to swap chain description (API Version 240057). 341 | * Added `PipelineStateCreateInfo` struct that is now taken by `IRenderDevice::CreatePipelineState` instead of 342 | `PipelineStateDesc` struct. Added `PSO_CREATE_FLAGS` enum (API Version 240056). 343 | 344 | Old API: 345 | ```cpp 346 | PipelineStateDesc PSODesc; 347 | // ... 348 | pRenderDevice->CreatePipelineState(PSODesc, &pPSO); 349 | ``` 350 | 351 | New API: 352 | ```cpp 353 | PipelineStateCreateInfo PSOCreateInfo; 354 | PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; 355 | // ... 356 | pRenderDevice->CreatePipelineState(PSOCreateInfo, &pPSO); 357 | ``` 358 | 359 | * Added `PRIMITIVE_TOPOLOGY_LINE_STRIP` topology (API Version 240055) 360 | * Updated swap chain creation functions to use `NativeWindow` (API Version 240054) 361 | * Added `NativeWindow` wrapper and replaced `pNativeWndHandle` and `pDisplay` members with it in `EngineGLCreateInfo` (API Version 240053) 362 | 363 | 364 | ## v2.4.d 365 | 366 | ### API Changes 367 | 368 | * Added Queries (API Version 240051) 369 | * Added `AdapterType` member to `DeviceCaps` struct (API Version 240048) 370 | * Added `IDeviceContextGL::SetSwapChain` and `IRenderDeviceGL::CreateDummyTexture` methods (API Version 240047) 371 | * Removed `IDeviceContext::SetSwapChain` method (API Version 240046) 372 | * Renamed `MAP_FLAG_DO_NOT_SYNCHRONIZE` flag to `MAP_FLAG_NO_OVERWRITE` (API Version 240045) 373 | * Added `GetVkInstance` and `GetVkPhysicalDevice` methods to `IRenderDeviceVk` interface (API Version 240044) 374 | * Added `HLSLSemantic` member to `LayoutElement` struct (API Version 240042) 375 | * Added `ResolveTextureSubresource` device context command, removed `SamplesCount` member of the 376 | `SwapChainDesc` (API Version 240041) 377 | * Added `APIVersion` member to `EngineCreateInfo` struct (API Version 240040) 378 | * Added `IDeviceObject::GetUniqueID` method (API Version 240039) 379 | * Added `IDeviceContextD3D12::LockCommandQueue`, `IDeviceContextD3D12::UnlockCommandQueue`, 380 | `IDeviceContextVk::LockCommandQueue`, and `IDeviceContextVk::UnlockCommandQueue` methods (API Version 240038) 381 | * Added `EnableGPUBasedValidation` member to `EngineD3D12CreateInfo` struct (API Version 240037) 382 | * Added `DRAW_FLAG_RESOURCE_BUFFERS_INTACT` flag (API Version 240036) 383 | * Added `HLSLVersion`, `GLSLVersion` and `GLESSLVersion` to `ShaderCreateInfo` struct (API Version 240035) 384 | * Renamed `EngineD3D11DebugFlags` to `D3D11_DEBUG_FLAGS` (API Version 240034) 385 | * Split up `Draw` command into `Draw`, `DrawIndexed`, `DrawIndirect` and `DrawIndexedIndirect`. 386 | Split up `DispatchCompute` command into `DispatchCompute` and `DispatchComputeInidrect` (API Version 240033). 387 | * Enabled bindless resources 388 | * Removed `SHADER_PROFILE` enum (API Version 240032) 389 | * Added `DIRECT3D_FEATURE_LEVEL` and `DIRECT3D_FEATURE_LEVEL MinimumFeatureLevel` member to 390 | `EngineD3D11CreateInfo` and `EngineD3D12CreateInfo` structs (API Version 240032) 391 | * Updated `IEngineFactoryD3D11::EnumerateHardwareAdapters`, `IEngineFactoryD3D11::EnumerateDisplayModes`, 392 | `IEngineFactoryD3D12::EnumerateHardwareAdapters`, `IEngineFactoryD3D12::EnumerateDisplayModes` 393 | to take minimum feature level. (API Version 240032) 394 | * Added `bBindlessSupported` member to `DeviceCaps` struct. (API Version 240032) 395 | 396 | ### General 397 | 398 | * Enabled automated unit testing, format validation and static code analysis 399 | * Added [Tutorial16 - Bindless Resources](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial16_BindlessResources) 400 | * Added [Tutorial17 - MSAA](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial17_MSAA) 401 | * Added [Tutorial18 - Queries](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial18_Queries) 402 | * Removed RenderScript and Lua 403 | 404 | ## v2.4.c 405 | 406 | ### General 407 | 408 | * Enabled Vulkan on iOS 409 | * Replaced AntTweakBar UI library with dear imgui 410 | * Added [GLTF2.0 loader](https://github.com/DiligentGraphics/DiligentTools/tree/master/AssetLoader) 411 | and [PBR renderer](https://github.com/DiligentGraphics/DiligentFX/tree/master/GLTF_PBR_Renderer) 412 | * Added [GLTF Viewer](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/GLTFViewer) 413 | * Added [Shadowing Component](https://github.com/DiligentGraphics/DiligentFX/tree/master/Components#shadows) 414 | and [Shadows Sample](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/Shadows) 415 | * Added [Dear Imgui demo](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Samples/ImguiDemo) 416 | * Added [Tutorial13 - Shadow Map](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial13_ShadowMap) 417 | * Added [Tutorial14 - Compute Shader](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial14_ComputeShader) 418 | * Added [Tutorial15 - Multiple Windows](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial15_MultipleWindows) 419 | * Removed AntTweakBar sample 420 | 421 | ### API changes 422 | 423 | * Moved `NumDeferredContexts` parameter from factory functions `IEngineFactoryD3D11::CreateDeviceAndContextsD3D11`, 424 | `IEngineFactoryD3D12::CreateDeviceAndContextsD3D12` and `IEngineFactoryVk::CreateDeviceAndContextsVk` to 425 | `EngineCreateInfo` struct. 426 | * Renamed `USAGE_CPU_ACCESSIBLE` -> `USAGE_STAGING` 427 | * Added `SWAP_CHAIN_USAGE_FLAGS` enum 428 | * Replaced overloaded `IPipelineState::GetStaticShaderVariable()` with `IPipelineState::GetStaticVariableByName()` and `IPipelineState::GetStaticVariableByIndex()` 429 | * Replaced overloaded `IShaderResourceBinding::GetVariable()` with `IShaderResourceBinding::GetVariableByName()` and `IShaderResourceBinding::GetVariableByIndex()` 430 | * Made `IShaderSourceInputStreamFactory` derived from `IObject`; 431 | added `IEngineFactory::CreateDefaultShaderSourceStreamFactory()` method; 432 | added `IRenderDevice::GetEngineFactory()` method (API Version 240021) 433 | * Added `DRAW_FLAG_VERIFY_DRAW_ATTRIBS`, `DRAW_FLAG_VERIFY_RENDER_TARGETS`, and `DRAW_FLAG_VERIFY_ALL` flags (API Version 240022) 434 | * `TEXTURE_VIEW_FLAGS` enum and `Flags` member to `TextureViewDesc` structure (API Version 240023) 435 | * Added `IShaderResourceVariable::IsBound()` method (API Version 240024) 436 | * Added `Diligent-` prefix to project names to avoid name conflicts. 437 | * Added `IDeviceContextD3D12::GetD3D12CommandList` method 438 | * Added `IDeviceContext::WaitForFence()` method (API Version 240027) 439 | * Added `IDeviceContext::WaitForIdle()` method (API Version 240028) 440 | * Added `IRenderDevice::IdleGPU()` method (API Version 240029) 441 | * Added `EngineD3D12CreateInfo::EnableDebugLayer` member (API Version 240030) 442 | * Added `EngineD3D12CreateInfo::BreakOnError` and `EngineD3D12CreateInfo::BreakOnCorruption` members (API Version 240031) 443 | 444 | 445 | ## v2.4.b 446 | 447 | ### General 448 | 449 | * Added cmake options to disable specific back-ends and glslang 450 | * Improved engine support of GLES3.0 devices 451 | * Added new module - [DiligentFX](https://github.com/DiligentGraphics/DiligentFX), a high-level rendering framework 452 | * Reworked light scattering post-processing effect to be ready-to-use component 453 | 454 | ### API changes 455 | 456 | * Updated `IRenderDevice::CreateTexture()` and `IRenderDevice::CreateBuffer()` to take pointer 457 | to initialization data rather than references. 458 | * Added `LayoutElement::AutoOffset` and `LayoutElement::AutoOffset` values to use instead of 0 when 459 | automatically computing input layout elements offset and strides. 460 | * Renamed factory interfaces and headers: 461 | * `IRenderDeviceFactoryD3D11` -> `IEngineFactoryD3D11`, RenderDeviceFactoryD3D11.h -> EngineFactoryD3D11.h 462 | * `IRenderDeviceFactoryD3D12` -> `IEngineFactoryD3D12`, RenderDeviceFactoryD3D12.h -> EngineFactoryD3D12.h 463 | * `IRenderDeviceFactoryOpenGL` -> `IEngineFactoryOpenGL`, RenderDeviceFactoryOpenGL.h -> EngineFactoryOpenGL.h 464 | * `IRenderDeviceFactoryVk` -> `IEngineFactoryVk`, RenderDeviceFactoryVk.h -> EngineFactoryVk.h 465 | * `IRenderDeviceFactoryMtl` -> `IEngineFactoryMtl`, RenderDeviceFactoryMtl.h -> EngineFactoryMtl.h 466 | * Renamed `IShaderVariable` -> `IShaderResourceVariable` 467 | * Renamed `SHADER_VARIABLE_TYPE` -> `SHADER_RESOURCE_VARIABLE_TYPE` 468 | * Renamed `ShaderVariableDesc` -> `ShaderResourceVariableDesc` 469 | * Added `SHADER_RESOURCE_TYPE` enum 470 | * Moved shader variable type and static sampler definition from shader creation to PSO creation stage: 471 | * Removed `IShader::GetVariable`, `IShader::GetVariableCount`, and `IShader::BindResources` methods 472 | * Added `IPipelineState::BindStaticResoruces`, `IPipelineState::GetStaticVariableCount`, 473 | and `IPipelineState::GetStaticShaderVariable` methods 474 | * Added `PipelineResourceLayoutDesc` structure and `ResourceLayout` member to `PipelineStateDesc` 475 | * Added `ShaderResourceDesc` structure 476 | * Added `IShader::GetResourceCount` and `IShader::GetResource` methods 477 | * Replaced `IShaderVariable::GetArraySize` and `IShaderVariable::GetName` methods with `IShaderResourceVariable::GetResourceDesc` method 478 | * Added `HLSLShaderResourceDesc` structure as well as `IShaderResourceVariableD3D` and `IShaderResourceVariableD3D` interfaces 479 | to query HLSL-specific shader resource description (shader register) 480 | 481 | With the new API, shader initialization and pipeline state creation changed as shown below. 482 | 483 | Old API: 484 | 485 | ```cpp 486 | RefCntAutoPtr pVS; 487 | { 488 | CreationAttribs.Desc.ShaderType = SHADER_TYPE_VERTEX; 489 | CreationAttribs.EntryPoint = "main"; 490 | CreationAttribs.Desc.Name = "Cube VS"; 491 | CreationAttribs.FilePath = "cube.vsh"; 492 | pDevice->CreateShader(CreationAttribs, &pVS); 493 | pVS->GetShaderVariable("Constants")->Set(m_VSConstants); 494 | } 495 | RefCntAutoPtr pPS; 496 | { 497 | CreationAttribs.Desc.ShaderType = SHADER_TYPE_PIXEL; 498 | CreationAttribs.EntryPoint = "main"; 499 | CreationAttribs.Desc.Name = "Cube PS"; 500 | CreationAttribs.FilePath = "cube.psh"; 501 | ShaderVariableDesc Vars[] = 502 | { 503 | {"g_Texture", SHADER_VARIABLE_TYPE_MUTABLE} 504 | }; 505 | CreationAttribs.Desc.VariableDesc = Vars; 506 | CreationAttribs.Desc.NumVariables = _countof(Vars); 507 | 508 | SamplerDesc SamLinearClampDesc( FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR, 509 | TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP); 510 | StaticSamplerDesc StaticSamplers[] = 511 | { 512 | {"g_Texture", SamLinearClampDesc} 513 | }; 514 | CreationAttribs.Desc.StaticSamplers = StaticSamplers; 515 | CreationAttribs.Desc.NumStaticSamplers = _countof(StaticSamplers); 516 | 517 | pDevice->CreateShader(CreationAttribs, &pPS); 518 | } 519 | // ... 520 | pDevice->CreatePipelineState(PSODesc, &m_pPSO); 521 | ``` 522 | 523 | New API: 524 | 525 | ```cpp 526 | RefCntAutoPtr pVS; 527 | { 528 | ShaderCI.Desc.ShaderType = SHADER_TYPE_VERTEX; 529 | ShaderCI.EntryPoint = "main"; 530 | ShaderCI.Desc.Name = "Cube VS"; 531 | ShaderCI.FilePath = "cube.vsh"; 532 | pDevice->CreateShader(ShaderCI, &pVS); 533 | } 534 | RefCntAutoPtr pVS; 535 | { 536 | ShaderCI.Desc.ShaderType = SHADER_TYPE_VERTEX; 537 | ShaderCI.EntryPoint = "main"; 538 | ShaderCI.Desc.Name = "Cube VS"; 539 | ShaderCI.FilePath = "cube.vsh"; 540 | pDevice->CreateShader(ShaderCI, &pVS); 541 | } 542 | // ... 543 | ShaderResourceVariableDesc Vars[] = 544 | { 545 | {SHADER_TYPE_PIXEL, "g_Texture", SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE} 546 | }; 547 | PSODesc.ResourceLayout.Variables = Vars; 548 | PSODesc.ResourceLayout.NumVariables = _countof(Vars); 549 | 550 | // Define static sampler for g_Texture. Static samplers should be used whenever possible 551 | SamplerDesc SamLinearClampDesc( FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR, 552 | TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP); 553 | StaticSamplerDesc StaticSamplers[] = 554 | { 555 | {SHADER_TYPE_PIXEL, "g_Texture", SamLinearClampDesc} 556 | }; 557 | PSODesc.ResourceLayout.StaticSamplers = StaticSamplers; 558 | PSODesc.ResourceLayout.NumStaticSamplers = _countof(StaticSamplers); 559 | 560 | pDevice->CreatePipelineState(PSODesc, &m_pPSO); 561 | m_pPSO->GetStaticShaderVariable(SHADER_TYPE_VERTEX, "Constants")->Set(m_VSConstants); 562 | ``` 563 | 564 | ### Samples and Tutorials 565 | 566 | * Added [Tutorial12 - Render target](https://github.com/DiligentGraphics/DiligentSamples/tree/master/Tutorials/Tutorial12_RenderTarget) 567 | (credits to @dolphineye for contribution) 568 | 569 | ## v2.4.a 570 | 571 | * Enabled MinGW build 572 | * Enabled Vulkan on MacOS 573 | * Implemented split barriers (https://github.com/DiligentGraphics/DiligentCore/issues/43) 574 | * Added `STATE_TRANSITION_TYPE` enum and `STATE_TRANSITION_TYPE TransitionType` member to `StateTransitionDesc` structure 575 | * Added Metal backend stub 576 | * Samples: 577 | * Added rendering backend selection dialog on Win32 and Mac 578 | 579 | ## v2.4 580 | 581 | Core: 582 | 583 | * Implemented explicit resource state transitions 584 | * API Changes 585 | * Added `RESOURCE_STATE` enum that defines the resource state 586 | * Added `RESOURCE_STATE_TRANSITION_MODE` enum that controls resource state transition mode 587 | * Added `DRAW_FLAGS` enum that controls state validation performed by Draw command 588 | * Added `Flags` member to `DrawAttribs` structure (values from `DRAW_FLAGS`) 589 | * Added `IndirectAttribsBufferStateTransitionMode` member to `DrawAttribs` and `DispatchComputeAttribs` structures (values from `RESOURCE_STATE_TRANSITION_MODE`) 590 | * Added `StateTransitionDesc` structure that describes resource state transition barrier 591 | * Added `IDeviceContext::TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers)` method 592 | * Added `IBuffer::SetState()`, `IBuffer::GetState()`, `ITexture::SetState()`, `ITexture::GetState()` methods 593 | * Added `IShaderResourceBinding::InitializeStaticResources()` to explicitly initialize static resources and 594 | avoid problems in multi-threaded environments 595 | * Added `InitStaticResources` parameter to `IPipelineState::CreateShaderResourceBinding()` method to allow 596 | immediate initialization of static resources in a SRB 597 | * Removed default SRB object 598 | * Renamed/moved `IBuffer::UpdateData()` to `IDeviceContext::UpdateBuffer()` 599 | * Renamed/moved `IBuffer::CopyData()` to `IDeviceContext::CopyBuffer()` 600 | * Renamed/moved `IBuffer::Map()` to `IDeviceContext::MapBuffer()` 601 | * Renamed/moved `IBuffer::Unmap()` to `IDeviceContext::UnmapBuffer()` 602 | * Removed MapFlags parameter 603 | * Renamed/moved `ITexture::UpdateData()` to `IDeviceContext::UpdateTexture()` 604 | * Renamed/moved `ITexture::CopyData()` to `IDeviceContext::CopyTexture()` 605 | * Renamed/moved `ITexture::Map()` to `IDeviceContext::MapTextureSubresource()` 606 | * Renamed/moved `ITexture::Unmap()` to `IDeviceContext::UnmapTextureSubresource()` 607 | * Moved `ITextureView::GenerateMips()` to `IDeviceContext::GenerateMips()` 608 | * Added state transition mode parameters to `IDeviceContext::UpdateBuffer()`, `IDeviceContext::UpdateTexture()`, 609 | `IDeviceContext::CopyBuffer()`, `IDeviceContext::CopyTexture()`, `IDeviceContext::SetVertexBuffers()`, 610 | `IDeviceContext::SetIndexBuffers()`, `IDeviceContext::ClearRenderTargets()`, and `IDeviceContext::ClearDepthStencil()` methods 611 | * Replaced `COMMIT_SHADER_RESOURCES_FLAGS` enum with `RESOURCE_STATE_TRANSITION_MODE` 612 | * Added `ITextureD3D12::GetD3D12ResourceState()`, `IBufferD3D12::GetD3D12ResourceState()`, 613 | `IBufferVk::GetAccessFlags()`, and `ITextureVk::GetLayout()` methods 614 | * Added `CopyTextureAttribs` structure that combines all parameters of `IDeviceContext::CopyTexture()` method 615 | 616 | ## v2.3.b 617 | 618 | * Core 619 | * Enabled Vulkan backend on Linux 620 | * API Changes 621 | * Implemented separate texture samplers: 622 | * Added `UseCombinedTextureSamplers` and `CombinedSamplerSuffix` members to `ShaderCreationAttribs` structure 623 | * When separate samplers are used (`UseCombinedTextureSamplers == false`), samplers are set in the same way as other shader variables 624 | via shader or SRB objects 625 | * Removed `BIND_SHADER_RESOURCES_RESET_BINDINGS` flag, renamed `BIND_SHADER_RESOURCES_KEEP_EXISTING` to `BIND_SHADER_RESOURCES_KEEP_EXISTING`. 626 | Added `BIND_SHADER_RESOURCES_UPDATE_STATIC`, `BIND_SHADER_RESOURCES_UPDATE_MUTABLE`, `BIND_SHADER_RESOURCES_UPDATE_DYNAMIC`, and 627 | `BIND_SHADER_RESOURCES_UPDATE_ALL` flags 628 | * Using glslang to compile HLSL to SPIRV in Vulkan backend instead of relying on HLSL->GLSL converter 629 | 630 | 631 | ## v2.3.a 632 | 633 | * Core 634 | * Added `IFence` interface and `IDeviceContext::SignalFence()` method to enable CPU-GPU synchronization 635 | * Added `BUFFER_MODE_RAW` mode allowing raw buffer views in D3D11/D3D12. 636 | * Moved `Format` member from `BufferDesc` to `BufferViewDesc` 637 | * Removed `IsIndirect` member from `DrawAttrbis` as setting `pIndirectDrawAttribs` to a non-null buffer already indicates indirect rendering 638 | 639 | * Samples: 640 | * Added Tutorial 10 - Data Streaming 641 | * Added Tutorial 11 - Resource Updates 642 | 643 | ## v2.3 644 | 645 | * Core: 646 | * **Implemented Vulkan backend** 647 | * Implemented hardware adapter & display mode enumeration in D3D11 and D3D12 modes 648 | * Implemented initialization in fullscreen mode as well as toggling between fullscreen and windowed modes in run time 649 | * Added sync interval parameter to ISwapChain::Present() 650 | * API Changes 651 | * Added `NumViewports` member to `GraphicsPipelineDesc` struct 652 | * Removed `PRIMITIVE_TOPOLOGY_TYPE` type 653 | * Replaced `PRIMITIVE_TOPOLOGY_TYPE GraphicsPipelineDesc::PrimitiveTopologyType` 654 | with `PRIMITIVE_TOPOLOGY GraphicsPipelineDesc::PrimitiveTopology` 655 | * Removed `DrawAttribs::Topology` 656 | * Removed `pStrides` parameter from `IDeviceContext::SetVertexBuffers()`. Strides are now defined 657 | through vertex layout. 658 | * API Changes: 659 | * Math library functions `SetNearFarClipPlanes()`, `GetNearFarPlaneFromProjMatrix()`, `Projection()`, 660 | `OrthoOffCenter()`, and `Ortho()` take `bIsGL` flag instead of `bIsDirectX` 661 | * Vertex buffer strides are now defined by the pipeline state as part of the input layout description (`LayoutElement::Stride`) 662 | * Added `COMMIT_SHADER_RESOURCES_FLAG_VERIFY_STATES` flag 663 | * Added `NumViewports` member to `GraphicsPipelineDesc` structure 664 | * Samples: 665 | * Added fullscreen mode selection dialog box 666 | * Implemented fullscreen mode toggle on UWP with shift + enter 667 | * Implemented fullscreen window toggle on Win32 with alt + enter 668 | * Added Tutorial 09 - Quads 669 | * Fixed the following issues: 670 | * [Add option to redirect diligent error messages](https://github.com/DiligentGraphics/DiligentEngine/issues/9) 671 | * [Add ability to run in exclusive fullscreen/vsync mode](https://github.com/DiligentGraphics/DiligentEngine/issues/10) 672 | 673 | ## v2.2.a 674 | 675 | * Enabled Win32 build targeting Windows 8.1 SDK 676 | * Enabled build customization through custom build config file 677 | * Implemented PSO compatibility 678 | * Fixed the following issues: 679 | * [Messy #include structure?](https://github.com/DiligentGraphics/DiligentEngine/issues/3) 680 | * [Move GetEngineFactoryXXXType and LoadGraphicsEngineXXX to Diligent namespace](https://github.com/DiligentGraphics/DiligentEngine/issues/5) 681 | * [Customizable build scripts](https://github.com/DiligentGraphics/DiligentEngine/issues/6) 682 | * [Win32FileSystem related functions should use wchar_t (UTF-16)](https://github.com/DiligentGraphics/DiligentEngine/issues/7) 683 | 684 | ## v2.2 685 | 686 | * Added MacOS and iOS support 687 | 688 | ## v2.1.b 689 | 690 | * Removed legacy Visual Studio solution and project files 691 | * Added API reference 692 | * Added tutorials 1-8 693 | 694 | ## v2.1.a 695 | 696 | * Refactored build system to use CMake and Gradle for Android 697 | * Added support for Linux platform 698 | 699 | ## v2.1 700 | 701 | ### New Features 702 | 703 | #### Core 704 | 705 | * Interoperability with native API 706 | * Accessing internal objects and handles 707 | * Creating diligent engine buffers/textures from native resources 708 | * Attaching to existing D3D11/D3D12 device or GL context 709 | * Resource state and command queue synchronization for D3D12 710 | * Integraion with Unity 711 | * Geometry shader support 712 | * Tessellation support 713 | * Performance optimizations 714 | 715 | #### HLSL->GLSL converter 716 | * Support for structured buffers 717 | * HLSL->GLSL conversion is now a two-stage process: 718 | * Creating conversion stream 719 | * Creating GLSL source from the stream 720 | * Geometry shader support 721 | * Tessellation control and tessellation evaluation shader support 722 | * Support for non-void shader functions 723 | * Allowing structs as input parameters for shader functions 724 | 725 | 726 | ## v2.0 (alpha) 727 | 728 | Alpha release of Diligent Engine 2.0. The engine has been updated to take advantages of Direct3D12: 729 | 730 | * Pipeline State Object encompasses all coarse-grain state objects like Depth-Stencil State, Blend State, Rasterizer State, shader states etc. 731 | * New shader resource binding model implemented to leverage Direct3D12 732 | 733 | * OpenGL and Direct3D11 backends 734 | * Alpha release is only available on Windows platform 735 | * Direct3D11 backend is very thoroughly optimized and has very low overhead compared to native D3D11 implementation 736 | * Direct3D12 implementation is preliminary and not yet optimized 737 | 738 | ### v1.0.0 739 | 740 | Initial release -------------------------------------------------------------------------------- /Tests/test_all.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal ENABLEDELAYEDEXPANSION 4 | 5 | set num_args=0 6 | for %%x in (%*) do set /A num_args+=1 7 | 8 | if "%num_args%" LSS "3" ( 9 | echo Command line format: 10 | echo. 11 | echo test_all.bat build_path config golden_images_path 12 | echo. 13 | echo build_path - path to the root of the build tree 14 | echo config - configuration (Debug, Release, etc.^) 15 | echo golden_images_path - path to the golden images root folder 16 | echo. 17 | echo Example: 18 | echo test_all.bat c:\Projects\DiligentEngine\build\Win64 Debug c:\Projects\DiligentEngine\GoldenImages 19 | echo. 20 | echo To capture golden images, replace 'compare' with 'capture' in the script below 21 | EXIT /B -1 22 | ) 23 | 24 | set build_folder=%~1 25 | shift 26 | 27 | set config=%~1 28 | shift 29 | 30 | set golden_images_root_dir=%~1 31 | shift 32 | 33 | 34 | set TEST_REPORT= 35 | set TESTS_FAILED=0 36 | 37 | set FONT_RED= 38 | set FONT_GREEN= 39 | set FONT_WHITE= 40 | set FONT_DEFAULT= 41 | 42 | set CURR_DIR=%cd% 43 | 44 | rem Formatting validation 45 | 46 | cd "%CURR_DIR%\..\DiligentCore\BuildTools\FormatValidation" 47 | call :run_tests "call validate_format_win.bat" "Core formatting validation" 48 | 49 | cd "%CURR_DIR%\..\DiligentTools\BuildTools\FormatValidation" 50 | call :run_tests "call validate_format_win.bat" "Tools formatting validation" 51 | 52 | cd "%CURR_DIR%\..\DiligentFX\BuildTools\FormatValidation" 53 | call :run_tests "call validate_format_win.bat" "FX formatting validation" 54 | 55 | cd "%CURR_DIR%\..\DiligentSamples\BuildTools\FormatValidation" 56 | call :run_tests "call validate_format_win.bat" "Samples formatting validation" 57 | 58 | 59 | rem Core Tests 60 | cd "%CURR_DIR%\..\DiligentCore\Tests\DiligentCoreTest\assets" 61 | set CORE_TEST_EXE_PATH="%build_folder%\DiligentCore\Tests\DiligentCoreTest\%config%\DiligentCoreTest.exe" 62 | call :run_tests "%CORE_TEST_EXE_PATH%" "Core tests" 63 | 64 | 65 | rem Tools Tests 66 | cd "%CURR_DIR%\..\DiligentTools\Tests\DiligentToolsTest\assets" 67 | set TOOLS_TEST_EXE_PATH="%build_folder%\DiligentTools\Tests\DiligentToolsTest\%config%\DiligentToolsTest.exe" 68 | call :run_tests "%TOOLS_TEST_EXE_PATH%" "Tools tests" 69 | 70 | 71 | rem Core GPU tests 72 | 73 | cd "%CURR_DIR%\..\DiligentCore\Tests\DiligentCoreAPITest\assets" 74 | set API_TEST_EXE_PATH="%build_folder%\DiligentCore\Tests\DiligentCoreAPITest\%config%\DiligentCoreAPITest.exe" 75 | 76 | call :run_tests "%API_TEST_EXE_PATH% --mode=d3d11" "Core GPU Tests D3D11" 77 | call :run_tests "%API_TEST_EXE_PATH% --mode=d3d11_sw" "Core GPU Tests D3D11-SW" 78 | 79 | call :run_tests "%API_TEST_EXE_PATH% --mode=d3d12" "Core GPU Tests D3D12" 80 | call :run_tests "%API_TEST_EXE_PATH% --mode=d3d12_sw" "Core GPU Tests D3D12-SW" 81 | call :run_tests "%API_TEST_EXE_PATH% --mode=d3d12 --shader_compiler=dxc --gtest_filter=-TextureCreation*" "Core GPU Tests D3D12 DXC" 82 | call :run_tests "%API_TEST_EXE_PATH% --mode=d3d12_sw --shader_compiler=dxc --gtest_filter=-TextureCreation*" "Core GPU Tests D3D12-SW DXC" 83 | 84 | call :run_tests "%API_TEST_EXE_PATH% --mode=gl" "Core GPU Tests GL" 85 | call :run_tests "%API_TEST_EXE_PATH% --mode=gl --non_separable_progs --gtest_filter=-TextureCreation*" "Core GPU Tests GL Non-sep progs" 86 | 87 | call :run_tests "%API_TEST_EXE_PATH% --mode=vk" "Core GPU Tests VK" 88 | call :run_tests "%API_TEST_EXE_PATH% --mode=vk --shader_compiler=dxc --gtest_filter=-TextureCreation*" "Core GPU Tests VK DXC" 89 | 90 | call :run_tests "%API_TEST_EXE_PATH% --mode=wgpu" "Core GPU Tests WebGPU" 91 | 92 | 93 | rem Tools GPU tests 94 | 95 | cd "%CURR_DIR%\..\DiligentTools\Tests\DiligentToolsGPUTest\assets" 96 | set TOOLS_GPU_TEST_EXE_PATH="%build_folder%\DiligentTools\Tests\DiligentToolsGPUTest\%config%\DiligentToolsGPUTest.exe" 97 | 98 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d11" "Tools GPU Tests D3D11" 99 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d11_sw" "Tools GPU Tests D3D11-SW" 100 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d12" "Tools GPU Tests D3D12" 101 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=d3d12_sw" "Tools GPU Tests D3D12-SW" 102 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=gl" "Tools GPU Tests GL" 103 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=gl --non_separable_progs" "Tools GPU Tests GL Non-sep progs" 104 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=vk" "Tools GPU Tests VK" 105 | call :run_tests "%TOOLS_GPU_TEST_EXE_PATH% --mode=wgpu" "Tools GPU Tests WebGPU" 106 | 107 | 108 | cd "%CURR_DIR%" 109 | 110 | echo. 111 | echo. 112 | 113 | (call test_samples.bat %build_folder% %config% %golden_images_root_dir%) || set /a TESTS_FAILED=!TESTS_FAILED!+1 114 | 115 | echo. 116 | echo. 117 | 118 | for %%X in (!TEST_REPORT!) do ( 119 | echo %%~X 120 | ) 121 | 122 | if "%TESTS_FAILED%" NEQ "0" ( 123 | echo %FONT_RED%In total !TESTS_FAILED! test groups FAILED%FONT_DEFAULT% 124 | ) 125 | 126 | exit /B !TESTS_FAILED! 127 | 128 | 129 | :run_tests 130 | echo %FONT_WHITE%%~1%FONT_DEFAULT% 131 | 132 | (%~1) && ( 133 | set STATUS=%FONT_GREEN%PASSED: %~2%FONT_DEFAULT% 134 | ) || ( 135 | set STATUS=%FONT_RED%FAILED: %~2%FONT_DEFAULT% 136 | set /a TESTS_FAILED=!TESTS_FAILED!+1 137 | ) 138 | set ERROR=!ERRORLEVEL! 139 | 140 | echo. 141 | echo !STATUS! 142 | echo. 143 | echo. 144 | echo. 145 | 146 | set TEST_REPORT=!TEST_REPORT! "!STATUS!" 147 | 148 | exit /B !ERROR! 149 | -------------------------------------------------------------------------------- /Tests/test_samples.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal ENABLEDELAYEDEXPANSION 4 | setlocal 5 | 6 | set num_args=0 7 | for %%x in (%*) do set /A num_args+=1 8 | 9 | if "%num_args%" LSS "3" ( 10 | echo Command line format: 11 | echo. 12 | echo test_samples.bat build_path config golden_images_path [golden_images_mode] 13 | echo. 14 | echo build_path - path to the root of the build tree 15 | echo config - configuration (Debug, Release, etc.^) 16 | echo golden_images_path - path to the golden images root folder 17 | echo golden_images_mode - optional golden images compare mode (capture or compare^) 18 | echo. 19 | echo Optional variables: 20 | echo ADDITIONAL_TEST_APPS_D3D11 - Additional test applications to run in D3D11 mode 21 | echo ADDITIONAL_TEST_APPS_D3D12 - Additional test applications to run in D3D12 mode 22 | echo ADDITIONAL_TEST_APPS_GL - Additional test applications to run in GL mode 23 | echo ADDITIONAL_TEST_APPS_VK - Additional test applications to run in Vk mode 24 | echo ADDITIONAL_TEST_APPS_WGPU - Additional test applications to run in WebGPU mode 25 | echo. 26 | echo Example: 27 | echo test_samples.bat c:\Projects\DiligentEngine\build\Win64 Debug c:\Projects\DiligentTestData\GoldenImages compare 28 | echo. 29 | echo To capture golden images, use 'capture' 30 | EXIT /B 1 31 | ) 32 | 33 | set DILIGENT_BUILD_DIR=%~1 34 | shift 35 | 36 | set DILIGENT_BUILD_TYPE=%~1 37 | shift 38 | 39 | rem golden_images_root_dir is used by ProcessGoldenImages.bat 40 | set golden_images_root_dir=%~1 41 | shift 42 | 43 | set golden_images_mode=%~1 44 | shift 45 | 46 | if "%golden_images_mode%" == "" ( 47 | set golden_images_mode=compare 48 | ) 49 | 50 | set APP_ERROR=0 51 | 52 | set CURR_DIR=%cd% 53 | 54 | cd "%CURR_DIR%\..\DiligentSamples\Tests" 55 | 56 | set GOLDEN_IMAGE_WIDTH=1024 57 | set GOLDEN_IMAGE_HEIGHT=768 58 | 59 | set FONT_RED= 60 | set FONT_GREEN= 61 | set FONT_DEFAULT= 62 | 63 | set TESTS_FAILED=0 64 | set TEST_STATUS= 65 | 66 | rem When passing ADDITIONAL_TEST_APPS_D3D11 as parameter, only the first app is used 67 | set ADDITIONAL_TEST_APPS=%ADDITIONAL_TEST_APPS_D3D11% 68 | call :run_tests "--mode d3d11" 69 | 70 | set ADDITIONAL_TEST_APPS=%ADDITIONAL_TEST_APPS_D3D12% 71 | call :run_tests "--mode d3d12" 72 | 73 | set ADDITIONAL_TEST_APPS=%ADDITIONAL_TEST_APPS_GL% 74 | call :run_tests "--mode gl" 75 | call :run_tests "--mode gl --non_separable_progs 1" 76 | 77 | set ADDITIONAL_TEST_APPS=%ADDITIONAL_TEST_APPS_VK% 78 | call :run_tests "--mode vk" 79 | 80 | set ADDITIONAL_TEST_APPS=%ADDITIONAL_TEST_APPS_WGPU% 81 | call :run_tests "--mode wgpu" 82 | 83 | cd "%CURR_DIR%" 84 | 85 | echo. 86 | echo. 87 | 88 | for %%X in (!TEST_STATUS!) do ( 89 | echo %%~X 90 | ) 91 | 92 | if "%TESTS_FAILED%" NEQ "0" ( 93 | echo %FONT_RED%In total !TESTS_FAILED! tests FAILED%FONT_DEFAULT% 94 | ) 95 | 96 | exit /B !TESTS_FAILED! 97 | 98 | 99 | :run_tests 100 | (call ProcessGoldenImages.bat %golden_images_root_dir% %golden_images_mode% "%~1") && ( 101 | set TEST_STATUS=!TEST_STATUS! "%FONT_GREEN%PASSED: Sample tests [%~1]%FONT_DEFAULT%" 102 | ) || ( 103 | set TEST_STATUS=!TEST_STATUS! "%FONT_RED%FAILED: Sample tests [%~1]%FONT_DEFAULT%" 104 | set /a TESTS_FAILED=!TESTS_FAILED!+!ERRORLEVEL! 105 | ) 106 | 107 | exit /B !ERRORLEVEL! 108 | -------------------------------------------------------------------------------- /Troubleshooting.md: -------------------------------------------------------------------------------- 1 | # Troubleshooting 2 | 3 | ## Build fails 4 | 5 | * Make sure your code is up-to-date. When updating existing repository, don't forget to update all submodules: 6 | 7 | ``` 8 | git pull 9 | git submodule update --recursive 10 | ``` 11 | 12 | * Try to [get clean version](https://github.com/DiligentGraphics/DiligentEngine#cloning-the-repository) 13 | 14 | * Make sure your build environment is up-to-date and properly configured: 15 | * When building with Visual Studio, make sure you use Windows SDK 10.0.17763.0 or later, 16 | have C++ build tools and Visual C++ ATL Support installed. 17 | * When building for UWP, make sure you have UWP build tools. 18 | * When building for Android, make sure all your tools are up to date, you have 19 | [NDK and CMake installed](https://developer.android.com/studio/projects/install-ndk). 20 | If you are not using CMake version bundled with Android Studio, make sure your build files are 21 | [properly configured](https://developer.android.com/studio/projects/add-native-code.html#use_a_custom_cmake_version). 22 | * When using gcc, make sure the compiler version is at least 7.4. 23 | * gcc 9, 10 and 11 seemingly produce invalid code in release configurations that causes crash on startup. 24 | Use gcc 7 or 8 or clang. 25 | * Make sure you build the project with c++14 features enabled. 26 | 27 | * When including Diligent headers, make sure that exactly one of `PLATFORM_WIN32`, 28 | `PLATFORM_UNIVERSAL_WINDOWS`, `PLATFORM_ANDROID`, `PLATFORM_LINUX`, `PLATFORM_MACOS`, and 29 | `PLATFORM_IOS` macros is defined as `1`. 30 | 31 | * When building on Windows, generating Visual Studio project files is the recommended way. 32 | Other IDEs such as Visual Studio Code or CLion may need extra configuration to properly set up 33 | the build environment. 34 | 35 | * If on Windows you get long path error, try cloning the project to a folder with shorter name 36 | such as `c:/git/DiligentEngine`. 37 | 38 | * If on MacOS CMake fails to find the compiler, run the following command: 39 | ```cmake 40 | sudo xcode-select --reset 41 | ``` 42 | 43 | ## Projects don't run 44 | 45 | * When running from the command line, make sure that the project's `assets` folder is set as working directory 46 | * Try using different backends: use `-mode d3d11` or `-mode gl` command line options 47 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '2.5.{build}' 2 | 3 | # branches to build 4 | branches: 5 | # whitelist 6 | only: 7 | - master 8 | 9 | image: 10 | - Visual Studio 2019 11 | 12 | environment: 13 | matrix: 14 | # Win32/x64/Debug 15 | - platform: x64 16 | configuration: Debug 17 | cmake_args: -D DILIGENT_BUILD_CORE_TESTS=TRUE -D DILIGENT_BUILD_TOOLS_TESTS=TRUE 18 | platform_name: Windows 19 | 20 | # Win32/x64/RelWithDebInfo 21 | - platform: x64 22 | configuration: RelWithDebInfo 23 | cmake_args: 24 | platform_name: Windows 25 | 26 | # clone directory 27 | clone_folder: c:\projects\diligentengine 28 | 29 | install: 30 | # clone submodules 31 | - git submodule update --init --recursive 32 | - ps: DiligentCore\BuildTools\Scripts\appveyor\install.ps1 33 | 34 | before_build: 35 | - 'cd %APPVEYOR_BUILD_FOLDER%\DiligentCore\BuildTools\FormatValidation' 36 | - validate_format_win.bat 37 | - 'cd %APPVEYOR_BUILD_FOLDER%\DiligentTools\BuildTools\FormatValidation' 38 | - validate_format_win.bat 39 | - 'cd %APPVEYOR_BUILD_FOLDER%\DiligentFX\BuildTools\FormatValidation' 40 | - validate_format_win.bat 41 | - 'cd %APPVEYOR_BUILD_FOLDER%\DiligentSamples\BuildTools\FormatValidation' 42 | - validate_format_win.bat 43 | - 'cd %APPVEYOR_BUILD_FOLDER%' 44 | - echo %PLATFORM% 45 | - echo.%cmake_args% 46 | - cmake %cmake_args% -S . -B ./build -D DILIGENT_MSVC_COMPILE_OPTIONS="/WX" -D DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS="/arch:AVX2" -G "Visual Studio 16 2019" -A %PLATFORM% 47 | - nuget restore C:\projects\diligentengine\build\DiligentEngine.sln 48 | 49 | build: 50 | project: '%APPVEYOR_BUILD_FOLDER%\build\DiligentEngine.sln' 51 | verbosity: minimal 52 | parallel: true 53 | 54 | test_script: 55 | - 'if "%configuration%"=="Debug" (%APPVEYOR_BUILD_FOLDER%\DiligentCore\BuildTools\Scripts\appveyor\run_tests.bat %APPVEYOR_BUILD_FOLDER%\build\DiligentCore %APPVEYOR_BUILD_FOLDER%\DiligentCore\Tests\DiligentCoreTest\assets %APPVEYOR_BUILD_FOLDER%\DiligentCore\Tests\DiligentCoreAPITest\assets)' 56 | - 'cd %APPVEYOR_BUILD_FOLDER%\DiligentTools\Tests\DiligentToolsTest\assets' 57 | - 'if "%configuration%"=="Debug" (%APPVEYOR_BUILD_FOLDER%\DiligentTools\BuildTools\Scripts\appveyor\run_tests.bat %APPVEYOR_BUILD_FOLDER%\build\DiligentTools)' 58 | --------------------------------------------------------------------------------