Ryujinx-SDL/src/render
Sam Lantinga ecea3c4a24 Fixed bug 3169 - GLES2_CreateRenderer does not check SDL_GL_GetAttribute result, causing use of uninitialized data
Yann Dirson

When attempting to force use of opengles2 renderer with:

    int wanted_renderer = -1;
     for (int i = 0; i < numrenderers; i++) {
 	SDL_RendererInfo renderer_info;
 	if (SDL_GetRenderDriverInfo(i, &renderer_info) != 0) {
 	    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't get renderer driver info: %s\n",
 			 SDL_GetError());
 	    quit(2);
 	}
 	std::cerr << "Renderer " << i << " '" << renderer_info.name << "': flags=0x"
 		  << std::hex << renderer_info.flags << std::dec
 		  << ", " << renderer_info.num_texture_formats << " texture formats, max="
 		  << renderer_info.max_texture_width << "x"
 		  << renderer_info.max_texture_height << "\n";
	if (!strcmp(renderer_info.name, "opengles2")) {
	    std::cerr << " selecting!\n";
	    wanted_renderer = i;
	}
     }

    renderer = SDL_CreateRenderer(window, wanted_renderer, 0);

... on banana pi or raspberry pi I get an error like the following (the actual
context profile value varies, being used uninitialized)

 ERROR: Couldn't create renderer: Unknown OpenGL context profile 900

With this patch I get the following, which should help more pointing to a real problem:

 ERROR: Couldn't create renderer: Failed getting OpenGL glGetString entry point

I pushed a patch (based on master branch of unofficial git mirror):

550389c89f


I'll be opening a different bug for the underlying issue.
2016-10-01 13:33:32 -07:00
..
direct3d Fixed bug 3345 - SDL_RenderClear inconsistency with ClipRect 2016-10-01 11:46:32 -07:00
direct3d11 Fixed bug 3336 - Failure to build with MinGW-w64 2016-10-01 10:28:00 -07:00
opengl Fixed bug 3345 - SDL_RenderClear inconsistency with ClipRect 2016-10-01 11:46:32 -07:00
opengles Fixed bug 3422 - OpenGL ES 1.1 renderer: SDL_UpdateTexture breaks later function calls (missing glDisable) 2016-10-01 13:07:36 -07:00
opengles2 Fixed bug 3169 - GLES2_CreateRenderer does not check SDL_GL_GetAttribute result, causing use of uninitialized data 2016-10-01 13:33:32 -07:00
psp PSP: Fixed returning success from unsupported SDL_RenderReadPixels(). 2016-04-01 21:13:58 +02:00
software Fixed spacing 2016-09-13 18:44:28 -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 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_d3dmath.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_render.c Fixed bug 3174 - SDL_SetRenderTarget clip rect 2016-10-01 13:29:30 -07:00
SDL_sysrender.h SDL_RenderSetIntegerScale 2016-01-05 16:39:18 -05:00
SDL_yuv_mmx.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_yuv_sw_c.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_yuv_sw.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00