Relative Content

Tag Archive for c++directxhooktexture-mappingdirect3d12

Trying to save a d3d12 texture into a image file

// Get the device and command queue // pDevice, ID3D12Device* pDevice = nullptr; HRESULT hr = pSwapChain->GetDevice(__uuidof(ID3D12Device), (void**)&pDevice); if (FAILED(hr)) { std::cout << “[D3D12-SCREENSHOT] – Failed to get device” << std::endl; return; } ID3D12CommandQueue* pCommandQueue = nullptr; D3D12_COMMAND_QUEUE_DESC queueDesc = {}; queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; hr = pDevice->CreateCommandQueue(&queueDesc, __uuidof(ID3D12CommandQueue), (void**)&pCommandQueue); if (FAILED(hr)) { std::cout << “[D3D12-SCREENSHOT] […]

Trying to take a d3d12 screenshot

// Get the device and command queue // pDevice, ID3D12Device* pDevice = nullptr; HRESULT hr = pSwapChain->GetDevice(__uuidof(ID3D12Device), (void**)&pDevice); if (FAILED(hr)) { std::cout << “[D3D12-SCREENSHOT] – Failed to get device” << std::endl; return; } ID3D12CommandQueue* pCommandQueue = nullptr; D3D12_COMMAND_QUEUE_DESC queueDesc = {}; queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; hr = pDevice->CreateCommandQueue(&queueDesc, __uuidof(ID3D12CommandQueue), (void**)&pCommandQueue); if (FAILED(hr)) { std::cout << “[D3D12-SCREENSHOT] […]