Windows Phone 8 SDL support

One more question: do you get the same error when running in one of the Windows Phone emulators? If so, which revision of Windows Phone are you emulating (8.0? 8.1? etc.)

DLudwig wrote:

DLudwig wrote:

What version of Windows Phone do you have on the 520? Is it 8.1 or above?
Also, what revision of the code are you at (in Mercurial)?

One more question: do you get the same error when running in one of the Windows Phone emulators? If so, which revision of Windows Phone are you emulating (8.0? 8.1? etc.)

-The version on the lumia is 8.1.
-I’ve downloaded the version from your repository
-I’m unable to run the emulators. I get some Hyper-V error. I’m not sure if this happens in all emulators because I’m almost sure I’ve runned some emulators in the past on the same pc. I’m going to try them all when I get home.

I have a few more ideas to try out.

DLudwig wrote:

One more question: do you get the same error when running in one of the Windows Phone emulators? If so, which revision of Windows Phone are you emulating (8.0? 8.1? etc.)

What revision of the code should I use? Is the zip in mercurial updated or should I clone the whole repository?
There are functions missing in the zip file.

Limanima wrote:

What revision of the code should I use? Is the zip in mercurial updated or should I clone the whole repository?
There are functions missing in the zip file.

I’d recommend cloning, and occasionally pulling-from, the latest revision of the repository, and using whatever the head is from there. The .zip file download is something that Bitbucket adds, and isn’t something I’ve ever tested.

If you run into missing stuff in a cloned version of the repo, let me know and I’ll take a look into it.

Cheers,
– David L.

DLudwig wrote:

I’d recommend cloning, and occasionally pulling-from, the latest revision of the repository, and using whatever the head is from there. The .zip file download is something that Bitbucket adds, and isn’t something I’ve ever tested.

If you run into missing stuff in a cloned version of the repo, let me know and I’ll take a look into it.

Cheers,
– David L.

Sorry my ignorance, but what is the link I should use to clone the repo?
I’m using Source Tree and the url https://hg.libsdl.org/SDL/. I also tried https://hg.libsdl.org/.

Limanima wrote:

Sorry my ignorance, but what is the link I should use to clone the repo?
I’m using Source Tree and the url https://hg.libsdl.org/SDL/. I also tried https://hg.libsdl.org/.

My experimental / in-development / possibly-unstable XAML fork can be cloned from https://bitbucket.org/DavidLudwig/SDL

If you (or anyone else reading this) doesn’t need WinRT+XAML integration yet (it’s still pretty buggy), but does need WinRT support, then I’d recommend using SDL’s main repo at https://hg.libsdl.org/SDL

Cheers,
– David L.

Limanima wrote:

SDL_CreateRenderer is failing. I’ve tried it on your template project and it is also failing with the same error. I’ve stepped into SDL_CreateRenderer and the function that is failing is IDXGIFactory2_CreateSwapChainForComposition.
This is the error message(hresult=0x887a0001)

“The application made a call that is invalid. Either the parameters of the call or the state of some object was incorrect.\r\nEnable the D3D debug layer in order to see details via debug messages”

I’ve already enabled d3d debug layer but I can’t see any additional information.

I’m running a ARM build on a Lumia 520. Not sure if that matters. Any ideas?

Hi again,

An update: I tried running an SDL-based XAML app on a Lumia 520 running WP 8.1 (w/ the Cyan update), and was unable to reproduce this bug. This was done using the latest code from my development repo (up on Bitbucket). If you’re able to try that code, and are still getting errors, feel free to send over some sample code, and I’ll see if I can get the bug to reproduce on my end, and if a fix might be available.

Cheers,
– David L.

T-Bone wrote:

