You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This improves type safety with explicit nullability in generated code, and makes it easier to use with other C APIs that expect an opaque pointer. For example the instance argument in destroyInstance is not obviously nullable until you read the Vulkan spec, and null is obviously cleaner than .null_handle. This seems like a missed opportunity.
The text was updated successfully, but these errors were encountered:
Indeed, these were not a thing when vulkan-zig was initially made. Seems like a good idea, though there will be a slight incompatibility between dispatchable and non-dispatchable handles. I don't think that is much of a problem, though.
Instead of the following generated code:
we can make use of opaque types:
This improves type safety with explicit nullability in generated code, and makes it easier to use with other C APIs that expect an opaque pointer. For example the instance argument in
destroyInstance
is not obviously nullable until you read the Vulkan spec, andnull
is obviously cleaner than.null_handle
. This seems like a missed opportunity.The text was updated successfully, but these errors were encountered: