15 ERROR(
"RenderTargetView",
"init",
"Device is nullptr.");
19 ERROR(
"RenderTargetView",
"init",
"Texture is nullptr.");
22 if (Format == DXGI_FORMAT_UNKNOWN) {
23 ERROR(
"RenderTargetView",
"init",
"Format is DXGI_FORMAT_UNKNOWN.");
28 D3D11_RENDER_TARGET_VIEW_DESC desc;
29 memset(&desc, 0,
sizeof(desc));
31 desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMS;
38 ERROR(
"RenderTargetView",
"init",
39 (
"Failed to create render target view. HRESULT: " + std::to_string(hr)).c_str());
49 D3D11_RTV_DIMENSION ViewDimension,
52 ERROR(
"RenderTargetView",
"init",
"Device is nullptr.");
56 ERROR(
"RenderTargetView",
"init",
"Texture is nullptr.");
59 if (Format == DXGI_FORMAT_UNKNOWN) {
60 ERROR(
"RenderTargetView",
"init",
"Format is DXGI_FORMAT_UNKNOWN.");
65 D3D11_RENDER_TARGET_VIEW_DESC desc;
66 memset(&desc, 0,
sizeof(desc));
68 desc.ViewDimension = ViewDimension;
76 ERROR(
"RenderTargetView",
"init",
77 (
"Failed to create render target view. HRESULT: " + std::to_string(hr)).c_str());
87 unsigned int numViews,
88 const float ClearColor[4]) {
90 ERROR(
"RenderTargetView",
"render",
"DeviceContext is nullptr.");
94 ERROR(
"RenderTargetView",
"render",
"RenderTargetView is nullptr.");
110 ERROR(
"RenderTargetView",
"render",
"DeviceContext is nullptr.");
114 ERROR(
"RenderTargetView",
"render",
"RenderTargetView is nullptr.");
Declara la API de DepthStencilView dentro del subsistema Core.
Declara la API de DeviceContext dentro del subsistema Core.
Declara la API de Device dentro del subsistema Core.
#define ERROR(classObj, method, errorMSG)
Declara la API de RenderTargetView dentro del subsistema Core.
Declara la API de Texture dentro del subsistema Core.
Encapsula un ID3D11DepthStencilView para usar un recurso de profundidad/esténcil en el pipeline.
ID3D11DepthStencilView * m_depthStencilView
Vista de profundidad/esténcil de Direct3D 11.
ID3D11DeviceContext * m_deviceContext
Puntero al contexto inmediato de Direct3D 11.
Encapsula un ID3D11Device y facilita la creación de recursos gráficos en Direct3D 11.
ID3D11Device * m_device
Puntero al dispositivo Direct3D 11.
void destroy()
Libera el recurso ID3D11RenderTargetView.
HRESULT init(Device &device, Texture &backBuffer, DXGI_FORMAT Format)
Inicializa el Render Target View desde el back buffer.
ID3D11RenderTargetView * m_renderTargetView
Recurso COM de Direct3D 11 para la vista de Render Target.
void render(DeviceContext &deviceContext, DepthStencilView &depthStencilView, unsigned int numViews, const float ClearColor[4])
Limpia y asigna el RTV junto con un Depth Stencil View.
Encapsula una textura 2D en Direct3D 11, incluyendo su recurso y vista como Shader Resource.
ID3D11Texture2D * m_texture
Recurso base de la textura en GPU.