Giter VIP home page Giter VIP logo

Comments (2)

walbourn avatar walbourn commented on May 18, 2024

The ATG samples are using a variant of the Direct3D 12 Game VS Templates which are themselves derived from the 'stock' DirectX 12 App UWP template that is included in Visual Studio. As such, the basic structure of the swapchain is the same.

In DirectX 11 swapchains, the 'buffer swapping' of the presentation frames are handled automatically, but in DirectX 12 you have to do it all explicitly. That is once you Present the frame which queues the frame for presentation to the user once it's both rendered and flipped, you can't resuse that render target until after the system has had a chance to actually present it to the 'front buffer' to the user which can typically take a frame or two. Hence the DirectX 12 DeviceResources implementation creates 2 or 3 render target views depending on your desired back-buffer count. At a minimum, you need 2 because you are 'showing' one render target and 'rendering' to the other.

You don't need to do this with depth/stencil buffers because you only need one frame's worth at any given time--the rendering takes place in frame order--, and then when the associated render target is presented, you can safely reuse the depth/stencil buffer immediately since depth/stencil is not part of the Present.

from xbox-atg-samples.

LigaLiao avatar LigaLiao commented on May 18, 2024

Thank you for the detailed answer !

from xbox-atg-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.