WinRT: enabled OpenGL ES 2 support on Windows Phone
authorDavid Ludwig <dludwig@pobox.com>
Sun, 02 Nov 2014 10:32:25 -0500
changeset 9213c9980967d08a
parent 9212 6b9794bae8ed
child 9214 dad92c567585
WinRT: enabled OpenGL ES 2 support on Windows Phone

The "future-dev" branch of MSOpenTech's ANGLE/WinRT repository (at
https://github.com/msopentech/angle) includes support for Windows Phone 8.1.
This change allows it to be used in conjunction with SDL's OpenGL functions.
VisualC-WinRT/WinPhone80_VS2012/SDL-WinPhone80.vcxproj
VisualC-WinRT/WinPhone80_VS2012/SDL-WinPhone80.vcxproj.filters
include/SDL_config_winrt.h
     1.1 --- a/VisualC-WinRT/WinPhone80_VS2012/SDL-WinPhone80.vcxproj	Sun Nov 02 09:02:01 2014 -0500
     1.2 +++ b/VisualC-WinRT/WinPhone80_VS2012/SDL-WinPhone80.vcxproj	Sun Nov 02 10:32:25 2014 -0500
     1.3 @@ -237,6 +237,8 @@
     1.4      <ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
     1.5      <ClInclude Include="..\..\src\render\direct3d11\SDL_render_winrt.h" />
     1.6      <ClInclude Include="..\..\src\render\mmx.h" />
     1.7 +    <ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
     1.8 +    <ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h" />
     1.9      <ClInclude Include="..\..\src\render\SDL_d3dmath.h" />
    1.10      <ClInclude Include="..\..\src\render\SDL_sysrender.h" />
    1.11      <ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
    1.12 @@ -264,6 +266,7 @@
    1.13      <ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
    1.14      <ClInclude Include="..\..\src\video\SDL_blit_copy.h" />
    1.15      <ClInclude Include="..\..\src\video\SDL_blit_slow.h" />
    1.16 +    <ClInclude Include="..\..\src\video\SDL_egl_c.h" />
    1.17      <ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
    1.18      <ClInclude Include="..\..\src\video\SDL_rect_c.h" />
    1.19      <ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
    1.20 @@ -272,6 +275,7 @@
    1.21      <ClInclude Include="..\..\src\video\winrt\SDL_winrtevents_c.h" />
    1.22      <ClInclude Include="..\..\src\video\winrt\SDL_winrtmessagebox.h" />
    1.23      <ClInclude Include="..\..\src\video\winrt\SDL_winrtmouse_c.h" />
    1.24 +    <ClInclude Include="..\..\src\video\winrt\SDL_winrtopengles.h" />
    1.25      <ClInclude Include="..\..\src\video\winrt\SDL_winrtvideo_cpp.h" />
    1.26    </ItemGroup>
    1.27    <ItemGroup>
    1.28 @@ -345,6 +349,8 @@
    1.29        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
    1.30        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
    1.31      </ClCompile>
    1.32 +    <ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
    1.33 +    <ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
    1.34      <ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
    1.35      <ClCompile Include="..\..\src\render\SDL_render.c" />
    1.36      <ClCompile Include="..\..\src\render\SDL_yuv_mmx.c" />
    1.37 @@ -387,6 +393,7 @@
    1.38      <ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
    1.39      <ClCompile Include="..\..\src\video\SDL_bmp.c" />
    1.40      <ClCompile Include="..\..\src\video\SDL_clipboard.c" />
    1.41 +    <ClCompile Include="..\..\src\video\SDL_egl.c" />
    1.42      <ClCompile Include="..\..\src\video\SDL_fillrect.c" />
    1.43      <ClCompile Include="..\..\src\video\SDL_pixels.c" />
    1.44      <ClCompile Include="..\..\src\video\SDL_rect.c" />
    1.45 @@ -419,6 +426,12 @@
    1.46        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
    1.47        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
    1.48      </ClCompile>
    1.49 +    <ClCompile Include="..\..\src\video\winrt\SDL_winrtopengles.cpp">
    1.50 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
    1.51 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
    1.52 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
    1.53 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
    1.54 +    </ClCompile>
    1.55      <ClCompile Include="..\..\src\video\winrt\SDL_winrtpointerinput.cpp">
    1.56        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
    1.57        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
     2.1 --- a/VisualC-WinRT/WinPhone80_VS2012/SDL-WinPhone80.vcxproj.filters	Sun Nov 02 09:02:01 2014 -0500
     2.2 +++ b/VisualC-WinRT/WinPhone80_VS2012/SDL-WinPhone80.vcxproj.filters	Sun Nov 02 10:32:25 2014 -0500
     2.3 @@ -360,6 +360,18 @@
     2.4      <ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h">
     2.5        <Filter>Source Files</Filter>
     2.6      </ClInclude>
     2.7 +    <ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h">
     2.8 +      <Filter>Source Files</Filter>
     2.9 +    </ClInclude>
    2.10 +    <ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h">
    2.11 +      <Filter>Source Files</Filter>
    2.12 +    </ClInclude>
    2.13 +    <ClInclude Include="..\..\src\video\winrt\SDL_winrtopengles.h">
    2.14 +      <Filter>Source Files</Filter>
    2.15 +    </ClInclude>
    2.16 +    <ClInclude Include="..\..\src\video\SDL_egl_c.h">
    2.17 +      <Filter>Source Files</Filter>
    2.18 +    </ClInclude>
    2.19    </ItemGroup>
    2.20    <ItemGroup>
    2.21      <ClCompile Include="..\..\src\atomic\SDL_atomic.c">
    2.22 @@ -650,5 +662,17 @@
    2.23      <ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c">
    2.24        <Filter>Source Files</Filter>
    2.25      </ClCompile>
    2.26 +    <ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c">
    2.27 +      <Filter>Source Files</Filter>
    2.28 +    </ClCompile>
    2.29 +    <ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c">
    2.30 +      <Filter>Source Files</Filter>
    2.31 +    </ClCompile>
    2.32 +    <ClCompile Include="..\..\src\video\winrt\SDL_winrtopengles.cpp">
    2.33 +      <Filter>Source Files</Filter>
    2.34 +    </ClCompile>
    2.35 +    <ClCompile Include="..\..\src\video\SDL_egl.c">
    2.36 +      <Filter>Source Files</Filter>
    2.37 +    </ClCompile>
    2.38    </ItemGroup>
    2.39  </Project>
    2.40 \ No newline at end of file
     3.1 --- a/include/SDL_config_winrt.h	Sun Nov 02 09:02:01 2014 -0500
     3.2 +++ b/include/SDL_config_winrt.h	Sun Nov 02 10:32:25 2014 -0500
     3.3 @@ -173,10 +173,8 @@
     3.4  #define SDL_VIDEO_DRIVER_DUMMY  1
     3.5  
     3.6  /* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
     3.7 -#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP    /* TODO, WinRT: try adding OpenGL ES 2 support for Windows Phone 8 */
     3.8  #define SDL_VIDEO_OPENGL_ES2 1
     3.9  #define SDL_VIDEO_OPENGL_EGL 1
    3.10 -#endif
    3.11  
    3.12  /* Enable appropriate renderer(s) */
    3.13  #define SDL_VIDEO_RENDER_D3D11  1