Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect TypeScript signature for vkCmdBindVertexBuffers #61

Open
Mudbill opened this issue Sep 18, 2022 · 0 comments
Open

Incorrect TypeScript signature for vkCmdBindVertexBuffers #61

Mudbill opened this issue Sep 18, 2022 · 0 comments

Comments

@Mudbill
Copy link

Mudbill commented Sep 18, 2022

The fifth argument claims it should be of type Float32Array but should actually be BigUint64Array.

It says:

vkCmdBindVertexBuffers(commandBuffer: VkCommandBuffer | null, firstBinding: number, bindingCount: number, pBuffers: VkBuffer[] | null, pOffsets: Float32Array | null): void

Attempting to use a Float32Array results in a crash with the message: TypeError: Invalid type for argument 5 'pOffsets' in 'vkCmdBindVertexBuffers'

Giving a type of BigUint64Array makes TypeScript complain, so I suppose the only work-around at the moment is to silence the TS compiler.

const offsets = new BigUint64Array();
vkCmdBindVertexBuffers(/*...*/, offsets as any);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant