initial refresh backend selection API support
parent
3ffdf8a929
commit
0034b24eff
|
@ -1 +1 @@
|
|||
Subproject commit 356f8e9ec2a6118b75e32d2a2ed7dbf4297aba78
|
||||
Subproject commit eaed76f4dcc60022b3f10997fb34eb8ead9ae7d7
|
|
@ -79,6 +79,7 @@ namespace MoonWorks
|
|||
|
||||
GraphicsDevice = new GraphicsDevice(
|
||||
Window.Handle,
|
||||
Backend.Vulkan,
|
||||
moonWorksToRefreshPresentMode[presentMode],
|
||||
debugMode
|
||||
);
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace MoonWorks.Graphics
|
|||
public class GraphicsDevice : IDisposable
|
||||
{
|
||||
public IntPtr Handle { get; }
|
||||
public Backend Backend { get; }
|
||||
|
||||
// Built-in video pipeline
|
||||
private ShaderModule VideoVertexShader { get; }
|
||||
|
@ -20,10 +21,13 @@ namespace MoonWorks.Graphics
|
|||
|
||||
public GraphicsDevice(
|
||||
IntPtr deviceWindowHandle,
|
||||
Backend preferredBackend,
|
||||
Refresh.PresentMode presentMode,
|
||||
bool debugMode
|
||||
)
|
||||
{
|
||||
Backend = (Backend) Refresh.Refresh_SelectBackend((Refresh.Backend) preferredBackend, out uint flags);
|
||||
|
||||
var presentationParameters = new Refresh.PresentationParameters
|
||||
{
|
||||
deviceWindowHandle = deviceWindowHandle,
|
||||
|
|
|
@ -280,4 +280,12 @@ namespace MoonWorks.Graphics
|
|||
FloatOpaqueWhite,
|
||||
IntOpaqueWhite
|
||||
}
|
||||
|
||||
public enum Backend
|
||||
{
|
||||
DontCare,
|
||||
Vulkan,
|
||||
PS5,
|
||||
Invalid
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue