Merged in from viewer-development.

master
Aura Linden 2012-08-17 08:07:15 -07:00
commit efdcf045b0
336 changed files with 76587 additions and 5669 deletions

14
.hgtags Normal file → Executable file
View File

@ -150,6 +150,7 @@ a9abb9633a266c8d2fe62411cfd1c86d32da72bf 2.7.1-release
09984bfa6cae17e0f72d02b75c1b7393c65eecfc 2.7.5-beta1
e1ed60913230dd64269a7f7fc52cbc6004f6d52c 2.8.0-start
502f6a5deca9365ddae57db4f1e30172668e171e 2.8.1-start
c04e68e1b0034fd0a20815ae24c77e5f8428e822 DRTVWR-188
888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
2a3965b3ad202df7ea25d2be689291bb14a1280e DRTVWR-155
6866d9df6efbd441c66451debd376d21211de39c DRTVWR-68_2.7.5-release
@ -343,7 +344,20 @@ eb539c65e6ee26eea2bf373af2d0f4b52dc91289 DRTVWR-177
a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3
4281aa899fb2cedb7a9ca7ce91c5c29d4aa69594 DRTVWR-180
9cd174d3a54d93d409a7c346a15b8bfb40fc58f4 DRTVWR-184
47f0d08ba7ade0a3905074009067c6d3df7e16ae DRTVWR-190
5c08e1d8edd871807153603b690e3ee9dbb548aa DRTVWR-183
6c75f220b103db1420919c8b635fe53e2177f318 3.3.4-beta4
ab2ffc547c8a8950ff187c4f6c95e5334fab597b 3.3.4-beta5
28e100d0379a2b0710c57647a28fc5239d3d7b99 3.3.4-release
a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182
1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1
81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186
78ca0bbf43a92e8914d4cfa87d69a6717ef7d4cf DRTVWR-194
cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181
9ee9387789701d597130f879d9011a4958753862 DRTVWR-189
ae5c83dd61d2d37c45f1d5b8bf2b036d87599f1b DRTVWR-198
e9732c739c8a72a590216951505ea9c76a526a84 DRTVWR-193
33a2fc7a910ae29ff8b4850316ed7fbff9f64d33 DRTVWR-195
421126293dcbde918e0da027ca0ab9deb5b4fbf2 DRTVWR-192
4b2c52aecb7a75de31dbb12d9f5b9a251d8707be DRTVWR-191
7602f61c804a512764e349c034c02ddabeefebc4 DRTVWR-196

View File

@ -18,7 +18,7 @@ build_CYGWIN_Debug = false
email_status_this_is_os = true
# Limit extent of codeticket updates to revisions after...
codeticket_since = 2.2.0-release
codeticket_since = 3.3.0-release
# ========================================
# Viewer Development
@ -43,18 +43,20 @@ integration_viewer-development.viewer_channel = "Second Life Development"
integration_viewer-development.login_channel = "Second Life Development"
integration_viewer-development.build_viewer_update_version_manager = false
integration_viewer-development.email = viewer-development-builds@lists.secondlife.com
integration_viewer-development.build_enforce_coding_policy = true
integration_viewer-development.codeticket_add_context = true
integration_viewer-development.build_enforce_coding_policy = false
integration_viewer-development.codeticket_add_context = false
viewer-beta.viewer_channel = "Second Life Beta Viewer"
viewer-beta.login_channel = "Second Life Beta Viewer"
viewer-beta.build_debug_release_separately = true
viewer-beta.build_viewer_update_version_manager = true
viewer-beta.codeticket_add_context = false
viewer-release.viewer_channel = "Second Life Release"
viewer-release.login_channel = "Second Life Release"
viewer-release.build_debug_release_separately = true
viewer-release.build_viewer_update_version_manager = true
viewer-release.codeticket_add_context = false
# ========================================
# mesh-development
@ -123,35 +125,16 @@ viewer-adult-check.build_debug_release_separately = true
viewer-adult-check.build_CYGWIN_Debug = false
viewer-adult-check.build_viewer_update_version_manager = false
# ================
# oz
# ================
# ========================================
# viewer-pathfinding
# ========================================
Snowstorm_viewer-project-review.build_debug_release_separately = true
Snowstorm_viewer-project-review.codeticket_add_context = true
Snowstorm_viewer-project-review.viewer_channel = "Project Viewer - Snowstorm Team"
Snowstorm_viewer-project-review.login_channel = "Project Viewer - Snowstorm Team"
Snowstorm_viewer-project-review.codeticket_add_context = true
oz_viewer-devreview.build_debug_release_separately = true
oz_viewer-devreview.codeticket_add_context = false
oz_viewer-devreview.build_enforce_coding_policy = true
oz_viewer-devreview.email = oz@lindenlab.com
oz_viewer-trial.build_debug_release_separately = true
oz_viewer-trial.codeticket_add_context = false
oz_viewer-trial.build_enforce_coding_policy = true
oz_viewer-trial.email = oz@lindenlab.com
oz_viewer-beta-review.build_debug_release_separately = true
oz_viewer-beta-review.codeticket_add_context = false
oz_viewer-beta-review.viewer_channel = "Second Life Beta Viewer"
oz_viewer-beta-review.login_channel = "Second Life Beta Viewer"
oz_viewer-beta-review.email = oz@lindenlab.com
oz_project-7.build_debug_release_separately = true
oz_project-7.codeticket_add_context = false
oz_project-7.email = "sldev@catznip.com oz@lindenlab.com"
viewer-pathfinding.viewer_channel = "Project Viewer - Pathfinding"
viewer-pathfinding.login_channel = "Project Viewer - Pathfinding"
viewer-pathfinding.viewer_grid = agni
viewer-pathfinding.build_debug_release_separately = true
viewer-pathfinding.build_CYGWIN_Debug = false
viewer-pathfinding.build_viewer_update_version_manager = false
# =================================================================
# asset delivery 2010 projects

View File

@ -903,6 +903,54 @@
</map>
</map>
</map>
<key>havok-source</key>
<map>
<key>license</key>
<string>havok-ares</string>
<key>license_file</key>
<string>LICENSES/havok.txt</string>
<key>name</key>
<string>havok-source</string>
<key>platforms</key>
<map>
<key>darwin</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>efaf5cb3e861d44518eb03f4c406f03c</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Darwin/installer/havok_source-2012.1-darwin-20120710.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>50037fff3fd3356a073cdae88348c9ab</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Linux/installer/havok_source-2012.1-linux-20120711.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>cd6638f5a03469654615730c16889a60</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/CYGWIN/installer/havok_source-2012.1-windows-20120710.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
</map>
<key>jpeglib</key>
<map>
<key>license</key>
@ -1014,9 +1062,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>d91e1f483209cd3eba04135c6a59e829</string>
<string>a5b2dff0d97b643227a58473e5c57906</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/221672/arch/Darwin/installer/kdu-6.4.1-darwin-20110218.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/256978/arch/Darwin/installer/kdu-7.0.0-darwin-20120515.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -1038,9 +1086,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>6cd9f36465ef73a3df34bf2b3bba2ced</string>
<string>6d80d35524e1c0c32d3385014d02d48c</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/221672/arch/CYGWIN/installer/kdu-6.4.1-windows-20110218.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-kdu-private/rev/256978/arch/CYGWIN/installer/kdu-7.0.0-windows-20120515.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -1191,60 +1239,14 @@
</map>
</map>
</map>
<key>llconvexdecomposition</key>
<key>llphysicsextensions_source</key>
<map>
<key>license</key>
<string>havok</string>
<key>name</key>
<string>llconvexdecomposition</string>
<key>platforms</key>
<map>
<key>darwin</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>362654a472ef7368d4c803ae3fb89d95</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-llconvexdecomposition/rev/238959/arch/Darwin/installer/llconvexdecomposition-0.1-darwin-20110819.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>c7801d899daec5338fbe95053255b7e7</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-llconvexdecomposition/rev/238959/arch/Linux/installer/llconvexdecomposition-0.1-linux-20110819.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>6ecf2f85f03c5ae87fe45769566a5660</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-llconvexdecomposition/rev/238959/arch/CYGWIN/installer/llconvexdecomposition-0.1-windows-20110819.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
</map>
<key>llconvexdecompositionstub</key>
<map>
<key>license</key>
<string>lgpl</string>
<string>TEMPORARY</string>
<key>license_file</key>
<string>LICENSES/LLConvexDecompositionStubLicense.txt</string>
<string>LICENSES/llphysicsextensions.txt</string>
<key>name</key>
<string>llconvexdecompositionstub</string>
<string>llphysicsextensions_source</string>
<key>platforms</key>
<map>
<key>darwin</key>
@ -1252,9 +1254,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>a5f53e09f67271fd50f1131ffdda9d27</string>
<string>0578fa67ef9906c6aaa326f51db2669f</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llconvexdecompositionstub/rev/238958/arch/Darwin/installer/llconvexdecompositionstub-0.3-darwin-20110819.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source/rev/263415/arch/Darwin/installer/llphysicsextensions_source-0.3-darwin-20120814.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -1264,9 +1268,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>0006a964f1497f55a5f181b7042d2d22</string>
<string>b706fdeed4ce2182d434043dc33d9d1d</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llconvexdecompositionstub/rev/238958/arch/Linux/installer/llconvexdecompositionstub-0.3-linux-20110819.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source/rev/263415/arch/Linux/installer/llphysicsextensions_source-0.3-linux-20120814.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -1276,14 +1280,68 @@
<key>archive</key>
<map>
<key>hash</key>
<string>b859e7e3bb03ebb467f0309f46422995</string>
<string>0cebd359ea732a7db363d88f9886a1ef</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llconvexdecompositionstub/rev/238958/arch/CYGWIN/installer/llconvexdecompositionstub-0.3-windows-20110819.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llphysicsextensions-source/rev/263415/arch/CYGWIN/installer/llphysicsextensions_source-0.3-windows-20120814.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>version</key>
<string>0.2</string>
</map>
<key>llphysicsextensions_stub</key>
<map>
<key>license</key>
<string>TEMPORARY</string>
<key>license_file</key>
<string>LICENSES/llphysicsextensions.txt</string>
<key>name</key>
<string>llphysicsextensions_stub</string>
<key>platforms</key>
<map>
<key>darwin</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>3ae798d4dfb54a1d806ee5f8b31f7626</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub/rev/263415/arch/Darwin/installer/llphysicsextensions_stub-0.3-darwin-20120814.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>aa8a2f25e8629cf5e6a96cc0eb93de8e</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub/rev/263415/arch/Linux/installer/llphysicsextensions_stub-0.3-linux-20120814.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>3ea4cee6a8dd4c89fbfd3ad6abd703c2</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub/rev/263415/arch/CYGWIN/installer/llphysicsextensions_stub-0.3-windows-20120814.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>version</key>
<string>0.2</string>
</map>
<key>llqtwebkit</key>
<map>

View File

@ -81,16 +81,43 @@ pre_build()
end_section "Pre$variant"
}
package_llphysicsextensions_tpv()
{
begin_section "PhysicsExtensions_TPV"
tpv_status=0
if [ "$variant" = "Release" ]
then
llpetpvcfg=$build_dir/packages/llphysicsextensions/autobuild-tpv.xml
"$AUTOBUILD" build --verbose --config-file $llpetpvcfg -c Tpv
# capture the package file name for use in upload later...
PKGTMP=`mktemp -t pgktpv.XXXXXX`
trap "rm $PKGTMP* 2>/dev/null" 0
"$AUTOBUILD" package --verbose --config-file $llpetpvcfg > $PKGTMP
tpv_status=$?
sed -n -e 's/^wrote *//p' $PKGTMP > $build_dir/llphysicsextensions_package
else
echo "Do not provide llphysicsextensions_tpv for $variant"
llphysicsextensions_package=""
fi
end_section "PhysicsExtensions_TPV"
return $tpv_status
}
build()
{
local variant="$1"
if $build_viewer
then
begin_section "Viewer$variant"
check_for "Before 'autobuild build'" ${build_dir}/packages/dictionaries
if "$AUTOBUILD" build --no-configure -c $variant
"$AUTOBUILD" build --no-configure -c $variant
viewer_build_ok=$?
end_section "Viewer$variant"
package_llphysicsextensions_tpv
tpvlib_build_ok=$?
if [ $viewer_build_ok -eq 0 -a $tpvlib_build_ok -eq 0 ]
then
echo true >"$build_dir"/build_ok
else
@ -98,7 +125,6 @@ build()
fi
check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries
end_section "Viewer$variant"
fi
}
@ -215,11 +241,6 @@ do
mkdir -p "$build_dir"
mkdir -p "$build_dir/tmp"
# Install packages.
begin_section "AutobuildInstall"
"$AUTOBUILD" install --verbose --skip-license-check
end_section "AutobuildInstall"
if pre_build "$variant" "$build_dir" >> "$build_log" 2>&1
then
if $build_link_parallel
@ -289,13 +310,25 @@ then
upload_item quicklink "$package" binary/octet-stream
[ -f summary.json ] && upload_item installer summary.json text/plain
# Upload crash reporter files.
case "$last_built_variant" in
Release)
# Upload crash reporter files
for symbolfile in $symbolfiles
do
upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream
done
# Upload the llphysicsextensions_tpv package, if one was produced
if [ -r "$build_dir/llphysicsextensions_package" ]
then
llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package)
upload_item private_artifact "$llphysicsextensions_package" binary/octet-stream
else
echo "No llphysicsextensions_package"
fi
;;
*)
echo "Skipping mapfile for $last_built_variant"
;;
esac

View File

@ -546,8 +546,24 @@
<key>trusted-sender</key>
<boolean>true</boolean>
</map>
<!-- UDPDeprecated Messages -->
<key>NavMeshStatusUpdate</key>
<map>
<key>flavor</key>
<string>llsd</string>
<key>trusted-sender</key>
<boolean>true</boolean>
</map>
<key>AgentStateUpdate</key>
<map>
<key>flavor</key>
<string>llsd</string>
<key>trusted-sender</key>
<boolean>true</boolean>
</map>
<!-- UDPDeprecated Messages -->
<key>ScriptRunningReply</key>
<map>
<key>flavor</key>

View File

@ -43,7 +43,6 @@ set(cmake_SOURCE_FILES
LLAudio.cmake
LLCharacter.cmake
LLCommon.cmake
LLConvexDecomposition.cmake
LLCrashLogger.cmake
LLDatabase.cmake
LLImage.cmake
@ -54,6 +53,7 @@ set(cmake_SOURCE_FILES
LLMessage.cmake
LLPlugin.cmake
LLPrimitive.cmake
LLPhysicsExtensions.cmake
LLRender.cmake
LLScene.cmake
LLTestCommand.cmake

83
indra/cmake/Havok.cmake Normal file
View File

@ -0,0 +1,83 @@
# -*- cmake -*-
use_prebuilt_binary(havok-source)
set(Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Source)
list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo)
set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
set(HAVOK_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
if (LL_DEBUG_HAVOK)
if (WIN32)
# Always link relwithdebinfo to havok-hybrid on windows.
set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-hybrid)
else (WIN32)
set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
endif (WIN32)
else (LL_DEBUG_HAVOK)
set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
endif (LL_DEBUG_HAVOK)
set(HAVOK_LIBS
hkBase
hkCompat
hkGeometryUtilities
hkInternal
hkSerialize
hkSceneData
hkpCollide
hkpUtilities
hkpConstraintSolver
hkpDynamics
hkpInternal
hkaiInternal
hkaiPathfinding
hkaiAiPhysicsBridge
hkcdInternal
hkcdCollide
hkpVehicle
hkVisualize
hkaiVisualize
hkgpConvexDecomposition
)
unset(HK_DEBUG_LIBRARIES)
unset(HK_RELEASE_LIBRARIES)
unset(HK_RELWITHDEBINFO_LIBRARIES)
foreach(HAVOK_LIB ${HAVOK_LIBS})
find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH})
find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH})
find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH})
if(LINUX)
set(cmd "mkdir")
set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}")
set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}")
set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}")
exec_program( ${cmd} ${HAVOK_DEBUG_LIBRARY_PATH} ARGS ${debug_dir} OUTPUT_VARIABLE rv)
exec_program( ${cmd} ${HAVOK_RELEASE_LIBRARY_PATH} ARGS ${release_dir} OUTPUT_VARIABLE rv)
exec_program( ${cmd} ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH} ARGS ${relwithdebinfo_dir} OUTPUT_VARIABLE rv)
set(cmd "ar")
set(arg " -xv")
set(arg "${arg} ../lib${HAVOK_LIB}.a")
exec_program( ${cmd} ${debug_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
exec_program( ${cmd} ${release_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
exec_program( ${cmd} ${relwithdebinfo_dir} ARGS ${arg} OUTPUT_VARIABLE rv)
file(GLOB extracted_debug "${debug_dir}/*.o")
file(GLOB extracted_release "${release_dir}/*.o")
file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o")
list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug})
list(APPEND HK_RELEASE_LIBRARIES ${extracted_release})
list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo})
else(LINUX)
# Win32
list(APPEND HK_DEBUG_LIBRARIES ${HAVOK_DEBUG_LIB_${HAVOK_LIB}})
list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}})
list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB}})
endif (LINUX)
endforeach(HAVOK_LIB)

9
indra/cmake/LLAddBuildTest.cmake Normal file → Executable file
View File

@ -201,6 +201,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
endif(TEST_DEBUG)
ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
if (WINDOWS)
set_target_properties(INTEGRATION_TEST_${testname}
PROPERTIES
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE ""
)
endif(WINDOWS)
if(STANDALONE)
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
endif(STANDALONE)

View File

@ -24,7 +24,7 @@ endif (LINUX)
add_definitions(${TCMALLOC_FLAG})
set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
if(LLCOMMON_LINK_SHARED)
add_definitions(-DLL_COMMON_LINK_SHARED=1)
endif(LLCOMMON_LINK_SHARED)

View File

