attackgoat / screen-13

Screen 13 is an easy-to-use Vulkan rendering engine in the spirit of QBasic.
Apache License 2.0
264 stars 13 forks source link

Add `VK_NULL_HANDLE` vertex buffer binding support #42

Closed attackgoat closed 2 years ago

attackgoat commented 2 years ago

This change enables VK_EXT_robustness2 features so that VK_NULL_HANDLE may be bound to a vertex buffer binding in order to render with just an index buffer. See #41

The first commit of this change adds a draft function for testing, bind_null_vertex_buffer. This function will very likely be replaced with something nicer before merge.

TODO:

attackgoat commented 2 years ago

Although this is entirely possible to do, I don't know of any applicable use-case for drawing from a null buffer. Closing until there is a reason to do this.

Drawing with no buffer specified (such as quads driven by gl_VertexIndex) is possible - see examples/multipass.rs.