mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
VideoCommon: Add helpers for generating common render states
This commit is contained in:
parent
b7a099814a
commit
340aabbb06
8 changed files with 53 additions and 46 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue