HatchitGraphics
ht_d3d12constantbuffer.h
1 
15 #pragma once
16 
17 #include <ht_platform.h>
18 #include <ht_directx.h>
19 
20 
21 namespace Hatchit {
22 
23  namespace Graphics {
24 
25  namespace DX
26  {
27  class HT_API D3D12ConstantBuffer
28  {
29  public:
31 
33 
34  bool Initialize(ID3D12Device* device,
35  ID3D12DescriptorHeap* heap,
36  uint64_t size);
37 
38  void Map(uint32_t subresource, uint64_t size);
39  void Fill(void** data, size_t size, size_t cbSize, uint32_t currentFrame);
40  void Unmap(uint32_t subresource);
41 
42  const D3D12_GPU_VIRTUAL_ADDRESS& GetGPUAddress();
43 
44  public:
45  UINT8* m_mappedData;
46  D3D12_CONSTANT_BUFFER_VIEW_DESC m_view;
47  D3D12_GPU_VIRTUAL_ADDRESS m_gpuAddress;
48  ID3D12Resource* m_buffer;
49  };
50  }
51  }
52 }
Definition: ht_d3d12constantbuffer.h:27
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_color.h:19