Microsoft DirectX Graphics Infrastructure (DXGI) is often used in combination with Direct3D and is responsible for enumerating graphics adapters and display modes, selecting buffer formats, sharing resources between processes and presenting rendered frames to the monitor.
Questions tagged [dxgi]
248 questions
6
votes
1 answer
Resizing a DXGI swap chain bound to a Direct2D render target
I have a Direct2D render target created with ID2D1Factory::CreateDxgiSurfaceRenderTarget. When I receive a WM_SIZE message, I try to resize the corresponding swap chain by calling IDXGISwapChain::ResizeBuffers, but it fails with…

user1610015
- 6,561
- 2
- 15
- 18
6
votes
1 answer
Resetting window after using DirectX 11
I've written an application that can switch between OpenGL, DirectX 9 and DirectX 11 for rendering without restarting or recreating the window. Switching between OpenGL and DirectX 9 as well as to DirectX 11 mode works well, however, after using…

Peter Wimmer
- 309
- 2
- 11
5
votes
1 answer
Force to use integrated (Intel) graphic card on Microsoft Hybrid system
I use Microsoft Desktop Duplication API and if my code runs on the Integrated (Intel) graphic card then everything works fine. But if I run on the dedicated card, I get an error.
I found that Microsoft does not support this usage on a dedicated card…

Gergo
- 93
- 6
5
votes
1 answer
Is it possible to create a winapi window with only borders
So I'm trying to create a window that only shows its borders and have the rest of the body be see through.
I've created a mockup of what that would look like in my head:
I tried blitting in a buffer with transparent pixels but that did not have…

justin kohlenberg
- 133
- 6
5
votes
1 answer
Get amount of graphics memory
I know about DXGI_ADAPTER_DESC, but in 32-bit builds Direct3D’s SIZE_T type is 4 bytes long, so I’m getting 3GB instead of 11.
Is there a way to get the correct value even in a 32 bit build?
P.S. I need the value to calculate upper size for a large…

Soonts
- 20,079
- 9
- 57
- 130
5
votes
1 answer
Which format to use for a shader resource view into depth-stencil buffer resource?
The depth-stencil buffer resource is defined as DXGI_FORMAT_D24_UNORM_S8_UINT format.
I would have assumed that to create a shader resource view (SRV) into that resource would require the view format to be described either…

Jaanus Varus
- 3,508
- 3
- 31
- 49
5
votes
1 answer
Using Media Foundation to encode Direct X surfaces
I'm trying to use the MediaFoundation API to encode a video but I'm having problems pushing the samples to the SinkWriter.
I'm getting the frames to encode through the Desktop Duplication API. What I end up with is an ID3D11Texture2D with the…

Tiago Magalhães
- 51
- 5
5
votes
0 answers
Handling Multiple Graphics Adapters and Monitors
I am trying to decide whether or not to support multiple adapters/monitors in my application as opposed to locking my window to the primary adapter and primary monitor. I have a lot of questions about this as I have never used a system with…

NmdMystery
- 2,778
- 3
- 32
- 60
5
votes
2 answers
Properly Handling Alt-Enter / Alt-Tab Fullscreen Resolution
The MSDN page on DXGI gives instructions on how to handle fullscreen resolutions different from the desktop resolution. It says to call IDXGISwapChain::ResizeTargets() before calling IDXGISwapChain::SetFullscreenState() to prevent flickering, among…

NmdMystery
- 2,778
- 3
- 32
- 60
5
votes
1 answer
What are the exact color spaces of DXGI_FORMATs?
In the official documentation of DXGI_FORMAT, it tells us that only a format with _SRGB enumeration postfix is in sRGB color space. I thought other format without this postfix are all in the linear space. But I found a very strange behavior of…

SeaStar
- 1,217
- 1
- 10
- 15
4
votes
2 answers
Unresolved external symbol _IID_IDXGIFactory
I create Console Application in VC++ 2010, and add the following code to it:
#include
#include
#include
#pragma comment(lib, "d3d10.lib")
#pragma comment(lib, "d3dx10.lib")
#pragma comment(lib, "dxgi.lib")
#pragma…

Alex F
- 42,307
- 41
- 144
- 212
4
votes
1 answer
IDXGISwapChain::Present causes a driver crash and a device removal
I am designing a game engine that makes use of the DirectX 11 API, in particular, the use of deferred contexts. The basic idea is to have each and every device state given its own deferred context, and then, after all geometry has been rendered, to…

Alex
- 1,794
- 9
- 20
4
votes
0 answers
Why is saving a ID3D11Texture2D to file so painfully slow and what to do about it
I'm having some code (compiled into a standalone executable) to take a screenshot. It runs pretty fast (around 100ms), however, as soon as I run something graphic intensive (like a game), it takes up to 2 minutes, even though CPU and GPU are not…

loonytune
- 1,775
- 11
- 22
4
votes
0 answers
What is the effect of IDXGIDevice::SetGPUThreadPriority?
The documentation for IDXGIDevice::SetGPUThreadPriority states
To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. You should profile your application to ensure that it behaves as intended. If…

Elad Maimoni
- 3,703
- 3
- 20
- 37
4
votes
0 answers
What is the behavior of the DXGI_PRESENT_ALLOW_TEARING flag?
The documentation for the DXGI 1.5 flag DXGI_PRESENT_ALLOW_TEARING is somewhat sparse. The MSDN article on variable refresh rate displays has the following to say about when to use the flag:
"Support for variable refresh rate displays is achieved by…

C. Finegan
- 83
- 6