@ -1,12 +0,0 @@
# -*- cmake -*-
include(Prebuilt)
set(LLCONVEXDECOMP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
if (INSTALL_PROPRIETARY AND NOT STANDALONE)
use_prebuilt_binary(llconvexdecomposition)
set(LLCONVEXDECOMP_LIBRARY llconvexdecomposition)
else (INSTALL_PROPRIETARY AND NOT STANDALONE)
use_prebuilt_binary(llconvexdecompositionstub)
set(LLCONVEXDECOMP_LIBRARY llconvexdecompositionstub)
endif (INSTALL_PROPRIETARY AND NOT STANDALONE)

View File

@ -0,0 +1,35 @@
# -*- cmake -*-
include(Prebuilt)
# There are three possible solutions to provide the llphysicsextensions:
# - The full source package, selected by -DHAVOK:BOOL=ON
# - The stub source package, selected by -DHAVOK:BOOL=OFF
# - The prebuilt package available to those with sublicenses, selected by -DHAVOK_TPV:BOOL=ON
if (INSTALL_PROPRIETARY)
set(HAVOK ON CACHE BOOL "Use Havok physics library")
endif (INSTALL_PROPRIETARY)
# Note that the use_prebuilt_binary macros below do not in fact include binaries;
# the llphysicsextensions_* packages are source only and are built here.
# The source package and the stub package both build libraries of the same name.
if (HAVOK)
include(Havok)
use_prebuilt_binary(llphysicsextensions_source)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions)
elseif (HAVOK_TPV)
use_prebuilt_binary(llphysicsextensions_tpv)
set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions_tpv)
else (HAVOK)
use_prebuilt_binary(llphysicsextensions_stub)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensionsstub)
endif (HAVOK)
set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)

View File

@ -38,9 +38,8 @@ if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
# packages/lib/release directory to deal with autobuild packages that don't
# provide (e.g.) lib/debug libraries.
list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}, extending AUTOBUILD_LIBS_INSTALL_DIRS")
endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
message(STATUS "For ${CMAKE_BUILD_TYPE}, AUTOBUILD_LIBS_INSTALL_DIRS: ${AUTOBUILD_LIBS_INSTALL_DIRS}")
link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
if (LINUX)

View File

@ -8,10 +8,3 @@ if (NOT STANDALONE)
use_prebuilt_binary(fontconfig)
endif(NOT STANDALONE)
if(VIEWER AND NOT STANDALONE)
if(EXISTS ${CMAKE_SOURCE_DIR}/newview/res/have_artwork_bundle.marker)
message(STATUS "We seem to have an artwork bundle in the tree - brilliant.")
else(EXISTS ${CMAKE_SOURCE_DIR}/newview/res/have_artwork_bundle.marker)
message(FATAL_ERROR "Didn't find an artwork bundle - this needs to be downloaded separately and unpacked into this tree. You can probably get it from the same place you got your viewer source. Thanks!")
endif(EXISTS ${CMAKE_SOURCE_DIR}/newview/res/have_artwork_bundle.marker)
endif(VIEWER AND NOT STANDALONE)

View File

@ -174,6 +174,7 @@ set(llcommon_HEADER_FILES
llfoldertype.h
llformat.h
llframetimer.h
llhandle.h
llhash.h
llheartbeat.h
llhttpstatuscodes.h

View File

@ -62,6 +62,7 @@ enum LAND_STAT_FLAGS
STAT_FILTER_BY_PARCEL = 0x00000001,
STAT_FILTER_BY_OWNER = 0x00000002,
STAT_FILTER_BY_OBJECT = 0x00000004,
STAT_FILTER_BY_PARCEL_NAME = 0x00000008,
STAT_REQUEST_LAST_ENTRY = 0x80000000,
};

View File

@ -69,6 +69,12 @@ ECursorType getCursorFromString(const std::string& cursor_string)
cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT;
cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY;
cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN;
cursor_string_table["UI_CURSOR_TOOLPATHFINDING"] = UI_CURSOR_TOOLPATHFINDING;
cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTART"] = UI_CURSOR_TOOLPATHFINDING_PATH_START;
cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHSTARTADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD;
cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHEND"] = UI_CURSOR_TOOLPATHFINDING_PATH_END;
cursor_string_table["UI_CURSOR_TOOLPATHFINDINGPATHENDADD"] = UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD;
cursor_string_table["UI_CURSOR_TOOLNO"] = UI_CURSOR_TOOLNO;
}
std::map<std::string,U32>::const_iterator iter = cursor_string_table.find(cursor_string);

View File

@ -65,6 +65,12 @@ enum ECursorType {
UI_CURSOR_TOOLSIT,
UI_CURSOR_TOOLBUY,
UI_CURSOR_TOOLOPEN,
UI_CURSOR_TOOLPATHFINDING,
UI_CURSOR_TOOLPATHFINDING_PATH_START,
UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD,
UI_CURSOR_TOOLPATHFINDING_PATH_END,
UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD,
UI_CURSOR_TOOLNO,
UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor)
};

View File

@ -534,7 +534,7 @@ namespace
}
void commonInit(const std::string& dir)
void commonInit(const std::string& dir, bool log_to_stderr = true)
{
LLError::Settings::reset();
@ -542,7 +542,8 @@ namespace
LLError::setFatalFunction(LLError::crashAndLoop);
LLError::setTimeFunction(LLError::utcTime);
if (shouldLogToStderr())
// log_to_stderr is only false in the unit and integration tests to keep builds quieter
if (log_to_stderr && shouldLogToStderr())
{
LLError::addRecorder(new RecordToStderr(stderrLogWantsTime()));
}
@ -580,9 +581,9 @@ namespace LLError
#endif
}
void initForApplication(const std::string& dir)
void initForApplication(const std::string& dir, bool log_to_stderr)
{
commonInit(dir);
commonInit(dir, log_to_stderr);
}
void setPrintLocation(bool print)

View File

@ -35,7 +35,7 @@
#include "stdtypes.h"
/* Error Logging Facility
/** Error Logging Facility
Information for most users:
@ -100,7 +100,6 @@
even release. Which means you can use them to help debug even when deployed
to a real grid.
*/
namespace LLError
{
enum ELevel
@ -143,9 +142,13 @@ namespace LLError
CallSite(ELevel, const char* file, int line,
const std::type_info& class_info, const char* function, const char* broadTag, const char* narrowTag, bool printOnce);
#ifdef LL_LIBRARY_INCLUDE
bool shouldLog();
#else // LL_LIBRARY_INCLUDE
bool shouldLog()
{ return mCached ? mShouldLog : Log::shouldLog(*this); }
// this member function needs to be in-line for efficiency
#endif // LL_LIBRARY_INCLUDE
void invalidate();

View File

@ -62,7 +62,7 @@ namespace LLError
// logs to stderr, syslog, and windows debug log
// the identity string is used for in the syslog
LL_COMMON_API void initForApplication(const std::string& dir);
LL_COMMON_API void initForApplication(const std::string& dir, bool log_to_stderr = true);
// resets all logging settings to defaults needed by applicaitons
// logs to stderr and windows debug log
// sets up log configuration from the file logcontrol.xml in dir

View File

@ -31,6 +31,10 @@
#include <boost/type_traits/is_convertible.hpp>
#include <boost/utility/enable_if.hpp>
/**
* Helper object for LLHandle. Don't instantiate these directly, used
* exclusively by LLHandle.
*/
class LLTombStone : public LLRefCount
{
public:
@ -42,15 +46,37 @@ private:
mutable void* mTarget;
};
// LLHandles are used to refer to objects whose lifetime you do not control or influence.
// Calling get() on a handle will return a pointer to the referenced object or NULL,
// if the object no longer exists. Note that during the lifetime of the returned pointer,
// you are assuming that the object will not be deleted by any action you perform,
// or any other thread, as normal when using pointers, so avoid using that pointer outside of
// the local code block.
//
// https://wiki.lindenlab.com/mediawiki/index.php?title=LLHandle&oldid=79669
/**
* LLHandles are used to refer to objects whose lifetime you do not control or influence.
* Calling get() on a handle will return a pointer to the referenced object or NULL,
* if the object no longer exists. Note that during the lifetime of the returned pointer,
* you are assuming that the object will not be deleted by any action you perform,
* or any other thread, as normal when using pointers, so avoid using that pointer outside of
* the local code block.
*
* https://wiki.lindenlab.com/mediawiki/index.php?title=LLHandle&oldid=79669
*
* The implementation is like some "weak pointer" implementations. When we
* can't control the lifespan of the referenced object of interest, we can
* still instantiate a proxy object whose lifespan we DO control, and store in
* the proxy object a dumb pointer to the actual target. Then we just have to
* ensure that on destruction of the target object, the proxy's dumb pointer
* is set NULL.
*
* LLTombStone is our proxy object. LLHandle contains an LLPointer to the
* LLTombStone, so every copy of an LLHandle increments the LLTombStone's ref
* count as usual.
*
* One copy of the LLHandle, specifically the LLRootHandle, must be stored in
* the referenced object. Destroying the LLRootHandle is what NULLs the
* proxy's target pointer.
*
* Minor optimization: we want LLHandle's mTombStone to always be a valid
* LLPointer, saving some conditionals in dereferencing. That's the
* getDefaultTombStone() mechanism. The default LLTombStone object's target
* pointer is always NULL, so it's semantically identical to allowing
* mTombStone to be invalid.
*/
template <typename T>
class LLHandle
{
@ -108,6 +134,14 @@ private:
}
};
/**
* LLRootHandle isa LLHandle which must be stored in the referenced object.
* You can either store it directly and explicitly bind(this), or derive from
* LLHandleProvider (q.v.) which automates that for you. The essential point
* is that destroying the LLRootHandle (as a consequence of destroying the
* referenced object) calls unbind(), setting the LLTombStone's target pointer
* NULL.
*/
template <typename T>
class LLRootHandle : public LLHandle<T>
{
@ -144,8 +178,10 @@ private:
LLRootHandle(const LLRootHandle& other) {};
};
// Use this as a mixin for simple classes that need handles and when you don't
// want handles at multiple points of the inheritance hierarchy
/**
* Use this as a mixin for simple classes that need handles and when you don't
* want handles at multiple points of the inheritance hierarchy
*/
template <typename T>
class LLHandleProvider
{

View File

@ -35,7 +35,7 @@
#include <boost/shared_ptr.hpp>
#include "llerror.h"
#include "lltypeinfolookup.h"
#include "llstl.h"
namespace LLInitParam
{
@ -212,14 +212,6 @@ namespace LLInitParam
public:
struct CompareTypeID
{
bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
{
return lhs->before(*rhs);
}
};
typedef std::vector<std::pair<std::string, bool> > name_stack_t;
typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t;
typedef std::vector<std::string> possible_values_t;
@ -228,9 +220,9 @@ namespace LLInitParam
typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&);
typedef boost::function<void (name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t;
typedef LLTypeInfoLookup<parser_read_func_t> parser_read_func_map_t;
typedef LLTypeInfoLookup<parser_write_func_t> parser_write_func_map_t;
typedef LLTypeInfoLookup<parser_inspect_func_t> parser_inspect_func_map_t;
typedef std::map<const std::type_info*, parser_read_func_t> parser_read_func_map_t;
typedef std::map<const std::type_info*, parser_write_func_t> parser_write_func_map_t;
typedef std::map<const std::type_info*, parser_inspect_func_t> parser_inspect_func_map_t;
Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)
: mParseSilently(false),

View File

@ -140,6 +140,10 @@ public:
}
protected:
#ifdef LL_LIBRARY_INCLUDE
void ref();
void unref();
#else
void ref()
{
if (mPointer)
@ -162,7 +166,7 @@ protected:
}
}
}
#endif
protected:
Type* mPointer;
};

View File

@ -31,30 +31,16 @@
#include <boost/type_traits.hpp>
#include "llsingleton.h"
#include "lltypeinfolookup.h"
#include "llstl.h"
template <typename T>
class LLRegistryDefaultComparator
struct LLRegistryDefaultComparator
{
bool operator()(const T& lhs, const T& rhs) { return lhs < rhs; }
};
template <typename KEY, typename VALUE>
struct LLRegistryMapSelector
{
typedef std::map<KEY, VALUE> type;
};
template <typename VALUE>
struct LLRegistryMapSelector<std::type_info*, VALUE>
{
typedef LLTypeInfoLookup<VALUE> type;
};
template <typename VALUE>
struct LLRegistryMapSelector<const std::type_info*, VALUE>
{
typedef LLTypeInfoLookup<VALUE> type;
bool operator()(const T& lhs, const T& rhs) const
{
using std::less;
return less<T>()(lhs, rhs);
}
};
template <typename KEY, typename VALUE, typename COMPARATOR = LLRegistryDefaultComparator<KEY> >
@ -72,7 +58,7 @@ public:
{
friend class LLRegistry<KEY, VALUE, COMPARATOR>;
public:
typedef typename LLRegistryMapSelector<KEY, VALUE>::type registry_map_t;
typedef std::map<KEY, VALUE, COMPARATOR> registry_map_t;
bool add(ref_const_key_t key, ref_const_value_t value)
{

View File

@ -55,6 +55,10 @@ static const char LEGACY_NON_HEADER[] = "<llsd>";
const std::string LLSD_BINARY_HEADER("LLSD/Binary");
const std::string LLSD_XML_HEADER("LLSD/XML");
//used to deflate a gzipped asset (currently used for navmeshes)
#define windowBits 15
#define ENABLE_ZLIB_GZIP 32
/**
* LLSDSerialize
*/
@ -2096,7 +2100,7 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
strm.next_in = in;
S32 ret = inflateInit(&strm);
do
{
strm.avail_out = CHUNK;
@ -2159,12 +2163,87 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
llwarns << "Failed to unzip LLSD block" << llendl;
free(result);
return false;
}
}
}
free(result);
return true;
}
//This unzip function will only work with a gzip header and trailer - while the contents
//of the actual compressed data is the same for either format (gzip vs zlib ), the headers
//and trailers are different for the formats.
U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32 size )
{
U8* result = NULL;
U32 cur_size = 0;
z_stream strm;
const U32 CHUNK = 0x4000;
U8 *in = new U8[size];
is.read((char*) in, size);
U8 out[CHUNK];
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
strm.avail_in = size;
strm.next_in = in;
S32 ret = inflateInit2(&strm, windowBits | ENABLE_ZLIB_GZIP );
do
{
strm.avail_out = CHUNK;
strm.next_out = out;
ret = inflate(&strm, Z_NO_FLUSH);
if (ret == Z_STREAM_ERROR)
{
inflateEnd(&strm);
free(result);
delete [] in;
valid = false;
}
switch (ret)
{
case Z_NEED_DICT:
ret = Z_DATA_ERROR;
case Z_DATA_ERROR:
case Z_MEM_ERROR:
inflateEnd(&strm);
free(result);
delete [] in;
valid = false;
break;
}
U32 have = CHUNK-strm.avail_out;
result = (U8*) realloc(result, cur_size + have);
memcpy(result+cur_size, out, have);
cur_size += have;
} while (ret == Z_OK);
inflateEnd(&strm);
delete [] in;
if (ret != Z_STREAM_END)
{
free(result);
valid = false;
return NULL;
}
//result now points to the decompressed LLSD block
{
outsize= cur_size;
valid = true;
}
return result;
}

View File

@ -793,5 +793,5 @@ public:
//dirty little zip functions -- yell at davep
LL_COMMON_API std::string zip_llsd(LLSD& data);
LL_COMMON_API bool unzip_llsd(LLSD& data, std::istream& is, S32 size);
LL_COMMON_API U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize,std::istream& is, S32 size);
#endif // LL_LLSDSERIALIZE_H

View File

@ -40,7 +40,6 @@
S32 LLPerfBlock::sStatsFlags = LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS; // Control what is being recorded
LLPerfBlock::stat_map_t LLPerfBlock::sStatMap; // Map full path string to LLStatTime objects, tracks all active objects
std::string LLPerfBlock::sCurrentStatPath = ""; // Something like "/total_time/physics/physics step"
LLStat::stat_map_t LLStat::sStatList;
//------------------------------------------------------------------------
// Live config file to trigger stats logging
@ -771,13 +770,19 @@ void LLStat::init()
if (!mName.empty())
{
stat_map_t::iterator iter = sStatList.find(mName);
if (iter != sStatList.end())
stat_map_t::iterator iter = getStatList().find(mName);
if (iter != getStatList().end())
llwarns << "LLStat with duplicate name: " << mName << llendl;
sStatList.insert(std::make_pair(mName, this));
getStatList().insert(std::make_pair(mName, this));
}
}
LLStat::stat_map_t& LLStat::getStatList()
{
static LLStat::stat_map_t stat_list;
return stat_list;
}
LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer)
: mUseFrameTimer(use_frame_timer),
mNumBins(num_bins)
@ -803,10 +808,10 @@ LLStat::~LLStat()
if (!mName.empty())
{
// handle multiple entries with the same name
stat_map_t::iterator iter = sStatList.find(mName);
while (iter != sStatList.end() && iter->second != this)
stat_map_t::iterator iter = getStatList().find(mName);
while (iter != getStatList().end() && iter->second != this)
++iter;
sStatList.erase(iter);
getStatList().erase(iter);
}
}

View File

