diff --git a/MoonWorks.csproj b/MoonWorks.csproj
index a1e1f4e..20fb35d 100644
--- a/MoonWorks.csproj
+++ b/MoonWorks.csproj
@@ -3,7 +3,6 @@
net8.0
true
- 11
diff --git a/lib/RefreshCS b/lib/RefreshCS
index 859675d..55acf6e 160000
--- a/lib/RefreshCS
+++ b/lib/RefreshCS
@@ -1 +1 @@
-Subproject commit 859675dbab86e6eeda662ef9bdb0c688cce4cec3
+Subproject commit 55acf6ee1818b0801cffe7217ee07eb1f56016f6
diff --git a/src/Game.cs b/src/Game.cs
index cf1e133..1876814 100644
--- a/src/Game.cs
+++ b/src/Game.cs
@@ -53,11 +53,10 @@ namespace MoonWorks
public Game(
WindowCreateInfo windowCreateInfo,
FrameLimiterSettings frameLimiterSettings,
- Backend backend = Backend.Vulkan,
+ Span preferredBackends,
int targetTimestep = 60,
bool debugMode = false
- )
- {
+ ) {
Logger.LogInfo("Initializing frame limiter...");
Timestep = TimeSpan.FromTicks(TimeSpan.TicksPerSecond / targetTimestep);
gameTimer = Stopwatch.StartNew();
@@ -83,7 +82,7 @@ namespace MoonWorks
Logger.LogInfo("Initializing graphics device...");
GraphicsDevice = new GraphicsDevice(
- backend,
+ preferredBackends,
debugMode
);
diff --git a/src/Graphics/GraphicsDevice.cs b/src/Graphics/GraphicsDevice.cs
index cbe8d79..86eb6c5 100644
--- a/src/Graphics/GraphicsDevice.cs
+++ b/src/Graphics/GraphicsDevice.cs
@@ -40,11 +40,17 @@ namespace MoonWorks.Graphics
private FencePool FencePool;
private CommandBufferPool CommandBufferPool;
- internal GraphicsDevice(
- Backend preferredBackend,
+ internal unsafe GraphicsDevice(
+ Span preferredBackends,
bool debugMode
) {
- Backend = (Backend) Refresh.Refresh_SelectBackend((Refresh.Backend) preferredBackend, out windowFlags);
+ var backends = stackalloc Refresh.Backend[preferredBackends.Length];
+ for (var i = 0; i < preferredBackends.Length; i += 1)
+ {
+ backends[i] = (Refresh.Backend) preferredBackends[i];
+ }
+
+ Backend = (Backend) Refresh.Refresh_SelectBackend(backends, (uint) preferredBackends.Length, out windowFlags);
if (Backend == Backend.Invalid)
{
diff --git a/src/Graphics/RefreshEnums.cs b/src/Graphics/RefreshEnums.cs
index 2e1b9f8..56de211 100644
--- a/src/Graphics/RefreshEnums.cs
+++ b/src/Graphics/RefreshEnums.cs
@@ -311,7 +311,6 @@ namespace MoonWorks.Graphics
public enum Backend
{
- DontCare,
Vulkan,
D3D11,
PS5,
diff --git a/src/Graphics/StockShaders/Binary/blit.frag.refresh b/src/Graphics/StockShaders/Binary/blit.frag.refresh
index a64dddb..5ca4059 100644
Binary files a/src/Graphics/StockShaders/Binary/blit.frag.refresh and b/src/Graphics/StockShaders/Binary/blit.frag.refresh differ
diff --git a/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh b/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh
index 762caae..750264a 100644
Binary files a/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh and b/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh differ
diff --git a/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh b/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh
index ad0a698..c28ff6c 100644
Binary files a/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh and b/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh differ
diff --git a/src/Graphics/StockShaders/Binary/text_transform.vert.refresh b/src/Graphics/StockShaders/Binary/text_transform.vert.refresh
index fd34e1b..12c3a3e 100644
Binary files a/src/Graphics/StockShaders/Binary/text_transform.vert.refresh and b/src/Graphics/StockShaders/Binary/text_transform.vert.refresh differ
diff --git a/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh b/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh
index 1493276..bde60ba 100644
Binary files a/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh and b/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh differ