From e6bcadf905fdcf26737e38b9ab65129c9976960e Mon Sep 17 00:00:00 2001 From: ollie Date: Mon, 15 Jul 2024 17:08:06 +0100 Subject: [PATCH] fix scissor rect --- src/grabs.Graphics.D3D11/D3D11CommandList.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grabs.Graphics.D3D11/D3D11CommandList.cs b/src/grabs.Graphics.D3D11/D3D11CommandList.cs index 33cef5a..9dee884 100644 --- a/src/grabs.Graphics.D3D11/D3D11CommandList.cs +++ b/src/grabs.Graphics.D3D11/D3D11CommandList.cs @@ -115,7 +115,7 @@ public override void SetViewport(in Viewport viewport) public override void SetScissor(in Rectangle rectangle) { - RECT rect = new RECT(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); + RECT rect = new RECT(rectangle.X, rectangle.Y, rectangle.X + rectangle.Width, rectangle.Y + rectangle.Height); Context->RSSetScissorRects(1, &rect); }