@ -263,9 +263,9 @@ class LL_COMMON_API LLStat
{
private:
typedef std::multimap<std::string, LLStat*> stat_map_t;
static stat_map_t sStatList;
void init();
static stat_map_t& getStatList();
public:
LLStat(U32 num_bins = 32, BOOL use_frame_timer = FALSE);
@ -342,8 +342,8 @@ public:
static LLStat* getStat(const std::string& name)
{
// return the first stat that matches 'name'
stat_map_t::iterator iter = sStatList.find(name);
if (iter != sStatList.end())
stat_map_t::iterator iter = getStatList().find(name);
if (iter != getStatList().end())
return iter->second;
else
return NULL;

View File

@ -28,41 +28,48 @@
enum
{
LL_SIM_STAT_TIME_DILATION, // 0
LL_SIM_STAT_FPS,
LL_SIM_STAT_PHYSFPS,
LL_SIM_STAT_AGENTUPS,
LL_SIM_STAT_FRAMEMS,
LL_SIM_STAT_NETMS, // 5
LL_SIM_STAT_SIMOTHERMS,
LL_SIM_STAT_SIMPHYSICSMS,
LL_SIM_STAT_AGENTMS,
LL_SIM_STAT_IMAGESMS,
LL_SIM_STAT_SCRIPTMS, // 10
LL_SIM_STAT_NUMTASKS,
LL_SIM_STAT_NUMTASKSACTIVE,
LL_SIM_STAT_NUMAGENTMAIN,
LL_SIM_STAT_NUMAGENTCHILD,
LL_SIM_STAT_NUMSCRIPTSACTIVE, // 15
LL_SIM_STAT_LSLIPS,
LL_SIM_STAT_INPPS,
LL_SIM_STAT_OUTPPS,
LL_SIM_STAT_PENDING_DOWNLOADS,
LL_SIM_STAT_PENDING_UPLOADS, // 20
LL_SIM_STAT_VIRTUAL_SIZE_KB,
LL_SIM_STAT_RESIDENT_SIZE_KB,
LL_SIM_STAT_PENDING_LOCAL_UPLOADS,
LL_SIM_STAT_TOTAL_UNACKED_BYTES,
LL_SIM_STAT_PHYSICS_PINNED_TASKS, // 25
LL_SIM_STAT_PHYSICS_LOD_TASKS,
LL_SIM_STAT_SIMPHYSICSSTEPMS,
LL_SIM_STAT_SIMPHYSICSSHAPEMS,
LL_SIM_STAT_SIMPHYSICSOTHERMS,
LL_SIM_STAT_SIMPHYSICSMEMORY, // 30
LL_SIM_STAT_SCRIPT_EPS,
LL_SIM_STAT_SIMSPARETIME,
LL_SIM_STAT_SIMSLEEPTIME,
LL_SIM_STAT_IOPUMPTIME,
LL_SIM_STAT_TIME_DILATION = 0,
LL_SIM_STAT_FPS = 1,
LL_SIM_STAT_PHYSFPS = 2,
LL_SIM_STAT_AGENTUPS = 3,
LL_SIM_STAT_FRAMEMS = 4,
LL_SIM_STAT_NETMS = 5,
LL_SIM_STAT_SIMOTHERMS = 6,
LL_SIM_STAT_SIMPHYSICSMS = 7,
LL_SIM_STAT_AGENTMS = 8,
LL_SIM_STAT_IMAGESMS = 9,
LL_SIM_STAT_SCRIPTMS = 10,
LL_SIM_STAT_NUMTASKS = 11,
LL_SIM_STAT_NUMTASKSACTIVE = 12,
LL_SIM_STAT_NUMAGENTMAIN = 13,
LL_SIM_STAT_NUMAGENTCHILD = 14,
LL_SIM_STAT_NUMSCRIPTSACTIVE = 15,
LL_SIM_STAT_LSLIPS = 16,
LL_SIM_STAT_INPPS = 17,
LL_SIM_STAT_OUTPPS = 18,
LL_SIM_STAT_PENDING_DOWNLOADS = 19,
LL_SIM_STAT_PENDING_UPLOADS = 20,
LL_SIM_STAT_VIRTUAL_SIZE_KB = 21,
LL_SIM_STAT_RESIDENT_SIZE_KB = 22,
LL_SIM_STAT_PENDING_LOCAL_UPLOADS = 23,
LL_SIM_STAT_TOTAL_UNACKED_BYTES = 24,
LL_SIM_STAT_PHYSICS_PINNED_TASKS = 25,
LL_SIM_STAT_PHYSICS_LOD_TASKS = 26,
LL_SIM_STAT_SIMPHYSICSSTEPMS = 27,
LL_SIM_STAT_SIMPHYSICSSHAPEMS = 28,
LL_SIM_STAT_SIMPHYSICSOTHERMS = 29,
LL_SIM_STAT_SIMPHYSICSMEMORY = 30,
LL_SIM_STAT_SCRIPT_EPS = 31,
LL_SIM_STAT_SIMSPARETIME = 32,
LL_SIM_STAT_SIMSLEEPTIME = 33,
LL_SIM_STAT_IOPUMPTIME = 34,
LL_SIM_STAT_PCTSCRIPTSRUN = 35,
LL_SIM_STAT_REGION_IDLE = 36, // dataserver only
LL_SIM_STAT_REGION_IDLE_POSSIBLE = 37, // dataserver only
LL_SIM_STAT_SIMAISTEPTIMEMS = 38,
LL_SIM_STAT_SKIPPEDAISILSTEPS_PS = 39,
LL_SIM_STAT_PCTSTEPPEDCHARACTERS = 40
};
#endif

View File

@ -33,6 +33,7 @@
#include <vector>
#include <set>
#include <deque>
#include <typeinfo>
// Use to compare the first element only of a pair
// e.g. typedef std::set<std::pair<int, Data*>, compare_pair<int, Data*> > some_pair_set_t;
@ -470,4 +471,54 @@ llbind2nd(const _Operation& __oper, const _Tp& __x)
return llbinder2nd<_Operation>(__oper, _Arg2_type(__x));
}
/**
* Compare std::type_info* pointers a la std::less. We break this out as a
* separate function for use in two different std::less specializations.
*/
inline
bool before(const std::type_info* lhs, const std::type_info* rhs)
{
#if LL_LINUX && defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
// If we're building on Linux with gcc, and it's either gcc 3.x or
// 4.{0,1,2,3}, then we have to use a workaround. Note that we use gcc on
// Mac too, and some people build with gcc on Windows (cygwin or mingw).
// On Linux, different load modules may produce different type_info*
// pointers for the same type. Have to compare name strings to get good
// results.
return strcmp(lhs->name(), rhs->name()) < 0;
#else // not Linux, or gcc 4.4+
// Just use before(), as we normally would
return lhs->before(*rhs);
#endif
}
/**
* Specialize std::less<std::type_info*> to use std::type_info::before().
* See MAINT-1175. It is NEVER a good idea to directly compare std::type_info*
* because, on Linux, you might get different std::type_info* pointers for the
* same type (from different load modules)!
*/
namespace std
{
template <>
struct less<const std::type_info*>:
public std::binary_function<const std::type_info*, const std::type_info*, bool>
{
bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
{
return before(lhs, rhs);
}
};
template <>
struct less<std::type_info*>:
public std::binary_function<std::type_info*, std::type_info*, bool>
{
bool operator()(std::type_info* lhs, std::type_info* rhs) const
{
return before(lhs, rhs);
}
};
} // std
#endif // LL_LLSTL_H

View File

@ -12,9 +12,49 @@
#if ! defined(LL_LLTYPEINFOLOOKUP_H)
#define LL_LLTYPEINFOLOOKUP_H
#include "llsortedvector.h"
#include <boost/unordered_map.hpp>
#include <boost/functional/hash.hpp>
#include <boost/optional.hpp>
#include <functional> // std::binary_function
#include <typeinfo>
/**
* The following helper classes are based on the Boost.Unordered documentation:
* http://www.boost.org/doc/libs/1_45_0/doc/html/unordered/hash_equality.html
*/
/**
* Compute hash for a string passed as const char*
*/
struct const_char_star_hash: public std::unary_function<const char*, std::size_t>
{
std::size_t operator()(const char* str) const
{
std::size_t seed = 0;
for ( ; *str; ++str)
{
boost::hash_combine(seed, *str);
}
return seed;
}
};
/**
* Compute equality for strings passed as const char*
*
* I (nat) suspect that this is where the default behavior breaks for the
* const char* values returned from std::type_info::name(). If you compare the
* two const char* pointer values, as a naive, unspecialized implementation
* will surely do, they'll compare unequal.
*/
struct const_char_star_equal: public std::binary_function<const char*, const char*, bool>
{
bool operator()(const char* lhs, const char* rhs) const
{
return strcmp(lhs, rhs) == 0;
}
};
/**
* LLTypeInfoLookup is specifically designed for use cases for which you might
* consider std::map<std::type_info*, VALUE>. We have several such data
@ -23,88 +63,55 @@
* different load modules will produce different std::type_info*.
* LLTypeInfoLookup contains a workaround to address this issue.
*
* Specifically, when we don't find the passed std::type_info*,
* LLTypeInfoLookup performs a linear search over registered entries to
* compare name() strings. Presuming that this succeeds, we cache the new
* (previously unrecognized) std::type_info* to speed future lookups.
*
* This worst-case fallback search (linear search with string comparison)
* should only happen the first time we look up a given type from a particular
* load module other than the one from which we initially registered types.
* (However, a lookup which wouldn't succeed anyway will always have
* worst-case performance.) This class is probably best used with less than a
* few dozen different types.
* The API deliberately diverges from std::map in several respects:
* * It avoids iterators, not only begin()/end() but also as return values
* from insert() and find(). This bypasses transform_iterator overhead.
* * Since we literally use compile-time types as keys, the essential insert()
* and find() methods accept the key type as a @em template parameter,
* accepting and returning value_type as a normal runtime value. This is to
* permit future optimization (e.g. compile-time type hashing) without
* changing the API.
*/
template <typename VALUE>
class LLTypeInfoLookup
{
// Use this for our underlying implementation: lookup by
// std::type_info::name() string. This is one of the rare cases in which I
// dare use const char* directly, rather than std::string, because I'm
// sure that every value returned by std::type_info::name() is static.
// HOWEVER, specify our own hash + equality functors: naively comparing
// distinct const char* values won't work.
typedef boost::unordered_map<const char*, VALUE,
const_char_star_hash, const_char_star_equal> impl_map_type;
public:
typedef LLTypeInfoLookup<VALUE> self;
typedef LLSortedVector<const std::type_info*, VALUE> vector_type;
typedef typename vector_type::key_type key_type;
typedef typename vector_type::mapped_type mapped_type;
typedef typename vector_type::value_type value_type;
typedef typename vector_type::iterator iterator;
typedef typename vector_type::const_iterator const_iterator;
typedef VALUE value_type;
LLTypeInfoLookup() {}
iterator begin() { return mVector.begin(); }
iterator end() { return mVector.end(); }
const_iterator begin() const { return mVector.begin(); }
const_iterator end() const { return mVector.end(); }
bool empty() const { return mVector.empty(); }
std::size_t size() const { return mVector.size(); }
bool empty() const { return mMap.empty(); }
std::size_t size() const { return mMap.size(); }
std::pair<iterator, bool> insert(const std::type_info* key, const VALUE& value)
template <typename KEY>
bool insert(const value_type& value)
{
return insert(value_type(key, value));
// Obtain and store the std::type_info::name() string as the key.
// Return just the bool from std::map::insert()'s return pair.
return mMap.insert(typename impl_map_type::value_type(typeid(KEY).name(), value)).second;
}
std::pair<iterator, bool> insert(const value_type& pair)
template <typename KEY>
boost::optional<value_type> find() const
{
return mVector.insert(pair);
}
// const find() forwards to non-const find(): this can alter mVector!
const_iterator find(const std::type_info* key) const
{
return const_cast<self*>(this)->find(key);
}
// non-const find() caches previously-unknown type_info* to speed future
// lookups.
iterator find(const std::type_info* key)
{
iterator found = mVector.find(key);
if (found != mVector.end())
{
// If LLSortedVector::find() found, great, we're done.
return found;
}
// Here we didn't find the passed type_info*. On Linux, though, even
// for the same type, typeid(sametype) produces a different type_info*
// when used in different load modules. So the fact that we didn't
// find the type_info* we seek doesn't mean this type isn't
// registered. Scan for matching name() string.
for (typename vector_type::iterator ti(mVector.begin()), tend(mVector.end());
ti != tend; ++ti)
{
if (std::string(ti->first->name()) == key->name())
{
// This unrecognized 'key' is for the same type as ti->first.
// To speed future lookups, insert a new entry that lets us
// look up ti->second using this same 'key'.
return insert(key, ti->second).first;
}
}
// We simply have never seen a type with this type_info* from any load
// module.
return mVector.end();
// Use the std::type_info::name() string as the key.
typename impl_map_type::const_iterator found = mMap.find(typeid(KEY).name());
if (found == mMap.end())
return boost::optional<value_type>();
return found->second;
}
private:
vector_type mVector;
impl_map_type mMap;
};
#endif /* ! defined(LL_LLTYPEINFOLOOKUP_H) */

View File

@ -922,3 +922,174 @@ LLAssetID LLTransactionID::makeAssetID(const LLUUID& session) const
}
return result;
}
// Construct
LLUUID::LLUUID()
{
setNull();
}
// Faster than copying from memory
void LLUUID::setNull()
{
U32 *word = (U32 *)mData;
word[0] = 0;
word[1] = 0;
word[2] = 0;
word[3] = 0;
}
// Compare
bool LLUUID::operator==(const LLUUID& rhs) const
{
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
// Note: binary & to avoid branching
return
(tmp[0] == rhstmp[0]) &
(tmp[1] == rhstmp[1]) &
(tmp[2] == rhstmp[2]) &
(tmp[3] == rhstmp[3]);
}
bool LLUUID::operator!=(const LLUUID& rhs) const
{
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
// Note: binary | to avoid branching
return
(tmp[0] != rhstmp[0]) |
(tmp[1] != rhstmp[1]) |
(tmp[2] != rhstmp[2]) |
(tmp[3] != rhstmp[3]);
}
/*
// JC: This is dangerous. It allows UUIDs to be cast automatically
// to integers, among other things. Use isNull() or notNull().
LLUUID::operator bool() const
{
U32 *word = (U32 *)mData;
return (word[0] | word[1] | word[2] | word[3]) > 0;
}
*/
BOOL LLUUID::notNull() const
{
U32 *word = (U32 *)mData;
return (word[0] | word[1] | word[2] | word[3]) > 0;
}
// Faster than == LLUUID::null because doesn't require
// as much memory access.
BOOL LLUUID::isNull() const
{
U32 *word = (U32 *)mData;
// If all bits are zero, return !0 == TRUE
return !(word[0] | word[1] | word[2] | word[3]);
}
// Copy constructor
LLUUID::LLUUID(const LLUUID& rhs)
{
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
tmp[0] = rhstmp[0];
tmp[1] = rhstmp[1];
tmp[2] = rhstmp[2];
tmp[3] = rhstmp[3];
}
LLUUID::~LLUUID()
{
}
// Assignment
LLUUID& LLUUID::operator=(const LLUUID& rhs)
{
// No need to check the case where this==&rhs. The branch is slower than the write.
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
tmp[0] = rhstmp[0];
tmp[1] = rhstmp[1];
tmp[2] = rhstmp[2];
tmp[3] = rhstmp[3];
return *this;
}
LLUUID::LLUUID(const char *in_string)
{
if (!in_string || in_string[0] == 0)
{
setNull();
return;
}
set(in_string);
}
LLUUID::LLUUID(const std::string& in_string)
{
if (in_string.empty())
{
setNull();
return;
}
set(in_string);
}
// IW: DON'T "optimize" these w/ U32s or you'll scoogie the sort order
// IW: this will make me very sad
bool LLUUID::operator<(const LLUUID &rhs) const
{
U32 i;
for( i = 0; i < (UUID_BYTES - 1); i++ )
{
if( mData[i] != rhs.mData[i] )
{
return (mData[i] < rhs.mData[i]);
}
}
return (mData[UUID_BYTES - 1] < rhs.mData[UUID_BYTES - 1]);
}
bool LLUUID::operator>(const LLUUID &rhs) const
{
U32 i;
for( i = 0; i < (UUID_BYTES - 1); i++ )
{
if( mData[i] != rhs.mData[i] )
{
return (mData[i] > rhs.mData[i]);
}
}
return (mData[UUID_BYTES - 1] > rhs.mData[UUID_BYTES - 1]);
}
U16 LLUUID::getCRC16() const
{
// A UUID is 16 bytes, or 8 shorts.
U16 *short_data = (U16*)mData;
U16 out = 0;
out += short_data[0];
out += short_data[1];
out += short_data[2];
out += short_data[3];
out += short_data[4];
out += short_data[5];
out += short_data[6];
out += short_data[7];
return out;
}
U32 LLUUID::getCRC32() const
{
U32 *tmp = (U32*)mData;
return tmp[0] + tmp[1] + tmp[2] + tmp[3];
}

View File

@ -129,177 +129,6 @@ public:
typedef std::vector<LLUUID> uuid_vec_t;
// Construct
inline LLUUID::LLUUID()
{
setNull();
}
// Faster than copying from memory
inline void LLUUID::setNull()
{
U32 *word = (U32 *)mData;
word[0] = 0;
word[1] = 0;
word[2] = 0;
word[3] = 0;
}
// Compare
inline bool LLUUID::operator==(const LLUUID& rhs) const
{
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
// Note: binary & to avoid branching
return
(tmp[0] == rhstmp[0]) &
(tmp[1] == rhstmp[1]) &
(tmp[2] == rhstmp[2]) &
(tmp[3] == rhstmp[3]);
}
inline bool LLUUID::operator!=(const LLUUID& rhs) const
{
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
// Note: binary | to avoid branching
return
(tmp[0] != rhstmp[0]) |
(tmp[1] != rhstmp[1]) |
(tmp[2] != rhstmp[2]) |
(tmp[3] != rhstmp[3]);
}
/*
// JC: This is dangerous. It allows UUIDs to be cast automatically
// to integers, among other things. Use isNull() or notNull().
inline LLUUID::operator bool() const
{
U32 *word = (U32 *)mData;
return (word[0] | word[1] | word[2] | word[3]) > 0;
}
*/
inline BOOL LLUUID::notNull() const
{
U32 *word = (U32 *)mData;
return (word[0] | word[1] | word[2] | word[3]) > 0;
}
// Faster than == LLUUID::null because doesn't require
// as much memory access.
inline BOOL LLUUID::isNull() const
{
U32 *word = (U32 *)mData;
// If all bits are zero, return !0 == TRUE
return !(word[0] | word[1] | word[2] | word[3]);
}
// Copy constructor
inline LLUUID::LLUUID(const LLUUID& rhs)
{
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
tmp[0] = rhstmp[0];
tmp[1] = rhstmp[1];
tmp[2] = rhstmp[2];
tmp[3] = rhstmp[3];
}
inline LLUUID::~LLUUID()
{
}
// Assignment
inline LLUUID& LLUUID::operator=(const LLUUID& rhs)
{
// No need to check the case where this==&rhs. The branch is slower than the write.
U32 *tmp = (U32 *)mData;
U32 *rhstmp = (U32 *)rhs.mData;
tmp[0] = rhstmp[0];
tmp[1] = rhstmp[1];
tmp[2] = rhstmp[2];
tmp[3] = rhstmp[3];
return *this;
}
inline LLUUID::LLUUID(const char *in_string)
{
if (!in_string || in_string[0] == 0)
{
setNull();
return;
}
set(in_string);
}
inline LLUUID::LLUUID(const std::string& in_string)
{
if (in_string.empty())
{
setNull();
return;
}
set(in_string);
}
// IW: DON'T "optimize" these w/ U32s or you'll scoogie the sort order
// IW: this will make me very sad
inline bool LLUUID::operator<(const LLUUID &rhs) const
{
U32 i;
for( i = 0; i < (UUID_BYTES - 1); i++ )
{
if( mData[i] != rhs.mData[i] )
{
return (mData[i] < rhs.mData[i]);
}
}
return (mData[UUID_BYTES - 1] < rhs.mData[UUID_BYTES - 1]);
}
inline bool LLUUID::operator>(const LLUUID &rhs) const
{
U32 i;
for( i = 0; i < (UUID_BYTES - 1); i++ )
{
if( mData[i] != rhs.mData[i] )
{
return (mData[i] > rhs.mData[i]);
}
}
return (mData[UUID_BYTES - 1] > rhs.mData[UUID_BYTES - 1]);
}
inline U16 LLUUID::getCRC16() const
{
// A UUID is 16 bytes, or 8 shorts.
U16 *short_data = (U16*)mData;
U16 out = 0;
out += short_data[0];
out += short_data[1];
out += short_data[2];
out += short_data[3];
out += short_data[4];
out += short_data[5];
out += short_data[6];
out += short_data[7];
return out;
}
inline U32 LLUUID::getCRC32() const
{
U32 *tmp = (U32*)mData;
return tmp[0] + tmp[1] + tmp[2] + tmp[3];
}
// Helper structure for ordering lluuids in stl containers.
// eg: std::map<LLUUID, LLWidget*, lluuid_less> widget_map;
@ -329,3 +158,5 @@ public:
};
#endif

