Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
commit
ffb75050fd
942
autobuild.xml
942
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)
|
||||
|
|
|
|||
|
|
@ -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,11 +35,12 @@ set(cmake_SOURCE_FILES
|
|||
FindSCP.cmake
|
||||
FindURIPARSER.cmake
|
||||
FindXmlRpcEpi.cmake
|
||||
FindZLIB.cmake
|
||||
FindZLIBNG.cmake
|
||||
FMODSTUDIO.cmake
|
||||
FreeType.cmake
|
||||
GLEXT.cmake
|
||||
GLH.cmake
|
||||
GLOD.cmake
|
||||
## GStreamer010Plugin.cmake
|
||||
GoogleMock.cmake
|
||||
Growl.cmake
|
||||
|
|
@ -97,7 +96,7 @@ set(cmake_SOURCE_FILES
|
|||
VisualLeakDetector.cmake
|
||||
LibVLCPlugin.cmake
|
||||
XmlRpcEpi.cmake
|
||||
ZLIB.cmake
|
||||
ZLIBNG.cmake
|
||||
)
|
||||
|
||||
source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ if(WINDOWS)
|
|||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
nghttp2.dll
|
||||
glod.dll # <FS:Beq> restore GLOD
|
||||
libhunspell.dll
|
||||
uriparser.dll
|
||||
)
|
||||
|
|
@ -198,6 +199,7 @@ elseif(DARWIN)
|
|||
libaprutil-1.0.dylib
|
||||
libaprutil-1.dylib
|
||||
${EXPAT_COPY}
|
||||
libGLOD.dylib # <FS:Beq> restore GLOD
|
||||
libhunspell-1.3.0.dylib
|
||||
libndofdev.dylib
|
||||
libnghttp2.dylib
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
#if (USESYSTEMLIBS)
|
||||
# set(GLOD_FIND_REQUIRED true)
|
||||
# include(FindGLOD)
|
||||
#else (USESYSTEMLIBS)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(glod)
|
||||
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||
if(LINUX)
|
||||
set(GLOD_LIBRARIES GLOD vds)
|
||||
else()
|
||||
set(GLOD_LIBRARIES GLOD)
|
||||
endif()
|
||||
#endif (USESYSTEMLIBS)
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use_prebuilt_binary(meshoptimizer)
|
|||
if (WINDOWS)
|
||||
set(MESHOPTIMIZER_LIBRARIES meshoptimizer.lib)
|
||||
elseif (LINUX)
|
||||
set(MESHOPTIMIZER_LIBRARIES meshoptimizer.o)
|
||||
set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.a)
|
||||
elseif (DARWIN)
|
||||
set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.a)
|
||||
endif (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -217,8 +217,12 @@ set(FLICKR_API_SECRET "846f0958020b553e")
|
|||
# Discord client key.
|
||||
set(DDISCORD_API_KEY "427641535253708801")
|
||||
|
||||
set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
|
||||
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
|
||||
# FS:ND Don't force this into the cache, that can have some strange effects. Instead make it a normal variable
|
||||
#set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
|
||||
set(ENABLE_SIGNING OFF)
|
||||
|
||||
# FS:ND Don't force this into the cache here, we set it in 00-Common.make
|
||||
#set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
|
||||
|
||||
set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
|
||||
set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.")
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ include(Linking)
|
|||
include(UI)
|
||||
include(CURL)
|
||||
include(OpenSSL)
|
||||
include(ZLIB)
|
||||
include(ZLIBNG)
|
||||
|
||||
include_directories(
|
||||
${LLCOREHTTP_INCLUDE_DIRS}
|
||||
|
|
@ -54,12 +54,12 @@ set(LIBRT_LIBRARY rt)
|
|||
|
||||
target_link_libraries(linux-crash-logger
|
||||
${UI_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${ZLIBNG_LIBRARIES}
|
||||
${LIBRT_LIBRARY}
|
||||
X11
|
||||
X11
|
||||
)
|
||||
|
||||
add_custom_target(linux-crash-logger-target ALL
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
)
|
||||
|
|
@ -130,6 +130,7 @@ set(llcommon_HEADER_FILES
|
|||
CMakeLists.txt
|
||||
|
||||
chrono.h
|
||||
classic_callback.h
|
||||
commoncontrol.h
|
||||
ctype_workaround.h
|
||||
fix_macros.h
|
||||
|
|
@ -341,7 +342,7 @@ target_link_libraries(
|
|||
${APR_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
${JSONCPP_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${ZLIBNG_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${BOOST_FIBER_LIBRARY}
|
||||
${BOOST_CONTEXT_LIBRARY}
|
||||
|
|
@ -377,16 +378,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}")
|
||||
|
|
@ -404,8 +406,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) */
|
||||
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -452,7 +452,9 @@ ElementT LLThreadSafeQueue<ElementT, QueueT>::pop(void)
|
|||
// so we can finish draining the queue.
|
||||
pop_result popped = pop_(lock1, value);
|
||||
if (popped == POPPED)
|
||||
return std::move(value);
|
||||
// <FS:Ansariel> Prevent RVO elision
|
||||
//return std::move(value);
|
||||
return value;
|
||||
|
||||
// Once the queue is DONE, there will never be any more coming.
|
||||
if (popped == DONE)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -248,7 +248,9 @@ namespace LL
|
|||
TimePoint until = TimePoint::clock::now() + std::chrono::hours(24);
|
||||
pop_result popped = tryPopUntil_(lock, until, tt);
|
||||
if (popped == POPPED)
|
||||
return std::move(tt);
|
||||
// <FS:Ansariel> Prevent RVO elision
|
||||
//return std::move(tt);
|
||||
return tt;
|
||||
|
||||
// DONE: throw, just as super::pop() does
|
||||
if (popped == DONE)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#ifdef LL_USESYSTEMLIBS
|
||||
# include <zlib.h>
|
||||
#else
|
||||
# include "zlib/zlib.h"
|
||||
# include "zlib-ng/zlib.h"
|
||||
#endif
|
||||
|
||||
extern LLControlGroup gSavedSettings;
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -2456,6 +2456,16 @@ LLImageGLThread::LLImageGLThread(LLWindow* window)
|
|||
mFinished = false;
|
||||
|
||||
mContext = mWindow->createSharedContext();
|
||||
|
||||
// <FS:ND> If context creating is not supported (SDL1), mark texture thread disabled and exit
|
||||
if( !mContext )
|
||||
{
|
||||
sEnabled = false;
|
||||
mFinished = true;
|
||||
return;
|
||||
}
|
||||
// </FS:ND>
|
||||
|
||||
ThreadPool::start();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -326,6 +326,18 @@ LLScrollListItem* LLComboBox::addSeparator(EAddPosition pos)
|
|||
return mList->addSeparator(pos);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Get items by value
|
||||
LLScrollListItem* LLComboBox::getItemByValue(const LLSD& value)
|
||||
{
|
||||
if (mList)
|
||||
{
|
||||
return mList->getItem(value);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLComboBox::sortByName(BOOL ascending)
|
||||
{
|
||||
mList->sortOnce(0, ascending);
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ public:
|
|||
BOOL remove( S32 index ); // remove item by index, return TRUE if found and removed
|
||||
void removeall() { clearRows(); }
|
||||
bool itemExists(const std::string& name);
|
||||
LLScrollListItem* getItemByValue(const LLSD& value); // <FS:Ansariel> Get items by value
|
||||
|
||||
void sortByName(BOOL ascending = TRUE); // Sort the entries in the combobox by name
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -3970,12 +3988,14 @@ LLTearOffMenu::~LLTearOffMenu()
|
|||
void LLTearOffMenu::draw()
|
||||
{
|
||||
mMenu->setBackgroundVisible(isBackgroundOpaque());
|
||||
// <FS:Ansariel> FIRE-31823: Torn off menu doesn't update enabled/visible state
|
||||
mMenu->needsArrange();
|
||||
|
||||
if (getRect().getHeight() != mTargetHeight)
|
||||
{
|
||||
// animate towards target height
|
||||
reshape(getRect().getWidth(), llceil(lerp((F32)getRect().getHeight(), (F32)mTargetHeight, LLSmoothInterpolation::getInterpolant(0.05f))));
|
||||
mMenu->needsArrange();
|
||||
//mMenu->needsArrange(); // <FS:Ansariel> FIRE-31823: Torn off menu doesn't update enabled/visible state
|
||||
}
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,16 +69,22 @@ void LLProgressBar::draw()
|
|||
static LLTimer timer;
|
||||
F32 alpha = getDrawContext().mAlpha;
|
||||
|
||||
LLColor4 image_bar_color = mColorBackground.get();
|
||||
image_bar_color.setAlpha(alpha);
|
||||
mImageBar->draw(getLocalRect(), image_bar_color);
|
||||
if (mImageBar) // optional according to parameters
|
||||
{
|
||||
LLColor4 image_bar_color = mColorBackground.get();
|
||||
image_bar_color.setAlpha(alpha);
|
||||
mImageBar->draw(getLocalRect(), image_bar_color);
|
||||
}
|
||||
|
||||
alpha *= 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32()));
|
||||
LLColor4 bar_color = mColorBar.get();
|
||||
bar_color.mV[VALPHA] *= alpha; // modulate alpha
|
||||
LLRect progress_rect = getLocalRect();
|
||||
progress_rect.mRight = ll_round(getRect().getWidth() * (mPercentDone / 100.f));
|
||||
mImageFill->draw(progress_rect, bar_color);
|
||||
if (mImageFill)
|
||||
{
|
||||
alpha *= 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32()));
|
||||
LLColor4 bar_color = mColorBar.get();
|
||||
bar_color.mV[VALPHA] *= alpha; // modulate alpha
|
||||
LLRect progress_rect = getLocalRect();
|
||||
progress_rect.mRight = ll_round(getRect().getWidth() * (mPercentDone / 100.f));
|
||||
mImageFill->draw(progress_rect, bar_color);
|
||||
}
|
||||
}
|
||||
|
||||
void LLProgressBar::setValue(const LLSD& value)
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ LLKeyboardSDL::LLKeyboardSDL()
|
|||
mTranslateKeyMap[SDLK_LCTRL] = KEY_CONTROL;
|
||||
mTranslateKeyMap[SDLK_RCTRL] = KEY_CONTROL;
|
||||
mTranslateKeyMap[SDLK_LALT] = KEY_ALT;
|
||||
mTranslateKeyMap[SDLK_RALT] = KEY_ALT;
|
||||
// mTranslateKeyMap[SDLK_RALT] = KEY_ALT;
|
||||
mTranslateKeyMap[SDLK_HOME] = KEY_HOME;
|
||||
mTranslateKeyMap[SDLK_END] = KEY_END;
|
||||
mTranslateKeyMap[SDLK_PAGEUP] = KEY_PAGE_UP;
|
||||
|
|
@ -148,7 +148,7 @@ void LLKeyboardSDL::resetMaskKeys()
|
|||
mKeyLevel[KEY_CONTROL] = TRUE;
|
||||
}
|
||||
|
||||
if(mask & KMOD_ALT)
|
||||
if(mask & KMOD_LALT)
|
||||
{
|
||||
mKeyLevel[KEY_ALT] = TRUE;
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ MASK LLKeyboardSDL::updateModifiers(const U32 mask)
|
|||
out_mask |= MASK_CONTROL;
|
||||
}
|
||||
|
||||
if(mask & KMOD_ALT)
|
||||
if(mask & KMOD_LALT)
|
||||
{
|
||||
out_mask |= MASK_ALT;
|
||||
}
|
||||
|
|
@ -252,7 +252,7 @@ MASK LLKeyboardSDL::currentMask(BOOL for_mouse_event)
|
|||
result |= MASK_SHIFT;
|
||||
if (mask & KMOD_CTRL)
|
||||
result |= MASK_CONTROL;
|
||||
if (mask & KMOD_ALT)
|
||||
if (mask & KMOD_LALT)
|
||||
result |= MASK_ALT;
|
||||
|
||||
// For keyboard events, consider Meta keys equivalent to Control
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ public:
|
|||
void interruptLanguageTextInput() override;
|
||||
void spawnWebBrowser(const std::string& escaped_url, bool async) override;
|
||||
F32 getSystemUISize() override;
|
||||
/*virtual*/ void openFile(const std::string& file_name);
|
||||
/*virtual*/ void setTitle(const std::string& title);
|
||||
void openFile(const std::string& file_name) override;
|
||||
void setTitle(const std::string& title) override;
|
||||
|
||||
static std::vector<std::string> getDisplaysResolutionList();
|
||||
|
||||
|
|
|
|||
|
|
@ -3024,4 +3024,26 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
return rtns;
|
||||
}
|
||||
|
||||
void* LLWindowSDL::createSharedContext()
|
||||
{
|
||||
LL_WARNS() << "Not available" << LL_ENDL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void LLWindowSDL::makeContextCurrent(void* contextPtr)
|
||||
{
|
||||
LL_WARNS() << "Not available" << LL_ENDL;
|
||||
LL_PROFILER_GPU_CONTEXT;
|
||||
}
|
||||
|
||||
void LLWindowSDL::destroySharedContext(void* contextPtr)
|
||||
{
|
||||
LL_WARNS() << "Not available" << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLWindowSDL::toggleVSync(bool enable_vsync)
|
||||
{
|
||||
LL_WARNS() << "Not available" << LL_ENDL;
|
||||
}
|
||||
|
||||
#endif // LL_SDL
|
||||
|
|
|
|||
|
|
@ -151,7 +151,11 @@ public:
|
|||
static Window get_SDL_XWindowID(void);
|
||||
static Display* get_SDL_Display(void);
|
||||
#endif // LL_X11
|
||||
|
||||
void* createSharedContext() override;
|
||||
void makeContextCurrent(void* context) override;
|
||||
void destroySharedContext(void* context) override;
|
||||
void toggleVSync(bool enable_vsync) override;
|
||||
|
||||
protected:
|
||||
LLWindowSDL(LLWindowCallbacks* callbacks,
|
||||
const std::string& title, int x, int y, int width, int height, U32 flags,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,10 @@ static bool ATIbug = false;
|
|||
// be only one object of this class at any time. Currently this is true.
|
||||
static LLWindowSDL *gWindowImplementation = NULL;
|
||||
|
||||
|
||||
// extern "C" Bool XineramaIsActive (Display *dpy)
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
void maybe_lock_display(void)
|
||||
{
|
||||
if (gWindowImplementation && gWindowImplementation->Lock_Display) {
|
||||
|
|
@ -649,6 +652,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
|
|||
mReallyCapturedCount = 0;
|
||||
|
||||
SDL_SetHint( SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0" );
|
||||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO ) < 0 )
|
||||
{
|
||||
|
|
@ -713,6 +717,8 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
|
|||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, mFSAASamples);
|
||||
}
|
||||
|
||||
// <FS:Zi> Make shared context work on Linux for multithreaded OpenGL
|
||||
SDL_GL_SetAttribute(SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1);
|
||||
mWindow = SDL_CreateWindow( mWindowTitle.c_str(), SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, mSDLFlags );
|
||||
|
||||
if( mWindow )
|
||||
|
|
@ -863,6 +869,10 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
|
|||
}
|
||||
#endif // LL_X11
|
||||
|
||||
// clear screen to black right at the start so it doesn't look like a crash
|
||||
glClearColor(0.0f, 0.0f, 0.0f ,1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
SDL_GL_SwapWindow(mWindow);
|
||||
|
||||
SDL_StartTextInput();
|
||||
//make sure multisampling is disabled by default
|
||||
|
|
@ -1774,10 +1784,12 @@ void LLWindowSDL::gatherInput()
|
|||
{
|
||||
mKeyVirtualKey = key;
|
||||
|
||||
if( (MASK_CONTROL|MASK_ALT)&mKeyModifiers )
|
||||
gKeyboard->handleKeyDown(mKeyVirtualKey, mKeyModifiers );
|
||||
// filter ctrl and left-alt keypresses from line inputs so we don't end up with e.g.
|
||||
// "h" in teleport history filter input after pressing alt+h to call up the floater
|
||||
if (mKeyModifiers & (MASK_CONTROL | MASK_ALT))
|
||||
gKeyboard->handleKeyDown(mKeyVirtualKey, mKeyModifiers);
|
||||
else
|
||||
handleUnicodeUTF16( key, mKeyModifiers );
|
||||
handleUnicodeUTF16(key, mKeyModifiers);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -1787,13 +1799,23 @@ void LLWindowSDL::gatherInput()
|
|||
mKeyModifiers = event.key.keysym.mod;
|
||||
mInputType = "keydown";
|
||||
|
||||
// treat all possible Enter/Return keys the same
|
||||
if (mKeyVirtualKey == SDLK_RETURN2 || mKeyVirtualKey == SDLK_KP_ENTER)
|
||||
{
|
||||
mKeyVirtualKey = SDLK_RETURN;
|
||||
}
|
||||
|
||||
gKeyboard->handleKeyDown(mKeyVirtualKey, mKeyModifiers );
|
||||
|
||||
// <FS:ND> Slightly hacky :| To make the viewer honor enter (eg to accept form input) we've to not only send handleKeyDown but also send a
|
||||
// invoke handleUnicodeUTF16 in case the user hits return.
|
||||
// Note that we cannot blindly use handleUnicodeUTF16 for each SDL_KEYDOWN. Doing so will create bogus keyboard input (like % for cursor left).
|
||||
if( mKeyVirtualKey == SDLK_RETURN )
|
||||
{
|
||||
// fix return key not working when capslock, scrolllock or numlock are enabled
|
||||
mKeyModifiers &= (~(KMOD_NUM | KMOD_CAPS | KMOD_MODE | KMOD_SCROLL));
|
||||
handleUnicodeUTF16( mKeyVirtualKey, mKeyModifiers );
|
||||
}
|
||||
|
||||
// part of the fix for SL-13243
|
||||
if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0)
|
||||
|
|
@ -1806,6 +1828,12 @@ void LLWindowSDL::gatherInput()
|
|||
mKeyModifiers = event.key.keysym.mod;
|
||||
mInputType = "keyup";
|
||||
|
||||
// treat all possible Enter/Return keys the same
|
||||
if (mKeyVirtualKey == SDLK_RETURN2 || mKeyVirtualKey == SDLK_KP_ENTER)
|
||||
{
|
||||
mKeyVirtualKey = SDLK_RETURN;
|
||||
}
|
||||
|
||||
if (SDLCheckGrabbyKeys(mKeyVirtualKey, FALSE) == 0)
|
||||
SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243
|
||||
|
||||
|
|
@ -1909,7 +1937,7 @@ void LLWindowSDL::gatherInput()
|
|||
// <FS:ND> I think is is not
|
||||
// SDL_SetWindowSize(mWindow, width, height);
|
||||
//
|
||||
|
||||
|
||||
mCallbacks->handleResize(this, width, height);
|
||||
}
|
||||
else if( event.window.event == SDL_WINDOWEVENT_FOCUS_GAINED ) // <FS:ND> What about SDL_WINDOWEVENT_ENTER (mouse focus)
|
||||
|
|
@ -2560,4 +2588,57 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
|
|||
return rtns;
|
||||
}
|
||||
|
||||
// <FS:Zi> Make shared context work on Linux for multithreaded OpenGL
|
||||
class sharedContext
|
||||
{
|
||||
public:
|
||||
SDL_GLContext mContext;
|
||||
};
|
||||
|
||||
void* LLWindowSDL::createSharedContext()
|
||||
{
|
||||
sharedContext* sc = new sharedContext();
|
||||
sc->mContext = SDL_GL_CreateContext(mWindow);
|
||||
if (sc->mContext)
|
||||
{
|
||||
SDL_GL_SetSwapInterval(0);
|
||||
SDL_GL_MakeCurrent(mWindow, mContext);
|
||||
|
||||
LLCoordScreen size;
|
||||
if (getSize(&size))
|
||||
{
|
||||
setSize(size);
|
||||
}
|
||||
|
||||
LL_DEBUGS() << "Creating shared OpenGL context successful!" << LL_ENDL;
|
||||
|
||||
return (void*)sc;
|
||||
}
|
||||
|
||||
LL_WARNS() << "Creating shared OpenGL context failed!" << LL_ENDL;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void LLWindowSDL::makeContextCurrent(void* context)
|
||||
{
|
||||
LL_PROFILER_GPU_CONTEXT;
|
||||
SDL_GL_MakeCurrent(mWindow, ((sharedContext*)context)->mContext);
|
||||
}
|
||||
|
||||
void LLWindowSDL::destroySharedContext(void* context)
|
||||
{
|
||||
sharedContext* sc = (sharedContext*)context;
|
||||
|
||||
SDL_GL_DeleteContext(sc->mContext);
|
||||
|
||||
delete sc;
|
||||
}
|
||||
|
||||
void LLWindowSDL::toggleVSync(bool enable_vsync)
|
||||
{
|
||||
SDL_GL_SetSwapInterval(enable_vsync);
|
||||
}
|
||||
// </FS:Zi>
|
||||
|
||||
#endif // LL_SDL
|
||||
|
|
|
|||
|
|
@ -66,6 +66,12 @@ public:
|
|||
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
|
||||
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
|
||||
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
|
||||
// <FS:Zi> Make shared context work on Linux for multithreaded OpenGL
|
||||
void* createSharedContext() override;
|
||||
void makeContextCurrent(void* context) override;
|
||||
void destroySharedContext(void* context) override;
|
||||
/*virtual*/ void toggleVSync(bool enable_vsync);
|
||||
// </FS:Zi>
|
||||
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
|
||||
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
|
||||
/*virtual*/ void showCursor();
|
||||
|
|
|
|||
|
|
@ -3159,8 +3159,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.
|
||||
|
|
@ -17,6 +17,7 @@ include(GLIB)
|
|||
include(DragDrop)
|
||||
include(EXPAT)
|
||||
include(FMODSTUDIO)
|
||||
include(GLOD) # <FS:Beq/> restore GLOD
|
||||
include(Hunspell)
|
||||
include(JPEGEncoderBasic)
|
||||
include(JsonCpp)
|
||||
|
|
@ -56,6 +57,7 @@ include(UnixInstall)
|
|||
include(ViewerMiscLibs)
|
||||
#include(ViewerManager) # <FS:Ansariel> Remove VMP
|
||||
include(VisualLeakDetector)
|
||||
include(ZLIBNG)
|
||||
include(URIPARSER)
|
||||
include(Growl)
|
||||
include(ColladaDom)
|
||||
|
|
@ -82,6 +84,7 @@ endif(FMODSTUDIO)
|
|||
include_directories(
|
||||
${DBUSGLIB_INCLUDE_DIRS}
|
||||
${JSONCPP_INCLUDE_DIR}
|
||||
${GLOD_INCLUDE_DIR} # <FS:Beq/> restore GLOD
|
||||
${LLAUDIO_INCLUDE_DIRS}
|
||||
${LLCHARACTER_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
|
|
@ -2269,6 +2272,11 @@ if (WINDOWS)
|
|||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll
|
||||
# <FS:Beq> Restore GLOD build dependencies
|
||||
${SHARED_LIB_STAGING_DIR}/Release/glod.dll
|
||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll
|
||||
${SHARED_LIB_STAGING_DIR}/Debug/glod.dll
|
||||
# </FS:Beq>
|
||||
${SHARED_LIB_STAGING_DIR}/Release/libcollada14dom22.dll
|
||||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libcollada14dom22.dll
|
||||
${SHARED_LIB_STAGING_DIR}/Debug/libcollada14dom22-d.dll
|
||||
|
|
@ -2297,10 +2305,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
|
||||
|
|
@ -2481,14 +2485,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}
|
||||
|
|
@ -2522,6 +2526,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
|||
${OPENGL_LIBRARIES}
|
||||
${FMODWRAPPER_LIBRARY} # must come after LLAudio
|
||||
${OPENAL_LIBRARIES}
|
||||
${GLOD_LIBRARIES} # <FS:Beq/> restore GLOD dependencies
|
||||
${OPENGL_LIBRARIES}
|
||||
${JSONCPP_LIBRARIES}
|
||||
${SDL_LIBRARY}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1028,6 +1028,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSCreateCallingCards</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Don't create calling cards when friending other avatars (requires restart)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSSupportGroupChatPrefix3</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -5977,7 +5988,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>
|
||||
|
|
@ -11525,6 +11536,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>
|
||||
|
|
@ -12088,10 +12110,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>
|
||||
|
|
@ -20907,7 +20929,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<real>0.0</real>
|
||||
</map>
|
||||
<key>FSShowMapDetails</key>
|
||||
<key>StarLightShowMapDetails</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show the details panel on the side of the World Map</string>
|
||||
|
|
@ -24505,6 +24527,19 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSLatencyOneTimeFixRun</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>One time fix has run for this install for script dialog colors on Latency</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>HideFromEditor</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSUseCtrlShout</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>firestorm</string>
|
||||
<string>starlight</string>
|
||||
</map>
|
||||
|
||||
<key>SkinCurrentTheme</key>
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>Firestorm</string>
|
||||
<string>Starlight</string>
|
||||
</map>
|
||||
|
||||
<key>FSSkinCurrentThemeReadableName</key>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ RenderAvatarLODFactor 1 1.0
|
|||
RenderAvatarPhysicsLODFactor 1 1.0
|
||||
RenderAvatarMaxNonImpostors 1 16
|
||||
RenderAvatarMaxComplexity 1 350000
|
||||
RenderAvatarVP 1 1
|
||||
RenderAutoMuteSurfaceAreaLimit 1 1000.0
|
||||
RenderCubeMap 1 1
|
||||
RenderDelayVBUpdate 1 0
|
||||
|
|
@ -69,7 +68,7 @@ RenderShadowDetail 1 2
|
|||
RenderUseStreamVBO 1 1
|
||||
RenderFSAASamples 1 16
|
||||
RenderMaxTextureIndex 1 16
|
||||
RenderGLCoreProfile 1 1
|
||||
RenderGLContextCoreProfile 1 1
|
||||
RenderGLMultiThreaded 1 1
|
||||
|
||||
|
||||
|
|
@ -315,12 +314,12 @@ RenderAnisotropic 1 0
|
|||
RenderCubeMap 0 0
|
||||
RenderFSAASamples 1 0
|
||||
RenderGLMultiThreaded 1 0
|
||||
RenderGLCoreProfile 1 0
|
||||
RenderGLContextCoreProfile 1 0
|
||||
|
||||
// AMD cards generally perform better when not using VBOs for streaming data
|
||||
// AMD cards also prefer an OpenGL Compatibility Profile Context
|
||||
list AMD
|
||||
RenderUseStreamVBO 1 0
|
||||
RenderGLCoreProfile 1 0
|
||||
RenderGLContextCoreProfile 1 0
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,160 +6,159 @@
|
|||
// Global variables and CONSTANTS
|
||||
//
|
||||
|
||||
// Bridge platform
|
||||
string BRIDGE_VERSION = "2.28"; // This should match fslslbridge.cpp
|
||||
string gLatestURL;
|
||||
integer gViewerIsFirestorm;
|
||||
integer gTryHandshakeOnce = TRUE;
|
||||
key gOwner;
|
||||
// Bridge platform
|
||||
string BRIDGE_VERSION = "2.29"; // This should match fslslbridge.cpp
|
||||
string gLatestURL;
|
||||
integer gViewerIsFirestorm;
|
||||
integer gTryHandshakeOnce = TRUE;
|
||||
key gOwner;
|
||||
|
||||
// Teleport
|
||||
float TP_TARGET_DISTANCE = 1.0; // Distance to target when move to target should stop
|
||||
integer MAX_TIME_TO_TP = 10; // (seconds) Should be set to 10 for normal use
|
||||
float TP_TIMER_TICK = 0.05;
|
||||
vector gMttVector; // Target for llMoveToTarget() teleport
|
||||
integer gStartTPTimer;
|
||||
// Teleport
|
||||
float TP_TARGET_DISTANCE = 1.0; // Distance to target when move to target should stop
|
||||
integer MAX_TIME_TO_TP = 10; // (seconds) Should be set to 10 for normal use
|
||||
float TP_TIMER_TICK = 0.05;
|
||||
vector gMttVector; // Target for llMoveToTarget() teleport
|
||||
integer gStartTPTimer;
|
||||
|
||||
// Movelock
|
||||
integer gUseMoveLock;
|
||||
integer gRelockMoveLockAfterMovement;
|
||||
integer gRelockIsUserMoving;
|
||||
// Movelock
|
||||
integer gUseMoveLock;
|
||||
integer gRelockMoveLockAfterMovement;
|
||||
integer gRelockIsUserMoving;
|
||||
|
||||
// Flight assist
|
||||
integer gIsFlyingNow;
|
||||
float FLIGHT_CHECK_NORMAL = 0.5;
|
||||
float FLIGHT_CHECK_SLOW = 3.0;
|
||||
float gFlightAssistPushForce;
|
||||
// Flight assist
|
||||
integer gIsFlyingNow;
|
||||
float FLIGHT_CHECK_NORMAL = 0.5;
|
||||
float FLIGHT_CHECK_SLOW = 3.0;
|
||||
float gFlightAssistPushForce;
|
||||
|
||||
// OpenCollar/LockMeister AO interface
|
||||
integer gAO_EnabledOC;
|
||||
integer gAO_EnabledLM;
|
||||
integer gAO_ChannelOC;
|
||||
integer AO_CHANNEL_LM = -8888;
|
||||
integer gAO_ListenerOC;
|
||||
integer gAO_ListenerLM;
|
||||
key gAO_CollarKey;
|
||||
// OpenCollar/LockMeister AO interface
|
||||
integer gAO_EnabledOC;
|
||||
integer gAO_EnabledLM;
|
||||
integer gAO_ChannelOC;
|
||||
integer AO_CHANNEL_LM = -8888;
|
||||
integer gAO_ListenerOC;
|
||||
integer gAO_ListenerLM;
|
||||
key gAO_CollarKey;
|
||||
|
||||
//
|
||||
// Bridge platform helper functions
|
||||
//
|
||||
|
||||
requestBridgeURL()
|
||||
{
|
||||
llReleaseURL(gLatestURL);
|
||||
gLatestURL = "";
|
||||
llRequestSecureURL();
|
||||
// llRequestURL(); -- Uncomment this line and comment the previous one for HTTP instead of HTTPS
|
||||
}
|
||||
requestBridgeURL()
|
||||
{
|
||||
llReleaseURL(gLatestURL);
|
||||
gLatestURL = "";
|
||||
llRequestSecureURL();
|
||||
}
|
||||
|
||||
detachBridge()
|
||||
{
|
||||
llReleaseURL(gLatestURL);
|
||||
llRequestPermissions(gOwner, PERMISSION_ATTACH);
|
||||
}
|
||||
detachBridge()
|
||||
{
|
||||
llReleaseURL(gLatestURL);
|
||||
llRequestPermissions(gOwner, PERMISSION_ATTACH);
|
||||
}
|
||||
|
||||
//
|
||||
// OpenCollar/LockMeister AO interface functions
|
||||
//
|
||||
|
||||
aoListenOC(key collarid, integer enabled)
|
||||
aoListenOC(key collarid, integer enabled)
|
||||
{
|
||||
llListenRemove(gAO_ListenerOC);
|
||||
if (enabled)
|
||||
{
|
||||
llListenRemove(gAO_ListenerOC);
|
||||
if (enabled)
|
||||
{
|
||||
gAO_ListenerOC = llListen(gAO_ChannelOC, "", collarid, "");
|
||||
gAO_CollarKey = collarid;
|
||||
}
|
||||
else
|
||||
{
|
||||
gAO_CollarKey = NULL_KEY;
|
||||
}
|
||||
gAO_ListenerOC = llListen(gAO_ChannelOC, "", collarid, "");
|
||||
gAO_CollarKey = collarid;
|
||||
}
|
||||
else
|
||||
{
|
||||
gAO_CollarKey = NULL_KEY;
|
||||
}
|
||||
}
|
||||
|
||||
aoState(string newstate)
|
||||
{
|
||||
llOwnerSay("<clientAO state="+newstate+">");
|
||||
}
|
||||
aoState(string newstate)
|
||||
{
|
||||
llOwnerSay("<clientAO state="+newstate+">");
|
||||
}
|
||||
|
||||
integrationCheckOC()
|
||||
integrationCheckOC()
|
||||
{
|
||||
if (gAO_EnabledOC)
|
||||
{
|
||||
if (gAO_EnabledOC)
|
||||
if (gAO_ChannelOC != PUBLIC_CHANNEL)
|
||||
{
|
||||
if (gAO_ChannelOC != PUBLIC_CHANNEL)
|
||||
{
|
||||
aoListenOC(NULL_KEY, TRUE);
|
||||
llWhisper(gAO_ChannelOC, "OpenCollar?");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aoListenOC(NULL_KEY, FALSE);
|
||||
aoListenOC(NULL_KEY, TRUE);
|
||||
llWhisper(gAO_ChannelOC, "OpenCollar?");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aoListenOC(NULL_KEY, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
integrationCheckLM()
|
||||
integrationCheckLM()
|
||||
{
|
||||
if (gAO_EnabledLM)
|
||||
{
|
||||
if (gAO_EnabledLM)
|
||||
{
|
||||
gAO_ListenerLM = llListen(AO_CHANNEL_LM, "", NULL_KEY, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
llListenRemove(gAO_ListenerLM);
|
||||
}
|
||||
gAO_ListenerLM = llListen(AO_CHANNEL_LM, "", NULL_KEY, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
llListenRemove(gAO_ListenerLM);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Teleport Helper functions
|
||||
//
|
||||
|
||||
setTimerEvent2(float time)
|
||||
setTimerEvent2(float time)
|
||||
{
|
||||
if (time <= 0)
|
||||
{
|
||||
if (time <= 0)
|
||||
{
|
||||
llSensorRemove();
|
||||
}
|
||||
else
|
||||
{
|
||||
llSensorRepeat("set-Timer-Event-2", NULL_KEY, AGENT_BY_LEGACY_NAME, 0.001, 0.001, time);
|
||||
}
|
||||
llSensorRemove();
|
||||
}
|
||||
else
|
||||
{
|
||||
llSensorRepeat("set-Timer-Event-2", NULL_KEY, AGENT_BY_LEGACY_NAME, 0.001, 0.001, time);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Flight Assist
|
||||
//
|
||||
|
||||
flightHover(integer yes)
|
||||
flightHover(integer yes)
|
||||
{
|
||||
if (yes)
|
||||
{
|
||||
if (yes)
|
||||
{
|
||||
llSetForce((<0.0, 0.0, 9.8> * llGetMass()), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
llSetForce(ZERO_VECTOR, 1);
|
||||
}
|
||||
llSetForce((<0.0, 0.0, 9.8> * llGetMass()), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
llSetForce(ZERO_VECTOR, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Movelock
|
||||
//
|
||||
|
||||
movelockMe(integer lock)
|
||||
movelockMe(integer lock)
|
||||
{
|
||||
if (lock)
|
||||
{
|
||||
if (lock)
|
||||
{
|
||||
llMoveToTarget(llGetPos() - <0, 0, 0.1>, 0.05);
|
||||
llSetVehicleType(VEHICLE_TYPE_SLED);
|
||||
llSetVehicleFloatParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, 0.05);
|
||||
llSetVehicleFloatParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE, 0.05);
|
||||
}
|
||||
else
|
||||
{
|
||||
llStopMoveToTarget();
|
||||
llSetVehicleType(VEHICLE_TYPE_NONE);
|
||||
}
|
||||
llMoveToTarget(llGetPos() - <0, 0, 0.1>, 0.05);
|
||||
llSetVehicleType(VEHICLE_TYPE_SLED);
|
||||
llSetVehicleFloatParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, 0.05);
|
||||
llSetVehicleFloatParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE, 0.05);
|
||||
}
|
||||
else
|
||||
{
|
||||
llStopMoveToTarget();
|
||||
llSetVehicleType(VEHICLE_TYPE_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// MAIN
|
||||
|
|
@ -365,8 +364,6 @@ default
|
|||
vector targ = gMttVector - loc;
|
||||
float dist = llVecMag(targ);
|
||||
|
||||
// llOwnerSay("current: " + (string)loc + " target: " + (string)targ + " tp distance: " + (string)dist);
|
||||
|
||||
// If we are out of time or distance - stop
|
||||
if (dist < TP_TARGET_DISTANCE || llGetUnixTime() - MAX_TIME_TO_TP > gStartTPTimer || gMttVector == loc)
|
||||
{
|
||||
|
|
@ -391,7 +388,6 @@ default
|
|||
|
||||
http_request(key httpReqID, string Method, string Body)
|
||||
{
|
||||
// llOwnerSay("Received HTTP " + Method + " message. Command body: " + Body);
|
||||
if (Method == URL_REQUEST_GRANTED)
|
||||
{
|
||||
gLatestURL = Body;
|
||||
|
|
@ -429,11 +425,10 @@ default
|
|||
// Radar-specific command to get high-rez altitude data.
|
||||
// Input is list of UUIDs to query, output is list of UUID:Altitude pairs.
|
||||
|
||||
// Get parameters
|
||||
list tUUIDs = llCSV2List(llList2String(commandList, 1));
|
||||
commandList = []; // Free memory
|
||||
integer tLength = llGetListLength(tUUIDs);
|
||||
key tUUID; // Key for llGetobjectDetails()
|
||||
key tUUID;
|
||||
vector tPos;
|
||||
integer i = 0;
|
||||
list responses;
|
||||
|
|
@ -507,9 +502,9 @@ default
|
|||
if (extended)
|
||||
{
|
||||
currentPosition = llGetPos();
|
||||
details = llGetObjectDetails(targetkey, ([OBJECT_NAME, OBJECT_RUNNING_SCRIPT_COUNT, OBJECT_TOTAL_SCRIPT_COUNT, OBJECT_SCRIPT_MEMORY, OBJECT_SCRIPT_TIME, OBJECT_CHARACTER_TIME, OBJECT_DESC, OBJECT_ROOT, OBJECT_PRIM_COUNT, OBJECT_PRIM_EQUIVALENCE, OBJECT_TOTAL_INVENTORY_COUNT, OBJECT_VELOCITY, OBJECT_POS, OBJECT_ROT, OBJECT_OMEGA, OBJECT_CREATOR, OBJECT_OWNER, OBJECT_LAST_OWNER_ID, OBJECT_REZZER_KEY, OBJECT_GROUP, OBJECT_CREATION_TIME, OBJECT_PATHFINDING_TYPE, OBJECT_ATTACHED_POINT, OBJECT_TEMP_ATTACHED]));
|
||||
details = llGetObjectDetails(targetkey, ([OBJECT_NAME, OBJECT_RUNNING_SCRIPT_COUNT, OBJECT_TOTAL_SCRIPT_COUNT, OBJECT_SCRIPT_MEMORY, OBJECT_SCRIPT_TIME, OBJECT_CHARACTER_TIME, OBJECT_DESC, OBJECT_ROOT, OBJECT_PRIM_COUNT, OBJECT_PRIM_EQUIVALENCE, OBJECT_TOTAL_INVENTORY_COUNT, OBJECT_VELOCITY, OBJECT_POS, OBJECT_ROT, OBJECT_OMEGA, OBJECT_CREATOR, OBJECT_OWNER, OBJECT_LAST_OWNER_ID, OBJECT_REZZER_KEY, OBJECT_GROUP, OBJECT_CREATION_TIME, OBJECT_REZ_TIME, OBJECT_PATHFINDING_TYPE, OBJECT_ATTACHED_POINT, OBJECT_TEMP_ATTACHED]));
|
||||
details = details + [currentPosition, targetkey];
|
||||
elements = 26;
|
||||
elements = 27;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -522,7 +517,7 @@ default
|
|||
list returnedList = [llStringToBase64(llStringTrim(llList2String(details, 0), STRING_TRIM)), llList2String(details, 1), llList2String(details, 2), llList2Integer(details, 3) / 1024, llList2Float(details, 4) * 1000.0, llList2Float(details, 5) * 1000.0];
|
||||
if (extended)
|
||||
{
|
||||
returnedList = returnedList + [llStringToBase64(llStringTrim(llList2String(details, 6), STRING_TRIM)), llList2String(details, 7), llList2Integer(details, 8), llList2Integer(details, 9), llList2Integer(details, 10), llStringToBase64(llList2String(details, 11)), llStringToBase64(llList2String(details, 12) + " (" + (string)llVecDist(llList2Vector(details, 12), currentPosition) + " m)"), llStringToBase64(llList2String(details, 13) + " (" + (string)(RAD_TO_DEG * llRot2Euler(llList2Rot(details, 13))) + ")"), llStringToBase64(llList2String(details, 14)), llList2Key(details, 15), llList2Key(details, 16), llList2Key(details, 17), llList2Key(details, 18), llList2Key(details, 19), llList2String(details, 20), llList2Integer(details, 21), llList2Integer(details, 22), llList2Integer(details, 23), llStringToBase64(llList2String(details, 24)), llList2Key(details, 25)];
|
||||
returnedList = returnedList + [llStringToBase64(llStringTrim(llList2String(details, 6), STRING_TRIM)), llList2String(details, 7), llList2Integer(details, 8), llList2Integer(details, 9), llList2Integer(details, 10), llStringToBase64(llList2String(details, 11)), llStringToBase64(llList2String(details, 12) + " (" + (string)llVecDist(llList2Vector(details, 12), currentPosition) + " m)"), llStringToBase64(llList2String(details, 13) + " (" + (string)(RAD_TO_DEG * llRot2Euler(llList2Rot(details, 13))) + ")"), llStringToBase64(llList2String(details, 14)), llList2Key(details, 15), llList2Key(details, 16), llList2Key(details, 17), llList2Key(details, 18), llList2Key(details, 19), llList2String(details, 20), llList2String(details, 21), llList2Integer(details, 22), llList2Integer(details, 23), llList2Integer(details, 24), llStringToBase64(llList2String(details, 25)), llList2Key(details, 26)];
|
||||
}
|
||||
llOwnerSay("<bridgeGetScriptInfo>" + llList2CSV(returnedList) + "</bridgeGetScriptInfo>");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -411,7 +411,14 @@ void FSFloaterIM::sendMsgFromInputEditor(EChatType type)
|
|||
static LLCachedControl<std::string> FSInternalSkinCurrent(gSavedSettings, "FSInternalSkinCurrent");
|
||||
std::string skin_indicator(FSInternalSkinCurrent);
|
||||
LLStringUtil::toLower(skin_indicator);
|
||||
skin_indicator = skin_indicator.substr(0, 1); // "FS 4.4.1f os", "FS 4.4.1v", "FS 4.4.1a", "FS 4.4.1s os", "FS 4.4.1m os" etc.
|
||||
if (skin_indicator == "starlight cui")
|
||||
{
|
||||
skin_indicator = "sc"; // Separate "s" (StarLight) from "sc" (StarLight CUI)
|
||||
}
|
||||
else
|
||||
{
|
||||
skin_indicator = skin_indicator.substr(0, 1); // "FS 4.4.1f os", "FS 4.4.1v", "FS 4.4.1a", "FS 4.4.1s os", "FS 4.4.1m os" etc.
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
//Address size check
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
static const std::string FS_BRIDGE_FOLDER = "#LSL Bridge";
|
||||
static const std::string FS_BRIDGE_CONTAINER_FOLDER = "Landscaping";
|
||||
static const U32 FS_BRIDGE_MAJOR_VERSION = 2;
|
||||
static const U32 FS_BRIDGE_MINOR_VERSION = 28;
|
||||
static const U32 FS_BRIDGE_MINOR_VERSION = 29;
|
||||
static const U32 FS_MAX_MINOR_VERSION = 99;
|
||||
static const std::string UPLOAD_SCRIPT_CURRENT = "EBEDD1D2-A320-43f5-88CF-DD47BBCA5DFB.lsltxt";
|
||||
static const std::string FS_STATE_ATTRIBUTE = "state=";
|
||||
|
|
@ -410,7 +410,7 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID,
|
|||
while (std::getline(strStreamGetScriptInfo, scriptInfoToken, ','))
|
||||
{
|
||||
LLStringUtil::trim(scriptInfoToken);
|
||||
if (scriptInfoArrayCount == 0 || scriptInfoArrayCount == 6 || scriptInfoArrayCount == 11 || scriptInfoArrayCount == 12 || scriptInfoArrayCount == 13 || scriptInfoArrayCount == 14 || scriptInfoArrayCount == 24)
|
||||
if (scriptInfoArrayCount == 0 || scriptInfoArrayCount == 6 || scriptInfoArrayCount == 11 || scriptInfoArrayCount == 12 || scriptInfoArrayCount == 13 || scriptInfoArrayCount == 14 || scriptInfoArrayCount == 25)
|
||||
{
|
||||
// First value, OBJECT_NAME, should be passed from Bridge as encoded in base64
|
||||
// Encoding eliminates problems with special characters and commas for CSV
|
||||
|
|
@ -433,7 +433,7 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID,
|
|||
++scriptInfoArrayCount;
|
||||
}
|
||||
|
||||
if (scriptInfoArrayCount == 6 || scriptInfoArrayCount == 26)
|
||||
if (scriptInfoArrayCount == 6 || scriptInfoArrayCount == 27)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["OBJECT_NAME"] = scriptInfoArray[0].asString();
|
||||
|
|
@ -452,7 +452,7 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID,
|
|||
args["PATHFINDING_TEXT"] = "";
|
||||
}
|
||||
report_to_nearby_chat(format_string(LLTrans::getString("fsbridge_script_info"), args));
|
||||
if (scriptInfoArrayCount == 26)
|
||||
if (scriptInfoArrayCount == 27)
|
||||
{
|
||||
LLStringUtil::format_map_t args3;
|
||||
args3["OBJECT_DESC"] = scriptInfoArray[6].asString();
|
||||
|
|
@ -470,11 +470,12 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID,
|
|||
args3["OBJECT_REZZER_KEY"] = scriptInfoArray[18].asString();
|
||||
args3["OBJECT_GROUP"] = scriptInfoArray[19].asUUID().notNull() ? LLSLURL("group", scriptInfoArray[19].asUUID(), "inspect").getSLURLString() : "---";
|
||||
args3["OBJECT_CREATION_TIME"] = scriptInfoArray[20].asString();
|
||||
args3["OBJECT_PATHFINDING_TYPE"] = scriptInfoArray[21].asString();
|
||||
args3["OBJECT_ATTACHED_POINT"] = (scriptInfoArray[22].asInteger() < 1 || scriptInfoArray[22].asInteger() > 255) ? "---" : LLTrans::getString(LLAvatarAppearance::getAttachmentPointName(scriptInfoArray[22].asInteger()));
|
||||
args3["OBJECT_TEMP_ATTACHED"] = scriptInfoArray[23].asInteger() == 1 ? LLTrans::getString("Yes") : LLTrans::getString("No");
|
||||
args3["AVATAR_POS"] = scriptInfoArray[24].asString();
|
||||
args3["INSPECTING_KEY"] = scriptInfoArray[25].asString();
|
||||
args3["OBJECT_REZ_TIME"] = scriptInfoArray[21].asString();
|
||||
args3["OBJECT_PATHFINDING_TYPE"] = scriptInfoArray[22].asString();
|
||||
args3["OBJECT_ATTACHED_POINT"] = (scriptInfoArray[23].asInteger() < 1 || scriptInfoArray[23].asInteger() > 255) ? "---" : LLTrans::getString(LLAvatarAppearance::getAttachmentPointName(scriptInfoArray[23].asInteger()));
|
||||
args3["OBJECT_TEMP_ATTACHED"] = scriptInfoArray[24].asInteger() == 1 ? LLTrans::getString("Yes") : LLTrans::getString("No");
|
||||
args3["AVATAR_POS"] = scriptInfoArray[25].asString();
|
||||
args3["INSPECTING_KEY"] = scriptInfoArray[26].asString();
|
||||
report_to_nearby_chat(format_string(LLTrans::getString("fsbridge_script_info_ext"), args3));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
#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 USAGE_TRACKING
|
||||
#define ATTACHMENT_TRACKING
|
||||
#else
|
||||
#undef USAGE_TRACKING
|
||||
|
|
|
|||
|
|
@ -796,3 +796,69 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||
SOFTWARE.
|
||||
|
||||
|
||||
|
||||
=============
|
||||
GLOD license
|
||||
=============
|
||||
The GLOD Open-Source License Version 1.0 June 16, 2004
|
||||
|
||||
Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns
|
||||
Hopkins University and David Luebke, Brenden Schubert, University of
|
||||
Virginia. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, is permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer and
|
||||
request.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer and
|
||||
request in the documentation and/or other materials provided with
|
||||
the distribution.
|
||||
|
||||
3. The name "GLOD" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission.
|
||||
|
||||
4. Redistributions of any modified version of this source, whether in
|
||||
source or binary form , must include a form of the following
|
||||
acknowledgment: "This product is derived from the GLOD library,
|
||||
which is available from http://www.cs.jhu.edu/~graphics/GLOD."
|
||||
|
||||
5. Redistributions of any modified version of this source in binary
|
||||
form must provide, free of charge, access to the modified version
|
||||
of the code.
|
||||
|
||||
6. This license shall be governed by and construed and enforced in
|
||||
accordance with the laws of the State of Maryland, without
|
||||
reference to its conflicts of law provisions. The exclusive
|
||||
jurisdiction and venue for all legal actions relating to this
|
||||
license shall be in courts of competent subject matter jurisdiction
|
||||
located in the State of Maryland.
|
||||
|
||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, GLOD IS PROVIDED
|
||||
UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND,
|
||||
EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
|
||||
THAT GLOD IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
|
||||
PURPOSE OR NON-INFRINGING. ALL WARRANTIES ARE DISCLAIMED AND THE
|
||||
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE CODE IS WITH
|
||||
YOU. SHOULD ANY CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
|
||||
COPYRIGHT HOLDER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
|
||||
NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY
|
||||
CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY CODE IS
|
||||
AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL
|
||||
THE COPYRIGHT HOLDER OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY
|
||||
SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES FOR LOSS OF
|
||||
PROFITS, REVENUE, OR FOR LOSS OF INFORMATION OR ANY OTHER LOSS.
|
||||
|
||||
YOU EXPRESSLY AGREE TO FOREVER INDEMNIFY, DEFEND AND HOLD HARMLESS THE
|
||||
COPYRIGHT HOLDERS AND CONTRIBUTORS OF GLOD AGAINST ALL CLAIMS,
|
||||
DEMANDS, SUITS OR OTHER ACTIONS ARISING DIRECTLY OR INDIRECTLY FROM
|
||||
YOUR ACCEPTANCE AND USE OF GLOD.
|
||||
|
||||
Although NOT REQUIRED, we would appreciate it if active users of GLOD
|
||||
put a link on their web site to the GLOD web site when possible.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -651,8 +651,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");
|
||||
}
|
||||
|
||||
|
|
@ -1327,7 +1327,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";
|
||||
|
|
@ -3234,6 +3235,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");
|
||||
|
|
@ -3703,6 +3713,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
|
||||
|
|
@ -3865,9 +3880,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;
|
||||
|
|
@ -5678,6 +5712,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
|
||||
|
|
@ -5690,8 +5731,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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,9 +274,9 @@ BOOL LLConversationViewSession::postBuild()
|
|||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
refresh();
|
||||
refresh(); // requires vmi
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -492,17 +492,20 @@ void LLConversationViewSession::refresh()
|
|||
{
|
||||
// Refresh the session view from its model data
|
||||
LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem());
|
||||
vmi->resetRefresh();
|
||||
if (vmi)
|
||||
{
|
||||
vmi->resetRefresh();
|
||||
|
||||
if (mSessionTitle)
|
||||
{
|
||||
if (!highlightFriendTitle(vmi))
|
||||
{
|
||||
LLStyle::Params title_style;
|
||||
title_style.color = LLUIColorTable::instance().getColor("LabelTextColor");
|
||||
mSessionTitle->setText(vmi->getDisplayName(), title_style);
|
||||
}
|
||||
}
|
||||
if (mSessionTitle)
|
||||
{
|
||||
if (!highlightFriendTitle(vmi))
|
||||
{
|
||||
LLStyle::Params title_style;
|
||||
title_style.color = LLUIColorTable::instance().getColor("LabelTextColor");
|
||||
mSessionTitle->setText(vmi->getDisplayName(), title_style);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update all speaking indicators
|
||||
LLSpeakingIndicatorManager::updateSpeakingIndicators();
|
||||
|
|
@ -526,8 +529,11 @@ void LLConversationViewSession::refresh()
|
|||
}
|
||||
|
||||
requestArrange();
|
||||
// Do the regular upstream refresh
|
||||
LLFolderViewFolder::refresh();
|
||||
if (vmi)
|
||||
{
|
||||
// Do the regular upstream refresh
|
||||
LLFolderViewFolder::refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& session_id)
|
||||
|
|
@ -629,8 +635,11 @@ BOOL LLConversationViewParticipant::postBuild()
|
|||
}
|
||||
|
||||
updateChildren();
|
||||
LLFolderViewItem::postBuild();
|
||||
refresh();
|
||||
if (getViewModelItem())
|
||||
{
|
||||
LLFolderViewItem::postBuild();
|
||||
refresh();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -714,10 +723,10 @@ void LLConversationViewParticipant::refresh()
|
|||
|
||||
// *TODO: We should also do something with vmi->isModerator() to echo that state in the UI somewhat
|
||||
mSpeakingIndicator->setIsModeratorMuted(participant_model->isModeratorMuted());
|
||||
|
||||
// Do the regular upstream refresh
|
||||
LLFolderViewItem::refresh();
|
||||
}
|
||||
|
||||
// Do the regular upstream refresh
|
||||
LLFolderViewItem::refresh();
|
||||
}
|
||||
|
||||
void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -143,7 +143,9 @@ void LLFloaterCreateLandmark::setLandmarkInfo(const LLUUID &folder_id)
|
|||
mLandmarkTitleEditor->setText(name);
|
||||
}
|
||||
|
||||
LLLandmarkActions::createLandmarkHere(name, "", folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE));
|
||||
// <FS:Ansariel> FIRE-31689: Landmark initially shown in wrong folder while creating
|
||||
//LLLandmarkActions::createLandmarkHere(name, "", folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE));
|
||||
LLLandmarkActions::createLandmarkHere(name, "", folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK));
|
||||
}
|
||||
|
||||
bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ void LLFloaterIMSessionTab::removeConversationViewParticipant(const LLUUID& part
|
|||
void LLFloaterIMSessionTab::updateConversationViewParticipant(const LLUUID& participant_id)
|
||||
{
|
||||
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id);
|
||||
if (widget)
|
||||
if (widget && widget->getViewModelItem())
|
||||
{
|
||||
widget->refresh();
|
||||
}
|
||||
|
|
@ -578,8 +578,11 @@ void LLFloaterIMSessionTab::refreshConversation()
|
|||
{
|
||||
participants_uuids.push_back(widget_it->first);
|
||||
}
|
||||
widget_it->second->refresh();
|
||||
widget_it->second->setVisible(TRUE);
|
||||
if (widget_it->second->getViewModelItem())
|
||||
{
|
||||
widget_it->second->refresh();
|
||||
widget_it->second->setVisible(TRUE);
|
||||
}
|
||||
++widget_it;
|
||||
}
|
||||
if (is_ad_hoc || mIsP2PChat)
|
||||
|
|
@ -1128,7 +1131,10 @@ void LLFloaterIMSessionTab::getSelectedUUIDs(uuid_vec_t& selected_uuids)
|
|||
for (; it != it_end; ++it)
|
||||
{
|
||||
LLConversationItem* conversation_item = static_cast<LLConversationItem *>((*it)->getViewModelItem());
|
||||
selected_uuids.push_back(conversation_item->getUUID());
|
||||
if (conversation_item)
|
||||
{
|
||||
selected_uuids.push_back(conversation_item->getUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -828,6 +828,9 @@ void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
|
|||
case LLModelPreview::MESH_OPTIMIZER_COMBINE:
|
||||
mModelPreview->onLODMeshOptimizerParamCommit(lod, enforce_tri_limit, mode);
|
||||
break;
|
||||
case LLModelPreview::GENERATE:
|
||||
mModelPreview->onLODGLODParamCommit(lod, enforce_tri_limit);
|
||||
break;
|
||||
default:
|
||||
LL_ERRS() << "Only supposed to be called to generate models" << LL_ENDL;
|
||||
break;
|
||||
|
|
@ -1957,6 +1960,7 @@ void LLFloaterModelPreview::onLoDSourceCommit(S32 lod)
|
|||
|
||||
S32 index = lod_source_combo->getCurrentIndex();
|
||||
if (index == LLModelPreview::MESH_OPTIMIZER_AUTO
|
||||
|| index == LLModelPreview::GENERATE // <FS:Beq/> Improved LOD generation
|
||||
|| index == LLModelPreview::MESH_OPTIMIZER_SLOPPY
|
||||
|| index == LLModelPreview::MESH_OPTIMIZER_COMBINE)
|
||||
{ //rebuild LoD to update triangle counts
|
||||
|
|
|
|||
|
|
@ -5121,6 +5121,34 @@ void LLPanelPreferenceSkins::apply()
|
|||
gSavedSettings.setBOOL("ResetToolbarSettings", TRUE);
|
||||
}
|
||||
|
||||
if (m_Skin == "starlight" || m_Skin == "starlightcui")
|
||||
{
|
||||
std::string noteMessage;
|
||||
|
||||
if (gSavedSettings.getBOOL("ShowMenuBarLocation"))
|
||||
{
|
||||
noteMessage = LLTrans::getString("skin_defaults_starlight_location");
|
||||
gSavedSettings.setBOOL("ShowMenuBarLocation", FALSE);
|
||||
}
|
||||
|
||||
if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
|
||||
{
|
||||
if (!noteMessage.empty())
|
||||
{
|
||||
noteMessage += "\n";
|
||||
}
|
||||
noteMessage += LLTrans::getString("skin_defaults_starlight_navbar");
|
||||
gSavedSettings.setBOOL("ShowNavbarNavigationPanel", TRUE);
|
||||
}
|
||||
|
||||
if (!noteMessage.empty())
|
||||
{
|
||||
LLSD args;
|
||||
args["MESSAGE"] = noteMessage;
|
||||
LLNotificationsUtil::add("SkinDefaultsChangeSettings", args, LLSD(), boost::bind(&LLPanelPreferenceSkins::showSkinChangeNotification, this));
|
||||
return;
|
||||
}
|
||||
}
|
||||
// </FS:AO>
|
||||
|
||||
showSkinChangeNotification();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -510,7 +510,7 @@ void LLInspectAvatar::onClickMuteVolume()
|
|||
LLMuteList* mute_list = LLMuteList::getInstance();
|
||||
bool is_muted = mute_list->isMuted(mAvatarID, LLMute::flagVoiceChat);
|
||||
|
||||
LLMute mute(mAvatarID, mAvatarName.getDisplayName(), LLMute::AGENT);
|
||||
LLMute mute(mAvatarID, mAvatarName.getUserName(), LLMute::AGENT);
|
||||
if (!is_muted)
|
||||
{
|
||||
mute_list->add(mute, LLMute::flagVoiceChat);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -299,31 +299,41 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem
|
|||
applyXUILayout(icon_params, this);
|
||||
|
||||
mIconCtrl = LLUICtrlFactory::create<LLIconCtrl>(icon_params);
|
||||
if (mIconCtrl)
|
||||
{
|
||||
addChild(mIconCtrl);
|
||||
}
|
||||
else
|
||||
if (!mIconCtrl)
|
||||
{
|
||||
LLIconCtrl::Params icon_params;
|
||||
icon_params.name = "item_icon";
|
||||
mIconCtrl = LLUICtrlFactory::create<LLIconCtrl>(icon_params);
|
||||
}
|
||||
|
||||
if (mIconCtrl)
|
||||
{
|
||||
addChild(mIconCtrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS() << "Failed to create mIconCtrl" << LL_ENDL;
|
||||
}
|
||||
|
||||
LLTextBox::Params text_params(params.item_name);
|
||||
applyXUILayout(text_params, this);
|
||||
|
||||
mTitleCtrl = LLUICtrlFactory::create<LLTextBox>(text_params);
|
||||
if (mTitleCtrl)
|
||||
if (!mTitleCtrl)
|
||||
{
|
||||
addChild(mTitleCtrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLTextBox::Params text_aprams;
|
||||
LLTextBox::Params text_params;
|
||||
text_params.name = "item_title";
|
||||
mTitleCtrl = LLUICtrlFactory::create<LLTextBox>(text_params);
|
||||
}
|
||||
|
||||
if (mTitleCtrl)
|
||||
{
|
||||
addChild(mTitleCtrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS() << "Failed to create mTitleCtrl" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
class WidgetVisibilityChanger
|
||||
|
|
|
|||
|
|
@ -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,7 @@ bool LLModelPreview::sIgnoreLoadedCallback = false;
|
|||
// </FS:Beq>
|
||||
const F32 SKIN_WEIGHT_CAMERA_DISTANCE = 16.f;
|
||||
|
||||
#include "glod/glod.h" // <FS:Beq/> More flexible LOD generation
|
||||
// <FS:Beq> mesh loader suffix configuration
|
||||
//static
|
||||
const std::array<std::string,5> LLModelPreview::sSuffixVarNames
|
||||
|
|
@ -103,6 +104,25 @@ const std::array<std::string,5> LLModelPreview::sSuffixVarNames
|
|||
"FSMeshPhysicsSuffix"
|
||||
};
|
||||
// </FS:Beq>
|
||||
|
||||
// <FS:Beq> More flexible LOD generation
|
||||
BOOL stop_gloderror()
|
||||
{
|
||||
GLuint error = glodGetError();
|
||||
|
||||
if (error != GLOD_NO_ERROR)
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "GLOD error detected, cannot generate LOD (try another method?): " << std::hex << error;
|
||||
LL_WARNS("MeshUpload") << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& material)
|
||||
{
|
||||
LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_PREVIEW);
|
||||
|
|
@ -222,6 +242,12 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
|
|||
mLoadState = LLModelLoader::STARTING;
|
||||
mGroup = 0;
|
||||
mLODFrozen = false;
|
||||
// <FS:Beq> Improved LOD generation
|
||||
mBuildShareTolerance = 0.f;
|
||||
mBuildQueueMode = GLOD_QUEUE_GREEDY;
|
||||
mBuildBorderMode = GLOD_BORDER_UNLOCK;
|
||||
mBuildOperator = GLOD_OPERATOR_EDGE_COLLAPSE;
|
||||
// </FS:Beq>
|
||||
mUVGuideTexture = LLViewerTextureManager::getFetchedTextureFromFile(gSavedSettings.getString("FSMeshPreviewUVGuideFile"), FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_PREVIEW); // <FS:Beq> - Add UV guide overlay to pmesh preview
|
||||
|
||||
for (U32 i = 0; i < LLModel::NUM_LODS; ++i)
|
||||
|
|
@ -234,7 +260,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
|
|||
|
||||
mViewOption["show_textures"] = false;
|
||||
mFMP = fmp;
|
||||
|
||||
glodInit(); // <FS:Beq/> Improved LOD generation
|
||||
mHasPivot = false;
|
||||
mModelPivot = LLVector3(0.0f, 0.0f, 0.0f);
|
||||
|
||||
|
|
@ -918,7 +944,12 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
|
|||
}
|
||||
|
||||
mLODFile[lod] = filename;
|
||||
|
||||
// <FS:Beq> Improved LOD generation
|
||||
if (lod == LLModel::LOD_HIGH)
|
||||
{
|
||||
clearGLODGroup();
|
||||
}
|
||||
// </FS:Beq>
|
||||
std::map<std::string, std::string> joint_alias_map;
|
||||
getJointAliases(joint_alias_map);
|
||||
|
||||
|
|
@ -1061,12 +1092,31 @@ void LLModelPreview::clearIncompatible(S32 lod)
|
|||
mBaseModel = mModel[lod];
|
||||
mBaseScene = mScene[lod];
|
||||
mVertexBuffer[5].clear();
|
||||
clearGLODGroup(); // <FS:Beq/> Improved LOD generation
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// <FS:Beq> Improved LOD generation
|
||||
void LLModelPreview::clearGLODGroup()
|
||||
{
|
||||
if (mGroup)
|
||||
{
|
||||
for (std::map<LLPointer<LLModel>, U32>::iterator iter = mObject.begin(); iter != mObject.end(); ++iter)
|
||||
{
|
||||
glodDeleteObject(iter->second);
|
||||
stop_gloderror();
|
||||
}
|
||||
mObject.clear();
|
||||
|
||||
glodDeleteGroup(mGroup);
|
||||
stop_gloderror();
|
||||
mGroup = 0;
|
||||
}
|
||||
}
|
||||
// </FS:Beq>
|
||||
void LLModelPreview::loadModelCallback(S32 loaded_lod)
|
||||
{
|
||||
assert_main_thread();
|
||||
|
|
@ -1220,6 +1270,7 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
|
|||
}
|
||||
|
||||
mBaseModel = mModel[loaded_lod];
|
||||
clearGLODGroup(); // <FS:Beq/> Improved LOD generation
|
||||
|
||||
mBaseScene = mScene[loaded_lod];
|
||||
mVertexBuffer[5].clear();
|
||||
|
|
@ -1450,6 +1501,453 @@ void LLModelPreview::restoreNormals()
|
|||
updateStatusMessages();
|
||||
}
|
||||
|
||||
// <FS:Beq> Improved LOD generation
|
||||
// Restore the GLOD entry point.
|
||||
// There would appear to be quite a lot of commonality which would be well suited to refactoring but
|
||||
// LL are still playing with Mesh Optimiser code.
|
||||
void LLModelPreview::genGlodLODs(S32 which_lod, U32 decimation, bool enforce_tri_limit)
|
||||
{
|
||||
// Allow LoD from -1 to LLModel::LOD_PHYSICS
|
||||
if (which_lod < -1 || which_lod > LLModel::NUM_LODS - 1)
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "Invalid level of detail: " << which_lod;
|
||||
LL_WARNS() << out.str() << LL_ENDL;
|
||||
LLFloaterModelPreview::addStringToLog(out, false);
|
||||
assert(which_lod >= -1 && which_lod < LLModel::NUM_LODS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mBaseModel.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
|
||||
|
||||
if (shader)
|
||||
{
|
||||
shader->unbind();
|
||||
}
|
||||
|
||||
stop_gloderror();
|
||||
static U32 cur_name = 1;
|
||||
|
||||
S32 limit = -1;
|
||||
|
||||
U32 triangle_count = 0;
|
||||
|
||||
U32 instanced_triangle_count = 0;
|
||||
|
||||
//get the triangle count for the whole scene
|
||||
for (LLModelLoader::scene::iterator iter = mBaseScene.begin(), endIter = mBaseScene.end(); iter != endIter; ++iter)
|
||||
{
|
||||
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
|
||||
{
|
||||
LLModel* mdl = instance->mModel;
|
||||
if (mdl)
|
||||
{
|
||||
instanced_triangle_count += mdl->getNumTriangles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get the triangle count for the non-instanced set of models
|
||||
for (U32 i = 0; i < mBaseModel.size(); ++i)
|
||||
{
|
||||
triangle_count += mBaseModel[i]->getNumTriangles();
|
||||
}
|
||||
|
||||
//get ratio of uninstanced triangles to instanced triangles
|
||||
F32 triangle_ratio = (F32)triangle_count / (F32)instanced_triangle_count;
|
||||
|
||||
U32 base_triangle_count = triangle_count;
|
||||
|
||||
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
|
||||
U32 lod_mode = 0;
|
||||
|
||||
F32 lod_error_threshold = 0;
|
||||
|
||||
// The LoD should be in range from Lowest to High
|
||||
if (which_lod > -1 && which_lod < NUM_LOD)
|
||||
{
|
||||
LLCtrlSelectionInterface* iface = mFMP->childGetSelectionInterface("lod_mode_" + lod_name[which_lod]);
|
||||
if (iface)
|
||||
{
|
||||
lod_mode = iface->getFirstSelectedIndex();
|
||||
}
|
||||
|
||||
lod_error_threshold = mFMP->childGetValue("lod_error_threshold_" + lod_name[which_lod]).asReal();
|
||||
}
|
||||
|
||||
if (which_lod != -1)
|
||||
{
|
||||
mRequestedLoDMode[which_lod] = lod_mode;
|
||||
}
|
||||
|
||||
if (lod_mode == 0)
|
||||
{
|
||||
lod_mode = GLOD_TRIANGLE_BUDGET;
|
||||
|
||||
// The LoD should be in range from Lowest to High
|
||||
if (which_lod > -1 && which_lod < NUM_LOD)
|
||||
{
|
||||
limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger();
|
||||
//convert from "scene wide" to "non-instanced" triangle limit
|
||||
limit = (S32)((F32)limit*triangle_ratio);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lod_mode = GLOD_ERROR_THRESHOLD;
|
||||
}
|
||||
|
||||
bool object_dirty = false;
|
||||
|
||||
if (mGroup == 0)
|
||||
{
|
||||
object_dirty = true;
|
||||
mGroup = cur_name++;
|
||||
glodNewGroup(mGroup);
|
||||
}
|
||||
|
||||
if (object_dirty)
|
||||
{
|
||||
for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
|
||||
{ //build GLOD objects for each model in base model list
|
||||
LLModel* mdl = *iter;
|
||||
|
||||
if (mObject[mdl] != 0)
|
||||
{
|
||||
glodDeleteObject(mObject[mdl]);
|
||||
}
|
||||
|
||||
mObject[mdl] = cur_name++;
|
||||
|
||||
glodNewObject(mObject[mdl], mGroup, GLOD_DISCRETE);
|
||||
stop_gloderror();
|
||||
|
||||
if (iter == mBaseModel.begin() && !mdl->mSkinWeights.empty())
|
||||
{ //regenerate vertex buffer for skinned models to prevent animation feedback during LOD generation
|
||||
mVertexBuffer[5].clear();
|
||||
}
|
||||
|
||||
if (mVertexBuffer[5].empty())
|
||||
{
|
||||
genBuffers(5, false);
|
||||
}
|
||||
|
||||
U32 tri_count = 0;
|
||||
for (U32 i = 0; i < mVertexBuffer[5][mdl].size(); ++i)
|
||||
{
|
||||
LLVertexBuffer* buff = mVertexBuffer[5][mdl][i];
|
||||
buff->setBuffer(type_mask & buff->getTypeMask());
|
||||
|
||||
U32 num_indices = mVertexBuffer[5][mdl][i]->getNumIndices();
|
||||
if (num_indices > 2)
|
||||
{
|
||||
// <FS:ND> Fix glod so it works when just using the opengl core profile
|
||||
//glodInsertElements(mObject[mdl], i, GL_TRIANGLES, num_indices, GL_UNSIGNED_SHORT, (U8*)mVertexBuffer[5][mdl][i]->getIndicesPointer(), 0, 0.f);
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
LLStrider<LLVector3> normal_strider;
|
||||
LLStrider<LLVector2> tc_strider;
|
||||
|
||||
LLStrider< U16 > index_strider;
|
||||
buff->getIndexStrider( index_strider );
|
||||
|
||||
glodVBO vbo = {};
|
||||
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_VERTEX ) )
|
||||
{
|
||||
buff->getVertexStrider( vertex_strider );
|
||||
vbo.mV.p = vertex_strider.get();
|
||||
vbo.mV.size = 3;
|
||||
vbo.mV.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_VERTEX ];
|
||||
vbo.mV.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_NORMAL ) )
|
||||
{
|
||||
buff->getNormalStrider( normal_strider );
|
||||
vbo.mN.p = normal_strider.get();
|
||||
vbo.mN.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_NORMAL ];
|
||||
vbo.mN.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_TEXCOORD0 ) )
|
||||
{
|
||||
buff->getTexCoord0Strider( tc_strider );
|
||||
vbo.mT.p = tc_strider.get();
|
||||
vbo.mT.size = 2;
|
||||
vbo.mT.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_TEXCOORD0 ];
|
||||
vbo.mT.type = GL_FLOAT;
|
||||
}
|
||||
|
||||
glodInsertElements( mObject[ mdl ], i, GL_TRIANGLES, num_indices, GL_UNSIGNED_SHORT, (U8*)index_strider.get(), 0, 0.f, &vbo );
|
||||
// </FS:ND>
|
||||
}
|
||||
tri_count += num_indices / 3;
|
||||
stop_gloderror();
|
||||
}
|
||||
|
||||
glodBuildObject(mObject[mdl]);
|
||||
stop_gloderror();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
S32 start = LLModel::LOD_HIGH;
|
||||
S32 end = 0;
|
||||
|
||||
if (which_lod != -1)
|
||||
{
|
||||
start = end = which_lod;
|
||||
}
|
||||
|
||||
mMaxTriangleLimit = base_triangle_count;
|
||||
|
||||
for (S32 lod = start; lod >= end; --lod)
|
||||
{
|
||||
if (which_lod == -1)
|
||||
{
|
||||
if (lod < start)
|
||||
{
|
||||
triangle_count /= decimation;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (enforce_tri_limit)
|
||||
{
|
||||
triangle_count = limit;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (S32 j = LLModel::LOD_HIGH; j>which_lod; --j)
|
||||
{
|
||||
triangle_count /= decimation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mModel[lod].clear();
|
||||
mModel[lod].resize(mBaseModel.size());
|
||||
mVertexBuffer[lod].clear();
|
||||
|
||||
U32 actual_tris = 0;
|
||||
U32 actual_verts = 0;
|
||||
U32 submeshes = 0;
|
||||
|
||||
mRequestedTriangleCount[lod] = (S32)((F32)triangle_count / triangle_ratio);
|
||||
mRequestedErrorThreshold[lod] = lod_error_threshold;
|
||||
|
||||
glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode);
|
||||
stop_gloderror();
|
||||
|
||||
glodGroupParameteri(mGroup, GLOD_ERROR_MODE, GLOD_OBJECT_SPACE_ERROR);
|
||||
stop_gloderror();
|
||||
|
||||
glodGroupParameterf(mGroup, GLOD_OBJECT_SPACE_ERROR_THRESHOLD, lod_error_threshold);
|
||||
stop_gloderror();
|
||||
|
||||
if (lod_mode != GLOD_TRIANGLE_BUDGET)
|
||||
{
|
||||
glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//SH-632: always add 1 to desired amount to avoid decimating below desired amount
|
||||
glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, triangle_count + 1);
|
||||
}
|
||||
|
||||
stop_gloderror();
|
||||
glodAdaptGroup(mGroup);
|
||||
stop_gloderror();
|
||||
|
||||
for (U32 mdl_idx = 0; mdl_idx < mBaseModel.size(); ++mdl_idx)
|
||||
{
|
||||
LLModel* base = mBaseModel[mdl_idx];
|
||||
|
||||
GLint patch_count = 0;
|
||||
glodGetObjectParameteriv(mObject[base], GLOD_NUM_PATCHES, &patch_count);
|
||||
stop_gloderror();
|
||||
|
||||
LLVolumeParams volume_params;
|
||||
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);
|
||||
|
||||
mModel[lod][mdl_idx]->mLabel = name;
|
||||
mModel[lod][mdl_idx]->mSubmodelID = base->mSubmodelID;
|
||||
|
||||
GLint* sizes = new GLint[patch_count * 2];
|
||||
glodGetObjectParameteriv(mObject[base], GLOD_PATCH_SIZES, sizes);
|
||||
stop_gloderror();
|
||||
|
||||
GLint* names = new GLint[patch_count];
|
||||
glodGetObjectParameteriv(mObject[base], GLOD_PATCH_NAMES, names);
|
||||
stop_gloderror();
|
||||
|
||||
mModel[lod][mdl_idx]->setNumVolumeFaces(patch_count);
|
||||
|
||||
LLModel* target_model = mModel[lod][mdl_idx];
|
||||
|
||||
for (GLint i = 0; i < patch_count; ++i)
|
||||
{
|
||||
type_mask = mVertexBuffer[5][base][i]->getTypeMask();
|
||||
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
|
||||
|
||||
if (sizes[i * 2 + 1] > 0 && sizes[i * 2] > 0)
|
||||
{
|
||||
if (!buff->allocateBuffer(sizes[i * 2 + 1], sizes[i * 2], true))
|
||||
{
|
||||
// Todo: find a way to stop preview in this case instead of crashing
|
||||
LL_ERRS() << "Failed buffer allocation during preview LOD generation."
|
||||
<< " Vertices: " << sizes[i * 2 + 1]
|
||||
<< " Indices: " << sizes[i * 2] << LL_ENDL;
|
||||
}
|
||||
buff->setBuffer(type_mask);
|
||||
// <FS:ND> Fix glod so it works when just using the opengl core profile
|
||||
//glodFillElements(mObject[base], names[i], GL_UNSIGNED_SHORT, (U8*)buff->getIndicesPointer());
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
LLStrider<LLVector3> normal_strider;
|
||||
LLStrider<LLVector2> tc_strider;
|
||||
|
||||
LLStrider< U16 > index_strider;
|
||||
buff->getIndexStrider( index_strider );
|
||||
|
||||
glodVBO vbo = {};
|
||||
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_VERTEX ) )
|
||||
{
|
||||
buff->getVertexStrider( vertex_strider );
|
||||
vbo.mV.p = vertex_strider.get();
|
||||
vbo.mV.size = 3;
|
||||
vbo.mV.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_VERTEX ];
|
||||
vbo.mV.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_NORMAL ) )
|
||||
{
|
||||
buff->getNormalStrider( normal_strider );
|
||||
vbo.mN.p = normal_strider.get();
|
||||
vbo.mN.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_NORMAL ];
|
||||
vbo.mN.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_TEXCOORD0 ) )
|
||||
{
|
||||
buff->getTexCoord0Strider( tc_strider );
|
||||
vbo.mT.p = tc_strider.get();
|
||||
vbo.mT.size = 2;
|
||||
vbo.mT.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_TEXCOORD0 ];
|
||||
vbo.mT.type = GL_FLOAT;
|
||||
}
|
||||
|
||||
glodFillElements( mObject[ base ], names[ i ], GL_UNSIGNED_SHORT, (U8*)index_strider.get(), &vbo );
|
||||
// </FS:ND>
|
||||
stop_gloderror();
|
||||
}
|
||||
else
|
||||
{
|
||||
// This face was eliminated or we failed to allocate buffer,
|
||||
// attempt to create a dummy triangle (one vertex, 3 indices, all 0)
|
||||
buff->allocateBuffer(1, 3, true);
|
||||
memset((U8*)buff->getMappedData(), 0, buff->getSize());
|
||||
// <FS:ND> Fix when running with opengl core profile
|
||||
//memset((U8*)buff->getIndicesPointer(), 0, buff->getIndicesSize());
|
||||
LLStrider< U16 > index_strider;
|
||||
buff->getIndexStrider( index_strider );
|
||||
|
||||
memset( (U8*)index_strider.get(), 0, buff->getIndicesSize() );
|
||||
// </FS:ND>
|
||||
}
|
||||
|
||||
buff->validateRange(0, buff->getNumVerts() - 1, buff->getNumIndices(), 0);
|
||||
|
||||
LLStrider<LLVector3> pos;
|
||||
LLStrider<LLVector3> norm;
|
||||
LLStrider<LLVector2> tc;
|
||||
LLStrider<U16> index;
|
||||
|
||||
buff->getVertexStrider(pos);
|
||||
if (type_mask & LLVertexBuffer::MAP_NORMAL)
|
||||
{
|
||||
buff->getNormalStrider(norm);
|
||||
}
|
||||
if (type_mask & LLVertexBuffer::MAP_TEXCOORD0)
|
||||
{
|
||||
buff->getTexCoord0Strider(tc);
|
||||
}
|
||||
|
||||
buff->getIndexStrider(index);
|
||||
|
||||
target_model->setVolumeFaceData(names[i], pos, norm, tc, index, buff->getNumVerts(), buff->getNumIndices());
|
||||
actual_tris += buff->getNumIndices() / 3;
|
||||
actual_verts += buff->getNumVerts();
|
||||
++submeshes;
|
||||
|
||||
if (!validate_face(target_model->getVolumeFace(names[i])))
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "Invalid face generated during LOD generation.";
|
||||
LLFloaterModelPreview::addStringToLog(out,true);
|
||||
LL_ERRS() << out.str() << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
//blind copy skin weights and just take closest skin weight to point on
|
||||
//decimated mesh for now (auto-generating LODs with skin weights is still a bit
|
||||
//of an open problem).
|
||||
target_model->mPosition = base->mPosition;
|
||||
target_model->mSkinWeights = base->mSkinWeights;
|
||||
target_model->mSkinInfo = base->mSkinInfo;
|
||||
//copy material list
|
||||
target_model->mMaterialList = base->mMaterialList;
|
||||
|
||||
if (!validate_model(target_model))
|
||||
{
|
||||
LL_ERRS() << "Invalid model generated when creating LODs" << LL_ENDL;
|
||||
}
|
||||
|
||||
delete[] sizes;
|
||||
delete[] names;
|
||||
}
|
||||
|
||||
//rebuild scene based on mBaseScene
|
||||
mScene[lod].clear();
|
||||
mScene[lod] = mBaseScene;
|
||||
|
||||
for (U32 i = 0; i < mBaseModel.size(); ++i)
|
||||
{
|
||||
LLModel* mdl = mBaseModel[i];
|
||||
LLModel* target = mModel[lod][i];
|
||||
if (target)
|
||||
{
|
||||
for (LLModelLoader::scene::iterator iter = mScene[lod].begin(); iter != mScene[lod].end(); ++iter)
|
||||
{
|
||||
for (U32 j = 0; j < iter->second.size(); ++j)
|
||||
{
|
||||
if (iter->second[j].mModel == mdl)
|
||||
{
|
||||
iter->second[j].mModel = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
if (shader)
|
||||
{
|
||||
shader->bind();
|
||||
}
|
||||
refresh(); // <FS:ND/> refresh once to make sure render gets called with the updated vbos
|
||||
}
|
||||
// </FS:Beq>
|
||||
|
||||
// Runs per object, but likely it is a better way to run per model+submodels
|
||||
// returns a ratio of base model indices to resulting indices
|
||||
// returns -1 in case of failure
|
||||
|
|
@ -4368,8 +4866,13 @@ bool LLModelPreview::lodQueryCallback()
|
|||
{
|
||||
S32 lod = preview->mLodsQuery.back();
|
||||
preview->mLodsQuery.pop_back();
|
||||
// <FS:Beq> Improved LOD generation
|
||||
#ifdef USE_GLOD_AS_DEFAULT
|
||||
preview->genGlodLODs(lod, 3, false);
|
||||
#else
|
||||
preview->genMeshOptimizerLODs(lod, MESH_OPTIMIZER_AUTO, 3, false);
|
||||
|
||||
#endif
|
||||
// </FS:Beq>
|
||||
if (preview->mLookUpLodFiles && (lod == LLModel::LOD_HIGH))
|
||||
{
|
||||
preview->lookupLODModelFiles(LLModel::LOD_HIGH);
|
||||
|
|
@ -4383,9 +4886,21 @@ bool LLModelPreview::lodQueryCallback()
|
|||
return true;
|
||||
}
|
||||
|
||||
// <FS:Beq> Improved LOD generation
|
||||
void LLModelPreview::onLODGLODParamCommit(S32 lod, bool enforce_tri_limit)
|
||||
{
|
||||
if (mFMP && !mLODFrozen)
|
||||
{
|
||||
genGlodLODs(lod, 3, enforce_tri_limit);
|
||||
mFMP->refresh();
|
||||
refresh();
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
}
|
||||
void LLModelPreview::onLODMeshOptimizerParamCommit(S32 requested_lod, bool enforce_tri_limit, S32 mode)
|
||||
{
|
||||
if (!mLODFrozen)
|
||||
if (mFMP && !mLODFrozen) // <FS:Beq> minor sidestep of potential crash
|
||||
{
|
||||
genMeshOptimizerLODs(requested_lod, mode, 3, enforce_tri_limit);
|
||||
mFMP->refresh(); // <FS:Beq/> BUG-231970 Fix b0rken upload floater refresh
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ public:
|
|||
MESH_OPTIMIZER_AUTO, // automatically selects method based on model or face
|
||||
MESH_OPTIMIZER_COMBINE, // combines faces into a single model, simplifies, then splits back into faces
|
||||
MESH_OPTIMIZER_SLOPPY, // uses sloppy method, works per face
|
||||
GENERATE, // Use GLOD <FS:Beq/> Improved LOD generation
|
||||
USE_LOD_ABOVE,
|
||||
} eLoDMode;
|
||||
|
||||
|
|
@ -165,6 +166,7 @@ public:
|
|||
void loadModelCallback(S32 lod);
|
||||
bool lodsReady() { return !mGenLOD && mLodsQuery.empty(); }
|
||||
void queryLODs() { mGenLOD = true; };
|
||||
void genGlodLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
|
||||
void genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 decimation = 3, bool enforce_tri_limit = false);
|
||||
void generateNormals();
|
||||
void restoreNormals();
|
||||
|
|
@ -175,6 +177,8 @@ public:
|
|||
void clearIncompatible(S32 lod);
|
||||
void updateStatusMessages();
|
||||
void updateLodControls(S32 lod);
|
||||
void clearGLODGroup();
|
||||
void onLODGLODParamCommit(S32 lod, bool enforce_tri_limit);
|
||||
void onLODMeshOptimizerParamCommit(S32 lod, bool enforce_tri_limit, S32 mode);
|
||||
void addEmptyFace(LLModel* pTarget);
|
||||
|
||||
|
|
@ -272,6 +276,16 @@ protected:
|
|||
S32 mRequestedTriangleCount[LLModel::NUM_LODS];
|
||||
F32 mRequestedErrorThreshold[LLModel::NUM_LODS];
|
||||
F32 mRequestedCreaseAngle[LLModel::NUM_LODS];
|
||||
// <FS:Beq> Improved LOD generation
|
||||
F32 mBuildShareTolerance;
|
||||
U32 mBuildQueueMode;
|
||||
U32 mBuildOperator;
|
||||
U32 mBuildBorderMode;
|
||||
U32 mRequestedBuildOperator[LLModel::NUM_LODS];
|
||||
U32 mRequestedQueueMode[LLModel::NUM_LODS];
|
||||
U32 mRequestedBorderMode[LLModel::NUM_LODS];
|
||||
F32 mRequestedShareTolerance[LLModel::NUM_LODS];
|
||||
// </FS:Beq>
|
||||
|
||||
LLModelLoader* mModelLoader;
|
||||
|
||||
|
|
|
|||
|
|
@ -691,7 +691,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
|
|||
|
||||
// Attach to movement controls.
|
||||
parent->removeChild(this);
|
||||
// <FS:Ansariel> FIRE-9636: Resizable movement controls
|
||||
// <FS:Ansariel> FIRE-9636: Resizable movement controls (for all skins except Starlight/CUI)
|
||||
//move_view->addChild(this);
|
||||
LLView* modes_container = move_view->findChildView("modes_container");
|
||||
if (modes_container)
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ void LLPanelBlockedList::onFilterEdit(const std::string& search_string)
|
|||
void LLPanelBlockedList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
|
||||
{
|
||||
if (names.empty() || ids.empty()) return;
|
||||
LLMute mute(ids[0], names[0].getAccountName(), LLMute::AGENT);
|
||||
LLMute mute(ids[0], names[0].getUserName(), LLMute::AGENT);
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
showPanelAndSelect(mute.mID);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue