opengl.capabilities: Try to throw linux Radeon users a bone for getting around having two libGL.so installed.

See http://ubuntuforums.org/showthread.php?t=2228534&p=13044229#post13044229
(Does anyone know the best fix for this!?)
db4
Doug Coleman 2014-06-07 23:06:25 -07:00
parent d614084550
commit 1b29731927
1 changed files with 7 additions and 3 deletions

View 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? ]