Merge remote-tracking branch 'singu/master'

This commit is contained in:
Aleric Inglewood
2013-03-26 21:10:00 +01:00
2128 changed files with 9847 additions and 8735 deletions

View File

@@ -70,10 +70,6 @@ if(STANDALONE)
add_subdirectory(${LIBS_OPEN_PREFIX}llqtwebkit) add_subdirectory(${LIBS_OPEN_PREFIX}llqtwebkit)
endif(STANDALONE) endif(STANDALONE)
if (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE)
add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu)
endif (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE)
#add_subdirectory(${LIBS_OPEN_PREFIX}lscript) #add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
@@ -81,73 +77,43 @@ if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
add_custom_target(viewer) add_custom_target(viewer)
if (VIEWER) add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger) add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) add_subdirectory(${LIBS_OPEN_PREFIX}llui)
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
# viewer plugins directory # viewer plugins directory
add_subdirectory(${LIBS_OPEN_PREFIX}plugins) add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
# llplugin testbed code (is this the right way to include it?) # llplugin testbed code (is this the right way to include it?)
#if (NOT LINUX) #if (NOT LINUX)
# add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest) # add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
#endif (NOT LINUX) #endif (NOT LINUX)
if (LINUX) if (LINUX)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
add_dependencies(viewer linux-crash-logger-strip-target) add_dependencies(viewer linux-crash-logger-strip-target)
elseif (DARWIN) elseif (DARWIN)
#add_subdirectory(${VIEWER_PREFIX}mac_crash_logger) #add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
#add_subdirectory(${VIEWER_PREFIX}mac_updater) #add_subdirectory(${VIEWER_PREFIX}mac_updater)
add_dependencies(viewer mac-crash-logger) add_dependencies(viewer mac-crash-logger)
#add_dependencies(viewer mac-updater) #add_dependencies(viewer mac-updater)
elseif (WINDOWS) elseif (WINDOWS)
add_subdirectory(${VIEWER_PREFIX}win_crash_logger) add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
if (EXISTS ${VIEWER_DIR}win_setup) if (EXISTS ${VIEWER_DIR}win_setup)
add_subdirectory(${VIEWER_DIR}win_setup) add_subdirectory(${VIEWER_DIR}win_setup)
endif (EXISTS ${VIEWER_DIR}win_setup) endif (EXISTS ${VIEWER_DIR}win_setup)
add_subdirectory(${VIEWER_PREFIX}win_updater) add_subdirectory(${VIEWER_PREFIX}win_updater)
add_dependencies(viewer windows-updater) add_dependencies(viewer windows-updater)
add_dependencies(viewer windows-crash-logger) add_dependencies(viewer windows-crash-logger)
elseif (SOLARIS) elseif (SOLARIS)
add_subdirectory(solaris_crash_logger) add_subdirectory(solaris_crash_logger)
add_dependencies(viewer solaris-crash-logger) add_dependencies(viewer solaris-crash-logger)
endif (LINUX)
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
add_subdirectory(${VIEWER_PREFIX}newview)
add_dependencies(viewer secondlife-bin)
endif (VIEWER)
# Linux builds the viewer and server in 2 separate projects
# In order for ./develop.py build server to work on linux,
# the viewer project needs a server target.
# This is not true for mac and windows.
if (LINUX)
add_custom_target(server)
endif (LINUX) endif (LINUX)
if (SERVER)
if (NOT LINUX)
add_custom_target(server)
endif (NOT LINUX)
include(${SERVER_PREFIX}Server.cmake)
endif (SERVER)
# Windows builds include tools like VFS tool add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
if (SERVER) add_subdirectory(${VIEWER_PREFIX}newview)
if (WINDOWS) add_dependencies(viewer secondlife-bin)
add_subdirectory(${SERVER_PREFIX}tools)
endif (WINDOWS)
endif (SERVER)
# Configure prebuilt binary download. This must be done last so that
# all subdirectories have a chance to list the packages they need.
# We need scp for proprietary downloads.
if(INSTALL_PROPRIETARY)
include(FindSCP)
endif(INSTALL_PROPRIETARY)
# The use_prebuilt_binary macro in cmake/Prebuilt.cmake records # The use_prebuilt_binary macro in cmake/Prebuilt.cmake records
# packages in the PREBUILT property of the 'prepare' target. # packages in the PREBUILT property of the 'prepare' target.

View File

@@ -2,6 +2,9 @@
# #
# Compilation options shared by all Second Life components. # Compilation options shared by all Second Life components.
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(Variables) include(Variables)
@@ -309,8 +312,6 @@ else (STANDALONE)
endif (STANDALONE) endif (STANDALONE)
if(1 EQUAL 1) if(1 EQUAL 1)
add_definitions(-DOPENSIM_RULES=1)
add_definitions(-DMESH_ENABLED=1)
add_definitions(-DENABLE_CLASSIC_CLOUDS=1) add_definitions(-DENABLE_CLASSIC_CLOUDS=1)
if (NOT "$ENV{SHY_MOD}" STREQUAL "") if (NOT "$ENV{SHY_MOD}" STREQUAL "")
add_definitions(-DSHY_MOD=1) add_definitions(-DSHY_MOD=1)
@@ -331,3 +332,5 @@ MARK_AS_ADVANCED(
CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE
) )
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)

View File

@@ -21,8 +21,6 @@ else (STANDALONE)
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
) )
# Doesn't need to link with iconv.dll
set(APRICONV_LIBRARIES "")
set(APRUTIL_LIBRARIES set(APRUTIL_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES} debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES} optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
@@ -44,7 +42,7 @@ else (STANDALONE)
endif (WINDOWS) endif (WINDOWS)
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1) set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
if (LINUX AND VIEWER) if (LINUX)
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES}) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})
endif (LINUX AND VIEWER) endif (LINUX)
endif (STANDALONE) endif (STANDALONE)

View File

@@ -15,20 +15,8 @@ else (STANDALONE)
if (WINDOWS) if (WINDOWS)
set(BOOST_VERSION 1_45) set(BOOST_VERSION 1_45)
set(BOOST_OPTIM_SUFFIX mt)
# SNOW-788 set(BOOST_DEBUG_SUFFIX mt-gd)
# 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc
# The precompiled boost libs for VC71 use a different suffix to VS80 and VS90
# This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate
# boost libs are avaiable - RC.
if (MSVC71)
set(BOOST_OPTIM_SUFFIX mt-s)
set(BOOST_DEBUG_SUFFIX mt-sgd)
else (MSVC71)
set(BOOST_OPTIM_SUFFIX mt)
set(BOOST_DEBUG_SUFFIX mt-gd)
endif (MSVC71)
set(Boost_PROGRAM_OPTIONS_LIBRARY set(Boost_PROGRAM_OPTIONS_LIBRARY
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION} optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}

View File

@@ -8,79 +8,97 @@ set(cmake_SOURCE_FILES
CMakeLists.txt CMakeLists.txt
00-Common.cmake 00-Common.cmake
AIStateMachine.cmake
APR.cmake APR.cmake
Audio.cmake Audio.cmake
BasicPluginBase.cmake
BerkeleyDB.cmake BerkeleyDB.cmake
Boost.cmake Boost.cmake
BuildVersion.cmake BuildVersion.cmake
CARes.cmake CARes.cmake
CURL.cmake
CMakeCopyIfDifferent.cmake CMakeCopyIfDifferent.cmake
CURL.cmake
Colladadom.cmake
ConfigurePkgConfig.cmake
CopyBackToSource.cmake
CopyWinLibs.cmake CopyWinLibs.cmake
CSharpMacros.cmake Cwdebug.cmake
DBusGlib.cmake DBusGlib.cmake
DirectX.cmake DirectX.cmake
DownloadPrebuilt.cmake.in DownloadPrebuilt.cmake.in
ELFIO.cmake ELFIO.cmake
EXPAT.cmake EXPAT.cmake
ExamplePlugin.cmake
FMOD.cmake
FMODEX.cmake
FindAPR.cmake FindAPR.cmake
FindBerkeleyDB.cmake FindBerkeleyDB.cmake
FindCARes.cmake FindCARes.cmake
FindColladadom.cmake
FindELFIO.cmake FindELFIO.cmake
FindGLOD.cmake
FindGooglePerfTools.cmake FindGooglePerfTools.cmake
FindHunSpell.cmake FindHunSpell.cmake
FindMT.cmake FindJsonCpp.cmake
FindLLQtWebkit.cmake
FindNDOF.cmake FindNDOF.cmake
FindOpenJPEG.cmake FindOpenJPEG.cmake
FindTut.cmake
FindXmlRpcEpi.cmake FindXmlRpcEpi.cmake
FMOD.cmake
FMODEX.cmake
FreeType.cmake FreeType.cmake
GLOD.cmake GLOD.cmake
GStreamer010Plugin.cmake GStreamer010Plugin.cmake
Glui.cmake
Glut.cmake
GooglePerfTools.cmake GooglePerfTools.cmake
Hunspell.cmake Hunspell.cmake
JPEG.cmake JPEG.cmake
JsonCpp.cmake
LLAddBuildTest.cmake LLAddBuildTest.cmake
LLAppearance.cmake LLAppearance.cmake
LLAudio.cmake LLAudio.cmake
LLCharacter.cmake LLCharacter.cmake
LLCommon.cmake LLCommon.cmake
LLCrashLogger.cmake LLCrashLogger.cmake
LLDatabase.cmake
LLImage.cmake LLImage.cmake
LLImageJ2COJ.cmake LLImageJ2COJ.cmake
LLInventory.cmake LLInventory.cmake
LLKDU.cmake
LLMath.cmake LLMath.cmake
LLMessage.cmake LLMessage.cmake
LLPhysicsExtensions.cmake
LLPlugin.cmake LLPlugin.cmake
LLPrimitive.cmake LLPrimitive.cmake
LLPhysicsExtensions.cmake LLPhysicsExtensions.cmake
LLQtWebkit.cmake LLQtWebkit.cmake
LLRender.cmake LLRender.cmake
LLScene.cmake
LLUI.cmake LLUI.cmake
LLVFS.cmake LLVFS.cmake
LLWindow.cmake LLWindow.cmake
LLXML.cmake LLXML.cmake
# LScript.cmake LScript.cmake
Linking.cmake Linking.cmake
MediaPluginBase.cmake
NDOF.cmake NDOF.cmake
OPENAL.cmake OPENAL.cmake
OpenGL.cmake OpenGL.cmake
OpenJPEG.cmake OpenJPEG.cmake
OpenSSL.cmake OpenSSL.cmake
PNG.cmake PNG.cmake
Python.cmake PluginAPI.cmake
Prebuilt.cmake Prebuilt.cmake
PulseAudio.cmake
Python.cmake
Qt4.cmake Qt4.cmake
QuickTimePlugin.cmake
RunBuildTest.cmake RunBuildTest.cmake
StateMachine.cmake
TemplateCheck.cmake TemplateCheck.cmake
Tut.cmake Tut.cmake
UI.cmake UI.cmake
UnixInstall.cmake UnixInstall.cmake
Variables.cmake Variables.cmake
ViewerMiscLibs.cmake
WebKitLibPlugin.cmake
XmlRpcEpi.cmake XmlRpcEpi.cmake
ZLIB.cmake ZLIB.cmake
) )
@@ -92,10 +110,6 @@ set(master_SOURCE_FILES
../develop.py ../develop.py
) )
if (SERVER)
list(APPEND master_SOURCE_FILES ../Server.cmake)
endif (SERVER)
source_group("Master Rules" FILES ${master_SOURCE_FILES}) source_group("Master Rules" FILES ${master_SOURCE_FILES})
set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES} set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES}

View File

@@ -1,142 +0,0 @@
# - This is a support module for easy Mono/C# handling with CMake
# It defines the following macros:
#
# ADD_CS_LIBRARY (<target> <source>)
# ADD_CS_EXECUTABLE (<target> <source>)
# INSTALL_GAC (<target>)
#
# Note that the order of the arguments is important.
#
# You can optionally set the variable CS_FLAGS to tell the macros whether
# to pass additional flags to the compiler. This is particularly useful to
# set assembly references, unsafe code, etc... These flags are always reset
# after the target was added so you don't have to care about that.
#
# copyright (c) 2007 Arno Rehn arno@arnorehn.de
#
# Redistribution and use is allowed according to the terms of the GPL license.
# ----- support macros -----
MACRO(GET_CS_LIBRARY_TARGET_DIR)
IF (NOT LIBRARY_OUTPUT_PATH)
SET(CS_LIBRARY_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
ELSE (NOT LIBRARY_OUTPUT_PATH)
SET(CS_LIBRARY_TARGET_DIR ${LIBRARY_OUTPUT_PATH})
ENDIF (NOT LIBRARY_OUTPUT_PATH)
ENDMACRO(GET_CS_LIBRARY_TARGET_DIR)
MACRO(GET_CS_EXECUTABLE_TARGET_DIR)
IF (NOT EXECUTABLE_OUTPUT_PATH)
SET(CS_EXECUTABLE_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
ELSE (NOT EXECUTABLE_OUTPUT_PATH)
SET(CS_EXECUTABLE_TARGET_DIR ${EXECUTABLE_OUTPUT_PATH})
ENDIF (NOT EXECUTABLE_OUTPUT_PATH)
ENDMACRO(GET_CS_EXECUTABLE_TARGET_DIR)
MACRO(MAKE_PROPER_FILE_LIST)
FOREACH(file ${ARGN})
# first assume it's a relative path
FILE(GLOB globbed ${CMAKE_CURRENT_SOURCE_DIR}/${file})
IF(globbed)
FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${file} native)
ELSE(globbed)
FILE(TO_NATIVE_PATH ${file} native)
ENDIF(globbed)
SET(proper_file_list ${proper_file_list} ${native})
SET(native "")
ENDFOREACH(file)
ENDMACRO(MAKE_PROPER_FILE_LIST)
# ----- end support macros -----
MACRO(ADD_CS_LIBRARY target)
GET_CS_LIBRARY_TARGET_DIR()
SET(target_DLL "${CS_LIBRARY_TARGET_DIR}/${target}.dll")
MAKE_PROPER_FILE_LIST(${ARGN})
FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_DLL})
SET(target_KEY "${CMAKE_CURRENT_SOURCE_DIR}/${target}.key")
SET(target_CS_FLAGS "${CS_FLAGS}")
IF(${target}_CS_FLAGS)
LIST(APPEND target_CS_FLAGS ${${target}_CS_FLAGS})
ENDIF(${target}_CS_FLAGS)
IF(EXISTS ${target_KEY})
LIST(APPEND target_CS_FLAGS -keyfile:${target_KEY})
ENDIF(EXISTS ${target_KEY})
FOREACH(ref ${${target}_REFS})
SET(ref_DLL ${CMAKE_CURRENT_BINARY_DIR}/${ref}.dll)
IF(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref_DLL})
ELSE(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref})
ENDIF(EXISTS ${ref_DLL})
ENDFOREACH(ref ${${target}_REFS})
ADD_CUSTOM_COMMAND (OUTPUT ${target_DLL}
COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_DLL} -target:library ${proper_file_list}
MAIN_DEPENDENCY ${proper_file_list}
DEPENDS ${ARGN}
COMMENT "Building ${relative_path}")
ADD_CUSTOM_TARGET (${target} ALL DEPENDS ${target_DLL})
FOREACH(ref ${${target}_REFS})
GET_TARGET_PROPERTY(is_target ${ref} TYPE)
IF(is_target)
ADD_DEPENDENCIES(${target} ${ref})
ENDIF(is_target)
ENDFOREACH(ref ${${target}_REFS})
SET(relative_path "")
SET(proper_file_list "")
ENDMACRO(ADD_CS_LIBRARY)
MACRO(ADD_CS_EXECUTABLE target)
GET_CS_EXECUTABLE_TARGET_DIR()
# Seems like cmake doesn't like the ".exe" ending for custom commands.
# If we call it ${target}.exe, 'make' will later complain about a missing rule.
# Create a fake target instead.
SET(target_EXE "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe")
SET(target_TOUCH "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe-built")
GET_DIRECTORY_PROPERTY(clean ADDITIONAL_MAKE_CLEAN_FILES)
LIST(APPEND clean ${target}.exe)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${clean}")
MAKE_PROPER_FILE_LIST(${ARGN})
FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_EXE})
SET(target_CS_FLAGS "${CS_FLAGS}")
FOREACH(ref ${${target}_REFS})
SET(ref_DLL ${CMAKE_CURRENT_SOURCE_DIR}/${ref}.dll)
IF(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref_DLL})
ELSE(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref})
ENDIF(EXISTS ${ref_DLL})
ENDFOREACH(ref ${${target}_REFS})
ADD_CUSTOM_COMMAND (OUTPUT "${target_TOUCH}"
COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_EXE} ${proper_file_list}
COMMAND ${CMAKE_COMMAND} -E touch ${target_TOUCH}
MAIN_DEPENDENCY ${ARGN}
DEPENDS ${ARGN}
COMMENT "Building ${relative_path}")
ADD_CUSTOM_TARGET ("${target}" ALL DEPENDS "${target_TOUCH}")
FOREACH(ref ${${target}_REFS})
GET_TARGET_PROPERTY(is_target ${ref} TYPE)
IF(is_target)
ADD_DEPENDENCIES(${target} ${ref})
ENDIF(is_target)
ENDFOREACH(ref ${${target}_REFS})
SET(relative_path "")
SET(proper_file_list "")
ENDMACRO(ADD_CS_EXECUTABLE)
MACRO(INSTALL_GAC target)
GET_CS_LIBRARY_TARGET_DIR()
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GACUTIL_EXECUTABLE} -i ${CS_LIBRARY_TARGET_DIR}/${target}.dll -package 2.0)")
ENDMACRO(INSTALL_GAC target)

View File

@@ -0,0 +1,74 @@
# -*- cmake -*-
SET(DEBUG_PKG_CONFIG "YES")
# Don't change this if manually set by user.
IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
# Guess at architecture-specific system library paths.
if (WORD_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu)
else (WORD_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu)
endif (WORD_SIZE EQUAL 32)
# Use DPKG architecture, if available.
IF (${DPKG_ARCH})
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/${DPKG_ARCH})
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usrlocal/lib/${DPKG_ARCH})
ENDIF (${DPKG_ARCH})
# Explicitly include anything listed in PKG_CONFIG_PATH
string(REPLACE ":" ";" PKG_CONFIG_PATH_LIST "$ENV{PKG_CONFIG_PATH}")
FOREACH(PKG_CONFIG_DIR ${PKG_CONFIG_PATH_LIST})
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_DIR}/pkgconfig")
ENDFOREACH(PKG_CONFIG_DIR)
# Look for valid pkgconfig directories.
FIND_PATH(PKG_CONFIG_ENV pkgconfig ENV LD_LIBRARY_PATH)
FIND_PATH(PKG_CONFIG_MULTI pkgconfig HINT ${PKG_CONFIG_MULTI_GUESS})
FIND_PATH(PKG_CONFIG_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_MULTI_LOCAL_GUESS})
FIND_PATH(PKG_CONFIG_NO_MULTI pkgconfig HINT ${PKG_CONFIG_NO_MULTI_GUESS})
FIND_PATH(PKG_CONFIG_NO_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_NO_MULTI_LOCAL_GUESS})
# Add anything we found to our list.
IF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_ENV}/pkgconfig")
ENDIF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND)
IF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI}/pkgconfig")
ENDIF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND)
IF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI_LOCAL}/pkgconfig")
ENDIF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND)
IF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI}/pkgconfig")
ENDIF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND)
IF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI_LOCAL}/pkgconfig")
ENDIF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND)
# Also add some non-architecture specific package locations.
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:/usr/share/pkgconfig:/usr/local/share/pkgconfig")
# Remove first unwanted ':'
string(SUBSTRING ${VALID_PKG_LIBDIRS} 1 -1 VALID_PKG_LIBDIRS)
# Set PKG_CONFIG_LIBDIR environment.
SET(ENV{PKG_CONFIG_LIBDIR} ${VALID_PKG_LIBDIRS})
ENDIF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
IF(DEBUG_PKG_CONFIG)
MESSAGE(STATUS "Using PKG_CONFIG_LIBDIR=$ENV{PKG_CONFIG_LIBDIR}")
ENDIF(DEBUG_PKG_CONFIG)

View File

@@ -218,9 +218,10 @@ set(release_files
if(FMODEX) if(FMODEX)
find_path(FMODEX_BINARY_DIR fmodex.dll find_path(FMODEX_BINARY_DIR fmodex.dll
${release_src_dir} "${release_src_dir}"
${FMODEX_SDK_DIR}/api "${FMODEX_SDK_DIR}/api"
${FMODEX_SDK_DIR} "${FMODEX_SDK_DIR}"
NO_DEFAULT_PATH
) )
if(FMODEX_BINARY_DIR) if(FMODEX_BINARY_DIR)
@@ -284,53 +285,6 @@ copy_if_different(
) )
set(all_targets ${all_targets} ${out_targets}) set(all_targets ${all_targets} ${out_targets})
set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
if(EXISTS ${internal_llkdu_path})
set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll")
set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst}
DEPENDS ${internal_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
)
set(all_targets ${all_targets} ${llkdu_dst})
else(EXISTS ${internal_llkdu_path})
if (EXISTS "${debug_src_dir}/llkdu.dll")
set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${debug_llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
DEPENDS ${debug_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug"
)
set(all_targets ${all_targets} ${debug_llkdu_dst})
endif (EXISTS "${debug_src_dir}/llkdu.dll")
if (EXISTS "${release_src_dir}/llkdu.dll")
set(release_llkdu_src "${release_src_dir}/llkdu.dll")
set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${release_llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
DEPENDS ${release_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release"
)
set(all_targets ${all_targets} ${release_llkdu_dst})
set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${relwithdebinfo_llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
DEPENDS ${release_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
)
set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
endif (EXISTS "${release_src_dir}/llkdu.dll")
endif (EXISTS ${internal_llkdu_path})
# Copy MS C runtime dlls, required for packaging. # Copy MS C runtime dlls, required for packaging.
# *TODO - Adapt this to support VC9 # *TODO - Adapt this to support VC9
if (MSVC80) if (MSVC80)
@@ -439,6 +393,3 @@ add_custom_target(copy_win_libs ALL
) )
add_dependencies(copy_win_libs prepare) add_dependencies(copy_win_libs prepare)
if(EXISTS ${internal_llkdu_path})
add_dependencies(copy_win_libs llkdu)
endif(EXISTS ${internal_llkdu_path})

View File

@@ -1,6 +1,6 @@
# -*- cmake -*- # -*- cmake -*-
if (VIEWER AND WINDOWS) if (WINDOWS)
find_path(DIRECTX_INCLUDE_DIR dxdiag.h find_path(DIRECTX_INCLUDE_DIR dxdiag.h
"$ENV{DXSDK_DIR}/Include" "$ENV{DXSDK_DIR}/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include"
@@ -43,4 +43,4 @@ if (VIEWER AND WINDOWS)
message(FATAL_ERROR "Could not find DirectX SDK Libraries") message(FATAL_ERROR "Could not find DirectX SDK Libraries")
endif (DIRECTX_LIBRARY_DIR) endif (DIRECTX_LIBRARY_DIR)
endif (VIEWER AND WINDOWS) endif (WINDOWS)

View File

@@ -1,17 +0,0 @@
#Find the windows manifest tool.
if (MSVC80)
FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
PATHS
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
IF(HAVE_MANIFEST_TOOL)
MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
ELSE(HAVE_MANIFEST_TOOL)
MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
ENDIF(HAVE_MANIFEST_TOOL)
STRING(REPLACE "/MANIFEST " "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
${CMAKE_EXE_LINKER_FLAGS})
endif (MSVC80)

View File

@@ -18,5 +18,5 @@ else (STANDALONE)
elseif (LINUX) elseif (LINUX)
set(JSONCPP_LIBRARIES jsoncpp) set(JSONCPP_LIBRARIES jsoncpp)
endif (WINDOWS) endif (WINDOWS)
set(JSONCPP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/jsoncpp) set(JSONCPP_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/jsoncpp)
endif (STANDALONE) endif (STANDALONE)

View File

@@ -1,10 +0,0 @@
# -*- cmake -*-
include(MySQL)
set(LLDATABASE_INCLUDE_DIRS
${LIBS_SERVER_DIR}/lldatabase
${MYSQL_INCLUDE_DIR}
)
set(LLDATABASE_LIBRARIES lldatabase)

View File

@@ -1,18 +0,0 @@
# -*- cmake -*-
include(Prebuilt)
if (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
use_prebuilt_binary(kdu)
if (WINDOWS)
set(KDU_LIBRARY debug kdu_cored optimized kdu_core)
else (WINDOWS)
set(KDU_LIBRARY kdu)
endif (WINDOWS)
set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
set(LLKDU_LIBRARY llkdu)
set(LLKDU_STATIC_LIBRARY llkdu_static)
set(LLKDU_LIBRARIES ${LLKDU_LIBRARY})
set(LLKDU_STATIC_LIBRARIES ${LLKDU_STATIC_LIBRARY})
endif (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)

View File

@@ -1,7 +1,7 @@
# -*- cmake -*- # -*- cmake -*-
set(LLPHYSICSEXTENSIONS_LIBRARIES nd_hacdConvexDecomposition hacd nd_Pathing ) set(LLPHYSICSEXTENSIONS_LIBRARIES nd_hacdConvexDecomposition hacd nd_Pathing )
set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_OPEN_DIR}/libndhacd ) set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_OPEN_DIR}/libndhacd ${LIBS_OPEN_DIR}/libpathing)

View File

@@ -6,27 +6,7 @@ set(LLRENDER_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llrender ${LIBS_OPEN_DIR}/llrender
) )
if (SERVER AND LINUX)
set(LLRENDER_LIBRARIES
llrenderheadless
)
else (SERVER AND LINUX)
set(LLRENDER_LIBRARIES set(LLRENDER_LIBRARIES
llrender llrender
) )
endif (SERVER AND LINUX)
# mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set
# differently for different object files.
macro (copy_server_sources )
foreach (PREFIX ${ARGV})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp
${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp
)
list(APPEND server_SOURCE_FILES ${PREFIX}_server.cpp)
endforeach (PREFIX ${_copied_SOURCES})
endmacro (copy_server_sources _copied_SOURCES)

View File

@@ -1,7 +0,0 @@
# -*- cmake -*-
set(LLSCENE_INCLUDE_DIRS
${LIBS_SERVER_DIR}/llscene
)
set(LLSCENE_LIBRARIES llscene)

View File

@@ -36,17 +36,12 @@ set(LLWINDOW_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llwindow ${LIBS_OPEN_DIR}/llwindow
) )
if (SERVER AND LINUX) set(LLWINDOW_LIBRARIES
set(LLWINDOW_LIBRARIES llwindow
llwindowheadless )
)
else (SERVER AND LINUX) if (WINDOWS)
set(LLWINDOW_LIBRARIES list(APPEND LLWINDOW_LIBRARIES
llwindow comdlg32
) )
if (WINDOWS) endif (WINDOWS)
list(APPEND LLWINDOW_LIBRARIES
comdlg32
)
endif (WINDOWS)
endif (SERVER AND LINUX)

View File

@@ -3,8 +3,5 @@ include(Prebuilt)
if (NOT (STANDALONE OR DARWIN)) if (NOT (STANDALONE OR DARWIN))
use_prebuilt_binary(glext) use_prebuilt_binary(glext)
# possible glh_linear should have its own .cmake file instead
#use_prebuilt_binary(glh_linear)
# actually... not any longer, it's now in git -SG
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include) set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
endif () endif (NOT (STANDALONE OR DARWIN))

View File

