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

How heavily does this rely on CGO/C++ bindings? #8

Open
ghost opened this issue Oct 22, 2017 · 1 comment
Open

How heavily does this rely on CGO/C++ bindings? #8

ghost opened this issue Oct 22, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 22, 2017

Just curious, how close to being pure Go is this project? I see some C files in the repo here but I thought I should ask the devs rather than guess...

@xlab
Copy link
Member

xlab commented Oct 25, 2017

@rucuriousyet there are the official C API header files from Khronus
https://github.com/vulkan-go/vulkan/tree/master/vulkan

The bindings are generated for them. Vulkan architecture works that way — you have an API to call functions from a shared library, which is a single entrypoint and acts like a facade. I'm talking about libvulkan.so

It's possible to generate Go code from XML spec and call functions from libvulkan without CGo, but Vulkan works with C memory layout, so you will still be responsible for layouts and alignment. Better to hand that to CGo.

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