-
Notifications
You must be signed in to change notification settings - Fork 22
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
(Re)Add NATIVE_TOOLKIT_STATIC_ANGLE switch to allow the angle library to be statically linked #10
Conversation
… to be statically linked Restablish native-toolkit@a78c07d on newer SDL version
This seems like a patch for SDL @hughsando, why are we modifying the lib code directly? What platform needs this? |
@underscorediscovery @hughsando @jgranick It seems to be a good contribution to SDL since you can get rid of the DLLs. I think that this only works with "Visual Studio 2015 Update 3"+? Anyway, I can send them the patch through their bugzilla if there are no objections (with a different flag name, SDL_VIDEO_STATIC_ANGLE?). It would take a long time to get to the official release. For winrt it is very convenient since you can be sure that everything is compiled using your Windows SDK version. I got winrt working on NME and I would be glad to see it working on Lime, Snow and others as well. Thanks 😄 |
I think sending it to SDL in their normal process is a good idea either way (including maybe the note about the motivation/reason). We definitely (as a general rule) try not to modify the libraries that native-toolkit provides easy access to. Also since we use tags for versioning here, we often can and do use hg revisions of SDL, so as soon as they have it in tree it could be available here without much trouble. |
So what is the decision here? Wait for SDL? |
I have added this to a "nme" branch, and updated the nme-toolkit sub-modules to point to this, so if you update that repo, you should get the latest versions. |
Carlos We would like to add a switch (define) that allows us to compile Angle statically with SDL. That is, getting rid of the OpenGL DLL. Usually you need OpenGL to be loaded dynamically as DLL because implementation is provided by the system but no need with Angle. Only 2 files need modification and it shouldn't affect current behaivor: include/SDL_egl.h and src/video/SDL_egl.c, as in here https://github.com/native-toolkit/sdl/pull/10/files The flag name could be SDL_VIDEO_STATIC_ANGLE (instead of NATIVE_TOOLKIT_STATIC_ANGLE) as discussed here native-toolkit/libsdl#10 We have tested this with both Windows and UWP, using NME engine (https://github.com/haxenme/nme). Releated issue: https://bugzilla.libsdl.org/show_bug.cgi?id=1820
Carlos We would like to add a switch (define) that allows us to compile Angle statically with SDL. That is, getting rid of the OpenGL DLL. Usually you need OpenGL to be loaded dynamically as DLL because implementation is provided by the system but no need with Angle. Only 2 files need modification and it shouldn't affect current behaivor: include/SDL_egl.h and src/video/SDL_egl.c, as in here https://github.com/native-toolkit/sdl/pull/10/files The flag name could be SDL_VIDEO_STATIC_ANGLE (instead of NATIVE_TOOLKIT_STATIC_ANGLE) as discussed here native-toolkit/libsdl#10 We have tested this with both Windows and UWP, using NME engine (https://github.com/haxenme/nme). Releated issue: https://bugzilla.libsdl.org/show_bug.cgi?id=1820
Carlos We would like to add a switch (define) that allows us to compile Angle statically with SDL. That is, getting rid of the OpenGL DLL. Usually you need OpenGL to be loaded dynamically as DLL because implementation is provided by the system but no need with Angle. Only 2 files need modification and it shouldn't affect current behaivor: include/SDL_egl.h and src/video/SDL_egl.c, as in here https://github.com/native-toolkit/sdl/pull/10/files The flag name could be SDL_VIDEO_STATIC_ANGLE (instead of NATIVE_TOOLKIT_STATIC_ANGLE) as discussed here native-toolkit/libsdl#10 We have tested this with both Windows and UWP, using NME engine (https://github.com/haxenme/nme). Releated issue: https://bugzilla.libsdl.org/show_bug.cgi?id=1820
@hughsando As you can see from the mirror bots, this was added by Sam (the name of the flag is SDL_VIDEO_STATIC_ANGLE) |
I guess this means I should switch the nme-toolkit submodule back to the master branch soon. |
Carlos We would like to add a switch (define) that allows us to compile Angle statically with SDL. That is, getting rid of the OpenGL DLL. Usually you need OpenGL to be loaded dynamically as DLL because implementation is provided by the system but no need with Angle. Only 2 files need modification and it shouldn't affect current behaivor: include/SDL_egl.h and src/video/SDL_egl.c, as in here https://github.com/native-toolkit/sdl/pull/10/files The flag name could be SDL_VIDEO_STATIC_ANGLE (instead of NATIVE_TOOLKIT_STATIC_ANGLE) as discussed here native-toolkit/libsdl#10 We have tested this with both Windows and UWP, using NME engine (https://github.com/haxenme/nme). Releated issue: https://bugzilla.libsdl.org/show_bug.cgi?id=1820
I just noticed that the official SDL 2.0.6 release included this flag (SDL_VIDEO_STATIC_ANGLE) |
Restablish
a78c07d
on newer SDL version