Commit graph

42 commits

Author SHA1 Message Date
Sam Lantinga
ad407b378a Fixed compiling Windows RT code on Visual Studio 2013
--HG--
rename : src/render/direct3d11/SDL_render_d3d11_winrthelpers.cpp => src/render/direct3d11/SDL_render_winrt.cpp
rename : src/render/direct3d11/SDL_render_d3d11_winrthelpers_cpp.h => src/render/direct3d11/SDL_render_winrt.h
2014-03-12 07:26:07 -07:00
David Ludwig
5007e2996e 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.

--HG--
extra : rebase_source : dec261a0a61ffe463455f7d0a639f4c087e975ba
2014-03-11 12:40:31 -04:00
David Ludwig
e6f24f0b7c build fixes for most WinRT-related files
Still TODO: getting the D3D11 renderer back up and running in VC 2012.

--HG--
extra : rebase_source : 16aa0948fea2b8997033ca5a09ddb9692d07edc4
2014-03-10 21:21:35 -04:00
David Ludwig
c836d9ffc2 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
1f740f328b WinRT: moved contents of the d3d11 renderer's header file into its implementation file 2013-12-25 13:13:15 -05:00
David Ludwig
fcbc582b23 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
a4f050087d 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
603365be1e WinRT: got the SDL-official OpenGL ES 2 changes working, in an experimental state 2013-11-28 22:59:21 -05:00
David Ludwig
a5069b7ae1 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
e918745db0 WinRT: implemented SDL_GetBasePath and SDL_GetPrefPath
--HG--
rename : src/core/winrt/SDL_winrtpaths.cpp => src/filesystem/winrt/SDL_sysfilesystem.cpp
2013-10-28 15:41:22 -04:00
David Ludwig
79f80241a8 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
d760825693 WinRT: renamed SDL_winrt_main.cpp to indicate that it should only be used in non-XAML apps
This can break builds of existing SDL/WinRT apps.  To fix, remove the reference to SDL_winrt_main.cpp, then add a reference to the renamed file, SDL_winrt_main_NonXAML.cpp.  If you get a build error about a missing .winmd file, enable the /ZW compiler flag for that one file (at minimum).

--HG--
rename : src/main/winrt/SDL_winrt_main.cpp => src/main/winrt/SDL_winrt_main_NonXAML.cpp
2013-09-16 22:27:30 -04:00
David Ludwig
9ac09266a1 WinRT: build fix for the SDL-WinRT-only .sln 2013-09-14 23:44:50 -04:00
David Ludwig
5d50184a6f 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.

--HG--
rename : VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj => VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj
rename : VisualC-WinPhone/SDL/SDL_VS2012-WinPhone.vcxproj.filters => VisualC-WinPhone/SDL/SDL-WinPhone_VS2012.vcxproj.filters
rename : VisualC-WinRT/SDL_VS2012-WinRT.sln => VisualC-WinRT/SDL-WinRT_VS2012.sln
rename : VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj => VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj
rename : VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters => VisualC-WinRT/SDL/SDL-WinRT_VS2012.vcxproj.filters
2013-09-14 23:34:27 -04:00
David Ludwig
e0af19f033 WinRT: code cleanup: attempted to make it more clear what code is specific to what app type (plain Direct3D or XAML)
--HG--
rename : src/core/winrt/SDL_winrtapp.cpp => src/core/winrt/SDL_winrtapp_direct3d.cpp
rename : src/core/winrt/SDL_winrtapp.h => src/core/winrt/SDL_winrtapp_direct3d.h
rename : src/core/winrt/SDL_winrtxaml.cpp => src/core/winrt/SDL_winrtapp_xaml.cpp
rename : src/core/winrt/SDL_winrtxaml_cpp.h => src/core/winrt/SDL_winrtapp_xaml.h
2013-09-06 21:13:15 -04:00
David Ludwig
63a6d98f44 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
4348ee8893 WinRT: more renaming of "windowsrt" to "winrt"
--HG--
rename : include/SDL_config_windowsrt.h => include/SDL_config_winrt.h
2013-09-04 19:55:45 -04:00
David Ludwig
12ca6364f9 WinRT: renamed a mouse-related header file for naming-consistency's sake
--HG--
rename : src/video/winrt/SDL_winrtmouse.h => src/video/winrt/SDL_winrtmouse_c.h
2013-09-02 15:29:46 -04:00
David Ludwig
76c97b1caa WinRT: misc code cleanups regarding touch and mouse events, and also SDL-internal globals 2013-09-02 15:23:33 -04:00
David Ludwig
edb51d8485 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
5248a0701d 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
643ea6407e WinRT: renamed "windowsrt" directories to "winrt"
--HG--
rename : src/joystick/windowsrt/SDL_xinputjoystick.c => src/joystick/winrt/SDL_xinputjoystick.c
rename : src/main/windowsrt/SDL_winrt_main.cpp => src/main/winrt/SDL_winrt_main.cpp
2013-08-27 12:33:36 -04:00
David Ludwig
690391390b WinRT: misc code cleanups 2013-08-27 11:39:44 -04:00
David Ludwig
b06f02e4e5 WinRT: moved most platform-specific keyboard and mouse code to shared locations 2013-08-26 17:17:53 -04:00
David Ludwig
bfb6a12e2c 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)

