Graphics.NewbieLaunchingDoug - lordmundi/wikidoctest GitHub Wiki
« Hello World | NewbieIndex | Hello Cube »
I unpacked EDGE into my home directory, it had lots of stuff. Looks like the start-up script is run_graphics. It sources the environment edge_env, then calls the executable
| run_graphics | || | /bin/rm -f loads.cfg
# Source the common settings
source edge_env
# Default the executable string for DOUG
set doug_exec="./bin_${VR_HOST_CPU}/doug"
set doug_comm_mode="standalone"
set doug_config_file="cev.cfg"
# Check to see if we want to run in the debugger
if ( $?EDGE_DEBUG ) then
set doug_exec="gdb --args $doug_exec"
# Set up SHELL to point to our special shell that doesn't source
# startup files
setenv SHELL `pwd`/debug_shell
echo "Detected EDGE_DEBUG env variable set. Running doug inside gdb."
endif
$doug_exec -double -mode $doug_comm_mode -config $doug_config_file -DEDGE_SETTINGS_FILE="edge_settings.cfg" -qu
iet $* |
| Here it is, the starting point, it sets up the Unix environment which Doug needs, then runs Doug. |
Notice the way we launch doug on the command line, it looks something like this
| | || | ./bin_${VR_HOST_CPU}/doug | | Aha! This is the nugget. This is where the Doug binary executable is called. I notice you admiring the commandline options. Well, have a look into the other options. See Appendix |
| edge_env | || | if ( $?USERDATA ) then echo "== Using $USERDATA as the doug user customization dir... ==" else setenv USERDATA ./userdata endif
# NVIDIA/Driver specific settings
setenv __GL_FSAA_MODE 7
setenv __GL_LOG_MAX_ANISO 4
setenv __GL_SYNC_TO_VBLANK 0
if (`uname` == "Darwin") then
setenv VR_HOST_CPU "Darwin"
setenv DOUG_HOST_CPU "Darwin"
setenv MISSION MACCEV
else
setenv VR_HOST_CPU "Linux_FC3"
setenv DOUG_HOST_CPU "Linux_FC3"
setenv MISSION CEV
endif
setenv VERSION `cat VERSION`
echo "== Starting ${VERSION} =="
setenv LD_LIBRARY_PATH ./lib_${VR_HOST_CPU}
setenv LD_LIBRARYN32_PATH ./lib_${VR_HOST_CPU}
# If there are any project specific environment settings, source them here
if (-e ${USERDATA}/user_env.csh) then
#echo Found $USERDATA/user_env.csh
source ${USERDATA}/user_env.csh
endif
# Now source the ${HOSTNAME}.csh files if they exist to override the environment
# and user customizations to configure EDGE based on computer specific performance
if ( -e ${USERDATA}/${HOST}_overwrite.csh ) then
echo "Found ${USERDATA}/${HOSTNAME}_overwrite.csh - sourcing..."
source ${USERDATA}/${HOST}_overwrite.csh
endif |
| Here's where the environment gets set up. Notice that userdata and user_env.csh are referenced/sourced in this file. User data is how the user customizes edge for their particular application, while keeping the doug "core" separate and upgradable. See this link for more information regarding user data. See Appendix |
Don't be afraid to have a look at the cev.cfg config file. I've heard not to touch this with a ten-foot pole. But I think you should. I am under the impression that if one denies the "config" file, one denies Doug. These config files are one of the main ways we configure what shows up in Doug. In the next section, we set up a config file to bring a simple cube into Doug
« Hello World | NewbieIndex | Hello Cube »