From ad332810078a0bbb8fa08fcbfdf3d756de6914f6 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 6 Jun 2008 22:43:38 +0000 Subject: QAR-650 - Viewer RC 9 merge -> release (post cmake) merge release@88802 Branch_1-20-Viewer-2-merge-1@89178 -> release --- doc/contributions.txt | 3 + indra/cmake/APR.cmake | 12 +- indra/lib/python/indra/base/llsd.py | 73 + indra/llcommon/llerror.cpp | 23 + indra/llcommon/llmemory.cpp | 115 +- indra/llcommon/llversionviewer.h | 2 +- indra/llmath/llvolume.cpp | 5 + indra/llrender/CMakeLists.txt | 6 +- indra/llrender/llfontgl.cpp | 5 +- indra/llrender/llimagegl.cpp | 114 +- indra/llrender/llimagegl.h | 19 +- indra/llrender/llrender.cpp | 704 + indra/llrender/llrender.h | 239 + indra/llrender/llrendertarget.cpp | 3 +- indra/llrender/llvertexbuffer.cpp | 33 +- indra/llui/llbutton.cpp | 10 +- indra/llui/llcombobox.cpp | 12 +- indra/llui/llmenugl.cpp | 2 +- indra/llui/llscrollbar.cpp | 6 +- indra/llui/llscrollcontainer.cpp | 2 +- indra/llui/llscrolllistctrl.cpp | 4 +- indra/llui/llstyle.cpp | 2 +- indra/llui/lltabcontainer.cpp | 2 +- indra/llui/lltexteditor.cpp | 2 +- indra/llui/llui.cpp | 18 +- indra/llui/llview.cpp | 2 +- indra/llui/llviewborder.cpp | 2 +- indra/llwindow/llwindowwin32.cpp | 4 +- indra/llxml/llcontrol.cpp | 67 +- indra/llxml/llcontrol.h | 2 +- indra/newview/English.lproj/InfoPlist.strings | 4 +- indra/newview/Info-SecondLife.plist | 2 +- indra/newview/app_settings/cmd_line.xml | 6 +- indra/newview/app_settings/settings.xml | 18829 ++++++++++++------------ indra/newview/llappviewer.cpp | 402 +- indra/newview/llappviewer.h | 25 +- indra/newview/llappviewerlinux.cpp | 8 +- indra/newview/llappviewerwin32.cpp | 8 +- indra/newview/llbox.cpp | 2 +- indra/newview/llcolorswatch.cpp | 2 +- indra/newview/llcommandlineparser.cpp | 33 +- indra/newview/llcurrencyuimanager.cpp | 5 +- indra/newview/lldrawable.cpp | 13 + indra/newview/lldrawpool.cpp | 2 +- indra/newview/lldrawpoolalpha.cpp | 19 +- indra/newview/lldrawpoolavatar.cpp | 36 +- indra/newview/lldrawpoolbump.cpp | 121 +- indra/newview/lldrawpoolsimple.cpp | 18 +- indra/newview/lldrawpoolsky.cpp | 2 +- indra/newview/lldrawpoolterrain.cpp | 279 +- indra/newview/lldrawpooltree.cpp | 30 +- indra/newview/lldrawpoolwater.cpp | 47 +- indra/newview/lldrawpoolwlsky.cpp | 21 +- indra/newview/lldynamictexture.cpp | 7 +- indra/newview/llface.cpp | 10 +- indra/newview/llface.h | 4 + indra/newview/llfasttimerview.cpp | 2 +- indra/newview/llfirstuse.cpp | 26 +- indra/newview/llflexibleobject.cpp | 2 +- indra/newview/llfloateranimpreview.cpp | 5 +- indra/newview/llfloaterauction.cpp | 2 +- indra/newview/llfloaterbuycurrency.cpp | 2 +- indra/newview/llfloaterbuyland.cpp | 5 +- indra/newview/llfloaterchat.cpp | 3 +- indra/newview/llfloatercolorpicker.cpp | 2 +- indra/newview/llfloaterimagepreview.cpp | 2 +- indra/newview/llfloaterregioninfo.cpp | 2 +- indra/newview/llfloaterreporter.cpp | 6 +- indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llfloatertos.cpp | 2 +- indra/newview/llfloaterworldmap.cpp | 2 + indra/newview/llfolderview.cpp | 88 +- indra/newview/llfolderview.h | 34 +- indra/newview/llglsandbox.cpp | 2 +- indra/newview/llhudeffectlookat.cpp | 2 +- indra/newview/llhudeffectpointat.cpp | 2 +- indra/newview/llhudicon.cpp | 2 +- indra/newview/llhudtext.cpp | 5 +- indra/newview/llimpanel.cpp | 5 +- indra/newview/lljoystickbutton.cpp | 2 +- indra/newview/llmanip.cpp | 2 +- indra/newview/llmaniprotate.cpp | 2 +- indra/newview/llmanipscale.cpp | 2 +- indra/newview/llmaniptranslate.cpp | 10 +- indra/newview/llnetmap.cpp | 6 +- indra/newview/lloverlaybar.cpp | 2 +- indra/newview/llpanellogin.cpp | 111 +- indra/newview/llprogressview.cpp | 2 +- indra/newview/llselectmgr.cpp | 34 +- indra/newview/llspatialpartition.cpp | 32 +- indra/newview/llspatialpartition.h | 5 +- indra/newview/llstartup.cpp | 67 +- indra/newview/llstartup.h | 2 +- indra/newview/llsurfacepatch.cpp | 3 +- indra/newview/lltexlayer.cpp | 44 +- indra/newview/lltexturecache.cpp | 9 + indra/newview/lltexturectrl.cpp | 2 +- indra/newview/lltexturefetch.cpp | 18 +- indra/newview/lltextureview.cpp | 2 +- indra/newview/lltoolbrush.cpp | 10 +- indra/newview/lltoolbrush.h | 1 - indra/newview/lltoolmorph.cpp | 2 +- indra/newview/lltoolpie.cpp | 1 + indra/newview/lltoolselectland.cpp | 8 +- indra/newview/lltoolselectland.h | 1 - indra/newview/lltoolselectrect.cpp | 2 +- indra/newview/lltracker.cpp | 2 +- indra/newview/llviewercontrol.cpp | 4 +- indra/newview/llviewerdisplay.cpp | 105 +- indra/newview/llviewerdisplay.h | 1 + indra/newview/llviewerjoint.cpp | 6 +- indra/newview/llviewerjointattachment.cpp | 2 +- indra/newview/llviewerjointmesh.cpp | 47 +- indra/newview/llviewermenu.cpp | 19 +- indra/newview/llviewermessage.cpp | 8 +- indra/newview/llviewernetwork.cpp | 201 +- indra/newview/llviewernetwork.h | 46 +- indra/newview/llviewerobject.cpp | 30 +- indra/newview/llviewerobjectlist.cpp | 3 +- indra/newview/llviewerparcelmedia.cpp | 12 +- indra/newview/llviewerparceloverlay.cpp | 4 +- indra/newview/llviewerregion.cpp | 160 +- indra/newview/llviewerregion.h | 5 + indra/newview/llviewerwindow.cpp | 90 +- indra/newview/llvoavatar.cpp | 14 +- indra/newview/llvoiceclient.cpp | 16 +- indra/newview/llvoiceclient.h | 6 +- indra/newview/llvoicevisualizer.cpp | 8 +- indra/newview/llvoicevisualizer.h | 2 +- indra/newview/llvosurfacepatch.cpp | 12 +- indra/newview/llvovolume.cpp | 2 +- indra/newview/llwatchdog.cpp | 134 +- indra/newview/llwatchdog.h | 12 +- indra/newview/llwaterparammanager.cpp | 2 +- indra/newview/llwearable.cpp | 33 +- indra/newview/llwearable.h | 2 +- indra/newview/llwearablelist.cpp | 112 +- indra/newview/llworld.cpp | 4 +- indra/newview/llworldmap.cpp | 5 + indra/newview/llworldmapview.cpp | 42 +- indra/newview/pipeline.cpp | 145 +- 141 files changed, 12363 insertions(+), 10948 deletions(-) create mode 100644 indra/llrender/llrender.cpp create mode 100644 indra/llrender/llrender.h diff --git a/doc/contributions.txt b/doc/contributions.txt index 2a37015b01..99a0e7ad9e 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -50,6 +50,9 @@ Alissa Sabre VWR-6430 VWR-1843 VWR-6668 + VWR-7153 + VWR-7168 + VWR-7087 Angus Boyd VWR-592 Argent Stonecutter diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index c495b7f7c6..eb1fb68991 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -20,16 +20,16 @@ else (STANDALONE) ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release ) set(APR_LIBRARIES - debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apr-1 - optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apr-1 + debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apr-1.lib + optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apr-1.lib ) set(APRUTIL_LIBRARIES - debug ${WINLIBS_PREBUILT_DEBUG_DIR}/aprutil-1 - optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/aprutil-1 + debug ${WINLIBS_PREBUILT_DEBUG_DIR}/aprutil-1.lib + optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/aprutil-1.lib ) set(APRICONV_LIBRARIES - debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apriconv-1 - optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apriconv-1 + debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apriconv-1.lib + optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apriconv-1.lib ) elseif (DARWIN) set(APR_LIBRARIES diff --git a/indra/lib/python/indra/base/llsd.py b/indra/lib/python/indra/base/llsd.py index 9561a56710..8e71aee060 100644 --- a/indra/lib/python/indra/base/llsd.py +++ b/indra/lib/python/indra/base/llsd.py @@ -247,6 +247,78 @@ def format_xml(something): _g_xml_formatter = LLSDXMLFormatter() return _g_xml_formatter.format(something) +class LLSDXMLPrettyFormatter(LLSDXMLFormatter): + def __init__(self, indent_atom = None): + # Call the super class constructor so that we have the type map + super(LLSDXMLPrettyFormatter, self).__init__() + + # Override the type map to use our specialized formatters to + # emit the pretty output. + self.type_map[list] = self.PRETTY_ARRAY + self.type_map[tuple] = self.PRETTY_ARRAY + self.type_map[types.GeneratorType] = self.PRETTY_ARRAY, + self.type_map[dict] = self.PRETTY_MAP + + # Private data used for indentation. + self._indent_level = 1 + if indent_atom is None: + self._indent_atom = ' ' + else: + self._indent_atom = indent_atom + + def _indent(self): + "Return an indentation based on the atom and indentation level." + return self._indent_atom * self._indent_level + + def PRETTY_ARRAY(self, v): + rv = [] + rv.append('\n') + self._indent_level = self._indent_level + 1 + rv.extend(["%s%s\n" % + (self._indent(), + self.generate(item)) + for item in v]) + self._indent_level = self._indent_level - 1 + rv.append(self._indent()) + rv.append('') + return ''.join(rv) + + def PRETTY_MAP(self, v): + rv = [] + rv.append('\n') + self._indent_level = self._indent_level + 1 + keys = v.keys() + keys.sort() + rv.extend(["%s%s\n%s%s\n" % + (self._indent(), + self.elt('key', key), + self._indent(), + self.generate(v[key])) + for key in keys]) + self._indent_level = self._indent_level - 1 + rv.append(self._indent()) + rv.append('') + return ''.join(rv) + + def format(self, something): + data = [] + data.append('\n') + data.append(self.generate(something)) + data.append('\n') + return '\n'.join(data) + +def format_pretty_xml(something): + """@brief Serialize a python object as 'pretty' llsd xml. + + The output conforms to the LLSD DTD, unlike the output from the + standard python xml.dom DOM::toprettyxml() method which does not + preserve significant whitespace. + This function is not necessarily suited for serializing very large + objects. It is not optimized by the cllsd module, and sorts on + dict (llsd map) keys alphabetically to ease human reading. + """ + return LLSDXMLPrettyFormatter().format(something) + class LLSDNotationFormatter(object): def __init__(self): self.type_map = { @@ -834,6 +906,7 @@ class LLSD(object): parse = staticmethod(parse) toXML = staticmethod(format_xml) + toPrettyXML = staticmethod(format_pretty_xml) toBinary = staticmethod(format_binary) toNotation = staticmethod(format_notation) diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index fa3a01c191..1d85bc0e70 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1050,6 +1050,29 @@ namespace LLError #endif prefix << site.mFunction << ": "; + if (site.mPrintOnce) + { + std::map::iterator messageIter = s.uniqueLogMessages.find(message); + if (messageIter != s.uniqueLogMessages.end()) + { + messageIter->second++; + unsigned int num_messages = messageIter->second; + if (num_messages == 10 || num_messages == 50 || (num_messages % 100) == 0) + { + prefix << "ONCE (" << num_messages << "th time seen): "; + } + else + { + return; + } + } + else + { + prefix << "ONCE: "; + s.uniqueLogMessages[message] = 1; + } + } + if (site.mPrintOnce) { std::map::iterator messageIter = s.uniqueLogMessages.find(message); diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 079f2b3258..4ca6a12435 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -314,72 +314,77 @@ U64 getCurrentRSS() #elif defined(LL_DARWIN) -static U32 getPageSize() -{ - int ctl[2] = { CTL_HW, HW_PAGESIZE }; - int page_size; - size_t size = sizeof(page_size); - - if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1) - { - llwarns << "Couldn't get page size" << llendl; - return 0; - } else { - return page_size; - } -} +// This can cause bad stalls! Replace with fast version + +// static U32 getPageSize() +// { +// int ctl[2] = { CTL_HW, HW_PAGESIZE }; +// int page_size; +// size_t size = sizeof(page_size); + +// if (sysctl(ctl, 2, &page_size, &size, NULL, 0) == -1) +// { +// llwarns << "Couldn't get page size" << llendl; +// return 0; +// } else { +// return page_size; +// } +// } U64 getCurrentRSS() { - task_t task = mach_task_self(); - vm_address_t addr = VM_MIN_ADDRESS; - vm_size_t size = 0; - U64 residentPages = 0; - - while (true) - { - mach_msg_type_number_t bcount = VM_REGION_BASIC_INFO_COUNT; - vm_region_basic_info binfo; - mach_port_t bobj; - kern_return_t ret; + // Stalls!!! + +// task_t task = mach_task_self(); +// vm_address_t addr = VM_MIN_ADDRESS; +// vm_size_t size = 0; +// U64 residentPages = 0; + +// while (true) +// { +// mach_msg_type_number_t bcount = VM_REGION_BASIC_INFO_COUNT; +// vm_region_basic_info binfo; +// mach_port_t bobj; +// kern_return_t ret; - addr += size; +// addr += size; - ret = vm_region(task, &addr, &size, VM_REGION_BASIC_INFO, - (vm_region_info_t) &binfo, &bcount, &bobj); +// ret = vm_region(task, &addr, &size, VM_REGION_BASIC_INFO, +// (vm_region_info_t) &binfo, &bcount, &bobj); - if (ret != KERN_SUCCESS) - { - break; - } +// if (ret != KERN_SUCCESS) +// { +// break; +// } - if (bobj != MACH_PORT_NULL) - { - mach_port_deallocate(task, bobj); - } +// if (bobj != MACH_PORT_NULL) +// { +// mach_port_deallocate(task, bobj); +// } - mach_msg_type_number_t ecount = VM_REGION_EXTENDED_INFO_COUNT; - vm_region_extended_info einfo; - mach_port_t eobj; - - ret = vm_region(task, &addr, &size, VM_REGION_EXTENDED_INFO, - (vm_region_info_t) &einfo, &ecount, &eobj); - - if (ret != KERN_SUCCESS) - { - llwarns << "vm_region failed" << llendl; - return 0; - } +// mach_msg_type_number_t ecount = VM_REGION_EXTENDED_INFO_COUNT; +// vm_region_extended_info einfo; +// mach_port_t eobj; + +// ret = vm_region(task, &addr, &size, VM_REGION_EXTENDED_INFO, +// (vm_region_info_t) &einfo, &ecount, &eobj); + +// if (ret != KERN_SUCCESS) +// { +// llwarns << "vm_region failed" << llendl; +// return 0; +// } - if (eobj != MACH_PORT_NULL) - { - mach_port_deallocate(task, eobj); - } +// if (eobj != MACH_PORT_NULL) +// { +// mach_port_deallocate(task, eobj); +// } - residentPages += einfo.pages_resident; - } +// residentPages += einfo.pages_resident; +// } - return residentPages * getPageSize(); +// return residentPages * getPageSize(); + return 0; } #elif defined(LL_LINUX) diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index d4bbef7e13..2cdb55eb19 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -34,7 +34,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 20; -const S32 LL_VERSION_PATCH = 6; +const S32 LL_VERSION_PATCH = 9; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index ecc4b09d10..3b01140e3a 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -4789,6 +4789,11 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) mIndices.resize(num_indices); mEdge.resize(num_indices); } + else + { + mHasBinormals = FALSE; + } + LLVector3& face_min = mExtents[0]; LLVector3& face_max = mExtents[1]; diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 9938a0198b..2dba8ef60d 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -23,11 +23,10 @@ set(llrender_SOURCE_FILES llfont.cpp llfontgl.cpp llgldbg.cpp - llglimmediate.cpp llimagegl.cpp + llrender.cpp llrendertarget.cpp llvertexbuffer.cpp - llvertexprogramgl.cpp ) set(llrender_HEADER_FILES @@ -36,11 +35,10 @@ set(llrender_HEADER_FILES llfontgl.h llfont.h llgldbg.h - llglimmediate.h llimagegl.h + llrender.h llrendertarget.h llvertexbuffer.h - llvertexprogramgl.h ) set_source_files_properties(${llrender_HEADER_FILES} diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 3a408b5550..1e0d9767ca 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -36,7 +36,7 @@ #include "llfont.h" #include "llfontgl.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "v4color.h" #include "llstl.h" @@ -665,7 +665,8 @@ S32 LLFontGL::render(const LLWString &wstr, mImageGLp->bind(0); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Not guaranteed to be set correctly + // Not guaranteed to be set correctly + gGL.setSceneBlendType(LLRender::BT_ALPHA); cur_x = ((F32)x * sScaleX); cur_y = ((F32)y * sScaleY); diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 55fa48f437..dd9f22361f 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -41,7 +41,7 @@ #include "llmath.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" //---------------------------------------------------------------------------- @@ -61,6 +61,8 @@ S32 LLImageGL::sCount = 0; BOOL LLImageGL::sGlobalUseAnisotropic = FALSE; F32 LLImageGL::sLastFrameTime = 0.f; +BOOL LLImageGL::sRefCheck = TRUE ; + std::set LLImageGL::sImageList; //---------------------------------------------------------------------------- @@ -130,13 +132,13 @@ void LLImageGL::bindExternalTexture(LLGLuint gl_name, S32 stage, LLGLenum bind_t gGL.flush(); if (stage > 0) { - glActiveTextureARB(GL_TEXTURE0_ARB + stage); + gGL.getTexUnit(stage)->activate(); } glBindTexture(bind_target, gl_name); sCurrentBoundTextures[stage] = gl_name; if (stage > 0) { - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } } @@ -149,9 +151,9 @@ void LLImageGL::unbindTexture(S32 stage, LLGLenum bind_target) gGL.flush(); if (stage > 0) { - glActiveTextureARB(GL_TEXTURE0_ARB + stage); + gGL.getTexUnit(stage)->activate(); glBindTexture(GL_TEXTURE_2D, 0); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } else { @@ -276,7 +278,10 @@ LLImageGL::LLImageGL(const LLImageRaw* imageraw, BOOL usemipmaps) setSize(0, 0, 0); sImageList.insert(this); sCount++; + + sRefCheck = FALSE ; createGLTexture(0, imageraw); + sRefCheck = TRUE ; } LLImageGL::~LLImageGL() @@ -304,7 +309,9 @@ void LLImageGL::init(BOOL usemipmaps) mIsResident = 0; mClampS = FALSE; mClampT = FALSE; - mMipFilterNearest = FALSE; + mClampR = FALSE; + mMagFilterNearest = FALSE; + mMinFilterNearest = FALSE; mWidth = 0; mHeight = 0; mComponents = 0; @@ -331,17 +338,19 @@ void LLImageGL::cleanup() //---------------------------------------------------------------------------- +//this function is used to check the size of a texture image. +//so dim should be a positive number static bool check_power_of_two(S32 dim) { - while(dim > 1) + if(dim < 0) { - if (dim & 1) - { - return false; - } - dim >>= 1; + return false ; + } + if(!dim)//0 is a power-of-two number + { + return true ; } - return true; + return !(dim & (dim - 1)) ; } //static @@ -418,6 +427,8 @@ void LLImageGL::dump() BOOL LLImageGL::bindTextureInternal(const S32 stage) const { + llassert_always(!sRefCheck || (getNumRefs() > 0 && getNumRefs() < 100000)) ; + if (gGLManager.mIsDisabled) { llwarns << "Trying to bind a texture while GL is disabled!" << llendl; @@ -439,7 +450,7 @@ BOOL LLImageGL::bindTextureInternal(const S32 stage) const gGL.flush(); if (stage > 0) { - glActiveTextureARB(GL_TEXTURE0_ARB + stage); + gGL.getTexUnit(stage)->activate(); } glBindTexture(mBindTarget, mTexName); @@ -448,7 +459,7 @@ BOOL LLImageGL::bindTextureInternal(const S32 stage) const if (stage > 0) { - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } if (mLastBindTime != sLastFrameTime) @@ -466,12 +477,12 @@ BOOL LLImageGL::bindTextureInternal(const S32 stage) const gGL.flush(); if (stage > 0) { - glActiveTextureARB(GL_TEXTURE0_ARB+stage); + gGL.getTexUnit(stage)->activate(); } glBindTexture(mBindTarget, 0); if (stage > 0) { - glActiveTextureARB(GL_TEXTURE0_ARB+stage); + gGL.getTexUnit(0)->activate(); } sCurrentBoundTextures[stage] = 0; return FALSE; @@ -941,7 +952,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_ setImage(data_in, data_hasmips); setClamp(mClampS, mClampT); - setMipFilterNearest(mMipFilterNearest); + setMipFilterNearest(mMagFilterNearest); // things will break if we don't unbind after creation unbindTexture(0, mBindTarget); @@ -1044,8 +1055,23 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre S32 gl_discard = discard_level - mCurrentDiscardLevel; + //explicitly unbind texture + LLImageGL::unbindTexture(0, mTarget); llverify(bindTextureInternal(0)); + if (gDebugGL) + { + if (mTarget == GL_TEXTURE_2D) + { + GLint texname; + glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname); + if (texname != mTexName) + { + llerrs << "Invalid texture bound!" << llendl; + } + } + } + LLGLint glwidth = 0; glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_WIDTH, (GLint*)&glwidth); if (glwidth == 0) @@ -1153,25 +1179,55 @@ void LLImageGL::destroyGLTexture() //---------------------------------------------------------------------------- -void LLImageGL::setClamp(BOOL clamps, BOOL clampt) +void LLImageGL::glClampCubemap (BOOL clamps, BOOL clampt, BOOL clampr) +{ + glTexParameteri (GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, clamps ? GL_CLAMP_TO_EDGE : GL_REPEAT); + glTexParameteri (GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, clamps ? GL_CLAMP_TO_EDGE : GL_REPEAT); + glTexParameteri (GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_R, clamps ? GL_CLAMP_TO_EDGE : GL_REPEAT); +} + +void LLImageGL::glClamp (BOOL clamps, BOOL clampt) { - mClampS = clamps; - mClampT = clampt; if (mTexName != 0) { - glTexParameteri(mBindTarget, GL_TEXTURE_WRAP_S, clamps ? GL_CLAMP_TO_EDGE : GL_REPEAT); - glTexParameteri(mBindTarget, GL_TEXTURE_WRAP_T, clampt ? GL_CLAMP_TO_EDGE : GL_REPEAT); + glTexParameteri (mBindTarget, GL_TEXTURE_WRAP_S, clamps ? GL_CLAMP_TO_EDGE : GL_REPEAT); + glTexParameteri (mBindTarget, GL_TEXTURE_WRAP_T, clampt ? GL_CLAMP_TO_EDGE : GL_REPEAT); } - stop_glerror(); } -void LLImageGL::setMipFilterNearest(BOOL nearest, BOOL min_nearest) +void LLImageGL::setClampCubemap (BOOL clamps, BOOL clampt, BOOL clampr) +{ + mClampS = clamps; + mClampT = clampt; + mClampR = clampr; + glClampCubemap (clamps, clampt, clampr); +} + +void LLImageGL::setClamp(BOOL clamps, BOOL clampt) +{ + mClampS = clamps; + mClampT = clampt; + glClamp (clamps, clampt); +} + +void LLImageGL::overrideClamp (BOOL clamps, BOOL clampt) +{ + glClamp (clamps, clampt); +} + +void LLImageGL::restoreClamp (void) +{ + glClamp (mClampS, mClampT); +} + +void LLImageGL::setMipFilterNearest(BOOL mag_nearest, BOOL min_nearest) { - mMipFilterNearest = nearest; + mMagFilterNearest = mag_nearest; + mMinFilterNearest = min_nearest; if (mTexName != 0) { - if (min_nearest) + if (mMinFilterNearest) { glTexParameteri(mBindTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST); } @@ -1183,7 +1239,7 @@ void LLImageGL::setMipFilterNearest(BOOL nearest, BOOL min_nearest) { glTexParameteri(mBindTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR); } - if (mMipFilterNearest) + if (mMagFilterNearest) { glTexParameteri(mBindTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } @@ -1193,7 +1249,7 @@ void LLImageGL::setMipFilterNearest(BOOL nearest, BOOL min_nearest) } if (gGLManager.mHasAnisotropic) { - if (sGlobalUseAnisotropic && !mMipFilterNearest) + if (sGlobalUseAnisotropic && !mMagFilterNearest) { F32 largest_anisotropy; glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_anisotropy); diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 82ea147d6e..c5fe9b7299 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -81,6 +81,10 @@ protected: virtual ~LLImageGL(); BOOL bindTextureInternal(const S32 stage = 0) const; +private: + void glClamp (BOOL clamps, BOOL clampt); + void glClampCubemap (BOOL clamps, BOOL clampt, BOOL clampr = FALSE); + public: virtual void dump(); // debugging info to llinfos virtual BOOL bind(const S32 stage = 0) const; @@ -99,8 +103,11 @@ public: BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok); void destroyGLTexture(); + void setClampCubemap (BOOL clamps, BOOL clampt, BOOL clampr = FALSE); void setClamp(BOOL clamps, BOOL clampt); - void setMipFilterNearest(BOOL nearest, BOOL min_nearest = FALSE); + void overrideClamp (BOOL clamps, BOOL clampt); + void restoreClamp (void); + void setMipFilterNearest(BOOL mag_nearest, BOOL min_nearest = FALSE); void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE); void dontDiscard() { mDontDiscard = 1; } @@ -117,7 +124,8 @@ public: BOOL getClampS() const { return mClampS; } BOOL getClampT() const { return mClampT; } - BOOL getMipFilterNearest() const { return mMipFilterNearest; } + BOOL getClampR() const { return mClampR; } + BOOL getMipFilterNearest() const { return mMagFilterNearest; } BOOL getHasGLTexture() const { return mTexName != 0; } LLGLuint getTexName() const { return mTexName; } @@ -167,7 +175,9 @@ protected: S8 mClampS; // Need to save clamp state S8 mClampT; - S8 mMipFilterNearest; // if TRUE, set magfilter to GL_NEAREST + S8 mClampR; + S8 mMagFilterNearest; // if TRUE, set magfilter to GL_NEAREST + S8 mMinFilterNearest; // if TRUE, set minfilter to GL_NEAREST LLGLint mFormatInternal; // = GL internalformat LLGLenum mFormatPrimary; // = GL format (pixel data format) @@ -197,6 +207,9 @@ public: #else BOOL getMissed() const { return FALSE; }; #endif + +private://paranoia error check + static BOOL sRefCheck ; }; #endif // LL_LLIMAGEGL_H diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp new file mode 100644 index 0000000000..1168155f8b --- /dev/null +++ b/indra/llrender/llrender.cpp @@ -0,0 +1,704 @@ +/** + * @file llrender.cpp + * @brief LLRender implementation + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2007, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +#include "llrender.h" +#include "llvertexbuffer.h" + +LLRender gGL; + +static const U32 LL_NUM_TEXTURE_LAYERS = 8; + +static GLenum sGLCompareFunc[] = +{ + GL_NEVER, + GL_ALWAYS, + GL_LESS, + GL_LEQUAL, + GL_EQUAL, + GL_NOTEQUAL, + GL_GEQUAL, + GL_GREATER +}; + +const U32 immediate_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXCOORD; + +static GLenum sGLBlendFactor[] = +{ + GL_ONE, + GL_ZERO, + GL_DST_COLOR, + GL_SRC_COLOR, + GL_ONE_MINUS_DST_COLOR, + GL_ONE_MINUS_SRC_COLOR, + GL_DST_ALPHA, + GL_SRC_ALPHA, + GL_ONE_MINUS_DST_ALPHA, + GL_ONE_MINUS_SRC_ALPHA +}; + +LLTexUnit::LLTexUnit(U32 index) +: mIsEnabled(false), mCurrBlendType(TB_MULT), +mCurrColorOp(TBO_MULT), mCurrAlphaOp(TBO_MULT), +mCurrColorSrc1(TBS_TEX_COLOR), mCurrColorSrc2(TBS_PREV_COLOR), +mCurrAlphaSrc1(TBS_TEX_ALPHA), mCurrAlphaSrc2(TBS_PREV_ALPHA), +mCurrColorScale(1), mCurrAlphaScale(1) +{ + llassert_always(index < LL_NUM_TEXTURE_LAYERS); + mIndex = index; +} + +U32 LLTexUnit::getIndex(void) +{ + return mIndex; +} + +void LLTexUnit::enable(void) +{ + if (!mIsEnabled) + { + activate(); + glEnable(GL_TEXTURE_2D); + mIsEnabled = true; + } +} + +void LLTexUnit::disable(void) +{ + if (mIsEnabled) + { + activate(); + glDisable(GL_TEXTURE_2D); + mIsEnabled = false; + } +} + +void LLTexUnit::activate(void) +{ + //if (gGL.mCurrTextureUnitIndex != mIndex) + { + glActiveTextureARB(GL_TEXTURE0_ARB + mIndex); + gGL.mCurrTextureUnitIndex = mIndex; + } +} + +// Useful for debugging that you've manually assigned a texture operation to the correct +// texture unit based on the currently set active texture in opengl. +void LLTexUnit::debugTextureUnit(void) +{ + GLint activeTexture; + glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &activeTexture); + if ((GL_TEXTURE0_ARB + mIndex) != activeTexture) + { + llerrs << "Incorrect Texture Unit! Expected: " << (activeTexture - GL_TEXTURE0_ARB) << " Actual: " << mIndex << llendl; + } +} + +void LLTexUnit::bindTexture(const LLImageGL* texture) +{ + if (texture != NULL) + { + activate(); + texture->bind(mIndex); + } +} + +void LLTexUnit::unbindTexture(void) +{ + activate(); + glBindTexture(GL_TEXTURE_2D, 0); +} + +void LLTexUnit::setTextureBlendType(eTextureBlendType type) +{ + // Do nothing if it's already correctly set. + if (mCurrBlendType == type) + { + return; + } + + activate(); + mCurrBlendType = type; + S32 scale_amount = 1; + switch (type) + { + case TB_REPLACE: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + break; + case TB_ADD: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD); + break; + case TB_MULT: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + break; + case TB_MULT_X2: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + scale_amount = 2; + break; + case TB_ALPHA_BLEND: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); + break; + case TB_COMBINE: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + break; + default: + llerrs << "Unknown Texture Blend Type: " << type << llendl; + break; + } + setColorScale(scale_amount); + setAlphaScale(1); +} + +GLint LLTexUnit::getTextureSource(eTextureBlendSrc src) +{ + switch(src) + { + // All four cases should return the same value. + case TBS_PREV_COLOR: + case TBS_PREV_ALPHA: + case TBS_ONE_MINUS_PREV_COLOR: + case TBS_ONE_MINUS_PREV_ALPHA: + return GL_PREVIOUS_ARB; + + // All four cases should return the same value. + case TBS_TEX_COLOR: + case TBS_TEX_ALPHA: + case TBS_ONE_MINUS_TEX_COLOR: + case TBS_ONE_MINUS_TEX_ALPHA: + return GL_TEXTURE; + + // All four cases should return the same value. + case TBS_VERT_COLOR: + case TBS_VERT_ALPHA: + case TBS_ONE_MINUS_VERT_COLOR: + case TBS_ONE_MINUS_VERT_ALPHA: + return GL_PRIMARY_COLOR_ARB; + + // All four cases should return the same value. + case TBS_CONST_COLOR: + case TBS_CONST_ALPHA: + case TBS_ONE_MINUS_CONST_COLOR: + case TBS_ONE_MINUS_CONST_ALPHA: + return GL_CONSTANT_ARB; + + default: + llwarns << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << llendl; + return GL_PRIMARY_COLOR_ARB; + } +} + +GLint LLTexUnit::getTextureSourceType(eTextureBlendSrc src, bool isAlpha) +{ + switch(src) + { + // All four cases should return the same value. + case TBS_PREV_COLOR: + case TBS_TEX_COLOR: + case TBS_VERT_COLOR: + case TBS_CONST_COLOR: + return (isAlpha) ? GL_SRC_ALPHA: GL_SRC_COLOR; + + // All four cases should return the same value. + case TBS_PREV_ALPHA: + case TBS_TEX_ALPHA: + case TBS_VERT_ALPHA: + case TBS_CONST_ALPHA: + return GL_SRC_ALPHA; + + // All four cases should return the same value. + case TBS_ONE_MINUS_PREV_COLOR: + case TBS_ONE_MINUS_TEX_COLOR: + case TBS_ONE_MINUS_VERT_COLOR: + case TBS_ONE_MINUS_CONST_COLOR: + return (isAlpha) ? GL_ONE_MINUS_SRC_ALPHA : GL_ONE_MINUS_SRC_COLOR; + + // All four cases should return the same value. + case TBS_ONE_MINUS_PREV_ALPHA: + case TBS_ONE_MINUS_TEX_ALPHA: + case TBS_ONE_MINUS_VERT_ALPHA: + case TBS_ONE_MINUS_CONST_ALPHA: + return GL_ONE_MINUS_SRC_ALPHA; + + default: + llwarns << "Unknown eTextureBlendSrc: " << src << ". Using Source Color or Alpha instead." << llendl; + return (isAlpha) ? GL_SRC_ALPHA: GL_SRC_COLOR; + } +} + +void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eTextureBlendSrc src2, bool isAlpha) +{ + activate(); + if (mCurrBlendType != TB_COMBINE) + { + mCurrBlendType = TB_COMBINE; + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); + } + + // We want an early out, because this function does a LOT of stuff. + if ( (isAlpha && (mCurrAlphaOp == op) && (mCurrAlphaSrc1 == src1) && (mCurrAlphaSrc2 == src2) ) + || (!isAlpha && (mCurrColorOp == op) && (mCurrColorSrc1 == src1) && (mCurrColorSrc2 == src2) )) + { + return; + } + + // Get the gl source enums according to the eTextureBlendSrc sources passed in + GLint source1 = getTextureSource(src1); + GLint source2 = getTextureSource(src2); + // Get the gl operand enums according to the eTextureBlendSrc sources passed in + GLint operand1 = getTextureSourceType(src1, isAlpha); + GLint operand2 = getTextureSourceType(src2, isAlpha); + // Default the scale amount to 1 + S32 scale_amount = 1; + GLenum comb_enum, src0_enum, src1_enum, src2_enum, operand0_enum, operand1_enum, operand2_enum; + + if (isAlpha) + { + // Set enums to ALPHA ones + comb_enum = GL_COMBINE_ALPHA_ARB; + src0_enum = GL_SOURCE0_ALPHA_ARB; + src1_enum = GL_SOURCE1_ALPHA_ARB; + src2_enum = GL_SOURCE2_ALPHA_ARB; + operand0_enum = GL_OPERAND0_ALPHA_ARB; + operand1_enum = GL_OPERAND1_ALPHA_ARB; + operand2_enum = GL_OPERAND2_ALPHA_ARB; + + // cache current combiner + mCurrAlphaOp = op; + mCurrAlphaSrc1 = src1; + mCurrAlphaSrc2 = src2; + } + else + { + // Set enums to ALPHA ones + comb_enum = GL_COMBINE_RGB_ARB; + src0_enum = GL_SOURCE0_RGB_ARB; + src1_enum = GL_SOURCE1_RGB_ARB; + src2_enum = GL_SOURCE2_RGB_ARB; + operand0_enum = GL_OPERAND0_RGB_ARB; + operand1_enum = GL_OPERAND1_RGB_ARB; + operand2_enum = GL_OPERAND2_RGB_ARB; + + // cache current combiner + mCurrColorOp = op; + mCurrColorSrc1 = src1; + mCurrColorSrc2 = src2; + } + + switch(op) + { + case TBO_REPLACE: + // Slightly special syntax (no second sources), just set all and return. + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, src0_enum, source1); + glTexEnvi(GL_TEXTURE_ENV, operand0_enum, operand1); + (isAlpha) ? setAlphaScale(1) : setColorScale(1); + return; + + case TBO_MULT: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_MODULATE); + break; + + case TBO_MULT_X2: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_MODULATE); + scale_amount = 2; + break; + + case TBO_MULT_X4: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_MODULATE); + scale_amount = 4; + break; + + case TBO_ADD: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_ADD); + break; + + case TBO_ADD_SIGNED: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_ADD_SIGNED_ARB); + break; + + case TBO_SUBTRACT: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_SUBTRACT_ARB); + break; + + case TBO_LERP_VERT_ALPHA: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_INTERPOLATE); + glTexEnvi(GL_TEXTURE_ENV, src2_enum, GL_PRIMARY_COLOR_ARB); + glTexEnvi(GL_TEXTURE_ENV, operand2_enum, GL_SRC_ALPHA); + break; + + case TBO_LERP_TEX_ALPHA: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_INTERPOLATE); + glTexEnvi(GL_TEXTURE_ENV, src2_enum, GL_TEXTURE); + glTexEnvi(GL_TEXTURE_ENV, operand2_enum, GL_SRC_ALPHA); + break; + + case TBO_LERP_PREV_ALPHA: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_INTERPOLATE); + glTexEnvi(GL_TEXTURE_ENV, src2_enum, GL_PREVIOUS_ARB); + glTexEnvi(GL_TEXTURE_ENV, operand2_enum, GL_SRC_ALPHA); + break; + + case TBO_LERP_CONST_ALPHA: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_INTERPOLATE); + glTexEnvi(GL_TEXTURE_ENV, src2_enum, GL_CONSTANT_ARB); + glTexEnvi(GL_TEXTURE_ENV, operand2_enum, GL_SRC_ALPHA); + break; + + case TBO_LERP_VERT_COLOR: + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_INTERPOLATE); + glTexEnvi(GL_TEXTURE_ENV, src2_enum, GL_PRIMARY_COLOR_ARB); + glTexEnvi(GL_TEXTURE_ENV, operand2_enum, (isAlpha) ? GL_SRC_ALPHA : GL_SRC_COLOR); + break; + + default: + llwarns << "Unknown eTextureBlendOp: " << op << ". Setting op to replace." << llendl; + // Slightly special syntax (no second sources), just set all and return. + glTexEnvi(GL_TEXTURE_ENV, comb_enum, GL_REPLACE); + glTexEnvi(GL_TEXTURE_ENV, src0_enum, source1); + glTexEnvi(GL_TEXTURE_ENV, operand0_enum, operand1); + (isAlpha) ? setAlphaScale(1) : setColorScale(1); + return; + } + + // Set sources, operands, and scale accordingly + glTexEnvi(GL_TEXTURE_ENV, src0_enum, source1); + glTexEnvi(GL_TEXTURE_ENV, operand0_enum, operand1); + glTexEnvi(GL_TEXTURE_ENV, src1_enum, source2); + glTexEnvi(GL_TEXTURE_ENV, operand1_enum, operand2); + (isAlpha) ? setAlphaScale(scale_amount) : setColorScale(scale_amount); +} + +void LLTexUnit::setColorScale(S32 scale) +{ + if (mCurrColorScale != scale) + { + mCurrColorScale = scale; + glTexEnvi( GL_TEXTURE_ENV, GL_RGB_SCALE, scale ); + } +} + +void LLTexUnit::setAlphaScale(S32 scale) +{ + if (mCurrAlphaScale != scale) + { + mCurrAlphaScale = scale; + glTexEnvi( GL_TEXTURE_ENV, GL_ALPHA_SCALE, scale ); + } +} + +LLRender::LLRender() +{ + mCount = 0; + mMode = LLVertexBuffer::TRIANGLES; + mBuffer = new LLVertexBuffer(immediate_mask, 0); + mBuffer->allocateBuffer(4096, 0, TRUE); + mBuffer->getVertexStrider(mVerticesp); + mBuffer->getTexCoordStrider(mTexcoordsp); + mBuffer->getColorStrider(mColorsp); + + for (unsigned int i = 0; i < LL_NUM_TEXTURE_LAYERS; i++) + { + mTexUnits.push_back(new LLTexUnit(i)); + } +} + +LLRender::~LLRender() +{ + for (U32 i = 0; i < mTexUnits.size(); i++) + { + delete mTexUnits[i]; + } +} + +void LLRender::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z) +{ + flush(); + glTranslatef(x,y,z); +} + +void LLRender::pushMatrix() +{ + flush(); + glPushMatrix(); +} + +void LLRender::popMatrix() +{ + flush(); + glPopMatrix(); +} + +void LLRender::setColorMask(bool writeColor, bool writeAlpha) +{ + setColorMask(writeColor, writeColor, writeColor, writeAlpha); +} + +void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB, bool writeAlpha) +{ + flush(); + glColorMask(writeColorR, writeColorG, writeColorB, writeAlpha); +} + +void LLRender::setSceneBlendType(eBlendType type) +{ + flush(); + switch (type) + { + case BT_ALPHA: + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + break; + case BT_ADD: + glBlendFunc(GL_ONE, GL_ONE); + break; + case BT_ADD_WITH_ALPHA: + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + break; + case BT_MULT: + glBlendFunc(GL_DST_COLOR, GL_ZERO); + break; + case BT_MULT_X2: + glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR); + break; + case BT_REPLACE: + glBlendFunc(GL_ONE, GL_ZERO); + break; + default: + llerrs << "Unknown Scene Blend Type: " << type << llendl; + break; + } +} + +void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) +{ + flush(); + if (func == CF_DEFAULT) + { + glAlphaFunc(GL_GREATER, 0.01f); + } + else + { + glAlphaFunc(sGLCompareFunc[func], value); + } +} + +void LLRender::blendFunc(eBlendFactor sfactor, eBlendFactor dfactor) +{ + flush(); + glBlendFunc(sGLBlendFactor[sfactor], sGLBlendFactor[dfactor]); +} + +LLTexUnit* LLRender::getTexUnit(U32 index) +{ + if (index < mTexUnits.size()) + { + return mTexUnits[index]; + } + llerrs << "Non-existing texture unit layer requested: " << index << llendl; + return NULL; +} + +void LLRender::begin(const GLuint& mode) +{ + if (mode != mMode) + { + if (mMode == LLVertexBuffer::QUADS || + mMode == LLVertexBuffer::LINES || + mMode == LLVertexBuffer::TRIANGLES || + mMode == LLVertexBuffer::POINTS) + { + flush(); + } + else if (mCount != 0) + { + llerrs << "gGL.begin() called redundantly." << llendl; + } + + mMode = mode; + } +} + +void LLRender::end() +{ + if (mCount == 0) + { + return; + //IMM_ERRS << "GL begin and end called with no vertices specified." << llendl; + } + + if ((mMode != LLVertexBuffer::QUADS && + mMode != LLVertexBuffer::LINES && + mMode != LLVertexBuffer::TRIANGLES && + mMode != LLVertexBuffer::POINTS) || + mCount > 2048) + { + flush(); + } +} +void LLRender::flush() +{ + if (mCount > 0) + { +#if 0 + if (!glIsEnabled(GL_VERTEX_ARRAY)) + { + llerrs << "foo 1" << llendl; + } + + if (!glIsEnabled(GL_COLOR_ARRAY)) + { + llerrs << "foo 2" << llendl; + } + + if (!glIsEnabled(GL_TEXTURE_COORD_ARRAY)) + { + llerrs << "foo 3" << llendl; + } + + if (glIsEnabled(GL_NORMAL_ARRAY)) + { + llerrs << "foo 7" << llendl; + } + + GLvoid* pointer; + + glGetPointerv(GL_VERTEX_ARRAY_POINTER, &pointer); + if (pointer != &(mBuffer[0].v)) + { + llerrs << "foo 4" << llendl; + } + + glGetPointerv(GL_COLOR_ARRAY_POINTER, &pointer); + if (pointer != &(mBuffer[0].c)) + { + llerrs << "foo 5" << llendl; + } + + glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &pointer); + if (pointer != &(mBuffer[0].uv)) + { + llerrs << "foo 6" << llendl; + } +#endif + + mBuffer->setBuffer(immediate_mask); + mBuffer->drawArrays(mMode, 0, mCount); + + mVerticesp[0] = mVerticesp[mCount]; + mTexcoordsp[0] = mTexcoordsp[mCount]; + mColorsp[0] = mColorsp[mCount]; + mCount = 0; + } +} +void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z) +{ + if (mCount >= 4096) + { + // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl; + return; + } + + mVerticesp[mCount] = LLVector3(x,y,z); + mCount++; + if (mCount < 4096) + { + mVerticesp[mCount] = mVerticesp[mCount-1]; + mColorsp[mCount] = mColorsp[mCount-1]; + mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; + } +} +void LLRender::vertex2i(const GLint& x, const GLint& y) +{ + vertex3f((GLfloat) x, (GLfloat) y, 0); +} + +void LLRender::vertex2f(const GLfloat& x, const GLfloat& y) +{ + vertex3f(x,y,0); +} + +void LLRender::vertex2fv(const GLfloat* v) +{ + vertex3f(v[0], v[1], 0); +} + +void LLRender::vertex3fv(const GLfloat* v) +{ + vertex3f(v[0], v[1], v[2]); +} + +void LLRender::texCoord2f(const GLfloat& x, const GLfloat& y) +{ + mTexcoordsp[mCount] = LLVector2(x,y); +} + +void LLRender::texCoord2i(const GLint& x, const GLint& y) +{ + texCoord2f((GLfloat) x, (GLfloat) y); +} + +void LLRender::texCoord2fv(const GLfloat* tc) +{ + texCoord2f(tc[0], tc[1]); +} + +void LLRender::color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a) +{ + mColorsp[mCount] = LLColor4U(r,g,b,a); +} +void LLRender::color4ubv(const GLubyte* c) +{ + color4ub(c[0], c[1], c[2], c[3]); +} + +void LLRender::color4f(const GLfloat& r, const GLfloat& g, const GLfloat& b, const GLfloat& a) +{ + color4ub((GLubyte) (llclamp(r, 0.f, 1.f)*255), + (GLubyte) (llclamp(g, 0.f, 1.f)*255), + (GLubyte) (llclamp(b, 0.f, 1.f)*255), + (GLubyte) (llclamp(a, 0.f, 1.f)*255)); +} + +void LLRender::color4fv(const GLfloat* c) +{ + color4f(c[0],c[1],c[2],c[3]); +} + +void LLRender::color3f(const GLfloat& r, const GLfloat& g, const GLfloat& b) +{ + color4f(r,g,b,1); +} + +void LLRender::color3fv(const GLfloat* c) +{ + color4f(c[0],c[1],c[2],1); +} + diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h new file mode 100644 index 0000000000..2fa3237ef9 --- /dev/null +++ b/indra/llrender/llrender.h @@ -0,0 +1,239 @@ +/** + * @file llrender.h + * @brief LLRender definition + * + * This class acts as a wrapper for OpenGL calls. + * The goal of this class is to minimize the number of api calls due to legacy rendering + * code, to define an interface for a multiple rendering API abstraction of the UI + * rendering, and to abstract out direct rendering calls in a way that is cleaner and easier to maintain. + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2007, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLGLRENDER_H +#define LL_LLGLRENDER_H + +#include "stdtypes.h" +#include "llgltypes.h" +#include "llglheaders.h" +#include "llvertexbuffer.h" + +class LLTexUnit +{ +public: + typedef enum + { + TB_REPLACE = 0, + TB_ADD, + TB_MULT, + TB_MULT_X2, + TB_ALPHA_BLEND, + TB_COMBINE // Doesn't need to be set directly, setTexture___Blend() set TB_COMBINE automatically + } eTextureBlendType; + + typedef enum + { + TBO_REPLACE = 0, // Use Source 1 + TBO_MULT, // Multiply: ( Source1 * Source2 ) + TBO_MULT_X2, // Multiply then scale by 2: ( 2.0 * ( Source1 * Source2 ) ) + TBO_MULT_X4, // Multiply then scale by 4: ( 4.0 * ( Source1 * Source2 ) ) + TBO_ADD, // Add: ( Source1 + Source2 ) + TBO_ADD_SIGNED, // Add then subtract 0.5: ( ( Source1 + Source2 ) - 0.5 ) + TBO_SUBTRACT, // Subtract Source2 from Source1: ( Source1 - Source2 ) + TBO_LERP_VERT_ALPHA, // Interpolate based on Vertex Alpha (VA): ( Source1 * VA + Source2 * (1-VA) ) + TBO_LERP_TEX_ALPHA, // Interpolate based on Texture Alpha (TA): ( Source1 * TA + Source2 * (1-TA) ) + TBO_LERP_PREV_ALPHA, // Interpolate based on Previous Alpha (PA): ( Source1 * PA + Source2 * (1-PA) ) + TBO_LERP_CONST_ALPHA, // Interpolate based on Const Alpha (CA): ( Source1 * CA + Source2 * (1-CA) ) + TBO_LERP_VERT_COLOR // Interpolate based on Vertex Col (VC): ( Source1 * VC + Source2 * (1-VC) ) + // *Note* TBO_LERP_VERTEX_COLOR only works with setTextureColorBlend(), + // and falls back to TBO_LERP_VERTEX_ALPHA for setTextureAlphaBlend(). + } eTextureBlendOp; + + typedef enum + { + TBS_PREV_COLOR = 0, // Color from the previous texture stage + TBS_PREV_ALPHA, + TBS_ONE_MINUS_PREV_COLOR, + TBS_ONE_MINUS_PREV_ALPHA, + TBS_TEX_COLOR, // Color from the texture bound to this stage + TBS_TEX_ALPHA, + TBS_ONE_MINUS_TEX_COLOR, + TBS_ONE_MINUS_TEX_ALPHA, + TBS_VERT_COLOR, // The vertex color currently set + TBS_VERT_ALPHA, + TBS_ONE_MINUS_VERT_COLOR, + TBS_ONE_MINUS_VERT_ALPHA, + TBS_CONST_COLOR, // The constant color value currently set + TBS_CONST_ALPHA, + TBS_ONE_MINUS_CONST_COLOR, + TBS_ONE_MINUS_CONST_ALPHA + } eTextureBlendSrc; + + LLTexUnit(U32 index); + U32 getIndex(void); + + void enable(void); + void disable(void); + void activate(void); + + void bindTexture(const LLImageGL* texture); + void unbindTexture(void); + + void setTextureBlendType(eTextureBlendType type); + + inline void setTextureColorBlend(eTextureBlendOp op, eTextureBlendSrc src1, eTextureBlendSrc src2 = TBS_PREV_COLOR) + { setTextureCombiner(op, src1, src2, false); } + + // NOTE: If *_COLOR enums are passed to src1 or src2, the corresponding *_ALPHA enum will be used instead. + inline void setTextureAlphaBlend(eTextureBlendOp op, eTextureBlendSrc src1, eTextureBlendSrc src2 = TBS_PREV_ALPHA) + { setTextureCombiner(op, src1, src2, true); } + +private: + U32 mIndex; + bool mIsEnabled; + eTextureBlendType mCurrBlendType; + eTextureBlendOp mCurrColorOp; + eTextureBlendSrc mCurrColorSrc1; + eTextureBlendSrc mCurrColorSrc2; + eTextureBlendOp mCurrAlphaOp; + eTextureBlendSrc mCurrAlphaSrc1; + eTextureBlendSrc mCurrAlphaSrc2; + S32 mCurrColorScale; + S32 mCurrAlphaScale; + + void debugTextureUnit(void); + void setColorScale(S32 scale); + void setAlphaScale(S32 scale); + GLint getTextureSource(eTextureBlendSrc src); + GLint getTextureSourceType(eTextureBlendSrc src, bool isAlpha = false); + void setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eTextureBlendSrc src2, bool isAlpha = false); +}; + +class LLRender +{ + friend class LLTexUnit; +public: + typedef enum + { + CF_NEVER = 0, + CF_ALWAYS, + CF_LESS, + CF_LESS_EQUAL, + CF_EQUAL, + CF_NOT_EQUAL, + CF_GREATER_EQUAL, + CF_GREATER, + CF_DEFAULT + } eCompareFunc; + + typedef enum + { + BT_ALPHA = 0, + BT_ADD, + BT_ADD_WITH_ALPHA, // Additive blend modulated by the fragment's alpha. + BT_MULT, + BT_MULT_X2, + BT_REPLACE + } eBlendType; + + typedef enum + { + BF_ONE = 0, + BF_ZERO, + BF_DEST_COLOR, + BF_SOURCE_COLOR, + BF_ONE_MINUS_DEST_COLOR, + BF_ONE_MINUS_SOURCE_COLOR, + BF_DEST_ALPHA, + BF_SOURCE_ALPHA, + BF_ONE_MINUS_DEST_ALPHA, + BF_ONE_MINUS_SOURCE_ALPHA + } eBlendFactor; + + LLRender(); + ~LLRender(); + + void translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z); + void pushMatrix(); + void popMatrix(); + + void flush(); + + void begin(const GLuint& mode); + void end(); + void vertex2i(const GLint& x, const GLint& y); + void vertex2f(const GLfloat& x, const GLfloat& y); + void vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z); + void vertex2fv(const GLfloat* v); + void vertex3fv(const GLfloat* v); + + void texCoord2i(const GLint& x, const GLint& y); + void texCoord2f(const GLfloat& x, const GLfloat& y); + void texCoord2fv(const GLfloat* tc); + + void color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a); + void color4f(const GLfloat& r, const GLfloat& g, const GLfloat& b, const GLfloat& a); + void color4fv(const GLfloat* c); + void color3f(const GLfloat& r, const GLfloat& g, const GLfloat& b); + void color3fv(const GLfloat* c); + void color4ubv(const GLubyte* c); + + void setColorMask(bool writeColor, bool writeAlpha); + void setColorMask(bool writeColorR, bool writeColorG, bool writeColorB, bool writeAlpha); + void setSceneBlendType(eBlendType type); + + void setAlphaRejectSettings(eCompareFunc func, F32 value = 0.01f); + + void blendFunc(eBlendFactor sfactor, eBlendFactor dfactor); + + LLTexUnit* getTexUnit(U32 index); + + typedef struct Vertex + { + GLfloat v[3]; + GLubyte c[4]; + GLfloat uv[2]; + }; + +public: + +private: + U32 mCount; + U32 mMode; + U32 mCurrTextureUnitIndex; + LLPointer mBuffer; + LLStrider mVerticesp; + LLStrider mTexcoordsp; + LLStrider mColorsp; + std::vector mTexUnits; +}; + + + +extern LLRender gGL; + +#endif diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 5111c7ae2d..885ccde2d1 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -32,7 +32,7 @@ #include "linden_common.h" #include "llrendertarget.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llgl.h" @@ -181,6 +181,7 @@ void LLRenderTarget::clear() { LLGLEnable scissor(GL_SCISSOR_TEST); glScissor(0, 0, mResX, mResY); + stop_glerror(); glClear(mask); } } diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 2f053a6493..d79a0d6034 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -38,7 +38,7 @@ #include "llglheaders.h" #include "llmemory.h" #include "llmemtype.h" -#include "llglimmediate.h" +#include "llrender.h" //============================================================================ @@ -768,11 +768,26 @@ U8* LLVertexBuffer::mapBuffer(S32 access) sMapped = TRUE;*/ if (!mMappedData) { + GLint buff; + glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); + if (buff != mGLBuffer) + { + llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; + } + + llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl; } if (!mMappedIndexData) { + GLint buff; + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); + if (buff != mGLIndices) + { + llerrs << "Invalid GL index buffer bound: " << buff << llendl; + } + llerrs << "glMapBuffer returned NULL (no index data)" << llendl; } @@ -952,6 +967,22 @@ void LLVertexBuffer::setBuffer(U32 data_mask) sIBOActive = TRUE; } + if (gDebugGL) + { + GLint buff; + glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); + if (buff != mGLBuffer) + { + llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; + } + + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); + if (buff != mGLIndices) + { + llerrs << "Invalid GL index buffer bound: " << buff << llendl; + } + } + if (mResized) { if (gDebugGL) diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 4fa2a3de92..b8cf8f7984 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -45,7 +45,7 @@ #include "llcriticaldamp.h" #include "llfocusmgr.h" #include "llwindow.h" -#include "llglimmediate.h" +#include "llrender.h" static LLRegisterWidget r("button"); @@ -571,9 +571,9 @@ void LLButton::draw() mImagep->draw(getLocalRect(), getEnabled() ? mImageColor : mDisabledImageColor ); if (mCurGlowStrength > 0.01f) { - glBlendFunc(GL_SRC_ALPHA, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); mImagep->drawSolid(0, 0, getRect().getWidth(), getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } } else @@ -581,9 +581,9 @@ void LLButton::draw() mImagep->draw(0, 0, getEnabled() ? mImageColor : mDisabledImageColor ); if (mCurGlowStrength > 0.01f) { - glBlendFunc(GL_SRC_ALPHA, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); mImagep->drawSolid(0, 0, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } } } diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 538641d060..98a79fa650 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -783,8 +783,18 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask) mList->highlightNthItem(mList->getItemIndex(last_selected_item)); } result = mList->handleKeyHere(key, mask); + + // will only see return key if it is originating from line editor + // since the dropdown button eats the key + if (key == KEY_RETURN) + { + // don't show list and don't eat key input when committing + // free-form text entry with RETURN since user already knows + // what they are trying to select + return FALSE; + } // if selection has changed, pop open list - if (mList->getLastSelectedItem() != last_selected_item) + else if (mList->getLastSelectedItem() != last_selected_item) { showList(); } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index c2b2e08755..62b86a6ad7 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -46,7 +46,7 @@ #include "llmenugl.h" #include "llmath.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llfocusmgr.h" #include "llfont.h" #include "llcoord.h" diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index 3536e6bb03..5bc2c5cf85 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -44,7 +44,7 @@ #include "llfocusmgr.h" #include "llwindow.h" #include "llcontrol.h" -#include "llglimmediate.h" +#include "llrender.h" LLScrollbar::LLScrollbar( const LLString& name, LLRect rect, @@ -518,9 +518,9 @@ void LLScrollbar::draw() rounded_rect_imagep->draw(mThumbRect, mThumbColor); if (mCurGlowStrength > 0.01f) { - glBlendFunc(GL_SRC_ALPHA, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); rounded_rect_imagep->drawSolid(mThumbRect, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } } diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 72fe2040af..3cb4ecc172 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -32,7 +32,7 @@ #include "linden_common.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llscrollcontainer.h" #include "llscrollbar.h" #include "llui.h" diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index c923f6b116..b4a2ed874a 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -42,7 +42,7 @@ #include "llcheckboxctrl.h" #include "llclipboard.h" #include "llfocusmgr.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llresmgr.h" #include "llscrollbar.h" #include "llstring.h" @@ -1110,6 +1110,8 @@ BOOL LLScrollListCtrl::selectItemRange( S32 first_index, S32 last_index ) for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++) { LLScrollListItem *itemp = *iter; + + llassert_always(itemp) ; if( index >= first_index && index <= last_index ) { if( itemp->getEnabled() ) diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp index 336fdfe2c3..38608745c1 100644 --- a/indra/llui/llstyle.cpp +++ b/indra/llui/llstyle.cpp @@ -102,7 +102,7 @@ LLStyle &LLStyle::operator=(const LLStyle &rhs) mItalic = rhs.mItalic; mBold = rhs.mBold; mUnderline = rhs.mUnderline; - mDropShadow = rhs.mUnderline; + mDropShadow = rhs.mDropShadow; mIsEmbeddedItem = rhs.mIsEmbeddedItem; } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index fabdbd6860..ccf6e90161 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -40,7 +40,7 @@ #include "llcriticaldamp.h" #include "lluictrlfactory.h" #include "lltabcontainervertical.h" -#include "llglimmediate.h" +#include "llrender.h" const F32 SCROLL_STEP_TIME = 0.4f; const F32 SCROLL_DELAY_TIME = 0.5f; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 8264f0cf87..06df996088 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -36,7 +36,7 @@ #include "lltexteditor.h" #include "llfontgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llui.h" #include "lluictrlfactory.h" #include "llrect.h" diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 1a238ce7fa..6ef485d82c 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -41,7 +41,7 @@ #include "audioengine.h" #include "v2math.h" #include "v4color.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llrect.h" #include "llimagegl.h" #include "lldir.h" @@ -487,18 +487,8 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma if (solid_color) { - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); } gGL.pushMatrix(); @@ -634,7 +624,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma if (solid_color) { - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index fa78534a83..a239968e5d 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -37,7 +37,7 @@ #include #include -#include "llglimmediate.h" +#include "llrender.h" #include "llevent.h" #include "llfontgl.h" #include "llfocusmgr.h" diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp index d3559baec6..2148957ce3 100644 --- a/indra/llui/llviewborder.cpp +++ b/indra/llui/llviewborder.cpp @@ -30,7 +30,7 @@ #include "linden_common.h" #include "llviewborder.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llfocusmgr.h" static LLRegisterWidget r("view_border"); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 3ed566062f..e715080916 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -605,8 +605,6 @@ LLWindowWin32::LLWindowWin32(const char *title, const char *name, S32 x, S32 y, // Initialize (boot strap) the Language text input management, // based on the system's (or user's) default settings. allowLanguageTextInput(NULL, FALSE); - - SetTimer( mWindowHandle, 0, 1000 / 30, NULL ); // 30 fps timer } @@ -1349,6 +1347,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO //make sure multi sampling is disabled by default glDisable(GL_MULTISAMPLE_ARB); + //register joystick timer callback + SetTimer( mWindowHandle, 0, 1000 / 30, NULL ); // 30 fps timer // ok to post quit messages now mPostQuit = TRUE; diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index ef6e32a7a0..cb0c4f001a 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -58,36 +58,45 @@ //this defines the current version of the settings file const S32 CURRENT_VERSION = 101; -BOOL LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b) +bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b) { + bool result = false; switch (mType) { case TYPE_U32: case TYPE_S32: - return a.asInteger() == b.asInteger(); + result = a.asInteger() == b.asInteger(); + break; case TYPE_BOOLEAN: - return a.asBoolean() == b.asBoolean(); + result = a.asBoolean() == b.asBoolean(); + break; case TYPE_F32: - return a.asReal() == b.asReal(); + result = a.asReal() == b.asReal(); + break; case TYPE_VEC3: case TYPE_VEC3D: - return LLVector3d(a) == LLVector3d(b); + result = LLVector3d(a) == LLVector3d(b); + break; case TYPE_RECT: - return LLRect(a) == LLRect(b); + result = LLRect(a) == LLRect(b); + break; case TYPE_COL4: - return LLColor4(a) == LLColor4(b); + result = LLColor4(a) == LLColor4(b); + break; case TYPE_COL3: - return LLColor3(a) == LLColor3(b); + result = LLColor3(a) == LLColor3(b); + break; case TYPE_COL4U: - return LLColor4U(a) == LLColor4U(b); + result = LLColor4U(a) == LLColor4U(b); + break; case TYPE_STRING: - return a.asString() == b.asString(); + result = a.asString() == b.asString(); + break; default: - // no-op break; } - return FALSE; + return result; } LLControlVariable::LLControlVariable(const LLString& name, eControlType type, @@ -114,14 +123,34 @@ LLControlVariable::~LLControlVariable() void LLControlVariable::setValue(const LLSD& value, bool saved_value) { - bool value_changed = llsd_compare(getValue(), value) == FALSE; + // *FIX:MEP - The following is needed to make the LLSD::ImplString + // work with boolean controls... + LLSD storable_value; + if(TYPE_BOOLEAN == type() && value.isString()) + { + BOOL temp; + if(LLString::convertToBOOL(value.asString(), temp)) + { + storable_value = temp; + } + else + { + storable_value = FALSE; + } + } + else + { + storable_value = value; + } + + bool value_changed = llsd_compare(getValue(), storable_value) == FALSE; if(saved_value) { // If we're going to save this value, return to default but don't fire resetToDefault(false); - if (llsd_compare(mValues.back(), value) == FALSE) + if (llsd_compare(mValues.back(), storable_value) == FALSE) { - mValues.push_back(value); + mValues.push_back(storable_value); } } else @@ -129,7 +158,7 @@ void LLControlVariable::setValue(const LLSD& value, bool saved_value) // This is a unsaved value. Its needs to reside at // mValues[2] (or greater). It must not affect // the result of getSaveValue() - if (llsd_compare(mValues.back(), value) == FALSE) + if (llsd_compare(mValues.back(), storable_value) == FALSE) { while(mValues.size() > 2) { @@ -144,13 +173,14 @@ void LLControlVariable::setValue(const LLSD& value, bool saved_value) } // Add the 'un-save' value. - mValues.push_back(value); + mValues.push_back(storable_value); } } + if(value_changed) { - mSignal(value); + mSignal(storable_value); } } @@ -1147,3 +1177,4 @@ void main() #endif + diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 7287731cfa..fdbbe11b91 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -127,7 +127,7 @@ public: { mSignal(mValues.back()); } - BOOL llsd_compare(const LLSD& a, const LLSD& b); + bool llsd_compare(const LLSD& a, const LLSD& b); }; //const U32 STRING_CACHE_SIZE = 10000; diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 6012c011c1..7272173fed 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.19.1.84396"; -CFBundleGetInfoString = "Second Life version 1.19.1.84396, Copyright 2004-2008 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.20.6.86975"; +CFBundleGetInfoString = "Second Life version 1.20.6.86975, Copyright 2004-2008 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 62f5ea167d..fa50503545 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.19.1.84396 + 1.20.6.86975 CSResourcesFileMapped diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index ec12794bc5..746e56d821 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -49,7 +49,7 @@ count 1 map-to - GridChoice + CmdLineGridChoice loginuri @@ -61,7 +61,7 @@ compose true map-to - LoginURI + CmdLineLoginURI helperuri @@ -71,7 +71,7 @@ count 1 map-to - HelperURI + CmdLineHelperURI debugviews diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 165582c0a7..987ae79d59 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1,3813 +1,4177 @@ + + + AFKTimeout + Comment + Time before automatically setting AFK (away from keyboard) mode (seconds) + Persist + 1 + Type + F32 + Value + 300.0 + AdvanceSnapshot - - Comment - Display advanced parameter settings in snaphot interface - Persist - 1 - Type - Boolean - Value - 0 - - AFKTimeout - - Comment - Time before automatically setting AFK (away from keyboard) mode (seconds) - Persist - 1 - Type - F32 - Value - 300 - + + Comment + Display advanced parameter settings in snaphot interface + Persist + 1 + Type + Boolean + Value + 0 + AgentChatColor - - Comment - Color of chat messages from other residents - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - - IMChatColor - - Comment - Color of instant messages from other residents - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - + + Comment + Color of chat messages from other residents + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + AllowIdleAFK - - Comment - Automatically set AFK (away from keyboard) mode when idle - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Automatically set AFK (away from keyboard) mode when idle + Persist + 1 + Type + Boolean + Value + 1 + AllowMultipleViewers - - Comment - Allow multiple viewers. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Allow multiple viewers. + Persist + 1 + Type + Boolean + Value + 0 + AllowTapTapHoldRun - - Comment - Tapping a direction key twice and holding it down makes avatar run - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Tapping a direction key twice and holding it down makes avatar run + Persist + 1 + Type + Boolean + Value + 1 + AnimateTextures - - Comment - Enable texture animation (debug) - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enable texture animation (debug) + Persist + 1 + Type + Boolean + Value + 1 + AnimationDebug - - Comment - Show active animations in a bubble above avatars head - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show active animations in a bubble above avatars head + Persist + 1 + Type + Boolean + Value + 0 + AppearanceCameraMovement - - Comment - When entering appearance editing mode, camera zooms in on currently selected portion of avatar - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + When entering appearance editing mode, camera zooms in on currently selected portion of avatar + Persist + 1 + Type + Boolean + Value + 1 + ApplyColorImmediately - - Comment - Preview selections in color picker immediately - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Preview selections in color picker immediately + Persist + 1 + Type + Boolean + Value + 1 + ApplyTextureImmediately - - Comment - Preview selections in texture picker immediately - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Preview selections in texture picker immediately + Persist + 1 + Type + Boolean + Value + 1 + ArrowKeysMoveAvatar - - Comment - While cursor is in chat entry box, arrow keys still control your avatar - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + While cursor is in chat entry box, arrow keys still control your avatar + Persist + 1 + Type + Boolean + Value + 1 + AskedAboutCrashReports - - Comment - Turns off dialog asking if you want to enable crash reporting - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Turns off dialog asking if you want to enable crash reporting + Persist + 1 + Type + Boolean + Value + 0 + AsyncKeyboard - - Comment - Improves responsiveness to keyboard input when at low framerates - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Improves responsiveness to keyboard input when at low framerates + Persist + 1 + Type + Boolean + Value + 1 + AuctionShowFence - - Comment - When auctioning land, include parcel boundary marker in snapshot - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + When auctioning land, include parcel boundary marker in snapshot + Persist + 1 + Type + Boolean + Value + 1 + AudioLevelAmbient - - Comment - Audio level of environment sounds - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Audio level of environment sounds + Persist + 1 + Type + F32 + Value + 0.5 + AudioLevelDistance - - Comment - Scale factor for audio engine (multiple of world scale, 2.0 = audio falls off twice as fast) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Scale factor for audio engine (multiple of world scale, 2.0 = audio falls off twice as fast) + Persist + 1 + Type + F32 + Value + 1.0 + AudioLevelDoppler - - Comment - Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect) + Persist + 1 + Type + F32 + Value + 1.0 + AudioLevelMaster - - Comment - Master audio level, or overall volume - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Master audio level, or overall volume + Persist + 1 + Type + F32 + Value + 1.0 + AudioLevelMedia - - Comment - Audio level of Quicktime movies - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Audio level of Quicktime movies + Persist + 1 + Type + F32 + Value + 1.0 + AudioLevelMic - - Comment - Audio level of microphone input - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Audio level of microphone input + Persist + 1 + Type + F32 + Value + 1.0 + AudioLevelMusic - - Comment - Audio level of streaming music - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Audio level of streaming music + Persist + 1 + Type + F32 + Value + 1.0 + AudioLevelRolloff - - Comment - Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff) + Persist + 1 + Type + F32 + Value + 1.0 + AudioLevelSFX - - Comment - Audio level of in-world sound effects - Persist - 1 - Type - F32 - Value - 1 - - AudioLevelUI - - Comment - Audio level of UI sound effects - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Audio level of in-world sound effects + Persist + 1 + Type + F32 + Value + 1.0 + + AudioLevelUI + + Comment + Audio level of UI sound effects + Persist + 1 + Type + F32 + Value + 0.5 + AudioLevelVoice - - Comment - Audio level of voice chat - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Audio level of voice chat + Persist + 1 + Type + F32 + Value + 0.5 + AudioStreamingMusic - - Comment - Enable streaming audio - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable streaming audio + Persist + 1 + Type + Boolean + Value + 0 + AudioStreamingVideo - - Comment - Enable streaming video - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable streaming video + Persist + 1 + Type + Boolean + Value + 0 + AutoAcceptNewInventory - - Comment - Automatically accept new notecards/textures/landmarks - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Automatically accept new notecards/textures/landmarks + Persist + 1 + Type + Boolean + Value + 0 + + AutoLeveling + + Comment + Keep Flycam level. + Persist + 1 + Type + Boolean + Value + 1 + AutoLoadWebProfiles - - Comment - Automatically load ALL profile webpages without asking first. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Automatically load ALL profile webpages without asking first. + Persist + 1 + Type + Boolean + Value + 0 + AutoLogin - - Comment - Login automatically using last username/password combination - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Login automatically using last username/password combination + Persist + 0 + Type + Boolean + Value + 0 + AutoMimeDiscovery - - Comment - Enable viewer mime type discovery of media URLs - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable viewer mime type discovery of media URLs + Persist + 1 + Type + Boolean + Value + 0 + AutoPilotLocksCamera - - Comment - Keep camera position locked when avatar walks to selected position - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Keep camera position locked when avatar walks to selected position + Persist + 1 + Type + Boolean + Value + 0 + AutoSnapshot - - Comment - Update snapshot when camera stops moving, or any parameter changes - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Update snapshot when camera stops moving, or any parameter changes + Persist + 1 + Type + Boolean + Value + 0 + AutomaticFly - - Comment - Fly by holding jump key or using "Fly" command (FALSE = fly by using "Fly" command only) - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Fly by holding jump key or using "Fly" command (FALSE = fly by using "Fly" command only) + Persist + 1 + Type + Boolean + Value + 1 + + AvatarAxisDeadZone0 + + Comment + Avatar axis 0 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + AvatarAxisDeadZone1 + + Comment + Avatar axis 1 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + AvatarAxisDeadZone2 + + Comment + Avatar axis 2 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + AvatarAxisDeadZone3 + + Comment + Avatar axis 3 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + AvatarAxisDeadZone4 + + Comment + Avatar axis 4 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + AvatarAxisDeadZone5 + + Comment + Avatar axis 5 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + AvatarAxisScale0 + + Comment + Avatar axis 0 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + AvatarAxisScale1 + + Comment + Avatar axis 1 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + AvatarAxisScale2 + + Comment + Avatar axis 2 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + AvatarAxisScale3 + + Comment + Avatar axis 3 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + AvatarAxisScale4 + + Comment + Avatar axis 4 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + AvatarAxisScale5 + + Comment + Avatar axis 5 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + AvatarBacklight - - Comment - Add rim lighting to avatar rendering to approximate shininess of skin - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Add rim lighting to avatar rendering to approximate shininess of skin + Persist + 1 + Type + Boolean + Value + 1 + AvatarCompositeLimit - - Comment - Maximum number of avatars to display appearance changes on the fly - Persist - 1 - Type - S32 - Value - 5 - + + Comment + Maximum number of avatars to display appearance changes on the fly + Persist + 1 + Type + S32 + Value + 5 + + AvatarFeathering + + Comment + Avatar feathering (less is softer) + Persist + 1 + Type + F32 + Value + 16.0 + AvatarPickerSortOrder - - Comment - Specifies sort key for textures in avatar picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) - Persist - 1 - Type - U32 - Value - 2 - + + Comment + Specifies sort key for textures in avatar picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 2 + AvatarSex - - Comment - - Persist - 0 - Type - U32 - Value - 0 - + + Comment + + Persist + 0 + Type + U32 + Value + 0 + BackgroundChatColor - - Comment - Color of chat bubble background - Persist - 1 - Type - Color4 - Value - - 0 - 0 - 0 - 1 - - + + Comment + Color of chat bubble background + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.0 + 0.0 + 1.0 + + BackgroundYieldTime - - Comment - Amount of time to yield every frame to other applications when SL is not the foreground window (milliseconds) - Persist - 1 - Type - S32 - Value - 40 - + + Comment + Amount of time to yield every frame to other applications when SL is not the foreground window (milliseconds) + Persist + 1 + Type + S32 + Value + 40 + BackwardBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 45 - 29 - 66 - 4 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 45 + 29 + 66 + 4 + + BasicHelpRect - - Comment - Rectangle for help window - Persist - 1 - Type - Rect - Value - - 0 - 404 - 467 - 0 - - + + Comment + Rectangle for help window + Persist + 1 + Type + Rect + Value + + 0 + 404 + 467 + 0 + + BeaconAlwaysOn - - Comment - Beacons / highlighting always on - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Beacons / highlighting always on + Persist + 1 + Type + Boolean + Value + 0 + BrowserHomePage - - Comment - [NOT USED] - Persist - 1 - Type - String - Value - http://www.secondlife.com - + + Comment + [NOT USED] + Persist + 1 + Type + String + Value + http://www.secondlife.com + BrowserProxyAddress - - Comment - Address for the Web Proxy] - Persist - 1 - Type - String - Value - - + + Comment + Address for the Web Proxy] + Persist + 1 + Type + String + Value + + BrowserProxyEnabled - - Comment - Use Web Proxy - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Use Web Proxy + Persist + 1 + Type + Boolean + Value + 0 + BrowserProxyExclusions - - Comment - [NOT USED] - Persist - 1 - Type - String - Value - - + + Comment + [NOT USED] + Persist + 1 + Type + String + Value + + BrowserProxyPort - - Comment - Port for Web Proxy - Persist - 1 - Type - S32 - Value - 3128 - + + Comment + Port for Web Proxy + Persist + 1 + Type + S32 + Value + 3128 + BrowserProxySocks45 - - Comment - [NOT USED] - Persist - 1 - Type - S32 - Value - 5 - + + Comment + [NOT USED] + Persist + 1 + Type + S32 + Value + 5 + + BuildAxisDeadZone0 + + Comment + Build axis 0 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + BuildAxisDeadZone1 + + Comment + Build axis 1 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + BuildAxisDeadZone2 + + Comment + Build axis 2 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + BuildAxisDeadZone3 + + Comment + Build axis 3 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + BuildAxisDeadZone4 + + Comment + Build axis 4 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + BuildAxisDeadZone5 + + Comment + Build axis 5 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + + BuildAxisScale0 + + Comment + Build axis 0 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + BuildAxisScale1 + + Comment + Build axis 1 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + BuildAxisScale2 + + Comment + Build axis 2 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + BuildAxisScale3 + + Comment + Build axis 3 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + BuildAxisScale4 + + Comment + Build axis 4 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + + BuildAxisScale5 + + Comment + Build axis 5 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + BuildBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + BuildFeathering + + Comment + Build feathering (less is softer) + Persist + 1 + Type + F32 + Value + 16.0 + ButtonFlashCount - - Comment - Number of flashes after which flashing buttons stay lit up - Persist - 1 - Type - S32 - Value - 3 - + + Comment + Number of flashes after which flashing buttons stay lit up + Persist + 1 + Type + S32 + Value + 3 + ButtonFlashRate - - Comment - Frequency at which buttons flash (hz) - Persist - 1 - Type - F32 - Value - 2 - + + Comment + Frequency at which buttons flash (hz) + Persist + 1 + Type + F32 + Value + 2.0 + ButtonHPad - - Comment - Default horizontal spacing between buttons (pixels) - Persist - 1 - Type - S32 - Value - 10 - + + Comment + Default horizontal spacing between buttons (pixels) + Persist + 1 + Type + S32 + Value + 10 + ButtonHeight - - Comment - Default height for normal buttons (pixels) - Persist - 1 - Type - S32 - Value - 20 - + + Comment + Default height for normal buttons (pixels) + Persist + 1 + Type + S32 + Value + 20 + ButtonHeightSmall - - Comment - Default height for small buttons (pixels) - Persist - 1 - Type - S32 - Value - 16 - + + Comment + Default height for small buttons (pixels) + Persist + 1 + Type + S32 + Value + 16 + ButtonVPad - - Comment - Default vertical spacing between buttons (pixels) - Persist - 1 - Type - S32 - Value - 1 - + + Comment + Default vertical spacing between buttons (pixels) + Persist + 1 + Type + S32 + Value + 1 + CacheLocation - - Comment - Controls the location of the local disk cache - Persist - 1 - Type - String - Value - - + + Comment + Controls the location of the local disk cache + Persist + 1 + Type + String + Value + + CacheSize - - Comment - Controls amount of hard drive space reserved for local file caching in MB - Persist - 1 - Type - U32 - Value - 500 - + + Comment + Controls amount of hard drive space reserved for local file caching in MB + Persist + 1 + Type + U32 + Value + 500 + CacheValidateCounter - - Comment - Used to distribute cache validation - Persist - 1 - Type - U32 - Value - 0 - + + Comment + Used to distribute cache validation + Persist + 1 + Type + U32 + Value + 0 + + CameraMouseWheelZoom + + Comment + Camera zooms in and out with mousewheel + Persist + 1 + Type + Boolean + Value + 1 + CameraOffset - - Comment - Render with camera offset from view frustum (rendering debug) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Render with camera offset from view frustum (rendering debug) + Persist + 1 + Type + Boolean + Value + 0 + CameraOffsetBuild - - Comment - Default camera position relative to focus point when entering build mode - Persist - 1 - Type - Vector3 - Value - - -6 - 0 - 6 - - + + Comment + Default camera position relative to focus point when entering build mode + Persist + 1 + Type + Vector3 + Value + + -6.0 + 0.0 + 6.0 + + CameraOffsetDefault - - Comment - Default camera offset from avatar - Persist - 1 - Type - Vector3 - Value - - -3 - 0 - 0.75 - - - CameraPositionSmoothing - - Comment - Smooths camera position over time - Persist - 1 - Type - F32 - Value - 1.0 - + + Comment + Default camera offset from avatar + Persist + 1 + Type + Vector3 + Value + + -3.0 + 0.0 + 0.75 + + CameraPosOnLogout - - Comment - Camera position when last logged out (global coordinates) - Persist - 1 - Type - Vector3D - Value - - 0 - 0 - 0 - - - CameraMouseWheelZoom - - Comment - Camera zooms in and out with mousewheel - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Camera position when last logged out (global coordinates) + Persist + 1 + Type + Vector3D + Value + + 0.0 + 0.0 + 0.0 + + + CameraPositionSmoothing + + Comment + Smooths camera position over time + Persist + 1 + Type + F32 + Value + 1.0 + ChatBarStealsFocus - - Comment - Whenever keyboard focus is removed from the UI, and the chat bar is visible, the chat bar takes focus - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Whenever keyboard focus is removed from the UI, and the chat bar is visible, the chat bar takes focus + Persist + 1 + Type + Boolean + Value + 1 + ChatBubbleOpacity - - Comment - Opacity of chat bubble background (0.0 = completely transparent, 1.0 = completely opaque) - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Opacity of chat bubble background (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.5 + ChatFontSize - - Comment - Size of chat text in chat console (0 = small, 1 = big) - Persist - 1 - Type - S32 - Value - 1 - - ChatFullWidth - - Comment - Chat console takes up full width of SL window - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Size of chat text in chat console (0 = small, 1 = big) + Persist + 1 + Type + S32 + Value + 1 + + ChatFullWidth + + Comment + Chat console takes up full width of SL window + Persist + 1 + Type + Boolean + Value + 1 + ChatHistoryTornOff - - Comment - Show chat history window separately from Communicate window. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show chat history window separately from Communicate window. + Persist + 1 + Type + Boolean + Value + 0 + ChatOnlineNotification - - Comment - Provide notifications for when friend log on and off of SL - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Provide notifications for when friend log on and off of SL + Persist + 1 + Type + Boolean + Value + 1 + ChatPersistTime - - Comment - Time for which chat stays visible in console (seconds) - Persist - 1 - Type - F32 - Value - 15 - + + Comment + Time for which chat stays visible in console (seconds) + Persist + 1 + Type + F32 + Value + 15.0 + ChatShowTimestamps - - Comment - Show timestamps in chat - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show timestamps in chat + Persist + 1 + Type + Boolean + Value + 1 + ChatVisible - - Comment - Chat bar is visible - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Chat bar is visible + Persist + 1 + Type + Boolean + Value + 1 + ChatterboxRect - - Comment - Rectangle for chatterbox window - Persist - 1 - Type - Rect - Value - - 0 - 400 - 350 - 0 - - + + Comment + Rectangle for chatterbox window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 350 + 0 + + CheesyBeacon - - Comment - Enable cheesy beacon effects - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable cheesy beacon effects + Persist + 1 + Type + Boolean + Value + 0 + ClientSettingsFile - - Comment - Persisted client settings file name (per install). - Persist - 0 - Type - String - Value - - + + Comment + Persisted client settings file name (per install). + Persist + 0 + Type + String + Value + + CloseChatOnReturn - - Comment - Close chat after hitting return - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Close chat after hitting return + Persist + 1 + Type + Boolean + Value + 0 + CloseSnapshotOnKeep - - Comment - Close snapshot window after saving snapshot - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Close snapshot window after saving snapshot + Persist + 1 + Type + Boolean + Value + 1 + ClothingBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + CmdLineDisableVoice - - Comment - Disable Voice. - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + Disable Voice. + Persist + 0 + Type + Boolean + Value + 0 + + CmdLineGridChoice + + Comment + The user's grid choice or ip address. + Persist + 0 + Type + String + Value + + + CmdLineHelperURI + + Comment + Command line specified helper web CGI prefix to use. + Persist + 0 + Type + String + Value + + + CmdLineLoginURI + + Comment + Command line specified login server and CGI prefix to use. + Persist + 0 + Type + LLSD + Value + + + + ColorPaletteEntry01 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.0 + 0.0 + 1.0 + + ColorPaletteEntry02 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0.5 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 0.5 + 1.0 + + ColorPaletteEntry03 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.0 + 0.0 + 1.0 + + ColorPaletteEntry04 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0.5 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 0.0 + 1.0 + + ColorPaletteEntry05 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0.5 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.5 + 0.0 + 1.0 + + ColorPaletteEntry06 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0.5 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.5 + 0.5 + 1.0 + + ColorPaletteEntry07 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.0 + 0.5 + 1.0 + + ColorPaletteEntry08 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.0 + 0.5 + 1.0 + + ColorPaletteEntry09 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0.5 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 0.0 + 1.0 + + ColorPaletteEntry10 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0.25 - 0.25 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.25 + 0.25 + 1.0 + + ColorPaletteEntry11 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0.5 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.5 + 1.0 + 1.0 + + ColorPaletteEntry12 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0.25 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.25 + 0.5 + 1.0 + + ColorPaletteEntry13 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.0 + 1.0 + 1.0 + + ColorPaletteEntry14 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0.25 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.25 + 0.0 + 1.0 + + ColorPaletteEntry15 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + ColorPaletteEntry16 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + ColorPaletteEntry17 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + ColorPaletteEntry18 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.75 - 0.75 - 0.75 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.75 + 0.75 + 0.75 + 1.0 + + ColorPaletteEntry19 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 0 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 0.0 + 0.0 + 1.0 + + ColorPaletteEntry20 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 0.0 + 1.0 + + ColorPaletteEntry21 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 1 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 1.0 + 0.0 + 1.0 + + ColorPaletteEntry22 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 1 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 1.0 + 1.0 + 1.0 + + ColorPaletteEntry23 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 0 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 0.0 + 1.0 + 1.0 + + ColorPaletteEntry24 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 0 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 0.0 + 1.0 + 1.0 + + ColorPaletteEntry25 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 0.5 + 1.0 + + ColorPaletteEntry26 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0 - 1 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.0 + 1.0 + 0.5 + 1.0 + + ColorPaletteEntry27 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 1 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 1.0 + 1.0 + 1.0 + + ColorPaletteEntry28 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 0.5 - 0.5 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 1.0 + 1.0 + + ColorPaletteEntry29 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 0 - 0.5 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 0.0 + 0.5 + 1.0 + + ColorPaletteEntry30 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 0.5 - 0 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 0.5 + 0.0 + 1.0 + + ColorPaletteEntry31 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + ColorPaletteEntry32 - - Comment - Color picker palette entry - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + ColumnHeaderDropDownDelay - - Comment - Time in seconds of mouse click before column header shows sort options list - Persist - 1 - Type - F32 - Value - 0.300000011920928955078125 - + + Comment + Time in seconds of mouse click before column header shows sort options list + Persist + 1 + Type + F32 + Value + 0.300000011921 + CompileOutputRect - - Comment - Rectangle for script Recompile Everything output window - Persist - 1 - Type - Rect - Value - - 0 - 400 - 300 - 0 - - + + Comment + Rectangle for script Recompile Everything output window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 300 + 0 + + CompressSnapshotsToDisk - - Comment - Compress snapshots saved to disk (Using JPEG 2000) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Compress snapshots saved to disk (Using JPEG 2000) + Persist + 1 + Type + Boolean + Value + 0 + ConnectAsGod - - Comment - Log in a god if you have god access. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Log in a god if you have god access. + Persist + 1 + Type + Boolean + Value + 0 + ConnectionPort - - Comment - Custom connection port number - Persist - 1 - Type - U32 - Value - 13000 - + + Comment + Custom connection port number + Persist + 1 + Type + U32 + Value + 13000 + ConnectionPortEnabled - - Comment - Use the custom connection port? - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Use the custom connection port? + Persist + 1 + Type + Boolean + Value + 0 + ConsoleBackgroundOpacity - - Comment - Opacity of chat console (0.0 = completely transparent, 1.0 = completely opaque) - Persist - 1 - Type - F32 - Value - 0.4000000059604644775390625 - + + Comment + Opacity of chat console (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.40000000596 + ConsoleBufferSize - - Comment - Size of chat console history (lines of chat) - Persist - 1 - Type - S32 - Value - 40 - + + Comment + Size of chat console history (lines of chat) + Persist + 1 + Type + S32 + Value + 40 + ConsoleMaxLines - - Comment - Max number of lines of chat text visible in console. - Persist - 1 - Type - S32 - Value - 40 - + + Comment + Max number of lines of chat text visible in console. + Persist + 1 + Type + S32 + Value + 40 + ContactsTornOff - - Comment - Show contacts window separately from Communicate window. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show contacts window separately from Communicate window. + Persist + 1 + Type + Boolean + Value + 0 + CookiesEnabled - - Comment - Accept cookies from Web sites? - Persist - 1 - Type - Boolean - Value - 1 - - CrashLogBehavior - - Comment - Controls behavior when viewer (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report) - Persist - 0 - Type - S32 - Value - 1 - + + Comment + Accept cookies from Web sites? + Persist + 1 + Type + Boolean + Value + 1 + CreateToolCopyCenters - - Comment - - Persist - 0 - Type - Boolean - Value - 1 - + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + CreateToolCopyRotates - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + CreateToolCopySelection - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + CreateToolKeepSelected - - Comment - After using create tool, keep the create tool active - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + After using create tool, keep the create tool active + Persist + 1 + Type + Boolean + Value + 0 + + Cursor3D + + Comment + Tread Joystick values as absolute positions (not deltas). + Persist + 1 + Type + Boolean + Value + 1 + CustomServer - - Comment - Specifies IP address or hostname of grid to which you connect - Persist - 1 - Type - String - Value - - + + Comment + Specifies IP address or hostname of grid to which you connect + Persist + 1 + Type + String + Value + + DebugBeaconLineWidth - - Comment - Size of lines for Debug Beacons - Persist - 1 - Type - S32 - Value - 1 - + + Comment + Size of lines for Debug Beacons + Persist + 1 + Type + S32 + Value + 1 + DebugInventoryFilters - - Comment - Turn on debugging display for inventory filtering - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Turn on debugging display for inventory filtering + Persist + 1 + Type + Boolean + Value + 0 + DebugPermissions - - Comment - Log permissions for selected inventory items - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Log permissions for selected inventory items + Persist + 1 + Type + Boolean + Value + 0 + DebugShowColor - - Comment - Show color under cursor - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show color under cursor + Persist + 1 + Type + Boolean + Value + 0 + DebugShowRenderInfo - - Comment - Show depth buffer contents - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show depth buffer contents + Persist + 1 + Type + Boolean + Value + 0 + DebugShowTime - - Comment - Show depth buffer contents - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show depth buffer contents + Persist + 1 + Type + Boolean + Value + 0 + DebugViews - - Comment - Display debugging info for views. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display debugging info for views. + Persist + 1 + Type + Boolean + Value + 0 + DebugWindowProc - - Comment - Log windows messages - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Log windows messages + Persist + 1 + Type + Boolean + Value + 0 + DefaultObjectTexture - - Comment - Texture used as 'Default' in texture picker. (UUID texture reference) - Persist - 1 - Type - String - Value - 89556747-24cb-43ed-920b-47caed15465f - + + Comment + Texture used as 'Default' in texture picker. (UUID texture reference) + Persist + 1 + Type + String + Value + 89556747-24cb-43ed-920b-47caed15465f + DisableCameraConstraints - - Comment - Disable the normal bounds put on the camera by avatar position - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Disable the normal bounds put on the camera by avatar position + Persist + 1 + Type + Boolean + Value + 0 + DisableRendering - - Comment - Disable GL rendering and GUI (load testing) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Disable GL rendering and GUI (load testing) + Persist + 1 + Type + Boolean + Value + 0 + DisableVerticalSync - - Comment - Update frames as fast as possible (FALSE = update frames between display scans) - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Update frames as fast as possible (FALSE = update frames between display scans) + Persist + 1 + Type + Boolean + Value + 1 + DisplayAvatarAgentTarget - - Comment - Show avatar positioning locators (animation debug) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show avatar positioning locators (animation debug) + Persist + 1 + Type + Boolean + Value + 0 + DisplayChat - - Comment - Display Latest Chat message on LCD - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display Latest Chat message on LCD + Persist + 1 + Type + Boolean + Value + 1 + DisplayDebug - - Comment - Display Network Information on LCD - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display Network Information on LCD + Persist + 1 + Type + Boolean + Value + 1 + DisplayDebugConsole - - Comment - Display Console Debug Information on LCD - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display Console Debug Information on LCD + Persist + 1 + Type + Boolean + Value + 1 + DisplayIM - - Comment - Display Latest IM message on LCD - Persist - 1 - Type - Boolean - Value - 1 - - DisplayLinden - - Comment - Display Account Information on LCD - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display Latest IM message on LCD + Persist + 1 + Type + Boolean + Value + 1 + + DisplayLinden + + Comment + Display Account Information on LCD + Persist + 1 + Type + Boolean + Value + 1 + DisplayRegion - - Comment - Display Location information on LCD - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display Location information on LCD + Persist + 1 + Type + Boolean + Value + 1 + DisplayTimecode - - Comment - Display timecode on screen - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display timecode on screen + Persist + 1 + Type + Boolean + Value + 0 + Disregard128DefaultDrawDistance - - Comment - Whether to use the auto default to 128 draw distance - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Whether to use the auto default to 128 draw distance + Persist + 1 + Type + Boolean + Value + 1.0 + Disregard96DefaultDrawDistance - - Comment - Whether to use the auto default to 96 draw distance - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Whether to use the auto default to 96 draw distance + Persist + 1 + Type + Boolean + Value + 1.0 + DoubleClickAutoPilot - - Comment - Enable double-click auto pilot - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable double-click auto pilot + Persist + 1 + Type + Boolean + Value + 0 + DragAndDropToolTipDelay - - Comment - Seconds before displaying tooltip when performing drag and drop operation - Persist - 1 - Type - F32 - Value - 0.1000000014901161193847656 - + + Comment + Seconds before displaying tooltip when performing drag and drop operation + Persist + 1 + Type + F32 + Value + 0.10000000149 + DropShadowButton - - Comment - Drop shadow width for buttons (pixels) - Persist - 1 - Type - S32 - Value - 2 - + + Comment + Drop shadow width for buttons (pixels) + Persist + 1 + Type + S32 + Value + 2 + DropShadowFloater - - Comment - Drop shadow width for floaters (pixels) - Persist - 1 - Type - S32 - Value - 5 - + + Comment + Drop shadow width for floaters (pixels) + Persist + 1 + Type + S32 + Value + 5 + DropShadowSlider - - Comment - Drop shadow width for sliders (pixels) - Persist - 1 - Type - S32 - Value - 3 - + + Comment + Drop shadow width for sliders (pixels) + Persist + 1 + Type + S32 + Value + 3 + DropShadowTooltip - - Comment - Drop shadow width for tooltips (pixels) - Persist - 1 - Type - S32 - Value - 4 - + + Comment + Drop shadow width for tooltips (pixels) + Persist + 1 + Type + S32 + Value + 4 + DynamicCameraStrength - - Comment - Amount camera lags behind avatar motion (0 = none, 30 = avatar velocity) - Persist - 1 - Type - F32 - Value - 2 - + + Comment + Amount camera lags behind avatar motion (0 = none, 30 = avatar velocity) + Persist + 1 + Type + F32 + Value + 2.0 + EditCameraMovement - - Comment - When entering build mode, camera moves up above avatar - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + When entering build mode, camera moves up above avatar + Persist + 1 + Type + Boolean + Value + 0 + EditLinkedParts - - Comment - Select individual parts of linked objects - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + Select individual parts of linked objects + Persist + 0 + Type + Boolean + Value + 0 + EffectColor - - Comment - Particle effects color - Persist - 1 - Type - Color4 - Value - - 1 - 1 - 1 - 1 - - + + Comment + Particle effects color + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + EnablePushToTalk - - Comment - Must hold down a key or moouse button when talking into your microphone - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Must hold down a key or moouse button when talking into your microphone + Persist + 1 + Type + Boolean + Value + 1 + + EnableRippleWater + + Comment + Whether to use ripple water shader or not + Persist + 1 + Type + Boolean + Value + 1 + EnableVoiceChat - - Comment - Enable talking to other residents with a microphone - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enable talking to other residents with a microphone + Persist + 1 + Type + Boolean + Value + 1 + EnergyFromTop - - Comment - - Persist - 0 - Type - S32 - Value - 20 - + + Comment + + Persist + 0 + Type + S32 + Value + 20 + EnergyHeight - - Comment - - Persist - 0 - Type - S32 - Value - 40 - + + Comment + + Persist + 0 + Type + S32 + Value + 40 + EnergyWidth - - Comment - - Persist - 0 - Type - S32 - Value - 175 - + + Comment + + Persist + 0 + Type + S32 + Value + 175 + + FPSLogFrequency + + Comment + Seconds between display of FPS in log (0 for never) + Persist + 1 + Type + F32 + Value + 60.0 + FilterItemsPerFrame - - Comment - Maximum number of inventory items to match against search filter every frame (lower to increase framerate while searching, higher to improve search speed) - Persist - 1 - Type - S32 - Value - 500 - + + Comment + Maximum number of inventory items to match against search filter every frame (lower to increase framerate while searching, higher to improve search speed) + Persist + 1 + Type + S32 + Value + 500 + FindLandArea - - Comment - Enables filtering of land search results by area - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enables filtering of land search results by area + Persist + 1 + Type + Boolean + Value + 0 + FindLandPrice - - Comment - Enables filtering of land search results by price - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables filtering of land search results by price + Persist + 1 + Type + Boolean + Value + 1 + FindLandType - - Comment - Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale") - Persist - 1 - Type - String - Value - All - + + Comment + Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale") + Persist + 1 + Type + String + Value + All + FindPeopleOnline - - Comment - Limits people search to only users who are logged on - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Limits people search to only users who are logged on + Persist + 1 + Type + Boolean + Value + 1 + FindPlacesPictures - - Comment - Display only results of find places that have pictures - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display only results of find places that have pictures + Persist + 1 + Type + Boolean + Value + 1 + FirstLoginThisInstall - - Comment - Specifies that you have not successfully logged in since you installed the latest update - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Specifies that you have not successfully logged in since you installed the latest update + Persist + 1 + Type + Boolean + Value + 1 + FirstName - - Comment - Login first name - Persist - 1 - Type - String - Value - - + + Comment + Login first name + Persist + 1 + Type + String + Value + + FirstPersonAvatarVisible - - Comment - Display avatar and attachments below neck while in mouselook - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display avatar and attachments below neck while in mouselook + Persist + 1 + Type + Boolean + Value + 0 + FirstPersonBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + FirstRunThisInstall - - Comment - Specifies that you have not run the viewer since you installed the latest update - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Specifies that you have not run the viewer since you installed the latest update + Persist + 1 + Type + Boolean + Value + 1 + FixedWeather - - Comment - Weather effects do not change over time - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Weather effects do not change over time + Persist + 1 + Type + Boolean + Value + 0 + FloaterAboutRect - - Comment - Rectangle for About window - Persist - 1 - Type - Rect - Value - - 0 - 440 - 470 - 0 - - + + Comment + Rectangle for About window + Persist + 1 + Type + Rect + Value + + 0 + 440 + 470 + 0 + + FloaterActiveSpeakersRect - - Comment - Rectangle for active speakers window - Persist - 1 - Type - Rect - Value - - 0 - 300 - 250 - 0 - - - FloaterActiveSpeakersSortColumn - - Comment - Column name to sort on - Persist - 1 - Type - String - Value - speaker_name - + + Comment + Rectangle for active speakers window + Persist + 1 + Type + Rect + Value + + 0 + 300 + 250 + 0 + + FloaterActiveSpeakersSortAscending - - Comment - Whether to sort up or down - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Whether to sort up or down + Persist + 1 + Type + Boolean + Value + 0 + + FloaterActiveSpeakersSortColumn + + Comment + Column name to sort on + Persist + 1 + Type + String + Value + speaker_name + + FloaterAdvancedSkyRect + + Comment + Rectangle for Advanced Sky Editor + Persist + 1 + Type + Rect + Value + + 50 + 220 + 450 + 0 + + + FloaterAdvancedWaterRect + + Comment + Rectangle for Advanced Water Editor + Persist + 1 + Type + Rect + Value + + 50 + 220 + 450 + 0 + + FloaterAudioVolumeRect - - Comment - Rectangle for Audio Volume window - Persist - 1 - Type - Rect - Value - - 0 - 440 - 470 - 0 - - + + Comment + Rectangle for Audio Volume window + Persist + 1 + Type + Rect + Value + + 0 + 440 + 470 + 0 + + FloaterBuildOptionsRect - - Comment - Rectangle for build options window. - Persist - 1 - Type - Rect - Value - - 0 - 0 - 0 - 0 - - + + Comment + Rectangle for build options window. + Persist + 1 + Type + Rect + Value + + 0 + 0 + 0 + 0 + + FloaterBumpRect - - Comment - Rectangle for Bumps/Hits window - Persist - 1 - Type - Rect - Value - - 0 - 180 - 400 - 0 - - + + Comment + Rectangle for Bumps/Hits window + Persist + 1 + Type + Rect + Value + + 0 + 180 + 400 + 0 + + FloaterBuyContentsRect - - Comment - Rectangle for Buy Contents window - Persist - 1 - Type - Rect - Value - - 0 - 250 - 300 - 0 - - + + Comment + Rectangle for Buy Contents window + Persist + 1 + Type + Rect + Value + + 0 + 250 + 300 + 0 + + FloaterBuyRect - - Comment - Rectangle for buy window - Persist - 1 - Type - Rect - Value - - 0 - 250 - 300 - 0 - - + + Comment + Rectangle for buy window + Persist + 1 + Type + Rect + Value + + 0 + 250 + 300 + 0 + + FloaterCameraRect3 - - Comment - Rectangle for camera control window - Persist - 1 - Type - Rect - Value - - 0 - 64 - 176 - 0 - - + + Comment + Rectangle for camera control window + Persist + 1 + Type + Rect + Value + + 0 + 64 + 176 + 0 + + FloaterChatRect - - Comment - Rectangle for chat history - Persist - 1 - Type - Rect - Value - - 0 - 172 - 500 - 0 - - + + Comment + Rectangle for chat history + Persist + 1 + Type + Rect + Value + + 0 + 172 + 500 + 0 + + FloaterClothingRect - - Comment - Rectangle for clothing window - Persist - 1 - Type - Rect - Value - - 0 - 480 - 320 - 0 - - + + Comment + Rectangle for clothing window + Persist + 1 + Type + Rect + Value + + 0 + 480 + 320 + 0 + + FloaterContactsRect - - Comment - Rectangle for chat history - Persist - 1 - Type - Rect - Value - - 0 - 390 - 395 - 0 - - + + Comment + Rectangle for chat history + Persist + 1 + Type + Rect + Value + + 0 + 390 + 395 + 0 + + FloaterCustomizeAppearanceRect - - Comment - Rectangle for avatar customization window - Persist - 1 - Type - Rect - Value - - 0 - 540 - 494 - 0 - - + + Comment + Rectangle for avatar customization window + Persist + 1 + Type + Rect + Value + + 0 + 540 + 494 + 0 + + + FloaterDayCycleRect + + Comment + Rectangle for Day Cycle Editor + Persist + 1 + Type + Rect + Value + + 50 + 450 + 300 + 0 + + + FloaterEnvRect + + Comment + Rectangle for Environment Editor + Persist + 1 + Type + Rect + Value + + 50 + 150 + 650 + 0 + + FloaterFindRect2 - - Comment - Rectangle for Find window - Persist - 1 - Type - Rect - Value - - 0 - 570 - 780 - 0 - - + + Comment + Rectangle for Find window + Persist + 1 + Type + Rect + Value + + 0 + 570 + 780 + 0 + + FloaterFriendsRect - - Comment - Rectangle for friends window - Persist - 1 - Type - Rect - Value - - 0 - 400 - 250 - 0 - - - FloaterGestureRect2 - - Comment - Rectangle for gestures window - Persist - 1 - Type - Rect - Value - - 0 - 465 - 350 - 0 - - - FloaterHtmlRect - - Comment - Rectangle for HTML window - Persist - 1 - Type - Rect - Value - - 100 - 460 - 370 - 100 - - + + Comment + Rectangle for friends window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 250 + 0 + + + FloaterGestureRect2 + + Comment + Rectangle for gestures window + Persist + 1 + Type + Rect + Value + + 0 + 465 + 350 + 0 + + FloaterHUDRect - - Comment - Rectangle for HUD Floater window - Persist - 1 - Type - Rect - Value - - 0 - 282 - 342 - 0 - - + + Comment + Rectangle for HUD Floater window + Persist + 1 + Type + Rect + Value + + 0 + 282 + 342 + 0 + + + FloaterHtmlRect + + Comment + Rectangle for HTML window + Persist + 1 + Type + Rect + Value + + 100 + 460 + 370 + 100 + + FloaterIMRect - - Comment - Rectangle for IM window - Persist - 1 - Type - Rect - Value - - 0 - 160 - 500 - 0 - - + + Comment + Rectangle for IM window + Persist + 1 + Type + Rect + Value + + 0 + 160 + 500 + 0 + + FloaterInspectRect - - Comment - Rectangle for Object Inspect window - Persist - 1 - Type - Rect - Value - - 0 - 400 - 400 - 0 - - + + Comment + Rectangle for Object Inspect window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + FloaterInventoryRect - - Comment - Rectangle for inventory window - Persist - 1 - Type - Rect - Value - - 0 - 400 - 300 - 0 - - + + Comment + Rectangle for inventory window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 300 + 0 + + FloaterJoystickRect - - Comment - Rectangle for joystick controls window. - Persist - 1 - Type - Rect - Value - - 0 - 0 - 0 - 0 - - + + Comment + Rectangle for joystick controls window. + Persist + 1 + Type + Rect + Value + + 0 + 0 + 0 + 0 + + FloaterLagMeter - - Comment - Rectangle for lag meter - Persist - 1 - Type - Rect - Value - - 0 - 142 - 350 - 0 - - + + Comment + Rectangle for lag meter + Persist + 1 + Type + Rect + Value + + 0 + 142 + 350 + 0 + + FloaterLandRect5 - - Comment - Rectangle for About Land window - Persist - 1 - Type - Rect - Value - - 0 - 370 - 460 - 0 - - + + Comment + Rectangle for About Land window + Persist + 1 + Type + Rect + Value + + 0 + 370 + 460 + 0 + + FloaterLandmarkRect - - Comment - Rectangle for landmark picker - Persist - 1 - Type - Rect - Value - - 0 - 290 - 310 - 0 - - + + Comment + Rectangle for landmark picker + Persist + 1 + Type + Rect + Value + + 0 + 290 + 310 + 0 + + FloaterMediaRect - - Comment - Rectangle for media browser window - Persist - 1 - Type - Rect - Value - - 16 - 650 - 600 - 128 - - + + Comment + Rectangle for media browser window + Persist + 1 + Type + Rect + Value + + 16 + 650 + 600 + 128 + + FloaterMiniMapRect - - Comment - Rectangle for world map - Persist - 1 - Type - Rect - Value - - 0 - 225 - 200 - 0 - - + + Comment + Rectangle for world map + Persist + 1 + Type + Rect + Value + + 0 + 225 + 200 + 0 + + FloaterMoveRect2 - - Comment - Rectangle for avatar control window - Persist - 1 - Type - Rect - Value - - 0 - 58 - 135 - 0 - - + + Comment + Rectangle for avatar control window + Persist + 1 + Type + Rect + Value + + 0 + 58 + 135 + 0 + + FloaterMuteRect3 - - Comment - Rectangle for mute window - Persist - 1 - Type - Rect - Value - - 0 - 300 - 300 - 0 - - + + Comment + Rectangle for mute window + Persist + 1 + Type + Rect + Value + + 0 + 300 + 300 + 0 + + FloaterOpenObjectRect - - Comment - Rectangle for Open Object window - Persist - 1 - Type - Rect - Value - - 0 - 350 - 300 - 0 - - + + Comment + Rectangle for Open Object window + Persist + 1 + Type + Rect + Value + + 0 + 350 + 300 + 0 + + FloaterPayRectB - - Comment - Rectangle for pay window - Persist - 1 - Type - Rect - Value - - 0 - 150 - 400 - 0 - - + + Comment + Rectangle for pay window + Persist + 1 + Type + Rect + Value + + 0 + 150 + 400 + 0 + + FloaterRegionInfo - - Comment - Rectangle for region info window - Persist - 1 - Type - Rect - Value - - 0 - 512 - 480 - 0 - - + + Comment + Rectangle for region info window + Persist + 1 + Type + Rect + Value + + 0 + 512 + 480 + 0 + + FloaterScriptDebugRect - - Comment - Rectangle for Script Error/Debug window - Persist - 1 - Type - Rect - Value - - 0 - 130 - 450 - 0 - - + + Comment + Rectangle for Script Error/Debug window + Persist + 1 + Type + Rect + Value + + 0 + 130 + 450 + 0 + + FloaterSnapshotRect - - Comment - Rectangle for snapshot window - Persist - 1 - Type - Rect - Value - - 0 - 200 - 200 - 400 - - + + Comment + Rectangle for snapshot window + Persist + 1 + Type + Rect + Value + + 0 + 200 + 200 + 400 + + FloaterViewBottom - - Comment - [DO NOT MODIFY] Controls layout of floating windows within SL window - Persist - 1 - Type - S32 - Value - -1 - + + Comment + [DO NOT MODIFY] Controls layout of floating windows within SL window + Persist + 1 + Type + S32 + Value + -1 + FloaterWorldMapRect2 - - Comment - Rectangle for world map window - Persist - 1 - Type - Rect - Value - - 0 - 0 - 0 - 0 - - + + Comment + Rectangle for world map window + Persist + 1 + Type + Rect + Value + + 0 + 0 + 0 + 0 + + FlyBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + FlycamAbsolute - - Comment - Treat Flycam values as absolute positions (not deltas). - Persist - 1 - Type - Boolean - Value - 0 - - AutoLeveling - - Comment - Keep Flycam level. - Persist - 1 - Type - Boolean - Value - 1 - - Cursor3D - - Comment - Tread Joystick values as absolute positions (not deltas). - Persist - 1 - Type - Boolean - Value - 1 - - ZoomDirect - - Comment - Map Joystick zoom axis directly to camera zoom. - Persist - 1 - Type - Boolean - Value - 0 - - JoystickInitialized - - Comment - Whether or not a joystick has been detected and initiailized. - Persist - 1 - Type - String - Value - - - JoystickEnabled - - Comment - Enables Joystick Input. - Persist - 1 - Type - Boolean - Value - 0 - - JoystickFlycamEnabled - - Comment - Enables the Joystick to control the flycam. - Persist - 1 - Type - Boolean - Value - 1 - - JoystickAvatarEnabled - - Comment - Enables the Joystick to control Avatar movmement. - Persist - 1 - Type - Boolean - Value - 1 - - JoystickBuildEnabled - - Comment - Enables the Joystick to move edited objects. - Persist - 1 - Type - Boolean - Value - 1 - - JoystickAxis0 - - Comment - Flycam hardware axis mapping for internal axis 0 ([0, 5]). - Persist - 1 - Type - S32 - Value - 1 - - JoystickAxis1 - - Comment - Flycam hardware axis mapping for internal axis 1 ([0, 5]). - Persist - 1 - Type - S32 - Value - 0 - - JoystickAxis2 - - Comment - Flycam hardware axis mapping for internal axis 2 ([0, 5]). - Persist - 1 - Type - S32 - Value - 2 - - JoystickAxis3 - - Comment - Flycam hardware axis mapping for internal axis 3 ([0, 5]). - Persist - 1 - Type - S32 - Value - 4 - - JoystickAxis4 - - Comment - Flycam hardware axis mapping for internal axis 4 ([0, 5]). - Persist - 1 - Type - S32 - Value - 3 - - JoystickAxis5 - - Comment - Flycam hardware axis mapping for internal axis 5 ([0, 5]). - Persist - 1 - Type - S32 - Value - 5 - - JoystickAxis6 - - Comment - Flycam hardware axis mapping for internal axis 6 ([0, 5]). - Persist - 1 - Type - S32 - Value - -1 - + + Comment + Treat Flycam values as absolute positions (not deltas). + Persist + 1 + Type + Boolean + Value + 0 + FlycamAxisDeadZone0 - - Comment - Flycam axis 0 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Flycam axis 0 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + FlycamAxisDeadZone1 - - Comment - Flycam axis 1 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Flycam axis 1 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + FlycamAxisDeadZone2 - - Comment - Flycam axis 2 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Flycam axis 2 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + FlycamAxisDeadZone3 - - Comment - Flycam axis 3 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Flycam axis 3 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + FlycamAxisDeadZone4 - - Comment - Flycam axis 4 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Flycam axis 4 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + FlycamAxisDeadZone5 - - Comment - Flycam axis 5 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Flycam axis 5 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + FlycamAxisDeadZone6 - - Comment - Flycam axis 6 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Flycam axis 6 dead zone. + Persist + 1 + Type + F32 + Value + 0.1 + FlycamAxisScale0 - - Comment - Flycam axis 0 scaler. - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Flycam axis 0 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + FlycamAxisScale1 - - Comment - Flycam axis 1 scaler. - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Flycam axis 1 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + FlycamAxisScale2 - - Comment - Flycam axis 2 scaler. - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Flycam axis 2 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + FlycamAxisScale3 - - Comment - Flycam axis 3 scaler. - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Flycam axis 3 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + FlycamAxisScale4 - - Comment - Flycam axis 4 scaler. - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Flycam axis 4 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + FlycamAxisScale5 - - Comment - Flycam axis 5 scaler. - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Flycam axis 5 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + FlycamAxisScale6 - - Comment - Flycam axis 6 scaler. - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Flycam axis 6 scaler. + Persist + 1 + Type + F32 + Value + 1.0 + FlycamFeathering - - Comment - Flycam feathering (less is softer) - Persist - 1 - Type - F32 - Value - 16 - + + Comment + Flycam feathering (less is softer) + Persist + 1 + Type + F32 + Value + 16.0 + FlycamZoomDirect - - Comment - Map flycam zoom axis directly to camera zoom. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Map flycam zoom axis directly to camera zoom. + Persist + 1 + Type + Boolean + Value + 0 + FlyingAtExit - - Comment - Was flying when last logged out, so fly when logging in - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Was flying when last logged out, so fly when logging in + Persist + 1 + Type + Boolean + Value + 0 + FocusOffsetDefault - - Comment - Default focus point offset relative to avatar (x-axis is forward) - Persist - 1 - Type - Vector3 - Value - - 1 - 0 - 1 - - + + Comment + Default focus point offset relative to avatar (x-axis is forward) + Persist + 1 + Type + Vector3 + Value + + 1.0 + 0.0 + 1.0 + + FocusPosOnLogout - - Comment - Camera focus point when last logged out (global coordinates) - Persist - 1 - Type - Vector3D - Value - - 0 - 0 - 0 - - + + Comment + Camera focus point when last logged out (global coordinates) + Persist + 1 + Type + Vector3D + Value + + 0.0 + 0.0 + 0.0 + + FolderAutoOpenDelay - - Comment - Seconds before automatically expanding the folder under the mouse when performing inventory drag and drop - Persist - 1 - Type - F32 - Value - 0.75 - + + Comment + Seconds before automatically expanding the folder under the mouse when performing inventory drag and drop + Persist + 1 + Type + F32 + Value + 0.75 + FolderLoadingMessageWaitTime - - Comment - Seconds to wait before showing the LOADING... text in folder views - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Seconds to wait before showing the LOADING... text in folder views + Persist + 1 + Type + F32 + Value + 0.5 + FontMonospace - - Comment - Name of monospace font (Truetype file name) - Persist - 1 - Type - String - Value - profontwindows.ttf - + + Comment + Name of monospace font (Truetype file name) + Persist + 1 + Type + String + Value + profontwindows.ttf + FontSansSerif - - Comment - Name of san-serif font (Truetype file name) - Persist - 1 - Type - String - Value - MtBkLfRg.ttf - + + Comment + Name of san-serif font (Truetype file name) + Persist + 1 + Type + String + Value + MtBkLfRg.ttf + FontSansSerifBold - - Comment - Name of bold font (Truetype file name) - Persist - 1 - Type - String - Value - MtBdLfRg.ttf - + + Comment + Name of bold font (Truetype file name) + Persist + 1 + Type + String + Value + MtBdLfRg.ttf + FontSansSerifFallback - - Comment - Name of san-serif font (Truetype file name) - Persist - 1 - Type - String - Value - - + + Comment + Name of san-serif font (Truetype file name) + Persist + 1 + Type + String + Value + + FontSansSerifFallbackScale - - Comment - Scale of fallback font relative to huge font (fraction of huge font size) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Scale of fallback font relative to huge font (fraction of huge font size) + Persist + 1 + Type + F32 + Value + 1.0 + FontScreenDPI - - Comment - Font resolution, higher is bigger (pixels per inch) - Persist - 1 - Type - F32 - Value - 96 - + + Comment + Font resolution, higher is bigger (pixels per inch) + Persist + 1 + Type + F32 + Value + 96.0 + FontSizeHuge - - Comment - Size of huge font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 16 - + + Comment + Size of huge font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 16.0 + FontSizeLarge - - Comment - Size of large font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 12 - + + Comment + Size of large font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 12.0 + FontSizeMedium - - Comment - Size of medium font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 10 - + + Comment + Size of medium font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 10.0 + FontSizeMonospace - - Comment - Size of monospaced font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 9 - + + Comment + Size of monospaced font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 9.0 + FontSizeSmall - - Comment - Size of small font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 9 - + + Comment + Size of small font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 9.0 + ForceShowGrid - - Comment - Always show grid dropdown on login screen - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Always show grid dropdown on login screen + Persist + 1 + Type + Boolean + Value + 0 + ForwardBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 45 - 54 - 66 - 29 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 45 + 54 + 66 + 29 + + FreezeTime - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + FullScreen - - Comment - Run SL in fullscreen mode - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Run SL in fullscreen mode + Persist + 1 + Type + Boolean + Value + 0 + FullScreenAspectRatio - - Comment - Aspect ratio of fullscreen display (width / height) - Persist - 1 - Type - F32 - Value - 1.33329999446868896484375 - + + Comment + Aspect ratio of fullscreen display (width / height) + Persist + 1 + Type + F32 + Value + 1.33329999447 + FullScreenAutoDetectAspectRatio - - Comment - Automatically detect proper aspect ratio for fullscreen display - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Automatically detect proper aspect ratio for fullscreen display + Persist + 1 + Type + Boolean + Value + 1 + FullScreenHeight - - Comment - Fullscreen resolution in height - Persist - 1 - Type - S32 - Value - 768 - + + Comment + Fullscreen resolution in height + Persist + 1 + Type + S32 + Value + 768 + FullScreenWidth - - Comment - Fullscreen resolution in width - Persist - 1 - Type - S32 - Value - 1024 - - GridChoice - - Comment - The user's grid choice or ip address. - Persist - 1 - Type - String - Value - - + + Comment + Fullscreen resolution in width + Persist + 1 + Type + S32 + Value + 1024 + GridCrossSections - - Comment - Highlight cross sections of prims with grid manipulation plane. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Highlight cross sections of prims with grid manipulation plane. + Persist + 1 + Type + Boolean + Value + 0 + GridDrawSize - - Comment - Visible extent of 2D snap grid (meters) - Persist - 1 - Type - F32 - Value - 12 - + + Comment + Visible extent of 2D snap grid (meters) + Persist + 1 + Type + F32 + Value + 12.0 + GridMode - - Comment - Snap grid reference frame (0 = world, 1 = local, 2 = reference object) - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Snap grid reference frame (0 = world, 1 = local, 2 = reference object) + Persist + 1 + Type + S32 + Value + 0 + GridOpacity - - Comment - Grid line opacity (0.0 = completely transparent, 1.0 = completely opaque) - Persist - 1 - Type - F32 - Value - 0.699999988079071044921875 - + + Comment + Grid line opacity (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.699999988079 + GridResolution - - Comment - Size of single grid step (meters) - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Size of single grid step (meters) + Persist + 1 + Type + F32 + Value + 0.5 + GridSubUnit - - Comment - Display fractional grid steps, relative to grid size - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display fractional grid steps, relative to grid size + Persist + 1 + Type + Boolean + Value + 0 + GridSubdivision - - Comment - Maximum number of times to divide single snap grid unit when GridSubUnit is true - Persist - 1 - Type - S32 - Value - 32 - + + Comment + Maximum number of times to divide single snap grid unit when GridSubUnit is true + Persist + 1 + Type + S32 + Value + 32 + GroupNotifyBoxHeight - - Comment - Height of group notice messages - Persist - 1 - Type - S32 - Value - 260 - + + Comment + Height of group notice messages + Persist + 1 + Type + S32 + Value + 260 + GroupNotifyBoxWidth - - Comment - Width of group notice messages - Persist - 1 - Type - S32 - Value - 400 - + + Comment + Width of group notice messages + Persist + 1 + Type + S32 + Value + 400 + HTMLLinkColor - - Comment - Color of hyperlinks - Persist - 1 - Type - Color4 - Value - - 0.60000002384185791015625 - 0.60000002384185791015625 - 1 - 1 - - + + Comment + Color of hyperlinks + Persist + 1 + Type + Color4 + Value + + 0.600000023842 + 0.600000023842 + 1.0 + 1.0 + + HelpHomeURL - - Comment - URL of initial help page - Persist - 1 - Type - String - Value - help/index.html - + + Comment + URL of initial help page + Persist + 1 + Type + String + Value + help/index.html + HelpLastVisitedURL - - Comment - URL of last help page, will be shown next time help is accessed - Persist - 1 - Type - String - Value - help/index.html - - HelperURI - - Comment - helper web CGI prefix to use - Persist - 1 - Type - String - Value - - + + Comment + URL of last help page, will be shown next time help is accessed + Persist + 1 + Type + String + Value + help/index.html + HighResSnapshot - - Comment - Double resolution of snapshot from current window resolution - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Double resolution of snapshot from current window resolution + Persist + 1 + Type + Boolean + Value + 0 + HtmlFindRect - - Comment - Rectangle for HTML find window - Persist - 1 - Type - Rect - Value - - 16 - 650 - 600 - 128 - - + + Comment + Rectangle for HTML find window + Persist + 1 + Type + Rect + Value + + 16 + 650 + 600 + 128 + + HtmlHelpLastPage - - Comment - Last URL visited via help system - Persist - 1 - Type - String - Value - - + + Comment + Last URL visited via help system + Persist + 1 + Type + String + Value + + HtmlHelpRect - - Comment - Rectangle for HTML help window - Persist - 1 - Type - Rect - Value - - 16 - 650 - 600 - 128 - - + + Comment + Rectangle for HTML help window + Persist + 1 + Type + Rect + Value + + 16 + 650 + 600 + 128 + + HtmlReleaseMessage - - Comment - Rectangle for HTML Release Message Floater window - Persist - 1 - Type - Rect - Value - - 46 - 520 - 400 - 128 - - + + Comment + Rectangle for HTML Release Message Floater window + Persist + 1 + Type + Rect + Value + + 46 + 520 + 400 + 128 + + + IMChatColor + + Comment + Color of instant messages from other residents + Persist + 1 + Type + Color4 + Value + + 1.0 + 1.0 + 1.0 + 1.0 + + IMInChatHistory - - Comment - Copy IM into chat history - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Copy IM into chat history + Persist + 1 + Type + Boolean + Value + 0 + IMShowTimestamps - - Comment - Show timestamps in IM - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show timestamps in IM + Persist + 1 + Type + Boolean + Value + 1 + IgnorePixelDepth - - Comment - Ignore pixel depth settings. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Ignore pixel depth settings. + Persist + 1 + Type + Boolean + Value + 0 + ImagePipelineUseHTTP - - Comment - If TRUE use HTTP GET to fetch textures from the server - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + If TRUE use HTTP GET to fetch textures from the server + Persist + 1 + Type + Boolean + Value + 0 + InBandwidth - - Comment - Incoming bandwidth throttle (bps) - Persist - 1 - Type - F32 - Value - 0 - + + Comment + Incoming bandwidth throttle (bps) + Persist + 1 + Type + F32 + Value + 0.0 + InventoryAutoOpenDelay - - Comment - Seconds before automatically opening inventory when mouse is over inventory button when performing inventory drag and drop - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Seconds before automatically opening inventory when mouse is over inventory button when performing inventory drag and drop + Persist + 1 + Type + F32 + Value + 1.0 + InventorySortOrder - - Comment - Specifies sort key for inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) - Persist - 1 - Type - U32 - Value - 7 - + + Comment + Specifies sort key for inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 7 + InvertMouse - - Comment - When in mouselook, moving mouse up looks down and vice verse (FALSE = moving up looks up) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + When in mouselook, moving mouse up looks down and vice verse (FALSE = moving up looks up) + Persist + 1 + Type + Boolean + Value + 0 + + JoystickAvatarEnabled + + Comment + Enables the Joystick to control Avatar movmement. + Persist + 1 + Type + Boolean + Value + 1 + + JoystickAxis0 + + Comment + Flycam hardware axis mapping for internal axis 0 ([0, 5]). + Persist + 1 + Type + S32 + Value + 1 + + JoystickAxis1 + + Comment + Flycam hardware axis mapping for internal axis 1 ([0, 5]). + Persist + 1 + Type + S32 + Value + 0 + + JoystickAxis2 + + Comment + Flycam hardware axis mapping for internal axis 2 ([0, 5]). + Persist + 1 + Type + S32 + Value + 2 + + JoystickAxis3 + + Comment + Flycam hardware axis mapping for internal axis 3 ([0, 5]). + Persist + 1 + Type + S32 + Value + 4 + + JoystickAxis4 + + Comment + Flycam hardware axis mapping for internal axis 4 ([0, 5]). + Persist + 1 + Type + S32 + Value + 3 + + JoystickAxis5 + + Comment + Flycam hardware axis mapping for internal axis 5 ([0, 5]). + Persist + 1 + Type + S32 + Value + 5 + + JoystickAxis6 + + Comment + Flycam hardware axis mapping for internal axis 6 ([0, 5]). + Persist + 1 + Type + S32 + Value + -1 + + JoystickBuildEnabled + + Comment + Enables the Joystick to move edited objects. + Persist + 1 + Type + Boolean + Value + 1 + + JoystickEnabled + + Comment + Enables Joystick Input. + Persist + 1 + Type + Boolean + Value + 0 + + JoystickFlycamEnabled + + Comment + Enables the Joystick to control the flycam. + Persist + 1 + Type + Boolean + Value + 1 + + JoystickInitialized + + Comment + Whether or not a joystick has been detected and initiailized. + Persist + 1 + Type + String + Value + + KeepAspectForSnapshot - - Comment - Use full window when taking snapshot, regardless of requested image size - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Use full window when taking snapshot, regardless of requested image size + Persist + 1 + Type + Boolean + Value + 1 + LCDDestination - - Comment - Which LCD to use - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Which LCD to use + Persist + 1 + Type + S32 + Value + 0 + LSLHelpRect - - Comment - Rectangle for LSL help window - Persist - 1 - Type - Rect - Value - - 0 - 400 - 400 - 0 - - + + Comment + Rectangle for LSL help window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + LSLHelpURL - - Comment - URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword - Persist - 1 - Type - String - Value - https://wiki.secondlife.com/wiki/[LSL_STRING] - + + Comment + URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword + Persist + 1 + Type + String + Value + https://wiki.secondlife.com/wiki/[LSL_STRING] + LagMeterShrunk - - Comment - Last large/small state for lag meter - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Last large/small state for lag meter + Persist + 1 + Type + Boolean + Value + 0 + Language - - Comment - Language specifier (for XUI) - Persist - 1 - Type - String - Value - default - + + Comment + Language specifier (for XUI) + Persist + 1 + Type + String + Value + default + LanguageIsPublic Comment @@ -3820,6398 +4184,6035 @@ 1 LastFeatureVersion - - Comment - [DO NOT MODIFY] Version number for tracking hardware changes - Persist - 1 - Type - S32 - Value - 0 - + + Comment + [DO NOT MODIFY] Version number for tracking hardware changes + Persist + 1 + Type + S32 + Value + 0 + LastFindPanel - - Comment - Controls which find operation appears by default when clicking "Find" button - Persist - 1 - Type - String - Value - find_all_panel - + + Comment + Controls which find operation appears by default when clicking "Find" button + Persist + 1 + Type + String + Value + find_all_panel + LastName - - Comment - Login last name - Persist - 1 - Type - String - Value - - + + Comment + Login last name + Persist + 1 + Type + String + Value + + LastPrefTab - - Comment - Last selected tab in preferences window - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Last selected tab in preferences window + Persist + 1 + Type + S32 + Value + 0 + LastRunVersion - - Comment - Version number of last instance of the viewer that you ran - Persist - 1 - Type - String - Value - 0.0.0 - + + Comment + Version number of last instance of the viewer that you ran + Persist + 1 + Type + String + Value + 0.0.0 + LastSnapshotHeight - - Comment - The height of the last snapshot, in px - Persist - 1 - Type - S32 - Value - 768 - + + Comment + The height of the last snapshot, in px + Persist + 1 + Type + S32 + Value + 768 + LastSnapshotType - - Comment - Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image) - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image) + Persist + 1 + Type + S32 + Value + 0 + LastSnapshotWidth - - Comment - The width of the last snapshot, in px - Persist - 1 - Type - S32 - Value - 1024 - + + Comment + The width of the last snapshot, in px + Persist + 1 + Type + S32 + Value + 1024 + LeftClickShowMenu - - Comment - Left click opens pie menu (FALSE = left click touches or grabs object) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Left click opens pie menu (FALSE = left click touches or grabs object) + Persist + 1 + Type + Boolean + Value + 0 + LimitDragDistance - - Comment - Limit translation of object via translate tool - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Limit translation of object via translate tool + Persist + 1 + Type + Boolean + Value + 1 + LimitSelectDistance - - Comment - Disallow selection of objects beyond max select distance - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Disallow selection of objects beyond max select distance + Persist + 1 + Type + Boolean + Value + 1 + LipSyncAah - - Comment - Aah (jaw opening) babble loop - Persist - 1 - Type - String - Value - 257998776531013446642343 - + + Comment + Aah (jaw opening) babble loop + Persist + 1 + Type + String + Value + 257998776531013446642343 + LipSyncAahPowerTransfer + + Comment + Transfer curve for Voice Interface power to aah lip sync amplitude + Persist + 1 + Type + String + Value + 0000123456789 + + LipSyncEnabled + + Comment + 0 disable lip-sync, 1 enable babble loop + Persist + 1 + Type + Boolean + Value + 0 + + LipSyncOoh + + Comment + Ooh (mouth width) babble loop + Persist + 1 + Type + String + Value + 1247898743223344444443200000 + + LipSyncOohAahRate + + Comment + Rate to babble Ooh and Aah (/sec) + Persist + 1 + Type + F32 + Value + 24.0 + + LipSyncOohPowerTransfer + + Comment + Transfer curve for Voice Interface power to ooh lip sync amplitude + Persist + 1 + Type + String + Value + 0012345566778899 + + LocalCacheVersion + + Comment + Version number of cache + Persist + 1 + Type + S32 + Value + 0 + + LogMessages + + Comment + Log network traffic + Persist + 1 + Type + Boolean + Value + 0 + + LoginAsGod + + Comment + Attempt to login with god powers (Linden accounts only) + Persist + 1 + Type + Boolean + Value + 0 + + LoginLastLocation + + Comment + Login at same location you last logged out + Persist + 1 + Type + Boolean + Value + 1 + + LoginPage + + Comment + Login authentication page. + Persist + 1 + Type + String + Value + + + LosslessJ2CUpload + + Comment + Use lossless compression for small image uploads + Persist + 1 + Type + Boolean + Value + 0 + + MainloopTimeoutDefault + + Comment + Timeout duration for mainloop lock detection, in seconds. + Persist + 1 + Type + F32 + Value + 20.0 + + MainloopTimeoutDefault Comment - Transfer curve for Voice Interface power to aah lip sync amplitude + Timeout duration for mainloop lock detection, in seconds. Persist 1 Type - String + F32 Value - 0000123456789 - - LipSyncEnabled - - Comment - 0 disable lip-sync, 1 enable babble loop - Persist - 1 - Type - U32 - Value - 1 - - LipSyncOoh - - Comment - Ooh (mouth width) babble loop - Persist - 1 - Type - String - Value - 1247898743223344444443200000 - - LipSyncOohAahRate - - Comment - Rate to babble Ooh and Aah (/sec) - Persist - 1 - Type - F32 - Value - 24.0 - - LipSyncOohPowerTransfer - - Comment - Transfer curve for Voice Interface power to ooh lip sync amplitude - Persist - 1 - Type - String - Value - 0012345566778899 - - LocalCacheVersion - - Comment - Version number of cache - Persist - 1 - Type - S32 - Value - 0 - - LogMessages - - Comment - Log network traffic - Persist - 1 - Type - Boolean - Value - 0 - - LoginAsGod - - Comment - Attempt to login with god powers (Linden accounts only) - Persist - 1 - Type - Boolean - Value - 0 - - LoginLastLocation - - Comment - Login at same location you last logged out - Persist - 1 - Type - Boolean - Value - 1 - - LoginPage - - Comment - Login authentication page. - Persist - 1 - Type - String - Value - - - LoginURI - - Comment - login server and CGI prefix to use - Persist - 1 - Type - String - Value - - - LosslessJ2CUpload - - Comment - Use lossless compression for small image uploads - Persist - 1 - Type - Boolean - Value - 0 - - MainloopTimeoutDefault - - Comment - Timeout duration for mainloop lock detection, in seconds. - Persist - 1 - Type - F32 - Value - 10.0 + 10.0 MapOverlayIndex - - Comment - Currently selected world map type - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Currently selected world map type + Persist + 1 + Type + S32 + Value + 0 + MapScale - - Comment - World map zoom level (pixels per region) - Persist - 1 - Type - F32 - Value - 128 - + + Comment + World map zoom level (pixels per region) + Persist + 1 + Type + F32 + Value + 128.0 + MapShowClassifieds - - Comment - Show locations associated with classified ads on world map - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show locations associated with classified ads on world map + Persist + 1 + Type + Boolean + Value + 1 + MapShowEvents - - Comment - Show events on world map - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show events on world map + Persist + 1 + Type + Boolean + Value + 1 + MapShowInfohubs - - Comment - Show infohubs on the world map - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show infohubs on the world map + Persist + 1 + Type + Boolean + Value + 1 + MapShowLandForSale - - Comment - Show land for sale on world map - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show land for sale on world map + Persist + 1 + Type + Boolean + Value + 0 + MapShowPeople - - Comment - Show other users on world map - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show other users on world map + Persist + 1 + Type + Boolean + Value + 1 + MapShowTelehubs - - Comment - Show telehubs on world map - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show telehubs on world map + Persist + 1 + Type + Boolean + Value + 1 + Marker - - Comment - [NOT USED] - Persist - 1 - Type - String - Value - - + + Comment + [NOT USED] + Persist + 1 + Type + String + Value + + MaxDragDistance - - Comment - Maximum allowed translation distance in a single operation of translate tool (meters from start point) - Persist - 1 - Type - F32 - Value - 48 - + + Comment + Maximum allowed translation distance in a single operation of translate tool (meters from start point) + Persist + 1 + Type + F32 + Value + 48.0 + MaxSelectDistance - - Comment - Maximum allowed selection distance (meters from avatar) - Persist - 1 - Type - F32 - Value - 64 - + + Comment + Maximum allowed selection distance (meters from avatar) + Persist + 1 + Type + F32 + Value + 64.0 + MeanCollisionBump - - Comment - You have experienced an abuse of being bumped by an object or avatar - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + You have experienced an abuse of being bumped by an object or avatar + Persist + 1 + Type + Boolean + Value + 0 + MeanCollisionPhysical - - Comment - You have experienced an abuse from a physical object - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + You have experienced an abuse from a physical object + Persist + 1 + Type + Boolean + Value + 0 + MeanCollisionPushObject - - Comment - You have experienced an abuse of being pushed by a scripted object - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + You have experienced an abuse of being pushed by a scripted object + Persist + 1 + Type + Boolean + Value + 0 + MeanCollisionScripted + + Comment + You have experienced an abuse from a scripted object + Persist + 1 + Type + Boolean + Value + 0 + + MeanCollisionSelected + + Comment + You have experienced an abuse of being pushed via a selected object + Persist + 1 + Type + Boolean + Value + 0 + + MemoryLogFrequency Comment - You have experienced an abuse from a scripted object + Seconds between display of Memory in log (0 for never) Persist 1 Type - Boolean + F32 Value - 0 - - MeanCollisionSelected - - Comment - You have experienced an abuse of being pushed via a selected object - Persist - 1 - Type - Boolean - Value - 0 + 600.0 MenuAccessKeyTime - - Comment - Time (seconds) in which the menu key must be tapped to move focus to the menu bar - Persist - 1 - Type - F32 - Value - 0.25 - + + Comment + Time (seconds) in which the menu key must be tapped to move focus to the menu bar + Persist + 1 + Type + F32 + Value + 0.25 + MenuBarHeight - - Comment - - Persist - 0 - Type - S32 - Value - 18 - + + Comment + + Persist + 0 + Type + S32 + Value + 18 + MenuBarWidth - - Comment - - Persist - 0 - Type - S32 - Value - 410 - + + Comment + + Persist + 0 + Type + S32 + Value + 410 + MiniMapRotate - - Comment - Rotate miniature world map to avatar direction - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Rotate miniature world map to avatar direction + Persist + 1 + Type + Boolean + Value + 1 + MiniMapScale - - Comment - Miniature world map zoom levle (pixels per region) - Persist - 1 - Type - F32 - Value - 128 - + + Comment + Miniature world map zoom levle (pixels per region) + Persist + 1 + Type + F32 + Value + 128.0 + MouseSensitivity - - Comment - Controls responsiveness of mouse when in mouselook mode (fraction or multiple of default mouse sensitivity) - Persist - 1 - Type - F32 - Value - 3 - + + Comment + Controls responsiveness of mouse when in mouselook mode (fraction or multiple of default mouse sensitivity) + Persist + 1 + Type + F32 + Value + 3.0 + MouseSmooth - - Comment - Smooths out motion of mouse when in mouselook mode. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Smooths out motion of mouse when in mouselook mode. + Persist + 1 + Type + Boolean + Value + 0 + MouseSun - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + MouselookBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + MoveDownBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 91 - 29 - 116 - 4 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 91 + 29 + 116 + 4 + + MoveUpBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 91 - 54 - 116 - 29 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 91 + 54 + 116 + 29 + + MuteAmbient - - Comment - Ambient sound effects, such as wind noise, play at 0 volume - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Ambient sound effects, such as wind noise, play at 0 volume + Persist + 1 + Type + Boolean + Value + 0 + MuteAudio - - Comment - All audio plays at 0 volume (streaming audio still takes up bandwidth, for example) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + All audio plays at 0 volume (streaming audio still takes up bandwidth, for example) + Persist + 1 + Type + Boolean + Value + 0 + MuteMedia - - Comment - Media plays at 0 volume (streaming audio still takes up bandwidth) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Media plays at 0 volume (streaming audio still takes up bandwidth) + Persist + 1 + Type + Boolean + Value + 0 + MuteMusic - - Comment - Music plays at 0 volume (streaming audio still takes up bandwidth) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Music plays at 0 volume (streaming audio still takes up bandwidth) + Persist + 1 + Type + Boolean + Value + 0 + MuteSounds - - Comment - Sound effects play at 0 volume - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Sound effects play at 0 volume + Persist + 1 + Type + Boolean + Value + 0 + MuteUI - - Comment - UI sound effects play at 0 volume - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + UI sound effects play at 0 volume + Persist + 1 + Type + Boolean + Value + 0 + MuteVoice - - Comment - Voice plays at 0 volume (streaming audio still takes up bandwidth) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Voice plays at 0 volume (streaming audio still takes up bandwidth) + Persist + 1 + Type + Boolean + Value + 0 + MuteWhenMinimized - - Comment - Mute audio when SL window is minimized - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Mute audio when SL window is minimized + Persist + 1 + Type + Boolean + Value + 1 + NewCacheLocation - - Comment - Change the location of the local disk cache to this - Persist - 1 - Type - String - Value - - + + Comment + Change the location of the local disk cache to this + Persist + 1 + Type + String + Value + + NextLoginLocation - - Comment - Location to log into by default. - Persist - 1 - Type - String - Value - - + + Comment + Location to log into by default. + Persist + 1 + Type + String + Value + + NoAudio - - Comment - Disable audio playback. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Disable audio playback. + Persist + 1 + Type + Boolean + Value + 0 + NoHardwareProbe - - Comment - Disable hardware probe. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Disable hardware probe. + Persist + 1 + Type + Boolean + Value + 0 + NoInventoryLibrary - - Comment - Do not request inventory library. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Do not request inventory library. + Persist + 1 + Type + Boolean + Value + 0 + NoPreload - - Comment - Disable sound and image preload. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Disable sound and image preload. + Persist + 1 + Type + Boolean + Value + 0 + NoQuickTime - - Comment - Disable quicktime playback. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Disable quicktime playback. + Persist + 1 + Type + Boolean + Value + 0 + NoVerifySSLCert - - Comment - Do not verify SSL peers. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Do not verify SSL peers. + Persist + 1 + Type + Boolean + Value + 0 + NotecardEditorRect - - Comment - Rectangle for notecard editor - Persist - 1 - Type - Rect - Value - - 0 - 400 - 400 - 0 - - + + Comment + Rectangle for notecard editor + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + NotifyBoxHeight - - Comment - Height of notification messages - Persist - 1 - Type - S32 - Value - 200 - + + Comment + Height of notification messages + Persist + 1 + Type + S32 + Value + 200 + NotifyBoxWidth - - Comment - Width of notification messages - Persist - 1 - Type - S32 - Value - 350 - + + Comment + Width of notification messages + Persist + 1 + Type + S32 + Value + 350 + NotifyMoneyChange - - Comment - Pop up notifications for all L$ transactions - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Pop up notifications for all L$ transactions + Persist + 1 + Type + Boolean + Value + 1 + NotifyTipDuration - - Comment - Length of time that notification tips stay on screen (seconds) - Persist - 1 - Type - F32 - Value - 4 - + + Comment + Length of time that notification tips stay on screen (seconds) + Persist + 1 + Type + F32 + Value + 4.0 + NumSessions - - Comment - Number of successful logins to Second Life - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Number of successful logins to Second Life + Persist + 1 + Type + S32 + Value + 0 + NumpadControl - - Comment - How numpad keys control your avatar. 0 = Like the normal arrow keys, 1 = Numpad moves avatar when numlock is off, 2 = Numpad moves avatar regardless of numlock (use this if you have no numlock) - Persist - 1 - Type - S32 - Value - 0 - + + Comment + How numpad keys control your avatar. 0 = Like the normal arrow keys, 1 = Numpad moves avatar when numlock is off, 2 = Numpad moves avatar regardless of numlock (use this if you have no numlock) + Persist + 1 + Type + S32 + Value + 0 + ObjectChatColor - - Comment - Color of chat messages from objects - Persist - 1 - Type - Color4 - Value - - 0.699999988079071044921875 - 0.89999997615814208984375 - 0.699999988079071044921875 - 1 - - + + Comment + Color of chat messages from objects + Persist + 1 + Type + Color4 + Value + + 0.699999988079 + 0.899999976158 + 0.699999988079 + 1.0 + + OpenDebugStatAdvanced - - Comment - Expand advanced performance stats display - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Expand advanced performance stats display + Persist + 1 + Type + Boolean + Value + 0 + OpenDebugStatBasic - - Comment - Expand basic performance stats display - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Expand basic performance stats display + Persist + 1 + Type + Boolean + Value + 1 + OpenDebugStatNet - - Comment - Expand network stats display - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Expand network stats display + Persist + 1 + Type + Boolean + Value + 1 + OpenDebugStatRender - - Comment - Expand render stats display - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Expand render stats display + Persist + 1 + Type + Boolean + Value + 1 + OpenDebugStatSim - - Comment - Expand simulator performance stats display - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Expand simulator performance stats display + Persist + 1 + Type + Boolean + Value + 1 + OutBandwidth - - Comment - Outgoing bandwidth throttle (bps) - Persist - 1 - Type - F32 - Value - 0 - + + Comment + Outgoing bandwidth throttle (bps) + Persist + 1 + Type + F32 + Value + 0.0 + OverdrivenColor - - Comment - Color of various indicators when resident is speaking too loud. - Persist - 1 - Type - Color4 - Value - - 1 - 0 - 0 - 1 - - + + Comment + Color of various indicators when resident is speaking too loud. + Persist + 1 + Type + Color4 + Value + + 1.0 + 0.0 + 0.0 + 1.0 + + OverlayTitle - - Comment - Controls watermark text message displayed on screen when "ShowOverlayTitle" is enabled (one word, underscores become spaces) - Persist - 1 - Type - String - Value - Set_via_OverlayTitle_in_settings.xml - + + Comment + Controls watermark text message displayed on screen when "ShowOverlayTitle" is enabled (one word, underscores become spaces) + Persist + 1 + Type + String + Value + Set_via_OverlayTitle_in_settings.xml + PTTCurrentlyEnabled - - Comment - - Persist - 0 - Type - Boolean - Value - 1 - + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + PacketDropPercentage - - Comment - Percentage of packets dropped by the client. - Persist - 1 - Type - F32 - Value - 0 - + + Comment + Percentage of packets dropped by the client. + Persist + 1 + Type + F32 + Value + 0.0 + + ParcelMediaAutoPlayEnable + + Comment + Auto play parcel media when available + Persist + 1 + Type + Boolean + Value + 0 + PerAccountSettingsFile - - Comment - Persisted client settings file name (per user). - Persist - 0 - Type - String - Value - - + + Comment + Persisted client settings file name (per user). + Persist + 0 + Type + String + Value + + PermissionsCautionEnabled - - Comment - When enabled, changes the handling of script permission requests to help avoid accidental granting of certain permissions, such as the debit permission - Persist - 0 - Type - Boolean - Value - 1 - + + Comment + When enabled, changes the handling of script permission requests to help avoid accidental granting of certain permissions, such as the debit permission + Persist + 0 + Type + Boolean + Value + 1 + PermissionsCautionNotifyBoxHeight - - Comment - Height of caution-style notification messages - Persist - 0 - Type - S32 - Value - 344 - + + Comment + Height of caution-style notification messages + Persist + 0 + Type + S32 + Value + 344 + PermissionsManagerRect - - Comment - Rectangle for permissions manager window - Persist - 1 - Type - Rect - Value - - 0 - 85 - 300 - 0 - - + + Comment + Rectangle for permissions manager window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + PickerContextOpacity - - Comment - Controls overall opacity of context frustrum connecting color and texture pickers with their swatches - Persist - 1 - Type - F32 - Value - 0.3499999940395355224609375 - + + Comment + Controls overall opacity of context frustrum connecting color and texture pickers with their swatches + Persist + 1 + Type + F32 + Value + 0.34999999404 + PieMenuLineWidth - - Comment - Width of lines in pie menu display (pixels) - Persist - 1 - Type - F32 - Value - 2.5 - + + Comment + Width of lines in pie menu display (pixels) + Persist + 1 + Type + F32 + Value + 2.5 + PinTalkViewOpen - - Comment - Stay in IM after hitting return - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Stay in IM after hitting return + Persist + 1 + Type + Boolean + Value + 1 + PingInterpolate - - Comment - Extrapolate object position along velocity vector based on ping delay - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Extrapolate object position along velocity vector based on ping delay + Persist + 1 + Type + Boolean + Value + 0 + PitchFromMousePosition - - Comment - Vertical range over which avatar head tracks mouse position (degrees of head rotation from top of window to bottom) - Persist - 1 - Type - F32 - Value - 90 - + + Comment + Vertical range over which avatar head tracks mouse position (degrees of head rotation from top of window to bottom) + Persist + 1 + Type + F32 + Value + 90.0 + PlayTypingAnim - - Comment - Your avatar plays the typing animation whenever you type in the chat bar - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Your avatar plays the typing animation whenever you type in the chat bar + Persist + 1 + Type + Boolean + Value + 1 + PrecachingDelay - - Comment - Delay when logging in to load world before showing it (seconds) - Persist - 1 - Type - F32 - Value - 6 - + + Comment + Delay when logging in to load world before showing it (seconds) + Persist + 1 + Type + F32 + Value + 6.0 + PreviewAnimRect - - Comment - Rectangle for animation preview window - Persist - 1 - Type - Rect - Value - - 0 - 85 - 300 - 0 - - + + Comment + Rectangle for animation preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + PreviewClassifiedRect - - Comment - Rectangle for URL preview window - Persist - 1 - Type - Rect - Value - - 0 - 530 - 420 - 0 - - + + Comment + Rectangle for URL preview window + Persist + 1 + Type + Rect + Value + + 0 + 530 + 420 + 0 + + PreviewEventRect - - Comment - Rectangle for Event preview window - Persist - 1 - Type - Rect - Value - - 0 - 530 - 420 - 0 - - + + Comment + Rectangle for Event preview window + Persist + 1 + Type + Rect + Value + + 0 + 530 + 420 + 0 + + PreviewLandmarkRect - - Comment - Rectangle for landmark preview window - Persist - 1 - Type - Rect - Value - - 0 - 90 - 300 - 0 - - + + Comment + Rectangle for landmark preview window + Persist + 1 + Type + Rect + Value + + 0 + 90 + 300 + 0 + + PreviewObjectRect - - Comment - Rectangle for object preview window - Persist - 1 - Type - Rect - Value - - 0 - 85 - 300 - 0 - - + + Comment + Rectangle for object preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + PreviewScriptRect - - Comment - Rectangle for script preview window - Persist - 1 - Type - Rect - Value - - 0 - 550 - 500 - 0 - - + + Comment + Rectangle for script preview window + Persist + 1 + Type + Rect + Value + + 0 + 550 + 500 + 0 + + PreviewSoundRect - - Comment - Rectangle for sound preview window - Persist - 1 - Type - Rect - Value - - 0 - 85 - 300 - 0 - - + + Comment + Rectangle for sound preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + PreviewTextureRect - - Comment - Rectangle for texture preview window - Persist - 1 - Type - Rect - Value - - 0 - 400 - 400 - 0 - - + + Comment + Rectangle for texture preview window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + PreviewURLRect - - Comment - Rectangle for URL preview window - Persist - 1 - Type - Rect - Value - - 0 - 90 - 300 - 0 - - + + Comment + Rectangle for URL preview window + Persist + 1 + Type + Rect + Value + + 0 + 90 + 300 + 0 + + PreviewWearableRect - - Comment - Rectangle for wearable preview window - Persist - 1 - Type - Rect - Value - - 0 - 85 - 300 - 0 - - + + Comment + Rectangle for wearable preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + ProbeHardwareOnStartup - - Comment - Query current hardware configuration on application startup - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Query current hardware configuration on application startup + Persist + 1 + Type + Boolean + Value + 1 + PropertiesRect - - Comment - Rectangle for inventory item properties window - Persist - 1 - Type - Rect - Value - - 0 - 320 - 350 - 0 - - + + Comment + Rectangle for inventory item properties window + Persist + 1 + Type + Rect + Value + + 0 + 320 + 350 + 0 + + PurgeCacheOnNextStartup - - Comment - Clear local file cache next time viewer is run - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Clear local file cache next time viewer is run + Persist + 1 + Type + Boolean + Value + 0 + PurgeCacheOnStartup - - Comment - Clear local file cache every time viewer is run - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Clear local file cache every time viewer is run + Persist + 1 + Type + Boolean + Value + 0 + PushToTalkButton - - Comment - Which button or keyboard key is used for push-to-talk - Persist - 1 - Type - String - Value - MiddleMouse - + + Comment + Which button or keyboard key is used for push-to-talk + Persist + 1 + Type + String + Value + MiddleMouse + PushToTalkToggle - - Comment - Should the push-to-talk button behave as a toggle - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Should the push-to-talk button behave as a toggle + Persist + 1 + Type + Boolean + Value + 0 + QAMode - - Comment - Enable Testing Features. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable Testing Features. + Persist + 1 + Type + Boolean + Value + 0 + QuietSnapshotsToDisk - - Comment - Take snapshots to disk without playing animation or sound - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Take snapshots to disk without playing animation or sound + Persist + 1 + Type + Boolean + Value + 0 + QuitAfterSeconds - - Comment - The duration allowed before quitting. - Persist - 1 - Type - F32 - Value - 0 - + + Comment + The duration allowed before quitting. + Persist + 1 + Type + F32 + Value + 0.0 + RadioLandBrushAction - - Comment - Last selected land modification operation (0 = flatten, 1 = raise, 2 = lower, 3 = smooth, 4 = roughen, 5 = revert) - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Last selected land modification operation (0 = flatten, 1 = raise, 2 = lower, 3 = smooth, 4 = roughen, 5 = revert) + Persist + 1 + Type + S32 + Value + 0 + RadioLandBrushSize - - Comment - Size of land modification brush (0 = small, 1 = medium, 2 = large) - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Size of land modification brush (0 = small, 1 = medium, 2 = large) + Persist + 1 + Type + S32 + Value + 0 + RecentItemsSortOrder - - Comment - Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) - Persist - 1 - Type - U32 - Value - 1 - + + Comment + Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 1 + RectangleSelectInclusive - - Comment - Select objects that have at least one vertex inside selection rectangle - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Select objects that have at least one vertex inside selection rectangle + Persist + 1 + Type + Boolean + Value + 1 + RegionTextureSize - - Comment - Terrain texture dimensions (power of 2) - Persist - 1 - Type - U32 - Value - 256 - + + Comment + Terrain texture dimensions (power of 2) + Persist + 1 + Type + U32 + Value + 256 + RememberPassword - - Comment - Keep password (in encrypted form) for next login - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Keep password (in encrypted form) for next login + Persist + 1 + Type + Boolean + Value + 1 + RenderAnisotropic - - Comment - Render textures using anisotropic filtering - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Render textures using anisotropic filtering + Persist + 1 + Type + Boolean + Value + 0 + RenderAppleUseMultGL - - Comment - Whether we want to use multi-threaded OpenGL on Apple hardware (requires restart of SL). - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Whether we want to use multi-threaded OpenGL on Apple hardware (requires restart of SL). + Persist + 1 + Type + Boolean + Value + 0 + RenderAvatarCloth - - Comment - Controls if avatars use wavy cloth - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Controls if avatars use wavy cloth + Persist + 1 + Type + Boolean + Value + 1 + RenderAvatarLODFactor - - Comment - Controls level of detail of avatars (multiplier for current screen area when calculated level of detail) - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Controls level of detail of avatars (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 0.5 + RenderAvatarMaxVisible - - Comment - Maximum number of avatars to display at any one time - Persist - 1 - Type - S32 - Value - 35 - + + Comment + Maximum number of avatars to display at any one time + Persist + 1 + Type + S32 + Value + 35 + RenderAvatarVP - - Comment - Use vertex programs to perform hardware skinning of avatar - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Use vertex programs to perform hardware skinning of avatar + Persist + 1 + Type + Boolean + Value + 1 + RenderBumpmapMinDistanceSquared - - Comment - Maximum distance at which to render bumpmapped primitives (distance in meters, squared) - Persist - 1 - Type - F32 - Value - 100 - + + Comment + Maximum distance at which to render bumpmapped primitives (distance in meters, squared) + Persist + 1 + Type + F32 + Value + 100.0 + RenderCubeMap - - Comment - Whether we can render the cube map or not - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Whether we can render the cube map or not + Persist + 1 + Type + Boolean + Value + 1 + RenderCustomSettings - - Comment - Do you want to set the graphics settings yourself - Persist - 1 - Type - Boolean - Value - 0 - - RenderDebugGL - - Comment - Enable strict GL debugging. - Persist - 1 - Type - Boolean - Value - 0 - - RenderDebugPipeline - - Comment - Enable strict pipeline debugging. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Do you want to set the graphics settings yourself + Persist + 1 + Type + Boolean + Value + 0 + + RenderDebugGL + + Comment + Enable strict GL debugging. + Persist + 1 + Type + Boolean + Value + 0 + + RenderDebugPipeline + + Comment + Enable strict pipeline debugging. + Persist + 1 + Type + Boolean + Value + 0 + RenderDebugTextureBind - - Comment - Enable texture bind performance test. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable texture bind performance test. + Persist + 1 + Type + Boolean + Value + 0 + + RenderDeferred + + Comment + Use deferred rendering pipeline. + Persist + 1 + Type + Boolean + Value + 0 + RenderDynamicLOD - - Comment - Dynamically adjust level of detail. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Dynamically adjust level of detail. + Persist + 1 + Type + Boolean + Value + 1 + RenderDynamicReflections - - Comment - Generate a dynamic cube map for reflections (objects reflect their environment, experimental). - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Generate a dynamic cube map for reflections (objects reflect their environment, experimental). + Persist + 1 + Type + Boolean + Value + 0 + + RenderFSAASamples + + Comment + Number of samples to use for FSAA (0 = no AA). + Persist + 1 + Type + U32 + Value + 0 + RenderFarClip - - Comment - Distance of far clip plane from camera (meters) - Persist - 1 - Type - F32 - Value - 256 - + + Comment + Distance of far clip plane from camera (meters) + Persist + 1 + Type + F32 + Value + 256.0 + + RenderFastAlpha + + Comment + Use lossy alpha rendering optimization (opaque/nonexistent small alpha faces). + Persist + 1 + Type + Boolean + Value + 0 + RenderFastUI - - Comment - [NOT USED] - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + [NOT USED] + Persist + 1 + Type + Boolean + Value + 0 + RenderFlexTimeFactor - - Comment - Controls level of detail of flexible objects (multiplier for amount of time spent processing flex objects) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Controls level of detail of flexible objects (multiplier for amount of time spent processing flex objects) + Persist + 1 + Type + F32 + Value + 1.0 + RenderFogRatio - - Comment - Distance from camera where fog reaches maximum density (fraction or multiple of far clip distance) - Persist - 1 - Type - F32 - Value - 4.0 - + + Comment + Distance from camera where fog reaches maximum density (fraction or multiple of far clip distance) + Persist + 1 + Type + F32 + Value + 4.0 + RenderGamma - - Comment - Sets gamma exponent for renderer - Persist - 1 - Type - F32 - Value - 0 - + + Comment + Sets gamma exponent for renderer + Persist + 1 + Type + F32 + Value + 0.0 + RenderGammaFull - - Comment - Use fully controllable gamma correction, instead of faster, hard-coded gamma correction of 2. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Use fully controllable gamma correction, instead of faster, hard-coded gamma correction of 2. + Persist + 1 + Type + Boolean + Value + 1.0 + RenderGlow - - Comment - Render bloom post effect. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Render bloom post effect. + Persist + 1 + Type + Boolean + Value + 1 + RenderGlowIterations - - Comment - Number of times to iterate the glow (higher = wider and smoother but slower) - Persist - 1 - Type - S32 - Value - 2 - + + Comment + Number of times to iterate the glow (higher = wider and smoother but slower) + Persist + 1 + Type + S32 + Value + 2 + RenderGlowLumWeights - - Comment - Weights for each color channel to be used in calculating luminance (should add up to 1.0) - Persist - 1 - Type - Vector3 - Value - - 0.299 - 0.587 - 0.114 - - + + Comment + Weights for each color channel to be used in calculating luminance (should add up to 1.0) + Persist + 1 + Type + Vector3 + Value + + 0.299 + 0.587 + 0.114 + + RenderGlowMaxExtractAlpha - - Comment - Max glow alpha value for brightness extraction to auto-glow. - Persist - 1 - Type - F32 - Value - 0.065 - + + Comment + Max glow alpha value for brightness extraction to auto-glow. + Persist + 1 + Type + F32 + Value + 0.065 + RenderGlowMinLuminance - - Comment - Min luminance intensity necessary to consider an object bright enough to automatically glow. (Gets clamped to 0 - 1.0 range) - Persist - 1 - Type - F32 - Value - 1.0 - + + Comment + Min luminance intensity necessary to consider an object bright enough to automatically glow. (Gets clamped to 0 - 1.0 range) + Persist + 1 + Type + F32 + Value + 1.0 + RenderGlowResolutionPow - - Comment - Glow map resolution power of two. - Persist - 1 - Type - S32 - Value - 9 - + + Comment + Glow map resolution power of two. + Persist + 1 + Type + S32 + Value + 9 + RenderGlowStrength - - Comment - Additive strength of glow. - Persist - 1 - Type - F32 - Value - 0.35 - + + Comment + Additive strength of glow. + Persist + 1 + Type + F32 + Value + 0.35 + RenderGlowWarmthAmount - - Comment - Amount of warmth extraction to use (versus luminance extraction). 0 = lum, 1.0 = warmth - Persist - 1 - Type - F32 - Value - 0 - + + Comment + Amount of warmth extraction to use (versus luminance extraction). 0 = lum, 1.0 = warmth + Persist + 1 + Type + F32 + Value + 0.0 + RenderGlowWarmthWeights - - Comment - Weight of each color channel used before finding the max warmth - Persist - 1 - Type - Vector3 - Value - - 1.0 - 0.5 - 0.7 - - + + Comment + Weight of each color channel used before finding the max warmth + Persist + 1 + Type + Vector3 + Value + + 1.0 + 0.5 + 0.7 + + RenderGlowWidth - - Comment - Glow sample size (higher = wider and softer but eventually more pixelated) - Persist - 1 - Type - F32 - Value - 1.3 - + + Comment + Glow sample size (higher = wider and softer but eventually more pixelated) + Persist + 1 + Type + F32 + Value + 1.3 + RenderHUDInSnapshot - - Comment - Display HUD attachments in snapshot - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display HUD attachments in snapshot + Persist + 1 + Type + Boolean + Value + 0 + RenderHiddenSelections - - Comment - Show selection lines on objects that are behind other objects - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show selection lines on objects that are behind other objects + Persist + 1 + Type + Boolean + Value + 1 + RenderHideGroupTitle - - Comment - Don't show my group title in my name label - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Don't show my group title in my name label + Persist + 1 + Type + Boolean + Value + 0 + RenderHideGroupTitleAll - - Comment - Show group titles in name labels - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show group titles in name labels + Persist + 1 + Type + Boolean + Value + 0 + RenderInitError - - Comment - Error occured while initializing GL - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Error occured while initializing GL + Persist + 1 + Type + Boolean + Value + 0 + RenderLightRadius - - Comment - Render the radius of selected lights - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Render the radius of selected lights + Persist + 1 + Type + Boolean + Value + 0 + RenderLightingDetail - - Comment - Amount of detail for lighting objects/avatars/terrain (0=sun/moon only, 1=enable local lights) - Persist - 1 - Type - S32 - Value - 1 - + + Comment + Amount of detail for lighting objects/avatars/terrain (0=sun/moon only, 1=enable local lights) + Persist + 1 + Type + S32 + Value + 1 + RenderMaxPartCount - - Comment - Maximum number of particles to display on screen - Persist - 1 - Type - S32 - Value - 4096 - + + Comment + Maximum number of particles to display on screen + Persist + 1 + Type + S32 + Value + 4096 + RenderMaxVBOSize - - Comment - Maximum size of a vertex buffer (in KB). - Persist - 1 - Type - S32 - Value - 32 - + + Comment + Maximum size of a vertex buffer (in KB). + Persist + 1 + Type + S32 + Value + 32 + RenderName - - Comment - Controls display of names above avatars (0 = never, 1 = fade, 2 = always) - Persist - 1 - Type - S32 - Value - 2 - + + Comment + Controls display of names above avatars (0 = never, 1 = fade, 2 = always) + Persist + 1 + Type + S32 + Value + 2 + RenderNameFadeDuration - - Comment - Time interval over which to fade avatar names (seconds) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Time interval over which to fade avatar names (seconds) + Persist + 1 + Type + F32 + Value + 1.0 + RenderNameHideSelf - - Comment - Don't display own name above avatar - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Don't display own name above avatar + Persist + 1 + Type + Boolean + Value + 0 + RenderNameShowTime - - Comment - Fade avatar names after specified time (seconds) - Persist - 1 - Type - F32 - Value - 10 - + + Comment + Fade avatar names after specified time (seconds) + Persist + 1 + Type + F32 + Value + 10.0 + RenderObjectBump - - Comment - Show bumpmapping on primitives - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show bumpmapping on primitives + Persist + 1 + Type + Boolean + Value + 1 + RenderQualityPerformance - - Comment - Which graphics settings you've chosen - Persist - 1 - Type - U32 - Value - 1 - + + Comment + Which graphics settings you've chosen + Persist + 1 + Type + U32 + Value + 1 + RenderReflectionDetail - - Comment - Detail of reflection render pass. - Persist - 1 - Type - S32 - Value - 2 - - RenderReflectionRes - - Comment - Reflection map resolution. - Persist - 1 - Type - S32 - Value - 64 - + + Comment + Detail of reflection render pass. + Persist + 1 + Type + S32 + Value + 2 + + RenderReflectionRes + + Comment + Reflection map resolution. + Persist + 1 + Type + S32 + Value + 64 + RenderResolutionDivisor - - Comment - Divisor for rendering 3D scene at reduced resolution. - Persist - 1 - Type - U32 - Value - 1 - + + Comment + Divisor for rendering 3D scene at reduced resolution. + Persist + 1 + Type + U32 + Value + 1 + RenderShaderLODThreshold - - Comment - Fraction of draw distance defining the switch to a different shader LOD - Persist - 1 - Type - F32 - Value - 1.0 - + + Comment + Fraction of draw distance defining the switch to a different shader LOD + Persist + 1 + Type + F32 + Value + 1.0 + + RenderShaderParticleThreshold + + Comment + Fraction of draw distance to not use shader on particles + Persist + 1 + Type + F32 + Value + 0.25 + RenderSunDynamicRange - - Comment - Defines what percent brighter the sun is than local point lights (1.0 = 100% brighter. Value should not be less than 0. ). - Persist - 1 - Type - F32 - Value - 1.0 - + + Comment + Defines what percent brighter the sun is than local point lights (1.0 = 100% brighter. Value should not be less than 0. ). + Persist + 1 + Type + F32 + Value + 1.0 + RenderTerrainDetail - - Comment - Detail applied to terrain texturing (0 = none, 1 or 2 = full) - Persist - 1 - Type - S32 - Value - 2 - + + Comment + Detail applied to terrain texturing (0 = none, 1 or 2 = full) + Persist + 1 + Type + S32 + Value + 2 + RenderTerrainLODFactor - - Comment - Controls level of detail of terrain (multiplier for current screen area when calculated level of detail) - Persist - 1 - Type - F32 - Value - 1.0 - + + Comment + Controls level of detail of terrain (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 1.0 + RenderTerrainScale - - Comment - Terrain detail texture scale - Persist - 1 - Type - F32 - Value - 12 - + + Comment + Terrain detail texture scale + Persist + 1 + Type + F32 + Value + 12.0 + + RenderTextureMemoryMultiple + + Comment + Multiple of texture memory value to use (should fit: 0 < value <= 1.0) + Persist + 1 + Type + F32 + Value + 1.0 + RenderTreeLODFactor - - Comment - Controls level of detail of vegetation (multiplier for current screen area when calculated level of detail) - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Controls level of detail of vegetation (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 0.5 + RenderUIInSnapshot - - Comment - Display user interface in snapshot - Persist - 1 - Type - Boolean - Value - 0 - - RenderUseFarClip - - Comment - If false, frustum culling will ignore far clip plane. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display user interface in snapshot + Persist + 1 + Type + Boolean + Value + 0 + + RenderUnloadedAvatar + + Comment + Show avatars which haven't finished loading + Persist + 1 + Type + Boolean + Value + 0 + RenderUseFBO - - Comment - Whether we want to use GL_EXT_framebuffer_objects. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Whether we want to use GL_EXT_framebuffer_objects. + Persist + 1 + Type + Boolean + Value + 0 + + RenderUseFarClip + + Comment + If false, frustum culling will ignore far clip plane. + Persist + 1 + Type + Boolean + Value + 1 + RenderUseImpostors - - Comment - Whether we want to use impostors for far away avatars. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Whether we want to use impostors for far away avatars. + Persist + 1 + Type + Boolean + Value + 1 + RenderUseShaderLOD - - Comment - Whether we want to have different shaders for LOD - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Whether we want to have different shaders for LOD + Persist + 1 + Type + Boolean + Value + 1 + RenderUseShaderNearParticles - - Comment - Whether we want to use shaders on near particles - Persist - 1 - Type - Boolean - Value - 0 - - RenderShaderParticleThreshold - - Comment - Fraction of draw distance to not use shader on particles - Persist - 1 - Type - F32 - Value - 0.25 - - RenderUnloadedAvatar - - Comment - Show avatars which haven't finished loading - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Whether we want to use shaders on near particles + Persist + 1 + Type + Boolean + Value + 0 + RenderVBOEnable - - Comment - Use GL Vertex Buffer Objects - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Use GL Vertex Buffer Objects + Persist + 1 + Type + Boolean + Value + 1 + RenderVolumeLODFactor - - Comment - Controls level of detail of primitives (multiplier for current screen area when calculated level of detail) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Controls level of detail of primitives (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 1.0 + RenderWater - - Comment - Display water - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display water + Persist + 1 + Type + Boolean + Value + 1 + RenderWaterMipNormal - - Comment - Use mip maps for water normal map. - Persist - 1 - Type - Boolean - Value - 1 - - RenderWaterReflections - - Comment - Reflect the environment in the water. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Use mip maps for water normal map. + Persist + 1 + Type + Boolean + Value + 1 + RenderWaterRefResolution - - Comment - Water planar reflection resolution. - Persist - 1 - Type - S32 - Value - 512 - + + Comment + Water planar reflection resolution. + Persist + 1 + Type + S32 + Value + 512 + + RenderWaterReflections + + Comment + Reflect the environment in the water. + Persist + 1 + Type + Boolean + Value + 0 + RotateRight - - Comment - Make the agent rotate to its right. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Make the agent rotate to its right. + Persist + 1 + Type + Boolean + Value + 0 + RotationStep - - Comment - All rotations via rotation tool are constrained to multiples of this unit (degrees) - Persist - 1 - Type - F32 - Value - 1 - - RunBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + All rotations via rotation tool are constrained to multiples of this unit (degrees) + Persist + 1 + Type + F32 + Value + 1.0 + + RunBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + RunMultipleThreads - - Comment - If TRUE keep background threads active during render - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + If TRUE keep background threads active during render + Persist + 1 + Type + Boolean + Value + 0 + SafeMode - - Comment - Reset preferences, run in safe mode. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Reset preferences, run in safe mode. + Persist + 1 + Type + Boolean + Value + 0 + SaveMinidump - - Comment - Save minidump for developer debugging on crash - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Save minidump for developer debugging on crash + Persist + 1 + Type + Boolean + Value + 1 + ScaleShowAxes - - Comment - Show indicator of selected scale axis when scaling - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show indicator of selected scale axis when scaling + Persist + 1 + Type + Boolean + Value + 0 + ScaleStretchTextures - - Comment - Stretch textures along with object when scaling - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Stretch textures along with object when scaling + Persist + 1 + Type + Boolean + Value + 1 + ScaleUniform - - Comment - Scale selected objects evenly about center of selection - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Scale selected objects evenly about center of selection + Persist + 1 + Type + Boolean + Value + 0 + ScriptErrorColor - - Comment - Color of script error messages - Persist - 1 - Type - Color4 - Value - - 0.8235294117 - 0.2745098039 - 0.2745098039 - 1 - - + + Comment + Color of script error messages + Persist + 1 + Type + Color4 + Value + + 0.8235294117 + 0.2745098039 + 0.2745098039 + 1.0 + + ScriptErrorsAsChat - - Comment - Display script errors and warning in chat history - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display script errors and warning in chat history + Persist + 1 + Type + Boolean + Value + 0 + ScriptHelpFollowsCursor - - Comment - Scripting help window updates contents based on script editor contents under text cursor - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Scripting help window updates contents based on script editor contents under text cursor + Persist + 1 + Type + Boolean + Value + 0 + SearchURLDefault - - Comment - URL to load for empty searches - Persist - 1 - Type - String - Value - http://secondlife.com/app/search/index.php? - + + Comment + URL to load for empty searches + Persist + 1 + Type + String + Value + http://secondlife.com/app/search/index.php? + SearchURLQuery - - Comment - URL to use for searches - Persist - 1 - Type - String - Value - http://secondlife.com/app/search/search_proxy.php?q=[QUERY]&s=[COLLECTION]& - + + Comment + URL to use for searches + Persist + 1 + Type + String + Value + http://secondlife.com/app/search/search_proxy.php?q=[QUERY]&s=[COLLECTION]& + SearchURLSuffix2 - - Comment - Parameters added to end of search queries - Persist - 1 - Type - String - Value - lang=[LANG]&m=[MATURE]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION] - + + Comment + Parameters added to end of search queries + Persist + 1 + Type + String + Value + lang=[LANG]&m=[MATURE]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION] + SelectMovableOnly - - Comment - Select only objects you can move - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Select only objects you can move + Persist + 1 + Type + Boolean + Value + 0 + SelectOwnedOnly - - Comment - Select only objects you own - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Select only objects you own + Persist + 1 + Type + Boolean + Value + 0 + SelectionHighlightAlpha - - Comment - Opacity of selection highlight (0.0 = completely transparent, 1.0 = completely opaque) - Persist - 1 - Type - F32 - Value - 0.4000000059604644775390625 - + + Comment + Opacity of selection highlight (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.40000000596 + SelectionHighlightAlphaTest - - Comment - Alpha value below which pixels are displayed on selection highlight line (0.0 = show all pixels, 1.0 = show now pixels) - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Alpha value below which pixels are displayed on selection highlight line (0.0 = show all pixels, 1.0 = show now pixels) + Persist + 1 + Type + F32 + Value + 0.1 + SelectionHighlightThickness - - Comment - Thickness of selection highlight line (fraction of view distance) - Persist - 1 - Type - F32 - Value - 0.009999999776482582092285156 - + + Comment + Thickness of selection highlight line (fraction of view distance) + Persist + 1 + Type + F32 + Value + 0.00999999977648 + SelectionHighlightUAnim - - Comment - Rate at which texture animates along U direction in selection highlight line (fraction of texture per second) - Persist - 1 - Type - F32 - Value - 0 - + + Comment + Rate at which texture animates along U direction in selection highlight line (fraction of texture per second) + Persist + 1 + Type + F32 + Value + 0.0 + SelectionHighlightUScale - - Comment - Scale of texture display on selection highlight line (fraction of texture size) - Persist - 1 - Type - F32 - Value - 0.1 - + + Comment + Scale of texture display on selection highlight line (fraction of texture size) + Persist + 1 + Type + F32 + Value + 0.1 + SelectionHighlightVAnim - - Comment - Rate at which texture animates along V direction in selection highlight line (fraction of texture per second) - Persist - 1 - Type - F32 - Value - 0.5 - + + Comment + Rate at which texture animates along V direction in selection highlight line (fraction of texture per second) + Persist + 1 + Type + F32 + Value + 0.5 + SelectionHighlightVScale - - Comment - Scale of texture display on selection highlight line (fraction of texture size) - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Scale of texture display on selection highlight line (fraction of texture size) + Persist + 1 + Type + F32 + Value + 1.0 + ServerChoice - - Comment - [DO NOT MODIFY] Controls which grid you connect to - Persist - 1 - Type - S32 - Value - 0 - - ShowAllObjectHoverTip - - Comment - Show descriptive tooltip when mouse hovers over non-interactive and interactive objects. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + [DO NOT MODIFY] Controls which grid you connect to + Persist + 1 + Type + S32 + Value + 0 + ShowActiveSpeakers - - Comment - Display active speakers list on login - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display active speakers list on login + Persist + 1 + Type + Boolean + Value + 0 + + ShowAllObjectHoverTip + + Comment + Show descriptive tooltip when mouse hovers over non-interactive and interactive objects. + Persist + 1 + Type + Boolean + Value + 0 + ShowAxes - - Comment - Render coordinate frame at your position - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Render coordinate frame at your position + Persist + 1 + Type + Boolean + Value + 0 + ShowCameraControls - - Comment - Display camera controls on login - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display camera controls on login + Persist + 1 + Type + Boolean + Value + 1 + ShowChatHistory - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowCommunicate - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowConsoleWindow - - Comment - Show log in separate OS window - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show log in separate OS window + Persist + 1 + Type + Boolean + Value + 0 + ShowCrosshairs - - Comment - Display crosshairs when in mouselook mode - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display crosshairs when in mouselook mode + Persist + 1 + Type + Boolean + Value + 1 + ShowDebugConsole - - Comment - Show log in SL window - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show log in SL window + Persist + 1 + Type + Boolean + Value + 0 + ShowDebugStats - - Comment - Show performance stats display - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show performance stats display + Persist + 1 + Type + Boolean + Value + 0 + ShowDepthBuffer - - Comment - Show depth buffer contents - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show depth buffer contents + Persist + 1 + Type + Boolean + Value + 0 + ShowDirectory - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowEmptyFoldersWhenSearching - - Comment - Shows folders that do not have any visible contents when applying a filter to inventory - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Shows folders that do not have any visible contents when applying a filter to inventory + Persist + 1 + Type + Boolean + Value + 0 + ShowHoverTips - - Comment - Show descriptive tooltip when mouse hovers over items in world - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show descriptive tooltip when mouse hovers over items in world + Persist + 1 + Type + Boolean + Value + 1 + ShowInventory - - Comment - Open inventory window on login - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Open inventory window on login + Persist + 1 + Type + Boolean + Value + 0 + ShowLandHoverTip - - Comment - Show descriptive tooltip when mouse hovers over land - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show descriptive tooltip when mouse hovers over land + Persist + 1 + Type + Boolean + Value + 0 + ShowLeaders - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowMatureClassifieds - - Comment - Display results of find classifieds that are flagged as mature - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display results of find classifieds that are flagged as mature + Persist + 1 + Type + Boolean + Value + 0 + ShowMatureEvents - - Comment - Display results of find events that are flagged as mature - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display results of find events that are flagged as mature + Persist + 1 + Type + Boolean + Value + 0 + ShowMatureFindAll - - Comment - Display results of find all that are in mature sims - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display results of find all that are in mature sims + Persist + 1 + Type + Boolean + Value + 0 + ShowMatureGroups - - Comment - Display results of find groups that are in flagged as mature - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display results of find groups that are in flagged as mature + Persist + 1 + Type + Boolean + Value + 1 + ShowMatureSims - - Comment - Display results of find places or find popular that are in mature sims - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display results of find places or find popular that are in mature sims + Persist + 1 + Type + Boolean + Value + 0 + ShowMiniMap - - Comment - Display mini map on login - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display mini map on login + Persist + 1 + Type + Boolean + Value + 0 + ShowMovementControls - - Comment - Display movement controls on login - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display movement controls on login + Persist + 1 + Type + Boolean + Value + 1 + ShowNearClip - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowNewInventory - - Comment - Automatically views new notecards/textures/landmarks - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Automatically views new notecards/textures/landmarks + Persist + 1 + Type + Boolean + Value + 1 + ShowObjectUpdates - - Comment - Show when update messages are received for individual objects - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show when update messages are received for individual objects + Persist + 1 + Type + Boolean + Value + 0 + ShowOverlayTitle - - Comment - Prints watermark text message on screen - Persist - 1 - Type - Boolean - Value - 0 - - ShowParcelOwners - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + Prints watermark text message on screen + Persist + 1 + Type + Boolean + Value + 0 + + ShowParcelOwners + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowPermissions - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowPropertyLines - - Comment - Show line overlay demarking property boundaries - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show line overlay demarking property boundaries + Persist + 1 + Type + Boolean + Value + 0 + ShowSearchBar - - Comment - Show the Search Bar in the Status Overlay - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show the Search Bar in the Status Overlay + Persist + 1 + Type + Boolean + Value + 1 + ShowSelectionBeam - - Comment - Show selection particle beam when selecting or interacting with objects. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show selection particle beam when selecting or interacting with objects. + Persist + 1 + Type + Boolean + Value + 1 + ShowStartLocation - - Comment - Display starting location menu on login screen - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display starting location menu on login screen + Persist + 1 + Type + Boolean + Value + 0 + ShowTangentBasis - - Comment - Render normal and binormal (debugging bump mapping) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Render normal and binormal (debugging bump mapping) + Persist + 1 + Type + Boolean + Value + 0 + ShowToolBar - - Comment - Show toolbar at bottom of screen - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show toolbar at bottom of screen + Persist + 1 + Type + Boolean + Value + 1 + ShowTools - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + ShowVoiceChannelPopup - - Comment - Controls visibility of the current voice channel popup above the voice tab - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Controls visibility of the current voice channel popup above the voice tab + Persist + 1 + Type + Boolean + Value + 0 + ShowVolumeSettingsPopup - - Comment - Show individual volume slider for voice, sound effects, etc - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show individual volume slider for voice, sound effects, etc + Persist + 1 + Type + Boolean + Value + 0 + ShowWorldMap - - Comment - Display world map on login - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display world map on login + Persist + 1 + Type + Boolean + Value + 0 + ShowXUINames - - Comment - Display XUI Names as Tooltips - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display XUI Names as Tooltips + Persist + 1 + Type + Boolean + Value + 0 + SitBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + SkinFolder - - Comment - The skin folder to use. - Persist - 1 - Type - String - Value - - + + Comment + The skin folder to use. + Persist + 1 + Type + String + Value + + SkyAmbientScale - - Comment - Controls strength of ambient, or non-directional light from the sun and moon (fraction or multiple of default ambient level) - Persist - 1 - Type - F32 - Value - 0.300000011920928955078125 - + + Comment + Controls strength of ambient, or non-directional light from the sun and moon (fraction or multiple of default ambient level) + Persist + 1 + Type + F32 + Value + 0.300000011921 + + SkyEditPresets + + Comment + Whether to be able to edit the sky defaults or not + Persist + 1 + Type + Boolean + Value + 0 + SkyNightColorShift - - Comment - Controls moonlight color (base color applied to moon as light source) - Persist - 1 - Type - Color3 - Value - - 0.699999988079071044921875 - 0.699999988079071044921875 - 1 - - + + Comment + Controls moonlight color (base color applied to moon as light source) + Persist + 1 + Type + Color3 + Value + + 0.699999988079 + 0.699999988079 + 1.0 + + SkyOverrideSimSunPosition - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + SkySunDefaultPosition - - Comment - Default position of sun in sky (direction in world coordinates) - Persist - 1 - Type - Vector3 - Value - - 1 - 0 - 0.1 - - - SkyUseClassicClouds - - Comment - Whether to use the old Second Life particle clouds or not - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Default position of sun in sky (direction in world coordinates) + Persist + 1 + Type + Vector3 + Value + + 1.0 + 0.0 + 0.1 + + + SkyUseClassicClouds + + Comment + Whether to use the old Second Life particle clouds or not + Persist + 1 + Type + Boolean + Value + 1 + SlideLeftBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 20 - 54 - 45 - 29 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 20 + 54 + 45 + 29 + + SlideRightBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 66 - 54 - 91 - 29 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 66 + 54 + 91 + 29 + + SmallAvatarNames - - Comment - Display avatar name text in smaller font - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Display avatar name text in smaller font + Persist + 1 + Type + Boolean + Value + 1 + SnapEnabled - - Comment - Enable snapping to grid - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enable snapping to grid + Persist + 1 + Type + Boolean + Value + 1 + SnapMargin - - Comment - Controls maximum distance between windows before they auto-snap together (pixels) - Persist - 1 - Type - S32 - Value - 10 - + + Comment + Controls maximum distance between windows before they auto-snap together (pixels) + Persist + 1 + Type + S32 + Value + 10 + SnapToMouseCursor - - Comment - When snapping to grid, center object on nearest grid point to mouse cursor - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + When snapping to grid, center object on nearest grid point to mouse cursor + Persist + 1 + Type + Boolean + Value + 0 + SnapshotLocalLastResolution - - Comment - Take next local snapshot at this resolution - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Take next local snapshot at this resolution + Persist + 1 + Type + S32 + Value + 0 + SnapshotPostcardLastResolution - - Comment - Take next postcard snapshot at this resolution - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Take next postcard snapshot at this resolution + Persist + 1 + Type + S32 + Value + 0 + SnapshotQuality - - Comment - Quality setting of postcard JPEGs (0 = worst, 100 = best) - Persist - 1 - Type - S32 - Value - 75 - + + Comment + Quality setting of postcard JPEGs (0 = worst, 100 = best) + Persist + 1 + Type + S32 + Value + 75 + SnapshotTextureLastResolution - - Comment - Take next texture snapshot at this resolution - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Take next texture snapshot at this resolution + Persist + 1 + Type + S32 + Value + 0 + SpeakingColor - - Comment - Color of various indicators when resident is speaking on a voice channel. - Persist - 1 - Type - Color4 - Value - - 0 - 1 - 0 - 1 - - + + Comment + Color of various indicators when resident is speaking on a voice channel. + Persist + 1 + Type + Color4 + Value + + 0.0 + 1.0 + 0.0 + 1.0 + + SpeedTest - - Comment - Performance testing mode, no network - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Performance testing mode, no network + Persist + 1 + Type + Boolean + Value + 0 + StatsAutoRun - - Comment - Play back autopilot - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Play back autopilot + Persist + 1 + Type + Boolean + Value + 0 + StatsFile - - Comment - Filename for stats logging output - Persist - 1 - Type - String - Value - fs.txt - + + Comment + Filename for stats logging output + Persist + 1 + Type + String + Value + fs.txt + StatsNumRuns - - Comment - Loop autopilot playback this number of times - Persist - 1 - Type - S32 - Value - -1 - + + Comment + Loop autopilot playback this number of times + Persist + 1 + Type + S32 + Value + -1 + StatsPilotFile - - Comment - Filename for stats logging autopilot path - Persist - 1 - Type - String - Value - pilot.txt - + + Comment + Filename for stats logging autopilot path + Persist + 1 + Type + String + Value + pilot.txt + StatsQuitAfterRuns - - Comment - Quit application after this number of autopilot playback runs - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Quit application after this number of autopilot playback runs + Persist + 1 + Type + Boolean + Value + 0 + StatsSessionTrackFrameStats - - Comment - Track rendering and network statistics - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Track rendering and network statistics + Persist + 1 + Type + Boolean + Value + 0 + StatsSummaryFile - - Comment - Filename for stats logging summary - Persist - 1 - Type - String - Value - fss.txt - + + Comment + Filename for stats logging summary + Persist + 1 + Type + String + Value + fss.txt + StatusBarHeight - - Comment - Height of menu/status bar at top of screen (pixels) - Persist - 1 - Type - S32 - Value - 26 - + + Comment + Height of menu/status bar at top of screen (pixels) + Persist + 1 + Type + S32 + Value + 26 + StatusBarPad - - Comment - Spacing between popup buttons at bottom of screen (Stand up, Release Controls) - Persist - 1 - Type - S32 - Value - 10 - + + Comment + Spacing between popup buttons at bottom of screen (Stand up, Release Controls) + Persist + 1 + Type + S32 + Value + 10 + SystemChatColor - - Comment - Color of chat messages from SL System - Persist - 1 - Type - Color4 - Value - - 0.800000011920928955078125 - 1 - 1 - 1 - - + + Comment + Color of chat messages from SL System + Persist + 1 + Type + Color4 + Value + + 0.800000011921 + 1.0 + 1.0 + 1.0 + + SystemLanguage - - Comment - Language indicated by system settings (for XUI) - Persist - 1 - Type - String - Value - en-us - + + Comment + Language indicated by system settings (for XUI) + Persist + 1 + Type + String + Value + en-us + TabToTextFieldsOnly - - Comment - TAB key takes you to next text entry field, instead of next widget - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + TAB key takes you to next text entry field, instead of next widget + Persist + 1 + Type + Boolean + Value + 0 + TerrainColorHeightRange - - Comment - Altitude range over which a given terrain texture has effect (meters) - Persist - 1 - Type - F32 - Value - 60 - + + Comment + Altitude range over which a given terrain texture has effect (meters) + Persist + 1 + Type + F32 + Value + 60.0 + TerrainColorStartHeight - - Comment - Starting altitude for terrain texturing (meters) - Persist - 1 - Type - F32 - Value - 20 - + + Comment + Starting altitude for terrain texturing (meters) + Persist + 1 + Type + F32 + Value + 20.0 + TextureMemory - - Comment - Amount of memory to use for textures in MB (0 = autodetect) - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Amount of memory to use for textures in MB (0 = autodetect) + Persist + 1 + Type + S32 + Value + 0 + TexturePickerRect - - Comment - Rectangle for texture picker - Persist - 1 - Type - Rect - Value - - 0 - 290 - 350 - 0 - - + + Comment + Rectangle for texture picker + Persist + 1 + Type + Rect + Value + + 0 + 290 + 350 + 0 + + TexturePickerShowFolders - - Comment - Show folders with no texures in texture picker - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Show folders with no texures in texture picker + Persist + 1 + Type + Boolean + Value + 1 + TexturePickerSortOrder - - Comment - Specifies sort key for textures in texture picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) - Persist - 1 - Type - U32 - Value - 2 - + + Comment + Specifies sort key for textures in texture picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 2 + ThirdPersonBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 1 - + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + ThrottleBandwidthKBPS - - Comment - Maximum allowable downstream bandwidth (kilo bits per second) - Persist - 1 - Type - F32 - Value - 500 - + + Comment + Maximum allowable downstream bandwidth (kilo bits per second) + Persist + 1 + Type + F32 + Value + 500.0 + ToolHelpRect - - Comment - - Persist - 0 - Type - Rect - Value - - 8 - 178 - 75 - 162 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 8 + 178 + 75 + 162 + + ToolTipDelay - - Comment - Seconds before displaying tooltip when mouse stops over UI element - Persist - 1 - Type - F32 - Value - 0.699999988079071044921875 - + + Comment + Seconds before displaying tooltip when mouse stops over UI element + Persist + 1 + Type + F32 + Value + 0.699999988079 + ToolboxAutoMove - - Comment - [NOT USED] - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + [NOT USED] + Persist + 1 + Type + Boolean + Value + 0 + ToolboxRect - - Comment - Rectangle for tools window - Persist - 1 - Type - Rect - Value - - 0 - 100 - 100 - 100 - - + + Comment + Rectangle for tools window + Persist + 1 + Type + Rect + Value + + 0 + 100 + 100 + 100 + + ToolboxShowMore - - Comment - Whether to show additional build tool controls - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Whether to show additional build tool controls + Persist + 1 + Type + Boolean + Value + 1 + TrackFocusObject - - Comment - Camera tracks last object zoomed on - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Camera tracks last object zoomed on + Persist + 1 + Type + Boolean + Value + 1 + TurnLeftBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 20 - 29 - 45 - 4 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 20 + 29 + 45 + 4 + + TurnRightBtnRect - - Comment - - Persist - 0 - Type - Rect - Value - - 66 - 29 - 91 - 4 - - + + Comment + + Persist + 0 + Type + Rect + Value + + 66 + 29 + 91 + 4 + + TypeAheadTimeout - - Comment - Time delay before clearing type-ahead buffer in lists (seconds) - Persist - 1 - Type - F32 - Value - 1.5 - + + Comment + Time delay before clearing type-ahead buffer in lists (seconds) + Persist + 1 + Type + F32 + Value + 1.5 + UIAutoScale - - Comment - Keep UI scale consistent across different resolutions - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Keep UI scale consistent across different resolutions + Persist + 1 + Type + Boolean + Value + 1 + UIFloaterTestBool - - Comment - Example saved setting for the test floater - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Example saved setting for the test floater + Persist + 1 + Type + Boolean + Value + 0 + UIImgBtnCloseActiveUUID - - Comment - - Persist - 0 - Type - String - Value - 47a8c844-cd2a-4b1a-be01-df8b1612fe5d - + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + UIImgBtnCloseInactiveUUID - - Comment - - Persist - 0 - Type - String - Value - 779e4fa3-9b13-f74a-fba9-3886fe9c86ba - + + Comment + + Persist + 0 + Type + String + Value + 779e4fa3-9b13-f74a-fba9-3886fe9c86ba + UIImgBtnClosePressedUUID - - Comment - - Persist - 0 - Type - String - Value - e5821134-23c0-4bd0-af06-7fa95b9fb01a - + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + UIImgBtnForwardInUUID - - Comment - - Persist - 0 - Type - String - Value - 54197a61-f5d1-4c29-95d2-c071d08849cb - + + Comment + + Persist + 0 + Type + String + Value + 54197a61-f5d1-4c29-95d2-c071d08849cb + UIImgBtnForwardOutUUID - - Comment - - Persist - 0 - Type - String - Value - a0eb4021-1b20-4a53-892d-8faa9265a6f5 - + + Comment + + Persist + 0 + Type + String + Value + a0eb4021-1b20-4a53-892d-8faa9265a6f5 + UIImgBtnJumpLeftInUUID - - Comment - - Persist - 0 - Type - String - Value - 9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1 - + + Comment + + Persist + 0 + Type + String + Value + 9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1 + UIImgBtnJumpLeftOutUUID - - Comment - - Persist - 0 - Type - String - Value - 3c18c87e-5f50-14e2-e744-f44734aa365f - + + Comment + + Persist + 0 + Type + String + Value + 3c18c87e-5f50-14e2-e744-f44734aa365f + UIImgBtnJumpRightInUUID - - Comment - - Persist - 0 - Type - String - Value - 7dabc040-ec13-2309-ddf7-4f161f6de2f4 - + + Comment + + Persist + 0 + Type + String + Value + 7dabc040-ec13-2309-ddf7-4f161f6de2f4 + UIImgBtnJumpRightOutUUID - - Comment - - Persist - 0 - Type - String - Value - ff9a71eb-7414-4cf8-866e-a701deb7c3cf - + + Comment + + Persist + 0 + Type + String + Value + ff9a71eb-7414-4cf8-866e-a701deb7c3cf + UIImgBtnLeftInUUID - - Comment - - Persist - 0 - Type - String - Value - 95463c78-aaa6-464d-892d-3a805b6bb7bf - + + Comment + + Persist + 0 + Type + String + Value + 95463c78-aaa6-464d-892d-3a805b6bb7bf + UIImgBtnLeftOutUUID - - Comment - - Persist - 0 - Type - String - Value - 13a93910-6b44-45eb-ad3a-4d1324c59bac - + + Comment + + Persist + 0 + Type + String + Value + 13a93910-6b44-45eb-ad3a-4d1324c59bac + UIImgBtnMinimizeActiveUUID - - Comment - - Persist - 0 - Type - String - Value - 34c9398d-bb78-4643-9633-46a2fa3e9637 - + + Comment + + Persist + 0 + Type + String + Value + 34c9398d-bb78-4643-9633-46a2fa3e9637 + UIImgBtnMinimizeInactiveUUID - - Comment - - Persist - 0 - Type - String - Value - 6e72abba-1378-437f-bf7a-f0c15f3e99a3 - + + Comment + + Persist + 0 + Type + String + Value + 6e72abba-1378-437f-bf7a-f0c15f3e99a3 + UIImgBtnMinimizePressedUUID - - Comment - - Persist - 0 - Type - String - Value - 39801651-26cb-4926-af57-7af9352c273c - + + Comment + + Persist + 0 + Type + String + Value + 39801651-26cb-4926-af57-7af9352c273c + UIImgBtnMoveDownInUUID - - Comment - - Persist - 0 - Type - String - Value - b92a70b9-c841-4c94-b4b3-cee9eb460d48 - + + Comment + + Persist + 0 + Type + String + Value + b92a70b9-c841-4c94-b4b3-cee9eb460d48 + UIImgBtnMoveDownOutUUID - - Comment - - Persist - 0 - Type - String - Value - b5abc9fa-9e62-4e03-bc33-82c4c1b6b689 - + + Comment + + Persist + 0 + Type + String + Value + b5abc9fa-9e62-4e03-bc33-82c4c1b6b689 + UIImgBtnMoveUpInUUID - - Comment - - Persist - 0 - Type - String - Value - 49b4b357-e430-4b56-b9e0-05b8759c3c82 - + + Comment + + Persist + 0 + Type + String + Value + 49b4b357-e430-4b56-b9e0-05b8759c3c82 + UIImgBtnMoveUpOutUUID - - Comment - - Persist - 0 - Type - String - Value - f887146d-829f-4e39-9211-cf872b78f97c - + + Comment + + Persist + 0 + Type + String + Value + f887146d-829f-4e39-9211-cf872b78f97c + UIImgBtnPanDownInUUID - - Comment - - Persist - 0 - Type - String - Value - e5821134-23c0-4bd0-af06-7fa95b9fb01a - + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + UIImgBtnPanDownOutUUID - - Comment - - Persist - 0 - Type - String - Value - 47a8c844-cd2a-4b1a-be01-df8b1612fe5d - + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + UIImgBtnPanLeftInUUID - - Comment - - Persist - 0 - Type - String - Value - e5821134-23c0-4bd0-af06-7fa95b9fb01a - + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + UIImgBtnPanLeftOutUUID - - Comment - - Persist - 0 - Type - String - Value - 47a8c844-cd2a-4b1a-be01-df8b1612fe5d - + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + UIImgBtnPanRightInUUID - - Comment - - Persist - 0 - Type - String - Value - e5821134-23c0-4bd0-af06-7fa95b9fb01a - + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + UIImgBtnPanRightOutUUID - - Comment - - Persist - 0 - Type - String - Value - 47a8c844-cd2a-4b1a-be01-df8b1612fe5d - + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + UIImgBtnPanUpInUUID - - Comment - - Persist - 0 - Type - String - Value - e5821134-23c0-4bd0-af06-7fa95b9fb01a - + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + UIImgBtnPanUpOutUUID - - Comment - - Persist - 0 - Type - String - Value - 47a8c844-cd2a-4b1a-be01-df8b1612fe5d - + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + UIImgBtnRestoreActiveUUID - - Comment - - Persist - 0 - Type - String - Value - 111b39de-8928-4690-b7b2-e17d5c960277 - + + Comment + + Persist + 0 + Type + String + Value + 111b39de-8928-4690-b7b2-e17d5c960277 + UIImgBtnRestoreInactiveUUID - - Comment - - Persist - 0 - Type - String - Value - 0eafa471-70af-4882-b8c1-40a310929744 - + + Comment + + Persist + 0 + Type + String + Value + 0eafa471-70af-4882-b8c1-40a310929744 + UIImgBtnRestorePressedUUID - - Comment - - Persist - 0 - Type - String - Value - 90a0ed5c-2e7b-4845-9958-a64a1b30f312 - + + Comment + + Persist + 0 + Type + String + Value + 90a0ed5c-2e7b-4845-9958-a64a1b30f312 + UIImgBtnRightInUUID - - Comment - - Persist - 0 - Type - String - Value - 5e616d0d-4335-476f-9977-560bccd009da - + + Comment + + Persist + 0 + Type + String + Value + 5e616d0d-4335-476f-9977-560bccd009da + UIImgBtnRightOutUUID - - Comment - - Persist - 0 - Type - String - Value - 5a44fd04-f52b-4c30-8b00-4a31e27614bd - + + Comment + + Persist + 0 + Type + String + Value + 5a44fd04-f52b-4c30-8b00-4a31e27614bd + UIImgBtnScrollDownInUUID - - Comment - - Persist - 0 - Type - String - Value - d2421bab-2eaf-4863-b8f6-5e4c52519247 - + + Comment + + Persist + 0 + Type + String + Value + d2421bab-2eaf-4863-b8f6-5e4c52519247 + UIImgBtnScrollDownOutUUID - - Comment - - Persist - 0 - Type - String - Value - b4ecdecf-5c8d-44e7-b882-17a77e88ed55 - + + Comment + + Persist + 0 + Type + String + Value + b4ecdecf-5c8d-44e7-b882-17a77e88ed55 + UIImgBtnScrollLeftInUUID - - Comment - - Persist - 0 - Type - String - Value - ea137a32-6718-4d05-9c22-7d570d27b2cd - + + Comment + + Persist + 0 + Type + String + Value + ea137a32-6718-4d05-9c22-7d570d27b2cd + UIImgBtnScrollLeftOutUUID - - Comment - - Persist - 0 - Type - String - Value - 43773e8d-49aa-48e0-80f3-a04715f4677a - + + Comment + + Persist + 0 + Type + String + Value + 43773e8d-49aa-48e0-80f3-a04715f4677a + UIImgBtnScrollRightInUUID - - Comment - - Persist - 0 - Type - String - Value - b749de64-e903-4c3c-ac0b-25fb6fa39cb5 - + + Comment + + Persist + 0 + Type + String + Value + b749de64-e903-4c3c-ac0b-25fb6fa39cb5 + UIImgBtnScrollRightOutUUID - - Comment - - Persist - 0 - Type - String - Value - 3d700d19-e708-465d-87f2-46c8c0ee7938 - + + Comment + + Persist + 0 + Type + String + Value + 3d700d19-e708-465d-87f2-46c8c0ee7938 + UIImgBtnScrollUpInUUID - - Comment - - Persist - 0 - Type - String - Value - a93abdf3-27b5-4e22-a8fa-c48216cd2e3a - + + Comment + + Persist + 0 + Type + String + Value + a93abdf3-27b5-4e22-a8fa-c48216cd2e3a + UIImgBtnScrollUpOutUUID - - Comment - - Persist - 0 - Type - String - Value - dad084d7-9a46-452a-b0ff-4b9f1cefdde9 - + + Comment + + Persist + 0 + Type + String + Value + dad084d7-9a46-452a-b0ff-4b9f1cefdde9 + UIImgBtnSlideLeftInUUID - - Comment - - Persist - 0 - Type - String - Value - 724996f5-b956-46f6-9844-4fcfce1d5e83 - + + Comment + + Persist + 0 + Type + String + Value + 724996f5-b956-46f6-9844-4fcfce1d5e83 + UIImgBtnSlideLeftOutUUID - - Comment - - Persist - 0 - Type - String - Value - 82476321-0374-4c26-9567-521535ab4cd7 - + + Comment + + Persist + 0 + Type + String + Value + 82476321-0374-4c26-9567-521535ab4cd7 + UIImgBtnSlideRightInUUID - - Comment - - Persist - 0 - Type - String - Value - 7eeb57d2-3f37-454d-a729-8b217b8be443 - + + Comment + + Persist + 0 + Type + String + Value + 7eeb57d2-3f37-454d-a729-8b217b8be443 + UIImgBtnSlideRightOutUUID - - Comment - - Persist - 0 - Type - String - Value - 1fbe4e60-0607-44d1-a50a-032eff56ae75 - + + Comment + + Persist + 0 + Type + String + Value + 1fbe4e60-0607-44d1-a50a-032eff56ae75 + UIImgBtnSpinDownInUUID - - Comment - - Persist - 0 - Type - String - Value - a985ac71-052f-48e6-9c33-d931c813ac92 - + + Comment + + Persist + 0 + Type + String + Value + a985ac71-052f-48e6-9c33-d931c813ac92 + UIImgBtnSpinDownOutUUID - - Comment - - Persist - 0 - Type - String - Value - b6d240dd-5602-426f-b606-bbb49a30726d - + + Comment + + Persist + 0 + Type + String + Value + b6d240dd-5602-426f-b606-bbb49a30726d + UIImgBtnSpinUpInUUID - - Comment - - Persist - 0 - Type - String - Value - c8450082-96a0-4319-8090-d3ff900b4954 - + + Comment + + Persist + 0 + Type + String + Value + c8450082-96a0-4319-8090-d3ff900b4954 + UIImgBtnSpinUpOutUUID - - Comment - - Persist - 0 - Type - String - Value - 56576e6e-6710-4e66-89f9-471b59122794 - + + Comment + + Persist + 0 + Type + String + Value + 56576e6e-6710-4e66-89f9-471b59122794 + UIImgBtnTabBottomInUUID - - Comment - - Persist - 0 - Type - String - Value - c001d8fd-a869-4b6f-86a1-fdcb106df9c7 - + + Comment + + Persist + 0 + Type + String + Value + c001d8fd-a869-4b6f-86a1-fdcb106df9c7 + UIImgBtnTabBottomOutUUID - - Comment - - Persist - 0 - Type - String - Value - bf0a8779-689b-48c3-bb9a-6af546366ef4 - + + Comment + + Persist + 0 + Type + String + Value + bf0a8779-689b-48c3-bb9a-6af546366ef4 + UIImgBtnTabBottomPartialInUUID - - Comment - - Persist - 0 - Type - String - Value - eb0b0904-8c91-4f24-b500-1180b91140de - + + Comment + + Persist + 0 + Type + String + Value + eb0b0904-8c91-4f24-b500-1180b91140de + UIImgBtnTabBottomPartialOutUUID - - Comment - - Persist - 0 - Type - String - Value - 8dca716c-b29c-403a-9886-91c028357d6e - + + Comment + + Persist + 0 + Type + String + Value + 8dca716c-b29c-403a-9886-91c028357d6e + UIImgBtnTabTopInUUID - - Comment - - Persist - 0 - Type - String - Value - 16d032e8-817b-4368-8a4e-b7b947ae3889 - + + Comment + + Persist + 0 + Type + String + Value + 16d032e8-817b-4368-8a4e-b7b947ae3889 + UIImgBtnTabTopOutUUID - - Comment - - Persist - 0 - Type - String - Value - 1ed83f57-41cf-4052-a3b4-2e8bb78d8191 - + + Comment + + Persist + 0 + Type + String + Value + 1ed83f57-41cf-4052-a3b4-2e8bb78d8191 + UIImgBtnTabTopPartialInUUID - - Comment - - Persist - 0 - Type - String - Value - 7c6c6c26-0e25-4438-89bd-30d8b8e9d704 - + + Comment + + Persist + 0 + Type + String + Value + 7c6c6c26-0e25-4438-89bd-30d8b8e9d704 + UIImgBtnTabTopPartialOutUUID - - Comment - - Persist - 0 - Type - String - Value - 932ad585-0e45-4a57-aa23-4cf81beeb7b0 - + + Comment + + Persist + 0 + Type + String + Value + 932ad585-0e45-4a57-aa23-4cf81beeb7b0 + UIImgBtnTearOffActiveUUID - - Comment - - Persist - 0 - Type - String - Value - 74e1a96f-4833-a24d-a1bb-1bce1468b0e7 - + + Comment + + Persist + 0 + Type + String + Value + 74e1a96f-4833-a24d-a1bb-1bce1468b0e7 + UIImgBtnTearOffInactiveUUID - - Comment - - Persist - 0 - Type - String - Value - 74e1a96f-4833-a24d-a1bb-1bce1468b0e7 - + + Comment + + Persist + 0 + Type + String + Value + 74e1a96f-4833-a24d-a1bb-1bce1468b0e7 + UIImgBtnTearOffPressedUUID - - Comment - - Persist - 0 - Type - String - Value - d2524c13-4ba6-af7c-e305-8ac6cc18d86a - + + Comment + + Persist + 0 + Type + String + Value + d2524c13-4ba6-af7c-e305-8ac6cc18d86a + UIImgCheckboxActiveSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - cf4a2ed7-1533-4686-9dde-df9a37ddca55 - + + Comment + + Persist + 0 + Type + String + Value + cf4a2ed7-1533-4686-9dde-df9a37ddca55 + UIImgCheckboxActiveUUID - - Comment - - Persist - 0 - Type - String - Value - 05bb64ee-96fd-4243-b74e-f40a41bc53ba - + + Comment + + Persist + 0 + Type + String + Value + 05bb64ee-96fd-4243-b74e-f40a41bc53ba + UIImgCheckboxInactiveSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - c817c642-9abd-4236-9287-ae0513fe7d2b - + + Comment + + Persist + 0 + Type + String + Value + c817c642-9abd-4236-9287-ae0513fe7d2b + UIImgCheckboxInactiveUUID - - Comment - - Persist - 0 - Type - String - Value - 7d94cb59-32a2-49bf-a516-9e5a2045f9d9 - + + Comment + + Persist + 0 + Type + String + Value + 7d94cb59-32a2-49bf-a516-9e5a2045f9d9 + UIImgCreateSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - 0098b015-3daf-4cfe-a72f-915369ea97c2 - + + Comment + + Persist + 0 + Type + String + Value + 0098b015-3daf-4cfe-a72f-915369ea97c2 + UIImgCreateUUID - - Comment - - Persist - 0 - Type - String - Value - 7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b - + + Comment + + Persist + 0 + Type + String + Value + 7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b + UIImgCrosshairsUUID - - Comment - Image to use for crosshair display (UUID texture reference) - Persist - 1 - Type - String - Value - 6e1a3980-bf2d-4274-8970-91e60d85fb52 - + + Comment + Image to use for crosshair display (UUID texture reference) + Persist + 1 + Type + String + Value + 6e1a3980-bf2d-4274-8970-91e60d85fb52 + UIImgDefaultEyesUUID - - Comment - - Persist - 0 - Type - String - Value - 6522e74d-1660-4e7f-b601-6f48c1659a77 - + + Comment + + Persist + 0 + Type + String + Value + 6522e74d-1660-4e7f-b601-6f48c1659a77 + UIImgDefaultGlovesUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDefaultHairUUID - - Comment - - Persist - 0 - Type - String - Value - 7ca39b4c-bd19-4699-aff7-f93fd03d3e7b - + + Comment + + Persist + 0 + Type + String + Value + 7ca39b4c-bd19-4699-aff7-f93fd03d3e7b + UIImgDefaultJacketUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDefaultPantsUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDefaultShirtUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDefaultShoesUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDefaultSkirtUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDefaultSocksUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDefaultUnderwearUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIImgDirectionArrowUUID - - Comment - - Persist - 0 - Type - String - Value - 586383e8-4d9b-4fba-9196-2b5938e79c2c - + + Comment + + Persist + 0 + Type + String + Value + 586383e8-4d9b-4fba-9196-2b5938e79c2c + UIImgFaceSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - b4870163-6208-42a9-9801-93133bf9a6cd - + + Comment + + Persist + 0 + Type + String + Value + b4870163-6208-42a9-9801-93133bf9a6cd + UIImgFaceUUID - - Comment - - Persist - 0 - Type - String - Value - ce15fd63-b0b6-463c-a37d-ea6393208b3e - + + Comment + + Persist + 0 + Type + String + Value + ce15fd63-b0b6-463c-a37d-ea6393208b3e + UIImgFocusSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - ab6a730e-ddfd-4982-9a32-c6de3de6d31d - + + Comment + + Persist + 0 + Type + String + Value + ab6a730e-ddfd-4982-9a32-c6de3de6d31d + UIImgFocusUUID - - Comment - - Persist - 0 - Type - String - Value - 57bc39d1-288c-4519-aea6-6d1786a5c274 - + + Comment + + Persist + 0 + Type + String + Value + 57bc39d1-288c-4519-aea6-6d1786a5c274 + UIImgGrabSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - c1e21504-f136-451d-b8e9-929037812f1d - + + Comment + + Persist + 0 + Type + String + Value + c1e21504-f136-451d-b8e9-929037812f1d + UIImgGrabUUID - - Comment - - Persist - 0 - Type - String - Value - c63f124c-6340-4fbf-b59e-0869a44adb64 - + + Comment + + Persist + 0 + Type + String + Value + c63f124c-6340-4fbf-b59e-0869a44adb64 + UIImgMoveSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - 46f17c7b-8381-48c3-b628-6a406e060dd6 - + + Comment + + Persist + 0 + Type + String + Value + 46f17c7b-8381-48c3-b628-6a406e060dd6 + UIImgMoveUUID - - Comment - - Persist - 0 - Type - String - Value - 2fa5dc06-bcdd-4e09-a426-f9f262d4fa65 - + + Comment + + Persist + 0 + Type + String + Value + 2fa5dc06-bcdd-4e09-a426-f9f262d4fa65 + UIImgRadioActiveSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - 52f09e07-5816-4052-953c-94c6c10479b7 - + + Comment + + Persist + 0 + Type + String + Value + 52f09e07-5816-4052-953c-94c6c10479b7 + UIImgRadioActiveUUID - - Comment - - Persist - 0 - Type - String - Value - 7a1ba9b8-1047-4d1e-9cfc-bc478c80b63f - + + Comment + + Persist + 0 + Type + String + Value + 7a1ba9b8-1047-4d1e-9cfc-bc478c80b63f + UIImgRadioInactiveSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - 1975db39-aa29-4251-aea0-409ac09d414d - + + Comment + + Persist + 0 + Type + String + Value + 1975db39-aa29-4251-aea0-409ac09d414d + UIImgRadioInactiveUUID - - Comment - - Persist - 0 - Type - String - Value - 90688481-67ff-4af0-be69-4aa084bcad1e - + + Comment + + Persist + 0 + Type + String + Value + 90688481-67ff-4af0-be69-4aa084bcad1e + UIImgResizeBottomRightUUID - - Comment - - Persist - 0 - Type - String - Value - e3690e25-9690-4f6c-a745-e7dcd885285a - + + Comment + + Persist + 0 + Type + String + Value + e3690e25-9690-4f6c-a745-e7dcd885285a + UIImgRotateSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - cdfb7fde-0d13-418a-9d89-2bd91019fc95 - + + Comment + + Persist + 0 + Type + String + Value + cdfb7fde-0d13-418a-9d89-2bd91019fc95 + UIImgRotateUUID - - Comment - - Persist - 0 - Type - String - Value - c34b1eaa-aae3-4351-b082-e26c0b636779 - + + Comment + + Persist + 0 + Type + String + Value + c34b1eaa-aae3-4351-b082-e26c0b636779 + UIImgScaleSelectedUUID - - Comment - - Persist - 0 - Type - String - Value - 55aa57ef-508a-47f7-8867-85d21c5a810d - + + Comment + + Persist + 0 + Type + String + Value + 55aa57ef-508a-47f7-8867-85d21c5a810d + UIImgScaleUUID - - Comment - - Persist - 0 - Type - String - Value - 88a90fef-b448-4883-9344-ecf378a60433 - + + Comment + + Persist + 0 + Type + String + Value + 88a90fef-b448-4883-9344-ecf378a60433 + UIImgWhiteUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + UIScaleFactor - - Comment - Size of UI relative to default layout on 1024x768 screen - Persist - 1 - Type - F32 - Value - 1 - + + Comment + Size of UI relative to default layout on 1024x768 screen + Persist + 1 + Type + F32 + Value + 1.0 + UISndAlert - - Comment - Sound file for alerts (uuid for sound asset) - Persist - 1 - Type - String - Value - ed124764-705d-d497-167a-182cd9fa2e6c - + + Comment + Sound file for alerts (uuid for sound asset) + Persist + 1 + Type + String + Value + ed124764-705d-d497-167a-182cd9fa2e6c + UISndBadKeystroke - - Comment - Sound file for invalid keystroke (uuid for sound asset) - Persist - 1 - Type - String - Value - 2ca849ba-2885-4bc3-90ef-d4987a5b983a - + + Comment + Sound file for invalid keystroke (uuid for sound asset) + Persist + 1 + Type + String + Value + 2ca849ba-2885-4bc3-90ef-d4987a5b983a + UISndClick - - Comment - Sound file for mouse click (uuid for sound asset) - Persist - 1 - Type - String - Value - 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 - + + Comment + Sound file for mouse click (uuid for sound asset) + Persist + 1 + Type + String + Value + 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 + UISndClickRelease - - Comment - Sound file for mouse button release (uuid for sound asset) - Persist - 1 - Type - String - Value - 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 - + + Comment + Sound file for mouse button release (uuid for sound asset) + Persist + 1 + Type + String + Value + 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 + UISndDebugSpamToggle - - Comment - Log UI sound effects as they are played - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Log UI sound effects as they are played + Persist + 1 + Type + Boolean + Value + 0 + UISndHealthReductionF - - Comment - Sound file for female pain (uuid for sound asset) - Persist - 1 - Type - String - Value - 219c5d93-6c09-31c5-fb3f-c5fe7495c115 - + + Comment + Sound file for female pain (uuid for sound asset) + Persist + 1 + Type + String + Value + 219c5d93-6c09-31c5-fb3f-c5fe7495c115 + UISndHealthReductionM - - Comment - Sound file for male pain (uuid for sound asset) - Persist - 1 - Type - String - Value - e057c244-5768-1056-c37e-1537454eeb62 - + + Comment + Sound file for male pain (uuid for sound asset) + Persist + 1 + Type + String + Value + e057c244-5768-1056-c37e-1537454eeb62 + UISndHealthReductionThreshold - - Comment - Amount of health reduction required to trigger "pain" sound - Persist - 1 - Type - F32 - Value - 10 - + + Comment + Amount of health reduction required to trigger "pain" sound + Persist + 1 + Type + F32 + Value + 10.0 + UISndInvalidOp - - Comment - Sound file for invalid operations (uuid for sound asset) - Persist - 1 - Type - String - Value - 4174f859-0d3d-c517-c424-72923dc21f65 - + + Comment + Sound file for invalid operations (uuid for sound asset) + Persist + 1 + Type + String + Value + 4174f859-0d3d-c517-c424-72923dc21f65 + UISndMoneyChangeDown - - Comment - Sound file for L$ balance increase (uuid for sound asset) - Persist - 1 - Type - String - Value - 104974e3-dfda-428b-99ee-b0d4e748d3a3 - + + Comment + Sound file for L$ balance increase (uuid for sound asset) + Persist + 1 + Type + String + Value + 104974e3-dfda-428b-99ee-b0d4e748d3a3 + UISndMoneyChangeThreshold - - Comment - Amount of change in L$ balance required to trigger "money" sound - Persist - 1 - Type - F32 - Value - 50 - + + Comment + Amount of change in L$ balance required to trigger "money" sound + Persist + 1 + Type + F32 + Value + 50.0 + UISndMoneyChangeUp - - Comment - Sound file for L$ balance decrease(uuid for sound asset) - Persist - 1 - Type - String - Value - 77a018af-098e-c037-51a6-178f05877c6f - + + Comment + Sound file for L$ balance decrease(uuid for sound asset) + Persist + 1 + Type + String + Value + 77a018af-098e-c037-51a6-178f05877c6f + UISndNewIncomingIMSession - - Comment - Sound file for new instant message session(uuid for sound asset) - Persist - 1 - Type - String - Value - 67cc2844-00f3-2b3c-b991-6418d01e1bb7 - + + Comment + Sound file for new instant message session(uuid for sound asset) + Persist + 1 + Type + String + Value + 67cc2844-00f3-2b3c-b991-6418d01e1bb7 + UISndObjectCreate - - Comment - Sound file for object creation (uuid for sound asset) - Persist - 1 - Type - String - Value - f4a0660f-5446-dea2-80b7-6482a082803c - + + Comment + Sound file for object creation (uuid for sound asset) + Persist + 1 + Type + String + Value + f4a0660f-5446-dea2-80b7-6482a082803c + UISndObjectDelete - - Comment - Sound file for object deletion (uuid for sound asset) - Persist - 1 - Type - String - Value - 0cb7b00a-4c10-6948-84de-a93c09af2ba9 - + + Comment + Sound file for object deletion (uuid for sound asset) + Persist + 1 + Type + String + Value + 0cb7b00a-4c10-6948-84de-a93c09af2ba9 + UISndObjectRezIn - - Comment - Sound file for rezzing objects (uuid for sound asset) - Persist - 1 - Type - String - Value - 3c8fc726-1fd6-862d-fa01-16c5b2568db6 - + + Comment + Sound file for rezzing objects (uuid for sound asset) + Persist + 1 + Type + String + Value + 3c8fc726-1fd6-862d-fa01-16c5b2568db6 + UISndObjectRezOut - - Comment - Sound file for derezzing objects (uuid for sound asset) - Persist - 1 - Type - String - Value - 00000000-0000-0000-0000-000000000000 - + + Comment + Sound file for derezzing objects (uuid for sound asset) + Persist + 1 + Type + String + Value + 00000000-0000-0000-0000-000000000000 + UISndPieMenuAppear - - Comment - Sound file for opening pie menu (uuid for sound asset) - Persist - 1 - Type - String - Value - 8eaed61f-92ff-6485-de83-4dcc938a478e - + + Comment + Sound file for opening pie menu (uuid for sound asset) + Persist + 1 + Type + String + Value + 8eaed61f-92ff-6485-de83-4dcc938a478e + UISndPieMenuHide - - Comment - Sound file for closing pie menu (uuid for sound asset) - Persist - 1 - Type - String - Value - 00000000-0000-0000-0000-000000000000 - + + Comment + Sound file for closing pie menu (uuid for sound asset) + Persist + 1 + Type + String + Value + 00000000-0000-0000-0000-000000000000 + UISndPieMenuSliceHighlight0 - - Comment - Sound file for selecting pie menu item 0 (uuid for sound asset) - Persist - 1 - Type - String - Value - d9f73cf8-17b4-6f7a-1565-7951226c305d - + + Comment + Sound file for selecting pie menu item 0 (uuid for sound asset) + Persist + 1 + Type + String + Value + d9f73cf8-17b4-6f7a-1565-7951226c305d + UISndPieMenuSliceHighlight1 - - Comment - Sound file for selecting pie menu item 1 (uuid for sound asset) - Persist - 1 - Type - String - Value - f6ba9816-dcaf-f755-7b67-51b31b6233e5 - + + Comment + Sound file for selecting pie menu item 1 (uuid for sound asset) + Persist + 1 + Type + String + Value + f6ba9816-dcaf-f755-7b67-51b31b6233e5 + UISndPieMenuSliceHighlight2 - - Comment - Sound file for selecting pie menu item 2 (uuid for sound asset) - Persist - 1 - Type - String - Value - 7aff2265-d05b-8b72-63c7-dbf96dc2f21f - + + Comment + Sound file for selecting pie menu item 2 (uuid for sound asset) + Persist + 1 + Type + String + Value + 7aff2265-d05b-8b72-63c7-dbf96dc2f21f + UISndPieMenuSliceHighlight3 - - Comment - Sound file for selecting pie menu item 3 (uuid for sound asset) - Persist - 1 - Type - String - Value - 09b2184e-8601-44e2-afbb-ce37434b8ba1 - + + Comment + Sound file for selecting pie menu item 3 (uuid for sound asset) + Persist + 1 + Type + String + Value + 09b2184e-8601-44e2-afbb-ce37434b8ba1 + UISndPieMenuSliceHighlight4 - - Comment - Sound file for selecting pie menu item 4 (uuid for sound asset) - Persist - 1 - Type - String - Value - bbe4c7fc-7044-b05e-7b89-36924a67593c - + + Comment + Sound file for selecting pie menu item 4 (uuid for sound asset) + Persist + 1 + Type + String + Value + bbe4c7fc-7044-b05e-7b89-36924a67593c + UISndPieMenuSliceHighlight5 - - Comment - Sound file for selecting pie menu item 5 (uuid for sound asset) - Persist - 1 - Type - String - Value - d166039b-b4f5-c2ec-4911-c85c727b016c - + + Comment + Sound file for selecting pie menu item 5 (uuid for sound asset) + Persist + 1 + Type + String + Value + d166039b-b4f5-c2ec-4911-c85c727b016c + UISndPieMenuSliceHighlight6 - - Comment - Sound file for selecting pie menu item 6 (uuid for sound asset) - Persist - 1 - Type - String - Value - 242af82b-43c2-9a3b-e108-3b0c7e384981 - + + Comment + Sound file for selecting pie menu item 6 (uuid for sound asset) + Persist + 1 + Type + String + Value + 242af82b-43c2-9a3b-e108-3b0c7e384981 + UISndPieMenuSliceHighlight7 - - Comment - Sound file for selecting pie menu item 7 (uuid for sound asset) - Persist - 1 - Type - String - Value - c1f334fb-a5be-8fe7-22b3-29631c21cf0b - + + Comment + Sound file for selecting pie menu item 7 (uuid for sound asset) + Persist + 1 + Type + String + Value + c1f334fb-a5be-8fe7-22b3-29631c21cf0b + UISndSnapshot - - Comment - Sound file for taking a snapshot (uuid for sound asset) - Persist - 1 - Type - String - Value - 3d09f582-3851-c0e0-f5ba-277ac5c73fb4 - + + Comment + Sound file for taking a snapshot (uuid for sound asset) + Persist + 1 + Type + String + Value + 3d09f582-3851-c0e0-f5ba-277ac5c73fb4 + UISndStartIM - - Comment - Sound file for starting a new IM session (uuid for sound asset) - Persist - 1 - Type - String - Value - c825dfbc-9827-7e02-6507-3713d18916c1 - + + Comment + Sound file for starting a new IM session (uuid for sound asset) + Persist + 1 + Type + String + Value + c825dfbc-9827-7e02-6507-3713d18916c1 + UISndTeleportOut - - Comment - Sound file for teleporting (uuid for sound asset) - Persist - 1 - Type - String - Value - d7a9a565-a013-2a69-797d-5332baa1a947 - + + Comment + Sound file for teleporting (uuid for sound asset) + Persist + 1 + Type + String + Value + d7a9a565-a013-2a69-797d-5332baa1a947 + UISndTyping - - Comment - Sound file for starting to type a chat message (uuid for sound asset) - Persist - 1 - Type - String - Value - 5e191c7b-8996-9ced-a177-b2ac32bfea06 - + + Comment + Sound file for starting to type a chat message (uuid for sound asset) + Persist + 1 + Type + String + Value + 5e191c7b-8996-9ced-a177-b2ac32bfea06 + UISndWindowClose - - Comment - Sound file for closing a window (uuid for sound asset) - Persist - 1 - Type - String - Value - 2c346eda-b60c-ab33-1119-b8941916a499 - + + Comment + Sound file for closing a window (uuid for sound asset) + Persist + 1 + Type + String + Value + 2c346eda-b60c-ab33-1119-b8941916a499 + UISndWindowOpen - - Comment - Sound file for opening a window (uuid for sound asset) - Persist - 1 - Type - String - Value - c80260ba-41fd-8a46-768a-6bf236360e3a - + + Comment + Sound file for opening a window (uuid for sound asset) + Persist + 1 + Type + String + Value + c80260ba-41fd-8a46-768a-6bf236360e3a + UseAltKeyForMenus - - Comment - Access menus via keyboard by tapping Alt - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Access menus via keyboard by tapping Alt + Persist + 1 + Type + Boolean + Value + 0 + UseChatBubbles - - Comment - Show chat above avatars head in chat bubbles - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Show chat above avatars head in chat bubbles + Persist + 1 + Type + Boolean + Value + 0 + UseDebugLogin - - Comment - Provides extra control over which grid to connect to - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Provides extra control over which grid to connect to + Persist + 1 + Type + Boolean + Value + 0 + UseDebugMenus - - Comment - Turns on "Debug" menu - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Turns on "Debug" menu + Persist + 1 + Type + Boolean + Value + 0 + UseDefaultColorPicker - - Comment - Use color picker supplied by operating system - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Use color picker supplied by operating system + Persist + 1 + Type + Boolean + Value + 0 + UseEnergy - - Comment - - Persist - 0 - Type - Boolean - Value - 1 - + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + UseExternalBrowser - - Comment - Use default browser when opening web pages instead of in-world browser. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Use default browser when opening web pages instead of in-world browser. + Persist + 1 + Type + Boolean + Value + 0 + UseFreezeFrame - - Comment - Freeze time when taking snapshots. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Freeze time when taking snapshots. + Persist + 1 + Type + Boolean + Value + 0 + UseOcclusion - - Comment - Enable object culling based on occlusion (coverage) by other objects - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enable object culling based on occlusion (coverage) by other objects + Persist + 1 + Type + Boolean + Value + 1 + + UseStartScreen + + Comment + Whether to load a start screen image or not. + Persist + 1 + Type + Boolean + Value + 1 + UseWebPagesOnPrims - - Comment - [NOT USED] - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + [NOT USED] + Persist + 1 + Type + Boolean + Value + 0 + UserConnectionPort - - Comment - Port that this client transmits on. - Persist - 1 - Type - U32 - Value - 0 - + + Comment + Port that this client transmits on. + Persist + 1 + Type + U32 + Value + 0 + UserLogFile - - Comment - User specified log file name. - Persist - 1 - Type - String - Value - - + + Comment + User specified log file name. + Persist + 1 + Type + String + Value + + UserLoginInfo - - Comment - Users loging data. - Persist - 1 - Type - LLSD - Value - - - UseStartScreen - - Comment - Whether to load a start screen image or not. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Users loging data. + Persist + 1 + Type + LLSD + Value + + + VFSOldSize - - Comment - [DO NOT MODIFY] Controls resizing of local file cache - Persist - 1 - Type - U32 - Value - 0 - + + Comment + [DO NOT MODIFY] Controls resizing of local file cache + Persist + 1 + Type + U32 + Value + 0 + VFSSalt - - Comment - [DO NOT MODIFY] Controls local file caching behavior - Persist - 1 - Type - U32 - Value - 1 - + + Comment + [DO NOT MODIFY] Controls local file caching behavior + Persist + 1 + Type + U32 + Value + 1 + VectorizeEnable - - Comment - Enable general vector operations and data alignment. - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable general vector operations and data alignment. + Persist + 1 + Type + Boolean + Value + 0 + VectorizePerfTest - - Comment - Test SSE/vectorization performance and choose fastest version. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Test SSE/vectorization performance and choose fastest version. + Persist + 1 + Type + Boolean + Value + 1 + VectorizeProcessor - - Comment - 0=Compiler Default, 1=SSE, 2=SSE2, autodetected - Persist - 0 - Type - U32 - Value - 0 - + + Comment + 0=Compiler Default, 1=SSE, 2=SSE2, autodetected + Persist + 0 + Type + U32 + Value + 0 + VectorizeSkin - - Comment - Enable vector operations for avatar skinning. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enable vector operations for avatar skinning. + Persist + 1 + Type + Boolean + Value + 1 + VelocityInterpolate - - Comment - Extrapolate object motion from last packet based on received velocity - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Extrapolate object motion from last packet based on received velocity + Persist + 1 + Type + Boolean + Value + 1 + VerboseLogs - - Comment - Display source file and line number for each log item for debugging purposes - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Display source file and line number for each log item for debugging purposes + Persist + 1 + Type + Boolean + Value + 0 + VersionChannelName - - Comment - Versioning Channel Name. - Persist - 1 - Type - String - Value - Second Life Release - + + Comment + Versioning Channel Name. + Persist + 1 + Type + String + Value + Second Life Release + VertexShaderEnable - - Comment - Enable/disable all GLSL shaders (debug) - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Enable/disable all GLSL shaders (debug) + Persist + 1 + Type + Boolean + Value + 0 + VivoxDebugLevel - - Comment - Logging level to use when launching the vivox daemon - Persist - 1 - Type - String - Value - -1 - + + Comment + Logging level to use when launching the vivox daemon + Persist + 1 + Type + String + Value + -1 + VivoxDebugServerName - - Comment - Hostname of the vivox account server to use for voice when not connected to Agni. - Persist - 1 - Type - String - Value - bhd.vivox.com - + + Comment + Hostname of the vivox account server to use for voice when not connected to Agni. + Persist + 1 + Type + String + Value + bhd.vivox.com + VoiceCallsFriendsOnly - - Comment - Only accept voice calls from residents on your friends list - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Only accept voice calls from residents on your friends list + Persist + 1 + Type + Boolean + Value + 0 + VoiceEarLocation - - Comment - Location of the virtual ear for voice - Persist - 1 - Type - S32 - Value - 0 - + + Comment + Location of the virtual ear for voice + Persist + 1 + Type + S32 + Value + 0 + VoiceHost - - Comment - Client SLVoice host to connect to - Persist - 1 - Type - String - Value - 127.0.0.1 - + + Comment + Client SLVoice host to connect to + Persist + 1 + Type + String + Value + 127.0.0.1 + VoiceImageLevel0 - - Comment - Texture UUID for voice image level 0 - Persist - 1 - Type - String - Value - 041ee5a0-cb6a-9ac5-6e49-41e9320507d5 - + + Comment + Texture UUID for voice image level 0 + Persist + 1 + Type + String + Value + 041ee5a0-cb6a-9ac5-6e49-41e9320507d5 + VoiceImageLevel1 - - Comment - Texture UUID for voice image level 1 - Persist - 1 - Type - String - Value - 29de489d-0491-fb00-7dab-f9e686d31e83 - + + Comment + Texture UUID for voice image level 1 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + VoiceImageLevel2 - - Comment - Texture UUID for voice image level 2 - Persist - 1 - Type - String - Value - 29de489d-0491-fb00-7dab-f9e686d31e83 - + + Comment + Texture UUID for voice image level 2 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + VoiceImageLevel3 - - Comment - Texture UUID for voice image level 3 - Persist - 1 - Type - String - Value - 29de489d-0491-fb00-7dab-f9e686d31e83 - + + Comment + Texture UUID for voice image level 3 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + VoiceImageLevel4 - - Comment - Texture UUID for voice image level 4 - Persist - 1 - Type - String - Value - 29de489d-0491-fb00-7dab-f9e686d31e83 - + + Comment + Texture UUID for voice image level 4 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + VoiceImageLevel5 - - Comment - Texture UUID for voice image level 5 - Persist - 1 - Type - String - Value - 29de489d-0491-fb00-7dab-f9e686d31e83 - + + Comment + Texture UUID for voice image level 5 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + VoiceImageLevel6 - - Comment - Texture UUID for voice image level 6 - Persist - 1 - Type - String - Value - 29de489d-0491-fb00-7dab-f9e686d31e83 - + + Comment + Texture UUID for voice image level 6 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + VoiceInputAudioDevice - - Comment - Audio input device to use for voice - Persist - 1 - Type - String - Value - Default - + + Comment + Audio input device to use for voice + Persist + 1 + Type + String + Value + Default + VoiceOutputAudioDevice - - Comment - Audio output device to use for voice - Persist - 1 - Type - String - Value - Default - + + Comment + Audio output device to use for voice + Persist + 1 + Type + String + Value + Default + VoicePort - - Comment - Client SLVoice port to connect to - Persist - 1 - Type - U32 - Value - 44124 - + + Comment + Client SLVoice port to connect to + Persist + 1 + Type + U32 + Value + 44124 + + WLSkyDetail + + Comment + Controls vertex detail on the WindLight sky. Lower numbers will give better performance and uglier skies. + Persist + 1 + Type + U32 + Value + 64 + WarnAboutBadPCI - - Comment - Enables AboutBadPCI warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables AboutBadPCI warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnAboutDirectX9 - - Comment - Enables AboutDirectX9 warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables AboutDirectX9 warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnAboutOldGraphicsDriver - - Comment - Enables AboutOldGraphicsDriver warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables AboutOldGraphicsDriver warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnAboutPCIGraphics - - Comment - Enables AboutPCIGraphics warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables AboutPCIGraphics warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnBrowserLaunch - - Comment - Enables BrowserLaunch warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables BrowserLaunch warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnDeedObject - - Comment - Enables DeedObject warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables DeedObject warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstAppearance - - Comment - Enables FirstAppearance warning dialog - Persist - 1 - Type - Boolean - Value - 1 - - WarnFirstMedia - - Comment - Enables FirstMedia warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstAppearance warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstAttach - - Comment - Enables FirstAttach warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstAttach warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstBalanceDecrease - - Comment - Enables FirstBalanceDecrease warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstBalanceDecrease warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstBalanceIncrease - - Comment - Enables FirstBalanceIncrease warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstBalanceIncrease warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstBuild - - Comment - Enables FirstBuild warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstBuild warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstDebugMenus - - Comment - Enables FirstDebugMenus warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstDebugMenus warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstFlexible - - Comment - Enables FirstFlexible warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstFlexible warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstGoTo - - Comment - Enables FirstGoTo warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstGoTo warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstInventory - - Comment - Enables FirstInventory warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstInventory warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstLeftClickNoHit - - Comment - Enables FirstLeftClickNoHit warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstLeftClickNoHit warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstMap - - Comment - Enables FirstMap warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstMap warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstMedia - - Comment - Enables FirstMedia warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstMedia warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstOverrideKeys - - Comment - Enables FirstOverrideKeys warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstOverrideKeys warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstSandbox - - Comment - Enables FirstSandbox warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstSandbox warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstSculptedPrim - - Comment - Enables FirstSculptedPrim warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstSculptedPrim warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstSit - - Comment - Enables FirstSit warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstSit warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstStreamingMusic - - Comment - Enables FirstStreamingMusic warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstStreamingMusic warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstStreamingVideo - - Comment - Enables FirstStreamingVideo warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstStreamingVideo warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstTeleport - - Comment - Enables FirstTeleport warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstTeleport warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstVoice - - Comment - Enables FirstVoice warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables FirstVoice warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnNewClassified - - Comment - Enables NewClassified warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables NewClassified warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnQuickTimeInstalled - - Comment - Enables QuickTimeInstalled warning dialog - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables QuickTimeInstalled warning dialog + Persist + 1 + Type + Boolean + Value + 1 + WarnReturnToOwner - - Comment - Enables ReturnToOwner warning dialog - Persist - 1 - Type - Boolean - Value - 1 - - WindLightUseAtmosShaders - - Comment - Whether to enable or disable WindLight atmospheric shaders. - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Enables ReturnToOwner warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WatchdogEnabled + + Comment + Controls whether the thread watchdog timer is activated. + Persist + 1 + Type + Boolean + Value + 1 + + WaterEditPresets + + Comment + Whether to be able to edit the water defaults or not + Persist + 1 + Type + Boolean + Value + 0 + + WaterGLFogDensityScale + + Comment + Maps shader water fog density to gl fog density + Persist + 1 + Type + F32 + Value + 0.02 + + WaterGLFogDepthFloor + + Comment + Controls how dark water gl fog can get + Persist + 1 + Type + F32 + Value + 0.25 + + WaterGLFogDepthScale + + Comment + Controls how quickly gl fog gets dark under water + Persist + 1 + Type + F32 + Value + 50.0 + + WindLightUseAtmosShaders + + Comment + Whether to enable or disable WindLight atmospheric shaders. + Persist + 1 + Type + Boolean + Value + 1 + WindowHeight - - Comment - SL viewer window height - Persist - 1 - Type - S32 - Value - 700 - + + Comment + SL viewer window height + Persist + 1 + Type + S32 + Value + 700 + WindowMaximized - - Comment - SL viewer window maximized on login - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + SL viewer window maximized on login + Persist + 1 + Type + Boolean + Value + 1 + WindowWidth - - Comment - SL viewer window width - Persist - 1 - Type - S32 - Value - 1000 - + + Comment + SL viewer window width + Persist + 1 + Type + S32 + Value + 1000 + WindowX - - Comment - X coordinate of lower left corner of SL viewer window, relative to primary display (pixels) - Persist - 1 - Type - S32 - Value - 10 - + + Comment + X coordinate of lower left corner of SL viewer window, relative to primary display (pixels) + Persist + 1 + Type + S32 + Value + 10 + WindowY - - Comment - Y coordinate of lower left corner of SL viewer window, relative to primary display (pixels) - Persist - 1 - Type - S32 - Value - 10 - - WLSkyDetail - - Comment - Controls vertex detail on the WindLight sky. Lower numbers will give better performance and uglier skies. - Persist - 1 - Type - U32 - Value - 64 - + + Comment + Y coordinate of lower left corner of SL viewer window, relative to primary display (pixels) + Persist + 1 + Type + S32 + Value + 10 + XferThrottle - - Comment - Maximum allowable downstream bandwidth for asset transfers (bits per second) - Persist - 1 - Type - F32 - Value - 150000 - + + Comment + Maximum allowable downstream bandwidth for asset transfers (bits per second) + Persist + 1 + Type + F32 + Value + 150000.0 + YawFromMousePosition - - Comment - Horizontal range over which avatar head tracks mouse position (degrees of head rotation from left of window to right) - Persist - 1 - Type - F32 - Value - 90 - + + Comment + Horizontal range over which avatar head tracks mouse position (degrees of head rotation from left of window to right) + Persist + 1 + Type + F32 + Value + 90.0 + YieldTime - - Comment - Yield some time to the local host. - Persist - 1 - Type - S32 - Value - -1 - + + Comment + Yield some time to the local host. + Persist + 1 + Type + S32 + Value + -1 + + ZoomDirect + + Comment + Map Joystick zoom axis directly to camera zoom. + Persist + 1 + Type + Boolean + Value + 0 + ZoomTime - - Comment - Time of transition between different camera modes (seconds) - Persist - 1 - Type - F32 - Value - 0.4000000059604644775390625 - + + Comment + Time of transition between different camera modes (seconds) + Persist + 1 + Type + F32 + Value + 0.40000000596 + llOwnerSayChatColor - - Comment - Color of chat messages from objects only visible to the owner - Persist - 1 - Type - Color4 - Value - - 0.9900000095367431640625 - 0.9900000095367431640625 - 0.689999997615814208984375 - 1 - - - ParcelMediaAutoPlayEnable - - Comment - Auto play parcel media when available - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Color of chat messages from objects only visible to the owner + Persist + 1 + Type + Color4 + Value + + 0.990000009537 + 0.990000009537 + 0.689999997616 + 1.0 + + particlesbeacon - - Comment - Beacon / Highlight particle generators - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Beacon / Highlight particle generators + Persist + 1 + Type + Boolean + Value + 0 + physicalbeacon - - Comment - Beacon / Highlight physical objects - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Beacon / Highlight physical objects + Persist + 1 + Type + Boolean + Value + 1 + renderbeacons - - Comment - Beacon / Highlight particle generators - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Beacon / Highlight particle generators + Persist + 1 + Type + Boolean + Value + 0 + renderhighlights - - Comment - Beacon / Highlight scripted objects with touch function - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Beacon / Highlight scripted objects with touch function + Persist + 1 + Type + Boolean + Value + 1 + scriptsbeacon - - Comment - Beacon / Highlight scripted objects - Persist - 1 - Type - Boolean - Value - 0 - + + Comment + Beacon / Highlight scripted objects + Persist + 1 + Type + Boolean + Value + 0 + scripttouchbeacon - - Comment - Beacon / Highlight scripted objects with touch function - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Beacon / Highlight scripted objects with touch function + Persist + 1 + Type + Boolean + Value + 1 + soundsbeacon - - Comment - Beacon / Highlight sound generators - Persist - 1 - Type - Boolean - Value - 0 - - SkyEditPresets - - Comment - Whether to be able to edit the sky defaults or not - Persist - 1 - Type - Boolean - Value - 0 - - WaterGLFogDepthFloor - - Comment - Controls how dark water gl fog can get - Persist - 1 - Type - F32 - Value - 0.25 - - WaterGLFogDepthScale - - Comment - Controls how quickly gl fog gets dark under water - Persist - 1 - Type - F32 - Value - 50.0 - - WaterGLFogDensityScale - - Comment - Maps shader water fog density to gl fog density - Persist - 1 - Type - F32 - Value - 0.02 - - EnableRippleWater - - Comment - Whether to use ripple water shader or not - Persist - 1 - Type - Boolean - Value - 1 - - WaterEditPresets - - Comment - Whether to be able to edit the water defaults or not - Persist - 1 - Type - Boolean - Value - 0 - - FloaterEnvRect - - Comment - Rectangle for Environment Editor - Persist - 1 - Type - Rect - Value - - 50 - 150 - 650 - 0 - - - FloaterAdvancedSkyRect - - Comment - Rectangle for Advanced Sky Editor - Persist - 1 - Type - Rect - Value - - 50 - 220 - 450 - 0 - - - FloaterDayCycleRect - - Comment - Rectangle for Day Cycle Editor - Persist - 1 - Type - Rect - Value - - 50 - 450 - 300 - 0 - - - FloaterAdvancedWaterRect - - Comment - Rectangle for Advanced Water Editor - Persist - 1 - Type - Rect - Value - - 50 - 220 - 450 - 0 - - - RenderFastAlpha - - Comment - Use lossy alpha rendering optimization (opaque/nonexistent small alpha faces). - Persist - 1 - Type - Boolean - Value - 0 - - RenderDeferred - - Comment - Use deferred rendering pipeline. - Persist - 1 - Type - Boolean - Value - 0 - - RenderFSAASamples - - Comment - Number of samples to use for FSAA (0 = no AA). - Persist - 1 - Type - U32 - Value - 0 - - RenderTextureMemoryMultiple - - Comment - Multiple of texture memory value to use (should fit: 0 < value <= 1.0) - Persist - 1 - Type - F32 - Value - 1.0 - - Disregard128DefaultDrawDistance - - Comment - Whether to use the auto default to 128 draw distance - Persist - 1 - Type - Boolean - Value - 1 - - Disregard96DefaultDrawDistance - - Comment - Whether to use the auto default to 96 draw distance - Persist - 1 - Type - Boolean - Value - 1 - - - AvatarAxisDeadZone0 - - Comment - Avatar axis 0 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - AvatarAxisDeadZone1 - - Comment - Avatar axis 1 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - AvatarAxisDeadZone2 - - Comment - Avatar axis 2 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - AvatarAxisDeadZone3 - - Comment - Avatar axis 3 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - AvatarAxisDeadZone4 - - Comment - Avatar axis 4 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - AvatarAxisDeadZone5 - - Comment - Avatar axis 5 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - AvatarAxisScale0 - - Comment - Avatar axis 0 scaler. - Persist - 1 - Type - F32 - Value - 1 - - AvatarAxisScale1 - - Comment - Avatar axis 1 scaler. - Persist - 1 - Type - F32 - Value - 1 - - AvatarAxisScale2 - - Comment - Avatar axis 2 scaler. - Persist - 1 - Type - F32 - Value - 1 - - AvatarAxisScale3 - - Comment - Avatar axis 3 scaler. - Persist - 1 - Type - F32 - Value - 1 - - AvatarAxisScale4 - - Comment - Avatar axis 4 scaler. - Persist - 1 - Type - F32 - Value - 1 - - AvatarAxisScale5 - - Comment - Avatar axis 5 scaler. - Persist - 1 - Type - F32 - Value - 1 - - AvatarFeathering - - Comment - Avatar feathering (less is softer) - Persist - 1 - Type - F32 - Value - 16 - - - BuildAxisDeadZone0 - - Comment - Build axis 0 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - BuildAxisDeadZone1 - - Comment - Build axis 1 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - BuildAxisDeadZone2 - - Comment - Build axis 2 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - BuildAxisDeadZone3 - - Comment - Build axis 3 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - BuildAxisDeadZone4 - - Comment - Build axis 4 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - BuildAxisDeadZone5 - - Comment - Build axis 5 dead zone. - Persist - 1 - Type - F32 - Value - 0.1 - - BuildAxisScale0 - - Comment - Build axis 0 scaler. - Persist - 1 - Type - F32 - Value - 1 - - BuildAxisScale1 - - Comment - Build axis 1 scaler. - Persist - 1 - Type - F32 - Value - 1 - - BuildAxisScale2 - - Comment - Build axis 2 scaler. - Persist - 1 - Type - F32 - Value - 1 - - BuildAxisScale3 - - Comment - Build axis 3 scaler. - Persist - 1 - Type - F32 - Value - 1 - - BuildAxisScale4 - - Comment - Build axis 4 scaler. - Persist - 1 - Type - F32 - Value - 1 - - BuildAxisScale5 - - Comment - Build axis 5 scaler. - Persist - 1 - Type - F32 - Value - 1 - - BuildFeathering - - Comment - Build feathering (less is softer) - Persist - 1 - Type - F32 - Value - 16 - - + + Comment + Beacon / Highlight sound generators + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a6173f45df..2b5691ffe8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -64,7 +64,7 @@ #include "llurldispatcher.h" #include "llurlhistory.h" #include "llfirstuse.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llweb.h" #include "llsecondlifeurls.h" @@ -192,24 +192,6 @@ // viewer.cpp - these are only used in viewer, should be easily moved. extern void disable_win_error_reporting(); -//#define APPLE_PREVIEW // Define this if you're doing a preview build on the Mac -#if LL_RELEASE_FOR_DOWNLOAD -// Default userserver for production builds is agni -#ifndef APPLE_PREVIEW -static EGridInfo GridDefaultChoice = GRID_INFO_AGNI; -#else -static EGridInfo GridDefaultChoice = GRID_INFO_ADITI; -#endif -#else -// Default userserver for development builds is none -static EGridInfo GridDefaultChoice = GRID_INFO_NONE; -#endif - -#if LL_WINDOWS -extern void create_console(); -#endif - - #if LL_DARWIN #include extern void init_apple_menu(const char* product); @@ -287,6 +269,7 @@ BOOL gUseWireframe = FALSE; LLVFS* gStaticVFS = NULL; LLMemoryInfo gSysMemory; +U64 gMemoryAllocated = 0; // updated in display_stats() in llviewerdisplay.cpp LLString gLastVersionChannel; @@ -303,6 +286,7 @@ BOOL gPeriodicSlowFrame = FALSE; BOOL gCrashOnStartup = FALSE; BOOL gLLErrorActivated = FALSE; BOOL gLogoutInProgress = FALSE; + //////////////////////////////////////////////////////////// // Internal globals... that should be removed. static LLString gArgs; @@ -338,6 +322,48 @@ void idle_afk_check() } } +//this function checks if the system can allocate (num_chunk)MB memory successfully. +//if this check fails, the allocated memory is NOT freed. +void idle_mem_check(S32 num_chunk) +{ + //this flag signals if memory allocation check is necessary + static BOOL check = TRUE ; + + if(!check) //if memory check fails before, do not repeat it. + { + return ; + } + check = FALSE ; //before memory check for this frame, turn off check signal for the next frame. + + S32 i = 0 ; + char**p = new char*[num_chunk] ; + if(!p) + { + return ; + } + for(i = 0 ; i < num_chunk ; i++) + { + //1MB per chunk + //if the allocation fails, the system should catch it. + p[i] = new char[1024 * 1024] ; + + if(!p[i]) //in case that system try-catch is turned off + { + return ; + } + } + + //release memory if the allocation check does not fail. + for(i = 0 ; i < num_chunk ; i++) + { + delete[] p[i] ; + } + delete[] p ; + + //memory check for this frame succeeds, turn on next frame check. + check = TRUE ; +} + // A callback set in LLAppViewer::init() static void ui_audio_callback(const LLUUID& uuid) { @@ -369,6 +395,24 @@ void request_initial_instant_messages() } } +// A settings system callback for CrashSubmitBehavior +bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue) +{ + S32 cb = newvalue.asInteger(); + const S32 NEVER_SUBMIT_REPORT = 2; + if(cb == NEVER_SUBMIT_REPORT) + { +// LLWatchdog::getInstance()->cleanup(); // SJB: cleaning up a running watchdog is unsafe + LLAppViewer::instance()->destroyMainloopTimeout(); + } + else if(gSavedSettings.getBOOL("WatchdogEnabled") == TRUE) + { +// LLWatchdog::getInstance()->init(); +// LLAppViewer::instance()->initMainloopTimeout("Mainloop Resume"); + } + return true; +} + // Use these strictly for things that are constructed at startup, // or for things that are performance critical. JC static void settings_to_globals() @@ -464,72 +508,32 @@ static void settings_modify() gSavedSettings.setBOOL("PTTCurrentlyEnabled", TRUE); //gSavedSettings.getBOOL("EnablePushToTalk")); } -void initGridChoice() +void LLAppViewer::initGridChoice() { - LLString gridChoice = gSavedSettings.getString("GridChoice"); - if(!gridChoice.empty()) - // Used to show first chunk of each argument passed in the - // window title. - { - // find the grid choice from the user setting. - int gridIndex = GRID_INFO_NONE; - for(;gridIndex < GRID_INFO_OTHER; ++gridIndex ) - { - if(0 == LLString::compareInsensitive(gGridInfo[gridIndex].mLabel, gridChoice.c_str())) - { - gGridChoice = (EGridInfo)gridIndex; - - if(GRID_INFO_LOCAL == gGridChoice) - { - gGridName = LOOPBACK_ADDRESS_STRING; - break; - } - else - { - gGridName = gGridInfo[gGridChoice].mName; - break; - } - } - } - - if(GRID_INFO_OTHER == gridIndex) - { - // *FIX:MEP Can and should we validate that this is an IP address? - gGridChoice = (EGridInfo)gridIndex; - gGridName = llformat("%s", gSavedSettings.getString("GridChoice").c_str()); - - } - } - - -#if !LL_RELEASE_FOR_DOWNLOAD - if (gGridChoice == GRID_INFO_NONE) - { - // Development version: load last server choice by default (overridden by cmd line args) - S32 server = gSavedSettings.getS32("ServerChoice"); - if (server != 0) - gGridChoice = (EGridInfo)llclamp(server, 0, (S32)GRID_INFO_COUNT - 1); - if (server == GRID_INFO_OTHER) + // Load up the initial grid choice from: + // - hard coded defaults... + // - command line settings... + // - if dev build, persisted settings... + + // Set the "grid choice", this is specified by command line. + std::string grid_choice = gSavedSettings.getString("CmdLineGridChoice"); + LLViewerLogin::getInstance()->setGridChoice(grid_choice); + + // Load last server choice by default + // ignored if the command line grid choice has been set + if(grid_choice.empty()) + { + S32 server = gSavedSettings.getS32("ServerChoice"); + server = llclamp(server, 0, (S32)GRID_INFO_COUNT - 1); + if(server == GRID_INFO_OTHER) { LLString custom_server = gSavedSettings.getString("CustomServer"); - if (custom_server.empty()) - { - gGridName = "none"; - } - else - { - gGridName = custom_server.c_str(); - } + LLViewerLogin::getInstance()->setGridChoice(custom_server); + } + else if(server != 0) + { + LLViewerLogin::getInstance()->setGridChoice((EGridInfo)server); } - - gSavedSettings.setString("GridChoice", gGridInfo[gGridChoice].mLabel); - } -#endif - - if (gGridChoice == GRID_INFO_NONE) - { - gGridChoice = GridDefaultChoice; - gSavedSettings.setString("GridChoice", gGridInfo[gGridChoice].mLabel); } } @@ -577,7 +581,6 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL; LLAppViewer::LLAppViewer() : mMarkerFile(NULL), - mCrashBehavior(CRASH_BEHAVIOR_ASK), mReportedCrash(false), mNumSessions(0), mPurgeCache(false), @@ -586,7 +589,8 @@ LLAppViewer::LLAppViewer() : mSavedFinalSnapshot(false), mQuitRequested(false), mLogoutRequestSent(false), - mYieldTime(-1) + mYieldTime(-1), + mMainloopTimeout(NULL) { if(NULL != sInstance) { @@ -594,15 +598,11 @@ LLAppViewer::LLAppViewer() : } sInstance = this; - - // Initialize the mainloop timeout. - mMainloopTimeout = new LLWatchdogTimeout(); } LLAppViewer::~LLAppViewer() { - // Initialize the mainloop timeout. - delete mMainloopTimeout; + destroyMainloopTimeout(); // If we got to this destructor somehow, the app didn't hang. removeMarkerFile(); @@ -610,13 +610,6 @@ LLAppViewer::~LLAppViewer() bool LLAppViewer::init() { - // *NOTE:Mani - LLCurl::initClass is not thread safe. - // Called before threads are created. - LLCurl::initClass(); - - initThreads(); - - // // Start of the application // @@ -629,7 +622,6 @@ bool LLAppViewer::init() // that touches files should really go through the lldir API gDirUtilp->initAppDirs("SecondLife"); - initLogging(); // @@ -638,6 +630,12 @@ bool LLAppViewer::init() if (!initConfiguration()) return false; + // *NOTE:Mani - LLCurl::initClass is not thread safe. + // Called before threads are created. + LLCurl::initClass(); + + initThreads(); + writeSystemInfo(); // Build a string representing the current version number. @@ -888,10 +886,6 @@ bool LLAppViewer::init() bool LLAppViewer::mainLoop() { - mMainloopTimeout = new LLWatchdogTimeout(); - // *FIX:Mani - Make this a setting, once new settings exist in this branch. - mMainloopTimeout->setTimeout(5); - //------------------------------------------- // Run main loop until time to quit //------------------------------------------- @@ -920,6 +914,8 @@ bool LLAppViewer::mainLoop() { LLFastTimer t(LLFastTimer::FTM_FRAME); + pingMainloopTimeout("Main:GatherInput"); + { LLFastTimer t2(LLFastTimer::FTM_MESSAGES); #if LL_WINDOWS @@ -940,8 +936,13 @@ bool LLAppViewer::mainLoop() } #endif + //at the beginning of every frame, check if the system can successfully allocate 10 * 1 MB memory. + idle_mem_check(10) ; + if (!LLApp::isExiting()) { + pingMainloopTimeout("Main:JoystickKeyboard"); + // Scan keyboard for movement keys. Command keys and typing // are handled by windows callbacks. Don't do this until we're // done initializing. JC @@ -956,6 +957,8 @@ bool LLAppViewer::mainLoop() gKeyboard->scanKeyboard(); } + pingMainloopTimeout("Main:Messages"); + // Update state based on messages, user input, object idle. { LLFastTimer t3(LLFastTimer::FTM_IDLE); @@ -972,25 +975,34 @@ bool LLAppViewer::mainLoop() if (gDoDisconnect && (LLStartUp::getStartupState() == STATE_STARTED)) { + pauseMainloopTimeout(); saveFinalSnapshot(); disconnectViewer(); + resumeMainloopTimeout(); } // Render scene. if (!LLApp::isExiting()) { + pingMainloopTimeout("Main:Display"); display(); + pingMainloopTimeout("Main:Snapshot"); LLFloaterSnapshot::update(); // take snapshots #if LL_LCD_COMPILE // update LCD Screen + pingMainloopTimeout("Main:LCD"); gLcdScreen->UpdateDisplay(); #endif } } + pingMainloopTimeout("Main:Sleep"); + + pauseMainloopTimeout(); + // Sleep and run background threads { LLFastTimer t2(LLFastTimer::FTM_SLEEP); @@ -1073,7 +1085,9 @@ bool LLAppViewer::mainLoop() //LLVFSThread::sLocal->pause(); // Prevent the VFS thread from running while rendering. //LLLFSThread::sLocal->pause(); // Prevent the LFS thread from running while rendering. - mMainloopTimeout->ping(); + resumeMainloopTimeout(); + + pingMainloopTimeout("Main:End"); } } @@ -1098,7 +1112,7 @@ bool LLAppViewer::mainLoop() delete gServicePump; - mMainloopTimeout->stop(); + destroyMainloopTimeout(); llinfos << "Exiting main_loop" << llendflush; @@ -1400,7 +1414,12 @@ bool LLAppViewer::initThreads() static const bool enable_threads = true; #endif - LLWatchdog::getInstance()->init(); + const S32 NEVER_SUBMIT_REPORT = 2; + if(TRUE == gSavedSettings.getBOOL("WatchdogEnabled") + && (gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT)) + { + LLWatchdog::getInstance()->init(); + } LLVFSThread::initClass(enable_threads && true); LLLFSThread::initClass(enable_threads && true); @@ -1556,6 +1575,19 @@ bool LLAppViewer::initConfiguration() LLWindow::getFontListSans()); #endif + //*FIX:Mani - Set default to disabling watchdog mainloop + // timeout for mac and linux. There is no call stack info + // on these platform to help debug. +#ifndef LL_RELEASE_FOR_DOWNLOAD + gSavedSettings.setBOOL("WatchdogEnabled", FALSE); +#endif + +#ifndef LL_WINDOWS + gSavedSettings.setBOOL("WatchdogEnabled", FALSE); +#endif + + gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _1)); + // These are warnings that appear on the first experience of that condition. // They are already set in the settings_default.xml file, but still need to be added to LLFirstUse // for disable/reset ability @@ -1787,18 +1819,6 @@ bool LLAppViewer::initConfiguration() } } - const LLControlVariable* loginuri = gSavedSettings.getControl("LoginURI"); - if(loginuri && LLString::null != loginuri->getValue().asString()) - { - addLoginURI(loginuri->getValue().asString()); - } - - const LLControlVariable* helperuri = gSavedSettings.getControl("HelperURI"); - if(helperuri && LLString::null != helperuri->getValue().asString()) - { - setHelperURI(helperuri->getValue().asString()); - } - const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinFolder"); if(skinfolder && LLString::null != skinfolder->getValue().asString()) { @@ -2180,10 +2200,6 @@ void LLAppViewer::cleanupSavedSettings() { gSavedSettings.setF32("RenderFarClip", gAgent.mDrawDistance); } - - // *REMOVE: This is now done via LLAppViewer::setCrashBehavior() - // Left vestigially in case I borked it. - // gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, gCrashBehavior); } void LLAppViewer::removeCacheFiles(const char* file_mask) @@ -2210,8 +2226,15 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE(); gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); - gDebugInfo["RAMInfo"] = llformat("%u", gSysMemory.getPhysicalMemoryKB()); + gDebugInfo["RAMInfo"]["Physical"] = (LLSD::Integer)(gSysMemory.getPhysicalMemoryKB()); + gDebugInfo["RAMInfo"]["Allocated"] = (LLSD::Integer)(gMemoryAllocated>>10); // MB -> KB gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple(); + + // *FIX:Mani - move this ddown in llappviewerwin32 +#ifdef LL_WINDOWS + DWORD thread_id = GetCurrentThreadId(); + gDebugInfo["MainloopThreadID"] = (S32)thread_id; +#endif // Dump some debugging info LL_INFOS("SystemInfo") << gSecondLife @@ -2242,7 +2265,10 @@ void LLAppViewer::handleSyncViewerCrash() void LLAppViewer::handleViewerCrash() { llinfos << "Handle viewer crash entry." << llendl; - + + // Make sure the watchdog gets turned off... +// LLWatchdog::getInstance()->cleanup(); // SJB: This causes the Watchdog to hang for an extra 20-40s?! + LLAppViewer* pApp = LLAppViewer::instance(); if (pApp->beingDebugged()) { @@ -2297,6 +2323,12 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["CurrentRegion"] = gAgent.getRegion()->getName(); } + if(LLAppViewer::instance()->mMainloopTimeout) + { + gDebugInfo["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState(); + } + + //Write out the crash status file //Use marker file style setup, as that's the simplest, especially since //we're already in a crash situation @@ -2360,12 +2392,6 @@ void LLAppViewer::handleViewerCrash() return; } -void LLAppViewer::setCrashBehavior(S32 cb) -{ - mCrashBehavior = cb; - gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, mCrashBehavior); -} - bool LLAppViewer::anotherInstanceRunning() { // We create a marker file when the program starts and remove the file when it finishes. @@ -2822,61 +2848,6 @@ const LLString& LLAppViewer::getWindowTitle() const return gWindowTitle; } -void LLAppViewer::resetURIs() const -{ - // Clear URIs when picking a new server - gLoginURIs.clear(); - gHelperURI.clear(); -} - -const std::vector& LLAppViewer::getLoginURIs() const -{ - if (gLoginURIs.empty()) - { - // not specified on the command line, use value from table - gLoginURIs.push_back(gGridInfo[gGridChoice].mLoginURI); - } - return gLoginURIs; -} - -const std::string& LLAppViewer::getHelperURI() const -{ - if (gHelperURI.empty()) - { - // not specified on the command line, use value from table - gHelperURI = gGridInfo[gGridChoice].mHelperURI; - } - return gHelperURI; -} - -void LLAppViewer::addLoginURI(const std::string& uri) -{ - // *NOTE:Mani - login uri trumps the --grid (gGridChoice) setting. - // Update gGridChoice to reflect the loginURI setting. - gLoginURIs.push_back(uri); - - const std::string& top_uri = getLoginURIs()[0]; - int i = 0; - for(; i < GRID_INFO_COUNT; ++i) - { - if(top_uri == gGridInfo[i].mLoginURI) - { - gGridChoice = (EGridInfo)i; - break; - } - } - - if(GRID_INFO_COUNT == i) - { - gGridChoice = GRID_INFO_OTHER; - } -} - -void LLAppViewer::setHelperURI(const std::string& uri) -{ - gHelperURI = uri; -} - // Callback from a dialog indicating user was logged out. void finish_disconnect(S32 option, void* userdata) { @@ -3014,15 +2985,6 @@ void LLAppViewer::saveNameCache() } } -bool LLAppViewer::isInProductionGrid() -{ - // *NOTE:Mani This used to compare GRID_INFO_AGNI to gGridChoice, - // but it seems that loginURI trumps that. - const std::string& loginURI = getLoginURIs()[0]; - return (loginURI == gGridInfo[GRID_INFO_AGNI].mLoginURI); -} - - /*! @brief This class is an LLFrameTimer that can be created with an elapsed time that starts counting up from the given value rather than 0.0. @@ -3531,6 +3493,8 @@ static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME; void LLAppViewer::idleNetwork() { + pingMainloopTimeout("idleNetwork"); + gObjectList.mNumNewObjects = 0; S32 total_decoded = 0; @@ -3716,18 +3680,58 @@ void LLAppViewer::forceErrorSoftwareException() throw; } -void LLAppViewer::startMainloopTimeout(F32 secs) +void LLAppViewer::initMainloopTimeout(const std::string& state, F32 secs) { - if(secs < 0.0f) + if(!mMainloopTimeout) { - secs = gSavedSettings.getF32("MainloopTimeoutDefault"); + mMainloopTimeout = new LLWatchdogTimeout(); + resumeMainloopTimeout(state, secs); + } +} + +void LLAppViewer::destroyMainloopTimeout() +{ + if(mMainloopTimeout) + { + delete mMainloopTimeout; + mMainloopTimeout = NULL; + } +} + +void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs) +{ + if(mMainloopTimeout) + { + if(secs < 0.0f) + { + secs = gSavedSettings.getF32("MainloopTimeoutDefault"); + } + + mMainloopTimeout->setTimeout(secs); + mMainloopTimeout->start(state); + } +} + +void LLAppViewer::pauseMainloopTimeout() +{ + if(mMainloopTimeout) + { + mMainloopTimeout->stop(); } - - mMainloopTimeout->setTimeout(secs); - mMainloopTimeout->start(); } -void LLAppViewer::stopMainloopTimeout() +void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs) { - mMainloopTimeout->stop(); + if(mMainloopTimeout) + { + if(secs < 0.0f) + { + secs = gSavedSettings.getF32("MainloopTimeoutDefault"); + } + + mMainloopTimeout->setTimeout(secs); + mMainloopTimeout->ping(state); + } } + + diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index de127e5cf8..8ef22deb27 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -77,8 +77,6 @@ public: // Report true if under the control of a debugger. A null-op default. virtual bool beingDebugged() { return false; } - S32 getCrashBehavior() const { return mCrashBehavior; } - void setCrashBehavior(S32 cb); virtual void handleCrashReporting() = 0; // What to do with crash report? virtual void handleSyncCrashTrace() = 0; // any low-level crash-prep that has to happen in the context of the crashing thread before the crash report is delivered. static void handleViewerCrash(); // Hey! The viewer crashed. Do this, soon. @@ -96,13 +94,6 @@ public: const LLString& getSecondLifeTitle() const; // The Second Life title. const LLString& getWindowTitle() const; // The window display name. - // Helpers for URIs - void addLoginURI(const std::string& uri); - void setHelperURI(const std::string& uri); - const std::vector& getLoginURIs() const; - const std::string& getHelperURI() const; - void resetURIs() const; - void forceDisconnect(const LLString& msg); // Force disconnection, with a message to the user. void badNetworkHandler(); // Cause a crash state due to bad network packet. @@ -112,8 +103,6 @@ public: void loadNameCache(); void saveNameCache(); - bool isInProductionGrid(); - void removeMarkerFile(bool leave_logout_marker = false); // LLAppViewer testing helpers. @@ -138,10 +127,13 @@ public: std::string getSettingsFileName(const std::string& file); // For thread debugging. - // llstartup needs to control this. - // llworld, send_agent_pause() also controls this. - void startMainloopTimeout(F32 secs = -1.0f); - void stopMainloopTimeout(); + // llstartup needs to control init. + // llworld, send_agent_pause() also controls pause/resume. + void initMainloopTimeout(const std::string& state, F32 secs = -1.0f); + void destroyMainloopTimeout(); + void pauseMainloopTimeout(); + void resumeMainloopTimeout(const std::string& state = "", F32 secs = -1.0f); + void pingMainloopTimeout(const std::string& state, F32 secs = -1.0f); protected: virtual bool initWindow(); // Initialize the viewer's window. @@ -159,6 +151,7 @@ private: bool initThreads(); // Initialize viewer threads, return false on failure. bool initConfiguration(); // Initialize settings from the command line/config file. + void initGridChoice(); bool initCache(); // Initialize local client cache. void purgeCache(); // Clear the local cache. @@ -192,7 +185,6 @@ private: LLOSInfo mSysOSInfo; - S32 mCrashBehavior; bool mReportedCrash; // Thread objects. @@ -293,6 +285,7 @@ extern BOOL gUseWireframe; extern LLVFS *gStaticVFS; extern LLMemoryInfo gSysMemory; +extern U64 gMemoryAllocated; extern LLString gLastVersionChannel; diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index cb44e2b1de..0a2cb43c80 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -333,13 +333,15 @@ void LLAppViewerLinux::handleSyncCrashTrace() void LLAppViewerLinux::handleCrashReporting() { + const S32 cb = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING); + // Always generate the report, have the logger do the asking, and // don't wait for the logger before exiting (-> total cleanup). - if (CRASH_BEHAVIOR_NEVER_SEND != LLAppViewer::instance()->getCrashBehavior()) + if (CRASH_BEHAVIOR_NEVER_SEND != cb) { // launch the actual crash logger const char* ask_dialog = "-dialog"; - if (CRASH_BEHAVIOR_ASK != LLAppViewer::instance()->getCrashBehavior()) + if (CRASH_BEHAVIOR_ASK != cb) ask_dialog = ""; // omit '-dialog' option std::string cmd =gDirUtilp->getAppRODataDir(); cmd += gDirUtilp->getDirDelimiter(); @@ -348,7 +350,7 @@ void LLAppViewerLinux::handleCrashReporting() {cmd.c_str(), ask_dialog, "-user", - (char*)gGridName.c_str(), + (char*)LLViewerLogin::getInstance()->getGridLabel().c_str(), "-name", LLAppViewer::instance()->getSecondLifeTitle().c_str(), NULL}; diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index dee36fa3c3..e2663f05bd 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -71,7 +71,6 @@ extern "C" { #endif #endif - LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop) { // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. @@ -421,9 +420,10 @@ void LLAppViewerWin32::handleCrashReporting() exe_path += "win_crash_logger.exe"; std::string arg_string = "-user "; - arg_string += gGridName; - - switch(getCrashBehavior()) + arg_string += LLViewerLogin::getInstance()->getGridLabel(); + + S32 cb = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING); + switch(cb) { case CRASH_BEHAVIOR_ASK: default: diff --git a/indra/newview/llbox.cpp b/indra/newview/llbox.cpp index 1a3cf36ce6..95e16cf872 100644 --- a/indra/newview/llbox.cpp +++ b/indra/newview/llbox.cpp @@ -34,7 +34,7 @@ #include "llbox.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llglheaders.h" LLBox gBox; diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 8571046c6e..e4256b40f5 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -39,7 +39,7 @@ // Project includes #include "llui.h" -#include "llglimmediate.h" +#include "llrender.h" #include "lluiconstants.h" #include "llviewerwindow.h" #include "llviewercontrol.h" diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index a6e002a04d..f06a8abfe0 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -291,12 +291,15 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp) } catch(LLCLPLastOption&) { - // Continue without parsing. - std::string msg = "Found tokens past last option. Ignoring."; - llwarns << msg << llendl; - mErrorMsg = msg; - // boost::po will have stored a mal-formed option. + // This exception means a token was read after an option + // that must be the last option was reached (see url and slurl options) + + // boost::po will have stored a malformed option. // All such options will be removed below. + // The last option read, the last_option option, and its value + // are put into the error message. + std::string last_option; + std::string last_value; for(po::variables_map::iterator i = gVariableMap.begin(); i != gVariableMap.end();) { po::variables_map::iterator tempI = i++; @@ -304,7 +307,27 @@ bool LLCommandLineParser::parseAndStoreResults(po::command_line_parser& clp) { gVariableMap.erase(tempI); } + else + { + last_option = tempI->first; + LLCommandLineParser::token_vector_t* tv = + boost::any_cast(&(tempI->second.value())); + if(!tv->empty()) + { + last_value = (*tv)[tv->size()-1]; + } + } } + + // Continue without parsing. + std::ostringstream msg; + msg << "Caught Error: Found options after last option: " + << last_option << " " + << last_value; + + llwarns << msg.str() << llendl; + mErrorMsg = msg.str(); + return false; } return true; } diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index bbcb7e64d4..c32bf7c268 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -44,7 +44,7 @@ #include "lllineeditor.h" #include "llviewchildren.h" #include "llxmlrpctransaction.h" -#include "llappviewer.h" +#include "llviewernetwork.h" const F64 CURRENCY_ESTIMATE_FREQUENCY = 2.0; @@ -239,7 +239,7 @@ void LLCurrencyUIManager::Impl::startTransaction(TransactionType type, static std::string transactionURI; if (transactionURI.empty()) { - transactionURI = LLAppViewer::instance()->getHelperURI() + "currency.php"; + transactionURI = LLViewerLogin::getInstance()->getHelperURI() + "currency.php"; } delete mTransaction; @@ -527,3 +527,4 @@ std::string LLCurrencyUIManager::errorURI() } + diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index b0dd0a99ac..a03adfa338 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -122,6 +122,7 @@ void LLDrawable::destroy() sNumZombieDrawables--; } + LLFace::sDeleteLock = mFaces.size() ; std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); mFaces.clear(); @@ -184,6 +185,7 @@ void LLDrawable::cleanupReferences() { LLFastTimer t(LLFastTimer::FTM_PIPELINE); + LLFace::sDeleteLock = mFaces.size() ; std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); mFaces.clear(); @@ -277,6 +279,7 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag } else if (newFaces < (S32)mFaces.size()) { + LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ; std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); } @@ -288,6 +291,8 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag addFace(poolp, texturep); } } + + llassert_always(mFaces.size() == newFaces); } void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerImage *texturep) @@ -298,6 +303,7 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer } else if (newFaces < (S32)mFaces.size()) { + LLFace::sDeleteLock = (S32)mFaces.size() - newFaces ; std::for_each(mFaces.begin() + newFaces, mFaces.end(), DeletePointer()); mFaces.erase(mFaces.begin() + newFaces, mFaces.end()); } @@ -309,6 +315,8 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer addFace(poolp, texturep); } } + + llassert_always(mFaces.size() == newFaces) ; } void LLDrawable::mergeFaces(LLDrawable* src) @@ -329,8 +337,13 @@ void LLDrawable::deleteFaces(S32 offset, S32 count) { face_list_t::iterator face_begin = mFaces.begin() + offset; face_list_t::iterator face_end = face_begin + count; + + S32 end = (S32)mFaces.size() ; + LLFace::sDeleteLock = count ; std::for_each(face_begin, face_end, DeletePointer()); mFaces.erase(face_begin, face_end); + + llassert_always(mFaces.size() == end - count) ; } void LLDrawable::update() diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 6cd2152a28..b7966f2b20 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -32,7 +32,7 @@ #include "llviewerprecompiledheaders.h" #include "lldrawpool.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llfasttimer.h" #include "llviewercontrol.h" diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 09901984c4..5cc4e37c97 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -37,6 +37,7 @@ #include "llviewercontrol.h" #include "llcriticaldamp.h" #include "llfasttimer.h" +#include "llrender.h" #include "llcubemap.h" #include "llsky.h" @@ -93,7 +94,7 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass) { // Start out with no shaders. current_shader = target_shader = NULL; - glUseProgramObjectARB(0); + LLGLSLShader::bindNoShader(); } gPipeline.enableLightsDynamic(); } @@ -105,7 +106,7 @@ void LLDrawPoolAlpha::endRenderPass( S32 pass ) if(gPipeline.canUseWindLightShaders()) { - glUseProgramObjectARB(0); + LLGLSLShader::bindNoShader(); } } @@ -123,7 +124,7 @@ void LLDrawPoolAlpha::render(S32 pass) { if(gPipeline.canUseWindLightShaders()) { - glUseProgramObjectARB(0); + LLGLSLShader::bindNoShader(); } gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); glColor4f(1,0,0,1); @@ -207,18 +208,17 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask { return; } - // *TODO - Uhhh, we should always be doing some type of alpha rejection. These should probably both be 0.01f - glAlphaFunc(GL_GREATER, 0.f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } else { if (LLPipeline::sImpostorRender) { - glAlphaFunc(GL_GREATER, 0.5f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); } else { - glAlphaFunc(GL_GREATER, 0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } } @@ -230,7 +230,8 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask if (texture && params.mTexture.notNull()) { - glActiveTextureARB(GL_TEXTURE0_ARB); + llassert_always(gGL.getTexUnit(0)) ; + gGL.getTexUnit(0)->activate(); params.mTexture->bind(); params.mTexture->addTextureStats(params.mVSize); if (params.mTextureMatrix) @@ -283,7 +284,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask } else if (!use_shaders && current_shader != NULL) { - glUseProgramObjectARB(0); + LLGLSLShader::bindNoShader(); current_shader = NULL; } diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 95e3bc2205..f1d88aa54a 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -32,7 +32,7 @@ #include "llviewerprecompiledheaders.h" #include "lldrawpoolavatar.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llvoavatar.h" #include "m3math.h" @@ -299,7 +299,7 @@ void LLDrawPoolAvatar::beginSkinned() } sVertexProgram->enableTexture(LLShaderMgr::BUMP_MAP); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } else { @@ -319,7 +319,7 @@ void LLDrawPoolAvatar::endSkinned() { sRenderingSkinned = FALSE; sVertexProgram->disableTexture(LLShaderMgr::BUMP_MAP); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); disable_vertex_weighting(sVertexProgram->mAttribute[LLShaderMgr::AVATAR_WEIGHT]); if (sShaderLevel >= SHADER_LEVEL_BUMP) { @@ -343,7 +343,7 @@ void LLDrawPoolAvatar::endSkinned() } } - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } @@ -395,7 +395,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) return; } - if (!avatarp->isFullyLoaded()) + if (!single_avatar && !avatarp->isFullyLoaded()) { /* // debug code to draw a cube in place of avatar @@ -599,22 +599,12 @@ void LLDrawPoolAvatar::renderForSelect() BOOL impostor = avatarp->isImpostor(); if (impostor) { - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PRIMARY_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); avatarp->renderImpostor(color); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); return; } @@ -623,8 +613,8 @@ void LLDrawPoolAvatar::renderForSelect() { gAvatarMatrixParam = sVertexProgram->mUniform[LLShaderMgr::AVATAR_MATRIX]; } - glAlphaFunc(GL_GEQUAL, 0.2f); - gGL.blendFunc(GL_ONE, GL_ZERO); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.2f); + gGL.setSceneBlendType(LLRender::BT_REPLACE); glColor4ubv(color.mV); @@ -645,11 +635,11 @@ void LLDrawPoolAvatar::renderForSelect() disable_vertex_weighting(sVertexProgram->mAttribute[LLShaderMgr::AVATAR_WEIGHT]); } - glAlphaFunc(GL_GREATER, 0.01f); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.setSceneBlendType(LLRender::BT_ALPHA); // restore texture mode - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } //----------------------------------------------------------------------------- diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 3f52021711..1dfaf6569e 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -41,7 +41,7 @@ #include "m4math.h" #include "v4math.h" #include "llglheaders.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llagent.h" #include "llcubemap.h" @@ -371,17 +371,8 @@ void LLDrawPoolBump::beginShiny(bool invisible) cube_map->setMatrix(0); cube_map->bind(); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - - //use RGB from texture - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - // use alpha from color - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PRIMARY_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_ALPHA); } } } @@ -443,15 +434,17 @@ void LLDrawPoolBump::endShiny(bool invisible) } shader->unbind(); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glEnable(GL_TEXTURE_2D); } - - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + if (cube_channel >= 0) + { + gGL.getTexUnit(cube_channel)->setTextureBlendType(LLTexUnit::TB_MULT); + } } LLImageGL::unbindTexture(0, GL_TEXTURE_2D); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); diffuse_channel = -1; cube_channel = 0; @@ -540,16 +533,16 @@ void LLDrawPoolBump::endFullbrightShiny() { shader->disableTexture(LLShaderMgr::DIFFUSE_MAP); } - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glEnable(GL_TEXTURE_2D); shader->unbind(); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } LLImageGL::unbindTexture(0, GL_TEXTURE_2D); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); diffuse_channel = -1; cube_channel = 0; @@ -614,6 +607,10 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params) if( tex ) { bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code ); + //------------------------------------------ + //error check to make sure bump is valid + llassert_always(!bump || bump->getNumRefs() == 1) ; + //------------------------------------------ } break; @@ -628,6 +625,11 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params) if (bump) { + //------------------------------------------ + //error check to make sure bump is valid + llassert_always(bump->getNumRefs() > 0 && bump->getNumRefs() < 100000) ; + //------------------------------------------ + bump->bind(1); bump->bind(0); return TRUE; @@ -650,37 +652,18 @@ void LLDrawPoolBump::beginBump() // TEXTURE UNIT 0 // Output.rgb = texture at texture coord 0 - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_ALPHA); - - // Don't care about alpha output - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); // TEXTURE UNIT 1 - glActiveTextureARB(GL_TEXTURE1_ARB); - + gGL.getTexUnit(1)->activate(); + glEnable(GL_TEXTURE_2D); // Texture unit 1 - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_ADD_SIGNED_ARB); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_ONE_MINUS_SRC_ALPHA); - - // Don't care about alpha output - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_ADD_SIGNED, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_ONE_MINUS_TEX_ALPHA); + gGL.getTexUnit(1)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); // src = tex0 + (1 - tex1) - 0.5 // = (bump0/2 + 0.5) + (1 - (bump1/2 + 0.5)) - 0.5 @@ -692,9 +675,8 @@ void LLDrawPoolBump::beginBump() // = 2 * ((1 + bump0 - bump1) / 2) * dst [0 - 2 * dst] // = (1 + bump0 - bump1) * dst.rgb // = dst.rgb + dst.rgb * (bump0 - bump1) - gGL.blendFunc(GL_DST_COLOR, GL_SRC_COLOR); -// gGL.blendFunc(GL_ONE, GL_ZERO); // temp - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.setSceneBlendType(LLRender::BT_MULT_X2); + gGL.getTexUnit(0)->activate(); stop_glerror(); LLViewerImage::unbindTexture(1, GL_TEXTURE_2D); @@ -728,15 +710,15 @@ void LLDrawPoolBump::endBump() } // Disable texture unit 1 - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glDisable(GL_TEXTURE_2D); // Texture unit 1 - glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT); // Disable texture unit 0 - glActiveTextureARB(GL_TEXTURE0_ARB); - glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->activate(); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); - gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } //////////////////////////////////////////////////////////////// @@ -890,9 +872,15 @@ LLImageGL* LLBumpImageList::getBrightnessDarknessImage(LLViewerImage* src_image, { LLPointer raw = new LLImageRaw(1,1,1); raw->clear(0x77, 0x77, 0x77, 0xFF); + + //------------------------------ bump = new LLImageGL( raw, TRUE); - bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); + //immediately assign bump to a global smart pointer in case some local smart pointer + //accidently releases it. (*entries_list)[src_image->getID()] = bump; + //------------------------------ + + bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); // Note: this may create an LLImageGL immediately src_image->setLoadedCallback( callback_func, 0, TRUE, new LLUUID(src_image->getID()) ); @@ -1047,10 +1035,15 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerImage *src_vi, LLIma } } + //--------------------------------------------------- LLImageGL* bump = new LLImageGL( TRUE); - bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); - bump->createGLTexture(0, dst_image); + //immediately assign bump to a global smart pointer in case some local smart pointer + //accidently releases it. iter->second = bump; // derefs (and deletes) old image + //--------------------------------------------------- + + bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); + bump->createGLTexture(0, dst_image); } else { @@ -1101,16 +1094,16 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) { if (mShiny) { - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glMatrixMode(GL_TEXTURE); } else { - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glMatrixMode(GL_TEXTURE); glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix); gPipeline.mTextureMatrixOps++; - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix); @@ -1153,13 +1146,13 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) { if (mShiny) { - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } else { - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glLoadIdentity(); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } glLoadIdentity(); glMatrixMode(GL_MODELVIEW); @@ -1172,9 +1165,9 @@ void LLDrawPoolInvisible::render(S32 pass) U32 invisi_mask = LLVertexBuffer::MAP_VERTEX; glStencilMask(0); - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + gGL.setColorMask(false, false); pushBatches(LLRenderPass::PASS_INVISIBLE, invisi_mask, FALSE); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); glStencilMask(0xFFFFFFFF); if (gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY)) diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index a2a82eada5..b534886047 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -41,7 +41,7 @@ #include "pipeline.h" #include "llspatialpartition.h" #include "llglslshader.h" -#include "llglimmediate.h" +#include "llrender.h" static LLGLSLShader* simple_shader = NULL; @@ -52,7 +52,7 @@ void LLDrawPoolGlow::render(S32 pass) LLFastTimer t(LLFastTimer::FTM_RENDER_GLOW); LLGLEnable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); - gGL.blendFunc(GL_ONE, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD); U32 shader_level = LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_OBJECT); @@ -66,11 +66,11 @@ void LLDrawPoolGlow::render(S32 pass) } LLGLDepthTest depth(GL_TRUE, GL_FALSE); - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); + gGL.setColorMask(false, true); renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask()); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setColorMask(true, false); + gGL.setSceneBlendType(LLRender::BT_ALPHA); if (shader_level > 0 && fullbright_shader) { @@ -120,7 +120,7 @@ void LLDrawPoolSimple::beginRenderPass(S32 pass) // don't use shaders! if (gGLManager.mHasShaderObjects) { - glUseProgramObjectARB(0); + LLGLSLShader::bindNoShader(); } } } @@ -140,7 +140,7 @@ void LLDrawPoolSimple::render(S32 pass) { LLGLDisable blend(GL_BLEND); LLGLState alpha_test(GL_ALPHA_TEST, gPipeline.canUseWindLightShadersOnObjects()); - glAlphaFunc(GL_GREATER, 0.5f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); { //render simple LLFastTimer t(LLFastTimer::FTM_RENDER_SIMPLE); @@ -152,7 +152,7 @@ void LLDrawPoolSimple::render(S32 pass) LLFastTimer t(LLFastTimer::FTM_RENDER_GRASS); LLGLEnable test(GL_ALPHA_TEST); LLGLEnable blend(GL_BLEND); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); //render grass LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask()); } @@ -172,6 +172,6 @@ void LLDrawPoolSimple::render(S32 pass) renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask); } - glAlphaFunc(GL_GREATER, 0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp index 828c9b0848..585af6c47f 100644 --- a/indra/newview/lldrawpoolsky.cpp +++ b/indra/newview/lldrawpoolsky.cpp @@ -90,7 +90,7 @@ void LLDrawPoolSky::render(S32 pass) { // Ironically, we must support shader objects to be // able to use this call. - glUseProgramObjectARB(0); + LLGLSLShader::bindNoShader(); } mShader = NULL; } diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index c60ddbc517..854067a32d 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -52,7 +52,7 @@ #include "llworld.h" #include "pipeline.h" #include "llglslshader.h" -#include "llglimmediate.h" +#include "llrender.h" const F32 DETAIL_SCALE = 1.f/16.f; int DebugDetailMap = 0; @@ -69,14 +69,16 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerImage *texturep) : sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale"); sDetailMode = gSavedSettings.getS32("RenderTerrainDetail"); mAlphaRampImagep = gImageList.getImageFromFile("alpha_gradient.tga", - TRUE, TRUE, GL_ALPHA8, GL_ALPHA, - LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb")); + TRUE, TRUE, GL_ALPHA8, GL_ALPHA, + LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb")); + mAlphaRampImagep->bind(0); mAlphaRampImagep->setClamp(TRUE, TRUE); m2DAlphaRampImagep = gImageList.getImageFromFile("alpha_gradient_2d.j2c", TRUE, TRUE, GL_ALPHA8, GL_ALPHA, LLUUID("38b86f85-2575-52a9-a531-23108d8da837")); + m2DAlphaRampImagep->bind(0); m2DAlphaRampImagep->setClamp(TRUE, TRUE); @@ -239,7 +241,7 @@ void LLDrawPoolTerrain::renderFullShader() // S32 detail0 = sShader->enableTexture(LLShaderMgr::TERRAIN_DETAIL0); LLViewerImage::bindTexture(detail_texture0p,detail0); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); @@ -259,7 +261,7 @@ void LLDrawPoolTerrain::renderFullShader() LLViewerImage::bindTexture(detail_texture1p,detail1); /// ALPHA TEXTURE COORDS 0: - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); @@ -271,7 +273,7 @@ void LLDrawPoolTerrain::renderFullShader() glEnable(GL_TEXTURE_2D); /// ALPHA TEXTURE COORDS 1: - glActiveTextureARB(GL_TEXTURE2_ARB); + gGL.getTexUnit(2)->activate(); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glTranslatef(-2.f, 0.f, 0.f); @@ -284,7 +286,7 @@ void LLDrawPoolTerrain::renderFullShader() LLViewerImage::bindTexture(detail_texture3p,detail3); /// ALPHA TEXTURE COORDS 2: - glActiveTextureARB(GL_TEXTURE3_ARB); + gGL.getTexUnit(3)->activate(); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glTranslatef(-1.f, 0.f, 0.f); @@ -307,7 +309,7 @@ void LLDrawPoolTerrain::renderFullShader() sShader->disableTexture(LLShaderMgr::TERRAIN_DETAIL3); LLImageGL::unbindTexture(alpha_ramp, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE4_ARB); + gGL.getTexUnit(4)->activate(); glDisable(GL_TEXTURE_2D); // Texture unit 4 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); @@ -316,7 +318,7 @@ void LLDrawPoolTerrain::renderFullShader() glMatrixMode(GL_MODELVIEW); LLImageGL::unbindTexture(detail3, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE3_ARB); + gGL.getTexUnit(3)->activate(); glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); @@ -325,7 +327,7 @@ void LLDrawPoolTerrain::renderFullShader() glMatrixMode(GL_MODELVIEW); LLImageGL::unbindTexture(detail2, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE2_ARB); + gGL.getTexUnit(2)->activate(); glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); @@ -334,7 +336,7 @@ void LLDrawPoolTerrain::renderFullShader() glMatrixMode(GL_MODELVIEW); LLImageGL::unbindTexture(detail1, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); @@ -346,7 +348,7 @@ void LLDrawPoolTerrain::renderFullShader() // Restore Texture Unit 0 defaults LLImageGL::unbindTexture(detail0, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glEnable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); @@ -377,7 +379,7 @@ void LLDrawPoolTerrain::renderFull4TU() tp0.setVec(sDetailScale, 0.0f, 0.0f, offset_x); tp1.setVec(0.0f, sDetailScale, 0.0f, offset_y); - gGL.blendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA); + gGL.blendFunc(LLRender::BF_ONE_MINUS_SOURCE_ALPHA, LLRender::BF_SOURCE_ALPHA); //---------------------------------------------------------------------------- // Pass 1/1 @@ -385,7 +387,7 @@ void LLDrawPoolTerrain::renderFull4TU() // // Stage 0: detail texture 0 // - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); LLViewerImage::bindTexture(detail_texture0p,0); glClientActiveTextureARB(GL_TEXTURE0_ARB); @@ -397,36 +399,27 @@ void LLDrawPoolTerrain::renderFull4TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_COLOR); // // Stage 1: Generate alpha ramp for detail0/detail1 transition // + LLViewerImage::bindTexture(m2DAlphaRampImagep,1); - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 1 glClientActiveTextureARB(GL_TEXTURE1_ARB); glEnableClientState(GL_TEXTURE_COORD_ARRAY); // Care about alpha only - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(1)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); // // Stage 2: Interpolate detail1 with existing based on ramp // LLViewerImage::bindTexture(detail_texture1p,2); - glActiveTextureARB(GL_TEXTURE2_ARB); + gGL.getTexUnit(2)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 2 glClientActiveTextureARB(GL_TEXTURE2_ARB); @@ -438,34 +431,20 @@ void LLDrawPoolTerrain::renderFull4TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_INTERPOLATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(2)->setTextureColorBlend(LLTexUnit::TBO_LERP_PREV_ALPHA, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_TEX_COLOR); // // Stage 3: Modulate with primary (vertex) color for lighting // LLViewerImage::bindTexture(detail_texture1p,3); // bind any texture - glActiveTextureARB(GL_TEXTURE3_ARB); + gGL.getTexUnit(3)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 3 glClientActiveTextureARB(GL_TEXTURE3_ARB); // Set alpha texture and do lighting modulation - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); + gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glClientActiveTextureARB(GL_TEXTURE0_ARB); // GL_BLEND disabled by default @@ -476,7 +455,7 @@ void LLDrawPoolTerrain::renderFull4TU() // Stage 0: Write detail3 into base // - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); LLViewerImage::bindTexture(detail_texture3p,0); glClientActiveTextureARB(GL_TEXTURE0_ARB); @@ -488,18 +467,13 @@ void LLDrawPoolTerrain::renderFull4TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_COLOR); // // Stage 1: Generate alpha ramp for detail2/detail3 transition // LLViewerImage::bindTexture(m2DAlphaRampImagep,1); - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 1 glClientActiveTextureARB(GL_TEXTURE1_ARB); @@ -511,25 +485,20 @@ void LLDrawPoolTerrain::renderFull4TU() glTranslatef(-2.f, 0.f, 0.f); // Care about alpha only - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(1)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); // // Stage 2: Interpolate detail2 with existing based on ramp // LLViewerImage::bindTexture(detail_texture2p,2); - glActiveTextureARB(GL_TEXTURE2_ARB); + gGL.getTexUnit(2)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 2 - glClientActiveTextureARB(GL_TEXTURE2_ARB); + glClientActiveTextureARB(GL_TEXTURE2_ARB); glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -537,26 +506,16 @@ void LLDrawPoolTerrain::renderFull4TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_INTERPOLATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, GL_ONE_MINUS_SRC_ALPHA); - + gGL.getTexUnit(2)->setTextureColorBlend(LLTexUnit::TBO_LERP_PREV_ALPHA, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR); // // Stage 3: Generate alpha ramp for detail1/detail2 transition // LLViewerImage::bindTexture(m2DAlphaRampImagep,3); - glActiveTextureARB(GL_TEXTURE3_ARB); - + gGL.getTexUnit(3)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 3 - glClientActiveTextureARB(GL_TEXTURE3_ARB); + glClientActiveTextureARB(GL_TEXTURE3_ARB); glEnableClientState(GL_TEXTURE_COORD_ARRAY); // Set the texture matrix @@ -565,18 +524,10 @@ void LLDrawPoolTerrain::renderFull4TU() glTranslatef(-1.f, 0.f, 0.f); // Set alpha texture and do lighting modulation - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); - - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR); + gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); + + gGL.getTexUnit(0)->activate(); glClientActiveTextureARB(GL_TEXTURE0_ARB); { LLGLEnable blend(GL_BLEND); @@ -586,19 +537,21 @@ void LLDrawPoolTerrain::renderFull4TU() LLVertexBuffer::unbind(); // Disable multitexture LLImageGL::unbindTexture(3, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE3_ARB); + gGL.getTexUnit(3)->activate(); glClientActiveTextureARB(GL_TEXTURE3_ARB); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisable(GL_TEXTURE_2D); // Texture unit 3 + glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); LLImageGL::unbindTexture(2, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE2_ARB); + gGL.getTexUnit(2)->activate(); glClientActiveTextureARB(GL_TEXTURE2_ARB); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisable(GL_TEXTURE_2D); // Texture unit 2 + glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); glMatrixMode(GL_TEXTURE); @@ -606,33 +559,34 @@ void LLDrawPoolTerrain::renderFull4TU() glMatrixMode(GL_MODELVIEW); LLImageGL::unbindTexture(1, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); - glClientActiveTextureARB(GL_TEXTURE1_ARB); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); + gGL.getTexUnit(1)->activate(); + glClientActiveTextureARB(GL_TEXTURE1_ARB); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisable(GL_TEXTURE_2D); // Texture unit 1 + glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); // Restore blend state - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); //---------------------------------------------------------------------------- // Restore Texture Unit 0 defaults - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); LLImageGL::unbindTexture(0, GL_TEXTURE_2D); glClientActiveTextureARB(GL_TEXTURE0_ARB); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); + glDisableClientState(GL_NORMAL_ARRAY); + glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); - // Restore non Texture Unit specific defaults - glDisableClientState(GL_NORMAL_ARRAY); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } void LLDrawPoolTerrain::renderFull2TU() @@ -654,7 +608,7 @@ void LLDrawPoolTerrain::renderFull2TU() tp0.setVec(sDetailScale, 0.0f, 0.0f, offset_x); tp1.setVec(0.0f, sDetailScale, 0.0f, offset_y); - gGL.blendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA); + gGL.blendFunc(LLRender::BF_ONE_MINUS_SOURCE_ALPHA, LLRender::BF_SOURCE_ALPHA); //---------------------------------------------------------------------------- // Pass 1/4 @@ -671,13 +625,7 @@ void LLDrawPoolTerrain::renderFull2TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR); drawLoop(); @@ -693,22 +641,17 @@ void LLDrawPoolTerrain::renderFull2TU() glDisable(GL_TEXTURE_GEN_T); // Care about alpha only - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); // // Stage 1: Write detail1 // LLViewerImage::bindTexture(detail_texture1p,1); // Texture unit 1 - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 1 + glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -716,18 +659,10 @@ void LLDrawPoolTerrain::renderFull2TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR); + gGL.getTexUnit(1)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_ALPHA); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); { LLGLEnable blend(GL_BLEND); drawLoop(); @@ -739,26 +674,21 @@ void LLDrawPoolTerrain::renderFull2TU() // Stage 0: Generate alpha ramp for detail1/detail2 transition // LLViewerImage::bindTexture(m2DAlphaRampImagep,0); + // Set the texture matrix glMatrixMode(GL_TEXTURE); glLoadIdentity(); glTranslatef(-1.f, 0.f, 0.f); // Care about alpha only - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); // // Stage 1: Write detail2 // - LLViewerImage::bindTexture(detail_texture2p,1); + gGL.getTexUnit(1)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 1 glEnable(GL_TEXTURE_GEN_S); @@ -768,16 +698,8 @@ void LLDrawPoolTerrain::renderFull2TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR); + gGL.getTexUnit(1)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_ALPHA); { LLGLEnable blend(GL_BLEND); @@ -790,27 +712,22 @@ void LLDrawPoolTerrain::renderFull2TU() // // Stage 0: Generate alpha ramp for detail2/detail3 transition // - LLViewerImage::bindTexture(m2DAlphaRampImagep,0); + gGL.getTexUnit(0)->activate(); + LLViewerImage::bindTexture(m2DAlphaRampImagep,0); // Set the texture matrix glMatrixMode(GL_TEXTURE); glLoadIdentity(); glTranslatef(-2.f, 0.f, 0.f); // Care about alpha only - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA); // Stage 1: Write detail3 - LLViewerImage::bindTexture(detail_texture3p,1); - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 1 + glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -818,30 +735,24 @@ void LLDrawPoolTerrain::renderFull2TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR); + gGL.getTexUnit(1)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_ALPHA); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); { LLGLEnable blend(GL_BLEND); drawLoop(); } // Restore blend state - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); // Disable multitexture + LLImageGL::unbindTexture(1, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glDisable(GL_TEXTURE_2D); // Texture unit 1 + glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); glMatrixMode(GL_TEXTURE); @@ -851,18 +762,16 @@ void LLDrawPoolTerrain::renderFull2TU() //---------------------------------------------------------------------------- // Restore Texture Unit 0 defaults - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); LLImageGL::unbindTexture(0, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); - - // Restore non Texture Unit specific defaults - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } @@ -877,7 +786,7 @@ void LLDrawPoolTerrain::renderSimple() mTexturep->addTextureStats(1024.f*1024.f); mTexturep->bind(0); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 2 LLVector3 origin_agent = mDrawFace[0]->getDrawable()->getVObj()->getRegion()->getOriginAgent(); @@ -892,13 +801,7 @@ void LLDrawPoolTerrain::renderSimple() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR); drawLoop(); @@ -906,15 +809,13 @@ void LLDrawPoolTerrain::renderSimple() // Restore Texture Unit 0 defaults LLImageGL::unbindTexture(0, GL_TEXTURE_2D); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); - - // Restore non Texture Unit specific defaults - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } //============================================================================ diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index eabc0f1268..1ebd0772a8 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -41,7 +41,7 @@ #include "pipeline.h" #include "llviewercamera.h" #include "llglslshader.h" -#include "llglimmediate.h" +#include "llrender.h" S32 LLDrawPoolTree::sDiffTex = 0; static LLGLSLShader* shader = NULL; @@ -67,7 +67,7 @@ void LLDrawPoolTree::prerender() void LLDrawPoolTree::beginRenderPass(S32 pass) { LLFastTimer t(LLFastTimer::FTM_RENDER_TREES); - glAlphaFunc(GL_GREATER, 0.5f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); if (LLPipeline::sUnderWaterRender) { @@ -106,7 +106,7 @@ void LLDrawPoolTree::render(S32 pass) void LLDrawPoolTree::endRenderPass(S32 pass) { LLFastTimer t(LLFastTimer::FTM_RENDER_TREES); - glAlphaFunc(GL_GREATER, 0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); if (gPipeline.canUseWindLightShadersOnObjects()) { @@ -125,28 +125,18 @@ void LLDrawPoolTree::renderForSelect() LLGLSObjectSelectAlpha gls_alpha; - gGL.blendFunc(GL_ONE, GL_ZERO); - glAlphaFunc(GL_GREATER, 0.5f); + gGL.setSceneBlendType(LLRender::BT_REPLACE); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); renderTree(TRUE); - glAlphaFunc(GL_GREATER, 0.01f); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.setSceneBlendType(LLRender::BT_ALPHA); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } void LLDrawPoolTree::renderTree(BOOL selecting) diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 9ffa552895..e76423c8eb 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -37,6 +37,7 @@ #include "lldir.h" #include "llerror.h" #include "m3math.h" +#include "llrender.h" #include "llagent.h" // for gAgent for getRegion for getWaterHeight #include "llcubemap.h" @@ -166,7 +167,7 @@ void LLDrawPoolWater::render(S32 pass) // Set up second pass first mWaterImagep->addTextureStats(1024.f*1024.f); mWaterImagep->bind(1); - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glEnable(GL_TEXTURE_2D); // Texture unit 1 @@ -198,18 +199,10 @@ void LLDrawPoolWater::render(S32 pass) glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_MODULATE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(1)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_ALPHA); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); - - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glClearStencil(1); glClear(GL_STENCIL_BUFFER_BIT); @@ -230,14 +223,14 @@ void LLDrawPoolWater::render(S32 pass) } // Now, disable texture coord generation on texture state 1 - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glDisable(GL_TEXTURE_2D); // Texture unit 1 glDisable(GL_TEXTURE_GEN_S); //texture unit 1 glDisable(GL_TEXTURE_GEN_T); //texture unit 1 LLImageGL::unbindTexture(1, GL_TEXTURE_2D); // Disable texture coordinate and color arrays - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); LLImageGL::unbindTexture(0, GL_TEXTURE_2D); stop_glerror(); @@ -258,7 +251,7 @@ void LLDrawPoolWater::render(S32 pass) glMatrixMode(GL_MODELVIEW); LLOverrideFaceColor overrid(this, 1.f, 1.f, 1.f, 0.5f*up_dot); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); for (std::vector::iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++) @@ -276,7 +269,7 @@ void LLDrawPoolWater::render(S32 pass) } } - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); if (gSky.mVOSkyp->getCubeMap()) { @@ -298,7 +291,7 @@ void LLDrawPoolWater::render(S32 pass) renderReflection(refl_face); } - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } void LLDrawPoolWater::renderReflection(LLFace* face) @@ -331,7 +324,7 @@ void LLDrawPoolWater::renderReflection(LLFace* face) void LLDrawPoolWater::shade() { - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + gGL.setColorMask(true, true); LLVOSky *voskyp = gSky.mVOSkyp; @@ -396,9 +389,9 @@ void LLDrawPoolWater::shade() if (reftex > -1) { - glActiveTextureARB(GL_TEXTURE0_ARB+reftex); + gGL.getTexUnit(reftex)->activate(); gPipeline.mWaterRef.bindTexture(); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); } //bind normal map @@ -414,14 +407,8 @@ void LLDrawPoolWater::shade() mWaterNormp->addTextureStats(1024.f*1024.f); mWaterNormp->bind(bumpTex); - if (!gSavedSettings.getBOOL("RenderWaterMipNormal")) - { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - } - else - { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - } + mWaterNormp->setMipFilterNearest (mWaterNormp->getMipFilterNearest(), + !gSavedSettings.getBOOL("RenderWaterMipNormal")); S32 screentex = shader->enableTexture(LLShaderMgr::WATER_SCREENTEX); stop_glerror(); @@ -548,9 +535,9 @@ void LLDrawPoolWater::shade() shader->disableTexture(LLShaderMgr::WATER_SCREENDEPTH); shader->unbind(); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glEnable(GL_TEXTURE_2D); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_FALSE); + gGL.setColorMask(true, false); } diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index e2d0c6088a..09a87f2402 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -44,7 +44,7 @@ #include "llagent.h" #include "llviewerregion.h" #include "llface.h" -#include "llglimmediate.h" +#include "llrender.h" LLPointer LLDrawPoolWLSky::sCloudNoiseTexture = NULL; @@ -153,7 +153,7 @@ void LLDrawPoolWLSky::renderStars(void) const { LLGLSPipelineSkyBox gls_sky; LLGLEnable blend(GL_BLEND); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); // *NOTE: have to have bound the cloud noise texture already since register // combiners blending below requires something to be bound @@ -176,16 +176,8 @@ void LLDrawPoolWLSky::renderStars(void) const // gl_FragColor.rgb = gl_Color.rgb; // gl_FragColor.a = gl_Color.a * star_alpha.a; - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_PREVIOUS); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_CONSTANT); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA); - glTexEnvf(GL_TEXTURE_ENV, GL_ALPHA_SCALE, 2.0f); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_PREV_ALPHA, LLTexUnit::TBS_CONST_ALPHA); glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, star_alpha.mV); gSky.mVOWLSkyp->drawStars(); @@ -193,8 +185,7 @@ void LLDrawPoolWLSky::renderStars(void) const glPointSize(1.f); // and disable the combiner states - glTexEnvf(GL_TEXTURE_ENV, GL_ALPHA_SCALE, 1.0f); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const @@ -208,7 +199,7 @@ void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const LLGLEnable blend(GL_BLEND); LLGLSBlendFunc blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glAlphaFunc(GL_GREATER, 0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); sCloudNoiseTexture->bind(); shader->bind(); diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 7b88349ef4..039ed2862f 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -40,9 +40,7 @@ #include "llviewerimage.h" #include "llvertexbuffer.h" #include "llviewerdisplay.h" -#include "llglimmediate.h" - -void render_ui_and_swap_if_needed(); +#include "llrender.h" // static LLDynamicTexture::instance_list_t LLDynamicTexture::sInstances[ LLDynamicTexture::ORDER_COUNT ]; @@ -219,9 +217,8 @@ BOOL LLDynamicTexture::updateAllInstances() LLDynamicTexture *dynamicTexture = *iter; if (dynamicTexture->needsRender()) { - render_ui_and_swap_if_needed(); glClear(GL_DEPTH_BUFFER_BIT); - gDisplaySwapBuffers = FALSE; + gDepthDirty = TRUE; gGL.color4f(1,1,1,1); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 723477a833..8474762d9b 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -42,7 +42,7 @@ #include "lldrawpoolbump.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "lllightconstants.h" #include "llsky.h" #include "llviewercamera.h" @@ -57,6 +57,7 @@ extern BOOL gPickFaces; BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE +S32 LLFace::sDeleteLock = 0 ; #define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2]) @@ -177,6 +178,9 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) void LLFace::destroy() { + llassert_always(sDeleteLock >= 1); + --sDeleteLock; + mDrawablep = NULL; mVObjp = NULL; @@ -468,6 +472,7 @@ void LLFace::renderSelectedUV(const S32 offset, const S32 count) if (pass == 0) { LLViewerImage::bindTexture(red_blue_imagep); + red_blue_imagep->setMipFilterNearest (TRUE, TRUE); } else // pass == 1 { @@ -476,9 +481,8 @@ void LLFace::renderSelectedUV(const S32 offset, const S32 count) glMatrixMode(GL_TEXTURE); glPushMatrix(); glScalef(256.f, 256.f, 1.f); + green_imagep->setMipFilterNearest (TRUE, TRUE); } - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); if (!isState(GLOBAL)) diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 070283ecd2..34c81c3fdd 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -34,6 +34,7 @@ #include "llstrider.h" +#include "llrender.h" #include "v2math.h" #include "v3math.h" #include "v4math.h" @@ -295,6 +296,9 @@ public: lhs->getTexture() < rhs->getTexture(); } }; + +public://paranoia check only + static S32 sDeleteLock ; }; #endif // LL_LLFACE_H diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 8133c20bf7..ad89d8220f 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -37,7 +37,7 @@ #include "llrect.h" #include "llerror.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llmath.h" #include "llfontgl.h" diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index c07319e224..3cd1158ec0 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -37,6 +37,7 @@ #include "indra_constants.h" // viewer includes +#include "llagent.h" // for gAgent.inPrelude() #include "llnotify.h" #include "llviewercontrol.h" #include "llui.h" @@ -107,12 +108,14 @@ void LLFirstUse::useBalanceDecrease(S32 delta) // static void LLFirstUse::useSit() { - if (gSavedSettings.getWarning("FirstSit")) - { - gSavedSettings.setWarning("FirstSit", FALSE); - - LLNotifyBox::showXml("FirstSit"); - } + // Our orientation island uses sitting to teach vehicle driving + // so just never show this message. JC + //if (gSavedSettings.getWarning("FirstSit")) + //{ + // gSavedSettings.setWarning("FirstSit", FALSE); + + // LLNotifyBox::showXml("FirstSit"); + //} } // static @@ -168,11 +171,16 @@ void LLFirstUse::useTeleport() // static void LLFirstUse::useOverrideKeys() { - if (gSavedSettings.getWarning("FirstOverrideKeys")) + // Our orientation island uses key overrides to teach vehicle driving + // so don't show this message until you get off OI. JC + if (!gAgent.inPrelude()) { - gSavedSettings.setWarning("FirstOverrideKeys", FALSE); + if (gSavedSettings.getWarning("FirstOverrideKeys")) + { + gSavedSettings.setWarning("FirstOverrideKeys", FALSE); - LLNotifyBox::showXml("FirstOverrideKeys"); + LLNotifyBox::showXml("FirstOverrideKeys"); + } } } diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 248e680c1b..b59648f433 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -305,7 +305,7 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 new_res = mRenderRes; } - if (!mInitialized) + if (!mInitialized || (mSimulateRes != new_res)) { mSimulateRes = new_res; setAttributesOfAllSections(); diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index d9411b58d8..1e0ebb7248 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -46,7 +46,7 @@ #include "llcombobox.h" #include "lldrawable.h" #include "lldrawpoolavatar.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llface.h" #include "llkeyframemotion.h" #include "lllineeditor.h" @@ -1037,7 +1037,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture mDummyAvatar = (LLVOAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion()); mDummyAvatar->createDrawable(&gPipeline); mDummyAvatar->mIsDummy = TRUE; - mDummyAvatar->mSpecialRenderMode = 1; + mDummyAvatar->mSpecialRenderMode = 2; mDummyAvatar->setPositionAgent(LLVector3::zero); mDummyAvatar->slamPosition(); mDummyAvatar->updateJointLODs(); @@ -1135,6 +1135,7 @@ BOOL LLPreviewAnimation::render() if (avatarp->mDrawable.notNull()) { LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool(); + avatarp->dirtyMesh(); avatarPoolp->renderAvatars(avatarp); // renders only one avatar } diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 33925fa305..41bc0db6a6 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -53,7 +53,7 @@ #include "llviewerdisplay.h" #include "llviewercontrol.h" #include "llui.h" -#include "llglimmediate.h" +#include "llrender.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 9741fbb7c7..1ab42efef3 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -375,7 +375,7 @@ void LLFloaterBuyCurrency::buyCurrency(const std::string& name, S32 price) { LLStringBase::format_map_t args; args["[NAME]"] = name.c_str(); - args["[PRICE]"] = price; + args["[PRICE]"] = llformat("%d", price); gViewerWindow->alertXml("NotEnoughCurrency", args); return; } diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 4d8f85159f..936aad6606 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -62,7 +62,7 @@ #include "llwindow.h" #include "llworld.h" #include "llxmlrpctransaction.h" -#include "llappviewer.h" +#include "llviewernetwork.h" #include "roles_constants.h" // NOTE: This is duplicated in lldatamoney.cpp ... @@ -841,7 +841,7 @@ void LLFloaterBuyLandUI::startTransaction(TransactionType type, static std::string transaction_uri; if (transaction_uri.empty()) { - transaction_uri = LLAppViewer::instance()->getHelperURI() + "landtool.php"; + transaction_uri = LLViewerLogin::getInstance()->getHelperURI() + "landtool.php"; } const char* method; @@ -1363,3 +1363,4 @@ void LLFloaterBuyLandUI::onClickErrorWeb(void* data) } + diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 3aaa14ab73..fd428990f8 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -207,7 +207,8 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LL { line = line.substr(chat.mFromName.length()); const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID); - edit->appendStyledText(chat.mFromName, false, false, &sourceStyle); + edit->appendStyledText(chat.mFromName, false, prepend_newline, &sourceStyle); + prepend_newline = false; } edit->appendColoredText(line, false, prepend_newline, color); } diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 5f6bf1cd28..ec659b5146 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -39,7 +39,7 @@ #include "llfontgl.h" #include "llsys.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "v3dmath.h" #include "lldir.h" #include "llui.h" diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 790af61264..830b38faf8 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -43,7 +43,7 @@ #include "llcombobox.h" #include "lldrawable.h" #include "lldrawpoolavatar.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llface.h" #include "lltextbox.h" #include "lltoolmgr.h" diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 9ff5739255..925ba0156d 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1147,7 +1147,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes() { LLString::format_map_t args; - args["[TEXTURE_NUM]"] = i+1; + args["[TEXTURE_NUM]"] = llformat("%d",i+1); args["[TEXTURE_SIZE_X]"] = llformat("%d",width); args["[TEXTURE_SIZE_Y]"] = llformat("%d",height); gViewerWindow->alertXml("InvalidTerrainSize", args); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 25b8abefc7..369ac4f3ee 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -81,7 +81,7 @@ #include "llselectmgr.h" #include "llviewerbuild.h" #include "lluictrlfactory.h" -#include "llappviewer.h" +#include "llviewernetwork.h" #include "llassetuploadresponders.h" @@ -656,7 +656,7 @@ LLSD LLFloaterReporter::gatherReport() mCopyrightWarningSeen = FALSE; std::ostringstream summary; - if (!LLAppViewer::instance()->isInProductionGrid()) + if (!LLViewerLogin::getInstance()->isInProductionGrid()) { summary << "Preview "; } @@ -898,7 +898,7 @@ void LLFloaterReporter::takeScreenshot() mResourceDatap->mAssetInfo.mType); // store in the image list so it doesn't try to fetch from the server - LLViewerImage* image_in_list = new LLViewerImage(mResourceDatap->mAssetInfo.mUuid, TRUE); + LLPointer image_in_list = new LLViewerImage(mResourceDatap->mAssetInfo.mUuid, TRUE); image_in_list->createGLTexture(0, raw); gImageList.addImage(image_in_list); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index b2301808a1..7dd4f293c4 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -36,7 +36,7 @@ #include "llfontgl.h" #include "llsys.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "v3dmath.h" #include "llmath.h" #include "lldir.h" diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 6b51687c68..af3321c814 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -215,7 +215,7 @@ LLFloaterTOS::~LLFloaterTOS() LLWebBrowserCtrl* web_browser = getChild("tos_html"); if ( web_browser ) { - web_browser->addObserver( this ); + web_browser->remObserver( this ); }; // tell the responder we're not here anymore diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 848d01d5ac..401cc9fc6c 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -871,6 +871,8 @@ void LLFloaterWorldMap::buildLandmarkIDLists() { list->selectItemRange(1, -1); list->operateOnSelection(LLCtrlListInterface::OP_DELETE); + + llassert_always(list->getItemCount() == 1) ; } mLandmarkItemIDList.reset(); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index c26a8dfc55..a514d9b997 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -40,7 +40,7 @@ #include "llfocusmgr.h" #include "llfontgl.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llinventory.h" #include "llcallbacklist.h" @@ -349,10 +349,10 @@ void LLFolderViewItem::arrangeFromRoot() // UI. If open is TRUE, then folders are opened up along the way to // the selection. void LLFolderViewItem::setSelectionFromRoot(LLFolderViewItem* selection, - BOOL open, /* Flawfinder: ignore */ + BOOL openitem, BOOL take_keyboard_focus) { - getRoot()->setSelection(selection, open, take_keyboard_focus); /* Flawfinder: ignore */ + getRoot()->setSelection(selection, openitem, take_keyboard_focus); } // helper function to change the selection from the root. @@ -368,7 +368,7 @@ void LLFolderViewItem::extendSelectionFromRoot(LLFolderViewItem* selection) getRoot()->extendSelection(selection, NULL, selected_items); } -EInventorySortGroup LLFolderViewItem::getSortGroup() +EInventorySortGroup LLFolderViewItem::getSortGroup() const { return SG_ITEM; } @@ -442,7 +442,7 @@ void LLFolderViewItem::dirtyFilter() // means 'deselect' for a leaf item. Do this optimization after // multiple selection is implemented to make sure it all plays nice // together. -BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL open, BOOL take_keyboard_focus) +BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus) { if( selection == this ) { @@ -548,7 +548,7 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags) } } -void LLFolderViewItem::open( void ) /* Flawfinder: ignore */ +void LLFolderViewItem::openItem( void ) { if( mListener ) { @@ -989,9 +989,6 @@ LLFolderViewFolder::LLFolderViewFolder( const LLString& name, LLUIImagePtr icon, mMostFilteredDescendantGeneration(-1) { mType = "(folder)"; - - //mItems.setInsertBefore( &sort_item_name ); - //mFolders.setInsertBefore( &folder_insert_before ); } // Destroys the object @@ -1000,10 +997,6 @@ LLFolderViewFolder::~LLFolderViewFolder( void ) // The LLView base class takes care of object destruction. make sure that we // don't have mouse or keyboard focus gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() - - //mItems.reset(); - //mItems.removeAllNodes(); - //mFolders.removeAllNodes(); } // addToFolder() returns TRUE if it succeeds. FALSE otherwise @@ -1048,9 +1041,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation) // Add sizes of children S32 parent_item_height = getRect().getHeight(); - folders_t::iterator fit = mFolders.begin(); - folders_t::iterator fend = mFolders.end(); - for(; fit < fend; ++fit) + for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit) { LLFolderViewFolder* folderp = (*fit); if (getRoot()->getDebugFilters()) @@ -1076,9 +1067,8 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation) folderp->setOrigin( 0, child_top - folderp->getRect().getHeight() ); } } - items_t::iterator iit = mItems.begin(); - items_t::iterator iend = mItems.end(); - for(;iit < iend; ++iit) + for(items_t::iterator iit = mItems.begin(); + iit != mItems.end(); ++iit) { LLFolderViewItem* itemp = (*iit); if (getRoot()->getDebugFilters()) @@ -1354,7 +1344,7 @@ BOOL LLFolderViewFolder::hasFilteredDescendants() // Passes selection information on to children and record selection // information if necessary. -BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL open, /* Flawfinder: ignore */ +BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus) { BOOL rv = FALSE; @@ -1378,7 +1368,7 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL open, / iter != mFolders.end();) { folders_t::iterator fit = iter++; - if((*fit)->setSelection(selection, open, take_keyboard_focus)) /* Flawfinder: ignore */ + if((*fit)->setSelection(selection, openitem, take_keyboard_focus)) { rv = TRUE; child_selected = TRUE; @@ -1389,14 +1379,14 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL open, / iter != mItems.end();) { items_t::iterator iit = iter++; - if((*iit)->setSelection(selection, open, take_keyboard_focus)) /* Flawfinder: ignore */ + if((*iit)->setSelection(selection, openitem, take_keyboard_focus)) { rv = TRUE; child_selected = TRUE; mNumDescendantsSelected++; } } - if(open && child_selected) /* Flawfinder: ignore */ + if(openitem && child_selected) { setOpenArrangeRecursively(TRUE); } @@ -1636,11 +1626,9 @@ void LLFolderViewFolder::destroyView() while (!mFolders.empty()) { LLFolderViewFolder *folderp = mFolders.back(); - folderp->destroyView(); + folderp->destroyView(); // removes entry from mFolders } - mFolders.clear(); - deleteAllChildren(); if (mParentFolder) @@ -1711,11 +1699,11 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) // This is only called for renaming an object because it won't work for date void LLFolderViewFolder::resort(LLFolderViewItem* item) { - std::sort(mItems.begin(), mItems.end(), mSortFunction); - std::sort(mFolders.begin(), mFolders.end(), mSortFunction); + mItems.sort(mSortFunction); + mFolders.sort(mSortFunction); } -bool LLFolderViewFolder::isTrash() +bool LLFolderViewFolder::isTrash() const { if (mAmTrash == LLFolderViewFolder::UNKNOWN) { @@ -1740,8 +1728,8 @@ void LLFolderViewFolder::sortBy(U32 order) (*fit)->sortBy(order); } - std::sort(mFolders.begin(), mFolders.end(), mSortFunction); - std::sort(mItems.begin(), mItems.end(), mSortFunction); + mFolders.sort(mSortFunction); + mItems.sort(mSortFunction); if (order & LLInventoryFilter::SO_DATE) { @@ -1776,12 +1764,12 @@ void LLFolderViewFolder::setItemSortOrder(U32 ordering) (*fit)->setItemSortOrder(ordering); } - std::sort(mFolders.begin(), mFolders.end(), mSortFunction); - std::sort(mItems.begin(), mItems.end(), mSortFunction); + mFolders.sort(mSortFunction); + mItems.sort(mSortFunction); } } -EInventorySortGroup LLFolderViewFolder::getSortGroup() +EInventorySortGroup LLFolderViewFolder::getSortGroup() const { if (isTrash()) { @@ -1928,16 +1916,16 @@ void LLFolderViewFolder::toggleOpen() } // Force a folder open or closed -void LLFolderViewFolder::setOpen(BOOL open) /* Flawfinder: ignore */ +void LLFolderViewFolder::setOpen(BOOL openitem) { - setOpenArrangeRecursively(open); /* Flawfinder: ignore */ + setOpenArrangeRecursively(openitem); } -void LLFolderViewFolder::setOpenArrangeRecursively(BOOL open, ERecurseType recurse) /* Flawfinder: ignore */ +void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse) { BOOL was_open = mIsOpen; - mIsOpen = open; /* Flawfinder: ignore */ - if(!was_open && open) /* Flawfinder: ignore */ + mIsOpen = openitem; + if(!was_open && openitem) { if(mListener) { @@ -1951,12 +1939,12 @@ void LLFolderViewFolder::setOpenArrangeRecursively(BOOL open, ERecurseType recur iter != mFolders.end();) { folders_t::iterator fit = iter++; - (*fit)->setOpenArrangeRecursively(open, RECURSE_DOWN); /* Flawfinder: ignore */ + (*fit)->setOpenArrangeRecursively(openitem, RECURSE_DOWN); /* Flawfinder: ignore */ } } if (mParentFolder && (recurse == RECURSE_UP || recurse == RECURSE_UP_DOWN)) { - mParentFolder->setOpenArrangeRecursively(open, RECURSE_UP); /* Flawfinder: ignore */ + mParentFolder->setOpenArrangeRecursively(openitem, RECURSE_UP); } if (was_open != mIsOpen) @@ -1989,7 +1977,7 @@ BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask, return TRUE; } -void LLFolderViewFolder::open( void ) /* Flawfinder: ignore */ +void LLFolderViewFolder::openItem( void ) { toggleOpen(); } @@ -2687,10 +2675,10 @@ void LLFolderView::openFolder(const LLString& foldername) } } -void LLFolderView::setOpenArrangeRecursively(BOOL open, ERecurseType recurse) /* Flawfinder: ignore */ +void LLFolderView::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse) { // call base class to do proper recursion - LLFolderViewFolder::setOpenArrangeRecursively(open, recurse); /* Flawfinder: ignore */ + LLFolderViewFolder::setOpenArrangeRecursively(openitem, recurse); // make sure root folder is always open mIsOpen = TRUE; } @@ -2866,7 +2854,7 @@ LLFolderViewItem* LLFolderView::getCurSelectedItem( void ) // Record the selected item and pass it down the hierachy. -BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL open, /* Flawfinder: ignore */ +BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus) { if( selection == this ) @@ -2888,8 +2876,8 @@ BOOL LLFolderView::setSelection(LLFolderViewItem* selection, BOOL open, /* Flaw addToSelectionList(selection); } - BOOL rv = LLFolderViewFolder::setSelection(selection, open, take_keyboard_focus); - if(open && selection) + BOOL rv = LLFolderViewFolder::setSelection(selection, openitem, take_keyboard_focus); + if(openitem && selection) { selection->getParentFolder()->requestArrange(); } @@ -3349,7 +3337,7 @@ void LLFolderView::openSelectedItems( void ) { if (mSelectedItems.size() == 1) { - mSelectedItems.front()->open(); /* Flawfinder: ignore */ + mSelectedItems.front()->openItem(); } else { @@ -3371,7 +3359,7 @@ void LLFolderView::openSelectedItems( void ) LLFloater::setFloaterHost(multi_propertiesp); else LLFloater::setFloaterHost(multi_previewp); - (*item_it)->open(); + (*item_it)->openItem(); } LLFloater::setFloaterHost(NULL); @@ -4358,7 +4346,7 @@ bool LLInventorySort::updateSort(U32 order) return false; } -bool LLInventorySort::operator()(LLFolderViewItem* a, LLFolderViewItem* b) +bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b) { // We sort by name if we aren't sorting by date // OR if these are folders and we are sorting folders by name. diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 8a04cc9b9c..c6b1e52157 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -295,7 +295,7 @@ public: bool updateSort(U32 order); U32 getSort() { return mSortOrder; } - bool operator()(LLFolderViewItem* a, LLFolderViewItem* b); + bool operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b); private: U32 mSortOrder; bool mByDate; @@ -361,7 +361,7 @@ protected: // the specified selected item appropriately for display and use // in the UI. If open is TRUE, then folders are opened up along // the way to the selection. - void setSelectionFromRoot(LLFolderViewItem* selection, BOOL open, /* Flawfinder: ignore */ + void setSelectionFromRoot(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus = TRUE); // helper function to change the selection from the root. @@ -390,7 +390,7 @@ public: enum { ARRANGE = TRUE, DO_NOT_ARRANGE = FALSE }; virtual BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root); - virtual EInventorySortGroup getSortGroup(); + virtual EInventorySortGroup getSortGroup() const; // Finds width and height of this object and it's children. Also // makes sure that this view and it's children are the right size. @@ -409,7 +409,7 @@ public: // ignore. Returns TRUE if this object was affected. If open is // TRUE, then folders are opened up along the way to the // selection. - virtual BOOL setSelection(LLFolderViewItem* selection, BOOL open, /* Flawfinder: ignore */ + virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); // This method is used to toggle the selection of an item. If @@ -479,7 +479,7 @@ public: void rename(const LLString& new_name); // open - virtual void open( void ); /* Flawfinder: ignore */ + virtual void openItem( void ); virtual void preview(void); // Show children (unfortunate that this is called "open") @@ -544,8 +544,8 @@ public: } ETrash; protected: - typedef std::vector items_t; - typedef std::vector folders_t; + typedef std::list items_t; + typedef std::list folders_t; items_t mItems; folders_t mFolders; LLInventorySort mSortFunction; @@ -556,7 +556,7 @@ protected: F32 mTargetHeight; F32 mAutoOpenCountdown; time_t mSubtreeCreationDate; - ETrash mAmTrash; + mutable ETrash mAmTrash; S32 mLastArrangeGeneration; S32 mLastCalculatedWidth; S32 mCompletedFilterGeneration; @@ -590,7 +590,7 @@ public: BOOL needsArrange(); // Returns the sort group (system, trash, folder) for this folder. - virtual EInventorySortGroup getSortGroup(); + virtual EInventorySortGroup getSortGroup() const; virtual void setCompletedFilterGeneration(S32 generation, BOOL recurse_up); virtual S32 getCompletedFilterGeneration() { return mCompletedFilterGeneration; } @@ -606,8 +606,8 @@ public: // Passes selection information on to children and record // selection information if necessary. Returns TRUE if this object // (or a child) was affected. - virtual BOOL setSelection(LLFolderViewItem* selection, BOOL open, /* Flawfinder: ignore */ - BOOL take_keyboard_focus); + virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, + BOOL take_keyboard_focus); // This method is used to change the selection of an item. If // selection is 'this', then note selection as true. Returns TRUE @@ -660,7 +660,7 @@ public: virtual void toggleOpen(); // Force a folder open or closed - virtual void setOpen(BOOL open = TRUE); /* Flawfinder: ignore */ + virtual void setOpen(BOOL openitem = TRUE); // Called when a child is refreshed. // don't rearrange child folder contents unless explicitly requested @@ -670,7 +670,7 @@ public: // method was written because the list iterators destroy the state // of other iterations, thus, we can't arrange while iterating // through the children (such as when setting which is selected. - virtual void setOpenArrangeRecursively(BOOL open, ERecurseType recurse = RECURSE_NO); /* Flawfinder: ignore */ + virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse = RECURSE_NO); // Get the current state of the folder. virtual BOOL isOpen() { return mIsOpen; } @@ -686,7 +686,7 @@ public: void applyFunctorRecursively(LLFolderViewFunctor& functor); virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor); - virtual void open( void ); /* Flawfinder: ignore */ + virtual void openItem( void ); virtual BOOL addItem(LLFolderViewItem* item); virtual BOOL addFolder( LLFolderViewFolder* folder); @@ -703,7 +703,7 @@ public: virtual void draw(); time_t getCreationDate() const; - bool isTrash(); + bool isTrash() const; }; @@ -752,7 +752,7 @@ public: void openFolder(const LLString& foldername); virtual void toggleOpen() {}; - virtual void setOpenArrangeRecursively(BOOL open, ERecurseType recurse); /* Flawfinder: ignore */ + virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse); virtual BOOL addFolder( LLFolderViewFolder* folder); // Finds width and height of this object and it's children. Also @@ -769,7 +769,7 @@ public: virtual LLFolderViewItem* getCurSelectedItem( void ); // Record the selected item and pass it down the hierachy. - virtual BOOL setSelection(LLFolderViewItem* selection, BOOL open, /* Flawfinder: ignore */ + virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus); // This method is used to toggle the selection of an item. Walks diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 21b98d6038..f4ef00d310 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -39,7 +39,7 @@ #include "llviewercontrol.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llglheaders.h" #include "llparcel.h" #include "llui.h" diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index f48a404a61..432096e781 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -33,7 +33,7 @@ #include "llhudeffectlookat.h" -#include "llglimmediate.h" +#include "llrender.h" #include "message.h" #include "llagent.h" diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index 72fe1b2e08..93344db622 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -34,7 +34,7 @@ #include "llhudeffectpointat.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llagent.h" #include "lldrawable.h" diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp index cbb9fb8619..4cfd556ead 100644 --- a/indra/newview/llhudicon.cpp +++ b/indra/newview/llhudicon.cpp @@ -34,7 +34,7 @@ #include "llhudicon.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llviewerobject.h" #include "lldrawable.h" diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 2529010857..df03f8d45e 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -33,7 +33,7 @@ #include "llhudtext.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llagent.h" #include "llviewercontrol.h" @@ -308,7 +308,6 @@ void LLHUDText::renderText(BOOL for_select) } LLUI::popMatrix(); - LLImageGL::unbindTexture(0); LLGLDepthTest gls_depth(mZCompare ? GL_TRUE : GL_FALSE, GL_FALSE); @@ -375,7 +374,7 @@ void LLHUDText::renderText(BOOL for_select) // Render label { - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); for(std::vector::iterator segment_iter = mLabelSegments.begin(); segment_iter != mLabelSegments.end(); ++segment_iter ) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index e58db2988f..ebcbc20270 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1488,14 +1488,15 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. if (!strcmp(name,SYSTEM_FROM)) { - mHistoryEditor->appendColoredText(name,false,false,color); + mHistoryEditor->appendColoredText(name,false,prepend_newline,color); } else { // Convert the name to a hotlink and add to message. const LLStyleSP &source_style = LLStyleMap::instance().lookup(source); - mHistoryEditor->appendStyledText(name, false, false, &source_style); + mHistoryEditor->appendStyledText(name,false,prepend_newline,&source_style); } + prepend_newline = false; } mHistoryEditor->appendColoredText(utf8msg, false, prepend_newline, color); diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index e9d5bfddd2..8a685d5479 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -36,7 +36,7 @@ // Library includes #include "llcoord.h" #include "indra_constants.h" -#include "llglimmediate.h" +#include "llrender.h" // Project includes #include "llui.h" diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index c6c417d8f2..b6980d0382 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -36,7 +36,7 @@ #include "llmath.h" #include "v3math.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llprimitive.h" #include "llview.h" #include "llviewerimagelist.h" diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 8bb5b18e8f..77e6112e95 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -36,7 +36,7 @@ // library includes #include "llmath.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "v4color.h" #include "llprimitive.h" #include "llview.h" diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index d857ca7510..3a3a22081a 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -38,7 +38,7 @@ #include "v3math.h" #include "llquaternion.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "v4color.h" #include "llprimitive.h" diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 1659cc71ce..e179e01030 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -38,7 +38,7 @@ #include "llmaniptranslate.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llagent.h" #include "llbbox.h" @@ -1535,10 +1535,10 @@ void LLManipTranslate::renderSnapGuides() LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GREATER); glBindTexture(GL_TEXTURE_2D, sGridTex); gGL.flush(); - gGL.blendFunc(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA); + gGL.blendFunc(LLRender::BF_ZERO, LLRender::BF_ONE_MINUS_SOURCE_ALPHA); renderGrid(u,v,tiles,0.9f, 0.9f, 0.9f,a*0.15f); gGL.flush(); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } { @@ -1649,7 +1649,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal, LLGLEnable stencil(GL_STENCIL_TEST); LLGLDepthTest depth (GL_TRUE, GL_FALSE, GL_ALWAYS); glStencilFunc(GL_ALWAYS, 0, stencil_mask); - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + gGL.setColorMask(false, false); LLImageGL::unbindTexture(0); glColor4f(1,1,1,1); @@ -1700,7 +1700,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal, LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_CLOUDS); } - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); } gGL.color4f(1,1,1,1); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 6e10bfef58..ee184e74b4 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -38,7 +38,7 @@ #include "llui.h" #include "llmath.h" // clampf() #include "llfocusmgr.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llagent.h" #include "llcallingcard.h" @@ -299,7 +299,7 @@ void LLNetMap::draw() gGL.end(); // Draw water - glAlphaFunc(GL_GREATER, ABOVE_WATERLINE_ALPHA / 255.f ); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, ABOVE_WATERLINE_ALPHA / 255.f); { if (regionp->getLand().getWaterTexture()) { @@ -316,7 +316,7 @@ void LLNetMap::draw() gGL.end(); } } - glAlphaFunc(GL_GREATER,0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index 993125ce0a..23ba7163c2 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -37,7 +37,7 @@ #include "lloverlaybar.h" #include "audioengine.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llagent.h" #include "llbutton.h" #include "llchatbar.h" diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a94fcf7bc2..a3526dff21 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -133,83 +133,77 @@ void LLLoginHandler::parse(const LLSD& queryMap) mFirstName = queryMap["first_name"].asString(); mLastName = queryMap["last_name"].asString(); + EGridInfo grid_choice = GRID_INFO_NONE; if (queryMap["grid"].asString() == "aditi") { - gGridChoice = GRID_INFO_ADITI; + grid_choice = GRID_INFO_ADITI; } else if (queryMap["grid"].asString() == "agni") { - gGridChoice = GRID_INFO_AGNI; + grid_choice = GRID_INFO_AGNI; } else if (queryMap["grid"].asString() == "siva") { - gGridChoice = GRID_INFO_SIVA; + grid_choice = GRID_INFO_SIVA; } else if (queryMap["grid"].asString() == "durga") { - gGridChoice = GRID_INFO_DURGA; + grid_choice = GRID_INFO_DURGA; } else if (queryMap["grid"].asString() == "shakti") { - gGridChoice = GRID_INFO_SHAKTI; + grid_choice = GRID_INFO_SHAKTI; } else if (queryMap["grid"].asString() == "soma") { - gGridChoice = GRID_INFO_SOMA; + grid_choice = GRID_INFO_SOMA; } else if (queryMap["grid"].asString() == "ganga") { - gGridChoice = GRID_INFO_GANGA; + grid_choice = GRID_INFO_GANGA; } else if (queryMap["grid"].asString() == "vaak") { - gGridChoice = GRID_INFO_VAAK; + grid_choice = GRID_INFO_VAAK; } else if (queryMap["grid"].asString() == "uma") { - gGridChoice = GRID_INFO_UMA; + grid_choice = GRID_INFO_UMA; } else if (queryMap["grid"].asString() == "mohini") { - gGridChoice = GRID_INFO_MOHINI; + grid_choice = GRID_INFO_MOHINI; } else if (queryMap["grid"].asString() == "yami") { - gGridChoice = GRID_INFO_YAMI; + grid_choice = GRID_INFO_YAMI; } else if (queryMap["grid"].asString() == "nandi") { - gGridChoice = GRID_INFO_NANDI; + grid_choice = GRID_INFO_NANDI; } else if (queryMap["grid"].asString() == "mitra") { - gGridChoice = GRID_INFO_MITRA; + grid_choice = GRID_INFO_MITRA; } else if (queryMap["grid"].asString() == "radha") { - gGridChoice = GRID_INFO_RADHA; + grid_choice = GRID_INFO_RADHA; } else if (queryMap["grid"].asString() == "ravi") { - gGridChoice = GRID_INFO_RAVI; + grid_choice = GRID_INFO_RAVI; } else if (queryMap["grid"].asString() == "aruna") { - gGridChoice = GRID_INFO_ARUNA; + grid_choice = GRID_INFO_ARUNA; } -#if !LL_RELEASE_FOR_DOWNLOAD - if (gGridChoice > GRID_INFO_NONE && gGridChoice < GRID_INFO_LOCAL) + + if(grid_choice != GRID_INFO_NONE) { - gSavedSettings.setS32("ServerChoice", gGridChoice); + LLViewerLogin::getInstance()->setGridChoice(grid_choice); } -#endif - - if (LLAppViewer::instance()->getLoginURIs().size() == 0) - { - gGridName = gGridInfo[gGridChoice].mName; /* Flawfinder: ignore */ - LLAppViewer::instance()->resetURIs(); - } - + LLString startLocation = queryMap["location"].asString(); if (startLocation == "specify") @@ -296,7 +290,15 @@ class LLIamHereLogin : public LLHTTPClient::Responder { mParent = parentIn; }; - + + // We don't actually expect LLSD back, so need to override completedRaw + virtual void completedRaw(U32 status, const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + completed(status, reason, LLSD()); // will call result() or error() + } + virtual void result( const LLSD& content ) { if ( mParent ) @@ -794,7 +796,7 @@ BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name) if ((S32)GRID_INFO_OTHER == domain_name) { - server = gGridName; + server = LLViewerLogin::getInstance()->getGridLabel(); } } else @@ -942,24 +944,16 @@ void LLPanelLogin::loadLoginPage() LLString grid; S32 grid_index; getServer( grid, grid_index ); - if( grid_index != (S32)GRID_INFO_OTHER ) - { - grid = gGridInfo[grid_index].mLabel; - } - if(gGridChoice != (EGridInfo)grid_index) + gViewerWindow->setMenuBackgroundColor(false, !LLViewerLogin::getInstance()->isInProductionGrid()); + gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); + + if (!grid.empty()) { - LLAppViewer::instance()->resetURIs(); - gGridChoice = (EGridInfo)grid_index; - gSavedSettings.setString("GridChoice", gGridInfo[gGridChoice].mLabel); - gViewerWindow->setMenuBackgroundColor(false, - !LLAppViewer::instance()->isInProductionGrid()); - gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); + char* curl_grid = curl_escape(grid.c_str(), 0); + oStr << "&grid=" << curl_grid; + curl_free(curl_grid); } - - char* curl_grid = curl_escape(grid.c_str(), 0); - oStr << "&grid=" << curl_grid; - curl_free(curl_grid); #if USE_VIEWER_AUTH LLURLSimString::sInstance.parse(); @@ -1087,15 +1081,6 @@ void LLPanelLogin::onClickConnect(void *) if (!first.empty() && !last.empty()) { // has both first and last name typed - - // store off custom server entry, if currently selected - LLComboBox* combo = sInstance->getChild("server_combo"); - S32 selected_server = combo->getValue(); - if (selected_server == GRID_INFO_NONE) - { - LLString custom_server = combo->getValue().asString(); - gSavedSettings.setString("CustomServer", custom_server); - } sInstance->mCallback(0, sInstance->mCallbackData); } else @@ -1180,6 +1165,26 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) // static void LLPanelLogin::onSelectServer(LLUICtrl*, void*) { + // The user twiddled with the grid choice ui. + // apply the selection to the grid setting. + LLString grid; + S32 grid_index; + getServer( grid, grid_index ); + + // This new seelction will override preset uris + // from the command line. + LLViewerLogin* vl = LLViewerLogin::getInstance(); + vl->resetURIs(); + if(grid_index != GRID_INFO_OTHER) + { + vl->setGridChoice((EGridInfo)grid_index); + grid = vl->getGridLabel(); + } + else + { + vl->setGridChoice(grid); + } + // grid changed so show new splash screen (possibly) loadLoginPage(); } diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index d27b587a09..e5b063e6d7 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -36,7 +36,7 @@ #include "indra_constants.h" #include "llmath.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llui.h" #include "llfontgl.h" #include "llimagegl.h" diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 103f350b0a..a889388e85 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -39,7 +39,7 @@ #include "lldbstrings.h" #include "lleconomy.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llpermissions.h" #include "llpermissionsflags.h" #include "llundo.h" @@ -1038,19 +1038,21 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & if (mGridMode == GRID_MODE_LOCAL && mSelectedObjects->getObjectCount()) { - LLViewerObject* root = getSelectedParentObject(mSelectedObjects->getFirstObject()); + //LLViewerObject* root = getSelectedParentObject(mSelectedObjects->getFirstObject()); LLBBox bbox = mSavedSelectionBBox; mGridOrigin = mSavedSelectionBBox.getCenterAgent(); mGridScale = mSavedSelectionBBox.getExtentLocal() * 0.5f; - if(mSelectedObjects->getObjectCount() < 2 || !root || root->mDrawable.isNull()) + // DEV-12570 Just taking the saved selection box rotation prevents + // wild rotations of linked sets while in local grid mode + //if(mSelectedObjects->getObjectCount() < 2 || !root || root->mDrawable.isNull()) { mGridRotation = mSavedSelectionBBox.getRotation(); } - else //set to the root object + /*else //set to the root object { mGridRotation = root->getRenderRotation(); - } + }*/ } else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull()) { @@ -4806,7 +4808,7 @@ void LLSelectMgr::updateSilhouettes() objectp->clearChanged(LLXform::MOVED | LLXform::SILHOUETTE); } - //glAlphaFunc(GL_GREATER, 0.01f); + //gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } void LLSelectMgr::renderSilhouettes(BOOL for_hud) @@ -4818,7 +4820,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) LLViewerImage::bindTexture(mSilhouetteImagep); LLGLSPipelineSelection gls_select; - glAlphaFunc(GL_GREATER, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); LLGLEnable blend(GL_BLEND); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); @@ -4846,11 +4848,21 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) if (mSelectedObjects->getNumNodes()) { LLUUID inspect_item_id = LLFloaterInspect::getSelectedUUID(); + for (S32 pass = 0; pass < 2; pass++) { + LLObjectSelection::iterator end_ = mSelectedObjects->end(); + S32 num_nodes = mSelectedObjects->getNumNodes() ; + LLObjectSelection::iterator prev_iter = mSelectedObjects->end(); for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); iter != mSelectedObjects->end(); iter++) { + llassert_always(end_ == mSelectedObjects->end()) ;//mSelectedObjects should not grow + llassert_always(prev_iter != iter) ; //iter should move + llassert_always(num_nodes > 0) ; //iter should not circle inside mSelectedObjects. + num_nodes-- ; + prev_iter = iter ; + LLSelectNode* node = *iter; LLViewerObject* objectp = node->getObject(); if (!objectp) @@ -4924,7 +4936,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) } mSilhouetteImagep->unbindTexture(0, GL_TEXTURE_2D); - glAlphaFunc(GL_GREATER, 0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } void LLSelectMgr::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point) @@ -5289,7 +5301,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible()) { gGL.flush(); - gGL.blendFunc(GL_SRC_COLOR, GL_ONE); + gGL.blendFunc(LLRender::BF_SOURCE_COLOR, LLRender::BF_ONE); LLGLEnable fog(GL_FOG); glFogi(GL_FOG_MODE, GL_LINEAR); float d = (LLViewerCamera::getInstance()->getPointOfInterest()-LLViewerCamera::getInstance()->getOrigin()).magVec(); @@ -5299,7 +5311,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) glFogfv(GL_FOG_COLOR, fogCol.mV); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); - glAlphaFunc(GL_GREATER, 0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.begin(LLVertexBuffer::LINES); { S32 i = 0; @@ -5320,7 +5332,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) } gGL.flush(); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); gGL.begin(LLVertexBuffer::TRIANGLES); { S32 i = 0; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index ff53dfea2f..b6ef833709 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -43,7 +43,7 @@ #include "llviewerregion.h" #include "llcamera.h" #include "pipeline.h" -#include "llglimmediate.h" +#include "llrender.h" #include "lloctree.h" const F32 SG_OCCLUSION_FUDGE = 1.01f; @@ -60,6 +60,7 @@ const F32 SG_OCCLUSION_FUDGE = 1.01f; static U32 sZombieGroups = 0; U32 LLSpatialGroup::sNodeCount = 0; +BOOL LLSpatialGroup::sNoDelete = FALSE; static F32 sLastMaxTexPriority = 1.f; static F32 sCurMaxTexPriority = 1.f; @@ -295,6 +296,11 @@ S32 LLSphereAABB(const LLVector3& center, const LLVector3& size, const LLVector3 LLSpatialGroup::~LLSpatialGroup() { + if (sNoDelete) + { + llerrs << "Illegal deletion of LLSpatialGroup!" << llendl; + } + if (isState(DEAD)) { sZombieGroups--; @@ -2006,7 +2012,7 @@ void renderOctree(LLSpatialGroup* group) //render solid object bounding box, color //coded by buffer usage and activity LLGLDepthTest depth(GL_TRUE, GL_FALSE); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); LLVector4 col; if (group->mBuilt > 0.f) { @@ -2094,7 +2100,7 @@ void renderOctree(LLSpatialGroup* group) drawBox(group->mObjectBounds[0], group->mObjectBounds[1]*1.01f+LLVector3(0.001f, 0.001f, 0.001f)); glDepthMask(GL_TRUE); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); if (group->mBuilt <= 0.f) { @@ -2122,7 +2128,7 @@ void renderOctree(LLSpatialGroup* group) void renderVisibility(LLSpatialGroup* group, LLCamera* camera) { LLGLEnable blend(GL_BLEND); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); LLGLEnable cull(GL_CULL_FACE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); @@ -2498,7 +2504,7 @@ void LLSpatialPartition::renderDebug() LLGLDisable cullface(GL_CULL_FACE); LLGLEnable blend(GL_BLEND); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); LLImageGL::unbindTexture(0); gPipeline.disableLights(); @@ -2619,7 +2625,10 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset, LLDrawInfo::~LLDrawInfo() { - + if (LLSpatialGroup::sNoDelete) + { + llerrs << "LLDrawInfo deleted illegally!" << llendl; + } } LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage) @@ -2813,7 +2822,16 @@ void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info) } - +void LLCullResult::assertDrawMapsEmpty() +{ + for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++) + { + if (mRenderMapSize[i] != 0) + { + llerrs << "Stale LLDrawInfo's in LLCullResult!" << llendl; + } + } +} diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 7e1175a000..6ea22c2f66 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -127,6 +127,7 @@ class LLSpatialGroup : public LLOctreeListener friend class LLSpatialPartition; public: static U32 sNodeCount; + static BOOL sNoDelete; //deletion of spatial groups and draw info not allowed if TRUE typedef std::vector > sg_vector_t; typedef std::set > sg_set_t; @@ -421,7 +422,7 @@ public: void pushDrawable(LLDrawable* drawable); void pushBridge(LLSpatialBridge* bridge); void pushDrawInfo(U32 type, LLDrawInfo* draw_info); - + U32 getVisibleGroupsSize() { return mVisibleGroupsSize; } U32 getAlphaGroupsSize() { return mAlphaGroupsSize; } U32 getDrawableGroupsSize() { return mDrawableGroupsSize; } @@ -429,6 +430,8 @@ public: U32 getVisibleBridgeSize() { return mVisibleBridgeSize; } U32 getRenderMapSize(U32 type) { return mRenderMapSize[type]; } + void assertDrawMapsEmpty(); + private: U32 mVisibleGroupsSize; U32 mAlphaGroupsSize; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 724b61481b..7480d4dd73 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -820,22 +820,28 @@ BOOL idle_startup() LLString server_label; S32 domain_name_index; BOOL user_picked_server = LLPanelLogin::getServer( server_label, domain_name_index ); - gGridChoice = (EGridInfo) domain_name_index; - gSavedSettings.setS32("ServerChoice", gGridChoice); - if (gGridChoice == GRID_INFO_OTHER) + if((EGridInfo)domain_name_index == GRID_INFO_OTHER) { - gGridName = server_label;/* Flawfinder: ignore */ + // Since the grid chosen was an 'other', set the choice by string. + LLViewerLogin::getInstance()->setGridChoice(server_label); + } + else + { + // Set the choice according to index. + LLViewerLogin::getInstance()->setGridChoice((EGridInfo)domain_name_index); } if ( user_picked_server ) - { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gGridChoice + { // User picked a grid from the popup, so clear the + // stored uris and they will be re-generated from the GridChoice sAuthUris.clear(); - LLAppViewer::instance()->resetURIs(); + LLViewerLogin::getInstance()->resetURIs(); } LLString location; LLPanelLogin::getLocation( location ); LLURLSimString::setString( location ); + // END TODO LLPanelLogin::close(); } @@ -915,7 +921,7 @@ BOOL idle_startup() if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState()) { //#define LL_MINIMIAL_REQUESTED_OPTIONS - gDebugInfo["GridName"] = gGridInfo[gGridChoice].mLabel; + gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); // *Note: this is where gUserAuth used to be created. requested_options.clear(); @@ -949,7 +955,8 @@ BOOL idle_startup() gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.push_back("god-connect"); } - const std::vector& uris = LLAppViewer::instance()->getLoginURIs(); + std::vector uris; + LLViewerLogin::getInstance()->getLoginURIs(uris); std::vector::const_iterator iter, end; for (iter = uris.begin(), end = uris.end(); iter != end; ++iter) { @@ -1222,7 +1229,7 @@ BOOL idle_startup() sAuthUriNum++; std::ostringstream s; LLString::format_map_t args; - args["[NUMBER]"] = sAuthUriNum + 1; + args["[NUMBER]"] = llformat("%d", sAuthUriNum + 1); auth_desc = LLTrans::getString("LoginAttempt", args).c_str(); LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE ); return do_normal_idle; @@ -1276,7 +1283,6 @@ BOOL idle_startup() save_password_to_disk(NULL); } gSavedSettings.setBOOL("RememberPassword", remember_password); - gSavedSettings.setBOOL("LoginLastLocation", gSavedSettings.getBOOL("LoginLastLocation")); text = LLUserAuth::getInstance()->getResponse("agent_access"); if(text && (text[0] == 'M')) @@ -2331,7 +2337,7 @@ BOOL idle_startup() gDebugView->mFastTimerView->setVisible(TRUE); #endif - LLAppViewer::instance()->startMainloopTimeout(); + LLAppViewer::instance()->initMainloopTimeout("Mainloop Init"); return do_normal_idle; } @@ -2362,33 +2368,13 @@ void login_show() LL_DEBUGS("AppInit") << "Setting Servers" << LL_ENDL; - if( GRID_INFO_OTHER == gGridChoice ) - { - LLPanelLogin::addServer( gGridName.c_str(), GRID_INFO_OTHER ); - } - else + LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel().c_str(), LLViewerLogin::getInstance()->getGridChoice()); + + LLViewerLogin* vl = LLViewerLogin::getInstance(); + for(int grid_index = GRID_INFO_ADITI; grid_index < GRID_INFO_OTHER; ++grid_index) { - LLPanelLogin::addServer( gGridInfo[gGridChoice].mLabel, gGridChoice ); + LLPanelLogin::addServer(vl->getKnownGridLabel((EGridInfo)grid_index).c_str(), grid_index); } - - // Arg! We hate loops! - LLPanelLogin::addServer( gGridInfo[GRID_INFO_ADITI].mLabel, GRID_INFO_ADITI ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_AGNI].mLabel, GRID_INFO_AGNI ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_ARUNA].mLabel, GRID_INFO_ARUNA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_DURGA].mLabel, GRID_INFO_DURGA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_GANGA].mLabel, GRID_INFO_GANGA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_MITRA].mLabel, GRID_INFO_MITRA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_MOHINI].mLabel, GRID_INFO_MOHINI ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_NANDI].mLabel, GRID_INFO_NANDI ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_RADHA].mLabel, GRID_INFO_RADHA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_RAVI].mLabel, GRID_INFO_RAVI ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_SIVA].mLabel, GRID_INFO_SIVA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_SHAKTI].mLabel, GRID_INFO_SHAKTI ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_SOMA].mLabel, GRID_INFO_SOMA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_UMA].mLabel, GRID_INFO_UMA ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_VAAK].mLabel, GRID_INFO_VAAK ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_YAMI].mLabel, GRID_INFO_YAMI ); - LLPanelLogin::addServer( gGridInfo[GRID_INFO_LOCAL].mLabel, GRID_INFO_LOCAL ); } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. @@ -2705,7 +2691,7 @@ void update_dialog_callback(S32 option, void *userdata) #endif // *TODO change userserver to be grid on both viewer and sim, since // userserver no longer exists. - query_map["userserver"] = gGridName; + query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel(); query_map["channel"] = gSavedSettings.getString("VersionChannelName"); // *TODO constantize this guy LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map); @@ -2798,9 +2784,6 @@ void update_dialog_callback(S32 option, void *userdata) LL_DEBUGS("AppInit") << "Calling updater: " << update_exe_path << LL_ENDL; - // *REMOVE:Mani The following call is handled through ~LLAppViewer. - // remove_marker_file(); // In case updater fails - // Run the auto-updater. system(update_exe_path.c_str()); /* Flawfinder: ignore */ @@ -2808,10 +2791,6 @@ void update_dialog_callback(S32 option, void *userdata) OSMessageBox("Automatic updating is not yet implemented for Linux.\n" "Please download the latest version from www.secondlife.com.", NULL, OSMB_OK); - - // *REMOVE:Mani The following call is handled through ~LLAppViewer. - // remove_marker_file(); - #endif LLAppViewer::instance()->forceQuit(); } diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 351d4b1a21..6c832492c0 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -15,7 +15,7 @@ * online at http://secondlife.com/developers/opensource/gplv2 * * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception + * it is applied to this Source Code. View the full textof the exception * in the file doc/FLOSS-exception.txt in this software distribution, or * online at http://secondlife.com/developers/opensource/flossexception * diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 2877fc66e3..6f952ea57d 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -207,10 +207,11 @@ LLVector2 LLSurfacePatch::getTexCoords(const U32 x, const U32 y) const void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 *vertex, LLVector3 *normal, LLVector2 *tex0, LLVector2 *tex1) { - if (!mSurfacep || !mSurfacep->getRegion()) + if (!mSurfacep || !mSurfacep->getRegion() || !mSurfacep->getGridsPerEdge()) { return; // failsafe } + llassert_always(vertex && normal && tex0 && tex1); U32 surface_stride = mSurfacep->getGridsPerEdge(); U32 point_offset = x + y*surface_stride; diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 7a2d232de6..6286289d6b 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -52,7 +52,7 @@ #include "llxmltree.h" #include "pipeline.h" #include "v4coloru.h" -#include "llglimmediate.h" +#include "llrender.h" //#include "../tools/imdebug/imdebug.h" @@ -239,6 +239,9 @@ BOOL LLTexLayerSetBuffer::render() { U8* baked_bump_data = NULL; + // Default color mask for tex layer render + gGL.setColorMask(true, true); + // do we need to upload, and do we have sufficient data to create an uploadable composite? // When do we upload the texture if gAgent.mNumPendingQueries is non-zero? BOOL upload_now = (gAgent.mNumPendingQueries == 0 && mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal()); @@ -292,8 +295,8 @@ BOOL LLTexLayerSetBuffer::render() } // reset GL state - glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE ); - gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + gGL.setColorMask(true, true); + gGL.setSceneBlendType(LLRender::BT_ALPHA); // we have valid texture data now mInitialized = TRUE; @@ -756,6 +759,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) LLGLSUIDefault gls_ui; LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE); + gGL.setColorMask(true, true); // composite color layers for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ ) @@ -774,8 +778,8 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) { LLGLSNoAlphaTest gls_no_alpha_test; gGL.flush(); - glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE ); - gGL.blendFunc( GL_ONE, GL_ZERO ); + gGL.setColorMask(false, true); + gGL.setSceneBlendType(LLRender::BT_REPLACE); { LLImageGL* image_gl = gTexStaticImageList.getImageGL( getInfo()->mStaticAlphaFileName, TRUE ); @@ -793,8 +797,8 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) LLImageGL::unbindTexture(0, GL_TEXTURE_2D); gGL.flush(); - glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE ); - gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + gGL.setColorMask(true, true); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } else if( getInfo()->mClearAlpha ) @@ -803,12 +807,12 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) LLGLSNoTextureNoAlphaTest gls_no_alpha; gGL.color4f( 0.f, 0.f, 0.f, 1.f ); gGL.flush(); - glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE ); + gGL.setColorMask(false, true); gl_rect_2d_simple( width, height ); gGL.flush(); - glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE ); + gGL.setColorMask(true, true); } stop_glerror(); @@ -836,11 +840,11 @@ BOOL LLTexLayerSet::renderBump( S32 x, S32 y, S32 width, S32 height ) // Set the alpha channel to one (clean up after previous blending) LLGLSNoTextureNoAlphaTest gls_no_texture_no_alpha; gGL.color4f( 0.f, 0.f, 0.f, 1.f ); - glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE ); + gGL.setColorMask(false, true); gl_rect_2d_simple( width, height ); - glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE ); + gGL.setColorMask(true, true); stop_glerror(); return success; @@ -1330,7 +1334,7 @@ BOOL LLTexLayer::render( S32 x, S32 y, S32 width, S32 height ) renderAlphaMasks( x, y, width, height, &net_color ); alpha_mask_specified = TRUE; gGL.flush(); - gGL.blendFunc( GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA ); + gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA); } gGL.color4fv( net_color.mV); @@ -1338,7 +1342,7 @@ BOOL LLTexLayer::render( S32 x, S32 y, S32 width, S32 height ) if( getInfo()->mWriteAllChannels ) { gGL.flush(); - gGL.blendFunc( GL_ONE, GL_ZERO ); + gGL.setSceneBlendType(LLRender::BT_REPLACE); } if( (getInfo()->mLocalTexture != -1) && !getInfo()->mUseLocalTextureAlphaOnly ) @@ -1401,7 +1405,7 @@ BOOL LLTexLayer::render( S32 x, S32 y, S32 width, S32 height ) { // Restore standard blend func value gGL.flush(); - gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + gGL.setSceneBlendType(LLRender::BT_ALPHA); stop_glerror(); } @@ -1506,7 +1510,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4 llassert( !mParamAlphaList.empty() ); - glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE ); + gGL.setColorMask(false, true); alpha_list_t::iterator iter = mParamAlphaList.begin(); LLTexLayerParamAlpha* first_param = *iter; @@ -1518,7 +1522,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4 // Clear the alpha gGL.flush(); - gGL.blendFunc( GL_ONE, GL_ZERO ); + gGL.setSceneBlendType(LLRender::BT_REPLACE); gGL.color4f( 0.f, 0.f, 0.f, 0.f ); gl_rect_2d_simple( width, height ); @@ -1536,7 +1540,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4 // Approximates a min() function gGL.flush(); - gGL.blendFunc( GL_DST_ALPHA, GL_ZERO ); + gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); // Accumulate the alpha component of the texture if( getInfo()->mLocalTexture != -1 ) @@ -1601,7 +1605,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4 LLGLSUIDefault gls_ui; - glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE ); + gGL.setColorMask(true, true); if (!mMorphMasksValid && !mMaskedMorphs.empty()) { @@ -1963,11 +1967,11 @@ BOOL LLTexLayerParamAlpha::render( S32 x, S32 y, S32 width, S32 height ) gGL.flush(); if( getInfo()->mMultiplyBlend ) { - gGL.blendFunc( GL_DST_ALPHA, GL_ZERO ); // Multiplication: approximates a min() function + gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); // Multiplication: approximates a min() function } else { - gGL.blendFunc( GL_ONE, GL_ONE ); // Addition: approximates a max() function + gGL.setSceneBlendType(LLRender::BT_ADD); // Addition: approximates a max() function } if( !getInfo()->mStaticImageFileName.empty() && !mStaticImageInvalid) diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 86ef9e95cf..10801cfd4f 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -39,6 +39,9 @@ #include "lllfsthread.h" #include "llviewercontrol.h" +// Included to allow LLTextureCache::purgeTextures() to pause watchdog timeout +#include "llappviewer.h" + #define USE_LFS_READ 0 #define USE_LFS_WRITE 0 @@ -1153,6 +1156,9 @@ void LLTextureCache::purgeTextures(bool validate) return; } + // *FIX:Mani - watchdog off. + LLAppViewer::instance()->pauseMainloopTimeout(); + LLMutexLock lock(&mHeaderMutex); S32 filesize = ll_apr_file_size(mTexturesDirEntriesFileName, NULL); @@ -1273,6 +1279,9 @@ void LLTextureCache::purgeTextures(bool validate) llassert(mTexturesSizeTotal == total_size); delete[] entries; + + // *FIX:Mani - watchdog back on. + LLAppViewer::instance()->resumeMainloopTimeout(); LL_INFOS("TextureCache") << "TEXTURE CACHE:" << " PURGED: " << purge_count diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 22c0e08612..b89e93b9a4 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -34,7 +34,7 @@ #include "lltexturectrl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llagent.h" #include "llviewerimagelist.h" #include "llcheckboxctrl.h" diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index bcb2185687..c5ae50c050 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1341,13 +1341,13 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c } S32 desired_size; - if ((desired_discard == 0) && worker && worker->mFileSize) + if (desired_discard == 0) { // if we want the entire image, and we know its size, then get it all // (calcDataSizeJ2C() below makes assumptions about how the image // was compressed - this code ensures that when we request the entire image, // we really do get it.) - desired_size = worker->mFileSize; + desired_size = MAX_IMAGE_DATA_SIZE; } else if (w*h*c > 0) { @@ -1358,17 +1358,11 @@ bool LLTextureFetch::createRequest(const LLString& filename, const LLUUID& id, c } else { - if (desired_discard == 0) - { - // If we want all of the image, request the maximum possible data - desired_size = MAX_IMAGE_DATA_SIZE; - } - else - { - desired_size = FIRST_PACKET_SIZE; - desired_discard = MAX_DISCARD_LEVEL; - } + desired_size = FIRST_PACKET_SIZE; + desired_discard = MAX_DISCARD_LEVEL; } + + if (worker) { if (worker->wasAborted()) diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 7f571a1205..a9005ef71b 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -40,7 +40,7 @@ #include "lllfsthread.h" #include "llui.h" #include "llimageworker.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llhoverview.h" #include "llselectmgr.h" diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index 0224e1c925..32b27fb876 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -35,7 +35,7 @@ #include "lltoolselectland.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "message.h" @@ -94,7 +94,6 @@ LLToolBrushLand::LLToolBrushLand() mMouseX( 0 ), mMouseY(0), mGotHover(FALSE), - mLastShowParcelOwners(FALSE), mBrushSelected(FALSE) { mBrushIndex = gSavedSettings.getS32("RadioLandBrushSize"); @@ -104,7 +103,8 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, MASK mask) { S32 radioAction = gSavedSettings.getS32("RadioLandBrushAction"); - + + mLastAffectedRegions.clear(); determineAffectedRegions(mLastAffectedRegions, pos_global); for(region_list_t::iterator iter = mLastAffectedRegions.begin(); iter != mLastAffectedRegions.end(); ++iter) @@ -418,8 +418,6 @@ void LLToolBrushLand::handleSelect() gFloaterTools->setStatusText("modifyland"); // if (!mBrushSelected) { - mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners"); - gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners); mBrushSelected = TRUE; } } @@ -431,8 +429,6 @@ void LLToolBrushLand::handleDeselect() { gEditMenuHandler = NULL; } - mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners"); - gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners); LLViewerParcelMgr::getInstance()->setSelectionVisible(TRUE); mBrushSelected = FALSE; } diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h index 70e34725af..3940f3ac89 100644 --- a/indra/newview/lltoolbrush.h +++ b/indra/newview/lltoolbrush.h @@ -97,7 +97,6 @@ protected: S32 mMouseY; S32 mBrushIndex; BOOL mGotHover; - BOOL mLastShowParcelOwners; BOOL mBrushSelected; // Order doesn't matter and we do check for existance of regions, so use a set region_list_t mLastAffectedRegions; diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index ad11f5ad43..d8d271bfda 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -33,7 +33,7 @@ // File includes #include "lltoolmorph.h" -#include "llglimmediate.h" +#include "llrender.h" // Library includes #include "audioengine.h" diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 315136ed36..310b677bff 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -309,6 +309,7 @@ BOOL LLToolPie::pickAndShowMenu(S32 x, S32 y, MASK mask, BOOL always_show) } else if (mHitObjectID == gAgent.getID() ) { + llassert_always(gPieSelf) ; gPieSelf->show(x, y, mPieMouseButtonDown); } else if (object) diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp index 28e4227db4..38e9811b73 100644 --- a/indra/newview/lltoolselectland.cpp +++ b/indra/newview/lltoolselectland.cpp @@ -61,8 +61,7 @@ LLToolSelectLand::LLToolSelectLand( ) mDragEndY(0), mMouseOutsideSlop(FALSE), mWestSouthBottom(), - mEastNorthTop(), - mLastShowParcelOwners(FALSE) + mEastNorthTop() { } LLToolSelectLand::~LLToolSelectLand() @@ -216,17 +215,12 @@ void LLToolSelectLand::render() void LLToolSelectLand::handleSelect() { gFloaterTools->setStatusText("selectland"); - mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners"); - gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners); } void LLToolSelectLand::handleDeselect() { mSelection = NULL; - mLastShowParcelOwners = gSavedSettings.getBOOL("ShowParcelOwners"); - //LLViewerParcelMgr::getInstance()->deselectLand(); - gSavedSettings.setBOOL("ShowParcelOwners", mLastShowParcelOwners); } diff --git a/indra/newview/lltoolselectland.h b/indra/newview/lltoolselectland.h index 37d656289b..bca0e13384 100644 --- a/indra/newview/lltoolselectland.h +++ b/indra/newview/lltoolselectland.h @@ -74,7 +74,6 @@ protected: LLVector3d mWestSouthBottom; // global coords, from drag LLVector3d mEastNorthTop; // global coords, from drag - BOOL mLastShowParcelOwners; // store last Show Parcel Owners setting LLSafeHandle mSelection; // hold on to a parcel selection }; diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index 5f54d1f3ba..67d9e2da65 100644 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -36,7 +36,7 @@ // Library includes #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "lldarray.h" // Viewer includes diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 5647b6be5a..d1b87281f0 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -36,7 +36,7 @@ #include "lldarray.h" #include "llfontgl.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llinventory.h" #include "llmemory.h" #include "llstring.h" diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9ba25902af..cbba73b692 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -69,7 +69,7 @@ #include "llappviewer.h" #include "llvosurfacepatch.h" #include "llvowlsky.h" -#include "llglimmediate.h" +#include "llrender.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -433,7 +433,7 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue) gVoiceClient->setCaptureDevice(inputDevice); std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); gVoiceClient->setRenderDevice(outputDevice); - gVoiceClient->setLipSyncEnabled(gSavedSettings.getU32("LipSyncEnabled")); + gVoiceClient->setLipSyncEnabled(gSavedSettings.getBOOL("LipSyncEnabled")); } return true; } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index a24f4b36de..c75bcdc9e8 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -34,7 +34,7 @@ #include "llviewerdisplay.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llglheaders.h" #include "llagent.h" #include "llviewercontrol.h" @@ -81,8 +81,6 @@ #include "llpostprocess.h" extern LLPointer gStartImageGL; -extern BOOL gDisplaySwapBuffers; - LLPointer gDisconnectedImagep = NULL; @@ -96,14 +94,18 @@ const F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures bef BOOL gForceRenderLandFence = FALSE; BOOL gDisplaySwapBuffers = FALSE; +BOOL gDepthDirty = FALSE; BOOL gResizeScreenTexture = FALSE; BOOL gSnapshot = FALSE; +U32 gRecentFrameCount = 0; // number of 'recent' frames +LLFrameTimer gRecentFPSTime; +LLFrameTimer gRecentMemoryTime; + // Rendering stuff void pre_show_depth_buffer(); void post_show_depth_buffer(); void render_ui_and_swap(); -void render_ui_and_swap_if_needed(); void render_hud_attachments(); void render_ui_3d(); void render_ui_2d(); @@ -142,7 +144,7 @@ void display_startup() gPipeline.disableLights(); gViewerWindow->setup2DRender(); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); gGL.color4f(1,1,1,1); gViewerWindow->draw(); @@ -181,6 +183,26 @@ void display_update_camera() LLWorld::getInstance()->setLandFarClip(final_far); } +// Write some stats to llinfos +void display_stats() +{ + F32 fps_log_freq = gSavedSettings.getF32("FPSLogFrequency"); + if (fps_log_freq > 0.f && gRecentFPSTime.getElapsedTimeF32() >= fps_log_freq) + { + F32 fps = gRecentFrameCount / fps_log_freq; + llinfos << llformat("FPS: %.02f", fps) << llendl; + gRecentFrameCount = 0; + gRecentFPSTime.reset(); + } + F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency"); + if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq) + { + gMemoryAllocated = getCurrentRSS(); + U32 memory = (U32)(gMemoryAllocated / (1024*1024)); + llinfos << llformat("MEMORY: %d MB", memory) << llendl; + gRecentMemoryTime.reset(); + } +} // Paint the display! void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) @@ -222,9 +244,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gViewerWindow->checkSettings(); + LLAppViewer::instance()->pingMainloopTimeout("Display:Pick"); gViewerWindow->performPick(); + LLAppViewer::instance()->pingMainloopTimeout("Display:CheckStates"); LLGLState::checkStates(); LLGLState::checkTextureChannels(); @@ -256,6 +280,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // if (LLStartUp::getStartupState() < STATE_STARTED) { + LLAppViewer::instance()->pingMainloopTimeout("Display:Startup"); display_startup(); return; } @@ -267,6 +292,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Update GL Texture statistics (used for discard logic?) // + LLAppViewer::instance()->pingMainloopTimeout("Display:TextureStats"); gFrameStats.start(LLFrameStats::UPDATE_TEX_STATS); stop_glerror(); @@ -277,6 +303,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gPipeline.mBackfaceCull = TRUE; gFrameCount++; + gRecentFrameCount++; if (gFocusMgr.getAppHasFocus()) { gForegroundFrameCount++; @@ -289,6 +316,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gTeleportDisplay) { + LLAppViewer::instance()->pingMainloopTimeout("Display:Teleport"); const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived. S32 attach_count = 0; @@ -367,6 +395,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } else if(LLAppViewer::instance()->logoutRequestSent()) { + LLAppViewer::instance()->pingMainloopTimeout("Display:Logout"); F32 percent_done = gLogoutTimer.getElapsedTimeF32() * 100.f / gLogoutMaxTime; if (percent_done > 100.f) { @@ -383,6 +412,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) else if (gRestoreGL) { + LLAppViewer::instance()->pingMainloopTimeout("Display:RestoreGL"); F32 percent_done = gRestoreGLTimer.getElapsedTimeF32() * 100.f / RESTORE_GL_TIME; if( percent_done > 100.f ) { @@ -412,6 +442,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // // + LLAppViewer::instance()->pingMainloopTimeout("Display:Camera"); LLViewerCamera::getInstance()->setZoomParameters(zoom_factor, subfield); LLViewerCamera::getInstance()->setNear(MIN_NEAR_PLANE); @@ -423,9 +454,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gDisconnected) { - render_ui_and_swap_if_needed(); - gDisplaySwapBuffers = TRUE; - + LLAppViewer::instance()->pingMainloopTimeout("Display:Disconnected"); + render_ui_and_swap(); render_disconnected_background(); } @@ -434,6 +464,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Set rendering options // // + LLAppViewer::instance()->pingMainloopTimeout("Display:RenderSetup"); stop_glerror(); if (gSavedSettings.getBOOL("ShowDepthBuffer")) { @@ -462,10 +493,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // do render-to-texture stuff here if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES)) { + LLAppViewer::instance()->pingMainloopTimeout("Display:DynamicTextures"); LLFastTimer t(LLFastTimer::FTM_UPDATE_TEXTURES); if (LLDynamicTexture::updateAllInstances()) { - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + gGL.setColorMask(true, true); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } } @@ -474,6 +506,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (!gDisconnected) { + LLAppViewer::instance()->pingMainloopTimeout("Display:Update"); if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { //don't draw hud objects in this frame gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_HUD); @@ -511,9 +544,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } } + LLAppViewer::instance()->pingMainloopTimeout("Display:Cull"); + //Increment drawable frame counter LLDrawable::incrementVisible(); + LLSpatialGroup::sNoDelete = TRUE; LLPipeline::sUseOcclusion = (!gUseWireframe && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") @@ -524,10 +560,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); S32 occlusion = LLPipeline::sUseOcclusion; - if (!gDisplaySwapBuffers) + if (gDepthDirty) { //depth buffer is invalid, don't overwrite occlusion state LLPipeline::sUseOcclusion = llmin(occlusion, 1); } + gDepthDirty = FALSE; static LLCullResult result; gPipeline.updateCull(*LLViewerCamera::getInstance(), result, water_clip); @@ -537,6 +574,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gPipeline.canUseVertexShaders() && LLPipeline::sRenderGlow; + LLAppViewer::instance()->pingMainloopTimeout("Display:Swap"); + // now do the swap buffer (just before rendering to framebuffer) { //swap and flush state from previous frame { @@ -550,14 +589,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gPipeline.resizeScreenTexture(); } - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + gGL.setColorMask(true, true); glClearColor(0,0,0,0); if (!for_snapshot) { - render_ui_and_swap_if_needed(); - gDisplaySwapBuffers = TRUE; - glh::matrix4f proj = glh_get_current_projection(); glh::matrix4f mod = glh_get_current_modelview(); glViewport(0,0,512,512); @@ -576,6 +612,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (!for_snapshot) { + LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery"); gPipeline.processImagery(*LLViewerCamera::getInstance()); gPipeline.generateWaterReflection(*LLViewerCamera::getInstance()); } @@ -587,6 +624,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Can put objects onto the retextured list. // // Doing this here gives hardware occlusion queries extra time to complete + LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages"); gFrameStats.start(LLFrameStats::IMAGE_UPDATE); { @@ -610,6 +648,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // In the case of alpha objects, z-sorts them first. // Also creates special lists for outlines and selected face rendering. // + LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort"); { gFrameStats.start(LLFrameStats::STATE_SORT); gPipeline.stateSort(*LLViewerCamera::getInstance(), result); @@ -631,6 +670,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sUseOcclusion = occlusion; { + LLAppViewer::instance()->pingMainloopTimeout("Display:Sky"); LLFastTimer t(LLFastTimer::FTM_UPDATE_SKY); gSky.updateSky(); } @@ -642,6 +682,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } + LLAppViewer::instance()->pingMainloopTimeout("Display:Render"); + //// render frontmost floater opaque for occlusion culling purposes //LLFloater* frontmost_floaterp = gFloaterView->getFrontmost(); //// assumes frontmost floater with focus is opaque @@ -681,20 +723,20 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (to_texture) { - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); gPipeline.mScreen.bindTarget(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); } if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot()) && !gRestoreGL) { - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE; gPipeline.renderGeom(*LLViewerCamera::getInstance(), TRUE); LLPipeline::sUnderWaterRender = FALSE; - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); //store this frame's modelview matrix for use //when rendering next frame's occlusion queries @@ -715,11 +757,19 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) /// Using render to texture would be faster/better, but I don't have a /// grasp of their full display stack just yet. // gPostProcess->apply(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()); + + if (!for_snapshot) + { + render_ui_and_swap(); + } + + LLSpatialGroup::sNoDelete = FALSE; } gFrameStats.start(LLFrameStats::RENDER_UI); if (gHandleKeysAsync) { + LLAppViewer::instance()->pingMainloopTimeout("Display:Keystrokes"); process_keystrokes_async(); stop_glerror(); } @@ -732,6 +782,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) send_agent_resume(); LLPipeline::sRenderFrameTest = FALSE; } + + display_stats(); + + LLAppViewer::instance()->pingMainloopTimeout("Display:Done"); } void render_hud_attachments() @@ -926,19 +980,13 @@ void render_ui_and_swap() glh_set_current_modelview(saved_view); glPopMatrix(); -} -void render_ui_and_swap_if_needed() -{ if (gDisplaySwapBuffers) { - render_ui_and_swap(); - - { - LLFastTimer t(LLFastTimer::FTM_SWAP); - gViewerWindow->mWindow->swapBuffers(); - } + LLFastTimer t(LLFastTimer::FTM_SWAP); + gViewerWindow->mWindow->swapBuffers(); } + gDisplaySwapBuffers = TRUE; } void renderCoordinateAxes() @@ -1073,7 +1121,7 @@ void render_ui_2d() } stop_glerror(); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); // render outline for HUD if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->mHUDCurZoom < 0.98f) @@ -1100,7 +1148,6 @@ void render_ui_2d() LLFontGL::sCurOrigin.set(0, 0); } - void render_disconnected_background() { gGL.color4f(1,1,1,1); diff --git a/indra/newview/llviewerdisplay.h b/indra/newview/llviewerdisplay.h index 2190021fe4..b97f75b233 100644 --- a/indra/newview/llviewerdisplay.h +++ b/indra/newview/llviewerdisplay.h @@ -40,6 +40,7 @@ void display_cleanup(); void display(BOOL rebuild = TRUE, F32 zoom_factor = 1.f, int subfield = 0, BOOL for_snapshot = FALSE); extern BOOL gDisplaySwapBuffers; +extern BOOL gDepthDirty; extern BOOL gTeleportDisplay; extern LLFrameTimer gTeleportDisplayTimer; extern BOOL gForceRenderLandFence; diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index 9bf392249e..176bf9273a 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -37,7 +37,7 @@ #include "llviewerjoint.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llmath.h" #include "llglheaders.h" #include "llrendersphere.h" @@ -272,12 +272,12 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass ) triangle_count += drawShape( pixelArea, first_pass); } // second pass writes to z buffer only - glColorMask(FALSE, FALSE, FALSE, FALSE); + gGL.setColorMask(false, false); { triangle_count += drawShape( pixelArea, FALSE ); } // third past respects z buffer and writes color - glColorMask(TRUE, TRUE, TRUE, FALSE); + gGL.setColorMask(true, false); { LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); triangle_count += drawShape( pixelArea, FALSE ); diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 9e5c207f7d..ce61c3a2cd 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -38,7 +38,7 @@ #include "llviewercontrol.h" #include "lldrawable.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llvoavatar.h" #include "llvolume.h" #include "pipeline.h" diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 19035e8fc8..d6032118c9 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -36,6 +36,7 @@ #include "imageids.h" #include "llfasttimer.h" +#include "llrender.h" #include "llagent.h" #include "llapr.h" @@ -545,17 +546,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass) else { glColor4f(0.7f, 0.6f, 0.3f, 1.f); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_INTERPOLATE_ARB); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB_ARB, GL_ONE_MINUS_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_LERP_TEX_ALPHA, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR); } } else if( mLayerSet ) @@ -573,12 +564,10 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass) else if ( mTexture.notNull() ) { - mTexture->bind(); - if (!mTexture->getClampS()) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - } - if (!mTexture->getClampT()) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + if (!mTexture->getClampS() || !mTexture->getClampT()) + { + mTexture->bind(); + mTexture->overrideClamp (TRUE, TRUE); } } else @@ -590,15 +579,8 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass) { if (isTransparent()) { - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); // GL_TEXTURE_ENV_COLOR is set in renderPass1 - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_CONST_ALPHA); } else { @@ -639,16 +621,13 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass) if (mTestImageName) { - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } - if (mTexture.notNull()) { - if (!mTexture->getClampS()) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - } - if (!mTexture->getClampT()) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - } + if (mTexture.notNull()) + { + mTexture->bind(); + mTexture->restoreClamp(); } return triangle_count; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 060b69db74..645499d943 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -700,7 +700,7 @@ void init_menus() gPopupMenuView->setBackgroundColor( color ); // If we are not in production, use a different color to make it apparent. - if (LLAppViewer::instance()->isInProductionGrid()) + if (LLViewerLogin::getInstance()->isInProductionGrid()) { color = gColors.getColor( "MenuBarBgColor" ); } @@ -722,7 +722,7 @@ void init_menus() gViewerWindow->getRootView()->addChild(gMenuHolder); gViewerWindow->setMenuBackgroundColor(false, - LLAppViewer::instance()->isInProductionGrid()); + LLViewerLogin::getInstance()->isInProductionGrid()); // *TODO:Get the cost info from the server const LLString upload_cost("10"); @@ -969,7 +969,7 @@ void init_client_menu(LLMenuGL* menu) #ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid()) + if (!LLViewerLogin::getInstance()->isInProductionGrid()) { menu->append(new LLMenuItemCheckGL("Hacked Godmode", &handle_toggle_hacked_godmode, @@ -1191,7 +1191,7 @@ void init_debug_ui_menu(LLMenuGL* menu) menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); menu->append(new LLMenuItemCallGL( "Print Selected Object Info", &print_object_info, NULL, NULL, 'P', MASK_CONTROL|MASK_SHIFT )); menu->append(new LLMenuItemCallGL( "Print Agent Info", &print_agent_nvpairs, NULL, NULL, 'P', MASK_SHIFT )); - menu->append(new LLMenuItemCallGL( "Texture Memory Stats", &output_statistics, NULL, NULL, 'M', MASK_SHIFT | MASK_ALT | MASK_CONTROL)); + menu->append(new LLMenuItemCallGL( "Memory Stats", &output_statistics, NULL, NULL, 'M', MASK_SHIFT | MASK_ALT | MASK_CONTROL)); menu->append(new LLMenuItemCheckGL("Double-Click Auto-Pilot", menu_toggle_control, NULL, menu_check_control, (void*)"DoubleClickAutoPilot")); @@ -1498,6 +1498,7 @@ void init_debug_avatar_menu(LLMenuGL* menu) menu->appendMenu(sub_menu); + menu->append(new LLMenuItemCheckGL("Enable Lip Sync (Beta)", menu_toggle_control, NULL, menu_check_control, (void*)"LipSyncEnabled")); menu->append(new LLMenuItemToggleGL("Tap-Tap-Hold To Run", &gAllowTapTapHoldRun)); menu->append(new LLMenuItemCallGL("Force Params to Default", &LLAgent::clearVisualParams, NULL)); menu->append(new LLMenuItemCallGL("Reload Vertex Shader", &reload_vertex_shader, NULL)); @@ -2762,7 +2763,7 @@ void set_god_level(U8 god_level) if(gViewerWindow) { gViewerWindow->setMenuBackgroundColor(god_level > GOD_NOT, - LLAppViewer::instance()->isInProductionGrid()); + LLViewerLogin::getInstance()->isInProductionGrid()); } LLString::format_map_t args; @@ -4099,7 +4100,7 @@ BOOL enable_take() return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { return TRUE; @@ -4656,7 +4657,7 @@ class LLObjectEnableDelete : public view_listener_t TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - (!LLAppViewer::instance()->isInProductionGrid() + (!LLViewerLogin::getInstance()->isInProductionGrid() && gAgent.isGodlike()) || # endif LLSelectMgr::getInstance()->canDoDelete(); @@ -6514,7 +6515,7 @@ class LLToolsEnableTakeCopy : public view_listener_t all_valid = true; #ifndef HACKED_GODLIKE_VIEWER # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (LLAppViewer::instance()->isInProductionGrid() + if (LLViewerLogin::getInstance()->isInProductionGrid() || !gAgent.isGodlike()) # endif { @@ -6618,7 +6619,7 @@ BOOL enable_save_into_inventory(void*) return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { return TRUE; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 477f6c35c1..4c8e75016c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5194,10 +5194,12 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) msg->getVector3("Data", "SimPosition", pos); msg->getVector3("Data", "LookAt", look_at); - // gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); - // LLFloaterWorldMap::show(NULL, TRUE); + gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); + LLFloaterWorldMap::show(NULL, TRUE); - LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); + // remove above two lines and replace with below line + // to re-enable parcel browser for llMapDestination() + // LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); } diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index b0ebc64b7a..fed98d5daa 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -33,8 +33,17 @@ #include "llviewerprecompiledheaders.h" #include "llviewernetwork.h" +#include "llviewercontrol.h" -LLGridData gGridInfo[GRID_INFO_COUNT] = +struct LLGridData +{ + const char* mLabel; + const char* mName; + const char* mLoginURI; + const char* mHelperURI; +}; + +static LLGridData gGridInfo[GRID_INFO_COUNT] = { { "None", "", "", ""}, { "Aditi", @@ -111,8 +120,192 @@ LLGridData gGridInfo[GRID_INFO_COUNT] = "" } }; -// Use this to figure out which domain name and login URI to use. +#if LL_RELEASE_FOR_DOWNLOAD + // Default userserver for production builds is agni + const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI; +#else + // Default userserver for development builds is none + const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_NONE; +#endif -EGridInfo gGridChoice = GRID_INFO_NONE; -LLString gGridName; /* Flawfinder: ignore */ unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ + +LLViewerLogin::LLViewerLogin() : + mGridChoice(DEFAULT_GRID_CHOICE) +{ +} + +void LLViewerLogin::setGridChoice(EGridInfo grid) +{ + if(grid < 0 || grid >= GRID_INFO_COUNT) + { + llerrs << "Invalid grid index specified." << llendl; + } + + if(mGridChoice != grid) + { + mGridChoice = grid; + if(GRID_INFO_LOCAL == mGridChoice) + { + mGridName = LOOPBACK_ADDRESS_STRING; + } + else if(GRID_INFO_OTHER == mGridChoice) + { + // *FIX:Mani - could this possibly be valid? + mGridName = "other"; + } + else + { + mGridName = gGridInfo[mGridChoice].mLabel; + } + + gSavedSettings.setS32("ServerChoice", mGridChoice); + gSavedSettings.setString("CustomServer", ""); + } +} + +void LLViewerLogin::setGridChoice(const std::string& grid_name) +{ + // Set the grid choice based on a string. + // The string can be: + // - a grid label from the gGridInfo table + // - an ip address + if(!grid_name.empty()) + { + // find the grid choice from the user setting. + int grid_index = GRID_INFO_NONE; + for(;grid_index < GRID_INFO_OTHER; ++grid_index) + { + if(0 == LLString::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name.c_str())) + { + // Founding a matching label in the list... + setGridChoice((EGridInfo)grid_index); + break; + } + } + + if(GRID_INFO_OTHER == grid_index) + { + // *FIX:MEP Can and should we validate that this is an IP address? + mGridChoice = GRID_INFO_OTHER; + mGridName = grid_name; + gSavedSettings.setS32("ServerChoice", mGridChoice); + gSavedSettings.setString("CustomServer", mGridName); + } + } +} + +void LLViewerLogin::resetURIs() +{ + // Clear URIs when picking a new server + gSavedSettings.setValue("CmdLineLoginURI", LLSD::emptyArray()); + gSavedSettings.setString("CmdLineHelperURI", ""); +} + +EGridInfo LLViewerLogin::getGridChoice() const +{ + return mGridChoice; +} + +std::string LLViewerLogin::getGridLabel() const +{ + if(mGridChoice == GRID_INFO_NONE) + { + return "None"; + } + else if(mGridChoice < GRID_INFO_OTHER) + { + return gGridInfo[mGridChoice].mLabel; + } + + return mGridName; +} + +std::string LLViewerLogin::getKnownGridLabel(EGridInfo grid_index) const +{ + if(grid_index > GRID_INFO_NONE && grid_index < GRID_INFO_OTHER) + { + return gGridInfo[grid_index].mLabel; + } + return gGridInfo[GRID_INFO_NONE].mLabel; +} + +void LLViewerLogin::getLoginURIs(std::vector& uris) const +{ + // return the login uri set on the command line. + LLControlVariable* c = gSavedSettings.getControl("CmdLineLoginURI"); + if(c) + { + LLSD v = c->getValue(); + if(v.isArray()) + { + for(LLSD::array_const_iterator itr = v.beginArray(); + itr != v.endArray(); ++itr) + { + std::string uri = itr->asString(); + if(!uri.empty()) + { + uris.push_back(uri); + } + } + } + else + { + std::string uri = v.asString(); + if(!uri.empty()) + { + uris.push_back(uri); + } + } + } + + // If there was no command line uri... + if(uris.empty()) + { + // If its a known grid choice, get the uri from the table, + // else try the grid name. + if(mGridChoice > GRID_INFO_NONE && mGridChoice < GRID_INFO_OTHER) + { + uris.push_back(gGridInfo[mGridChoice].mLoginURI); + } + else + { + uris.push_back(mGridName); + } + } +} + +std::string LLViewerLogin::getHelperURI() const +{ + std::string helper_uri = gSavedSettings.getString("CmdLineHelperURI"); + if (helper_uri.empty()) + { + // grab URI from selected grid + if(mGridChoice > GRID_INFO_NONE && mGridChoice < GRID_INFO_OTHER) + { + helper_uri = gGridInfo[mGridChoice].mHelperURI; + } + + if (helper_uri.empty()) + { + // what do we do with unnamed/miscellaneous grids? + // for now, operations that rely on the helper URI (currency/land purchasing) will fail + } + } + return helper_uri; +} + +bool LLViewerLogin::isInProductionGrid() +{ + // *NOTE:Mani This used to compare GRID_INFO_AGNI to gGridChoice, + // but it seems that loginURI trumps that. + std::vector uris; + getLoginURIs(uris); + LLString::toLower(uris[0]); + if((uris[0].find("agni") != std::string::npos)) + { + return true; + } + + return false; +} diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 4e6c874921..05bb703bbb 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -59,18 +59,44 @@ enum EGridInfo GRID_INFO_COUNT }; - -struct LLGridData +/** + * @brief A class to manage the viewer's login state. + * + **/ +class LLViewerLogin : public LLSingleton { - const char* mLabel; - const char* mName; - const char* mLoginURI; - const char* mHelperURI; -}; +public: + LLViewerLogin(); + + void setGridChoice(EGridInfo grid); + void setGridChoice(const std::string& grid_name); + void resetURIs(); + + /** + * @brief Get the enumeration of the grid choice. + * Should only return values > 0 && < GRID_INFO_COUNT + **/ + EGridInfo getGridChoice() const; -extern EGridInfo gGridChoice; -extern LLGridData gGridInfo[]; -extern LLString gGridName; /* Flawfinder: ignore */ + /** + * @brief Get a readable label for the grid choice. + * Returns the readable name for the grid choice. + * If the grid is 'other', returns something + * the string used to specifiy the grid. + **/ + std::string getGridLabel() const; + + std::string getKnownGridLabel(EGridInfo grid_index) const; + + void getLoginURIs(std::vector& uris) const; + std::string getHelperURI() const; + + bool isInProductionGrid(); + +private: + EGridInfo mGridChoice; + std::string mGridName; +}; const S32 MAC_ADDRESS_BYTES = 6; extern unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index af662d92aa..3a501a9045 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -94,7 +94,7 @@ #include "llworld.h" #include "llui.h" #include "pipeline.h" -#include "llappviewer.h" +#include "llviewernetwork.h" #include "llvowlsky.h" //#define DEBUG_UPDATE_TYPE @@ -292,7 +292,7 @@ void LLViewerObject::markDead() LLViewerObject *childp; while (mChildList.size() > 0) { - childp = mChildList[0]; + childp = mChildList.back(); if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR) { //llinfos << "Marking child " << childp->getLocalID() << " as dead." << llendl; @@ -307,7 +307,7 @@ void LLViewerObject::markDead() ((LLVOAvatar*)childp)->getOffObject(); childp->setParent(NULL); // LLViewerObject::markDead 2 } - mChildList.erase(mChildList.begin()); + mChildList.pop_back(); } if (mDrawable.notNull()) @@ -4217,13 +4217,15 @@ void LLViewerObject::updateDrawable(BOOL force_damped) { BOOL damped_motion = !isChanged(SHIFTED) && // not shifted between regions this frame and... - (force_damped || // ...forced into damped motion by application logic or... - (!isSelected() && // ...not selected and... - (mDrawable->isRoot() || // ... is root or ... - !((LLViewerObject*)getParent())->isSelected()) && // ... parent is not selected and ... + ( force_damped || // ...forced into damped motion by application logic or... + ( !isSelected() && // ...not selected and... + ( mDrawable->isRoot() || // ... is root or ... + (getParent() && !((LLViewerObject*)getParent())->isSelected())// ... parent is not selected and ... + ) && getPCode() == LL_PCODE_VOLUME && // ...is a volume object and... getVelocity().isExactlyZero() && // ...is not moving physically and... - mDrawable->getGeneration() != -1) // ...was not created this frame. + mDrawable->getGeneration() != -1 // ...was not created this frame. + ) ); gPipeline.markMoved(mDrawable, damped_motion); } @@ -4570,7 +4572,7 @@ BOOL LLViewerObject::permYouOwner() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4607,7 +4609,7 @@ BOOL LLViewerObject::permOwnerModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4631,7 +4633,7 @@ BOOL LLViewerObject::permModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4655,7 +4657,7 @@ BOOL LLViewerObject::permCopy() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4679,7 +4681,7 @@ BOOL LLViewerObject::permMove() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -4703,7 +4705,7 @@ BOOL LLViewerObject::permTransfer() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLAppViewer::instance()->isInProductionGrid() + if (!LLViewerLogin::getInstance()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 7a6f87e019..2345b4ea06 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -36,7 +36,7 @@ #include "message.h" #include "timing.h" #include "llfasttimer.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llviewercontrol.h" #include "llface.h" @@ -685,6 +685,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) idle_iter != idle_list.end(); idle_iter++) { objectp = *idle_iter; + llassert_always(objectp) ; if (!objectp->idleUpdate(agent, world, frame_time)) { // If Idle Update returns false, kill object! diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 0259d4896c..ba6a6005bf 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -100,15 +100,17 @@ void LLViewerParcelMedia::update(LLParcel* parcel) // we have a player if (parcel) { - // we're in a parcel - bool new_parcel = false; - S32 parcelid = parcel->getLocalID(); - if(!gAgent.getRegion()) { - llerrs << "gAgent's region is NULL." << llendl ; + sMediaRegionID = LLUUID() ; + stop() ; + return ; } + // we're in a parcel + bool new_parcel = false; + S32 parcelid = parcel->getLocalID(); + LLUUID regionid = gAgent.getRegion()->getRegionID(); if (parcelid != sMediaParcelLocalID || regionid != sMediaRegionID) { diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index 342d8c7222..2b056a2583 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -36,7 +36,7 @@ // indra includes #include "llparcel.h" #include "llgl.h" -#include "llglimmediate.h" +#include "llrender.h" #include "v4color.h" #include "v2math.h" @@ -71,7 +71,7 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_ mTexture = new LLImageGL(FALSE); mImageRaw = new LLImageRaw(mParcelGridsPerEdge, mParcelGridsPerEdge, OVERLAY_IMG_COMPONENTS); mTexture->createGLTexture(0, mImageRaw); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); mTexture->bind(0); mTexture->setClamp(TRUE, TRUE); mTexture->setMipFilterNearest(TRUE); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f5ea73f1fc..b847f4d04c 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -76,7 +76,74 @@ extern BOOL gNoRender; const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region const S16 MAX_MAP_DIST = 10; +class BaseCapabilitiesComplete : public LLHTTPClient::Responder +{ + LOG_CLASS(BaseCapabilitiesComplete); +public: + BaseCapabilitiesComplete(LLViewerRegion* region) + : mRegion(region) + { } + virtual ~BaseCapabilitiesComplete() + { + if(mRegion) + { + mRegion->setHttpResponderPtrNULL() ; + } + } + void setRegion(LLViewerRegion* region) + { + mRegion = region ; + } + + void error(U32 statusNum, const std::string& reason) + { + LL_WARNS2("AppInit", "Capabilities") << statusNum << ": " << reason << LL_ENDL; + + if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) + { + LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED ); + } + } + + void result(const LLSD& content) + { + if(!mRegion || this != mRegion->getHttpResponderPtr())//region is removed or responder is not created. + { + return ; + } + + LLSD::map_const_iterator iter; + for(iter = content.beginMap(); iter != content.endMap(); ++iter) + { + mRegion->setCapability(iter->first, iter->second); + LL_DEBUGS2("AppInit", "Capabilities") << "got capability for " + << iter->first << LL_ENDL; + + /* HACK we're waiting for the ServerReleaseNotes */ + if ((iter->first == "ServerReleaseNotes") && (LLFloaterReleaseMsg::sDisplayMessage)) + { + LLFloaterReleaseMsg::show(); + LLFloaterReleaseMsg::sDisplayMessage = false; + } + } + + if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) + { + LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED ); + } + } + + static boost::intrusive_ptr build( + LLViewerRegion* region) + { + return boost::intrusive_ptr( + new BaseCapabilitiesComplete(region)); + } + +private: + LLViewerRegion* mRegion; +}; LLViewerRegion::LLViewerRegion(const U64 &handle, @@ -103,7 +170,6 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mEventPoll(NULL) { mWidth = region_width_meters; - mOriginGlobal = from_region_handle(handle); updateRenderMatrix(); @@ -170,10 +236,13 @@ void LLViewerRegion::initStats() mAlive = FALSE; // can become false if circuit disconnects } - - LLViewerRegion::~LLViewerRegion() { + if(mHttpResponderPtr) + { + (static_cast(mHttpResponderPtr.get()))->setRegion(NULL) ; + } + gVLManager.cleanupData(this); // Can't do this on destruction, because the neighbor pointers might be invalid. // This should be reference counted... @@ -1303,87 +1372,6 @@ void LLViewerRegion::unpackRegionHandshake() msg->sendReliable(host); } - - -class BaseCapabilitiesComplete : public LLHTTPClient::Responder -{ - LOG_CLASS(BaseCapabilitiesComplete); -public: - BaseCapabilitiesComplete(LLViewerRegion* region, LLSD requestedCaps) - : mRegion(region), - mRequestedCaps(requestedCaps) - { } - - void error(U32 statusNum, const std::string& reason) - { - LL_WARNS2("AppInit", "Capabilities") << statusNum << ": " << reason << LL_ENDL; - - if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) - { - LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED ); - } - } - - void result(const LLSD& content) - { - LLSD::map_const_iterator iter; - - for(iter = content.beginMap(); iter != content.endMap(); ++iter) - { - if (iter->second.asString().empty()) - { - llwarns << "BaseCapabilitiesComplete::result EMPTY capability " - << iter->first << llendl; - continue; - } - - mRegion->setCapability(iter->first, iter->second); - LL_DEBUGS2("AppInit", "Capabilities") << "got capability for " - << iter->first << LL_ENDL; - - /* HACK we're waiting for the ServerReleaseNotes */ - if ((iter->first == "ServerReleaseNotes") && (LLFloaterReleaseMsg::sDisplayMessage)) - { - LLFloaterReleaseMsg::show(); - LLFloaterReleaseMsg::sDisplayMessage = false; - } - } - - LLSD::array_const_iterator fail; - for (fail = mRequestedCaps.beginArray(); - fail != mRequestedCaps.endArray(); - ++fail) - { - std::string cap = fail->asString(); - - if (mRegion->getCapability(cap).empty() && - !LLViewerRegion::isSpecialCapabilityName(cap)) - { - llwarns << "BaseCapabilitiesComplete::result FAILED to get " - << "capability " << cap << llendl; - } - } - - if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) - { - LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED ); - } - } - - static boost::intrusive_ptr build( - LLViewerRegion* region, - LLSD requestedCaps) - { - return boost::intrusive_ptr( - new BaseCapabilitiesComplete(region, requestedCaps)); - } - -private: - LLViewerRegion* mRegion; - LLSD mRequestedCaps; -}; - - void LLViewerRegion::setSeedCapability(const std::string& url) { if (getCapability("Seed") == url) @@ -1435,8 +1423,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url) llinfos << "posting to seed " << url << llendl; - LLHTTPClient::post(url, capabilityNames, - BaseCapabilitiesComplete::build(this, capabilityNames)); + mHttpResponderPtr = BaseCapabilitiesComplete::build(this) ; + LLHTTPClient::post(url, capabilityNames, mHttpResponderPtr); } void LLViewerRegion::setCapability(const std::string& name, const std::string& url) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index dedeb43523..d6e5e8320f 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -208,6 +208,9 @@ public: U32 getPacketsLost() const; + void setHttpResponderPtrNULL() {mHttpResponderPtr = NULL ;} + const LLHTTPClient::ResponderPtr getHttpResponderPtr() const {return mHttpResponderPtr ;} + // Get/set named capability URLs for this region. void setSeedCapability(const std::string& url); void setCapability(const std::string& name, const std::string& url); @@ -374,6 +377,8 @@ protected: private: //spatial partitions for objects in this region std::vector mObjectPartition; + + LLHTTPClient::ResponderPtr mHttpResponderPtr ; }; inline BOOL LLViewerRegion::getAllowDamage() const diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8f675e66e7..8f79253cf3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -43,7 +43,7 @@ #include "llviewquery.h" #include "llxmltree.h" //#include "llviewercamera.h" -#include "llglimmediate.h" +#include "llrender.h" #include "llvoiceclient.h" // for push-to-talk button handling @@ -182,6 +182,7 @@ #include "llviewerdisplay.h" #include "llspatialpartition.h" #include "llviewerjoystick.h" +#include "llviewernetwork.h" #if LL_WINDOWS #include "llwindebug.h" @@ -191,12 +192,12 @@ // // Globals // -void render_ui_and_swap_if_needed(); void render_ui_and_swap(); LLBottomPanel* gBottomPanel = NULL; extern BOOL gDebugClicks; extern BOOL gDisplaySwapBuffers; +extern BOOL gDepthDirty; extern BOOL gResizeScreenTexture; extern S32 gJamesInt; @@ -1638,7 +1639,7 @@ LLViewerWindow::LLViewerWindow( void LLViewerWindow::initGLDefaults() { - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); F32 ambient[4] = {0.f,0.f,0.f,0.f }; @@ -1656,7 +1657,7 @@ void LLViewerWindow::initGLDefaults() glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); glCullFace(GL_BACK); @@ -2198,7 +2199,7 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) // ...and set the menu color appropriately. setMenuBackgroundColor(gAgent.getGodLevel() > GOD_NOT, - LLAppViewer::instance()->isInProductionGrid()); + LLViewerLogin::getInstance()->isInProductionGrid()); } if ( gStatusBar ) @@ -2213,15 +2214,15 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) LLString::format_map_t args; LLColor4 new_bg_color; - if(god_mode && LLAppViewer::instance()->isInProductionGrid()) + if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid()) { new_bg_color = gColors.getColor( "MenuBarGodBgColor" ); } - else if(god_mode && !LLAppViewer::instance()->isInProductionGrid()) + else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) { new_bg_color = gColors.getColor( "MenuNonProductionGodBgColor" ); } - else if(!god_mode && !LLAppViewer::instance()->isInProductionGrid()) + else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) { new_bg_color = gColors.getColor( "MenuNonProductionBgColor" ); } @@ -3386,9 +3387,8 @@ void LLViewerWindow::hitObjectOrLandGlobalAsync(S32 x, S32 y_from_bot, MASK mask return; } - render_ui_and_swap_if_needed(); glClear(GL_DEPTH_BUFFER_BIT); - gDisplaySwapBuffers = FALSE; + gDepthDirty = TRUE; S32 scaled_x = llround((F32)x * mDisplayScale.mV[VX]); S32 scaled_y = llround((F32)y_from_bot * mDisplayScale.mV[VY]); @@ -3538,7 +3538,7 @@ void LLViewerWindow::hitUIElementAsync(S32 x, S32 y_from_bot, MASK mask, void (* const LLVector2& display_scale = getDisplayScale(); glScalef(display_scale.mV[VX], display_scale.mV[VY], 1.f); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); // make viewport big enough to handle antialiased frame buffers glViewport(x - (PICK_HALF_WIDTH + 2), y_from_bot - (PICK_HALF_WIDTH + 2), PICK_DIAMETER + 4, PICK_DIAMETER + 4); @@ -4281,7 +4281,8 @@ BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 p LLRect window_rect = mWindowRect; mWindowRect.set(0, h, w, 0); - gDisplaySwapBuffers = FALSE; + gDisplaySwapBuffers = FALSE; + gDepthDirty = TRUE; glClearColor(0.f, 0.f, 0.f, 0.f); glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); setup3DRender(); @@ -4349,6 +4350,7 @@ BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 p setup3DRender(); setupViewport(); gDisplaySwapBuffers = FALSE; + gDepthDirty = TRUE; // POST SNAPSHOT if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) @@ -4388,7 +4390,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei } // PRE SNAPSHOT - render_ui_and_swap_if_needed(); gDisplaySwapBuffers = FALSE; glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); @@ -4419,6 +4420,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei LLRect window_rect = mWindowRect; BOOL use_fbo = FALSE; + LLRenderTarget target; F32 scale_factor = 1.0f ; if(!keep_window_aspect) //image cropping { @@ -4427,37 +4429,39 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei snapshot_height = (S32)(ratio * image_height) ; scale_factor = llmax(1.0f, 1.0f / ratio) ; } - - LLRenderTarget target; - if (gGLManager.mHasFramebufferObject && - (image_width > window_width || - image_height > window_height) && - !show_ui && - keep_window_aspect) - { - GLint max_size = 0; - glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE_EXT, &max_size); - - if (image_width <= max_size && image_height <= max_size) - { - use_fbo = TRUE; - - snapshot_width = image_width; - snapshot_height = image_height; - target.allocate(snapshot_width, snapshot_height, GL_RGBA, TRUE, GL_TEXTURE_RECTANGLE_ARB, TRUE); - window_width = snapshot_width; - window_height = snapshot_height; - scale_factor = 1.f; - mWindowRect.set(0, 0, snapshot_width, snapshot_height); - target.bindTarget(); - } - else //tiling + else //the scene(window) proportion needs to be maintained. + { + if(image_width > window_width || image_height > window_height) //need to enlarge the scene { - F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; - snapshot_width = (S32)(ratio * image_width) ; - snapshot_height = (S32)(ratio * image_height) ; - scale_factor = llmax(1.0f, 1.0f / ratio) ; + if (gGLManager.mHasFramebufferObject && !show_ui) + { + GLint max_size = 0; + glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE_EXT, &max_size); + + if (image_width <= max_size && image_height <= max_size) //re-project the scene + { + use_fbo = TRUE; + + snapshot_width = image_width; + snapshot_height = image_height; + target.allocate(snapshot_width, snapshot_height, GL_RGBA, TRUE, GL_TEXTURE_RECTANGLE_ARB, TRUE); + window_width = snapshot_width; + window_height = snapshot_height; + scale_factor = 1.f; + mWindowRect.set(0, 0, snapshot_width, snapshot_height); + target.bindTarget(); + } + } + + if(!use_fbo) //no re-projection, so tiling the scene + { + F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; + snapshot_width = (S32)(ratio * image_width) ; + snapshot_height = (S32)(ratio * image_height) ; + scale_factor = llmax(1.0f, 1.0f / ratio) ; + } } + //else: keep the current scene scale, re-scale it if necessary after reading out. } S32 buffer_x_offset = llfloor(((window_width - snapshot_width) * scale_factor) / 2.f); @@ -4502,6 +4506,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei for (int subimage_x = 0; subimage_x < scale_factor; ++subimage_x) { gDisplaySwapBuffers = FALSE; + gDepthDirty = TRUE; if (type == SNAPSHOT_TYPE_OBJECT_ID) { glClearColor(0.f, 0.f, 0.f, 0.f); @@ -4585,6 +4590,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); } gDisplaySwapBuffers = FALSE; + gDepthDirty = TRUE; // POST SNAPSHOT if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 91c70bd315..2e001a50c7 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -37,7 +37,7 @@ #include "llvoavatar.h" -#include "llglimmediate.h" +#include "llrender.h" #include "audioengine.h" #include "imageids.h" #include "indra_constants.h" @@ -2750,7 +2750,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) { // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync - if ( voice_enabled && (gVoiceClient->lipSyncEnabled() > 0) && gVoiceClient->getIsSpeaking( mID ) ) + if ( voice_enabled && (gVoiceClient->lipSyncEnabled()) && gVoiceClient->getIsSpeaking( mID ) ) { F32 ooh_morph_amount = 0.0f; F32 aah_morph_amount = 0.0f; @@ -4158,23 +4158,23 @@ U32 LLVOAvatar::renderTransparent() BOOL first_pass = FALSE; if( isWearingWearableType( WT_SKIRT ) ) { - glAlphaFunc(GL_GREATER,0.25f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.25f); num_indices += mSkirtLOD.render(mAdjustedPixelArea, FALSE); first_pass = FALSE; - glAlphaFunc(GL_GREATER,0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } if (!mIsSelf || gAgent.needsRenderHead()) { if (LLPipeline::sImpostorRender) { - glAlphaFunc(GL_GREATER, 0.5f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); } num_indices += mEyeLashLOD.render(mAdjustedPixelArea, first_pass); num_indices += mHairLOD.render(mAdjustedPixelArea, FALSE); if (LLPipeline::sImpostorRender) { - glAlphaFunc(GL_GREATER, 0.01f); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } } @@ -4267,7 +4267,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color) up *= mImpostorDim.mV[1]; LLGLEnable test(GL_ALPHA_TEST); - glAlphaFunc(GL_GREATER, 0.f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); gGL.color4f(1,1,1,1); gGL.color4ubv(color.mV); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 4d4808cdff..b3b82d9c79 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -850,7 +850,7 @@ LLVoiceClient::LLVoiceClient() setCaptureDevice(captureDevice); std::string renderDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); setRenderDevice(renderDevice); - mLipSyncEnabled = gSavedSettings.getU32("LipSyncEnabled"); + mLipSyncEnabled = gSavedSettings.getBOOL("LipSyncEnabled"); mTuningMode = false; mTuningEnergy = 0.0f; @@ -1033,13 +1033,7 @@ void LLVoiceClient::userAuthorized(const std::string& firstName, const std::stri LL_INFOS("Voice") << "name \"" << mAccountDisplayName << "\" , ID " << agentID << LL_ENDL; - std::string gridname = gGridName; - LLString::toLower(gridname); - if((gGridChoice == GRID_INFO_AGNI) || - ((gGridChoice == GRID_INFO_OTHER) && (gridname.find("agni") != std::string::npos))) - { - sConnectingToAgni = true; - } + sConnectingToAgni = LLViewerLogin::getInstance()->isInProductionGrid(); // MBW -- XXX -- Enable this when the bhd.vivox.com server gets a real ssl cert. if(sConnectingToAgni) @@ -3632,12 +3626,12 @@ bool LLVoiceClient::voiceEnabled() return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); } -void LLVoiceClient::setLipSyncEnabled(U32 enabled) +void LLVoiceClient::setLipSyncEnabled(BOOL enabled) { mLipSyncEnabled = enabled; } -U32 LLVoiceClient::lipSyncEnabled() +BOOL LLVoiceClient::lipSyncEnabled() { if ( mVoiceEnabled && stateDisabled != getState() ) @@ -3646,7 +3640,7 @@ U32 LLVoiceClient::lipSyncEnabled() } else { - return 0; + return FALSE; } } diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 3ac5f0cdbf..8c3637830d 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -210,8 +210,8 @@ class LLVoiceClient: public LLSingleton void setMicGain(F32 volume); void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) void setVivoxDebugServerName(std::string &serverName); - void setLipSyncEnabled(U32 enabled); - U32 lipSyncEnabled(); + void setLipSyncEnabled(BOOL enabled); + BOOL lipSyncEnabled(); // PTT key triggering void keyDown(KEY key, MASK mask); @@ -518,7 +518,7 @@ class LLVoiceClient: public LLSingleton LLTimer mUpdateTimer; - U32 mLipSyncEnabled; + BOOL mLipSyncEnabled; typedef std::set observer_set_t; observer_set_t mObservers; diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp index a0286d3e4b..40e405a313 100644 --- a/indra/newview/llvoicevisualizer.cpp +++ b/indra/newview/llvoicevisualizer.cpp @@ -45,7 +45,7 @@ #include "llviewerimage.h" #include "llviewerimagelist.h" #include "llvoiceclient.h" -#include "llglimmediate.h" +#include "llrender.h" //brent's wave image //29de489d-0491-fb00-7dab-f9e686d31e83 @@ -94,7 +94,7 @@ static bool handleVoiceVisualizerPrefsChanged(const LLSD& newvalue) // Initialize the statics //------------------------------------------------------------------ bool LLVoiceVisualizer::sPrefsInitialized = false; -U32 LLVoiceVisualizer::sLipSyncEnabled = 0; +BOOL LLVoiceVisualizer::sLipSyncEnabled = FALSE; F32* LLVoiceVisualizer::sOoh = NULL; F32* LLVoiceVisualizer::sAah = NULL; U32 LLVoiceVisualizer::sOohs = 0; @@ -225,7 +225,7 @@ void LLVoiceVisualizer::setSpeakingAmplitude( F32 a ) //--------------------------------------------------- void LLVoiceVisualizer::setPreferences( ) { - sLipSyncEnabled = gSavedSettings.getU32("LipSyncEnabled"); + sLipSyncEnabled = gSavedSettings.getBOOL("LipSyncEnabled"); sOohAahRate = gSavedSettings.getF32("LipSyncOohAahRate"); std::string oohString = gSavedSettings.getString("LipSyncOoh"); @@ -290,7 +290,7 @@ void LLVoiceVisualizer::lipStringToF32s ( std::string& in_string, F32*& out_F32s //-------------------------------------------------------------------------- void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah ) { - if( ( sLipSyncEnabled == 1 ) && mCurrentlySpeaking ) + if( ( sLipSyncEnabled == TRUE ) && mCurrentlySpeaking ) { U32 transfer_index = (U32) (sOohPowerTransfersf * mSpeakingAmplitude); if (transfer_index < 0) diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h index bb2ce55d4a..72612d68c6 100644 --- a/indra/newview/llvoicevisualizer.h +++ b/indra/newview/llvoicevisualizer.h @@ -141,7 +141,7 @@ class LLVoiceVisualizer : public LLHUDEffect // private static members //--------------------------------------------------- - static U32 sLipSyncEnabled; // 0 disabled, 1 babble loop + static BOOL sLipSyncEnabled; // 0 disabled, 1 babble loop static bool sPrefsInitialized; // the first instance will initialize the static members static F32* sOoh; // the babble loop of amplitudes for the ooh morph static F32* sAah; // the babble loop of amplitudes for the ooh morph diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 8915ae799d..968cc69d3a 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -960,12 +960,12 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group) LLStrider colors; LLStrider indices; - buffer->getVertexStrider(vertices); - buffer->getNormalStrider(normals); - buffer->getTexCoordStrider(texcoords); - buffer->getTexCoord2Strider(texcoords2); - buffer->getColorStrider(colors); - buffer->getIndexStrider(indices); + llassert_always(buffer->getVertexStrider(vertices)); + llassert_always(buffer->getNormalStrider(normals)); + llassert_always(buffer->getTexCoordStrider(texcoords)); + llassert_always(buffer->getTexCoord2Strider(texcoords2)); + llassert_always(buffer->getColorStrider(colors)); + llassert_always(buffer->getIndexStrider(indices)); U32 indices_index = 0; U32 index_offset = 0; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a440ae2957..0117737225 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1841,7 +1841,7 @@ F32 LLVOVolume::getBinRadius() } else { - radius = 32.f; + radius = llmax(mDrawable->getRadius(), 32.f); } } else diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp index ff34fd27be..27a0155b14 100644 --- a/indra/newview/llwatchdog.cpp +++ b/indra/newview/llwatchdog.cpp @@ -33,6 +33,8 @@ #include "llviewerprecompiledheaders.h" #include "llwatchdog.h" +const U32 WATCHDOG_SLEEP_TIME_USEC = 1000000; + // This class runs the watchdog timing thread. class LLWatchdogTimerThread : public LLThread { @@ -74,6 +76,7 @@ LLWatchdogEntry::LLWatchdogEntry() LLWatchdogEntry::~LLWatchdogEntry() { + stop(); } void LLWatchdogEntry::start() @@ -87,8 +90,11 @@ void LLWatchdogEntry::stop() } // LLWatchdogTimeout +const std::string UNINIT_STRING = "uninitialized"; + LLWatchdogTimeout::LLWatchdogTimeout() : - mTimeout(0.0f) + mTimeout(0.0f), + mPingState(UNINIT_STRING) { } @@ -101,35 +107,46 @@ bool LLWatchdogTimeout::isAlive() const return (mTimer.getStarted() && !mTimer.hasExpired()); } +void LLWatchdogTimeout::reset() +{ + mTimer.setTimerExpirySec(mTimeout); +} + void LLWatchdogTimeout::setTimeout(F32 d) { mTimeout = d; } -void LLWatchdogTimeout::start() +void LLWatchdogTimeout::start(const std::string& state) { // Order of operation is very impmortant here. // After LLWatchdogEntry::start() is called // LLWatchdogTimeout::isAlive() will be called asynchronously. mTimer.start(); - mTimer.setTimerExpirySec(mTimeout); + ping(state); LLWatchdogEntry::start(); } + void LLWatchdogTimeout::stop() { LLWatchdogEntry::stop(); mTimer.stop(); } -void LLWatchdogTimeout::ping() +void LLWatchdogTimeout::ping(const std::string& state) { - mTimer.setTimerExpirySec(mTimeout); + if(!state.empty()) + { + mPingState = state; + } + reset(); } -// LlWatchdog +// LLWatchdog LLWatchdog::LLWatchdog() : mSuspectsAccessMutex(NULL), - mTimer(NULL) + mTimer(NULL), + mLastClockCount(0) { } @@ -139,55 +156,112 @@ LLWatchdog::~LLWatchdog() void LLWatchdog::add(LLWatchdogEntry* e) { - mSuspectsAccessMutex->lock(); + lockThread(); mSuspects.insert(e); - mSuspectsAccessMutex->unlock(); + unlockThread(); } void LLWatchdog::remove(LLWatchdogEntry* e) { - mSuspectsAccessMutex->lock(); + lockThread(); mSuspects.erase(e); - mSuspectsAccessMutex->unlock(); + unlockThread(); } void LLWatchdog::init() { - mSuspectsAccessMutex = new LLMutex(NULL); - mTimer = new LLWatchdogTimerThread(); - mTimer->setSleepTime(1000); - mTimer->start(); + if(!mSuspectsAccessMutex && !mTimer) + { + mSuspectsAccessMutex = new LLMutex(NULL); + mTimer = new LLWatchdogTimerThread(); + mTimer->setSleepTime(WATCHDOG_SLEEP_TIME_USEC / 1000); + mLastClockCount = LLTimer::getTotalTime(); + + // mTimer->start() kicks off the thread, any code after + // start needs to use the mSuspectsAccessMutex + mTimer->start(); + } } void LLWatchdog::cleanup() { - mTimer->stop(); - delete mTimer; - delete mSuspectsAccessMutex; + if(mTimer) + { + mTimer->stop(); + delete mTimer; + mTimer = NULL; + } + + if(mSuspectsAccessMutex) + { + delete mSuspectsAccessMutex; + mSuspectsAccessMutex = NULL; + } + + mLastClockCount = 0; } void LLWatchdog::run() { - mSuspectsAccessMutex->lock(); + lockThread(); + + // Check the time since the last call to run... + // If the time elapsed is two times greater than the regualr sleep time + // reset the active timeouts. + const U32 TIME_ELAPSED_MULTIPLIER = 2; + U64 current_time = LLTimer::getTotalTime(); + U64 current_run_delta = current_time - mLastClockCount; + mLastClockCount = current_time; - SuspectsRegistry::iterator result = - std::find_if(mSuspects.begin(), + if(current_run_delta > (WATCHDOG_SLEEP_TIME_USEC * TIME_ELAPSED_MULTIPLIER)) + { + llinfos << "Watchdog thread delayed: resetting entries." << llendl; + std::for_each(mSuspects.begin(), mSuspects.end(), - std::not1(std::mem_fun(&LLWatchdogEntry::isAlive)) + std::mem_fun(&LLWatchdogEntry::reset) ); - - if(result != mSuspects.end()) + } + else { - // error!!! - mTimer->stop(); + SuspectsRegistry::iterator result = + std::find_if(mSuspects.begin(), + mSuspects.end(), + std::not1(std::mem_fun(&LLWatchdogEntry::isAlive)) + ); + + if(result != mSuspects.end()) + { + // error!!! + if(mTimer) + { + mTimer->stop(); + } - llinfos << "Watchdog detected error:" << llendl; + llinfos << "Watchdog detected error:" << llendl; #ifdef LL_WINDOWS - RaiseException(0,0,0,0); + RaiseException(0,0,0,0); #else - raise(SIGQUIT); + raise(SIGQUIT); #endif + } + } + + + unlockThread(); +} + +void LLWatchdog::lockThread() +{ + if(mSuspectsAccessMutex != NULL) + { + mSuspectsAccessMutex->lock(); } +} - mSuspectsAccessMutex->unlock(); +void LLWatchdog::unlockThread() +{ + if(mSuspectsAccessMutex != NULL) + { + mSuspectsAccessMutex->unlock(); + } } diff --git a/indra/newview/llwatchdog.h b/indra/newview/llwatchdog.h index 0d897ca4c9..0bcf11c3a3 100644 --- a/indra/newview/llwatchdog.h +++ b/indra/newview/llwatchdog.h @@ -48,6 +48,7 @@ public: // This may mean that resources used by // isAlive and other method may need synchronization. virtual bool isAlive() const = 0; + virtual void reset() = 0; virtual void start(); virtual void stop(); }; @@ -59,15 +60,18 @@ public: virtual ~LLWatchdogTimeout(); /* virtual */ bool isAlive() const; - /* virtual */ void start(); + /* virtual */ void reset(); + /* virtual */ void start(const std::string& state); /* virtual */ void stop(); void setTimeout(F32 d); - void ping(); + void ping(const std::string& state); + const std::string& getState() {return mPingState; } private: LLTimer mTimer; F32 mTimeout; + std::string mPingState; }; class LLWatchdogTimerThread; // Defined in the cpp @@ -86,10 +90,14 @@ public: void cleanup(); private: + void lockThread(); + void unlockThread(); + typedef std::set SuspectsRegistry; SuspectsRegistry mSuspects; LLMutex* mSuspectsAccessMutex; LLWatchdogTimerThread* mTimer; + U64 mLastClockCount; }; #endif // LL_LLTHREADWATCHDOG_H diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index a6fbe71d67..2853860802 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -407,7 +407,7 @@ F32 LLWaterParamManager::getFogDensity(void) F32 fogDensity = mCurParams.getFloat("waterFogDensity", err); // modify if we're underwater - const F32 water_height = gAgent.getRegion()->getWaterHeight(); + const F32 water_height = gAgent.getRegion() ? gAgent.getRegion()->getWaterHeight() : 0.f; F32 camera_height = gAgent.getCameraPositionAgent().mV[2]; if(camera_height <= water_height) { diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index af554e5160..f084088478 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -846,7 +846,7 @@ struct LLWearableSaveData void LLWearable::saveNewAsset() { // llinfos << "LLWearable::saveNewAsset() type: " << getTypeName() << llendl; - //dump(); + //llinfos << *this << llendl; char new_asset_id_string[UUID_STR_LENGTH]; /* Flawfinder: ignore */ mAssetID.toString(new_asset_id_string); @@ -949,31 +949,32 @@ BOOL LLWearable::isMatchedToInventoryItem( LLViewerInventoryItem* item ) ( mSaleInfo == item->getSaleInfo() ); } -void LLWearable::dump() +std::ostream& operator<<(std::ostream &s, const LLWearable &w) { - llinfos << "wearable " << LLWearable::typeToTypeName( mType ) << llendl; - llinfos << " Name: " << mName << llendl; - llinfos << " Desc: " << mDescription << llendl; - //mPermissions - //mSaleInfo + s << "wearable " << LLWearable::typeToTypeName( w.mType ) << "\n"; + s << " Name: " << w.mName << "\n"; + s << " Desc: " << w.mDescription << "\n"; + //w.mPermissions + //w.mSaleInfo - llinfos << " Params:" << llendl; - for (param_map_t::iterator iter = mVisualParamMap.begin(); - iter != mVisualParamMap.end(); ++iter) + s << " Params:" << "\n"; + for (LLWearable::param_map_t::const_iterator iter = w.mVisualParamMap.begin(); + iter != w.mVisualParamMap.end(); ++iter) { S32 param_id = iter->first; F32 param_weight = iter->second; - llinfos << " " << param_id << " " << param_weight << llendl; + s << " " << param_id << " " << param_weight << "\n"; } - llinfos << " Textures:" << llendl; - for (te_map_t::iterator iter = mTEMap.begin(); - iter != mTEMap.end(); ++iter) + s << " Textures:" << "\n"; + for (LLWearable::te_map_t::const_iterator iter = w.mTEMap.begin(); + iter != w.mTEMap.end(); ++iter) { S32 te = iter->first; - LLUUID& image_id = iter->second; - llinfos << " " << te << " " << image_id << llendl; + const LLUUID& image_id = iter->second; + s << " " << te << " " << image_id << "\n"; } + return s; } diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index fb66663fc2..059444d941 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -118,7 +118,7 @@ public: static void setCurrentDefinitionVersion( S32 version ) { LLWearable::sCurrentDefinitionVersion = version; } - void dump(); + friend std::ostream& operator<<(std::ostream &s, const LLWearable &w); private: static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml. diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 3ec5737acf..7fca271d3d 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -57,13 +57,15 @@ struct LLWearableArrivedData mAssetType( asset_type ), mCallback( asset_arrived_callback ), mUserdata( userdata ), - mName( wearable_name ) + mName( wearable_name ), + mRetries(0) {} LLAssetType::EType mAssetType; void (*mCallback)(LLWearable*, void* userdata); void* mUserdata; LLString mName; + S32 mRetries; }; @@ -99,12 +101,12 @@ void LLWearableList::getAsset( const LLAssetID& assetID, const LLString& wearabl // static void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status ) { - BOOL success = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; - + LLWearable* wearable = NULL; // NULL indicates failure + if( !filename ) { - llinfos << "Bad Wearable Asset: missing file." << llendl; + LL_WARNS("Wearable") << "Bad Wearable Asset: missing file." << LL_ENDL; } else if( status >= 0 ) @@ -113,38 +115,16 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID LLFILE* fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ if( !fp ) { - llinfos << "Bad Wearable Asset: unable to open file: '" << filename << "'" << llendl; + LL_WARNS("Wearable") << "Bad Wearable Asset: unable to open file: '" << filename << "'" << LL_ENDL; } else { - LLWearable *wearable = new LLWearable(uuid); - if( wearable->importFile( fp ) ) - { -// llinfos << "processGetAssetReply()" << llendl; -// wearable->dump(); - - gWearableList.mList[ uuid ] = wearable; - if( data->mCallback ) - { - data->mCallback( wearable, data->mUserdata ); - } - success = TRUE; - } - else + wearable = new LLWearable(uuid); + bool res = wearable->importFile( fp ); + if (!res) { - LLString::format_map_t args; - // *TODO:translate - args["[TYPE]"] = LLAssetType::lookupHumanReadable(data->mAssetType); - if (data->mName.empty()) - { - LLNotifyBox::showXml("FailedToLoadWearableUnnamed", args); - } - else - { - args["[DESC]"] = data->mName; - LLNotifyBox::showXml("FailedToLoadWearable", args); - } delete wearable; + wearable = NULL; } fclose( fp ); @@ -162,44 +142,64 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID } LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); - llwarns << "Wearable download failed: " << LLAssetStorage::getErrorString( status ) << " " << uuid << llendl; + LL_WARNS("Wearable") << "Wearable download failed: " << LLAssetStorage::getErrorString( status ) << " " << uuid << LL_ENDL; switch( status ) { case LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE: { - LLString::format_map_t args; - // *TODO:translate - args["[TYPE]"] = LLAssetType::lookupHumanReadable(data->mAssetType); - if (data->mName.empty()) + // Fail + break; + } + default: + { + static const S32 MAX_RETRIES = 3; + if (data->mRetries < MAX_RETRIES) { - LLNotifyBox::showXml("FailedToFindWearableUnnamed", args); + // Try again + data->mRetries++; + gAssetStorage->getAssetData(uuid, + data->mAssetType, + LLWearableList::processGetAssetReply, + userdata); // re-use instead of deleting. + return; } else { - args["[DESC]"] = data->mName; - LLNotifyBox::showXml("FailedToFindWearable", args); + // Fail + break; } - - // Asset does not exist in the database. - // Can't load asset, so return NULL - if( data->mCallback ) - { - data->mCallback( NULL, data->mUserdata ); - } - break; - } - default: - { - // Try again - gAssetStorage->getAssetData(uuid, - data->mAssetType, - LLWearableList::processGetAssetReply, - userdata); // re-use instead of deleting. - return; } } } + if (wearable) // success + { + gWearableList.mList[ uuid ] = wearable; + LL_DEBUGS("Wearable") << "processGetAssetReply()" << LL_ENDL; + LL_DEBUGS("Wearable") << wearable << LL_ENDL; + } + else + { + LLString::format_map_t args; + // *TODO:translate + args["[TYPE]"] = LLAssetType::lookupHumanReadable(data->mAssetType); + if (data->mName.empty()) + { + LLNotifyBox::showXml("FailedToFindWearableUnnamed", args); + } + else + { + args["[DESC]"] = data->mName; + LLNotifyBox::showXml("FailedToFindWearable", args); + } + } + // Always call callback; wearable will be NULL if we failed + { + if( data->mCallback ) + { + data->mCallback( wearable, data->mUserdata ); + } + } delete data; } diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 3068f2cbb1..7a2acbb094 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1113,7 +1113,7 @@ void send_agent_pause() { // *NOTE:Mani Pausing the mainloop timeout. Otherwise a long modal event may cause // the thread monitor to timeout. - LLAppViewer::instance()->stopMainloopTimeout(); + LLAppViewer::instance()->pauseMainloopTimeout(); // Note: used to check for LLWorld initialization before it became a singleton. // Rather than just remove this check I'm changing it to assure that the message @@ -1171,7 +1171,7 @@ void send_agent_resume() // Reset the FPS counter to avoid an invalid fps LLViewerStats::getInstance()->mFPSStat.start(); - LLAppViewer::instance()->startMainloopTimeout(); + LLAppViewer::instance()->resumeMainloopTimeout(); } diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index 16b277f6a6..1dd08604cd 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -161,6 +161,11 @@ void LLWorldMap::reset() mNeighborMapWidth = 0; mNeighborMapHeight = 0; + + for (S32 i=0; imAlpha; gGL.color4f(1.f, 1.0f, 1.0f, alpha); @@ -573,8 +573,8 @@ void LLWorldMapView::draw() { // draw an alpha of 1 where the sims are visible (except NULL sims) gGL.flush(); - gGL.blendFunc(GL_ONE, GL_ZERO); - glColorMask(FALSE, FALSE, FALSE, TRUE); + gGL.setSceneBlendType(LLRender::BT_REPLACE); + gGL.setColorMask(false, true); gGL.color4f(1.f, 1.f, 1.f, 1.f); LLGLSNoTexture gls_no_texture; @@ -586,14 +586,14 @@ void LLWorldMapView::draw() gGL.end(); gGL.flush(); - glColorMask(TRUE, TRUE, TRUE, TRUE); + gGL.setColorMask(true, true); } } if (info->mAccess == SIM_ACCESS_DOWN) { // Draw a transparent red square over down sims - gGL.blendFunc(GL_DST_ALPHA, GL_SRC_ALPHA); + gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_SOURCE_ALPHA); gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f); LLGLSNoTexture gls_no_texture; @@ -610,7 +610,7 @@ void LLWorldMapView::draw() && info->mAccess > SIM_ACCESS_PG && gAgent.isTeen()) { - gGL.blendFunc(GL_DST_ALPHA, GL_ZERO); + gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); LLGLSNoTexture gls_no_texture; gGL.color3f(1.f, 0.f, 0.f); @@ -686,14 +686,14 @@ void LLWorldMapView::draw() LLGLSUIDefault gls_ui; { LLGLSNoTexture gls_no_texture; - glAlphaFunc(GL_GEQUAL, 0.0f); - gGL.blendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); + gGL.blendFunc(LLRender::BF_ONE_MINUS_DEST_ALPHA, LLRender::BF_DEST_ALPHA); gGL.color4fv( mBackgroundColor.mV ); gl_rect_2d(0, height, width, 0); } - glAlphaFunc(GL_GEQUAL, 0.01f); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.setSceneBlendType(LLRender::BT_ALPHA); // Infohubs if (gSavedSettings.getBOOL("MapShowInfohubs")) //(gMapScale >= sThresholdB) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 18b99d8b74..643c1ec055 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -50,7 +50,7 @@ #include "v3color.h" #include "llui.h" #include "llglheaders.h" -#include "llglimmediate.h" +#include "llrender.h" // newview includes #include "llagent.h" @@ -108,8 +108,6 @@ //#define DEBUG_INDICES #endif -void render_ui_and_swap_if_needed(); - const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f; const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f; @@ -506,11 +504,7 @@ void LLPipeline::createGLBuffers() res = 128; mCubeBuffer = new LLCubeMap(); mCubeBuffer->initGL(); - glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, mCubeBuffer->getGLName()); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + mCubeBuffer->setReflection(); for (U32 i = 0; i < 6; i++) { @@ -1180,7 +1174,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl LLGLDisable test(GL_ALPHA_TEST); LLViewerImage::unbindTexture(0, GL_TEXTURE_2D); - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + gGL.setColorMask(false, false); LLGLDepthTest depth(GL_TRUE, GL_FALSE); for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); @@ -1238,7 +1232,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl sCull->pushDrawable(gSky.mVOGroundp->mDrawable); } - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); glPopMatrix(); if (to_texture) @@ -1315,11 +1309,11 @@ void LLPipeline::doOcclusion(LLCamera& camera) LLVertexBuffer::unbind(); if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCCLUSION)) { - glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); + gGL.setColorMask(true, false, false, false); } else { - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + gGL.setColorMask(false, false); } LLGLDisable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); @@ -1336,7 +1330,7 @@ void LLPipeline::doOcclusion(LLCamera& camera) } } - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); glFlush(); } @@ -1550,10 +1544,8 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) assertInitialized(); - //do a swap to indicate an invalid previous frame camera - render_ui_and_swap_if_needed(); glClear(GL_DEPTH_BUFFER_BIT); - gDisplaySwapBuffers = FALSE; + gDepthDirty = FALSE; for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin(); iter != mShiftList.end(); iter++) @@ -1978,7 +1970,10 @@ void LLPipeline::postSort(LLCamera& camera) } } - //build render map + //rebuild groups + sCull->assertDrawMapsEmpty(); + + LLSpatialGroup::sNoDelete = FALSE; for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) { LLSpatialGroup* group = *i; @@ -1989,6 +1984,18 @@ void LLPipeline::postSort(LLCamera& camera) } group->rebuildGeom(); + } + LLSpatialGroup::sNoDelete = TRUE; + + //build render map + for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) + { + LLSpatialGroup* group = *i; + if (sUseOcclusion && + group->isState(LLSpatialGroup::OCCLUDED)) + { + continue; + } for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j) { @@ -2117,6 +2124,8 @@ void LLPipeline::postSort(LLCamera& camera) } func; LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func); } + + LLSpatialGroup::sNoDelete = FALSE; } @@ -2507,7 +2516,7 @@ void LLPipeline::renderDebug() gGLLastMatrix = NULL; glLoadMatrixd(gGLModelView); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); // Debug stuff. for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); @@ -2578,7 +2587,7 @@ void LLPipeline::renderForSelect(std::set& objects) { assertInitialized(); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); + gGL.setColorMask(true, false); gPipeline.resetDrawOrders(); for (std::set::iterator iter = objects.begin(); iter != objects.end(); ++iter) @@ -2629,25 +2638,15 @@ void LLPipeline::renderForSelect(std::set& objects) LLGLEnable alpha_test(GL_ALPHA_TEST); if (gPickTransparent) { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); } else { - glAlphaFunc(GL_GREATER, 0.2f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.2f); } - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_MODULATE); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PRIMARY_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA); - - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PRIMARY_COLOR_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); U32 prim_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD; @@ -2748,11 +2747,11 @@ void LLPipeline::renderForSelect(std::set& objects) glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]); } - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); LLVertexBuffer::unbind(); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); } void LLPipeline::renderFaceForUVSelect(LLFace* facep) @@ -4127,10 +4126,7 @@ void LLPipeline::generateReflectionMap(LLCubeMap* cube_map, LLCamera& cube_cam) glGetTexLevelParameteriv(GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 0, GL_TEXTURE_WIDTH, &width); if (width != res) { - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + cube_map->setReflection(); for (U32 i = 0; i < 6; i++) { @@ -4211,9 +4207,9 @@ void LLPipeline::generateReflectionMap(LLCubeMap* cube_map, LLCamera& cube_cam) gPipeline.stateSort(cube_cam, result); glClearColor(0,0,0,0); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + gGL.setColorMask(true, true); glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_FALSE); + gGL.setColorMask(true, false); stop_glerror(); gPipeline.renderGeom(cube_cam); } @@ -4329,7 +4325,7 @@ void LLPipeline::blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out) U32 res = (U32) gSavedSettings.getS32("RenderReflectionRes"); enableLightsFullbright(LLColor4::white); LLGLDepthTest depth(GL_FALSE); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); @@ -4343,10 +4339,7 @@ void LLPipeline::blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out) glGetTexLevelParameteriv(GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 0, GL_TEXTURE_WIDTH, &width); if (width != res) { - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + cube_out->setReflection(); for (U32 i = 0; i < 6; i++) { @@ -4373,7 +4366,7 @@ void LLPipeline::blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out) stop_glerror(); glViewport(0,0,res, res); - gGL.blendFunc(GL_ONE, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD); cube_in->enableTexture(0); //3-axis blur for (U32 j = 0; j < 3; j++) @@ -4403,7 +4396,7 @@ void LLPipeline::blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out) gl_cube_face[i], j < 2 ? mBlurCubeTexture[j] : cube_out->getGLName(), 0); validate_framebuffer_object(); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + gGL.setColorMask(true, true); glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); apply_cube_face_rotation(i); @@ -4423,7 +4416,7 @@ void LLPipeline::blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out) glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_FALSE); + gGL.setColorMask(true, false); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); @@ -4431,7 +4424,7 @@ void LLPipeline::blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out) cube_in->disableTexture(); gViewerWindow->setupViewport(); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); LLGLState::checkStates(); LLGLState::checkTextureChannels(); @@ -4472,7 +4465,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot) tc2 /= (F32) res_mod; } - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); LLFastTimer ftm(LLFastTimer::FTM_RENDER_BLOOM); gGL.color4f(1,1,1,1); @@ -4491,7 +4484,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot) LLGLDisable test(GL_ALPHA_TEST); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); glClearColor(0,0,0,0); if (for_snapshot) @@ -4503,7 +4496,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot) //glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); //LLGLDisable blend(GL_BLEND); LLGLEnable blend(GL_BLEND); - gGL.blendFunc(GL_ONE, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD); tc2.setVec(1,1); gGL.begin(LLVertexBuffer::TRIANGLE_STRIP); gGL.color4f(1,1,1,1); @@ -4521,7 +4514,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot) gGL.end(); gGL.flush(); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } gGL.flush(); @@ -4553,8 +4546,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot) gGlowExtractProgram.uniform1f("warmthAmount", warmthAmount); LLGLEnable blend_on(GL_BLEND); LLGLEnable test(GL_ALPHA_TEST); - glAlphaFunc(GL_GREATER, 0.f); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE); + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); LLViewerImage::unbindTexture(0, GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D); @@ -4764,24 +4757,16 @@ void LLPipeline::renderBloom(BOOL for_snapshot) LLGLDisable blend(GL_BLEND); //tex unit 0 - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_REPLACE); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_COLOR); mGlow[1].bindTexture(); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2, GL_FLOAT, 0, uv0); - glActiveTextureARB(GL_TEXTURE1_ARB); + gGL.getTexUnit(1)->activate(); glEnable(GL_TEXTURE_RECTANGLE_ARB); //tex unit 1 - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_ADD); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_ARB, GL_PREVIOUS_ARB); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB_ARB, GL_SRC_COLOR); - glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_ARB, GL_TEXTURE); - glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB_ARB, GL_SRC_COLOR); + gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_ADD, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR); glClientActiveTextureARB(GL_TEXTURE1_ARB); glEnableClientState(GL_TEXTURE_COORD_ARRAY); @@ -4796,14 +4781,14 @@ void LLPipeline::renderBloom(BOOL for_snapshot) glDisable(GL_TEXTURE_RECTANGLE_ARB); glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT); glClientActiveTextureARB(GL_TEXTURE0_ARB); - glActiveTextureARB(GL_TEXTURE0_ARB); + gGL.getTexUnit(0)->activate(); glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); @@ -4891,11 +4876,11 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) { //generate planar reflection map LLViewerImage::unbindTexture(0, GL_TEXTURE_2D); glClearColor(0,0,0,0); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + gGL.setColorMask(true, true); mWaterRef.bindTarget(); mWaterRef.getViewport(gGLViewport); mWaterRef.clear(); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_FALSE); + gGL.setColorMask(true, false); stop_glerror(); @@ -4997,11 +4982,11 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLViewerImage::unbindTexture(0, GL_TEXTURE_2D); LLColor4& col = LLDrawPoolWater::sWaterFogColor; glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + gGL.setColorMask(true, true); mWaterDis.bindTarget(); mWaterDis.getViewport(gGLViewport); mWaterDis.clear(); - glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_FALSE); + gGL.setColorMask(true, false); if (!LLPipeline::sUnderWaterRender || LLDrawPoolWater::sNeedsReflectionUpdate) { @@ -5176,7 +5161,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) glh_set_current_modelview(mat); glClearColor(0.0f,0.0f,0.0f,0.0f); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); glStencilMask(0xFFFFFFFF); glClearStencil(0); @@ -5223,14 +5208,14 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) if (muted) { - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + gGL.setColorMask(true, true); } else { - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); + gGL.setColorMask(false, true); } - gGL.blendFunc(GL_ONE, GL_ONE); + gGL.setSceneBlendType(LLRender::BT_ADD); LLImageGL::unbindTexture(0, GL_TEXTURE_2D); LLGLDepthTest depth(GL_FALSE, GL_FALSE); @@ -5246,7 +5231,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) gGL.flush(); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + gGL.setSceneBlendType(LLRender::BT_ALPHA); } -- cgit v1.2.3