--HG--
rename : src/video/windowsrt/SDL_WinRTApp.cpp => src/core/winrt/SDL_winrtapp.cpp
rename : src/video/windowsrt/SDL_WinRTApp.h => src/core/winrt/SDL_winrtapp.h
rename : src/core/windowsrt/SDL_winrtpaths.cpp => src/core/winrt/SDL_winrtpaths.cpp
rename : src/video/windowsrt/SDL_winrtevents.cpp => src/video/winrt/SDL_winrtevents.cpp
rename : src/video/windowsrt/SDL_winrtevents_c.h => src/video/winrt/SDL_winrtevents_c.h
rename : src/video/windowsrt/SDL_winrtmouse.cpp => src/video/winrt/SDL_winrtmouse.cpp
rename : src/video/windowsrt/SDL_winrtmouse.h => src/video/winrt/SDL_winrtmouse.h
rename : src/video/windowsrt/SDL_winrtvideo.cpp => src/video/winrt/SDL_winrtvideo.cpp
rename : src/video/windowsrt/SDL_winrtvideo.h => src/video/winrt/SDL_winrtvideo.h
2013-08-20 21:22:32 -04:00
David Ludwig
ef0a40b704 WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0 2013-08-13 20:09:52 -04:00
David Ludwig
6f8a3ac5cf WinRT: fixed XInput-related linker errors on non-x86 platforms (such as ARM) 2013-05-20 11:09:08 -04:00
David Ludwig
b919f57c12 WinRT: added preliminary joystick / game controller support (minus hotplugging) 2013-05-19 23:30:34 -04:00
David Ludwig
63b227b811 WinRT: made sure SDL_GameController APIs get linked in (to SDL.dll) 2013-05-11 21:54:10 -04:00
David Ludwig
3a0f7dfe30 WinRT: build fixes for the loopwave and testthread test apps 2013-04-14 12:06:58 -04:00
David Ludwig
b74856f7b7 WinRT: added texture channel color-modulation support for D3D 11.1
--HG--
rename : src/render/direct3d11/SDL_D3D11_PixelShader_TextureCopy.hlsl => src/render/direct3d11/SDL_D3D11_PixelShader_TextureColored.hlsl
2013-04-07 22:35:58 -04:00
David Ludwig
8a321ffe64 WinRT: made GPU shaders get compiled at a lower level, for compatibility: 4_0_level_9_1 2013-02-24 10:41:35 -05:00
David Ludwig
0464946409 WinRT: moved the default vertex shader into the Direct3D 11.1 renderer's folder
--HG--
rename : src/video/windowsrt/SimpleVertexShader.hlsl => src/render/direct3d11/SDL_D3D11_VertexShader_Default.hlsl
2013-02-24 10:11:58 -05:00
David Ludwig
a53fe847a1 WinRT: cleaned up headers in src\video\windowsrt\ 2013-02-24 10:02:57 -05:00
David Ludwig
c895496828 WinRT: implemented SDL_RenderFillRect and SDL_RenderFillRects for the D3D 11.1 renderer
--HG--
rename : src/video/windowsrt/SimplePixelShader.hlsl => src/render/direct3d11/SDL_D3D11_PixelShader_TextureCopy.hlsl
2013-02-16 09:10:43 -05:00
David Ludwig
46530ef818 WinRT: made use of SDL's framebuffer emulation code, instead of the custom stuff; then removed SDL_winrtrenderer 2013-02-09 19:39:42 -05:00
David Ludwig
4b6b1755fe WinRT: provided access, via SDL_GetWindowWMInfo, to SDL's WinRT CoreWindow 2013-02-09 14:35:06 -05:00
David Ludwig
e14a2fd8b6 WinRT: use OS-native vsnprintf, which allows SDL_Log to format wide strings (via %ls) 2013-02-03 12:33:15 -05:00
David Ludwig
f7b08ae60b WinRT: started refactoring Direct3D 11.1 code into a new SDL_Renderer backend 2013-02-02 19:32:44 -05:00
David Ludwig
cb26260357 WinRT: re-added SDL's MSVC project file, which I accidentally deleted (oops!) 2013-01-28 23:19:13 -05:00
David Ludwig
62303fa63a WinRT: made project file name include "WinRT", in order to make it distinct from a future WinPhone project
--HG--
rename : VisualC-WinRT/SDL/SDL_VS2012.vcxproj.filters => VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters
rename : VisualC-WinRT/SDL_VS2012.sln => VisualC-WinRT/SDL_VS2012-WinRT.sln
2013-01-28 22:03:12 -05:00
David Ludwig
240e6d6b71 WinRT: separated Win32 and WinRT project files
--HG--
rename : VisualC/SDL/SDL_VS2012_WinRT.vcxproj => VisualC-WinRT/SDL/SDL_VS2012.vcxproj
rename : VisualC/SDL/SDL_VS2012_WinRT.vcxproj.filters => VisualC-WinRT/SDL/SDL_VS2012.vcxproj.filters
rename : VisualC/SDL_VS2012_WinRT.sln => VisualC-WinRT/SDL_VS2012.sln
rename : VisualC/tests/loopwave/WinRT/Assets/Logo.png => VisualC-WinRT/tests/loopwave/Assets/Logo.png
rename : VisualC/tests/loopwave/WinRT/Assets/SmallLogo.png => VisualC-WinRT/tests/loopwave/Assets/SmallLogo.png
rename : VisualC/tests/loopwave/WinRT/Assets/SplashScreen.png => VisualC-WinRT/tests/loopwave/Assets/SplashScreen.png
rename : VisualC/tests/loopwave/WinRT/Assets/StoreLogo.png => VisualC-WinRT/tests/loopwave/Assets/StoreLogo.png
rename : VisualC/tests/loopwave/WinRT/Package.appxmanifest => VisualC-WinRT/tests/loopwave/Package.appxmanifest
rename : VisualC/tests/loopwave/WinRT/loopwave_VS2012_WinRT.vcxproj => VisualC-WinRT/tests/loopwave/loopwave_VS2012.vcxproj
rename : VisualC/tests/loopwave/WinRT/loopwave_VS2012_WinRT_TemporaryKey.pfx => VisualC-WinRT/tests/loopwave/loopwave_VS2012_TemporaryKey.pfx
rename : VisualC/tests/testthread/WinRT/Assets/Logo.png => VisualC-WinRT/tests/testthread/Assets/Logo.png
rename : VisualC/tests/testthread/WinRT/Assets/SmallLogo.png => VisualC-WinRT/tests/testthread/Assets/SmallLogo.png
rename : VisualC/tests/testthread/WinRT/Assets/SplashScreen.png => VisualC-WinRT/tests/testthread/Assets/SplashScreen.png
rename : VisualC/tests/testthread/WinRT/Assets/StoreLogo.png => VisualC-WinRT/tests/testthread/Assets/StoreLogo.png
rename : VisualC/tests/testthread/WinRT/Package.appxmanifest => VisualC-WinRT/tests/testthread/Package.appxmanifest
rename : VisualC/tests/testthread/WinRT/testthread_VS2012_WinRT.vcxproj => VisualC-WinRT/tests/testthread/testthread_VS2012.vcxproj
rename : VisualC/tests/testthread/WinRT/testthread_VS2012_WinRT_TemporaryKey.pfx => VisualC-WinRT/tests/testthread/testthread_VS2012_TemporaryKey.pfx
2013-01-23 23:42:50 -05:00