#pragma once

#include <wrl.h>

struct ID3D12CommandAllocator;
struct ID3D12GraphicsCommandList;
struct ID3D12PipelineState;
struct ID3D12CommandQueue;
struct ID3D12Device;

class DirectXCommandList
{
public:
	void close();

	void create(ID3D12Device* device, ID3D12PipelineState* pso);

	ID3D12GraphicsCommandList* get() const;

	void execute(ID3D12CommandQueue* queue);

	void resetAllocator();

	void reset(ID3D12PipelineState* pso);

private:
	Microsoft::WRL::ComPtr<ID3D12CommandAllocator> mCommandAllocator;
	Microsoft::WRL::ComPtr<ID3D12GraphicsCommandList> mCommandList;
};