@@ -8,41 +8,32 @@
# DARWIN - Mac OS X # DARWIN - Mac OS X
# LINUX - Linux # LINUX - Linux
# WINDOWS - Windows # WINDOWS - Windows
#
# What to build:
#
# VIEWER - viewer and other viewer-side components
# SERVER - simulator and other server-side bits
# Relative and absolute paths to subtrees. # Relative and absolute paths to subtrees.
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
if(NOT DEFINED COMMON_CMAKE_DIR)
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
endif(NOT DEFINED COMMON_CMAKE_DIR)
set(LIBS_CLOSED_PREFIX) set(LIBS_CLOSED_PREFIX)
set(LIBS_OPEN_PREFIX) set(LIBS_OPEN_PREFIX)
set(LIBS_SERVER_PREFIX)
set(SCRIPTS_PREFIX ../scripts) set(SCRIPTS_PREFIX ../scripts)
set(SERVER_PREFIX)
set(VIEWER_PREFIX) set(VIEWER_PREFIX)
set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX}) set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX}) set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX})
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX}) set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX}) set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)") set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)")
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)") set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
set(VISTA_ICON OFF CACHE BOOL "Allow vista icon with pre 2008 Visual Studio IDEs. (Assumes replacement old rcdll.dll with new rcdll.dll from win sdk 7.0 or later)")
set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH
"Location of prebuilt libraries.") "Location of prebuilt libraries.")
if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
# We use this as a marker that you can try to use the proprietary libraries.
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(WINDOWS ON BOOL FORCE) set(WINDOWS ON BOOL FORCE)
set(ARCH i686) set(ARCH i686)
@@ -70,6 +61,29 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif(CMAKE_SIZEOF_VOID_P MATCHES 4) endif(CMAKE_SIZEOF_VOID_P MATCHES 4)
endif (WORD_SIZE EQUAL 32) endif (WORD_SIZE EQUAL 32)
if (NOT STANDALONE AND MULTIARCH_HACK)
if (WORD_SIZE EQUAL 32)
set(DEB_ARCHITECTURE i386)
set(FIND_LIBRARY_USE_LIB64_PATHS OFF)
set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH})
else (WORD_SIZE EQUAL 32)
set(DEB_ARCHITECTURE amd64)
set(FIND_LIBRARY_USE_LIB64_PATHS ON)
endif (WORD_SIZE EQUAL 32)
execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH
RESULT_VARIABLE DPKG_RESULT
OUTPUT_VARIABLE DPKG_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
#message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}")
if (DPKG_RESULT EQUAL 0)
set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH})
set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH})
endif (DPKG_RESULT EQUAL 0)
include(ConfigurePkgConfig)
endif (NOT STANDALONE AND MULTIARCH_HACK)
set(LL_ARCH ${ARCH}_linux) set(LL_ARCH ${ARCH}_linux)
set(LL_ARCH_DIR ${ARCH}-linux) set(LL_ARCH_DIR ${ARCH}-linux)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
@@ -77,39 +91,37 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1) set(DARWIN 1)
if(${CMAKE_GENERATOR} MATCHES Xcode) if(${CMAKE_GENERATOR} MATCHES Xcode)
#SDK Compiler and Deployment targets for XCode execute_process(
if (${XCODE_VERSION} VERSION_LESS 4.0.0) COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2"
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) OUTPUT_VARIABLE XCODE_VERSION )
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
set(CMAKE_XCODE_ATTIBUTE_GCC_VERSION "4.2") # To support a different SDK update these Xcode settings:
else (${XCODE_VERSION} VERSION_LESS 4.0.0) if (XCODE_VERSION GREATER 4.2)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42") else (XCODE_VERSION GREATER 4.2)
endif (${XCODE_VERSION} VERSION_LESS 4.0.0) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
else() endif (XCODE_VERSION GREATER 4.2)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk) else(${CMAKE_GENERATOR} MATCHES Xcode)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
endif(${CMAKE_GENERATOR} MATCHES Xcode) endif(${CMAKE_GENERATOR} MATCHES Xcode)
## We currently support only 32-bit i386 builds, so use these: set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
set(CMAKE_OSX_ARCHITECTURES i386) set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
# Build only for i386 by default, system default on MacOSX 10.6 is x86_64
if (NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES i386)
endif (NOT CMAKE_OSX_ARCHITECTURES)
set(ARCH i386) set(ARCH i386)
set(WORD_SIZE 32) set(WORD_SIZE 32)
## But if you want to compile for mixed 32/64 bit, try these:
# set(CMAKE_OSX_ARCHITECTURES i386;x86_64)
# set(ARCH universal)
# set(WORD_SIZE 64)
## Finally, set up the build output directories
set(LL_ARCH ${ARCH}_darwin) set(LL_ARCH ${ARCH}_darwin)
set(LL_ARCH_DIR universal-darwin) set(LL_ARCH_DIR universal-darwin)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if (WINDOWS) if (WINDOWS)
set(PREBUILT_TYPE windows) set(PREBUILT_TYPE windows)
elseif(DARWIN) elseif(DARWIN)
@@ -120,11 +132,9 @@ elseif(LINUX AND WORD_SIZE EQUAL 64)
set(PREBUILT_TYPE linux64) set(PREBUILT_TYPE linux64)
endif(WINDOWS) endif(WINDOWS)
# Default deploy grid # Default deploy grid
set(GRID agni CACHE STRING "Target Grid") set(GRID agni CACHE STRING "Target Grid")
set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
set(VIEWER_CHANNEL "Singularity" CACHE STRING "Viewer Channel Name") set(VIEWER_CHANNEL "Singularity" CACHE STRING "Viewer Channel Name")
set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing") set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id (currently secondlife|snowglobe)") set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id (currently secondlife|snowglobe)")
@@ -135,17 +145,6 @@ set(VIEWER_BRANDING_NAME_CAMELCASE "Singularity")
set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
set(SERVER ON CACHE BOOL "Build Second Life server software.")
endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
if (LINUX AND SERVER AND VIEWER)
MESSAGE(FATAL_ERROR "
The indra source does not currently support building SERVER and VIEWER at the same time.
Please set one of these values to OFF in your CMake cache file.
(either by running ccmake or by editing CMakeCache.txt by hand)
For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both VIEWER and SERVER in one build environment
")
endif (LINUX AND SERVER AND VIEWER)
source_group("CMake Rules" FILES CMakeLists.txt) source_group("CMake Rules" FILES CMakeLists.txt)
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)

View File

@@ -81,7 +81,6 @@ class PlatformSetup(object):
distcc = True distcc = True
cmake_opts = [] cmake_opts = []
word_size = 32 word_size = 32
opensim_rules = 'OFF' #whether or not to use rules fit for opensim
using_express = False using_express = False
def __init__(self): def __init__(self):
@@ -125,7 +124,6 @@ class PlatformSetup(object):
standalone=self.standalone, standalone=self.standalone,
unattended=self.unattended, unattended=self.unattended,
word_size=self.word_size, word_size=self.word_size,
opensim_rules=self.opensim_rules,
type=self.build_type.upper(), type=self.build_type.upper(),
) )
#if simple: #if simple:
@@ -134,7 +132,6 @@ class PlatformSetup(object):
'-DSTANDALONE:BOOL=%(standalone)s ' '-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s ' '-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s ' '-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-G %(generator)r %(opts)s %(dir)r' % args) '-G %(generator)r %(opts)s %(dir)r' % args)
def run_cmake(self, args=[]): def run_cmake(self, args=[]):
@@ -296,7 +293,6 @@ class LinuxSetup(UnixSetup):
type=self.build_type.upper(), type=self.build_type.upper(),
project_name=self.project_name, project_name=self.project_name,
word_size=self.word_size, word_size=self.word_size,
opensim_rules=self.opensim_rules,
) )
if not self.is_internal_tree(): if not self.is_internal_tree():
args.update({'cxx':'g++', 'server':'OFF', 'viewer':'ON'}) args.update({'cxx':'g++', 'server':'OFF', 'viewer':'ON'})
@@ -323,7 +319,6 @@ class LinuxSetup(UnixSetup):
'-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s ' '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s ' '-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s ' '-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(opts)s %(dir)r') '%(opts)s %(dir)r')
% args) % args)
@@ -437,7 +432,6 @@ class DarwinSetup(UnixSetup):
unattended=self.unattended, unattended=self.unattended,
project_name=self.project_name, project_name=self.project_name,
universal=self.universal, universal=self.universal,
opensim_rules=self.opensim_rules,
type=self.build_type.upper(), type=self.build_type.upper(),
) )
if self.universal == 'ON': if self.universal == 'ON':
@@ -449,7 +443,6 @@ class DarwinSetup(UnixSetup):
'-DSTANDALONE:BOOL=%(standalone)s ' '-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s ' '-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s ' '-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(universal)s ' '%(universal)s '
'%(opts)s %(dir)r' % args) '%(opts)s %(dir)r' % args)
@@ -535,7 +528,6 @@ class WindowsSetup(PlatformSetup):
unattended=self.unattended, unattended=self.unattended,
project_name=self.project_name, project_name=self.project_name,
word_size=self.word_size, word_size=self.word_size,
opensim_rules=self.opensim_rules,
) )
#if simple: #if simple:
# return 'cmake %(opts)s "%(dir)s"' % args # return 'cmake %(opts)s "%(dir)s"' % args
@@ -543,7 +535,6 @@ class WindowsSetup(PlatformSetup):
'-DSTANDALONE:BOOL=%(standalone)s ' '-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s ' '-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s ' '-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(opts)s "%(dir)s"' % args) '%(opts)s "%(dir)s"' % args)
@@ -719,7 +710,6 @@ class CygwinSetup(WindowsSetup):
unattended=self.unattended, unattended=self.unattended,
project_name=self.project_name, project_name=self.project_name,
word_size=self.word_size, word_size=self.word_size,
opensim_rules=self.opensim_rules,
) )
#if simple: #if simple:
# return 'cmake %(opts)s "%(dir)s"' % args # return 'cmake %(opts)s "%(dir)s"' % args
@@ -727,7 +717,6 @@ class CygwinSetup(WindowsSetup):
'-DUNATTENDED:BOOl=%(unattended)s ' '-DUNATTENDED:BOOl=%(unattended)s '
'-DSTANDALONE:BOOL=%(standalone)s ' '-DSTANDALONE:BOOL=%(standalone)s '
'-DWORD_SIZE:STRING=%(word_size)s ' '-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(opts)s "%(dir)s"' % args) '%(opts)s "%(dir)s"' % args)
@@ -766,21 +755,15 @@ Commands:
Command-options for "configure": Command-options for "configure":
We use cmake variables to change the build configuration. We use cmake variables to change the build configuration.
-DSERVER:BOOL=OFF Don't configure simulator/dataserver/etc
-DVIEWER:BOOL=OFF Don't configure the viewer
-DPACKAGE:BOOL=ON Create "package" target to make installers -DPACKAGE:BOOL=ON Create "package" target to make installers
-DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language -DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language
-DLL_TESTS:BOOL=OFF Don't generate unit test projects -DLL_TESTS:BOOL=OFF Don't generate unit test projects
-DEXAMPLEPLUGIN:BOOL=OFF Don't generate example plugin project -DEXAMPLEPLUGIN:BOOL=OFF Don't generate example plugin project
-DDISABLE_TCMALLOC:BOOL=ON Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc) -DDISABLE_TCMALLOC:BOOL=ON Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)
-DVISTA_ICON:BOOL=ON Allow pre-2008 VS to use vista-optimized resource file. (Requires updated rcdll.dll!)
Examples: Examples:
Set up a viewer-only project for your system: Set up a Visual Studio 2010 project with "package" target:
develop.py configure -DSERVER:BOOL=OFF develop.py -G vc100 configure -DPACKAGE:BOOL=ON
Set up a Visual Studio 2005 project with "package" target:
develop.py -G vc80 configure -DPACKAGE:BOOL=ON
''' '''
def main(arguments): def main(arguments):

View File

