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
1
vote
1 answer
D3D11Texture2D to another texture with different context and device
I am trying to copy a texture surface to a texture from a different context to create a sharedBitmap, but in result a black picture. What's wrong?
hr = device->CreateTexture2D(&texDesc, 0, &tmpTexture);
IDXGIResource1* pOtherResource(NULL);
hr =…

Nikolay
- 13
- 3
1
vote
1 answer
cursor shape on capture screen using DXGI
I have written a screen capture program using windows screen capture API in DXGI。It works just OK。
But on some cases (such as when I drag a window to move it), the result contains a cursor shape on it.
]
This is not what I expected.
Does ayone know…

wangcd
- 21
- 1
1
vote
1 answer
IMFSourceReader hardware accelerated
I'm trying to follow this in order to accelerate video decoding with an IMFSourceReader.
When I don't use it, everything is OK. When I use it, it doesn't work. Here are the steps:
Creation of a DirectX 11 device
HRESULT…

Michael Chourdakis
- 10,345
- 3
- 42
- 78
1
vote
1 answer
Setting AlphaMode member of DXGI_SWAP_CHAIN_DESC1 makes CreateSwapChainForHwnd fail with 0x887a0001
I want to create a swap chain that I can alter my alpha values so it can get semi-transparent. My code is here:
#include
#include
#include
#include
#include
#pragma comment(lib,…

Arush Agarampur
- 1,340
- 7
- 20
1
vote
1 answer
How to call DXGI from C without __uuidof
I'm unsure of how to get DXGI GUIDs without the C++-only __uuidof operator. It's used all over the MSDN code. I'm also unsure of the syntax of calling OO Windows APIs in C.
I've checked on MSDN and here, but found nothing.
#ifdef…

Jesse Lactin
- 301
- 3
- 12
1
vote
2 answers
Can't go fullscreen under DirectX12
I have an app which uses DirectX12. I wanted to support fullscreen mode in my app.
However, each time I called IDXGISwapChain::SetFullscreenState(), I got this error:
DXGI ERROR: IDXGISwapChain::GetContainingOutput: The swapchain's adapter
does…

Guanyuming He
- 167
- 10
1
vote
0 answers
How do I take a screenshot of an area of the screen with DXGI?
Short version:
I need a C# function to paste into my code, that takes a screenshot of a rectangle (x, y, w, l) of the screen using DXGI (assuming it's referenced), because I believe it will do better than Graphics.CopyFromScreen.
Long version:
I'm…

TheLeftExit
- 29
- 4
1
vote
1 answer
MiscFlags D3D11_RESOURCE_MISC_GDI_COMPATIBLE is used for GDI compatible texture, yet IDXGISurface1::GetDC throws exception
I am creating an texture with the MiscFlags D3D11_RESOURCE_MISC_GDI_COMPATIBLE. Yet debug layer is showing following error.
If I use D3D10_RESOURCE_MISC_GDI_COMPATIBLE flag CreateTexture2D() - throws exception. Why debug layer expects…

Tajuddin Khandaker
- 660
- 6
- 20
1
vote
1 answer
DirectX 11 errors equivalent to DirectX 9
I need a reference for finding equivalent error codes for DirectX 11 that was used in DirectX 9 implementations like…

Tajuddin Khandaker
- 660
- 6
- 20
1
vote
1 answer
How to use swizzle .rrrg in directx11 shader
I have to create a texture with equivalent format of D3DFMT_A8L8 in directx9 to directx11. But the note in the documentation is not clear to me. Would someone explain what should be done? While creating input layout I am facing invalid parameter…

Tajuddin Khandaker
- 660
- 6
- 20
1
vote
1 answer
How to copy a 32 bit red texture data to a texture of DXGI format DXGI_FORMAT_R32_FLOAT
I have a BYTE buffer of a 32 bit red colored simple texture. I want to create a texture in DirectX 11 where target texture format is DXGI_FORMAT_R32_FLOAT. I was trying with device context Map() function but while saving the resource to dds file it…

Tajuddin Khandaker
- 660
- 6
- 20
1
vote
0 answers
SaveDDSTextureToFile() saves a black texture instead the expected
I have created a red colored texture of DXGI format DXGI_FORMAT_R32_FLOAT. I have a byte buffer of red color pixels where 4 byte per pixel is prepared. The byte buffer is then copied using device context map and unmap functions and after that I have…

Tajuddin Khandaker
- 660
- 6
- 20
1
vote
1 answer
What are the difference between IDXGIFactory and other IDXGIFactory version?
I want to know the difference of the IDXGIFactory1, IDXGIFactory2 and so on. What can that difference give Benefits to DirectX11 or DirectX12?

MiC
- 185
- 7
1
vote
1 answer
Find recommended monitor resolution in Windows
How can I find what Windows marks as the recommended resolution, normally also the native resolution. In many cases the highest supported resolution is also the recommended one, but some monitors list resolutions that are higher and even end up…

tjansson
- 324
- 2
- 11
1
vote
1 answer
DXGI API: AcquireNextFrame() never grabs an updated image, always blank
I've been playing around with someone else's code that implements the DXGI desktop duplication API and I've run into a strange issue. Here's the github link to the code I am…

AcolyticSubstrate
- 49
- 8