The goal of the OpenGL Extension Wrangler Library (GLEW) is to assist
C/C++ OpenGL developers with two tedious tasks: initializing and using
extensions and writing portable applications. GLEW provides an efficient
run-time mechanism to determine whether a certain extension is supported
by the driver or not. OpenGL core and extension functionality is exposed
via a single header file.
To enable Wayland support in GLEW for a specific application
$ LD_PRELOAD=libGLEW-wayland.so <application>
To enable for current session
$ export LD_LIBMAP=libGLEW.so.2=libGLEW-wayland.so.2
To enable globally
$ echo libGLEW.so.2 libGLEW-wayland.so.2 >>/etc/libmap.conf
wayland: add more mostly leaf ports to virtual category
Caveats:
- emulators/rpcs3: install qt5-wayland and ensure Renderer is Vulkan (default)
- mail/thunderbird: add MOZ_ENABLE_WAYLAND=1 via environ(7)
- www/chromium: add --ozone-platform=wayland on command line
- www/firefox-esr: add MOZ_ENABLE_WAYLAND=1 via environ(7)
- www/firefox: add MOZ_ENABLE_WAYLAND=1 via environ(7)
graphics/glew-wayland: drop X11 dependency after b44acc9409bdn
libGL is legacy GLX entry point, so maybe missing if libglvnd and/or
mesa-libs was built without X11 support.
$ make clean all deinstall install WITHOUT=X11 -C ../libglvnd
$ make clean all
[...]
===> glew-wayland-2.2.0_2 depends on shared library: libGL.so - not found
*** Error code 1
[...]
ld -shared -soname libGLEW-wayland.so.2 -o lib/libGLEW-wayland.so.2.2.0
tmp/freebsd/default/shared/glew.o -L/usr/local/lib -lEGL -lGL
ld: error: unable to find library -lGL
gmake[1]: *** [Makefile:123: lib/libGLEW-wayland.so.2.2.0] Error 1
graphics/glew-wayland: suggest LD_LIBMAP for session-local override
LD_LIBMAP can be limited to Wayland or KMS console e.g.,
$ cat >>~/.zshrc
if [[ ( -n $WAYLAND_DISPLAY || -z $DISPLAY ) && $LD_LIBMAP != *GLEW-wayland* ]];
then
export LD_LIBMAP=libGLEW.so.2=libGLEW-wayland.so.2,$LD_LIBMAP
export SDL_VIDEODRIVER=wayland,kmsdrm,x11
fi
graphics/mesa-libs: Bump reverse deps for libglvnd
Per discussion with bapt on helping pkg handle the changing of these
deps and avoiding impossible upgrade senarios.
PR: 246767
Reviewed by: manu, bapt
Approved by: x11
Differential Revision: https://reviews.freebsd.org/D30824
graphics/glew-wayland: unbreak on GCC architectures
In file included from src/glew.c:43:
include/GL/eglew.h:115: error: redefinition of typedef 'EGLint'
/usr/local/include/EGL/eglplatform.h:158: error: previous declaration of
'EGLint' was here
$ gcc42 -xc -c -
typedef int foo;
typedef int foo;
^D
<stdin>:2: error: redefinition of typedef 'foo'
<stdin>:1: error: previous declaration of 'foo' was here
PR: 242310
Reported by: pkubaj
graphics/glew: add -wayland slave
SDL_VIDEODRIVER=wayland doesn't work with current glew package while
SDL_VIDEODRIVER=x11 doesn't work using this package. So, build against
libEGL instead of libX11 and let the user decide when to use.
Idea from: ArchLinux
Tested by: SDL (freeorion, ppsspp, renpy)