View File

@ -28,8 +28,8 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 3;
const S32 LL_VERSION_MINOR = 3;
const S32 LL_VERSION_PATCH = 5;
const S32 LL_VERSION_MINOR = 4;
const S32 LL_VERSION_PATCH = 1;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";

View File

@ -292,11 +292,16 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
++sRawImageCount;
}
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy)
: LLImageBase()
{
mMemType = LLMemType::MTYPE_IMAGERAW;
if(allocateDataSize(width, height, components))
if(no_copy)
{
setDataAndSize(data, width, height, components);
}
else if(allocateDataSize(width, height, components))
{
memcpy(getData(), data, width*height*components);
}

View File

@ -189,7 +189,7 @@ protected:
public:
LLImageRaw();
LLImageRaw(U16 width, U16 height, S8 components);
LLImageRaw(U8 *data, U16 width, U16 height, S8 components);
LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy = false);
// Construct using createFromFile (used by tools)
//LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only = false);

0
indra/llimage/llimagej2c.cpp Normal file → Executable file
View File

View File

@ -1179,7 +1179,7 @@ LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap)
llassert(mDims == comp_dims); // Safety check; the caller has ensured this
}
bool use_shorts = (mComps[c].get_bit_depth(true) <= 16);
mLines[c].pre_create(&mAllocator,mDims.size.x,mReversible[c],use_shorts);
mLines[c].pre_create(&mAllocator,mDims.size.x,mReversible[c],use_shorts,0,0);
if (res.which() == 0) // No DWT levels used
{
mEngines[c] = kdu_decoder(res.access_subband(LL_BAND),&mAllocator,use_shorts);
@ -1223,7 +1223,7 @@ separation between consecutive rows in the real buffer. */
{
for (c = 0; c < mNumComponents; c++)
{
mEngines[c].pull(mLines[c],true);
mEngines[c].pull(mLines[c]);
}
if ((mNumComponents >= 3) && mUseYCC)
{

View File

@ -32,6 +32,7 @@
//
// KDU core header files
//
#define KDU_NO_THREADS
#include "kdu_elementary.h"
#include "kdu_messaging.h"
#include "kdu_params.h"

View File

@ -28,6 +28,7 @@
#define LL_LLKDUMEM_H
// Support classes for reading and writing from memory buffers in KDU
#define KDU_NO_THREADS
#include "kdu_image.h"
#include "kdu_elementary.h"
#include "kdu_messaging.h"

19
indra/llkdu/tests/llimagej2ckdu_test.cpp Normal file → Executable file
View File

@ -127,7 +127,6 @@ kdu_subband kdu_resolution::access_subband(int ) { kdu_subband a; return a; }
void kdu_resolution::get_dims(kdu_dims& ) { }
int kdu_resolution::which() { return 0; }
int kdu_resolution::get_valid_band_indices(int &) { return 1; }
kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*) { }
kdu_synthesis::kdu_synthesis(kdu_resolution, kdu_sample_allocator*, bool, float, kdu_thread_env*, kdu_thread_queue*) { }
kdu_params::kdu_params(const char*, bool, bool, bool, bool, bool) { }
kdu_params::~kdu_params() { }
@ -153,7 +152,6 @@ void kdu_codestream::destroy() { }
void kdu_codestream::collect_timing_stats(int ) { }
void kdu_codestream::set_max_bytes(kdu_long, bool, bool ) { }
void kdu_codestream::get_valid_tiles(kdu_dims& ) { }
void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long ) { }
void kdu_codestream::create(kdu_compressed_source*, kdu_thread_env*) { }
void kdu_codestream::apply_input_restrictions( int, int, int, int, kdu_dims*, kdu_component_access_mode ) { }
void kdu_codestream::get_subsampling(int , kdu_coords&, bool ) { }
@ -175,7 +173,7 @@ kdu_block* kdu_subband::open_block(kdu_coords, int*, kdu_thread_env*) { return N
bool kdu_codestream_comment::put_text(const char*) { return false; }
void kdu_customize_warnings(kdu_message*) { }
void kdu_customize_errors(kdu_message*) { }
void kdu_convert_ycc_to_rgb(kdu_line_buf&, kdu_line_buf&, kdu_line_buf&, int) { }
kdu_long kdu_multi_analysis::create(kdu_codestream, kdu_tile, bool, kdu_roi_image*, bool, int, kdu_thread_env*, kdu_thread_queue*, bool ) { kdu_long a = 0; return a; }
siz_params::siz_params() : kdu_params(NULL, false, false, false, false, false) { }
void siz_params::finalize(bool ) { }
@ -184,6 +182,21 @@ int siz_params::write_marker_segment(kdu_output*, kdu_params*, int) { return 0;
bool siz_params::check_marker_segment(kdu_uint16, int, kdu_byte a[], int&) { return false; }
bool siz_params::read_marker_segment(kdu_uint16, int, kdu_byte a[], int) { return false; }
#ifdef LL_LINUX
// Linux use the old pre KDU v7.0.0
// *TODO: Supress this legacy stubbs once Linux migrates to v7.0.0
kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*) { }
void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long ) { }
void kdu_convert_ycc_to_rgb(kdu_line_buf&, kdu_line_buf&, kdu_line_buf&, int) { }
#else
kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*, int) { }
void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long, kdu_thread_env* ) { }
void (*kdu_convert_ycc_to_rgb_rev16)(kdu_int16*,kdu_int16*,kdu_int16*,int);
void (*kdu_convert_ycc_to_rgb_irrev16)(kdu_int16*,kdu_int16*,kdu_int16*,int);
void (*kdu_convert_ycc_to_rgb_rev32)(kdu_int32*,kdu_int32*,kdu_int32*,int);
void (*kdu_convert_ycc_to_rgb_irrev32)(float*,float*,float*,int);
#endif
// -------------------------------------------------------------------------------------------
// TUT
// -------------------------------------------------------------------------------------------

View File

@ -87,6 +87,9 @@ namespace LLAvatarNameCache
/// Time when unrefreshed cached names were checked last
static F64 sLastExpireCheck;
/// Time-to-live for a temp cache entry.
const F64 TEMP_CACHE_ENTRY_LIFETIME = 60.0;
//-----------------------------------------------------------------------
// Internal methods
//-----------------------------------------------------------------------
@ -274,7 +277,7 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id)
{
// there is no existing cache entry, so make a temporary name from legacy
LL_WARNS("AvNameCache") << "LLAvatarNameCache get legacy for agent "
<< agent_id << LL_ENDL;
<< agent_id << LL_ENDL;
gCacheName->get(agent_id, false, // legacy compatibility
boost::bind(&LLAvatarNameCache::legacyNameCallback,
_1, _2, _3));
@ -287,13 +290,14 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id)
// Clear this agent from the pending list
LLAvatarNameCache::sPendingQueue.erase(agent_id);
const LLAvatarName& av_name = existing->second;
LLAvatarName& av_name = existing->second;
LL_DEBUGS("AvNameCache") << "LLAvatarNameCache use cache for agent "
<< agent_id
<< "user '" << av_name.mUsername << "' "
<< "display '" << av_name.mDisplayName << "' "
<< "expires in " << av_name.mExpires - LLFrameTimer::getTotalSeconds() << " seconds"
<< LL_ENDL;
av_name.mExpires = LLFrameTimer::getTotalSeconds() + TEMP_CACHE_ENTRY_LIFETIME; // reset expiry time so we don't constantly rerequest.
}
}
@ -402,10 +406,12 @@ void LLAvatarNameCache::legacyNameCallback(const LLUUID& agent_id,
<< LL_ENDL;
buildLegacyName(full_name, &av_name);
// Don't add to cache, the data already exists in the legacy name system
// cache and we don't want or need duplicate storage, because keeping the
// two copies in sync is complex.
processName(agent_id, av_name, false);
// Add to cache, because if we don't we'll keep rerequesting the
// same record forever. buildLegacyName should always guarantee
// that these records expire reasonably soon
// (in TEMP_CACHE_ENTRY_LIFETIME seconds), so if the failure was due
// to something temporary we will eventually request and get the right data.
processName(agent_id, av_name, true);
}
void LLAvatarNameCache::requestNamesViaLegacy()
@ -583,7 +589,7 @@ void LLAvatarNameCache::buildLegacyName(const std::string& full_name,
av_name->mDisplayName = full_name;
av_name->mIsDisplayNameDefault = true;
av_name->mIsTemporaryName = true;
av_name->mExpires = F64_MAX; // not used because these are not cached
av_name->mExpires = LLFrameTimer::getTotalSeconds() + TEMP_CACHE_ENTRY_LIFETIME;
LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::buildLegacyName "
<< full_name
<< LL_ENDL;

View File

@ -935,8 +935,8 @@ bool LLCurlThread::CurlRequest::processRequest()
if(!completed)
{
setPriority(LLQueuedThread::PRIORITY_LOW) ;
}
setPriority(LLQueuedThread::PRIORITY_LOW) ;
}
}
return completed ;
@ -946,7 +946,7 @@ void LLCurlThread::CurlRequest::finishRequest(bool completed)
{
if(mMulti->isDead())
{
mCurlThread->deleteMulti(mMulti) ;
mCurlThread->deleteMulti(mMulti) ;
}
else
{
@ -990,6 +990,7 @@ void LLCurlThread::killMulti(LLCurl::Multi* multi)
return ;
}
multi->markDead() ;
}
@ -1095,7 +1096,9 @@ void LLCurlRequest::get(const std::string& url, LLCurl::ResponderPtr responder)
{
getByteRange(url, headers_t(), 0, -1, responder);
}
// Note: (length==0) is interpreted as "the rest of the file", i.e. the whole file if (offset==0) or
// the remainder of the file if not.
bool LLCurlRequest::getByteRange(const std::string& url,
const headers_t& headers,
S32 offset, S32 length,
@ -1113,6 +1116,11 @@ bool LLCurlRequest::getByteRange(const std::string& url,
std::string range = llformat("Range: bytes=%d-%d", offset,offset+length-1);
easy->slist_append(range.c_str());
}
else if (offset > 0)
{
std::string range = llformat("Range: bytes=%d-", offset);
easy->slist_append(range.c_str());
}
easy->setHeaders();
bool res = addEasy(easy);
return res;
@ -1238,6 +1246,208 @@ S32 LLCurlRequest::getQueued()
return queued;
}
LLCurlTextureRequest::LLCurlTextureRequest(S32 concurrency) :
LLCurlRequest(),
mConcurrency(concurrency),
mInQueue(0),
mMutex(NULL),
mHandleCounter(1),
mTotalIssuedRequests(0),
mTotalReceivedBits(0)
{
mGlobalTimer.reset();
}
LLCurlTextureRequest::~LLCurlTextureRequest()
{
mRequestMap.clear();
for(req_queue_t::iterator iter = mCachedRequests.begin(); iter != mCachedRequests.end(); ++iter)
{
delete *iter;
}
mCachedRequests.clear();
}
//return 0: success
// > 0: cached handle
U32 LLCurlTextureRequest::getByteRange(const std::string& url,
const headers_t& headers,
S32 offset, S32 length, U32 pri,
LLCurl::ResponderPtr responder, F32 delay_time)
{
U32 ret_val = 0;
bool success = false;
if(mInQueue < mConcurrency && delay_time < 0.f)
{
success = LLCurlRequest::getByteRange(url, headers, offset, length, responder);
}
LLMutexLock lock(&mMutex);
if(success)
{
mInQueue++;
mTotalIssuedRequests++;
}
else
{
request_t* request = new request_t(mHandleCounter, url, headers, offset, length, pri, responder);
if(delay_time > 0.f)
{
request->mStartTime = mGlobalTimer.getElapsedTimeF32() + delay_time;
}
mCachedRequests.insert(request);
mRequestMap[mHandleCounter] = request;
ret_val = mHandleCounter;
mHandleCounter++;
if(!mHandleCounter)
{
mHandleCounter = 1;
}
}
return ret_val;
}
void LLCurlTextureRequest::completeRequest(S32 received_bytes)
{
LLMutexLock lock(&mMutex);
llassert_always(mInQueue > 0);
mInQueue--;
mTotalReceivedBits += received_bytes * 8;
}
void LLCurlTextureRequest::nextRequests()
{
if(mCachedRequests.empty() || mInQueue >= mConcurrency)
{
return;
}
F32 cur_time = mGlobalTimer.getElapsedTimeF32();
req_queue_t::iterator iter;
{
LLMutexLock lock(&mMutex);
iter = mCachedRequests.begin();
}
while(1)
{
request_t* request = *iter;
if(request->mStartTime < cur_time)
{
if(!LLCurlRequest::getByteRange(request->mUrl, request->mHeaders, request->mOffset, request->mLength, request->mResponder))
{
break;
}
LLMutexLock lock(&mMutex);
++iter;
mInQueue++;
mTotalIssuedRequests++;
mCachedRequests.erase(request);
mRequestMap.erase(request->mHandle);
delete request;
if(iter == mCachedRequests.end() || mInQueue >= mConcurrency)
{
break;
}
}
else
{
LLMutexLock lock(&mMutex);
++iter;
if(iter == mCachedRequests.end() || mInQueue >= mConcurrency)
{
break;
}
}
}
return;
}
void LLCurlTextureRequest::updatePriority(U32 handle, U32 pri)
{
if(!handle)
{
return;
}
LLMutexLock lock(&mMutex);
std::map<S32, request_t*>::iterator iter = mRequestMap.find(handle);
if(iter != mRequestMap.end())
{
request_t* req = iter->second;
if(req->mPriority != pri)
{
mCachedRequests.erase(req);
req->mPriority = pri;
mCachedRequests.insert(req);
}
}
}
void LLCurlTextureRequest::removeRequest(U32 handle)
{
if(!handle)
{
return;
}
LLMutexLock lock(&mMutex);
std::map<S32, request_t*>::iterator iter = mRequestMap.find(handle);
if(iter != mRequestMap.end())
{
request_t* req = iter->second;
mRequestMap.erase(iter);
mCachedRequests.erase(req);
delete req;
}
}
bool LLCurlTextureRequest::isWaiting(U32 handle)
{
if(!handle)
{
return false;
}
LLMutexLock lock(&mMutex);
return mRequestMap.find(handle) != mRequestMap.end();
}
U32 LLCurlTextureRequest::getTotalReceivedBits()
{
LLMutexLock lock(&mMutex);
U32 bits = mTotalReceivedBits;
mTotalReceivedBits = 0;
return bits;
}
U32 LLCurlTextureRequest::getTotalIssuedRequests()
{
LLMutexLock lock(&mMutex);
return mTotalIssuedRequests;
}
S32 LLCurlTextureRequest::getNumRequests()
{
LLMutexLock lock(&mMutex);
return mInQueue;
}
////////////////////////////////////////////////////////////////////////////
// For generating one easy request
// associated with a single multi request

View File

