/* * Scol Voyager * * Author : The Scol Team : http://www.scolring.org/ * * This file is a part of the Scol Voyager * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA, or go to * http://www.gnu.org/copyleft/lesser.txt * * For others informations, please contact us from http://www.scolring.org/ * */ /* * Update 2014 12, 16 : S.BISARO ($IRI) : new tree files * */ //comm to navigator window defcomvar Px=;; /** getVoyagerVersionS [] S * retrive the Scol Voy@ger version * * return the Scol Voy@ger version in string **/ fun getVoyagerVersionS()= let strextr _getpack _checkpack "lib/locked/etc/version.txt" -> lver in let sizelist lver -> size in let nil -> curver in let 0 -> i in ( while (i < size) && (curver == nil) do ( let nth_list lver i -> elem in if strcmpi "version" hd elem then nil else set curver = hd tl elem; set i = i + 1; ); curver; );; /** commandToAx [S S] I * send a command to navigator window * * return 0 **/ fun commandToAx(func, param)= _onX Px strcatn func::" "::param::nil []; 0;; fun getBoolString(b)= if b then "Yes" else "No";; fun ConfigTest(minNbProc, minRam, minVPprofile, minFPprofile)= //_showconsole; let _GETactiveXWindow _channel WN_CHILD|WN_NOBORDER "ConfigTest" -> axwin in let _CRwindow _channel axwin 0 0 10 10 WN_NOCAPTION|WN_NOBORDER "video test buffer" -> win in let SO3BufferCreate _channel win 0 0 10 10 -> buffer in let SO3GetGeneralInfo -> [vendeurCPU nameCPU nbProcesseurs RAM OS GraphicCard Driver versionDirectX] in let SO3GetRenderInfo -> [maxtex nonpow nonpowlimited automipmap cubemap geoprog vertprog fragprog comptex fixedfun] in ( if axwin == nil then nil else _setX _channel; _fooS strcat "Constructor : " vendeurCPU; _fooS strcat "Cpu : " nameCPU; _fooS strcat "Nb Cpu : " nbProcesseurs; _fooS strcat "RAM (32bits) : " RAM; _fooS strcat "OS : " OS; _fooS strcat "Graphic card : " GraphicCard; _fooS strcat "CG Driver : " Driver; _fooS strcat "DirectX version : " versionDirectX; _fooS strcat "Maximum textures : " getBoolString maxtex; _fooS strcat "Non power of two textures support : " getBoolString nonpow; _fooS strcat "Non power of two textures support limited : " getBoolString nonpowlimited; _fooS strcat "Auto mipmap support : " getBoolString automipmap; _fooS strcat "Cube map support : " getBoolString cubemap; _fooS strcat "Geometry programs support : " getBoolString geoprog; _fooS strcat "Vertex programs support : " getBoolString vertprog; _fooS strcat "Fragment programs support : " getBoolString fragprog; _fooS strcat "Textures compression support : " getBoolString comptex; _fooS strcat "Fixed functions support : " getBoolString fixedfun; _fooS strcatn "Vertex program profile support for "::minVPprofile::" : "::(getBoolString (SO3IsShaderProfileSupported minVPprofile))::nil; _fooS strcatn "Fragment program profile support for "::minFPprofile::" : "::(getBoolString (SO3IsShaderProfileSupported minFPprofile))::nil; let if ((atoi minNbProc) == nil) || ((atoi nbProcesseurs) >= (atoi minNbProc)) then 1 else 0 -> nbp in let if ((atoi minRam) == nil) || ((atoi RAM) >= (atoi minRam)) then 1 else 0 -> ramp in let if (minVPprofile == nil) || (SO3IsShaderProfileSupported minVPprofile) then 1 else 0 -> vpp in let if (minFPprofile == nil) || (SO3IsShaderProfileSupported minFPprofile) then 1 else 0 -> fpp in ( if (nbp && ramp && vpp && fpp) then ( _fooS "Configuration : valid"; if axwin == nil then nil else commandToAx "SystemCheck" "OK"; 1; ) else ( _fooS "Configuration : not valid"; if axwin == nil then nil else commandToAx "SystemCheck" "KO"; 0; ); _DSwindow win; ); );;