diff --git a/src/main.cpp b/src/main.cpp
index 049acec..23fc8b6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -70,6 +70,7 @@ private:
     vk::Format m_swapChainImageFormat{};
     vk::Extent2D m_swapChainExtent{};
     std::vector<vk::raii::ImageView> m_swapChainImageViews;
+    vk::raii::RenderPass m_renderPass{ nullptr };
     /////////////////////////////////////////////////////////////
 
     /////////////////////////////////////////////////////////////
@@ -91,6 +92,7 @@ private:
         createLogicalDevice();
         createSwapChain();
         createImageViews();
+        createRenderPass();
     }
 
     void mainLoop() {
@@ -378,6 +380,35 @@ private:
         }
     }
     /////////////////////////////////////////////////////////////
+
+    /////////////////////////////////////////////////////////////
+    /// render pass and framebuffer
+    void createRenderPass() {
+        vk::AttachmentDescription colorAttachment;
+        colorAttachment.format = m_swapChainImageFormat;
+        colorAttachment.samples = vk::SampleCountFlagBits::e1;
+        colorAttachment.loadOp = vk::AttachmentLoadOp::eClear;
+        colorAttachment.storeOp = vk::AttachmentStoreOp::eStore;
+        colorAttachment.stencilLoadOp = vk::AttachmentLoadOp::eDontCare;
+        colorAttachment.stencilStoreOp = vk::AttachmentStoreOp::eDontCare;
+        colorAttachment.initialLayout = vk::ImageLayout::eUndefined;
+        colorAttachment.finalLayout = vk::ImageLayout::ePresentSrcKHR;
+
+        vk::AttachmentReference colorAttachmentRef;
+        colorAttachmentRef.attachment = 0;
+        colorAttachmentRef.layout = vk::ImageLayout::eColorAttachmentOptimal;
+
+        vk::SubpassDescription subpass;
+        subpass.pipelineBindPoint = vk::PipelineBindPoint::eGraphics;
+        subpass.setColorAttachments( colorAttachmentRef );
+
+        vk::RenderPassCreateInfo renderPassInfo;
+        renderPassInfo.setAttachments( colorAttachment );
+        renderPassInfo.setSubpasses( subpass );
+
+        m_renderPass = m_device.createRenderPass(renderPassInfo);
+    }
+    /////////////////////////////////////////////////////////////
 };
 
 int main() {
