golang-ui / nuklear

This project provides Go bindings for nuklear.h — a small ANSI C GUI library.
https://github.com/vurtun/nuklear
MIT License
1.57k stars 98 forks source link

SDL2 panic: vert_shdr failed to compile #15

Closed xlab closed 7 years ago

xlab commented 7 years ago

@strangebroadcasts we have a problem

macOS Sierra 10.12.1 go version go1.8 darwin/amd64

$ nk-example-sdl2

2017/03/28 13:38:58 SDL2: created window 400x500
panic: vert_shdr failed to compile

goroutine 1 [running, locked to thread]:
github.com/golang-ui/nuklear/nk.deviceCreate()
    /Users/xlab/Documents/dev/go/src/github.com/golang-ui/nuklear/nk/impl_sdl2_gl3.go:150 +0x580
github.com/golang-ui/nuklear/nk.NkPlatformInit(0x461e8f0, 0x47d20c0, 0x1, 0x2)
    /Users/xlab/Documents/dev/go/src/github.com/golang-ui/nuklear/nk/impl_sdl2_common.go:45 +0x91
main.main()
    /Users/xlab/Documents/dev/go/src/github.com/golang-ui/nuklear/cmd/nk-example-sdl2/main.go:49 +0x3e6
xlab commented 7 years ago

OpenGL 2 version works at least, buggy at the moment.

strangebroadcasts commented 7 years ago

Looking into it.

strangebroadcasts commented 7 years ago

For some reason I forgot to explicitly request the core profile - what happens if you add these lines?

re: OpenGL 2 bugginess, I don't have a Mac on hand to test, but I'll try to find one.

xlab commented 7 years ago

@strangebroadcasts you can build sdl2+opengl2 using -tags "opengl2 sdl2" jfyi

strangebroadcasts commented 7 years ago

Glad to see it works now :)