vulkan-go / vulkan

Vulkan API bindings for Go programming language
MIT License
744 stars 56 forks source link

'compute' build constraint tag #15

Closed splace closed 5 years ago

splace commented 6 years ago

had some trouble building the compute example.

the 'compute' constraint seemed to be necessary, not surprising since without it vkinit() was checking for a window.

go build -tags="compute" main.go

but i also needed to make two files skip compilation for this constraint (maybe just a problem with a Linux built?);

"vulkan_linux.go"

// +build linux,!android

changed too

// +build !android
// +build !compute
// +build !headless

and..

"vk_wrapper_desktop.c"

// +build windows darwin,!ios linux,!android

changed too

// +build windows darwin,!ios linux,!android
// +build !compute
// +build !headless
xlab commented 5 years ago

Hey, sorry for long reply, it took me a while to get back to the latest project status. As has been done in #25 the loader is now works dynamically. That helps us to shift from build flags for platform choosing.

splace commented 5 years ago

just tried current package, works without above tag changes.