Questions tagged [dxgi]

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.

248 questions
3
votes
3 answers

Direct2D: How to save content of ID2D1RenderTarget to an image file?

The question is very similar to this, but that one didn't get answered yet. My question is, I have a D2D DXGI RenderTarget from d2dfactory->CreateDxgiSurfaceRenderTarget(), and I want to save its content to an image file using WIC. I was just…
pmdiano
  • 33
  • 1
  • 3
3
votes
1 answer

DXGI: trying to get correct display mode from output (monitor)

I'm currently stuck with a pesky little issue. I developed an application that zeroes out the DXGI mode desc. structure and calls FindClosestMatchingMode() to, as advertised, "gravitate towards the desktop resolution". This works fine if the…
nielsj
  • 1,499
  • 12
  • 24
3
votes
1 answer

How do the DXGI_FORMAT_ codes work in relation to endianness?

I've been working through Frank D. Luna's book "Introduction to 3D programming with DirectX 10" and one of the problems is to switch from using D3DXCOLOR color (128 bits) to UINT color (32 bits) Presumably the format code to use is:…
Robert
  • 91
  • 2
  • 7
3
votes
1 answer

PIX DirectX 11 Debug Pixel Error

I recently updated my DirectX 11 (C++) application for dual-monitor, dual-window support. Ever since then, when I try to debug any pixel in the PIX debugger, I get the following error: A call that previously succeeded failed during playback: EID:…
Tim Coolman
  • 595
  • 1
  • 9
  • 19
2
votes
0 answers

What does the member "AlphaMode" do when creating a DXGI swapchain for Direct2D device contexts?

I am currently creating a game using Direct2D. For rendering, I want to use D2D's device context because it allows for more control and effects etc. I have created the HWND swapchain as usual and it works. I have already tried Alpha Blending using…
cocoz1
  • 119
  • 5
2
votes
0 answers

How to change the background color of a dxgi swap chain?

I recently ported my app from using an ID2D1HwndRenderTarget to using an ID2D1DeviceContext with a dxgi swap chain. With an hwnd render target I can have a transparent background by calling pRT->Clear({});(not a transparent window, only the render…
mbolp
  • 21
  • 1
  • 4
2
votes
1 answer

How do I connect the Graphics Capture API to IMFSinkWriter

I am attempting to write some code that connects the Windows::Graphics::Capture API to IMFSinkWriter in order to capture the desktop to an MP4 file. I find that the IMFSinkWriter WriteSample function always returns 0x80070057 and I'm trying to…
2
votes
1 answer

DXGI Waitable SwapChain not waiting (D3D11)

there is another question with the same title on the site, but that one didn't solve my problem I'm writing a Direct3D 11 desktop application, and I'm trying to implement waitable swap chain introduced by this document to reduce latency…
wd357dui
  • 135
  • 1
  • 8
2
votes
0 answers

How can I draw correctly in a window with Direct2D?

I was making a program that draws two lines and a circle in the window, for this I used Direct2D. I was doing a program that draws two lines and a circle in the window. I noticed a problem and that is that when drawing a line of coordinates…
2
votes
1 answer

Linking Cuda (cudart.lib) makes DXGI DuplicateOutput1() fail

For an obscure reason my call to IDXGIOutput5::DuplicateOutput1() fail with error 0x887a0004 (DXGI_ERROR_UNSUPPORTED) after I added cudart.lib in my project. I work on Visual Studio 2019, my code for monitor duplication is the classic : hr =…
SamT
  • 528
  • 4
  • 14
2
votes
1 answer

How to use the DXGI flip model in a Direct2D windowed app?

I have a Win32 non-game windowed app that uses a Direct2D device context/HWND render target to draw a window. Currently it uses a DXGI swap chain with the DXGI_SWAP_EFFECT_DISCARD swap effect. Microsoft recommends using the new flip model swap…
Sea Coast of Tibet
  • 5,055
  • 3
  • 26
  • 37
2
votes
1 answer

D3DKMTQueryAdapterInfo AdapterPerfData noMemory Error

I tried to get the Q3DKMT_ADAPTER_PERFDATA and I used this code. string name = @"\\?\PCI#VEN_10DE&DEV_13B1&SUBSYS_80D5103C&REV_A2#4&245367a2&0&0008#{1CA05180-A699-450A-9A0C-DE4FBE3DDD89}"; D3DKMT_OPENADAPTERFROMDEVICENAME adapter = new…
2
votes
1 answer

Getting multiple screen buffers from swap-chain

I want to create multiple render target view and i tried it but i can't get buffer more than 2. I've already set DXGI_SWAP_CHAIN_DESC's BufferCount value as BufferSize UINT const BufferSize = 4; ID3D11Texture2D* BufferTemp; ID3D11RenderTargetView**…
KidCozy
  • 25
  • 5
2
votes
1 answer

Drawing is not showing when GDI compatible DC used from IDXGISurface1

I have created a texture which is GDI compatible but the DC I have got from it is used to draw lines from on point to another point which are not showing on the view window. Also no exception is thrown. Am I missing anything? Is there anyone done…
2
votes
1 answer

Difference between Direct3D and DXGI

I'm trying to query a Windows machine, using C++, for a list of available graphics cards. This SO question has an answer (from moxize) which provides one way (d3d9.h): get-the-graphics-card-model And this one provides another (dxgi.h): dxgi…
mungflesh
  • 776
  • 11
  • 22