+ // Default behaviour for color attachments is to CLEAR and STORE
+ mClearValues.clear();
+ mClearValues.emplace_back();
+
+ // Assume single color attachment
+ Graphics::AttachmentDescription desc{};
+ desc.SetLoadOp(Graphics::AttachmentLoadOp::CLEAR);
+ desc.SetStoreOp(Graphics::AttachmentStoreOp::STORE);
+ attachmentDescriptions.push_back(desc);
+
+ if(depthBufferAvailable == Integration::DepthBufferAvailable::TRUE ||
+ stencilBufferAvailable == Integration::StencilBufferAvailable::TRUE)
+ {
+ // Depth
+ desc.SetLoadOp(Graphics::AttachmentLoadOp::CLEAR);
+ desc.SetStoreOp(Graphics::AttachmentStoreOp::STORE);
+
+ // Stencil
+ desc.SetStencilLoadOp(Graphics::AttachmentLoadOp::CLEAR);
+ desc.SetStencilStoreOp(Graphics::AttachmentStoreOp::STORE);
+ attachmentDescriptions.push_back(desc);
+
+ mClearValues.emplace_back();
+ mClearValues.back().depthStencil.depth = 0;
+ mClearValues.back().depthStencil.stencil = 0;
+ }
+
+ Graphics::RenderPassCreateInfo rpInfo{};
+ rpInfo.SetAttachments(attachmentDescriptions);
+
+ // Add default render pass (loadOp = clear)
+ mRenderPass = graphicsController.CreateRenderPass(rpInfo, nullptr); // Warning: Shallow ptr
+
+ desc.SetLoadOp(Graphics::AttachmentLoadOp::LOAD);
+ attachmentDescriptions[0] = desc;
+ if(attachmentDescriptions.size() > 1)
+ {
+ desc.SetLoadOp(Graphics::AttachmentLoadOp::LOAD);
+ desc.SetStencilLoadOp(Graphics::AttachmentLoadOp::LOAD);
+ attachmentDescriptions.back() = desc;
+ }
+
+ mRenderPassNoClear = graphicsController.CreateRenderPass(rpInfo, nullptr); // Warning: Shallow ptr