Hello Guest

Why does VkSubpassDescription have a setter for the colorAttachmentCount?

  • 1 Replies
  • 646 Views
Isn't that kind of thing already handled by ColorAttachment.Buffer?

*

Online spasi

  • *****
  • 1990
    • WebHotelier
When there are multiple buffer members that are sized by the same count/length member, then that member has an explicit setter. In the case of VkSubpassDescription, both pColorAttachments and pResolveAttachments are sized by colorAttachmentCount.

One could argue that you may set pColorAttachments without setting pResolveAttachments. You also cannot set pResolveAttachments without setting pColorAttachments. Both are optional, but pResolveAttachments is "more" optional. Additional logic for this scenario could be added to the LWJGL code generator, but I didn't think it was important enough. There are currently only two such cases in structs: vkSubpassDescription::pColorAttachments and AIMesh::mVertices.