Commit Graph

28 Commits

Author SHA1 Message Date
David Ludwig
f25ee50b03 Fixed broken rotation detection routines on WinRT
Rotation detection and handling should now work across all, publicly-released,
WinRT-based platforms (Windows 8.0, Windows 8.1, and Windows Phone 8.0).
2014-03-15 14:54:23 -04:00
David Ludwig
4cd5ed7ba2 Merged various WinRT build fixes 2014-03-12 12:12:20 -04:00
David Ludwig
b68b6e23d1 Fixed various build and runtime errors when using WinRT with VS2012. 2014-03-12 11:57:15 -04:00
Sam Lantinga
641ba09975 Fixed compiling Windows RT code on Visual Studio 2013 2014-03-12 07:26:07 -07:00
David Ludwig
36e7c8d92d Fixed compiler errors in the D3D11 renderer when building for WinRT
Still TODO: fix other build errors, especially linker errors, when building
SDL/WinRT, then fix any runtime errors that pop up.
2014-03-11 12:40:31 -04:00
David Ludwig
e8eb142748 build fixes for most WinRT-related files
Still TODO: getting the D3D11 renderer back up and running in VC 2012.
2014-03-10 21:21:35 -04:00
David Ludwig
ce8057221a WinRT: compiled the d3d11 renderer's shaders into SDL itself
Previously, the shaders would get compiled separately, the output of which would need to be packaged into the app.  This change should make SDL's dll be the only binary needed to include SDL in a WinRT app.
2013-12-25 21:39:48 -05:00
David Ludwig
2225493102 WinRT: moved contents of the d3d11 renderer's header file into its implementation file 2013-12-25 13:13:15 -05:00
David Ludwig
d92f0127d0 WinRT: enabled OpenGL ES 2 support by default
A copy of ANGLE/WinRT is still needed to run OpenGL content, but is not needed to compile SDL/WinRT.
2013-12-21 10:08:11 -05:00
David Ludwig
b6f80d855e WinRT: enable the OpenGL ES 2 SDL_Renderer backend, if and when OpenGL ES 2 support is compiled in 2013-11-29 00:19:46 -05:00
David Ludwig
ecfbb3f5dc WinRT: got the SDL-official OpenGL ES 2 changes working, in an experimental state 2013-11-28 22:59:21 -05:00
David Ludwig
749117acd9 WinRT: added experimental OpenGL ES 2.0 support
A port of the ANGLE library (OpenGL ES 2.0 for Direct3D) to WinRT, via https://github.com/stammen/angleproject, is used as a base.

To enable, clone 'angleproject' into the directory one above where SDL/WinRT is, open the file SDL/include/SDL_config_winrt.h, and uncomment the #defines that begin with 'SDL_VIDEO_OPENGL'.  From there, apps can create an OpenGL capable SDL_Window via the flag, SDL_WINDOW_OPENGL, and an OpenGL ES 2 context via SDL_GL_CreateContext.  The Direct3D 11.1 renderer cannot be used alongside SDL_WINDOW_OPENGL.  Only Windows 8/8.1 is supported for now.  Shaders may need to be precompiled, in some (all?) cases.
2013-11-04 19:54:29 -05:00
David Ludwig
3236fc3a9f WinRT: implemented SDL_GetBasePath and SDL_GetPrefPath 2013-10-28 15:41:22 -04:00
David Ludwig
58dd086487 WinRT: unified the two, public, app-init functions
This function, SDL_WinRTRunApp, can be used to help launch either XAML or non-XAML/Direct3D-only based apps.
2013-09-22 12:26:53 -04:00
David Ludwig
8a16449e9b WinRT: project-naming cleanup. Projects that link to SDL will need updating. To update:
1. remove references to SDL's project files from the Visual Studio Solution.  To note, these project files have been renamed, and will show up in Visual Studio with the text, "load failed".
2. add the SDL project files back into the Visual Studio Solution
3. for each project that should link to SDL, add a reference to it.  This can be done by right-clicking on it in Visual Studio, selecting "References...", clicking "Add New Reference", checking the box next to the SDL project, then closing each dialog by clicking OK.

SDL_mixer, SDL_ttf, and SDL_image for WinRT have been updated, and will be pushed to my Bitbucket repos with these changes having been made.  If you do not pull in these changes, be sure to re-add to them the reference to the SDL project, as described above.
2013-09-14 23:34:27 -04:00
David Ludwig
34722465d1 WinRT: code cleanup: attempted to make it more clear what code is specific to what app type (plain Direct3D or XAML) 2013-09-06 21:13:15 -04:00
David Ludwig
fff780818d WinRT: made SDL_xaudio2.c compile as C code when building for WinRT
XAudio2 2.8's header file, xaudio2.h, doesn't compile in plain C code for WinRT
apps, not automatically at least.  Initially, this file was adapted to compile
as C++, however these changes are now deprecated in favor of some preprocessor
based hacks that should get xaudio2.h to compile (while making sure XAudio2
still works).
2013-09-06 19:07:15 -04:00
David Ludwig
f3bd9175a9 WinRT: more renaming of "windowsrt" to "winrt" 2013-09-04 19:55:45 -04:00
David Ludwig
8fc04cc76e WinRT: renamed a mouse-related header file for naming-consistency's sake 2013-09-02 15:29:46 -04:00
David Ludwig
7e06b806ac WinRT: misc code cleanups regarding touch and mouse events, and also SDL-internal globals 2013-09-02 15:23:33 -04:00
David Ludwig
1d5082d815 WinRT: corrected SDL_MOUSE* coordinates in non-Portrait modes
Thanks to Pierre-Yves Gueniffey for proper pointer geometry transform code!
2013-08-28 16:51:07 -04:00
David Ludwig
2cafee9de1 WinRT: experimental and preliminary support for XAML-based overlays on Windows 8/RT
The XAML support here is still rudimentary.  Bugs do exist.  You've been warned.

XAML support in Windows Phone 8 is not yet available (in SDL/WinRT).
2013-08-27 21:21:09 -04:00
David Ludwig
f860141aa6 WinRT: renamed "windowsrt" directories to "winrt" 2013-08-27 12:33:36 -04:00
David Ludwig
3e83fd784c WinRT: misc code cleanups 2013-08-27 11:39:44 -04:00
David Ludwig
d78b26ed69 WinRT: moved most platform-specific keyboard and mouse code to shared locations 2013-08-26 17:17:53 -04:00
David Ludwig
19a168b4b3 WinRT: file naming and placement cleanup
- moved SDL_WinRTApp.* from src/video/windowsrt/ to src/core/winrt/, and renamed them to SDL_winrtapp.* (to mimick case-sensitivity used elsewhere in SDL)
- renamed all "windowsrt" directories (in src) to "winrt", as the shorthand name is used more often (and, IMO, "WinRT" != "Windows RT", not entirely at least)
2013-08-20 21:22:32 -04:00
David Ludwig
d41fdc94d6 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
David Ludwig
f7049b93d5 WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d4ce48ff30d1) 2013-08-12 22:29:55 -04:00