directx-11

Why is D3D10SDKLayers.dll loaded during my DX11 game?

霸气de小男生 提交于 2019-12-04 03:53:00
问题 SEE EDIT UPDATES BELOW. Original question has been modified! I have a working window that uses a DX11 device. My problem comes along when I try to go fullscreen using Alt+Enter. If the window is not focused, i get a debug output that says: 'MyGame.exe': Loaded 'C:\Windows\SysWOW64\D3D10SDKLayers.DLL', Cannot find or open the PDB file and then the warning DXGI Warning: IDXGISwapChain::Present: Fullscreen presentation inefficiencies incurred due to application not using IDXGISwapChain:

How can I feed compute shader results into vertex shader w/o using a vertex buffer?

半腔热情 提交于 2019-12-03 17:14:21
Before I go into details I want outline the problem: I use RWStructuredBuffers to store the output of my compute shaders (CS). Since vertex and pixel shaders can’t read from RWStructuredBuffers, I map a StructuredBuffer onto the same slot (u0/t0) and (u4/t4): cbuffer cbWorld : register (b1) { float4x4 worldViewProj; int dummy; } struct VS_IN { float4 pos : POSITION; float4 col : COLOR; }; struct PS_IN { float4 pos : SV_POSITION; float4 col : COLOR; }; RWStructuredBuffer<float4> colorOutputTable : register (u0); // 2D color data StructuredBuffer<float4> output2 : register (t0); // same as u0

Are there DirectX guidelines for binding and unbinding resources between draw calls?

蓝咒 提交于 2019-12-03 16:19:23
All DirectX books and tutorials strongly recommend reducing resource allocations between draw calls to a minimum – yet I can’t find any guidelines that get more into details. Reviewing a lot of sample code found in the web, I have concluded that programmers have completely different coding principles regarding this subject. Some even set and unset VS/PS VS/PS ResourceViews RasterizerStage DepthStencilState PrimitiveTopology ... before and after every draw call (although the setup remains unchanged), and others don’t. I guess that's a bit overdone... From my own experiments I have found that

Rendering to multiple textures with one pass in directx 11

六月ゝ 毕业季﹏ 提交于 2019-12-03 13:44:19
I'm trying to render to two textures with one pass using C++ directx 11 SDK. I want one texture to contain the color of each pixel of the result image (what I normally see on the screen when rendering a 3D scene), and another texture to contain the normal of each pixel and depth (3 float for normal and 1 float for depth). Right now, what I can think of is to create two rendering targets and render the first pass as the colors and the second pass the normals and depth to each rendering target respectively. However, this seems a waste of time because I can get the information of each pixel's

Macro definition clash between directx headers and winerror.h

馋奶兔 提交于 2019-12-03 11:47:16
问题 I'm on windows 7 using Visual Studio 2012. When I compile I get a lot of macro redefinition warnings caused by winerror.h versus dxgi.h, dxgitype.h, d3d11.h, d3d10.h; for example DXGI_STATUS_OCCLUDED, DXGI_STATUS_CLIPPED, DXGI_STATUS_NO_REDIRECTION etc. I suppose this is because the windows sdk 8 is installed. How can I avoid this? Is there a way I can exclude these new libraries from my project? 回答1: I ran into this problem using Visual Studio 2012 Express on Windows 8; however, my errors

SharpDX 2.5 in DirectX11 in WPF

白昼怎懂夜的黑 提交于 2019-12-03 11:05:40
I'm trying to implement DirectX 11 using SharpDX 2.5 into WPF. Sadly http://directx4wpf.codeplex.com/ and http://sharpdxwpf.codeplex.com/ don't work properly with SharpDX 2.5. I was also not able to port the WPFHost DX10 sample to DX11 and the full code package of this example is down: http://www.indiedev.de/wiki/DirectX_in_WPF_integrieren Can someone suggest another way of implementing? SharpDX supports WPF via SharpDXElement . Take a look in the Samples repository at the Toolkit.sln - all projects that have WPF in their name use SharpDXElement as rendering surface: MiniCube.WPF -

How to eager commit allocated memory in C++?

做~自己de王妃 提交于 2019-12-03 07:50:08
问题 The General Situation An application that is extremely intensive on both bandwidth, CPU usage, and GPU usage needs to transfer about 10-15GB per second from one GPU to another. It's using the DX11 API to access the GPU, so upload to the GPU can only happen with buffers that require mapping for each single upload. The upload happens in chunks of 25MB at a time, and 16 threads are writing buffers to mapped buffers concurrently. There's not much that can be done about any of this. The actual

Where can I find some in-depth DirectX 11 tutorials? [closed]

柔情痞子 提交于 2019-12-03 05:53:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . So far the only tutorials I've been able to find are on directx11tutorials.com, which are essentially inferred from the existing samples. Does anyone know where to find other tutorials, or better yet open source projects using DirectX 11? (Extra points for project code using DirectX 11 :) ) 回答1: I think there

DirectX 11 - Compute shader: Writing to an output resource

守給你的承諾、 提交于 2019-12-03 01:32:52
I've just started using the Compute shader stage in DirectX 11 and encountered some unwanted behaviour when writing to an output resource in the Compute shader. I seem to get only zeroes as output which, to my understanding, means that out-of-bound reads has been performed in the Compute shader. (Out-of-bound writes results in no-ops) Creating the Compute shader components Input resources First I create an ID3D11Buffer* for input data. This is passed as a resource when creating the SRV used for input to the Compute shader stage. If the input data never changes then we could release the

Trying to use a custom font file using DirectX - What is the collection key?

こ雲淡風輕ζ 提交于 2019-12-02 20:40:30
问题 I'm struggling to understand how the hell I create a font collection that I can pass into my CreateTextFormat function. The exact problem is understanding what the collection key part of this is: http://msdn.microsoft.com/en-us/library/windows/desktop/dd368186(v=vs.85).aspx This is my code so far and I just took a wild guess at the collection key coz I don't understand it AT ALL... // Vars IDWriteFontFace* pFontFace; IDWriteFontFile* pFontFiles; IDWriteFontCollection* pFontCollection;