mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Renderer: Move cull mode to a rasterization state object
Also moves logic for primitive handling to VideoCommon.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user