mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-02-21 00:15:33 +00:00
28 lines
902 B
C#
28 lines
902 B
C#
|
using Ryujinx.Graphics.GAL;
|
||
|
using SharpMetal.Metal;
|
||
|
using System.Runtime.Versioning;
|
||
|
|
||
|
namespace Ryujinx.Graphics.Metal
|
||
|
{
|
||
|
[SupportedOSPlatform("macos")]
|
||
|
struct RenderEncoderState
|
||
|
{
|
||
|
public MTLRenderPipelineState RenderPipelineState;
|
||
|
public PrimitiveTopology Topology = PrimitiveTopology.Triangles;
|
||
|
public MTLCullMode CullMode = MTLCullMode.None;
|
||
|
public MTLWinding Winding = MTLWinding.Clockwise;
|
||
|
|
||
|
public RenderEncoderState(MTLRenderPipelineState renderPipelineState)
|
||
|
{
|
||
|
RenderPipelineState = renderPipelineState;
|
||
|
}
|
||
|
|
||
|
public void SetEncoderState(MTLRenderCommandEncoder renderCommandEncoder)
|
||
|
{
|
||
|
renderCommandEncoder.SetRenderPipelineState(RenderPipelineState);
|
||
|
renderCommandEncoder.SetCullMode(CullMode);
|
||
|
renderCommandEncoder.SetFrontFacingWinding(Winding);
|
||
|
}
|
||
|
}
|
||
|
}
|