From fe2aa7ff92a0ff44c28c7f1e9d70c5023d5b9302 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sun, 3 Jul 2016 17:07:23 +0200 Subject: [PATCH] Add dynamic line width state, enable wide line feature (Fixes #165) --- pipelines/pipelines.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pipelines/pipelines.cpp b/pipelines/pipelines.cpp index 27874738..8f7687f0 100644 --- a/pipelines/pipelines.cpp +++ b/pipelines/pipelines.cpp @@ -64,7 +64,15 @@ public: VkPipeline toon; } pipelines; - VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION) + // Device features to be enabled for this example + static VkPhysicalDeviceFeatures getEnabledFeatures() + { + VkPhysicalDeviceFeatures enabledFeatures = {}; + enabledFeatures.wideLines = VK_TRUE; + return enabledFeatures; + } + + VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION, getEnabledFeatures) { zoom = -10.5f; rotation = glm::vec3(-25.0f, 15.0f, 0.0f); @@ -319,7 +327,8 @@ public: std::vector dynamicStateEnables = { VK_DYNAMIC_STATE_VIEWPORT, - VK_DYNAMIC_STATE_SCISSOR + VK_DYNAMIC_STATE_SCISSOR, + VK_DYNAMIC_STATE_LINE_WIDTH, }; VkPipelineDynamicStateCreateInfo dynamicState = vkTools::initializers::pipelineDynamicStateCreateInfo(