diff --git a/include/ppx/grfx/grfx_pipeline.h b/include/ppx/grfx/grfx_pipeline.h index 2136af86e..71963b44a 100644 --- a/include/ppx/grfx/grfx_pipeline.h +++ b/include/ppx/grfx/grfx_pipeline.h @@ -128,8 +128,9 @@ struct BlendAttachmentState grfx::ColorComponentFlags colorWriteMask = grfx::ColorComponentFlags::RGBA(); // These are best guesses based on random formulas off of the internet. - // Correct later when authorative literature is found. + // Correct later when authoritative literature is found. // + static grfx::BlendAttachmentState BlendModeNone(); static grfx::BlendAttachmentState BlendModeAdditive(); static grfx::BlendAttachmentState BlendModeAlpha(); static grfx::BlendAttachmentState BlendModeOver(); diff --git a/src/ppx/grfx/grfx_pipeline.cpp b/src/ppx/grfx/grfx_pipeline.cpp index 322bb8a73..70e358483 100644 --- a/src/ppx/grfx/grfx_pipeline.cpp +++ b/src/ppx/grfx/grfx_pipeline.cpp @@ -24,6 +24,14 @@ namespace grfx { // ------------------------------------------------------------------------------------------------- // BlendAttachmentState // ------------------------------------------------------------------------------------------------- +grfx::BlendAttachmentState BlendAttachmentState::BlendModeNone() +{ + grfx::BlendAttachmentState state = {}; + state.colorWriteMask = grfx::ColorComponentFlags::RGBA(); + + return state; +} + grfx::BlendAttachmentState BlendAttachmentState::BlendModeAdditive() { grfx::BlendAttachmentState state = {}; @@ -171,7 +179,7 @@ void FillOutGraphicsPipelineCreateInfo( for (uint32_t i = 0; i < pDstCreateInfo->colorBlendState.blendAttachmentCount; ++i) { switch (pSrcCreateInfo->blendModes[i]) { case grfx::BLEND_MODE_NONE: { - pDstCreateInfo->colorBlendState.blendAttachments[i].colorWriteMask = grfx::ColorComponentFlags::RGBA(); + pDstCreateInfo->colorBlendState.blendAttachments[i] = grfx::BlendAttachmentState::BlendModeNone(); break; }