! 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 -- )
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? ]