14 ERROR(
"DepthStencilView",
"init",
"Device is null.");
17 ERROR(
"DepthStencilView",
"init",
"Texture is null.");
22 D3D11_DEPTH_STENCIL_VIEW_DESC descDSV;
23 memset(&descDSV, 0,
sizeof(descDSV));
24 descDSV.Format = format;
25 descDSV.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMS;
26 descDSV.Texture2D.MipSlice = 0;
34 ERROR(
"DepthStencilView",
"init",
35 (
"Failed to create depth stencil view. HRESULT: " + std::to_string(hr)).c_str());
46 D3D11_DSV_DIMENSION viewDimension) {
48 ERROR(
"DepthStencilView",
"init",
"Device is null.");
52 ERROR(
"DepthStencilView",
"init",
"Texture is null.");
56 D3D11_DEPTH_STENCIL_VIEW_DESC descDSV{};
57 descDSV.Format = format;
58 descDSV.ViewDimension = viewDimension;
60 if (viewDimension == D3D11_DSV_DIMENSION_TEXTURE2D) {
61 descDSV.Texture2D.MipSlice = 0;
64 HRESULT hr = device.
m_device->CreateDepthStencilView(
71 ERROR(
"DepthStencilView",
"init",
72 (
"Failed to create depth stencil view. HRESULT: " + std::to_string(hr)).c_str());
Declara la API de DeviceContext dentro del subsistema Core.
Declara la API de Texture dentro del subsistema Core.
ID3D11DeviceContext * m_deviceContext
Puntero al contexto inmediato de Direct3D 11.
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.