@@ -187,7 +187,7 @@ namespace HACD
m_nTriangles--; m_nTriangles--;
} }
} }
long idEdge; long idEdge = 0;
for(size_t itE = 0; itE < m_vertices[v2].m_edges.Size(); ++itE) for(size_t itE = 0; itE < m_vertices[v2].m_edges.Size(); ++itE)
{ {
idEdge = m_vertices[v2].m_edges[itE]; idEdge = m_vertices[v2].m_edges[itE];
@@ -529,7 +529,7 @@ namespace HACD
long a, b; long a, b;
long idEdge1; long idEdge1;
long idEdge2; long idEdge2;
long idEdgeV1V2; long idEdgeV1V2 = 0;
for(size_t itE1 = 0; itE1 < m_vertices[v1].m_edges.Size(); ++itE1) for(size_t itE1 = 0; itE1 < m_vertices[v1].m_edges.Size(); ++itE1)
{ {
idEdge1 = m_vertices[v1].m_edges[itE1]; idEdge1 = m_vertices[v1].m_edges[itE1];

View File

@@ -50,8 +50,9 @@
#include <pthread.h> #include <pthread.h>
#endif #endif
#if defined(_WIN32)
#pragma warning(disable:4100) #pragma warning(disable:4100)
#endif
namespace HACD namespace HACD
{ {

View File

@@ -14,8 +14,8 @@ set(OPENJPEG_VERSION
set(openjpeg_SOURCE_FILES set(openjpeg_SOURCE_FILES
bio.c bio.c
cio.c
cidx_manager.c cidx_manager.c
cio.c
dwt.c dwt.c
event.c event.c
image.c image.c
@@ -26,8 +26,8 @@ set(openjpeg_SOURCE_FILES
mct.c mct.c
mqc.c mqc.c
openjpeg.c openjpeg.c
pi.c
phix_manager.c phix_manager.c
pi.c
ppix_manager.c ppix_manager.c
raw.c raw.c
t1.c t1.c
@@ -40,8 +40,8 @@ set(openjpeg_SOURCE_FILES
set(openjpeg_HEADER_FILES set(openjpeg_HEADER_FILES
bio.h bio.h
cio.h
cidx_manager.h cidx_manager.h
cio.h
dwt.h dwt.h
event.h event.h
fix.h fix.h

View File

@@ -169,8 +169,6 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mRoot(NULL), mRoot(NULL),
mWearableData(wearable_data) mWearableData(wearable_data)
{ {
LLMemType mt(LLMemType::MTYPE_AVATAR);
llassert_always(mWearableData); llassert_always(mWearableData);
mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES); mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
for (U32 i = 0; i < mBakedTextureDatas.size(); i++ ) for (U32 i = 0; i < mBakedTextureDatas.size(); i++ )
@@ -465,6 +463,10 @@ void LLAvatarAppearance::computeBodySize()
LLVector3 foot = mFootLeftp->getPosition(); LLVector3 foot = mFootLeftp->getPosition();
F32 old_offset = mAvatarOffset.mV[VZ];
mAvatarOffset.mV[VZ] = getVisualParamWeight(11001);
mPelvisToFoot = hip.mV[VZ] * pelvis_scale.mV[VZ] - mPelvisToFoot = hip.mV[VZ] * pelvis_scale.mV[VZ] -
knee.mV[VZ] * hip_scale.mV[VZ] - knee.mV[VZ] * hip_scale.mV[VZ] -
ankle.mV[VZ] * knee_scale.mV[VZ] - ankle.mV[VZ] * knee_scale.mV[VZ] -
@@ -484,7 +486,10 @@ void LLAvatarAppearance::computeBodySize()
new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH; new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH; new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH;
if (new_body_size != mBodySize) mAvatarOffset.mV[VX] = 0.0f;
mAvatarOffset.mV[VY] = 0.0f;
if (new_body_size != mBodySize || old_offset != mAvatarOffset.mV[VZ])
{ {
mBodySize = new_body_size; mBodySize = new_body_size;
bodySizeChanged(); bodySizeChanged();
@@ -496,8 +501,6 @@ void LLAvatarAppearance::computeBodySize()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
{ {
LLMemType mt(LLMemType::MTYPE_AVATAR);
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// parse the file // parse the file
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -539,8 +542,6 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num) BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num)
{ {
LLMemType mt(LLMemType::MTYPE_AVATAR);
LLJoint* joint = NULL; LLJoint* joint = NULL;
if (info->mIsJoint) if (info->mIsJoint)
@@ -628,9 +629,6 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
{ {
LLMemType mt(LLMemType::MTYPE_AVATAR);
if (!info) if (!info)
return FALSE; return FALSE;
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -685,8 +683,6 @@ void LLAvatarAppearance::clearSkeleton()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void LLAvatarAppearance::buildCharacter() void LLAvatarAppearance::buildCharacter()
{ {
LLMemType mt(LLMemType::MTYPE_AVATAR);
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// remove all references to our existing skeleton // remove all references to our existing skeleton
// so we can rebuild it // so we can rebuild it
@@ -1471,6 +1467,7 @@ LLColor4 LLAvatarAppearance::getClothesColor( ETextureIndex te )
} }
return color; return color;
} }
// static // static
LLColor4 LLAvatarAppearance::getDummyColor() LLColor4 LLAvatarAppearance::getDummyColor()
{ {

View File

@@ -165,6 +165,7 @@ protected:
//-------------------------------------------------------------------- //--------------------------------------------------------------------
public: public:
LLVector3 mBodySize; LLVector3 mBodySize;
LLVector3 mAvatarOffset;
protected: protected:
F32 mPelvisToFoot; F32 mPelvisToFoot;

View File

@@ -749,8 +749,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh) LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh)
{ {
LLMemType mt(LLMemType::MTYPE_AVATAR_MESH);
llassert(shared_data); llassert(shared_data);
mSharedData = shared_data; mSharedData = shared_data;

View File

@@ -504,7 +504,7 @@ BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer,
} }
while (input_stream.good() && buffer[0]=='\0'); while (input_stream.good() && buffer[0]=='\0');
return input_stream.good(); return (buffer[0] != '\0');
} }
@@ -826,4 +826,4 @@ std::string terse_F32_to_string(F32 f)
r.erase(0, 1); r.erase(0, 1);
} }
return r; return r;
} }

View File

@@ -40,9 +40,9 @@ include_directories(
) )
set(llaudio_SOURCE_FILES set(llaudio_SOURCE_FILES
llaudiodecodemgr.cpp
llaudioengine.cpp llaudioengine.cpp
lllistener.cpp lllistener.cpp
llaudiodecodemgr.cpp
llvorbisdecode.cpp llvorbisdecode.cpp
llvorbisencode.cpp llvorbisencode.cpp
) )
@@ -50,9 +50,9 @@ set(llaudio_SOURCE_FILES
set(llaudio_HEADER_FILES set(llaudio_HEADER_FILES
CMakeLists.txt CMakeLists.txt
llaudiodecodemgr.h
llaudioengine.h llaudioengine.h
lllistener.h lllistener.h
llaudiodecodemgr.h
llvorbisdecode.h llvorbisdecode.h
llvorbisencode.h llvorbisencode.h
llwindgen.h llwindgen.h

View File

@@ -38,6 +38,8 @@
#include "lllistener_openal.h" #include "lllistener_openal.h"
const float LLAudioEngine_OpenAL::WIND_BUFFER_SIZE_SEC = 0.05f;
LLAudioEngine_OpenAL::LLAudioEngine_OpenAL() LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
: :
mWindGen(NULL), mWindGen(NULL),
@@ -185,6 +187,8 @@ LLAudioChannelOpenAL::~LLAudioChannelOpenAL()
void LLAudioChannelOpenAL::cleanup() void LLAudioChannelOpenAL::cleanup()
{ {
alSourceStop(mALSource); alSourceStop(mALSource);
alSourcei(mALSource, AL_BUFFER, AL_NONE);
mCurrentBufferp = NULL; mCurrentBufferp = NULL;
} }
@@ -324,7 +328,14 @@ void LLAudioBufferOpenAL::cleanup()
{ {
if(mALBuffer != AL_NONE) if(mALBuffer != AL_NONE)
{ {
alGetError(); // clear error
alDeleteBuffers(1, &mALBuffer); alDeleteBuffers(1, &mALBuffer);
ALenum error = alutGetError();
if(ALC_NO_ERROR != error)
{
LL_WARNS("OpenAL") << "Error: " << alutGetErrorString( error ) << " when cleaning up a buffer" << LL_ENDL;
}
mALBuffer = AL_NONE; mALBuffer = AL_NONE;
} }
} }
@@ -441,6 +452,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
F64 pitch; F64 pitch;
F64 center_freq; F64 center_freq;
ALenum error; ALenum error;
ALuint *buffers = NULL;
if (!mEnableWind) if (!mEnableWind)
return; return;
@@ -484,58 +496,68 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0);
//llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl; //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl;
while(processed--) // unqueue old buffers //delete the old wind buffers
buffers = new ALuint[processed];
alGetError(); /* clear error */
alSourceUnqueueBuffers(mWindSource, processed, &buffers[0]);
error = alGetError();
if(error != AL_NO_ERROR)
{ {
ALuint buffer; llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl;
ALenum error; }
alGetError(); /* clear error */ else
alSourceUnqueueBuffers(mWindSource, 1, &buffer); {
error = alGetError(); alDeleteBuffers(processed, &buffers[0]);
if(error != AL_NO_ERROR) }
{ // We dont need to keep track of the buffers' id now.
llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; delete[] buffers;
} buffers = NULL;
else
{ //create the buffers for the empty wind buffers
alDeleteBuffers(1, &buffer); unprocessed += mNumEmptyWindALBuffers;
} buffers = new ALuint[mNumEmptyWindALBuffers];
alGetError(); /* clear error */
alGenBuffers(mNumEmptyWindALBuffers,&buffers[0]);
if((error=alGetError()) != AL_NO_ERROR)
{
llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl;
//break;
} }
unprocessed += mNumEmptyWindALBuffers; //fill the buffers with generated wind.
while (mNumEmptyWindALBuffers > 0) // fill+queue new buffers int errors = 0;
for(int i = 0; i < mNumEmptyWindALBuffers; i++)
{ {
ALuint buffer; alBufferData(buffers[i],
alGetError(); /* clear error */ AL_FORMAT_STEREO16,
alGenBuffers(1,&buffer); mWindGen->windGenerate(mWindBuf,
if((error=alGetError()) != AL_NO_ERROR) mWindBufSamples),
{ mWindBufBytes,
llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl; mWindBufFreq);
break;
}
alBufferData(buffer,
AL_FORMAT_STEREO16,
mWindGen->windGenerate(mWindBuf,
mWindBufSamples),
mWindBufBytes,
mWindBufFreq);
error = alGetError(); error = alGetError();
if(error != AL_NO_ERROR) if(error != AL_NO_ERROR)
{ {
llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl; llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl;
errors++;
} }
alSourceQueueBuffers(mWindSource, 1, &buffer);
error = alGetError();
if(error != AL_NO_ERROR)
{
llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl;
}
--mNumEmptyWindALBuffers;
} }
//queue the buffers
alSourceQueueBuffers(mWindSource, mNumEmptyWindALBuffers, &buffers[0]);
error = alGetError();
if(error != AL_NO_ERROR)
{
llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl;
}
mNumEmptyWindALBuffers = errors;
// We dont need to keep track of the buffers' id now.
delete[] buffers;
buffers = NULL;
//restart playing if not playing
ALint playing; ALint playing;
alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing); alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing);
if(playing != AL_PLAYING) if(playing != AL_PLAYING)

View File

@@ -72,8 +72,8 @@ class LLAudioEngine_OpenAL : public LLAudioEngine
ALuint mWindSource; ALuint mWindSource;
int mNumEmptyWindALBuffers; int mNumEmptyWindALBuffers;
static const int MAX_NUM_WIND_BUFFERS = 80; static const int MAX_NUM_WIND_BUFFERS = 80;
static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec static const float WIND_BUFFER_SIZE_SEC; // 1/20th sec
}; };
class LLAudioChannelOpenAL : public LLAudioChannel class LLAudioChannelOpenAL : public LLAudioChannel

View File

@@ -32,8 +32,8 @@ set(llcharacter_SOURCE_FILES
llkeyframemotionparam.cpp llkeyframemotionparam.cpp
llkeyframestandmotion.cpp llkeyframestandmotion.cpp
llkeyframewalkmotion.cpp llkeyframewalkmotion.cpp
llmotioncontroller.cpp
llmotion.cpp llmotion.cpp
llmotioncontroller.cpp
llmultigesture.cpp llmultigesture.cpp
llpose.cpp llpose.cpp
llstatemachine.cpp llstatemachine.cpp
@@ -45,8 +45,8 @@ set(llcharacter_HEADER_FILES
CMakeLists.txt CMakeLists.txt
llanimationstates.h llanimationstates.h
llbvhloader.h
llbvhconsts.h llbvhconsts.h
llbvhloader.h
llcharacter.h llcharacter.h
lleditingmotion.h lleditingmotion.h
llgesture.h llgesture.h

View File

@@ -35,8 +35,6 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include "linden_common.h" #include "linden_common.h"
#include "llmemtype.h"
#include "llmotioncontroller.h" #include "llmotioncontroller.h"
#include "llkeyframemotion.h" #include "llkeyframemotion.h"
#include "llmath.h" #include "llmath.h"
@@ -342,7 +340,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLMotion* LLMotionController::createMotion( const LLUUID &id ) LLMotion* LLMotionController::createMotion( const LLUUID &id )
{ {
LLMemType mt(LLMemType::MTYPE_ANIMATION);
// do we have an instance of this motion for this character? // do we have an instance of this motion for this character?
LLMotion *motion = findMotion(id); LLMotion *motion = findMotion(id);

View File

@@ -19,6 +19,7 @@ set(llcommon_SOURCE_FILES
aithreadid.cpp aithreadid.cpp
imageids.cpp imageids.cpp
indra_constants.cpp indra_constants.cpp
ll_template_cast.h
llallocator.cpp llallocator.cpp
llallocator_heap_profile.cpp llallocator_heap_profile.cpp
llapp.cpp llapp.cpp
@@ -54,22 +55,21 @@ set(llcommon_SOURCE_FILES
llformat.cpp llformat.cpp
llframetimer.cpp llframetimer.cpp
llheartbeat.cpp llheartbeat.cpp
llindraconfigfile.cpp
llinitparam.cpp llinitparam.cpp
llinstancetracker.cpp llinstancetracker.cpp
llindraconfigfile.cpp
llliveappconfig.cpp llliveappconfig.cpp
lllivefile.cpp lllivefile.cpp
lllog.cpp lllog.cpp
llmd5.cpp llmd5.cpp
llmemory.cpp llmemory.cpp
llmemorystream.cpp llmemorystream.cpp
llmemtype.cpp
llmetrics.cpp llmetrics.cpp
llmortician.cpp llmortician.cpp
lloptioninterface.cpp lloptioninterface.cpp
llptrto.cpp
llprocesslauncher.cpp llprocesslauncher.cpp
llprocessor.cpp llprocessor.cpp
llptrto.cpp
llqueuedthread.cpp llqueuedthread.cpp
llrand.cpp llrand.cpp
llrefcount.cpp llrefcount.cpp
@@ -81,8 +81,8 @@ set(llcommon_SOURCE_FILES
llsdutil.cpp llsdutil.cpp
llsecondlifeurls.cpp llsecondlifeurls.cpp
llsingleton.cpp llsingleton.cpp
llstat.cpp
llstacktrace.cpp llstacktrace.cpp
llstat.cpp
llstreamtools.cpp llstreamtools.cpp
llstring.cpp llstring.cpp
llstringtable.cpp llstringtable.cpp
@@ -93,7 +93,6 @@ set(llcommon_SOURCE_FILES
lluri.cpp lluri.cpp
lluuid.cpp lluuid.cpp
llworkerthread.cpp llworkerthread.cpp
ll_template_cast.h
metaclass.cpp metaclass.cpp
metaproperty.cpp metaproperty.cpp
reflective.cpp reflective.cpp
@@ -116,10 +115,9 @@ set(llcommon_HEADER_FILES
linden_common.h linden_common.h
linked_lists.h linked_lists.h
llaccountingcost.h llaccountingcost.h
llagentconstants.h
llallocator.h llallocator.h
llallocator_heap_profile.h llallocator_heap_profile.h
llagentconstants.h
llavatarname.h
llapp.h llapp.h
llapr.h llapr.h
llaprpool.h llaprpool.h
@@ -127,6 +125,7 @@ set(llcommon_HEADER_FILES
llassoclist.h llassoclist.h
llatomic.h llatomic.h
llavatarconstants.h llavatarconstants.h
llavatarname.h
llbase32.h llbase32.h
llbase64.h llbase64.h
llboost.h llboost.h
@@ -142,8 +141,8 @@ set(llcommon_HEADER_FILES
lldarrayptr.h lldarrayptr.h
lldate.h lldate.h
lldefs.h lldefs.h
lldependencies.h
lldeleteutils.h lldeleteutils.h
lldependencies.h
lldepthstack.h lldepthstack.h
lldictionary.h lldictionary.h
lldlinked.h lldlinked.h
@@ -158,11 +157,11 @@ set(llcommon_HEADER_FILES
lleventapi.h lleventapi.h
lleventcoro.h lleventcoro.h
lleventdispatcher.h lleventdispatcher.h
lleventemitter.h
lleventfilter.h lleventfilter.h
llevents.h llevents.h
lleventemitter.h
llextendedstatus.h
lleventtimer.h lleventtimer.h
llextendedstatus.h
llfasttimer.h llfasttimer.h
llfasttimer_class.h llfasttimer_class.h
llfile.h llfile.h
@@ -176,9 +175,9 @@ set(llcommon_HEADER_FILES
llheartbeat.h llheartbeat.h
llhttpstatuscodes.h llhttpstatuscodes.h
llindexedqueue.h llindexedqueue.h
llindraconfigfile.h
llinitparam.h llinitparam.h
llinstancetracker.h llinstancetracker.h
llindraconfigfile.h
llkeythrottle.h llkeythrottle.h
lllinkedqueue.h lllinkedqueue.h
llliveappconfig.h llliveappconfig.h
@@ -190,7 +189,6 @@ set(llcommon_HEADER_FILES
llmd5.h llmd5.h
llmemory.h llmemory.h
llmemorystream.h llmemorystream.h
llmemtype.h
llmetrics.h llmetrics.h
llmortician.h llmortician.h
llnametable.h llnametable.h
@@ -206,8 +204,8 @@ set(llcommon_HEADER_FILES
llqueuedthread.h llqueuedthread.h
llrand.h llrand.h
llrefcount.h llrefcount.h
llrun.h
llrefcount.h llrefcount.h
llrun.h
llsafehandle.h llsafehandle.h
llsd.h llsd.h
llsdserialize.h llsdserialize.h

View File

@@ -26,6 +26,7 @@
#ifndef LLMEMORY_H #ifndef LLMEMORY_H
#define LLMEMORY_H #define LLMEMORY_H
#include "linden_common.h"
#include <new> #include <new>
#include <cstdlib> #include <cstdlib>
@@ -33,7 +34,7 @@
#include <stdint.h> // uintptr_t #include <stdint.h> // uintptr_t
#endif #endif
#include "llmemtype.h" class LLMutex ;
#if LL_WINDOWS && LL_DEBUG #if LL_WINDOWS && LL_DEBUG
#define LL_CHECK_MEMORY llassert(_CrtCheckMemory()); #define LL_CHECK_MEMORY llassert(_CrtCheckMemory());
@@ -173,8 +174,8 @@ private:
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class LLMutex ;
#if MEM_TRACK_MEM #if MEM_TRACK_MEM
class LLMutex ;
class LL_COMMON_API LLMemTracker class LL_COMMON_API LLMemTracker
{ {
private: private:

View File

@@ -1,234 +0,0 @@
/**
* @file llmemtype.cpp
* @brief Simple memory allocation/deallocation tracking stuff here
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llmemtype.h"
#include "llallocator.h"
#if MEM_TRACK_TYPE
std::vector<char const *> LLMemType::DeclareMemType::mNameList;
#endif
LLMemType::DeclareMemType LLMemType::MTYPE_INIT("Init");
LLMemType::DeclareMemType LLMemType::MTYPE_STARTUP("Startup");
LLMemType::DeclareMemType LLMemType::MTYPE_MAIN("Main");
LLMemType::DeclareMemType LLMemType::MTYPE_FRAME("Frame");
LLMemType::DeclareMemType LLMemType::MTYPE_GATHER_INPUT("GatherInput");
LLMemType::DeclareMemType LLMemType::MTYPE_JOY_KEY("JoyKey");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE("Idle");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_PUMP("IdlePump");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_NETWORK("IdleNetwork");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_REGIONS("IdleUpdateRegions");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION("IdleUpdateViewerRegion");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_SURFACE("IdleUpdateSurface");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY("IdleUpdateParcelOverlay");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_AUDIO("IdleAudio");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING("CacheProcessPending");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS("CacheProcessPendingAsks");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES("CacheProcessPendingReplies");
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_CHECK_ALL("MessageCheckAll");
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_PROCESS_ACKS("MessageProcessAcks");
LLMemType::DeclareMemType LLMemType::MTYPE_RENDER("Render");
LLMemType::DeclareMemType LLMemType::MTYPE_SLEEP("Sleep");
LLMemType::DeclareMemType LLMemType::MTYPE_NETWORK("Network");
LLMemType::DeclareMemType LLMemType::MTYPE_PHYSICS("Physics");
LLMemType::DeclareMemType LLMemType::MTYPE_INTERESTLIST("InterestList");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEBASE("ImageBase");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGERAW("ImageRaw");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEFORMATTED("ImageFormatted");
LLMemType::DeclareMemType LLMemType::MTYPE_APPFMTIMAGE("AppFmtImage");
LLMemType::DeclareMemType LLMemType::MTYPE_APPRAWIMAGE("AppRawImage");
LLMemType::DeclareMemType LLMemType::MTYPE_APPAUXRAWIMAGE("AppAuxRawImage");
LLMemType::DeclareMemType LLMemType::MTYPE_DRAWABLE("Drawable");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT("Object");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE("ObjectProcessUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE("ObjectProcessUpdateCore");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY("Display");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE("DisplayUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA("DisplayUpdateCam");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_GEOM("DisplayUpdateGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SWAP("DisplaySwap");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_HUD("DisplayUpdateHud");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_GEN_REFLECTION("DisplayGenRefl");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE("DisplayImageUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_STATE_SORT("DisplayStateSort");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SKY("DisplaySky");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_GEOM("DisplayRenderGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_FLUSH("DisplayRenderFlush");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_UI("DisplayRenderUI");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS("DisplayRenderAttach");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DATA("VertexData");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CONSTRUCTOR("VertexConstr");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTRUCTOR("VertexDestr");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_VERTICES("VertexCreateVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_INDICES("VertexCreateIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_BUFFER("VertexDestroyBuff");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_INDICES("VertexDestroyIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_VERTS("VertexUpdateVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_INDICES("VertexUpdateIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER("VertexAllocateBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_RESIZE_BUFFER("VertexResizeBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER("VertexMapBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES("VertexMapBufferVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES("VertexMapBufferIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UNMAP_BUFFER("VertexUnmapBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_STRIDE("VertexSetStride");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_BUFFER("VertexSetBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER("VertexSetupVertBuff");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CLEANUP_CLASS("VertexCleanupClass");
LLMemType::DeclareMemType LLMemType::MTYPE_SPACE_PARTITION("SpacePartition");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE("Pipeline");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_INIT("PipelineInit");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS("PipelineCreateBuffs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RESTORE_GL("PipelineRestroGL");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS("PipelineUnloadShaders");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL("PipelineLightingDetail");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE("PipelineGetPoolType");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_POOL("PipelineAddPool");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE("PipelineAllocDrawable");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_OBJECT("PipelineAddObj");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS("PipelineCreateObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_MOVE("PipelineUpdateMove");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_GEOM("PipelineUpdateGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_VISIBLE("PipelineMarkVisible");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_MOVED("PipelineMarkMoved");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_SHIFT("PipelineMarkShift");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS("PipelineShiftObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_TEXTURED("PipelineMarkTextured");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_REBUILD("PipelineMarkRebuild");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_CULL("PipelineUpdateCull");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_STATE_SORT("PipelineStateSort");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_POST_SORT("PipelinePostSort");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS("PipelineHudEls");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HL("PipelineRenderHL");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM("PipelineRenderGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED("PipelineRenderGeomDef");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF("PipelineRenderGeomPostDef");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW("PipelineRenderGeomShadow");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_SELECT("PipelineRenderSelect");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_REBUILD_POOLS("PipelineRebuildPools");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP("PipelineQuickLookup");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS("PipelineRenderObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR("PipelineGenImpostors");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_BLOOM("PipelineRenderBloom");
LLMemType::DeclareMemType LLMemType::MTYPE_UPKEEP_POOLS("UpkeepPools");
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR("Avatar");
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR_MESH("AvatarMesh");
LLMemType::DeclareMemType LLMemType::MTYPE_PARTICLES("Particles");
LLMemType::DeclareMemType LLMemType::MTYPE_REGIONS("Regions");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY("Inventory");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DRAW("InventoryDraw");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS("InventoryBuildNewViews");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DO_FOLDER("InventoryDoFolder");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_POST_BUILD("InventoryPostBuild");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_FROM_XML("InventoryFromXML");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_CREATE_NEW_ITEM("InventoryCreateNewItem");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_INIT("InventoryViewInit");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_SHOW("InventoryViewShow");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE("InventoryViewToggle");
LLMemType::DeclareMemType LLMemType::MTYPE_ANIMATION("Animation");
LLMemType::DeclareMemType LLMemType::MTYPE_VOLUME("Volume");
LLMemType::DeclareMemType LLMemType::MTYPE_PRIMITIVE("Primitive");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT("Script");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_RUN("ScriptRun");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_BYTECODE("ScriptByteCode");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_PUMP("IoPump");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_TCP("IoTCP");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_BUFFER("IoBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_HTTP_SERVER("IoHttpServer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_SERVER("IoSDServer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_CLIENT("IoSDClient");
LLMemType::DeclareMemType LLMemType::MTYPE_DIRECTX_INIT("DirectXInit");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP1("Temp1");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP2("Temp2");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP3("Temp3");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP4("Temp4");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP5("Temp5");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP6("Temp6");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP7("Temp7");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP8("Temp8");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP9("Temp9");
LLMemType::DeclareMemType LLMemType::MTYPE_OTHER("Other");
#if MEM_TRACK_TYPE
LLMemType::DeclareMemType::DeclareMemType(char const * st)
{
mID = (S32)mNameList.size();
mName = st;
mNameList.push_back(mName);
}
LLMemType::DeclareMemType::~DeclareMemType()
{
}
LLMemType::LLMemType(LLMemType::DeclareMemType& dt)
{
mTypeIndex = dt.mID;
LLAllocator::pushMemType(dt.mID);
}
LLMemType::~LLMemType()
{
LLAllocator::popMemType();
}
char const * LLMemType::getNameFromID(S32 id)
{
if (id < 0 || id >= (S32)DeclareMemType::mNameList.size())
{
return "INVALID";
}
return DeclareMemType::mNameList[id];
}
//--------------------------------------------------------------------------------------------------
#endif //MEM_TRACK_TYPE

View File

@@ -1,251 +0,0 @@
/**
* @file llmemtype.h
* @brief Runtime memory usage debugging utilities.
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_MEMTYPE_H
#define LL_MEMTYPE_H
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#include "linden_common.h"
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// WARNING: Never commit with MEM_TRACK_MEM == 1
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#define MEM_TRACK_MEM (0 && LL_WINDOWS)
#include <vector>
class LL_COMMON_API LLMemType
{
public:
// class we'll initialize all instances of as
// static members of MemType. Then use
// to construct any new mem type.
class LL_COMMON_API DeclareMemType
{
public:
#if !MEM_TRACK_TYPE
DeclareMemType(char const * st) {}; //Do nothing
#else
DeclareMemType(char const * st);
~DeclareMemType();
S32 mID;
char const * mName;
// array so we can map an index ID to Name
static std::vector<char const *> mNameList;
#endif
};
#if !MEM_TRACK_TYPE
LLMemType(DeclareMemType& dt){} //Do nothing
#else
LLMemType(DeclareMemType& dt);
~LLMemType();
static char const * getNameFromID(S32 id);
#endif
static DeclareMemType MTYPE_INIT;
static DeclareMemType MTYPE_STARTUP;
static DeclareMemType MTYPE_MAIN;
static DeclareMemType MTYPE_FRAME;
static DeclareMemType MTYPE_GATHER_INPUT;
static DeclareMemType MTYPE_JOY_KEY;
static DeclareMemType MTYPE_IDLE;
static DeclareMemType MTYPE_IDLE_PUMP;
static DeclareMemType MTYPE_IDLE_NETWORK;
static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS;
static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION;
static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE;
static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY;
static DeclareMemType MTYPE_IDLE_AUDIO;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES;
static DeclareMemType MTYPE_MESSAGE_CHECK_ALL;
static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS;
static DeclareMemType MTYPE_RENDER;
static DeclareMemType MTYPE_SLEEP;
static DeclareMemType MTYPE_NETWORK;
static DeclareMemType MTYPE_PHYSICS;
static DeclareMemType MTYPE_INTERESTLIST;
static DeclareMemType MTYPE_IMAGEBASE;
static DeclareMemType MTYPE_IMAGERAW;
static DeclareMemType MTYPE_IMAGEFORMATTED;
static DeclareMemType MTYPE_APPFMTIMAGE;
static DeclareMemType MTYPE_APPRAWIMAGE;
static DeclareMemType MTYPE_APPAUXRAWIMAGE;
static DeclareMemType MTYPE_DRAWABLE;
static DeclareMemType MTYPE_OBJECT;
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE;
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE;
static DeclareMemType MTYPE_DISPLAY;
static DeclareMemType MTYPE_DISPLAY_UPDATE;
static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA;
static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM;
static DeclareMemType MTYPE_DISPLAY_SWAP;
static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD;
static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION;
static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE;
static DeclareMemType MTYPE_DISPLAY_STATE_SORT;
static DeclareMemType MTYPE_DISPLAY_SKY;
static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM;
static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH;
static DeclareMemType MTYPE_DISPLAY_RENDER_UI;
static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS;
static DeclareMemType MTYPE_VERTEX_DATA;
static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR;
static DeclareMemType MTYPE_VERTEX_DESTRUCTOR;
static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES;
static DeclareMemType MTYPE_VERTEX_CREATE_INDICES;
static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER;
static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES;
static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS;
static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES;
static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER;
static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES;
static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER;
static DeclareMemType MTYPE_VERTEX_SET_STRIDE;
static DeclareMemType MTYPE_VERTEX_SET_BUFFER;
static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER;
static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS;
static DeclareMemType MTYPE_SPACE_PARTITION;
static DeclareMemType MTYPE_PIPELINE;
static DeclareMemType MTYPE_PIPELINE_INIT;
static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS;
static DeclareMemType MTYPE_PIPELINE_RESTORE_GL;
static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS;
static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL;
static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE;
static DeclareMemType MTYPE_PIPELINE_ADD_POOL;
static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE;
static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT;
static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE;
static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM;
static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE;
static DeclareMemType MTYPE_PIPELINE_MARK_MOVED;
static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT;
static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED;
static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD;
static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL;
static DeclareMemType MTYPE_PIPELINE_STATE_SORT;
static DeclareMemType MTYPE_PIPELINE_POST_SORT;
static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS;
static DeclareMemType MTYPE_PIPELINE_RENDER_HL;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW;
static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT;
static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS;
static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP;
static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR;
static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM;
static DeclareMemType MTYPE_UPKEEP_POOLS;
static DeclareMemType MTYPE_AVATAR;
static DeclareMemType MTYPE_AVATAR_MESH;
static DeclareMemType MTYPE_PARTICLES;
static DeclareMemType MTYPE_REGIONS;
static DeclareMemType MTYPE_INVENTORY;
static DeclareMemType MTYPE_INVENTORY_DRAW;
static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS;
static DeclareMemType MTYPE_INVENTORY_DO_FOLDER;
static DeclareMemType MTYPE_INVENTORY_POST_BUILD;
static DeclareMemType MTYPE_INVENTORY_FROM_XML;
static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM;
static DeclareMemType MTYPE_INVENTORY_VIEW_INIT;
static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW;
static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE;
static DeclareMemType MTYPE_ANIMATION;
static DeclareMemType MTYPE_VOLUME;
static DeclareMemType MTYPE_PRIMITIVE;
static DeclareMemType MTYPE_SCRIPT;
static DeclareMemType MTYPE_SCRIPT_RUN;
static DeclareMemType MTYPE_SCRIPT_BYTECODE;
static DeclareMemType MTYPE_IO_PUMP;
static DeclareMemType MTYPE_IO_TCP;
static DeclareMemType MTYPE_IO_BUFFER;
static DeclareMemType MTYPE_IO_HTTP_SERVER;
static DeclareMemType MTYPE_IO_SD_SERVER;
static DeclareMemType MTYPE_IO_SD_CLIENT;
static DeclareMemType MTYPE_DIRECTX_INIT;
static DeclareMemType MTYPE_TEMP1;
static DeclareMemType MTYPE_TEMP2;
static DeclareMemType MTYPE_TEMP3;
static DeclareMemType MTYPE_TEMP4;
static DeclareMemType MTYPE_TEMP5;
static DeclareMemType MTYPE_TEMP6;
static DeclareMemType MTYPE_TEMP7;
static DeclareMemType MTYPE_TEMP8;
static DeclareMemType MTYPE_TEMP9;
static DeclareMemType MTYPE_OTHER; // Special; used by display code
#if MEM_TRACK_TYPE
S32 mTypeIndex;
#endif
};
//----------------------------------------------------------------------------
#endif

View File

@@ -48,7 +48,7 @@
// Locally used constants // Locally used constants
// //
const U32 SEC_PER_DAY = 86400; const U32 SEC_PER_DAY = 86400;
const F64 SEC_TO_MICROSEC = 1000000.f; const F64 SEC_TO_MICROSEC = 1000000.0;
const U64 SEC_TO_MICROSEC_U64 = 1000000; const U64 SEC_TO_MICROSEC_U64 = 1000000;
const F64 USEC_TO_SEC_F64 = 0.000001; const F64 USEC_TO_SEC_F64 = 0.000001;

View File

@@ -22,8 +22,8 @@ include_directories(
) )
set(llimage_SOURCE_FILES set(llimage_SOURCE_FILES
llimagebmp.cpp
llimage.cpp llimage.cpp
llimagebmp.cpp
llimagedxt.cpp llimagedxt.cpp
llimagej2c.cpp llimagej2c.cpp
llimagejpeg.cpp llimagejpeg.cpp
@@ -35,6 +35,7 @@ set(llimage_SOURCE_FILES
set(llimage_HEADER_FILES set(llimage_HEADER_FILES
CMakeLists.txt CMakeLists.txt
llimage.h llimage.h
llimagebmp.h llimagebmp.h
llimagedxt.h llimagedxt.h

View File

@@ -30,7 +30,6 @@
#include "llmath.h" #include "llmath.h"
#include "v4coloru.h" #include "v4coloru.h"
#include "llmemtype.h"
#include "llimagebmp.h" #include "llimagebmp.h"
#include "llimagetga.h" #include "llimagetga.h"
@@ -93,8 +92,7 @@ LLImageBase::LLImageBase()
mHeight(0), mHeight(0),
mComponents(0), mComponents(0),
mBadBufferAllocation(false), mBadBufferAllocation(false),
mAllowOverSize(false), mAllowOverSize(false)
mMemType(LLMemType::MTYPE_IMAGEBASE)
{ {
} }
@@ -164,8 +162,6 @@ void LLImageBase::deleteData()
// virtual // virtual
U8* LLImageBase::allocateData(S32 size) U8* LLImageBase::allocateData(S32 size)
{ {
LLMemType mt1(mMemType);
if (size < 0) if (size < 0)
{ {
size = mWidth * mHeight * mComponents; size = mWidth * mHeight * mComponents;
@@ -226,7 +222,6 @@ U8* LLImageBase::reallocateData(S32 size)
if(mData && (mDataSize == size)) if(mData && (mDataSize == size))
return mData; return mData;
LLMemType mt1(mMemType);
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size); U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!new_datap) if (!new_datap)
{ {
@@ -293,14 +288,12 @@ S32 LLImageRaw::sRawImageCachedCount = 0;
LLImageRaw::LLImageRaw() LLImageRaw::LLImageRaw()
: LLImageBase(), mCacheEntries(0) : LLImageBase(), mCacheEntries(0)
{ {
mMemType = LLMemType::MTYPE_IMAGERAW;
++sRawImageCount; ++sRawImageCount;
} }
LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
: LLImageBase(), mCacheEntries(0) : LLImageBase(), mCacheEntries(0)
{ {
mMemType = LLMemType::MTYPE_IMAGERAW;
llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE ); llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE );
allocateDataSize(width, height, components); allocateDataSize(width, height, components);
++sRawImageCount; ++sRawImageCount;
@@ -309,7 +302,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components) LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
: LLImageBase(), mCacheEntries(0) : LLImageBase(), mCacheEntries(0)
{ {
mMemType = LLMemType::MTYPE_IMAGERAW;
if(allocateDataSize(width, height, components) && data) if(allocateDataSize(width, height, components) && data)
{ {
memcpy(getData(), data, width*height*components); memcpy(getData(), data, width*height*components);
@@ -319,7 +311,6 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_offset, bool crop_vertically) : mCacheEntries(0) LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_offset, bool crop_vertically) : mCacheEntries(0)
{ {
mMemType = LLMemType::MTYPE_IMAGERAW;
llassert_always(src); llassert_always(src);
S8 const components = src->getComponents(); S8 const components = src->getComponents();
U8 const* const data = src->getData(); U8 const* const data = src->getData();
@@ -343,11 +334,11 @@ LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_of
++sRawImageCount; ++sRawImageCount;
} }
/*LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only) //LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
: LLImageBase(), mCacheEntries(0) // : LLImageBase(), mCacheEntries(0)
{ //{
createFromFile(filename, j2c_lowest_mip_only); // createFromFile(filename, j2c_lowest_mip_only);
}*/ //}
LLImageRaw::~LLImageRaw() LLImageRaw::~LLImageRaw()
{ {
@@ -416,7 +407,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components)
#if 0 #if 0
U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
{ {
LLMemType mt1(mMemType);
U8 *data = new U8[width*height*getComponents()]; U8 *data = new U8[width*height*getComponents()];
// Should do some simple bounds checking // Should do some simple bounds checking
@@ -500,7 +490,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a)
// Reverses the order of the rows in the image // Reverses the order of the rows in the image
void LLImageRaw::verticalFlip() void LLImageRaw::verticalFlip()
{ {
LLMemType mt1(mMemType);
S32 row_bytes = getWidth() * getComponents(); S32 row_bytes = getWidth() * getComponents();
llassert(row_bytes > 0); llassert(row_bytes > 0);
try try
@@ -640,7 +629,6 @@ void LLImageRaw::composite( LLImageRaw* src )
// Src and dst can be any size. Src has 4 components. Dst has 3 components. // Src and dst can be any size. Src has 4 components. Dst has 3 components.
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src) void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
{ {
LLMemType mt1(mMemType);
llinfos << "compositeScaled4onto3" << llendl; llinfos << "compositeScaled4onto3" << llendl;
LLImageRaw* dst = this; // Just for clarity. LLImageRaw* dst = this; // Just for clarity.
@@ -915,7 +903,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src )
// Src and dst can be any size. Src and dst have same number of components. // Src and dst can be any size. Src and dst have same number of components.
void LLImageRaw::copyScaled( LLImageRaw* src ) void LLImageRaw::copyScaled( LLImageRaw* src )
{ {
LLMemType mt1(mMemType);
LLImageRaw* dst = this; // Just for clarity. LLImageRaw* dst = this; // Just for clarity.
llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) ); llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) );
@@ -956,8 +943,6 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
//scale down image by not blending a pixel with its neighbors. //scale down image by not blending a pixel with its neighbors.
BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height) BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
{ {
LLMemType mt1(mMemType);
S8 c = getComponents() ; S8 c = getComponents() ;
llassert((1 == c) || (3 == c) || (4 == c) ); llassert((1 == c) || (3 == c) || (4 == c) );
@@ -1002,7 +987,6 @@ BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data ) BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
{ {
LLMemType mt1(mMemType);
llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) ); llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) );
S32 old_width = getWidth(); S32 old_width = getWidth();
@@ -1439,7 +1423,6 @@ LLImageFormatted::LLImageFormatted(S8 codec)
mDecoded(0), mDecoded(0),
mDiscardLevel(-1) mDiscardLevel(-1)
{ {
mMemType = LLMemType::MTYPE_IMAGEFORMATTED;
} }
// virtual // virtual

View File

@@ -36,7 +36,6 @@
#include "lluuid.h" #include "lluuid.h"
#include "llstring.h" #include "llstring.h"
#include "llthread.h" #include "llthread.h"
#include "llmemtype.h"
#include "aithreadsafe.h" #include "aithreadsafe.h"
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
@@ -163,8 +162,6 @@ private:
bool mAllowOverSize ; bool mAllowOverSize ;
static LLPrivateMemoryPool* sPrivatePoolp ; static LLPrivateMemoryPool* sPrivatePoolp ;
public:
LLMemType::DeclareMemType& mMemType; // debug
}; };
// Raw representation of an image (used for textures, and other uncompressed formats // Raw representation of an image (used for textures, and other uncompressed formats

View File

@@ -35,7 +35,6 @@
#include "lldir.h" #include "lldir.h"
#include "../llxml/llcontrol.h" #include "../llxml/llcontrol.h"
#include "llimagej2c.h" #include "llimagej2c.h"
#include "llmemtype.h"
typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)(); typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)();
typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*); typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*);
@@ -291,8 +290,6 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
// Returns TRUE to mean done, whether successful or not. // Returns TRUE to mean done, whether successful or not.
BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count ) BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
{ {
LLMemType mt1(mMemType);
BOOL res = TRUE; BOOL res = TRUE;
resetLastError(); resetLastError();
@@ -341,7 +338,6 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time) BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
{ {
LLMemType mt1(mMemType);
resetLastError(); resetLastError();
BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible); BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
if (!mLastError.empty()) if (!mLastError.empty())
@@ -518,8 +514,6 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename)
BOOL LLImageJ2C::validate(U8 *data, U32 file_size) BOOL LLImageJ2C::validate(U8 *data, U32 file_size)
{ {
LLMemType mt1(mMemType);
resetLastError(); resetLastError();
setData(data, file_size); setData(data, file_size);

View File

@@ -30,7 +30,6 @@
#include "lldarray.h" #include "lldarray.h"
#include "llfoldertype.h" #include "llfoldertype.h"
#include "llinventorytype.h" #include "llinventorytype.h"
#include "llmemtype.h"
#include "llpermissions.h" #include "llpermissions.h"
#include "llrefcount.h" #include "llrefcount.h"
#include "llsaleinfo.h" #include "llsaleinfo.h"

View File

@@ -21,12 +21,12 @@ set(llmath_SOURCE_FILES
llperlin.cpp llperlin.cpp
llquaternion.cpp llquaternion.cpp
llrect.cpp llrect.cpp
llsdutil_math.cpp
llsphere.cpp llsphere.cpp
llvector4a.cpp llvector4a.cpp
llvolume.cpp llvolume.cpp
llvolumemgr.cpp llvolumemgr.cpp
llvolumeoctree.cpp llvolumeoctree.cpp
llsdutil_math.cpp
m3math.cpp m3math.cpp
m4math.cpp m4math.cpp
raytrace.cpp raytrace.cpp
@@ -66,6 +66,7 @@ set(llmath_HEADER_FILES
llquaternion2.h llquaternion2.h
llquaternion2.inl llquaternion2.inl
llrect.h llrect.h
llsdutil_math.h
llsimdmath.h llsimdmath.h
llsimdtypes.h llsimdtypes.h
llsimdtypes.inl llsimdtypes.inl
@@ -77,7 +78,6 @@ set(llmath_HEADER_FILES
llvolume.h llvolume.h
llvolumemgr.h llvolumemgr.h
llvolumeoctree.h llvolumeoctree.h
llsdutil_math.h
m3math.h m3math.h
m4math.h m4math.h
raytrace.h raytrace.h

View File

@@ -1,46 +0,0 @@
/*
* LLCalcParser.cpp
* SecondLife
*
* Created by Aimee Walton on 28/09/2008.
* Copyright 2008 Aimee Walton.
*
*/
#include "linden_common.h"
#include "llcalcparser.h"
using namespace boost::spirit::classic;
F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string::iterator& end) const
{
LLCalc::calc_map_t::iterator iter;
std::string name(start, end);
if (mConstants)
{
iter = mConstants->find(name);
if (iter != mConstants->end())
{
return (*iter).second;
}
}
else
{
// This should never happen!
throw_(end, std::string("Missing constants table"));
}
if (mVariables)
{
iter = mVariables->find(name);
if (iter != mVariables->end())
{
return (*iter).second;
}
}
throw_(end, std::string("Unknown symbol " + name));
return 0.f;
}

View File

@@ -507,7 +507,7 @@ public:
//is it here? //is it here?
if (isInside(data->getPositionGroup())) if (isInside(data->getPositionGroup()))
{ {
if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) || if (((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius())) ||
(data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity))) (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity)))
{ //it belongs here { //it belongs here
/*mElementCount++; /*mElementCount++;

View File

@@ -35,7 +35,6 @@
#include <cmath> #include <cmath>
#include "llerror.h" #include "llerror.h"
#include "llmemtype.h"
#include "llvolumemgr.h" #include "llvolumemgr.h"
#include "v2math.h" #include "v2math.h"
@@ -378,8 +377,6 @@ public:
LLProfile::Face* LLProfile::addCap(S16 faceID) LLProfile::Face* LLProfile::addCap(S16 faceID)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
Face *face = vector_append(mFaces, 1); Face *face = vector_append(mFaces, 1);
face->mIndex = 0; face->mIndex = 0;
@@ -392,8 +389,6 @@ LLProfile::Face* LLProfile::addCap(S16 faceID)
LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat) LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
Face *face = vector_append(mFaces, 1); Face *face = vector_append(mFaces, 1);
face->mIndex = i; face->mIndex = i;
@@ -409,7 +404,6 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO
//static //static
S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
{ // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points { // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 np = 0; S32 np = 0;
// Generate an n-sided "circular" path. // Generate an n-sided "circular" path.
@@ -475,8 +469,6 @@ S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 of
// filleted and chamfered corners // filleted and chamfered corners
void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
// Generate an n-sided "circular" path. // Generate an n-sided "circular" path.
// 0 is (1,0), and we go counter-clockwise along a circular path from there. // 0 is (1,0), and we go counter-clockwise along a circular path from there.
const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f }; const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f };
@@ -730,8 +722,6 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3
S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size) BOOL is_sculpted, S32 sculpt_size)
{ // this is basically LLProfile::generate stripped down to only operations that influence the number of points { // this is basically LLProfile::generate stripped down to only operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (detail < MIN_LOD) if (detail < MIN_LOD)
{ {
detail = MIN_LOD; detail = MIN_LOD;
@@ -842,8 +832,6 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de
BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size) BOOL is_sculpted, S32 sculpt_size)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
if ((!mDirty) && (!is_sculpted)) if ((!mDirty) && (!is_sculpted))
{ {
return FALSE; return FALSE;
@@ -1116,8 +1104,6 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
BOOL LLProfileParams::importFile(LLFILE *fp) BOOL LLProfileParams::importFile(LLFILE *fp)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384; const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */ char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require // *NOTE: changing the size or type of these buffers will require
@@ -1193,8 +1179,6 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const
BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) BOOL LLProfileParams::importLegacyStream(std::istream& input_stream)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384; const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */ char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require // *NOTE: changing the size or type of these buffers will require
@@ -1286,7 +1270,6 @@ bool LLProfileParams::fromLLSD(LLSD& sd)
void LLProfileParams::copyParams(const LLProfileParams &params) void LLProfileParams::copyParams(const LLProfileParams &params)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
setCurveType(params.getCurveType()); setCurveType(params.getCurveType());
setBegin(params.getBegin()); setBegin(params.getBegin());
setEnd(params.getEnd()); setEnd(params.getEnd());
@@ -1503,8 +1486,6 @@ const LLVector2 LLPathParams::getEndScale() const
S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
{ // this is basically LLPath::generate stripped down to only the operations that influence the number of points { // this is basically LLPath::generate stripped down to only the operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (detail < MIN_LOD) if (detail < MIN_LOD)
{ {
detail = MIN_LOD; detail = MIN_LOD;
@@ -1554,8 +1535,6 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size) BOOL is_sculpted, S32 sculpt_size)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
if ((!mDirty) && (!is_sculpted)) if ((!mDirty) && (!is_sculpted))
{ {
return FALSE; return FALSE;
@@ -1683,8 +1662,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size) BOOL is_sculpted, S32 sculpt_size)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
mOpen = TRUE; // Draw end caps mOpen = TRUE; // Draw end caps
if (getPathLength() == 0) if (getPathLength() == 0)
{ {
@@ -1706,8 +1683,6 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL LLPathParams::importFile(LLFILE *fp) BOOL LLPathParams::importFile(LLFILE *fp)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384; const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */ char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require // *NOTE: changing the size or type of these buffers will require
@@ -1852,8 +1827,6 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const
BOOL LLPathParams::importLegacyStream(std::istream& input_stream) BOOL LLPathParams::importLegacyStream(std::istream& input_stream)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384; const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */ char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require // *NOTE: changing the size or type of these buffers will require
@@ -2061,8 +2034,6 @@ S32 LLVolume::sNumMeshPoints = 0;
LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL generate_single_face, const BOOL is_unique) LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL generate_single_face, const BOOL is_unique)
: mParams(params) : mParams(params)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
mUnique = is_unique; mUnique = is_unique;
mFaceMask = 0x0; mFaceMask = 0x0;
mDetail = detail; mDetail = detail;
@@ -2134,7 +2105,6 @@ LLVolume::~LLVolume()
BOOL LLVolume::generate() BOOL LLVolume::generate()
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
llassert_always(mProfilep); llassert_always(mProfilep);
//Added 10.03.05 Dave Parks //Added 10.03.05 Dave Parks
@@ -2171,7 +2141,7 @@ BOOL LLVolume::generate()
mLODScaleBias.setVec(0.6f, 0.6f, 0.6f); mLODScaleBias.setVec(0.6f, 0.6f, 0.6f);
} }
// ******************************************************************** //********************************************************************
//debug info, to be removed //debug info, to be removed
if((U32)(mPathp->mPath.size() * mProfilep->mProfile.size()) > (1u << 20)) if((U32)(mPathp->mPath.size() * mProfilep->mProfile.size()) > (1u << 20))
{ {
@@ -2183,7 +2153,7 @@ BOOL LLVolume::generate()
llerrs << "LLVolume corrupted!" << llendl ; llerrs << "LLVolume corrupted!" << llendl ;
} }
// ******************************************************************** //********************************************************************
BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split);
BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split);
@@ -2193,7 +2163,7 @@ BOOL LLVolume::generate()
S32 sizeS = mPathp->mPath.size(); S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size(); S32 sizeT = mProfilep->mProfile.size();
// ******************************************************************** //********************************************************************
//debug info, to be removed //debug info, to be removed
if((U32)(sizeS * sizeT) > (1u << 20)) if((U32)(sizeS * sizeT) > (1u << 20))
{ {
@@ -2206,7 +2176,7 @@ BOOL LLVolume::generate()
llerrs << "LLVolume corrupted!" << llendl ; llerrs << "LLVolume corrupted!" << llendl ;
} }
// ******************************************************************** //********************************************************************
sNumMeshPoints -= mMesh.size(); sNumMeshPoints -= mMesh.size();
mMesh.resize(sizeT * sizeS); mMesh.resize(sizeT * sizeS);
@@ -2730,8 +2700,6 @@ S32 LLVolume::getNumFaces() const
void LLVolume::createVolumeFaces() void LLVolume::createVolumeFaces()
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (mGenerateSingleFace) if (mGenerateSingleFace)
{ {
// do nothing // do nothing
@@ -2903,8 +2871,6 @@ F32 LLVolume::sculptGetSurfaceArea()
// create placeholder shape // create placeholder shape
void LLVolume::sculptGeneratePlaceholder() void LLVolume::sculptGeneratePlaceholder()
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 sizeS = mPathp->mPath.size(); S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size(); S32 sizeT = mProfilep->mProfile.size();
@@ -2940,10 +2906,7 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8
BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 sizeS = mPathp->mPath.size(); S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size(); S32 sizeT = mProfilep->mProfile.size();
@@ -3117,7 +3080,6 @@ bool sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32
// sculpt replaces generate() for sculpted surfaces // sculpt replaces generate() for sculpted surfaces
void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level) void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
U8 sculpt_type = mParams.getSculptType(); U8 sculpt_type = mParams.getSculptType();
BOOL data_is_empty = FALSE; BOOL data_is_empty = FALSE;
@@ -3268,7 +3230,6 @@ bool LLVolumeParams::operator<(const LLVolumeParams &params) const
void LLVolumeParams::copyParams(const LLVolumeParams &params) void LLVolumeParams::copyParams(const LLVolumeParams &params)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
mProfileParams.copyParams(params.mProfileParams); mProfileParams.copyParams(params.mProfileParams);
mPathParams.copyParams(params.mPathParams); mPathParams.copyParams(params.mPathParams);
mSculptID = params.getSculptID(); mSculptID = params.getSculptID();
@@ -3640,8 +3601,6 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h
S32 *LLVolume::getTriangleIndices(U32 &num_indices) const S32 *LLVolume::getTriangleIndices(U32 &num_indices) const
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 expected_num_triangle_indices = getNumTriangleIndices(); S32 expected_num_triangle_indices = getNumTriangleIndices();
if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES) if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES)
{ {
@@ -4369,8 +4328,6 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
const LLMatrix3& norm_mat_in, const LLMatrix3& norm_mat_in,
S32 face_mask) S32 face_mask)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLMatrix4a mat; LLMatrix4a mat;
mat.loadu(mat_in); mat.loadu(mat_in);
@@ -4832,8 +4789,6 @@ BOOL equalTriangle(const S32 *a, const S32 *b)
BOOL LLVolumeParams::importFile(LLFILE *fp) BOOL LLVolumeParams::importFile(LLFILE *fp)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
//llinfos << "importing volume" << llendl; //llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384; const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */ char buffer[BUFSIZE]; /* Flawfinder: ignore */
@@ -4888,8 +4843,6 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const
BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
//llinfos << "importing volume" << llendl; //llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384; const S32 BUFSIZE = 16384;
// *NOTE: changing the size or type of this buffer will require // *NOTE: changing the size or type of this buffer will require
@@ -4929,8 +4882,6 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
output_stream <<"\tshape 0\n"; output_stream <<"\tshape 0\n";
output_stream <<"\t{\n"; output_stream <<"\t{\n";
mPathParams.exportLegacyStream(output_stream); mPathParams.exportLegacyStream(output_stream);
@@ -6146,8 +6097,6 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0,
BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
const std::vector<LLVolume::Point>& mesh = volume->getMesh(); const std::vector<LLVolume::Point>& mesh = volume->getMesh();
const std::vector<LLVector3>& profile = volume->getProfile().mProfile; const std::vector<LLVector3>& profile = volume->getProfile().mProfile;
S32 max_s = volume->getProfile().getTotal(); S32 max_s = volume->getProfile().getTotal();
@@ -6293,8 +6242,6 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (!(mTypeMask & HOLLOW_MASK) && if (!(mTypeMask & HOLLOW_MASK) &&
!(mTypeMask & OPEN_MASK) && !(mTypeMask & OPEN_MASK) &&
((volume->getParams().getPathParams().getBegin()==0.0f)&& ((volume->getParams().getPathParams().getBegin()==0.0f)&&
@@ -6681,8 +6628,6 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
void LLVolumeFace::createBinormals() void LLVolumeFace::createBinormals()
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (!mBinormals) if (!mBinormals)
{ {
allocateBinormals(mNumVertices); allocateBinormals(mNumVertices);
@@ -6954,8 +6899,6 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
BOOL flat = mTypeMask & FLAT_MASK; BOOL flat = mTypeMask & FLAT_MASK;
U8 sculpt_type = volume->getParams().getSculptType(); U8 sculpt_type = volume->getParams().getSculptType();

View File

@@ -26,7 +26,6 @@
#include "linden_common.h" #include "linden_common.h"
#include "llvolumemgr.h" #include "llvolumemgr.h"
#include "llmemtype.h"
#include "llvolume.h" #include "llvolume.h"
@@ -182,7 +181,6 @@ void LLVolumeMgr::insertGroup(LLVolumeLODGroup* volgroup)
// protected // protected
LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params) LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params); LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params);
insertGroup(volgroup); insertGroup(volgroup);
return volgroup; return volgroup;
@@ -297,7 +295,6 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 detail)
mRefs++; mRefs++;
if (mVolumeLODs[detail].isNull()) if (mVolumeLODs[detail].isNull())
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]); mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]);
} }
mLODRefs[detail]++; mLODRefs[detail]++;

View File

@@ -30,7 +30,6 @@ set(llmessage_SOURCE_FILES
aihttptimeout.cpp aihttptimeout.cpp
aihttptimeoutpolicy.cpp aihttptimeoutpolicy.cpp
debug_libcurl.cpp debug_libcurl.cpp
llhttpclient.cpp
llares.cpp llares.cpp
llareslistener.cpp llareslistener.cpp
llassetstorage.cpp llassetstorage.cpp
@@ -46,6 +45,7 @@ set(llmessage_SOURCE_FILES
lldispatcher.cpp lldispatcher.cpp
llfiltersd2xmlrpc.cpp llfiltersd2xmlrpc.cpp
llhost.cpp llhost.cpp
llhttpclient.cpp
llhttpnode.cpp llhttpnode.cpp
llhttpsender.cpp llhttpsender.cpp
llinstantmessage.cpp llinstantmessage.cpp
@@ -91,9 +91,9 @@ set(llmessage_SOURCE_FILES
lluseroperation.cpp lluseroperation.cpp
llxfer.cpp llxfer.cpp
llxfer_file.cpp llxfer_file.cpp
llxfermanager.cpp
llxfer_mem.cpp llxfer_mem.cpp
llxfer_vfile.cpp llxfer_vfile.cpp
llxfermanager.cpp
llxorcipher.cpp llxorcipher.cpp
machine.cpp machine.cpp
message.cpp message.cpp
@@ -111,8 +111,8 @@ set(llmessage_HEADER_FILES
aicurl.h aicurl.h
aicurleasyrequeststatemachine.h aicurleasyrequeststatemachine.h
aicurlprivate.h
aicurlperhost.h aicurlperhost.h
aicurlprivate.h
aicurlthread.h aicurlthread.h
aihttpheaders.h aihttpheaders.h
aihttptimeout.h aihttptimeout.h
@@ -166,8 +166,8 @@ set(llmessage_HEADER_FILES
llpacketbuffer.h llpacketbuffer.h
llpacketring.h llpacketring.h
llpartdata.h llpartdata.h
llpumpio.h
llproxy.h llproxy.h
llpumpio.h
llqueryflags.h llqueryflags.h
llregionflags.h llregionflags.h
llregionhandle.h llregionhandle.h
@@ -193,10 +193,10 @@ set(llmessage_HEADER_FILES
lluseroperation.h lluseroperation.h
llvehicleparams.h llvehicleparams.h
llxfer.h llxfer.h
llxfermanager.h
llxfer_file.h llxfer_file.h
llxfer_mem.h llxfer_mem.h
llxfer_vfile.h llxfer_vfile.h
llxfermanager.h
llxorcipher.h llxorcipher.h
machine.h machine.h
mean_collision_data.h mean_collision_data.h

View File

@@ -30,7 +30,6 @@
#include "llbuffer.h" #include "llbuffer.h"
#include "llmath.h" #include "llmath.h"
#include "llmemtype.h"
#include "llstl.h" #include "llstl.h"
#include "llthread.h" #include "llthread.h"
@@ -44,7 +43,6 @@ LLSegment::LLSegment() :
mData(NULL), mData(NULL),
mSize(0) mSize(0)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
} }
LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
@@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
mData(data), mData(data),
mSize(data_len) mSize(data_len)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
} }
LLSegment::~LLSegment() LLSegment::~LLSegment()
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
} }
bool LLSegment::isOnChannel(S32 channel) const bool LLSegment::isOnChannel(S32 channel) const
@@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() :
mNextFree(NULL), mNextFree(NULL),
mReclaimedBytes(0) mReclaimedBytes(0)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384; const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384;
allocate(DEFAULT_HEAP_BUFFER_SIZE); allocate(DEFAULT_HEAP_BUFFER_SIZE);
} }
@@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) :
mNextFree(NULL), mNextFree(NULL),
mReclaimedBytes(0) mReclaimedBytes(0)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
allocate(size); allocate(size);
} }
@@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
mNextFree(NULL), mNextFree(NULL),
mReclaimedBytes(0) mReclaimedBytes(0)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if((len > 0) && src) if((len > 0) && src)
{ {
allocate(len); allocate(len);
@@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
// virtual // virtual
LLHeapBuffer::~LLHeapBuffer() LLHeapBuffer::~LLHeapBuffer()
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
delete[] mBuffer; delete[] mBuffer;
mBuffer = NULL; mBuffer = NULL;
mSize = 0; mSize = 0;
@@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment(
S32 size, S32 size,
LLSegment& segment) LLSegment& segment)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// get actual size of the segment. // get actual size of the segment.
S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer))); S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer)));
@@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const
void LLHeapBuffer::allocate(S32 size) void LLHeapBuffer::allocate(S32 size)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
mReclaimedBytes = 0; mReclaimedBytes = 0;
mBuffer = new U8[size]; mBuffer = new U8[size];
if(mBuffer) if(mBuffer)
@@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() :
mNextBaseChannel(0), mNextBaseChannel(0),
mMutexp(NULL) mMutexp(NULL)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
} }
LLBufferArray::~LLBufferArray() LLBufferArray::~LLBufferArray()
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer()); std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
delete mMutexp; delete mMutexp;
@@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
{ {
LLMutexLock lock(mMutexp) ; LLMutexLock lock(mMutexp) ;
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments; std::vector<LLSegment> segments;
if(copyIntoBuffers(channel, src, len, segments)) if(copyIntoBuffers(channel, src, len, segments))
{ {
@@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
{ {
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments; std::vector<LLSegment> segments;
if(copyIntoBuffers(channel, src, len, segments)) if(copyIntoBuffers(channel, src, len, segments))
{ {
@@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter(
const U8* src, const U8* src,
S32 len) S32 len)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments; std::vector<LLSegment> segments;
LLMutexLock lock(mMutexp) ; LLMutexLock lock(mMutexp) ;
@@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
{ {
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
segment_iterator_t end = mSegments.end(); segment_iterator_t end = mSegments.end();
segment_iterator_t it = getSegment(address); segment_iterator_t it = getSegment(address);
if(it == end) if(it == end)
@@ -428,7 +412,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
LLSegment& segment) LLSegment& segment)
{ {
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
segment_iterator_t rv = mSegments.begin(); segment_iterator_t rv = mSegments.begin();
segment_iterator_t end = mSegments.end(); segment_iterator_t end = mSegments.end();
if(!address) if(!address)
@@ -592,7 +575,6 @@ U8* LLBufferArray::readAfter(
U8* dest, U8* dest,
S32& len) const S32& len) const
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
U8* rv = start; U8* rv = start;
if(!dest || len <= 0) if(!dest || len <= 0)
{ {
@@ -652,7 +634,6 @@ U8* LLBufferArray::readAfter(
void LLBufferArray::writeChannelTo(std::ostream& ostr, S32 channel) const void LLBufferArray::writeChannelTo(std::ostream& ostr, S32 channel) const
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
LLMutexLock lock(mMutexp) ; LLMutexLock lock(mMutexp) ;
const_segment_iterator_t const end = mSegments.end(); const_segment_iterator_t const end = mSegments.end();
for (const_segment_iterator_t it = mSegments.begin(); it != end; ++it) for (const_segment_iterator_t it = mSegments.begin(); it != end; ++it)
@@ -670,7 +651,6 @@ U8* LLBufferArray::seek(
S32 delta) const S32 delta) const
{ {
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
const_segment_iterator_t it; const_segment_iterator_t it;
const_segment_iterator_t end = mSegments.end(); const_segment_iterator_t end = mSegments.end();
U8* rv = start; U8* rv = start;
@@ -814,8 +794,6 @@ U8* LLBufferArray::seek(
//test use only //test use only
bool LLBufferArray::takeContents(LLBufferArray& source) bool LLBufferArray::takeContents(LLBufferArray& source)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
LLMutexLock lock(mMutexp); LLMutexLock lock(mMutexp);
source.lock(); source.lock();
@@ -841,7 +819,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
S32 len) S32 len)
{ {
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// start at the end of the buffers, because it is the most likely // start at the end of the buffers, because it is the most likely
// to have free space. // to have free space.
LLSegment segment; LLSegment segment;
@@ -880,7 +858,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter) bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
{ {
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// Find out which buffer contains the segment, and if it is found, // Find out which buffer contains the segment, and if it is found,
// ask it to reclaim the memory. // ask it to reclaim the memory.
@@ -913,7 +890,6 @@ bool LLBufferArray::copyIntoBuffers(
std::vector<LLSegment>& segments) std::vector<LLSegment>& segments)
{ {
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!src || !len) return false; if(!src || !len) return false;
S32 copied = 0; S32 copied = 0;
LLSegment segment; LLSegment segment;

View File

@@ -30,7 +30,6 @@
#include "llbufferstream.h" #include "llbufferstream.h"
#include "llbuffer.h" #include "llbuffer.h"
#include "llmemtype.h"
#include "llthread.h" #include "llthread.h"
static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4; static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4;
@@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf(
mChannels(channels), mChannels(channels),
mBuffer(buffer) mBuffer(buffer)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
} }
LLBufferStreamBuf::~LLBufferStreamBuf() LLBufferStreamBuf::~LLBufferStreamBuf()
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
sync(); sync();
} }
// virtual // virtual
int LLBufferStreamBuf::underflow() int LLBufferStreamBuf::underflow()
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
//lldebugs << "LLBufferStreamBuf::underflow()" << llendl; //lldebugs << "LLBufferStreamBuf::underflow()" << llendl;
if(!mBuffer) if(!mBuffer)
{ {
@@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow()
// virtual // virtual
int LLBufferStreamBuf::overflow(int c) int LLBufferStreamBuf::overflow(int c)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!mBuffer) if(!mBuffer)
{ {
return EOF; return EOF;
@@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c)
// virtual // virtual
int LLBufferStreamBuf::sync() int LLBufferStreamBuf::sync()
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
int return_value = -1; int return_value = -1;
if(!mBuffer) if(!mBuffer)
{ {
@@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff(
std::ios::openmode which) std::ios::openmode which)
#endif #endif
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!mBuffer if(!mBuffer
|| ((way == std::ios::beg) && (off < 0)) || ((way == std::ios::beg) && (off < 0))
|| ((way == std::ios::end) && (off > 0))) || ((way == std::ios::end) && (off > 0)))
@@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream(
std::iostream(&mStreamBuf), std::iostream(&mStreamBuf),
mStreamBuf(channels, buffer) mStreamBuf(channels, buffer)
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
} }
LLBufferStream::~LLBufferStream() LLBufferStream::~LLBufferStream()
{ {
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
} }

View File

@@ -36,7 +36,6 @@
#include "llsdserialize.h" #include "llsdserialize.h"
#include "lluuid.h" #include "lluuid.h"
#include "message.h" #include "message.h"
#include "llmemtype.h"
#include <boost/regex.hpp> #include <boost/regex.hpp>
@@ -692,7 +691,6 @@ bool LLCacheName::getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_g
void LLCacheName::processPending() void LLCacheName::processPending()
{ {
LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING);
const F32 SECS_BETWEEN_PROCESS = 0.1f; const F32 SECS_BETWEEN_PROCESS = 0.1f;
if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS)) if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS))
{ {
@@ -798,7 +796,6 @@ std::string LLCacheName::getDefaultLastName()
void LLCacheName::Impl::processPendingAsks() void LLCacheName::Impl::processPendingAsks()
{ {
LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS);
sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue); sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue);
sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue); sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue);
mAskNameQueue.clear(); mAskNameQueue.clear();
@@ -807,7 +804,6 @@ void LLCacheName::Impl::processPendingAsks()
void LLCacheName::Impl::processPendingReplies() void LLCacheName::Impl::processPendingReplies()
{ {
LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES);
// First call all the callbacks, because they might send messages. // First call all the callbacks, because they might send messages.
for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it) for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
{ {

View File

@@ -37,7 +37,6 @@
#include "lliopipe.h" #include "lliopipe.h"
#include "lliosocket.h" #include "lliosocket.h"
#include "llioutil.h" #include "llioutil.h"
#include "llmemtype.h"
#include "llmemorystream.h" #include "llmemorystream.h"
#include "llpumpio.h" #include "llpumpio.h"
#include "llsd.h" #include "llsd.h"
@@ -449,7 +448,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
{ {
LLFastTimer t(FTM_PROCESS_HTTP_HEADER); LLFastTimer t(FTM_PROCESS_HTTP_HEADER);
PUMP_DEBUG; PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
if(eos) if(eos)
{ {
PUMP_DEBUG; PUMP_DEBUG;
@@ -593,13 +591,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) :
mContentLength(0), mContentLength(0),
mRootNode(tree) mRootNode(tree)
{ {
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
} }
// virtual // virtual
LLHTTPResponder::~LLHTTPResponder() LLHTTPResponder::~LLHTTPResponder()
{ {
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
//lldebugs << "destroying LLHTTPResponder" << llendl; //lldebugs << "destroying LLHTTPResponder" << llendl;
} }
@@ -609,7 +605,6 @@ bool LLHTTPResponder::readHeaderLine(
U8* dest, U8* dest,
S32& len) S32& len)
{ {
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
--len; --len;
U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len); U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len);
dest[len] = '\0'; dest[len] = '\0';
@@ -634,7 +629,6 @@ void LLHTTPResponder::markBad(
const LLChannelDescriptors& channels, const LLChannelDescriptors& channels,
buffer_ptr_t buffer) buffer_ptr_t buffer)
{ {
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
mState = STATE_SHORT_CIRCUIT; mState = STATE_SHORT_CIRCUIT;
LLBufferStream out(channels, buffer.get()); LLBufferStream out(channels, buffer.get());
out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n" out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n"
@@ -654,7 +648,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
{ {
LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER); LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER);
PUMP_DEBUG; PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
LLIOPipe::EStatus status = STATUS_OK; LLIOPipe::EStatus status = STATUS_OK;
// parsing headers // parsing headers

View File

@@ -33,7 +33,6 @@
#include "llbuffer.h" #include "llbuffer.h"
#include "llhost.h" #include "llhost.h"
#include "llmemtype.h"
#include "llpumpio.h" #include "llpumpio.h"
#include "llthread.h" #include "llthread.h"
@@ -101,7 +100,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock)
// static // static
LLSocket::ptr_t LLSocket::create(EType type, U16 port) LLSocket::ptr_t LLSocket::create(EType type, U16 port)
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
apr_status_t status = APR_EGENERAL; apr_status_t status = APR_EGENERAL;
LLSocket::ptr_t rv(new LLSocket); LLSocket::ptr_t rv(new LLSocket);
@@ -179,7 +177,6 @@ LLSocket::ptr_t LLSocket::create(EType type, U16 port)
// static // static
LLSocket::ptr_t LLSocket::create(apr_status_t& status, LLSocket::ptr_t& listen_socket) LLSocket::ptr_t LLSocket::create(apr_status_t& status, LLSocket::ptr_t& listen_socket)
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if (!listen_socket->getSocket()) if (!listen_socket->getSocket())
{ {
status = APR_ENOSOCKET; status = APR_ENOSOCKET;
@@ -232,7 +229,6 @@ LLSocket::LLSocket() :
LLSocket::~LLSocket() LLSocket::~LLSocket()
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// *FIX: clean up memory we are holding. // *FIX: clean up memory we are holding.
if(mSocket) if(mSocket)
{ {
@@ -248,7 +244,6 @@ LLSocket::~LLSocket()
void LLSocket::setBlocking(S32 timeout) void LLSocket::setBlocking(S32 timeout)
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options // set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout)); ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0));
@@ -259,7 +254,6 @@ void LLSocket::setBlocking(S32 timeout)
void LLSocket::setNonBlocking() void LLSocket::setNonBlocking()
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options // set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0)); ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1));
@@ -276,12 +270,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) :
mSource(socket), mSource(socket),
mInitialized(false) mInitialized(false)
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
} }
LLIOSocketReader::~LLIOSocketReader() LLIOSocketReader::~LLIOSocketReader()
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOSocketReader" << llendl; //lldebugs << "Destroying LLIOSocketReader" << llendl;
} }
@@ -297,7 +289,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
{ {
LLFastTimer t(FTM_PROCESS_SOCKET_READER); LLFastTimer t(FTM_PROCESS_SOCKET_READER);
PUMP_DEBUG; PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mSource) return STATUS_PRECONDITION_NOT_MET; if(!mSource) return STATUS_PRECONDITION_NOT_MET;
if(!mInitialized) if(!mInitialized)
{ {
@@ -379,12 +370,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) :
mLastWritten(NULL), mLastWritten(NULL),
mInitialized(false) mInitialized(false)
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
} }
LLIOSocketWriter::~LLIOSocketWriter() LLIOSocketWriter::~LLIOSocketWriter()
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOSocketWriter" << llendl; //lldebugs << "Destroying LLIOSocketWriter" << llendl;
} }
@@ -399,7 +388,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
{ {
LLFastTimer t(FTM_PROCESS_SOCKET_WRITER); LLFastTimer t(FTM_PROCESS_SOCKET_WRITER);
PUMP_DEBUG; PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mDestination) return STATUS_PRECONDITION_NOT_MET; if(!mDestination) return STATUS_PRECONDITION_NOT_MET;
if(!mInitialized) if(!mInitialized)
{ {
@@ -531,12 +519,10 @@ LLIOServerSocket::LLIOServerSocket(
mInitialized(false), mInitialized(false),
mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS) mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS)
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
} }
LLIOServerSocket::~LLIOServerSocket() LLIOServerSocket::~LLIOServerSocket()
{ {
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOServerSocket" << llendl; //lldebugs << "Destroying LLIOServerSocket" << llendl;
} }
@@ -556,7 +542,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
{ {
LLFastTimer t(FTM_PROCESS_SERVER_SOCKET); LLFastTimer t(FTM_PROCESS_SERVER_SOCKET);
PUMP_DEBUG; PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!pump) if(!pump)
{ {
llwarns << "Need a pump for server socket." << llendl; llwarns << "Need a pump for server socket." << llendl;

View File

@@ -35,7 +35,6 @@
#include "llapr.h" #include "llapr.h"
#include "llfasttimer.h" #include "llfasttimer.h"
#include "llmemtype.h"
#include "llstl.h" #include "llstl.h"
#include "llstat.h" #include "llstat.h"
#include "llthread.h" #include "llthread.h"
@@ -155,7 +154,6 @@ struct ll_delete_apr_pollset_fd_client_data
typedef std::pair<LLIOPipe::ptr_t, apr_pollfd_t> pipe_conditional_t; typedef std::pair<LLIOPipe::ptr_t, apr_pollfd_t> pipe_conditional_t;
void operator()(const pipe_conditional_t& conditional) void operator()(const pipe_conditional_t& conditional)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
S32* client_id = (S32*)conditional.second.client_data; S32* client_id = (S32*)conditional.second.client_data;
delete client_id; delete client_id;
} }
@@ -177,13 +175,11 @@ LLPumpIO::LLPumpIO(void) :
{ {
mCurrentChain = mRunningChains.end(); mCurrentChain = mRunningChains.end();
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
initialize(); initialize();
} }
LLPumpIO::~LLPumpIO() LLPumpIO::~LLPumpIO()
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
#if LL_THREADS_APR #if LL_THREADS_APR
if (mChainsMutex) apr_thread_mutex_destroy(mChainsMutex); if (mChainsMutex) apr_thread_mutex_destroy(mChainsMutex);
if (mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex); if (mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex);
@@ -200,8 +196,6 @@ LLPumpIO::~LLPumpIO()
bool LLPumpIO::addChain(chain_t const& chain, F32 timeout) bool LLPumpIO::addChain(chain_t const& chain, F32 timeout)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
chain_t::const_iterator it = chain.begin(); chain_t::const_iterator it = chain.begin();
chain_t::const_iterator const end = chain.end(); chain_t::const_iterator const end = chain.end();
if (it == end) return false; if (it == end) return false;
@@ -237,8 +231,6 @@ bool LLPumpIO::addChain(
LLSD context, LLSD context,
F32 timeout) F32 timeout)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// remember that if the caller is providing a full link // remember that if the caller is providing a full link
// description, we need to have that description matched to a // description, we need to have that description matched to a
// particular buffer. // particular buffer.
@@ -325,7 +317,6 @@ static std::string events_2_string(apr_int16_t events)
bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll) bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(!pipe) return false; if(!pipe) return false;
ll_debug_poll_fd("Set conditional", poll); ll_debug_poll_fd("Set conditional", poll);
@@ -436,7 +427,6 @@ bool LLPumpIO::sleepChain(F64 seconds)
bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(mRunningChains.end() == mCurrentChain) if(mRunningChains.end() == mCurrentChain)
{ {
return false; return false;
@@ -468,7 +458,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t
//timeout is in microseconds //timeout is in microseconds
void LLPumpIO::pump(const S32& poll_timeout) void LLPumpIO::pump(const S32& poll_timeout)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
LLFastTimer t1(FTM_PUMP_IO); LLFastTimer t1(FTM_PUMP_IO);
//llinfos << "LLPumpIO::pump()" << llendl; //llinfos << "LLPumpIO::pump()" << llendl;
@@ -761,7 +750,6 @@ void LLPumpIO::pump(const S32& poll_timeout)
bool LLPumpIO::respond(LLIOPipe* pipe) bool LLPumpIO::respond(LLIOPipe* pipe)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(NULL == pipe) return false; if(NULL == pipe) return false;
#if LL_THREADS_APR #if LL_THREADS_APR
@@ -780,7 +768,6 @@ bool LLPumpIO::respond(
LLIOPipe::buffer_ptr_t data, LLIOPipe::buffer_ptr_t data,
LLSD context) LLSD context)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// if the caller is providing a full link description, we need to // if the caller is providing a full link description, we need to
// have that description matched to a particular buffer. // have that description matched to a particular buffer.
if(!data) return false; if(!data) return false;
@@ -803,7 +790,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain");
void LLPumpIO::callback() void LLPumpIO::callback()
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
//llinfos << "LLPumpIO::callback()" << llendl; //llinfos << "LLPumpIO::callback()" << llendl;
if(true) if(true)
{ {
@@ -854,7 +840,6 @@ void LLPumpIO::control(LLPumpIO::EControl op)
void LLPumpIO::initialize(void) void LLPumpIO::initialize(void)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
mPool.create(); mPool.create();
#if LL_THREADS_APR #if LL_THREADS_APR
// SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly. // SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly.
@@ -865,7 +850,6 @@ void LLPumpIO::initialize(void)
void LLPumpIO::rebuildPollset() void LLPumpIO::rebuildPollset()
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// lldebugs << "LLPumpIO::rebuildPollset()" << llendl; // lldebugs << "LLPumpIO::rebuildPollset()" << llendl;
if(mPollset) if(mPollset)
{ {
@@ -916,7 +900,6 @@ void LLPumpIO::rebuildPollset()
void LLPumpIO::processChain(LLChainInfo& chain) void LLPumpIO::processChain(LLChainInfo& chain)
{ {
PUMP_DEBUG; PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
LLIOPipe::EStatus status = LLIOPipe::STATUS_OK; LLIOPipe::EStatus status = LLIOPipe::STATUS_OK;
links_t::iterator it = chain.mHead; links_t::iterator it = chain.mHead;
links_t::iterator end = chain.mChainLinks.end(); links_t::iterator end = chain.mChainLinks.end();
@@ -1120,7 +1103,6 @@ bool LLPumpIO::handleChainError(
{ {
DoutEntering(dc::notice, "LLPumpIO::handleChainError(" << (void*)&chain << ", " << LLIOPipe::lookupStatusString(error) << ")"); DoutEntering(dc::notice, "LLPumpIO::handleChainError(" << (void*)&chain << ", " << LLIOPipe::lookupStatusString(error) << ")");
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
links_t::reverse_iterator rit; links_t::reverse_iterator rit;
if(chain.mHead == chain.mChainLinks.end()) if(chain.mHead == chain.mChainLinks.end())
{ {
@@ -1185,13 +1167,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() :
mHasExpiration(false), mHasExpiration(false),
mDescriptorsPool(new LLAPRPool(LLThread::tldata().mRootPool)) mDescriptorsPool(new LLAPRPool(LLThread::tldata().mRootPool))
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS); mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS);
} }
void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(timeout > 0.0f) if(timeout > 0.0f)
{ {
mTimer.start(timeout); mTimer.start(timeout);
@@ -1204,7 +1184,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta) void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta)
{ {
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(mTimer.getStarted()) if(mTimer.getStarted())
{ {
F64 expiry = mTimer.expiresAt(); F64 expiry = mTimer.expiresAt();

View File

@@ -38,7 +38,6 @@
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include "aicurleasyrequeststatemachine.h" #include "aicurleasyrequeststatemachine.h"
#include "llioutil.h" #include "llioutil.h"
#include "llmemtype.h"
#include "llpumpio.h" #include "llpumpio.h"
#include "llsd.h" #include "llsd.h"
#include "llstring.h" #include "llstring.h"

View File

@@ -80,7 +80,6 @@
#include "v3math.h" #include "v3math.h"
#include "v4math.h" #include "v4math.h"
#include "lltransfertargetvfile.h" #include "lltransfertargetvfile.h"
#include "llmemtype.h"
#include "llpacketring.h" #include "llpacketring.h"
class AIHTTPTimeoutPolicy; class AIHTTPTimeoutPolicy;
@@ -799,7 +798,6 @@ S32 LLMessageSystem::getReceiveBytes() const
void LLMessageSystem::processAcks() void LLMessageSystem::processAcks()
{ {
LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS);
F64 mt_sec = getMessageTimeSeconds(); F64 mt_sec = getMessageTimeSeconds();
{ {
gTransferManager.updateTransfers(); gTransferManager.updateTransfers();
@@ -4031,7 +4029,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds )
// TODO: babbage: move gServicePump in to LLMessageSystem? // TODO: babbage: move gServicePump in to LLMessageSystem?
bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump) bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump)
{ {
LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL);
if(checkMessages(frame_count)) if(checkMessages(frame_count))
{ {
return true; return true;

View File

@@ -44,8 +44,8 @@ set(llprimitive_HEADER_FILES
llprimtexturelist.h llprimtexturelist.h
lltextureanim.h lltextureanim.h
lltextureentry.h lltextureentry.h
lltreeparams.h
lltree_common.h lltree_common.h
lltreeparams.h
llvolumemessage.h llvolumemessage.h
llvolumexml.h llvolumexml.h
material_codes.h material_codes.h

View File

@@ -27,7 +27,6 @@
#include "linden_common.h" #include "linden_common.h"
#include "material_codes.h" #include "material_codes.h"
#include "llmemtype.h"
#include "llerror.h" #include "llerror.h"
#include "message.h" #include "message.h"
#include "llprimitive.h" #include "llprimitive.h"
@@ -188,7 +187,6 @@ void LLPrimitive::clearTextureList()
// static // static
LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
{ {
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
LLPrimitive *retval = new LLPrimitive(); LLPrimitive *retval = new LLPrimitive();
if (retval) if (retval)
@@ -206,7 +204,6 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
//=============================================================== //===============================================================
void LLPrimitive::init_primitive(LLPCode p_code) void LLPrimitive::init_primitive(LLPCode p_code)
{ {
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
clearTextureList(); clearTextureList();
mPrimitiveCode = p_code; mPrimitiveCode = p_code;
} }
@@ -698,7 +695,6 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac
BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume) BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
{ {
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLVolume *volumep; LLVolume *volumep;
if (unique_volume) if (unique_volume)
{ {

View File

@@ -28,7 +28,6 @@
#include "llprimtexturelist.h" #include "llprimtexturelist.h"
#include "lltextureentry.h" #include "lltextureentry.h"
#include "llmemtype.h"
// static // static
//int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++ //int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++
@@ -367,7 +366,6 @@ S32 LLPrimTextureList::size() const
// sets the size of the mEntryList container // sets the size of the mEntryList container
void LLPrimTextureList::setSize(S32 new_size) void LLPrimTextureList::setSize(S32 new_size)
{ {
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
if (new_size < 0) if (new_size < 0)
{ {
new_size = 0; new_size = 0;

View File

@@ -25,17 +25,20 @@ include_directories(
set(llrender_SOURCE_FILES set(llrender_SOURCE_FILES
llcubemap.cpp llcubemap.cpp
llfont.cpp
llfontgl.cpp
llfontbitmapcache.cpp llfontbitmapcache.cpp
llfontfreetype.cpp
llfontgl.cpp
llfontregistry.cpp llfontregistry.cpp
llgl.cpp
llgldbg.cpp llgldbg.cpp
llglslshader.cpp llglslshader.cpp
llgltexture.cpp llgltexture.cpp
llimagegl.cpp llimagegl.cpp
llpostprocess.cpp llpostprocess.cpp
llrender.cpp
llrender2dutils.cpp llrender2dutils.cpp
llrendersphere.cpp llrendersphere.cpp
llrendertarget.cpp
llshadermgr.cpp llshadermgr.cpp
lltexture.cpp lltexture.cpp
lluiimage.cpp lluiimage.cpp
@@ -46,9 +49,9 @@ set(llrender_HEADER_FILES
CMakeLists.txt CMakeLists.txt
llcubemap.h llcubemap.h
llfontgl.h
llfont.h
llfontbitmapcache.h llfontbitmapcache.h
llfontfreetype.h
llfontgl.h
llfontregistry.h llfontregistry.h
llgl.h llgl.h
llgldbg.h llgldbg.h
@@ -73,29 +76,5 @@ set_source_files_properties(${llrender_HEADER_FILES}
list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES}) list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES})
if (SERVER AND NOT WINDOWS AND NOT DARWIN)
copy_server_sources(
llgl
llrender
)
set_source_files_properties(
${server_SOURCE_FILES}
PROPERTIES
COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1"
)
add_library (llrenderheadless
${llrender_SOURCE_FILES}
${server_SOURCE_FILES}
)
add_dependencies(llrenderheadless prepare)
else (SERVER AND NOT WINDOWS AND NOT DARWIN)
list(APPEND llrender_SOURCE_FILES
llgl.cpp
llrender.cpp
llrendertarget.cpp
)
endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
add_library (llrender ${llrender_SOURCE_FILES}) add_library (llrender ${llrender_SOURCE_FILES})
add_dependencies(llrender prepare) add_dependencies(llrender prepare)

View File

@@ -1,6 +1,6 @@
/** /**
* @file llfont.cpp * @file llfontfreetype.cpp
* @brief Font library wrapper * @brief Freetype font library wrapper
* *
* $LicenseInfo:firstyear=2002&license=viewergpl$ * $LicenseInfo:firstyear=2002&license=viewergpl$
* *
@@ -32,18 +32,10 @@
#include "linden_common.h" #include "linden_common.h"
#include "llfont.h" #include "llfontfreetype.h"
// Freetype stuff // Freetype stuff
#if !defined(LL_LINUX) || defined(LL_STANDALONE) #include <ft2build.h>
# include <ft2build.h>
#else
// I had to do some work to avoid the system-installed FreeType headers... --ryan.
//This path no longer exists.
//# include "llfreetype2/freetype/ft2build.h"
//This works fine.
# include "../include/ft2build.h"
#endif
// For some reason, this won't work if it's not wrapped in the ifdef // For some reason, this won't work if it's not wrapped in the ifdef
#ifdef FT_FREETYPE_H #ifdef FT_FREETYPE_H
@@ -65,12 +57,15 @@ LLFontManager *gFontManagerp = NULL;
FT_Library gFTLibrary = NULL; FT_Library gFTLibrary = NULL;
bool LLFont::sOpenGLcrashOnRestart = false; bool LLFontFreetype::sOpenGLcrashOnRestart = false;
//static //static
void LLFontManager::initClass() void LLFontManager::initClass()
{ {
gFontManagerp = new LLFontManager; if (!gFontManagerp)
{
gFontManagerp = new LLFontManager;
}
} }
//static //static
@@ -92,7 +87,6 @@ LLFontManager::LLFontManager()
} }
} }
LLFontManager::~LLFontManager() LLFontManager::~LLFontManager()
{ {
FT_Done_FreeType(gFTLibrary); FT_Done_FreeType(gFTLibrary);
@@ -101,14 +95,14 @@ LLFontManager::~LLFontManager()
LLFontGlyphInfo::LLFontGlyphInfo(U32 index) LLFontGlyphInfo::LLFontGlyphInfo(U32 index)
: mGlyphIndex(index), : mGlyphIndex(index),
mXBitmapOffset(0), // Offset to the origin in the bitmap
mYBitmapOffset(0), // Offset to the origin in the bitmap
mXBearing(0), // Distance from baseline to left in pixels
mYBearing(0), // Distance from baseline to top in pixels
mWidth(0), // In pixels mWidth(0), // In pixels
mHeight(0), // In pixels mHeight(0), // In pixels
mXAdvance(0.f), // In pixels mXAdvance(0.f), // In pixels
mYAdvance(0.f), // In pixels mYAdvance(0.f), // In pixels
mXBitmapOffset(0), // Offset to the origin in the bitmap
mYBitmapOffset(0), // Offset to the origin in the bitmap
mXBearing(0), // Distance from baseline to left in pixels
mYBearing(0), // Distance from baseline to top in pixels
mIsRendered(FALSE), mIsRendered(FALSE),
mMetricsValid(FALSE) mMetricsValid(FALSE)
{} {}
@@ -126,33 +120,29 @@ LLFontList::~LLFontList()
// The (now dangling) pointers in the vector will be cleaned up when the vector is deleted by the superclass destructor. // The (now dangling) pointers in the vector will be cleaned up when the vector is deleted by the superclass destructor.
} }
} }
void LLFontList::addAtEnd(LLFont *font) void LLFontList::addAtEnd(LLFontFreetype *font)
{ {
// Purely a convenience function // Purely a convenience function
this->push_back(font); this->push_back(font);
} }
LLFont::LLFont() LLFontFreetype::LLFontFreetype()
: mFontBitmapCachep(new LLFontBitmapCache),
mValid(FALSE),
mAscender(0.f),
mDescender(0.f),
mLineHeight(0.f),
mFallbackFontp(NULL),
mIsFallback(FALSE),
mFTFace(NULL),
mRenderGlyphCount(0),
mAddGlyphCount(0),
mPointSize(0)
{ {
mFontBitmapCachep = new LLFontBitmapCache;
mValid = FALSE;
mAscender = 0.f;
mDescender = 0.f;
mLineHeight = 0.f;
mFallbackFontp = NULL;
mIsFallback = FALSE;
mFTFace = NULL;
mRenderGlyphCount = 0;
mAddGlyphCount = 0;
mPointSize = 0;
} }
LLFont::~LLFont() LLFontFreetype::~LLFontFreetype()
{ {
// Clean up freetype libs. // Clean up freetype libs.
if (mFTFace) if (mFTFace)
@@ -165,25 +155,7 @@ LLFont::~LLFont()
// mFontBitmapCachep will be cleaned up by LLPointer destructor. // mFontBitmapCachep will be cleaned up by LLPointer destructor.
} }
// virtual BOOL LLFontFreetype::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback)
F32 LLFont::getLineHeight() const
{
return mLineHeight;
}
// virtual
F32 LLFont::getAscenderHeight() const
{
return mAscender;
}
// virtual
F32 LLFont::getDescenderHeight() const
{
return mDescender;
}
BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback)
{ {
// Don't leak face objects. This is also needed to deal with // Don't leak face objects. This is also needed to deal with
// changed font file names. // changed font file names.
@@ -260,38 +232,115 @@ BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F
return TRUE; return TRUE;
} }
void LLFont::resetBitmapCache() //virtual
F32 LLFontFreetype::getLineHeight() const
{ {
// Iterate through glyphs and clear the mIsRendered flag return mLineHeight;
for (char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.begin();
iter != mCharGlyphInfoMap.end(); ++iter)
{
iter->second->mIsRendered = FALSE;
//FIXME: this is only strictly necessary when resetting the entire font,
//not just flushing the bitmap
iter->second->mMetricsValid = FALSE;
}
mFontBitmapCachep->reset();
if (!mIsFallback || !sOpenGLcrashOnRestart) // because this often crashes under Linux...
{
// Add the empty glyph`5
addGlyph(0, 0);
}
} }
LLFontGlyphInfo* LLFont::getGlyphInfo(const llwchar wch) const //virtual
F32 LLFontFreetype::getAscenderHeight() const
{ {
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch); return mAscender;
if (iter != mCharGlyphInfoMap.end())
{
return iter->second;
}
return NULL;
} }
//virtual
F32 LLFontFreetype::getDescenderHeight() const
{
return mDescender;
}
BOOL LLFont::hasGlyph(const llwchar wch) const F32 LLFontFreetype::getXAdvance(const llwchar wch) const
{
if (mFTFace == NULL)
return 0.0;
llassert(!mIsFallback);
U32 glyph_index;
// Return existing info only if it is current
LLFontGlyphInfo* gi = getGlyphInfo(wch);
if (gi && gi->mMetricsValid)
{
return gi->mXAdvance;
}
const LLFontFreetype* fontp = this;
// Initialize char to glyph map
glyph_index = FT_Get_Char_Index(mFTFace, wch);
if (glyph_index == 0 && mFallbackFontp)
{
LLFontList::iterator iter;
for(iter = mFallbackFontp->begin(); (iter != mFallbackFontp->end()) && (glyph_index == 0); iter++)
{
glyph_index = FT_Get_Char_Index((*iter)->mFTFace, wch);
if(glyph_index)
{
fontp = *iter;
}
}
}
if (glyph_index)
{
// This font has this glyph
fontp->renderGlyph(glyph_index);
// Create the entry if it's not there
char_glyph_info_map_t::iterator iter2 = mCharGlyphInfoMap.find(wch);
if (iter2 == mCharGlyphInfoMap.end())
{
gi = new LLFontGlyphInfo(glyph_index);
insertGlyphInfo(wch, gi);
}
else
{
gi = iter2->second;
}
gi->mWidth = fontp->mFTFace->glyph->bitmap.width;
gi->mHeight = fontp->mFTFace->glyph->bitmap.rows;
// Convert these from 26.6 units to float pixels.
gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f;
gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f;
gi->mMetricsValid = TRUE;
return gi->mXAdvance;
}
else
{
gi = get_if_there(mCharGlyphInfoMap, (llwchar)0, (LLFontGlyphInfo*)NULL);
if (gi)
{
return gi->mXAdvance;
}
}
// Last ditch fallback - no glyphs defined at all.
return (F32)mFontBitmapCachep->getMaxCharWidth();
}
F32 LLFontFreetype::getXKerning(const llwchar char_left, const llwchar char_right) const
{
if (mFTFace == NULL)
return 0.0;
llassert(!mIsFallback);
LLFontGlyphInfo* left_glyph_info = get_if_there(mCharGlyphInfoMap, char_left, (LLFontGlyphInfo*)NULL);
U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0;
// Kern this puppy.
LLFontGlyphInfo* right_glyph_info = get_if_there(mCharGlyphInfoMap, char_right, (LLFontGlyphInfo*)NULL);
U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0;
FT_Vector delta;
llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));
return delta.x*(1.f/64.f);
}
BOOL LLFontFreetype::hasGlyph(const llwchar wch) const
{ {
llassert(!mIsFallback); llassert(!mIsFallback);
const LLFontGlyphInfo* gi = getGlyphInfo(wch); const LLFontGlyphInfo* gi = getGlyphInfo(wch);
@@ -305,7 +354,7 @@ BOOL LLFont::hasGlyph(const llwchar wch) const
} }
} }
BOOL LLFont::addChar(const llwchar wch) const BOOL LLFontFreetype::addChar(const llwchar wch) const
{ {
if (mFTFace == NULL) if (mFTFace == NULL)
return FALSE; return FALSE;
@@ -345,21 +394,7 @@ BOOL LLFont::addChar(const llwchar wch) const
return FALSE; return FALSE;
} }
void LLFont::insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const BOOL LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, const llwchar wch, const U32 glyph_index) const
{
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch);
if (iter != mCharGlyphInfoMap.end())
{
delete iter->second;
iter->second = gi;
}
else
{
mCharGlyphInfoMap[wch] = gi;
}
}
BOOL LLFont::addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32 glyph_index) const
{ {
if (mFTFace == NULL) if (mFTFace == NULL)
return FALSE; return FALSE;
@@ -460,120 +495,69 @@ BOOL LLFont::addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32
return TRUE; return TRUE;
} }
BOOL LLFont::addGlyph(const llwchar wch, const U32 glyph_index) const LLFontGlyphInfo* LLFontFreetype::getGlyphInfo(const llwchar wch) const
{
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch);
if (iter != mCharGlyphInfoMap.end())
{
return iter->second;
}
return NULL;
}
void LLFontFreetype::insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const
{
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch);
if (iter != mCharGlyphInfoMap.end())
{
delete iter->second;
iter->second = gi;
}
else
{
mCharGlyphInfoMap[wch] = gi;
}
}
BOOL LLFontFreetype::addGlyph(const llwchar wch, const U32 glyph_index) const
{ {
return addGlyphFromFont(this, wch, glyph_index); return addGlyphFromFont(this, wch, glyph_index);
} }
void LLFontFreetype::renderGlyph(const U32 glyph_index) const
F32 LLFont::getXAdvance(const llwchar wch) const
{
if (mFTFace == NULL)
return 0.0;
llassert(!mIsFallback);
U32 glyph_index;
// Return existing info only if it is current
LLFontGlyphInfo* gi = getGlyphInfo(wch);
if (gi && gi->mMetricsValid)
{
return gi->mXAdvance;
}
const LLFont* fontp = this;
// Initialize char to glyph map
glyph_index = FT_Get_Char_Index(mFTFace, wch);
if (glyph_index == 0 && mFallbackFontp)
{
LLFontList::iterator iter;
for(iter = mFallbackFontp->begin(); (iter != mFallbackFontp->end()) && (glyph_index == 0); iter++)
{
glyph_index = FT_Get_Char_Index((*iter)->mFTFace, wch);
if(glyph_index)
{
fontp = *iter;
}
}
}
if (glyph_index)
{
// This font has this glyph
fontp->renderGlyph(glyph_index);
// Create the entry if it's not there
char_glyph_info_map_t::iterator iter2 = mCharGlyphInfoMap.find(wch);
if (iter2 == mCharGlyphInfoMap.end())
{
gi = new LLFontGlyphInfo(glyph_index);
insertGlyphInfo(wch, gi);
}
else
{
gi = iter2->second;
}
gi->mWidth = fontp->mFTFace->glyph->bitmap.width;
gi->mHeight = fontp->mFTFace->glyph->bitmap.rows;
// Convert these from 26.6 units to float pixels.
gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f;
gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f;
gi->mMetricsValid = TRUE;
return gi->mXAdvance;
}
else
{
gi = get_if_there(mCharGlyphInfoMap, (llwchar)0, (LLFontGlyphInfo*)NULL);
if (gi)
{
return gi->mXAdvance;
}
}
// Last ditch fallback - no glyphs defined at all.
return (F32)mFontBitmapCachep->getMaxCharWidth();
}
void LLFont::renderGlyph(const U32 glyph_index) const
{ {
if (mFTFace == NULL) if (mFTFace == NULL)
return; return;
int error = FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT ); llassert_always(! FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT));
llassert(!error);
error = FT_Render_Glyph(mFTFace->glyph, gFontRenderMode); llassert_always(! FT_Render_Glyph(mFTFace->glyph, gFontRenderMode) );
mRenderGlyphCount++; mRenderGlyphCount++;
llassert(!error);
} }
void LLFontFreetype::resetBitmapCache()
F32 LLFont::getXKerning(const llwchar char_left, const llwchar char_right) const
{ {
if (mFTFace == NULL) // Iterate through glyphs and clear the mIsRendered flag
return 0.0; for (char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.begin();
iter != mCharGlyphInfoMap.end(); ++iter)
{
iter->second->mIsRendered = FALSE;
//FIXME: this is only strictly necessary when resetting the entire font,
//not just flushing the bitmap
iter->second->mMetricsValid = FALSE;
}
mFontBitmapCachep->reset();
llassert(!mIsFallback); if (!mIsFallback || !sOpenGLcrashOnRestart) // because this often crashes under Linux...
LLFontGlyphInfo* left_glyph_info = get_if_there(mCharGlyphInfoMap, char_left, (LLFontGlyphInfo*)NULL); {
U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0; // Add the empty glyph`5
// Kern this puppy. addGlyph(0, 0);
LLFontGlyphInfo* right_glyph_info = get_if_there(mCharGlyphInfoMap, char_right, (LLFontGlyphInfo*)NULL); }
U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0;
FT_Vector delta;
llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));
return delta.x*(1.f/64.f);
} }
void LLFont::setSubImageLuminanceAlpha(const U32 x,
void LLFontFreetype::setSubImageLuminanceAlpha(const U32 x,
const U32 y, const U32 y,
const U32 bitmap_num, const U32 bitmap_num,
const U32 width, const U32 width,

View File

@@ -30,11 +30,10 @@
* $/LicenseInfo$ * $/LicenseInfo$
*/ */
#ifndef LL_LLFONT_H #ifndef LL_LLFONTFREETYPE_H
#define LL_LLFONT_H #define LL_LLFONTFREETYPE_H
#include <map> #include <map>
//#include "lllocalidhashmap.h"
#include "llmemory.h" #include "llmemory.h"
#include "llstl.h" #include "llstl.h"
@@ -43,7 +42,7 @@
class LLImageRaw; class LLImageRaw;
class LLFontManager; class LLFontManager;
class LLFont; class LLFontFreetype;
// Hack. FT_Face is just a typedef for a pointer to a struct, // Hack. FT_Face is just a typedef for a pointer to a struct,
// but there's no simple forward declarations file for FreeType, // but there's no simple forward declarations file for FreeType,
@@ -59,7 +58,7 @@ class LLFontManager
public: public:
static void initClass(); static void initClass();
static void cleanupClass(); static void cleanupClass();
public: public:
LLFontManager(); LLFontManager();
virtual ~LLFontManager(); virtual ~LLFontManager();
@@ -88,19 +87,19 @@ public:
}; };
// Used for lists of fallback fonts // Used for lists of fallback fonts
class LLFontList : public std::vector<LLFont*> class LLFontList : public std::vector<LLFontFreetype*>
{ {
public: public:
LLFontList(); LLFontList();
~LLFontList(); ~LLFontList();
void addAtEnd(LLFont *font); void addAtEnd(LLFontFreetype *font);
}; };
class LLFont class LLFontFreetype
{ {
public: public:
LLFont(); LLFontFreetype();
virtual ~LLFont(); virtual ~LLFontFreetype();
// is_fallback should be true for fallback fonts that aren't used // is_fallback should be true for fallback fonts that aren't used
// to render directly (Unicode backup, primarily) // to render directly (Unicode backup, primarily)
@@ -157,7 +156,7 @@ protected:
virtual BOOL hasGlyph(const llwchar wch) const; // Has a glyph for this character virtual BOOL hasGlyph(const llwchar wch) const; // Has a glyph for this character
virtual BOOL addChar(const llwchar wch) const; // Add a new character to the font if necessary virtual BOOL addChar(const llwchar wch) const; // Add a new character to the font if necessary
virtual BOOL addGlyph(const llwchar wch, const U32 glyph_index) const; // Add a new glyph to the existing font virtual BOOL addGlyph(const llwchar wch, const U32 glyph_index) const; // Add a new glyph to the existing font
virtual BOOL addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32 glyph_index) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found) virtual BOOL addGlyphFromFont(const LLFontFreetype *fontp, const llwchar wch, const U32 glyph_index) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
virtual LLFontGlyphInfo* getGlyphInfo(const llwchar wch) const; virtual LLFontGlyphInfo* getGlyphInfo(const llwchar wch) const;
@@ -195,4 +194,4 @@ protected:
mutable S32 mAddGlyphCount; mutable S32 mAddGlyphCount;
}; };
#endif // LL_FONT_ #endif // LL_FONTFREETYPE_H

View File

@@ -26,10 +26,12 @@
#include "linden_common.h" #include "linden_common.h"
#include <boost/tokenizer.hpp>
#include "llfont.h"
#include "llfontgl.h" #include "llfontgl.h"
// Linden library includes
#include "llfontfreetype.h"
#include "llfontbitmapcache.h" #include "llfontbitmapcache.h"
#include "llfontregistry.h" #include "llfontregistry.h"
#include "llgl.h" #include "llgl.h"
@@ -38,6 +40,9 @@
#include "llstl.h" #include "llstl.h"
#include "llfasttimer.h" #include "llfasttimer.h"
// Third party library includes
#include <boost/tokenizer.hpp>
const S32 BOLD_OFFSET = 1; const S32 BOLD_OFFSET = 1;
// static class members // static class members
@@ -79,7 +84,7 @@ F32 llfont_round_y(F32 y)
} }
LLFontGL::LLFontGL() LLFontGL::LLFontGL()
: LLFont() : LLFontFreetype()
{ {
clearEmbeddedChars(); clearEmbeddedChars();
} }
@@ -128,7 +133,7 @@ void LLFontGL::destroyGL()
BOOL LLFontGL::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback) BOOL LLFontGL::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback)
{ {
if (!LLFont::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback)) if (!LLFontFreetype::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback))
{ {
return FALSE; return FALSE;
} }
@@ -138,7 +143,7 @@ BOOL LLFontGL::loadFace(const std::string& filename, const F32 point_size, const
BOOL LLFontGL::addChar(const llwchar wch) const BOOL LLFontGL::addChar(const llwchar wch) const
{ {
if (!LLFont::addChar(wch)) if (!LLFontFreetype::addChar(wch))
{ {
return FALSE; return FALSE;
} }
@@ -288,7 +293,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
F32 inv_width = 1.f / mFontBitmapCachep->getBitmapWidth(); F32 inv_width = 1.f / mFontBitmapCachep->getBitmapWidth();
F32 inv_height = 1.f / mFontBitmapCachep->getBitmapHeight(); F32 inv_height = 1.f / mFontBitmapCachep->getBitmapHeight();
const S32 LAST_CHARACTER = LLFont::LAST_CHAR_FULL; const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
BOOL draw_ellipses = FALSE; BOOL draw_ellipses = FALSE;
@@ -546,7 +551,7 @@ F32 LLFontGL::getWidthF32(const std::string& utf8text, const S32 begin_offset, c
F32 LLFontGL::getWidthF32(const llwchar* wchars, const S32 begin_offset, const S32 max_chars, BOOL use_embedded) const F32 LLFontGL::getWidthF32(const llwchar* wchars, const S32 begin_offset, const S32 max_chars, BOOL use_embedded) const
{ {
const S32 LAST_CHARACTER = LLFont::LAST_CHAR_FULL; const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
F32 cur_x = 0; F32 cur_x = 0;
const S32 max_index = begin_offset + max_chars; const S32 max_index = begin_offset + max_chars;
@@ -981,7 +986,7 @@ void LLFontGL::destroyAllGL()
{ {
if (sFontRegistry) if (sFontRegistry)
{ {
if (LLFont::sOpenGLcrashOnRestart) if (LLFontFreetype::sOpenGLcrashOnRestart)
{ {
// This will leak memory but will prevent a crash... // This will leak memory but will prevent a crash...
sFontRegistry = NULL; sFontRegistry = NULL;

View File

@@ -28,7 +28,7 @@
#ifndef LL_LLFONTGL_H #ifndef LL_LLFONTGL_H
#define LL_LLFONTGL_H #define LL_LLFONTGL_H
#include "llfont.h" #include "llfontfreetype.h"
#include "lltexture.h" #include "lltexture.h"
#include "v2math.h" #include "v2math.h"
#include "llcoord.h" #include "llcoord.h"
@@ -44,7 +44,7 @@ class LLFontDescriptor;
// Structure used to store previously requested fonts. // Structure used to store previously requested fonts.
class LLFontRegistry; class LLFontRegistry;
class LLFontGL : public LLFont class LLFontGL : public LLFontFreetype
{ {
public: public:
enum HAlign enum HAlign
@@ -66,12 +66,11 @@ public:
enum StyleFlags enum StyleFlags
{ {
// text style to render. May be combined (these are bit flags)
// text style to render. May be combined (these are bit flags) // text style to render. May be combined (these are bit flags)
NORMAL = 0x00, NORMAL = 0x00,
BOLD = 0x01, BOLD = 0x01,
ITALIC = 0x02, ITALIC = 0x02,
UNDERLINE = 0x04, UNDERLINE = 0x04
}; };
enum ShadowType enum ShadowType

View File

@@ -27,6 +27,7 @@
#include "linden_common.h" #include "linden_common.h"
#include "llgl.h" #include "llgl.h"
#include "llfontfreetype.h"
#include "llfontgl.h" #include "llfontgl.h"
#include "llfontregistry.h" #include "llfontregistry.h"
#include <boost/tokenizer.hpp> #include <boost/tokenizer.hpp>
@@ -188,21 +189,20 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename)
path_it != xml_paths.end(); path_it != xml_paths.end();
++path_it) ++path_it)
{ {
LLXMLNodePtr root; LLXMLNodePtr root;
std::string full_filename = gDirUtilp->findSkinnedFilename(*path_it, xml_filename); std::string full_filename = gDirUtilp->findSkinnedFilename(*path_it, xml_filename);
bool parsed_file = LLXMLNode::parseFile(full_filename, root, NULL); bool parsed_file = LLXMLNode::parseFile(full_filename, root, NULL);
if (!parsed_file) if (!parsed_file)
continue; continue;
if ( root.isNull() || ! root->hasName( "fonts" ) ) if ( root.isNull() || ! root->hasName( "fonts" ) )
{ {
llwarns << "Bad font info file: " llwarns << "Bad font info file: "
<< full_filename << llendl; << full_filename << llendl;
continue; continue;
} }
std::string root_name; std::string root_name;
root->getAttributeString("name",root_name); root->getAttributeString("name",root_name);
if (root->hasName("fonts")) if (root->hasName("fonts"))
@@ -214,7 +214,7 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename)
} }
if (success) if (success)
dump(); dump();
return success; return success;
} }

View File

@@ -44,7 +44,6 @@
#include "llmath.h" #include "llmath.h"
#include "m4math.h" #include "m4math.h"
#include "llstring.h" #include "llstring.h"
#include "llmemtype.h"
#include "llstacktrace.h" #include "llstacktrace.h"
#include "llglheaders.h" #include "llglheaders.h"
@@ -603,11 +602,12 @@ bool LLGLManager::initGL()
if (mGLVendor.substr(0,4) == "ATI ") if (mGLVendor.substr(0,4) == "ATI ")
{ {
mGLVendorShort = "ATI"; mGLVendorShort = "ATI";
BOOL mobile = FALSE; // "mobile" appears to be unused, and this code was causing warnings.
if (mGLRenderer.find("MOBILITY") != std::string::npos) //BOOL mobile = FALSE;
{ //if (mGLRenderer.find("MOBILITY") != std::string::npos)
mobile = TRUE; //{
} // mobile = TRUE;
//}
mIsATI = TRUE; mIsATI = TRUE;
#if LL_WINDOWS && !LL_MESA_HEADLESS #if LL_WINDOWS && !LL_MESA_HEADLESS
@@ -1444,8 +1444,7 @@ void assert_glerror()
void clear_glerror() void clear_glerror()
{ {
// Create or update texture to be used with this data // Create or update texture to be used with this data
GLenum error; glGetError();
error = glGetError();
} }
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
@@ -2266,7 +2265,6 @@ void LLGLNamePool::release(GLuint name)
//static //static
void LLGLNamePool::upkeepPools() void LLGLNamePool::upkeepPools()
{ {
LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS);
for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter) for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
{ {
LLGLNamePool & pool = *iter; LLGLNamePool & pool = *iter;

View File

@@ -65,9 +65,9 @@ bool LLImageGL::sCompressTextures = false;
std::set<LLImageGL*> LLImageGL::sImageList; std::set<LLImageGL*> LLImageGL::sImageList;
// **************************************************************************************************** //****************************************************************************************************
//The below for texture auditing use only //The below for texture auditing use only
// **************************************************************************************************** //****************************************************************************************************
//----------------------- //-----------------------
//debug use //debug use
BOOL gAuditTexture = FALSE ; BOOL gAuditTexture = FALSE ;
@@ -816,8 +816,9 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
S32 w = width, h = height; S32 w = width, h = height;
const U8* prev_mip_data = 0; const U8* prev_mip_data = 0;
const U8* cur_mip_data = 0; const U8* cur_mip_data = 0;
S32 prev_mip_size = 0; #ifdef SHOW_ASSERT
S32 cur_mip_size = 0; S32 cur_mip_size = 0;
#endif
mMipLevels = nummips; mMipLevels = nummips;
@@ -826,18 +827,24 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
if (m==0) if (m==0)
{ {
cur_mip_data = data_in; cur_mip_data = data_in;
#ifdef SHOW_ASSERT
cur_mip_size = width * height * mComponents; cur_mip_size = width * height * mComponents;
#endif
} }
else else
{ {
S32 bytes = w * h * mComponents; S32 bytes = w * h * mComponents;
#ifdef SHOW_ASSERT
llassert(prev_mip_data); llassert(prev_mip_data);
llassert(prev_mip_size == bytes*4); llassert(cur_mip_size == bytes*4);
#endif
U8* new_data = new U8[bytes]; U8* new_data = new U8[bytes];
llassert_always(new_data); llassert_always(new_data);
LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents); LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents);
cur_mip_data = new_data; cur_mip_data = new_data;
#ifdef SHOW_ASSERT
cur_mip_size = bytes; cur_mip_size = bytes;
#endif
} }
llassert(w > 0 && h > 0 && cur_mip_data); llassert(w > 0 && h > 0 && cur_mip_data);
{ {
@@ -870,7 +877,6 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
delete[] prev_mip_data; delete[] prev_mip_data;
} }
prev_mip_data = cur_mip_data; prev_mip_data = cur_mip_data;
prev_mip_size = cur_mip_size;
w >>= 1; w >>= 1;
h >>= 1; h >>= 1;
} }

View File

@@ -31,7 +31,6 @@
#include "llvertexbuffer.h" #include "llvertexbuffer.h"
// #include "llrender.h" // #include "llrender.h"
#include "llglheaders.h" #include "llglheaders.h"
#include "llmemtype.h"
#include "llrender.h" #include "llrender.h"
#include "llvector4a.h" #include "llvector4a.h"
#include "llshadermgr.h" #include "llshadermgr.h"
@@ -325,7 +324,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
{ {
if (sLastMask != data_mask) if (sLastMask != data_mask)
{ {
bool error = false;
if (gGLManager.mGLSLVersionMajor < 2 && gGLManager.mGLSLVersionMinor < 30) if (gGLManager.mGLSLVersionMajor < 2 && gGLManager.mGLSLVersionMinor < 30)
{ {
@@ -392,7 +390,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
{ {
if (gDebugSession) if (gDebugSession)
{ {
error = true;
gFailLog << "Bad client state! " << array[i] << " disabled." << std::endl; gFailLog << "Bad client state! " << array[i] << " disabled." << std::endl;
} }
else else
@@ -412,7 +409,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
{ //needs to be disabled, make sure it was (DEBUG TEMPORARY) { //needs to be disabled, make sure it was (DEBUG TEMPORARY)
if (gDebugSession) if (gDebugSession)
{ {
error = true;
gFailLog << "Bad client state! " << array[i] << " enabled." << std::endl; gFailLog << "Bad client state! " << array[i] << " enabled." << std::endl;
} }
else else
@@ -779,7 +775,6 @@ void LLVertexBuffer::unbind()
//static //static
void LLVertexBuffer::cleanupClass() void LLVertexBuffer::cleanupClass()
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS);
unbind(); unbind();
sStreamIBOPool.cleanup(); sStreamIBOPool.cleanup();
@@ -860,8 +855,6 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
mMappable(false), mMappable(false),
mFence(NULL) mFence(NULL)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR);
mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping); mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping);
//zero out offsets //zero out offsets
@@ -921,7 +914,6 @@ S32 LLVertexBuffer::getSize() const
//virtual //virtual
LLVertexBuffer::~LLVertexBuffer() LLVertexBuffer::~LLVertexBuffer()
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR);
destroyGLBuffer(); destroyGLBuffer();
destroyGLIndices(); destroyGLIndices();
@@ -1041,8 +1033,6 @@ void LLVertexBuffer::releaseIndices()
void LLVertexBuffer::createGLBuffer(U32 size) void LLVertexBuffer::createGLBuffer(U32 size)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES);
if (mGLBuffer) if (mGLBuffer)
{ {
destroyGLBuffer(); destroyGLBuffer();
@@ -1072,8 +1062,6 @@ void LLVertexBuffer::createGLBuffer(U32 size)
void LLVertexBuffer::createGLIndices(U32 size) void LLVertexBuffer::createGLIndices(U32 size)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES);
if (mGLIndices) if (mGLIndices)
{ {
destroyGLIndices(); destroyGLIndices();
@@ -1108,7 +1096,6 @@ void LLVertexBuffer::createGLIndices(U32 size)
void LLVertexBuffer::destroyGLBuffer() void LLVertexBuffer::destroyGLBuffer()
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_BUFFER);
if (mGLBuffer) if (mGLBuffer)
{ {
if (mMappedDataUsingVBOs) if (mMappedDataUsingVBOs)
@@ -1129,7 +1116,6 @@ void LLVertexBuffer::destroyGLBuffer()
void LLVertexBuffer::destroyGLIndices() void LLVertexBuffer::destroyGLIndices()
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_INDICES);
if (mGLIndices) if (mGLIndices)
{ {
if (mMappedIndexDataUsingVBOs) if (mMappedIndexDataUsingVBOs)
@@ -1150,8 +1136,6 @@ void LLVertexBuffer::destroyGLIndices()
void LLVertexBuffer::updateNumVerts(S32 nverts) void LLVertexBuffer::updateNumVerts(S32 nverts)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_VERTS);
llassert(nverts >= 0); llassert(nverts >= 0);
if (nverts > 65536) if (nverts > 65536)
@@ -1174,8 +1158,6 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
void LLVertexBuffer::updateNumIndices(S32 nindices) void LLVertexBuffer::updateNumIndices(S32 nindices)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_INDICES);
llassert(nindices >= 0); llassert(nindices >= 0);
U32 needed_size = sizeof(U16) * (U32)nindices; U32 needed_size = sizeof(U16) * (U32)nindices;
@@ -1192,8 +1174,6 @@ void LLVertexBuffer::updateNumIndices(S32 nindices)
void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER);
stop_glerror(); stop_glerror();
if (nverts < 0 || nindices < 0 || if (nverts < 0 || nindices < 0 ||
@@ -1344,8 +1324,6 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
llassert(newnverts >= 0); llassert(newnverts >= 0);
llassert(newnindices >= 0); llassert(newnindices >= 0);
LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER);
updateNumVerts(newnverts); updateNumVerts(newnverts);
updateNumIndices(newnindices); updateNumIndices(newnindices);
@@ -1393,7 +1371,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map");
volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range) volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
{ {
bindGLBuffer(true); bindGLBuffer(true);
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
if (mFinal) if (mFinal)
{ {
llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl; llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl;
@@ -1442,7 +1419,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
if (!mVertexLocked) if (!mVertexLocked)
{ {
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES);
mVertexLocked = true; mVertexLocked = true;
sMappedCount++; sMappedCount++;
stop_glerror(); stop_glerror();
@@ -1573,7 +1549,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map");
volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
bindGLIndices(true); bindGLIndices(true);
if (mFinal) if (mFinal)
{ {
@@ -1620,8 +1595,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
if (!mIndexLocked) if (!mIndexLocked)
{ {
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES);
mIndexLocked = true; mIndexLocked = true;
sMappedCount++; sMappedCount++;
stop_glerror(); stop_glerror();
@@ -1744,7 +1717,6 @@ static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range");
void LLVertexBuffer::unmapBuffer() void LLVertexBuffer::unmapBuffer()
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER);
if (!useVBOs()) if (!useVBOs())
{ {
return; //nothing to unmap return; //nothing to unmap
@@ -2098,7 +2070,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{ {
flush(); flush();
LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER);
//set up pointers if the data mask is different ... //set up pointers if the data mask is different ...
bool setup = (sLastMask != data_mask); bool setup = (sLastMask != data_mask);
@@ -2144,7 +2115,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
setup = setup || bindBuffer || bindIndices; setup = setup || bindBuffer || bindIndices;
} }
bool error = false;
if (gDebugGL && !mGLArray) if (gDebugGL && !mGLArray)
{ {
GLint buff; GLint buff;
@@ -2153,7 +2123,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{ {
if (gDebugSession) if (gDebugSession)
{ {
error = true;
gFailLog << "Invalid GL vertex buffer bound: " << buff << std::endl; gFailLog << "Invalid GL vertex buffer bound: " << buff << std::endl;
} }
else else
@@ -2169,7 +2138,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{ {
if (gDebugSession) if (gDebugSession)
{ {
error = true;
gFailLog << "Invalid GL index buffer bound: " << buff << std::endl; gFailLog << "Invalid GL index buffer bound: " << buff << std::endl;
} }
else else
@@ -2240,7 +2208,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
// virtual (default) // virtual (default)
void LLVertexBuffer::setupVertexBuffer(U32 data_mask) void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
{ {
LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER);
stop_glerror(); stop_glerror();
volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData; volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;

View File

@@ -30,7 +30,6 @@ set(llui_SOURCE_FILES
llclipboard.cpp llclipboard.cpp
llcombobox.cpp llcombobox.cpp
llctrlselectioninterface.cpp llctrlselectioninterface.cpp
lldelayeduidelete.cpp
lldraghandle.cpp lldraghandle.cpp
lleditmenuhandler.cpp lleditmenuhandler.cpp
llfloater.cpp llfloater.cpp
@@ -73,9 +72,9 @@ set(llui_SOURCE_FILES
lluictrlfactory.cpp lluictrlfactory.cpp
lluistring.cpp lluistring.cpp
llundo.cpp llundo.cpp
llview.cpp
llviewborder.cpp llviewborder.cpp
llviewmodel.cpp llviewmodel.cpp
llview.cpp
llviewquery.cpp llviewquery.cpp
) )
@@ -90,7 +89,6 @@ set(llui_HEADER_FILES
llclipboard.h llclipboard.h
llcombobox.h llcombobox.h
llctrlselectioninterface.h llctrlselectioninterface.h
lldelayeduidelete.h
lldraghandle.h lldraghandle.h
lleditmenuhandler.h lleditmenuhandler.h
llfloater.h llfloater.h
@@ -105,8 +103,8 @@ set(llui_HEADER_FILES
llmenugl.h llmenugl.h
llmodaldialog.h llmodaldialog.h
llmultifloater.h llmultifloater.h
llmultisliderctrl.h
llmultislider.h llmultislider.h
llmultisliderctrl.h
llnotificationptr.h llnotificationptr.h
llnotifications.h llnotifications.h
llnotificationsutil.h llnotificationsutil.h
@@ -122,8 +120,8 @@ set(llui_HEADER_FILES
llscrollcontainer.h llscrollcontainer.h
llscrollingpanellist.h llscrollingpanellist.h
llscrolllistctrl.h llscrolllistctrl.h
llsliderctrl.h
llslider.h llslider.h
llsliderctrl.h
llspinctrl.h llspinctrl.h
llstyle.h llstyle.h
lltabcontainer.h lltabcontainer.h
@@ -131,18 +129,18 @@ set(llui_HEADER_FILES
lltexteditor.h lltexteditor.h
lltextparser.h lltextparser.h
lltrans.h lltrans.h
lluiconstants.h
lluictrlfactory.h
lluictrl.h
lluifwd.h
llui.h llui.h
lluicolor.h lluicolor.h
lluiconstants.h
lluictrl.h
lluictrlfactory.h
lluifwd.h
lluistring.h lluistring.h
lluixmltags.h lluixmltags.h
llundo.h llundo.h
llview.h
llviewborder.h llviewborder.h
llviewmodel.h llviewmodel.h
llview.h
llviewquery.h llviewquery.h
) )

View File

@@ -1,67 +0,0 @@
// <edit>
#include "linden_common.h"
#include "lldelayeduidelete.h"
#define DELETE_DELAY 0.1f
#define DELETES_PER_DELAY 512
LLDeleteScheduler* gDeleteScheduler;
std::list<LLDeleteJob*> LLDeleteScheduler::sJobs;
LLDeleteScheduler::LLDeleteScheduler() : LLEventTimer(DELETE_DELAY)
{
}
void LLDeleteScheduler::addViewDeleteJob(std::list<LLView*> views)
{
if(!views.empty())
{
LLViewDeleteJob* job = new LLViewDeleteJob(views);
sJobs.push_back(job);
}
}
BOOL LLDeleteScheduler::tick() // IMPORTANT: never return TRUE
{
if(!sJobs.empty())
{
U32 completed = 0;
do
{
LLDeleteJob* job = sJobs.front();
if(job->work(completed))
{
delete job;
sJobs.pop_front();
}
} while((completed < DELETES_PER_DELAY) && !sJobs.empty());
}
return FALSE; // EVER
}
BOOL LLDeleteJob::work(U32& completed)
{
llwarns << "THIS IS SPOSED TO BE OVERRIDDEN" << llendl;
return TRUE;
}
LLViewDeleteJob::LLViewDeleteJob(std::list<LLView*> views)
: mList(views)
{
}
LLViewDeleteJob::~LLViewDeleteJob()
{
}
BOOL LLViewDeleteJob::work(U32& completed)
{
do
{
if(!mList.empty())
{
LLView* view = mList.front();
delete view;
mList.pop_front();
}
else
{
return TRUE; // job done
}
} while(++completed < DELETES_PER_DELAY);
return FALSE;
}
// </edit>

View File

@@ -1,32 +0,0 @@
// <edit>
#ifndef LL_LLDELAYEDUIDELETE_H
#define LL_LLDELAYEDUIDELETE_H
#include "lleventtimer.h"
#include "llview.h"
class LLDeleteJob
{
public:
virtual BOOL work(U32& completed);
virtual ~LLDeleteJob() {}
};
class LLViewDeleteJob : public LLDeleteJob
{
public:
LLViewDeleteJob(std::list<LLView*> views);
virtual ~LLViewDeleteJob();
virtual BOOL work(U32& completed);
private:
std::list<LLView*> mList;
};
class LLDeleteScheduler : public LLEventTimer
{
public:
LLDeleteScheduler();
void addViewDeleteJob(std::list<LLView*> views);
BOOL tick();
private:
static std::list<LLDeleteJob*> sJobs;
};
extern LLDeleteScheduler* gDeleteScheduler;
#endif
// </edit>

View File

@@ -277,30 +277,14 @@ void LLFloater::initFloater(const std::string& title,
mMinimized = FALSE; mMinimized = FALSE;
mExpandedRect.set(0,0,0,0); mExpandedRect.set(0,0,0,0);
S32 close_pad; // space to the right of close box
S32 close_box_size; // For layout purposes, how big is the close box? S32 close_box_size; // For layout purposes, how big is the close box?
if (close_btn) if (close_btn)
{ {
close_box_size = LLFLOATER_CLOSE_BOX_SIZE; close_box_size = LLFLOATER_CLOSE_BOX_SIZE;
close_pad = 0;
} }
else else
{ {
close_box_size = 0; close_box_size = 0;
close_pad = 0;
}
S32 minimize_box_size;
S32 minimize_pad;
if (minimizable && !drag_on_left)
{
minimize_box_size = LLFLOATER_CLOSE_BOX_SIZE;
minimize_pad = 0;
}
else
{
minimize_box_size = 0;
minimize_pad = 0;
} }
// Drag Handle // Drag Handle

View File

@@ -1065,7 +1065,6 @@ struct LLLayoutStack::LLEmbeddedPanel
mVisibleAmt(1.f) // default to fully visible mVisibleAmt(1.f) // default to fully visible
{ {
LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM;
LLRect resize_bar_rect = panelp->getRect();
S32 min_dim; S32 min_dim;
if (orientation == HORIZONTAL) if (orientation == HORIZONTAL)

View File

@@ -83,9 +83,6 @@ void LLProgressBar::draw()
bar_bg_imagep->draw(getLocalRect(), bar_bg_imagep->draw(getLocalRect(),
background_color); background_color);
F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32()));
LLColor4 bar_color = LLUI::sColorsGroup->getColor("LoginProgressBarFgColor");
bar_color.mV[3] = alpha;
LLRect progress_rect = getLocalRect(); LLRect progress_rect = getLocalRect();
progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f)); progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f));
bar_fg_imagep->draw(progress_rect); bar_fg_imagep->draw(progress_rect);

View File

@@ -383,6 +383,13 @@ std::string LLResMgr::getMonetaryString( S32 input ) const
void LLResMgr::getIntegerString( std::string& output, S32 input ) const void LLResMgr::getIntegerString( std::string& output, S32 input ) const
{ {
// handle special case of input value being zero
if (input == 0)
{
output = "0";
return;
}
S32 fraction = 0; S32 fraction = 0;
std::string fraction_string; std::string fraction_string;
S32 remaining_count = input; S32 remaining_count = input;

View File

@@ -261,7 +261,6 @@ void LLSlider::draw()
F32 opacity = getEnabled() ? 1.f : 0.3f; F32 opacity = getEnabled() ? 1.f : 0.3f;
LLColor4 center_color = (mThumbCenterColor % opacity); LLColor4 center_color = (mThumbCenterColor % opacity);
LLColor4 track_color = (mTrackColor % opacity);
// Track // Track
LLRect track_rect(mThumbImage->getWidth() / 2, LLRect track_rect(mThumbImage->getWidth() / 2,

View File

@@ -35,7 +35,7 @@
#include "v4color.h" #include "v4color.h"
#include "llresmgr.h" #include "llresmgr.h"
#include "llfont.h" #include "llfontfreetype.h"
#include "llui.h" #include "llui.h"
#include "lluiimage.h" #include "lluiimage.h"

View File

@@ -2228,7 +2228,7 @@ void LLTextEditor::pasteHelper(bool is_primary)
for( S32 i = 0; i < len; i++ ) for( S32 i = 0; i < len; i++ )
{ {
llwchar wc = clean_string[i]; llwchar wc = clean_string[i];
if( (wc < LLFont::FIRST_CHAR) && (wc != LF) ) if( (wc < LLFontFreetype::FIRST_CHAR) && (wc != LF) )
{ {
clean_string[i] = LL_UNKNOWN_CHAR; clean_string[i] = LL_UNKNOWN_CHAR;
} }

View File

@@ -348,8 +348,10 @@ public:
// even if their constructors have side effects // even if their constructors have side effects
void reference() void reference()
{ {
#if LL_WINDOWS
S32 dummy; S32 dummy;
dummy = 0; dummy = 0;
#endif /*LL_WINDOWS*/
} }
}; };

View File

@@ -59,10 +59,6 @@
#include "lltextbox.h" #include "lltextbox.h"
#include "llfasttimer.h" #include "llfasttimer.h"
// <edit>
#include "lldelayeduidelete.h"
// </edit>
using namespace LLOldEvents; using namespace LLOldEvents;
//HACK: this allows you to instantiate LLView from xml with "<view/>" which we don't want //HACK: this allows you to instantiate LLView from xml with "<view/>" which we don't want
@@ -1420,7 +1416,7 @@ void LLView::updateBoundingRect()
{ {
if (isDead()) return; if (isDead()) return;
LLRect cur_rect = mBoundingRect; //LLRect cur_rect = mBoundingRect;
if (getUseBoundingRect()) if (getUseBoundingRect())
{ {

View File

@@ -41,12 +41,12 @@ if (LINUX)
LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp) LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp)
LIST(APPEND llvfs_HEADER_FILES lldir_linux.h) LIST(APPEND llvfs_HEADER_FILES lldir_linux.h)
if (VIEWER AND INSTALL) if (INSTALL)
set_source_files_properties(lldir_linux.cpp set_source_files_properties(lldir_linux.cpp
PROPERTIES COMPILE_FLAGS PROPERTIES COMPILE_FLAGS
"-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\"" "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\""
) )
endif (VIEWER AND INSTALL) endif (INSTALL)
endif (LINUX) endif (LINUX)
if (WINDOWS) if (WINDOWS)

View File

@@ -18,6 +18,7 @@ include(LLMath)
include(LLRender) include(LLRender)
include(LLVFS) include(LLVFS)
include(LLWindow) include(LLWindow)
include(LLXML)
include(UI) include(UI)
include_directories( include_directories(
@@ -27,13 +28,16 @@ include_directories(
${LLRENDER_INCLUDE_DIRS} ${LLRENDER_INCLUDE_DIRS}
${LLVFS_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
${DIRECTX_INCLUDE_DIR}
) )
set(llwindow_SOURCE_FILES set(llwindow_SOURCE_FILES
llkeyboard.cpp llkeyboard.cpp
llkeyboardheadless.cpp llkeyboardheadless.cpp
llwindowheadless.cpp llwindow.cpp
llwindowcallbacks.cpp llwindowcallbacks.cpp
llwindowheadless.cpp
) )
set(llwindow_HEADER_FILES set(llwindow_HEADER_FILES
@@ -41,30 +45,47 @@ set(llwindow_HEADER_FILES
llkeyboard.h llkeyboard.h
llkeyboardheadless.h llkeyboardheadless.h
llwindowheadless.h
llwindowcallbacks.h llwindowcallbacks.h
llwindowheadless.h
) )
set(viewer_SOURCE_FILES set(viewer_SOURCE_FILES
llwindow.cpp
llmousehandler.cpp llmousehandler.cpp
) )
set(viewer_HEADER_FILES set(viewer_HEADER_FILES
llwindow.h
llpreeditor.h
llmousehandler.h llmousehandler.h
llpreeditor.h
llwindow.h
) )
# Libraries on which this library depends, needed for Linux builds # Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level # Sort by high-level to low-level
if (LINUX AND VIEWER) if (LINUX)
set(llwindow_LINK_LIBRARIES set(llwindow_LINK_LIBRARIES
${LLCOMMON_LIBRARIES}
${LLIMAGE_LIBRARIES}
${LLMATH_LIBRARIES}
${LLRENDER_LIBRARIES}
${LLVFS_LIBRARIES}
${LLWINDOW_LIBRARIES}
${LLXML_LIBRARIES}
${UI_LIBRARIES} # for GTK ${UI_LIBRARIES} # for GTK
${SDL_LIBRARY} ${SDL_LIBRARY}
fontconfig # For FCInit and other FC* functions. fontconfig # For FCInit and other FC* functions.
) )
endif (LINUX AND VIEWER)
list(APPEND viewer_SOURCE_FILES
llkeyboardsdl.cpp
llwindowsdl.cpp
)
list(APPEND viewer_HEADER_FILES
llkeyboardsdl.h
llwindowsdl.h
)
endif (LINUX)
if (DARWIN) if (DARWIN)
list(APPEND llwindow_SOURCE_FILES list(APPEND llwindow_SOURCE_FILES
@@ -87,29 +108,19 @@ if (DARWIN)
) )
endif (DARWIN) endif (DARWIN)
if (LINUX AND VIEWER)
list(APPEND viewer_SOURCE_FILES
llkeyboardsdl.cpp
llwindowsdl.cpp
)
list(APPEND viewer_HEADER_FILES
llkeyboardsdl.h
llwindowsdl.h
)
endif (LINUX AND VIEWER)
if (WINDOWS) if (WINDOWS)
list(APPEND llwindow_SOURCE_FILES list(APPEND llwindow_SOURCE_FILES
llwindowwin32.cpp lldragdropwin32.cpp
lldxhardware.cpp lldxhardware.cpp
llkeyboardwin32.cpp llkeyboardwin32.cpp
lldragdropwin32.cpp llwindowwin32.cpp
) )
list(APPEND llwindow_HEADER_FILES list(APPEND llwindow_HEADER_FILES
llwindowwin32.h lldragdropwin32.h
lldxhardware.h lldxhardware.h
llkeyboardwin32.h llkeyboardwin32.h
lldragdropwin32.h llwindowwin32.h
) )
list(APPEND llwindow_LINK_LIBRARIES list(APPEND llwindow_LINK_LIBRARIES
comdlg32 # Common Dialogs for ChooseColor comdlg32 # Common Dialogs for ChooseColor
@@ -129,41 +140,16 @@ endif (SOLARIS)
set_source_files_properties(${llwindow_HEADER_FILES} set_source_files_properties(${llwindow_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE) PROPERTIES HEADER_FILE_ONLY TRUE)
if (SERVER AND NOT WINDOWS AND NOT DARWIN)
set(server_SOURCE_FILES
llwindowmesaheadless.cpp
)
set(server_HEADER_FILES
llwindowmesaheadless.h
)
copy_server_sources(
llwindow
)
set_source_files_properties(
${server_SOURCE_FILES}
PROPERTIES
COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1"
)
add_library (llwindowheadless
${llwindow_SOURCE_FILES}
${server_SOURCE_FILES}
)
target_link_libraries (llwindowheadless ${llwindow_LINK_LIBRARIES})
endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
if (llwindow_HEADER_FILES) if (llwindow_HEADER_FILES)
list(APPEND llwindow_SOURCE_FILES ${llwindow_HEADER_FILES}) list(APPEND llwindow_SOURCE_FILES ${llwindow_HEADER_FILES})
endif (llwindow_HEADER_FILES) endif (llwindow_HEADER_FILES)
list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
if (VIEWER) add_library (llwindow
add_library (llwindow
${llwindow_SOURCE_FILES} ${llwindow_SOURCE_FILES}
${viewer_SOURCE_FILES} ${viewer_SOURCE_FILES}
) )
add_dependencies(llwindow prepare) add_dependencies(llwindow prepare)
target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
endif (VIEWER)

View File

@@ -1,5 +1,7 @@
/* /*
* glh_extensions.h * glh_extensions.h
* $LicenseInfo:firstyear=2006&license=mit$ (mit used here to satisfy validity checker)
* Copyright (C) 2006, NVIDIA
* From nVidia Corporation, downloaded 2006-12-18 from: * From nVidia Corporation, downloaded 2006-12-18 from:
* http://developer.nvidia.com/attach/8196 * http://developer.nvidia.com/attach/8196
* ("NVParse Library with Source (.zip) (2390 KB)") * ("NVParse Library with Source (.zip) (2390 KB)")
@@ -8,6 +10,8 @@
* "The files bison.exe, bison.simple, and flex.exe are covered by * "The files bison.exe, bison.simple, and flex.exe are covered by
* the GPL. All other files in this distribution can be used however * the GPL. All other files in this distribution can be used however
* you want." * you want."
* $/LicenseInfo$
*/ */
#ifndef GLH_EXTENSIONS #ifndef GLH_EXTENSIONS
@@ -109,7 +113,7 @@ static const char* EatNonWhiteSpace(const char *str)
int glh_init_extensions(const char *origReqExts) int glh_init_extensions(const char *origReqExts)
{ {
// Length of requested extensions string // Length of requested extensions string
unsigned reqExtsLen; //unsigned reqExtsLen;
char *reqExts; char *reqExts;
// Ptr for individual extensions within reqExts // Ptr for individual extensions within reqExts
char *reqExt; char *reqExt;
@@ -151,8 +155,8 @@ int glh_init_extensions(const char *origReqExts)
return TRUE; return TRUE;
} }
reqExts = strdup(origReqExts); reqExts = strdup(origReqExts);
reqExtsLen = (S32)strlen(reqExts);
/* /*
reqExtsLen = (S32)strlen(reqExts);
if (NULL == gGLHExts.mUnsupportedExts) if (NULL == gGLHExts.mUnsupportedExts)
{ {
gGLHExts.mUnsupportedExts = (char*)malloc(reqExtsLen + 1); gGLHExts.mUnsupportedExts = (char*)malloc(reqExtsLen + 1);

View File

@@ -1619,24 +1619,24 @@ void check_vm_bloat()
const long long significant_vm_difference = 250 * 1024*1024; const long long significant_vm_difference = 250 * 1024*1024;
const long long significant_rss_difference = 50 * 1024*1024; const long long significant_rss_difference = 50 * 1024*1024;
ssize_t res;
size_t dummy; size_t dummy;
char *ptr; char *ptr;
for (int i=0; i<22; ++i) // parse past the values we don't want size_t delim_result = 0;
for (int i=0; i<22 && delim_result > -1; ++i) // parse past the values we don't want
{ {
ptr = NULL; ptr = NULL;
res = getdelim(&ptr, &dummy, ' ', fp); delim_result = getdelim(&ptr, &dummy, ' ', fp);
free(ptr); free(ptr);
} }
// 23rd space-delimited entry is vsize // 23rd space-delimited entry is vsize
ptr = NULL; ptr = NULL;
res = getdelim(&ptr, &dummy, ' ', fp); delim_result = getdelim(&ptr, &dummy, ' ', fp);
llassert(ptr); llassert(ptr);
long long this_vm_size = atoll(ptr); long long this_vm_size = atoll(ptr);
free(ptr); free(ptr);
// 24th space-delimited entry is RSS // 24th space-delimited entry is RSS
ptr = NULL; ptr = NULL;
res = getdelim(&ptr, &dummy, ' ', fp); delim_result = getdelim(&ptr, &dummy, ' ', fp);
llassert(ptr); llassert(ptr);
long long this_rss_size = getpagesize() * atoll(ptr); long long this_rss_size = getpagesize() * atoll(ptr);
free(ptr); free(ptr);

View File

@@ -42,10 +42,8 @@ include(GooglePerfTools)
include(StateMachine) include(StateMachine)
include(TemplateCheck) include(TemplateCheck)
include(UI) include(UI)
include(LLKDU)
include(ViewerMiscLibs) include(ViewerMiscLibs)
include(GLOD) include(GLOD)
include(ViewerArtwork.cmake)
include(LLAppearance) include(LLAppearance)
if (WINDOWS) if (WINDOWS)
@@ -58,7 +56,7 @@ include_directories(
${DBUSGLIB_INCLUDE_DIRS} ${DBUSGLIB_INCLUDE_DIRS}
${HUNSPELL_INCLUDE_DIR} ${HUNSPELL_INCLUDE_DIR}
${ELFIO_INCLUDE_DIR} ${ELFIO_INCLUDE_DIR}
${JSONCPP_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR}
${GLOD_INCLUDE_DIRS} ${GLOD_INCLUDE_DIRS}
${LLAUDIO_INCLUDE_DIRS} ${LLAUDIO_INCLUDE_DIRS}
${LLCHARACTER_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS}
@@ -81,6 +79,7 @@ include_directories(
) )
set(viewer_SOURCE_FILES set(viewer_SOURCE_FILES
NACLantispam.cpp
aoremotectrl.cpp aoremotectrl.cpp
ascentfloatercontactgroups.cpp ascentfloatercontactgroups.cpp
ascentkeyword.cpp ascentkeyword.cpp
@@ -88,12 +87,10 @@ set(viewer_SOURCE_FILES
ascentprefssys.cpp ascentprefssys.cpp
ascentprefsvan.cpp ascentprefsvan.cpp
chatbar_as_cmdline.cpp chatbar_as_cmdline.cpp
emeraldboobutils.cpp
floaterao.cpp floaterao.cpp
floaterlocalassetbrowse.cpp floaterlocalassetbrowse.cpp
floatervoicelicense.cpp floatervoicelicense.cpp
hbfloatergrouptitles.cpp hbfloatergrouptitles.cpp
hgfloatertexteditor.cpp
hippofloaterxml.cpp hippofloaterxml.cpp
hippogridmanager.cpp hippogridmanager.cpp
hippolimits.cpp hippolimits.cpp
@@ -122,7 +119,6 @@ set(viewer_SOURCE_FILES
llaudiosourcevo.cpp llaudiosourcevo.cpp
llavatarpropertiesprocessor.cpp llavatarpropertiesprocessor.cpp
llbox.cpp llbox.cpp
llbuildnewviewsscheduler.cpp
llcallbacklist.cpp llcallbacklist.cpp
llcallingcard.cpp llcallingcard.cpp
llcapabilitylistener.cpp llcapabilitylistener.cpp
@@ -161,6 +157,7 @@ set(viewer_SOURCE_FILES
lldynamictexture.cpp lldynamictexture.cpp
llemote.cpp llemote.cpp
llenvmanager.cpp llenvmanager.cpp
llestateinfomodel.cpp
lleventinfo.cpp lleventinfo.cpp
lleventnotifier.cpp lleventnotifier.cpp
lleventpoll.cpp lleventpoll.cpp
@@ -234,6 +231,9 @@ set(viewer_SOURCE_FILES
llfloateropenobject.cpp llfloateropenobject.cpp
llfloateroutbox.cpp llfloateroutbox.cpp
llfloaterparcel.cpp llfloaterparcel.cpp
llfloaterpathfindingcharacters.cpp
llfloaterpathfindinglinksets.cpp
llfloaterpathfindingobjects.cpp
llfloaterpermissionsmgr.cpp llfloaterpermissionsmgr.cpp
llfloaterperms.cpp llfloaterperms.cpp
llfloaterpostcard.cpp llfloaterpostcard.cpp
@@ -258,8 +258,6 @@ set(viewer_SOURCE_FILES
llfloatertos.cpp llfloatertos.cpp
llfloaterurldisplay.cpp llfloaterurldisplay.cpp
llfloaterurlentry.cpp llfloaterurlentry.cpp
llfloatervfs.cpp
llfloatervfsexplorer.cpp
llfloatervoicedevicesettings.cpp llfloatervoicedevicesettings.cpp
llfloaterwater.cpp llfloaterwater.cpp
llfloaterwindlight.cpp llfloaterwindlight.cpp
@@ -292,7 +290,6 @@ set(viewer_SOURCE_FILES
llimpanel.cpp llimpanel.cpp
llimview.cpp llimview.cpp
llinventoryactions.cpp llinventoryactions.cpp
llinventorybackup.cpp
llinventorybridge.cpp llinventorybridge.cpp
llinventoryclipboard.cpp llinventoryclipboard.cpp
llinventoryfilter.cpp llinventoryfilter.cpp
@@ -318,7 +315,6 @@ set(viewer_SOURCE_FILES
llmarketplacenotifications.cpp llmarketplacenotifications.cpp
llmediactrl.cpp llmediactrl.cpp
llmediaremotectrl.cpp llmediaremotectrl.cpp
llmemoryview.cpp
llmenucommands.cpp llmenucommands.cpp
llmenuoptionpathfindingrebakenavmesh.cpp llmenuoptionpathfindingrebakenavmesh.cpp
llmeshrepository.cpp llmeshrepository.cpp
@@ -347,8 +343,8 @@ set(viewer_SOURCE_FILES
llpaneldirland.cpp llpaneldirland.cpp
llpaneldirpeople.cpp llpaneldirpeople.cpp
llpaneldirplaces.cpp llpaneldirplaces.cpp
llpaneldisplay.cpp
llpaneldirpopular.cpp llpaneldirpopular.cpp
llpaneldisplay.cpp
llpaneleditwearable.cpp llpaneleditwearable.cpp
llpanelevent.cpp llpanelevent.cpp
llpanelface.cpp llpanelface.cpp
@@ -551,11 +547,10 @@ set(viewer_SOURCE_FILES
llworld.cpp llworld.cpp
llworldmap.cpp llworldmap.cpp
llworldmapmessage.cpp llworldmapmessage.cpp
llworldmipmap.cpp
llworldmapview.cpp llworldmapview.cpp
llworldmipmap.cpp
llxmlrpcresponder.cpp llxmlrpcresponder.cpp
m7wlinterface.cpp m7wlinterface.cpp
NACLantispam.cpp
noise.cpp noise.cpp
pipeline.cpp pipeline.cpp
qtoolalign.cpp qtoolalign.cpp
@@ -583,6 +578,8 @@ set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
set(viewer_HEADER_FILES set(viewer_HEADER_FILES
CMakeLists.txt CMakeLists.txt
ViewerInstall.cmake ViewerInstall.cmake
NACLantispam.h
aoremotectrl.h aoremotectrl.h
ascentfloatercontactgroups.h ascentfloatercontactgroups.h
ascentkeyword.h ascentkeyword.h
@@ -590,12 +587,10 @@ set(viewer_HEADER_FILES
ascentprefssys.h ascentprefssys.h
ascentprefsvan.h ascentprefsvan.h
chatbar_as_cmdline.h chatbar_as_cmdline.h
emeraldboobutils.h
floaterao.h floaterao.h
floaterlocalassetbrowse.h floaterlocalassetbrowse.h
floatervoicelicense.h floatervoicelicense.h
hbfloatergrouptitles.h hbfloatergrouptitles.h
hgfloatertexteditor.h
hippofloaterxml.h hippofloaterxml.h
hippogridmanager.h hippogridmanager.h
hippolimits.h hippolimits.h
@@ -625,7 +620,6 @@ set(viewer_HEADER_FILES
llaudiosourcevo.h llaudiosourcevo.h
llavatarpropertiesprocessor.h llavatarpropertiesprocessor.h
llbox.h llbox.h
llbuildnewviewsscheduler.h
llcallbacklist.h llcallbacklist.h
llcallingcard.h llcallingcard.h
llcapabilitylistener.h llcapabilitylistener.h
@@ -664,6 +658,7 @@ set(viewer_HEADER_FILES
lldynamictexture.h lldynamictexture.h
llemote.h llemote.h
llenvmanager.h llenvmanager.h
llestateinfomodel.h
lleventinfo.h lleventinfo.h
lleventnotifier.h lleventnotifier.h
lleventpoll.h lleventpoll.h
@@ -701,9 +696,9 @@ set(viewer_HEADER_FILES
llfloaterdisplayname.h llfloaterdisplayname.h
llfloatereditui.h llfloatereditui.h
llfloaterenvsettings.h llfloaterenvsettings.h
llfloaterevent.h
llfloaterexploreanimations.h llfloaterexploreanimations.h
llfloaterexploresounds.h llfloaterexploresounds.h
llfloaterevent.h
llfloaterfeed.h llfloaterfeed.h
llfloaterfonttest.h llfloaterfonttest.h
llfloaterfriends.h llfloaterfriends.h
@@ -737,6 +732,9 @@ set(viewer_HEADER_FILES
llfloateropenobject.h llfloateropenobject.h
llfloateroutbox.h llfloateroutbox.h
llfloaterparcel.h llfloaterparcel.h
llfloaterpathfindingcharacters.h
llfloaterpathfindinglinksets.h
llfloaterpathfindingobjects.h
llfloaterpermissionsmgr.h llfloaterpermissionsmgr.h
llfloaterperms.h llfloaterperms.h
llfloaterpostcard.h llfloaterpostcard.h
@@ -761,8 +759,6 @@ set(viewer_HEADER_FILES
llfloatertos.h llfloatertos.h
llfloaterurldisplay.h llfloaterurldisplay.h
llfloaterurlentry.h llfloaterurlentry.h
llfloatervfs.h
llfloatervfsexplorer.h
llfloatervoicedevicesettings.h llfloatervoicedevicesettings.h
llfloaterwater.h llfloaterwater.h
llfloaterwindlight.h llfloaterwindlight.h
@@ -794,7 +790,6 @@ set(viewer_HEADER_FILES
llhudview.h llhudview.h
llimpanel.h llimpanel.h
llimview.h llimview.h
llinventorybackup.h
llinventorybridge.h llinventorybridge.h
llinventoryclipboard.h llinventoryclipboard.h
llinventoryfilter.h llinventoryfilter.h
@@ -821,9 +816,8 @@ set(viewer_HEADER_FILES
llmarketplacenotifications.h llmarketplacenotifications.h
llmediactrl.h llmediactrl.h
llmediaremotectrl.h llmediaremotectrl.h
llmemoryview.h
llmenuoptionpathfindingrebakenavmesh.h
llmenucommands.h llmenucommands.h
llmenuoptionpathfindingrebakenavmesh.h
llmeshrepository.h llmeshrepository.h
llmimetypes.h llmimetypes.h
llmorphview.h llmorphview.h
@@ -1061,12 +1055,11 @@ set(viewer_HEADER_FILES
llworld.h llworld.h
llworldmap.h llworldmap.h
llworldmapmessage.h llworldmapmessage.h
llworldmipmap.h
llworldmapview.h llworldmapview.h
llworldmipmap.h
llxmlrpcresponder.h llxmlrpcresponder.h
m7wlinterface.h m7wlinterface.h
macmain.h macmain.h
NACLantispam.h
noise.h noise.h
pipeline.h pipeline.h
qtoolalign.h qtoolalign.h
@@ -1086,9 +1079,9 @@ set(viewer_HEADER_FILES
shcommandhandler.h shcommandhandler.h
shfloatermediaticker.h shfloatermediaticker.h
slfloatermediafilter.h slfloatermediafilter.h
wlfPanel_AdvSettings.h
VertexCache.h VertexCache.h
VorbisFramework.h VorbisFramework.h
wlfPanel_AdvSettings.h
) )
source_group("CMake Rules" FILES ViewerInstall.cmake) source_group("CMake Rules" FILES ViewerInstall.cmake)
@@ -1174,66 +1167,53 @@ if (WINDOWS)
# viewerRes.rc is the only buildable file, but # viewerRes.rc is the only buildable file, but
# the rest are all dependencies of it. # the rest are all dependencies of it.
set(viewer_RESOURCE_FILES set(viewer_RESOURCE_FILES
${ARTWORK_DIR}/res/arrow.cur res/arrow.cur
${ARTWORK_DIR}/res/arrowcop.cur res/arrowcop.cur
${ARTWORK_DIR}/res/arrowcopmulti.cur res/arrowcopmulti.cur
${ARTWORK_DIR}/res/arrowdrag.cur res/arrowdrag.cur
${ARTWORK_DIR}/res/circleandline.cur res/circleandline.cur
${ARTWORK_DIR}/res/icon1.ico res/icon1.ico
${ARTWORK_DIR}/res/llarrow.cur res/llarrow.cur
${ARTWORK_DIR}/res/llarrowdrag.cur res/llarrowdrag.cur
${ARTWORK_DIR}/res/llarrowdragmulti.cur res/llarrowdragmulti.cur
${ARTWORK_DIR}/res/llarrowlocked.cur res/llarrowlocked.cur
${ARTWORK_DIR}/res/llgrablocked.cur res/llgrablocked.cur
${ARTWORK_DIR}/res/llno.cur res/llno.cur
${ARTWORK_DIR}/res/llnolocked.cur res/llnolocked.cur
${ARTWORK_DIR}/res/lltoolcamera.cur res/lltoolcamera.cur
${ARTWORK_DIR}/res/lltoolcreate.cur res/lltoolcreate.cur
${ARTWORK_DIR}/res/lltoolfocus.cur res/lltoolfocus.cur
${ARTWORK_DIR}/res/lltoolgrab.cur res/lltoolgrab.cur
${ARTWORK_DIR}/res/lltoolland.cur res/lltoolland.cur
${ARTWORK_DIR}/res/lltoolpan.cur res/lltoolpan.cur
${ARTWORK_DIR}/res/lltoolpipette.cur res/lltoolpipette.cur
${ARTWORK_DIR}/res/lltoolrotate.cur res/lltoolrotate.cur
${ARTWORK_DIR}/res/lltoolscale.cur res/lltoolscale.cur
${ARTWORK_DIR}/res/lltooltranslate.cur res/lltooltranslate.cur
${ARTWORK_DIR}/res/lltoolzoomin.cur res/lltoolzoomin.cur
${ARTWORK_DIR}/res/lltoolzoomout.cur res/lltoolzoomout.cur
${ARTWORK_DIR}/res/snowglobe_icon.BMP res/snowglobe_icon.BMP
${ARTWORK_DIR}/res/snowglobe_icon.ico res/snowglobe_icon.ico
${ARTWORK_DIR}/res/resource.h res/resource.h
${ARTWORK_DIR}/res/toolpickobject.cur res/toolpickobject.cur
${ARTWORK_DIR}/res/toolpickobject2.cur res/toolpickobject2.cur
${ARTWORK_DIR}/res/toolpickobject3.cur res/toolpickobject3.cur
${ARTWORK_DIR}/res/toolpipette.cur res/toolpipette.cur
${ARTWORK_DIR}/res/toolbuy.cur res/toolbuy.cur
${ARTWORK_DIR}/res/toolopen.cur res/toolopen.cur
${ARTWORK_DIR}/res/toolpay.cur res/toolpay.cur
${ARTWORK_DIR}/res/toolsit.cur res/toolsit.cur
) )
set_source_files_properties(${viewer_RESOURCE_FILES} set_source_files_properties(${viewer_RESOURCE_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE) PROPERTIES HEADER_FILE_ONLY TRUE)
if(NOT ARTWORK_IN_SOURCE) set(viewer_RESOURCE_FILES
# The resource compiler needs to find resources here. res/resource.h
include_directories(${ARTWORK_DIR}/res) res/viewerRes.rc
endif(NOT ARTWORK_IN_SOURCE) ${viewer_RESOURCE_FILES}
)
if (MSVC71 OR MSVC80 AND NOT VISTA_ICON)
set(viewer_RESOURCE_FILES
res/resource.h
res/viewerRes_bc.rc
${viewer_RESOURCE_FILES}
)
else (MSVC71 OR MSVC80 AND NOT VISTA_ICON)
set(viewer_RESOURCE_FILES
res/resource.h
res/viewerRes.rc
${viewer_RESOURCE_FILES}
)
endif (MSVC71 OR MSVC80 AND NOT VISTA_ICON)
SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES}) SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES})
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
@@ -1339,22 +1319,20 @@ set_source_files_properties(${viewer_APPSETTINGS_FILES}
list(APPEND viewer_SOURCE_FILES ${viewer_APPSETTINGS_FILES}) list(APPEND viewer_SOURCE_FILES ${viewer_APPSETTINGS_FILES})
if(ARTWORK_EXISTS) set(viewer_CHARACTER_FILES
set(viewer_CHARACTER_FILES character/attentions.xml
${ARTWORK_DIR}/character/attentions.xml character/attentionsN.xml
${ARTWORK_DIR}/character/attentionsN.xml character/avatar_lad.xml
${ARTWORK_DIR}/character/avatar_lad.xml character/avatar_skeleton.xml
${ARTWORK_DIR}/character/avatar_skeleton.xml character/genepool.xml
${ARTWORK_DIR}/character/genepool.xml
) )
source_group("Character File" FILES ${viewer_CHARACTER_FILES}) source_group("Character File" FILES ${viewer_CHARACTER_FILES})
set_source_files_properties(${viewer_CHARACTER_FILES} set_source_files_properties(${viewer_CHARACTER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE) PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
endif(ARTWORK_EXISTS)
if (WINDOWS) if (WINDOWS)
file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi)
@@ -1420,10 +1398,6 @@ if (!DISABLE_TEMPLATE_CHECK)
check_message_template(${VIEWER_BINARY_NAME}) check_message_template(${VIEWER_BINARY_NAME})
endif (!DISABLE_TEMPLATE_CHECK) endif (!DISABLE_TEMPLATE_CHECK)
if (LLKDU_LIBRARY)
add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
endif (LLKDU_LIBRARY)
# We package by default on Linux so we can run from newview/packaged. # We package by default on Linux so we can run from newview/packaged.
if (LINUX) if (LINUX)
set(PACKAGE_DEFAULT ON) set(PACKAGE_DEFAULT ON)

View File

@@ -23,6 +23,14 @@
#include <time.h> #include <time.h>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
bool can_block(const LLUUID& id)
{
if (id.isNull() || gAgent.getID() == id) return false; //Can't block system or self.
if (const LLViewerObject* obj = gObjectList.findObject(id)) //From an object,
return !obj->permYouOwner(); //not own object.
return true;
}
U32 NACLAntiSpamRegistry::globalAmount; U32 NACLAntiSpamRegistry::globalAmount;
U32 NACLAntiSpamRegistry::globalTime; U32 NACLAntiSpamRegistry::globalTime;
bool NACLAntiSpamRegistry::bGlobalQueue; bool NACLAntiSpamRegistry::bGlobalQueue;
@@ -308,10 +316,8 @@ void NACLAntiSpamRegistry::blockGlobalEntry(LLUUID& source)
bool NACLAntiSpamRegistry::checkQueue(U32 name, LLUUID& source, U32 multiplier) bool NACLAntiSpamRegistry::checkQueue(U32 name, LLUUID& source, U32 multiplier)
//returns true if blocked //returns true if blocked
{ {
if(source.isNull() || gAgent.getID() == source) return false; if (!can_block(source)) return false;
LLViewerObject *obj=gObjectList.findObject(source);
if(obj && obj->permYouOwner()) return false;
int result; int result;
if(bGlobalQueue) if(bGlobalQueue)
{ {

View File

@@ -1,62 +0,0 @@
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
# Hide the ARTWORK_REQUIRED cache option by default.
set(doc "Require artwork?")
if(DEFINED ARTWORK_REQUIRED)
set(ARTWORK_REQUIRED "${ARTWORK_REQUIRED}" CACHE INTERNAL "${doc}")
endif(DEFINED ARTWORK_REQUIRED)
# Check if artwork is available.
if(EXISTS "${ARTWORK_DIR}/res/arrow.cur")
set(ARTWORK_EXISTS 1)
else(EXISTS "${ARTWORK_DIR}/res/arrow.cur")
set(ARTWORK_EXISTS 0)
if(PACKAGE)
set(ARTWORK_REQUIRED 1)
set(_ARTWORK_MESSAGE "Artwork is required to build a PACKAGE.")
elseif(WINDOWS)
set(ARTWORK_REQUIRED 1)
set(_ARTWORK_MESSAGE "Artwork is required to build on Windows.")
else()
option(ARTWORK_REQUIRED "${doc}" ON)
set(_ARTWORK_MESSAGE "Alternatively, disable ARTWORK_REQUIRED.")
# Show the option.
set(ARTWORK_REQUIRED "${ARTWORK_REQUIRED}" CACHE BOOL "${doc}" FORCE)
endif()
endif(EXISTS "${ARTWORK_DIR}/res/arrow.cur")
# Verify artwork setting.
if(NOT ARTWORK_EXISTS AND ARTWORK_REQUIRED)
# Try to report the artwork asset URL.
set(asset_urls_file "${CMAKE_SOURCE_DIR}/../doc/asset_urls.txt")
if(EXISTS "${asset_urls_file}")
file(STRINGS "${asset_urls_file}" art_line REGEX "SLASSET_ART=")
string(REPLACE "SLASSET_ART=" "" SLASSET_ART "${art_line}")
endif(EXISTS "${asset_urls_file}")
if(NOT SLASSET_ART)
set(SLASSET_ART "http://wiki.secondlife.com/wiki/Source_downloads")
endif(NOT SLASSET_ART)
# Report missing artwork.
message(FATAL_ERROR
"The artwork directory\n"
" ARTWORK_DIR = ${ARTWORK_DIR}\n"
"does not appear to contain the viewer artwork. "
"Download artwork files from\n"
" ${SLASSET_ART}\n"
"and extract the zip file. "
"Then set the ARTWORK_DIR cache entry to point at "
"linden/indra/newview within the extracted directory. "
"See the wiki for further help:\n"
" http://wiki.secondlife.com/wiki/Get_source_and_compile\n"
"${_ARTWORK_MESSAGE}"
)
endif(NOT ARTWORK_EXISTS AND ARTWORK_REQUIRED)
# Check if the artwork is in the source tree.
if(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem")
set(ARTWORK_IN_SOURCE 1)
else(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem")
set(ARTWORK_IN_SOURCE 0)
endif(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem")

View File

@@ -84,8 +84,11 @@ BOOL AORemoteCtrl::postBuild()
{ {
childSetAction("ao_btn", onClickToggleAO, this); childSetAction("ao_btn", onClickToggleAO, this);
childSetAction("ao_sit_btn", onClickToggleAOSit, this); if (gSavedSettings.getBOOL("ShowAOSitPopup"))
childSetAction("ao_show_btn", onClickShowAO, this); {
childSetAction("ao_sit_btn", onClickToggleAOSit, this);
//childSetAction("ao_show_btn", onClickShowAO, this);
}
childSetAction("popup_btn", onClickPopupBtn, this); childSetAction("popup_btn", onClickPopupBtn, this);
return TRUE; return TRUE;

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

View File

@@ -119,7 +119,7 @@ AGENT_ALWAYS_RUN Returned by llGetAgentInfo if the Agent has 'Always Run' enable
AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control
AGENT_LIST_PARCEL Passed to llGetAgentList to return only agents on the same parcel where the script is running AGENT_LIST_PARCEL Passed to llGetAgentList to return only agents on the same parcel where the script is running
AGENT_LIST_PARCEL_OWNER Passed to llGetAgentList to return only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object AGENT_LIST_PARCEL_OWNER Passed to llGetAgentList to return only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object
AGENT_LIST_REGION Passed to llGetAgentList to return any/all agents in the region AGENT_LIST_REGION Passed to llGetAgentList to return any/all agents in the region
PSYS_PART_FLAGS PSYS_PART_FLAGS
@@ -177,9 +177,18 @@ OBJECT_TOTAL_SCRIPT_COUNT Gets the number of scripts, both running and stopped,
OBJECT_SCRIPT_MEMORY Gets the total amount of script memory allocated to the object or agent, in bytes. OBJECT_SCRIPT_MEMORY Gets the total amount of script memory allocated to the object or agent, in bytes.
OBJECT_SCRIPT_TIME Gets the total amount of average script CPU time used by the object or agent, in seconds. OBJECT_SCRIPT_TIME Gets the total amount of average script CPU time used by the object or agent, in seconds.
OBJECT_PRIM_EQUIVALENCE Gets the prim equivalence of the object. OBJECT_PRIM_EQUIVALENCE Gets the prim equivalence of the object.
OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost. OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost.
OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost. OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost.
OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost. OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost.
OBJECT_PATHFINDING_TYPE Used with llGetObjectDetails to get an object's pathfinding settings.
OPT_UNKNOWN Returned object pathfinding type by llGetObjectDetails for attachments, Linden trees and grass.
OPT_LEGACY_LINKSET Returned object pathfinding type by llGetObjectDetails for movable obstacles, movable phantoms, physical, and volumedetect objects.
OPT_AVATAR Returned object pathfinding type by llGetObjectDetails for avatars.
OPT_PATHFINDING_CHARACTER Returned object pathfinding type by llGetObjectDetails for pathfinding characters.
OPT_WALKABLE Returned object pathfinding type by llGetObjectDetails for walkable objects.
OPT_STATIC_OBSTACLE Returned object pathfinding type by llGetObjectDetails for static obstacles.
OPT_MATERIAL_VOLUME Returned object pathfinding type by llGetObjectDetails for material volumes.
OPT_EXCLUSION_VOLUME Returned object pathfinding type by llGetObjectDetails for exclusion volumes.
# some vehicle params # some vehicle params
VEHICLE_TYPE_NONE Used with llSetVehicleType to turn off vehicle support VEHICLE_TYPE_NONE Used with llSetVehicleType to turn off vehicle support
@@ -298,9 +307,8 @@ ATTACH_HUD_CENTER_2 Passed to llAttachToAvatar to attach task to center 2 hud ar
ATTACH_HUD_TOP_CENTER Passed to llAttachToAvatar to attach task to top center hud area ATTACH_HUD_TOP_CENTER Passed to llAttachToAvatar to attach task to top center hud area
ATTACH_HUD_TOP_LEFT Passed to llAttachToAvatar to attach task to top left hud area ATTACH_HUD_TOP_LEFT Passed to llAttachToAvatar to attach task to top left hud area
ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area
##The following attachment points exist only as numbers thus far, but will be ready when the time comes. ATTACH_NECK Passed to llAttachToAvatar to attach task to neck
#ATTACH_NECK Passed to llAttachToAvatar to attach task to neck ATTACH_AVATAR_CENTER Passed to llAttachToAvatar to attach task to avatar center
#ATTACH_ROOT Passed to llAttachToAvatar to attach task to avatar center/root
LAND_LEVEL Passed to llModifyLand to level terrain LAND_LEVEL Passed to llModifyLand to level terrain
LAND_RAISE Passed to llModifyLand to raise terrain LAND_RAISE Passed to llModifyLand to raise terrain
@@ -367,8 +375,8 @@ REMOTE_DATA_REQUEST Value of event_type in remote_event if XML-RPC request is re
REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received
PRIM_NAME For primitive name (from server v1.40 onwards). Followed by a string. PRIM_NAME Sets the prim's name
PRIM_DESC For primitive description (from server v1.40 onwards). Followed by a string. PRIM_DESC Sets the prim's description
PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments
PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER
PRIM_PHYSICS Sets physics to TRUE or FALSE PRIM_PHYSICS Sets physics to TRUE or FALSE
@@ -390,12 +398,9 @@ PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying
PRIM_POS_LOCAL Sets the prim's local position PRIM_POS_LOCAL Sets the prim's local position
PRIM_ROT_LOCAL Sets the prim's local rotation PRIM_ROT_LOCAL Sets the prim's local rotation
PRIM_OMEGA Makes the object spin at the specified axis and rate PRIM_OMEGA Makes the object spin at the specified axis and rate
PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call.
PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form <start_slice, end_slice, 0> PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form <start_slice, end_slice, 0>
PROFILE_NONE Disables profiling
PROFILE_SCRIPT_MEMORY Enables memory profiling
PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
@@ -608,6 +613,9 @@ STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist STATUS_WHITELIST_FAILED URL failed to pass whitelist
PROFILE_NONE Disables profiling
PROFILE_SCRIPT_MEMORY Enables memory profiling
RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM. RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM.
RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise. RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise.
RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results. RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results.
@@ -636,11 +644,12 @@ FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its materi
RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution. RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution.
GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier. GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier.
SIM_STAT_PCT_CHARS_STEPPED Option for llGetSimStats() to return the % of pathfinding characters skipped each frame, averaged over the last minute.
KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list. KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list.
KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion. KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion.
KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion. KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion.
KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion. KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion.
KFM_CMD_SET_MODE TODO: add documentation
KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE. KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE.
KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode. KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode.
KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode. KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode.
@@ -650,23 +659,26 @@ KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination
KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION. KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION.
KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION. KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION.
CHARACTER_CMD_STOP TODO: add documentation CHARACTER_CMD_STOP Used with llExecCharacterCmd(). Makes the character jump.
CHARACTER_CMD_JUMP TODO: add documentation CHARACTER_CMD_SMOOTH_STOP Used with llExecCharacterCmd(). Stops any current pathfinding operation in a smooth like fashion.
CHARACTER_CMD_JUMP Used with llExecCharacterCmd(). Stops any current pathfinding operation.
CHARACTER_DESIRED_SPEED TODO: add documentation CHARACTER_DESIRED_SPEED Speed of pursuit in meters per second.
CHARACTER_RADIUS TODO: add documentation CHARACTER_RADIUS Set collision capsule radius.
CHARACTER_LENGTH TODO: add documentation CHARACTER_LENGTH Set collision capsule length.
CHARACTER_ORIENTATION TODO: add documentation CHARACTER_ORIENTATION Set the character orientation.
CHARACTER_AVOIDANCE_MODE TODO: add documentation CHARACTER_AVOIDANCE_MODE Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both.
PURSUIT_OFFSET TODO: add documentation CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES Defines if a character will attempt to catch up lost time if pathfinding performance is low.
REQUIRE_LINE_OF_SIGHT TODO: add documentation PURSUIT_OFFSET Used with llPursue(). Go to a position offset from the target.
PURSUIT_FUZZ_FACTOR TODO: add documentation REQUIRE_LINE_OF_SIGHT Used with llPursue(). Define whether the character needs a physical line-of-sight to give chase. When enabled, the character will not pick a new target position while there is a something solid between the character and the target object/agent.
PURSUIT_INTERCEPT TODO: add documentation PURSUIT_FUZZ_FACTOR Used with llPursue(). Selects a random destination near the PURSUIT_OFFSET. The valid fuzz factor range is from 0 to 1, where 1 is most random. This option requires a nonzero PURSUIT_OFFSET.
FORCE_DIRECT_PATH TODO: add documentation PURSUIT_INTERCEPT Used with llPursue(). Define whether the character attempts to predict the target's future location.
VERTICAL TODO: add documentation PURSUIT_GOAL_TOLERANCE Used with llPursue(). Defines approximately how close the character must be to the current goal to consider itself to be at the desired position. The valid range is from 0.25 to 10m.
HORIZONTAL TODO: add documentation VERTICAL Constant to indicate that the orientation of the capsule for a Pathfinding character is vertical.
HORIZONTAL Constant to indicate that the orientation of the capsule for a Pathfinding character is horizontal.
AVOID_CHARACTERS TODO: add documentation AVOID_CHARACTERS TODO: add documentation
AVOID_DYNAMIC_OBSTACLES TODO: add documentation AVOID_DYNAMIC_OBSTACLES TODO: add documentation
AVOID_NONE TODO: add documentation
PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer. PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer.
PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running
@@ -678,26 +690,34 @@ PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer
PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path. PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path.
PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering). PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering).
PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal. PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal.
PU_FAILURE_NO_NAVMESH Triggered if no navmesh is available for the region.
PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED Triggered when a character enters a region with dynamic pathfinding disabled.
PU_FAILURE_PARCEL_UNREACHABLE Triggered when a character failed to enter a parcel because it is not allowed to enter, e.g. because the parcel is already full or because object entry was disabled after the navmesh was baked.
CHARACTER_TYPE TODO: add documentation CHARACTER_TYPE Specifies which walkability coefficient will be used by this character.
CHARACTER_TYPE_A TODO: add documentation CHARACTER_TYPE_A Used for character types that you prefer move in a way consistent with humanoids.
CHARACTER_TYPE_B TODO: add documentation CHARACTER_TYPE_B Used for character types that you prefer move in a way consistent with wild animals or off road vehicles.
CHARACTER_TYPE_C TODO: add documentation CHARACTER_TYPE_C Used for mechanical character types or road going vehicles.
CHARACTER_TYPE_D TODO: add documentation CHARACTER_TYPE_D Used for character types that are not consistent with the A, B, or C type.
CHARACTER_TYPE_NONE TODO: add documentation CHARACTER_TYPE_NONE Used to set no specific character type.
TRAVERSAL_TYPE TODO: add documentation TRAVERSAL_TYPE Controls the speed at which characters moves on terrain that is less than 100% walkable will move faster (e.g., a cat crossing a street) or slower (e.g., a car driving in a swamp).
TRAVERSAL_TYPE_SLOW TODO: add documentation TRAVERSAL_TYPE_SLOW TODO: add documentation
TRAVERSAL_TYPE_FAST TODO: add documentation TRAVERSAL_TYPE_FAST TODO: add documentation
TRAVERSAL_TYPE_NONE TODO: add documentation TRAVERSAL_TYPE_NONE TODO: add documentation
CHARACTER_MAX_ACCEL TODO: add documentation CHARACTER_MAX_ACCEL The character's maximum acceleration rate.
CHARACTER_MAX_DECEL TODO: add documentation CHARACTER_MAX_DECEL The character's maximum deceleration rate.
CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation
CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation
CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation
CHARACTER_DESIRED_TURN_SPEED TODO: add documentation CHARACTER_DESIRED_TURN_SPEED The character's maximum speed while turning--note that this is only loosely enforced (i.e., a character may turn at higher speeds under certain conditions)
CHARACTER_MAX_TURN_RADIUS TODO: add documentation CHARACTER_MAX_TURN_RADIUS The character's turn radius when traveling at CHARACTER_DESIRED_TURN_SPEED.
CHARACTER_MAX_SPEED The character's maximum speed. Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in TRAVERSAL_TYPE_FAST mode.
PATROL_PAUSE_AT_WAYPOINTS Used with llPatrolPoints(). Defines if characters slow down and momentarily pause at each waypoint.
WANDER_PAUSE_AT_WAYPOINTS Used with llWanderWithin(). Defines if characters should pause after reaching each wander waypoint.
# --- OpenSim and Aurora-Sim constants Below --- # --- OpenSim and Aurora-Sim constants Below ---
# OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs) # OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs)
# Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs) # Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs)

View File

@@ -1010,5 +1010,8 @@
<map/> <map/>
<key>llWanderWithin</key> <key>llWanderWithin</key>
<map/> <map/>
<!-- Server RC LeTigre 12.10.12.265819 new function -->
<key>llGetSimStats</key>
<map/>
</map> </map>
</llsd> </llsd>

View File

@@ -726,6 +726,17 @@ Found in Advanced->Rendering->Info Displays</string>
<key>Value</key> <key>Value</key>
<integer>0</integer> <integer>0</integer>
</map> </map>
<key>InstantMessageLogPathAnyAccount</key>
<map>
<key>Comment</key>
<string>Path to your log files if you've never set the path while logged in on this account.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string/>
</map>
<key>UseConciseIMButtons</key> <key>UseConciseIMButtons</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
@@ -762,7 +773,7 @@ Found in Advanced->Rendering->Info Displays</string>
<key>ShowLocalChatFloaterBar</key> <key>ShowLocalChatFloaterBar</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
<string>Whether or not local chat should have an input bar, requires a restart.</string> <string>Whether or not local chat should have an input bar when undocked.</string>
<key>Persist</key> <key>Persist</key>
<integer>1</integer> <integer>1</integer>
<key>Type</key> <key>Type</key>
@@ -826,6 +837,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key> <key>Value</key>
<integer>1</integer> <integer>1</integer>
</map> </map>
<key>ShowDisplayNameChanges</key>
<map>
<key>Comment</key>
<string>Show a notification when someone changes their display name</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowSimChannel</key> <key>ShowSimChannel</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
@@ -837,6 +859,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key> <key>Value</key>
<integer>0</integer> <integer>0</integer>
</map> </map>
<key>StatusBarPositionBeforeParcel</key>
<map>
<key>Comment</key>
<string>Show your position coordinates before the name of the parcel in the status bar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MoyFastMiniMap</key> <key>MoyFastMiniMap</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
@@ -6290,22 +6323,6 @@ This should be as low as possible, but too low may break functionality</string>
<integer>0</integer> <integer>0</integer>
</array> </array>
</map> </map>
<key>FloaterChatBarlessRect</key>
<map>
<key>Comment</key>
<string>Rectangle for chat history without input bar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>172</integer>
<integer>500</integer>
<integer>0</integer>
</array>
</map>
<key>FloaterClothingRect</key> <key>FloaterClothingRect</key>
<map> <map>
<key>Comment</key> <key>Comment</key>

View File

@@ -50,7 +50,7 @@
<key>Type</key> <key>Type</key>
<string>U32</string> <string>U32</string>
<key>Value</key> <key>Value</key>
<integer>15000</integer> <integer>6000</integer>
</map> </map>
<key>SHFMODExDecodeBufferSize</key> <key>SHFMODExDecodeBufferSize</key>
<map> <map>

View File

@@ -328,6 +328,7 @@ void LLPrefsAscentChat::refreshValues()
mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"); mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming");
mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification"); mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification");
mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"); mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM");
mShowDisplayNameChanges = gSavedSettings.getBOOL("ShowDisplayNameChanges");
mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound"); mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound");
mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat"); mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat");
mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose"); mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose");
@@ -543,6 +544,7 @@ void LLPrefsAscentChat::cancel()
gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming); gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming);
gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification); gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification);
gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM); gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM);
gSavedSettings.setBOOL("ShowDisplayNameChanges", mShowDisplayNameChanges);
gSavedSettings.setBOOL("PlayTypingSound", mPlayTypingSound); gSavedSettings.setBOOL("PlayTypingSound", mPlayTypingSound);
gSavedSettings.setBOOL("HideNotificationsInChat", mHideNotificationsInChat); gSavedSettings.setBOOL("HideNotificationsInChat", mHideNotificationsInChat);
gSavedSettings.setBOOL("AscentAllowMUpose", mEnableMUPose); gSavedSettings.setBOOL("AscentAllowMUpose", mEnableMUPose);

View File

@@ -65,6 +65,7 @@ protected:
BOOL mIMAnnounceIncoming; BOOL mIMAnnounceIncoming;
BOOL mHideTypingNotification; BOOL mHideTypingNotification;
BOOL mShowGroupNameInChatIM; BOOL mShowGroupNameInChatIM;
bool mShowDisplayNameChanges;
BOOL mPlayTypingSound; BOOL mPlayTypingSound;
BOOL mHideNotificationsInChat; BOOL mHideNotificationsInChat;
BOOL mEnableMUPose; BOOL mEnableMUPose;

View File

@@ -394,22 +394,22 @@ void LLPrefsAscentSys::refresh()
childSetValue("SinguCmdLineAway", mCmdLineAway); childSetValue("SinguCmdLineAway", mCmdLineAway);
//Build ------------------------------------------------------------------------------- //Build -------------------------------------------------------------------------------
childSetValue("EmeraldBuildPrefs_Alpha", mAlpha); childSetValue("alpha", mAlpha);
getChild<LLColorSwatchCtrl>("EmeraldBuildPrefs_Color")->setOriginal(mColor); getChild<LLColorSwatchCtrl>("colorswatch")->setOriginal(mColor);
childSetValue("EmeraldBuildPrefs_FullBright", mFullBright); childSetValue("EmFBToggle", mFullBright);
childSetValue("EmeraldBuildPrefs_Glow", mGlow); childSetValue("glow", mGlow);
childSetValue("BuildPrefs_Material", mMaterial); childSetValue("material", mMaterial);
childSetValue("NextOwnerCopy", mNextCopy); childSetValue("next_owner_copy", mNextCopy);
childSetValue("NextOwnerModify", mNextMod); childSetValue("next_owner_modify", mNextMod);
childSetValue("NextOwnerTransfer", mNextTrans); childSetValue("next_owner_transfer", mNextTrans);
childSetValue("EmeraldBuildPrefs_Phantom", mPhantom); childSetValue("EmPhantomToggle", mPhantom);
childSetValue("EmeraldBuildPrefs_Physical", mPhysical); childSetValue("EmPhysicalToggle", mPhysical);
childSetValue("EmeraldBuildPrefs_Shiny", mShiny); childSetValue("combobox shininess", mShiny);
childSetValue("EmeraldBuildPrefs_Temporary", mTemporary); childSetValue("EmTemporaryToggle", mTemporary);
childSetValue("EmeraldBuildPrefs_Texture", mTexture); childSetValue("texture control", mTexture);
childSetValue("BuildPrefs_Xsize", mXsize); childSetValue("X size", mXsize);
childSetValue("BuildPrefs_Ysize", mYsize); childSetValue("Y size", mYsize);
childSetValue("BuildPrefs_Zsize", mZsize); childSetValue("Z size", mZsize);
} }
void LLPrefsAscentSys::cancel() void LLPrefsAscentSys::cancel()

View File

@@ -57,7 +57,7 @@ LLPrefsAscentVan::LLPrefsAscentVan()
{ {
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml"); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml");
childSetVisible("announce_streaming_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData()); childSetVisible("announce_stream_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData());
childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this); childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this);
@@ -219,14 +219,6 @@ void LLPrefsAscentVan::refreshValues()
mColorMutedChat = gSavedSettings.getBOOL("ColorMutedChat"); mColorMutedChat = gSavedSettings.getBOOL("ColorMutedChat");
// mColorCustomChat = gSavedSettings.getBOOL("ColorCustomChat"); // mColorCustomChat = gSavedSettings.getBOOL("ColorCustomChat");
//Body Dynamics --------------------------------------------------------------------------
mBreastPhysicsToggle = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle");
mBoobMass = gSavedSettings.getF32("EmeraldBoobMass");
mBoobHardness = gSavedSettings.getF32("EmeraldBoobHardness");
mBoobVelMax = gSavedSettings.getF32("EmeraldBoobVelMax");
mBoobFriction = gSavedSettings.getF32("EmeraldBoobFriction");
mBoobVelMin = gSavedSettings.getF32("EmeraldBoobVelMin");
mAvatarXModifier = gSavedSettings.getF32("AscentAvatarXModifier"); mAvatarXModifier = gSavedSettings.getF32("AscentAvatarXModifier");
mAvatarYModifier = gSavedSettings.getF32("AscentAvatarYModifier"); mAvatarYModifier = gSavedSettings.getF32("AscentAvatarYModifier");
mAvatarZModifier = gSavedSettings.getF32("AscentAvatarZModifier"); mAvatarZModifier = gSavedSettings.getF32("AscentAvatarZModifier");
@@ -252,13 +244,6 @@ void LLPrefsAscentVan::refresh()
childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel")); childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel"));
childSetEnabled("custom_tag_color_text", mCustomTagOn); childSetEnabled("custom_tag_color_text", mCustomTagOn);
childSetEnabled("custom_tag_color_swatch", mCustomTagOn); childSetEnabled("custom_tag_color_swatch", mCustomTagOn);
//Body Dynamics --------------------------------------------------------------------------
childSetEnabled("EmeraldBoobMass", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobHardness", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobVelMax", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobFriction", mBreastPhysicsToggle);
childSetEnabled("EmeraldBoobVelMin", mBreastPhysicsToggle);
} }
// Reset settings to local copy // Reset settings to local copy
@@ -302,14 +287,6 @@ void LLPrefsAscentVan::cancel()
gSavedSettings.setBOOL("ColorMutedChat", mColorMutedChat); gSavedSettings.setBOOL("ColorMutedChat", mColorMutedChat);
// gSavedSettings.setBOOL("ColorCustomChat", mColorCustomChat); // gSavedSettings.setBOOL("ColorCustomChat", mColorCustomChat);
//Body Dynamics --------------------------------------------------------------------------
gSavedSettings.setBOOL("EmeraldBreastPhysicsToggle", mBreastPhysicsToggle);
gSavedSettings.setF32("EmeraldBoobMass", mBoobMass);
gSavedSettings.setF32("EmeraldBoobHardness", mBoobHardness);
gSavedSettings.setF32("EmeraldBoobVelMax", mBoobVelMax);
gSavedSettings.setF32("EmeraldBoobFriction", mBoobFriction);
gSavedSettings.setF32("EmeraldBoobVelMin", mBoobVelMin);
gSavedSettings.setF32("AscentAvatarXModifier", mAvatarXModifier); gSavedSettings.setF32("AscentAvatarXModifier", mAvatarXModifier);
gSavedSettings.setF32("AscentAvatarYModifier", mAvatarYModifier); gSavedSettings.setF32("AscentAvatarYModifier", mAvatarYModifier);
gSavedSettings.setF32("AscentAvatarZModifier", mAvatarZModifier); gSavedSettings.setF32("AscentAvatarZModifier", mAvatarZModifier);

View File

@@ -88,13 +88,7 @@ protected:
bool mColorLindenChat; bool mColorLindenChat;
bool mColorMutedChat; bool mColorMutedChat;
// bool mColorCustomChat; // bool mColorCustomChat;
//Body Dynamics
BOOL mBreastPhysicsToggle;
F32 mBoobMass;
F32 mBoobHardness;
F32 mBoobVelMax;
F32 mBoobFriction;
F32 mBoobVelMin;
F32 mAvatarXModifier; F32 mAvatarXModifier;
F32 mAvatarYModifier; F32 mAvatarYModifier;
F32 mAvatarZModifier; F32 mAvatarZModifier;

View File

@@ -823,6 +823,23 @@
<bone name="mNeck" scale="0 0 .5" /> <bone name="mNeck" scale="0 0 .5" />
</param_skeleton> </param_skeleton>
</param> </param>
<param
id="11001"
group="0"
name="Hover"
wearable="shape"
edit_group="shape_body"
edit_group_order="4"
label_min="Lower"
label_max="Higher"
value_min="-2"
value_max="2"
value_default="0"
camera_distance="2.5">
<param_skeleton />
</param>
</skeleton> </skeleton>
<mesh <mesh

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