2021-06-02 09:07:45 +04:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Base.h"
|
2021-06-19 15:12:42 +04:30
|
|
|
#include "Graphics/SharedContext.h"
|
2021-06-02 09:07:45 +04:30
|
|
|
|
|
|
|
#include <d3d11.h>
|
|
|
|
#include <wrl.h>
|
|
|
|
|
|
|
|
namespace Light {
|
|
|
|
|
2021-06-19 15:12:42 +04:30
|
|
|
// #todo:
|
|
|
|
class dxSharedContext : public SharedContext
|
2021-06-02 09:07:45 +04:30
|
|
|
{
|
2021-07-01 19:25:46 +04:30
|
|
|
private:
|
2021-07-22 13:00:41 +04:30
|
|
|
Microsoft::WRL::ComPtr<ID3D11Device > m_Device = nullptr;
|
|
|
|
Microsoft::WRL::ComPtr<ID3D11DeviceContext > m_DeviceContext = nullptr;
|
|
|
|
Microsoft::WRL::ComPtr<IDXGISwapChain > m_SwapChain = nullptr;
|
|
|
|
Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_RenderTargetView = nullptr;
|
2021-07-01 19:25:46 +04:30
|
|
|
|
2021-06-19 15:12:42 +04:30
|
|
|
public:
|
2021-07-01 19:25:46 +04:30
|
|
|
inline Microsoft::WRL::ComPtr<ID3D11Device > GetDevice () { return m_Device; }
|
|
|
|
inline Microsoft::WRL::ComPtr<ID3D11DeviceContext > GetDeviceContext () { return m_DeviceContext; }
|
|
|
|
inline Microsoft::WRL::ComPtr<IDXGISwapChain > GetSwapChain () { return m_SwapChain; }
|
|
|
|
inline Microsoft::WRL::ComPtr<ID3D11RenderTargetView> GetRenderTargetView() { return m_RenderTargetView; }
|
2021-07-22 13:00:41 +04:30
|
|
|
|
|
|
|
inline Microsoft::WRL::ComPtr<ID3D11Device >& GetDeviceRef () { return m_Device; }
|
|
|
|
inline Microsoft::WRL::ComPtr<ID3D11DeviceContext >& GetDeviceContextRef () { return m_DeviceContext; }
|
|
|
|
inline Microsoft::WRL::ComPtr<IDXGISwapChain >& GetSwapChainRef () { return m_SwapChain; }
|
|
|
|
inline Microsoft::WRL::ComPtr<ID3D11RenderTargetView>& GetRenderTargetViewRef() { return m_RenderTargetView; }
|
2021-06-02 09:07:45 +04:30
|
|
|
};
|
|
|
|
|
|
|
|
}
|