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