Merge branch 'master' of https://vcs.firestormviewer.org/viewer-merges/phoenix-firestorm-ll-master
commit
23cd48cce3
828
autobuild.xml
828
autobuild.xml
File diff suppressed because it is too large
Load Diff
|
|
@ -1115,16 +1115,18 @@ Nicky Dasmijn
|
|||
STORM-1937
|
||||
OPEN-187
|
||||
SL-15234
|
||||
STORM-2010
|
||||
STORM-2010
|
||||
STORM-2082
|
||||
MAINT-6665
|
||||
SL-10291
|
||||
SL-10293
|
||||
SL-11061
|
||||
SL-11072
|
||||
SL-11072
|
||||
SL-13141
|
||||
SL-13642
|
||||
SL-14541
|
||||
SL-16438
|
||||
SL-17218
|
||||
Nicky Perian
|
||||
OPEN-1
|
||||
STORM-1087
|
||||
|
|
|
|||
|
|
@ -136,6 +136,12 @@ if (LINUX)
|
|||
include(LLAppearanceUtility)
|
||||
add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
|
||||
endif (INSTALL_PROPRIETARY)
|
||||
add_dependencies(viewer linux-crash-logger-strip-target)
|
||||
elseif (WINDOWS)
|
||||
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
|
||||
if (EXISTS ${VIEWER_DIR}win_setup)
|
||||
add_subdirectory(${VIEWER_DIR}win_setup)
|
||||
endif (EXISTS ${VIEWER_DIR}win_setup)
|
||||
endif (LINUX)
|
||||
|
||||
if (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -251,9 +251,9 @@ if (DARWIN)
|
|||
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.
|
||||
## Really?? On developer machines too?
|
||||
##set(ENABLE_SIGNING TRUE)
|
||||
##set(SIGNING_IDENTITY "Developer ID Application: Phoenix Firestorm Project, Inc., The"")
|
||||
|
||||
set(ENABLE_SIGNING TRUE)
|
||||
set(SIGNING_IDENTITY "Developer ID Application: The Phoenix Firestorm Project, Inc." )
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
include(BerkeleyDB)
|
||||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
|
|
@ -49,7 +48,7 @@ else (USESYSTEMLIBS)
|
|||
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
|
||||
|
||||
if (LINUX)
|
||||
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid)
|
||||
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt)
|
||||
list(APPEND APRUTIL_LIBRARIES uuid)
|
||||
list(APPEND APRUTIL_LIBRARIES rt)
|
||||
endif (LINUX)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
set(DB_FIND_QUIETLY ON)
|
||||
set(DB_FIND_REQUIRED ON)
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindBerkeleyDB)
|
||||
else (USESYSTEMLIBS)
|
||||
if (LINUX)
|
||||
# Need to add dependency pthread explicitely to support ld.gold.
|
||||
# use_prebuilt_binary(db)
|
||||
# set(DB_LIBRARIES db-5.1 pthread)
|
||||
else (LINUX)
|
||||
# set(DB_LIBRARIES db-4.2)
|
||||
endif (LINUX)
|
||||
set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
|
@ -24,66 +24,33 @@ else (USESYSTEMLIBS)
|
|||
set(addrsfx "-x${ADDRESS_SIZE}")
|
||||
|
||||
if (WINDOWS)
|
||||
if(MSVC80)
|
||||
# This should be obsolete at this point
|
||||
set(BOOST_VERSION "1.55")
|
||||
set(BOOST_CONTEXT_LIBRARY
|
||||
optimized libboost_context-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_context-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_FILESYSTEM_LIBRARY
|
||||
optimized libboost_filesystem-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_filesystem-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_program_options-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
optimized libboost_regex-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_regex-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_SIGNALS_LIBRARY
|
||||
optimized libboost_signals-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_signals-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_SYSTEM_LIBRARY
|
||||
optimized libboost_system-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_system-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_THREAD_LIBRARY
|
||||
optimized libboost_thread-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_thread-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_WAVE_LIBRARY
|
||||
optimized libboost_wave-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_wave-vc80-mt-gd-${BOOST_VERSION})
|
||||
set(BOOST_THREAD_LIBRARY
|
||||
optimized libboost_thread-vc80-mt-${BOOST_VERSION}
|
||||
debug libboost_thread-vc80-mt-gd-${BOOST_VERSION})
|
||||
else(MSVC80)
|
||||
# MSVC 10.0 config
|
||||
set(BOOST_CONTEXT_LIBRARY
|
||||
optimized libboost_context-mt${addrsfx}
|
||||
debug libboost_context-mt${addrsfx}-gd)
|
||||
set(BOOST_FIBER_LIBRARY
|
||||
optimized libboost_fiber-mt${addrsfx}
|
||||
debug libboost_fiber-mt${addrsfx}-gd)
|
||||
set(BOOST_FILESYSTEM_LIBRARY
|
||||
optimized libboost_filesystem-mt${addrsfx}
|
||||
debug libboost_filesystem-mt${addrsfx}-gd)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-mt${addrsfx}
|
||||
debug libboost_program_options-mt${addrsfx}-gd)
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
optimized libboost_regex-mt${addrsfx}
|
||||
debug libboost_regex-mt${addrsfx}-gd)
|
||||
set(BOOST_SIGNALS_LIBRARY
|
||||
optimized libboost_signals-mt${addrsfx}
|
||||
debug libboost_signals-mt${addrsfx}-gd)
|
||||
set(BOOST_SYSTEM_LIBRARY
|
||||
optimized libboost_system-mt${addrsfx}
|
||||
debug libboost_system-mt${addrsfx}-gd)
|
||||
set(BOOST_THREAD_LIBRARY
|
||||
optimized libboost_thread-mt${addrsfx}
|
||||
debug libboost_thread-mt${addrsfx}-gd)
|
||||
set(BOOST_WAVE_LIBRARY
|
||||
optimized libboost_wave-mt${addrsfx}
|
||||
debug libboost_wave-mt${addrsfx}-gd)
|
||||
endif (MSVC80)
|
||||
set(BOOST_CONTEXT_LIBRARY
|
||||
optimized libboost_context-mt${addrsfx}
|
||||
debug libboost_context-mt${addrsfx}-gd)
|
||||
set(BOOST_FIBER_LIBRARY
|
||||
optimized libboost_fiber-mt${addrsfx}
|
||||
debug libboost_fiber-mt${addrsfx}-gd)
|
||||
set(BOOST_FILESYSTEM_LIBRARY
|
||||
optimized libboost_filesystem-mt${addrsfx}
|
||||
debug libboost_filesystem-mt${addrsfx}-gd)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-mt${addrsfx}
|
||||
debug libboost_program_options-mt${addrsfx}-gd)
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
optimized libboost_regex-mt${addrsfx}
|
||||
debug libboost_regex-mt${addrsfx}-gd)
|
||||
set(BOOST_SIGNALS_LIBRARY
|
||||
optimized libboost_signals-mt${addrsfx}
|
||||
debug libboost_signals-mt${addrsfx}-gd)
|
||||
set(BOOST_SYSTEM_LIBRARY
|
||||
optimized libboost_system-mt${addrsfx}
|
||||
debug libboost_system-mt${addrsfx}-gd)
|
||||
set(BOOST_THREAD_LIBRARY
|
||||
optimized libboost_thread-mt${addrsfx}
|
||||
debug libboost_thread-mt${addrsfx}-gd)
|
||||
set(BOOST_WAVE_LIBRARY
|
||||
optimized libboost_wave-mt${addrsfx}
|
||||
debug libboost_wave-mt${addrsfx}-gd)
|
||||
elseif (LINUX)
|
||||
set(BOOST_CONTEXT_LIBRARY
|
||||
optimized boost_context-mt${addrsfx}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ set(cmake_SOURCE_FILES
|
|||
00-Common.cmake
|
||||
APR.cmake
|
||||
Audio.cmake
|
||||
BerkeleyDB.cmake
|
||||
Boost.cmake
|
||||
bugsplat.cmake
|
||||
BuildVersion.cmake
|
||||
|
|
@ -27,7 +26,6 @@ set(cmake_SOURCE_FILES
|
|||
EXPAT.cmake
|
||||
FindAPR.cmake
|
||||
FindAutobuild.cmake
|
||||
FindBerkeleyDB.cmake
|
||||
FindFMODSTUDIO.cmake
|
||||
FindGLH.cmake
|
||||
FindHUNSPELL.cmake
|
||||
|
|
@ -37,7 +35,7 @@ set(cmake_SOURCE_FILES
|
|||
FindSCP.cmake
|
||||
FindURIPARSER.cmake
|
||||
FindXmlRpcEpi.cmake
|
||||
FindZLIB.cmake
|
||||
FindZLIBNG.cmake
|
||||
FMODSTUDIO.cmake
|
||||
FreeType.cmake
|
||||
GLEXT.cmake
|
||||
|
|
@ -97,7 +95,7 @@ set(cmake_SOURCE_FILES
|
|||
VisualLeakDetector.cmake
|
||||
LibVLCPlugin.cmake
|
||||
XmlRpcEpi.cmake
|
||||
ZLIB.cmake
|
||||
ZLIBNG.cmake
|
||||
)
|
||||
|
||||
source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
# - Find BerkeleyDB
|
||||
# Find the BerkeleyDB includes and library
|
||||
# This module defines
|
||||
# DB_INCLUDE_DIR, where to find db.h, etc.
|
||||
# DB_LIBRARIES, the libraries needed to use BerkeleyDB.
|
||||
# DB_FOUND, If false, do not try to use BerkeleyDB.
|
||||
# also defined, but not for general use are
|
||||
# DB_LIBRARY, where to find the BerkeleyDB library.
|
||||
|
||||
FIND_PATH(DB_INCLUDE_DIR db.h
|
||||
/usr/local/include/db4
|
||||
/usr/local/include
|
||||
/usr/include/db4
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(DB_NAMES ${DB_NAMES} db)
|
||||
FIND_LIBRARY(DB_LIBRARY
|
||||
NAMES ${DB_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
|
||||
IF (DB_LIBRARY AND DB_INCLUDE_DIR)
|
||||
SET(DB_LIBRARIES ${DB_LIBRARY})
|
||||
SET(DB_FOUND "YES")
|
||||
ELSE (DB_LIBRARY AND DB_INCLUDE_DIR)
|
||||
SET(DB_FOUND "NO")
|
||||
ENDIF (DB_LIBRARY AND DB_INCLUDE_DIR)
|
||||
|
||||
|
||||
IF (DB_FOUND)
|
||||
IF (NOT DB_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found BerkeleyDB: ${DB_LIBRARIES}")
|
||||
ENDIF (NOT DB_FIND_QUIETLY)
|
||||
ELSE (DB_FOUND)
|
||||
IF (DB_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find BerkeleyDB library")
|
||||
ENDIF (DB_FIND_REQUIRED)
|
||||
ENDIF (DB_FOUND)
|
||||
|
||||
# Deprecated declarations.
|
||||
SET (NATIVE_DB_INCLUDE_PATH ${DB_INCLUDE_DIR} )
|
||||
GET_FILENAME_COMPONENT (NATIVE_DB_LIB_PATH ${DB_LIBRARY} PATH)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
DB_LIBRARY
|
||||
DB_INCLUDE_DIR
|
||||
)
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
# - Find zlib
|
||||
# Find the ZLIB includes and library
|
||||
# This module defines
|
||||
# ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
|
||||
# ZLIB_LIBRARIES, the libraries needed to use zlib.
|
||||
# ZLIB_FOUND, If false, do not try to use zlib.
|
||||
#
|
||||
# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
|
||||
# because it doesn't look up the version of zlib, resulting in a dramatic
|
||||
# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
|
||||
#
|
||||
# Note: Since this file is only used for standalone, the windows
|
||||
# specific parts were left out.
|
||||
|
||||
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ZLIB_LIBRARY z)
|
||||
|
||||
if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||
SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||
SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
SET(ZLIB_FOUND "YES")
|
||||
else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||
SET(ZLIB_FOUND "NO")
|
||||
endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
if (NOT ZLIB_FIND_QUIETLY)
|
||||
message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
|
||||
SET(ZLIB_FIND_QUIETLY TRUE)
|
||||
endif (NOT ZLIB_FIND_QUIETLY)
|
||||
else (ZLIB_FOUND)
|
||||
if (ZLIB_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find ZLIB library")
|
||||
endif (ZLIB_FIND_REQUIRED)
|
||||
endif (ZLIB_FOUND)
|
||||
|
||||
mark_as_advanced(
|
||||
ZLIB_LIBRARY
|
||||
ZLIB_INCLUDE_DIR
|
||||
)
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
# - Find zlib-ng
|
||||
# Find the ZLIB includes and library
|
||||
# This module defines
|
||||
# ZLIBNG_INCLUDE_DIRS, where to find zlib.h, etc.
|
||||
# ZLIBNG_LIBRARIES, the libraries needed to use zlib.
|
||||
# ZLIBNG_FOUND, If false, do not try to use zlib.
|
||||
#
|
||||
# This FindZLIBNG is about 43 times as fast the one provided with cmake (2.8.x),
|
||||
# because it doesn't look up the version of zlib, resulting in a dramatic
|
||||
# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
|
||||
#
|
||||
# Note: Since this file is only used for standalone, the windows
|
||||
# specific parts were left out.
|
||||
|
||||
FIND_PATH(ZLIBNG_INCLUDE_DIR zlib.h
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ZLIBNG_LIBRARY z)
|
||||
|
||||
if (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
|
||||
SET(ZLIBNG_INCLUDE_DIRS ${ZLIBNG_INCLUDE_DIR})
|
||||
SET(ZLIBNG_LIBRARIES ${ZLIBNG_LIBRARY})
|
||||
SET(ZLIBNG_FOUND "YES")
|
||||
else (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
|
||||
SET(ZLIBNG_FOUND "NO")
|
||||
endif (ZLINGB_LIBRARY AND ZLIBNG_INCLUDE_DIR)
|
||||
|
||||
if (ZLIBNG_FOUND)
|
||||
if (NOT ZLIBNG_FIND_QUIETLY)
|
||||
message(STATUS "Found ZLIBNG: ${ZLIBNG_LIBRARIES}")
|
||||
SET(ZLIBNG_FIND_QUIETLY TRUE)
|
||||
endif (NOT ZLIBNG_FIND_QUIETLY)
|
||||
else (ZLIBNG_FOUND)
|
||||
if (ZLIBNG_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find ZLIBNG library")
|
||||
endif (ZLIBNG_FIND_REQUIRED)
|
||||
endif (ZLIBNG_FOUND)
|
||||
|
||||
mark_as_advanced(
|
||||
ZLIBNG_LIBRARY
|
||||
ZLIBNG_INCLUDE_DIR
|
||||
)
|
||||
|
||||
|
|
@ -10,5 +10,3 @@ if (INSTALL_PROPRIETARY)
|
|||
set(LLAPPEARANCEUTILITY_BIN_DIR ${CMAKE_BINARY_DIR}/llappearanceutility)
|
||||
endif (LINUX)
|
||||
endif (INSTALL_PROPRIETARY)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,22 +3,15 @@
|
|||
include(APR)
|
||||
include(Boost)
|
||||
include(EXPAT)
|
||||
include(ZLIB)
|
||||
include(Tracy) # <FS:Beq> Tracy profiler
|
||||
include(Tracy)
|
||||
include(ZLIBNG)
|
||||
|
||||
# <FS:Beq> Add Tracy profiler support
|
||||
#set(LLCOMMON_INCLUDE_DIRS
|
||||
# ${LIBS_OPEN_DIR}/llcommon
|
||||
# ${APRUTIL_INCLUDE_DIR}
|
||||
# ${APR_INCLUDE_DIR}
|
||||
# )
|
||||
set(LLCOMMON_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llcommon
|
||||
${APRUTIL_INCLUDE_DIR}
|
||||
${APR_INCLUDE_DIR}
|
||||
${TRACY_INCLUDE_DIR}
|
||||
)
|
||||
# </FS:Beq>
|
||||
set(LLCOMMON_SYSTEM_INCLUDE_DIRS
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ include(Prebuilt)
|
|||
include(Boost)
|
||||
|
||||
use_prebuilt_binary(colladadom)
|
||||
use_prebuilt_binary(minizip-ng) # needed for colladadom
|
||||
use_prebuilt_binary(pcre)
|
||||
use_prebuilt_binary(libxml2)
|
||||
|
||||
|
|
@ -22,6 +23,8 @@ if (WINDOWS)
|
|||
optimized pcrecpp
|
||||
debug pcred
|
||||
optimized pcre
|
||||
debug libminizip
|
||||
optimized libminizip
|
||||
${BOOST_SYSTEM_LIBRARIES}
|
||||
)
|
||||
elseif (DARWIN)
|
||||
|
|
@ -29,7 +32,7 @@ elseif (DARWIN)
|
|||
llprimitive
|
||||
debug collada14dom-d
|
||||
optimized collada14dom
|
||||
minizip
|
||||
minizip # for collada libminizip.a
|
||||
xml2
|
||||
pcrecpp
|
||||
pcre
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(ZLIB_FIND_QUIETLY ON)
|
||||
set(ZLIB_FIND_REQUIRED ON)
|
||||
set(ZLIBNG_FIND_QUIETLY ON)
|
||||
set(ZLIBNG_FIND_REQUIRED ON)
|
||||
|
||||
include(Prebuilt)
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindZLIB)
|
||||
include(FindZLIBNG)
|
||||
else (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(zlib)
|
||||
use_prebuilt_binary(zlib-ng)
|
||||
if (WINDOWS)
|
||||
set(ZLIB_LIBRARIES
|
||||
debug zlibd
|
||||
set(ZLIBNG_LIBRARIES
|
||||
debug zlib
|
||||
optimized zlib)
|
||||
elseif (LINUX)
|
||||
#
|
||||
|
|
@ -26,12 +26,12 @@ else (USESYSTEMLIBS)
|
|||
# second whole-archive load of the archive. See viewer's
|
||||
# CMakeLists.txt for more information.
|
||||
#
|
||||
set(ZLIB_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive)
|
||||
set(ZLIB_LIBRARIES z)
|
||||
set(ZLIBNG_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive)
|
||||
set(ZLIBNG_LIBRARIES z)
|
||||
elseif (DARWIN)
|
||||
set(ZLIB_LIBRARIES z)
|
||||
set(ZLIBNG_LIBRARIES z)
|
||||
endif (WINDOWS)
|
||||
if (WINDOWS OR LINUX)
|
||||
set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib)
|
||||
set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng)
|
||||
endif (WINDOWS OR LINUX)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
|
@ -83,9 +83,7 @@ def proper_windows_path(path, current_platform = sys.platform):
|
|||
return drive_letter.upper() + ':\\' + rel.replace('/', '\\')
|
||||
|
||||
def get_default_platform(dummy):
|
||||
return {'linux2':'linux',
|
||||
'linux1':'linux',
|
||||
'linux':'linux',
|
||||
return {'linux':'linux',
|
||||
'cygwin':'windows',
|
||||
'win32':'windows',
|
||||
'darwin':'darwin'
|
||||
|
|
|
|||
|
|
@ -453,32 +453,6 @@ const std::string LLTexLayerSet::getBodyRegionName() const
|
|||
return mInfo->mBodyRegion;
|
||||
}
|
||||
|
||||
|
||||
// virtual
|
||||
void LLTexLayerSet::asLLSD(LLSD& sd) const
|
||||
{
|
||||
sd["visible"] = LLSD::Boolean(isVisible());
|
||||
LLSD layer_list_sd;
|
||||
layer_list_t::const_iterator layer_iter = mLayerList.begin();
|
||||
layer_list_t::const_iterator layer_end = mLayerList.end();
|
||||
for(; layer_iter != layer_end; ++layer_iter)
|
||||
{
|
||||
LLSD layer_sd;
|
||||
//LLTexLayerInterface* layer = (*layer_iter);
|
||||
//if (layer)
|
||||
//{
|
||||
// layer->asLLSD(layer_sd);
|
||||
//}
|
||||
layer_list_sd.append(layer_sd);
|
||||
}
|
||||
LLSD mask_list_sd;
|
||||
LLSD info_sd;
|
||||
sd["layers"] = layer_list_sd;
|
||||
sd["masks"] = mask_list_sd;
|
||||
sd["info"] = info_sd;
|
||||
}
|
||||
|
||||
|
||||
void LLTexLayerSet::destroyComposite()
|
||||
{
|
||||
if( mComposite )
|
||||
|
|
|
|||
|
|
@ -220,8 +220,6 @@ public:
|
|||
|
||||
static BOOL sHasCaches;
|
||||
|
||||
virtual void asLLSD(LLSD& sd) const;
|
||||
|
||||
protected:
|
||||
typedef std::vector<LLTexLayerInterface *> layer_list_t;
|
||||
layer_list_t mLayerList;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ include(Boost)
|
|||
include(LLSharedLibs)
|
||||
include(JsonCpp)
|
||||
include(Copy3rdPartyLibs)
|
||||
include(ZLIB)
|
||||
include(ZLIBNG)
|
||||
include(URIPARSER)
|
||||
include(Tracy)
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ include_directories( SYSTEM
|
|||
${EXPAT_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${JSONCPP_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${ZLIBNG_INCLUDE_DIRS}
|
||||
${URIPARSER_INCLUDE_DIRS}
|
||||
${TRACY_INCLUDE_DIR}
|
||||
)
|
||||
|
|
@ -129,6 +129,7 @@ set(llcommon_HEADER_FILES
|
|||
CMakeLists.txt
|
||||
|
||||
chrono.h
|
||||
classic_callback.h
|
||||
ctype_workaround.h
|
||||
fix_macros.h
|
||||
indra_constants.h
|
||||
|
|
@ -339,7 +340,7 @@ target_link_libraries(
|
|||
${APR_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
${JSONCPP_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${ZLIBNG_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${BOOST_FIBER_LIBRARY}
|
||||
${BOOST_CONTEXT_LIBRARY}
|
||||
|
|
@ -375,16 +376,17 @@ if (LL_TESTS)
|
|||
${BOOST_CONTEXT_LIBRARY}
|
||||
${BOOST_THREAD_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY})
|
||||
LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llbase64 "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llcond "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lldate "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lldeadmantimer "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lldependencies "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llerror "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lleventcoro "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lleventfilter "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llheteromap "" "${test_libs}")
|
||||
|
|
@ -402,8 +404,8 @@ if (LL_TESTS)
|
|||
LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lltrace "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(llunits "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(stringize "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(threadsafeschedule "" "${test_libs}")
|
||||
LL_ADD_INTEGRATION_TEST(tuple "" "${test_libs}")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* @file classic_callback.cpp
|
||||
* @author Nat Goodspeed
|
||||
* @date 2021-09-23
|
||||
* @brief Implementation for classic_callback.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2021&license=viewerlgpl$
|
||||
* Copyright (c) 2021, Linden Research, Inc.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
namespace {
|
||||
|
||||
const char dummy[] = "cpp file required to build test program";
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
@ -0,0 +1,292 @@
|
|||
/**
|
||||
* @file classic_callback.h
|
||||
* @author Nat Goodspeed
|
||||
* @date 2016-06-21
|
||||
* @brief ClassicCallback and HeapClassicCallback
|
||||
*
|
||||
* This header file addresses the problem of passing a method on a C++ object
|
||||
* to an API that requires a classic-C function pointer. Typically such a
|
||||
* callback API accepts a void* pointer along with the function pointer, and
|
||||
* the function pointer signature accepts a void* parameter. The API passes
|
||||
* the caller's pointer value into the callback function so it can find its
|
||||
* data. In C++, there are a few ways to deal with this case:
|
||||
*
|
||||
* - Use a static method with correct signature. If you don't need access to a
|
||||
* specific instance, that works fine.
|
||||
* - Store the object statically (or store a static pointer to a non-static
|
||||
* instance). As long as you only care about one instance, that works, but
|
||||
* starts to get a little icky. As soon as there's more than one pertinent
|
||||
* instance, fight valiantly against the temptation to stuff the instance
|
||||
* pointer into a static pointer variable "just for a moment."
|
||||
* - Code a static trampoline callback function that accepts the void* user
|
||||
* data pointer, casts it to the appropriate class type and calls the actual
|
||||
* method on that class.
|
||||
*
|
||||
* ClassicCallback encapsulates the last. You need only construct a
|
||||
* ClassicCallback instance somewhere that will survive until the callback is
|
||||
* called, binding the target C++ callable. You then call its get_callback()
|
||||
* and get_userdata() methods to pass an appropriate classic-C function
|
||||
* pointer and void* user data pointer, respectively, to the old-style
|
||||
* callback API. get_callback() synthesizes a static trampoline function
|
||||
* that casts the user data pointer and calls the bound C++ callable.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2016&license=viewerlgpl$
|
||||
* Copyright (c) 2016, Linden Research, Inc.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#if ! defined(LL_CLASSIC_CALLBACK_H)
|
||||
#define LL_CLASSIC_CALLBACK_H
|
||||
|
||||
#include <tuple>
|
||||
#include <type_traits> // std::is_same
|
||||
|
||||
/*****************************************************************************
|
||||
* Helpers
|
||||
*****************************************************************************/
|
||||
|
||||
// find a type in a parameter pack: http://stackoverflow.com/q/17844867/5533635
|
||||
// usage: index_of<0, sought_t, PackName...>::value
|
||||
template <int idx, typename sought, typename candidate, typename ...rest>
|
||||
struct index_of
|
||||
{
|
||||
static constexpr int const value =
|
||||
std::is_same<sought, candidate>::value ?
|
||||
idx : index_of<idx + 1, sought, rest...>::value;
|
||||
};
|
||||
|
||||
// recursion tail
|
||||
template <int idx, typename sought, typename candidate>
|
||||
struct index_of<idx, sought, candidate>
|
||||
{
|
||||
static constexpr int const value =
|
||||
std::is_same<sought, candidate>::value ? idx : -1;
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
* ClassicCallback
|
||||
*****************************************************************************/
|
||||
/**
|
||||
* Instantiate ClassicCallback in whatever storage will persist long enough
|
||||
* for the callback to be called. It holds a modern C++ callable, providing a
|
||||
* static function pointer and a USERDATA (default void*) capable of being
|
||||
* passed through a classic-C callback API. When the static function is called
|
||||
* with that USERDATA pointer, ClassicCallback forwards the call to the bound
|
||||
* C++ callable.
|
||||
*
|
||||
* Usage:
|
||||
* @code
|
||||
* // callback signature required by the API of interest
|
||||
* typedef void (*callback_t)(int, const char*, void*, double);
|
||||
* // old-style API that accepts a classic-C callback function pointer
|
||||
* void oldAPI(callback_t callback, void* userdata);
|
||||
* // but I want to pass a lambda that references data local to my function!
|
||||
* // (We don't need to name the void* parameter in the C++ callable;
|
||||
* // ClassicCallback already used it to locate the lambda instance.)
|
||||
* auto ccb{
|
||||
* makeClassicCallback<callback_t>(
|
||||
* [=](int n, const char* s, void*, double f){ ... }) };
|
||||
* oldAPI(ccb.get_callback(), ccb.get_userdata());
|
||||
* // If the passed callback is called before oldAPI() returns, we can now
|
||||
* // safely destroy ccb. If the callback might be called later, consider
|
||||
* // HeapClassicCallback instead.
|
||||
* @endcode
|
||||
*
|
||||
* If you have a callable object in hand, and you want to pass that to
|
||||
* ClassicCallback, you may either consume it by passing std::move(object), or
|
||||
* explicitly specify a reference to that object type as the CALLABLE template
|
||||
* parameter:
|
||||
* @code
|
||||
* CallableObject obj;
|
||||
* ClassicCallback<callback_t, void*, CallableObject&> ccb{obj};
|
||||
* @endcode
|
||||
*/
|
||||
// CALLABLE should either be deduced, e.g. by makeClassicCallback(), or
|
||||
// specified explicitly. Its default type is meaningless, coded only so we can
|
||||
// provide a useful default for USERDATA.
|
||||
template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
|
||||
class ClassicCallback
|
||||
{
|
||||
typedef ClassicCallback<SIGNATURE, USERDATA, CALLABLE> self_t;
|
||||
|
||||
public:
|
||||
/// ClassicCallback binds any modern C++ callable.
|
||||
ClassicCallback(CALLABLE&& callable):
|
||||
mCallable(std::forward<CALLABLE>(callable))
|
||||
{}
|
||||
|
||||
/**
|
||||
* ClassicCallback must not itself be copied or moved! Once you've passed
|
||||
* get_userdata() to some API, this object MUST remain at that address.
|
||||
*/
|
||||
// However, we can't yet count on C++17 Class Template Argument Deduction,
|
||||
// which means makeClassicCallback() is still useful, which means we MUST
|
||||
// be able to return one to construct into caller's instance (move ctor).
|
||||
// Possible defense: bool 'referenced' data member set by get_userdata(),
|
||||
// with an llassert_always(! referenced) check in the move constructor.
|
||||
ClassicCallback(ClassicCallback const&) = delete;
|
||||
ClassicCallback(ClassicCallback&&) = default; // delete;
|
||||
ClassicCallback& operator=(ClassicCallback const&) = delete;
|
||||
ClassicCallback& operator=(ClassicCallback&&) = delete;
|
||||
|
||||
/// Call get_callback() to get the necessary function pointer.
|
||||
SIGNATURE get_callback() const
|
||||
{
|
||||
// This declaration is where the compiler instantiates the correct
|
||||
// signature for the call() function template.
|
||||
SIGNATURE callback = call;
|
||||
return callback;
|
||||
}
|
||||
|
||||
/// Call get_userdata() to get the opaque USERDATA pointer to pass
|
||||
/// through the classic-C callback API.
|
||||
USERDATA get_userdata() const
|
||||
{
|
||||
// The USERDATA userdata is of course a pointer to this object.
|
||||
return static_cast<USERDATA>(const_cast<self_t*>(this));
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* This call() method accepts one or more callback arguments. It assumes
|
||||
* the first USERDATA parameter is the userdata.
|
||||
*/
|
||||
// Note that we're not literally using C++ perfect forwarding here -- it
|
||||
// doesn't work to specify (Args&&... args). But that's okay because we're
|
||||
// dealing with a classic-C callback! It's not going to pass any move-only
|
||||
// types.
|
||||
template <typename... Args>
|
||||
static auto call(Args... args)
|
||||
{
|
||||
auto userdata = extract_userdata(std::forward<Args>(args)...);
|
||||
// cast the userdata param to 'this' and call mCallable
|
||||
return static_cast<self_t*>(userdata)->
|
||||
mCallable(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
static USERDATA extract_userdata(Args... args)
|
||||
{
|
||||
// Search for the first USERDATA parameter type, then extract that pointer.
|
||||
// extract value from parameter pack: http://stackoverflow.com/a/24710433/5533635
|
||||
return std::get<index_of<0, USERDATA, Args...>::value>(std::forward_as_tuple(args...));
|
||||
}
|
||||
|
||||
CALLABLE mCallable;
|
||||
};
|
||||
|
||||
/**
|
||||
* Usage:
|
||||
* @code
|
||||
* auto ccb{ makeClassicCallback<classic_callback_signature>(actual_callback) };
|
||||
* @endcode
|
||||
*/
|
||||
template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
|
||||
auto makeClassicCallback(CALLABLE&& callable)
|
||||
{
|
||||
return std::move(ClassicCallback<SIGNATURE, USERDATA, CALLABLE>
|
||||
(std::forward<CALLABLE>(callable)));
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* HeapClassicCallback
|
||||
*****************************************************************************/
|
||||
/**
|
||||
* HeapClassicCallback is like ClassicCallback, with this exception: it MUST
|
||||
* be allocated on the heap because, once the callback has been called, it
|
||||
* deletes itself. This addresses the problem of a callback whose lifespan
|
||||
* must persist beyond the scope in which the callback API is engaged -- but
|
||||
* naturally this callback must be called exactly ONCE.
|
||||
*
|
||||
* Usage:
|
||||
* @code
|
||||
* // callback signature required by the API of interest
|
||||
* typedef void (*callback_t)(int, const char*, void*, double);
|
||||
* // here's the old-style API
|
||||
* void oldAPI(callback_t callback, void* userdata);
|
||||
* // want to call someObjPtr->method() when oldAPI() fires the callback,
|
||||
* // sometime in the future after the enclosing function has returned
|
||||
* auto ccb{
|
||||
* makeHeapClassicCallback<callback_t>(
|
||||
* [someObjPtr](int n, const char* s, void*, double f)
|
||||
* { someObjPtr->method(); }) };
|
||||
* oldAPI(ccb.get_callback(), ccb.get_userdata());
|
||||
* // We don't need a smart pointer for ccb, because it will be deleted once
|
||||
* // oldAPI() calls the bound lambda. HeapClassicCallback is for when the
|
||||
* // callback will be called exactly once. If the classic API might call the
|
||||
* // passed callback more than once -- or might never call it at all --
|
||||
* // manually construct a ClassicCallback on the heap and manage its lifespan
|
||||
* // explicitly.
|
||||
* @endcode
|
||||
*/
|
||||
template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
|
||||
class HeapClassicCallback: public ClassicCallback<SIGNATURE, USERDATA, CALLABLE>
|
||||
{
|
||||
typedef ClassicCallback<SIGNATURE, USERDATA, CALLABLE> super;
|
||||
typedef HeapClassicCallback<SIGNATURE, USERDATA, CALLABLE> self_t;
|
||||
|
||||
// This destructor is intentionally private to prevent allocation anywhere
|
||||
// but the heap. (The Design and Evolution of C++, section 11.4.2: Control
|
||||
// of Allocation)
|
||||
~HeapClassicCallback() {}
|
||||
|
||||
public:
|
||||
HeapClassicCallback(CALLABLE&& callable):
|
||||
super(std::forward<CALLABLE>(callable))
|
||||
{}
|
||||
|
||||
// makeHeapClassicCallback() only needs to return a pointer -- not an
|
||||
// instance -- so we can lock down our move constructor too.
|
||||
HeapClassicCallback(HeapClassicCallback&&) = delete;
|
||||
|
||||
/// Replicate get_callback() from the base class because we must
|
||||
/// instantiate OUR call() function template.
|
||||
SIGNATURE get_callback() const
|
||||
{
|
||||
// This declaration is where the compiler instantiates the correct
|
||||
// signature for the call() function template.
|
||||
SIGNATURE callback = call;
|
||||
return callback;
|
||||
}
|
||||
|
||||
/// Replicate get_userdata() from the base class because our call()
|
||||
/// method must be able to reconstitute a pointer to this subclass.
|
||||
USERDATA get_userdata() const
|
||||
{
|
||||
// The USERDATA userdata is of course a pointer to this object.
|
||||
return static_cast<const USERDATA>(const_cast<self_t*>(this));
|
||||
}
|
||||
|
||||
private:
|
||||
// call() uses a helper class to delete the HeapClassicCallback when done,
|
||||
// for two reasons. Most importantly, this deletes even if the callback
|
||||
// throws an exception. But also, call() must directly return the callback
|
||||
// result for return-type deduction.
|
||||
struct Destroyer
|
||||
{
|
||||
Destroyer(self_t* p): mPtr(p) {}
|
||||
~Destroyer() { delete mPtr; }
|
||||
|
||||
self_t* mPtr;
|
||||
};
|
||||
|
||||
template <typename... Args>
|
||||
static auto call(Args... args)
|
||||
{
|
||||
// extract userdata at this level too
|
||||
USERDATA userdata = super::extract_userdata(std::forward<Args>(args)...);
|
||||
// arrange to delete it when we leave by whatever means
|
||||
Destroyer destroy(static_cast<self_t*>(userdata));
|
||||
|
||||
return super::call(std::forward<Args>(args)...);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()>
|
||||
auto makeHeapClassicCallback(CALLABLE&& callable)
|
||||
{
|
||||
return new HeapClassicCallback<SIGNATURE, USERDATA, CALLABLE>
|
||||
(std::forward<CALLABLE>(callable));
|
||||
}
|
||||
|
||||
#endif /* ! defined(LL_CLASSIC_CALLBACK_H) */
|
||||
|
|
@ -28,7 +28,8 @@
|
|||
#define LL_LINDEN_COMMON_H
|
||||
|
||||
#include "llprofiler.h"
|
||||
#if TRACY_ENABLE // hooks for memory profiling
|
||||
// <FS:Beq/> #if (TRACY_ENABLE)
|
||||
#if (TRACY_ENABLE) && LL_PROFILER_ENABLE_TRACY_MEMORY
|
||||
void *tracy_aligned_malloc(size_t size, size_t alignment);
|
||||
void tracy_aligned_free(void *memblock);
|
||||
#define _aligned_malloc(X, Y) tracy_aligned_malloc((X), (Y))
|
||||
|
|
|
|||
|
|
@ -74,7 +74,14 @@
|
|||
#define LL_PROFILER_CONFIGURATION LL_PROFILER_CONFIG_FAST_TIMER
|
||||
#endif
|
||||
|
||||
extern thread_local bool gProfilerEnabled;
|
||||
extern thread_local bool gProfilerEnabled; // <FS:Beq/> This is being used to control memory allocations
|
||||
// <FS:Beq> We use the active flag to control deferred profiling.
|
||||
// It is functionally separate to the (poorly named) gProfilerEnabled flag
|
||||
namespace LLProfiler
|
||||
{
|
||||
extern bool active;
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
#if defined(LL_PROFILER_CONFIGURATION) && (LL_PROFILER_CONFIGURATION > LL_PROFILER_CONFIG_NONE)
|
||||
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY || LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY_FAST_TIMER
|
||||
|
|
@ -88,27 +95,29 @@ extern thread_local bool gProfilerEnabled;
|
|||
// <FS:Beq> Fixed mutual exclusion issues with RAM and GPU. NOTE: This might still break on Apple in which case we'll need to restrict that platform
|
||||
//// GPU Mutually exclusive with detailed memory tracing
|
||||
// #define LL_PROFILER_ENABLE_TRACY_OPENGL 0
|
||||
#define LL_PROFILER_ENABLE_TRACY_MEMORY 1
|
||||
#define LL_PROFILER_ENABLE_TRACY_MEMORY 0
|
||||
#define LL_PROFILER_ENABLE_TRACY_OPENGL 1
|
||||
#endif
|
||||
|
||||
#if LL_PROFILER_CONFIGURATION == LL_PROFILER_CONFIG_TRACY
|
||||
#define LL_PROFILER_FRAME_END FrameMark
|
||||
// <FS:Beq> Note: this threadlocal forces memory colelction enabled from the start. It conflicts with deferred profiling.
|
||||
#define LL_PROFILER_SET_THREAD_NAME( name ) tracy::SetThreadName( name ); gProfilerEnabled = true;
|
||||
// </FS:Beq>
|
||||
#define LL_PROFILER_THREAD_BEGIN(name) FrameMarkStart( name ) // C string
|
||||
#define LL_PROFILER_THREAD_END(name) FrameMarkEnd( name ) // C string
|
||||
// <FS:Beq> revert change that obscures custom FTM zones. We may want to may FTM Zones unique in future.
|
||||
// #define LL_RECORD_BLOCK_TIME(name) ZoneScoped // Want descriptive names; was: ZoneNamedN( ___tracy_scoped_zone, #name, gProfilerEnabled );
|
||||
#define LL_RECORD_BLOCK_TIME(name) ZoneNamedN( ___tracy_scoped_zone, #name, gProfilerEnabled )
|
||||
// #define LL_RECORD_BLOCK_TIME(name) ZoneScoped // Want descriptive names; was: ZoneNamedN( ___tracy_scoped_zone, #name, LLProfiler::active );
|
||||
#define LL_RECORD_BLOCK_TIME(name) ZoneNamedN( ___tracy_scoped_zone, #name, LLProfiler::active )
|
||||
// </FS:Beq>
|
||||
|
||||
// <FS:Beq>
|
||||
// #define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, true )
|
||||
// #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, true ) // RGB
|
||||
// #define LL_PROFILE_ZONE_SCOPED ZoneScoped
|
||||
#define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, gProfilerEnabled )
|
||||
#define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, gProfilerEnabled ) // RGB
|
||||
#define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, gProfilerEnabled ) // <FS:Beq/> Enable deferred collection through filters
|
||||
#define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, LLProfiler::active )
|
||||
#define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, LLProfiler::active ) // RGB
|
||||
#define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, LLProfiler::active ) // <FS:Beq/> Enable deferred collection through filters
|
||||
// </FS:Beq>
|
||||
|
||||
#define LL_PROFILE_ZONE_NUM( val ) ZoneValue( val )
|
||||
|
|
@ -121,7 +130,7 @@ extern thread_local bool gProfilerEnabled;
|
|||
#define LL_PROFILE_FREE(ptr) TracyFree(ptr)
|
||||
|
||||
// <FS:Beq> Additional FS Tracy macros
|
||||
#define LL_PROFILE_ZONE_COLOR(color) ZoneNamedC( ___tracy_scoped_zone, color, gProfilerEnabled ) // <FS:Beq/> Additional Tracy macro
|
||||
#define LL_PROFILE_ZONE_COLOR(color) ZoneNamedC( ___tracy_scoped_zone, color, LLProfiler::active ) // <FS:Beq/> Additional Tracy macro
|
||||
#define LL_PROFILE_PLOT( name, value ) TracyPlot( name, value)
|
||||
#define LL_PROFILE_PLOT_SQ( name, prev, value ) TracyPlot(name,prev);TracyPlot( name, value)
|
||||
#define LL_PROFILE_IS_CONNECTED TracyIsConnected
|
||||
|
|
@ -161,15 +170,15 @@ extern thread_local bool gProfilerEnabled;
|
|||
|
||||
// <FS:Beq> revert change that obscures custom FTM zones.
|
||||
// #define LL_RECORD_BLOCK_TIME(name) ZoneScoped const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(name)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__);
|
||||
#define LL_RECORD_BLOCK_TIME(name) ZoneNamedN( ___tracy_scoped_zone, #name, gProfilerEnabled ); const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(name)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__);
|
||||
#define LL_RECORD_BLOCK_TIME(name) ZoneNamedN( ___tracy_scoped_zone, #name, LLProfiler::active ); const LLTrace::BlockTimer& LL_GLUE_TOKENS(block_time_recorder, __LINE__)(LLTrace::timeThisBlock(name)); (void)LL_GLUE_TOKENS(block_time_recorder, __LINE__);
|
||||
// </FS:Beq>
|
||||
// <FS:Beq>
|
||||
// #define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, true )
|
||||
// #define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, true ) // RGB
|
||||
// #define LL_PROFILE_ZONE_SCOPED ZoneScoped
|
||||
#define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, gProfilerEnabled );
|
||||
#define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, gProfilerEnabled ) // RGB
|
||||
#define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, gProfilerEnabled ) // <FS:Beq/> Enable deferred collection through filters
|
||||
#define LL_PROFILE_ZONE_NAMED(name) ZoneNamedN( ___tracy_scoped_zone, name, LLProfiler::active );
|
||||
#define LL_PROFILE_ZONE_NAMED_COLOR(name,color) ZoneNamedNC( ___tracy_scopped_zone, name, color, LLProfiler::active ) // RGB
|
||||
#define LL_PROFILE_ZONE_SCOPED ZoneNamed( ___tracy_scoped_zone, LLProfiler::active ) // <FS:Beq/> Enable deferred collection through filters
|
||||
// </FS:Beq>
|
||||
|
||||
#define LL_PROFILE_ZONE_NUM( val ) ZoneValue( val )
|
||||
|
|
@ -181,7 +190,7 @@ extern thread_local bool gProfilerEnabled;
|
|||
#define LL_PROFILE_ALLOC(ptr, size) TracyAlloc(ptr, size)
|
||||
#define LL_PROFILE_FREE(ptr) TracyFree(ptr)
|
||||
// <FS:Beq> Additional FS Tracy macros
|
||||
#define LL_PROFILE_ZONE_COLOR(color) ZoneNamedC( ___tracy_scoped_zone, color, gProfilerEnabled )
|
||||
#define LL_PROFILE_ZONE_COLOR(color) ZoneNamedC( ___tracy_scoped_zone, color, LLProfiler::active )
|
||||
#define LL_PROFILE_PLOT( name, value ) TracyPlot( name, value)
|
||||
#define LL_PROFILE_PLOT_SQ( name, prev, value ) TracyPlot( name, prev );TracyPlot( name, value )
|
||||
#define LL_PROFILE_IS_CONNECTED TracyIsConnected
|
||||
|
|
|
|||
|
|
@ -48,11 +48,12 @@
|
|||
#define LL_PROFILER_CATEGORY_ENABLE_DRAWPOOL 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_ENVIRONMENT 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_FACE 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_LLSD 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_INPUT 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_LLSD 0 // <FS:Beq/> Rationalise this silliness
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_LOGGING 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_MATERIAL 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_MEDIA 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_MEMORY 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_MEMORY 0 // <FS:Beq/> Rationalise this silliness
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_NETWORK 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_OCTREE 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_PIPELINE 1
|
||||
|
|
@ -61,12 +62,12 @@
|
|||
#define LL_PROFILER_CATEGORY_ENABLE_STATS 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_STRING 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_TEXTURE 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_THREAD 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_THREAD 0 // <FS:Beq/> Rationalise this silliness
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_UI 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_VIEWER 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_VERTEX 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_VOLUME 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_WIN32 1
|
||||
#define LL_PROFILER_CATEGORY_ENABLE_WIN32 0 // <FS:Beq/> Rationalise this silliness
|
||||
|
||||
#if LL_PROFILER_CATEGORY_ENABLE_APP
|
||||
#define LL_PROFILE_ZONE_NAMED_CATEGORY_APP LL_PROFILE_ZONE_NAMED
|
||||
|
|
@ -124,6 +125,16 @@
|
|||
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
|
||||
#endif
|
||||
|
||||
// <FS:Beq> Additional scope category for input handlers
|
||||
#if LL_PROFILER_CATEGORY_ENABLE_INPUT
|
||||
#define LL_PROFILE_ZONE_NAMED_CATEGORY_INPUT LL_PROFILE_ZONE_NAMED
|
||||
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT LL_PROFILE_ZONE_SCOPED
|
||||
#else
|
||||
#define LL_PROFILE_ZONE_NAMED_CATEGORY_INPUT(name)
|
||||
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT
|
||||
#endif
|
||||
// </FS:Beq>
|
||||
|
||||
#if LL_PROFILER_CATEGORY_ENABLE_LLSD
|
||||
#define LL_PROFILE_ZONE_NAMED_CATEGORY_LLSD LL_PROFILE_ZONE_NAMED
|
||||
#define LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD LL_PROFILE_ZONE_SCOPED
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#ifdef LL_USESYSTEMLIBS
|
||||
# include <zlib.h>
|
||||
#else
|
||||
# include "zlib/zlib.h" // for davep's dirty little zip functions
|
||||
# include "zlib-ng/zlib.h" // for davep's dirty little zip functions
|
||||
#endif
|
||||
|
||||
#if !LL_WINDOWS
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#ifdef LL_USESYSTEMLIBS
|
||||
# include <zlib.h>
|
||||
#else
|
||||
# include "zlib/zlib.h"
|
||||
# include "zlib-ng/zlib.h"
|
||||
#endif
|
||||
|
||||
#include "llprocessor.h"
|
||||
|
|
@ -467,6 +467,8 @@ LLOSInfo::LLOSInfo() :
|
|||
dotted_version_string << mMajorVer << "." << mMinorVer << "." << mBuild;
|
||||
mOSVersionString.append(dotted_version_string.str());
|
||||
|
||||
mOSBitness = is64Bit() ? 64 : 32;
|
||||
LL_INFOS("LLOSInfo") << "OS bitness: " << mOSBitness << LL_ENDL;
|
||||
}
|
||||
|
||||
#ifndef LL_WINDOWS
|
||||
|
|
@ -522,6 +524,11 @@ const std::string& LLOSInfo::getOSVersionString() const
|
|||
return mOSVersionString;
|
||||
}
|
||||
|
||||
const S32 LLOSInfo::getOSBitness() const
|
||||
{
|
||||
return mOSBitness;
|
||||
}
|
||||
|
||||
//static
|
||||
U32 LLOSInfo::getProcessVirtualSizeKB()
|
||||
{
|
||||
|
|
@ -575,6 +582,25 @@ U32 LLOSInfo::getProcessResidentSizeKB()
|
|||
return resident_size;
|
||||
}
|
||||
|
||||
//static
|
||||
bool LLOSInfo::is64Bit()
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
#if defined(_WIN64)
|
||||
return true;
|
||||
#elif defined(_WIN32)
|
||||
// 32-bit viewer may be run on both 32-bit and 64-bit Windows, need to elaborate
|
||||
BOOL f64 = FALSE;
|
||||
return IsWow64Process(GetCurrentProcess(), &f64) && f64;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
#else // ! LL_WINDOWS
|
||||
// we only build a 64-bit mac viewer and currently we don't build for linux at all
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
LLCPUInfo::LLCPUInfo()
|
||||
{
|
||||
std::ostringstream out;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ public:
|
|||
const std::string& getOSStringSimple() const;
|
||||
|
||||
const std::string& getOSVersionString() const;
|
||||
|
||||
const S32 getOSBitness() const;
|
||||
|
||||
S32 mMajorVer;
|
||||
S32 mMinorVer;
|
||||
|
|
@ -59,6 +61,7 @@ public:
|
|||
#ifndef LL_WINDOWS
|
||||
static S32 getMaxOpenFiles();
|
||||
#endif
|
||||
static bool is64Bit();
|
||||
|
||||
static U32 getProcessVirtualSizeKB();
|
||||
static U32 getProcessResidentSizeKB();
|
||||
|
|
@ -66,6 +69,7 @@ private:
|
|||
std::string mOSString;
|
||||
std::string mOSStringSimple;
|
||||
std::string mOSVersionString;
|
||||
S32 mOSBitness;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ public:
|
|||
# define hexnybl(N) (N)>9?((N)-10)+'a':(N)+'0'
|
||||
inline char * toShortString(char *out) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// LL_PROFILE_ZONE_SCOPED;
|
||||
out[0] = hexnybl(mData[14]>>4);
|
||||
out[1] = hexnybl(mData[14]&15);
|
||||
out[2] = hexnybl(mData[15]>>4);
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
// full uuid - Much lighterweight than default, no allocation, or nul-term added - provide your own, ensure min 36 bytes.
|
||||
inline char * toStringFast(char *out) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
// LL_PROFILE_ZONE_SCOPED;
|
||||
out[0] = hexnybl(mData[0]>>4);
|
||||
out[1] = hexnybl(mData[0]&15);
|
||||
out[2] = hexnybl(mData[1]>>4);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,144 @@
|
|||
/**
|
||||
* @file classic_callback_test.cpp
|
||||
* @author Nat Goodspeed
|
||||
* @date 2021-09-22
|
||||
* @brief Test ClassicCallback and HeapClassicCallback.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2021&license=viewerlgpl$
|
||||
* Copyright (c) 2021, Linden Research, Inc.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// Precompiled header
|
||||
#include "linden_common.h"
|
||||
// associated header
|
||||
#include "classic_callback.h"
|
||||
// STL headers
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
// std headers
|
||||
// external library headers
|
||||
// other Linden headers
|
||||
#include "../test/lltut.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* example callback
|
||||
*****************************************************************************/
|
||||
// callback_t is part of the specification of someAPI()
|
||||
typedef void (*callback_t)(const char*, void*);
|
||||
void someAPI(callback_t callback, void* userdata)
|
||||
{
|
||||
callback("called", userdata);
|
||||
}
|
||||
|
||||
// C++ callable I want as the actual callback
|
||||
struct MyCallback
|
||||
{
|
||||
void operator()(const char* msg, void*)
|
||||
{
|
||||
mMsg = msg;
|
||||
}
|
||||
|
||||
void callback_with_extra(const std::string& extra, const char* msg)
|
||||
{
|
||||
mMsg = extra + ' ' + msg;
|
||||
}
|
||||
|
||||
std::string mMsg;
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
* example callback accepting several params, and void* userdata isn't first
|
||||
*****************************************************************************/
|
||||
typedef std::string (*complex_callback)(int, const char*, void*, double);
|
||||
std::string otherAPI(complex_callback callback, void* userdata)
|
||||
{
|
||||
return callback(17, "hello world", userdata, 3.0);
|
||||
}
|
||||
|
||||
// struct into which we can capture complex_callback params
|
||||
static struct Data
|
||||
{
|
||||
void set(int i, const char* s, double f)
|
||||
{
|
||||
mi = i;
|
||||
ms = s;
|
||||
mf = f;
|
||||
}
|
||||
|
||||
void clear() { set(0, "", 0.0); }
|
||||
|
||||
int mi;
|
||||
std::string ms;
|
||||
double mf;
|
||||
} sData;
|
||||
|
||||
// C++ callable I want to pass
|
||||
struct OtherCallback
|
||||
{
|
||||
std::string operator()(int num, const char* str, void*, double approx)
|
||||
{
|
||||
sData.set(num, str, approx);
|
||||
return "hello back!";
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
* TUT
|
||||
*****************************************************************************/
|
||||
namespace tut
|
||||
{
|
||||
struct classic_callback_data
|
||||
{
|
||||
};
|
||||
typedef test_group<classic_callback_data> classic_callback_group;
|
||||
typedef classic_callback_group::object object;
|
||||
classic_callback_group classic_callbackgrp("classic_callback");
|
||||
|
||||
template<> template<>
|
||||
void object::test<1>()
|
||||
{
|
||||
set_test_name("ClassicCallback");
|
||||
// engage someAPI(MyCallback())
|
||||
auto ccb{ makeClassicCallback<callback_t>(MyCallback()) };
|
||||
someAPI(ccb.get_callback(), ccb.get_userdata());
|
||||
// Unfortunately, with the side effect confined to the bound
|
||||
// MyCallback instance, that call was invisible. Bind a reference to a
|
||||
// named instance by specifying a ref type.
|
||||
MyCallback mcb;
|
||||
ClassicCallback<callback_t, void*, MyCallback&> ccb2(mcb);
|
||||
someAPI(ccb2.get_callback(), ccb2.get_userdata());
|
||||
ensure_equals("failed to call through ClassicCallback", mcb.mMsg, "called");
|
||||
|
||||
// try with HeapClassicCallback
|
||||
mcb.mMsg.clear();
|
||||
auto hcbp{ makeHeapClassicCallback<callback_t>(mcb) };
|
||||
someAPI(hcbp->get_callback(), hcbp->get_userdata());
|
||||
ensure_equals("failed to call through HeapClassicCallback", mcb.mMsg, "called");
|
||||
|
||||
// lambda
|
||||
// The tricky thing here is that a lambda is an unspecified type, so
|
||||
// you can't declare a ClassicCallback<signature, void*, that type>.
|
||||
mcb.mMsg.clear();
|
||||
auto xcb(
|
||||
makeClassicCallback<callback_t>(
|
||||
[&mcb](const char* msg, void*)
|
||||
{ mcb.callback_with_extra("extra", msg); }));
|
||||
someAPI(xcb.get_callback(), xcb.get_userdata());
|
||||
ensure_equals("failed to call lambda", mcb.mMsg, "extra called");
|
||||
|
||||
// engage otherAPI(OtherCallback())
|
||||
OtherCallback ocb;
|
||||
// Instead of specifying a reference type for the bound CALLBACK, as
|
||||
// with ccb2 above, you can alternatively move the callable object
|
||||
// into the ClassicCallback (of course AFTER any other reference).
|
||||
// That's why OtherCallback uses external data for its observable side
|
||||
// effect.
|
||||
auto occb{ makeClassicCallback<complex_callback>(std::move(ocb)) };
|
||||
std::string result{ otherAPI(occb.get_callback(), occb.get_userdata()) };
|
||||
ensure_equals("failed to return callback result", result, "hello back!");
|
||||
ensure_equals("failed to set int", sData.mi, 17);
|
||||
ensure_equals("failed to set string", sData.ms, "hello world");
|
||||
ensure_equals("failed to set double", sData.mf, 3.0);
|
||||
}
|
||||
} // namespace tut
|
||||
|
|
@ -11,7 +11,7 @@ include(00-Common)
|
|||
include(CURL)
|
||||
include(OpenSSL)
|
||||
include(NGHTTP2)
|
||||
include(ZLIB)
|
||||
include(ZLIBNG)
|
||||
include(LLCoreHttp)
|
||||
include(LLAddBuildTest)
|
||||
include(LLMessage)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ include(LLMath)
|
|||
include(LLFileSystem)
|
||||
include(LLKDU)
|
||||
include(LLImageJ2COJ)
|
||||
include(ZLIB)
|
||||
include(ZLIBNG)
|
||||
include(LLAddBuildTest)
|
||||
include(bugsplat)
|
||||
include(Tut)
|
||||
|
|
@ -20,7 +20,7 @@ include_directories(
|
|||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLFILESYSTEM_INCLUDE_DIRS}
|
||||
${PNG_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${ZLIBNG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(llimage_SOURCE_FILES
|
||||
|
|
@ -74,7 +74,7 @@ target_link_libraries(llimage
|
|||
${LLCOMMON_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${ZLIBNG_LIBRARIES}
|
||||
)
|
||||
|
||||
# Add tests
|
||||
|
|
|
|||
|
|
@ -463,13 +463,13 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
|
|||
}
|
||||
else if ("time" == keyword)
|
||||
{
|
||||
S32 when(0);
|
||||
S32 when{};
|
||||
LLStringUtil::convertToS32(value, when);
|
||||
entry->mTime = when;
|
||||
}
|
||||
else if ("flags" == keyword)
|
||||
{
|
||||
U32 setting(0);
|
||||
U32 setting{};
|
||||
LLStringUtil::convertToU32(value, setting);
|
||||
entry->mFlags = setting;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ public:
|
|||
// "init_history" message
|
||||
void initializeUrlHistory(const LLSD& url_history);
|
||||
|
||||
boost::shared_ptr<LLPluginClassMedia> getSharedPrt() { return boost::dynamic_pointer_cast<LLPluginClassMedia>(shared_from_this()); } // due to enable_shared_from_this
|
||||
boost::shared_ptr<LLPluginClassMedia> getSharedPtr() { return boost::dynamic_pointer_cast<LLPluginClassMedia>(shared_from_this()); } // due to enable_shared_from_this
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -116,14 +116,17 @@ std::string colladaVersion[VERSIONTYPE_COUNT+1] =
|
|||
"Unsupported"
|
||||
};
|
||||
|
||||
static const std::string lod_suffix[LLModel::NUM_LODS] =
|
||||
{
|
||||
"_LOD0",
|
||||
"_LOD1",
|
||||
"_LOD2",
|
||||
"",
|
||||
"_PHYS",
|
||||
};
|
||||
// <FS:Beq> moved to allow configuration
|
||||
// static const std::string lod_suffix[LLModel::NUM_LODS] =
|
||||
// {
|
||||
// "_LOD0",
|
||||
// "_LOD1",
|
||||
// "_LOD2",
|
||||
// "",
|
||||
// "_PHYS",
|
||||
// };
|
||||
// </FS:Beq>
|
||||
|
||||
|
||||
const U32 LIMIT_MATERIALS_OUTPUT = 12;
|
||||
|
||||
|
|
@ -931,7 +934,11 @@ LLDAELoader::LLDAELoader(
|
|||
std::map<std::string, std::string>& jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit,
|
||||
bool preprocess)
|
||||
// <FS:Beq> mesh loader suffix configuration
|
||||
// bool preprocess)
|
||||
bool preprocess,
|
||||
const LODSuffixArray& lod_suffix)
|
||||
// </FS:Beq>
|
||||
: LLModelLoader(
|
||||
filename,
|
||||
lod,
|
||||
|
|
@ -947,12 +954,21 @@ LLDAELoader::LLDAELoader(
|
|||
mGeneratedModelLimit(modelLimit),
|
||||
mPreprocessDAE(preprocess)
|
||||
{
|
||||
// <FS:Beq> mesh loader suffix configuration
|
||||
for(int i=0;i<LLModel::NUM_LODS;i++)
|
||||
{
|
||||
LLDAELoader::sLODSuffix[i] = lod_suffix[i];
|
||||
}
|
||||
// </FS:Beq>
|
||||
}
|
||||
|
||||
LLDAELoader::~LLDAELoader()
|
||||
{
|
||||
}
|
||||
|
||||
//static
|
||||
LODSuffixArray LLDAELoader::sLODSuffix{};// <FS:Beq/> configurable lod suffixes
|
||||
|
||||
struct ModelSort
|
||||
{
|
||||
bool operator()(const LLPointer< LLModel >& lhs, const LLPointer< LLModel >& rhs)
|
||||
|
|
@ -2208,8 +2224,17 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
{
|
||||
label += (char)((int)'a' + model->mSubmodelID);
|
||||
}
|
||||
|
||||
model->mLabel = label + lod_suffix[mLod];
|
||||
// <FS:Beq> Support altenate LOD naming conventions
|
||||
// model->mLabel = label + sLODSuffix[mLod];
|
||||
if ( sLODSuffix[mLod].size() > 0 )
|
||||
{
|
||||
model->mLabel = label + '_' + sLODSuffix[mLod];
|
||||
}
|
||||
else
|
||||
{
|
||||
model->mLabel = label;
|
||||
}
|
||||
// </FS:Beq>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2485,13 +2510,19 @@ std::string LLDAELoader::getElementLabel(daeElement *element)
|
|||
// static
|
||||
size_t LLDAELoader::getSuffixPosition(std::string label)
|
||||
{
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
// <FS:Beq> Selectable suffixes
|
||||
//if ((label.find("_LOD") != -1) || (label.find("_PHYS") != -1))
|
||||
if ((label.find("_LOD") != std::string::npos) || (label.find("_PHYS") != std::string::npos))
|
||||
// </FS:Ansariel>
|
||||
//{
|
||||
// return label.rfind('_');
|
||||
//}
|
||||
for(int i=0; i < LLModel::NUM_LODS; i++)
|
||||
{
|
||||
return label.rfind('_');
|
||||
if (sLODSuffix[i].size() && label.find(sLODSuffix[i]) != std::string::npos)
|
||||
{
|
||||
return label.rfind('_');
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -2636,8 +2667,17 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo
|
|||
LLModel* ret = new LLModel(volume_params, 0.f);
|
||||
|
||||
std::string model_name = getLodlessLabel(mesh);
|
||||
ret->mLabel = model_name + lod_suffix[mLod];
|
||||
|
||||
// <FS:Beq> Support altenate LOD naming conventions
|
||||
// ret->mLabel = model_name + sLODSuffix[mLod];
|
||||
if ( sLODSuffix[mLod].size() > 0 )
|
||||
{
|
||||
ret->mLabel = model_name + '_' + sLODSuffix[mLod];
|
||||
}
|
||||
else
|
||||
{
|
||||
ret->mLabel = model_name;
|
||||
}
|
||||
// </FS:Beq>
|
||||
llassert(!ret->mLabel.empty());
|
||||
|
||||
// Like a monkey, ready to be shot into space
|
||||
|
|
@ -2695,7 +2735,10 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo
|
|||
{
|
||||
LLModel* next = new LLModel(volume_params, 0.f);
|
||||
next->mSubmodelID = ++submodelID;
|
||||
next->mLabel = model_name + (char)((int)'a' + next->mSubmodelID) + lod_suffix[mLod];
|
||||
// <FS:Beq> configurable lod suffixes
|
||||
// next->mLabel = model_name + (char)((int)'a' + next->mSubmodelID) + lod_suffix[mLod];
|
||||
next->mLabel = model_name + (char)((int)'a' + next->mSubmodelID) + sLODSuffix[mLod];
|
||||
// </FS:Beq>
|
||||
next->getVolumeFaces() = remainder;
|
||||
next->mNormalizedScale = ret->mNormalizedScale;
|
||||
next->mNormalizedTranslation = ret->mNormalizedTranslation;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class domController;
|
|||
class domSkin;
|
||||
class domMesh;
|
||||
|
||||
using LODSuffixArray = std::array<std::string,LLModel::NUM_LODS>; // <FS:Beq/> configurable lod suffixes
|
||||
class LLDAELoader : public LLModelLoader
|
||||
{
|
||||
public:
|
||||
|
|
@ -59,7 +60,11 @@ public:
|
|||
std::map<std::string, std::string>& jointAliasMap,
|
||||
U32 maxJointsPerMesh,
|
||||
U32 modelLimit,
|
||||
bool preprocess);
|
||||
// <FS:Beq> configrable lod suffix support
|
||||
// bool preprocess);
|
||||
bool preprocess,
|
||||
const LODSuffixArray& lod_suffix);
|
||||
// </FS:Beq>
|
||||
virtual ~LLDAELoader() ;
|
||||
|
||||
virtual bool OpenFile(const std::string& filename);
|
||||
|
|
@ -104,6 +109,7 @@ protected:
|
|||
static std::string getLodlessLabel(daeElement *element);
|
||||
|
||||
static std::string preprocessDAE(std::string filename);
|
||||
static LODSuffixArray sLODSuffix; // <FS:Beq/> mesh loader suffix configuration
|
||||
|
||||
private:
|
||||
U32 mGeneratedModelLimit; // Attempt to limit amount of generated submodels
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#ifdef LL_USESYSTEMLIBS
|
||||
# include <zlib.h>
|
||||
#else
|
||||
# include "zlib/zlib.h"
|
||||
# include "zlib-ng/zlib.h"
|
||||
#endif
|
||||
|
||||
extern LLControlGroup gSavedSettings;
|
||||
|
|
@ -634,10 +634,13 @@ void LLModel::generateNormals(F32 angle_cutoff)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
extern std::string stripSuffix(std::string); // <FS:Beq/> mesh loader suffix configuration
|
||||
std::string LLModel::getName() const
|
||||
{
|
||||
return mRequestedLabel.empty() ? mLabel : mRequestedLabel;
|
||||
// <FS:Beq> remove the LOD suffix when used as the model name.
|
||||
// return mRequestedLabel.empty() ? mLabel : mRequestedLabel;
|
||||
return mRequestedLabel.empty() ? stripSuffix(mLabel) : mRequestedLabel;
|
||||
// </FS:Beq>
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ void LLModelLoader::setLoadState(U32 state)
|
|||
{
|
||||
mStateCallback(state, mOpaqueData);
|
||||
}
|
||||
|
||||
extern std::string stripSuffix(std::string); // <FS:Beq/> mesh loader suffix configuration
|
||||
bool LLModelLoader::loadFromSLM(const std::string& filename)
|
||||
{
|
||||
//only need to populate mScene with data from slm
|
||||
|
|
@ -320,7 +320,10 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
|
|||
&& !instance_label.empty())
|
||||
{
|
||||
// restore model names
|
||||
std::string name = instance_label;
|
||||
// <FS:Beq> This is going to get confusing here. We are juggling internal LOD names, with potentially overridden user ones.
|
||||
// std::string name = instance_label;
|
||||
std::string name = stripSuffix(instance_label);
|
||||
// </FS:Beq>
|
||||
switch (lod)
|
||||
{
|
||||
case LLModel::LOD_IMPOSTOR: name += "_LOD0"; break;
|
||||
|
|
|
|||
|
|
@ -60,11 +60,11 @@
|
|||
|
||||
|
||||
BOOL gDebugSession = FALSE;
|
||||
BOOL gDebugGLSession = FALSE;
|
||||
BOOL gClothRipple = FALSE;
|
||||
BOOL gHeadlessClient = FALSE;
|
||||
BOOL gNonInteractive = FALSE;
|
||||
BOOL gGLActive = FALSE;
|
||||
BOOL gGLDebugLoggingEnabled = TRUE;
|
||||
|
||||
static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
|
||||
static const std::string HEADLESS_RENDERER_STRING("Headless");
|
||||
|
|
@ -86,34 +86,30 @@ void APIENTRY gl_debug_callback(GLenum source,
|
|||
const GLchar* message,
|
||||
GLvoid* userParam)
|
||||
{
|
||||
if (gGLDebugLoggingEnabled)
|
||||
{
|
||||
|
||||
if (severity != GL_DEBUG_SEVERITY_HIGH_ARB &&
|
||||
severity != GL_DEBUG_SEVERITY_MEDIUM_ARB &&
|
||||
severity != GL_DEBUG_SEVERITY_LOW_ARB)
|
||||
{ //suppress out-of-spec messages sent by nvidia driver (mostly vertexbuffer hints)
|
||||
return;
|
||||
}
|
||||
|
||||
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
|
||||
{
|
||||
LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "----- GL WARNING -------" << LL_ENDL;
|
||||
}
|
||||
LL_WARNS() << "Type: " << std::hex << type << LL_ENDL;
|
||||
LL_WARNS() << "ID: " << std::hex << id << LL_ENDL;
|
||||
LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
|
||||
LL_WARNS() << "Message: " << message << LL_ENDL;
|
||||
LL_WARNS() << "-----------------------" << LL_ENDL;
|
||||
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
|
||||
{
|
||||
LL_ERRS() << "Halting on GL Error" << LL_ENDL;
|
||||
}
|
||||
if (severity != GL_DEBUG_SEVERITY_HIGH_ARB &&
|
||||
severity != GL_DEBUG_SEVERITY_MEDIUM_ARB &&
|
||||
severity != GL_DEBUG_SEVERITY_LOW_ARB)
|
||||
{ //suppress out-of-spec messages sent by nvidia driver (mostly vertexbuffer hints)
|
||||
return;
|
||||
}
|
||||
|
||||
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
|
||||
{
|
||||
LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "----- GL WARNING -------" << LL_ENDL;
|
||||
}
|
||||
LL_WARNS() << "Type: " << std::hex << type << LL_ENDL;
|
||||
LL_WARNS() << "ID: " << std::hex << id << LL_ENDL;
|
||||
LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
|
||||
LL_WARNS() << "Message: " << message << LL_ENDL;
|
||||
LL_WARNS() << "-----------------------" << LL_ENDL;
|
||||
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
|
||||
{
|
||||
LL_ERRS() << "Halting on GL Error" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
extern BOOL gDebugGL;
|
||||
extern BOOL gDebugSession;
|
||||
extern BOOL gDebugGLSession;
|
||||
extern llofstream gFailLog;
|
||||
|
||||
#define LL_GL_ERRS LL_ERRS("RenderState")
|
||||
|
|
|
|||
|
|
@ -1384,6 +1384,9 @@ public:
|
|||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
|
||||
|
||||
virtual void onFocusLost();
|
||||
virtual void setFocus(BOOL b);
|
||||
};
|
||||
|
||||
LLMenuItemBranchDownGL::LLMenuItemBranchDownGL( const Params& p) :
|
||||
|
|
@ -1538,6 +1541,21 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
|
|||
|
||||
return handled;
|
||||
}
|
||||
void LLMenuItemBranchDownGL::onFocusLost()
|
||||
{
|
||||
// needed for tab-based selection
|
||||
LLMenuItemBranchGL::onFocusLost();
|
||||
LLMenuGL::setKeyboardMode(FALSE);
|
||||
setHighlight(FALSE);
|
||||
}
|
||||
|
||||
void LLMenuItemBranchDownGL::setFocus(BOOL b)
|
||||
{
|
||||
// needed for tab-based selection
|
||||
LLMenuItemBranchGL::setFocus(b);
|
||||
LLMenuGL::setKeyboardMode(b);
|
||||
setHighlight(b);
|
||||
}
|
||||
|
||||
BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -488,6 +488,8 @@ public:
|
|||
void setSkipLinkUnderline(bool skip_link_underline) { mSkipLinkUnderline = skip_link_underline; }
|
||||
bool getSkipLinkUnderline() { return mSkipLinkUnderline; }
|
||||
|
||||
void setParseURLs(bool parse_urls) { mParseHTML = parse_urls; }
|
||||
|
||||
void setPlainText(bool value) { mPlainText = value;}
|
||||
bool getPlainText() const { return mPlainText; }
|
||||
|
||||
|
|
|
|||
|
|
@ -229,9 +229,7 @@ S32 LLDXHardware::getMBVideoMemoryViaWMI()
|
|||
}
|
||||
|
||||
//Getting the version of graphics controller driver via WMI
|
||||
// <FS:Ansariel> FIRE-8264: System info displays wrong driver version on Optimus systems
|
||||
//std::string LLDXHardware::getDriverVersionWMI()
|
||||
std::string LLDXHardware::getDriverVersionWMI(const std::string& vendor)
|
||||
std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
|
||||
{
|
||||
std::string mDriverVersion;
|
||||
HRESULT hrCoInitialize = S_OK;
|
||||
|
|
@ -327,38 +325,68 @@ std::string LLDXHardware::getDriverVersionWMI(const std::string& vendor)
|
|||
{
|
||||
break; // If quantity less then 1.
|
||||
}
|
||||
|
||||
if (vendor != GPU_ANY)
|
||||
{
|
||||
VARIANT vtCaptionProp;
|
||||
// Might be preferable to check "AdapterCompatibility" here instead of caption.
|
||||
hr = pclsObj->Get(L"Caption", 0, &vtCaptionProp, 0, 0);
|
||||
|
||||
VARIANT vtProp;
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Query for Caption property failed." << " Error code = 0x" << hr << LL_ENDL;
|
||||
pSvc->Release();
|
||||
pLoc->Release();
|
||||
CoUninitialize();
|
||||
return std::string(); // Program has failed.
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-8264: System info displays wrong driver version on Optimus systems
|
||||
hr = pclsObj->Get(L"AdapterCompatibility", 0, &vtProp, 0, 0);
|
||||
// use characters in the returned driver version
|
||||
BSTR caption(vtCaptionProp.bstrVal);
|
||||
|
||||
//convert BSTR to std::string
|
||||
std::wstring ws(caption, SysStringLen(caption));
|
||||
std::string caption_str(ws.begin(), ws.end());
|
||||
LLStringUtil::toLower(caption_str);
|
||||
|
||||
bool found = false;
|
||||
switch (vendor)
|
||||
{
|
||||
case GPU_INTEL:
|
||||
found = caption_str.find("intel") != std::string::npos;
|
||||
break;
|
||||
case GPU_NVIDIA:
|
||||
found = caption_str.find("nvidia") != std::string::npos;
|
||||
break;
|
||||
case GPU_AMD:
|
||||
found = caption_str.find("amd") != std::string::npos
|
||||
|| caption_str.find("ati ") != std::string::npos
|
||||
|| caption_str.find("radeon") != std::string::npos;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (found)
|
||||
{
|
||||
VariantClear(&vtCaptionProp);
|
||||
}
|
||||
else
|
||||
{
|
||||
VariantClear(&vtCaptionProp);
|
||||
pclsObj->Release();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
VARIANT vtVersionProp;
|
||||
|
||||
// Get the value of the DriverVersion property
|
||||
hr = pclsObj->Get(L"DriverVersion", 0, &vtVersionProp, 0, 0);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Query for name property failed." << " Error code = 0x" << hr << LL_ENDL;
|
||||
pSvc->Release();
|
||||
pLoc->Release();
|
||||
CoUninitialize();
|
||||
return std::string(); // Program has failed.
|
||||
}
|
||||
|
||||
BSTR vendorCompatibility(vtProp.bstrVal);
|
||||
std::wstring vc_ws(vendorCompatibility, SysStringLen(vendorCompatibility));
|
||||
std::string vc_str(vc_ws.begin(), vc_ws.end());
|
||||
|
||||
LLStringUtil::toUpper(vc_str);
|
||||
if (vc_str.find(vendor) == std::string::npos)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Get the value of the Name property
|
||||
hr = pclsObj->Get(L"DriverVersion", 0, &vtProp, 0, 0);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Query for name property failed." << " Error code = 0x" << hr << LL_ENDL;
|
||||
LL_WARNS("AppInit") << "Query for DriverVersion property failed." << " Error code = 0x" << hr << LL_ENDL;
|
||||
pSvc->Release();
|
||||
pLoc->Release();
|
||||
CoUninitialize();
|
||||
|
|
@ -366,7 +394,7 @@ std::string LLDXHardware::getDriverVersionWMI(const std::string& vendor)
|
|||
}
|
||||
|
||||
// use characters in the returned driver version
|
||||
BSTR driverVersion(vtProp.bstrVal);
|
||||
BSTR driverVersion(vtVersionProp.bstrVal);
|
||||
|
||||
//convert BSTR to std::string
|
||||
std::wstring ws(driverVersion, SysStringLen(driverVersion));
|
||||
|
|
@ -379,10 +407,19 @@ std::string LLDXHardware::getDriverVersionWMI(const std::string& vendor)
|
|||
}
|
||||
else if (mDriverVersion != str)
|
||||
{
|
||||
LL_WARNS("DriverVersion") << "Different versions of drivers. Version of second driver : " << str << LL_ENDL;
|
||||
if (vendor == GPU_ANY)
|
||||
{
|
||||
// Expected from systems with gpus from different vendors
|
||||
LL_INFOS("DriverVersion") << "Multiple video drivers detected. Version of second driver: " << str << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not Expected!
|
||||
LL_WARNS("DriverVersion") << "Multiple video drivers detected from same vendor. Version of second driver : " << str << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
VariantClear(&vtProp);
|
||||
VariantClear(&vtVersionProp);
|
||||
pclsObj->Release();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,15 @@ public:
|
|||
BOOL getInfo(BOOL vram_only, bool disable_wmi);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> FIRE-8264: System info displays wrong driver version on Optimus systems
|
||||
//std::string getDriverVersionWMI();
|
||||
std::string getDriverVersionWMI(const std::string& vendor);
|
||||
// WMI can return multiple GPU drivers
|
||||
// specify which one to output
|
||||
typedef enum {
|
||||
GPU_INTEL,
|
||||
GPU_NVIDIA,
|
||||
GPU_AMD,
|
||||
GPU_ANY
|
||||
} EGPUVendor;
|
||||
std::string getDriverVersionWMI(EGPUVendor vendor);
|
||||
|
||||
S32 getVRAM() const { return mVRAM; }
|
||||
|
||||
|
|
|
|||
|
|
@ -877,21 +877,20 @@ void LLWindowWin32::close()
|
|||
// Restore gamma to the system values.
|
||||
restoreGamma();
|
||||
|
||||
if (mhDC)
|
||||
{
|
||||
if (!ReleaseDC(mWindowHandle, mhDC))
|
||||
{
|
||||
LL_WARNS("Window") << "Release of mhDC failed" << LL_ENDL;
|
||||
}
|
||||
mhDC = NULL;
|
||||
}
|
||||
|
||||
LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL;
|
||||
|
||||
mWindowThread->post([=]()
|
||||
{
|
||||
if (IsWindow(mWindowHandle))
|
||||
{
|
||||
if (mhDC)
|
||||
{
|
||||
if (!ReleaseDC(mWindowHandle, mhDC))
|
||||
{
|
||||
LL_WARNS("Window") << "Release of ghDC failed!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure we don't leave a blank toolbar button.
|
||||
ShowWindow(mWindowHandle, SW_HIDE);
|
||||
|
||||
|
|
@ -917,6 +916,7 @@ void LLWindowWin32::close()
|
|||
// Even though the above lambda might not yet have run, we've already
|
||||
// bound mWindowHandle into it by value, which should suffice for the
|
||||
// operations we're asking. That's the last time WE should touch it.
|
||||
mhDC = NULL;
|
||||
mWindowHandle = NULL;
|
||||
mWindowThread->close();
|
||||
}
|
||||
|
|
@ -1509,12 +1509,10 @@ const S32 max_format = (S32)num_formats - 1;
|
|||
{
|
||||
wglDeleteContext (mhRC); // Release The Rendering Context
|
||||
mhRC = 0; // Zero The Rendering Context
|
||||
|
||||
}
|
||||
ReleaseDC (mWindowHandle, mhDC); // Release The Device Context
|
||||
mhDC = 0; // Zero The Device Context
|
||||
}
|
||||
|
||||
// will release and recreate mhDC, mWindowHandle
|
||||
recreateWindow(window_rect, dw_ex_style, dw_style);
|
||||
|
||||
RECT rect;
|
||||
|
|
@ -1664,7 +1662,8 @@ const S32 max_format = (S32)num_formats - 1;
|
|||
|
||||
void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw_style)
|
||||
{
|
||||
auto oldHandle = mWindowHandle;
|
||||
auto oldWindowHandle = mWindowHandle;
|
||||
auto oldDCHandle = mhDC;
|
||||
|
||||
// zero out mWindowHandle and mhDC before destroying window so window
|
||||
// thread falls back to peekmessage
|
||||
|
|
@ -1676,7 +1675,8 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
|
|||
auto window_work =
|
||||
[this,
|
||||
self=mWindowThread,
|
||||
oldHandle,
|
||||
oldWindowHandle,
|
||||
oldDCHandle,
|
||||
// bind CreateWindowEx() parameters by value instead of
|
||||
// back-referencing LLWindowWin32 members
|
||||
windowClassName=mWindowClassName,
|
||||
|
|
@ -1692,11 +1692,19 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
|
|||
self->mWindowHandle = 0;
|
||||
self->mhDC = 0;
|
||||
|
||||
// important to call DestroyWindow() from the window thread
|
||||
if (oldHandle && !destroy_window_handler(oldHandle))
|
||||
if (oldWindowHandle)
|
||||
{
|
||||
LL_WARNS("Window") << "Failed to properly close window before recreating it!"
|
||||
<< LL_ENDL;
|
||||
if (oldDCHandle && !ReleaseDC(oldWindowHandle, oldDCHandle))
|
||||
{
|
||||
LL_WARNS("Window") << "Failed to ReleaseDC" << LL_ENDL;
|
||||
}
|
||||
|
||||
// important to call DestroyWindow() from the window thread
|
||||
if (!destroy_window_handler(oldWindowHandle))
|
||||
{
|
||||
LL_WARNS("Window") << "Failed to properly close window before recreating it!"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
auto handle = CreateWindowEx(dw_ex_style,
|
||||
|
|
@ -1734,7 +1742,7 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
|
|||
};
|
||||
// But how we pass window_work to the window thread depends on whether we
|
||||
// already have a window handle.
|
||||
if (! oldHandle)
|
||||
if (!oldWindowHandle)
|
||||
{
|
||||
// Pass window_work using the WorkQueue: without an existing window
|
||||
// handle, the window thread can't call GetMessage().
|
||||
|
|
@ -1747,7 +1755,7 @@ void LLWindowWin32::recreateWindow(RECT window_rect, DWORD dw_ex_style, DWORD dw
|
|||
// PostMessage(oldHandle) because oldHandle won't be destroyed until
|
||||
// the window thread has retrieved and executed window_work.
|
||||
LL_DEBUGS("Window") << "posting window_work to message queue" << LL_ENDL;
|
||||
mWindowThread->Post(oldHandle, window_work);
|
||||
mWindowThread->Post(oldWindowHandle, window_work);
|
||||
}
|
||||
|
||||
auto future = promise.get_future();
|
||||
|
|
@ -3127,8 +3135,20 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
if (raw->header.dwType == RIM_TYPEMOUSE)
|
||||
{
|
||||
LLMutexLock lock(&window_imp->mRawMouseMutex);
|
||||
window_imp->mRawMouseDelta.mX += raw->data.mouse.lLastX;
|
||||
window_imp->mRawMouseDelta.mY -= raw->data.mouse.lLastY;
|
||||
|
||||
S32 speed;
|
||||
const S32 DEFAULT_SPEED(10);
|
||||
SystemParametersInfo(SPI_GETMOUSESPEED, 0, &speed, 0);
|
||||
if (speed == DEFAULT_SPEED)
|
||||
{
|
||||
window_imp->mRawMouseDelta.mX += raw->data.mouse.lLastX;
|
||||
window_imp->mRawMouseDelta.mY -= raw->data.mouse.lLastY;
|
||||
}
|
||||
else
|
||||
{
|
||||
window_imp->mRawMouseDelta.mX += round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
|
||||
window_imp->mRawMouseDelta.mY -= round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
This component is no longer used in Linden Lab builds.
|
||||
Change requests to support continued use by open source
|
||||
builds are welcome.
|
||||
|
|
@ -56,6 +56,7 @@ include(UnixInstall)
|
|||
include(ViewerMiscLibs)
|
||||
#include(ViewerManager) # <FS:Ansariel> Remove VMP
|
||||
include(VisualLeakDetector)
|
||||
include(ZLIBNG)
|
||||
include(URIPARSER)
|
||||
include(Growl)
|
||||
include(ColladaDom)
|
||||
|
|
@ -2299,10 +2300,6 @@ if (WINDOWS)
|
|||
#media_plugin_example # <FS:Ansariel> Don't package example plugin
|
||||
)
|
||||
|
||||
if (NOT USE_BUGSPLAT)
|
||||
LIST(APPEND COPY_INPUT_DEPENDENCIES windows-crash-logger)
|
||||
endif (NOT USE_BUGSPLAT)
|
||||
|
||||
# <FS:Ansariel> Only copy OpenJPEG dll if needed
|
||||
if (NOT USE_KDU)
|
||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||
|
|
@ -2483,14 +2480,14 @@ endif (WINDOWS)
|
|||
#
|
||||
# We generally want the newest version of the library to provide all symbol
|
||||
# resolution. To that end, when using static archives, the *_PRELOAD_ARCHIVES
|
||||
# variables, PNG_PRELOAD_ARCHIVES and ZLIB_PRELOAD_ARCHIVES, get the archives
|
||||
# variables, PNG_PRELOAD_ARCHIVES and ZLIBNG_PRELOAD_ARCHIVES, get the archives
|
||||
# dumped into the target binary and runtime lookup will find the most
|
||||
# modern version.
|
||||
|
||||
target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${LEGACY_STDIO_LIBS}
|
||||
${PNG_PRELOAD_ARCHIVES}
|
||||
${ZLIB_PRELOAD_ARCHIVES}
|
||||
${ZLIBNG_PRELOAD_ARCHIVES}
|
||||
${URIPARSER_PRELOAD_ARCHIVES}
|
||||
${GOOGLE_PERFTOOLS_LIBRARIES}
|
||||
${LLAUDIO_LIBRARIES}
|
||||
|
|
@ -2674,7 +2671,7 @@ if (DARWIN)
|
|||
set(MACOSX_EXECUTABLE_NAME "Firestorm")
|
||||
set(MACOSX_BUNDLE_INFO_STRING "Firestorm Viewer")
|
||||
set(MACOSX_BUNDLE_ICON_FILE "firestorm_icon.icns")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.phoenixviewer.firestorm.viewer-${ND_VIEWER_FLAVOR}")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.firestormviewer.firestorm")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "Firestorm")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
6.6.1
|
||||
6.6.2
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<key>debugsession</key>
|
||||
<map>
|
||||
<key>desc</key>
|
||||
<string>Run as if RenderDebugGL is TRUE, but log errors until end of session.</string>
|
||||
<string>Run as if RenderDebugGLSession is TRUE, but log errors until end of session.</string>
|
||||
<key>map-to</key>
|
||||
<string>DebugSession</string>
|
||||
</map>
|
||||
|
|
|
|||
|
|
@ -5977,7 +5977,7 @@
|
|||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://events.secondlife.com/viewer/embed/event/</string>
|
||||
<string>http://events.[GRID]/viewer/embed/event/[EVENT_ID]</string>
|
||||
</map>
|
||||
<key>FastCacheFetchEnabled</key>
|
||||
<map>
|
||||
|
|
@ -9239,6 +9239,62 @@
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSMeshLowestLodSuffix</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Suffix to use for Lowest LOD models and files (DAE).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>LOD0</string>
|
||||
</map>
|
||||
<key>FSMeshLowLodSuffix</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Suffix to use for Low LOD models and files (DAE).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>LOD1</string>
|
||||
</map>
|
||||
<key>FSMeshMediumLodSuffix</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Suffix to use for Medium LOD models and files (DAE).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>LOD2</string>
|
||||
</map>
|
||||
<key>FSMeshHighLodSuffix</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Suffix to use for High LOD models and files (DAE).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
<key>FSMeshPhysicsSuffix</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Suffix to use for Physics models and files (DAE).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>PHYS</string>
|
||||
</map>
|
||||
|
||||
<key>FSMeshUploadAutoEnableWeights</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -11469,6 +11525,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>UpdateRememberPasswordSetting</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Save 'rememeber password' setting for current user.</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>OctreeMaxNodeCapacity</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -12032,10 +12099,10 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderDebugGL</key>
|
||||
<key>RenderDebugGLSession</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable strict GL debugging.</string>
|
||||
<string>Enable strict GL debugging on the start of next session.</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -19811,7 +19878,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>FSParticleChat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Speak Particle Info on channel 9000</string>
|
||||
<string>Send Selection Info on channel 9000 when editing objects (does not work if PrivatePointAtTarget is enabled)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ WLSkyDetail 1 48
|
|||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// Medium High Graphics Settings
|
||||
// Medium High Graphics Settings (deferred enabled)
|
||||
//
|
||||
list MidHigh
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -183,7 +183,7 @@ RenderTransparentWater 1 1
|
|||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
|
|
@ -191,7 +191,7 @@ WLSkyDetail 1 48
|
|||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// High Graphics Settings
|
||||
// High Graphics Settings (deferred + SSAO)
|
||||
//
|
||||
list High
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -212,15 +212,15 @@ RenderTransparentWater 1 1
|
|||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
WLSkyDetail 1 48
|
||||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// High Ultra Graphics Settings (deferred)
|
||||
// High Ultra Graphics Settings (deferred + SSAO)
|
||||
//
|
||||
list HighUltra
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -242,7 +242,7 @@ RenderTreeLODFactor 1 0.5
|
|||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
WLSkyDetail 1 48
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ WLSkyDetail 1 48
|
|||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// Medium High Graphics Settings
|
||||
// Medium High Graphics Settings (deferred enabled)
|
||||
//
|
||||
list MidHigh
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -184,7 +184,7 @@ RenderTransparentWater 1 1
|
|||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
|
|
@ -192,7 +192,7 @@ WLSkyDetail 1 48
|
|||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// High Graphics Settings
|
||||
// High Graphics Settings (deferred + SSAO)
|
||||
//
|
||||
list High
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -213,15 +213,15 @@ RenderTransparentWater 1 1
|
|||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
WLSkyDetail 1 48
|
||||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// High Ultra Graphics Settings (deferred)
|
||||
// High Ultra Graphics Settings (deferred + SSAO)
|
||||
//
|
||||
list HighUltra
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -243,7 +243,7 @@ RenderTreeLODFactor 1 0.5
|
|||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
WLSkyDetail 1 48
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderCompressTextures 1 1
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -161,7 +161,7 @@ WLSkyDetail 1 48
|
|||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// Medium High Graphics Settings
|
||||
// Medium High Graphics Settings (deferred enabled)
|
||||
//
|
||||
list MidHigh
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -182,7 +182,7 @@ RenderTransparentWater 1 1
|
|||
RenderTreeLODFactor 1 0.5
|
||||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 0
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
|
|
@ -190,7 +190,7 @@ WLSkyDetail 1 48
|
|||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// High Graphics Settings (deferred)
|
||||
// High Graphics Settings (deferred + SSAO)
|
||||
//
|
||||
list High
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -212,14 +212,14 @@ RenderTreeLODFactor 1 0.5
|
|||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
RenderShadowDetail 1 0
|
||||
WLSkyDetail 1 48
|
||||
RenderFSAASamples 1 2
|
||||
|
||||
//
|
||||
// High Ultra Graphics Settings (deferred)
|
||||
// High Ultra Graphics Settings (deferred + SSAO)
|
||||
//
|
||||
list HighUltra
|
||||
RenderAnisotropic 1 1
|
||||
|
|
@ -241,7 +241,7 @@ RenderTreeLODFactor 1 0.5
|
|||
RenderVolumeLODFactor 1 2.0
|
||||
WindLightUseAtmosShaders 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 0
|
||||
RenderDeferredSSAO 1 1
|
||||
RenderShadowDetail 1 0
|
||||
RenderUseAdvancedAtmospherics 1 0
|
||||
WLSkyDetail 1 48
|
||||
|
|
|
|||
|
|
@ -81,6 +81,13 @@ const F32 MIN_DISTANCE_MOVED = 1.0f;
|
|||
// timeout to resend object properties request again
|
||||
const F32 REQUEST_TIMEOUT = 30.0f;
|
||||
|
||||
std::string RLVa_hideNameIfRestricted(std::string const &name)
|
||||
{
|
||||
if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
return name;
|
||||
else
|
||||
return RlvStrings::getAnonym(name);
|
||||
}
|
||||
|
||||
F32 calculateObjectDistance(LLVector3d agent_pos, LLViewerObject* object)
|
||||
{
|
||||
|
|
@ -907,10 +914,13 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje
|
|||
std::string object_description = details.description;
|
||||
|
||||
details.name_requested = false;
|
||||
getNameFromUUID(details.ownership_id, true, owner_name, details.group_owned, details.name_requested);
|
||||
getNameFromUUID(details.creator_id, false, creator_name, false, details.name_requested);
|
||||
getNameFromUUID(details.last_owner_id, false, last_owner_name, false, details.name_requested);
|
||||
getNameFromUUID(details.group_id, false, group_name, true, details.name_requested);
|
||||
getNameFromUUID(details.ownership_id, owner_name, details.group_owned, details.name_requested);
|
||||
getNameFromUUID(details.creator_id, creator_name, false, details.name_requested);
|
||||
getNameFromUUID(details.last_owner_id, last_owner_name, false, details.name_requested);
|
||||
getNameFromUUID(details.group_id, group_name, true, details.name_requested);
|
||||
|
||||
owner_name = RLVa_hideNameIfRestricted(owner_name);
|
||||
last_owner_name = RLVa_hideNameIfRestricted(last_owner_name);
|
||||
|
||||
if (mRegexSearch)
|
||||
{
|
||||
|
|
@ -1042,7 +1052,7 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje
|
|||
|
||||
cell_params.column = "owner";
|
||||
cell_params.value = owner_name;
|
||||
row_params.columns.add(cell_params);
|
||||
row_params.columns.add(cell_params);
|
||||
|
||||
cell_params.column = "group";
|
||||
cell_params.value = group_name;
|
||||
|
|
@ -1105,7 +1115,7 @@ void FSAreaSearch::updateObjectCosts(const LLUUID& object_id, F32 object_cost, F
|
|||
}
|
||||
}
|
||||
|
||||
void FSAreaSearch::getNameFromUUID(const LLUUID& id, bool needs_rlva_check, std::string& name, bool group, bool& name_requested)
|
||||
void FSAreaSearch::getNameFromUUID(const LLUUID& id, std::string& name, bool group, bool& name_requested)
|
||||
{
|
||||
static const std::string unknown_name = LLTrans::getString("AvatarNameWaiting");
|
||||
|
||||
|
|
@ -1127,46 +1137,28 @@ void FSAreaSearch::getNameFromUUID(const LLUUID& id, bool needs_rlva_check, std:
|
|||
else
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(id, &av_name))
|
||||
{
|
||||
if (!needs_rlva_check || !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
name = av_name.getCompleteName();
|
||||
}
|
||||
else
|
||||
{
|
||||
name = RlvStrings::getAnonym(av_name);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!LLAvatarNameCache::get(id, &av_name))
|
||||
{
|
||||
name = unknown_name;
|
||||
if (std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end())
|
||||
{
|
||||
mNamesRequested.push_back(id);
|
||||
boost::signals2::connection cb_connection = LLAvatarNameCache::get(id, boost::bind(&FSAreaSearch::avatarNameCacheCallback, this, _1, _2, needs_rlva_check));
|
||||
boost::signals2::connection cb_connection = LLAvatarNameCache::get(id, boost::bind(&FSAreaSearch::avatarNameCacheCallback, this, _1, _2));
|
||||
mNameCacheConnections.insert(std::make_pair(id, cb_connection)); // mNamesRequested will do the dupe check
|
||||
}
|
||||
name_requested = true;
|
||||
}
|
||||
else
|
||||
name = av_name.getCompleteName();
|
||||
}
|
||||
}
|
||||
|
||||
void FSAreaSearch::avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name, bool needs_rlva_check)
|
||||
void FSAreaSearch::avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name)
|
||||
{
|
||||
std::string name;
|
||||
if (!needs_rlva_check || !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
name = av_name.getCompleteName();
|
||||
}
|
||||
else
|
||||
{
|
||||
name = RlvStrings::getAnonym(av_name);
|
||||
}
|
||||
callbackLoadFullName(id, name);
|
||||
callbackLoadFullName(id, av_name.getCompleteName());
|
||||
}
|
||||
|
||||
void FSAreaSearch::callbackLoadFullName(const LLUUID& id, const std::string& full_name)
|
||||
void FSAreaSearch::callbackLoadFullName(const LLUUID& id, const std::string& full_name )
|
||||
{
|
||||
auto iter = mNameCacheConnections.find(id);
|
||||
if (iter != mNameCacheConnections.end())
|
||||
|
|
@ -1193,7 +1185,7 @@ void FSAreaSearch::callbackLoadFullName(const LLUUID& id, const std::string& ful
|
|||
}
|
||||
}
|
||||
|
||||
mPanelList->updateName(id, full_name);
|
||||
mPanelList->updateName(id, full_name);
|
||||
}
|
||||
|
||||
void FSAreaSearch::updateCounterText()
|
||||
|
|
@ -1613,7 +1605,7 @@ void FSPanelAreaSearchList::updateName(const LLUUID& id, const std::string& name
|
|||
if (owner_column && (id == details.owner_id))
|
||||
{
|
||||
LLScrollListText* owner_text = (LLScrollListText*)item->getColumn(owner_column->mIndex);
|
||||
owner_text->setText(name);
|
||||
owner_text->setText(RLVa_hideNameIfRestricted(name));
|
||||
mResultList->setNeedsSort();
|
||||
}
|
||||
|
||||
|
|
@ -1627,7 +1619,7 @@ void FSPanelAreaSearchList::updateName(const LLUUID& id, const std::string& name
|
|||
if (last_owner_column && (id == details.last_owner_id))
|
||||
{
|
||||
LLScrollListText* last_owner_text = (LLScrollListText*)item->getColumn(last_owner_column->mIndex);
|
||||
last_owner_text->setText(name);
|
||||
last_owner_text->setText(RLVa_hideNameIfRestricted(name));
|
||||
mResultList->setNeedsSort();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public:
|
|||
virtual void draw();
|
||||
virtual void onOpen(const LLSD& key);
|
||||
|
||||
void avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name, bool needs_rlva_check);
|
||||
void avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name);
|
||||
void callbackLoadFullName(const LLUUID& id, const std::string& full_name);
|
||||
void processObjectProperties(LLMessageSystem* msg);
|
||||
void updateObjectCosts(const LLUUID& object_id, F32 object_cost, F32 link_cost, F32 physics_cost, F32 link_physics_cost);
|
||||
|
|
@ -172,7 +172,7 @@ public:
|
|||
private:
|
||||
void requestObjectProperties(const std::vector< U32 >& request_list, bool select, LLViewerRegion* regionp);
|
||||
void matchObject(FSObjectProperties& details, LLViewerObject* objectp);
|
||||
void getNameFromUUID(const LLUUID& id, bool needs_rvla_check, std::string& name, bool group, bool& name_requested);
|
||||
void getNameFromUUID(const LLUUID& id, std::string& name, bool group, bool& name_requested);
|
||||
|
||||
void updateCounterText();
|
||||
bool regexTest(std::string text);
|
||||
|
|
|
|||
|
|
@ -595,9 +595,15 @@ public:
|
|||
mHeaderLayoutStack = getChild<LLLayoutStack>("header_ls");
|
||||
|
||||
mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance());
|
||||
llassert(mInfoCtrl != NULL);
|
||||
mInfoCtrl->setCommitCallback(boost::bind(&FSChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
|
||||
mInfoCtrl->setVisible(FALSE);
|
||||
if (mInfoCtrl)
|
||||
{
|
||||
mInfoCtrl->setCommitCallback(boost::bind(&FSChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
|
||||
mInfoCtrl->setVisible(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS() << "Failed to create an interface element due to missing or corrupted file inspector_info_ctrl.xml" << LL_ENDL;
|
||||
}
|
||||
|
||||
return LLPanel::postBuild();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ constexpr auto SceneType {FSPerfStats::ObjType_t::OT_GENERAL};
|
|||
class FSExceptionsContextMenu : public LLListContextMenu
|
||||
{
|
||||
public:
|
||||
FSExceptionsContextMenu(FSFloaterPerformance* floater_settings)
|
||||
explicit FSExceptionsContextMenu(FSFloaterPerformance* floater_settings)
|
||||
: mFloaterPerformance(floater_settings)
|
||||
{}
|
||||
protected:
|
||||
|
|
@ -250,11 +250,13 @@ void FSFloaterPerformance::draw()
|
|||
|
||||
FSPerfStats::bufferToggleLock.lock(); // prevent toggle for a moment
|
||||
|
||||
auto tot_frame_time_ns = FSPerfStats::raw_to_ns(FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_FRAME));
|
||||
|
||||
auto tot_frame_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_FRAME);
|
||||
// cumulative avatar time (includes idle processing, attachments and base av)
|
||||
auto tot_avatar_time_raw = FSPerfStats::StatsRecorder::getSum(AvType, FSPerfStats::StatType_t::RENDER_COMBINED);
|
||||
// cumulative avatar render specific time (a bit arbitrary as the processing is too.)
|
||||
auto tot_avatar_render_time_raw = tot_avatar_time_raw - FSPerfStats::StatsRecorder::getSum(AvType, FSPerfStats::StatType_t::RENDER_IDLE);
|
||||
// auto tot_av_idle_time_raw = FSPerfStats::StatsRecorder::getSum(AvType, FSPerfStats::StatType_t::RENDER_IDLE);
|
||||
// auto tot_avatar_render_time_raw = tot_avatar_time_raw - tot_av_idle_time_raw;
|
||||
// the time spent this frame on the "display()" call. Treated as "tot time rendering"
|
||||
auto tot_render_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_DISPLAY);
|
||||
// sleep time is basically forced sleep when window out of focus
|
||||
|
|
@ -263,8 +265,8 @@ void FSFloaterPerformance::draw()
|
|||
auto tot_ui_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_UI);
|
||||
// cumulative time spent rendering HUDS
|
||||
auto tot_huds_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_HUDS);
|
||||
// "idle" time. This is the time spent in the idle poll section of the main loop, we DO remove the avatar idle time as the avatar number we display is the total avatar time inclusive of idle processing.
|
||||
auto tot_idle_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_IDLE) - FSPerfStats::StatsRecorder::getSum(AvType, FSPerfStats::StatType_t::RENDER_IDLE);
|
||||
// "idle" time. This is the time spent in the idle poll section of the main loop
|
||||
auto tot_idle_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_IDLE);
|
||||
// similar to sleep time, induced by FPS limit
|
||||
auto tot_limit_time_raw = FSPerfStats::StatsRecorder::getSceneStat(FSPerfStats::StatType_t::RENDER_FPSLIMIT);
|
||||
// swap time is time spent in swap buffer
|
||||
|
|
@ -273,6 +275,7 @@ void FSFloaterPerformance::draw()
|
|||
FSPerfStats::bufferToggleLock.unlock();
|
||||
|
||||
auto unreliable = false; // if there is something to skew the stats such as sleep of fps cap
|
||||
auto tot_frame_time_ns = FSPerfStats::raw_to_ns(tot_frame_time_raw);
|
||||
auto tot_avatar_time_ns = FSPerfStats::raw_to_ns( tot_avatar_time_raw );
|
||||
auto tot_huds_time_ns = FSPerfStats::raw_to_ns( tot_huds_time_raw );
|
||||
// UI time includes HUD time so dedut that before we calc percentages
|
||||
|
|
@ -282,10 +285,10 @@ void FSFloaterPerformance::draw()
|
|||
// auto tot_limit_time_ns = FSPerfStats::raw_to_ns( tot_limit_time_raw );
|
||||
|
||||
// auto tot_render_time_ns = FSPerfStats::raw_to_ns( tot_render_time_raw );
|
||||
auto tot_idle_time_ns = FSPerfStats::raw_to_ns( tot_idle_time_raw );
|
||||
auto tot_swap_time_ns = FSPerfStats::raw_to_ns( tot_swap_time_raw );
|
||||
auto tot_scene_time_ns = FSPerfStats::raw_to_ns( tot_render_time_raw - tot_avatar_render_time_raw - tot_swap_time_raw - tot_ui_time_raw);
|
||||
|
||||
auto tot_idle_time_ns = FSPerfStats::raw_to_ns( tot_idle_time_raw );
|
||||
auto tot_swap_time_ns = FSPerfStats::raw_to_ns( tot_swap_time_raw );
|
||||
auto tot_scene_time_ns = FSPerfStats::raw_to_ns( tot_render_time_raw - tot_avatar_time_raw - tot_swap_time_raw - tot_ui_time_raw);
|
||||
// auto tot_overhead_time_ns = FSPerfStats::raw_to_ns( tot_frame_time_raw - tot_render_time_raw - tot_idle_time_raw );
|
||||
|
||||
// // remove time spent sleeping for fps limit or out of focus.
|
||||
// tot_frame_time_ns -= tot_limit_time_ns;
|
||||
|
|
|
|||
|
|
@ -1540,6 +1540,22 @@ void FSLSLPreprocessor::start_process()
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// FIRE-31718: Preprocessor crashes viewer on recursive #include
|
||||
|
||||
// Truncate the resulting preprocessed script to something the text field can handle without
|
||||
// freezing for so long the viewer disconnects. The usual script source code limit is 64kB so
|
||||
// let's play it safe and allow twice as much here. The script is most likely already unusable
|
||||
// at this point due to the preprocessor bailing out with an error earlier, so a truncated
|
||||
// version doesn't hurt more than it already did.
|
||||
if (output.size() > 128 * 1024)
|
||||
{
|
||||
output.resize(128 * 1024);
|
||||
display_error(LLTrans::getString("fs_preprocessor_truncated"));
|
||||
}
|
||||
}
|
||||
|
||||
if (!errored)
|
||||
{
|
||||
if (preprocessor_enabled && use_compression)
|
||||
|
|
|
|||
|
|
@ -222,14 +222,14 @@ namespace FSPerfStats
|
|||
|
||||
// clean the write maps in all cases.
|
||||
auto& statsTypeMatrix = statsDoubleBuffer[writeBuffer];
|
||||
for(auto& statsMap : statsTypeMatrix)
|
||||
for(auto& statsMapByType : statsTypeMatrix)
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_STATS("Clear stats maps");
|
||||
for(auto& stat_entry : statsMap)
|
||||
for(auto& stat_entry : statsMapByType)
|
||||
{
|
||||
std::fill_n(stat_entry.second.begin() ,static_cast<size_t>(ST::STATS_COUNT),0);
|
||||
}
|
||||
statsMap.clear();
|
||||
statsMapByType.clear();
|
||||
}
|
||||
for(int i=0; i< static_cast<size_t>(ObjType_t::OT_COUNT); i++)
|
||||
{
|
||||
|
|
@ -363,7 +363,7 @@ namespace FSPerfStats
|
|||
// if so we've got work to do
|
||||
|
||||
// how much of the frame was spent on non avatar related work?
|
||||
U32 non_avatar_time_raw = tot_frame_time_raw - tot_avatar_time_raw;
|
||||
U64 non_avatar_time_raw = tot_frame_time_raw - tot_avatar_time_raw;
|
||||
|
||||
// If the target frame time < scene time (estimated as non_avatar time)
|
||||
U64 target_avatar_time_raw;
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@
|
|||
#ifdef TRACY_ENABLE
|
||||
// USAGE_TRACKING - displays overlapping stats that may imply double counting.
|
||||
// ATTACHMENT_TRACKING - displays detailed tracking info for Avatar and Attachment. very heavy overhead.
|
||||
// #define USAGE_TRACKING
|
||||
// #define ATTACHMENT_TRACKING
|
||||
#define USAGE_TRACKING
|
||||
#define ATTACHMENT_TRACKING
|
||||
#else
|
||||
#undef USAGE_TRACKING
|
||||
#undef ATTACHMENT_TRACKING
|
||||
|
|
@ -183,19 +183,18 @@ namespace FSPerfStats
|
|||
static inline StatsRecorder& getInstance()
|
||||
{
|
||||
static StatsRecorder instance;
|
||||
// volatile int dummy{};
|
||||
return instance;
|
||||
}
|
||||
static inline void setFocusAv(const LLUUID& avID){focusAv = avID;};
|
||||
static inline const LLUUID& getFocusAv(){return (focusAv);};
|
||||
static inline void send(StatsRecord&& u){StatsRecorder::getInstance().q.enqueue(u);};
|
||||
static inline const LLUUID& getFocusAv(){return focusAv;};
|
||||
static inline void send(StatsRecord && upd){StatsRecorder::getInstance().q.enqueue(std::move(upd));};
|
||||
static void endFrame(){StatsRecorder::getInstance().q.enqueue(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 0});};
|
||||
static void clearStats(){StatsRecorder::getInstance().q.enqueue(StatsRecord{StatType_t::RENDER_DONE, ObjType_t::OT_GENERAL, LLUUID::null, LLUUID::null, 1});};
|
||||
|
||||
static inline void setEnabled(bool on_or_off){collectionEnabled=on_or_off;};
|
||||
static inline void enable() { collectionEnabled=true; };
|
||||
static inline void disable() { collectionEnabled=false; };
|
||||
static inline bool enabled() { return(collectionEnabled); };
|
||||
static inline bool enabled() { return collectionEnabled; };
|
||||
|
||||
static inline int getReadBufferIndex() { return (writeBuffer ^ 1); };
|
||||
// static inline const StatsTypeMatrix& getCurrentStatsMatrix(){ return statsDoubleBuffer[getReadBufferIndex()];}
|
||||
|
|
@ -235,7 +234,7 @@ namespace FSPerfStats
|
|||
static bool collectionEnabled;
|
||||
|
||||
|
||||
void processUpdate(const StatsRecord& upd)
|
||||
void processUpdate(const StatsRecord& upd) const
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
|
||||
// LL_INFOS("perfstats") << "processing update:" << LL_ENDL;
|
||||
|
|
@ -286,13 +285,15 @@ namespace FSPerfStats
|
|||
|
||||
if (ot == ObjType_t::OT_ATTACHMENT)
|
||||
{
|
||||
if( !upd.isRigged && !upd.isHUD )
|
||||
if( !upd.isHUD ) // don't include HUD cost in self.
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED("Att as Av")
|
||||
// For all attachments that are not rigged we add them to the avatar (for all avatars) cost.
|
||||
doUpd(avKey, ObjType_t::OT_AVATAR, type, val);
|
||||
}
|
||||
if( avKey == focusAv )
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED("Att as Att")
|
||||
// For attachments that are for the focusAv (self for now) we record them for the attachment/complexity view
|
||||
if(upd.isHUD)
|
||||
{
|
||||
|
|
@ -301,10 +302,10 @@ namespace FSPerfStats
|
|||
// LL_INFOS("perfstats") << "frame: " << gFrameCount << " Attachment update("<< (type==StatType_t::RENDER_GEOMETRY?"GEOMETRY":"SHADOW") << ": " << key.asString() << " = " << val << LL_ENDL;
|
||||
doUpd(key, ot, type, val);
|
||||
}
|
||||
else
|
||||
{
|
||||
// LL_INFOS("perfstats") << "frame: " << gFrameCount << " non-self Att update("<< (type==StatType_t::RENDER_GEOMETRY?"GEOMETRY":"SHADOW") << ": " << key.asString() << " = " << val << " for av " << avKey.asString() << LL_ENDL;
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// // LL_INFOS("perfstats") << "frame: " << gFrameCount << " non-self Att update("<< (type==StatType_t::RENDER_GEOMETRY?"GEOMETRY":"SHADOW") << ": " << key.asString() << " = " << val << " for av " << avKey.asString() << LL_ENDL;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -338,12 +339,13 @@ namespace FSPerfStats
|
|||
static void run()
|
||||
{
|
||||
StatsRecord upd[10];
|
||||
auto& instance {StatsRecorder::getInstance()};
|
||||
LL_PROFILER_THREAD_BEGIN("PerfStats");
|
||||
auto & instance {StatsRecorder::getInstance()};
|
||||
LL_PROFILER_SET_THREAD_NAME("PerfStats");
|
||||
|
||||
while( enabled() && !LLApp::isExiting() )
|
||||
{
|
||||
auto count = instance.q.wait_dequeue_bulk_timed(upd, 10, std::chrono::milliseconds(10));
|
||||
LL_PROFILER_THREAD_BEGIN("PerfStats");
|
||||
if(count)
|
||||
{
|
||||
// LL_INFOS("perfstats") << "processing " << count << " updates." << LL_ENDL;
|
||||
|
|
@ -352,8 +354,8 @@ namespace FSPerfStats
|
|||
instance.processUpdate(upd[i]);
|
||||
}
|
||||
}
|
||||
LL_PROFILER_THREAD_END("PerfStats");
|
||||
}
|
||||
LL_PROFILER_THREAD_END("PerfStats");
|
||||
}
|
||||
|
||||
Queue q;
|
||||
|
|
@ -384,7 +386,7 @@ namespace FSPerfStats
|
|||
#ifdef USAGE_TRACKING
|
||||
if(stat.objType == FSPerfStats::ObjType_t::OT_ATTACHMENT)
|
||||
{
|
||||
if(!stat.isRigged && FSPerfStats::inUseAvatar){FSZoneText("OVERLAP AVATAR",14);}
|
||||
if(!stat.isRigged && FSPerfStats::inUseAvatar){LL_PROFILE_ZONE_TEXT("OVERLAP AVATAR",14);}
|
||||
|
||||
LL_PROFILE_PLOT_SQ("InUse", (int64_t)FSPerfStats::inUse, (int64_t)FSPerfStats::inUse+1);
|
||||
FSPerfStats::inUse++;
|
||||
|
|
@ -407,7 +409,7 @@ namespace FSPerfStats
|
|||
|
||||
template < ObjType_t OD = ObjTypeDiscriminator,
|
||||
std::enable_if_t<OD == ObjType_t::OT_GENERAL> * = nullptr>
|
||||
RecordTime( StatType_t type ):RecordTime<ObjTypeDiscriminator>(LLUUID::null, LLUUID::null, type )
|
||||
explicit RecordTime( StatType_t type ):RecordTime<ObjTypeDiscriminator>(LLUUID::null, LLUUID::null, type )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
|
||||
#ifdef USAGE_TRACKING
|
||||
|
|
@ -425,7 +427,7 @@ namespace FSPerfStats
|
|||
LL_PROFILE_ZONE_COLOR(tracy::Color::Purple);
|
||||
|
||||
#ifdef USAGE_TRACKING
|
||||
if(FSPerfStats::inUseAvatar){FSZoneText("OVERLAP AVATAR",14);}
|
||||
if(FSPerfStats::inUseAvatar){LL_PROFILE_ZONE_TEXT("OVERLAP AVATAR",14);}
|
||||
|
||||
LL_PROFILE_PLOT_SQ("InUseAv", (int64_t)FSPerfStats::inUseAvatar, (int64_t)FSPerfStats::inUseAvatar+1);
|
||||
FSPerfStats::inUseAvatar++;
|
||||
|
|
@ -502,6 +504,7 @@ namespace FSPerfStats
|
|||
|
||||
// helper functions
|
||||
using RATptr = std::unique_ptr<FSPerfStats::RecordAttachmentTime>;
|
||||
using RSTptr = std::unique_ptr<FSPerfStats::RecordSceneTime>;
|
||||
|
||||
template <typename T>
|
||||
static inline void trackAttachments(const T * vobj, bool isRigged, RATptr* ratPtrp)
|
||||
|
|
@ -542,11 +545,12 @@ static inline void trackAttachments(const T * vobj, bool isRigged, RATptr* ratPt
|
|||
// deliberately reset to ensure destruction before construction of replacement.
|
||||
ratPtrp->reset();
|
||||
};
|
||||
*ratPtrp = std::make_unique<FSPerfStats::RecordAttachmentTime>( av,
|
||||
obj,
|
||||
( (LLPipeline::sShadowRender)?FSPerfStats::StatType_t::RENDER_SHADOWS : FSPerfStats::StatType_t::RENDER_GEOMETRY ),
|
||||
isRigged,
|
||||
rootAtt->isHUDAttachment());
|
||||
*ratPtrp = std::make_unique<FSPerfStats::RecordAttachmentTime>(
|
||||
av,
|
||||
obj,
|
||||
( LLPipeline::sShadowRender?FSPerfStats::StatType_t::RENDER_SHADOWS : FSPerfStats::StatType_t::RENDER_GEOMETRY ),
|
||||
isRigged,
|
||||
rootAtt->isHUDAttachment());
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ if [[ -f "$CONFIG_FILE" ]]; then
|
|||
zip_file=${app_file/app/zip}
|
||||
ditto -c -k --keepParent "$app_file" "$zip_file"
|
||||
if [[ -f "$zip_file" ]]; then
|
||||
res=$(xcrun altool --notarize-app --primary-bundle-id "com.secondlife.viewer" \
|
||||
res=$(xcrun altool --notarize-app --primary-bundle-id "org.firestormviewer.firestorm" \
|
||||
--username $USERNAME \
|
||||
--password $PASSWORD \
|
||||
--asc-provider $ASC_PROVIDER \
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Terminal=false\n\
|
|||
Type=Application\n\
|
||||
Categories=Application;Internet;Network;\n\
|
||||
StartupNotify=true\n\
|
||||
X-Desktop-File-Install-Version=3.0\n
|
||||
X-Desktop-File-Install-Version=3.0\n\
|
||||
StartupWMClass=do-not-directly-run-firestorm-bin"
|
||||
|
||||
echo " - Installing menu entries in ${desktop_entries_dir}"
|
||||
|
|
|
|||
|
|
@ -829,6 +829,12 @@ void LLAgent::moveYaw(F32 mag, bool reset_view)
|
|||
setControlFlags(AGENT_CONTROL_YAW_NEG);
|
||||
}
|
||||
|
||||
U32 mask = AGENT_CONTROL_YAW_POS | AGENT_CONTROL_YAW_NEG;
|
||||
if ((getControlFlags() & mask) == mask)
|
||||
{
|
||||
gAgentCamera.setYawKey(0);
|
||||
}
|
||||
|
||||
if (reset_view)
|
||||
{
|
||||
// <FS:CR> FIRE-8798: Option to prevent camera reset on movement
|
||||
|
|
@ -2439,6 +2445,27 @@ void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32
|
|||
//
|
||||
|
||||
gAgentCamera.updateLookAt(mouse_x, mouse_y);
|
||||
|
||||
// When agent has no parents, position updates come from setPositionAgent()
|
||||
// But when agent has a parent (ex: is seated), position remains unchanged
|
||||
// relative to parent and no parent's position update trigger
|
||||
// setPositionAgent().
|
||||
// But EEP's sky track selection still needs an update if agent has a parent
|
||||
// and parent moves (ex: vehicles).
|
||||
if (isAgentAvatarValid()
|
||||
&& gAgentAvatarp->getParent()
|
||||
&& !mOnPositionChanged.empty()
|
||||
)
|
||||
{
|
||||
LLVector3d new_position = getPositionGlobal();
|
||||
if ((mLastTestGlobal - new_position).lengthSquared() > 1.0)
|
||||
{
|
||||
// If the position has changed by more than 1 meter since the last time we triggered.
|
||||
// filters out some noise.
|
||||
mLastTestGlobal = new_position;
|
||||
mOnPositionChanged(mFrameAgent.getOrigin(), new_position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// friends and operators
|
||||
|
|
|
|||
|
|
@ -434,10 +434,9 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
|
|||
LLQuaternion obj_rot = object->getRenderRotation();
|
||||
LLVector3 obj_pos = object->getRenderPosition();
|
||||
|
||||
BOOL is_avatar = object->isAvatar();
|
||||
// if is avatar - don't do any funk heuristics to position the focal point
|
||||
// see DEV-30589
|
||||
if (is_avatar)
|
||||
if (object->isAvatar() || (object->isAnimatedObject() && object->getControlAvatar()))
|
||||
{
|
||||
return original_focus_point - obj_pos;
|
||||
}
|
||||
|
|
@ -562,7 +561,6 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
|
|||
// or keep the focus point in the object middle when (relatively) far
|
||||
// NOTE: leave focus point in middle of avatars, since the behavior you want when alt-zooming on avatars
|
||||
// is almost always "tumble about middle" and not "spin around surface point"
|
||||
if (!is_avatar)
|
||||
{
|
||||
LLVector3 obj_rel = original_focus_point - object->getRenderPosition();
|
||||
|
||||
|
|
@ -1521,7 +1519,7 @@ void LLAgentCamera::updateCamera()
|
|||
|
||||
F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE);
|
||||
|
||||
if (!mFocusObject) // we differentiate on avatar mode
|
||||
if (mFocusOnAvatar && !mFocusObject) // we differentiate on avatar mode
|
||||
{
|
||||
// for avatar-relative focus, we smooth in avatar space -
|
||||
// the avatar moves too jerkily w/r/t global space to smooth there.
|
||||
|
|
@ -3266,7 +3264,13 @@ S32 LLAgentCamera::directionToKey(S32 direction)
|
|||
void LLAgentCamera::storeCameraPosition()
|
||||
{
|
||||
gSavedPerAccountSettings.setVector3d("FSStoredCameraPos", getCameraPositionGlobal());
|
||||
gSavedPerAccountSettings.setVector3d("FSStoredCameraFocus", getFocusTargetGlobal());
|
||||
|
||||
// get a vector pointing forward from the camera view manually, getFocusTargetGlobal() will
|
||||
// not return useful values if the camera is in flycam mode or was just switched out of
|
||||
// flycam mode and not repositioned after
|
||||
LLVector3d forward = LLVector3d(1.0, 0.0, 0.0) * LLViewerCamera::getInstance()->getQuaternion() + getCameraPositionGlobal();
|
||||
gSavedPerAccountSettings.setVector3d("FSStoredCameraFocus", forward);
|
||||
|
||||
LLUUID stored_camera_focus_object_id = LLUUID::null;
|
||||
if (mFocusObject)
|
||||
{
|
||||
|
|
@ -3296,6 +3300,15 @@ void LLAgentCamera::loadCameraPosition()
|
|||
return;
|
||||
}
|
||||
|
||||
// switch off flycam mode if needed
|
||||
if (LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||
{
|
||||
handle_toggle_flycam();
|
||||
|
||||
// exiting from flycam usually keeps the camera where it is but here we want it to actually move
|
||||
LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true);
|
||||
}
|
||||
|
||||
unlockView();
|
||||
setCameraPosAndFocusGlobal(stored_camera_pos, stored_camera_focus, stored_camera_focus_object_id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "llgesturemgr.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorymodelbackgroundfetch.h"
|
||||
#include "llinventoryobserver.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "lllocaltextureobject.h"
|
||||
|
|
@ -1755,6 +1756,14 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!item->isFinished())
|
||||
{
|
||||
LL_WARNS() << "Tried to edit wearable that isn't loaded" << LL_ENDL;
|
||||
// Restart fetch or put item to the front
|
||||
LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false);
|
||||
return;
|
||||
}
|
||||
|
||||
LLViewerWearable* wearable = gAgentWearables.getWearableFromItemID(item_id);
|
||||
if (!wearable)
|
||||
{
|
||||
|
|
@ -1768,6 +1777,18 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
|
|||
return;
|
||||
}
|
||||
|
||||
S32 shape_count = gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE);
|
||||
S32 hair_count = gAgentWearables.getWearableCount(LLWearableType::WT_HAIR);
|
||||
S32 eye_count = gAgentWearables.getWearableCount(LLWearableType::WT_EYES);
|
||||
S32 skin_count = gAgentWearables.getWearableCount(LLWearableType::WT_SKIN);
|
||||
if (!shape_count || !hair_count || !eye_count || !skin_count)
|
||||
{
|
||||
// Don't let user edit wearables if avatar is cloud due to missing parts.
|
||||
// Let user edit wearables if avatar is cloud due to missing textures.
|
||||
LL_WARNS() << "Cannot modify wearable. Avatar is cloud and missing parts." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
|
||||
LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
|
||||
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
|
||||
|
|
|
|||
|
|
@ -652,8 +652,8 @@ static void settings_modify()
|
|||
LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred || (gSavedSettings.getBOOL("WindLightUseAtmosShaders") && LLPipeline::sUseDepthTexture);
|
||||
// [/RLVa:KB]
|
||||
LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor");
|
||||
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
|
||||
gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
|
||||
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; // square lod factor to get exponential range of [1,4]
|
||||
gDebugGL = gDebugGLSession || gDebugSession;
|
||||
gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline");
|
||||
}
|
||||
|
||||
|
|
@ -1328,7 +1328,8 @@ bool LLAppViewer::init()
|
|||
|
||||
// <FS:Ansariel> Disable updater
|
||||
//#if LL_RELEASE_FOR_DOWNLOAD
|
||||
// if (!gSavedSettings.getBOOL("CmdLineSkipUpdater"))
|
||||
// // Skip updater if this is a non-interactive instance
|
||||
// if (!gSavedSettings.getBOOL("CmdLineSkipUpdater") && !gNonInteractive)
|
||||
// {
|
||||
// LLProcess::Params updater;
|
||||
// updater.desc = "updater process";
|
||||
|
|
@ -1522,11 +1523,6 @@ void LLAppViewer::initMaxHeapSize()
|
|||
#else
|
||||
F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize64");
|
||||
#endif
|
||||
// <FS:Ansariel> Enable low memory checks on 32bit builds
|
||||
#if ADDRESS_SIZE == 64
|
||||
max_heap_size_gb = F32Gigabytes(128);
|
||||
#endif
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLMemory::initMaxHeapSizeGB(max_heap_size_gb);
|
||||
}
|
||||
|
|
@ -1649,9 +1645,9 @@ bool LLAppViewer::doFrame()
|
|||
// </FS:Beq>
|
||||
// <FS:Ansariel> FIRE-22297: FPS limiter not working properly on Mac/Linux
|
||||
LLTimer frameTimer;
|
||||
{FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE); // <FS:Beq/> perf stats
|
||||
|
||||
nd::etw::logFrame(); // <FS:ND> Write the start of each frame. Even if our Provider (Firestorm) would be enabled, this has only light impact. Does nothing on OSX and Linux.
|
||||
{FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE); // <FS:Beq/> perf stats
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df LLTrace");
|
||||
if (LLFloaterReg::instanceVisible("block_timers"))
|
||||
|
|
@ -1667,9 +1663,9 @@ bool LLAppViewer::doFrame()
|
|||
|
||||
//clear call stack records
|
||||
LL_CLEAR_CALLSTACKS();
|
||||
} // <FS:Beq/> perf stats
|
||||
} // <FS:Beq/> perf stats (close NonRender/IDLE tracking starting at event pump)
|
||||
{
|
||||
{FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE); // <FS:Beq> ensure we have the entire top scope of frame covered
|
||||
{FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE); // <FS:Beq> ensure we have the entire top scope of frame covered (input event and coro)
|
||||
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df processMiscNativeEvents" )
|
||||
pingMainloopTimeout("Main:MiscNativeWindowEvents");
|
||||
|
|
@ -1717,7 +1713,7 @@ bool LLAppViewer::doFrame()
|
|||
// give listeners a chance to run
|
||||
llcoro::suspend();
|
||||
}
|
||||
}// <FS:Beq> ensure we have the entire top scope of frame covered
|
||||
}// <FS:Beq> ensure we have the entire top scope of frame covered (close input event and coro "idle")
|
||||
|
||||
if (!LLApp::isExiting())
|
||||
{
|
||||
|
|
@ -1751,12 +1747,12 @@ bool LLAppViewer::doFrame()
|
|||
|
||||
// Update state based on messages, user input, object idle.
|
||||
{
|
||||
FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE);
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_APP( "df pauseMainloopTimeout" )
|
||||
pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds!
|
||||
}
|
||||
|
||||
{
|
||||
FSPerfStats::RecordSceneTime T (FSPerfStats::StatType_t::RENDER_IDLE);
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df idle"); //LL_RECORD_BLOCK_TIME(FTM_IDLE);
|
||||
idle();
|
||||
}
|
||||
|
|
@ -3263,6 +3259,15 @@ bool LLAppViewer::initConfiguration()
|
|||
ll_init_fail_log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "test_failures.log"));
|
||||
}
|
||||
|
||||
if (gSavedSettings.getBOOL("RenderDebugGLSession"))
|
||||
{
|
||||
gDebugGLSession = TRUE;
|
||||
gDebugGL = TRUE;
|
||||
// gDebugGL can cause excessive logging
|
||||
// so it's limited to a single session
|
||||
gSavedSettings.setBOOL("RenderDebugGLSession", FALSE);
|
||||
}
|
||||
|
||||
// <FS:TT> Hacking to save the skin and theme for future use.
|
||||
mCurrentSkin = gSavedSettings.getString("SkinCurrent");
|
||||
mCurrentSkinTheme = gSavedSettings.getString("SkinCurrentTheme");
|
||||
|
|
@ -3732,6 +3737,11 @@ bool LLAppViewer::isUpdaterMissing()
|
|||
return mUpdaterNotFound;
|
||||
}
|
||||
|
||||
bool LLAppViewer::waitForUpdater()
|
||||
{
|
||||
return !gSavedSettings.getBOOL("CmdLineSkipUpdater") && !mUpdaterNotFound && !gNonInteractive;
|
||||
}
|
||||
|
||||
void LLAppViewer::writeDebugInfo(bool isStatic)
|
||||
{
|
||||
#if LL_WINDOWS && LL_BUGSPLAT
|
||||
|
|
@ -3894,9 +3904,28 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
info["GRAPHICS_CARD_MEMORY"] = gGLManager.mVRAM;
|
||||
|
||||
#if LL_WINDOWS
|
||||
// <FS:Ansariel> FIRE-8264: System info displays wrong driver version on Optimus systems
|
||||
//std::string drvinfo = gDXHardware.getDriverVersionWMI();
|
||||
std::string drvinfo = gDXHardware.getDriverVersionWMI(gGLManager.mGLVendorShort);
|
||||
std::string drvinfo;
|
||||
|
||||
if (gGLManager.mIsIntel)
|
||||
{
|
||||
drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_INTEL);
|
||||
}
|
||||
else if (gGLManager.mIsNVIDIA)
|
||||
{
|
||||
drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_NVIDIA);
|
||||
}
|
||||
else if (gGLManager.mIsAMD)
|
||||
{
|
||||
drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_AMD);
|
||||
}
|
||||
|
||||
if (drvinfo.empty())
|
||||
{
|
||||
// Generic/substitute windows driver? Unknown vendor?
|
||||
LL_WARNS("DriverVersion") << "Vendor based driver search failed, searching for any driver" << LL_ENDL;
|
||||
drvinfo = gDXHardware.getDriverVersionWMI(LLDXHardware::GPU_ANY);
|
||||
}
|
||||
|
||||
if (!drvinfo.empty())
|
||||
{
|
||||
info["GRAPHICS_DRIVER_VERSION"] = drvinfo;
|
||||
|
|
@ -5731,6 +5760,13 @@ void LLAppViewer::idle()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Update layonts, handle mouse events, tooltips, e t c
|
||||
// updateUI() needs to be called even in case viewer disconected
|
||||
// since related notification still needs handling and allows
|
||||
// opening chat.
|
||||
gViewerWindow->updateUI();
|
||||
|
||||
if (gDisconnected)
|
||||
{
|
||||
// <FS:CR> Inworldz hang in disconnecting fix by McCabe Maxstead
|
||||
|
|
@ -5743,8 +5779,6 @@ void LLAppViewer::idle()
|
|||
return;
|
||||
}
|
||||
|
||||
gViewerWindow->updateUI();
|
||||
|
||||
if (gTeleportDisplay)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public:
|
|||
bool logoutRequestSent() { return mLogoutRequestSent; }
|
||||
bool isSecondInstance() { return mSecondInstance; }
|
||||
bool isUpdaterMissing(); // In use by tests
|
||||
bool waitForUpdater();
|
||||
|
||||
void writeDebugInfo(bool isStatic=true);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "llmutelist.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp)
|
||||
// <FS:CR> FIRE-10512 - Sound explorer fix by Sei Lisa
|
||||
|
|
@ -144,11 +145,36 @@ void LLAudioSourceVO::updateMute()
|
|||
LLVector3d pos_global = getPosGlobal();
|
||||
|
||||
F32 cutoff = mObjectp->getSoundCutOffRadius();
|
||||
if ((cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff)) // consider cutoff below 0.1m as off
|
||||
|| !LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
|
||||
{
|
||||
mute = true;
|
||||
}
|
||||
// Object can specify radius at which it turns off
|
||||
// consider cutoff below 0.1m as 'cutoff off'
|
||||
if (cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff))
|
||||
{
|
||||
mute = true;
|
||||
}
|
||||
// check if parcel allows sounds to pass border
|
||||
else if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
|
||||
{
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||
{
|
||||
// Check if agent is riding this object
|
||||
// Agent can ride something out of region border and canHearSound
|
||||
// will treat object as not being part of agent's parcel.
|
||||
LLViewerObject *sound_root = (LLViewerObject*)mObjectp->getRoot();
|
||||
LLViewerObject *agent_root = (LLViewerObject*)gAgentAvatarp->getRoot();
|
||||
if (sound_root != agent_root)
|
||||
{
|
||||
mute = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "roots identical" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mute = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mute)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -578,9 +578,15 @@ public:
|
|||
mTimeBoxTextBox = getChild<LLTextBox>("time_box");
|
||||
|
||||
mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance());
|
||||
llassert(mInfoCtrl != NULL);
|
||||
mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
|
||||
mInfoCtrl->setVisible(FALSE);
|
||||
if (mInfoCtrl)
|
||||
{
|
||||
mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
|
||||
mInfoCtrl->setVisible(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS() << "Failed to create an interface element due to missing or corrupted file inspector_info_ctrl.xml" << LL_ENDL;
|
||||
}
|
||||
|
||||
return LLPanel::postBuild();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -924,12 +924,14 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
|
|||
LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin();
|
||||
LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box);
|
||||
mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f));
|
||||
LL_DEBUGS("DynamicBox") << volume->getAvatar()->getFullname()
|
||||
<< " pos (ignored) " << pos
|
||||
<< " cam pos " << cam_pos_from_agent
|
||||
<< " box " << av_box[0] << "," << av_box[1]
|
||||
<< " -> dist " << mDistanceWRTCamera
|
||||
<< LL_ENDL;
|
||||
// <FS:Beq> Remove debug that has measurable impact even when disabled.
|
||||
// LL_DEBUGS("DynamicBox") << volume->getAvatar()->getFullname()
|
||||
// << " pos (ignored) " << pos
|
||||
// << " cam pos " << cam_pos_from_agent
|
||||
// << " box " << av_box[0] << "," << av_box[1]
|
||||
// << " -> dist " << mDistanceWRTCamera
|
||||
// << LL_ENDL;
|
||||
// </FS:Beq>
|
||||
mVObjp->updateLOD();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL t
|
|||
LLViewerObject* vobj = pparams->mFace->getViewerObject();
|
||||
if(vobj->isAttachment())
|
||||
{
|
||||
trackAttachments( vobj, pparams->mFace->isState(LLFace::RIGGED),&ratPtr);
|
||||
trackAttachments( vobj, false,&ratPtr);
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
|
@ -422,11 +422,22 @@ void LLRenderPass::renderRiggedGroup(LLSpatialGroup* group, U32 type, U32 mask,
|
|||
U64 lastMeshId = 0;
|
||||
mask |= LLVertexBuffer::MAP_WEIGHT4;
|
||||
|
||||
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{}; // <FS:Beq/> Perf stats
|
||||
for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
|
||||
{
|
||||
LLDrawInfo* pparams = *k;
|
||||
if (pparams)
|
||||
{
|
||||
// <FS:Beq> Capture render times
|
||||
if(pparams->mFace)
|
||||
{
|
||||
LLViewerObject* vobj = pparams->mFace->getViewerObject();
|
||||
if(vobj->isAttachment())
|
||||
{
|
||||
trackAttachments( vobj, true ,&ratPtr);
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
if (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash)
|
||||
{
|
||||
uploadMatrixPalette(*pparams);
|
||||
|
|
@ -454,7 +465,7 @@ void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_text
|
|||
LLViewerObject* vobj = pparams->mFace->getViewerObject();
|
||||
if(vobj->isAttachment())
|
||||
{
|
||||
trackAttachments( vobj, pparams->mFace->isState(LLFace::RIGGED),&ratPtr);
|
||||
trackAttachments( vobj, false, &ratPtr);
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
|
@ -469,11 +480,22 @@ void LLRenderPass::pushRiggedBatches(U32 type, U32 mask, BOOL texture, BOOL batc
|
|||
LLVOAvatar* lastAvatar = nullptr;
|
||||
U64 lastMeshId = 0;
|
||||
mask |= LLVertexBuffer::MAP_WEIGHT4;
|
||||
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{}; // <FS:Beq/> Perf stats
|
||||
for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
|
||||
{
|
||||
LLDrawInfo* pparams = *i;
|
||||
if (pparams)
|
||||
{
|
||||
// <FS:Beq> Capture render times
|
||||
if(pparams->mFace)
|
||||
{
|
||||
LLViewerObject* vobj = pparams->mFace->getViewerObject();
|
||||
if(vobj->isAttachment())
|
||||
{
|
||||
trackAttachments( vobj, true, &ratPtr);
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
if (pparams->mAvatar.notNull() && (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash))
|
||||
{
|
||||
uploadMatrixPalette(*pparams);
|
||||
|
|
@ -501,7 +523,7 @@ void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_
|
|||
LLViewerObject* vobj = (*pparams).mFace->getViewerObject();
|
||||
if(vobj->isAttachment())
|
||||
{
|
||||
trackAttachments( vobj, (*pparams).mFace->isState(LLFace::RIGGED),&ratPtr);
|
||||
trackAttachments( vobj, false, &ratPtr);
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
|
@ -516,11 +538,22 @@ void LLRenderPass::pushRiggedMaskBatches(U32 type, U32 mask, BOOL texture, BOOL
|
|||
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
|
||||
LLVOAvatar* lastAvatar = nullptr;
|
||||
U64 lastMeshId = 0;
|
||||
std::unique_ptr<FSPerfStats::RecordAttachmentTime> ratPtr{};
|
||||
for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
|
||||
{
|
||||
LLDrawInfo* pparams = *i;
|
||||
if (pparams)
|
||||
{
|
||||
// <FS:Beq> Capture render times
|
||||
if((*pparams).mFace)
|
||||
{
|
||||
LLViewerObject* vobj = (*pparams).mFace->getViewerObject();
|
||||
if(vobj->isAttachment())
|
||||
{
|
||||
trackAttachments( vobj, true, &ratPtr);
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
if (LLGLSLShader::sCurBoundShaderPtr)
|
||||
{
|
||||
LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@
|
|||
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
#endif
|
||||
|
||||
extern BOOL gGLDebugLoggingEnabled;
|
||||
#define LL_MAX_INDICES_COUNT 1000000
|
||||
|
||||
static LLStaticHashedString sTextureIndexIn("texture_index_in");
|
||||
|
|
@ -1085,22 +1084,12 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po
|
|||
}
|
||||
|
||||
const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset);
|
||||
|
||||
if( !vf.mNormals )
|
||||
if (! (vf.mNormals && vf.mTangents))
|
||||
{
|
||||
LL_WARNS( ) << "Volume face without normal vector (object id: " << getViewerObject()->getID().asString() << ")" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if( !vf.mTangents )
|
||||
{
|
||||
LL_WARNS() << "Volume face without tangent (object id: " << getViewerObject()->getID().asString() << ")" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
const LLVector4a& normal4a = vf.mNormals[0];
|
||||
const LLVector4a& tangent = vf.mTangents[0];
|
||||
const LLVector4a& normal4a = *vf.mNormals;
|
||||
const LLVector4a& tangent = *vf.mTangents;
|
||||
|
||||
LLVector4a binormal4a;
|
||||
binormal4a.setCross3(normal4a, tangent);
|
||||
|
|
@ -1634,7 +1623,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
!rebuild_weights && //TODO: add support for weights
|
||||
!volume.isUnique()) //source volume is NOT flexi
|
||||
{ //use transform feedback to pack vertex buffer
|
||||
//gGLDebugLoggingEnabled = TRUE;
|
||||
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_FACE("getGeometryVolume - transform feedback");
|
||||
LLGLEnable discard(GL_RASTERIZER_DISCARD);
|
||||
|
|
|
|||
|
|
@ -919,6 +919,14 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
|
|||
}
|
||||
LLFavoritesOrderStorage::instance().mPrevFavorites = mItems;
|
||||
mGetPrevItems = false;
|
||||
|
||||
if (LLFavoritesOrderStorage::instance().isStorageUpdateNeeded())
|
||||
{
|
||||
if (!mItemsChangedTimer.getStarted())
|
||||
{
|
||||
mItemsChangedTimer.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const LLButton::Params& button_params = getButtonParams();
|
||||
|
|
@ -1782,7 +1790,7 @@ void LLFavoritesOrderStorage::destroyClass()
|
|||
file.close();
|
||||
LLFile::remove(filename);
|
||||
}
|
||||
if(mSaveOnExit)
|
||||
if(mSaveOnExit || gSavedSettings.getBOOL("UpdateRememberPasswordSetting"))
|
||||
{
|
||||
LLFavoritesOrderStorage::instance().saveFavoritesRecord(true);
|
||||
}
|
||||
|
|
@ -1826,7 +1834,6 @@ void LLFavoritesOrderStorage::load()
|
|||
llifstream in_file;
|
||||
in_file.open(filename.c_str());
|
||||
LLSD fav_llsd;
|
||||
LLSD user_llsd;
|
||||
if (in_file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXML(fav_llsd, in_file);
|
||||
|
|
@ -1837,16 +1844,16 @@ void LLFavoritesOrderStorage::load()
|
|||
// <FS:Ansariel> FIRE-10122 - User@grid stored_favorites.xml
|
||||
//if (fav_llsd.isMap() && fav_llsd.has(gAgentUsername))
|
||||
//{
|
||||
// user_llsd = fav_llsd[gAgentUsername];
|
||||
// mStorageFavorites = fav_llsd[gAgentUsername];
|
||||
if (fav_llsd.isMap() && fav_llsd.has(gAgentUsername + " @ " + LLGridManager::getInstance()->getGridLabel()))
|
||||
{
|
||||
user_llsd = fav_llsd[gAgentUsername + " @ " + LLGridManager::getInstance()->getGridLabel()];
|
||||
mStorageFavorites = fav_llsd[gAgentUsername + " @ " + LLGridManager::getInstance()->getGridLabel()];
|
||||
// </FS:Ansariel>
|
||||
|
||||
S32 index = 0;
|
||||
bool needs_validation = gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin");
|
||||
for (LLSD::array_iterator iter = user_llsd.beginArray();
|
||||
iter != user_llsd.endArray(); ++iter)
|
||||
for (LLSD::array_iterator iter = mStorageFavorites.beginArray();
|
||||
iter != mStorageFavorites.endArray(); ++iter)
|
||||
{
|
||||
// Validation
|
||||
LLUUID fv_id = iter->get("id").asUUID();
|
||||
|
|
@ -2161,7 +2168,7 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
|
|||
}
|
||||
}
|
||||
|
||||
if((items != mPrevFavorites) || name_changed || pref_changed)
|
||||
if((items != mPrevFavorites) || name_changed || pref_changed || gSavedSettings.getBOOL("UpdateRememberPasswordSetting"))
|
||||
{
|
||||
std::string filename = getStoredFavoritesFilename();
|
||||
if (!filename.empty())
|
||||
|
|
@ -2182,6 +2189,12 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
|
|||
LLSD user_llsd;
|
||||
S32 fav_iter = 0;
|
||||
mMissingSLURLs.clear();
|
||||
|
||||
LLSD save_pass;
|
||||
save_pass["save_password"] = gSavedSettings.getBOOL("RememberPassword");
|
||||
user_llsd[fav_iter] = save_pass;
|
||||
fav_iter++;
|
||||
|
||||
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
|
||||
{
|
||||
LLSD value;
|
||||
|
|
@ -2257,6 +2270,23 @@ void LLFavoritesOrderStorage::showFavoritesOnLoginChanged(BOOL show)
|
|||
}
|
||||
}
|
||||
|
||||
bool LLFavoritesOrderStorage::isStorageUpdateNeeded()
|
||||
{
|
||||
if (!mRecreateFavoriteStorage)
|
||||
{
|
||||
for (LLSD::array_iterator iter = mStorageFavorites.beginArray();
|
||||
iter != mStorageFavorites.endArray(); ++iter)
|
||||
{
|
||||
if (mFavoriteNames[iter->get("id").asUUID()] != iter->get("name").asString())
|
||||
{
|
||||
mRecreateFavoriteStorage = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id)
|
||||
{
|
||||
if (mTargetLandmarkId.isNull()) return;
|
||||
|
|
|
|||
|
|
@ -233,8 +233,11 @@ public:
|
|||
BOOL saveFavoritesRecord(bool pref_changed = false);
|
||||
void showFavoritesOnLoginChanged(BOOL show);
|
||||
|
||||
LLInventoryModel::item_array_t mPrevFavorites;
|
||||
bool isStorageUpdateNeeded();
|
||||
|
||||
LLInventoryModel::item_array_t mPrevFavorites;
|
||||
LLSD mStorageFavorites;
|
||||
bool mRecreateFavoriteStorage;
|
||||
|
||||
const static S32 NO_INDEX;
|
||||
static bool mSaveOnExit;
|
||||
|
|
@ -261,7 +264,6 @@ private:
|
|||
slurls_map_t mSLURLs;
|
||||
std::set<LLUUID> mMissingSLURLs;
|
||||
bool mIsDirty;
|
||||
bool mRecreateFavoriteStorage;
|
||||
|
||||
struct IsNotInFavorites
|
||||
{
|
||||
|
|
|
|||
|
|
@ -386,7 +386,8 @@ void LLVolumeImplFlexible::doIdleUpdate()
|
|||
U64 throttling_delay = (virtual_frame_num + id) % update_period;
|
||||
|
||||
if ((throttling_delay == 0 && mLastFrameNum < virtual_frame_num) //one or more virtual frames per frame
|
||||
|| (mLastFrameNum + update_period < virtual_frame_num)) // missed virtual frame
|
||||
|| (mLastFrameNum + update_period < virtual_frame_num) // missed virtual frame
|
||||
|| mLastFrameNum > virtual_frame_num) // overflow
|
||||
{
|
||||
// We need mLastFrameNum to compensate for 'unreliable time' and to filter 'duplicate' frames
|
||||
// If happened too late, subtract throttling_delay (it is zero otherwise)
|
||||
|
|
@ -787,10 +788,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
|
|||
|
||||
volume->updateRelativeXform();
|
||||
|
||||
if (mRenderRes > -1)
|
||||
{
|
||||
doFlexibleUpdate();
|
||||
}
|
||||
doFlexibleUpdate();
|
||||
|
||||
// Object may have been rotated, which means it needs a rebuild. See SL-47220
|
||||
BOOL rotated = FALSE;
|
||||
|
|
|
|||
|
|
@ -108,11 +108,12 @@ void LLFloaterEvent::setEventID(const U32 event_id)
|
|||
LLSD subs;
|
||||
subs["EVENT_ID"] = (S32)event_id;
|
||||
// get the search URL and expand all of the substitutions
|
||||
// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
|
||||
std::ostringstream url;
|
||||
url << gSavedSettings.getString("EventURL") << event_id << std::endl;
|
||||
// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
|
||||
|
||||
std::string expanded_url = LLWeb::expandURLSubstitutions(gSavedSettings.getString("EventURL"), subs);
|
||||
|
||||
// and load the URL in the web view
|
||||
mBrowser->navigateTo(url.str());
|
||||
mBrowser->navigateTo(expanded_url);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -369,9 +369,7 @@ void LLFloaterJoystick::refreshListOfDevices()
|
|||
std::string desc = LLViewerJoystick::getInstance()->getDescription();
|
||||
if (!desc.empty())
|
||||
{
|
||||
// <FS:Zi> FIRE-30846 - Select the first detected device, don't fall back to 0 which will select "None"
|
||||
// LLSD value = LLSD::Integer(0);
|
||||
LLSD value = LLSD::Integer(1);
|
||||
LLSD value = LLSD::Integer(1); // value for selection
|
||||
addDevice(desc, value);
|
||||
mHasDeviceList = true;
|
||||
}
|
||||
|
|
@ -471,6 +469,9 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
|
|||
|
||||
LLSD value = self->mJoysticksCombo->getValue();
|
||||
bool joystick_enabled = true;
|
||||
// value is 0 for no device,
|
||||
// 1 for a device on Mac (single device, no list support yet)
|
||||
// binary packed guid for a device on windows (can have multiple devices)
|
||||
if (value.isInteger())
|
||||
{
|
||||
// ndof already has a device selected, we are just setting it enabled or disabled
|
||||
|
|
@ -479,7 +480,7 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel)
|
|||
else
|
||||
{
|
||||
LLViewerJoystick::getInstance()->initDevice(value);
|
||||
// else joystick is enabled, because combobox holds id of device
|
||||
// else joystick is enabled, because combobox holds id of the device
|
||||
joystick_enabled = true;
|
||||
}
|
||||
gSavedSettings.setBOOL("JoystickEnabled", joystick_enabled);
|
||||
|
|
|
|||
|
|
@ -472,7 +472,8 @@ BOOL LLPanelLandGeneral::postBuild()
|
|||
|
||||
mEditDesc = getChild<LLTextEditor>("Description");
|
||||
mEditDesc->setCommitOnFocusLost(TRUE);
|
||||
mEditDesc->setCommitCallback(onCommitAny, this);
|
||||
mEditDesc->setCommitCallback(onCommitAny, this);
|
||||
mEditDesc->setContentTrusted(false);
|
||||
// No prevalidate function - historically the prevalidate function was broken,
|
||||
// allowing residents to put in characters like U+2661 WHITE HEART SUIT, so
|
||||
// preserve that ability.
|
||||
|
|
@ -778,6 +779,7 @@ void LLPanelLandGeneral::refresh()
|
|||
BOOL can_edit_identity = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY);
|
||||
mEditName->setEnabled(can_edit_identity);
|
||||
mEditDesc->setEnabled(can_edit_identity);
|
||||
mEditDesc->setParseURLs(!can_edit_identity);
|
||||
|
||||
BOOL can_edit_agent_only = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_NO_POWERS);
|
||||
mBtnSetGroup->setEnabled(can_edit_agent_only && !parcel->getIsGroupOwned());
|
||||
|
|
|
|||
|
|
@ -122,6 +122,12 @@ void LLMeshFilePicker::notify(const std::vector<std::string>& filenames)
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Beq> support for settings panel of floater
|
||||
const void updateUDPhysics(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type)
|
||||
{
|
||||
gSavedSettings.setString("FSPhysicsPresetUser1", filenames[0]);
|
||||
}
|
||||
// </FS:Beq>
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLFloaterModelPreview()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -146,6 +152,14 @@ mAvatarTabIndex(0)
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Beq> support for settings panel of floater
|
||||
//static
|
||||
void LLFloaterModelPreview::onSelectUDPhysics(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
(new LLFilePickerReplyThread(boost::bind(&updateUDPhysics, _1, _2), LLFilePicker::FFLOAD_COLLADA, false))->getFile();
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// postBuild()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -209,6 +223,9 @@ BOOL LLFloaterModelPreview::postBuild()
|
|||
getChild<LLColorSwatchCtrl>("mesh_preview_physics_fill_color")->setCommitCallback(preview_refresh_cb);
|
||||
getChild<LLColorSwatchCtrl>("mesh_preview_degenerate_edge_color")->setCommitCallback(preview_refresh_cb);
|
||||
getChild<LLColorSwatchCtrl>("mesh_preview_degenerate_fill_color")->setCommitCallback(preview_refresh_cb);
|
||||
|
||||
getChild<LLComboBox>("lod_suffix_combo")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onSuffixStandardSelected, this, _1)); // mesh loader suffix configuration
|
||||
getChild<LLButton>("set_user_def_phys")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onSelectUDPhysics, this, _1)); // mesh loader suffix configuration
|
||||
// </FS:Beq>
|
||||
|
||||
childDisable("upload_skin");
|
||||
|
|
@ -1185,6 +1202,75 @@ void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata)
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Beq> mesh loader suffix configuration
|
||||
//static
|
||||
void LLFloaterModelPreview::onSuffixStandardSelected(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
S32 which{0};
|
||||
// SL standard LODs are the reverse of every other game engine (LOD0 least detail)
|
||||
// SL has no suffix for the HIGH LOD
|
||||
const std::array<std::string,5> sl_suffixes = {
|
||||
"LOD0",
|
||||
"LOD1",
|
||||
"LOD2",
|
||||
"",
|
||||
"PHYS"
|
||||
};
|
||||
// Game engines (UE, Unity, CryEngine, Godot, etc.) all use LOD0 as highest.
|
||||
// They typically also label the high with a suffix too
|
||||
const std::array<std::string,5> std_suffixes = {
|
||||
"LOD3",
|
||||
"LOD2",
|
||||
"LOD1",
|
||||
"LOD0",
|
||||
"PHYS"
|
||||
};
|
||||
// Human friendly. When making things manually people naturally use names.
|
||||
const std::array<std::string,5> desc_suffixes = {
|
||||
"LOWEST",
|
||||
"LOW",
|
||||
"MED",
|
||||
"HIGH",
|
||||
"PHYS"
|
||||
};
|
||||
|
||||
LLCtrlSelectionInterface* iface = sInstance->childGetSelectionInterface("lod_suffix_combo");
|
||||
if (iface)
|
||||
{
|
||||
which = iface->getFirstSelectedIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "no UI element found! nothing changed" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (which)
|
||||
{
|
||||
case 1: // SL
|
||||
for (int i = 0; i < LLModel::NUM_LODS; i++)
|
||||
{
|
||||
gSavedSettings.setString(LLModelPreview::sSuffixVarNames[i], sl_suffixes[i]);
|
||||
}
|
||||
break;
|
||||
case 2: // standard
|
||||
for (int i = 0; i < LLModel::NUM_LODS; i++)
|
||||
{
|
||||
gSavedSettings.setString(LLModelPreview::sSuffixVarNames[i], std_suffixes[i]);
|
||||
}
|
||||
break;
|
||||
case 3: // descriptive english
|
||||
for (int i = 0; i < LLModel::NUM_LODS; i++)
|
||||
{
|
||||
gSavedSettings.setString(LLModelPreview::sSuffixVarNames[i], desc_suffixes[i]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LL_WARNS() << "no standard selected, nothing changed" << LL_ENDL;
|
||||
break;
|
||||
};
|
||||
}
|
||||
// </FS:Beq>
|
||||
//static
|
||||
void LLFloaterModelPreview::onCancel(LLUICtrl* ctrl, void* data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public:
|
|||
void loadModel(S32 lod, const std::string& file_name, bool force_disable_slm = false);
|
||||
|
||||
void loadHighLodModel();
|
||||
|
||||
|
||||
void onViewOptionChecked(LLUICtrl* ctrl);
|
||||
void onUploadOptionChecked(LLUICtrl* ctrl);
|
||||
bool isViewOptionChecked(const LLSD& userdata);
|
||||
|
|
@ -167,6 +167,8 @@ protected:
|
|||
static void onPhysicsOptimize(LLUICtrl* ctrl, void* userdata);
|
||||
static void onPhysicsDecomposeBack(LLUICtrl* ctrl, void* userdata);
|
||||
static void onPhysicsSimplifyBack(LLUICtrl* ctrl, void* userdata);
|
||||
static void onSuffixStandardSelected(LLUICtrl* ctrl, void* userdata); // <FS:Beq> mesh loader suffix configuration
|
||||
static void onSelectUDPhysics(LLUICtrl* ctrl, void* userdata); // <FS:Beq/> custom setter for upload preview settings tab
|
||||
|
||||
void draw();
|
||||
|
||||
|
|
|
|||
|
|
@ -2347,6 +2347,8 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)
|
|||
|
||||
LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
|
||||
region_landtype->setText(region->getLocalizedSimProductName());
|
||||
|
||||
getChild<LLButton>("reset_covenant")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate()));
|
||||
|
||||
// let the parent class handle the general data collection.
|
||||
bool rv = LLPanelRegionInfo::refreshFromRegion(region);
|
||||
|
|
|
|||
|
|
@ -28,18 +28,20 @@
|
|||
#include "llinspectobject.h"
|
||||
|
||||
// Viewer
|
||||
#include "llagent.h" // To standup
|
||||
#include "llfloatersidepanelcontainer.h"
|
||||
#include "llinspect.h"
|
||||
#include "llmediaentry.h"
|
||||
#include "llnotificationsutil.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper
|
||||
#include "llselectmgr.h"
|
||||
#include "llslurl.h"
|
||||
#include "llviewermenu.h" // handle_object_touch(), handle_buy()
|
||||
#include "llviewermedia.h"
|
||||
#include "llviewermediafocus.h"
|
||||
#include "llviewerobjectlist.h" // to select the requested object
|
||||
#include "llvoavatarself.h"
|
||||
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0c)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvcommon.h"
|
||||
#include "lltoolpie.h"
|
||||
// [/RLVa:KB]
|
||||
|
|
@ -662,7 +664,37 @@ void LLInspectObject::onClickTouch()
|
|||
|
||||
void LLInspectObject::onClickSit()
|
||||
{
|
||||
handle_object_sit_or_stand();
|
||||
bool is_sitting = false;
|
||||
if (mObjectSelection)
|
||||
{
|
||||
LLSelectNode* node = mObjectSelection->getFirstRootNode();
|
||||
if (node && node->mValid)
|
||||
{
|
||||
LLViewerObject* root_object = node->getObject();
|
||||
if (root_object
|
||||
&& isAgentAvatarValid()
|
||||
&& gAgentAvatarp->isSitting()
|
||||
&& gAgentAvatarp->getRoot() == root_object)
|
||||
{
|
||||
is_sitting = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_sitting)
|
||||
{
|
||||
// <FS:Ansariel> RLVa fix
|
||||
//gAgent.standUp();
|
||||
if (!rlv_handler_t::isEnabled() || RlvActions::canStand())
|
||||
{
|
||||
gAgent.standUp();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_object_sit(mObjectID);
|
||||
}
|
||||
closeFloater();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,9 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
|
|||
mRequestData["options"] = requested_options;
|
||||
mRequestData["http_params"] = http_params;
|
||||
//#if LL_RELEASE_FOR_DOWNLOAD
|
||||
// mRequestData["wait_for_updater"] = !gSavedSettings.getBOOL("CmdLineSkipUpdater") && !LLAppViewer::instance()->isUpdaterMissing();
|
||||
// mRequestData["wait_for_updater"] = !gSavedSettings.getBOOL("CmdLineSkipUpdater")
|
||||
// && !LLAppViewer::instance()->isUpdaterMissing()
|
||||
// && !gNonInteractive;
|
||||
//#else
|
||||
mRequestData["wait_for_updater"] = false;
|
||||
//#endif
|
||||
|
|
|
|||
|
|
@ -92,6 +92,17 @@ bool LLModelPreview::sIgnoreLoadedCallback = false;
|
|||
// </FS:Beq>
|
||||
const F32 SKIN_WEIGHT_CAMERA_DISTANCE = 16.f;
|
||||
|
||||
// <FS:Beq> mesh loader suffix configuration
|
||||
//static
|
||||
const std::array<std::string,5> LLModelPreview::sSuffixVarNames
|
||||
{
|
||||
"FSMeshLowestLodSuffix",
|
||||
"FSMeshLowLodSuffix",
|
||||
"FSMeshMediumLodSuffix",
|
||||
"FSMeshHighLodSuffix",
|
||||
"FSMeshPhysicsSuffix"
|
||||
};
|
||||
// </FS:Beq>
|
||||
LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& material)
|
||||
{
|
||||
LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_PREVIEW);
|
||||
|
|
@ -110,13 +121,19 @@ LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& mater
|
|||
|
||||
std::string stripSuffix(std::string name)
|
||||
{
|
||||
// <FS:Ansariel> Bug fixes in mesh importer by Drake Arconis
|
||||
// <FS:Beq> Selectable suffixes
|
||||
//if ((name.find("_LOD") != -1) || (name.find("_PHYS") != -1))
|
||||
if ((name.find("_LOD") != std::string::npos) || (name.find("_PHYS") != std::string::npos))
|
||||
// </FS:Ansariel>
|
||||
// {
|
||||
// return name.substr(0, name.rfind('_'));
|
||||
// }
|
||||
for(int i=0; i < LLModel::NUM_LODS; i++)
|
||||
{
|
||||
return name.substr(0, name.rfind('_'));
|
||||
}
|
||||
const auto& suffix = gSavedSettings.getString(LLModelPreview::sSuffixVarNames[i]);
|
||||
if (suffix.size() && name.find(suffix) != std::string::npos)
|
||||
{
|
||||
return name.substr(0, name.rfind('_'));
|
||||
}
|
||||
} // </FS:Beq>
|
||||
return name;
|
||||
}
|
||||
|
||||
|
|
@ -125,12 +142,24 @@ std::string getLodSuffix(S32 lod)
|
|||
std::string suffix;
|
||||
switch (lod)
|
||||
{
|
||||
case LLModel::LOD_IMPOSTOR: suffix = "_LOD0"; break;
|
||||
case LLModel::LOD_LOW: suffix = "_LOD1"; break;
|
||||
case LLModel::LOD_MEDIUM: suffix = "_LOD2"; break;
|
||||
case LLModel::LOD_PHYSICS: suffix = "_PHYS"; break;
|
||||
case LLModel::LOD_HIGH: break;
|
||||
// <FS:Beq> selectable suffixes
|
||||
// case LLModel::LOD_IMPOSTOR: suffix = "_LOD0"; break;
|
||||
// case LLModel::LOD_LOW: suffix = "_LOD1"; break;
|
||||
// case LLModel::LOD_MEDIUM: suffix = "_LOD2"; break;
|
||||
// case LLModel::LOD_PHYSICS: suffix = "_PHYS"; break;
|
||||
// case LLModel::LOD_HIGH: break;
|
||||
case LLModel::LOD_IMPOSTOR: suffix = gSavedSettings.getString("FSMeshLowestLodSuffix"); break;
|
||||
case LLModel::LOD_LOW: suffix = gSavedSettings.getString("FSMeshLowLodSuffix"); break;
|
||||
case LLModel::LOD_MEDIUM: suffix = gSavedSettings.getString("FSMeshMediumLodSuffix"); break;
|
||||
case LLModel::LOD_HIGH: suffix = gSavedSettings.getString("FSMeshHighLodSuffix"); break;
|
||||
case LLModel::LOD_PHYSICS: suffix = gSavedSettings.getString("FSMeshPhysicsSuffix"); break;
|
||||
default:break;
|
||||
}
|
||||
if(suffix.size())
|
||||
{
|
||||
suffix = "_" + suffix;
|
||||
}
|
||||
// </FS:Beq>
|
||||
return suffix;
|
||||
}
|
||||
|
||||
|
|
@ -461,8 +490,10 @@ void LLModelPreview::rebuildUploadData()
|
|||
// then the indexed method will be attempted below.
|
||||
|
||||
LLMatrix4 transform;
|
||||
|
||||
std::string name_to_match = instance.mLabel;
|
||||
// <FS:Beq> user defined LOD names
|
||||
// std::string name_to_match = instance.mLabel;
|
||||
std::string name_to_match = stripSuffix(instance.mLabel);
|
||||
// </FS:Beq>
|
||||
llassert(!name_to_match.empty());
|
||||
|
||||
int extensionLOD;
|
||||
|
|
@ -503,7 +534,10 @@ void LLModelPreview::rebuildUploadData()
|
|||
int searchLOD = (i > LLModel::LOD_HIGH) ? LLModel::LOD_HIGH : i;
|
||||
while ((searchLOD <= LLModel::LOD_HIGH) && !lod_model)
|
||||
{
|
||||
std::string name_to_match = instance.mLabel;
|
||||
// <FS:Beq> user defined LOD names
|
||||
// std::string name_to_match = instance.mLabel;
|
||||
std::string name_to_match = stripSuffix(instance.mLabel);
|
||||
// </FS:Beq>
|
||||
llassert(!name_to_match.empty());
|
||||
|
||||
std::string toAdd = getLodSuffix(searchLOD);
|
||||
|
|
@ -536,6 +570,13 @@ void LLModelPreview::rebuildUploadData()
|
|||
{
|
||||
std::ostringstream out;
|
||||
out << "Attempting to use model index " << idx;
|
||||
// <FS:Beq> better debug (watch for dangling single line else)
|
||||
if(i==4)
|
||||
{
|
||||
out << " for PHYS";
|
||||
}
|
||||
else
|
||||
// </FS:Beq>
|
||||
out << " for LOD" << i;
|
||||
out << " of " << instance.mLabel;
|
||||
LL_INFOS() << out.str() << LL_ENDL;
|
||||
|
|
@ -881,6 +922,12 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
|
|||
std::map<std::string, std::string> joint_alias_map;
|
||||
getJointAliases(joint_alias_map);
|
||||
|
||||
std::array<std::string,LLModel::NUM_LODS> lod_suffix;
|
||||
for(int i=0; i < LLModel::NUM_LODS; i++)
|
||||
{
|
||||
lod_suffix[i] = gSavedSettings.getString(sSuffixVarNames[i]);
|
||||
}
|
||||
|
||||
mModelLoader = new LLDAELoader(
|
||||
filename,
|
||||
lod,
|
||||
|
|
@ -894,7 +941,10 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
|
|||
joint_alias_map,
|
||||
LLSkinningUtil::getMaxJointCount(),
|
||||
gSavedSettings.getU32("ImporterModelLimit"),
|
||||
gSavedSettings.getBOOL("ImporterPreprocessDAE"));
|
||||
// <FS:Beq> allow LOD suffix configuration
|
||||
// gSavedSettings.getBOOL("ImporterPreprocessDAE"));
|
||||
gSavedSettings.getBOOL("ImporterPreprocessDAE"),
|
||||
lod_suffix);
|
||||
|
||||
if (force_disable_slm)
|
||||
{
|
||||
|
|
@ -1230,7 +1280,7 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
|
|||
// this actually works like "ImporterLegacyMatching" for this particular LOD
|
||||
for (U32 idx = 0; idx < mModel[loaded_lod].size() && idx < mBaseModel.size(); ++idx)
|
||||
{
|
||||
std::string name = mBaseModel[idx]->mLabel;
|
||||
std::string name = stripSuffix(mBaseModel[idx]->mLabel);
|
||||
std::string loaded_name = stripSuffix(mModel[loaded_lod][idx]->mLabel);
|
||||
|
||||
if (loaded_name != name)
|
||||
|
|
@ -1491,10 +1541,32 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
|
|||
|
||||
if (result_error < 0)
|
||||
{
|
||||
LL_WARNS() << "Negative result error from meshoptimizer for model " << target_model->mLabel
|
||||
// <FS:Beq> Log these properly
|
||||
// LL_WARNS() << "Negative result error from meshoptimizer for model " << target_model->mLabel
|
||||
// << " target Indices: " << target_indices
|
||||
// << " new Indices: " << new_indices
|
||||
// << " original count: " << size_indices << LL_ENDL;
|
||||
std::ostringstream out;
|
||||
out << "Negative result error from meshoptimizer for model " << target_model->mLabel
|
||||
<< " target Indices: " << target_indices
|
||||
<< " new Indices: " << new_indices
|
||||
<< " original count: " << size_indices << LL_ENDL;
|
||||
<< " original count: " << size_indices ;
|
||||
LL_WARNS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mImporterDebug)
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "Good result error from meshoptimizer for model " << target_model->mLabel
|
||||
<< " target Indices: " << target_indices
|
||||
<< " new Indices: " << new_indices
|
||||
<< " original count: " << size_indices << " (result error:" << result_error << ")";
|
||||
LL_DEBUGS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
}
|
||||
// </FS:Beq>
|
||||
}
|
||||
|
||||
if (new_indices < 3)
|
||||
|
|
@ -1558,14 +1630,26 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
|
|||
// Normally this shouldn't happen since the whole point is to reduce amount of vertices
|
||||
// but it might happen if user tries to run optimization with too large triangle or error value
|
||||
// so fallback to 'per face' mode or verify requested limits and copy base model as is.
|
||||
LL_WARNS() << "Over triangle limit. Failed to optimize in 'per object' mode, falling back to per face variant for"
|
||||
<< " model " << target_model->mLabel
|
||||
<< " target Indices: " << target_indices
|
||||
<< " new Indices: " << new_indices
|
||||
<< " original count: " << size_indices
|
||||
<< " error treshold: " << error_threshold
|
||||
<< LL_ENDL;
|
||||
|
||||
// <FS:Beq> Log this properly
|
||||
// LL_WARNS() << "Over triangle limit. Failed to optimize in 'per object' mode, falling back to per face variant for"
|
||||
// << " model " << target_model->mLabel
|
||||
// << " target Indices: " << target_indices
|
||||
// << " new Indices: " << new_indices
|
||||
// << " original count: " << size_indices
|
||||
// << " error treshold: " << error_threshold
|
||||
// << LL_ENDL;
|
||||
if (mImporterDebug)
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "Over triangle limit. Failed to optimize in 'per object' mode, falling back to per face variant for"
|
||||
<< " model " << target_model->mLabel
|
||||
<< " target Indices: " << target_indices
|
||||
<< " new Indices: " << new_indices
|
||||
<< " original count: " << size_indices
|
||||
<< " error treshold: " << error_threshold;
|
||||
LL_DEBUGS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
}
|
||||
// U16 vertices overflow shouldn't happen, but just in case
|
||||
new_indices = 0;
|
||||
valid_faces = 0;
|
||||
|
|
@ -1702,13 +1786,39 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target
|
|||
|
||||
if (result_error < 0)
|
||||
{
|
||||
LL_WARNS() << "Negative result error from meshoptimizer for face " << face_idx
|
||||
// <FS:Beq> Log these properly
|
||||
// LL_WARNS() << "Negative result error from meshoptimizer for face " << face_idx
|
||||
// << " of model " << target_model->mLabel
|
||||
// << " target Indices: " << target_indices
|
||||
// << " new Indices: " << new_indices
|
||||
// << " original count: " << size_indices
|
||||
// << " error treshold: " << error_threshold
|
||||
// << LL_ENDL;
|
||||
std::ostringstream out;
|
||||
out << "Negative result error from meshoptimizer for face " << face_idx
|
||||
<< " of model " << target_model->mLabel
|
||||
<< " target Indices: " << target_indices
|
||||
<< " new Indices: " << new_indices
|
||||
<< " original count: " << size_indices
|
||||
<< " error treshold: " << error_threshold
|
||||
<< LL_ENDL;
|
||||
<< " error treshold: " << error_threshold;
|
||||
LL_WARNS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mImporterDebug)
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "Good result error from meshoptimizer for face " << face_idx
|
||||
<< " of model " << target_model->mLabel
|
||||
<< " target Indices: " << target_indices
|
||||
<< " new Indices: " << new_indices
|
||||
<< " original count: " << size_indices
|
||||
<< " error treshold: " << error_threshold << " (result error:" << result_error << ")";
|
||||
LL_DEBUGS("MeshUpload") << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
}
|
||||
// </FS:Beq>
|
||||
}
|
||||
|
||||
LLVolumeFace &new_face = target_model->getVolumeFace(face_idx);
|
||||
|
|
@ -1723,12 +1833,20 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target
|
|||
{
|
||||
// meshopt_optimizeSloppy() can optimize triangles away even if target_indices is > 2,
|
||||
// but optimize() isn't supposed to
|
||||
LL_INFOS() << "No indices generated by meshoptimizer for face " << face_idx
|
||||
// LL_INFOS() << "No indices generated by meshoptimizer for face " << face_idx
|
||||
// << " of model " << target_model->mLabel
|
||||
// << " target Indices: " << target_indices
|
||||
// << " original count: " << size_indices
|
||||
// << " error treshold: " << error_threshold
|
||||
// << LL_ENDL;
|
||||
std::ostringstream out;
|
||||
out << "No indices generated by meshoptimizer for face " << face_idx
|
||||
<< " of model " << target_model->mLabel
|
||||
<< " target Indices: " << target_indices
|
||||
<< " original count: " << size_indices
|
||||
<< " error treshold: " << error_threshold
|
||||
<< LL_ENDL;
|
||||
<< " error treshold: " << error_threshold;
|
||||
LL_INFOS("MeshUpload") << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
}
|
||||
|
||||
// Face got optimized away
|
||||
|
|
@ -1764,14 +1882,19 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target
|
|||
|
||||
void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 decimation, bool enforce_tri_limit)
|
||||
{
|
||||
LL_INFOS() << "Generating lod " << which_lod << " using meshoptimizer" << LL_ENDL;
|
||||
// <FS:Beq> Log things properly
|
||||
// LL_INFOS() << "Generating lod " << which_lod << " using meshoptimizer" << LL_ENDL;
|
||||
std::ostringstream out;
|
||||
out << "Generating lod " << which_lod << " using meshoptimizer";
|
||||
LL_INFOS("MeshUpload") << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, false);
|
||||
// Allow LoD from -1 to LLModel::LOD_PHYSICS
|
||||
if (which_lod < -1 || which_lod > LLModel::NUM_LODS - 1)
|
||||
{
|
||||
std::ostringstream out;
|
||||
// std::ostringstream out; // <FS:Beq/> already instantiated
|
||||
out << "Invalid level of detail: " << which_lod;
|
||||
LL_WARNS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, false);
|
||||
LLFloaterModelPreview::addStringToLog(out, true); // <FS:Beq/> if you don't flash the log tab on error when do you?
|
||||
assert(lod >= -1 && lod < LLModel::NUM_LODS);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1881,7 +2004,15 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
|
|||
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
|
||||
mModel[lod][mdl_idx] = new LLModel(volume_params, 0.f);
|
||||
|
||||
std::string name = base->mLabel + getLodSuffix(lod);
|
||||
// <FS:Beq> Support altenate LOD naming conventions
|
||||
// std::string name = base->mLabel + getLodSuffix(lod);
|
||||
std::string name = stripSuffix(base->mLabel);
|
||||
std::string suffix = getLodSuffix(lod);
|
||||
if ( suffix.size() > 0 )
|
||||
{
|
||||
name += suffix;
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
mModel[lod][mdl_idx]->mLabel = name;
|
||||
mModel[lod][mdl_idx]->mSubmodelID = base->mSubmodelID;
|
||||
|
|
@ -1984,7 +2115,12 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
|
|||
const U32 too_many_vertices = 27000;
|
||||
if (size_vertices > too_many_vertices)
|
||||
{
|
||||
LL_WARNS() << "Sloppy optimization method failed for a complex model " << target_model->getName() << LL_ENDL;
|
||||
// <FS:Beq> log this properly.
|
||||
// LL_WARNS() << "Sloppy optimization method failed for a complex model " << target_model->getName() << LL_ENDL;
|
||||
out << "Sloppy optimization method failed for a complex model " << target_model->getName();
|
||||
LL_WARNS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
// </FS:Beq>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2018,26 +2154,46 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
|
|||
// Fallback to normal method
|
||||
precise_ratio = genMeshOptimizerPerModel(base, target_model, indices_decimator, lod_error_threshold, false);
|
||||
}
|
||||
|
||||
LL_INFOS() << "Model " << target_model->getName()
|
||||
// <FS:Beq> Log stuff properly
|
||||
// LL_INFOS() << "Model " << target_model->getName()
|
||||
// << " lod " << which_lod
|
||||
// << " resulting ratio " << precise_ratio
|
||||
// << " simplified using per model method." << LL_ENDL;
|
||||
out << "Model " << target_model->getName()
|
||||
<< " lod " << which_lod
|
||||
<< " resulting ratio " << precise_ratio
|
||||
<< " simplified using per model method." << LL_ENDL;
|
||||
<< " simplified using per model method.";
|
||||
LL_INFOS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "Model " << target_model->getName()
|
||||
// <FS:Beq> Log stuff properly
|
||||
// LL_INFOS() << "Model " << target_model->getName()
|
||||
// << " lod " << which_lod
|
||||
// << " resulting ratio " << sloppy_ratio
|
||||
// << " sloppily simplified using per model method." << LL_ENDL;
|
||||
out << "Model " << target_model->getName()
|
||||
<< " lod " << which_lod
|
||||
<< " resulting ratio " << sloppy_ratio
|
||||
<< " sloppily simplified using per model method." << LL_ENDL;
|
||||
<< " sloppily simplified using per model method.";
|
||||
LL_INFOS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS() << "Model " << target_model->getName()
|
||||
<< " lod " << which_lod
|
||||
<< " resulting ratio " << precise_ratio
|
||||
<< " simplified using per model method." << LL_ENDL;
|
||||
// <FS:Beq> Log stuff properly
|
||||
// LL_INFOS() << "Model " << target_model->getName()
|
||||
// << " lod " << which_lod
|
||||
// << " resulting ratio " << precise_ratio
|
||||
// << " simplified using per model method." << LL_ENDL;
|
||||
out << "Bad MeshOptimisation result for Model " << target_model->getName()
|
||||
<< " lod " << which_lod
|
||||
<< " resulting ratio " << precise_ratio
|
||||
<< " simplified using per model method.";
|
||||
LL_WARNS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3167,7 +3323,7 @@ void LLModelPreview::lookupLODModelFiles(S32 lod)
|
|||
// Note: we cannot use gDirUtilp here because the getExtension forces a tolower which would then break uppercase extensions on Linux/Mac
|
||||
std::size_t offset = lod_filename.find_last_of('.');
|
||||
std::string ext = (offset == std::string::npos || offset == 0) ? "" : lod_filename.substr(offset+1);
|
||||
lod_filename = gDirUtilp->getDirName(lod_filename) + gDirUtilp->getDirDelimiter() + gDirUtilp->getBaseFileName(lod_filename, true) + getLodSuffix(next_lod) + "." + ext;
|
||||
lod_filename = gDirUtilp->getDirName(lod_filename) + gDirUtilp->getDirDelimiter() + stripSuffix(gDirUtilp->getBaseFileName(lod_filename, true)) + getLodSuffix(next_lod) + "." + ext;
|
||||
std::ostringstream out;
|
||||
out << "Looking for file: " << lod_filename << " for LOD " << next_lod;
|
||||
LL_DEBUGS("MeshUpload") << out.str() << LL_ENDL;
|
||||
|
|
@ -4212,7 +4368,7 @@ bool LLModelPreview::lodQueryCallback()
|
|||
{
|
||||
S32 lod = preview->mLodsQuery.back();
|
||||
preview->mLodsQuery.pop_back();
|
||||
preview->genMeshOptimizerLODs(lod, MESH_OPTIMIZER_AUTO);
|
||||
preview->genMeshOptimizerLODs(lod, MESH_OPTIMIZER_AUTO, 3, false);
|
||||
|
||||
if (preview->mLookUpLodFiles && (lod == LLModel::LOD_HIGH))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
|
|||
typedef boost::signals2::signal<void(bool)> model_updated_signal_t;
|
||||
|
||||
public:
|
||||
static const std::array<std::string,5> sSuffixVarNames; // <FS:Beq/> mesh loader suffix configuration
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ BOOL LLPanelGroupGeneral::postBuild()
|
|||
mEditCharter->setCommitCallback(onCommitAny, this);
|
||||
mEditCharter->setFocusReceivedCallback(boost::bind(onFocusEdit, _1, this));
|
||||
mEditCharter->setFocusChangedCallback(boost::bind(onFocusEdit, _1, this));
|
||||
mEditCharter->setContentTrusted(false);
|
||||
}
|
||||
// <FS> set up callbacks for copy URI and name buttons
|
||||
childSetCommitCallback("copy_uri", boost::bind(&LLPanelGroupGeneral::onCopyURI, this), NULL);
|
||||
|
|
@ -676,7 +677,8 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
|
|||
|
||||
if (mEditCharter)
|
||||
{
|
||||
mEditCharter->setText(gdatap->mCharter);
|
||||
mEditCharter->setParseURLs(!mAllowEdit || !can_change_ident);
|
||||
mEditCharter->setText(gdatap->mCharter);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Re-add group member list on general panel
|
||||
|
|
|
|||
|
|
@ -94,44 +94,6 @@ LLPointer<LLCredential> load_user_credentials(std::string &user_key)
|
|||
}
|
||||
}
|
||||
|
||||
// keys are lower case to be case insensitive so they are not always
|
||||
// identical to names which retain user input, like:
|
||||
// "AwEsOmE Resident" -> "awesome_resident"
|
||||
std::string get_user_key_from_name(const std::string &username)
|
||||
{
|
||||
std::string key = username;
|
||||
LLStringUtil::trim(key);
|
||||
LLStringUtil::toLower(key);
|
||||
if (!LLGridManager::getInstance()->isSystemGrid())
|
||||
{
|
||||
size_t separator_index = username.find_first_of(" ");
|
||||
if (separator_index == username.npos)
|
||||
{
|
||||
// CRED_IDENTIFIER_TYPE_ACCOUNT
|
||||
return key;
|
||||
}
|
||||
}
|
||||
// CRED_IDENTIFIER_TYPE_AGENT
|
||||
size_t separator_index = username.find_first_of(" ._");
|
||||
std::string first = username.substr(0, separator_index);
|
||||
std::string last;
|
||||
if (separator_index != username.npos)
|
||||
{
|
||||
last = username.substr(separator_index + 1, username.npos);
|
||||
LLStringUtil::trim(last);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ...on Linden grids, single username users as considered to have
|
||||
// last name "Resident"
|
||||
// *TODO: Make login.cgi support "account_name" like above
|
||||
last = "resident";
|
||||
}
|
||||
|
||||
key = first + "_" + last;
|
||||
return key;
|
||||
}
|
||||
|
||||
class LLLoginLocationAutoHandler : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
|
|
@ -363,11 +325,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
|
|||
username_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
|
||||
username_combo->setKeystrokeOnEsc(TRUE);
|
||||
|
||||
if (!mFirstLoginThisInstall)
|
||||
{
|
||||
LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
|
||||
remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this));
|
||||
}
|
||||
|
||||
LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
|
||||
remember_name->setCommitCallback(boost::bind(&LLPanelLogin::onRememberUserCheck, this));
|
||||
getChild<LLCheckBoxCtrl>("remember_password")->setCommitCallback(boost::bind(&LLPanelLogin::onRememberPasswordCheck, this));
|
||||
}
|
||||
|
||||
void LLPanelLogin::addFavoritesToStartLocation()
|
||||
|
|
@ -440,10 +401,22 @@ void LLPanelLogin::addFavoritesToStartLocation()
|
|||
combo->addSeparator();
|
||||
LL_DEBUGS() << "Loading favorites for " << iter->first << LL_ENDL;
|
||||
LLSD user_llsd = iter->second;
|
||||
bool update_password_setting = true;
|
||||
for (LLSD::array_const_iterator iter1 = user_llsd.beginArray();
|
||||
iter1 != user_llsd.endArray(); ++iter1)
|
||||
{
|
||||
std::string label = (*iter1)["name"].asString();
|
||||
if ((*iter1).has("save_password"))
|
||||
{
|
||||
bool save_password = (*iter1)["save_password"].asBoolean();
|
||||
gSavedSettings.setBOOL("RememberPassword", save_password);
|
||||
if (!save_password)
|
||||
{
|
||||
getChild<LLButton>("connect_btn")->setEnabled(false);
|
||||
}
|
||||
update_password_setting = false;
|
||||
}
|
||||
|
||||
std::string label = (*iter1)["name"].asString();
|
||||
std::string value = (*iter1)["slurl"].asString();
|
||||
if(label != "" && value != "")
|
||||
{
|
||||
|
|
@ -455,6 +428,10 @@ void LLPanelLogin::addFavoritesToStartLocation()
|
|||
}
|
||||
}
|
||||
}
|
||||
if (update_password_setting)
|
||||
{
|
||||
gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (combo->getValue().asString().empty())
|
||||
|
|
@ -567,21 +544,12 @@ void LLPanelLogin::populateFields(LLPointer<LLCredential> credential, bool remem
|
|||
LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
if (sInstance->mFirstLoginThisInstall)
|
||||
{
|
||||
LLUICtrl* remember_check = sInstance->getChild<LLUICtrl>("remember_check");
|
||||
remember_check->setValue(remember_psswrd);
|
||||
// no list to populate
|
||||
setFields(credential);
|
||||
}
|
||||
else
|
||||
{
|
||||
sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user);
|
||||
LLUICtrl* remember_password = sInstance->getChild<LLUICtrl>("remember_password");
|
||||
remember_password->setValue(remember_user && remember_psswrd);
|
||||
remember_password->setEnabled(remember_user);
|
||||
sInstance->populateUserList(credential);
|
||||
}
|
||||
|
||||
sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user);
|
||||
LLUICtrl* remember_password = sInstance->getChild<LLUICtrl>("remember_password");
|
||||
remember_password->setValue(remember_user && remember_psswrd);
|
||||
remember_password->setEnabled(remember_user);
|
||||
sInstance->populateUserList(credential);
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -692,39 +660,6 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
|
|||
LL_INFOS("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
|
||||
// determine if the username is a first/last form or not.
|
||||
size_t separator_index = username.find_first_of(' ');
|
||||
if (separator_index == username.npos
|
||||
&& !LLGridManager::getInstance()->isSystemGrid())
|
||||
{
|
||||
LL_INFOS("Credentials", "Authentication") << "account: " << username << LL_ENDL;
|
||||
// single username, so this is a 'clear' identifier
|
||||
identifier["type"] = CRED_IDENTIFIER_TYPE_ACCOUNT;
|
||||
identifier["account_name"] = username;
|
||||
|
||||
if (LLPanelLogin::sInstance->mPasswordModified)
|
||||
{
|
||||
// password is plaintext
|
||||
authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
|
||||
authenticator["secret"] = password;
|
||||
}
|
||||
else
|
||||
{
|
||||
credential = load_user_credentials(username);
|
||||
if (credential.notNull())
|
||||
{
|
||||
authenticator = credential->getAuthenticator();
|
||||
if (authenticator.emptyMap())
|
||||
{
|
||||
// Likely caused by user trying to log in to non-system grid
|
||||
// with unsupported name format, just retry
|
||||
LL_WARNS() << "Authenticator failed to load for: " << username << LL_ENDL;
|
||||
// password is plaintext
|
||||
authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
|
||||
authenticator["secret"] = password;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Be lenient in terms of what separators we allow for two-word names
|
||||
// and allow legacy users to login with firstname.lastname
|
||||
|
|
@ -775,16 +710,9 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
|
|||
}
|
||||
}
|
||||
credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator);
|
||||
if (!sInstance->mFirstLoginThisInstall)
|
||||
{
|
||||
remember_psswrd = sInstance->getChild<LLUICtrl>("remember_password")->getValue();
|
||||
remember_user = sInstance->getChild<LLUICtrl>("remember_name")->getValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
|
||||
remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me'
|
||||
}
|
||||
|
||||
remember_psswrd = sInstance->getChild<LLUICtrl>("remember_password")->getValue();
|
||||
remember_user = sInstance->getChild<LLUICtrl>("remember_name")->getValue();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1147,17 +1075,18 @@ void LLPanelLogin::onUserListCommit(void*)
|
|||
}
|
||||
|
||||
// static
|
||||
// At the moment only happens if !mFirstLoginThisInstall
|
||||
void LLPanelLogin::onRememberUserCheck(void*)
|
||||
{
|
||||
if (sInstance && !sInstance->mFirstLoginThisInstall)
|
||||
if (sInstance)
|
||||
{
|
||||
LLCheckBoxCtrl* remember_name(sInstance->getChild<LLCheckBoxCtrl>("remember_name"));
|
||||
LLCheckBoxCtrl* remember_psswrd(sInstance->getChild<LLCheckBoxCtrl>("remember_password"));
|
||||
LLComboBox* user_combo(sInstance->getChild<LLComboBox>("username_combo"));
|
||||
|
||||
bool remember = remember_name->getValue().asBoolean();
|
||||
if (user_combo->getCurrentIndex() != -1 && !remember)
|
||||
if (!sInstance->mFirstLoginThisInstall
|
||||
&& user_combo->getCurrentIndex() != -1
|
||||
&& !remember)
|
||||
{
|
||||
remember = true;
|
||||
remember_name->setValue(true);
|
||||
|
|
@ -1171,6 +1100,14 @@ void LLPanelLogin::onRememberUserCheck(void*)
|
|||
}
|
||||
}
|
||||
|
||||
void LLPanelLogin::onRememberPasswordCheck(void*)
|
||||
{
|
||||
if (sInstance)
|
||||
{
|
||||
gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ private:
|
|||
static void onUserNameTextEnty(void*);
|
||||
static void onUserListCommit(void*);
|
||||
static void onRememberUserCheck(void*);
|
||||
static void onRememberPasswordCheck(void*);
|
||||
static void onPassKey(LLLineEditor* caller, void* user_data);
|
||||
static void updateServerCombo();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ LLPanelLoginListener::LLPanelLoginListener(LLPanelLogin* instance):
|
|||
|
||||
void LLPanelLoginListener::onClickConnect(const LLSD&) const
|
||||
{
|
||||
mPanel->onClickConnect(NULL);
|
||||
mPanel->onClickConnect(false);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
|
|||
LLSD filterState;
|
||||
LLInventoryPanel::InventoryState p;
|
||||
all_items_panel->getFilter().toParams(p.filter);
|
||||
//all_items_panel->getRootViewModel().getSorter().toParams(p.sort); // <FS:Ansariel> Causes parser error, also unused (uses debug setting instead)
|
||||
all_items_panel->getRootViewModel().getSorter().toParams(p.sort);
|
||||
if (p.validateBlock(false))
|
||||
{
|
||||
LLParamSDParser().writeSD(filterState, p);
|
||||
|
|
@ -391,7 +391,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
|
|||
LLSD filterState;
|
||||
LLInventoryPanel::InventoryState p;
|
||||
panel->getFilter().toParams(p.filter);
|
||||
//panel->getRootViewModel().getSorter().toParams(p.sort); // <FS:Ansariel> Causes parser error, also unused (uses debug setting instead)
|
||||
panel->getRootViewModel().getSorter().toParams(p.sort);
|
||||
if (p.validateBlock(false))
|
||||
{
|
||||
LLParamSDParser().writeSD(filterState, p);
|
||||
|
|
|
|||
|
|
@ -2304,6 +2304,18 @@ void LLPanelObject::sendPosition(BOOL btn_down)
|
|||
|
||||
// <FS:Zi> Building spin controls for attachments
|
||||
// partly copied from llmaniptranslate.cpp to get the positioning right
|
||||
//bool is_valid_pos = true;
|
||||
//if (mObject->isAttachment())
|
||||
//{
|
||||
// LLVector3 delta_pos = mObject->getPositionEdit() - newpos;
|
||||
// LLVector3d attachment_pos = regionp->getPosGlobalFromRegion(mObject->getPositionRegion() + delta_pos);
|
||||
// is_valid_pos = LLWorld::getInstance()->positionRegionValidGlobal(attachment_pos);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// is_valid_pos = LLWorld::getInstance()->positionRegionValidGlobal(new_pos_global);
|
||||
//}
|
||||
//if (is_valid_pos)
|
||||
if (mObject->isAttachment())
|
||||
{
|
||||
LLVector3 old_position_local = mObject->getPosition();
|
||||
|
|
@ -2338,8 +2350,8 @@ void LLPanelObject::sendPosition(BOOL btn_down)
|
|||
|
||||
LLSelectMgr::getInstance()->updateSelectionCenter();
|
||||
}
|
||||
// </FS:Zi> Building spin controls for attachments
|
||||
else if (LLWorld::getInstance()->positionRegionValidGlobal(new_pos_global) )
|
||||
// </FS:Zi> Building spin controls for attachments
|
||||
{
|
||||
// send only if the position is changed, that is, the delta vector is not zero
|
||||
LLVector3d old_pos_global = mObject->getPositionGlobal();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,8 @@
|
|||
|
||||
#define CAP_SERVICE_NAVMESH_STATUS "NavMeshGenerationStatus"
|
||||
|
||||
#define CAP_SERVICE_OBJECT_LINKSETS "RegionObjects"
|
||||
#define CAP_SERVICE_GET_OBJECT_LINKSETS "RegionObjects"
|
||||
#define CAP_SERVICE_SET_OBJECT_LINKSETS "ObjectNavMeshProperties"
|
||||
#define CAP_SERVICE_TERRAIN_LINKSETS "TerrainNavMeshProperties"
|
||||
|
||||
#define CAP_SERVICE_CHARACTERS "CharacterProperties"
|
||||
|
|
@ -244,7 +245,7 @@ void LLPathfindingManager::requestGetLinksets(request_id_t pRequestId, object_re
|
|||
}
|
||||
else
|
||||
{
|
||||
std::string objectLinksetsURL = getObjectLinksetsURLForCurrentRegion();
|
||||
std::string objectLinksetsURL = getRetrieveObjectLinksetsURLForCurrentRegion();
|
||||
std::string terrainLinksetsURL = getTerrainLinksetsURLForCurrentRegion();
|
||||
if (objectLinksetsURL.empty() || terrainLinksetsURL.empty())
|
||||
{
|
||||
|
|
@ -273,7 +274,7 @@ void LLPathfindingManager::requestSetLinksets(request_id_t pRequestId, const LLP
|
|||
{
|
||||
LLPathfindingObjectListPtr emptyLinksetListPtr;
|
||||
|
||||
std::string objectLinksetsURL = getObjectLinksetsURLForCurrentRegion();
|
||||
std::string objectLinksetsURL = getChangeObjectLinksetsURLForCurrentRegion();
|
||||
std::string terrainLinksetsURL = getTerrainLinksetsURLForCurrentRegion();
|
||||
if (objectLinksetsURL.empty() || terrainLinksetsURL.empty())
|
||||
{
|
||||
|
|
@ -755,9 +756,14 @@ std::string LLPathfindingManager::getRetrieveNavMeshURLForRegion(LLViewerRegion
|
|||
return getCapabilityURLForRegion(pRegion, CAP_SERVICE_RETRIEVE_NAVMESH);
|
||||
}
|
||||
|
||||
std::string LLPathfindingManager::getObjectLinksetsURLForCurrentRegion() const
|
||||
std::string LLPathfindingManager::getRetrieveObjectLinksetsURLForCurrentRegion() const
|
||||
{
|
||||
return getCapabilityURLForCurrentRegion(CAP_SERVICE_OBJECT_LINKSETS);
|
||||
return getCapabilityURLForCurrentRegion(CAP_SERVICE_GET_OBJECT_LINKSETS);
|
||||
}
|
||||
|
||||
std::string LLPathfindingManager::getChangeObjectLinksetsURLForCurrentRegion() const
|
||||
{
|
||||
return getCapabilityURLForCurrentRegion(CAP_SERVICE_SET_OBJECT_LINKSETS);
|
||||
}
|
||||
|
||||
std::string LLPathfindingManager::getTerrainLinksetsURLForCurrentRegion() const
|
||||
|
|
|
|||
|
|
@ -122,7 +122,8 @@ private:
|
|||
std::string getNavMeshStatusURLForCurrentRegion() const;
|
||||
std::string getNavMeshStatusURLForRegion(LLViewerRegion *pRegion) const;
|
||||
std::string getRetrieveNavMeshURLForRegion(LLViewerRegion *pRegion) const;
|
||||
std::string getObjectLinksetsURLForCurrentRegion() const;
|
||||
std::string getRetrieveObjectLinksetsURLForCurrentRegion() const;
|
||||
std::string getChangeObjectLinksetsURLForCurrentRegion() const;
|
||||
std::string getTerrainLinksetsURLForCurrentRegion() const;
|
||||
std::string getCharactersURLForCurrentRegion() const;
|
||||
std::string getAgentStateURLForRegion(LLViewerRegion *pRegion) const;
|
||||
|
|
|
|||
|
|
@ -347,9 +347,6 @@ BOOL LLPreviewGesture::postBuild()
|
|||
LLTextBox* text;
|
||||
LLCheckBoxCtrl* check;
|
||||
|
||||
edit = getChild<LLLineEditor>("name");
|
||||
edit->setKeystrokeCallback(onKeystrokeCommit, this);
|
||||
|
||||
edit = getChild<LLLineEditor>("desc");
|
||||
edit->setKeystrokeCallback(onKeystrokeCommit, this);
|
||||
|
||||
|
|
@ -482,9 +479,6 @@ BOOL LLPreviewGesture::postBuild()
|
|||
{
|
||||
getChild<LLUICtrl>("desc")->setValue(item->getDescription());
|
||||
getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
|
||||
|
||||
getChild<LLUICtrl>("name")->setValue(item->getName());
|
||||
getChild<LLLineEditor>("name")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
|
||||
}
|
||||
|
||||
return LLPreview::postBuild();
|
||||
|
|
|
|||
|
|
@ -1026,12 +1026,39 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &n
|
|||
std::set<std::string> framenames;
|
||||
std::set<std::string> notfound;
|
||||
|
||||
// expected and correct folder sctructure is to have
|
||||
// three folders in widnlight's root: days, water, skies
|
||||
std::string base_path(gDirUtilp->getDirName(path));
|
||||
std::string water_path(base_path);
|
||||
std::string sky_path(base_path);
|
||||
std::string day_path(base_path);
|
||||
|
||||
gDirUtilp->append(water_path, "water");
|
||||
gDirUtilp->append(sky_path, "skies");
|
||||
gDirUtilp->append(day_path, "days");
|
||||
|
||||
if (!gDirUtilp->fileExists(day_path))
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "File " << name << ".xml is not in \"days\" folder." << LL_ENDL;
|
||||
}
|
||||
|
||||
if (!gDirUtilp->fileExists(water_path))
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Failed to find accompaniying water folder for file " << name
|
||||
<< ".xml. Falling back to using default folder" << LL_ENDL;
|
||||
|
||||
water_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight");
|
||||
gDirUtilp->append(water_path, "water");
|
||||
}
|
||||
|
||||
if (!gDirUtilp->fileExists(sky_path))
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Failed to find accompaniying skies folder for file " << name
|
||||
<< ".xml. Falling back to using default folder" << LL_ENDL;
|
||||
|
||||
sky_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight");
|
||||
gDirUtilp->append(sky_path, "skies");
|
||||
}
|
||||
|
||||
newsettings[SETTING_NAME] = name;
|
||||
|
||||
|
|
|
|||
|
|
@ -654,11 +654,13 @@ F32 LLSpatialPartition::calcDistance(LLSpatialGroup* group, LLCamera& camera)
|
|||
dist = eye.getLength3().getF32();
|
||||
}
|
||||
|
||||
#if !LL_RELEASE
|
||||
LL_DEBUGS("RiggedBox") << "calcDistance, group " << group << " camera " << origin << " obj bounds "
|
||||
<< group->mObjectBounds[0] << ", " << group->mObjectBounds[1]
|
||||
<< " dist " << dist << " radius " << group->mRadius << LL_ENDL;
|
||||
#endif
|
||||
// <FS:Beq> This debug has measurable imapcty even when discarded
|
||||
//#if !LL_RELEASE
|
||||
// LL_DEBUGS("RiggedBox") << "calcDistance, group " << group << " camera " << origin << " obj bounds "
|
||||
// << group->mObjectBounds[0] << ", " << group->mObjectBounds[1]
|
||||
// << " dist " << dist << " radius " << group->mRadius << LL_ENDL;
|
||||
//#endif
|
||||
// </FS:Beq>
|
||||
|
||||
if (dist < 16.f)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1685,7 +1685,7 @@ bool idle_startup()
|
|||
{
|
||||
// Generic failure message
|
||||
std::ostringstream emsg;
|
||||
emsg << LLTrans::getString("LoginFailed") << "\n";
|
||||
emsg << LLTrans::getString("LoginFailedHeader") << "\n";
|
||||
if(LLLoginInstance::getInstance()->authFailure())
|
||||
{
|
||||
LL_INFOS("LLStartup") << "Login failed, LLLoginInstance::getResponse(): "
|
||||
|
|
@ -1698,11 +1698,37 @@ bool idle_startup()
|
|||
std::string message_id = response["message_id"];
|
||||
std::string message; // actual string to show the user
|
||||
|
||||
if(!message_id.empty() && LLTrans::findString(message, message_id, response["message_args"]))
|
||||
{
|
||||
// message will be filled in with the template and arguments
|
||||
}
|
||||
else if(!message_response.empty())
|
||||
bool localized_by_id = false;
|
||||
if(!message_id.empty())
|
||||
{
|
||||
LLSD message_args = response["message_args"];
|
||||
if (message_args.has("TIME")
|
||||
&& (message_id == "LoginFailedAcountSuspended"
|
||||
|| message_id == "LoginFailedAccountMaintenance"))
|
||||
{
|
||||
LLDate date;
|
||||
std::string time_string;
|
||||
if (date.fromString(message_args["TIME"].asString()))
|
||||
{
|
||||
LLSD args;
|
||||
args["datetime"] = (S32)date.secondsSinceEpoch();
|
||||
LLTrans::findString(time_string, "LocalTime", args);
|
||||
}
|
||||
else
|
||||
{
|
||||
time_string = message_args["TIME"].asString() + " " + LLTrans::getString("PacificTime");
|
||||
}
|
||||
|
||||
message_args["TIME"] = time_string;
|
||||
}
|
||||
// message will be filled in with the template and arguments
|
||||
if (LLTrans::findString(message, message_id, message_args))
|
||||
{
|
||||
localized_by_id = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!localized_by_id && !message_response.empty())
|
||||
{
|
||||
// *HACK: "no_inventory_host" sent as the message itself.
|
||||
// Remove this clause when server is sending message_id as well.
|
||||
|
|
|
|||
|
|
@ -584,13 +584,6 @@ static bool handleRenderBumpChanged(const LLSD& newval)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool handleRenderDebugGLChanged(const LLSD& newvalue)
|
||||
{
|
||||
gDebugGL = newvalue.asBoolean() || gDebugSession;
|
||||
gGL.clearErrors();
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleRenderDebugPipelineChanged(const LLSD& newvalue)
|
||||
{
|
||||
gDebugPipeline = newvalue.asBoolean();
|
||||
|
|
@ -1193,7 +1186,6 @@ void settings_setup_listeners()
|
|||
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("RenderVSyncEnable")->getSignal()->connect(boost::bind(&handleVSyncChanged, _2));
|
||||
gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
|
||||
gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2));
|
||||
gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2));
|
||||
gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2));
|
||||
// [SL:KB] - Patch: Settings-RenderResolutionMultiplier | Checked: Catznip-5.4
|
||||
|
|
|
|||
|
|
@ -560,6 +560,7 @@ void LLViewerJoystick::terminate()
|
|||
// -----------------------------------------------------------------------------
|
||||
void LLViewerJoystick::updateStatus()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT;
|
||||
#if LIB_NDOF
|
||||
|
||||
ndof_update(mNdofDev);
|
||||
|
|
@ -752,6 +753,7 @@ void LLViewerJoystick::resetDeltas(S32 axis[])
|
|||
// -----------------------------------------------------------------------------
|
||||
void LLViewerJoystick::moveObjects(bool reset)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT;
|
||||
static bool toggle_send_to_sim = false;
|
||||
|
||||
if (!gFocusMgr.getAppHasFocus() || mDriverState != JDS_INITIALIZED
|
||||
|
|
@ -876,6 +878,7 @@ void LLViewerJoystick::moveObjects(bool reset)
|
|||
// -----------------------------------------------------------------------------
|
||||
void LLViewerJoystick::moveAvatar(bool reset)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT;
|
||||
if (!gFocusMgr.getAppHasFocus() || mDriverState != JDS_INITIALIZED
|
||||
|| !gSavedSettings.getBOOL("JoystickEnabled") || !gSavedSettings.getBOOL("JoystickAvatarEnabled"))
|
||||
{
|
||||
|
|
@ -1119,6 +1122,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
|
|||
// -----------------------------------------------------------------------------
|
||||
void LLViewerJoystick::moveFlycam(bool reset)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT;
|
||||
static LLQuaternion sFlycamRotation;
|
||||
static LLVector3 sFlycamPosition;
|
||||
static F32 sFlycamZoom;
|
||||
|
|
@ -1283,6 +1287,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
|
|||
// -----------------------------------------------------------------------------
|
||||
bool LLViewerJoystick::toggleFlycam()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT;
|
||||
if (!gSavedSettings.getBOOL("JoystickEnabled") || !gSavedSettings.getBOOL("JoystickFlycamEnabled"))
|
||||
{
|
||||
mOverrideCamera = false;
|
||||
|
|
@ -1319,6 +1324,7 @@ bool LLViewerJoystick::toggleFlycam()
|
|||
|
||||
void LLViewerJoystick::scanJoystick()
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_INPUT;
|
||||
if (mDriverState != JDS_INITIALIZED || !gSavedSettings.getBOOL("JoystickEnabled"))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -478,7 +478,19 @@ void set_merchant_SLM_menu()
|
|||
// All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool
|
||||
gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(TRUE);
|
||||
LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings");
|
||||
gToolBarView->enableCommand(command->id(), true);
|
||||
gToolBarView->enableCommand(command->id(), true);
|
||||
|
||||
const LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
||||
if (marketplacelistings_id.isNull())
|
||||
{
|
||||
U32 mkt_status = LLMarketplaceData::instance().getSLMStatus();
|
||||
bool is_merchant = (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT) || (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MIGRATED_MERCHANT);
|
||||
if (is_merchant)
|
||||
{
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, true);
|
||||
LL_WARNS("SLM") << "Creating the marketplace listings folder for a merchant" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void check_merchant_status(bool force)
|
||||
|
|
@ -5293,29 +5305,15 @@ bool is_object_sittable()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// only works on pie menu
|
||||
void handle_object_sit_or_stand()
|
||||
void handle_object_sit(LLViewerObject *object, const LLVector3 &offset)
|
||||
{
|
||||
LLPickInfo pick = LLToolPie::getInstance()->getPick();
|
||||
LLViewerObject *object = pick.getObject();;
|
||||
if (!object || pick.mPickType == LLPickInfo::PICK_FLORA)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (sitting_on_selection())
|
||||
{
|
||||
gAgent.standUp();
|
||||
return;
|
||||
}
|
||||
|
||||
// get object selection offset
|
||||
|
||||
// if (object && object->getPCode() == LL_PCODE_VOLUME)
|
||||
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c
|
||||
if ( (object && object->getPCode() == LL_PCODE_VOLUME) &&
|
||||
((!rlv_handler_t::isEnabled()) || (RlvActions::canSit(object, pick.mObjectOffset))) )
|
||||
((!rlv_handler_t::isEnabled()) || (RlvActions::canSit(object, offset))) )
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
|
||||
|
|
@ -5336,12 +5334,42 @@ void handle_object_sit_or_stand()
|
|||
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
gMessageSystem->nextBlockFast(_PREHASH_TargetObject);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_TargetID, object->mID);
|
||||
gMessageSystem->addVector3Fast(_PREHASH_Offset, pick.mObjectOffset);
|
||||
gMessageSystem->addVector3Fast(_PREHASH_Offset, offset);
|
||||
|
||||
object->getRegion()->sendReliableMessage();
|
||||
}
|
||||
}
|
||||
|
||||
void handle_object_sit_or_stand()
|
||||
{
|
||||
LLPickInfo pick = LLToolPie::getInstance()->getPick();
|
||||
LLViewerObject *object = pick.getObject();
|
||||
if (!object || pick.mPickType == LLPickInfo::PICK_FLORA)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (sitting_on_selection())
|
||||
{
|
||||
gAgent.standUp();
|
||||
return;
|
||||
}
|
||||
|
||||
handle_object_sit(object, pick.mObjectOffset);
|
||||
}
|
||||
|
||||
void handle_object_sit(const LLUUID& object_id)
|
||||
{
|
||||
LLViewerObject* obj = gObjectList.findObject(object_id);
|
||||
if (!obj)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLVector3 offset(0, 0, 0);
|
||||
handle_object_sit(obj, offset);
|
||||
}
|
||||
|
||||
void near_sit_down_point(BOOL success, void *)
|
||||
{
|
||||
if (success)
|
||||
|
|
@ -7846,6 +7874,24 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t
|
|||
}
|
||||
};
|
||||
|
||||
class LLAvatarResetSelfSkeletonAndAnimations : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
|
||||
if (avatar)
|
||||
{
|
||||
avatar->resetSkeleton(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgentAvatarp->resetSkeleton(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class LLAvatarAddContact : public view_listener_t
|
||||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
|
|
@ -9737,7 +9783,7 @@ class FSProfilerToggle : public view_listener_t
|
|||
{
|
||||
BOOL checked = gSavedSettings.getBOOL( "ProfilingActive" );
|
||||
gSavedSettings.setBOOL( "ProfilingActive", !checked );
|
||||
gProfilerEnabled = !checked;
|
||||
LLProfiler::active = !checked;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
@ -12211,6 +12257,7 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
|
||||
view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton");
|
||||
view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations");
|
||||
view_listener_t::addMenu(new LLAvatarResetSelfSkeletonAndAnimations(), "Avatar.ResetSelfSkeletonAndAnimations");
|
||||
enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
|
||||
|
||||
commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
|
||||
|
|
|
|||
|
|
@ -156,6 +156,7 @@ void handle_save_snapshot(void *);
|
|||
void handle_toggle_flycam();
|
||||
|
||||
void handle_object_sit_or_stand();
|
||||
void handle_object_sit(const LLUUID& object_id);
|
||||
void handle_give_money_dialog();
|
||||
bool enable_pay_object();
|
||||
bool enable_buy_object();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue