Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper to RenderTargetState for MSAA #266

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Inc/RenderTargetState.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,22 @@ namespace DirectX
rtvFormats[0] = rtFormat;
}

// MSAA single render target convenience constructor
RenderTargetState(
_In_ DXGI_FORMAT rtFormat,
_In_ DXGI_FORMAT dsFormat,
_In_ uint32_t sampleCount,
_In_ uint32_t quality = 0) noexcept
: sampleMask(UINT_MAX)
, numRenderTargets(1)
, rtvFormats{}
, dsvFormat(dsFormat)
, sampleDesc{ sampleCount, quality }
, nodeMask(0)
{
rtvFormats[0] = rtFormat;
}

// Convenience constructors converting from DXGI_SWAPCHAIN_DESC
#if defined(__dxgi_h__) || defined(__d3d11_x_h__) || defined(__d3d12_x_h__) || defined(__XBOX_D3D12_X__)
RenderTargetState(
Expand Down
Loading