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

demo vulkan cube sdl2 invalid go #17

Open
splace opened this issue Dec 1, 2020 · 2 comments
Open

demo vulkan cube sdl2 invalid go #17

splace opened this issue Dec 1, 2020 · 2 comments

Comments

@splace
Copy link

splace commented Dec 1, 2020

# github.com/vulkan-go/demos/vulkancube/vulkancube_sdl2
./main.go:33:31: cannot use surfPtr (type unsafe.Pointer) as type uintptr in argument to vulkan.SurfaceFromPointer
Tue 1 Dec 18:29:30 GMT 2020

fixed by adding type conversion...

surf := vk.SurfaceFromPointer(surfPtr)

->

surf := vk.SurfaceFromPointer(uintptr(surfPtr))
@splace
Copy link
Author

splace commented Dec 1, 2020

plus, when debugging enabled, i get...

closer.go:137: run time panic: runtime error: cgo argument has Go pointer to Go pointer

@xlab
Copy link
Member

xlab commented Dec 4, 2020

@splace Hi, thanks for reporting this. The issue with pointer to Go memory will be resolved when I re-generate bindings, since c-for-go improved lately.

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

2 participants