Silk.NET icon indicating copy to clipboard operation
Silk.NET copied to clipboard

[DX11] ID3D11DeviceContext->RSSetScissorRects() Incorrect mapping

Open Syncaidius opened this issue 3 years ago • 0 comments

ID3D11DeviceContext::RSSetScissorRects() expects rectangles to be structured as left, top, right, bottom integers, but SILK.NET expects Silk.NET.Maths.Rectangle<int> to be passed in, which has a structure of left, top, width, height via two vector fields Origin and Size.

The workaround for now is to set the Size to be the right and bottom position values, or to cast the correct data to Rectangle<int>* to allow it to be passed in to the above method.

This could be fixed by changing the method to accept D3D11_RECT, which I believe is currently mapped as Silk.NET.Direct3D11.CD3D11Rect.

Syncaidius avatar Jun 06 '22 06:06 Syncaidius