4 ms·
The originally posted article is about new 3D GPU-based backend in the GTK, which is unrelated to games. Hardware accelerated 3D graphics is the best way to re
by Const-me 3y ago
The originally posted article is about new 3D GPU-based backend in the GTK, which is unrelated to games.
Hardware accelerated 3D graphics is the best way to render pretty much everything on modern hardware, games or not games. High-resolution displays are omnipresent. Even cell phones often have FullHD or more pixels, like 2796×1290 or 2556×1179 in the iPhones.
- GartzenDeHaes 3y agoAFAIK, Windows applications typically use GDI instead of DirectX. https://learn.microsoft.com/en-us/windows/win32/direct2d/comparing-direct2d-and-gdi https://learn.microsoft.com/en-us/windows/win32/direct2d/com...
- Const-me 3y agoGDI is only used by legacy apps. It gonna stay there for quite a while for backward compatibility reasons, but modern Windows apps are using better GPU-centric APIs to render their GUI. Specifically, WPF is based on DirectX 9, Direct2D is based on Direct3D 11, UWP and WinUI are based on Direct2D. On my computer, both Chromium and Firefox browsers are using Angle on top of D3D11, Firefox uses Direct2D for canvas only. Also, even legacy apps who render their GUI with GDI are still using 3D GPUs to an extent. Some GDI operations like BitBlt are accelerated internally by the OS. And the OS composes windows on the desktop with D3D11, dwm.exe process does that.
- charcircuit 3y ago>Hardware accelerated 3D graphics is the best way to render pretty much everything on modern hardware, games or not games. A counterexample is video playback. The best way for video is to use the hardware decoder and hardware compositor. You don't want to render the video texture to a quad. Using the hardware compositor requires less computation and less power than using 3D graphics.
- Const-me 3y ago> The best way for video is to use the hardware decoder and hardware compositor. Not according to Microsoft, see that page https://learn.microsoft.com/en-us/windows/win32/medfound/how-to-write-an-evr-presenter https://learn.microsoft.com/en-us/windows/win32/medfound/how... Microsoft strongly recommends that new code use MediaPlayer or the lower level IMFMediaEngine APIs to play video media in Windows instead of the EVR, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible. That lower level IMFMediaEngine API they recommend for Win10+ delivers uncompressed video frames in D3D11 textures.
- charcircuit 3y ago>That lower level IMFMediaEngine API they recommend for Win10+ delivers uncompressed video frames in D3D11 textures. Which in the best case is done via hardware decoding as I said.
- Const-me 3y agoYes, but note no hardware composition is involved. The composition is done by the 3D GPU like I said. Either in your app if you render that video yourself, or if you supply a swap chain’s back buffer to IMFMediaEngine.TransferVideoFrame method, dwm.exe will do it.
- charcircuit 3y agoIt's the compositor's job to composite in the most efficient way possible which in the best case would be using hardware compositing layers, if the hardware does not have enough layers than the compositor will use 3D graphics to combine layers together. Just because a GPU includes a 3D graphics pipeline that doesn't mean that everything has to go through it.
- Const-me 3y ago> Just because a GPU includes a 3D graphics pipeline that doesn't mean that everything has to go through it. That’s how modern Windows does that in practice. Everything does go through the 3D graphics pipeline, and starting from Win8 it’s impossible to disable. I’m not even sure modern PC hardware supports these hardware layers, except for one small extra layer for hardware mouse cursor. On my computer D3DCAPS_OVERLAY and DDCAPS_OVERLAY flags are unset. The driver reports to the OS the hardware doesn’t support any hardware overlay surfaces.