From f8ab4fd34a061e466239d3597aa7711d5afc3198 Mon Sep 17 00:00:00 2001 From: Tobias Frisch <tfrisch@uni-koblenz.de> Date: Sat, 17 Sep 2022 20:07:20 +0200 Subject: [PATCH] Reducing the code of the first_triangle example further Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de> --- projects/first_triangle/src/main.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/projects/first_triangle/src/main.cpp b/projects/first_triangle/src/main.cpp index b97136bd..7d985e21 100644 --- a/projects/first_triangle/src/main.cpp +++ b/projects/first_triangle/src/main.cpp @@ -15,18 +15,12 @@ int main(int argc, const char** argv) { vkcv::Core core = vkcv::Core::create( applicationName, VK_MAKE_VERSION(0, 0, 1), - { vk::QueueFlagBits::eTransfer,vk::QueueFlagBits::eGraphics, vk::QueueFlagBits::eCompute }, + { vk::QueueFlagBits::eGraphics }, { VK_KHR_SWAPCHAIN_EXTENSION_NAME } ); vkcv::WindowHandle windowHandle = core.createWindow(applicationName, windowWidth, windowHeight, true); vkcv::Window& window = core.getWindow(windowHandle); - - auto triangleIndexBuffer = vkcv::buffer<uint16_t>(core, vkcv::BufferType::INDEX, 3); - uint16_t indices[3] = { 0, 1, 2 }; - triangleIndexBuffer.fill(&indices[0], sizeof(indices)); - - core.setDebugLabel(triangleIndexBuffer.getHandle(), "Triangle Index Buffer"); vkcv::PassHandle trianglePass = vkcv::passSwapchain( core, @@ -66,7 +60,6 @@ int main(int argc, const char** argv) { core.setDebugLabel(trianglePipeline, "Triangle Pipeline"); vkcv::VertexData vertexData; - vertexData.setIndexBuffer(triangleIndexBuffer.getHandle()); vertexData.setCount(3); vkcv::InstanceDrawcall drawcall (vertexData); -- GitLab