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.
This commit is contained in:
David Ludwig 2013-11-04 19:54:29 -05:00
parent 7cc0951637
commit 749117acd9
12 changed files with 419 additions and 35 deletions

View file

@ -166,6 +166,15 @@ typedef unsigned int uintptr_t;
#define SDL_VIDEO_DRIVER_WINRT 1
#define SDL_VIDEO_DRIVER_DUMMY 1
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP /* TODO, WinRT: try adding OpenGL ES 2 support for Windows Phone 8 */
/* Uncomment the following two #defines to enable experimental OpenGL ES 2 support
(via a WinRT port of the ANGLE library).
*/
//#define SDL_VIDEO_OPENGL_ES2 1
//#define SDL_VIDEO_OPENGL_EGL 1
#endif
// TODO, WinRT: Get a Direct3D 11 based renderer working in SDL.
/* Enable appropriate renderer(s) */
#define SDL_VIDEO_RENDER_D3D11 1