direct3d12

New to Direct3D programming: 11 vs 12

醉酒当歌 提交于 2020-01-21 03:21:28
问题 For a newbie in D3D programming, should one just learn D3D12 directly or is D3D11 necessary before diving into D3D12? Assuming starting from scratch and decent knowledge of C++, which way should I go? 回答1: I've answered this question before so you should take a look at that post. In short, Direct3D 12 should be thought of as "DirectX Extreme Pro". It assumes you are already an expert in how the Direct3D 11 runtime works to the point that you can basically write it yourself. It is designed to

New to Direct3D programming: 11 vs 12

时光怂恿深爱的人放手 提交于 2020-01-21 03:20:27
问题 For a newbie in D3D programming, should one just learn D3D12 directly or is D3D11 necessary before diving into D3D12? Assuming starting from scratch and decent knowledge of C++, which way should I go? 回答1: I've answered this question before so you should take a look at that post. In short, Direct3D 12 should be thought of as "DirectX Extreme Pro". It assumes you are already an expert in how the Direct3D 11 runtime works to the point that you can basically write it yourself. It is designed to

GetCPUDescriptorHandleForHeapStart stack corruption

只愿长相守 提交于 2020-01-12 14:58:51
问题 I've stumbled upon a rather unusual problem while programming with DirectX 12.0. No research so far has been insightful. I am programming using C (not C++). It would appear the official DirectX 12 headers support bindings for both C and C++, however writing C equivalent code to do a said task causes a crash whereas C++ does not. I don't believe the error is mine. Here's the details: I have here in my D3D12 device-initialisation procedure the following block of code: /* Get a handle to the

Creating a texture from a image in DX 12 VC++

给你一囗甜甜゛ 提交于 2019-12-13 08:52:44
问题 I just want know Directx 12 API to create texture from image. For DX11 it is D3DX11CreateShaderResourceViewFromFile and for DX9 it is D3DXCreateTextureFromFileEx and for DX12 ? 回答1: Things are a little bit better by now. Microsoft rewrote their DDSTextureLoader for DX12 and released it as part of their MiniEngine on GitHub https://github.com/Microsoft/DirectX-Graphics-Samples/blob/master/MiniEngine/Core/DDSTextureLoader.cpp You also may want to take a look at my derivative work that is

How to create a texture from a bitmap file?

走远了吗. 提交于 2019-12-12 01:22:27
问题 Can you please help me in finding the equivalent DX12 API/sample code by which I could load a bitmap and create a texture ? For DX11 it is D3DX11CreateShaderResourceViewFromFile and for DX9 it is D3DXCreateTextureFromFileEx 回答1: You can use the following functions from DirectXTK, as well as many other. // Standard version HRESULT __cdecl LoadWICTextureFromMemory( _In_ ID3D12Device* d3dDevice, _In_reads_bytes_(wicDataSize) const uint8_t* wicData, size_t wicDataSize, _Outptr_ ID3D12Resource**

Creating a swap chain with MSAA fails

不打扰是莪最后的温柔 提交于 2019-12-12 00:53:52
问题 When I try to setup a swap chain with MSAA support I get an DXGI_ERROR_INVALID_CALL error - here is the code that creates the swap chain: // Describe and create the swap chain. DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {}; swapChainDesc.BufferCount = frameCount_; swapChainDesc.Width = static_cast<UINT>(rsd.width); swapChainDesc.Height = static_cast<UINT>(rsd.height); swapChainDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; swapChainDesc

I can't configure include paths in VSCode for D3D12

青春壹個敷衍的年華 提交于 2019-12-11 16:05:55
问题 [EDIT] This is about a vsCode project not a visual studio project (clarified here because it is not obvious) Did anyone managed to build an app that includes d3d12.h and links successfully with the D3D lib. I know it lives in C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um But when I add it to the include paths of c_cpp_properties.json I get this error: cannot open source file "kernelspecs.h" (dependency of "d3d12.h") Which makes sense. This page mentions a DXSDK_DIR

What is the D3D12 equivalent of D3D11 CreateTexture2D?

流过昼夜 提交于 2019-12-11 10:35:24
问题 I'm new to direct3d programming and I have been building a simple windows application to display 4 images one after other with d3d12. I know a basic understanding of the D3D12 architecture and so far I've created four command allocator (backb buffer size = 4) , a command list, a command queue, descriptor heap, and a fence. I also have loaded my images from file using WIC. I know somehow I have to make image texture data as a resource. While that part is still not clear, I'd like to clarify

GNU G++ stops compiling after including D3D12 include paths (Using VSCode)

自闭症网瘾萝莉.ら 提交于 2019-12-11 05:24:44
问题 I am trying to get VSCode to compile DS3 Code, I have heard I needed these four include paths for D3D files to compile (to include d3d12.h): C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\shared C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\winrt C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\cppwinrt Source: I can't configure include paths in VSCode for D3D12 So I did include them but now a

New to Direct3D programming: 11 vs 12

柔情痞子 提交于 2019-11-30 13:54:56
For a newbie in D3D programming, should one just learn D3D12 directly or is D3D11 necessary before diving into D3D12? Assuming starting from scratch and decent knowledge of C++, which way should I go? I've answered this question before so you should take a look at that post. In short, Direct3D 12 should be thought of as "DirectX Extreme Pro". It assumes you are already an expert in how the Direct3D 11 runtime works to the point that you can basically write it yourself. It is designed to allow middleware engines and low-level graphics developers to have maximum control over the behavior of the