#pragma once #include #include "DXBuffer.h" namespace Framework { //! A buffer with data in graphics memory class DX12Buffer : public DXBuffer { protected: D3D12_RESOURCE_DESC* description; ID3D12Resource* buffer; ID3D12Device5* device; public: //! Constructor //! eSize: The length of an element in bytes DLLEXPORT DX12Buffer(int eSize, ID3D12Device5* device, int bindFlags); //! Destructor DLLEXPORT virtual ~DX12Buffer(); //! Copies the data into the buffer if it has changed DLLEXPORT virtual void copyToGPU(__int64 byteCount = -1) override; DLLEXPORT void createBufferWithoutData(D3D12_RESOURCE_STATES states); //! Returns the buffer DLLEXPORT ID3D12Resource* zBuffer() const; }; } // namespace Framework