diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-09-01 15:49:04 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-09-01 15:49:04 +0200 |
| commit | 9609ac7d1f7366df85d6f4b54674feff38c72ff2 (patch) | |
| tree | 0e3e91b006286653e44a6c1b0b2c5e3cb6ef4523 | |
| parent | 657e14d613c1134407cdc402edec46f7c81c689e (diff) | |
default render pass loadOp as CTOR param
| -rw-r--r-- | CVKL/src/base/RenderPass.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CVKL/src/base/RenderPass.cs b/CVKL/src/base/RenderPass.cs index 773c436..1609f56 100644 --- a/CVKL/src/base/RenderPass.cs +++ b/CVKL/src/base/RenderPass.cs @@ -52,13 +52,13 @@ namespace CVKL { /// <summary> /// Create renderpass with a single color attachment and a resolve one if needed /// </summary> - public RenderPass (Device device, VkFormat colorFormat, VkSampleCountFlags samples = VkSampleCountFlags.SampleCount1) + public RenderPass (Device device, VkFormat colorFormat, VkSampleCountFlags samples = VkSampleCountFlags.SampleCount1, VkAttachmentLoadOp loadOp = VkAttachmentLoadOp.Clear) : this (device) { Samples = samples; AddAttachment (colorFormat, (samples == VkSampleCountFlags.SampleCount1) ? VkImageLayout.PresentSrcKHR : VkImageLayout.ColorAttachmentOptimal, samples, - VkAttachmentLoadOp.Clear, VkAttachmentStoreOp.Store, VkImageLayout.ColorAttachmentOptimal); - ClearValues.Add (new VkClearValue { color = new VkClearColorValue (0.0f, 0.0f, 0.2f) }); + loadOp, VkAttachmentStoreOp.Store, VkImageLayout.Undefined); + ClearValues.Add (new VkClearValue { color = new VkClearColorValue (0.0f, 0.0f, 0.0f) }); SubPass subpass0 = new SubPass (); subpass0.AddColorReference (0, VkImageLayout.ColorAttachmentOptimal); |