Win32 transparent rectangle11/23/2023 ![]() ![]() As shown in the front buffer at the beginning of the frame, the scrollable app initially shows a frame with some text and animating video.In this example we use the minimum number of buffers for flip-model presentation, which is a buffer count of two, one front buffer that contains the app display content and one back buffer that contains the current frame that the app wants to render. The next illustration and sequence shows an example of a DXGI flip-model presentation operation that uses dirty rectangles and a scroll rectangle. Sample 2-buffer flip-model swap chain with dirty rectangles and scroll rectangle The filled rectangles are specified by the DirtyRectsCount and pDirtyRects members of DXGI_PRESENT_PARAMETERS. Filled rectangles show dirty rectangles that the app updated with new content. The scroll offset is specified by the pScrollOffset member of DXGI_PRESENT_PARAMETERS. The scroll rectangle is specified by the pScrollRect member of DXGI_PRESENT_PARAMETERS. The dashed rectangle shows the scroll rectangle in the current frame. The app specifies the animating video and new line as dirty rectangles, and the operating system renders them on the current frame. The scroll rectangle is the area of the previous frame that the operating system needs to copy to the current frame before it renders the current frame. Our app passes 2 dirty rectangles and the scroll rectangle. In this call, the app passes a pointer to a DXGI_PRESENT_PARAMETERS structure that includes dirty rectangles and the number of dirty rectangles, or the scroll rectangle and the associated scroll offset, or both dirty rectangles and the scroll rectangle. ![]() The app performs presentation by calling the IDXGISwapChain1::Present1 method. ![]() The scroll rectangle allows the operating system to copy and translate the previously rendered content on the new frame and to render only the new line on the new frame. The app uses dirty rectangles to just update the animating video and new line for the window, instead of updating the entire window. Here, a scrollable app contains text and animating video. In this scenario and illustration we show the functionality of using dirty rectangles and scroll. You can use dirty rectangles with DXGI swap chains that run in both flip model and bitblt model (set with DXGI_SWAP_EFFECT_SEQUENTIAL). You can use scroll only with DXGI swap chains that run in flip presentation model. For apps that are often displayed via Remote Desktop Connection and other remote-accessing technologies, the savings are particularly noticeable in the display quality because these technologies use dirty rectangles and scroll metadata. Using dirty rectangles and the scroll rectangle in swap chain presentationīy using dirty rectangles and the scroll rectangle in swap chain presentation, you save on the usage of memory bandwidth and the related usage of system power because the amount of pixel data that the operating system needs to draw the next presented frame is reduced if the operating system doesn't need to draw the entire frame. Because of the flip presentation model's smoother presentation and other new functionality, we recommend that you use flip presentation model for all new apps that you write with Direct3D 10 and later APIs. For more info about how to use DXGI flip model, see DXGI flip model. You select the flip presentation model by specifying the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL enumeration value in the SwapEffect member of the DXGI_SWAP_CHAIN_DESC1 structure and by setting the BufferCount member of DXGI_SWAP_CHAIN_DESC1 to a minimum of 2. You can use multiple IDXGIFactory2 interface methods to create the appropriate IDXGISwapChain1 object to use with an HWND handle, a CoreWindow object, DirectComposition, or the Windows.UI.Xaml framework. By using flip model, back buffers are flipped between the runtime and Desktop Window Manager (DWM), so DWM always composes directly from the back buffer instead of copying the back buffer content.ĭXGI 1.2 APIs include a revised DXGI swap-chain interface, IDXGISwapChain1. In Windows 7, Direct3D 9EX first adopted flip-model presentation to avoid unnecessarily copying the swap-chain buffer. DXGI flip-model presentationĭXGI 1.2 adds support for the flip presentation model for Direct3D 10 and later APIs. We explain the benefits of using the new flip-model swap chain and of optimizing presentation by specifying dirty rectangles and scrolled areas. DXGI 1.2 supports a new flip-model swap chain, dirty rectangles, and scrolled areas. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |