]> gitweb.factorcode.org Git - factor.git/commitdiff
opengl.gl: Try libGL.so.1 before libGL.so
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 18 Aug 2017 02:30:51 +0000 (21:30 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 18 Aug 2017 02:38:33 +0000 (21:38 -0500)
This patch makes it prefer nvidia/amd drivers on Debian and hopefully other systems.
Related to #1827.

basis/opengl/gl/gl.factor

index 48c05ce989e8e69f4e0c8219fb6494655379cf63..e0a0e072b5291106a01cab45d8ce4bd85fba3606 100644 (file)
@@ -2,8 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 
 ! This file is based on the gl.h that comes with xorg-x11 6.8.2
-USING: alien alien.c-types alien.libraries alien.syntax
-io.encodings.ascii kernel opengl.gl.extensions system ;
+USING: alien alien.c-types alien.libraries
+alien.libraries.finder alien.syntax io.encodings.ascii kernel
+opengl.gl.extensions system ;
 FROM: alien.c-types => short ;
 IN: opengl.gl
 
@@ -629,7 +630,7 @@ LIBRARY: gl
 
 <<
 os linux? [
-    "gl" "libGL.so" cdecl add-library
+    "gl" { "libGL.so.1" "libGL.so" } find-library-from-list cdecl add-library
 ] when
 >>