Porting to Windows 10 UWP part 2
So when I finished the previous blog post, I was under the impression that I’d solved all the hard parts.
Here are some more that make UWP such an “interesting” platform to port to:
Unlike Android where screen rotation is mostly automatically handled, in Windows 10 when using D3D11 for rendering, you actually have to rotate your drawing to match! The device does not seem to render to a rotated framebuffer and then using the scaler hardware to rotate it into place, no, you have to draw landscape to a portrait framebuffer (or vice versa) manually. No other platform has required this so I’ll have to introduce a new little piece of machinery to my framework.
TLSAlloc and friends
I kept getting mysterious errors when starting the emulator on a Lumia 650. After an agonizing investigation then project reconstruction, it turns out it was all because glslang uses TLS local storage, which does not seem to be fully supported on mobile, instead you need to use FLS (fiber local storage). I documented the solution I ended up with on StackOverflow.
Ever-growing touch event IDs
Any comments? e-mail me at email@example.com .