How it works...

Through an input assembly state, we define what types of polygons are formed from the drawn vertices. The most commonly used primitives are triangle strips or lists, but the used topology depends on the results we want to achieve.

An input assembly state is required for the graphics pipeline creation.

When selecting how vertices are assembled, we just need to bear in mind some requirements:

  • We can't use list primitives with a primitive restart option.
  • Primitives with adjacency can only be used with geometry shaders. For this to work correctly, a geometryShader feature must be enabled during the logical device creation.
  • When ...

Get Vulkan Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.