@ -414,6 +414,71 @@ private:
BOOL mProcessing;
};
//for texture fetch only
class LLCurlTextureRequest : public LLCurlRequest
{
public:
LLCurlTextureRequest(S32 concurrency);
~LLCurlTextureRequest();
U32 getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, U32 pri, LLCurl::ResponderPtr responder, F32 delay_time = -1.f);
void nextRequests();
void completeRequest(S32 received_bytes);
void updatePriority(U32 handle, U32 pri);
void removeRequest(U32 handle);
U32 getTotalReceivedBits();
U32 getTotalIssuedRequests();
S32 getNumRequests();
bool isWaiting(U32 handle);
private:
LLMutex mMutex;
S32 mConcurrency;
S32 mInQueue; //request currently in queue.
U32 mHandleCounter;
U32 mTotalIssuedRequests;
U32 mTotalReceivedBits;
typedef struct _request_t
{
_request_t(U32 handle, const std::string& url, const headers_t& headers, S32 offset, S32 length, U32 pri, LLCurl::ResponderPtr responder) :
mHandle(handle), mUrl(url), mHeaders(headers), mOffset(offset), mLength(length), mPriority(pri), mResponder(responder), mStartTime(0.f)
{}
U32 mHandle;
std::string mUrl;
LLCurlRequest::headers_t mHeaders;
S32 mOffset;
S32 mLength;
LLCurl::ResponderPtr mResponder;
U32 mPriority;
F32 mStartTime; //start time to issue this request
} request_t;
struct request_compare
{
bool operator()(const request_t* lhs, const request_t* rhs) const
{
if(lhs->mPriority != rhs->mPriority)
{
return lhs->mPriority > rhs->mPriority; // higher priority in front of queue (set)
}
else
{
return (U32)lhs < (U32)rhs;
}
}
};
typedef std::set<request_t*, request_compare> req_queue_t;
req_queue_t mCachedRequests;
std::map<S32, request_t*> mRequestMap;
LLFrameTimer mGlobalTimer;
};
class LLCurlEasyRequest
{
public:

View File

@ -943,7 +943,6 @@ char const* const _PREHASH_SysGPU = LLMessageStringTable::getInstance()->getStri
char const* const _PREHASH_AvatarInterestsReply = LLMessageStringTable::getInstance()->getString("AvatarInterestsReply");
char const* const _PREHASH_StartLure = LLMessageStringTable::getInstance()->getString("StartLure");
char const* const _PREHASH_SysRAM = LLMessageStringTable::getInstance()->getString("SysRAM");
char const* const _PREHASH_ObjectPosition = LLMessageStringTable::getInstance()->getString("ObjectPosition");
char const* const _PREHASH_SitPosition = LLMessageStringTable::getInstance()->getString("SitPosition");
char const* const _PREHASH_StartTime = LLMessageStringTable::getInstance()->getString("StartTime");
char const* const _PREHASH_BornOn = LLMessageStringTable::getInstance()->getString("BornOn");
@ -999,7 +998,6 @@ char const* const _PREHASH_SnapshotID = LLMessageStringTable::getInstance()->get
char const* const _PREHASH_Aspect = LLMessageStringTable::getInstance()->getString("Aspect");
char const* const _PREHASH_ParamSize = LLMessageStringTable::getInstance()->getString("ParamSize");
char const* const _PREHASH_VoteCast = LLMessageStringTable::getInstance()->getString("VoteCast");
char const* const _PREHASH_CastsShadows = LLMessageStringTable::getInstance()->getString("CastsShadows");
char const* const _PREHASH_EveryoneMask = LLMessageStringTable::getInstance()->getString("EveryoneMask");
char const* const _PREHASH_ObjectSpinUpdate = LLMessageStringTable::getInstance()->getString("ObjectSpinUpdate");
char const* const _PREHASH_MaturePublish = LLMessageStringTable::getInstance()->getString("MaturePublish");
@ -1048,7 +1046,6 @@ char const* const _PREHASH_SimIP = LLMessageStringTable::getInstance()->getStrin
char const* const _PREHASH_GodID = LLMessageStringTable::getInstance()->getString("GodID");
char const* const _PREHASH_TeleportMinPrice = LLMessageStringTable::getInstance()->getString("TeleportMinPrice");
char const* const _PREHASH_VoteItem = LLMessageStringTable::getInstance()->getString("VoteItem");
char const* const _PREHASH_ObjectRotation = LLMessageStringTable::getInstance()->getString("ObjectRotation");
char const* const _PREHASH_SitRotation = LLMessageStringTable::getInstance()->getString("SitRotation");
char const* const _PREHASH_SnapSelection = LLMessageStringTable::getInstance()->getString("SnapSelection");
char const* const _PREHASH_SoundTrigger = LLMessageStringTable::getInstance()->getString("SoundTrigger");

View File

@ -943,7 +943,6 @@ extern char const* const _PREHASH_SysGPU;
extern char const* const _PREHASH_AvatarInterestsReply;
extern char const* const _PREHASH_StartLure;
extern char const* const _PREHASH_SysRAM;
extern char const* const _PREHASH_ObjectPosition;
extern char const* const _PREHASH_SitPosition;
extern char const* const _PREHASH_StartTime;
extern char const* const _PREHASH_BornOn;
@ -999,7 +998,6 @@ extern char const* const _PREHASH_SnapshotID;
extern char const* const _PREHASH_Aspect;
extern char const* const _PREHASH_ParamSize;
extern char const* const _PREHASH_VoteCast;
extern char const* const _PREHASH_CastsShadows;
extern char const* const _PREHASH_EveryoneMask;
extern char const* const _PREHASH_ObjectSpinUpdate;
extern char const* const _PREHASH_MaturePublish;
@ -1048,7 +1046,6 @@ extern char const* const _PREHASH_SimIP;
extern char const* const _PREHASH_GodID;
extern char const* const _PREHASH_TeleportMinPrice;
extern char const* const _PREHASH_VoteItem;
extern char const* const _PREHASH_ObjectRotation;
extern char const* const _PREHASH_SitRotation;
extern char const* const _PREHASH_SnapSelection;
extern char const* const _PREHASH_SoundTrigger;

View File

@ -7,12 +7,14 @@ include(LLCommon)
include(LLMath)
include(LLMessage)
include(LLXML)
include(LLPhysicsExtensions)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
${LIBS_PREBUILT_DIR}/include/collada
${LIBS_PREBUILT_DIR}/include/collada/1.4
)

31
indra/llprimitive/llprimitive.cpp Normal file → Executable file
View File

@ -149,7 +149,8 @@ bool LLPrimitive::cleanupVolumeManager()
LLPrimitive::LLPrimitive()
: mTextureList(),
mNumTEs(0),
mMiscFlags(0)
mMiscFlags(0),
mNumBumpmapTEs(0)
{
mPrimitiveCode = 0;
@ -237,7 +238,10 @@ void LLPrimitive::setAllTETextures(const LLUUID &tex_id)
//===============================================================
void LLPrimitive::setTE(const U8 index, const LLTextureEntry& te)
{
mTextureList.copyTexture(index, te);
if(mTextureList.copyTexture(index, te) != TEM_CHANGE_NONE && te.getBumpmap() > 0)
{
mNumBumpmapTEs++;
}
}
S32 LLPrimitive::setTETexture(const U8 index, const LLUUID &id)
@ -316,6 +320,7 @@ S32 LLPrimitive::setTERotation(const U8 index, const F32 r)
//===============================================================
S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump)
{
updateNumBumpmap(index, bump);
return mTextureList.setBumpShinyFullbright(index, bump);
}
@ -326,11 +331,13 @@ S32 LLPrimitive::setTEMediaTexGen(const U8 index, const U8 media)
S32 LLPrimitive::setTEBumpmap(const U8 index, const U8 bump)
{
updateNumBumpmap(index, bump);
return mTextureList.setBumpMap(index, bump);
}
S32 LLPrimitive::setTEBumpShiny(const U8 index, const U8 bump_shiny)
{
updateNumBumpmap(index, bump_shiny);
return mTextureList.setBumpShiny(index, bump_shiny);
}
@ -1445,6 +1452,26 @@ void LLPrimitive::takeTextureList(LLPrimTextureList& other_list)
mTextureList.take(other_list);
}
void LLPrimitive::updateNumBumpmap(const U8 index, const U8 bump)
{
LLTextureEntry* te = getTE(index);
if(!te)
{
return;
}
U8 old_bump = te->getBumpmap();
if(old_bump > 0)
{
mNumBumpmapTEs--;
}
if((bump & TEM_BUMP_MASK) > 0)
{
mNumBumpmapTEs++;
}
return;
}
//============================================================================
// Moved from llselectmgr.cpp

View File

@ -421,7 +421,8 @@ public:
inline BOOL isAvatar() const;
inline BOOL isSittingAvatar() const;
inline BOOL isSittingAvatarOnGround() const;
inline bool hasBumpmap() const { return mNumBumpmapTEs > 0;}
void setFlags(U32 flags) { mMiscFlags = flags; }
void addFlags(U32 flags) { mMiscFlags |= flags; }
void removeFlags(U32 flags) { mMiscFlags &= ~flags; }
@ -435,6 +436,9 @@ public:
inline static BOOL isPrimitive(const LLPCode pcode);
inline static BOOL isApp(const LLPCode pcode);
private:
void updateNumBumpmap(const U8 index, const U8 bump);
protected:
LLPCode mPrimitiveCode; // Primitive code
LLVector3 mVelocity; // how fast are we moving?
@ -444,6 +448,7 @@ protected:
LLPrimTextureList mTextureList; // list of texture GUIDs, scales, offsets
U8 mMaterial; // Material code
U8 mNumTEs; // # of faces on the primitve
U8 mNumBumpmapTEs; // number of bumpmap TEs.
U32 mMiscFlags; // home for misc bools
public:

View File

@ -28,43 +28,47 @@
#define LL_OBJECT_FLAGS_H
// downstream flags from sim->viewer
const U32 FLAGS_USE_PHYSICS = 0x00000001;
const U32 FLAGS_CREATE_SELECTED = 0x00000002;
const U32 FLAGS_OBJECT_MODIFY = 0x00000004;
const U32 FLAGS_OBJECT_COPY = 0x00000008;
const U32 FLAGS_OBJECT_ANY_OWNER = 0x00000010;
const U32 FLAGS_OBJECT_YOU_OWNER = 0x00000020;
const U32 FLAGS_SCRIPTED = 0x00000040;
const U32 FLAGS_HANDLE_TOUCH = 0x00000080;
const U32 FLAGS_OBJECT_MOVE = 0x00000100;
const U32 FLAGS_TAKES_MONEY = 0x00000200;
const U32 FLAGS_PHANTOM = 0x00000400;
const U32 FLAGS_INVENTORY_EMPTY = 0x00000800;
const U32 FLAGS_USE_PHYSICS = (1U << 0);
const U32 FLAGS_CREATE_SELECTED = (1U << 1);
const U32 FLAGS_OBJECT_MODIFY = (1U << 2);
const U32 FLAGS_OBJECT_COPY = (1U << 3);
const U32 FLAGS_OBJECT_ANY_OWNER = (1U << 4);
const U32 FLAGS_OBJECT_YOU_OWNER = (1U << 5);
const U32 FLAGS_SCRIPTED = (1U << 6);
const U32 FLAGS_HANDLE_TOUCH = (1U << 7);
const U32 FLAGS_OBJECT_MOVE = (1U << 8);
const U32 FLAGS_TAKES_MONEY = (1U << 9);
const U32 FLAGS_PHANTOM = (1U << 10);
const U32 FLAGS_INVENTORY_EMPTY = (1U << 11);
const U32 FLAGS_JOINT_HINGE = 0x00001000;
const U32 FLAGS_JOINT_P2P = 0x00002000;
const U32 FLAGS_JOINT_LP2P = 0x00004000;
// const U32 FLAGS_JOINT_WHEEL = 0x00008000;
const U32 FLAGS_INCLUDE_IN_SEARCH = 0x00008000;
const U32 FLAGS_AFFECTS_NAVMESH = (1U << 12);
const U32 FLAGS_CHARACTER = (1U << 13);
const U32 FLAGS_VOLUME_DETECT = (1U << 14);
const U32 FLAGS_INCLUDE_IN_SEARCH = (1U << 15);
const U32 FLAGS_ALLOW_INVENTORY_DROP = 0x00010000;
const U32 FLAGS_OBJECT_TRANSFER = 0x00020000;
const U32 FLAGS_OBJECT_GROUP_OWNED = 0x00040000;
//const U32 FLAGS_OBJECT_YOU_OFFICER = 0x00080000;
const U32 FLAGS_ALLOW_INVENTORY_DROP = (1U << 16);
const U32 FLAGS_OBJECT_TRANSFER = (1U << 17);
const U32 FLAGS_OBJECT_GROUP_OWNED = (1U << 18);
//const U32 FLAGS_UNUSED_000 = (1U << 19); // was FLAGS_OBJECT_YOU_OFFICER
const U32 FLAGS_CAMERA_DECOUPLED = 0x00100000;
const U32 FLAGS_ANIM_SOURCE = 0x00200000;
const U32 FLAGS_CAMERA_SOURCE = 0x00400000;
const U32 FLAGS_CAMERA_DECOUPLED = (1U << 20);
const U32 FLAGS_ANIM_SOURCE = (1U << 21);
const U32 FLAGS_CAMERA_SOURCE = (1U << 22);
const U32 FLAGS_CAST_SHADOWS = 0x00800000;
//const U32 FLAGS_UNUSED_001 = (1U << 23); // was FLAGS_CAST_SHADOWS
const U32 FLAGS_OBJECT_OWNER_MODIFY = 0x10000000;
//const U32 FLAGS_UNUSED_002 = (1U << 24);
//const U32 FLAGS_UNUSED_003 = (1U << 25);
//const U32 FLAGS_UNUSED_004 = (1U << 26);
//const U32 FLAGS_UNUSED_005 = (1U << 27);
const U32 FLAGS_TEMPORARY_ON_REZ = 0x20000000;
const U32 FLAGS_TEMPORARY = 0x40000000;
const U32 FLAGS_ZLIB_COMPRESSED = 0x80000000;
const U32 FLAGS_OBJECT_OWNER_MODIFY = (1U << 28);
const U32 FLAGS_LOCAL = FLAGS_ANIM_SOURCE | FLAGS_CAMERA_SOURCE;
const U32 FLAGS_TEMPORARY_ON_REZ = (1U << 29);
//const U32 FLAGS_UNUSED_006 = (1U << 30); // was FLAGS_TEMPORARY
//const U32 FLAGS_UNUSED_007 = (1U << 31); // was FLAGS_ZLIB_COMPRESSED
const U32 FLAGS_LOCAL = FLAGS_ANIM_SOURCE | FLAGS_CAMERA_SOURCE;
typedef enum e_havok_joint_type
{
@ -77,4 +81,3 @@ typedef enum e_havok_joint_type
} EHavokJointType;
#endif

View File

@ -36,6 +36,7 @@ set(llrender_SOURCE_FILES
llglslshader.cpp
llimagegl.cpp
llpostprocess.cpp
llrendernavprim.cpp
llrendersphere.cpp
llshadermgr.cpp
lltexture.cpp
@ -59,6 +60,7 @@ set(llrender_HEADER_FILES
llimagegl.h
llpostprocess.h
llrender.h
llrendernavprim.h
llrendersphere.h
llshadermgr.h
lltexture.h

View File

@ -59,7 +59,6 @@ protected:
LLGLEnable mColorMaterial;
LLGLDisable mAlphaTest, mBlend, mCullFace, mDither, mFog,
mLineSmooth, mLineStipple, mNormalize, mPolygonSmooth,
mTextureGenQ, mTextureGenR, mTextureGenS, mTextureGenT,
mGLMultisample;
public:
LLGLSDefault()
@ -76,10 +75,6 @@ public:
mLineStipple(GL_LINE_STIPPLE),
mNormalize(GL_NORMALIZE),
mPolygonSmooth(GL_POLYGON_SMOOTH),
mTextureGenQ(GL_TEXTURE_GEN_Q),
mTextureGenR(GL_TEXTURE_GEN_R),
mTextureGenS(GL_TEXTURE_GEN_S),
mTextureGenT(GL_TEXTURE_GEN_T),
mGLMultisample(GL_MULTISAMPLE_ARB)
{ }
};

17
indra/llrender/llimagegl.cpp Normal file → Executable file
View File

@ -478,7 +478,7 @@ bool LLImageGL::checkSize(S32 width, S32 height)
return check_power_of_two(width) && check_power_of_two(height);
}
void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents)
void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level)
{
if (width != mWidth || height != mHeight || ncomponents != mComponents)
{
@ -511,6 +511,11 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents)
width >>= 1;
height >>= 1;
}
if(discard_level > 0)
{
mMaxDiscardLevel = llmax(mMaxDiscardLevel, (S8)discard_level);
}
}
else
{
@ -860,14 +865,13 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
llassert(mCurrentDiscardLevel >= 0);
discard_level = mCurrentDiscardLevel;
}
discard_level = llclamp(discard_level, 0, (S32)mMaxDiscardLevel);
// Actual image width/height = raw image width/height * 2^discard_level
S32 w = raw_image->getWidth() << discard_level;
S32 h = raw_image->getHeight() << discard_level;
// setSize may call destroyGLTexture if the size does not match
setSize(w, h, raw_image->getComponents());
setSize(w, h, raw_image->getComponents(), discard_level);
if( !mHasExplicitFormat )
{
@ -1264,8 +1268,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
llassert(mCurrentDiscardLevel >= 0);
discard_level = mCurrentDiscardLevel;
}
discard_level = llclamp(discard_level, 0, (S32)mMaxDiscardLevel);
// Actual image width/height = raw image width/height * 2^discard_level
S32 raw_w = imageraw->getWidth() ;
S32 raw_h = imageraw->getHeight() ;
@ -1273,7 +1276,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
S32 h = raw_h << discard_level;
// setSize may call destroyGLTexture if the size does not match
setSize(w, h, imageraw->getComponents());
setSize(w, h, imageraw->getComponents(), discard_level);
if( !mHasExplicitFormat )
{

2
indra/llrender/llimagegl.h Normal file → Executable file
View File

@ -100,7 +100,7 @@ protected:
public:
virtual void dump(); // debugging info to llinfos
void setSize(S32 width, S32 height, S32 ncomponents);
void setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1);
void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;}
void setAllowCompression(bool allow) { mAllowCompression = allow; }

View File

