swapchain API revision

pull/2/head
cosmonaut 2022-09-29 13:55:02 -07:00
parent eaed76f4dc
commit 7c31601ab4
1 changed files with 26 additions and 14 deletions

View File

@ -371,13 +371,6 @@ namespace RefreshCS
public uint level; public uint level;
} }
[StructLayout(LayoutKind.Sequential)]
public struct PresentationParameters
{
public IntPtr deviceWindowHandle;
public PresentMode presentMode;
}
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct SamplerStateCreateInfo public struct SamplerStateCreateInfo
{ {
@ -601,7 +594,6 @@ namespace RefreshCS
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_CreateDevice( public static extern IntPtr Refresh_CreateDevice(
in PresentationParameters presentationParameters,
byte debugMode byte debugMode
); );
@ -954,6 +946,32 @@ namespace RefreshCS
/* Submission/Presentation */ /* Submission/Presentation */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern byte Refresh_ClaimWindow(
IntPtr device,
IntPtr windowHandle,
PresentMode presentMode
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_UnclaimWindow(
IntPtr device,
IntPtr windowHandle
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_SetSwapchainPresentMode(
IntPtr device,
IntPtr windowHandle,
PresentMode presentMode
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern TextureFormat Refresh_GetSwapchainFormat(
IntPtr device,
IntPtr windowHandle
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_AcquireCommandBuffer( public static extern IntPtr Refresh_AcquireCommandBuffer(
IntPtr device, IntPtr device,
@ -969,12 +987,6 @@ namespace RefreshCS
out uint height out uint height
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern TextureFormat Refresh_GetSwapchainFormat(
IntPtr device,
IntPtr windowHandle
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Submit( public static extern void Refresh_Submit(
IntPtr device, IntPtr device,