-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeviceManager.h
More file actions
20 lines (17 loc) · 1.07 KB
/
DeviceManager.h
File metadata and controls
20 lines (17 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
class DeviceManager {
public:
static bool CreateDevice(ComPtr<ID3D12Device>& device, ComPtr<IDXGIFactory4>& factory);
static bool CreateComandQueue(ComPtr<ID3D12Device>& device, ComPtr<ID3D12CommandQueue>& command_queue,
ComPtr<ID3D12CommandAllocator>& command_allocator,
ComPtr<ID3D12GraphicsCommandList>& command_list, ComPtr<ID3D12Fence>& fence,
HANDLE& fence_event, UINT64& fence_value);
static bool CreateSwapChain(HWND& hwnd, ComPtr<IDXGIFactory4>& factory, ComPtr<ID3D12CommandQueue>& command_queue,
UINT width, UINT height, ComPtr<IDXGISwapChain3>& swap_chain, UINT& frame_index);
static bool CreateRenderTargets(ComPtr<ID3D12Device>& device, ComPtr<IDXGISwapChain3>& swap_chain,
ComPtr<ID3D12Resource> render_targets[DXGE_FRAME_COUNT],
ComPtr<ID3D12DescriptorHeap>& rtv_heap, UINT& rtv_descriptor_size);
private:
DeviceManager() {};
~DeviceManager() {};
};