#pragma once #include "Base/Base.h" #include "Graphics/SharedContext.h" #include #include namespace Light { class dxSharedContext : public SharedContext { private: Microsoft::WRL::ComPtr m_Device = nullptr; Microsoft::WRL::ComPtr m_DeviceContext = nullptr; Microsoft::WRL::ComPtr m_SwapChain = nullptr; Microsoft::WRL::ComPtr m_RenderTargetView = nullptr; public: inline Microsoft::WRL::ComPtr GetDevice () { return m_Device; } inline Microsoft::WRL::ComPtr GetDeviceContext () { return m_DeviceContext; } inline Microsoft::WRL::ComPtr GetSwapChain () { return m_SwapChain; } inline Microsoft::WRL::ComPtr GetRenderTargetView() { return m_RenderTargetView; } inline Microsoft::WRL::ComPtr& GetDeviceRef () { return m_Device; } inline Microsoft::WRL::ComPtr& GetDeviceContextRef () { return m_DeviceContext; } inline Microsoft::WRL::ComPtr& GetSwapChainRef () { return m_SwapChain; } inline Microsoft::WRL::ComPtr& GetRenderTargetViewRef() { return m_RenderTargetView; } }; }