veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.23k stars 225 forks source link

SDL 2.0.10 #439

Open TerensTare opened 4 years ago

TerensTare commented 4 years ago

Any interests on this? https://github.com/mozeal/SDL_gui

veeableful commented 4 years ago

Hi @TerensTare, yes! Though it seems like it's written in C++ which is incompatible with cgo.

TerensTare commented 4 years ago

What if I make it work in GoLang? Maybe by rewriting it in pure Go?

veeableful commented 4 years ago

That sounds like a good approach. There doesn't seem to be any problem other than the amount of work you have to put into it. If you are driven to do this, I'd say go for it!

TerensTare commented 4 years ago

I will leave commenting up to you. So you can write it in your own style. But I will just write some notes.

TerensTare commented 4 years ago

There is a small problem. The library uses SDL_gfx and I am on Windows. Is there any way to use SDL_gfx on WIndows?

veeableful commented 4 years ago

Yes, I was able to get it running here. It seems like you just need to copy the header and .dll files to the MinGW's include and lib directories. Let me know if you have any difficulty.

TerensTare commented 4 years ago

It worked. Thanks a lot. Talk to you later.

veeableful commented 4 years ago

No problem. I'm glad it helped :relaxed:

TerensTare commented 4 years ago

Hey @veeableful . I found this faq hosted by Bjarne Stroustrup (the creator of C++). It says that you can export C++ classes to C code. That means that I can use C bindings to generate GoLang bindings (way simpler than rewriting the whole thing in GoLang).

veeableful commented 4 years ago

That's true. You could contribute to that project by writing C binding for them!