← Back to team overview

kicad-developers team mailing list archive

Re: Linux support for wxGLCanvas and Wayland/EGL

 

Hi Ian,

I'm fine with adding glew to the third party directory.  I'm assuming
that the plan would be to use cmake to determine if EGL support was
required and build glew accordingly.

Cheers,

Wayne

On 9/28/20 6:42 PM, Ian McInerney wrote:
> The upcoming wxWidgets 3.1.5 release has added a new backend supporting
> Wayland/EGL to the wxGLCanvas that we use for displaying the OpenGL
> drawing canvas. This backend appears to be the new default backend for
> wxGTK unless it is explicitly disabled on the wxWidgets configure step
> (you pass --disable-glcanvasegl to the configure script). It is also not
> currently possible to change this backend at runtime. This means that we
> will be forced to use whatever the distro-defaults are for the canvas
> backend once wx 3.1/3.2 is being used in the wild.
> 
> I was just working with it some, and our main bottleneck for supporting
> it natively is currently the GLEW dependency we have in our rendering
> code. GLEW requires a compile-time selection of either X11 or EGL
> backends, and all distributions seem to only ship a library built for
> the X11 backend.
> 
> I have done some experimenting, and building a version of GLEW that is
> meant for EGL is fairly simple and uses a single C file and the public
> headers. It can be compiled into a static library that we then link into
> our code, so we don't actually need to bundle a shared library. My
> thinking currently is that we provide these GLEW files in the
> thirdparty directory, and only use them if a specific compile-time
> option to use EGL is provided. That will mean that linux packaging will
> still use distro-provided GLEW libraries when using the X11 backend, and
> if the distro can supply an EGL-capable GLEW version we can try to use
> that (I am not sure how the distros will manage this though).
> 
> -Ian
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References