aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Viewport.cs
blob: 94012c003083efdb8707f32a98bb73ea2b6700df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace Ryujinx.Graphics.GAL
{
    public readonly struct Viewport
    {
        public Rectangle<float> Region { get; }

        public ViewportSwizzle SwizzleX { get; }
        public ViewportSwizzle SwizzleY { get; }
        public ViewportSwizzle SwizzleZ { get; }
        public ViewportSwizzle SwizzleW { get; }

        public float DepthNear { get; }
        public float DepthFar  { get; }

        public Viewport(
            Rectangle<float> region,
            ViewportSwizzle  swizzleX,
            ViewportSwizzle  swizzleY,
            ViewportSwizzle  swizzleZ,
            ViewportSwizzle  swizzleW,
            float            depthNear,
            float            depthFar)
        {
            Region    = region;
            SwizzleX  = swizzleX;
            SwizzleY  = swizzleY;
            SwizzleZ  = swizzleZ;
            SwizzleW  = swizzleW;
            DepthNear = depthNear;
            DepthFar  = depthFar;
        }
    }
}