Questions tagged [directx-11]

DirectX 11 is the 11th version of Microsoft's DirectX API, which is used to develop and handle tasks related to Multimedia, such as game programming, 3d visualizations and video on Microsoft platforms. DirectX 11 runs on Windows Vista, Windows 7, Windows 8, Windows 10, and Xbox One.

DirectX 11 is the 11th version of Microsoft's DirectX API (), which is used to develop and handle tasks related to Multimedia, such as game programming, 3d visualizations and video on Microsoft platforms. DirectX 11 runs on Windows Vista (), Windows 7 (), Windows 8 (), Windows 10 (), and Xbox One ().

1933 questions
6
votes
2 answers

How to create bitmap from Surface (SharpDX)

I am new to DirectX and trying to use SharpDX to capture a screen shot using the Desktop Duplication API. I am wondering if there is any easy way to create bitmap that I can use in CPU (i.e. save on file, etc.) I am using the following code the get…
Shahed
  • 898
  • 1
  • 12
  • 25
6
votes
1 answer

WinRT C++ ComPtr GetAddressOf vs &

I just got started with DirectX 11.1 for Windows 8 apps and I got the following ComPtr for example: ComPtr constantBuffer; What I wonder is, what is the difference between using &constantBuffer and…
Johan Falk
  • 4,341
  • 2
  • 30
  • 42
6
votes
2 answers

using a custom deleter for std::shared_ptr on a direct3d11 object

When i use an std::shared_ptr and need a custom deleter, i usually make a member function of the object to facilitate it's destruction like this: class Example { public: Destroy(); }; and then when i use the shared ptr, i just make it like…
FatalCatharsis
  • 3,407
  • 5
  • 44
  • 74
6
votes
3 answers

Windows 8 SDK renamed all headers and I don't know what to include now?

These are my headers from before I updated to the new SDK: #pragma once #ifndef _EXTERNAL_DEPENDENCIES_H_ #define _EXTERNAL_DEPENDENCIES_H_ #if defined(DEBUG) || defined(_DEBUG) #define _CRTDBG_MAP_ALLOC #include #endif #include…
Brail Brailov
  • 71
  • 1
  • 2
  • 5
6
votes
2 answers

What can cause D3D11CreateDevice() to fail with E_FAIL?

I'm invoking D3D11CreateDevice() with the following code: ID3D11Device* md3dDevice; ID3D11DeviceContext* md3dImmediateContext; D3D_DRIVER_TYPE md3dDriverType = D3D_DRIVER_TYPE_HARDWARE; createDeviceFlags = D3D11_CREATE_DEVICE_DEBUG; HRESULT hr =…
Andrew
  • 1,853
  • 1
  • 14
  • 15
5
votes
3 answers

WPF and DirectX 11 via D3DImage

I want to use DirectX 11 from unmanaged C++ code and use WFP for the GUI. SlimDX is not suitable for me. I have found the solution to make working WPF with DirectX 10: WPF & DirectX 10 via D3DImage But I couldn't manage to work it with DirectX 11.…
Alex
  • 101
  • 1
  • 1
  • 8
5
votes
1 answer

Mapping dynamic texture causing "Already Mapped Error"

I just starting using Direct3D11 and I am trying to create a dynamic texture that I plan to update with new data several times a second. My issue is that every time I update the texture with the new data, I get this error from the D3D…
Eugene
  • 91
  • 1
  • 6
5
votes
1 answer

Why is a shared surface queue necessary for different directx versions to work together and more specifcally to interop WPF and directx 11

I want to get directx 11 working inside WPF. From answers to this question it is apparent that this is possible. The second answer points to some microsoft code which implements a "Shared Surface Queue". I am going through the shared surface queue…
user334911
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
2 answers

Media Foundation EVR and DirectX 11

I am trying to write an EVR for Media Foundation using DirectX 11 on Windows 10 (Desktop). The only one solution I have found so far is here Unfortunately I don't know (as many others) how to correctly use it. Does somebody can point me to the right…
5
votes
1 answer

DirectX 11 - How to create a very simple 2D texture

I am very new to Direct X 11. I want to create a simple 2d texture (of type ID3D11Texture2D). I have read document about CreateTexture2D and I understand that: pDesc is how we define the image. pInitialData contains the array of bytes presents…
123iamking
  • 2,387
  • 4
  • 36
  • 56
5
votes
1 answer

Implement API to wait for d3d10 commands to finish

I am implementing some functionality which requires me to implement an API to wait for d3d10 to finish rendering.Basically i am trying to implement synchronize access to a shared texture such that i can update a texture after d3d10 is successfully…
Bharat Ahuja
  • 394
  • 2
  • 15
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…
5
votes
1 answer

How to access framebuffer from CPU in Direct3D 11?

I am creating a simple framework for teaching fundamental graphics concepts under C++/D3D11. The framework is required to enable direct manipulation of the screen raster contents via a simple interface function (e.g. Putpixel( x,y,r,g,b )). Under…
chili
  • 665
  • 8
  • 20
5
votes
1 answer

Understanding DirectX11 and Directx11.1 sample msdn code

When initializing DirectX 11.1 for win32 I was following MSDN sample code. The code declare two Direct3d devices: ID3D11Device* g_pd3dDevice = nullptr; ID3D11Device1* g_pd3dDevice1 = nullptr; and then acquire the device…
Pixelord
  • 621
  • 9
  • 24