]> gitweb.factorcode.org Git - factor.git/commitdiff
opengl.capabilities: Try to throw linux Radeon users a bone for getting around having...
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 8 Jun 2014 06:06:25 +0000 (23:06 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 8 Jun 2014 06:06:25 +0000 (23:06 -0700)
See http://ubuntuforums.org/showthread.php?t=2228534&p=13044229#post13044229
(Does anyone know the best fix for this!?)

basis/opengl/capabilities/capabilities.factor

index 1cc35c3a391a3ff0ebac869f40f1fe3296cdc297..df324a5c5d3cff36dd0e60885a225f39997f173f 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Joe Groff.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel namespaces make sequences splitting opengl.gl
-continuations math.parser math arrays sets strings math.order fry ;
+USING: arrays fry kernel make math.order math.parser opengl.gl
+sequences sets splitting strings system ;
 IN: opengl.capabilities
 
 : (require-gl) ( thing require-quot make-error-quot -- )
@@ -39,7 +39,11 @@ IN: opengl.capabilities
     gl-version [ version-before? ] [ drop f ] if* ;
 
 : (make-gl-version-error) ( required-version -- )
-    "Required OpenGL version " % % " not supported (" % gl-version "(null)" or % " available)" % ;
+    "Required OpenGL version " % % " not supported (" % gl-version "(null)" or % " available)" %
+    os linux = [
+        "\nIf you have several libGL.so installed, Factor tried the first one in: ldconfig -p | grep libGL.so$" %
+        "\nYou can change the library used like so: LD_LIBRARY_PATH=/usr/lib/fglrx ./factor" %
+    ] when ;
 
 : require-gl-version ( version -- )
     [ has-gl-version? ]