4
\$\begingroup\$

I want to be able to draw single lines inside Vulkan but the only way I have managed to achieve this so far is by drawing a triangle with two of its points that ocupuy the same point in space. Is there a way to draw lines inside Vulkan and also change their width? I know I can change line width when I set the polygon mode in the rasterizer to VK_POLYGON_MODE_LINE and then set the lineWidth option, but I need to be able to do it whilst rendering all other 3D objects with VK_POLYGON_MODE_FILL enabled.

\$\endgroup\$
6
  • \$\begingroup\$ vulkan.lunarg.com/doc/view/1.0.33.0/linux/vkspec.chunked/… \$\endgroup\$
    – Bálint
    Jul 20, 2017 at 21:17
  • \$\begingroup\$ @Bálint Using that, how can I render both a VK_PRIMITIVE_TOPOLOGY_LINE_LIST and a VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST with one pipeline \$\endgroup\$
    – 0xen
    Jul 20, 2017 at 21:26
  • \$\begingroup\$ You need to create multiple pipelines for that. Switching between them is pretty fast. \$\endgroup\$
    – Bálint
    Jul 20, 2017 at 21:30
  • \$\begingroup\$ @Bálint So would it be a matter of. Starting the triangle pipeline, submit the triangle command buffer, Start the line pipeline then submit the line command buffers? \$\endgroup\$
    – 0xen
    Jul 20, 2017 at 21:46
  • \$\begingroup\$ Yeah, pretty much \$\endgroup\$
    – Bálint
    Jul 20, 2017 at 21:55

0

You must log in to answer this question.

Browse other questions tagged .