Yesterday I felt a bit useless, so I started working on some minor problems on Gentoo/FreeBSD. One of them was revdep-rebuild not working (that now is going to be fixed as with a couple of changes is fixed) and the missing libGL.so.1.
While the first problem was easy to resolve, the second is a bit more complex: libGL.so.1 links to libGL.so.1.2… that doesn’t exists at all on xorg-x11 as installed on G/FBSD. I’ll wait for modular X to compile on G/FBSD and then I’ll try to fix that if the problem is not getting fixed by itself.
To resolve it for me (and Alberto who asked me for it), I though of hacking a bit on nVidia drivers, as there are drivers for FreeBSD, too.
The result of this is a modified nvidia-glx that works on Linux and FreeBSD without problems, and an nvidia-freebsd ebuild for the kernel-level driver. At this point if you want OpenGL acceleration on Gentoo/FreeBSD with a nVidia card, you just need to do this (make sure you have an enough up-to-date overlay):
echo ‘agp_load=“NO”’ > /boot/loader.conf
so that it will install both the kernel driver and the Xorg drivers, extensions and the rest (note: linux emulation support is still unsupported right now, as for everything), and then disable loading FreeBSD’s AGP support (nVidia suggest to use their implementation on FreeBSD, so the driver is built without FreeBSd’s AGP support… I’ll add an useflag later to enable FreeBSD’s AGP support in case).
Reboot and you’ll have OpenGL acceleration.