#pragma once #include "Base/Base.hpp" #include "Graphics/Buffers.hpp" #include #include namespace Light { class dxSharedContext; //========== CONSTANT_BUFFER ==========// class dxConstantBuffer: public ConstantBuffer { private: Ref m_Context; Microsoft::WRL::ComPtr m_Buffer; D3D11_MAPPED_SUBRESOURCE m_Map; unsigned int m_Index; public: dxConstantBuffer(ConstantBufferIndex index, unsigned int size, Ref sharedContext); void Bind() override; void* Map() override; void UnMap() override; }; //========== VERTEX_BUFFER ==========// class dxVertexBuffer: public VertexBuffer { private: Ref m_Context; Microsoft::WRL::ComPtr m_Buffer; D3D11_MAPPED_SUBRESOURCE m_Map; unsigned int m_Stride; public: dxVertexBuffer(float* vertices, unsigned int stride, unsigned int count, Ref sharedContext); ~dxVertexBuffer(); void Bind() override; void UnBind() override; void* Map() override; void UnMap() override; }; //========== INDEX_BUFFER ==========// class dxIndexBuffer: public IndexBuffer { private: Ref m_Context; Microsoft::WRL::ComPtr m_Buffer; public: dxIndexBuffer(unsigned int* indices, unsigned int count, Ref sharedContext); ~dxIndexBuffer(); void Bind() override; void UnBind() override; }; } // namespace Light