directx-11

Programmatically creating directx 11 textures, pros and cons of the three different methods

≯℡__Kan透↙ 提交于 2019-11-30 02:05:57
The msdn documentation explains that in directx 11 there are multiple ways to fill a directx 11 texture programmatically: (1) Create the texture with default usage texture and initialize it with data from memory (2) Create the texture with dynamic usage, use DeviceContext Map to get a pointer to texture memory, write to it, then use Unmap to indicate you are done (at which point I guess it is copied to the gpu) (3) Create the texture with staging usage and follow same steps as for dynamic texture, but follow that with a call to ID3D11DeviceContext.CopyResource to use this staging texture to in

How do I use Hardware accelerated video/H.264 decoding with directx 11 and windows 7?

↘锁芯ラ 提交于 2019-11-29 22:38:50
I've been researching all day and not gotten very far. I'm on windows 7, using directx 11. (My final output is to be a frame of video onto a DX11 texture) I want to decode some very large H.264 video files, and the CPU (using libav) doesn't cut it. I've looked at the hwaccel capabilities of libav using DXVA2, but hit a road block when I need to create a IDirectXVideoDecoder, which can only be created with a D3D9 interface. (which I don't have using DX11) Whenever I've looked up DXVA documentation, it doesn't reference DX11, was this removed in DX10 or 11? (Can't find any confirmation of this,

Can't create Direct2D DXGI Surface

人走茶凉 提交于 2019-11-29 16:56:45
I'm calling this method: http://msdn.microsoft.com/en-us/library/dd371264(VS.85).aspx The call fails with E_NOINTERFACE . The documentation is especially unhelpful as to why this may happen. I've enabled all of the DirectX 11 debug stuff and that's the best I got. I know that I have a valid IDXGISurface1* (also tried IDXGISurface ) and the other parameters are set correctly. Any ideas as to why this call may fail? Edit: I also am having problems creating D3D11 devices. If I pass nullptr as the IDXGIAdapter* argument in D3D11CreateDeviceAndSwapChain, it works fine, but if I enumerate the

WPF and DirectX 11 via D3DImage

和自甴很熟 提交于 2019-11-29 09:53:50
问题 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. Just blank screen with two buttons. Does anybody know how to make WPF working with DirectX 11. Also I had seen that when I'm just running this example the CPU usage is about 4-5% for Intel i5 750 (Windows 7 64 bit, NVidia Geforce 430). I think it's

Resizing a DXGI Resource or Texture2D in SharpDX

烈酒焚心 提交于 2019-11-29 06:59:04
I want to resize a screen captured using the Desktop Duplication API in SharpDX. I am using the Screen Capture sample code from the SharpDX Samples repository , relevant portion follows:. SharpDX.DXGI.Resource screenResource; OutputDuplicateFrameInformation duplicateFrameInformation; // Try to get duplicated frame within given time duplicatedOutput.AcquireNextFrame(10000, out duplicateFrameInformation, out screenResource); if (i > 0) { // copy resource into memory that can be accessed by the CPU using (var screenTexture2D = screenResource.QueryInterface<Texture2D>()) device.ImmediateContext

How do you draw text in DirectX 11?

旧城冷巷雨未停 提交于 2019-11-28 20:41:45
In DirectX 10 you could use the font interface provided by D3DX10. In DirectX 11 you are supposed to use DirectWrite. But it looks like DirectWrite doesn't speak natively to Direct3D? Is there something basic I'm missing? How do you draw simple text with DirectX 11? Zee Edit 2014: As pointed out in comment, the link to RasterTek tutorials no longer functions, here is a link to Webarchive of RasterTek provided by RadioSpace . The second point of the original answer is no longer valid either, because its now possible to share D3D11 backbuffer with Direct2D and through it draw text with

How do I use Hardware accelerated video/H.264 decoding with directx 11 and windows 7?

混江龙づ霸主 提交于 2019-11-28 19:18:35
问题 I've been researching all day and not gotten very far. I'm on windows 7, using directx 11. (My final output is to be a frame of video onto a DX11 texture) I want to decode some very large H.264 video files, and the CPU (using libav) doesn't cut it. I've looked at the hwaccel capabilities of libav using DXVA2, but hit a road block when I need to create a IDirectXVideoDecoder, which can only be created with a D3D9 interface. (which I don't have using DX11) Whenever I've looked up DXVA

How to compile a DirectX 11 app in MinGW

混江龙づ霸主 提交于 2019-11-28 10:09:56
I've looked, and I can't find any material relating to using Direct3d 10 or 11 with MinGW. What do I have to do to get things working? I'm getting errors in the header files supplied by the DX SDK. And don't anyone even think of suggesting Visual Studio. It seems that here it is explained how to get DX headers from SDK work with MinGW: http://d.hatena.ne.jp/tbk/20110115/1295080728 Use Google Translate to translate page to english. Alternatively try using DirectX headers from mingw64 project from here: http://sourceforge.net/projects/mingw-w64/files/ You'll need "Download headers and CRT source

DirectX 11 framebuffer capture (C++, no Win32 or D3DX)

北战南征 提交于 2019-11-28 06:06:05
I would like to capture the contents of my front or back buffer using DirectX 11 into an array of bytes which I can then use as a texture or as a source for creating a file. I have a swap chain setup, lots of rendering happening and the following code so far - which I make sure to call after the call to Present. ID3D11Texture2D* pSurface; HRESULT hr = m_swapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), reinterpret_cast< void** >( &pSurface ) ); if( pSurface ) { const int width = static_cast<int>(m_window->Bounds.Width * m_dpi / 96.0f); const int height = static_cast<int>(m_window->Bounds

Resizing a DXGI Resource or Texture2D in SharpDX

大憨熊 提交于 2019-11-28 00:33:48
问题 I want to resize a screen captured using the Desktop Duplication API in SharpDX. I am using the Screen Capture sample code from the SharpDX Samples repository, relevant portion follows:. SharpDX.DXGI.Resource screenResource; OutputDuplicateFrameInformation duplicateFrameInformation; // Try to get duplicated frame within given time duplicatedOutput.AcquireNextFrame(10000, out duplicateFrameInformation, out screenResource); if (i > 0) { // copy resource into memory that can be accessed by the