Skip to content
New issue

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

Update to SDL 2.0.14+? #495

Open
CannibalVox opened this issue Sep 10, 2021 · 6 comments
Open

Update to SDL 2.0.14+? #495

CannibalVox opened this issue Sep 10, 2021 · 6 comments

Comments

@CannibalVox
Copy link
Contributor

For whatever reason, SDL chooses to ship a vulkan loader itself, which means that if SDL gets a little out of date, so does vulkan. At this time, the SDL2 version shipped with go-sdl2 ships a vulkan 1.1 loader instead of the most recent vulkan 1.2, which ships in SDL 2.0.14 and above. This means some extensions are not available, and we get warnings about layer versions when debugging devices that support 1.2 natively (i.e. any PC)

I'd like go-sdl2 to have updated libs, but I'm happy to check in a PR. I'm just not sure where this really incredible array of .a files came from- is there any way I can assist?

@veeableful
Copy link
Contributor

Hi @CannibalVox, what a coincidence! Thanks for the reminder and the offer to assist. I was actually planning to at least update the bindings to support 2.0.16 either today or tomorrow. But as for the static libraries, previously they were built on Gentoo by @gen2brain. However it is a little challenging for me to re-produce them so we started working on scripts that can be used on other operating system such as Fedora build the static libraries but it is not yet complete and I have been neglecting it for awhile. Nevertheless, I will prepare and create a repository for it before this week ends and share with us here.

I'm also concerned with user trust and growing the repository size due to the static libraries and whether there is another way to have the static build working without having them being included in the repository so if you have suggestions, they are most definitely welcome!

@CannibalVox
Copy link
Contributor Author

That's great to hear!

I can understand not wanting to have the libs included in the repository, but on the other hand go-sdl2 is unusually easy to work with for a cgo wrapper and I think that's a large part of why.

@veeableful
Copy link
Contributor

I created a repository for the scripts at https://github.com/veandco/sdl2-static-library-build-scripts and pushed scripts that I have tested again to have worked on my Fedora machine. There are actually more scripts in my local machine and I will push them as well once I have tested them again!

@CannibalVox
Copy link
Contributor Author

CannibalVox commented Sep 18, 2021

I've finally gotten the opportunity to try this out, and the windows bindings do seem to have a small issue-

A) They don't include windows.h on their own, so SDL.h doesn't get included, since system.h only includes it when _WIN32 isdef
B) system_windows.go assumes that SDL.h has been included so it has a compile failure attempting to use SDL_VERSION_ATLEAST

@veeableful
Copy link
Contributor

Hi @CannibalVox, thanks for testing it and the report. I have pushed a couple of fixes to the bindings to master and v0.4.x branches. If you have the time, please try it out. I tested with the cross-compilation method to compile to Windows so it should work now.

I have also been updating the static library build scripts for SDL2 which I will push later. After that I would like to figure out how to improve the continuous test process to include cross-compilation tests and once it's done, I will tag a new release!

@CannibalVox
Copy link
Contributor Author

Works great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants