summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/00-COMPILE-LINK-RUN.txt4
-rw-r--r--indra/cmake/00-Common.cmake109
-rw-r--r--indra/cmake/FindHUNSPELL.cmake2
-rw-r--r--indra/cmake/Hunspell.cmake2
-rw-r--r--indra/llappearance/llavatarappearance.cpp1
-rw-r--r--indra/llcommon/llstring.h2
-rw-r--r--indra/llcorehttp/httpcommon.cpp9
-rw-r--r--indra/llcorehttp/httpcommon.h6
-rw-r--r--indra/llcorehttp/tests/test_httpstatus.hpp4
-rw-r--r--indra/llmath/tests/v4math_test.cpp3
-rw-r--r--indra/llvfs/lldir_mac.cpp2
-rw-r--r--indra/newview/llappviewermacosx.cpp2
-rw-r--r--indra/newview/llenvmanager.cpp16
-rw-r--r--indra/newview/llenvmanager.h81
-rw-r--r--indra/newview/llfloaterbeacons.cpp32
-rw-r--r--indra/newview/llfloaterbump.cpp2
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp2
-rw-r--r--indra/newview/llfloatermap.cpp2
-rw-r--r--indra/newview/llfloaterworldmap.cpp20
-rw-r--r--indra/newview/lllogchat.cpp2
-rw-r--r--indra/newview/llmaterialmgr.cpp2
-rw-r--r--indra/newview/llnetmap.cpp2
-rw-r--r--indra/newview/llpipelinelistener.cpp8
-rw-r--r--indra/newview/llsearchhistory.cpp8
-rw-r--r--indra/newview/llsearchhistory.h8
-rw-r--r--indra/newview/llskinningutil.cpp2
-rw-r--r--indra/newview/lltracker.cpp13
-rw-r--r--indra/newview/lltracker.h12
-rw-r--r--indra/newview/llviewerdisplay.cpp8
-rw-r--r--indra/newview/llviewermenu.cpp80
-rw-r--r--indra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/llviewerwindow.cpp20
-rw-r--r--indra/newview/llwlanimator.h3
-rw-r--r--indra/newview/llwlparammanager.h94
-rw-r--r--indra/newview/pipeline.cpp395
-rw-r--r--indra/newview/pipeline.h252
-rwxr-xr-xindra/newview/viewer_manifest.py40
-rw-r--r--indra/test/llstreamtools_tut.cpp13
38 files changed, 616 insertions, 651 deletions
diff --git a/indra/cmake/00-COMPILE-LINK-RUN.txt b/indra/cmake/00-COMPILE-LINK-RUN.txt
index 162b22865c..1933072a6d 100644
--- a/indra/cmake/00-COMPILE-LINK-RUN.txt
+++ b/indra/cmake/00-COMPILE-LINK-RUN.txt
@@ -48,8 +48,8 @@ Compilation
LL_WINDOWS=1 " "
UNICODE " "
_UNICODE " "
- WINVER=0x0501 " "
- _WIN32_WINNT=0x0501 " "
+ WINVER=0x0600 " "
+ _WIN32_WINNT=0x0600 " "
LL_OS_DRAGDROP_ENABLED=1 " "
LIB_NDOF=1 " "
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 46dd8739bc..f925fdda5d 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -18,15 +18,17 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(Variables)
+# We go to some trouble to set LL_BUILD to the set of relevant compiler flags.
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}")
+# Given that, all the flags you see added below are flags NOT present in
+# https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables.
+# Before adding new ones here, it's important to ask: can this flag really be
+# applied to the viewer only, or should/must it be applied to all 3p libraries
+# as well?
+
# Portable compilation flags.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}")
-set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
-set(CMAKE_CXX_FLAGS_RELEASE
- "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "-DLL_RELEASE=1 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
-
# Configure crash reporting
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
@@ -58,13 +60,13 @@ if (WINDOWS)
# http://www.cmake.org/pipermail/cmake/2009-September/032143.html
string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP -D_SCL_SECURE_NO_WARNINGS=1"
- CACHE STRING "C++ compiler debug options" FORCE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /Zo /MD /MP /Ob0 -D_SECURE_STL=0"
+ "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo"
CACHE STRING "C++ compiler release-with-debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE
- "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /Zo /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
+ "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /Zo"
CACHE STRING "C++ compiler release options" FORCE)
# zlib has assembly-language object files incompatible with SAFESEH
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099")
@@ -73,11 +75,10 @@ if (WINDOWS)
set(CMAKE_C_STANDARD_LIBRARIES "")
add_definitions(
- /DLL_WINDOWS=1
/DNOMINMAX
# /DDOM_DYNAMIC # For shared library colladadom
- /DUNICODE
- /D_UNICODE
+ )
+ add_compile_options(
/GS
/TP
/W3
@@ -85,7 +86,6 @@ if (WINDOWS)
/Zc:forScope
/nologo
/Oy-
- /Zc:wchar_t-
# /arch:SSE2
/fp:fast
)
@@ -99,78 +99,28 @@ if (WINDOWS)
if (NOT VS_DISABLE_FATAL_WARNINGS)
add_definitions(/WX)
endif (NOT VS_DISABLE_FATAL_WARNINGS)
-
- # configure Win32 API for Windows Vista+ compatibility
- set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
- add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
endif (WINDOWS)
if (LINUX)
set(CMAKE_SKIP_RPATH TRUE)
- # Here's a giant hack for Fedora 8, where we can't use
- # _FORTIFY_SOURCE if we're using a compiler older than gcc 4.1.
-
- find_program(GXX g++)
- mark_as_advanced(GXX)
-
- if (GXX)
- execute_process(
- COMMAND ${GXX} --version
- COMMAND sed "s/^[gc+ ]*//"
- COMMAND head -1
- OUTPUT_VARIABLE GXX_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- else (GXX)
- set(GXX_VERSION x)
- endif (GXX)
-
- # The quoting hack here is necessary in case we're using distcc or
- # ccache as our compiler. CMake doesn't pass the command line
- # through the shell by default, so we end up trying to run "distcc"
- # " g++" - notice the leading space. Ugh.
-
- execute_process(
- COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version"
- COMMAND sed "s/^[gc+ ]*//"
- COMMAND head -1
- OUTPUT_VARIABLE CXX_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
- if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
- add_definitions(-D_FORTIFY_SOURCE=2)
- else (${GXX_VERSION} STREQUAL ${CXX_VERSION})
- if (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
- add_definitions(-D_FORTIFY_SOURCE=2)
- endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
- endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
-
- # Let's actually get a numerical version of gxx's version
- STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION})
-
- if(${CXX_VERSION_NUMBER} GREATER 459)
- set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
- endif (${CXX_VERSION_NUMBER} GREATER 459)
+ add_definitions(-D_FORTIFY_SOURCE=2)
+
+ set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
# gcc 4.3 and above don't like the LL boost and also
# cause warnings due to our use of deprecated headers
- if(${CXX_VERSION_NUMBER} GREATER 429)
- add_definitions(-Wno-parentheses)
- set(CMAKE_CXX_FLAGS "-Wno-deprecated ${CMAKE_CXX_FLAGS}")
- endif (${CXX_VERSION_NUMBER} GREATER 429)
-
- # End of hacks.
+ add_definitions(-Wno-parentheses)
add_definitions(
- -DLL_LINUX=1
-D_REENTRANT
+ )
+ add_compile_options(
-fexceptions
-fno-math-errno
-fno-strict-aliasing
-fsigned-char
- -g
-msse2
-mfpmath=sse
-pthread
@@ -180,37 +130,34 @@ if (LINUX)
add_definitions(-DEXTERNAL_TOS)
add_definitions(-DAPPID=secondlife)
- add_definitions(-fvisibility=hidden)
- # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
+ add_compile_options(-fvisibility=hidden)
+ # don't catch SIGCHLD in our base application class for the viewer - some of
+ # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The
+ # viewer doesn't need to catch SIGCHLD anyway.
add_definitions(-DLL_IGNORE_SIGCHLD)
if (ADDRESS_SIZE EQUAL 32)
- add_definitions(-march=pentium4)
+ add_compile_options(-march=pentium4)
endif (ADDRESS_SIZE EQUAL 32)
- add_definitions(-mfpmath=sse)
- #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
+ #add_compile_options(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
if (NOT USESYSTEMLIBS)
# this stops us requiring a really recent glibc at runtime
- add_definitions(-fno-stack-protector)
+ add_compile_options(-fno-stack-protector)
# linking can be very memory-hungry, especially the final viewer link
set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
endif (NOT USESYSTEMLIBS)
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
- set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
endif (LINUX)
if (DARWIN)
- add_definitions(-DLL_DARWIN=1)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
- set(DARWIN_extra_cstar_flags "-g -Wno-unused-local-typedef -Wno-deprecated-declarations")
+ set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
## Really?? On developer machines too?
##set(ENABLE_SIGNING TRUE)
##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
diff --git a/indra/cmake/FindHUNSPELL.cmake b/indra/cmake/FindHUNSPELL.cmake
index 6faf22959c..d411bdb9e5 100644
--- a/indra/cmake/FindHUNSPELL.cmake
+++ b/indra/cmake/FindHUNSPELL.cmake
@@ -10,7 +10,7 @@ find_path(HUNSPELL_INCLUDE_DIR hunspell.h
PATH_SUFFIXES hunspell
)
-set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3.0 libhunspell)
+set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3 libhunspell)
find_library(HUNSPELL_LIBRARY
NAMES ${HUNSPELL_NAMES}
)
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index ef74d95b2a..06227b3fe2 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -11,7 +11,7 @@ else (USESYSTEMLIBS)
if (WINDOWS)
set(HUNSPELL_LIBRARY libhunspell)
elseif(DARWIN)
- set(HUNSPELL_LIBRARY hunspell-1.3.0)
+ set(HUNSPELL_LIBRARY hunspell-1.3)
elseif(LINUX)
set(HUNSPELL_LIBRARY hunspell-1.3)
else()
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 94c431feb4..2f0b583ed2 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -2127,4 +2127,3 @@ LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, BO
}
-
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index a40db0f8cc..2fdb8be84f 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -443,7 +443,7 @@ public:
struct LLDictionaryLess
{
public:
- bool operator()(const std::string& a, const std::string& b)
+ bool operator()(const std::string& a, const std::string& b) const
{
return (LLStringUtil::precedesDict(a, b) ? true : false);
}
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp
index c423047bb0..1829062af6 100644
--- a/indra/llcorehttp/httpcommon.cpp
+++ b/indra/llcorehttp/httpcommon.cpp
@@ -50,11 +50,12 @@ HttpStatus::type_enum_t EXT_CURL_EASY;
HttpStatus::type_enum_t EXT_CURL_MULTI;
HttpStatus::type_enum_t LLCORE;
-HttpStatus::operator unsigned long() const
+HttpStatus::operator U32() const
{
- static const int shift(sizeof(unsigned long) * 4);
+ // Effectively, concatenate mType (high) with mStatus (low).
+ static const int shift(sizeof(mDetails->mStatus) * 8);
- unsigned long result(((unsigned long)mDetails->mType) << shift | (unsigned long)(int)mDetails->mStatus);
+ U32 result(U32(mDetails->mType) << shift | U32((int)mDetails->mStatus));
return result;
}
@@ -64,7 +65,7 @@ std::string HttpStatus::toHex() const
std::ostringstream result;
result.width(8);
result.fill('0');
- result << std::hex << operator unsigned long();
+ result << std::hex << operator U32();
return result.str();
}
diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h
index b2db01d038..ea0c38abd7 100644
--- a/indra/llcorehttp/httpcommon.h
+++ b/indra/llcorehttp/httpcommon.h
@@ -382,10 +382,10 @@ struct HttpStatus
/// creates an ambiguous second path to integer conversion
/// which tends to find programming errors such as formatting
/// the status to a stream (operator<<).
- operator unsigned long() const;
- unsigned long toULong() const
+ operator U32() const;
+ U32 toULong() const
{
- return operator unsigned long();
+ return operator U32();
}
/// And to convert to a hex string.
diff --git a/indra/llcorehttp/tests/test_httpstatus.hpp b/indra/llcorehttp/tests/test_httpstatus.hpp
index 10cda799e7..cbe3f574d4 100644
--- a/indra/llcorehttp/tests/test_httpstatus.hpp
+++ b/indra/llcorehttp/tests/test_httpstatus.hpp
@@ -244,11 +244,7 @@ void HttpStatusTestObjectType::test<7>()
HttpStatus status(404);
std::string msg = status.toHex();
// std::cout << "Result: " << msg << std::endl;
-#if ADDRESS_SIZE == 32
ensure_equals(msg, "01940001");
-#else
- ensure_equals(msg, "19400000001");
-#endif
}
diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp
index 191ac864df..9779dfded3 100644
--- a/indra/llmath/tests/v4math_test.cpp
+++ b/indra/llmath/tests/v4math_test.cpp
@@ -355,7 +355,8 @@ namespace tut
val3 = z1 + (z2 - z1)* val;
val4 = w1 + (w2 - w1)* val;
LLVector4 vec4b = lerp(vec4,vec4a,val);
- ensure("lerp failed", ((val1 ==vec4b.mV[VX])&& (val2 ==vec4b.mV[VY]) && (val3 ==vec4b.mV[VZ])&& (val4 ==vec4b.mV[VW])));
+ LLVector4 check(val1, val2, val3, val4);
+ ensure_equals("lerp failed", check, vec4b);
}
template<> template<>
diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp
index 30a1ac975e..e776b84a12 100644
--- a/indra/llvfs/lldir_mac.cpp
+++ b/indra/llvfs/lldir_mac.cpp
@@ -94,7 +94,7 @@ LLDir_Mac::LLDir_Mac()
// MBW -- This keeps the mac application from finding other things.
// If this is really for skins, it should JUST apply to skins.
- std::size_t build_dir_pos = mExecutableDir.rfind("/build-darwin-");
+ std::string::size_type build_dir_pos = mExecutableDir.rfind("/build-darwin-");
if (build_dir_pos != std::string::npos)
{
// ...we're in a dev checkout
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 4fe1e31668..bb3bcf2886 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -260,7 +260,7 @@ bool LLAppViewerMacOSX::restoreErrorTrap()
unsigned int reset_count = 0;
#define SET_SIG(S) sigaction(SIGABRT, &act, &old_act); \
- if((unsigned int)act.sa_sigaction != (unsigned int) old_act.sa_sigaction) \
+ if(act.sa_sigaction != old_act.sa_sigaction) \
++reset_count;
// Synchronous signals
SET_SIG(SIGABRT)
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index a626ad1bff..4cbeba083b 100644
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -35,6 +35,22 @@
#include "llwaterparammanager.h"
#include "llwlhandlers.h"
#include "llwlparammanager.h"
+#include "lltrans.h"
+
+std::string LLWLParamKey::toString() const
+{
+ switch (scope)
+ {
+ case SCOPE_LOCAL:
+ return name + std::string(" (") + LLTrans::getString("Local") + std::string(")");
+ break;
+ case SCOPE_REGION:
+ return name + std::string(" (") + LLTrans::getString("Region") + std::string(")");
+ break;
+ default:
+ return name + " (?)";
+ }
+}
std::string LLEnvPrefs::getWaterPresetName() const
{
diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h
index c7877303fc..2e1b06dceb 100644
--- a/indra/newview/llenvmanager.h
+++ b/indra/newview/llenvmanager.h
@@ -48,6 +48,87 @@ public:
} EScope;
};
+struct LLWLParamKey : LLEnvKey
+{
+public:
+ // scope and source of a param set (WL sky preset)
+ std::string name;
+ EScope scope;
+
+ // for conversion from LLSD
+ static const int NAME_IDX = 0;
+ static const int SCOPE_IDX = 1;
+
+ inline LLWLParamKey(const std::string& n, EScope s)
+ : name(n), scope(s)
+ {
+ }
+
+ inline LLWLParamKey(LLSD llsd)
+ : name(llsd[NAME_IDX].asString()), scope(EScope(llsd[SCOPE_IDX].asInteger()))
+ {
+ }
+
+ inline LLWLParamKey() // NOT really valid, just so std::maps can return a default of some sort
+ : name(""), scope(SCOPE_LOCAL)
+ {
+ }
+
+ inline LLWLParamKey(std::string& stringVal)
+ {
+ size_t len = stringVal.length();
+ if (len > 0)
+ {
+ name = stringVal.substr(0, len - 1);
+ scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str());
+ }
+ }
+
+ inline std::string toStringVal() const
+ {
+ std::stringstream str;
+ str << name << scope;
+ return str.str();
+ }
+
+ inline LLSD toLLSD() const
+ {
+ LLSD llsd = LLSD::emptyArray();
+ llsd.append(LLSD(name));
+ llsd.append(LLSD(scope));
+ return llsd;
+ }
+
+ inline void fromLLSD(const LLSD& llsd)
+ {
+ name = llsd[NAME_IDX].asString();
+ scope = EScope(llsd[SCOPE_IDX].asInteger());
+ }
+
+ inline bool operator <(const LLWLParamKey other) const
+ {
+ if (name < other.name)
+ {
+ return true;
+ }
+ else if (name > other.name)
+ {
+ return false;
+ }
+ else
+ {
+ return scope < other.scope;
+ }
+ }
+
+ inline bool operator ==(const LLWLParamKey other) const
+ {
+ return (name == other.name) && (scope == other.scope);
+ }
+
+ std::string toString() const;
+};
+
class LLEnvironmentSettings
{
public:
diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp
index 316294a477..cf38a00499 100644
--- a/indra/newview/llfloaterbeacons.cpp
+++ b/indra/newview/llfloaterbeacons.cpp
@@ -66,13 +66,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
std::string name = check->getName();
if(name == "touch_only")
{
- LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
+ LLPipeline::toggleRenderScriptedTouchBeacons();
// Don't allow both to be ON at the same time. Toggle the other one off if both now on.
if (
- LLPipeline::getRenderScriptedTouchBeacons(NULL) &&
- LLPipeline::getRenderScriptedBeacons(NULL) )
+ LLPipeline::getRenderScriptedTouchBeacons() &&
+ LLPipeline::getRenderScriptedBeacons() )
{
- LLPipeline::setRenderScriptedBeacons(FALSE);
+ LLPipeline::setRenderScriptedBeacons(false);
getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE));
getChild<LLCheckBoxCtrl>("scripted")->setValue(FALSE);
getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
@@ -81,13 +81,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
}
else if(name == "scripted")
{
- LLPipeline::toggleRenderScriptedBeacons(NULL);
+ LLPipeline::toggleRenderScriptedBeacons();
// Don't allow both to be ON at the same time. Toggle the other one off if both now on.
if (
- LLPipeline::getRenderScriptedTouchBeacons(NULL) &&
- LLPipeline::getRenderScriptedBeacons(NULL) )
+ LLPipeline::getRenderScriptedTouchBeacons() &&
+ LLPipeline::getRenderScriptedBeacons() )
{
- LLPipeline::setRenderScriptedTouchBeacons(FALSE);
+ LLPipeline::setRenderScriptedTouchBeacons(false);
getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE));
getChild<LLCheckBoxCtrl>("touch_only")->setValue(FALSE);
getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
@@ -100,13 +100,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
else if(name == "moapbeacon") LLPipeline::setRenderMOAPBeacons(check->get());
else if(name == "highlights")
{
- LLPipeline::toggleRenderHighlights(NULL);
+ LLPipeline::toggleRenderHighlights();
// Don't allow both to be OFF at the same time. Toggle the other one on if both now off.
if (
- !LLPipeline::getRenderBeacons(NULL) &&
- !LLPipeline::getRenderHighlights(NULL) )
+ !LLPipeline::getRenderBeacons() &&
+ !LLPipeline::getRenderHighlights() )
{
- LLPipeline::setRenderBeacons(TRUE);
+ LLPipeline::setRenderBeacons(true);
getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE));
getChild<LLCheckBoxCtrl>("beacons")->setValue(TRUE);
getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
@@ -115,13 +115,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
}
else if(name == "beacons")
{
- LLPipeline::toggleRenderBeacons(NULL);
+ LLPipeline::toggleRenderBeacons();
// Don't allow both to be OFF at the same time. Toggle the other one on if both now off.
if (
- !LLPipeline::getRenderBeacons(NULL) &&
- !LLPipeline::getRenderHighlights(NULL) )
+ !LLPipeline::getRenderBeacons() &&
+ !LLPipeline::getRenderHighlights() )
{
- LLPipeline::setRenderHighlights(TRUE);
+ LLPipeline::setRenderHighlights(true);
getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE));
getChild<LLCheckBoxCtrl>("highlights")->setValue(TRUE);
getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index 957c91b226..33e4c7cd5f 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -184,7 +184,7 @@ void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y)
std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar";
mPopupMenu->getChild<LLUICtrl>("Avatar Mute")->setValue(LLTrans::getString(mute_msg));
- mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID));
+ mPopupMenu->setItemEnabled(std::string("Zoom In"), bool(gObjectList.findObject(mItemUUID)));
((LLContextMenu*)mPopupMenu)->show(x, y);
LLMenuGL::showPopup(ctrl, mPopupMenu, x, y);
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 257b39a7dd..e9af22d336 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -282,7 +282,7 @@ void LLFloaterIMNearbyChat::onTearOffClicked()
LLFloaterIMSessionTab::onTearOffClicked();
// see CHUI-170: Save torn-off state of the nearby chat between sessions
- BOOL in_the_multifloater = (BOOL)getHost();
+ bool in_the_multifloater(getHost());
gSavedPerAccountSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater);
}
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 333ff863e5..fc2da772f3 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -119,7 +119,7 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask)
LLVector3d pos_global = mMap->viewPosToGlobal(x, y);
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
if (world_map)
{
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index c67feb8158..d89fa03c1a 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -558,7 +558,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
}
else
{
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
}
setDefaultBtn("Teleport");
}
@@ -602,7 +602,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
}
else
{
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
}
setDefaultBtn("Teleport");
}
@@ -628,7 +628,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
if (!sim_info)
{
// We haven't found a region for that point yet, leave the tracking to the world map
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
LLWorldMap::getInstance()->setTracking(pos_global);
S32 world_x = S32(pos_global.mdV[0] / 256);
S32 world_y = S32(pos_global.mdV[1] / 256);
@@ -644,7 +644,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
{
// Down region. Show the blue circle of death!
// i.e. let the world map that this and tell it it's invalid
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
LLWorldMap::getInstance()->setTracking(pos_global);
LLWorldMap::getInstance()->setTrackingInvalid();
setDefaultBtn("");
@@ -863,7 +863,7 @@ void LLFloaterWorldMap::friendsChanged()
(buddy_info && !buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) ||
gAgent.isGodlike())
{
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
}
}
}
@@ -1070,7 +1070,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( )
if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
{
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
}
}
@@ -1080,7 +1080,7 @@ void LLFloaterWorldMap::onComboTextEntry()
// Reset the tracking whenever we start typing into any of the search fields,
// so that hitting <enter> does an auto-complete versus teleporting us to the
// previously selected landmark/friend.
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
}
void LLFloaterWorldMap::onSearchTextEntry( )
@@ -1103,7 +1103,7 @@ void LLFloaterWorldMap::onLandmarkComboCommit()
LLUUID asset_id;
LLUUID item_id = list->getCurrentID();
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
//RN: stopTracking() clears current combobox selection, need to reassert it here
list->setCurrentByID(item_id);
@@ -1158,7 +1158,7 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( )
if( !list->setCurrentByID( current_choice ) || current_choice.isNull() )
{
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
}
}
@@ -1271,7 +1271,7 @@ void LLFloaterWorldMap::onCoordinatesCommit()
void LLFloaterWorldMap::onClearBtn()
{
mTrackedStatus = LLTracker::TRACKING_NOTHING;
- LLTracker::stopTracking((void *)(intptr_t)TRUE);
+ LLTracker::stopTracking(true);
LLWorldMap::getInstance()->cancelTracking();
mSLURL = LLSLURL(); // Clear the SLURL since it's invalid
mSetToUserPosition = TRUE; // Revert back to the current user position
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 485d4677b1..0218a45b8e 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -927,7 +927,7 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params
//possibly a case of complex object names consisting of 3+ words
if (!has_name)
{
- U32 divider_pos = stuff.find(NAME_TEXT_DIVIDER);
+ std::string::size_type divider_pos = stuff.find(NAME_TEXT_DIVIDER);
if (divider_pos != std::string::npos && divider_pos < (stuff.length() - NAME_TEXT_DIVIDER.length()))
{
im[LL_IM_FROM] = stuff.substr(0, divider_pos);
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index f996557c17..ccbe13fb50 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -531,7 +531,7 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content)
LL_DEBUGS("Materials") << "response has "<< response_data.size() << " materials" << LL_ENDL;
for (LLSD::array_const_iterator faceIter = response_data.beginArray(); faceIter != response_data.endArray(); ++faceIter)
{
-# ifndef LL_RELEASE_FOR_DOWNLOAD
+# ifdef SHOW_ASSERT // same condition that controls llassert()
const LLSD& face_data = *faceIter; // conditional to avoid unused variable warning
# endif
llassert(face_data.isMap());
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 72faa5a9e7..248c361ca4 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -988,6 +988,6 @@ void LLNetMap::handleStopTracking (const LLSD& userdata)
if (mPopupMenu)
{
mPopupMenu->setItemEnabled ("Stop Tracking", false);
- LLTracker::stopTracking ((void*)LLTracker::isTracking(NULL));
+ LLTracker::stopTracking (LLTracker::isTracking(NULL));
}
}
diff --git a/indra/newview/llpipelinelistener.cpp b/indra/newview/llpipelinelistener.cpp
index 20759239bf..dfbe689f56 100644
--- a/indra/newview/llpipelinelistener.cpp
+++ b/indra/newview/llpipelinelistener.cpp
@@ -48,7 +48,7 @@ namespace {
U32 render_type = render_type_from_string( iter->asString() );
if ( render_type != 0 )
{
- LLPipeline::toggleRenderTypeControl( (void*) render_type );
+ LLPipeline::toggleRenderTypeControl( render_type );
}
}
}
@@ -59,7 +59,7 @@ namespace {
U32 render_type = render_type_from_string( request["type"].asString() );
if ( render_type != 0 )
{
- response["value"] = LLPipeline::hasRenderTypeControl( (void*) render_type );
+ response["value"] = LLPipeline::hasRenderTypeControl( render_type );
}
else
{
@@ -87,7 +87,7 @@ namespace {
U32 render_feature = feature_from_string( iter->asString() );
if ( render_feature != 0 )
{
- LLPipeline::toggleRenderDebugControl( (void*) render_feature );
+ LLPipeline::toggleRenderDebugControl( render_feature );
}
}
}
@@ -126,7 +126,7 @@ namespace {
U32 info_display = info_display_from_string( iter->asString() );
if ( info_display != 0 )
{
- LLPipeline::toggleRenderDebug( (void*) info_display );
+ LLPipeline::toggleRenderDebug( info_display );
}
}
}
diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp
index 0ea05a03d6..449e0080f0 100644
--- a/indra/newview/llsearchhistory.cpp
+++ b/indra/newview/llsearchhistory.cpp
@@ -116,26 +116,26 @@ void LLSearchHistory::addEntry(const std::string& search_query)
mSearchHistory.push_front(item);
}
-bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right)
+bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right) const
{
S32 result = LLStringUtil::compareInsensitive(search_query, right.search_query);
return result < 0;
}
-bool LLSearchHistory::LLSearchHistoryItem::operator > (const LLSearchHistory::LLSearchHistoryItem& right)
+bool LLSearchHistory::LLSearchHistoryItem::operator > (const LLSearchHistory::LLSearchHistoryItem& right) const
{
S32 result = LLStringUtil::compareInsensitive(search_query, right.search_query);
return result > 0;
}
-bool LLSearchHistory::LLSearchHistoryItem::operator==(const LLSearchHistory::LLSearchHistoryItem& right)
+bool LLSearchHistory::LLSearchHistoryItem::operator==(const LLSearchHistory::LLSearchHistoryItem& right) const
{
return 0 == LLStringUtil::compareInsensitive(search_query, right.search_query);
}
-bool LLSearchHistory::LLSearchHistoryItem::operator==(const std::string& right)
+bool LLSearchHistory::LLSearchHistoryItem::operator==(const std::string& right) const
{
return 0 == LLStringUtil::compareInsensitive(search_query, right);
}
diff --git a/indra/newview/llsearchhistory.h b/indra/newview/llsearchhistory.h
index 3309a8fcac..7fe2aa2737 100644
--- a/indra/newview/llsearchhistory.h
+++ b/indra/newview/llsearchhistory.h
@@ -98,16 +98,16 @@ public:
/**
* Allows std::list sorting
*/
- bool operator < (const LLSearchHistory::LLSearchHistoryItem& right);
+ bool operator < (const LLSearchHistory::LLSearchHistoryItem& right) const;
/**
* Allows std::list sorting
*/
- bool operator > (const LLSearchHistory::LLSearchHistoryItem& right);
+ bool operator > (const LLSearchHistory::LLSearchHistoryItem& right) const;
- bool operator==(const LLSearchHistoryItem& right);
+ bool operator==(const LLSearchHistoryItem& right) const;
- bool operator==(const std::string& right);
+ bool operator==(const std::string& right) const;
/**
* Serializes search history item to LLSD
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index cf09f6f978..dba690242a 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -122,7 +122,7 @@ void LLSkinningUtil::initSkinningMatrixPalette(
// static
void LLSkinningUtil::checkSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin)
{
-#ifndef LL_RELEASE_FOR_DOWNLOAD
+#ifdef SHOW_ASSERT // same condition that controls llassert()
const S32 max_joints = skin->mJointNames.size();
for (U32 j=0; j<num_vertices; j++)
{
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index b015cde45d..2ec5c41b88 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -100,9 +100,8 @@ LLTracker::~LLTracker()
// static
-void LLTracker::stopTracking(void* userdata)
+void LLTracker::stopTracking(bool clear_ui)
{
- BOOL clear_ui = ((BOOL)(intptr_t)userdata);
instance()->stopTrackingAll(clear_ui);
}
@@ -183,7 +182,7 @@ void LLTracker::render3D()
F32 dist = gFloaterWorldMap->getDistanceToDestination(pos_global, 0.5f);
if (dist < DESTINATION_REACHED_RADIUS)
{
- instance()->stopTrackingLocation(FALSE,TRUE);
+ instance()->stopTrackingLocation(false,true);
}
else
{
@@ -606,7 +605,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
}
-void LLTracker::stopTrackingAll(BOOL clear_ui)
+void LLTracker::stopTrackingAll(bool clear_ui)
{
switch (mTrackingStatus)
{
@@ -626,7 +625,7 @@ void LLTracker::stopTrackingAll(BOOL clear_ui)
}
-void LLTracker::stopTrackingAvatar(BOOL clear_ui)
+void LLTracker::stopTrackingAvatar(bool clear_ui)
{
LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
if( !av_tracker.getAvatarID().isNull() )
@@ -640,7 +639,7 @@ void LLTracker::stopTrackingAvatar(BOOL clear_ui)
}
-void LLTracker::stopTrackingLandmark(BOOL clear_ui)
+void LLTracker::stopTrackingLandmark(bool clear_ui)
{
purgeBeaconText();
mTrackedLandmarkAssetID.setNull();
@@ -655,7 +654,7 @@ void LLTracker::stopTrackingLandmark(BOOL clear_ui)
}
-void LLTracker::stopTrackingLocation(BOOL clear_ui, BOOL dest_reached)
+void LLTracker::stopTrackingLocation(bool clear_ui, bool dest_reached)
{
purgeBeaconText();
mTrackedLocationName.assign("");
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index a1c5052c1b..4a6f10b767 100644
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -74,8 +74,8 @@ public:
// these are static so that they can be used a callbacks
static ETrackingStatus getTrackingStatus() { return instance()->mTrackingStatus; }
static ETrackingLocationType getTrackedLocationType() { return instance()->mTrackingLocationType; }
- static BOOL isTracking(void*) { return instance()->mTrackingStatus != TRACKING_NOTHING; }
- static void stopTracking(void*);
+ static bool isTracking(void*) { return instance()->mTrackingStatus != TRACKING_NOTHING; }
+ static void stopTracking(bool);
static void clearFocus();
static const LLUUID& getTrackedLandmarkAssetID() { return instance()->mTrackedLandmarkAssetID; }
@@ -114,10 +114,10 @@ protected:
LLHUDText* hud_textp,
const std::string& label );
- void stopTrackingAll(BOOL clear_ui = FALSE);
- void stopTrackingAvatar(BOOL clear_ui = FALSE);
- void stopTrackingLocation(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE);
- void stopTrackingLandmark(BOOL clear_ui = FALSE);
+ void stopTrackingAll(bool clear_ui = false);
+ void stopTrackingAvatar(bool clear_ui = false);
+ void stopTrackingLocation(bool clear_ui = false, bool dest_reached = false);
+ void stopTrackingLandmark(bool clear_ui = false);
void drawMarker(const LLVector3d& pos_global, const LLColor4& color);
void setLandmarkVisited();
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index afa00e3e6e..13eccaefc1 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1107,7 +1107,7 @@ void render_hud_attachments()
bool has_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI);
if (has_ui)
{
- gPipeline.toggleRenderDebugFeature((void*) LLPipeline::RENDER_DEBUG_FEATURE_UI);
+ gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
S32 use_occlusion = LLPipeline::sUseOcclusion;
@@ -1152,7 +1152,7 @@ void render_hud_attachments()
if (has_ui)
{
- gPipeline.toggleRenderDebugFeature((void*) LLPipeline::RENDER_DEBUG_FEATURE_UI);
+ gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
LLPipeline::sUseOcclusion = use_occlusion;
LLPipeline::sRenderingHUDs = FALSE;
@@ -1230,13 +1230,13 @@ bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model)
return get_hud_matrices(whole_screen, proj, model);
}
-BOOL setup_hud_matrices()
+bool setup_hud_matrices()
{
LLRect whole_screen = get_whole_screen_region();
return setup_hud_matrices(whole_screen);
}
-BOOL setup_hud_matrices(const LLRect& screen_region)
+bool setup_hud_matrices(const LLRect& screen_region)
{
glh::matrix4f proj, model;
bool result = get_hud_matrices(screen_region, proj, model);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 72579d4d7a..52dae4c0ac 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -792,7 +792,7 @@ class LLAdvancedToggleRenderType : public view_listener_t
U32 render_type = render_type_from_string( userdata.asString() );
if ( render_type != 0 )
{
- LLPipeline::toggleRenderTypeControl( (void*)render_type );
+ LLPipeline::toggleRenderTypeControl( render_type );
}
return true;
}
@@ -808,7 +808,7 @@ class LLAdvancedCheckRenderType : public view_listener_t
if ( render_type != 0 )
{
- new_value = LLPipeline::hasRenderTypeControl( (void*)render_type );
+ new_value = LLPipeline::hasRenderTypeControl( render_type );
}
return new_value;
@@ -867,7 +867,7 @@ class LLAdvancedToggleFeature : public view_listener_t
U32 feature = feature_from_string( userdata.asString() );
if ( feature != 0 )
{
- LLPipeline::toggleRenderDebugFeature( (void*)feature );
+ LLPipeline::toggleRenderDebugFeature( feature );
}
return true;
}
@@ -882,7 +882,7 @@ class LLAdvancedCheckFeature : public view_listener_t
if ( feature != 0 )
{
- new_value = LLPipeline::toggleRenderDebugFeatureControl( (void*)feature );
+ new_value = LLPipeline::toggleRenderDebugFeatureControl( feature );
}
return new_value;
@@ -923,7 +923,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
{
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == TRUE)
{
- gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
+ gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF;
}
@@ -931,7 +931,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
{
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE)
{
- gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
+ gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_CURRENT;
}
@@ -939,7 +939,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
{
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE)
{
- gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
+ gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
gPipeline.setRenderDebugFeatureControl(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY, true);
LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_DESIRED;
@@ -948,7 +948,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
{
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE)
{
- gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
+ gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_FULL;
}
@@ -1091,7 +1091,7 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t
if ( info_display != 0 )
{
- LLPipeline::toggleRenderDebug( (void*)info_display );
+ LLPipeline::toggleRenderDebug( info_display );
}
return true;
@@ -1108,7 +1108,7 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t
if ( info_display != 0 )
{
- new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display );
+ new_value = LLPipeline::toggleRenderDebugControl( info_display );
}
return new_value;
@@ -1221,7 +1221,7 @@ class LLAdvancedToggleWireframe : public view_listener_t
LLPipeline::updateRenderDeferred();
gPipeline.resetVertexBuffers();
- if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != gInitialDeferredModeForWireframe && gPipeline.isInit())
+ if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != bool(gInitialDeferredModeForWireframe) && gPipeline.isInit())
{
LLPipeline::refreshCachedSettings();
gPipeline.releaseGLBuffers();
@@ -8080,66 +8080,66 @@ class LLViewToggleBeacon : public view_listener_t
std::string beacon = userdata.asString();
if (beacon == "scriptsbeacon")
{
- LLPipeline::toggleRenderScriptedBeacons(NULL);
- gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
+ LLPipeline::toggleRenderScriptedBeacons();
+ gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons() );
// toggle the other one off if it's on
- if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
+ if (LLPipeline::getRenderScriptedBeacons() && LLPipeline::getRenderScriptedTouchBeacons())
{
- LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
- gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
+ LLPipeline::toggleRenderScriptedTouchBeacons();
+ gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons() );
}
}
else if (beacon == "physicalbeacon")
{
- LLPipeline::toggleRenderPhysicalBeacons(NULL);
- gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) );
+ LLPipeline::toggleRenderPhysicalBeacons();
+ gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons() );
}
else if (beacon == "moapbeacon")
{
- LLPipeline::toggleRenderMOAPBeacons(NULL);
- gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons(NULL) );
+ LLPipeline::toggleRenderMOAPBeacons();
+ gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons() );
}
else if (beacon == "soundsbeacon")
{
- LLPipeline::toggleRenderSoundBeacons(NULL);
- gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) );
+ LLPipeline::toggleRenderSoundBeacons();
+ gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons() );
}
else if (beacon == "particlesbeacon")
{
- LLPipeline::toggleRenderParticleBeacons(NULL);
- gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) );
+ LLPipeline::toggleRenderParticleBeacons();
+ gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons() );
}
else if (beacon == "scripttouchbeacon")
{
- LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
- gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) );
+ LLPipeline::toggleRenderScriptedTouchBeacons();
+ gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons() );
// toggle the other one off if it's on
- if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL))
+ if (LLPipeline::getRenderScriptedBeacons() && LLPipeline::getRenderScriptedTouchBeacons())
{
- LLPipeline::toggleRenderScriptedBeacons(NULL);
- gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) );
+ LLPipeline::toggleRenderScriptedBeacons();
+ gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons() );
}
}
else if (beacon == "renderbeacons")
{
- LLPipeline::toggleRenderBeacons(NULL);
- gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
+ LLPipeline::toggleRenderBeacons();
+ gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons() );
// toggle the other one on if it's not
- if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
+ if (!LLPipeline::getRenderBeacons() && !LLPipeline::getRenderHighlights())
{
- LLPipeline::toggleRenderHighlights(NULL);
- gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
+ LLPipeline::toggleRenderHighlights();
+ gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights() );
}
}
else if (beacon == "renderhighlights")
{
- LLPipeline::toggleRenderHighlights(NULL);
- gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) );
+ LLPipeline::toggleRenderHighlights();
+ gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights() );
// toggle the other one on if it's not
- if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL))
+ if (!LLPipeline::getRenderBeacons() && !LLPipeline::getRenderHighlights())
{
- LLPipeline::toggleRenderBeacons(NULL);
- gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) );
+ LLPipeline::toggleRenderBeacons();
+ gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons() );
}
}
@@ -8218,7 +8218,7 @@ class LLViewCheckRenderType : public view_listener_t
bool new_value = false;
if (type == "hideparticles")
{
- new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
+ new_value = LLPipeline::toggleRenderTypeControlNegated(LLPipeline::RENDER_TYPE_PARTICLES);
}
return new_value;
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f472db080f..333b6703fe 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2596,7 +2596,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// The group notice packet does not have an AgentID. Obtain one from the name cache.
// If last name is "Resident" strip it out so the cache name lookup works.
- U32 index = original_name.find(" Resident");
+ std::string::size_type index = original_name.find(" Resident");
if (index != std::string::npos)
{
original_name = original_name.substr(0, index);
@@ -4196,7 +4196,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
LLVector3 beacon_dir(agent_pos.mV[VX] - (F32)fmod(beacon_pos.mdV[VX], 256.0), agent_pos.mV[VY] - (F32)fmod(beacon_pos.mdV[VY], 256.0), 0);
if (beacon_dir.magVecSquared() < 25.f)
{
- LLTracker::stopTracking(NULL);
+ LLTracker::stopTracking(false);
}
else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() && look_at.isExactlyZero())
{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9e68bb78e0..44b297a128 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -747,45 +747,45 @@ public:
}
// only display these messages if we are actually rendering beacons at this moment
- if (LLPipeline::getRenderBeacons(NULL) && LLFloaterReg::instanceVisible("beacons"))
+ if (LLPipeline::getRenderBeacons() && LLFloaterReg::instanceVisible("beacons"))
{
- if (LLPipeline::getRenderMOAPBeacons(NULL))
+ if (LLPipeline::getRenderMOAPBeacons())
{
addText(xpos, ypos, "Viewing media beacons (white)");
ypos += y_inc;
}
- if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES))
+ if (LLPipeline::toggleRenderTypeControlNegated(LLPipeline::RENDER_TYPE_PARTICLES))
{
addText(xpos, ypos, particle_hiding);
ypos += y_inc;
}
- if (LLPipeline::getRenderParticleBeacons(NULL))
+ if (LLPipeline::getRenderParticleBeacons())
{
addText(xpos, ypos, "Viewing particle beacons (blue)");
ypos += y_inc;
}
- if (LLPipeline::getRenderSoundBeacons(NULL))
+ if (LLPipeline::getRenderSoundBeacons())
{
addText(xpos, ypos, "Viewing sound beacons (yellow)");
ypos += y_inc;
}
- if (LLPipeline::getRenderScriptedBeacons(NULL))
+ if (LLPipeline::getRenderScriptedBeacons())
{
addText(xpos, ypos, beacon_scripted);
ypos += y_inc;
}
else
- if (LLPipeline::getRenderScriptedTouchBeacons(NULL))
+ if (LLPipeline::getRenderScriptedTouchBeacons())
{
addText(xpos, ypos, beacon_scripted_touch);
ypos += y_inc;
}
- if (LLPipeline::getRenderPhysicalBeacons(NULL))
+ if (LLPipeline::getRenderPhysicalBeacons())
{
addText(xpos, ypos, "Viewing physical object beacons (green)");
ypos += y_inc;
@@ -4500,7 +4500,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if ( prev_draw_ui != show_ui)
{
- LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI);
+ LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
BOOL hide_hud = !gSavedSettings.getBOOL("RenderHUDInSnapshot") && LLPipeline::sShowHUDAttachments;
@@ -4723,7 +4723,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// POST SNAPSHOT
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI);
+ LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
if (hide_hud)
diff --git a/indra/newview/llwlanimator.h b/indra/newview/llwlanimator.h
index 810f4cf7e5..e2e49c7305 100644
--- a/indra/newview/llwlanimator.h
+++ b/indra/newview/llwlanimator.h
@@ -28,12 +28,11 @@
#define LL_WL_ANIMATOR_H
#include "llwlparamset.h"
+#include "llenvmanager.h"
#include "llwaterparamset.h"
#include <string>
#include <map>
-struct LLWLParamKey;
-
class LLWLAnimator {
public:
typedef enum e_time
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index e13aed98ed..29826e32ba 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -116,100 +116,6 @@ struct WLFloatControl {
}
};
-struct LLWLParamKey : LLEnvKey
-{
-public:
- // scope and source of a param set (WL sky preset)
- std::string name;
- EScope scope;
-
- // for conversion from LLSD
- static const int NAME_IDX = 0;
- static const int SCOPE_IDX = 1;
-
- inline LLWLParamKey(const std::string& n, EScope s)
- : name(n), scope(s)
- {
- }
-
- inline LLWLParamKey(LLSD llsd)
- : name(llsd[NAME_IDX].asString()), scope(EScope(llsd[SCOPE_IDX].asInteger()))
- {
- }
-
- inline LLWLParamKey() // NOT really valid, just so std::maps can return a default of some sort
- : name(""), scope(SCOPE_LOCAL)
- {
- }
-
- inline LLWLParamKey(std::string& stringVal)
- {
- size_t len = stringVal.length();
- if (len > 0)
- {
- name = stringVal.substr(0, len - 1);
- scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str());
- }
- }
-
- inline std::string toStringVal() const
- {
- std::stringstream str;
- str << name << scope;
- return str.str();
- }
-
- inline LLSD toLLSD() const
- {
- LLSD llsd = LLSD::emptyArray();
- llsd.append(LLSD(name));
- llsd.append(LLSD(scope));
- return llsd;
- }
-
- inline void fromLLSD(const LLSD& llsd)
- {
- name = llsd[NAME_IDX].asString();
- scope = EScope(llsd[SCOPE_IDX].asInteger());
- }
-
- inline bool operator <(const LLWLParamKey other) const
- {
- if (name < other.name)
- {
- return true;
- }
- else if (name > other.name)
- {
- return false;
- }
- else
- {
- return scope < other.scope;
- }
- }
-
- inline bool operator ==(const LLWLParamKey other) const
- {
- return (name == other.name) && (scope == other.scope);
- }
-
- inline std::string toString() const
- {
- switch (scope)
- {
- case SCOPE_LOCAL:
- return name + std::string(" (") + LLTrans::getString("Local") + std::string(")");
- break;
- case SCOPE_REGION:
- return name + std::string(" (") + LLTrans::getString("Region") + std::string(")");
- break;
- default:
- return name + " (?)";
- }
- }
-};
-
/// WindLight parameter manager class - what controls all the wind light shaders
class LLWLParamManager : public LLSingleton<LLWLParamManager>
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c6bbfb1c8f..7553ddff63 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -129,26 +129,26 @@
bool gShiftFrame = false;
//cached settings
-BOOL LLPipeline::RenderAvatarVP;
-BOOL LLPipeline::VertexShaderEnable;
-BOOL LLPipeline::WindLightUseAtmosShaders;
-BOOL LLPipeline::RenderDeferred;
+bool LLPipeline::RenderAvatarVP;
+bool LLPipeline::VertexShaderEnable;
+bool LLPipeline::WindLightUseAtmosShaders;
+bool LLPipeline::RenderDeferred;
F32 LLPipeline::RenderDeferredSunWash;
U32 LLPipeline::RenderFSAASamples;
U32 LLPipeline::RenderResolutionDivisor;
-BOOL LLPipeline::RenderUIBuffer;
+bool LLPipeline::RenderUIBuffer;
S32 LLPipeline::RenderShadowDetail;
-BOOL LLPipeline::RenderDeferredSSAO;
+bool LLPipeline::RenderDeferredSSAO;
F32 LLPipeline::RenderShadowResolutionScale;
-BOOL LLPipeline::RenderLocalLights;
-BOOL LLPipeline::RenderDelayCreation;
-BOOL LLPipeline::RenderAnimateRes;
-BOOL LLPipeline::FreezeTime;
+bool LLPipeline::RenderLocalLights;
+bool LLPipeline::RenderDelayCreation;
+bool LLPipeline::RenderAnimateRes;
+bool LLPipeline::FreezeTime;
S32 LLPipeline::DebugBeaconLineWidth;
F32 LLPipeline::RenderHighlightBrightness;
LLColor4 LLPipeline::RenderHighlightColor;
F32 LLPipeline::RenderHighlightThickness;
-BOOL LLPipeline::RenderSpotLightsInNondeferred;
+bool LLPipeline::RenderSpotLightsInNondeferred;
LLColor4 LLPipeline::PreviewAmbientColor;
LLColor4 LLPipeline::PreviewDiffuse0;
LLColor4 LLPipeline::PreviewSpecular0;
@@ -168,8 +168,8 @@ S32 LLPipeline::RenderGlowResolutionPow;
S32 LLPipeline::RenderGlowIterations;
F32 LLPipeline::RenderGlowWidth;
F32 LLPipeline::RenderGlowStrength;
-BOOL LLPipeline::RenderDepthOfField;
-BOOL LLPipeline::RenderDepthOfFieldInEditMode;
+bool LLPipeline::RenderDepthOfField;
+bool LLPipeline::RenderDepthOfFieldInEditMode;
F32 LLPipeline::CameraFocusTransitionTime;
F32 LLPipeline::CameraFNumber;
F32 LLPipeline::CameraFocalLength;
@@ -190,7 +190,7 @@ F32 LLPipeline::RenderEdgeDepthCutoff;
F32 LLPipeline::RenderEdgeNormCutoff;
LLVector3 LLPipeline::RenderShadowGaussian;
F32 LLPipeline::RenderShadowBlurDistFactor;
-BOOL LLPipeline::RenderDeferredAtmospheric;
+bool LLPipeline::RenderDeferredAtmospheric;
S32 LLPipeline::RenderReflectionDetail;
F32 LLPipeline::RenderHighlightFadeTime;
LLVector3 LLPipeline::RenderShadowClipPlanes;
@@ -200,7 +200,7 @@ F32 LLPipeline::RenderFarClip;
LLVector3 LLPipeline::RenderShadowSplitExponent;
F32 LLPipeline::RenderShadowErrorCutoff;
F32 LLPipeline::RenderShadowFOVCutoff;
-BOOL LLPipeline::CameraOffset;
+bool LLPipeline::CameraOffset;
F32 LLPipeline::CameraMaxCoF;
F32 LLPipeline::CameraDoFResScale;
F32 LLPipeline::RenderAutoHideSurfaceAreaLimit;
@@ -215,9 +215,9 @@ extern S32 gBoxFrame;
extern BOOL gDisplaySwapBuffers;
extern BOOL gDebugGL;
-BOOL gAvatarBacklight = FALSE;
+bool gAvatarBacklight = false;
-BOOL gDebugPipeline = FALSE;
+bool gDebugPipeline = false;
LLPipeline gPipeline;
const LLMatrix4* gGLLastMatrix = NULL;
@@ -358,45 +358,45 @@ void display_update_camera();
S32 LLPipeline::sCompiles = 0;
-BOOL LLPipeline::sPickAvatar = TRUE;
-BOOL LLPipeline::sDynamicLOD = TRUE;
-BOOL LLPipeline::sShowHUDAttachments = TRUE;
-BOOL LLPipeline::sRenderMOAPBeacons = FALSE;
-BOOL LLPipeline::sRenderPhysicalBeacons = TRUE;
-BOOL LLPipeline::sRenderScriptedBeacons = FALSE;
-BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE;
-BOOL LLPipeline::sRenderParticleBeacons = FALSE;
-BOOL LLPipeline::sRenderSoundBeacons = FALSE;
-BOOL LLPipeline::sRenderBeacons = FALSE;
-BOOL LLPipeline::sRenderHighlight = TRUE;
+bool LLPipeline::sPickAvatar = true;
+bool LLPipeline::sDynamicLOD = true;
+bool LLPipeline::sShowHUDAttachments = true;
+bool LLPipeline::sRenderMOAPBeacons = false;
+bool LLPipeline::sRenderPhysicalBeacons = true;
+bool LLPipeline::sRenderScriptedBeacons = false;
+bool LLPipeline::sRenderScriptedTouchBeacons = true;
+bool LLPipeline::sRenderParticleBeacons = false;
+bool LLPipeline::sRenderSoundBeacons = false;
+bool LLPipeline::sRenderBeacons = false;
+bool LLPipeline::sRenderHighlight = true;
LLRender::eTexIndex LLPipeline::sRenderHighlightTextureChannel = LLRender::DIFFUSE_MAP;
-BOOL LLPipeline::sForceOldBakedUpload = FALSE;
+bool LLPipeline::sForceOldBakedUpload = false;
S32 LLPipeline::sUseOcclusion = 0;
-BOOL LLPipeline::sDelayVBUpdate = TRUE;
-BOOL LLPipeline::sAutoMaskAlphaDeferred = TRUE;
-BOOL LLPipeline::sAutoMaskAlphaNonDeferred = FALSE;
-BOOL LLPipeline::sDisableShaders = FALSE;
-BOOL LLPipeline::sRenderBump = TRUE;
-BOOL LLPipeline::sBakeSunlight = FALSE;
-BOOL LLPipeline::sNoAlpha = FALSE;
-BOOL LLPipeline::sUseTriStrips = TRUE;
-BOOL LLPipeline::sUseFarClip = TRUE;
-BOOL LLPipeline::sShadowRender = FALSE;
-BOOL LLPipeline::sWaterReflections = FALSE;
-BOOL LLPipeline::sRenderGlow = FALSE;
-BOOL LLPipeline::sReflectionRender = FALSE;
-BOOL LLPipeline::sImpostorRender = FALSE;
-BOOL LLPipeline::sImpostorRenderAlphaDepthPass = FALSE;
-BOOL LLPipeline::sUnderWaterRender = FALSE;
-BOOL LLPipeline::sTextureBindTest = FALSE;
-BOOL LLPipeline::sRenderFrameTest = FALSE;
-BOOL LLPipeline::sRenderAttachedLights = TRUE;
-BOOL LLPipeline::sRenderAttachedParticles = TRUE;
-BOOL LLPipeline::sRenderDeferred = FALSE;
-BOOL LLPipeline::sMemAllocationThrottled = FALSE;
+bool LLPipeline::sDelayVBUpdate = true;
+bool LLPipeline::sAutoMaskAlphaDeferred = true;
+bool LLPipeline::sAutoMaskAlphaNonDeferred = false;
+bool LLPipeline::sDisableShaders = false;
+bool LLPipeline::sRenderBump = true;
+bool LLPipeline::sBakeSunlight = false;
+bool LLPipeline::sNoAlpha = false;
+bool LLPipeline::sUseTriStrips = true;
+bool LLPipeline::sUseFarClip = true;
+bool LLPipeline::sShadowRender = false;
+bool LLPipeline::sWaterReflections = false;
+bool LLPipeline::sRenderGlow = false;
+bool LLPipeline::sReflectionRender = false;
+bool LLPipeline::sImpostorRender = false;
+bool LLPipeline::sImpostorRenderAlphaDepthPass = false;
+bool LLPipeline::sUnderWaterRender = false;
+bool LLPipeline::sTextureBindTest = false;
+bool LLPipeline::sRenderFrameTest = false;
+bool LLPipeline::sRenderAttachedLights = true;
+bool LLPipeline::sRenderAttachedParticles = true;
+bool LLPipeline::sRenderDeferred = false;
+bool LLPipeline::sMemAllocationThrottled = false;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
-BOOL LLPipeline::sRenderingHUDs;
+bool LLPipeline::sRenderingHUDs;
// EventHost API LLPipeline listener.
static LLPipelineListener sPipelineListener;
@@ -413,14 +413,14 @@ bool addDeferredAttachments(LLRenderTarget& target)
}
LLPipeline::LLPipeline() :
- mBackfaceCull(FALSE),
+ mBackfaceCull(false),
mMatrixOpCount(0),
mTextureMatrixOps(0),
mNumVisibleNodes(0),
mNumVisibleFaces(0),
- mInitialized(FALSE),
- mVertexShadersEnabled(FALSE),
+ mInitialized(false),
+ mVertexShadersEnabled(false),
mVertexShadersLoaded(0),
mTransformFeedbackPrimitives(0),
mRenderDebugFeatureMask(0),
@@ -485,7 +485,7 @@ void LLPipeline::init()
sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
- mInitialized = TRUE;
+ mInitialized = true;
stop_glerror();
@@ -538,7 +538,7 @@ void LLPipeline::init()
mOldRenderDebugMask = mRenderDebugMask;
- mBackfaceCull = TRUE;
+ mBackfaceCull = true;
stop_glerror();
@@ -723,7 +723,7 @@ void LLPipeline::cleanup()
mMovedBridge.clear();
- mInitialized = FALSE;
+ mInitialized = false;
mDeferredVB = NULL;
@@ -759,7 +759,7 @@ void LLPipeline::destroyGL()
static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
//static
-void LLPipeline::throttleNewMemoryAllocation(BOOL disable)
+void LLPipeline::throttleNewMemoryAllocation(bool disable)
{
if(sMemAllocationThrottled != disable)
{
@@ -932,7 +932,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (LLPipeline::sRenderDeferred)
{
S32 shadow_detail = RenderShadowDetail;
- BOOL ssao = RenderDeferredSSAO;
+ bool ssao = RenderDeferredSSAO;
const U32 occlusion_divisor = 3;
@@ -1058,19 +1058,19 @@ void LLPipeline::updateRenderBump()
//static
void LLPipeline::updateRenderDeferred()
{
- BOOL deferred = ((RenderDeferred &&
+ bool deferred = (bool(RenderDeferred &&
LLRenderTarget::sUseFBO &&
LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
LLPipeline::sRenderBump &&
VertexShaderEnable &&
RenderAvatarVP &&
- WindLightUseAtmosShaders) ? TRUE : FALSE) &&
+ WindLightUseAtmosShaders)) &&
!gUseWireframe;
sRenderDeferred = deferred;
if (deferred)
{ //must render glow when rendering deferred since post effect pass is needed to present any lighting at all
- sRenderGlow = TRUE;
+ sRenderGlow = true;
}
}
@@ -1413,7 +1413,7 @@ void LLPipeline::restoreGL()
}
-BOOL LLPipeline::canUseVertexShaders()
+bool LLPipeline::canUseVertexShaders()
{
static const std::string vertex_shader_enable_feature_string = "VertexShaderEnable";
@@ -1423,30 +1423,30 @@ BOOL LLPipeline::canUseVertexShaders()
!LLFeatureManager::getInstance()->isFeatureAvailable(vertex_shader_enable_feature_string) ||
(assertInitialized() && mVertexShadersLoaded != 1) )
{
- return FALSE;
+ return false;
}
else
{
- return TRUE;
+ return true;
}
}
-BOOL LLPipeline::canUseWindLightShaders() const
+bool LLPipeline::canUseWindLightShaders() const
{
return (!LLPipeline::sDisableShaders &&
gWLSkyProgram.mProgramObject != 0 &&
LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_WINDLIGHT) > 1);
}
-BOOL LLPipeline::canUseWindLightShadersOnObjects() const
+bool LLPipeline::canUseWindLightShadersOnObjects() const
{
return (canUseWindLightShaders()
&& LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0);
}
-BOOL LLPipeline::canUseAntiAliasing() const
+bool LLPipeline::canUseAntiAliasing() const
{
- return TRUE;
+ return true;
}
void LLPipeline::unloadShaders()
@@ -1463,7 +1463,7 @@ void LLPipeline::assertInitializedDoError()
//============================================================================
-void LLPipeline::enableShadows(const BOOL enable_shadows)
+void LLPipeline::enableShadows(const bool enable_shadows)
{
//should probably do something here to wrangle shadows....
}
@@ -2001,7 +2001,7 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
{
LLDrawable::drawable_vector_t::iterator curiter = iter++;
LLDrawable *drawablep = *curiter;
- BOOL done = TRUE;
+ bool done = true;
if (!drawablep->isDead() && (!drawablep->isState(LLDrawable::EARLY_MOVE)))
{
done = drawablep->updateMove();
@@ -2329,7 +2329,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group)
}
-BOOL LLPipeline::visibleObjectsInFrustum(LLCamera& camera)
+bool LLPipeline::visibleObjectsInFrustum(LLCamera& camera)
{
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -2345,17 +2345,17 @@ BOOL LLPipeline::visibleObjectsInFrustum(LLCamera& camera)
{
if (part->visibleObjectsInFrustum(camera))
{
- return TRUE;
+ return true;
}
}
}
}
}
- return FALSE;
+ return false;
}
-BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& max)
+bool LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& max)
{
const F32 X = 65536.f;
@@ -2365,7 +2365,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3&
LLViewerCamera::eCameraID saved_camera_id = LLViewerCamera::sCurCameraID;
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- BOOL res = TRUE;
+ bool res = true;
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -2381,7 +2381,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3&
{
if (!part->getVisibleExtents(camera, min, max))
{
- res = FALSE;
+ res = false;
}
}
}
@@ -2408,7 +2408,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
sCull->clear();
- BOOL to_texture = LLPipeline::sUseOcclusion > 1 &&
+ bool to_texture = LLPipeline::sUseOcclusion > 1 &&
!hasRenderType(LLPipeline::RENDER_TYPE_HUD) &&
LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD &&
gPipeline.canUseVertexShaders() &&
@@ -2788,9 +2788,9 @@ void LLPipeline::doOcclusion(LLCamera& camera)
}
}
-BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority)
+bool LLPipeline::updateDrawableGeom(LLDrawable* drawablep, bool priority)
{
- BOOL update_complete = drawablep->updateGeometry(priority);
+ bool update_complete = drawablep->updateGeometry(priority);
if (update_complete && assertInitialized())
{
drawablep->setState(LLDrawable::BUILT);
@@ -3077,7 +3077,7 @@ void LLPipeline::updateGeom(F32 max_dtime)
last_group = drawablep->getSpatialGroup();
last_bridge = bridge;
- BOOL update_complete = TRUE;
+ bool update_complete = true;
if (!drawablep->isDead())
{
update_complete = updateDrawableGeom(drawablep, FALSE);
@@ -3134,7 +3134,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
}
}
-void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
+void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion)
{
if (!drawablep)
{
@@ -3168,7 +3168,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
}
drawablep->setState(LLDrawable::ON_MOVE_LIST);
}
- if (damped_motion == FALSE)
+ if (! damped_motion)
{
drawablep->setState(LLDrawable::MOVE_UNDAMPED); // UNDAMPED trumps DAMPED
}
@@ -3208,7 +3208,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
assertInitialized();
glClear(GL_DEPTH_BUFFER_BIT);
- gDepthDirty = TRUE;
+ gDepthDirty = true;
LLVector4a offseta;
offseta.load3(offset.mV);
@@ -3306,13 +3306,13 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group)
mMeshDirtyGroup.push_back(group);
}
-void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
+void LLPipeline::markRebuild(LLSpatialGroup* group, bool priority)
{
if (group && !group->isDead() && group->getSpatialPartition())
{
if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD)
{
- priority = TRUE;
+ priority = true;
}
if (priority)
@@ -3345,13 +3345,13 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority)
}
}
-void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority)
+void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, bool priority)
{
if (drawablep && !drawablep->isDead() && assertInitialized())
{
if (!drawablep->isState(LLDrawable::BUILT))
{
- priority = TRUE;
+ priority = true;
}
if (priority)
{
@@ -3720,17 +3720,17 @@ void renderMOAPBeacons(LLDrawable* drawablep)
if(!vobj || vobj->isAvatar())
return;
- BOOL beacon=FALSE;
+ bool beacon=false;
U8 tecount=vobj->getNumTEs();
for(int x=0;x<tecount;x++)
{
if(vobj->getTE(x)->hasMedia())
{
- beacon=TRUE;
+ beacon=true;
break;
}
}
- if(beacon==TRUE)
+ if(beacon)
{
if (gPipeline.sRenderBeacons)
{
@@ -4309,7 +4309,7 @@ void LLPipeline::renderHighlights()
//debug use
U32 LLPipeline::sCurRenderPoolType = 0 ;
-void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
+void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY);
@@ -4366,13 +4366,13 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
// Toggle backface culling for debugging
LLGLEnable cull_face(mBackfaceCull ? GL_CULL_FACE : 0);
// Set fog
- BOOL use_fog = hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG);
+ bool use_fog = hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG);
LLGLEnable fog_enable(use_fog &&
!gPipeline.canUseWindLightShadersOnObjects() ? GL_FOG : 0);
gSky.updateFog(camera.getFar());
if (!use_fog)
{
- sUnderWaterRender = FALSE;
+ sUnderWaterRender = false;
}
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sDefaultImagep);
@@ -4409,7 +4409,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
setupHWLights(NULL);
}
- BOOL occlude = sUseOcclusion > 1;
+ bool occlude = sUseOcclusion > 1;
U32 cur_type = 0;
pool_set_t::iterator iter1 = mPools.begin();
@@ -4424,7 +4424,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
if (occlude && cur_type >= LLDrawPool::POOL_GRASS)
{
- occlude = FALSE;
+ occlude = false;
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
LLGLSLShader::bindNoShader();
@@ -4489,7 +4489,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
if (occlude)
{
- occlude = FALSE;
+ occlude = false;
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
LLGLSLShader::bindNoShader();
@@ -4672,7 +4672,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
gGL.setColorMask(true, false);
pool_set_t::iterator iter1 = mPools.begin();
- BOOL occlude = LLPipeline::sUseOcclusion > 1 && do_occlusion;
+ bool occlude = LLPipeline::sUseOcclusion > 1 && do_occlusion;
while ( iter1 != mPools.end() )
{
@@ -4682,7 +4682,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
if (occlude && cur_type >= LLDrawPool::POOL_GRASS)
{
- occlude = FALSE;
+ occlude = false;
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
LLGLSLShader::bindNoShader();
@@ -4742,7 +4742,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion)
if (occlude)
{
- occlude = FALSE;
+ occlude = false;
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
LLGLSLShader::bindNoShader();
@@ -5884,7 +5884,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
case LLDrawPool::POOL_TREE:
#ifdef _DEBUG
{
- BOOL found = mTreePools.erase( (uintptr_t)poolp->getTexture() );
+ bool found = mTreePools.erase( (uintptr_t)poolp->getTexture() );
llassert( found );
}
#else
@@ -5895,7 +5895,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
case LLDrawPool::POOL_TERRAIN:
#ifdef _DEBUG
{
- BOOL found = mTerrainPools.erase( (uintptr_t)poolp->getTexture() );
+ bool found = mTerrainPools.erase( (uintptr_t)poolp->getTexture() );
llassert( found );
}
#else
@@ -5958,7 +5958,7 @@ void LLPipeline::resetDrawOrders()
// Once-per-frame setup of hardware lights,
// including sun/moon, avatar backlight, and up to 6 local lights
-void LLPipeline::setupAvatarLights(BOOL for_edit)
+void LLPipeline::setupAvatarLights(bool for_edit)
{
assertInitialized();
@@ -6063,7 +6063,7 @@ static F32 calc_light_dist(LLVOVolume* light, const LLVector3& cam_pos, F32 max_
return max_dist;
}
F32 radius = light->getLightRadius();
- BOOL selected = light->isSelected();
+ bool selected = light->isSelected();
LLVector3 dpos = light->getRenderPosition() - cam_pos;
F32 dist2 = dpos.lengthSquared();
if (!selected && dist2 > (max_dist + radius)*(max_dist + radius))
@@ -6658,9 +6658,9 @@ void LLPipeline::findReferences(LLDrawable *drawablep)
}
}
-BOOL LLPipeline::verify()
+bool LLPipeline::verify()
{
- BOOL ok = assertInitialized();
+ bool ok = assertInitialized();
if (ok)
{
for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter)
@@ -6668,7 +6668,7 @@ BOOL LLPipeline::verify()
LLDrawPool *poolp = *iter;
if (!poolp->verify())
{
- ok = FALSE;
+ ok = false;
}
}
}
@@ -6713,7 +6713,7 @@ BOOL LLPipeline::verify()
bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon)
{
- BOOL Inside = TRUE;
+ bool Inside = true;
LLVector3 MinB = center - size;
LLVector3 MaxB = center + size;
LLVector3 MaxT;
@@ -6725,7 +6725,7 @@ bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3&
if(origin.mV[i] < MinB.mV[i])
{
coord.mV[i] = MinB.mV[i];
- Inside = FALSE;
+ Inside = false;
// Calculate T distances to candidate planes
if(IR(dir.mV[i])) MaxT.mV[i] = (MinB.mV[i] - origin.mV[i]) / dir.mV[i];
@@ -6733,7 +6733,7 @@ bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3&
else if(origin.mV[i] > MaxB.mV[i])
{
coord.mV[i] = MaxB.mV[i];
- Inside = FALSE;
+ Inside = false;
// Calculate T distances to candidate planes
if(IR(dir.mV[i])) MaxT.mV[i] = (MaxB.mV[i] - origin.mV[i]) / dir.mV[i];
@@ -6779,7 +6779,7 @@ bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3&
//
//
-void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light)
+void LLPipeline::setLight(LLDrawable *drawablep, bool is_light)
{
if (drawablep && assertInitialized())
{
@@ -6807,9 +6807,8 @@ void LLPipeline::toggleRenderType(U32 type)
}
//static
-void LLPipeline::toggleRenderTypeControl(void* data)
+void LLPipeline::toggleRenderTypeControl(U32 type)
{
- U32 type = (U32)(intptr_t)data;
U32 bit = (1<<type);
if (gPipeline.hasRenderType(type))
{
@@ -6823,24 +6822,21 @@ void LLPipeline::toggleRenderTypeControl(void* data)
}
//static
-BOOL LLPipeline::hasRenderTypeControl(void* data)
+bool LLPipeline::hasRenderTypeControl(U32 type)
{
- U32 type = (U32)(intptr_t)data;
return gPipeline.hasRenderType(type);
}
// Allows UI items labeled "Hide foo" instead of "Show foo"
//static
-BOOL LLPipeline::toggleRenderTypeControlNegated(void* data)
+bool LLPipeline::toggleRenderTypeControlNegated(S32 type)
{
- S32 type = (S32)(intptr_t)data;
return !gPipeline.hasRenderType(type);
}
//static
-void LLPipeline::toggleRenderDebug(void* data)
+void LLPipeline::toggleRenderDebug(U32 bit)
{
- U32 bit = (U32)(intptr_t)data;
if (gPipeline.hasRenderDebugMask(bit))
{
LL_INFOS() << "Toggling render debug mask " << std::hex << bit << " off" << std::dec << LL_ENDL;
@@ -6854,24 +6850,21 @@ void LLPipeline::toggleRenderDebug(void* data)
//static
-BOOL LLPipeline::toggleRenderDebugControl(void* data)
+bool LLPipeline::toggleRenderDebugControl(U32 bit)
{
- U32 bit = (U32)(intptr_t)data;
return gPipeline.hasRenderDebugMask(bit);
}
//static
-void LLPipeline::toggleRenderDebugFeature(void* data)
+void LLPipeline::toggleRenderDebugFeature(U32 bit)
{
- U32 bit = (U32)(intptr_t)data;
gPipeline.mRenderDebugFeatureMask ^= bit;
}
//static
-BOOL LLPipeline::toggleRenderDebugFeatureControl(void* data)
+bool LLPipeline::toggleRenderDebugFeatureControl(U32 bit)
{
- U32 bit = (U32)(intptr_t)data;
return gPipeline.hasRenderDebugFeatureMask(bit);
}
@@ -6904,145 +6897,145 @@ void LLPipeline::popRenderDebugFeatureMask()
}
// static
-void LLPipeline::setRenderScriptedBeacons(BOOL val)
+void LLPipeline::setRenderScriptedBeacons(bool val)
{
sRenderScriptedBeacons = val;
}
// static
-void LLPipeline::toggleRenderScriptedBeacons(void*)
+void LLPipeline::toggleRenderScriptedBeacons()
{
sRenderScriptedBeacons = !sRenderScriptedBeacons;
}
// static
-BOOL LLPipeline::getRenderScriptedBeacons(void*)
+bool LLPipeline::getRenderScriptedBeacons()
{
return sRenderScriptedBeacons;
}
// static
-void LLPipeline::setRenderScriptedTouchBeacons(BOOL val)
+void LLPipeline::setRenderScriptedTouchBeacons(bool val)
{
sRenderScriptedTouchBeacons = val;
}
// static
-void LLPipeline::toggleRenderScriptedTouchBeacons(void*)
+void LLPipeline::toggleRenderScriptedTouchBeacons()
{
sRenderScriptedTouchBeacons = !sRenderScriptedTouchBeacons;
}
// static
-BOOL LLPipeline::getRenderScriptedTouchBeacons(void*)
+bool LLPipeline::getRenderScriptedTouchBeacons()
{
return sRenderScriptedTouchBeacons;
}
// static
-void LLPipeline::setRenderMOAPBeacons(BOOL val)
+void LLPipeline::setRenderMOAPBeacons(bool val)
{
sRenderMOAPBeacons = val;
}
// static
-void LLPipeline::toggleRenderMOAPBeacons(void*)
+void LLPipeline::toggleRenderMOAPBeacons()
{
sRenderMOAPBeacons = !sRenderMOAPBeacons;
}
// static
-BOOL LLPipeline::getRenderMOAPBeacons(void*)
+bool LLPipeline::getRenderMOAPBeacons()
{
return sRenderMOAPBeacons;
}
// static
-void LLPipeline::setRenderPhysicalBeacons(BOOL val)
+void LLPipeline::setRenderPhysicalBeacons(bool val)
{
sRenderPhysicalBeacons = val;
}
// static
-void LLPipeline::toggleRenderPhysicalBeacons(void*)
+void LLPipeline::toggleRenderPhysicalBeacons()
{
sRenderPhysicalBeacons = !sRenderPhysicalBeacons;
}
// static
-BOOL LLPipeline::getRenderPhysicalBeacons(void*)
+bool LLPipeline::getRenderPhysicalBeacons()
{
return sRenderPhysicalBeacons;
}
// static
-void LLPipeline::setRenderParticleBeacons(BOOL val)
+void LLPipeline::setRenderParticleBeacons(bool val)
{
sRenderParticleBeacons = val;
}
// static
-void LLPipeline::toggleRenderParticleBeacons(void*)
+void LLPipeline::toggleRenderParticleBeacons()
{
sRenderParticleBeacons = !sRenderParticleBeacons;
}
// static
-BOOL LLPipeline::getRenderParticleBeacons(void*)
+bool LLPipeline::getRenderParticleBeacons()
{
return sRenderParticleBeacons;
}
// static
-void LLPipeline::setRenderSoundBeacons(BOOL val)
+void LLPipeline::setRenderSoundBeacons(bool val)
{
sRenderSoundBeacons = val;
}
// static
-void LLPipeline::toggleRenderSoundBeacons(void*)
+void LLPipeline::toggleRenderSoundBeacons()
{
sRenderSoundBeacons = !sRenderSoundBeacons;
}
// static
-BOOL LLPipeline::getRenderSoundBeacons(void*)
+bool LLPipeline::getRenderSoundBeacons()
{
return sRenderSoundBeacons;
}
// static
-void LLPipeline::setRenderBeacons(BOOL val)
+void LLPipeline::setRenderBeacons(bool val)
{
sRenderBeacons = val;
}
// static
-void LLPipeline::toggleRenderBeacons(void*)
+void LLPipeline::toggleRenderBeacons()
{
sRenderBeacons = !sRenderBeacons;
}
// static
-BOOL LLPipeline::getRenderBeacons(void*)
+bool LLPipeline::getRenderBeacons()
{
return sRenderBeacons;
}
// static
-void LLPipeline::setRenderHighlights(BOOL val)
+void LLPipeline::setRenderHighlights(bool val)
{
sRenderHighlight = val;
}
// static
-void LLPipeline::toggleRenderHighlights(void*)
+void LLPipeline::toggleRenderHighlights()
{
sRenderHighlight = !sRenderHighlight;
}
// static
-BOOL LLPipeline::getRenderHighlights(void*)
+bool LLPipeline::getRenderHighlights()
{
return sRenderHighlight;
}
@@ -7096,8 +7089,8 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
}
LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
- BOOL pick_rigged,
+ bool pick_transparent,
+ bool pick_rigged,
S32* face_hit,
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
@@ -7111,7 +7104,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
LLVector4a position;
- sPickAvatar = FALSE; //LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE;
+ sPickAvatar = false; //! LLToolMgr::getInstance()->inBuildMode();
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -7177,7 +7170,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
const F32 ATTACHMENT_OVERRIDE_DIST = 0.1f;
//check against avatars
- sPickAvatar = TRUE;
+ sPickAvatar = true;
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
@@ -7249,7 +7242,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
}
LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
+ bool pick_transparent,
S32* face_hit,
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
@@ -7264,11 +7257,11 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c
{
LLViewerRegion* region = *iter;
- BOOL toggle = FALSE;
+ bool toggle = false;
if (!hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{
toggleRenderType(LLPipeline::RENDER_TYPE_HUD);
- toggle = TRUE;
+ toggle = true;
}
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD);
@@ -7417,7 +7410,7 @@ void LLPipeline::doResetVertexBuffers(bool forced)
LLVOPartGroup::restoreGL();
}
-void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture)
+void LLPipeline::renderObjects(U32 type, U32 mask, bool texture, bool batch_texture)
{
assertInitialized();
gGL.loadMatrix(gGLModelView);
@@ -7427,7 +7420,7 @@ void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_text
gGLLastMatrix = NULL;
}
-void LLPipeline::renderMaskedObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture)
+void LLPipeline::renderMaskedObjects(U32 type, U32 mask, bool texture, bool batch_texture)
{
assertInitialized();
gGL.loadMatrix(gGLModelView);
@@ -7500,7 +7493,7 @@ void LLPipeline::bindScreenToTexture()
static LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM("Bloom");
-void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
+void LLPipeline::renderBloom(bool for_snapshot, F32 zoom_factor, int subfield)
{
if (!(gPipeline.canUseVertexShaders() &&
sRenderGlow))
@@ -8618,7 +8611,7 @@ void LLPipeline::renderDeferredLighting()
gPipeline.popRenderTypeMask();
}
- BOOL render_local = RenderLocalLights;
+ bool render_local = RenderLocalLights;
if (render_local)
{
@@ -9171,7 +9164,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
gPipeline.popRenderTypeMask();
}
- BOOL render_local = RenderLocalLights;
+ bool render_local = RenderLocalLights;
if (render_local)
{
@@ -9730,10 +9723,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
{
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
{
- BOOL skip_avatar_update = FALSE;
+ bool skip_avatar_update = false;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
- skip_avatar_update = TRUE;
+ skip_avatar_update = true;
}
if (!skip_avatar_update)
@@ -9748,7 +9741,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLCamera camera = camera_in;
camera.setFar(camera.getFar()*0.87654321f);
- LLPipeline::sReflectionRender = TRUE;
+ LLPipeline::sReflectionRender = true;
gPipeline.pushRenderTypeMask();
@@ -9934,7 +9927,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
camera.setOrigin(camera_in.getOrigin());
//render distortion map
- static BOOL last_update = TRUE;
+ static bool last_update = true;
if (last_update)
{
camera.setFar(camera_in.getFar());
@@ -9944,7 +9937,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
END_RENDER_TYPES);
stop_glerror();
- LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? FALSE : TRUE;
+ LLPipeline::sUnderWaterRender = ! LLViewerCamera::getInstance()->cameraUnderWater();
if (LLPipeline::sUnderWaterRender)
{
@@ -10006,12 +9999,12 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
mWaterDis.flush();
- LLPipeline::sUnderWaterRender = FALSE;
+ LLPipeline::sUnderWaterRender = false;
}
last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate;
- LLPipeline::sReflectionRender = FALSE;
+ LLPipeline::sReflectionRender = false;
if (!LLRenderTarget::sUseFBO)
{
@@ -10106,7 +10099,7 @@ static LLTrace::BlockTimerStatHandle FTM_SHADOW_RENDER("Render Shadows");
static LLTrace::BlockTimerStatHandle FTM_SHADOW_ALPHA("Alpha Shadow");
static LLTrace::BlockTimerStatHandle FTM_SHADOW_SIMPLE("Simple Shadow");
-void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width)
+void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, bool use_shader, bool use_occlusion, U32 target_width)
{
LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER);
@@ -10116,7 +10109,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LLPipeline::sUseOcclusion = 0;
}
- LLPipeline::sShadowRender = TRUE;
+ LLPipeline::sShadowRender = true;
U32 types[] = {
LLRenderPass::PASS_SIMPLE,
@@ -10259,18 +10252,18 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
gGLLastMatrix = NULL;
LLPipeline::sUseOcclusion = occlude;
- LLPipeline::sShadowRender = FALSE;
+ LLPipeline::sShadowRender = false;
}
static LLTrace::BlockTimerStatHandle FTM_VISIBLE_CLOUD("Visible Cloud");
-BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir)
+bool LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir)
{
LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD);
//get point cloud of intersection of frust and min, max
if (getVisibleExtents(camera, min, max))
{
- return FALSE;
+ return false;
}
//get set of planes on bounding box
@@ -10428,10 +10421,10 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
if (fp.empty())
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade)
@@ -10523,11 +10516,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW);
- BOOL skip_avatar_update = FALSE;
+ bool skip_avatar_update = false;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
- skip_avatar_update = TRUE;
+ skip_avatar_update = true;
}
if (!skip_avatar_update)
@@ -11287,7 +11280,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
}
-void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture)
+void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, bool texture)
{
for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
{
@@ -11373,10 +11366,10 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
S32 occlusion = sUseOcclusion;
sUseOcclusion = 0;
- sReflectionRender = sRenderDeferred ? FALSE : TRUE;
+ sReflectionRender = ! sRenderDeferred;
- sShadowRender = TRUE;
- sImpostorRender = TRUE;
+ sShadowRender = true;
+ sImpostorRender = true;
LLViewerCamera* viewer_camera = LLViewerCamera::getInstance();
@@ -11625,9 +11618,9 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLVOAvatar::sUseImpostors = true; // @TODO ???
sUseOcclusion = occlusion;
- sReflectionRender = FALSE;
- sImpostorRender = FALSE;
- sShadowRender = FALSE;
+ sReflectionRender = false;
+ sImpostorRender = false;
+ sShadowRender = false;
popRenderTypeMask();
gGL.matrixMode(LLRender::MM_PROJECTION);
@@ -11644,7 +11637,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLGLState::checkClientArrays();
}
-BOOL LLPipeline::hasRenderBatches(const U32 type) const
+bool LLPipeline::hasRenderBatches(const U32 type) const
{
return sCull->getRenderMapSize(type) > 0;
}
@@ -11669,12 +11662,12 @@ LLCullResult::sg_iterator LLPipeline::endAlphaGroups()
return sCull->endAlphaGroups();
}
-BOOL LLPipeline::hasRenderType(const U32 type) const
+bool LLPipeline::hasRenderType(const U32 type) const
{
// STORM-365 : LLViewerJointAttachment::setAttachmentVisibility() is setting type to 0 to actually mean "do not render"
- // We then need to test that value here and return FALSE to prevent attachment to render (in mouselook for instance)
- // TODO: reintroduce RENDER_TYPE_NONE in LLRenderTypeMask and initialize its mRenderTypeEnabled[RENDER_TYPE_NONE] to FALSE explicitely
- return (type == 0 ? FALSE : mRenderTypeEnabled[type]);
+ // We then need to test that value here and return false to prevent attachment to render (in mouselook for instance)
+ // TODO: reintroduce RENDER_TYPE_NONE in LLRenderTypeMask and initialize its mRenderTypeEnabled[RENDER_TYPE_NONE] to false explicitely
+ return (type == 0 ? false : mRenderTypeEnabled[type]);
}
void LLPipeline::setRenderTypeMask(U32 type, ...)
@@ -11684,7 +11677,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...)
va_start(args, type);
while (type < END_RENDER_TYPES)
{
- mRenderTypeEnabled[type] = TRUE;
+ mRenderTypeEnabled[type] = true;
type = va_arg(args, U32);
}
va_end(args);
@@ -11695,7 +11688,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...)
}
}
-BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const
+bool LLPipeline::hasAnyRenderType(U32 type, ...) const
{
va_list args;
@@ -11704,7 +11697,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const
{
if (mRenderTypeEnabled[type])
{
- return TRUE;
+ return true;
}
type = va_arg(args, U32);
}
@@ -11715,7 +11708,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const
LL_ERRS() << "Invalid render type." << LL_ENDL;
}
- return FALSE;
+ return false;
}
void LLPipeline::pushRenderTypeMask()
@@ -11740,10 +11733,10 @@ void LLPipeline::andRenderTypeMask(U32 type, ...)
{
va_list args;
- BOOL tmp[NUM_RENDER_TYPES];
+ bool tmp[NUM_RENDER_TYPES];
for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
{
- tmp[i] = FALSE;
+ tmp[i] = false;
}
va_start(args, type);
@@ -11751,7 +11744,7 @@ void LLPipeline::andRenderTypeMask(U32 type, ...)
{
if (mRenderTypeEnabled[type])
{
- tmp[type] = TRUE;
+ tmp[type] = true;
}
type = va_arg(args, U32);
@@ -11777,7 +11770,7 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...)
va_start(args, type);
while (type < END_RENDER_TYPES)
{
- mRenderTypeEnabled[type] = FALSE;
+ mRenderTypeEnabled[type] = false;
type = va_arg(args, U32);
}
@@ -11793,7 +11786,7 @@ void LLPipeline::setAllRenderTypes()
{
for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
{
- mRenderTypeEnabled[i] = TRUE;
+ mRenderTypeEnabled[i] = true;
}
}
@@ -11801,7 +11794,7 @@ void LLPipeline::clearAllRenderTypes()
{
for (U32 i = 0; i < NUM_RENDER_TYPES; ++i)
{
- mRenderTypeEnabled[i] = FALSE;
+ mRenderTypeEnabled[i] = false;
}
}
@@ -11868,7 +11861,7 @@ void LLPipeline::restorePermanentObjects( const std::vector<U32>& restoreList )
skipRenderingOfTerrain( false );
}
-void LLPipeline::skipRenderingOfTerrain( BOOL flag )
+void LLPipeline::skipRenderingOfTerrain( bool flag )
{
pool_set_t::iterator iter = mPools.begin();
while ( iter != mPools.end() )
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index bba36351d9..c9670a60f2 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -57,10 +57,10 @@ typedef enum e_avatar_skinning_method
SKIN_METHOD_VERTEX_PROGRAM
} EAvatarSkinningMethod;
-BOOL compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn't be defined here!
+bool compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn't be defined here!
bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0);
-BOOL setup_hud_matrices(); // use whole screen to render hud
-BOOL setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking)
+bool setup_hud_matrices(); // use whole screen to render hud
+bool setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking)
glh::matrix4f glh_copy_matrix(F32* src);
glh::matrix4f glh_get_current_modelview();
void glh_set_current_modelview(const glh::matrix4f& mat);
@@ -133,11 +133,11 @@ public:
void resetVertexBuffers(LLDrawable* drawable);
void generateImpostor(LLVOAvatar* avatar);
void bindScreenToTexture();
- void renderBloom(BOOL for_snapshot, F32 zoom_factor = 1.f, int subfield = 0);
+ void renderBloom(bool for_snapshot, F32 zoom_factor = 1.f, int subfield = 0);
void init();
void cleanup();
- BOOL isInit() { return mInitialized; };
+ bool isInit() { return mInitialized; };
/// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture.
/// @return Draw pool, or NULL if not found.
@@ -171,19 +171,19 @@ public:
void doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderTarget& dest, LLRenderTarget* scratch_space = NULL);
void doOcclusion(LLCamera& camera);
void markNotCulled(LLSpatialGroup* group, LLCamera &camera);
- void markMoved(LLDrawable *drawablep, BOOL damped_motion = FALSE);
+ void markMoved(LLDrawable *drawablep, bool damped_motion = false);
void markShift(LLDrawable *drawablep);
void markTextured(LLDrawable *drawablep);
void markGLRebuild(LLGLUpdate* glu);
- void markRebuild(LLSpatialGroup* group, BOOL priority = FALSE);
- void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE);
+ void markRebuild(LLSpatialGroup* group, bool priority = false);
+ void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, bool priority = false);
void markPartitionMove(LLDrawable* drawablep);
void markMeshDirty(LLSpatialGroup* group);
//get the object between start and end that's closest to start.
LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
- BOOL pick_rigged,
+ bool pick_transparent,
+ bool pick_rigged,
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -197,7 +197,7 @@ public:
LLViewerObject* lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end,
- BOOL pick_transparent,
+ bool pick_transparent,
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@@ -212,20 +212,20 @@ public:
U32 addObject(LLViewerObject *obj);
- void enableShadows(const BOOL enable_shadows);
+ void enableShadows(const bool enable_shadows);
-// void setLocalLighting(const BOOL local_lighting);
-// BOOL isLocalLightingEnabled() const;
+// void setLocalLighting(const bool local_lighting);
+// bool isLocalLightingEnabled() const;
S32 setLightingDetail(S32 level);
S32 getLightingDetail() const { return mLightingDetail; }
S32 getMaxLightingDetail() const;
- void setUseVertexShaders(BOOL use_shaders);
- BOOL getUseVertexShaders() const { return mVertexShadersEnabled; }
- BOOL canUseVertexShaders();
- BOOL canUseWindLightShaders() const;
- BOOL canUseWindLightShadersOnObjects() const;
- BOOL canUseAntiAliasing() const;
+ void setUseVertexShaders(bool use_shaders);
+ bool getUseVertexShaders() const { return mVertexShadersEnabled; }
+ bool canUseVertexShaders();
+ bool canUseWindLightShaders() const;
+ bool canUseWindLightShadersOnObjects() const;
+ bool canUseAntiAliasing() const;
// phases
void resetFrameStats();
@@ -234,9 +234,9 @@ public:
void updateMoveNormalAsync(LLDrawable* drawablep);
void updateMovedList(LLDrawable::drawable_vector_t& move_list);
void updateMove();
- BOOL visibleObjectsInFrustum(LLCamera& camera);
- BOOL getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max);
- BOOL getVisiblePointCloud(LLCamera& camera, LLVector3 &min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir = LLVector3(0,0,0));
+ bool visibleObjectsInFrustum(LLCamera& camera);
+ bool getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max);
+ bool getVisiblePointCloud(LLCamera& camera, LLVector3 &min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir = LLVector3(0,0,0));
void updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip = 0, LLPlane* plane = NULL); //if water_clip is 0, ignore water plane, 1, cull to above plane, -1, cull to below plane
void createObjects(F32 max_dtime);
void createObject(LLViewerObject* vobj);
@@ -259,10 +259,10 @@ public:
void postSort(LLCamera& camera);
void forAllVisibleDrawables(void (*func)(LLDrawable*));
- void renderObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE);
- void renderMaskedObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE);
+ void renderObjects(U32 type, U32 mask, bool texture = true, bool batch_texture = false);
+ void renderMaskedObjects(U32 type, U32 mask, bool texture = true, bool batch_texture = false);
- void renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture);
+ void renderGroups(LLRenderPass* pass, U32 type, U32 mask, bool texture);
void grabReferences(LLCullResult& result);
void clearReferences();
@@ -274,7 +274,7 @@ public:
void checkReferences(LLSpatialGroup* group);
- void renderGeom(LLCamera& camera, BOOL forceVBOUpdate = FALSE);
+ void renderGeom(LLCamera& camera, bool forceVBOUpdate = false);
void renderGeomDeferred(LLCamera& camera);
void renderGeomPostDeferred(LLCamera& camera, bool do_occlusion=true);
void renderGeomShadow(LLCamera& camera);
@@ -292,7 +292,7 @@ public:
void setHighlightObject(LLDrawable* obj) { mHighlightObject = obj; }
- void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader, BOOL use_occlusion, U32 target_width);
+ void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, bool use_shader, bool use_occlusion, U32 target_width);
void renderHighlights();
void renderDebug();
void renderPhysicsDisplay();
@@ -300,13 +300,13 @@ public:
void rebuildPools(); // Rebuild pools
void findReferences(LLDrawable *drawablep); // Find the lists which have references to this object
- BOOL verify(); // Verify that all data in the pipeline is "correct"
+ bool verify(); // Verify that all data in the pipeline is "correct"
S32 getLightCount() const { return mLights.size(); }
void calcNearbyLights(LLCamera& camera);
void setupHWLights(LLDrawPool* pool);
- void setupAvatarLights(BOOL for_edit = FALSE);
+ void setupAvatarLights(bool for_edit = false);
void enableLights(U32 mask);
void enableLightsStatic();
void enableLightsDynamic();
@@ -318,9 +318,9 @@ public:
void shiftObjects(const LLVector3 &offset);
- void setLight(LLDrawable *drawablep, BOOL is_light);
+ void setLight(LLDrawable *drawablep, bool is_light);
- BOOL hasRenderBatches(const U32 type) const;
+ bool hasRenderBatches(const U32 type) const;
LLCullResult::drawinfo_iterator beginRenderMap(U32 type);
LLCullResult::drawinfo_iterator endRenderMap(U32 type);
LLCullResult::sg_iterator beginAlphaGroups();
@@ -329,15 +329,15 @@ public:
void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES);
- BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; }
- BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; }
+ bool hasRenderDebugFeatureMask(const U32 mask) const { return bool(mRenderDebugFeatureMask & mask); }
+ bool hasRenderDebugMask(const U32 mask) const { return bool(mRenderDebugMask & mask); }
void setAllRenderDebugFeatures() { mRenderDebugFeatureMask = 0xffffffff; }
void clearAllRenderDebugFeatures() { mRenderDebugFeatureMask = 0x0; }
void setAllRenderDebugDisplays() { mRenderDebugMask = 0xffffffff; }
void clearAllRenderDebugDisplays() { mRenderDebugMask = 0x0; }
- BOOL hasRenderType(const U32 type) const;
- BOOL hasAnyRenderType(const U32 type, ...) const;
+ bool hasRenderType(const U32 type) const;
+ bool hasAnyRenderType(const U32 type, ...) const;
void setRenderTypeMask(U32 type, ...);
// This is equivalent to 'setRenderTypeMask'
@@ -356,53 +356,53 @@ public:
static void toggleRenderType(U32 type);
// For UI control of render features
- static BOOL hasRenderTypeControl(void* data);
- static void toggleRenderDebug(void* data);
- static void toggleRenderDebugFeature(void* data);
- static void toggleRenderTypeControl(void* data);
- static BOOL toggleRenderTypeControlNegated(void* data);
- static BOOL toggleRenderDebugControl(void* data);
- static BOOL toggleRenderDebugFeatureControl(void* data);
+ static bool hasRenderTypeControl(U32 data);
+ static void toggleRenderDebug(U32 data);
+ static void toggleRenderDebugFeature(U32 data);
+ static void toggleRenderTypeControl(U32 data);
+ static bool toggleRenderTypeControlNegated(S32 data);
+ static bool toggleRenderDebugControl(U32 data);
+ static bool toggleRenderDebugFeatureControl(U32 data);
static void setRenderDebugFeatureControl(U32 bit, bool value);
- static void setRenderParticleBeacons(BOOL val);
- static void toggleRenderParticleBeacons(void* data);
- static BOOL getRenderParticleBeacons(void* data);
+ static void setRenderParticleBeacons(bool val);
+ static void toggleRenderParticleBeacons();
+ static bool getRenderParticleBeacons();
- static void setRenderSoundBeacons(BOOL val);
- static void toggleRenderSoundBeacons(void* data);
- static BOOL getRenderSoundBeacons(void* data);
+ static void setRenderSoundBeacons(bool val);
+ static void toggleRenderSoundBeacons();
+ static bool getRenderSoundBeacons();
- static void setRenderMOAPBeacons(BOOL val);
- static void toggleRenderMOAPBeacons(void * data);
- static BOOL getRenderMOAPBeacons(void * data);
+ static void setRenderMOAPBeacons(bool val);
+ static void toggleRenderMOAPBeacons();
+ static bool getRenderMOAPBeacons();
- static void setRenderPhysicalBeacons(BOOL val);
- static void toggleRenderPhysicalBeacons(void* data);
- static BOOL getRenderPhysicalBeacons(void* data);
+ static void setRenderPhysicalBeacons(bool val);
+ static void toggleRenderPhysicalBeacons();
+ static bool getRenderPhysicalBeacons();
- static void setRenderScriptedBeacons(BOOL val);
- static void toggleRenderScriptedBeacons(void* data);
- static BOOL getRenderScriptedBeacons(void* data);
+ static void setRenderScriptedBeacons(bool val);
+ static void toggleRenderScriptedBeacons();
+ static bool getRenderScriptedBeacons();
- static void setRenderScriptedTouchBeacons(BOOL val);
- static void toggleRenderScriptedTouchBeacons(void* data);
- static BOOL getRenderScriptedTouchBeacons(void* data);
+ static void setRenderScriptedTouchBeacons(bool val);
+ static void toggleRenderScriptedTouchBeacons();
+ static bool getRenderScriptedTouchBeacons();
- static void setRenderBeacons(BOOL val);
- static void toggleRenderBeacons(void* data);
- static BOOL getRenderBeacons(void* data);
+ static void setRenderBeacons(bool val);
+ static void toggleRenderBeacons();
+ static bool getRenderBeacons();
- static void setRenderHighlights(BOOL val);
- static void toggleRenderHighlights(void* data);
- static BOOL getRenderHighlights(void* data);
+ static void setRenderHighlights(bool val);
+ static void toggleRenderHighlights();
+ static bool getRenderHighlights();
static void setRenderHighlightTextureChannel(LLRender::eTexIndex channel); // sets which UV setup to display in highlight overlay
static void updateRenderBump();
static void updateRenderDeferred();
static void refreshCachedSettings();
- static void throttleNewMemoryAllocation(BOOL disable);
+ static void throttleNewMemoryAllocation(bool disable);
@@ -410,7 +410,7 @@ public:
void hidePermanentObjects( std::vector<U32>& restoreList );
void restorePermanentObjects( const std::vector<U32>& restoreList );
- void skipRenderingOfTerrain( BOOL flag );
+ void skipRenderingOfTerrain( bool flag );
void hideObject( const LLUUID& id );
void restoreHiddenObject( const LLUUID& id );
@@ -418,7 +418,7 @@ private:
void unloadShaders();
void addToQuickLookup( LLDrawPool* new_poolp );
void removeFromQuickLookup( LLDrawPool* poolp );
- BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority);
+ bool updateDrawableGeom(LLDrawable* drawable, bool priority);
void assertInitializedDoError();
bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; };
void connectRefreshCachedSettingsSafe(const std::string name);
@@ -539,12 +539,12 @@ public:
LLSpatialPartition* getSpatialPartition(LLViewerObject* vobj);
- void updateCamera(BOOL reset = FALSE);
+ void updateCamera(bool reset = false);
LLVector3 mFlyCamPosition;
LLQuaternion mFlyCamRotation;
- BOOL mBackfaceCull;
+ bool mBackfaceCull;
S32 mMatrixOpCount;
S32 mTextureMatrixOps;
S32 mNumVisibleNodes;
@@ -557,36 +557,36 @@ public:
static S32 sCompiles;
- static BOOL sShowHUDAttachments;
- static BOOL sForceOldBakedUpload; // If true will not use capabilities to upload baked textures.
+ static bool sShowHUDAttachments;
+ static bool sForceOldBakedUpload; // If true will not use capabilities to upload baked textures.
static S32 sUseOcclusion; // 0 = no occlusion, 1 = read only, 2 = read/write
- static BOOL sDelayVBUpdate;
- static BOOL sAutoMaskAlphaDeferred;
- static BOOL sAutoMaskAlphaNonDeferred;
- static BOOL sDisableShaders; // if TRUE, rendering will be done without shaders
- static BOOL sRenderBump;
- static BOOL sBakeSunlight;
- static BOOL sNoAlpha;
- static BOOL sUseTriStrips;
- static BOOL sUseFarClip;
- static BOOL sShadowRender;
- static BOOL sWaterReflections;
- static BOOL sDynamicLOD;
- static BOOL sPickAvatar;
- static BOOL sReflectionRender;
- static BOOL sImpostorRender;
- static BOOL sImpostorRenderAlphaDepthPass;
- static BOOL sUnderWaterRender;
- static BOOL sRenderGlow;
- static BOOL sTextureBindTest;
- static BOOL sRenderFrameTest;
- static BOOL sRenderAttachedLights;
- static BOOL sRenderAttachedParticles;
- static BOOL sRenderDeferred;
- static BOOL sMemAllocationThrottled;
+ static bool sDelayVBUpdate;
+ static bool sAutoMaskAlphaDeferred;
+ static bool sAutoMaskAlphaNonDeferred;
+ static bool sDisableShaders; // if true, rendering will be done without shaders
+ static bool sRenderBump;
+ static bool sBakeSunlight;
+ static bool sNoAlpha;
+ static bool sUseTriStrips;
+ static bool sUseFarClip;
+ static bool sShadowRender;
+ static bool sWaterReflections;
+ static bool sDynamicLOD;
+ static bool sPickAvatar;
+ static bool sReflectionRender;
+ static bool sImpostorRender;
+ static bool sImpostorRenderAlphaDepthPass;
+ static bool sUnderWaterRender;
+ static bool sRenderGlow;
+ static bool sTextureBindTest;
+ static bool sRenderFrameTest;
+ static bool sRenderAttachedLights;
+ static bool sRenderAttachedParticles;
+ static bool sRenderDeferred;
+ static bool sMemAllocationThrottled;
static S32 sVisibleLightCount;
static F32 sMinRenderSize;
- static BOOL sRenderingHUDs;
+ static bool sRenderingHUDs;
static LLTrace::EventStatHandle<S64> sStatBatchSize;
@@ -659,13 +659,13 @@ public:
LLVector3 mSunDir;
LLVector3 mTransformedSunDir;
- BOOL mInitialized;
- BOOL mVertexShadersEnabled;
+ bool mInitialized;
+ bool mVertexShadersEnabled;
S32 mVertexShadersLoaded; // 0 = no, 1 = yes, -1 = failed
U32 mTransformFeedbackPrimitives; //number of primitives expected to be generated by transform feedback
protected:
- BOOL mRenderTypeEnabled[NUM_RENDER_TYPES];
+ bool mRenderTypeEnabled[NUM_RENDER_TYPES];
std::stack<std::string> mRenderTypeEnableStack;
U32 mRenderDebugFeatureMask;
@@ -843,15 +843,15 @@ protected:
U32 mLightMovingMask;
S32 mLightingDetail;
- static BOOL sRenderPhysicalBeacons;
- static BOOL sRenderMOAPBeacons;
- static BOOL sRenderScriptedTouchBeacons;
- static BOOL sRenderScriptedBeacons;
- static BOOL sRenderParticleBeacons;
- static BOOL sRenderSoundBeacons;
+ static bool sRenderPhysicalBeacons;
+ static bool sRenderMOAPBeacons;
+ static bool sRenderScriptedTouchBeacons;
+ static bool sRenderScriptedBeacons;
+ static bool sRenderParticleBeacons;
+ static bool sRenderSoundBeacons;
public:
- static BOOL sRenderBeacons;
- static BOOL sRenderHighlight;
+ static bool sRenderBeacons;
+ static bool sRenderHighlight;
// Determines which set of UVs to use in highlight display
//
@@ -861,26 +861,26 @@ public:
static U32 sCurRenderPoolType ;
//cached settings
- static BOOL WindLightUseAtmosShaders;
- static BOOL VertexShaderEnable;
- static BOOL RenderAvatarVP;
- static BOOL RenderDeferred;
+ static bool WindLightUseAtmosShaders;
+ static bool VertexShaderEnable;
+ static bool RenderAvatarVP;
+ static bool RenderDeferred;
static F32 RenderDeferredSunWash;
static U32 RenderFSAASamples;
static U32 RenderResolutionDivisor;
- static BOOL RenderUIBuffer;
+ static bool RenderUIBuffer;
static S32 RenderShadowDetail;
- static BOOL RenderDeferredSSAO;
+ static bool RenderDeferredSSAO;
static F32 RenderShadowResolutionScale;
- static BOOL RenderLocalLights;
- static BOOL RenderDelayCreation;
- static BOOL RenderAnimateRes;
- static BOOL FreezeTime;
+ static bool RenderLocalLights;
+ static bool RenderDelayCreation;
+ static bool RenderAnimateRes;
+ static bool FreezeTime;
static S32 DebugBeaconLineWidth;
static F32 RenderHighlightBrightness;
static LLColor4 RenderHighlightColor;
static F32 RenderHighlightThickness;
- static BOOL RenderSpotLightsInNondeferred;
+ static bool RenderSpotLightsInNondeferred;
static LLColor4 PreviewAmbientColor;
static LLColor4 PreviewDiffuse0;
static LLColor4 PreviewSpecular0;
@@ -900,8 +900,8 @@ public:
static S32 RenderGlowIterations;
static F32 RenderGlowWidth;
static F32 RenderGlowStrength;
- static BOOL RenderDepthOfField;
- static BOOL RenderDepthOfFieldInEditMode;
+ static bool RenderDepthOfField;
+ static bool RenderDepthOfFieldInEditMode;
static F32 CameraFocusTransitionTime;
static F32 CameraFNumber;
static F32 CameraFocalLength;
@@ -922,7 +922,7 @@ public:
static F32 RenderEdgeNormCutoff;
static LLVector3 RenderShadowGaussian;
static F32 RenderShadowBlurDistFactor;
- static BOOL RenderDeferredAtmospheric;
+ static bool RenderDeferredAtmospheric;
static S32 RenderReflectionDetail;
static F32 RenderHighlightFadeTime;
static LLVector3 RenderShadowClipPlanes;
@@ -932,7 +932,7 @@ public:
static LLVector3 RenderShadowSplitExponent;
static F32 RenderShadowErrorCutoff;
static F32 RenderShadowFOVCutoff;
- static BOOL CameraOffset;
+ static bool CameraOffset;
static F32 CameraMaxCoF;
static F32 CameraDoFResScale;
static F32 RenderAutoHideSurfaceAreaLimit;
@@ -942,7 +942,7 @@ void render_bbox(const LLVector3 &min, const LLVector3 &max);
void render_hud_elements();
extern LLPipeline gPipeline;
-extern BOOL gDebugPipeline;
+extern bool gDebugPipeline;
extern const LLMatrix4* gGLLastMatrix;
#endif
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index a8049d874d..89c98a1cb3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -788,7 +788,7 @@ class DarwinManifest(ViewerManifest):
"libapr-1.0.dylib",
"libaprutil-1.0.dylib",
"libcollada14dom.dylib",
- "libexpat.1.5.2.dylib",
+ "libexpat.1.dylib",
"libexception_handler.dylib",
"libGLOD.dylib",
):
@@ -846,6 +846,16 @@ class DarwinManifest(ViewerManifest):
self.path2basename(relpkgdir, helperappfile)
pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework');
+ # Putting a Frameworks directory under Contents/MacOS
+ # isn't canonical, but the path baked into LLCefLib
+ # Helper.app/Contents/MacOS/LLCefLib Helper is:
+ # @executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
+ # (notice, not @executable_path/../Frameworks/etc.)
+ # So we'll create a symlink (below) from there back to the
+ # Frameworks directory nested under SLPlugin.app.
+ helperframeworkpath = \
+ self.dst_path_of('LLCefLib Helper.app/Contents/MacOS/'
+ 'Frameworks/Chromium Embedded Framework.framework')
self.end_prefix()
@@ -874,16 +884,36 @@ class DarwinManifest(ViewerManifest):
# this symlink, Second Life web media can't possibly work.
# Real Framework folder:
# Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/
- # Location of symlink and why it'ds relative
+ # Location of symlink and why it's relative
# Second Life.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/
# Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative)
# <top level>.app/Contents/Frameworks/Chromium Embedded Framework.framework/
# <top level>.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework ->
- frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks", "Chromium Embedded Framework.framework")
+ # It might seem simpler just to create a symlink Frameworks to
+ # the parent of Chromimum Embedded Framework.framework. But
+ # that would create a symlink cycle, which breaks our
+ # packaging step. So make a symlink from Chromium Embedded
+ # Framework.framework to the directory of the same name, which
+ # is NOT an ancestor of the symlink.
+ frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir,
+ os.pardir, "Frameworks",
+ "Chromium Embedded Framework.framework")
try:
- symlinkf(frameworkpath, pluginframeworkpath)
+ # from SLPlugin.app/Contents/Frameworks/Chromium Embedded
+ # Framework.framework back to Second
+ # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework
+ origin, target = pluginframeworkpath, frameworkpath
+ symlinkf(target, origin)
+ # from SLPlugin.app/Contents/Frameworks/LLCefLib
+ # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded
+ # Framework.framework back to
+ # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework
+ self.cmakedirs(os.path.dirname(helperframeworkpath))
+ origin = helperframeworkpath
+ target = os.path.join(os.pardir, frameworkpath)
+ symlinkf(target, origin)
except OSError as err:
- print "Can't symlink %s -> %s: %s" % (frameworkpath, pluginframeworkpath, err)
+ print "Can't symlink %s -> %s: %s" % (origin, target, err)
raise
self.end_prefix("Contents")
diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp
index 0f6436f0f4..2f027b688f 100644
--- a/indra/test/llstreamtools_tut.cpp
+++ b/indra/test/llstreamtools_tut.cpp
@@ -149,10 +149,9 @@ namespace tut
is.clear();
is.str(str = "# \r\n # SecondLife is a 3D World. ##");
- skip_comments_and_emptyspace(is);
- is.get(arr, 255, '\0');
- expected_result = "";
- ensure_equals("skip_comments_and_emptyspace: skip comment - 2", arr, expected_result);
+ ensure("should not be good()", ! skip_comments_and_emptyspace(is));
+ ensure("should be at eof()", is.eof());
+ // don't get(): given bad state, we can't rely on results
is.clear();
is.str(str = " \r\n SecondLife is a 3D World. ##");
@@ -164,14 +163,12 @@ namespace tut
is.clear();
is.str(str = "");
ret = skip_comments_and_emptyspace(is);
- is.get(arr, 255, '\0');
- ensure("skip_comments_and_emptyspace: empty string", ret == false);
+ ensure("skip_comments_and_emptyspace: empty string", ! ret);
is.clear();
is.str(str = " \r\n \t # SecondLife is a 3D World");
ret = skip_comments_and_emptyspace(is);
- is.get(arr, 255, '\0');
- ensure("skip_comments_and_emptyspace: space newline comment empty", ret == false);
+ ensure("skip_comments_and_emptyspace: space newline comment empty", ! ret);
}
//testcases for skip_line()