Skip to content
Snippets Groups Projects
Commit 95e88bb6 authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[18]remove test renderpass creation and remove depth buffer from triangle renderpass

parent b4ea70f5
No related branches found
No related tags found
4 merge requests!12Resolve "Swapchain Class",!7Resolve "Shader Program Class",!5Resolve "Pipeline State Object",!4Resolve "Renderpass Class"
...@@ -40,36 +40,22 @@ int main(int argc, const char** argv) { ...@@ -40,36 +40,22 @@ int main(int argc, const char** argv) {
} }
// an example attachment for passes that output to the window // an example attachment for passes that output to the window
vkcv::AttachmentDescription present_color_attachment(vkcv::AttachmentLayout::UNDEFINED, const vkcv::AttachmentDescription present_color_attachment(
vkcv::AttachmentLayout::COLOR_ATTACHMENT, vkcv::AttachmentLayout::UNDEFINED,
vkcv::AttachmentLayout::PRESENTATION, vkcv::AttachmentLayout::COLOR_ATTACHMENT,
vkcv::AttachmentOperation::STORE, vkcv::AttachmentLayout::PRESENTATION,
vkcv::AttachmentOperation::CLEAR); vkcv::AttachmentOperation::STORE,
// an example attachment for passes that output to a depth buffer vkcv::AttachmentOperation::CLEAR);
vkcv::AttachmentDescription present_depth_attachment(vkcv::AttachmentLayout::UNDEFINED,
vkcv::AttachmentLayout::DEPTH_STENCIL_ATTACHMENT,
vkcv::AttachmentLayout::DEPTH_STENCIL_READ_ONLY,
vkcv::AttachmentOperation::STORE,
vkcv::AttachmentOperation::CLEAR);
// this pass will output to the window, and produce a depth buffer vkcv::Renderpass trianglePassDefinition;
vkcv::Renderpass test_pass{}; trianglePassDefinition.attachments.push_back(present_color_attachment);
test_pass.attachments.push_back(present_color_attachment); vkcv::RenderpassHandle trianglePass;
test_pass.attachments.push_back(present_depth_attachment);
std::vector<vkcv::RenderpassHandle> test_handles{}; if (!core.createRenderpass(trianglePassDefinition, trianglePass))
// render pass creation test {
for(uint32_t i = 0; i < 1000; i++) std::cout << "Error. Could not create renderpass. Exiting." << std::endl;
{ return EXIT_FAILURE;
vkcv::RenderpassHandle tmp_handle{}; }
if(!core.createRenderpass(test_pass, tmp_handle))
{
std::cout << "Oops. Something went wrong in the renderpass creation. Exiting." << std::endl;
return EXIT_FAILURE;
}
test_handles.push_back(tmp_handle);
}
std::cout << "Wow. You just made 1000 render passes. (That are all identical, though...)" << std::endl;
/* /*
* BufferHandle triangleVertices = core.createBuffer(vertices); * BufferHandle triangleVertices = core.createBuffer(vertices);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment