DirectX-Graphics-Samples | This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive app | Graphics library

 by   microsoft C++ Version: MicrosoftDocs-Samples License: MIT

kandi X-RAY | DirectX-Graphics-Samples Summary

kandi X-RAY | DirectX-Graphics-Samples Summary

DirectX-Graphics-Samples is a C++ library typically used in User Interface, Graphics, WebGL applications. DirectX-Graphics-Samples has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              DirectX-Graphics-Samples has a medium active ecosystem.
              It has 5224 star(s) with 1914 fork(s). There are 411 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 58 open issues and 373 have been closed. On average issues are closed in 655 days. There are 7 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of DirectX-Graphics-Samples is MicrosoftDocs-Samples

            kandi-Quality Quality

              DirectX-Graphics-Samples has no bugs reported.

            kandi-Security Security

              DirectX-Graphics-Samples has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              DirectX-Graphics-Samples is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              DirectX-Graphics-Samples releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DirectX-Graphics-Samples
            Get all kandi verified functions for this library.

            DirectX-Graphics-Samples Key Features

            No Key Features are available at this moment for DirectX-Graphics-Samples.

            DirectX-Graphics-Samples Examples and Code Snippets

            No Code Snippets are available at this moment for DirectX-Graphics-Samples.

            Community Discussions

            QUESTION

            Toggle monitor HDR mode with DXGI API
            Asked 2021-Aug-07 at 17:48

            Microsoft documentation and sample code claims that DXGI can switch a monitor between HDR/SDR modes. However running the code sample D3D12HDR and changing the swap chain format does not change the monitor mode for me.

            I am only able to set the screen into hdr either through:

            • windows display settings, "Play HDR games and apps" toggle switch
            • nvidia api functions

            Is it possible to change the monitor's HDR mode using only DXGI API? My monitor is an ASUS XG27U.

            ...

            ANSWER

            Answered 2021-Aug-07 at 17:48

            There are no DX APIs to set the display into HDR mode. It must be enabled in Windows display settings.

            Use of the NVIDIA API functions is discouraged.

            Source https://stackoverflow.com/questions/68625053

            QUESTION

            Why GBuffers need to be created for each frame in D3D12?
            Asked 2021-Jun-19 at 00:10

            I have experience with D3D11 and want to learn D3D12. I am reading the official D3D12 multithread example and don't understand why the shadow map (generated in the first pass as a DSV, consumed in the second pass as SRV) is created for each frame (actually only 2 copies, as the FrameResource is reused every 2 frames).

            The code that creates the shadow map resource is here, in the FrameResource class, instances of which is created here.

            There is actually another resource that is created for each frame, the constant buffer. I kind of understand the constant buffer. Because it is written by CPU (D3D11 dynamic usage) and need to remain unchanged until the GPU finish using it, so there need to be 2 copies. However, I don't understand why the shadow map needs to do the same, because it is only modified by GPU (D3D11 default usage), and there are fence commands to separate reading and writing to that texture anyway. As long as the GPU follows the fence, a single texture should be enough for the GPU to work correctly. Where am I wrong?

            Thanks in advance.

            EDIT

            According to the comment below, the "fence" I mentioned above should more accurately be called "resource barrier".

            ...

            ANSWER

            Answered 2021-Jun-19 at 00:10

            The key issue is that you don't want to stall the GPU for best performance. Double-buffering is a minimal requirement, but typically triple-buffering is better for smoothing out frame-to-frame rendering spikes, etc.

            FWIW, the default behavior of DXGI Present is to stall only after you have submitted THREE frames of work, not two.

            Of course, there's a trade-off between triple-buffering and input responsiveness, but if you are maintaining 60 Hz or better than it's likely not noticeable.

            With all that said, typically you don't need to double-buffered depth/stencil buffers for rendering, although if you wanted to make the initial write of the depth-buffer overlap with the read of the previous depth-buffer passes then you would want distinct buffers per frame for performance and correctness.

            The 'writes' are all complete before the 'reads' in DX12 because of the injection of the 'Resource Barrier' into the command-list:

            Source https://stackoverflow.com/questions/68040979

            QUESTION

            NuGet package problems while building DirectX Graphics Samples
            Asked 2021-May-05 at 06:17

            I've encountered NuGet problems while building DirectX-Graphics-Samples

            The error occurs with many projects, here is an example:

            ...

            ANSWER

            Answered 2021-May-05 at 01:29

            The project use package.config file to manage nuget packages.

            So try to modify the Package Reference to Package.config

            Source https://stackoverflow.com/questions/67356010

            QUESTION

            How can I fix "& requires l-value"
            Asked 2020-Dec-16 at 00:15

            So, I created a project and copied this tutorial in it. When I tried to run it, it gave me this error: C2102 & requires l-value at

            ...

            ANSWER

            Answered 2020-Dec-16 at 00:06

            This is essentially the same build error reported under Issue #652 Error building D3D12MeshShaders (on VS 16.8.0 Preview 3.0) in the DirectX-Graphics-Samples repo.

            I'm getting error C2102: '&' requires l-value on many of the lines. Usually it's when a CD3DX12 constructor is directly used with an &, for example [...]

            The issue is still open, with an interim workaround given in a comment:

            The use of an address of an r-value like this [...] is non-conforming code.

            Visual C++ emits a warning C4238 here with /W4 warning level 4, but most VC projects default to level 3 including these samples. [...] Looks like the latest Visual C++ updates for /permissive- have upgraded this to an error.

            You can work around this issue for now by disabling /permissive- by changing "Conformance Mode" to "No" in the C/C++ -> Language project settings.

            Source https://stackoverflow.com/questions/65315241

            QUESTION

            d3dx12.h gives a bunch of errors
            Asked 2020-Dec-14 at 20:20

            I'm trying to learn DirectX 12 and i found out these tutorials on github. I downloaded everything and i tried to run the HelloWindow project. I linked the d3d12.lib in Debug->Options->Linker->Input. Unfortunately, it gives me a bunch of errors from d3dx12.h. For most of them, Intellisense says to include d3d12.h even if i already did it. For example, D3D12_RESOURCE_DESC1 is undefined and all his attributes too etc. Did i missed something if yes pls help me.

            ...

            ANSWER

            Answered 2020-Dec-14 at 20:20

            You are using the 'latest' copy of D3DX12.H which requires you use the 'latest' version of the Windows 10 SDK (19041). If D3D12_RESOURCE_DESC1 is undefined, you are using an older Windows 10 SDK.

            Note that there are three different options for fixing this mismatch:

            1. Install the latest Windows 10 SDK (19041). For VS 2019, this is done by running Visual Studio Installer and selecting the new Windows 10 SDK as a component. For VS 2017, you need to run the standalone installer. VS 2015 and earlier are not supported.

            2. Use a version of the D3DX12.H utility header that supports older SDKs. I maintain a version of the 'latest' D3DX12.H header that contains a bunch of preprocessor conditionals so that it will support Windows 10 SDK (14393) or later. That happens to be last version of the Windows 10 SDK to support VS 2015. Obtain it from GitHub: directx-vs-templates.

            3. Use GitHub DirectX-Headers: A new option is to get the latest headers including D3DX12.H as a set from GitHub. You still need a Windows 10 SDK for the link libraries.

            See this blog post for details on why D3DX12.H is not part of the Windows 10 SDK.

            The samples on DirectX-Graphics-Samples in the main/master branch assume you are using the latest Windows 10 SDK (19041).

            As you are new to DirectX 12, you may want to take a look at DirectX Tool Kit for DX12 as a more gentle introduction to the latest version of the API.

            Source https://stackoverflow.com/questions/65294611

            QUESTION

            C++ Using MACRO without INCLUDE statement
            Asked 2020-Jul-21 at 21:17

            In DirectX Graphics Samples MiniEngine sample, there is an "inline" source file Functions.inl that uses a macro INLINE that is defined in a header in same folder, Common.h .

            What mechanism/declaration permits Functions.inl to use INLINE without an #include "Common.h" statement?

            My specific issue is that I have created a VS2019 UWP C++ project, and I am importing a subset of this source and cannot compile the copy of Functions.inl without modifying and adding an #include statement.

            ...

            ANSWER

            Answered 2020-Jul-21 at 21:05

            The *.inl extension is usually used to indicate that the file is an inline-definition of something defined in a header. Effectively, the *.inl file is generally treated as an inline-equivalent to a *.cpp file.

            In the same way that *.cpp files can use symbols #included in the header for that *.cpp file, *.inl files usually have the same assumption.

            In this specific example. it appears that Functions.inl is included after a bunch of other headers are included

            Source https://stackoverflow.com/questions/63022854

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install DirectX-Graphics-Samples

            You can download it from GitHub.

            Support

            We're always looking for your help to fix bugs and improve the samples. File those pull requests and we'll be happy to take a look. Troubleshooting information for this repository can be found in the site Wiki. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Reuse Pre-built Kits with DirectX-Graphics-Samples

            Consider Popular Graphics Libraries

            three.js

            by mrdoob

            pixijs

            by pixijs

            pixi.js

            by pixijs

            tfjs

            by tensorflow

            filament

            by google

            Try Top Libraries by microsoft

            vscode

            by microsoftTypeScript

            PowerToys

            by microsoftC#

            TypeScript

            by microsoftTypeScript

            terminal

            by microsoftC++

            Web-Dev-For-Beginners

            by microsoftJavaScript