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
commit706d7000db3c780eeed538799b5a47be28c5263a (patch)
tree0e064f29a9df0673fd050cc31e361635f7126442
parent4a81ece67726666bd68698672d64247e0b1e3477 (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);