We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1520

Summary: The EGL code doesn't work on 64-bit
Product: SDL Reporter: Neil Roberts <neil>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: gabomdq, shirishag75
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: Patch to fix

Description Neil Roberts 2012-06-15 03:26:05 UTC
Created attachment 877 [details]
Patch to fix

Please see the patch
Comment 1 Gabriel Jacobo 2012-06-20 13:38:36 UTC
I wanted to verify this patch as it seems simple enough but I have nVidia propietary drivers installed in my 64bit Linux, and it seems that the Mesa GLES stuff doesn't play along with it...

libEGL warning: DRI2: failed to authenticate
Couldn't create renderer: 

Also, with the Mesa EGL stuff installed I also loose the OpenGL backend.
Comment 2 Neil Roberts 2012-07-06 06:13:21 UTC
If it helps, I've tested this with the Mesa GLES2 stuff and it seems to work fine. I am using it with Cogl¹.

You might have better luck testing on nVidia if you set LIBGL_ALWAYS_SOFTWARE=1 to force it to use software rendering.

You can compile Mesa with both GL and GLES2 support as long as you pass the --enable-shared-glapi configure option.

It doesn't work to compile SDL with both GLES2 and GL. It compiles but half of the code will try to use GL and the other half GLES2 so it falls apart. It looks like it would only need minor tweaking to fix this though and make it run-time selectable. It would be really great if there was some API to select this, but I guess I should file that as a separate bug.

1. http://cogl3d.org/
   http://git.gnome.org/browse/cogl/commit/?id=6cb5ab41355e7bfe28f
Comment 3 Gabriel Jacobo 2012-07-06 06:26:27 UTC
Yep, we discussed using an environment variable to set the preference when both GL and GLES are available (currently it defaults to GLES and in systems like mine it flat out does not work).
Comment 4 Gabriel Jacobo 2013-11-19 22:56:54 UTC
I'm 99.99% certain this is fixed now :)