Hi! I’ve been trying to get OpenGL ES to work with SDL for Windows Apps through ANGLE, but I’m having issues. Here’s what I did:

  1. Followed the instructions here (https://hg.libsdl.org/SDL/file/tip/docs/README-winrt.md) very carefully. I’m using SDL 2.0.4-9304. So far so good, SDL apps using the SDL renderer seem to work fine.

T-Bone wrote:

As far as I know, “Cannot find or open the PDB file.” is never an error that breaks an application, it just means you can’t debug those things, which is fine by me. So the only clue as to what’s going on that I can see is the line “INFO: Unable to create window: Could not get EGL display”, which, as far as I can tell, means that SDL_CreateWindow failed. I assume something is wrong with how I’m using ANGLE, but I can’t figure out what.

Any help is highly appreciated, and if there’s any more info I can provide that will help, just say so. Thanks!

Any chance you could try the latest code from SDL HG? The WinRT-specific OpenGL init code has been updated since 9304, in order to support a wider range of devices + OS-versions.

Cheers,
– David L.

T-Bone wrote:

I tried using the latest build from Mercurial (1bc5372ee27f) and I get the same result. The only difference I can see is that SDL_GetError() now returns “Could not get 10_0+ EGL display” instead of just “Could not get EGL display”. I’ll try messing with it a bit more, but any suggestions are welcome :slight_smile:

Do you know what revision of ANGLE you’re using? If not, maybe try the latest from the “ms-master” branch at https://github.com/msopentech/angle ?

– David L.

T-Bone wrote:

I’m using the latest ANGLE from the ms-master branch. I redownloaded it and rebuilt it, just in case. Made no difference :?

Huh, ok. I’m almost stumped now. A few of the changes I made recently were done to address a few enum values being changed in the ms-master branch. If and when a slightly older version of ANGLE was used (with the older enum values), I believe you’d get the error that you listed (“Could not get 10_0+ EGL display”).

Do you know if the .dlls from the newest copy of ANGLE/ms-master are getting built, and if so, are getting copied into the AppX bundle? I’ve seen MSVC act somewhat wonky here, when external projects get updated. It won’t always rebuild and reinstall the new stuff.

– David L.

T-Bone wrote:

I have built the ANGLE dlls manually (just opening winrt/8.1/windows/src/angle.sln and hitting “Build” for the various configurations). Then those .dlls and .libs are placed in the project, and set as “Content” for their configurations. This makes them copy to the AppX folder (I’ve checked, they’re there). So I don’t think it’s that.

I need some sleep now :stuck_out_tongue: Hopefully a new day will come with new ideas. Cheers!

Odd. Good luck tomorrow.

If you get a chance, maybe try doing a clean build on everything at least once. Beyond that, I don’t have much advice, other than stepping into ANGLE’s code to see why it fails.

Cheers!
– David L.

Uuuuugh. Nevermind. I know why it’s failing. A few, key enums changed values again. Looks like it happened via this merge: https://github.com/MSOpenTech/angle/commit/bbd2eb0a9c453a941f2c7abacf616d5a66b6be92#diff-d1377fbe747de154e1bfcf7221d3de67

I’m pretty sure I can fix this. More to come…

– David L.

DLudwig wrote:

Uuuuugh. Nevermind. I know why it’s failing. A few, key enums changed values again. Looks like it happened via this merge: https://github.com/MSOpenTech/angle/commit/bbd2eb0a9c453a941f2c7abacf616d5a66b6be92#diff-d1377fbe747de154e1bfcf7221d3de67

I’m pretty sure I can fix this. More to come…

Ok, fixed, I think… I hope. The fix is up at https://hg.libsdl.org/SDL/rev/65e802af5d0e

Cheers!
– David L.

Hi! I’ve been trying to get OpenGL ES to work with SDL for Windows Apps through ANGLE, but I’m having issues. Here’s what I did:

  1. Made a Universal App DirectX project
  2. Followed the instructions here (https://hg.libsdl.org/SDL/file/tip/docs/README-winrt.md) very carefully. I’m using SDL 2.0.4-9304. So far so good, SDL apps using the SDL renderer seem to work fine.
  3. Changed the main.cpp to the Gears example
  4. Downloaded ANGLE from Microsoft’s Open Tech (the master branch) and compiled it for all the platforms/configurations.
  5. Took the libEGL.dll and libGLESv2.dll files, as well as all the .lib files, and placed them in the project. Made sure that Visual Studio only includes the right ones for each build by setting their “Content” value to “Yes” only for their correct builds.
  6. Made the linker check the .lib files by Project -> Properties -> Linker -> Input -> “Additional Dependencies” and added the relative paths to the .lib files.
  7. Compiled and tried to run it

It does compile, and I can see that the .dll files are being included in the AppX folder, and if I remove the .dll files then I get a runtime exception saying that it couldn’t find the .dll files. So that’s a good sign! When I do include them, the app starts (I can see the splash screen) but then instantly quits itself. Here’s the output:

Code:

‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Users\Martin\Documents\l-veftw\LoveFTW\x64\Release\LoveFTW.Windows\AppX\LoveFTW.Windows.exe’. Symbols loaded.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\ntdll.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\kernel32.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\KernelBase.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Users\Martin\Documents\l-veftw\LoveFTW\x64\Release\LoveFTW.Windows\AppX\libGLESv2.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Users\Martin\Documents\l-veftw\LoveFTW\x64\Release\LoveFTW.Windows\AppX\SDL2.dll’. Symbols loaded.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Program Files\WindowsApps\Microsoft.VCLibs.120.00_12.0.21005.1_x64__8wekyb3d8bbwe\vccorlib120_app.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\combase.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Program Files\WindowsApps\Microsoft.VCLibs.120.00_12.0.21005.1_x64__8wekyb3d8bbwe\msvcr120_app.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Program Files\WindowsApps\Microsoft.VCLibs.120.00_12.0.21005.1_x64__8wekyb3d8bbwe\msvcp120_app.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\d3d11.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\D3DCompiler_47.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\XInput1_4.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\XAudio2_8.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\dxgi.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\ole32.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\oleaut32.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\msvcrt.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\rpcrt4.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\gdi32.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\cryptsp.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\cfgmgr32.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\devobj.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\avrt.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\user32.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\sechost.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\imm32.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\msctf.dll’. Cannot find or open the PDB file.
The thread 0x1574 has exited with code 0 (0x0).
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\kernel.appcore.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\cryptbase.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\bcryptprimitives.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\twinapi.appcore.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\WinTypes.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\SHCore.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\rsaenh.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\bcrypt.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\uxtheme.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\actxprxy.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\MrmCoreR.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\BCP47Langs.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\Windows.UI.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\ninput.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\dwmapi.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\Windows.Graphics.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\twinapi.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Windows\System32\threadpoolwinrt.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Loaded ‘C:\Users\Martin\Documents\l-veftw\LoveFTW\x64\Release\LoveFTW.Windows\AppX\libEGL.dll’. Cannot find or open the PDB file.
‘LoveFTW.Windows.exe’ (Win32): Unloaded 'C:\Users\Martin\Documents\l-veftw\LoveFTW\x64\Release\LoveFTW.Windows\AppX\libEGL.dll’
INFO: Unable to create window: Could not get EGL display
The thread 0x1be8 has exited with code 0 (0x0).
The thread 0x1428 has exited with code 0 (0x0).
The thread 0x1184 has exited with code 0 (0x0).
The thread 0x1390 has exited with code 0 (0x0).
The thread 0x1a0c has exited with code 0 (0x0).
The thread 0xd84 has exited with code 0 (0x0).
The program ‘[6304] LoveFTW.Windows.exe’ has exited with code 0 (0x0).

As far as I know, “Cannot find or open the PDB file.” is never an error that breaks an application, it just means you can’t debug those things, which is fine by me. So the only clue as to what’s going on that I can see is the line “INFO: Unable to create window: Could not get EGL display”, which, as far as I can tell, means that SDL_CreateWindow failed. I assume something is wrong with how I’m using ANGLE, but I can’t figure out what.

Any help is highly appreciated, and if there’s any more info I can provide that will help, just say so. Thanks!

DLudwig wrote:

T-Bone wrote:

I’m using the latest ANGLE from the ms-master branch. I redownloaded it and rebuilt it, just in case. Made no difference :?

Huh, ok. I’m almost stumped now. A few of the changes I made recently were done to address a few enum values being changed in the ms-master branch. If and when a slightly older version of ANGLE was used (with the older enum values), I believe you’d get the error that you listed (“Could not get 10_0+ EGL display”).

Do you know if the .dlls from the newest copy of ANGLE/ms-master are getting built, and if so, are getting copied into the AppX bundle? I’ve seen MSVC act somewhat wonky here, when external projects get updated. It won’t always rebuild and reinstall the new stuff.

– David L.

I have built the ANGLE dlls manually (just opening winrt/8.1/windows/src/angle.sln and hitting “Build” for the various configurations). Then those .dlls and .libs are placed in the project, and set as “Content” for their configurations. This makes them copy to the AppX folder (I’ve checked, they’re there). So I don’t think it’s that.

I need some sleep now :stuck_out_tongue: Hopefully a new day will come with new ideas. Cheers!

I’m using the latest ANGLE from the ms-master branch. I redownloaded it and rebuilt it, just in case. Made no difference :?

I tried using the latest build from Mercurial (1bc5372ee27f) and I get the same result. The only difference I can see is that SDL_GetError() now returns “Could not get 10_0+ EGL display” instead of just “Could not get EGL display”. I’ll try messing with it a bit more, but any suggestions are welcome :slight_smile:

Ah, thanks! I didn’t see that https://www.libsdl.org/hg.php was out of date. I’ll try that.

Yup, that was it! It works now! Thanks so much for your help, and I’m glad I helped identifying the issue [Laughing]

I’m having issues when running SDL in landscape for Windows Phone (Windows for computer/tablets have none of these issues as far as I can tell). I’m using ANGLE, so the issue could be related to that as well. When running both my own application, and the GL Gears demo in lanscape, it looks like this:

http://1drv.ms/1Gz8up2

or this:

http://1drv.ms/1Gz8yFi

Depending on if the app is set to only support Landscape, or if it supports both Landscape and Portrait. Eveyrhting seems to work fine in Portrait mode though.

I’m running the latest versions of both SDL and ANGLE, and the Gears demo is taken straight off https://gist.githubusercontent.com/DavidLudwig/d0307b81aab7f84b24e3/raw/20f4b8ea87039ee9f9466854c78449d113635b76/sdl2gles2gears.c

Thanks again for a phenomenal port and support!