Files
Hogwarts_Legacy/Jusin154_Team3D/Engine/Public/RenderTarget.h
T
GiJungSUk b960de9171 11_14 , 14:01
라이트
랜더타겟 디버거
쉐이더 리프레쉬
2025-11-14 14:01:42 +09:00

50 lines
1.4 KiB
C++

#pragma once
#include "Base.h"
NS_BEGIN(Engine)
class CRenderTarget final : public CBase
{
private:
CRenderTarget(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual ~CRenderTarget() = default;
public:
ID3D11RenderTargetView* Get_RTV() const { return m_pRTV; }
public:
HRESULT Initialize(_uint iSizeX, _uint iSizeY, DXGI_FORMAT ePixelFormat, const _float4& vClearColor);
HRESULT Bind_ShaderResource(class CShader* pShader, const _char* pConstantName);
void Clear();
void Copy_Resource(ID3D11Texture2D* pTexture2D);
#ifdef _DEBUG
public:
_bool Render_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer, _float fX, _float fY, _float fSizeX, _float fSizeY);
void Ready_Debug();
void Describe_Entity(const _char* pName);
#endif
private:
ID3D11Device* m_pDevice = { nullptr };
ID3D11DeviceContext* m_pContext = { nullptr };
private:
ID3D11Texture2D* m_pTexture2D = { nullptr };
ID3D11RenderTargetView* m_pRTV = { nullptr };
ID3D11ShaderResourceView* m_pSRV = { nullptr };
_float4 m_vClearColor = {};
#ifdef _DEBUG
private:
_float4x4 m_WorldMatrix = {};
_point m_ptWindowSize = {};
_bool m_isDraw = { false };
#endif
public:
static CRenderTarget* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, _uint iSizeX, _uint iSizeY, DXGI_FORMAT ePixelFormat, const _float4& vClearColor);
virtual void Free() override;
};
NS_END