mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-02-17 20:34:28 +01:00
WinRT: enable the OpenGL ES 2 SDL_Renderer backend, if and when OpenGL ES 2 support is compiled in
This commit is contained in:
parent
ecfbb3f5dc
commit
b6f80d855e
@ -104,6 +104,8 @@
|
|||||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
|
||||||
|
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||||
<ClCompile Include="..\..\src\render\SDL_yuv_mmx.c" />
|
<ClCompile Include="..\..\src\render\SDL_yuv_mmx.c" />
|
||||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||||
@ -284,6 +286,8 @@
|
|||||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_d3d11_cpp.h" />
|
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_d3d11_cpp.h" />
|
||||||
<ClInclude Include="..\..\src\render\mmx.h" />
|
<ClInclude Include="..\..\src\render\mmx.h" />
|
||||||
|
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||||
|
<ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h" />
|
||||||
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
|
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
|
||||||
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
|
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
|
||||||
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
|
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
|
||||||
|
@ -285,6 +285,12 @@
|
|||||||
<ClCompile Include="..\..\src\video\winrt\SDL_winrtopengles.cpp">
|
<ClCompile Include="..\..\src\video\winrt\SDL_winrtopengles.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\include\begin_code.h">
|
<ClInclude Include="..\..\include\begin_code.h">
|
||||||
@ -635,6 +641,12 @@
|
|||||||
<ClInclude Include="..\..\include\SDL_egl.h">
|
<ClInclude Include="..\..\include\SDL_egl.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\render\opengles2\SDL_shaders_gles2.h">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
|
@ -179,6 +179,10 @@ typedef unsigned int uintptr_t;
|
|||||||
/* Enable appropriate renderer(s) */
|
/* Enable appropriate renderer(s) */
|
||||||
#define SDL_VIDEO_RENDER_D3D11 1
|
#define SDL_VIDEO_RENDER_D3D11 1
|
||||||
|
|
||||||
|
#if SDL_VIDEO_OPENGL_ES2
|
||||||
|
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Enable system power support */
|
/* Enable system power support */
|
||||||
// TODO, WinRT: investigate system power support. The Win32-based APIs don't work on WinRT.
|
// TODO, WinRT: investigate system power support. The Win32-based APIs don't work on WinRT.
|
||||||
#define SDL_POWER_DISABLED 1
|
#define SDL_POWER_DISABLED 1
|
||||||
|
@ -1772,6 +1772,14 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __WINRT__
|
||||||
|
/* DLudwig, 2013-11-29: ANGLE for WinRT doesn't seem to work unless VSync
|
||||||
|
* is turned on. Not doing so will freeze the screen's contents to that
|
||||||
|
* of the first drawn frame.
|
||||||
|
*/
|
||||||
|
flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (flags & SDL_RENDERER_PRESENTVSYNC) {
|
if (flags & SDL_RENDERER_PRESENTVSYNC) {
|
||||||
SDL_GL_SetSwapInterval(1);
|
SDL_GL_SetSwapInterval(1);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user