[webkit-gtk] Building with wayland requires GLX for opengl support ?

Quentin SCHIBLER quentin.schibler at bbox.fr
Wed Mar 17 00:52:00 PDT 2021


I did, and it works, but I want to use OpenGL, not OpenGLES.
I used libepoxy only because I could not figure out how to make it works with egl and glvnd only. 
I'll send another mail if I do figure it out.
Thanks a lot for your help !On Mar 17, 2021 4:22 AM, Carlos Alberto Lopez Perez <clopez at igalia.com> wrote:
>
> On 16/03/2021 08:08, Quentin SCHIBLER wrote: 
> > Alright, I spend a few days trying to build it without glx and x11, which I achieved in the end. But it is mess. EGL is not supported out of the box because of OpenGLShims.h which doesn't get included. But including it causes issues because glx is not present. Looking at the source code it seems the workaround is to use libepoxy which is supported in WebCore thanks to webkit-wpe but not in webkit-gtk (there is already a bug report regarding this issue, but the proposed patch does not work anymore, and nothing has been done since 2020). So I had to hack in the support. Even with that, some auto-generated files still included EGL/egl.h instead of epoxy/egl.h, and I could not figure out how to prevent it, so I had to link egl+libepoxy, which is pretty ugly. 
> > Maybe I'll post a patch if I can solve the autogenerated files includes correctly 
>
> libepoxy is a library that allows to choose at run-time (instead of at 
> build-time) to use either libGL.so or libGLESv2.so 
>
> As you say, it is supported on WPEWebKit but not on WebKitGTK+. 
>
> Currently, on WebKitGTK+ you have to specify at build-time which type of 
> GL library you will have. 
>
> I wonder if you have tried to build WebKitGTK with "-DENABLE_GLES2=ON" 
> as I suggested a while ago? 


More information about the webkit-gtk mailing list