demos icon indicating copy to clipboard operation
demos copied to clipboard

demo vulkan cube sdl2 invalid go

Open splace opened this issue 5 years ago • 2 comments

# 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 avatar Dec 01 '20 18:12 splace

plus, when debugging enabled, i get...

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

splace avatar Dec 01 '20 20:12 splace

@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.

xlab avatar Dec 04 '20 15:12 xlab