merge
commit
58d5e223b8
5
.hgtags
5
.hgtags
|
|
@ -150,6 +150,7 @@ a9abb9633a266c8d2fe62411cfd1c86d32da72bf 2.7.1-release
|
|||
09984bfa6cae17e0f72d02b75c1b7393c65eecfc 2.7.5-beta1
|
||||
e1ed60913230dd64269a7f7fc52cbc6004f6d52c 2.8.0-start
|
||||
502f6a5deca9365ddae57db4f1e30172668e171e 2.8.1-start
|
||||
888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
|
||||
2a3965b3ad202df7ea25d2be689291bb14a1280e DRTVWR-155
|
||||
6866d9df6efbd441c66451debd376d21211de39c DRTVWR-68_2.7.5-release
|
||||
6866d9df6efbd441c66451debd376d21211de39c 2.7.5-release
|
||||
|
|
@ -329,6 +330,7 @@ af5f3e43e6e4424b1da19d9e16f6b853a7b822ed DRTVWR-169
|
|||
6428242e124b523813bfaf4c45b3d422f0298c81 3.3.3-release
|
||||
57d221de3df94f90b55204313c2cef044a3c0ae2 DRTVWR-176
|
||||
09ef7fd1b0781f33b8a3a9af6236b7bcb4831910 DRTVWR-170
|
||||
005dfe5c4c377207d065fb27858d2eb0b53b143a DRTVWR-167
|
||||
f87bfbe0b62d26f451d02a47c80ebef6b9168fc2 3.3.4-beta1
|
||||
f87bfbe0b62d26f451d02a47c80ebef6b9168fc2 DRTVWR-158
|
||||
f87bfbe0b62d26f451d02a47c80ebef6b9168fc2 3.3.4-beta1
|
||||
|
|
@ -337,6 +339,7 @@ bce218b2b45b730b22cc51e4807aa8b571cadef3 DRTVWR-173
|
|||
f91d003091a61937a044652c4c674447f7dcbb7a 3.3.4-beta1
|
||||
82b5330bc8b17d0d4b598832e9c5a92e90075682 3.3.4-beta2
|
||||
eb539c65e6ee26eea2bf373af2d0f4b52dc91289 DRTVWR-177
|
||||
4ad8a3afe40e0200309e3ada68932c4295ac2795 DRTVWR-179
|
||||
a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3
|
||||
4281aa899fb2cedb7a9ca7ce91c5c29d4aa69594 DRTVWR-180
|
||||
9cd174d3a54d93d409a7c346a15b8bfb40fc58f4 DRTVWR-184
|
||||
|
|
@ -344,3 +347,5 @@ a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3
|
|||
6c75f220b103db1420919c8b635fe53e2177f318 3.3.4-beta4
|
||||
ab2ffc547c8a8950ff187c4f6c95e5334fab597b 3.3.4-beta5
|
||||
28e100d0379a2b0710c57647a28fc5239d3d7b99 3.3.4-release
|
||||
a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182
|
||||
1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1
|
||||
|
|
|
|||
45
BuildParams
45
BuildParams
|
|
@ -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
|
||||
|
|
|
|||
170
autobuild.xml
170
autobuild.xml
|
|
@ -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>
|
||||
|
|
@ -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>de22a97b276913a6dd05838b7fe297af</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/262536/arch/Darwin/installer/llphysicsextensions_source-0.3-darwin-20120725.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>d2dfbbc11aac34ebd551df86524c8c9c</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/262536/arch/Linux/installer/llphysicsextensions_source-0.3-linux-20120725.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>99abccc5d117ab82cadb8cff0d85b867</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/262536/arch/CYGWIN/installer/llphysicsextensions_source-0.3-windows-20120725.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>3528620230fbd288fcc9dbbd8d8a6b59</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/262536/arch/Darwin/installer/llphysicsextensions_stub-0.3-darwin-20120725.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
</map>
|
||||
<key>linux</key>
|
||||
<map>
|
||||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>69d188f72f9494b0e74c94ca0496f618</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub/rev/262536/arch/Linux/installer/llphysicsextensions_stub-0.3-linux-20120725.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
</map>
|
||||
<key>windows</key>
|
||||
<map>
|
||||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>61fc2b84ad53cf8d98d1784c31f9928e</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llphysicsextensions-stub/rev/262536/arch/CYGWIN/installer/llphysicsextensions_stub-0.3-windows-20120725.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>0.2</string>
|
||||
</map>
|
||||
<key>llqtwebkit</key>
|
||||
<map>
|
||||
|
|
|
|||
51
build.sh
51
build.sh
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ if (WINDOWS)
|
|||
/Oy-
|
||||
/Zc:wchar_t-
|
||||
/arch:SSE2
|
||||
/fp:fast
|
||||
)
|
||||
|
||||
# Are we using the crummy Visual Studio KDU build workaround?
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ if(WINDOWS)
|
|||
libhunspell.dll
|
||||
)
|
||||
|
||||
if(USE_GOOGLE_PERFTOOLS)
|
||||
if(USE_TCMALLOC)
|
||||
set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
|
||||
set(release_files ${release_files} libtcmalloc_minimal.dll)
|
||||
endif(USE_GOOGLE_PERFTOOLS)
|
||||
endif(USE_TCMALLOC)
|
||||
|
||||
if (FMOD)
|
||||
set(debug_files ${debug_files} fmod.dll)
|
||||
|
|
@ -272,13 +272,16 @@ elseif(LINUX)
|
|||
libopenal.so
|
||||
libopenjpeg.so
|
||||
libssl.so
|
||||
libtcmalloc_minimal.so
|
||||
libuuid.so.16
|
||||
libuuid.so.16.0.22
|
||||
libssl.so.1.0.0
|
||||
libfontconfig.so.1.4.4
|
||||
)
|
||||
|
||||
if (USE_TCMALLOC)
|
||||
set(release_files ${release_files} "libtcmalloc_minimal.so")
|
||||
endif (USE_TCMALLOC)
|
||||
|
||||
if (FMOD)
|
||||
set(release_files ${release_files} "libfmod-3.75.so")
|
||||
endif (FMOD)
|
||||
|
|
|
|||
|
|
@ -1,20 +1,34 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
# If you want to enable or disable TCMALLOC in viewer builds, this is the place.
|
||||
# set ON or OFF as desired.
|
||||
set (USE_TCMALLOC ON)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindGooglePerfTools)
|
||||
else (STANDALONE)
|
||||
if (WINDOWS)
|
||||
use_prebuilt_binary(tcmalloc)
|
||||
set(TCMALLOC_LIBRARIES
|
||||
debug libtcmalloc_minimal-debug
|
||||
optimized libtcmalloc_minimal)
|
||||
if (USE_TCMALLOC)
|
||||
use_prebuilt_binary(tcmalloc)
|
||||
set(TCMALLOC_LIBRARIES
|
||||
debug libtcmalloc_minimal-debug
|
||||
optimized libtcmalloc_minimal)
|
||||
set(TCMALLOC_LINK_FLAGS "/INCLUDE:__tcmalloc")
|
||||
else (USE_TCMALLOC)
|
||||
set(TCMALLOC_LIBRARIES)
|
||||
set(TCMALLOC_LINK_FLAGS)
|
||||
endif (USE_TCMALLOC)
|
||||
set(GOOGLE_PERFTOOLS_FOUND "YES")
|
||||
endif (WINDOWS)
|
||||
if (LINUX)
|
||||
use_prebuilt_binary(tcmalloc)
|
||||
set(TCMALLOC_LIBRARIES
|
||||
tcmalloc)
|
||||
if (USE_TCMALLOC)
|
||||
use_prebuilt_binary(tcmalloc)
|
||||
set(TCMALLOC_LIBRARIES
|
||||
tcmalloc)
|
||||
else (USE_TCMALLOC)
|
||||
set(TCMALLOC_LIBRARIES)
|
||||
endif (USE_TCMALLOC)
|
||||
set(PROFILER_LIBRARIES profiler)
|
||||
set(GOOGLE_PERFTOOLS_INCLUDE_DIR
|
||||
${LIBS_PREBUILT_DIR}/include)
|
||||
|
|
@ -29,13 +43,19 @@ if (GOOGLE_PERFTOOLS_FOUND)
|
|||
endif (GOOGLE_PERFTOOLS_FOUND)
|
||||
|
||||
if (WINDOWS)
|
||||
set(USE_GOOGLE_PERFTOOLS ON)
|
||||
set(USE_GOOGLE_PERFTOOLS ON)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_FLAG -ULL_USE_TCMALLOC=1)
|
||||
if (USE_TCMALLOC)
|
||||
set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
|
||||
else (USE_TCMALLOC)
|
||||
set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
|
||||
endif (USE_TCMALLOC)
|
||||
endif (USE_GOOGLE_PERFTOOLS)
|
||||
|
||||
if (USE_GOOGLE_PERFTOOLS)
|
||||
include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
|
||||
set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES})
|
||||
else (USE_GOOGLE_PERFTOOLS)
|
||||
set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
|
||||
endif (USE_GOOGLE_PERFTOOLS)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
@ -205,6 +205,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
|
|||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
|
||||
endif(STANDALONE)
|
||||
|
||||
if (WINDOWS)
|
||||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname}
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
|
||||
LINK_FLAGS_RELEASE ""
|
||||
)
|
||||
endif (WINDOWS)
|
||||
|
||||
# Add link deps to the executable
|
||||
if(TEST_DEBUG)
|
||||
message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
|
||||
# To support a different SDK update these Xcode settings:
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
|
||||
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0")
|
||||
set(CMAKE_OSX_SYSROOT macosx10.6)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
|
||||
|
||||
# NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ void LLCharacter::requestStopMotion( LLMotion* motion)
|
|||
//-----------------------------------------------------------------------------
|
||||
static LLFastTimer::DeclareTimer FTM_UPDATE_ANIMATION("Update Animation");
|
||||
static LLFastTimer::DeclareTimer FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim");
|
||||
static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS("Update Motions");
|
||||
|
||||
void LLCharacter::updateMotions(e_update_t update_type)
|
||||
{
|
||||
|
|
@ -206,7 +207,10 @@ void LLCharacter::updateMotions(e_update_t update_type)
|
|||
mMotionController.unpauseAllMotions();
|
||||
}
|
||||
bool force_update = (update_type == FORCE_UPDATE);
|
||||
mMotionController.updateMotions(force_update);
|
||||
{
|
||||
LLFastTimer t(FTM_UPDATE_MOTIONS);
|
||||
mMotionController.updateMotions(force_update);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -542,6 +542,8 @@ void LLMotionController::updateIdleActiveMotions()
|
|||
//-----------------------------------------------------------------------------
|
||||
// updateMotionsByType()
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLFastTimer::DeclareTimer FTM_MOTION_ON_UPDATE("Motion onUpdate");
|
||||
|
||||
void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type)
|
||||
{
|
||||
BOOL update_result = TRUE;
|
||||
|
|
@ -699,7 +701,10 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
|
|||
}
|
||||
|
||||
// perform motion update
|
||||
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
|
||||
{
|
||||
LLFastTimer t(FTM_MOTION_ON_UPDATE);
|
||||
update_result = motionp->onUpdate(mAnimTime - motionp->mActivationTimestamp, last_joint_signature);
|
||||
}
|
||||
}
|
||||
|
||||
//**********************
|
||||
|
|
@ -810,7 +815,7 @@ void LLMotionController::updateMotions(bool force_update)
|
|||
|
||||
// Always cap the number of loaded motions
|
||||
purgeExcessMotions();
|
||||
|
||||
|
||||
// Update timing info for this time step.
|
||||
if (!mPaused)
|
||||
{
|
||||
|
|
@ -832,6 +837,7 @@ void LLMotionController::updateMotions(bool force_update)
|
|||
}
|
||||
|
||||
updateLoadingMotions();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -850,7 +856,7 @@ void LLMotionController::updateMotions(bool force_update)
|
|||
}
|
||||
|
||||
updateLoadingMotions();
|
||||
|
||||
|
||||
resetJointSignatures();
|
||||
|
||||
if (mPaused && !force_update)
|
||||
|
|
@ -861,11 +867,12 @@ void LLMotionController::updateMotions(bool force_update)
|
|||
{
|
||||
// update additive motions
|
||||
updateAdditiveMotions();
|
||||
|
||||
resetJointSignatures();
|
||||
|
||||
|
||||
// update all regular motions
|
||||
updateRegularMotions();
|
||||
|
||||
|
||||
if (use_quantum)
|
||||
{
|
||||
mPoseBlender.blendAndCache(TRUE);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "linden_common.h"
|
||||
#include "llallocator.h"
|
||||
|
||||
#if LL_USE_TCMALLOC
|
||||
#if (LL_USE_TCMALLOC && LL_USE_HEAP_PROFILER)
|
||||
|
||||
#include "google/heap-profiler.h"
|
||||
#include "google/commandlineflags_public.h"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -61,6 +61,18 @@ BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE;
|
|||
LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sMemAllocationTracker;
|
||||
#endif
|
||||
|
||||
void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
|
||||
{
|
||||
#ifdef SHOW_ASSERT
|
||||
// Redundant, place to set breakpoints.
|
||||
if (ptr%alignment!=0)
|
||||
{
|
||||
llwarns << "alignment check failed" << llendl;
|
||||
}
|
||||
llassert(ptr%alignment==0);
|
||||
#endif
|
||||
}
|
||||
|
||||
//static
|
||||
void LLMemory::initClass()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#define LLMEMORY_H
|
||||
|
||||
#include "llmemtype.h"
|
||||
#if LL_DEBUG
|
||||
inline void* ll_aligned_malloc( size_t size, int align )
|
||||
{
|
||||
void* mem = malloc( size + (align - 1) + sizeof(void*) );
|
||||
|
|
@ -43,10 +42,11 @@ inline void ll_aligned_free( void* ptr )
|
|||
free( ((void**)ptr)[-1] );
|
||||
}
|
||||
|
||||
#if !LL_USE_TCMALLOC
|
||||
inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
return _mm_malloc(size, 16);
|
||||
return _aligned_malloc(size, 16);
|
||||
#elif defined(LL_DARWIN)
|
||||
return malloc(size); // default osx malloc is 16 byte aligned.
|
||||
#else
|
||||
|
|
@ -58,21 +58,38 @@ inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed wi
|
|||
#endif
|
||||
}
|
||||
|
||||
inline void* ll_aligned_realloc_16(void* ptr, size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
return _aligned_realloc(ptr, size, 16);
|
||||
#elif defined(LL_DARWIN)
|
||||
return realloc(ptr,size); // default osx malloc is 16 byte aligned.
|
||||
#else
|
||||
return realloc(ptr,size); // FIXME not guaranteed to be aligned.
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ll_aligned_free_16(void *p)
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
_mm_free(p);
|
||||
_aligned_free(p);
|
||||
#elif defined(LL_DARWIN)
|
||||
return free(p);
|
||||
#else
|
||||
free(p); // posix_memalign() is compatible with heap deallocator
|
||||
#endif
|
||||
}
|
||||
#else // USE_TCMALLOC
|
||||
// ll_aligned_foo_16 are not needed with tcmalloc
|
||||
#define ll_aligned_malloc_16 malloc
|
||||
#define ll_aligned_realloc_16 realloc
|
||||
#define ll_aligned_free_16 free
|
||||
#endif // USE_TCMALLOC
|
||||
|
||||
inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed with ll_aligned_free_32().
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
return _mm_malloc(size, 32);
|
||||
return _aligned_malloc(size, 32);
|
||||
#elif defined(LL_DARWIN)
|
||||
return ll_aligned_malloc( size, 32 );
|
||||
#else
|
||||
|
|
@ -87,22 +104,13 @@ inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed wi
|
|||
inline void ll_aligned_free_32(void *p)
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
_mm_free(p);
|
||||
_aligned_free(p);
|
||||
#elif defined(LL_DARWIN)
|
||||
ll_aligned_free( p );
|
||||
#else
|
||||
free(p); // posix_memalign() is compatible with heap deallocator
|
||||
#endif
|
||||
}
|
||||
#else // LL_DEBUG
|
||||
// ll_aligned_foo are noops now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals)
|
||||
#define ll_aligned_malloc( size, align ) malloc(size)
|
||||
#define ll_aligned_free( ptr ) free(ptr)
|
||||
#define ll_aligned_malloc_16 malloc
|
||||
#define ll_aligned_free_16 free
|
||||
#define ll_aligned_malloc_32 malloc
|
||||
#define ll_aligned_free_32 free
|
||||
#endif // LL_DEBUG
|
||||
|
||||
#ifndef __DEBUG_PRIVATE_MEM__
|
||||
#define __DEBUG_PRIVATE_MEM__ 0
|
||||
|
|
@ -512,4 +520,13 @@ void LLPrivateMemoryPoolTester::operator delete[](void* addr)
|
|||
|
||||
// LLSingleton moved to llsingleton.h
|
||||
|
||||
LL_COMMON_API void ll_assert_aligned_func(uintptr_t ptr,U32 alignment);
|
||||
|
||||
#ifdef SHOW_ASSERT
|
||||
#define ll_assert_aligned(ptr,alignment) ll_assert_aligned_func(reinterpret_cast<uintptr_t>(ptr),((U32)alignment))
|
||||
#else
|
||||
#define ll_assert_aligned(ptr,alignment)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = 4;
|
||||
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";
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ if (LL_TESTS)
|
|||
# INTEGRATION TESTS
|
||||
set(test_libs llmath llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
|
||||
# TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
|
||||
LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llquaternion llquaternion.cpp "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(mathmisc "" "${test_libs}")
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ static const F32 MAX_FIELD_OF_VIEW = 175.f * DEG_TO_RAD;
|
|||
// roll(), pitch(), yaw()
|
||||
// etc...
|
||||
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLCamera
|
||||
: public LLCoordFrame
|
||||
{
|
||||
|
|
@ -108,7 +108,7 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
LLPlane mAgentPlanes[7]; //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP
|
||||
LL_ALIGN_16(LLPlane mAgentPlanes[7]); //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP
|
||||
U8 mPlaneMask[8]; // 8 for alignment
|
||||
|
||||
F32 mView; // angle between top and bottom frustum planes in radians.
|
||||
|
|
@ -116,13 +116,13 @@ private:
|
|||
S32 mViewHeightInPixels; // for ViewHeightInPixels() only
|
||||
F32 mNearPlane;
|
||||
F32 mFarPlane;
|
||||
LLPlane mLocalPlanes[4];
|
||||
LL_ALIGN_16(LLPlane mLocalPlanes[4]);
|
||||
F32 mFixedDistance; // Always return this distance, unless < 0
|
||||
LLVector3 mFrustCenter; // center of frustum and radius squared for ultra-quick exclusion test
|
||||
F32 mFrustRadiusSquared;
|
||||
|
||||
LLPlane mWorldPlanes[PLANE_NUM];
|
||||
LLPlane mHorizPlanes[HORIZ_PLANE_NUM];
|
||||
LL_ALIGN_16(LLPlane mWorldPlanes[PLANE_NUM]);
|
||||
LL_ALIGN_16(LLPlane mHorizPlanes[HORIZ_PLANE_NUM]);
|
||||
|
||||
U32 mPlaneCount; //defaults to 6, if setUserClipPlane is called, uses user supplied clip plane in
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ protected:
|
|||
void calculateFrustumPlanes(F32 left, F32 right, F32 top, F32 bottom);
|
||||
void calculateFrustumPlanesFromWindow(F32 x1, F32 y1, F32 x2, F32 y2);
|
||||
void calculateWorldFrustumPlanes();
|
||||
};
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
LLVector4a mColumns[3];
|
||||
LL_ALIGN_16(LLVector4a mColumns[3]);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
class LLMatrix4a
|
||||
{
|
||||
public:
|
||||
LLVector4a mMatrix[4];
|
||||
LL_ALIGN_16(LLVector4a mMatrix[4]);
|
||||
|
||||
inline void clear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include "v3math.h"
|
||||
#include "llvector4a.h"
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
#define OCT_ERRS LL_WARNS("OctreeErrors")
|
||||
|
||||
|
|
@ -79,16 +78,18 @@ public:
|
|||
|
||||
typedef LLOctreeTraveler<T> oct_traveler;
|
||||
typedef LLTreeTraveler<T> tree_traveler;
|
||||
typedef typename std::set<LLPointer<T> > element_list;
|
||||
typedef typename element_list::iterator element_iter;
|
||||
typedef typename element_list::const_iterator const_element_iter;
|
||||
typedef LLPointer<T>* element_list;
|
||||
typedef LLPointer<T>* element_iter;
|
||||
typedef const LLPointer<T>* const_element_iter;
|
||||
typedef typename std::vector<LLTreeListener<T>*>::iterator tree_listener_iter;
|
||||
typedef typename std::vector<LLOctreeNode<T>* > child_list;
|
||||
typedef LLOctreeNode<T>** child_list;
|
||||
typedef LLOctreeNode<T>** child_iter;
|
||||
|
||||
typedef LLTreeNode<T> BaseType;
|
||||
typedef LLOctreeNode<T> oct_node;
|
||||
typedef LLOctreeListener<T> oct_listener;
|
||||
|
||||
/*void* operator new(size_t size)
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
|
@ -96,7 +97,7 @@ public:
|
|||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}*/
|
||||
}
|
||||
|
||||
LLOctreeNode( const LLVector4a& center,
|
||||
const LLVector4a& size,
|
||||
|
|
@ -105,6 +106,9 @@ public:
|
|||
: mParent((oct_node*)parent),
|
||||
mOctant(octant)
|
||||
{
|
||||
mData = NULL;
|
||||
mDataEnd = NULL;
|
||||
|
||||
mCenter = center;
|
||||
mSize = size;
|
||||
|
||||
|
|
@ -123,6 +127,16 @@ public:
|
|||
{
|
||||
BaseType::destroyListeners();
|
||||
|
||||
for (U32 i = 0; i < mElementCount; ++i)
|
||||
{
|
||||
mData[i]->setBinIndex(-1);
|
||||
mData[i] = NULL;
|
||||
}
|
||||
|
||||
free(mData);
|
||||
mData = NULL;
|
||||
mDataEnd = NULL;
|
||||
|
||||
for (U32 i = 0; i < getChildCount(); i++)
|
||||
{
|
||||
delete getChild(i);
|
||||
|
|
@ -219,12 +233,17 @@ public:
|
|||
}
|
||||
|
||||
void accept(oct_traveler* visitor) { visitor->visit(this); }
|
||||
virtual bool isLeaf() const { return mChild.empty(); }
|
||||
virtual bool isLeaf() const { return mChildCount == 0; }
|
||||
|
||||
U32 getElementCount() const { return mElementCount; }
|
||||
bool isEmpty() const { return mElementCount == 0; }
|
||||
element_list& getData() { return mData; }
|
||||
const element_list& getData() const { return mData; }
|
||||
|
||||
element_iter getDataBegin() { return mData; }
|
||||
element_iter getDataEnd() { return mDataEnd; }
|
||||
const_element_iter getDataBegin() const { return mData; }
|
||||
const_element_iter getDataEnd() const { return mDataEnd; }
|
||||
|
||||
U32 getChildCount() const { return mChildCount; }
|
||||
oct_node* getChild(U32 index) { return mChild[index]; }
|
||||
const oct_node* getChild(U32 index) const { return mChild[index]; }
|
||||
|
|
@ -289,7 +308,7 @@ public:
|
|||
|
||||
virtual bool insert(T* data)
|
||||
{
|
||||
if (data == NULL)
|
||||
if (data == NULL || data->getBinIndex() != -1)
|
||||
{
|
||||
OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << llendl;
|
||||
return false;
|
||||
|
|
@ -302,13 +321,16 @@ public:
|
|||
if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) ||
|
||||
(data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity)))
|
||||
{ //it belongs here
|
||||
//if this is a redundant insertion, error out (should never happen)
|
||||
llassert(mData.find(data) == mData.end());
|
||||
mElementCount++;
|
||||
mData = (element_list) realloc(mData, sizeof(LLPointer<T>)*mElementCount);
|
||||
|
||||
mData.insert(data);
|
||||
//avoid unref on uninitialized memory
|
||||
memset(mData+mElementCount-1, 0, sizeof(LLPointer<T>));
|
||||
|
||||
mData[mElementCount-1] = data;
|
||||
mDataEnd = mData + mElementCount;
|
||||
data->setBinIndex(mElementCount-1);
|
||||
BaseType::insert(data);
|
||||
|
||||
mElementCount = mData.size();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
@ -342,10 +364,16 @@ public:
|
|||
|
||||
if( lt == 0x7 )
|
||||
{
|
||||
mData.insert(data);
|
||||
BaseType::insert(data);
|
||||
mElementCount++;
|
||||
mData = (element_list) realloc(mData, sizeof(LLPointer<T>)*mElementCount);
|
||||
|
||||
mElementCount = mData.size();
|
||||
//avoid unref on uninitialized memory
|
||||
memset(mData+mElementCount-1, 0, sizeof(LLPointer<T>));
|
||||
|
||||
mData[mElementCount-1] = data;
|
||||
mDataEnd = mData + mElementCount;
|
||||
data->setBinIndex(mElementCount-1);
|
||||
BaseType::insert(data);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -394,23 +422,59 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
void _remove(T* data, S32 i)
|
||||
{ //precondition -- mElementCount > 0, idx is in range [0, mElementCount)
|
||||
|
||||
mElementCount--;
|
||||
data->setBinIndex(-1);
|
||||
|
||||
if (mElementCount > 0)
|
||||
{
|
||||
if (mElementCount != i)
|
||||
{
|
||||
mData[i] = mData[mElementCount]; //might unref data, do not access data after this point
|
||||
mData[i]->setBinIndex(i);
|
||||
}
|
||||
|
||||
mData[mElementCount] = NULL; //needed for unref
|
||||
mData = (element_list) realloc(mData, sizeof(LLPointer<T>)*mElementCount);
|
||||
mDataEnd = mData+mElementCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
mData[0] = NULL; //needed for unref
|
||||
free(mData);
|
||||
mData = NULL;
|
||||
mDataEnd = NULL;
|
||||
}
|
||||
|
||||
notifyRemoval(data);
|
||||
checkAlive();
|
||||
}
|
||||
|
||||
bool remove(T* data)
|
||||
{
|
||||
if (mData.find(data) != mData.end())
|
||||
{ //we have data
|
||||
mData.erase(data);
|
||||
mElementCount = mData.size();
|
||||
notifyRemoval(data);
|
||||
checkAlive();
|
||||
return true;
|
||||
S32 i = data->getBinIndex();
|
||||
|
||||
if (i >= 0 && i < mElementCount)
|
||||
{
|
||||
if (mData[i] == data)
|
||||
{ //found it
|
||||
_remove(data, i);
|
||||
llassert(data->getBinIndex() == -1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (isInside(data))
|
||||
|
||||
if (isInside(data))
|
||||
{
|
||||
oct_node* dest = getNodeAt(data);
|
||||
|
||||
if (dest != this)
|
||||
{
|
||||
return dest->remove(data);
|
||||
bool ret = dest->remove(data);
|
||||
llassert(data->getBinIndex() == -1);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -429,19 +493,20 @@ public:
|
|||
//node is now root
|
||||
llwarns << "!!! OCTREE REMOVING FACE BY ADDRESS, SEVERE PERFORMANCE PENALTY |||" << llendl;
|
||||
node->removeByAddress(data);
|
||||
llassert(data->getBinIndex() == -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
void removeByAddress(T* data)
|
||||
{
|
||||
if (mData.find(data) != mData.end())
|
||||
for (U32 i = 0; i < mElementCount; ++i)
|
||||
{
|
||||
mData.erase(data);
|
||||
mElementCount = mData.size();
|
||||
notifyRemoval(data);
|
||||
llwarns << "FOUND!" << llendl;
|
||||
checkAlive();
|
||||
return;
|
||||
if (mData[i] == data)
|
||||
{ //we have data
|
||||
_remove(data, i);
|
||||
llwarns << "FOUND!" << llendl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < getChildCount(); i++)
|
||||
|
|
@ -453,8 +518,8 @@ public:
|
|||
|
||||
void clearChildren()
|
||||
{
|
||||
mChild.clear();
|
||||
mChildCount = 0;
|
||||
|
||||
U32* foo = (U32*) mChildMap;
|
||||
foo[0] = foo[1] = 0xFFFFFFFF;
|
||||
}
|
||||
|
|
@ -516,7 +581,7 @@ public:
|
|||
|
||||
mChildMap[child->getOctant()] = mChildCount;
|
||||
|
||||
mChild.push_back(child);
|
||||
mChild[mChildCount] = child;
|
||||
++mChildCount;
|
||||
child->setParent(this);
|
||||
|
||||
|
|
@ -543,9 +608,12 @@ public:
|
|||
mChild[index]->destroy();
|
||||
delete mChild[index];
|
||||
}
|
||||
mChild.erase(mChild.begin() + index);
|
||||
|
||||
--mChildCount;
|
||||
|
||||
mChild[index] = mChild[mChildCount];
|
||||
|
||||
|
||||
//rebuild child map
|
||||
U32* foo = (U32*) mChildMap;
|
||||
foo[0] = foo[1] = 0xFFFFFFFF;
|
||||
|
|
@ -601,11 +669,12 @@ protected:
|
|||
oct_node* mParent;
|
||||
U8 mOctant;
|
||||
|
||||
child_list mChild;
|
||||
LLOctreeNode<T>* mChild[8];
|
||||
U8 mChildMap[8];
|
||||
U32 mChildCount;
|
||||
|
||||
element_list mData;
|
||||
element_iter mDataEnd;
|
||||
U32 mElementCount;
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
// The plane normal = [A, B, C]
|
||||
// The closest approach = D / sqrt(A*A + B*B + C*C)
|
||||
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLPlane
|
||||
{
|
||||
public:
|
||||
|
|
@ -94,7 +96,7 @@ public:
|
|||
|
||||
private:
|
||||
LLVector4a mV;
|
||||
};
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -67,11 +67,10 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
|
|||
|
||||
#define LL_ALIGN_16(var) LL_ALIGN_PREFIX(16) var LL_ALIGN_POSTFIX(16)
|
||||
|
||||
|
||||
|
||||
#include <xmmintrin.h>
|
||||
#include <emmintrin.h>
|
||||
|
||||
#include "llmemory.h"
|
||||
#include "llsimdtypes.h"
|
||||
#include "llsimdtypes.inl"
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ inline LLSimdScalar operator/(const LLSimdScalar& a, const LLSimdScalar& b)
|
|||
inline LLSimdScalar operator-(const LLSimdScalar& a)
|
||||
{
|
||||
static LL_ALIGN_16(const U32 signMask[4]) = {0x80000000, 0x80000000, 0x80000000, 0x80000000 };
|
||||
ll_assert_aligned(signMask,16);
|
||||
return _mm_xor_ps(*reinterpret_cast<const LLQuad*>(signMask), a);
|
||||
}
|
||||
|
||||
|
|
@ -146,6 +147,7 @@ inline LLSimdScalar& LLSimdScalar::operator/=(const LLSimdScalar& rhs)
|
|||
inline LLSimdScalar LLSimdScalar::getAbs() const
|
||||
{
|
||||
static const LL_ALIGN_16(U32 F_ABS_MASK_4A[4]) = { 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF };
|
||||
ll_assert_aligned(F_ABS_MASK_4A,16);
|
||||
return _mm_and_ps( mQ, *reinterpret_cast<const LLQuad*>(F_ABS_MASK_4A));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llmemory.h"
|
||||
#include "llmath.h"
|
||||
#include "llquantize.h"
|
||||
|
||||
|
|
@ -44,7 +45,10 @@ extern const LLVector4a LL_V4A_EPSILON = reinterpret_cast<const LLVector4a&> ( F
|
|||
assert(dst != NULL);
|
||||
assert(bytes > 0);
|
||||
assert((bytes % sizeof(F32))== 0);
|
||||
|
||||
ll_assert_aligned(src,16);
|
||||
ll_assert_aligned(dst,16);
|
||||
assert(bytes%16==0);
|
||||
|
||||
F32* end = dst + (bytes / sizeof(F32) );
|
||||
|
||||
if (bytes > 64)
|
||||
|
|
@ -189,6 +193,8 @@ void LLVector4a::quantize16( const LLVector4a& low, const LLVector4a& high )
|
|||
LLVector4a oneOverDelta;
|
||||
{
|
||||
static LL_ALIGN_16( const F32 F_TWO_4A[4] ) = { 2.f, 2.f, 2.f, 2.f };
|
||||
ll_assert_aligned(F_TWO_4A,16);
|
||||
|
||||
LLVector4a two; two.load4a( F_TWO_4A );
|
||||
|
||||
// Here we use _mm_rcp_ps plus one round of newton-raphson
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class LLRotation;
|
|||
|
||||
#include <assert.h>
|
||||
#include "llpreprocessor.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
///////////////////////////////////
|
||||
// FIRST TIME USERS PLEASE READ
|
||||
|
|
@ -46,6 +47,7 @@ class LLRotation;
|
|||
// LLVector3/LLVector4.
|
||||
/////////////////////////////////
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLVector4a
|
||||
{
|
||||
public:
|
||||
|
|
@ -82,6 +84,7 @@ public:
|
|||
}
|
||||
|
||||
// Copy words 16-byte blocks from src to dst. Source and destination must not overlap.
|
||||
// Source and dest must be 16-byte aligned and size must be multiple of 16.
|
||||
static void memcpyNonAliased16(F32* __restrict dst, const F32* __restrict src, size_t bytes);
|
||||
|
||||
////////////////////////////////////
|
||||
|
|
@ -90,6 +93,7 @@ public:
|
|||
|
||||
LLVector4a()
|
||||
{ //DO NOT INITIALIZE -- The overhead is completely unnecessary
|
||||
ll_assert_aligned(this,16);
|
||||
}
|
||||
|
||||
LLVector4a(F32 x, F32 y, F32 z, F32 w = 0.f)
|
||||
|
|
@ -313,7 +317,7 @@ public:
|
|||
|
||||
private:
|
||||
LLQuad mQ;
|
||||
};
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
|
||||
inline void update_min_max(LLVector4a& min, LLVector4a& max, const LLVector4a& p)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -475,6 +475,7 @@ inline void LLVector4a::setLerp(const LLVector4a& lhs, const LLVector4a& rhs, F3
|
|||
inline LLBool32 LLVector4a::isFinite3() const
|
||||
{
|
||||
static LL_ALIGN_16(const U32 nanOrInfMask[4]) = { 0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000 };
|
||||
ll_assert_aligned(nanOrInfMask,16);
|
||||
const __m128i nanOrInfMaskV = *reinterpret_cast<const __m128i*> (nanOrInfMask);
|
||||
const __m128i maskResult = _mm_and_si128( _mm_castps_si128(mQ), nanOrInfMaskV );
|
||||
const LLVector4Logical equalityCheck = _mm_castsi128_ps(_mm_cmpeq_epi32( maskResult, nanOrInfMaskV ));
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#ifndef LL_VECTOR4LOGICAL_H
|
||||
#define LL_VECTOR4LOGICAL_H
|
||||
|
||||
#include "llmemory.h"
|
||||
|
||||
////////////////////////////
|
||||
// LLVector4Logical
|
||||
|
|
@ -77,6 +78,7 @@ public:
|
|||
inline LLVector4Logical& invert()
|
||||
{
|
||||
static const LL_ALIGN_16(U32 allOnes[4]) = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
|
||||
ll_assert_aligned(allOnes,16);
|
||||
mQ = _mm_andnot_ps( mQ, *(LLQuad*)(allOnes) );
|
||||
return *this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,17 +95,6 @@ const S32 SCULPT_MIN_AREA_DETAIL = 1;
|
|||
|
||||
extern BOOL gDebugGL;
|
||||
|
||||
void assert_aligned(void* ptr, uintptr_t alignment)
|
||||
{
|
||||
#if 0
|
||||
uintptr_t t = (uintptr_t) ptr;
|
||||
if (t%alignment != 0)
|
||||
{
|
||||
llerrs << "Alignment check failed." << llendl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)
|
||||
{
|
||||
LLVector3 test = (pt2-pt1)%(pt3-pt2);
|
||||
|
|
@ -328,16 +317,16 @@ public:
|
|||
LLVector4a& min = node->mExtents[0];
|
||||
LLVector4a& max = node->mExtents[1];
|
||||
|
||||
if (!branch->getData().empty())
|
||||
if (!branch->isEmpty())
|
||||
{ //node has data, find AABB that binds data set
|
||||
const LLVolumeTriangle* tri = *(branch->getData().begin());
|
||||
const LLVolumeTriangle* tri = *(branch->getDataBegin());
|
||||
|
||||
//initialize min/max to first available vertex
|
||||
min = *(tri->mV[0]);
|
||||
max = *(tri->mV[0]);
|
||||
|
||||
for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter =
|
||||
branch->getData().begin(); iter != branch->getData().end(); ++iter)
|
||||
branch->getDataBegin(); iter != branch->getDataEnd(); ++iter)
|
||||
{ //for each triangle in node
|
||||
|
||||
//stretch by triangles in node
|
||||
|
|
@ -352,7 +341,7 @@ public:
|
|||
max.setMax(max, *tri->mV[2]);
|
||||
}
|
||||
}
|
||||
else if (!branch->getChildren().empty())
|
||||
else if (!branch->isLeaf())
|
||||
{ //no data, but child nodes exist
|
||||
LLVolumeOctreeListener* child = (LLVolumeOctreeListener*) branch->getChild(0)->getListener(0);
|
||||
|
||||
|
|
@ -6962,14 +6951,14 @@ void LLVolumeFace::resizeVertices(S32 num_verts)
|
|||
if (num_verts)
|
||||
{
|
||||
mPositions = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
|
||||
assert_aligned(mPositions, 16);
|
||||
ll_assert_aligned(mPositions, 16);
|
||||
mNormals = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts);
|
||||
assert_aligned(mNormals, 16);
|
||||
ll_assert_aligned(mNormals, 16);
|
||||
|
||||
//pad texture coordinate block end to allow for QWORD reads
|
||||
S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF;
|
||||
mTexCoords = (LLVector2*) ll_aligned_malloc_16(size);
|
||||
assert_aligned(mTexCoords, 16);
|
||||
ll_assert_aligned(mTexCoords, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -6993,14 +6982,17 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con
|
|||
// S32 old_size = mNumVertices*16;
|
||||
|
||||
//positions
|
||||
mPositions = (LLVector4a*) realloc(mPositions, new_size);
|
||||
mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_size);
|
||||
ll_assert_aligned(mPositions,16);
|
||||
|
||||
//normals
|
||||
mNormals = (LLVector4a*) realloc(mNormals, new_size);
|
||||
|
||||
mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_size);
|
||||
ll_assert_aligned(mNormals,16);
|
||||
|
||||
//tex coords
|
||||
new_size = ((new_verts*8)+0xF) & ~0xF;
|
||||
mTexCoords = (LLVector2*) realloc(mTexCoords, new_size);
|
||||
mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, new_size);
|
||||
ll_assert_aligned(mTexCoords,16);
|
||||
|
||||
|
||||
//just clear binormals
|
||||
|
|
@ -7053,7 +7045,8 @@ void LLVolumeFace::pushIndex(const U16& idx)
|
|||
S32 old_size = ((mNumIndices*2)+0xF) & ~0xF;
|
||||
if (new_size != old_size)
|
||||
{
|
||||
mIndices = (U16*) realloc(mIndices, new_size);
|
||||
mIndices = (U16*) ll_aligned_realloc_16(mIndices, new_size);
|
||||
ll_assert_aligned(mIndices,16);
|
||||
}
|
||||
|
||||
mIndices[mNumIndices++] = idx;
|
||||
|
|
@ -7094,12 +7087,12 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
|
|||
}
|
||||
|
||||
//allocate new buffer space
|
||||
mPositions = (LLVector4a*) realloc(mPositions, new_count*sizeof(LLVector4a));
|
||||
assert_aligned(mPositions, 16);
|
||||
mNormals = (LLVector4a*) realloc(mNormals, new_count*sizeof(LLVector4a));
|
||||
assert_aligned(mNormals, 16);
|
||||
mTexCoords = (LLVector2*) realloc(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF);
|
||||
assert_aligned(mTexCoords, 16);
|
||||
mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_count*sizeof(LLVector4a));
|
||||
ll_assert_aligned(mPositions, 16);
|
||||
mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_count*sizeof(LLVector4a));
|
||||
ll_assert_aligned(mNormals, 16);
|
||||
mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF);
|
||||
ll_assert_aligned(mTexCoords, 16);
|
||||
|
||||
mNumVertices = new_count;
|
||||
|
||||
|
|
@ -7145,7 +7138,7 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
|
|||
new_count = mNumIndices + face.mNumIndices;
|
||||
|
||||
//allocate new index buffer
|
||||
mIndices = (U16*) realloc(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF);
|
||||
mIndices = (U16*) ll_aligned_realloc_16(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF);
|
||||
|
||||
//get destination address into new index buffer
|
||||
U16* dst_idx = mIndices+mNumIndices;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ void LLOctreeTriangleRayIntersect::traverse(const LLOctreeNode<LLVolumeTriangle>
|
|||
void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle>* node)
|
||||
{
|
||||
for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter =
|
||||
node->getData().begin(); iter != node->getData().end(); ++iter)
|
||||
node->getDataBegin(); iter != node->getDataEnd(); ++iter)
|
||||
{
|
||||
const LLVolumeTriangle* tri = *iter;
|
||||
|
||||
|
|
@ -236,8 +236,8 @@ void LLVolumeOctreeValidate::visit(const LLOctreeNode<LLVolumeTriangle>* branch)
|
|||
}
|
||||
|
||||
//children fit, check data
|
||||
for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = branch->getData().begin();
|
||||
iter != branch->getData().end(); ++iter)
|
||||
for (LLOctreeNode<LLVolumeTriangle>::const_element_iter iter = branch->getDataBegin();
|
||||
iter != branch->getDataEnd(); ++iter)
|
||||
{
|
||||
const LLVolumeTriangle* tri = *iter;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,19 @@
|
|||
class LLVolumeTriangle : public LLRefCount
|
||||
{
|
||||
public:
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLVolumeTriangle()
|
||||
{
|
||||
|
||||
mBinIndex = -1;
|
||||
}
|
||||
|
||||
LLVolumeTriangle(const LLVolumeTriangle& rhs)
|
||||
|
|
@ -58,21 +68,38 @@ public:
|
|||
|
||||
}
|
||||
|
||||
LLVector4a mPositionGroup;
|
||||
LL_ALIGN_16(LLVector4a mPositionGroup);
|
||||
|
||||
const LLVector4a* mV[3];
|
||||
U16 mIndex[3];
|
||||
|
||||
F32 mRadius;
|
||||
mutable S32 mBinIndex;
|
||||
|
||||
|
||||
virtual const LLVector4a& getPositionGroup() const;
|
||||
virtual const F32& getBinRadius() const;
|
||||
|
||||
S32 getBinIndex() const { return mBinIndex; }
|
||||
void setBinIndex(S32 idx) const { mBinIndex = idx; }
|
||||
|
||||
|
||||
};
|
||||
|
||||
class LLVolumeOctreeListener : public LLOctreeListener<LLVolumeTriangle>
|
||||
{
|
||||
public:
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLVolumeOctreeListener(LLOctreeNode<LLVolumeTriangle>* node);
|
||||
~LLVolumeOctreeListener();
|
||||
|
||||
|
|
@ -99,8 +126,8 @@ public:
|
|||
|
||||
|
||||
public:
|
||||
LLVector4a mBounds[2]; // bounding box (center, size) of this node and all its children (tight fit to objects)
|
||||
LLVector4a mExtents[2]; // extents (min, max) of this node and all its children
|
||||
LL_ALIGN_16(LLVector4a mBounds[2]); // bounding box (center, size) of this node and all its children (tight fit to objects)
|
||||
LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children
|
||||
};
|
||||
|
||||
class LLOctreeTriangleRayIntersect : public LLOctreeTraveler<LLVolumeTriangle>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,128 @@
|
|||
/**
|
||||
* @file v3dmath_test.cpp
|
||||
* @author Vir
|
||||
* @date 2011-12
|
||||
* @brief v3dmath test cases.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, 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$
|
||||
*/
|
||||
|
||||
// Tests related to allocating objects with alignment constraints, particularly for SSE support.
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "../test/lltut.h"
|
||||
#include "../llmath.h"
|
||||
#include "../llsimdmath.h"
|
||||
#include "../llvector4a.h"
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void *p)
|
||||
{
|
||||
ll_aligned_free_16(p);
|
||||
}
|
||||
|
||||
namespace tut
|
||||
{
|
||||
|
||||
#define is_aligned(ptr,alignment) ((reinterpret_cast<uintptr_t>(ptr))%(alignment)==0)
|
||||
#define is_aligned_relative(ptr,base_ptr,alignment) ((reinterpret_cast<uintptr_t>(ptr)-reinterpret_cast<uintptr_t>(base_ptr))%(alignment)==0)
|
||||
|
||||
struct alignment_test {};
|
||||
|
||||
typedef test_group<alignment_test> alignment_test_t;
|
||||
typedef alignment_test_t::object alignment_test_object_t;
|
||||
tut::alignment_test_t tut_alignment_test("LLAlignment");
|
||||
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class MyVector4a
|
||||
{
|
||||
LLQuad mQ;
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
|
||||
|
||||
// Verify that aligned allocators perform as advertised.
|
||||
template<> template<>
|
||||
void alignment_test_object_t::test<1>()
|
||||
{
|
||||
# ifdef LL_DEBUG
|
||||
skip("This test fails on Windows when compiled in debug mode.");
|
||||
# endif
|
||||
|
||||
const int num_tests = 7;
|
||||
void *align_ptr;
|
||||
for (int i=0; i<num_tests; i++)
|
||||
{
|
||||
align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a));
|
||||
ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16));
|
||||
|
||||
align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a));
|
||||
ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16));
|
||||
|
||||
ll_aligned_free_16(align_ptr);
|
||||
|
||||
align_ptr = ll_aligned_malloc_32(sizeof(MyVector4a));
|
||||
ensure("ll_aligned_malloc_32 failed", is_aligned(align_ptr,32));
|
||||
ll_aligned_free_32(align_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
// In-place allocation of objects and arrays.
|
||||
template<> template<>
|
||||
void alignment_test_object_t::test<2>()
|
||||
{
|
||||
MyVector4a vec1;
|
||||
ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16));
|
||||
|
||||
MyVector4a veca[12];
|
||||
ensure("LLAlignment veca unaligned", is_aligned(veca,16));
|
||||
}
|
||||
|
||||
// Heap allocation of objects and arrays.
|
||||
template<> template<>
|
||||
void alignment_test_object_t::test<3>()
|
||||
{
|
||||
# ifdef LL_DEBUG
|
||||
skip("This test fails on Windows when compiled in debug mode.");
|
||||
# endif
|
||||
|
||||
const int ARR_SIZE = 7;
|
||||
for(int i=0; i<ARR_SIZE; i++)
|
||||
{
|
||||
MyVector4a *vecp = new MyVector4a;
|
||||
ensure("LLAlignment vecp unaligned", is_aligned(vecp,16));
|
||||
delete vecp;
|
||||
}
|
||||
|
||||
MyVector4a *veca = new MyVector4a[ARR_SIZE];
|
||||
ensure("LLAligment veca base", is_aligned(veca,16));
|
||||
for(int i=0; i<ARR_SIZE; i++)
|
||||
{
|
||||
std::cout << "veca[" << i << "]" << std::endl;
|
||||
ensure("LLAlignment veca member unaligned", is_aligned(&veca[i],16));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -289,6 +289,8 @@ LLIOPipe::EStatus LLURLRequest::handleError(
|
|||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST("URL Request");
|
||||
static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result");
|
||||
static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform");
|
||||
|
||||
// virtual
|
||||
LLIOPipe::EStatus LLURLRequest::process_impl(
|
||||
|
|
@ -358,7 +360,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
|
|||
{
|
||||
PUMP_DEBUG;
|
||||
LLIOPipe::EStatus status = STATUS_BREAK;
|
||||
static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform");
|
||||
{
|
||||
LLFastTimer t(FTM_URL_PERFORM);
|
||||
if(!mDetail->mCurlRequest->wait())
|
||||
|
|
@ -371,8 +372,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
|
|||
{
|
||||
CURLcode result;
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result");
|
||||
|
||||
bool newmsg = false;
|
||||
{
|
||||
LLFastTimer t(FTM_PROCESS_URL_REQUEST_GET_RESULT);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -258,6 +258,7 @@ namespace tut
|
|||
void HTTPClientTestObject::test<1>()
|
||||
{
|
||||
LLHTTPClient::get(local_server, newResult());
|
||||
|
||||
runThePump();
|
||||
ensureStatusOK();
|
||||
ensure("result object wasn't destroyed", mResultDeleted);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1026,7 +1026,8 @@ void LLModel::setVolumeFaceData(
|
|||
|
||||
if (tc.get())
|
||||
{
|
||||
LLVector4a::memcpyNonAliased16((F32*) face.mTexCoords, (F32*) tc.get(), num_verts*2*sizeof(F32));
|
||||
U32 tex_size = (num_verts*2*sizeof(F32)+0xF)&~0xF;
|
||||
LLVector4a::memcpyNonAliased16((F32*) face.mTexCoords, (F32*) tc.get(), tex_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -237,9 +237,11 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_STATS("Image Stats");
|
||||
// static
|
||||
void LLImageGL::updateStats(F32 current_time)
|
||||
{
|
||||
LLFastTimer t(FTM_IMAGE_UPDATE_STATS);
|
||||
sLastFrameTime = current_time;
|
||||
sBoundTextureMemoryInBytes = sCurBoundTextureMemory;
|
||||
sCurBoundTextureMemory = 0;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
//=============================================================================
|
||||
|
|
@ -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
|
||||
|
|
@ -69,6 +69,42 @@ LLRenderTarget::~LLRenderTarget()
|
|||
release();
|
||||
}
|
||||
|
||||
void LLRenderTarget::resize(U32 resx, U32 resy, U32 color_fmt)
|
||||
{
|
||||
//for accounting, get the number of pixels added/subtracted
|
||||
S32 pix_diff = (resx*resy)-(mResX*mResY);
|
||||
|
||||
mResX = resx;
|
||||
mResY = resy;
|
||||
|
||||
for (U32 i = 0; i < mTex.size(); ++i)
|
||||
{ //resize color attachments
|
||||
gGL.getTexUnit(0)->bindManual(mUsage, mTex[i]);
|
||||
LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL, false);
|
||||
sBytesAllocated += pix_diff*4;
|
||||
}
|
||||
|
||||
if (mDepth)
|
||||
{ //resize depth attachment
|
||||
if (mStencil)
|
||||
{
|
||||
//use render buffers where stencil buffers are in play
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, mDepth);
|
||||
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, mResX, mResY);
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
gGL.getTexUnit(0)->bindManual(mUsage, mDepth);
|
||||
U32 internal_type = LLTexUnit::getInternalType(mUsage);
|
||||
LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL, false);
|
||||
}
|
||||
|
||||
sBytesAllocated += pix_diff*4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)
|
||||
{
|
||||
stop_glerror();
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@
|
|||
|
||||
*/
|
||||
|
||||
class LLMultisampleBuffer;
|
||||
|
||||
class LLRenderTarget
|
||||
{
|
||||
public:
|
||||
|
|
@ -74,6 +72,12 @@ public:
|
|||
//multiple calls will release previously allocated resources
|
||||
bool allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = false, S32 samples = 0);
|
||||
|
||||
//resize existing attachments to use new resolution and color format
|
||||
// CAUTION: if the GL runs out of memory attempting to resize, this render target will be undefined
|
||||
// DO NOT use for screen space buffers or for scratch space for an image that might be uploaded
|
||||
// DO use for render targets that resize often and aren't likely to ruin someone's day if they break
|
||||
void resize(U32 resx, U32 resy, U32 color_fmt);
|
||||
|
||||
//add color buffer attachment
|
||||
//limit of 4 color attachments per render target
|
||||
bool addColorAttachment(U32 color_fmt);
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@
|
|||
#include "llglslshader.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
#if LL_DARWIN
|
||||
#define LL_VBO_POOLING 1
|
||||
#else
|
||||
#endif
|
||||
//Next Highest Power Of Two
|
||||
//helper function, returns first number > v that is a power of 2, or v if v is already a power of 2
|
||||
U32 nhpo2(U32 v)
|
||||
|
|
@ -294,6 +290,7 @@ void LLVBOPool::seedPool()
|
|||
}
|
||||
|
||||
|
||||
|
||||
void LLVBOPool::cleanup()
|
||||
{
|
||||
U32 size = LL_VBO_BLOCK_SIZE;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
{}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -1521,11 +1561,9 @@ set(PACKAGE ON CACHE BOOL
|
|||
if (WINDOWS)
|
||||
set_target_properties(${VIEWER_BINARY_NAME}
|
||||
PROPERTIES
|
||||
# *TODO -reenable this once we get server usage sorted out
|
||||
#LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:\"__tcmalloc\""
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
|
||||
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(
|
||||
|
|
@ -1542,7 +1580,7 @@ if (WINDOWS)
|
|||
# In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py
|
||||
# and have the build deps get tracked *please* tell me about it.
|
||||
|
||||
if(USE_GOOGLE_PERFTOOLS)
|
||||
if(USE_TCMALLOC)
|
||||
# Configure a var for tcmalloc location, if used.
|
||||
# Note the need to specify multiple names explicitly.
|
||||
set(GOOGLE_PERF_TOOLS_SOURCE
|
||||
|
|
@ -1550,7 +1588,7 @@ if (WINDOWS)
|
|||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll
|
||||
${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll
|
||||
)
|
||||
endif(USE_GOOGLE_PERFTOOLS)
|
||||
endif(USE_TCMALLOC)
|
||||
|
||||
|
||||
set(COPY_INPUT_DEPENDENCIES
|
||||
|
|
@ -1733,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
|
||||
|
|
@ -1780,7 +1829,8 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
|||
${OPENSSL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${LLLOGIN_LIBRARIES}
|
||||
${LLCONVEXDECOMP_LIBRARY}
|
||||
${LLPHYSICS_LIBRARIES}
|
||||
${LLPHYSICSEXTENSIONS_LIBRARIES}
|
||||
${TCMALLOC_LIBRARIES}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -13752,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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@
|
|||
#include "lllogininstance.h"
|
||||
#include "llprogressview.h"
|
||||
#include "llvocache.h"
|
||||
#include "llvopartgroup.h"
|
||||
#include "llweb.h"
|
||||
#include "llsecondlifeurls.h"
|
||||
#include "llupdaterservice.h"
|
||||
|
|
@ -108,6 +109,7 @@
|
|||
#include "llvfsthread.h"
|
||||
#include "llvolumemgr.h"
|
||||
#include "llxfermanager.h"
|
||||
#include "llphysicsextensions.h"
|
||||
|
||||
#include "llnotificationmanager.h"
|
||||
#include "llnotifications.h"
|
||||
|
|
@ -678,6 +680,9 @@ bool LLAppViewer::init()
|
|||
// initialize SSE options
|
||||
LLVector4a::initClass();
|
||||
|
||||
//initialize particle index pool
|
||||
LLVOPartGroup::initClass();
|
||||
|
||||
// Need to do this initialization before we do anything else, since anything
|
||||
// that touches files should really go through the lldir API
|
||||
gDirUtilp->initAppDirs("SecondLife");
|
||||
|
|
@ -1608,6 +1613,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())
|
||||
{
|
||||
|
|
@ -3101,8 +3109,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
|
||||
|
|
@ -5060,7 +5068,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
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -130,6 +130,8 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
|
|||
// This results in a 2-3x improvement in opening a new Inventory window (which uses a large numebr of allocations)
|
||||
// Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1
|
||||
|
||||
// Enable to get mem debugging within visual studio.
|
||||
//_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
_CrtSetDbgFlag(0); // default, just making explicit
|
||||
|
||||
ULONG ulEnableLFH = 2;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f;
|
|||
|
||||
static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
|
||||
|
||||
extern bool gShiftFrame;
|
||||
|
||||
|
||||
////////////////////////
|
||||
//
|
||||
|
|
@ -108,6 +110,8 @@ void LLDrawable::init()
|
|||
|
||||
mGeneration = -1;
|
||||
mBinRadius = 1.f;
|
||||
mBinIndex = -1;
|
||||
|
||||
mSpatialBridge = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -714,6 +718,11 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
|
|||
return;
|
||||
}
|
||||
|
||||
if (gShiftFrame)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//switch LOD with the spatial group to avoid artifacts
|
||||
//LLSpatialGroup* sg = getSpatialGroup();
|
||||
|
||||
|
|
@ -811,14 +820,19 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
|
|||
mXform.setPosition(mVObjp->getPositionAgent());
|
||||
}
|
||||
|
||||
mXform.setRotation(mVObjp->getRotation());
|
||||
mXform.setScale(1,1,1);
|
||||
mXform.updateMatrix();
|
||||
|
||||
if (isStatic())
|
||||
{
|
||||
LLVOVolume* volume = getVOVolume();
|
||||
if (!volume)
|
||||
|
||||
bool rebuild = (!volume &&
|
||||
getRenderType() != LLPipeline::RENDER_TYPE_TREE &&
|
||||
getRenderType() != LLPipeline::RENDER_TYPE_TERRAIN &&
|
||||
getRenderType() != LLPipeline::RENDER_TYPE_SKY &&
|
||||
getRenderType() != LLPipeline::RENDER_TYPE_GROUND);
|
||||
|
||||
if (rebuild)
|
||||
{
|
||||
gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE);
|
||||
}
|
||||
|
|
@ -832,7 +846,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector)
|
|||
facep->mExtents[0].add(shift_vector);
|
||||
facep->mExtents[1].add(shift_vector);
|
||||
|
||||
if (!volume && facep->hasGeometry())
|
||||
if (rebuild && facep->hasGeometry())
|
||||
{
|
||||
facep->clearVertexBuffer();
|
||||
}
|
||||
|
|
@ -943,6 +957,12 @@ void LLDrawable::updateUVMinMax()
|
|||
{
|
||||
}
|
||||
|
||||
LLSpatialGroup* LLDrawable::getSpatialGroup() const
|
||||
{
|
||||
llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1);
|
||||
return mSpatialGroupp;
|
||||
}
|
||||
|
||||
void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
|
||||
{
|
||||
/*if (mSpatialGroupp && (groupp != mSpatialGroupp))
|
||||
|
|
@ -965,6 +985,8 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
|
|||
}
|
||||
|
||||
mSpatialGroupp = groupp;
|
||||
|
||||
llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1);
|
||||
}
|
||||
|
||||
LLSpatialPartition* LLDrawable::getSpatialPartition()
|
||||
|
|
@ -1087,6 +1109,8 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat
|
|||
mDrawable = root;
|
||||
root->setSpatialBridge(this);
|
||||
|
||||
mBinIndex = -1;
|
||||
|
||||
mRenderType = mDrawable->mRenderType;
|
||||
mDrawableType = mDrawable->mRenderType;
|
||||
|
||||
|
|
@ -1390,6 +1414,11 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
|
|||
markDead();
|
||||
return;
|
||||
}
|
||||
|
||||
if (gShiftFrame)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDrawable->getVObj())
|
||||
{
|
||||
|
|
@ -1468,7 +1497,13 @@ void LLSpatialBridge::cleanupReferences()
|
|||
LLDrawable::cleanupReferences();
|
||||
if (mDrawable)
|
||||
{
|
||||
mDrawable->setSpatialGroup(NULL);
|
||||
LLSpatialGroup* group = mDrawable->getSpatialGroup();
|
||||
if (group)
|
||||
{
|
||||
group->mOctreeNode->remove(mDrawable);
|
||||
mDrawable->setSpatialGroup(NULL);
|
||||
}
|
||||
|
||||
if (mDrawable->getVObj())
|
||||
{
|
||||
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
|
||||
|
|
@ -1479,7 +1514,12 @@ void LLSpatialBridge::cleanupReferences()
|
|||
LLDrawable* drawable = child->mDrawable;
|
||||
if (drawable)
|
||||
{
|
||||
drawable->setSpatialGroup(NULL);
|
||||
LLSpatialGroup* group = drawable->getSpatialGroup();
|
||||
if (group)
|
||||
{
|
||||
group->mOctreeNode->remove(drawable);
|
||||
drawable->setSpatialGroup(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class LLViewerTexture;
|
|||
const U32 SILHOUETTE_HIGHLIGHT = 0;
|
||||
|
||||
// All data for new renderer goes into this class.
|
||||
LL_ALIGN_PREFIX(16)
|
||||
class LLDrawable : public LLRefCount
|
||||
{
|
||||
public:
|
||||
|
|
@ -75,6 +76,16 @@ public:
|
|||
|
||||
static void initClass();
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
LLDrawable() { init(); }
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE);
|
||||
|
||||
|
|
@ -109,6 +120,9 @@ public:
|
|||
F32 getIntensity() const { return llmin(mXform.getScale().mV[0], 4.f); }
|
||||
S32 getLOD() const { return mVObjp ? mVObjp->getLOD() : 1; }
|
||||
F32 getBinRadius() const { return mBinRadius; }
|
||||
S32 getBinIndex() const { return mBinIndex; }
|
||||
void setBinIndex(S32 index) const { mBinIndex = index; }
|
||||
|
||||
void getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); }
|
||||
LLXformMatrix* getXform() { return &mXform; }
|
||||
|
||||
|
|
@ -194,7 +208,7 @@ public:
|
|||
S32 findReferences(LLDrawable *drawablep); // Not const because of @#$! iterators...
|
||||
|
||||
void setSpatialGroup(LLSpatialGroup *groupp);
|
||||
LLSpatialGroup *getSpatialGroup() const { return mSpatialGroupp; }
|
||||
LLSpatialGroup *getSpatialGroup() const;
|
||||
LLSpatialPartition* getSpatialPartition();
|
||||
|
||||
// Statics
|
||||
|
|
@ -281,8 +295,8 @@ public:
|
|||
} EDrawableFlags;
|
||||
|
||||
private: //aligned members
|
||||
LLVector4a mExtents[2];
|
||||
LLVector4a mPositionGroup;
|
||||
LL_ALIGN_16(LLVector4a mExtents[2]);
|
||||
LL_ALIGN_16(LLVector4a mPositionGroup);
|
||||
|
||||
public:
|
||||
LLXformMatrix mXform;
|
||||
|
|
@ -315,6 +329,7 @@ private:
|
|||
mutable U32 mVisible;
|
||||
F32 mRadius;
|
||||
F32 mBinRadius;
|
||||
mutable S32 mBinIndex;
|
||||
S32 mGeneration;
|
||||
|
||||
LLVector3 mCurrentScale;
|
||||
|
|
@ -323,7 +338,7 @@ private:
|
|||
|
||||
static U32 sNumZombieDrawables;
|
||||
static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList;
|
||||
};
|
||||
} LL_ALIGN_POSTFIX(16);
|
||||
|
||||
|
||||
inline LLFace* LLDrawable::getFace(const S32 i) const
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ LLDrawPool::LLDrawPool(const U32 type)
|
|||
sNumDrawPools++;
|
||||
mId = sNumDrawPools;
|
||||
mVertexShaderLevel = 0;
|
||||
mSkipRender = false;
|
||||
}
|
||||
|
||||
LLDrawPool::~LLDrawPool()
|
||||
|
|
@ -253,48 +254,6 @@ void LLFacePool::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures
|
|||
{
|
||||
}
|
||||
|
||||
// static
|
||||
S32 LLFacePool::drawLoop(face_array_t& face_list)
|
||||
{
|
||||
S32 res = 0;
|
||||
if (!face_list.empty())
|
||||
{
|
||||
for (std::vector<LLFace*>::iterator iter = face_list.begin();
|
||||
iter != face_list.end(); iter++)
|
||||
{
|
||||
LLFace *facep = *iter;
|
||||
res += facep->renderIndexed();
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
// static
|
||||
S32 LLFacePool::drawLoopSetTex(face_array_t& face_list, S32 stage)
|
||||
{
|
||||
S32 res = 0;
|
||||
if (!face_list.empty())
|
||||
{
|
||||
for (std::vector<LLFace*>::iterator iter = face_list.begin();
|
||||
iter != face_list.end(); iter++)
|
||||
{
|
||||
LLFace *facep = *iter;
|
||||
gGL.getTexUnit(stage)->bind(facep->getTexture(), TRUE) ;
|
||||
gGL.getTexUnit(0)->activate();
|
||||
res += facep->renderIndexed();
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
void LLFacePool::drawLoop()
|
||||
{
|
||||
if (!mDrawFace.empty())
|
||||
{
|
||||
drawLoop(mDrawFace);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFacePool::enqueue(LLFace* facep)
|
||||
{
|
||||
mDrawFace.push_back(facep);
|
||||
|
|
@ -442,7 +401,7 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
|
|||
|
||||
void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
|
||||
{
|
||||
for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
|
||||
for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
|
||||
{
|
||||
LLDrawInfo* pparams = *i;
|
||||
if (pparams)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -186,10 +190,6 @@ public:
|
|||
|
||||
void buildEdges();
|
||||
|
||||
static S32 drawLoop(face_array_t& face_list);
|
||||
static S32 drawLoopSetTex(face_array_t& face_list, S32 stage);
|
||||
void drawLoop();
|
||||
|
||||
void addFaceReference(LLFace *facep);
|
||||
void removeFaceReference(LLFace *facep);
|
||||
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ void LLDrawPoolAlpha::render(S32 pass)
|
|||
|
||||
void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
|
||||
{
|
||||
for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||
for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||
{
|
||||
LLSpatialGroup* group = *i;
|
||||
if (group->mSpatialPartition->mRenderByGroup &&
|
||||
|
|
@ -385,7 +385,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
|
|||
|
||||
BOOL use_shaders = gPipeline.canUseVertexShaders();
|
||||
|
||||
for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||
for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||
{
|
||||
LLSpatialGroup* group = *i;
|
||||
llassert(group);
|
||||
|
|
@ -411,6 +411,12 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((params.mVertexBuffer->getTypeMask() & mask) != mask)
|
||||
{ //FIXME!
|
||||
llwarns << "Missing required components, skipping render batch." << llendl;
|
||||
continue;
|
||||
}
|
||||
|
||||
LLRenderPass::applyModelMatrix(params);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1036,9 +1036,13 @@ void LLDrawPoolAvatar::endDeferredSkinned()
|
|||
gGL.getTexUnit(0)->activate();
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_RENDER_AVATARS("renderAvatars");
|
||||
|
||||
|
||||
void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
||||
{
|
||||
LLFastTimer t(FTM_RENDER_AVATARS);
|
||||
|
||||
if (pass == -1)
|
||||
{
|
||||
for (S32 i = 1; i < getNumPasses(); i++)
|
||||
|
|
@ -1195,15 +1199,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||
|
||||
if (pass >= 7 && pass < 9)
|
||||
{
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
|
||||
gGL.setColorMask(true, true);
|
||||
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA,
|
||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA,
|
||||
LLRender::BF_ZERO,
|
||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
|
||||
|
||||
|
||||
if (pass == 7)
|
||||
{
|
||||
renderRiggedAlpha(avatarp);
|
||||
|
|
@ -1219,20 +1214,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||
|
||||
if (pass == 9)
|
||||
{
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
LLGLDisable test(GL_ALPHA_TEST);
|
||||
gGL.flush();
|
||||
|
||||
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
|
||||
glPolygonOffset(-1.0f, -1.0f);
|
||||
gGL.setSceneBlendType(LLRender::BT_ADD);
|
||||
|
||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
gGL.setColorMask(false, true);
|
||||
|
||||
renderRiggedGlow(avatarp);
|
||||
gGL.setColorMask(true, false);
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1430,7 +1413,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
|
|||
|
||||
void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
|
||||
{
|
||||
if (avatar->isSelf() && !gAgent.needsRenderAvatar() || !gMeshRepo.meshRezEnabled())
|
||||
if (avatar->isSelf() && !gAgent.needsRenderAvatar())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -1559,8 +1542,12 @@ void LLDrawPoolAvatar::renderDeferredRiggedBump(LLVOAvatar* avatar)
|
|||
renderRigged(avatar, RIGGED_DEFERRED_BUMP);
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_RIGGED_VBO("Rigged VBO");
|
||||
|
||||
void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
|
||||
{
|
||||
LLFastTimer t(FTM_RIGGED_VBO);
|
||||
|
||||
//update rigged vertex buffers
|
||||
for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type)
|
||||
{
|
||||
|
|
@ -1632,17 +1619,56 @@ void LLDrawPoolAvatar::renderRiggedFullbrightShiny(LLVOAvatar* avatar)
|
|||
|
||||
void LLDrawPoolAvatar::renderRiggedAlpha(LLVOAvatar* avatar)
|
||||
{
|
||||
renderRigged(avatar, RIGGED_ALPHA);
|
||||
if (!mRiggedFace[RIGGED_ALPHA].empty())
|
||||
{
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
|
||||
gGL.setColorMask(true, true);
|
||||
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA,
|
||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA,
|
||||
LLRender::BF_ZERO,
|
||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
|
||||
|
||||
renderRigged(avatar, RIGGED_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
void LLDrawPoolAvatar::renderRiggedFullbrightAlpha(LLVOAvatar* avatar)
|
||||
{
|
||||
renderRigged(avatar, RIGGED_FULLBRIGHT_ALPHA);
|
||||
if (!mRiggedFace[RIGGED_FULLBRIGHT_ALPHA].empty())
|
||||
{
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
|
||||
gGL.setColorMask(true, true);
|
||||
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA,
|
||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA,
|
||||
LLRender::BF_ZERO,
|
||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
|
||||
|
||||
renderRigged(avatar, RIGGED_FULLBRIGHT_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
void LLDrawPoolAvatar::renderRiggedGlow(LLVOAvatar* avatar)
|
||||
{
|
||||
renderRigged(avatar, RIGGED_GLOW, true);
|
||||
if (!mRiggedFace[RIGGED_GLOW].empty())
|
||||
{
|
||||
LLGLEnable blend(GL_BLEND);
|
||||
LLGLDisable test(GL_ALPHA_TEST);
|
||||
gGL.flush();
|
||||
|
||||
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
|
||||
glPolygonOffset(-1.0f, -1.0f);
|
||||
gGL.setSceneBlendType(LLRender::BT_ADD);
|
||||
|
||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
gGL.setColorMask(false, true);
|
||||
|
||||
renderRigged(avatar, RIGGED_GLOW, true);
|
||||
|
||||
gGL.setColorMask(true, false);
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -847,12 +847,12 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
|
|||
LLFastTimer ftm(FTM_RENDER_BUMP);
|
||||
|
||||
U32 type = LLRenderPass::PASS_BUMP;
|
||||
LLCullResult::drawinfo_list_t::iterator begin = gPipeline.beginRenderMap(type);
|
||||
LLCullResult::drawinfo_list_t::iterator end = gPipeline.endRenderMap(type);
|
||||
LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
|
||||
LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type);
|
||||
|
||||
U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_BINORMAL | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_COLOR;
|
||||
|
||||
for (LLCullResult::drawinfo_list_t::iterator i = begin; i != end; ++i)
|
||||
for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i)
|
||||
{
|
||||
LLDrawInfo& params = **i;
|
||||
|
||||
|
|
@ -1448,10 +1448,10 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
|||
|
||||
void LLDrawPoolBump::renderBump(U32 type, U32 mask)
|
||||
{
|
||||
LLCullResult::drawinfo_list_t::iterator begin = gPipeline.beginRenderMap(type);
|
||||
LLCullResult::drawinfo_list_t::iterator end = gPipeline.endRenderMap(type);
|
||||
LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
|
||||
LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type);
|
||||
|
||||
for (LLCullResult::drawinfo_list_t::iterator i = begin; i != end; ++i)
|
||||
for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i)
|
||||
{
|
||||
LLDrawInfo& params = **i;
|
||||
|
||||
|
|
|
|||
|
|
@ -294,6 +294,34 @@ void LLDrawPoolTerrain::renderShadow(S32 pass)
|
|||
//glCullFace(GL_BACK);
|
||||
}
|
||||
|
||||
|
||||
void LLDrawPoolTerrain::drawLoop()
|
||||
{
|
||||
if (!mDrawFace.empty())
|
||||
{
|
||||
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
|
||||
iter != mDrawFace.end(); iter++)
|
||||
{
|
||||
LLFace *facep = *iter;
|
||||
|
||||
LLMatrix4* model_matrix = &(facep->getDrawable()->getRegion()->mRenderMatrix);
|
||||
|
||||
if (model_matrix != gGLLastMatrix)
|
||||
{
|
||||
gGLLastMatrix = model_matrix;
|
||||
gGL.loadMatrix(gGLModelView);
|
||||
if (model_matrix)
|
||||
{
|
||||
gGL.multMatrix((GLfloat*) model_matrix->mMatrix);
|
||||
}
|
||||
gPipeline.mMatrixOpCount++;
|
||||
}
|
||||
|
||||
facep->renderIndexed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLDrawPoolTerrain::renderFullShader()
|
||||
{
|
||||
// Hack! Get the region that this draw pool is rendering from!
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ protected:
|
|||
void renderFull2TU();
|
||||
void renderFull4TU();
|
||||
void renderFullShader();
|
||||
void drawLoop();
|
||||
};
|
||||
|
||||
#endif // LL_LLDRAWPOOLSIMPLE_H
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "llviewershadermgr.h"
|
||||
#include "llrender.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
S32 LLDrawPoolTree::sDiffTex = 0;
|
||||
static LLGLSLShader* shader = NULL;
|
||||
|
|
@ -104,8 +105,22 @@ void LLDrawPoolTree::render(S32 pass)
|
|||
{
|
||||
LLFace *face = *iter;
|
||||
LLVertexBuffer* buff = face->getVertexBuffer();
|
||||
|
||||
if(buff)
|
||||
{
|
||||
LLMatrix4* model_matrix = &(face->getDrawable()->getRegion()->mRenderMatrix);
|
||||
|
||||
if (model_matrix != gGLLastMatrix)
|
||||
{
|
||||
gGLLastMatrix = model_matrix;
|
||||
gGL.loadMatrix(gGLModelView);
|
||||
if (model_matrix)
|
||||
{
|
||||
gGL.multMatrix((GLfloat*) model_matrix->mMatrix);
|
||||
}
|
||||
gPipeline.mMatrixOpCount++;
|
||||
}
|
||||
|
||||
buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
|
||||
buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
|
||||
gPipeline.addTrianglesDrawn(buff->getNumIndices());
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ LLDriverParam::LLDriverParam(LLVOAvatar *avatarp) :
|
|||
mAvatarp(avatarp),
|
||||
mWearablep(NULL)
|
||||
{
|
||||
mDefaultVec.clear();
|
||||
}
|
||||
|
||||
LLDriverParam::LLDriverParam(LLWearable *wearablep) :
|
||||
|
|
@ -162,6 +163,7 @@ LLDriverParam::LLDriverParam(LLWearable *wearablep) :
|
|||
mAvatarp(NULL),
|
||||
mWearablep(wearablep)
|
||||
{
|
||||
mDefaultVec.clear();
|
||||
}
|
||||
|
||||
LLDriverParam::~LLDriverParam()
|
||||
|
|
@ -341,18 +343,19 @@ F32 LLDriverParam::getTotalDistortion()
|
|||
return sum;
|
||||
}
|
||||
|
||||
const LLVector3 &LLDriverParam::getAvgDistortion()
|
||||
const LLVector4a &LLDriverParam::getAvgDistortion()
|
||||
{
|
||||
// It's not actually correct to take the average of averages, but it good enough here.
|
||||
LLVector3 sum;
|
||||
LLVector4a sum;
|
||||
sum.clear();
|
||||
S32 count = 0;
|
||||
for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
|
||||
{
|
||||
LLDrivenEntry* driven = &(*iter);
|
||||
sum += driven->mParam->getAvgDistortion();
|
||||
sum.add(driven->mParam->getAvgDistortion());
|
||||
count++;
|
||||
}
|
||||
sum /= (F32)count;
|
||||
sum.mul( 1.f/(F32)count);
|
||||
|
||||
mDefaultVec = sum;
|
||||
return mDefaultVec;
|
||||
|
|
@ -375,21 +378,22 @@ F32 LLDriverParam::getMaxDistortion()
|
|||
}
|
||||
|
||||
|
||||
LLVector3 LLDriverParam::getVertexDistortion(S32 index, LLPolyMesh *poly_mesh)
|
||||
LLVector4a LLDriverParam::getVertexDistortion(S32 index, LLPolyMesh *poly_mesh)
|
||||
{
|
||||
LLVector3 sum;
|
||||
LLVector4a sum;
|
||||
sum.clear();
|
||||
for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
|
||||
{
|
||||
LLDrivenEntry* driven = &(*iter);
|
||||
sum += driven->mParam->getVertexDistortion( index, poly_mesh );
|
||||
sum.add(driven->mParam->getVertexDistortion( index, poly_mesh ));
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
const LLVector3* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh)
|
||||
const LLVector4a* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh)
|
||||
{
|
||||
mCurrentDistortionParam = NULL;
|
||||
const LLVector3* v = NULL;
|
||||
const LLVector4a* v = NULL;
|
||||
for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
|
||||
{
|
||||
LLDrivenEntry* driven = &(*iter);
|
||||
|
|
@ -404,7 +408,7 @@ const LLVector3* LLDriverParam::getFirstDistortion(U32 *index, LLPolyMesh **poly
|
|||
return v;
|
||||
};
|
||||
|
||||
const LLVector3* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_mesh)
|
||||
const LLVector4a* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_mesh)
|
||||
{
|
||||
llassert( mCurrentDistortionParam );
|
||||
if( !mCurrentDistortionParam )
|
||||
|
|
@ -432,7 +436,7 @@ const LLVector3* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **poly_
|
|||
}
|
||||
|
||||
// We're already in the middle of a param's distortions, so get the next one.
|
||||
const LLVector3* v = driven->mParam->getNextDistortion( index, poly_mesh );
|
||||
const LLVector4a* v = driven->mParam->getNextDistortion( index, poly_mesh );
|
||||
if( (!v) && (iter != mDriven.end()) )
|
||||
{
|
||||
// This param is finished, so start the next param. It might not have any
|
||||
|
|
|
|||
|
|
@ -105,18 +105,18 @@ public:
|
|||
|
||||
// LLViewerVisualParam Virtual functions
|
||||
/*virtual*/ F32 getTotalDistortion();
|
||||
/*virtual*/ const LLVector3& getAvgDistortion();
|
||||
/*virtual*/ const LLVector4a& getAvgDistortion();
|
||||
/*virtual*/ F32 getMaxDistortion();
|
||||
/*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh);
|
||||
/*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh);
|
||||
/*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh);
|
||||
/*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh);
|
||||
/*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh);
|
||||
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh);
|
||||
|
||||
protected:
|
||||
F32 getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight);
|
||||
void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake);
|
||||
|
||||
|
||||
LLVector3 mDefaultVec; // temp holder
|
||||
LLVector4a mDefaultVec; // temp holder
|
||||
typedef std::vector<LLDrivenEntry> entry_list_t;
|
||||
entry_list_t mDriven;
|
||||
LLViewerVisualParam* mCurrentDistortionParam;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,16 @@
|
|||
class LLViewerDynamicTexture : public LLViewerTexture
|
||||
{
|
||||
public:
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
LL_VIEWER_DYNAMIC_TEXTURE = LLViewerTexture::DYNAMIC_TEXTURE,
|
||||
|
|
@ -85,7 +95,7 @@ protected:
|
|||
protected:
|
||||
BOOL mClamp;
|
||||
LLCoordGL mOrigin;
|
||||
LLCamera mCamera;
|
||||
LL_ALIGN_16(LLCamera mCamera);
|
||||
|
||||
typedef std::set<LLViewerDynamicTexture*> instance_list_t;
|
||||
static instance_list_t sInstances[ LLViewerDynamicTexture::ORDER_COUNT ];
|
||||
|
|
|
|||
|
|
@ -163,16 +163,10 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
|
|||
mGeomCount = 0;
|
||||
mGeomIndex = 0;
|
||||
mIndicesCount = 0;
|
||||
if (drawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES ||
|
||||
drawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES)
|
||||
{ //indicate to LLParticlePartition that this particle is uninitialized
|
||||
mIndicesIndex = 0xFFFFFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
mIndicesIndex = 0;
|
||||
}
|
||||
mIndexInTex = 0;
|
||||
|
||||
//special value to indicate uninitialized position
|
||||
mIndicesIndex = 0xFFFFFFFF;
|
||||
|
||||
mTexture = NULL;
|
||||
mTEOffset = -1;
|
||||
mTextureIndex = 255;
|
||||
|
|
@ -207,13 +201,10 @@ void LLFace::destroy()
|
|||
mTexture->removeFace(this) ;
|
||||
}
|
||||
|
||||
if (mDrawablep.notNull() &&
|
||||
(mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES ||
|
||||
mDrawablep->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES) &&
|
||||
mIndicesIndex != 0xFFFFFFFF)
|
||||
if (isState(LLFace::PARTICLE))
|
||||
{
|
||||
LLVOPartGroup::freeVBSlot(getGeomIndex()/4);
|
||||
mIndicesIndex = 0xFFFFFFFF;
|
||||
clearState(LLFace::PARTICLE);
|
||||
}
|
||||
|
||||
if (mDrawPoolp)
|
||||
|
|
@ -1207,19 +1198,25 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
{
|
||||
if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices())
|
||||
{
|
||||
llwarns << "Index buffer overflow!" << llendl;
|
||||
llwarns << "Indices Count: " << mIndicesCount
|
||||
<< " VF Num Indices: " << num_indices
|
||||
<< " Indices Index: " << mIndicesIndex
|
||||
<< " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl;
|
||||
llwarns << " Face Index: " << f
|
||||
<< " Pool Type: " << mPoolType << llendl;
|
||||
if (gDebugGL)
|
||||
{
|
||||
llwarns << "Index buffer overflow!" << llendl;
|
||||
llwarns << "Indices Count: " << mIndicesCount
|
||||
<< " VF Num Indices: " << num_indices
|
||||
<< " Indices Index: " << mIndicesIndex
|
||||
<< " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl;
|
||||
llwarns << " Face Index: " << f
|
||||
<< " Pool Type: " << mPoolType << llendl;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (num_vertices + mGeomIndex > mVertexBuffer->getNumVerts())
|
||||
{
|
||||
llwarns << "Vertex buffer overflow!" << llendl;
|
||||
if (gDebugGL)
|
||||
{
|
||||
llwarns << "Vertex buffer overflow!" << llendl;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1651,7 +1648,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
if (!do_xform)
|
||||
{
|
||||
LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM);
|
||||
LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32));
|
||||
S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF;
|
||||
LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, tc_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,6 +59,17 @@ class LLFace
|
|||
{
|
||||
public:
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
|
||||
LLFace(const LLFace& rhs)
|
||||
{
|
||||
*this = rhs;
|
||||
|
|
@ -79,6 +90,7 @@ public:
|
|||
USE_FACE_COLOR = 0x0010,
|
||||
TEXTURE_ANIM = 0x0020,
|
||||
RIGGED = 0x0040,
|
||||
PARTICLE = 0x0080,
|
||||
};
|
||||
|
||||
static void initClass();
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
|
|||
mFrameNum = 0;
|
||||
mCollisionSphereRadius = 0.f;
|
||||
mRenderRes = 1;
|
||||
|
||||
|
||||
if(mVO->mDrawable.notNull())
|
||||
{
|
||||
mVO->mDrawable->makeActive() ;
|
||||
|
|
@ -255,50 +255,28 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons
|
|||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// This calculates the physics of the flexible object. Note that it has to be 0
|
||||
// updated every time step. In the future, perhaps there could be an
|
||||
// optimization similar to what Havok does for objects that are stationary.
|
||||
//---------------------------------------------------------------------------------
|
||||
static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies");
|
||||
BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
|
||||
void LLVolumeImplFlexible::updateRenderRes()
|
||||
{
|
||||
if (mVO->mDrawable.isNull())
|
||||
{
|
||||
// Don't do anything until we have a drawable
|
||||
return FALSE; // (we are not initialized or updated)
|
||||
}
|
||||
LLDrawable* drawablep = mVO->mDrawable;
|
||||
|
||||
BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE;
|
||||
|
||||
//flexible objects never go static
|
||||
mVO->mDrawable->mQuietCount = 0;
|
||||
if (!mVO->mDrawable->isRoot())
|
||||
{
|
||||
LLViewerObject* parent = (LLViewerObject*) mVO->getParent();
|
||||
parent->mDrawable->mQuietCount = 0;
|
||||
}
|
||||
|
||||
LLFastTimer ftm(FTM_FLEXIBLE_UPDATE);
|
||||
|
||||
S32 new_res = mAttributes->getSimulateLOD();
|
||||
|
||||
//number of segments only cares about z axis
|
||||
F32 app_angle = llround((F32) atan2( mVO->getScale().mV[2]*2.f, mVO->mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
|
||||
#if 1 //optimal approximation of previous behavior that doesn't rely on atan2
|
||||
F32 app_angle = mVO->getScale().mV[2]/drawablep->mDistanceWRTCamera;
|
||||
|
||||
// Rendering sections increases with visible angle on the screen
|
||||
mRenderRes = (S32) (12.f*app_angle);
|
||||
#else //legacy behavior
|
||||
//number of segments only cares about z axis
|
||||
F32 app_angle = llround((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
|
||||
|
||||
// Rendering sections increases with visible angle on the screen
|
||||
mRenderRes = (S32)(FLEXIBLE_OBJECT_MAX_SECTIONS*4*app_angle*DEG_TO_RAD/LLViewerCamera::getInstance()->getView());
|
||||
if (mRenderRes > FLEXIBLE_OBJECT_MAX_SECTIONS)
|
||||
{
|
||||
mRenderRes = FLEXIBLE_OBJECT_MAX_SECTIONS;
|
||||
}
|
||||
|
||||
|
||||
// Bottom cap at 1/4 the original number of sections
|
||||
if (mRenderRes < mAttributes->getSimulateLOD()-1)
|
||||
{
|
||||
mRenderRes = mAttributes->getSimulateLOD()-1;
|
||||
}
|
||||
#endif
|
||||
|
||||
mRenderRes = llclamp(mRenderRes, new_res-1, (S32) FLEXIBLE_OBJECT_MAX_SECTIONS);
|
||||
|
||||
// Throttle back simulation of segments we're not rendering
|
||||
if (mRenderRes < new_res)
|
||||
{
|
||||
|
|
@ -311,43 +289,65 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6
|
|||
setAttributesOfAllSections();
|
||||
mInitialized = TRUE;
|
||||
}
|
||||
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE))
|
||||
{
|
||||
return FALSE; // (we are not initialized or updated)
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------------
|
||||
// This calculates the physics of the flexible object. Note that it has to be 0
|
||||
// updated every time step. In the future, perhaps there could be an
|
||||
// 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)
|
||||
{
|
||||
LLDrawable* drawablep = mVO->mDrawable;
|
||||
|
||||
bool visible = mVO->mDrawable->isVisible();
|
||||
|
||||
if (force_update && visible)
|
||||
if (drawablep)
|
||||
{
|
||||
gPipeline.markRebuild(mVO->mDrawable, LLDrawable::REBUILD_POSITION, FALSE);
|
||||
}
|
||||
else if (visible &&
|
||||
!mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) &&
|
||||
mVO->getPixelArea() > 256.f)
|
||||
{
|
||||
U32 id;
|
||||
F32 pixel_area = mVO->getPixelArea();
|
||||
//LLFastTimer ftm(FTM_FLEXIBLE_UPDATE);
|
||||
|
||||
if (mVO->isRootEdit())
|
||||
//flexible objects never go static
|
||||
drawablep->mQuietCount = 0;
|
||||
if (!drawablep->isRoot())
|
||||
{
|
||||
id = mID;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
|
||||
id = parent->getVolumeInterfaceID();
|
||||
LLViewerObject* parent = (LLViewerObject*) mVO->getParent();
|
||||
parent->mDrawable->mQuietCount = 0;
|
||||
}
|
||||
|
||||
U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
|
||||
|
||||
if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
|
||||
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE))
|
||||
{
|
||||
gPipeline.markRebuild(mVO->mDrawable, LLDrawable::REBUILD_POSITION, FALSE);
|
||||
bool visible = drawablep->isVisible();
|
||||
|
||||
if ((mSimulateRes == 0) && visible)
|
||||
{
|
||||
updateRenderRes();
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
|
||||
}
|
||||
else if (visible &&
|
||||
!drawablep->isState(LLDrawable::IN_REBUILD_Q1) &&
|
||||
mVO->getPixelArea() > 256.f)
|
||||
{
|
||||
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)
|
||||
{
|
||||
updateRenderRes();
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return force_update;
|
||||
}
|
||||
|
||||
inline S32 log2(S32 x)
|
||||
|
|
@ -369,7 +369,9 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
|
|||
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
|
||||
{
|
||||
//mVO->markForUpdate(TRUE);
|
||||
if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0))
|
||||
doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0);
|
||||
|
||||
if (mSimulateRes == 0)
|
||||
{
|
||||
return; // we did not get updated or initialized, proceeding without can be dangerous
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ class LLVolumeImplFlexible : public LLVolumeInterface
|
|||
LLVector3 getFramePosition() const;
|
||||
LLQuaternion getFrameRotation() const;
|
||||
LLVolumeInterfaceType getInterfaceType() const { return INTERFACE_FLEXIBLE; }
|
||||
BOOL doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
|
||||
void updateRenderRes();
|
||||
void doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
|
||||
BOOL doUpdateGeometry(LLDrawable *drawable);
|
||||
LLVector3 getPivotPosition() const;
|
||||
void onSetVolume(const LLVolumeParams &volume_params, const S32 detail);
|
||||
|
|
@ -128,7 +129,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
|
|||
LLVector3 mCollisionSpherePosition;
|
||||
F32 mCollisionSphereRadius;
|
||||
U32 mID;
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
// private methods
|
||||
//--------------------------------------
|
||||
|
|
|
|||
|
|
@ -211,8 +211,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
|
|||
|
||||
BOOL item_is_multi = FALSE;
|
||||
if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
|
||||
|| inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
|
||||
&& !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
|
||||
|| inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
|
||||
&& !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
|
||||
{
|
||||
item_is_multi = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2212,8 +2212,8 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
|||
BOOL allow_damage = !self->mCheckSafe->get();
|
||||
BOOL allow_fly = self->mCheckFly->get();
|
||||
BOOL allow_landmark = TRUE; // cannot restrict landmark creation
|
||||
BOOL allow_group_scripts = self->mCheckGroupScripts->get() || self->mCheckOtherScripts->get();
|
||||
BOOL allow_other_scripts = self->mCheckOtherScripts->get();
|
||||
BOOL allow_group_scripts = self->mCheckGroupScripts->get() || allow_other_scripts;
|
||||
BOOL allow_publish = FALSE;
|
||||
BOOL mature_publish = self->mMatureCtrl->get();
|
||||
BOOL push_restriction = self->mPushRestrictionCtrl->get();
|
||||
|
|
@ -2226,11 +2226,16 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
|||
LLViewerRegion* region;
|
||||
region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
||||
|
||||
if (!allow_other_scripts && region && region->getAllowDamage())
|
||||
{
|
||||
|
||||
LLNotificationsUtil::add("UnableToDisableOutsideScripts");
|
||||
return;
|
||||
if (region && region->getAllowDamage())
|
||||
{ // Damage is allowed on the region - server will always allow scripts
|
||||
if ( (!allow_other_scripts && parcel->getParcelFlag(PF_ALLOW_OTHER_SCRIPTS)) ||
|
||||
(!allow_group_scripts && parcel->getParcelFlag(PF_ALLOW_GROUP_SCRIPTS)) )
|
||||
{ // Don't allow turning off "Run Scripts" if damage is allowed in the region
|
||||
self->mCheckOtherScripts->set(parcel->getParcelFlag(PF_ALLOW_OTHER_SCRIPTS)); // Restore UI to actual settings
|
||||
self->mCheckGroupScripts->set(parcel->getParcelFlag(PF_ALLOW_GROUP_SCRIPTS));
|
||||
LLNotificationsUtil::add("UnableToDisableOutsideScripts");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Push data into current parcel
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue