sdl2_frt/src/render
Sam Lantinga 9fd0d6191c Fixed bug 3821 - Allow SDL_CreateWindow and SDL_CreateRenderer with OpenGL ES 3.0 (GLES3) for Angle (Windows)
Carlos

Angle supports GLES3 but when using these functions (SDL_CreateWindow and SDL_CreateRenderer), defaults again to GLES2.0.

A current workaround (hack) to retrieve a GLES3.0 context with Angle is:

1) set

    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);

after InitSDL AND after calling SDL_CreateWindow  (before SDL_CreateRenderer)

2) Comment lines 2032-2044 in SDL_render_gles2.c, funtion GLES2_CreateRenderer

    window_flags = SDL_GetWindowFlags(window);
    if (!(window_flags & SDL_WINDOW_OPENGL) ||
        profile_mask != SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {

        changed_window = SDL_TRUE;
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, RENDERER_CONTEXT_MAJOR);
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, RENDERER_CONTEXT_MINOR);

        if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
            goto error;
        }
    }

This retrives a GLES3 context as confirmed using glGetString(GL_VERSION). This should be fixed by modifying a few if's.
2017-10-18 08:52:04 -07:00
..
direct3d Fixed building SDL applications with Visual Studio and the clang toolset 2017-08-19 03:07:44 -07:00
direct3d11 Implemented more flexible blending modes for accelerated renderers 2017-08-14 05:51:44 -07:00
opengl Fixed bug 3857 - SDL_ConvertPixels misses YUV conversions 2017-10-06 16:50:24 -07:00
opengles Implemented more flexible blending modes for accelerated renderers 2017-08-14 05:51:44 -07:00
opengles2 Fixed bug 3821 - Allow SDL_CreateWindow and SDL_CreateRenderer with OpenGL ES 3.0 (GLES3) for Angle (Windows) 2017-10-18 08:52:04 -07:00
psp Fixed bug 3297 - Horizontal and Vertical flip swapped on PSP 2017-08-11 20:54:06 -07:00
software Fixed bug 3788 - software renderer crashes in SDL_RenderCopyEx with rotation and dstrect w or h is 0 2017-09-21 01:22:40 -07:00
mmx.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_d3dmath.c Fixed bug 2755 - SDL2 fails to build on Solaris 10 u3 2017-08-13 21:55:42 -07:00
SDL_d3dmath.h Fixed bug 2755 - SDL2 fails to build on Solaris 10 u3 2017-08-13 21:55:42 -07:00
SDL_render.c Normalize touch events to the render viewport (thanks Sylvain!) 2017-10-12 08:37:55 -07:00
SDL_sysrender.h Implemented more flexible blending modes for accelerated renderers 2017-08-14 05:51:44 -07:00
SDL_yuv_mmx_c.h Fixed building on various versions of GCC - YUV MMX code is disabled for now 2017-08-07 10:28:59 -07:00
SDL_yuv_mmx.c Fixed building on various versions of GCC - YUV MMX code is disabled for now 2017-08-07 10:28:59 -07:00
SDL_yuv_sw_c.h Fixed building on various versions of GCC - YUV MMX code is disabled for now 2017-08-07 10:28:59 -07:00
SDL_yuv_sw.c Fixed bug 3857 - SDL_ConvertPixels misses YUV conversions 2017-10-06 16:50:24 -07:00