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
0
votes
0 answers
LNK2019 unresolved external symbol CreateDXGIFactory referenced in function main
When trying to compile project in vs2022, I get the error LNK2019 unresolved external symbol CreateDXGIFactory referenced in function main.
I have including the win10 sdk and know that the file is linking because I am getting inline hints.
#include…

Luke Wright
- 13
- 3
0
votes
0 answers
Desktop Duplication API returns blank image inside Windows Sandbox
I am fiddling with recording the screen of Windows Sandbox based on https://github.com/mika-f/dotnet-window-capture :
var hr = _duplication.TryAcquireNextFrame(100, out _, out var desktopResourceOut);
if (hr.Failure)
return null;
using var…

LOST
- 2,956
- 3
- 25
- 40
0
votes
1 answer
no instance of overloaded function "std::make_unique" matches the argument list
I'm doing Info manager for Dxgi and id like to allocate memory for my message but it writes that problem, any other solution
HRESULT hr;
SIZE_T messageLength;
// get the size of message i in yte
…

csnorbi1227
- 3
- 2
0
votes
0 answers
(windows nvidia video codec sdk) How to set up an hevc encode session in c++ that asynchrnously encodes a dxgi surface texture and outputs to stdout?
I'm working on a c++ executable that grabs my display output using DXGI output duplication in the form of DXGI surface textures(I think), directly encodes it in HEVC using my GPU hardware encoder, which then downloads the bitstream to system memory…

Tiger Yang
- 61
- 4
0
votes
1 answer
win32 (Desktop Duplication API) IDXGIOutput1::DuplicateOutput() results in Access Violation within dxgi.dll
I'm writing a small c++ app that uses Desktop Duplication API to get the display output. I've never done c programming before, and I got to where I am by staring at the win32 API documentation.…

Tiger Yang
- 61
- 4
0
votes
0 answers
How should ffmpeg support fixed framerate encoding
I use DXGI to capture desktop, and encode the captured frame to h264 stream.
Now the captured video stream's framerte is 25 fps, and I want the result h264 stream's frame is 60 fps.
I found that even if I set the h264 encoder's framerate to be…

TONY
- 101
- 7
0
votes
0 answers
Why does my screen starts blinking when I toggle the full screen state?
I'm trying to implement full screen support on my Direct3D11 application, but I've been having a issue with this. I'm using the ALT+ENTER key combination that makes the IDXGISwapChain change the target window to full screen and back. But when I go…

Sol Sol
- 25
- 5
0
votes
0 answers
Windows Capture Performance (DXGI) Bug
I find that Microsoft's decision to provide cursor updates in the AcquireNextFrame loop causes a huge performance hit when the cursor is being moved around.
When I turn on a millisecond-level clock in the browser, AcquireNextFrame can capture 60…

yanrk
- 49
- 5
0
votes
1 answer
Convert DXGI_FORMAT_R32G32B32A32_FLOAT to DXGI_FORMAT_R8G8B8A8_UNORM
The data's on the cpu. I was hoping I could upload in DXGI_FORMAT_R32G32B32A32_FLOAT and CopyTextureRegion would do the conversion for me, but it only copies raw bits around.
So it seems like there are only two options, write a compute shader to do…

Tom Huntington
- 2,260
- 10
- 20
0
votes
1 answer
How to call EnumAdapters from IDXGFactory in c?
How to call the EnumAdapters function in c from IDXGFactory
UINT i = 0;
IDXGIFactory* pFactory = NULL;
IDXGIAdapter * pAdapter;
HRESULT hr = CreateDXGIFactory(&IID_IDXGIFactory, (void**)(&pFactory) );
if (hr != S_OK)
{
…

loaded_dypper
- 262
- 3
- 12
0
votes
0 answers
Not getting desired refresh rate when using SetPresentDuration method
I want to set a custom refresh rate in my DX application for that I have used SetPresentDuration() method of IDXGISwapChainMedia interface, the method is returning S_OK but when I am checking the refresh rate it is not setting up as expected. Do I…

Aman Mehta
- 13
- 3
0
votes
0 answers
Why does CreateDXGIFactory occupy GPU even if I call it's release interface
First I run the following code:
IDXGIFactory* pFactory;
HRESULT hr = CreateDXGIFactory(__uuidof(IDXGIFactory1), (void**)(&pFactory));
if (FAILED(hr))
{
return -1;
}
then I tried to use ffmpeg's nvenc_h264 function:
…

TONY
- 101
- 7
0
votes
1 answer
IDXGIFactory2::CreateSwapChainForHwnd fails
https://1drv.ms/u/s!AkVRV9eGJ20rgTu13uTcNkhp0eZb?e=lwMe70
That links takes you to my OneDrive where you can download my Visual Studio 2022 solution and project (it is a .7z file of 17.7KB), it only has code to display a win32 window and little more.…

Zeleska
- 107
- 10
0
votes
0 answers
lDesktopResource->QueryInterface(I&lAcquiredDesktopImage); is stopping the second loop
I am using this code to take a series of screen shot using desktop duplication api.
The code is only for a single shot.
Thus I am looping over it.
However looping the entire code gives fps of 3-4. So I am not looping over the declarations and…

user541396
- 163
- 1
- 9
0
votes
1 answer
Visual Studio C++ How do I stop images from being scaled wrong when I maximize window D3D11 and D2D1
So I'm trying to iron out kinks of how I'm rendering images with direct stuff. Right now it works as a DXGISwapchain with D3D11 and I make a ID2D1RenderTarget which I draw to using bitmaps. My issue is when I hit the maximize button on the window my…

TBC1
- 11
- 2