mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 15:13:34 +00:00
adding possible new feature
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/06 18:21:36 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/10 22:32:27 by kbz_8 ### ########.fr */
|
||||
/* Updated: 2023/12/22 23:05:38 by kbz_8 ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace mlx
|
||||
{
|
||||
static const VkClearValue clearColor = {{{ 0.0f, 0.0f, 0.0f, 1.0f }}}; // wtf, this mess to satisfy a warning
|
||||
|
||||
void RenderPass::init(VkFormat attachement_format)
|
||||
void RenderPass::init(VkFormat attachement_format, VkImageLayout layout)
|
||||
{
|
||||
VkAttachmentDescription colorAttachment{};
|
||||
colorAttachment.format = attachement_format;
|
||||
@@ -30,11 +30,11 @@ namespace mlx
|
||||
colorAttachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
||||
colorAttachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
||||
colorAttachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
colorAttachment.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
|
||||
colorAttachment.finalLayout = layout;
|
||||
|
||||
VkAttachmentReference colorAttachmentRef{};
|
||||
colorAttachmentRef.attachment = 0;
|
||||
colorAttachmentRef.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
colorAttachmentRef.layout = (layout == VK_IMAGE_LAYOUT_PRESENT_SRC_KHR ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : layout);
|
||||
|
||||
VkSubpassDescription subpass{};
|
||||
subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/06 18:22:00 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/08 19:11:14 by kbz_8 ### ########.fr */
|
||||
/* Updated: 2023/12/22 23:00:00 by kbz_8 ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace mlx
|
||||
class RenderPass
|
||||
{
|
||||
public:
|
||||
void init(VkFormat attachement_format);
|
||||
void init(VkFormat attachement_format, VkImageLayout layout);
|
||||
void destroy() noexcept;
|
||||
|
||||
void begin(class CmdBuffer& cmd, class FrameBuffer& fb);
|
||||
|
||||
Reference in New Issue
Block a user