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,