#*****************************************************************************
#
# RAYLIB Initialization file. This file is read at RAYLIB startup time before
# any mi stream is loaded in. It ensures mental ray is initialized correctly
# and can accept a subset of default shaders.
#
#*****************************************************************************
min version "2.0.21"
max version "3.2.99"

#*****************************************************************************
#
# Machine-specific initialization. Replace the following with the correct
# installation path and the correct library extension name.
#
#*****************************************************************************

registry "{XSI_HOME}"
	value "{$XSI_HOME}"
end registry
$lookup "{XSI_HOME}"

registry "{APP_HOME}"
	value "{XSI_HOME}/Application"
end registry
$lookup "{APP_HOME}"

registry "{PHENOLIB_HOME}"
	value "{XSI_HOME}/Application"
end registry
$lookup "{PHENOLIB_HOME}"

registry "{EXT}"
	value "{$XSI_EXT}"
end registry
$lookup "{EXT}"

#---- Include the registry entries.
registry "{CPU}"
	value "{$XSI_CPU}"
	# value "irix6-n32"
	# value "irix6-64"
	# value "irix5-32"
	# value "nt-x86"
	# value "nt-alpha"
	# value "aix4"
	# value "sppux5"
	# value "hpux11"
	# value "decunix4"
	# value "sunos5"
	# value "hpux9"
	# value "linux-x86"
	# value "linux-alpha"
end registry
$lookup "{CPU}"

registry "{CPU_OPT}"
	value "{$XSI_CPU_OPT}"
end registry
$lookup "{CPU_OPT}"

registry "{LIBS}"
	value "{$XSI_BINDIR}/{CPU_OPT}"
end registry
$lookup "{LIBS}"

#---- Include the registry entries.
registry "{PHENOLIB_INITIALIZE}"
    mi "{PHENOLIB_HOME}/phenolib/registry.mi"
end registry
$lookup "{PHENOLIB_INITIALIZE}"

################ load Factory shader plugins
registry "{SHADER_PLUGIN_HOME}"
	value "{XSI_HOME}"
end registry
$lookup "{SHADER_PLUGIN_HOME}"
registry "{LOAD_FACTORY_PLUGINS}"
	echo "Loading Factory shader plugins"
	mi "{XSI_HOME}/Addons/shader_plugins.mi"
end registry
$lookup "{LOAD_FACTORY_PLUGINS}"

################ load User shader plugins
registry "{SHADER_PLUGIN_HOME}"
	value "{$XSI_USER_SHADERPLUGINS}"
end registry
$lookup "{SHADER_PLUGIN_HOME}"
registry "{LOAD_USER_PLUGINS}"
	echo "Loading User shader plugins"
	mi "{$XSI_USER_SHADERPLUGINS}/Addons/shader_plugins.mi"
end registry
$lookup "{LOAD_USER_PLUGINS}"

################ load Workgroup shader plugins
registry "{SHADER_PLUGIN_HOME}"
	value "{$XSI_WORKGROUP_SHADERPLUGINS}"
end registry
$lookup "{SHADER_PLUGIN_HOME}"
registry "{LOAD_WORKGROUP_PLUGINS}"
	echo "Loading Workgroup shader plugins"
	mi "{$XSI_WORKGROUP_SHADERPLUGINS}/Addons/shader_plugins.mi"
end registry
$lookup "{LOAD_WORKGROUP_PLUGINS}"
