mirror of
https://github.com/rrika/cdcEngineDXHR.git
synced 2024-11-27 15:30:27 +00:00
small improvement in PCDX11RenderTexture::ensureRenderTargetView
This commit is contained in:
parent
b09ba863cc
commit
cc0a1533ee
@ -98,8 +98,13 @@ void PCDX11RenderTexture::ensureRenderTargetView() {
|
||||
auto *device = deviceManager->getD3DDevice();
|
||||
if (!view) {
|
||||
if (isDepthBuffer == false) {
|
||||
D3D11_RENDER_TARGET_VIEW_DESC desc = {};
|
||||
desc.Format = (DXGI_FORMAT)textureFormat;
|
||||
desc.ViewDimension = sampleCount > 1
|
||||
? D3D11_RTV_DIMENSION_TEXTURE2DMS
|
||||
: D3D11_RTV_DIMENSION_TEXTURE2D;
|
||||
ID3D11RenderTargetView* frameBufferView;
|
||||
device->CreateRenderTargetView(resource, /*TODO*/ nullptr, &frameBufferView);
|
||||
device->CreateRenderTargetView(resource, &desc, &frameBufferView);
|
||||
view = frameBufferView;
|
||||
} else {
|
||||
D3D11_DEPTH_STENCIL_VIEW_DESC desc = {};
|
||||
|
Loading…
Reference in New Issue
Block a user