aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/SetScissorCommand.cs
blob: 6c95d09695525eab294fe7ea61331766627e48a1 (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
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
    struct SetScissorCommand : IGALCommand
    {
        public CommandType CommandType => CommandType.SetScissor;
        private int _index;
        private bool _enable;
        private int _x;
        private int _y;
        private int _width;
        private int _height;

        public void Set(int index, bool enable, int x, int y, int width, int height)
        {
            _index = index;
            _enable = enable;
            _x = x;
            _y = y;
            _width = width;
            _height = height;
        }

        public static void Run(ref SetScissorCommand command, ThreadedRenderer threaded, IRenderer renderer)
        {
            renderer.Pipeline.SetScissor(command._index, command._enable, command._x, command._y, command._width, command._height);
        }
    }
}