aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2019-09-01 15:49:04 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2019-09-01 15:49:04 +0200
commit9609ac7d1f7366df85d6f4b54674feff38c72ff2 (patch)
tree0e3e91b006286653e44a6c1b0b2c5e3cb6ef4523
parent657e14d613c1134407cdc402edec46f7c81c689e (diff)
default render pass loadOp as CTOR param
-rw-r--r--CVKL/src/base/RenderPass.cs6
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);