@ -648,7 +648,7 @@ void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eT
gGL.flush();
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB);
}
// We want an early out, because this function does a LOT of stuff.
if ( ( (isAlpha && (mCurrAlphaOp == op) && (mCurrAlphaSrc1 == src1) && (mCurrAlphaSrc2 == src2))
|| (!isAlpha && (mCurrColorOp == op) && (mCurrColorSrc1 == src1) && (mCurrColorSrc2 == src2)) ) && !gGL.mDirty)
@ -1437,6 +1437,17 @@ void LLRender::matrixMode(U32 mode)
mMatrixMode = mode;
}
U32 LLRender::getMatrixMode()
{
if (mMatrixMode >= MM_TEXTURE0 && mMatrixMode <= MM_TEXTURE3)
{ //always return MM_TEXTURE if current matrix mode points at any texture matrix
return MM_TEXTURE;
}
return mMatrixMode;
}
void LLRender::loadIdentity()
{
flush();

View File

@ -346,6 +346,7 @@ public:
void loadIdentity();
void multMatrix(const GLfloat* m);
void matrixMode(U32 mode);
U32 getMatrixMode();
const glh::matrix4f& getModelviewMatrix();
const glh::matrix4f& getProjectionMatrix();

View File

@ -0,0 +1,59 @@
/**
* @file llrendernavprim.cpp
* @brief Implementation of llrendernavprim
* @author Prep@lindenlab.com
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2012, Linden Research, Inc.
*
* This library 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;
* version 2.1 of the License only.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "linden_common.h"
#include "llrendernavprim.h"
#include "llrender.h"
#include "llvertexbuffer.h"
#include "v4coloru.h"
#include "v3math.h"
//=============================================================================
LLRenderNavPrim gRenderNav;
//=============================================================================
void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const
{
LLColor4 cV(color);
gGL.color4fv( cV.mV );
gGL.begin(LLRender::TRIANGLES);
{
gGL.vertex3fv( a.mV );
gGL.vertex3fv( b.mV );
gGL.vertex3fv( c.mV );
}
gGL.end();
}
//=============================================================================
void LLRenderNavPrim::renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt )
{
pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_NORMAL );
pVBO->drawArrays( mode, 0, vertCnt );
}
//=============================================================================

View File

@ -0,0 +1,49 @@
/**
* @file llrendernavprim.h
* @brief Header file for llrendernavprim
* @author Prep@lindenlab.com
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2012, Linden Research, Inc.
*
* This library 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;
* version 2.1 of the License only.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLRENDERNAVPRIM_H
#define LL_LLRENDERNAVPRIM_H
#include "stdtypes.h"
class LLColor4U;
class LLVector3;
class LLVertexBuffer;
class LLRenderNavPrim
{
public:
//Draw simple tri
void renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const;
//Draw the contents of vertex buffer
void renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt );
private:
};
extern LLRenderNavPrim gRenderNav;
#endif // LL_LLRENDERNAVPRIM_H

View File

@ -643,7 +643,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
text[count++] = strdup("#define textureCube texture\n");
text[count++] = strdup("#define texture2DLod textureLod\n");
text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n");
if (major_version > 1 || minor_version >= 40)
{ //GLSL 1.40 replaces texture2DRect et al with texture
text[count++] = strdup("#define texture2DRect texture\n");

View File

@ -291,6 +291,7 @@ void LLVBOPool::seedPool()
void LLVBOPool::cleanup()
{
U32 size = LL_VBO_BLOCK_SIZE;

View File

@ -155,7 +155,6 @@ set(llui_HEADER_FILES
llflyoutbutton.h
llfocusmgr.h
llfunctorregistry.h
llhandle.h
llhelp.h
lliconctrl.h
llkeywords.h

0
indra/llui/llcontainerview.cpp Normal file → Executable file
View File

View File

@ -1488,6 +1488,10 @@ bool LLNotifications::loadTemplates()
{
replaceFormText(notification.form_ref.form, "$canceltext", notification.form_ref.form_template.cancel_text);
}
if(notification.form_ref.form_template.help_text.isProvided())
{
replaceFormText(notification.form_ref.form, "$helptext", notification.form_ref.form_template.help_text);
}
if(notification.form_ref.form_template.ignore_text.isProvided())
{
replaceFormText(notification.form_ref.form, "$ignoretext", notification.form_ref.form_template.ignore_text);

View File

@ -121,6 +121,7 @@ struct LLNotificationTemplate
Optional<std::string> yes_text,
no_text,
cancel_text,
help_text,
ignore_text;
TemplateRef()
@ -128,6 +129,7 @@ struct LLNotificationTemplate
yes_text("yestext"),
no_text("notext"),
cancel_text("canceltext"),
help_text("helptext"),
ignore_text("ignoretext")
{}
};

View File

@ -389,6 +389,22 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
return ret;
}
S32 LLScrollListCtrl::getNumSelected() const
{
S32 numSelected = 0;
for(item_list::const_iterator iter = mItemList.begin(); iter != mItemList.end(); ++iter)
{
LLScrollListItem* item = *iter;
if (item->getSelected())
{
++numSelected;
}
}
return numSelected;
}
S32 LLScrollListCtrl::getFirstSelectedIndex() const
{
S32 CurSelectedIndex = 0;
@ -2704,6 +2720,11 @@ BOOL LLScrollListCtrl::hasSortOrder() const
return !mSortColumns.empty();
}
void LLScrollListCtrl::clearSortOrder()
{
mSortColumns.clear();
}
void LLScrollListCtrl::clearColumns()
{
column_map_t::iterator itor;

View File

@ -257,6 +257,7 @@ public:
LLScrollListItem* getFirstSelected() const;
virtual S32 getFirstSelectedIndex() const;
std::vector<LLScrollListItem*> getAllSelected() const;
S32 getNumSelected() const;
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
// iterate over all items
@ -373,6 +374,7 @@ public:
std::string getSortColumnName();
BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; }
BOOL hasSortOrder() const;
void clearSortOrder();
S32 selectMultiple( uuid_vec_t ids );
// conceptually const, but mutates mItemList

View File

@ -31,18 +31,10 @@
#include "llinitparam.h"
#include "llregistry.h"
#include "llxuiparser.h"
#include "llstl.h"
class LLView;
// sort functor for typeid maps
struct LLCompareTypeID
{
bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
{
return lhs->before(*rhs);
}
};
// lookup widget constructor funcs by widget name
template <typename DERIVED_TYPE>
class LLChildRegistry : public LLRegistrySingleton<std::string, LLWidgetCreatorFunc, DERIVED_TYPE>
@ -71,14 +63,14 @@ protected:
// lookup widget name by type
class LLWidgetNameRegistry
: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry , LLCompareTypeID>
: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry>
{};
// lookup function for generating empty param block by widget type
// this is used for schema generation
//typedef const LLInitParam::BaseBlock& (*empty_param_block_func_t)();
//class LLDefaultParamBlockRegistry
//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry, LLCompareTypeID>
//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry>
//{};
extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP;

View File

@ -1702,6 +1702,12 @@ void LLWindowWin32::initCursors()
mCursor[ UI_CURSOR_TOOLSIT ] = LoadCursor(module, TEXT("TOOLSIT"));
mCursor[ UI_CURSOR_TOOLBUY ] = LoadCursor(module, TEXT("TOOLBUY"));
mCursor[ UI_CURSOR_TOOLOPEN ] = LoadCursor(module, TEXT("TOOLOPEN"));
mCursor[ UI_CURSOR_TOOLPATHFINDING ] = LoadCursor(module, TEXT("TOOLPATHFINDING"));
mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHSTARTADD"));
mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_START ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHSTART"));
mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_END ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHEND"));
mCursor[ UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD ] = LoadCursor(module, TEXT("TOOLPATHFINDINGPATHENDADD"));
mCursor[ UI_CURSOR_TOOLNO ] = LoadCursor(module, TEXT("TOOLNO"));
// Color cursors
mCursor[ UI_CURSOR_TOOLPLAY ] = loadColorCursor(TEXT("TOOLPLAY"));

60
indra/newview/CMakeLists.txt Normal file → Executable file
View File

@ -18,12 +18,12 @@ include(JsonCpp)
include(LLAudio)
include(LLCharacter)
include(LLCommon)
include(LLConvexDecomposition)
include(LLImage)
include(LLImageJ2COJ)
include(LLInventory)
include(LLMath)
include(LLMessage)
include(LLPhysicsExtensions)
include(LLPlugin)
include(LLPrimitive)
include(LLRender)
@ -45,6 +45,8 @@ include(VisualLeakDetector)
include(GLOD)
include(CMakeCopyIfDifferent)
add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions)
include_directories(
${DBUSGLIB_INCLUDE_DIRS}
${JSONCPP_INCLUDE_DIR}
@ -52,13 +54,14 @@ include_directories(
${LLAUDIO_INCLUDE_DIRS}
${LLCHARACTER_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${LLCONVEXDECOMP_INCLUDE_DIRS}
${LLPHYSICS_INCLUDE_DIRS}
${FMOD_INCLUDE_DIR}
${LLIMAGE_INCLUDE_DIRS}
${LLKDU_INCLUDE_DIRS}
${LLINVENTORY_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
${LLPLUGIN_INCLUDE_DIRS}
${LLPRIMITIVE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
@ -219,6 +222,10 @@ set(viewer_SOURCE_FILES
llfloaterobjectweights.cpp
llfloateropenobject.cpp
llfloateroutbox.cpp
llfloaterpathfindingcharacters.cpp
llfloaterpathfindingconsole.cpp
llfloaterpathfindinglinksets.cpp
llfloaterpathfindingobjects.cpp
llfloaterpay.cpp
llfloaterperms.cpp
llfloaterpostprocess.cpp
@ -388,6 +395,7 @@ set(viewer_SOURCE_FILES
llpanelonlinestatus.cpp
llpaneloutfitedit.cpp
llpaneloutfitsinventory.cpp
llpanelpathfindingrebakenavmesh.cpp
llpanelpeople.cpp
llpanelpeoplemenus.cpp
llpanelpermissions.cpp
@ -416,6 +424,17 @@ set(viewer_SOURCE_FILES
llparcelselection.cpp
llparticipantlist.cpp
llpatchvertexarray.cpp
llpathfindingcharacter.cpp
llpathfindingcharacterlist.cpp
llpathfindinglinkset.cpp
llpathfindinglinksetlist.cpp
llpathfindingmanager.cpp
llpathfindingnavmesh.cpp
llpathfindingnavmeshstatus.cpp
llpathfindingnavmeshzone.cpp
llpathfindingobject.cpp
llpathfindingobjectlist.cpp
llpathfindingpathtool.cpp
llphysicsmotion.cpp
llphysicsshapebuilderutil.cpp
llplacesinventorybridge.cpp
@ -779,6 +798,10 @@ set(viewer_HEADER_FILES
llfloaterobjectweights.h
llfloateropenobject.h
llfloateroutbox.h
llfloaterpathfindingcharacters.h
llfloaterpathfindingconsole.h
llfloaterpathfindinglinksets.h
llfloaterpathfindingobjects.h
llfloaterpay.h
llfloaterperms.h
llfloaterpostprocess.h
@ -942,6 +965,7 @@ set(viewer_HEADER_FILES
llpanelonlinestatus.h
llpaneloutfitedit.h
llpaneloutfitsinventory.h
llpanelpathfindingrebakenavmesh.h
llpanelpeople.h
llpanelpeoplemenus.h
llpanelpermissions.h
@ -965,6 +989,17 @@ set(viewer_HEADER_FILES
llparcelselection.h
llparticipantlist.h
llpatchvertexarray.h
llpathfindingcharacter.h
llpathfindingcharacterlist.h
llpathfindinglinkset.h
llpathfindinglinksetlist.h
llpathfindingmanager.h
llpathfindingnavmesh.h
llpathfindingnavmeshstatus.h
llpathfindingnavmeshzone.h
llpathfindingobject.h
llpathfindingobjectlist.h
llpathfindingpathtool.h
llphysicsmotion.h
llphysicsshapebuilderutil.h
llplacesinventorybridge.h
@ -1314,6 +1349,11 @@ if (WINDOWS)
res/lltoolgrab.cur
res/lltoolland.cur
res/lltoolpan.cur
res/lltoolpathfinding.cur
res/lltoolpathfindingpathend.cur
res/lltoolpathfindingpathendadd.cur
res/lltoolpathfindingpathstart.cur
res/lltoolpathfindingpathstartadd.cur
res/lltoolpipette.cur
res/lltoolrotate.cur
res/lltoolscale.cur
@ -1523,7 +1563,7 @@ if (WINDOWS)
PROPERTIES
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE ""
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF"
)
if(USE_PRECOMPILED_HEADERS)
set_target_properties(
@ -1731,6 +1771,17 @@ if (WINDOWS)
#${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
endif (PACKAGE)
elseif (DARWIN)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
)
else (WINDOWS)
# Linux
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Wl,--Map=${VIEWER_BINARY_NAME}.MAP"
)
endif (WINDOWS)
# *NOTE - this list is very sensitive to ordering, test carefully on all
@ -1778,7 +1829,8 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
${LLLOGIN_LIBRARIES}
${LLCONVEXDECOMP_LIBRARY}
${LLPHYSICS_LIBRARIES}
${LLPHYSICSEXTENSIONS_LIBRARIES}
${TCMALLOC_LIBRARIES}
)

View File

@ -101,7 +101,7 @@
<key>grid</key>
<map>
<key>desc</key>
<string>Specify the name of the grid, local, or an IP address to connect to.</string>
<string>Specify the name of the grid to connect to.</string>
<key>count</key>
<integer>1</integer>
<key>map-to</key>
@ -117,16 +117,6 @@
<string>h</string>
</map>
<key>helperuri</key>
<map>
<key>desc</key>
<string>helper web CGI prefix to use</string>
<key>count</key>
<integer>1</integer>
<key>map-to</key>
<string>CmdLineHelperURI</string>
</map>
<key>ignorepixeldepth</key>
<map>
<key>desc</key>
@ -163,7 +153,7 @@
<key>map-to</key>
<string>UserLogFile</string>
</map>
<key>login</key>
<map>
<key>desc</key>
@ -174,28 +164,6 @@
<string>UserLoginInfo</string>
</map>
<key>loginpage</key>
<map>
<key>desc</key>
<string>Login authentication page to use.</string>
<key>count</key>
<integer>1</integer>
<key>map-to</key>
<string>LoginPage</string>
</map>
<key>loginuri</key>
<map>
<key>desc</key>
<string>login server and CGI script to use</string>
<key>count</key>
<integer>1</integer>
<key>compose</key>
<boolean>true</boolean>
<key>map-to</key>
<string>CmdLineLoginURI</string>
</map>
<key>logmetrics</key>
<map>
<key>desc</key>
@ -226,7 +194,7 @@
<map>
<key>map-to</key>
<string>NoAudio</string>
</map>
</map>
<key>noinvlib</key>
<map>
@ -242,7 +210,7 @@
<string>User will not get any notifications. NOTE: All notifications that occur will get added to ignore file for future runs.</string>
<key>map-to</key>
<string>IgnoreAllNotifications</string>
</map>
</map>
<key>nopreload</key>
<map>
@ -321,7 +289,7 @@
<key>map-to</key>
<string>QuitAfterSeconds</string>
</map>
<key>replaysession</key>
<map>
<key>desc</key>
@ -335,7 +303,7 @@
<key>map-to</key>
<string>RotateRight</string>
</map>
<key>safe</key>
<map>
<key>desc</key>
@ -389,7 +357,7 @@
<key>count</key>
<integer>1</integer>
<key>map-to</key>
<string>SkinFolder</string>
<string>SkinCurrent</string>
</map>
<key>slurl</key>

View File

@ -559,6 +559,98 @@ STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist
PROFILE_NONE Disables profiling
PROFILE_SCRIPT_MEMORY Enables memory profiling
RC_DATA_FLAGS TODO: add documentation
RC_DETECT_PHANTOM TODO: add documentation
RC_GET_LINK_NUM TODO: add documentation
RC_GET_NORMAL TODO: add documentation
RC_GET_ROOT_KEY TODO: add documentation
RC_MAX_HITS TODO: add documentation
RC_REJECT_TYPES Optional parameter set in llCastRay() to reject hit against certain object types.
RC_REJECT_AGENTS Bit mask for RC_REJECT_TYPES, rejects hits against avatars.
RC_REJECT_PHYSICAL Bit mask for RC_REJECT_TYPES, rejects hits against moving objects.
RC_REJECT_NONPHYSICAL Bit mask for RC_REJECT_TYPES, rejects hits against non-moving objects.
RC_REJECT_LAND Bit mask for RC_REJECT_TYPES, rejects hits against the terrian.
RCERR_CAST_TIME_EXCEEDED TODO: add documentation
RCERR_SIM_PERF_LOW TODO: add documentation
RCERR_UNKNOWN TODO: add documentation
ESTATE_ACCESS_ALLOWED_AGENT_ADD TODO: add documentation
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE TODO: add documentation
ESTATE_ACCESS_ALLOWED_GROUP_ADD TODO: add documentation
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE TODO: add documentation
ESTATE_ACCESS_BANNED_AGENT_ADD TODO: add documentation
ESTATE_ACCESS_BANNED_AGENT_REMOVE TODO: add documentation
DENSITY TODO: add documentation
FRICTION TODO: add documentation
RESTITUTION TODO: add documentation
GRAVITY_MULTIPLIER TODO: add documentation
KFM_COMMAND TODO: add documentation
KFM_CMD_PLAY TODO: add documentation
KFM_CMD_STOP TODO: add documentation
KFM_CMD_PAUSE TODO: add documentation
KFM_CMD_SET_MODE TODO: add documentation
KFM_MODE TODO: add documentation
KFM_FORWARD TODO: add documentation
KFM_LOOP TODO: add documentation
KFM_PING_PONG TODO: add documentation
KFM_REVERSE TODO: add documentation
KFM_DATA TODO: add documentation
KFM_ROTATION TODO: add documentation
KFM_TRANSLATION TODO: add documentation
CHARACTER_CMD_STOP TODO: add documentation
CHARACTER_CMD_JUMP TODO: add documentation
CHARACTER_DESIRED_SPEED TODO: add documentation
CHARACTER_RADIUS TODO: add documentation
CHARACTER_LENGTH TODO: add documentation
CHARACTER_ORIENTATION TODO: add documentation
CHARACTER_AVOIDANCE_MODE TODO: add documentation
PURSUIT_OFFSET TODO: add documentation
REQUIRE_LINE_OF_SIGHT TODO: add documentation
PURSUIT_FUZZ_FACTOR TODO: add documentation
PURSUIT_INTERCEPT TODO: add documentation
FORCE_DIRECT_PATH TODO: add documentation
VERTICAL TODO: add documentation
HORIZONTAL TODO: add documentation
AVOID_CHARACTERS TODO: add documentation
AVOID_DYNAMIC_OBSTACLES TODO: add documentation
PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer.
PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running
PU_FAILURE_INVALID_GOAL Goal is not on the navigation-mesh and cannot be reached.
PU_FAILURE_INVALID_START Character cannot navigate from the current location - e.g., the character is off the navmesh or too high above it.
PU_FAILURE_NO_VALID_DESTINATION There's no good place for the character to go - e.g., it is patrolling and all the patrol points are now unreachable.
PU_FAILURE_OTHER Unknown failure
PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer be tracked - e.g., it left the region or is an avatar that is now more than about 30m outside the region.
PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path.
PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering).
PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal.
CHARACTER_TYPE TODO: add documentation
CHARACTER_TYPE_A TODO: add documentation
CHARACTER_TYPE_B TODO: add documentation
CHARACTER_TYPE_C TODO: add documentation
CHARACTER_TYPE_D TODO: add documentation
CHARACTER_TYPE_NONE TODO: add documentation
TRAVERSAL_TYPE TODO: add documentation
TRAVERSAL_TYPE_SLOW TODO: add documentation
TRAVERSAL_TYPE_FAST TODO: add documentation
TRAVERSAL_TYPE_NONE TODO: add documentation
CHARACTER_MAX_ACCEL TODO: add documentation
CHARACTER_MAX_DECEL TODO: add documentation
CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation
CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation
CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation
# string constants
[word .1, .3, .5]
NULL_KEY Indicates an empty key

0
indra/newview/app_settings/logcontrol.xml Normal file → Executable file
View File

401
indra/newview/app_settings/settings.xml Normal file → Executable file
View File

@ -3269,6 +3269,17 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FastCacheFetchEnabled</key>
<map>
<key>Comment</key>
<string>Enable texture fast cache fetching if set</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<string>1</string>
</map>
<key>FeatureManagerHTTPTable</key>
<map>
@ -5023,7 +5034,7 @@
<key>LoginLocation</key>
<map>
<key>Comment</key>
<string>Login location ('last', 'home')</string>
<string>Default Login location ('last', 'home') preference</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@ -6123,7 +6134,7 @@
<key>NextLoginLocation</key>
<map>
<key>Comment</key>
<string>Location to log into by default.</string>
<string>Location to log into for this session - set from command line or the login panel, cleared following a successfull login.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@ -8090,7 +8101,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0</real>
<real>-0.007</real>
</map>
<key>RenderShadowOffsetError</key>
<map>
@ -10789,6 +10800,83 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>TextureFetchSource</key>
<map>
<key>Comment</key>
<string>Debug use: Source to fetch textures</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>TextureFetchUpdateHighPriority</key>
<map>
<key>Comment</key>
<string>Number of high priority textures to update per frame</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>32</integer>
</map>
<key>TextureFetchUpdateMaxMediumPriority</key>
<map>
<key>Comment</key>
<string>Maximum number of medium priority textures to update per frame</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>256</integer>
</map>
<key>TextureFetchUpdateMinMediumPriority</key>
<map>
<key>Comment</key>
<string>Minimum number of medium priority textures to update per frame</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>32</integer>
</map>
<key>TextureFetchUpdatePriorityThreshold</key>
<map>
<key>Comment</key>
<string>Threshold under which textures will be considered too low priority and skipped for update</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<integer>0.0</integer>
</map>
<key>TextureFetchUpdateSkipLowPriority</key>
<map>
<key>Comment</key>
<string>Flag indicating if we want to skip textures with too low of a priority</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>TextureFetchUpdatePriorities</key>
<map>
<key>Comment</key>
<string>Number of priority texture to update per frame</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>32</integer>
</map>
<key>TextureLoadFullRes</key>
<map>
<key>Comment</key>
@ -13664,5 +13752,312 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>PathfindingRetrieveNeighboringRegion</key>
<map>
<key>Comment</key>
<string>Download a neighboring region when visualizing a pathfinding navmesh (default val 99 means do not download neighbors).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>99</integer>
</map>
<key>PathfindingNavMeshClear</key>
<map>
<key>Comment</key>
<string>Background color when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0</real>
<real>0</real>
<real>0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingWalkable</key>
<map>
<key>Comment</key>
<string>Color of walkable objects when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.45490196078431372549019607843137</real>
<real>0.93333333333333333333333333333333</real>
<real>0.38823529411764705882352941176471</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingObstacle</key>
<map>
<key>Comment</key>
<string>Color of static obstacle objects when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.0</real>
<real>0.0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingMaterial</key>
<map>
<key>Comment</key>
<string>Color of material volumes when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.5</real>
<real>0.0</real>
<real>1.0</real>
<real>0.3</real>
</array>
</map>
<key>PathfindingExclusion</key>
<map>
<key>Comment</key>
<string>Color of exclusion volumes when displaying pathfinding navmesh object types.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>1.0</real>
<real>0.0</real>
<real>0.3</real>
</array>
</map>
<key>PathfindingConnectedEdge</key>
<map>
<key>Comment</key>
<string>Color of a connected (crossable) edge when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.86</real>
<real>0.86</real>
<real>0.86</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingBoundaryEdge</key>
<map>
<key>Comment</key>
<string>Color of a boundary (non-crossable) edge when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.0</real>
<real>0.0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingHeatColorBase</key>
<map>
<key>Comment</key>
<string>Color of the least walkable value when displaying the pathfinding navmesh as a heatmap.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.0</real>
<real>0.0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingHeatColorMax</key>
<map>
<key>Comment</key>
<string>Color of the most walkable value when displaying the pathfinding navmesh as a heatmap.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingFaceColor</key>
<map>
<key>Comment</key>
<string>Color of the faces when displaying the default view of the pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingTestPathValidEndColor</key>
<map>
<key>Comment</key>
<string>Color of the pathfinding test-pathing tool end-point when the path is valid.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.78</real>
<real>0.47</real>
<real>0.0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingTestPathInvalidEndColor</key>
<map>
<key>Comment</key>
<string>Color of the pathfinding test-pathing tool end-point when the path is invalid.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
<key>PathfindingTestPathColor</key>
<map>
<key>Comment</key>
<string>Color of the pathfinding test-path when the path is valid.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.59</real>
<real>0.0</real>
<real>0.9</real>
</array>
</map>
<key>PathfindingAmbiance</key>
<map>
<key>Comment</key>
<string>Ambiance of lit pathfinding navmesh displays.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.5</real>
</map>
<key>PathfindingXRayTint</key>
<map>
<key>Comment</key>
<string>Amount to darken/lighten x-ray lines in pathfinding display.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.8</real>
</map>
<key>PathfindingXRayOpacity</key>
<map>
<key>Comment</key>
<string>Opacity of xray lines in pathfinding display.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.25</real>
</map>
<key>PathfindingXRayWireframe</key>
<map>
<key>Comment</key>
<string>Render pathfinding navmesh xray as a wireframe.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>PathfindingLineWidth</key>
<map>
<key>Comment</key>
<string>Width of volume outlines in pathfinding navmesh display.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>2.0</real>
</map>
<key>PathfindingLineOffset</key>
<map>
<key>Comment</key>
<string>Depth offset of volume outlines in pathfinding display.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>2.3</real>
</map>
<key>PathfindingWaterColor</key>
<map>
<key>Comment</key>
<string>Color of water plane when displaying pathfinding navmesh.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.0</real>
<real>0.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
</map>
</llsd>

View File

@ -0,0 +1,37 @@
/**
* @file pathfindingF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, Linden Research, Inc.
*
* This library 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;
* version 2.1 of the License only.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
#else
#define frag_color gl_FragColor
#endif
VARYING vec4 vertex_color;
void main()
{
frag_color = vertex_color;
}

View File

@ -0,0 +1,42 @@
/**
* @file pathfindingV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, Linden Research, Inc.
*
* This library 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;
* version 2.1 of the License only.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
VARYING vec4 vertex_color;
uniform float tint;
uniform float alpha_scale;
void main()
{
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vertex_color = vec4(diffuse_color.rgb * tint, diffuse_color.a*alpha_scale);
}

View File

@ -0,0 +1,54 @@
/**
* @file pathfindingV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, Linden Research, Inc.
*
* This library 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;
* version 2.1 of the License only.
*
* This library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec3 normal;
VARYING vec4 vertex_color;
uniform float tint;
uniform float ambiance;
uniform float alpha_scale;
void main()
{
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vec3 l1 = vec3(-0.75, 1, 1.0)*0.5;
vec3 l2 = vec3(0.5, -0.6, 0.4)*0.25;
vec3 l3 = vec3(0.5, -0.8, 0.3)*0.5;
float lit = max(dot(normal, l1), 0.0);
lit += max(dot(normal, l2), 0.0);
lit += max(dot(normal, l3), 0.0);
lit = clamp(lit, ambiance, 1.0);
vertex_color = vec4(diffuse_color.rgb * tint * lit, diffuse_color.a*alpha_scale);
}

View File

@ -34,10 +34,10 @@ out vec4 frag_color;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
uniform sampler2DRectShadow shadowMap3;
uniform sampler2DShadow shadowMap0;
uniform sampler2DShadow shadowMap1;
uniform sampler2DShadow shadowMap2;
uniform sampler2DShadow shadowMap3;
uniform sampler2DRect depthMap;
uniform mat4 shadow_matrix[6];
@ -58,22 +58,22 @@ uniform float shadow_bias;
uniform mat4 inv_proj;
float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
{
stc.xyz /= stc.w;
stc.z += shadow_bias;
stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
stc.x = floor(stc.x*shadow_res.x + fract(stc.y*shadow_res.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
float cs = shadow2DRect(shadowMap, stc.xyz).x;
float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
return shadow*0.2;
shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
return shadow*0.2;
}
@ -99,8 +99,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos)*w;
@ -111,8 +110,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@ -123,8 +121,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@ -135,8 +132,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;

View File

@ -31,17 +31,16 @@ out vec4 frag_color;
#define frag_color gl_FragColor
#endif
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
uniform sampler2DRectShadow shadowMap3;
uniform sampler2DShadow shadowMap0;
uniform sampler2DShadow shadowMap1;
uniform sampler2DShadow shadowMap2;
uniform sampler2DShadow shadowMap3;
uniform sampler2DRect depthMap;
uniform sampler2D diffuseMap;
uniform mat4 shadow_matrix[6];
uniform vec4 shadow_clip;
uniform vec2 screen_res;
uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
@ -54,6 +53,7 @@ VARYING vec3 vary_pointlight_col;
VARYING vec2 vary_texcoord0;
VARYING vec4 vertex_color;
uniform vec2 shadow_res;
uniform float shadow_bias;
uniform mat4 inv_proj;
@ -71,22 +71,22 @@ vec4 getPosition(vec2 pos_screen)
return pos;
}
float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
{
stc.xyz /= stc.w;
stc.z += shadow_bias;
stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
float cs = shadow2DRect(shadowMap, stc.xyz).x;
float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
return shadow*0.2;
return shadow*0.2;
}
@ -112,8 +112,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos)*w;
@ -124,8 +123,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@ -136,8 +134,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@ -148,8 +145,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;

View File

@ -33,17 +33,16 @@ out vec4 frag_color;
uniform float minimum_alpha;
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
uniform sampler2DRectShadow shadowMap3;
uniform sampler2DShadow shadowMap0;
uniform sampler2DShadow shadowMap1;
uniform sampler2DShadow shadowMap2;
uniform sampler2DShadow shadowMap3;
uniform sampler2DRect depthMap;
uniform sampler2D diffuseMap;
uniform mat4 shadow_matrix[6];
uniform vec4 shadow_clip;
uniform vec2 screen_res;
uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
@ -55,6 +54,8 @@ VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
VARYING vec2 vary_texcoord0;
uniform vec2 shadow_res;
uniform float shadow_bias;
uniform mat4 inv_proj;
@ -72,20 +73,20 @@ vec4 getPosition(vec2 pos_screen)
return pos;
}
float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc)
float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
{
stc.xyz /= stc.w;
stc.z += shadow_bias;
stc.x = floor(stc.x + fract(stc.y*12345)); // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
stc.x = floor(stc.x*shadow_res.x + fract(stc.y*12345))/shadow_res.x; // add some chaotic jitter to X sample pos according to Y to disguise the snapping going on here
float cs = shadow2D(shadowMap, stc.xyz).x;
float cs = shadow2DRect(shadowMap, stc.xyz).x;
float shadow = cs;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
return shadow*0.2;
}
@ -120,8 +121,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos)*w;
@ -132,8 +132,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@ -144,8 +143,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@ -156,8 +154,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;

View File

@ -35,10 +35,10 @@ out vec4 frag_color;
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
uniform sampler2DRectShadow shadowMap3;
uniform sampler2DShadow shadowMap0;
uniform sampler2DShadow shadowMap1;
uniform sampler2DShadow shadowMap2;
uniform sampler2DShadow shadowMap3;
uniform sampler2DShadow shadowMap4;
uniform sampler2DShadow shadowMap5;
@ -55,10 +55,10 @@ VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
uniform vec2 shadow_res;
uniform vec2 proj_shadow_res;
uniform vec3 sun_dir;
uniform vec2 shadow_res;
uniform float shadow_bias;
uniform float shadow_offset;
@ -78,30 +78,31 @@ vec4 getPosition(vec2 pos_screen)
return pos;
}
float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
stc.z += shadow_bias*scl;
stc.z += shadow_bias;
stc.x = floor(stc.x + fract(pos_screen.y*0.666666666)); // add some jitter to X sample pos according to Y to disguise the snapping going on here
stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x; // add some jitter to X sample pos according to Y to disguise the snapping going on here
float cs = shadow2D(shadowMap, stc.xyz).x;
float cs = shadow2DRect(shadowMap, stc.xyz).x;
float shadow = cs;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, -1.5, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
return shadow*0.2;
return shadow*0.2;
}
float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
stc.z += spot_shadow_bias*scl;
stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap
float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
@ -162,8 +163,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w;
@ -174,8 +174,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@ -186,7 +185,6 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
@ -198,7 +196,6 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
@ -237,11 +234,11 @@ void main()
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen);
frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen);
frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen);
//frag_color.rgb = pos.xyz;
//frag_color.b = shadow;

View File

@ -34,10 +34,10 @@ out vec4 frag_color;
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
uniform sampler2DRectShadow shadowMap3;
uniform sampler2DShadow shadowMap0;
uniform sampler2DShadow shadowMap1;
uniform sampler2DShadow shadowMap2;
uniform sampler2DShadow shadowMap3;
uniform sampler2DShadow shadowMap4;
uniform sampler2DShadow shadowMap5;
uniform sampler2D noiseMap;
@ -55,10 +55,11 @@ VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
uniform vec2 shadow_res;
uniform vec2 proj_shadow_res;
uniform vec3 sun_dir;
uniform vec2 shadow_res;
uniform float shadow_bias;
uniform float shadow_offset;
@ -139,30 +140,30 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm)
return min(ret, 1.0);
}
float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
stc.z += shadow_bias*scl;
stc.z += shadow_bias;
stc.x = floor(stc.x + fract(pos_screen.y*0.666666666));
stc.x = floor(stc.x*shadow_res.x + fract(pos_screen.y*0.666666666))/shadow_res.x;
float cs = shadow2D(shadowMap, stc.xyz).x;
float cs = shadow2DRect(shadowMap, stc.xyz).x;
float shadow = cs;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(2.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(1.0, -1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-1.0, 1.5, 0.0)).x;
shadow += shadow2DRect(shadowMap, stc.xyz+vec3(-2.0, -1.5, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(2.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(1.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-1.0/shadow_res.x, 1.5/shadow_res.y, 0.0)).x;
shadow += shadow2D(shadowMap, stc.xyz+vec3(-2.0/shadow_res.x, -1.5/shadow_res.y, 0.0)).x;
return shadow*0.2;
}
float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float scl, vec2 pos_screen)
{
stc.xyz /= stc.w;
stc.z += spot_shadow_bias*scl;
stc.x = floor(proj_shadow_res.x * stc.x + fract(pos_screen.y*0.666666666)) / proj_shadow_res.x; // snap
float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
@ -223,8 +224,7 @@ void main()
if (spos.z < near_split.z)
{
lpos = shadow_matrix[3]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.z, 0.0)/transition_domain.z;
shadow += pcfShadow(shadowMap3, lpos, 0.25, pos_screen)*w;
@ -235,8 +235,7 @@ void main()
if (spos.z < near_split.y && spos.z > far_split.z)
{
lpos = shadow_matrix[2]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.y, 0.0)/transition_domain.y;
w -= max(near_split.z-spos.z, 0.0)/transition_domain.z;
@ -247,8 +246,7 @@ void main()
if (spos.z < near_split.x && spos.z > far_split.y)
{
lpos = shadow_matrix[1]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(spos.z-far_split.x, 0.0)/transition_domain.x;
w -= max(near_split.y-spos.z, 0.0)/transition_domain.y;
@ -259,8 +257,7 @@ void main()
if (spos.z > far_split.x)
{
lpos = shadow_matrix[0]*spos;
lpos.xy *= shadow_res;
float w = 1.0;
w -= max(near_split.x-spos.z, 0.0)/transition_domain.x;
@ -298,11 +295,11 @@ void main()
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8, pos_screen);
frag_color[2] = pcfSpotShadow(shadowMap4, lpos, 0.8, pos_screen);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8, pos_screen);
frag_color[3] = pcfSpotShadow(shadowMap5, lpos, 0.8, pos_screen);
//frag_color.rgb = pos.xyz;
//frag_color.b = shadow;

View File

@ -56,6 +56,7 @@
#include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state
#include "llnearbychatbar.h"
#include "llnotificationsutil.h"
#include "llpanelpathfindingrebakenavmesh.h"
#include "llpaneltopinfobar.h"
#include "llparcel.h"
#include "llrendersphere.h"
@ -343,6 +344,7 @@ LLAgent::LLAgent() :
mbTeleportKeepsLookAt(false),
mAgentAccess(new LLAgentAccess(gSavedSettings)),
mGodLevelChangeSignal(),
mCanEditParcel(false),
mTeleportSourceSLURL(new LLSLURL),
mTeleportRequest(),
@ -2000,6 +2002,7 @@ void LLAgent::endAnimationUpdateUI()
LLChicletBar::getInstance()->setVisible(TRUE);
LLPanelStandStopFlying::getInstance()->setVisible(TRUE);
LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(TRUE);
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
@ -2109,6 +2112,7 @@ void LLAgent::endAnimationUpdateUI()
LLChicletBar::getInstance()->setVisible(FALSE);
LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
LLPanelPathfindingRebakeNavmesh::getInstance()->setVisible(FALSE);
// clear out camera lag effect
gAgentCamera.clearCameraLag();
@ -2794,6 +2798,12 @@ void LLAgent::setAdminOverride(BOOL b)
void LLAgent::setGodLevel(U8 god_level)
{
mAgentAccess->setGodLevel(god_level);
mGodLevelChangeSignal(god_level);
}
LLAgent::god_level_change_slot_t LLAgent::registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback)
{
return mGodLevelChangeSignal.connect(pGodLevelChangeCallback);
}
const LLAgentAccess& LLAgent::getAgentAccess()

View File

@ -670,6 +670,16 @@ public:
void requestEnterGodMode();
void requestLeaveGodMode();
typedef boost::function<void (U8)> god_level_change_callback_t;
typedef boost::signals2::signal<void (U8)> god_level_change_signal_t;
typedef boost::signals2::connection god_level_change_slot_t;
god_level_change_slot_t registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback);
private:
god_level_change_signal_t mGodLevelChangeSignal;
//--------------------------------------------------------------------
// Maturity
//--------------------------------------------------------------------

0
indra/newview/llagentwearables.cpp Normal file → Executable file
View File

0
indra/newview/llagentwearables.h Normal file → Executable file
View File

0
indra/newview/llappearancemgr.cpp Normal file → Executable file
View File

View File

@ -109,6 +109,7 @@
#include "llvfsthread.h"
#include "llvolumemgr.h"
#include "llxfermanager.h"
#include "llphysicsextensions.h"
#include "llnotificationmanager.h"
#include "llnotifications.h"
@ -378,6 +379,9 @@ void init_default_trans_args()
default_trans_args.insert("CAPITALIZED_APP_NAME");
default_trans_args.insert("SECOND_LIFE_GRID");
default_trans_args.insert("SUPPORT_SITE");
// This URL shows up in a surprising number of places in various skin
// files. We really only want to have to maintain a single copy of it.
default_trans_args.insert("create_account_url");
}
//----------------------------------------------------------------------------
@ -1612,6 +1616,9 @@ bool LLAppViewer::cleanup()
// shut down mesh streamer
gMeshRepo.shutdown();
// shut down Havok
LLPhysicsExtensions::quitSystem();
// Must clean up texture references before viewer window is destroyed.
if(LLHUDManager::instanceExists())
{
@ -2661,14 +2668,6 @@ bool LLAppViewer::initConfiguration()
}
}
// If automatic login from command line with --login switch
// init StartSLURL location. In interactive login, LLPanelLogin
// will take care of it.
if ((clp.hasOption("login") || clp.hasOption("autologin")) && !clp.hasOption("url") && !clp.hasOption("slurl"))
{
LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation")));
}
if (!gSavedSettings.getBOOL("AllowMultipleViewers"))
{
//
@ -2716,12 +2715,27 @@ bool LLAppViewer::initConfiguration()
}
}
// need to do this here - need to have initialized global settings first
// NextLoginLocation is set from the command line option
std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
if ( !nextLoginLocation.empty() )
{
LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<<nextLoginLocation<<LL_ENDL;
LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation));
};
}
else if ( ( clp.hasOption("login") || clp.hasOption("autologin"))
&& !clp.hasOption("url")
&& !clp.hasOption("slurl"))
{
// If automatic login from command line with --login switch
// init StartSLURL location.
std::string start_slurl_setting = gSavedSettings.getString("LoginLocation");
LL_DEBUGS("AppInit") << "start slurl setting '" << start_slurl_setting << "'" << LL_ENDL;
LLStartUp::setStartSLURL(LLSLURL(start_slurl_setting));
}
else
{
// the login location will be set by the login panel (see LLPanelLogin)
}
gLastRunVersion = gSavedSettings.getString("LastRunVersion");
@ -3105,8 +3119,8 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
// The user is not logged on yet, but record the current grid choice login url
// which may have been the intended grid. This can b
gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridLabel();
// which may have been the intended grid.
gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridId();
// *FIX:Mani - move this down in llappviewerwin32
#ifdef LL_WINDOWS
@ -4342,6 +4356,10 @@ void LLAppViewer::idle()
{
return;
}
if (gTeleportDisplay)
{
return;
}
gViewerWindow->updateUI();
@ -5060,7 +5078,7 @@ void LLAppViewer::launchUpdater()
#endif
// *TODO change userserver to be grid on both viewer and sim, since
// userserver no longer exists.
query_map["userserver"] = LLGridManager::getInstance()->getGridLabel();
query_map["userserver"] = LLGridManager::getInstance()->getGridId();
query_map["channel"] = LLVersionInfo::getChannel();
// *TODO constantize this guy
// *NOTE: This URL is also used in win_setup/lldownloader.cpp

View File

@ -365,7 +365,7 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
const char * cmdargv[] =
{cmd.c_str(),
"-user",
(char*)LLGridManager::getInstance()->getGridLabel().c_str(),
(char*)LLGridManager::getInstance()->getGridId().c_str(),
"-name",
LLAppViewer::instance()->getSecondLifeTitle().c_str(),
NULL};

View File

@ -99,7 +99,6 @@ void LLDrawable::init()
mPositionGroup.clear();
mExtents[0].clear();
mExtents[1].clear();
mQuietCount = 0;
mState = 0;
mVObjp = NULL;
@ -407,6 +406,8 @@ void LLDrawable::makeActive()
if (!isRoot() && !mParent->isActive())
{
mParent->makeActive();
//NOTE: linked set will now NEVER become static
mParent->setState(LLDrawable::ACTIVE_CHILD);
}
//all child objects must also be active
@ -424,14 +425,6 @@ void LLDrawable::makeActive()
}
}
if (mVObjp->getPCode() == LL_PCODE_VOLUME)
{
if (mVObjp->isFlexible())
{
return;
}
}
if (mVObjp->getPCode() == LL_PCODE_VOLUME)
{
gPipeline.markRebuild(this, LLDrawable::REBUILD_VOLUME, TRUE);
@ -439,28 +432,22 @@ void LLDrawable::makeActive()
updatePartition();
}
if (isRoot())
{
mQuietCount = 0;
}
else
{
getParent()->mQuietCount = 0;
}
llassert(isAvatar() || isRoot() || mParent->isActive());
}
void LLDrawable::makeStatic(BOOL warning_enabled)
{
if (isState(ACTIVE))
if (isState(ACTIVE) &&
!isState(ACTIVE_CHILD) &&
!mVObjp->isAttachment() &&
!mVObjp->isFlexible())
{
clearState(ACTIVE | ANIMATED_CHILD);
if (mParent.notNull() && mParent->isActive() && warning_enabled)
{
LL_WARNS_ONCE("Drawable") << "Drawable becomes static with active parent!" << LL_ENDL;
}
//drawable became static with active parent, not acceptable
llassert(mParent.isNull() || !mParent->isActive() || !warning_enabled);
LLViewerObject::const_child_list_t& child_list = mVObjp->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
@ -487,8 +474,8 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
mSpatialBridge->markDead();
setSpatialBridge(NULL);
}
updatePartition();
}
updatePartition();
}
// Returns "distance" between target destination and resulting xfrom
@ -638,8 +625,6 @@ BOOL LLDrawable::updateMove()
return FALSE;
}
makeActive();
BOOL done;
if (isState(MOVE_UNDAMPED))
@ -648,6 +633,7 @@ BOOL LLDrawable::updateMove()
}
else
{
makeActive();
done = updateMoveDamped();
}
return done;

View File

@ -292,6 +292,7 @@ public:
RIGGED = 0x08000000,
PARTITION_MOVE = 0x10000000,
ANIMATED_CHILD = 0x20000000,
ACTIVE_CHILD = 0x40000000,
} EDrawableFlags;
private: //aligned members
@ -305,8 +306,6 @@ public:
LLPointer<LLDrawable> mParent;
F32 mDistanceWRTCamera;
S32 mQuietCount;
static S32 getCurrentFrame() { return sCurVisible; }
static S32 getMinVisFrameRange();

View File

@ -116,6 +116,7 @@ LLDrawPool::LLDrawPool(const U32 type)
sNumDrawPools++;
mId = sNumDrawPools;
mVertexShaderLevel = 0;
mSkipRender = false;
}
LLDrawPool::~LLDrawPool()
@ -418,6 +419,7 @@ void LLRenderPass::applyModelMatrix(LLDrawInfo& params)
gGL.loadMatrix(gGLModelView);
if (params.mModelMatrix)
{
llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
gGL.multMatrix((GLfloat*) params.mModelMatrix->mMatrix);
}
gPipeline.mMatrixOpCount++;

View File

@ -77,6 +77,9 @@ public:
S32 getId() const { return mId; }
U32 getType() const { return mType; }
BOOL getSkipRenderFlag() const { return mSkipRender;}
void setSkipRenderFlag( BOOL flag ) { mSkipRender = flag; }
virtual LLViewerTexture *getDebugTexture();
virtual void beginRenderPass( S32 pass );
virtual void endRenderPass( S32 pass );
@ -113,6 +116,7 @@ protected:
S32 mVertexShaderLevel;
S32 mId;
U32 mType; // Type of draw pool
BOOL mSkipRender;
};
class LLRenderPass : public LLDrawPool

View File

@ -308,6 +308,7 @@ void LLDrawPoolTerrain::drawLoop()
if (model_matrix != gGLLastMatrix)
{
llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
gGLLastMatrix = model_matrix;
gGL.loadMatrix(gGLModelView);
if (model_matrix)
@ -594,7 +595,8 @@ void LLDrawPoolTerrain::renderFull4TU()
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.translatef(-1.f, 0.f, 0.f);
gGL.matrixMode(LLRender::MM_MODELVIEW);
// Set alpha texture and do lighting modulation
gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR);
gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
@ -742,6 +744,7 @@ void LLDrawPoolTerrain::renderFull2TU()
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.translatef(-1.f, 0.f, 0.f);
gGL.matrixMode(LLRender::MM_MODELVIEW);
// Care about alpha only
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
@ -781,6 +784,7 @@ void LLDrawPoolTerrain::renderFull2TU()
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.translatef(-2.f, 0.f, 0.f);
gGL.matrixMode(LLRender::MM_MODELVIEW);
// Care about alpha only
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);

View File

@ -116,6 +116,7 @@ void LLDrawPoolTree::render(S32 pass)
gGL.loadMatrix(gGLModelView);
if (model_matrix)
{
llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW);
gGL.multMatrix((GLfloat*) model_matrix->mMatrix);
}
gPipeline.mMatrixOpCount++;

View File

@ -129,7 +129,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth)
llassert(mFullHeight <= 512);
llassert(mFullWidth <= 512);
if (gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete())
if (gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI)
{ //using offscreen render target, just use the bottom left corner
mOrigin.set(0, 0);
}
@ -216,14 +216,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
return TRUE;
}
#if 0 //THIS CAUSES MAINT-1092
bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete();
bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI;
if (use_fbo)
{
gPipeline.mWaterDis.bindTarget();
}
#endif
LLGLSLShader::bindNoShader();
LLVertexBuffer::unbind();
@ -258,12 +256,10 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
}
}
#if 0
if (use_fbo)
{
gPipeline.mWaterDis.flush();
}
#endif
return ret;
}

View File

@ -2167,6 +2167,12 @@ BOOL LLFace::hasMedia() const
const F32 LEAST_IMPORTANCE = 0.05f ;
const F32 LEAST_IMPORTANCE_FOR_LARGE_IMAGE = 0.3f ;
void LLFace::resetVirtualSize()
{
setVirtualSize(0.f);
mImportanceToCamera = 0.f;
}
F32 LLFace::getTextureVirtualSize()
{
F32 radius;
@ -2232,8 +2238,17 @@ BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
LLVector4a t;
t.load3(camera->getOrigin().mV);
lookAt.setSub(center, t);
F32 dist = lookAt.getLength3().getF32();
dist = llmax(dist-size.getLength3().getF32(), 0.f);
dist = llmax(dist-size.getLength3().getF32(), 0.001f);
//ramp down distance for nearby objects
if (dist < 16.f)
{
dist /= 16.f;
dist *= dist;
dist *= 16.f;
}
lookAt.normalize3fast() ;
//get area of circle around node

View File

@ -218,6 +218,7 @@ public:
F32 getTextureVirtualSize() ;
F32 getImportanceToCamera()const {return mImportanceToCamera ;}
void resetVirtualSize();
void setHasMedia(bool has_media) { mHasMedia = has_media ;}
BOOL hasMedia() const ;

View File

@ -44,6 +44,8 @@
#include "llvoavatar.h"
/*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild");
static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update");
@ -70,8 +72,45 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
{
mVO->mDrawable->makeActive() ;
}
mInstanceIndex = sInstanceList.size();
sInstanceList.push_back(this);
sUpdateDelay.push_back(0);
}//-----------------------------------------------
LLVolumeImplFlexible::~LLVolumeImplFlexible()
{
S32 end_idx = sInstanceList.size()-1;
if (end_idx != mInstanceIndex)
{
sInstanceList[mInstanceIndex] = sInstanceList[end_idx];
sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex;
sUpdateDelay[mInstanceIndex] = sUpdateDelay[end_idx];
}
sInstanceList.pop_back();
sUpdateDelay.pop_back();
}
//static
void LLVolumeImplFlexible::updateClass()
{
std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
iter != sInstanceList.end();
++iter)
{
--(*delay_iter);
if (*delay_iter <= 0)
{
(*iter)->doIdleUpdate();
}
++delay_iter;
}
}
LLVector3 LLVolumeImplFlexible::getFramePosition() const
{
return mVO->getRenderPosition();
@ -296,22 +335,17 @@ void LLVolumeImplFlexible::updateRenderRes()
// optimization similar to what Havok does for objects that are stationary.
//---------------------------------------------------------------------------------
static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies");
void LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
void LLVolumeImplFlexible::doIdleUpdate()
{
LLDrawable* drawablep = mVO->mDrawable;
if (drawablep)
{
//LLFastTimer ftm(FTM_FLEXIBLE_UPDATE);
//flexible objects never go static
drawablep->mQuietCount = 0;
if (!drawablep->isRoot())
{
LLViewerObject* parent = (LLViewerObject*) mVO->getParent();
parent->mDrawable->mQuietCount = 0;
}
//ensure drawable is active
drawablep->makeActive();
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE))
{
bool visible = drawablep->isVisible();
@ -321,31 +355,45 @@ void LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
}
else if (visible &&
!drawablep->isState(LLDrawable::IN_REBUILD_Q1) &&
mVO->getPixelArea() > 256.f)
else
{
U32 id;
F32 pixel_area = mVO->getPixelArea();
if (mVO->isRootEdit())
{
id = mID;
}
else
{
LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
id = parent->getVolumeInterfaceID();
}
U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
if (visible)
{
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1) &&
mVO->getPixelArea() > 256.f)
{
U32 id;
if (mVO->isRootEdit())
{
id = mID;
}
else
{
LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
id = parent->getVolumeInterfaceID();
}
if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
{
sUpdateDelay[mInstanceIndex] = (S32) update_period-1;
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
}
}
}
else
{
sUpdateDelay[mInstanceIndex] = (S32) update_period;
}
}
}
}
}
@ -368,10 +416,11 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
LLPath *path = &volume->getPath();
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
{
//mVO->markForUpdate(TRUE);
doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0);
BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE;
if (mSimulateRes == 0)
doIdleUpdate();
if (!force_update || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE))
{
return; // we did not get updated or initialized, proceeding without can be dangerous
}

View File

@ -70,8 +70,16 @@ struct LLFlexibleObjectSection
//---------------------------------------------------------
class LLVolumeImplFlexible : public LLVolumeInterface
{
private:
static std::vector<LLVolumeImplFlexible*> sInstanceList;
static std::vector<S32> sUpdateDelay;
S32 mInstanceIndex;
public:
static void updateClass();
LLVolumeImplFlexible(LLViewerObject* volume, LLFlexibleObjectData* attributes);
~LLVolumeImplFlexible();
// Implements LLVolumeInterface
U32 getID() const { return mID; }
@ -79,7 +87,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
LLQuaternion getFrameRotation() const;
LLVolumeInterfaceType getInterfaceType() const { return INTERFACE_FLEXIBLE; }
void updateRenderRes();
void doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
void doIdleUpdate();
BOOL doUpdateGeometry(LLDrawable *drawable);
LLVector3 getPivotPosition() const;
void onSetVolume(const LLVolumeParams &volume_params, const S32 detail);

View File

@ -2362,12 +2362,6 @@ LLPanelLandAccess::~LLPanelLandAccess()
void LLPanelLandAccess::refresh()
{
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
if (mListAccess)
mListAccess->deleteAllItems();
if (mListBanned)
mListBanned->deleteAllItems();
LLParcel *parcel = mParcel->getParcel();
// Display options
@ -2385,7 +2379,11 @@ void LLPanelLandAccess::refresh()
getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name );
// Allow list
if (mListAccess)
{
// Clear the sort order so we don't re-sort on every add.
mListAccess->clearSortOrder();
mListAccess->deleteAllItems();
S32 count = parcel->mAccessList.size();
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
getChild<LLUICtrl>("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST));
@ -2420,13 +2418,17 @@ void LLPanelLandAccess::refresh()
}
suffix.append(" " + parent_floater->getString("Remaining") + ")");
}
if (mListAccess)
mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
}
mListAccess->sortByName(TRUE);
}
// Ban List
if(mListBanned)
{
// Clear the sort order so we don't re-sort on every add.
mListBanned->clearSortOrder();
mListBanned->deleteAllItems();
S32 count = parcel->mBanList.size();
getChild<LLUICtrl>("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count));
@ -2464,6 +2466,7 @@ void LLPanelLandAccess::refresh()
}
mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
}
mListBanned->sortByName(TRUE);
}
if(parcel->getRegionDenyAnonymousOverride())
@ -2599,13 +2602,13 @@ void LLPanelLandAccess::refresh_ui()
getChildView("AccessList")->setEnabled(can_manage_allowed);
S32 allowed_list_count = parcel->mAccessList.size();
getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST);
BOOL has_selected = mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0;
BOOL has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0);
getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected);
getChildView("BannedList")->setEnabled(can_manage_banned);
S32 banned_list_count = parcel->mBanList.size();
getChildView("add_banned")->setEnabled(can_manage_banned && banned_list_count < PARCEL_MAX_ACCESS_LIST);
has_selected = mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0;
has_selected = (mListBanned && mListBanned->getSelectionInterface()->getFirstSelectedIndex() >= 0);
getChildView("remove_banned")->setEnabled(can_manage_banned && has_selected);
}
}

Some files were not shown because too many files have changed in this diff Show More