From 5fe9dd8587b05ac2b766a0218a33667aed4c113d Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 4 Mar 2022 13:21:00 -0800 Subject: [PATCH] Refresh 1.2.0 --- src/Refresh.cs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/Refresh.cs b/src/Refresh.cs index 96ba986..65f4c22 100644 --- a/src/Refresh.cs +++ b/src/Refresh.cs @@ -480,15 +480,6 @@ namespace RefreshCS public uint imageBindingCount; } - [StructLayout(LayoutKind.Sequential)] - public struct ViewportState - { - public IntPtr viewports; - public uint viewportCount; - public IntPtr scissors; - public uint scissorCount; - } - [StructLayout(LayoutKind.Sequential)] public struct RasterizerState { @@ -548,7 +539,6 @@ namespace RefreshCS public GraphicsShaderInfo fragmentShaderInfo; public VertexInputState vertexInputState; public PrimitiveType primitiveType; - public ViewportState viewportState; public RasterizerState rasterizerState; public MultisampleState multisampleState; public DepthStencilState depthStencilState; @@ -857,6 +847,20 @@ namespace RefreshCS IntPtr graphicsPipeline ); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void Refresh_SetViewport( + IntPtr device, + IntPtr commandBuffer, + in Viewport viewport + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void Refresh_SetScissor( + IntPtr device, + IntPtr commandBuffer, + in Rect scissor + ); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void Refresh_BindVertexBuffers( IntPtr device,