Skip to content

Commit

Permalink
Add a new GraphicsDeviceOptions ctor accepting a ResourceBindingModel.
Browse files Browse the repository at this point in the history
  • Loading branch information
mellinoe committed Apr 10, 2018
1 parent 2544067 commit 452cf45
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Veldrid/GraphicsDeviceOptions.cs
Expand Up @@ -60,5 +60,28 @@ public GraphicsDeviceOptions(bool debug, PixelFormat? swapchainDepthFormat, bool
SyncToVerticalBlank = syncToVerticalBlank;
ResourceBindingModel = ResourceBindingModel.Default;
}

/// <summary>
/// Constructs a new GraphicsDeviceOptions for a device with a main Swapchain.
/// </summary>
/// <param name="debug">Indicates whether the GraphicsDevice will enable debug features, provided they are supported by
/// the host system.</param>
/// <param name="swapchainDepthFormat">An optional <see cref="PixelFormat"/> to be used for the depth buffer of the
/// swapchain. If this value is null, then no depth buffer will be present on the swapchain.</param>
/// <param name="syncToVerticalBlank">Indicates whether the main Swapchain will be synchronized to the window system's
/// vertical refresh rate.</param>
/// <param name="resourceBindingModel">Specifies which model the rendering backend should use for binding resources.</param>
public GraphicsDeviceOptions(
bool debug,
PixelFormat? swapchainDepthFormat,
bool syncToVerticalBlank,
ResourceBindingModel resourceBindingModel)
{
Debug = debug;
HasMainSwapchain = true;
SwapchainDepthFormat = swapchainDepthFormat;
SyncToVerticalBlank = syncToVerticalBlank;
ResourceBindingModel = resourceBindingModel;
}
}
}

0 comments on commit 452cf45

Please sign in to comment.