HatchitGraphics
ht_d3d12vertexbuffer.h
1 
15 #pragma once
16 
17 #include <ht_platform.h>
18 #include <ht_directx.h>
19 #include <cstdint>
20 
21 namespace Hatchit {
22 
23  namespace Graphics {
24 
25  namespace DX {
26 
27  class HT_API D3D12VertexBuffer
28  {
29  public:
30  D3D12VertexBuffer(uint32_t size);
31 
33 
34  bool Initialize(ID3D12Device* device);
35 
36  bool UpdateSubData(ID3D12GraphicsCommandList* commandList,
37  uint32_t offset,
38  uint32_t count,
39  const void* data);
40 
41  D3D12_VERTEX_BUFFER_VIEW GetView();
42 
43  private:
44  bool m_prepared;
45  ID3D12Resource* m_buffer;
46  ID3D12Resource* m_bufferUploadHeap;
47  D3D12_VERTEX_BUFFER_VIEW m_view;
48  uint32_t m_bufferSize;
49  };
50 
51  }
52  }
53 }
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_color.h:19
Definition: ht_d3d12vertexbuffer.h:27