mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
VideoCommon: Add helpers for generating common render states
This commit is contained in:
@ -144,3 +144,37 @@ void BlendingState::Generate(const BPMemory& bp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace RenderState
|
||||
{
|
||||
RasterizationState GetNoCullRasterizationState()
|
||||
{
|
||||
RasterizationState state = {};
|
||||
state.cullmode = GenMode::CULL_NONE;
|
||||
return state;
|
||||
}
|
||||
|
||||
DepthState GetNoDepthTestingDepthStencilState()
|
||||
{
|
||||
DepthState state = {};
|
||||
state.testenable = false;
|
||||
state.updateenable = false;
|
||||
state.func = ZMode::ALWAYS;
|
||||
return state;
|
||||
}
|
||||
|
||||
BlendingState GetNoBlendingBlendState()
|
||||
{
|
||||
BlendingState state = {};
|
||||
state.usedualsrc = false;
|
||||
state.blendenable = false;
|
||||
state.srcfactor = BlendMode::ONE;
|
||||
state.srcfactoralpha = BlendMode::ONE;
|
||||
state.dstfactor = BlendMode::ZERO;
|
||||
state.dstfactoralpha = BlendMode::ZERO;
|
||||
state.logicopenable = false;
|
||||
state.colorupdate = true;
|
||||
state.alphaupdate = true;
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user