We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to port nanovgo to android using android-go
android-go
I am trying to pass vertices []float32 data into gl.BufferData but I am getting a runtime error.
[]float32
gl.BufferData
gl.BufferData(gl.ARRAY_BUFFER, len(b), unsafe.Pointer(&vertexes), gl.STREAM_DRAW)
06-05 12:22:17.041 32181-0/com.go_android.minimal E/Go: panic: runtime error: cgo argument has Go pointer to Go pointer 06-05 12:22:17.041 32181-0/com.go_android.minimal E/Go: goroutine 7 [running]: 06-05 12:22:17.041 32181-0/com.go_android.minimal E/Go: github.com/xlab/android-go/gles3.BufferData.func1(0x8892, 0x3940, 0xb7ae2258, 0x88e0) 06-05 12:22:17.041 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/xlab/android-go/gles3/gles3.go:110 +0x3c 06-05 12:22:17.041 32181-0/com.go_android.minimal E/Go: github.com/xlab/android-go/gles3.BufferData(0x8892, 0x3940, 0xb7ae2258, 0x88e0) 06-05 12:22:17.041 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/xlab/android-go/gles3/gles3.go:110 +0x34 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: github.com/shibukawa/nanovgo.(*glParams).renderFlush(0xb7a5e258) 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/shibukawa/nanovgo/gl_backend.go:584 +0x188 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: github.com/shibukawa/nanovgo.(*Context).EndFrame(0xb7abe090) 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/shibukawa/nanovgo/nanovgo.go:169 +0x28 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: main.draw(0xb7abe090) 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/darmie/nanovg-android/main.go:86 +0x180 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: main.main.func1(0xd7cf0f00, 0xd7d602a8) 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/darmie/nanovg-android/main.go:53 +0x35c 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: github.com/xlab/android-go/app.Main(0xb7a7ffc4) 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/xlab/android-go/app/app.go:86 +0x38 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: main.main() 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/darmie/nanovg-android/main.go:37 +0x17c 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: github.com/xlab/android-go/app/internal/callfn.CallFn(0xd7c6d39c) 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/xlab/android-go/app/internal/callfn/callfn_arm.s:10 +0x18 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: created by github.com/xlab/android-go/app.callMain 06-05 12:22:17.042 32181-0/com.go_android.minimal E/Go: /Users/damilare/go/src/github.com/xlab/android-go/app/app.go:50 +0x2e4 06-05 12:22:17.043 32181-32208/com.go_android.minimal A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 32208 (android.minimal)
The text was updated successfully, but these errors were encountered:
Yeah should've used unsafe.Pointer(&vertexes[0]) instead.
unsafe.Pointer(&vertexes[0])
Sorry, something went wrong.
No branches or pull requests
I am trying to port nanovgo to android using
android-go
I am trying to pass vertices
[]float32
data intogl.BufferData
but I am getting a runtime error.gl.BufferData(gl.ARRAY_BUFFER, len(b), unsafe.Pointer(&vertexes), gl.STREAM_DRAW)
The text was updated successfully, but these errors were encountered: