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