Function setRenderTargetWriteMask

Synopsis

#include <Source/Falcor/Core/API/BlendState.h>

Desc & setRenderTargetWriteMask(uint32_t rtIndex, bool writeRed, bool writeGreen, bool writeBlue, bool writeAlpha)

Description

Set color write-mask

Source

Lines 62-74 in Source/Falcor/Core/API/BlendState.cpp. Line 114 in Source/Falcor/Core/API/BlendState.h.

BlendState::Desc& BlendState::Desc::setRenderTargetWriteMask(uint32_t rtIndex, bool writeRed, bool writeGreen, bool writeBlue, bool writeAlpha)
{
    if(rtIndex >= mRtDesc.size())
    {
        logError("Error when setting blend state RT write-mask. Invalid render-target index " + std::to_string(rtIndex) + ". Must be smaller than " + std::to_string(mRtDesc.size()) + ".");
        return *this;
    }
    mRtDesc[rtIndex].writeMask.writeRed = writeRed;
    mRtDesc[rtIndex].writeMask.writeGreen = writeGreen;
    mRtDesc[rtIndex].writeMask.writeBlue = writeBlue;
    mRtDesc[rtIndex].writeMask.writeAlpha = writeAlpha;
    return *this;
}





Add Discussion as Guest

Log in to DocsForge