mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
Renderer: Move cull mode to a rasterization state object
Also moves logic for primitive handling to VideoCommon.
This commit is contained in:
parent
2869c570f1
commit
836b9b9acb
38 changed files with 389 additions and 450 deletions
|
@ -4,6 +4,16 @@
|
|||
|
||||
#include "VideoCommon/RenderState.h"
|
||||
|
||||
void RasterizationState::Generate(const BPMemory& bp, PrimitiveType primitive_type)
|
||||
{
|
||||
cullmode = bp.genMode.cullmode;
|
||||
primitive = primitive_type;
|
||||
|
||||
// Back-face culling should be disabled for points/lines.
|
||||
if (primitive_type != PrimitiveType::Triangles && primitive_type != PrimitiveType::TriangleStrip)
|
||||
cullmode = GenMode::CULL_NONE;
|
||||
}
|
||||
|
||||
void DepthState::Generate(const BPMemory& bp)
|
||||
{
|
||||
testenable = bp.zmode.testenable.Value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue