Open MoeMod opened 6 years ago
The half-made VS project can be found on https://github.com/MoeMod/xash3d/tree/winrt-port
What about library loading? Is LoadLibrary availiable in UWP? You need gl-wes-v2 to make GL it work with angle. It already used in WebGL port. And of cause adapt it for UWP, where libraries loaded (i think) different way
Libraries need to be compiled under WinRT. And then replace LoadLibrary by LoadPackagedLibrary.
In additional, WinRT projects only provides unicode APIs, so LoadPackagedLibrary accepts wchar_t * library path and needs some encodings. This should work: https://github.com/MoeMod/xash3d/blob/winrt-port/engine/common/library.c
And how to load angle? We need to patch gl-wes-v2 to work on winrt and use angle
seems that angle (libEGL.dll, libGLESv2.dll) will be loaded by SDL2-UWP.
In my latest test, the engine fails when SDL_CreateWindow returns nullptr.
You should try to run Xash Dedicated Server at least. If it runs well, then filesystem at least is ported correctly.
Don't know about UWP support state in SDL2, but looks like it abstracts graphics for us, so we can just create GLES2 context. You need only define XASH_GLES and XASH_WES and compile in gl-wes-v2
source code.
gl-wes-v2 already works with SDL2. Just define XASH_SDL in it. And maybe some changes needed to build it on windows. I not tested it on win32.
Yeah, I tried gl-wes-v2 before on Linux. Worked flawlessly! Sadly, using our forks of nanogl or gl-wes-v2 isn't intuitive enough. You need to clone repository with source and add them to engine build process, so compiler flags will be same.
Hey - Has there been any further progress made on this?
Never heard that anyone is ported engine to UWP.
Nowadays Windows Tablets become popular, such as Surface lineup. However most of them are packaged with Windows 10 S where win32 app is not recommended, so UWP apps are preferred.
Possible solutions
Problems up to now
However, I had a hard time debugging SDL2 video initialization... so that the engine cannot be loaded.