-
Notifications
You must be signed in to change notification settings - Fork 5
Wxwidgets x11 glcanvas
OpenCPN uses the WxGLCanvas widget to render its navigation maps.
This doesn't use any GTK+2/3 native widget, but a custom one, which makes direct calls to the underlying GLX API to open a visual context. Code is mainly found in :
- include/wx/glcanvas.cpp
- src/gtk/glcanvas.cpp
- src/unix/glx11.cp
The problem is, Wayland doesn't support GLX but only a specific flavor of EGL.
A proper solution would have been to implement a new EGL-based version of the widget, but as we wanted to port the software with minimum effort, we used the EGLX wrapper instead (which we just coded for this purpose).
Here is glxgears
, a sample application built with EGLX support from the recipe :
So, after having wrapped most X11/GLX calls to Wayland/EGL ones, we just modified the wxWidgets source code with this patch for 2.95 and recompiled against it.
Previous step : wxWidgets window resizing
Next step : opencpn GL direct calls