|
Alco |
at Apr 18, 2013 at 1:43 pm
|
⇧ |
| |
Has anyone got Go-SDL to work on OS X at all? I'm running 10.7 and it
doesn't work for me.
When I'm launching test.go from
https://github.com/0xe2-0x9a-0x9b/Go-SDL/tree/master/sdl-test I get the
following output
https://gist.github.com/alco/5412735Setting SDL_VIDEODRIVER env variable to x11 fixes the crash, but it simply
launches the X server and nothing more happens. I can remember making SDL
work from C on my OS, using the native NSWindow interface, so it should be
a problem with the Go binding.
I think I saw somewhere that one should run SDL's main() in order to
initialize it properly. Looking in the file src/main/macos/SDL_main.c,
there is a main() function that does initialize many things and then calls
SDL_main() which is provided by the user if I'm not mistaken.
So, does Go-SDL perform similar initialization that main() function does or
skips them altogether? Is it possible to call SDL's main() as the first
thing inside the Go program's main() and then be able to resume execution
in Go (i.e. call SDL's main() without giving up control to it)?
P.S. I want to use SDL's drawing functions, so GLFW is not an alternative.
On Sunday, November 25, 2012 12:40:11 AM UTC+2, Daniel Harper wrote:
I'm trying to run this simple program
package main
import (
"github.com/0xe2-0x9a-0x9b/Go-SDL/sdl"
"log"
)
func main() {
if sdl.Init(sdl.INIT_EVERYTHING) != 0 {
log.Fatal(sdl.GetError())
}
}
However when I try and run the program I just get this error
2012/11/24 22:36:27 No available video device
exit status 1
I've heard this *might* be because in OSX 10.8 Apple removed X11, the
"solution" to this is to install Xquartz - I've done that but I still get
the same problem above.
Was just wondering if anyone has experienced anything similar?
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.