#   the .ini file for it-specific preferences.
#
#   Available commands:
#       SetPref name value
#       LockPref name value
#       LoadExtension class filename
#   
#   In addition, you can use standard safe-tcl commands
#   to perform calculations and substitutions.  We also
#   provide the following procs:
#       GetConfigDir - returns the path to the RAT etc dir.
#       GetResourceDir - returns the path to the internal App resources dir.
#       GetPref name - returns the current value of a pref.
#       LogMsg code msg - logs a message at a level indicated
#           by code which should be one of:
#               COPIOUS, INFO, NOTICE, WARNING, ERROR
#
#
array set pf [GetPlatform]
if {$pf(platform) == "windows"} {
    LockPref itTmpLocation [GetEnv TEMP c:/temp]
    SetPref itImageLocations "c:/images"
} else {
    if {$pf(os) == "Darwin"} {
	LockPref itTmpLocation /private/tmp
	SetPref itImageLocations "/usr/local/data/images"
    } else { 
	LockPref itTmpLocation /usr/tmp
	SetPref itImageLocations "/usr/local/data/images"
    }
}
SetPref itCacheSize 2000000

# control double buffered vs. single buffered image display
# single buffered is faster but may show tearing and other artifacts
# *note* some display drivers have difficulty with single buffered gl windows

if {$pf(os) == "Darwin"} {
    #the X11 display system on OSX does not play well with single buffers
    LockPref GLDoubleBuffer 1
} else {
    SetPref GLDoubleBuffer 0	
}

# use this to switch between OpenGL and standard drawing routines
# value of 1 uses OpenGL, value of 0 uses standard routines.
# note - the default is to use OpenGL

SetPref GLRender 1 

# Set this pref to 0 if pictures are not being displayed properly when 
# zooming or panning. 

array set glGetString [GlGetString]
set versionMinor [string index $glGetString(GL_VERSION) 2]
if {[string first "GLINT" $glGetString(GL_RENDERER)] != -1} {
	SetPref itUseAlternativeClipMethod 0
} else {
	SetPref itUseAlternativeClipMethod 1
}

# URLs for the Help menu
SetPref HelpURLs(it) {
    "it Documentation"      %RATDOCROOT/tools/image_tool_it/
    "Combiner Documenation" %RATDOCROOT/programmingRAT/it_compositing/
    "Language Reference"    %RATDOCROOT/programmingRAT/it_compositing/langref/
}