summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt4
-rw-r--r--indra/cmake/00-Common.cmake4
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake18
-rw-r--r--indra/cmake/FMOD.cmake14
-rw-r--r--indra/cmake/FindAutobuild.cmake10
-rw-r--r--indra/cmake/FindGLH.cmake30
-rw-r--r--indra/cmake/FindJsonCpp.cmake4
-rw-r--r--indra/cmake/FindLLQtWebkit.cmake2
-rw-r--r--indra/cmake/FindZLIB.cmake6
-rw-r--r--indra/cmake/GLH.cmake11
-rw-r--r--indra/cmake/GoogleMock.cmake2
-rw-r--r--indra/cmake/GooglePerfTools.cmake2
-rw-r--r--indra/cmake/LLPlugin.cmake4
-rw-r--r--indra/cmake/LLPrimitive.cmake2
-rw-r--r--indra/cmake/LLRender.cmake2
-rw-r--r--indra/cmake/LLSharedLibs.cmake24
-rw-r--r--indra/cmake/LScript.cmake2
-rw-r--r--indra/cmake/Linking.cmake29
-rw-r--r--indra/cmake/NDOF.cmake20
-rw-r--r--indra/cmake/OpenSSL.cmake2
-rw-r--r--indra/cmake/WebKitLibPlugin.cmake22
-rw-r--r--indra/fix-incredibuild.py23
-rw-r--r--indra/integration_tests/llimage_libtest/CMakeLists.txt6
-rw-r--r--indra/integration_tests/llimage_libtest/llimage_libtest.cpp4
-rw-r--r--indra/integration_tests/llui_libtest/CMakeLists.txt1
-rw-r--r--indra/lib/python/indra/base/cllsd_test.py22
-rw-r--r--indra/lib/python/indra/base/lluuid.py6
-rw-r--r--indra/lib/python/indra/ipc/httputil.py21
-rw-r--r--indra/lib/python/indra/ipc/russ.py2
-rw-r--r--indra/lib/python/indra/ipc/siesta_test.py21
-rw-r--r--indra/lib/python/uuid.py21
-rw-r--r--indra/linux_crash_logger/CMakeLists.txt1
-rw-r--r--indra/linux_crash_logger/linux_crash_logger.cpp14
-rw-r--r--indra/linux_crash_logger/llcrashloggerlinux.cpp8
-rw-r--r--indra/linux_crash_logger/llcrashloggerlinux.h1
-rw-r--r--indra/llcharacter/CMakeLists.txt12
-rw-r--r--indra/llcommon/CMakeLists.txt6
-rw-r--r--indra/llcommon/indra_constants.h2
-rw-r--r--indra/llcommon/llaccountingcost.h (renamed from indra/llcommon/llaccountingquota.h)24
-rw-r--r--indra/llcommon/llassettype.cpp3
-rw-r--r--indra/llcommon/llassettype.h8
-rw-r--r--indra/llcommon/llerror.cpp2
-rw-r--r--indra/llcommon/llerror.h14
-rw-r--r--indra/llcommon/lleventapi.cpp30
-rw-r--r--indra/llcommon/lleventapi.h83
-rw-r--r--indra/llcommon/llevents.cpp11
-rw-r--r--indra/llcommon/lleventtimer.cpp20
-rw-r--r--indra/llcommon/llfasttimer_class.cpp56
-rw-r--r--indra/llcommon/llfasttimer_class.h2
-rw-r--r--indra/llcommon/llinstancetracker.cpp19
-rw-r--r--indra/llcommon/llinstancetracker.h260
-rw-r--r--indra/llcommon/llmemory.cpp1919
-rw-r--r--indra/llcommon/llmemory.h343
-rw-r--r--indra/llcommon/llpreprocessor.h1
-rw-r--r--indra/llcommon/llqueuedthread.cpp7
-rw-r--r--indra/llcommon/llqueuedthread.h2
-rw-r--r--indra/llcommon/llsd.cpp212
-rw-r--r--indra/llcommon/llsd.h130
-rw-r--r--indra/llcommon/llsdserialize_xml.cpp32
-rw-r--r--indra/llcommon/llsingleton.h38
-rw-r--r--indra/llcommon/llstring.cpp13
-rw-r--r--indra/llcommon/llsys.cpp614
-rw-r--r--indra/llcommon/llsys.h22
-rw-r--r--indra/llcommon/llthread.cpp3
-rw-r--r--indra/llcommon/llversionviewer.h6
-rw-r--r--indra/llcommon/llworkerthread.cpp4
-rw-r--r--indra/llcommon/llworkerthread.h2
-rw-r--r--indra/llcommon/stdenums.h5
-rw-r--r--indra/llcommon/tests/llinstancetracker_test.cpp87
-rw-r--r--indra/llcommon/tests/llsdserialize_test.cpp508
-rw-r--r--indra/llcommon/tests/llsingleton_test.cpp76
-rw-r--r--indra/llcommon/tests/llstring_test.cpp8
-rw-r--r--indra/llcommon/tests/setpython.py19
-rw-r--r--indra/llcrashlogger/llcrashlogger.cpp104
-rw-r--r--indra/llcrashlogger/llcrashlogger.h14
-rw-r--r--indra/llimage/llimage.cpp42
-rw-r--r--indra/llimage/llimage.h14
-rw-r--r--indra/llimage/llimagedxt.cpp3
-rw-r--r--indra/llimage/llimagej2c.cpp5
-rw-r--r--indra/llinventory/CMakeLists.txt18
-rw-r--r--indra/llinventory/lleconomy.cpp27
-rw-r--r--indra/llinventory/lleconomy.h16
-rw-r--r--indra/llinventory/llinventory.cpp3
-rw-r--r--indra/llinventory/llinventorytype.cpp5
-rw-r--r--indra/llinventory/llinventorytype.h3
-rw-r--r--indra/llinventory/llparcel.cpp9
-rw-r--r--indra/llinventory/llparcel.h5
-rw-r--r--indra/llkdu/CMakeLists.txt2
-rw-r--r--indra/llmath/CMakeLists.txt4
-rw-r--r--indra/llmath/llcalc.cpp25
-rw-r--r--indra/llmath/llcalc.h23
-rw-r--r--indra/llmath/llcalcparser.cpp23
-rw-r--r--indra/llmath/llcalcparser.h23
-rw-r--r--indra/llmath/llmath.h7
-rw-r--r--indra/llmath/lloctree.h2
-rw-r--r--indra/llmath/llv4math.h141
-rw-r--r--indra/llmath/llv4matrix3.h220
-rw-r--r--indra/llmath/llv4matrix4.h249
-rw-r--r--indra/llmath/llv4vector3.h80
-rw-r--r--indra/llmath/llvolume.cpp291
-rw-r--r--indra/llmath/llvolume.h8
-rw-r--r--indra/llmath/tests/v3math_test.cpp18
-rw-r--r--indra/llmessage/CMakeLists.txt2
-rw-r--r--indra/llmessage/llassetstorage.cpp30
-rw-r--r--indra/llmessage/llcurl.cpp290
-rw-r--r--indra/llmessage/llcurl.h138
-rw-r--r--indra/llmessage/llfiltersd2xmlrpc.cpp12
-rw-r--r--indra/llmessage/llhttpassetstorage.cpp5
-rw-r--r--indra/llmessage/llhttpclient.cpp5
-rw-r--r--indra/llmessage/lliohttpserver.cpp9
-rw-r--r--indra/llmessage/lliosocket.cpp8
-rw-r--r--indra/llmessage/lliosocket.h14
-rw-r--r--indra/llmessage/llioutil.cpp5
-rw-r--r--indra/llmessage/llpacketring.cpp71
-rw-r--r--indra/llmessage/llpacketring.h9
-rw-r--r--indra/llmessage/llproxy.cpp546
-rw-r--r--indra/llmessage/llproxy.h352
-rw-r--r--indra/llmessage/llsdmessagereader.cpp3
-rw-r--r--indra/llmessage/llsdrpcclient.cpp6
-rw-r--r--indra/llmessage/llsdrpcserver.cpp3
-rw-r--r--indra/llmessage/lltemplatemessagereader.cpp2
-rw-r--r--indra/llmessage/llurlrequest.cpp37
-rw-r--r--indra/llmessage/net.cpp39
-rw-r--r--indra/llmessage/net.h4
-rw-r--r--indra/llplugin/CMakeLists.txt24
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp2877
-rw-r--r--indra/llplugin/llpluginclassmedia.h861
-rw-r--r--indra/llplugin/llpluginclassmediaowner.h2
-rw-r--r--indra/llplugin/llpluginmessagepipe.h1
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp2
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp1
-rw-r--r--indra/llprimitive/CMakeLists.txt10
-rw-r--r--indra/llprimitive/llmaterialtable.cpp2
-rw-r--r--indra/llprimitive/llmodel.cpp592
-rw-r--r--indra/llprimitive/llmodel.h28
-rw-r--r--indra/llprimitive/llprimitive.h2
-rw-r--r--indra/llrender/llcubemap.cpp37
-rw-r--r--indra/llrender/llfontfreetype.cpp7
-rw-r--r--indra/llrender/llfontgl.cpp3
-rw-r--r--indra/llrender/llgl.cpp391
-rw-r--r--indra/llrender/llgl.h17
-rw-r--r--indra/llrender/llglheaders.h91
-rw-r--r--indra/llrender/llglslshader.cpp74
-rw-r--r--indra/llrender/llglslshader.h18
-rw-r--r--indra/llrender/llimagegl.cpp128
-rw-r--r--indra/llrender/llpostprocess.cpp22
-rw-r--r--indra/llrender/llrender.cpp834
-rw-r--r--indra/llrender/llrender.h64
-rw-r--r--indra/llrender/llrendersphere.cpp98
-rw-r--r--indra/llrender/llrendersphere.h5
-rw-r--r--indra/llrender/llrendertarget.cpp139
-rw-r--r--indra/llrender/llrendertarget.h16
-rw-r--r--indra/llrender/llshadermgr.cpp413
-rw-r--r--indra/llrender/llshadermgr.h128
-rw-r--r--indra/llrender/llvertexbuffer.cpp1681
-rw-r--r--indra/llrender/llvertexbuffer.h132
-rw-r--r--indra/llui/CMakeLists.txt13
-rw-r--r--indra/llui/llaccordionctrltab.cpp4
-rw-r--r--indra/llui/llbadge.cpp141
-rw-r--r--indra/llui/llbadge.h19
-rw-r--r--indra/llui/llbadgeholder.cpp45
-rw-r--r--indra/llui/llbadgeholder.h56
-rw-r--r--indra/llui/llbadgeowner.cpp25
-rw-r--r--indra/llui/llbadgeowner.h2
-rw-r--r--indra/llui/llbutton.cpp166
-rw-r--r--indra/llui/llbutton.h47
-rw-r--r--indra/llui/llclipboard.cpp6
-rw-r--r--indra/llui/llclipboard.h9
-rw-r--r--indra/llui/llcombobox.cpp9
-rw-r--r--indra/llui/llcommandmanager.cpp172
-rw-r--r--indra/llui/llcommandmanager.h202
-rw-r--r--indra/llui/llconsole.cpp4
-rw-r--r--indra/llui/llconsole.h2
-rw-r--r--indra/llui/llcontainerview.h2
-rw-r--r--indra/llui/lldockablefloater.cpp24
-rw-r--r--indra/llui/lldockablefloater.h4
-rw-r--r--indra/llui/lldockcontrol.cpp67
-rw-r--r--indra/llui/lldockcontrol.h4
-rw-r--r--indra/llui/lldraghandle.h4
-rw-r--r--indra/llui/llfiltereditor.h7
-rw-r--r--indra/llui/llfloater.cpp451
-rw-r--r--indra/llui/llfloater.h93
-rw-r--r--indra/llui/llfloaterreg.cpp196
-rw-r--r--indra/llui/llfloaterreg.h11
-rw-r--r--indra/llui/llflyoutbutton.h2
-rw-r--r--indra/llui/llfunctorregistry.h4
-rw-r--r--indra/llui/llhandle.h67
-rw-r--r--indra/llui/llhelp.h1
-rw-r--r--indra/llui/lliconctrl.cpp5
-rw-r--r--indra/llui/llkeywords.cpp81
-rw-r--r--indra/llui/llkeywords.h33
-rw-r--r--indra/llui/lllayoutstack.cpp270
-rw-r--r--indra/llui/lllayoutstack.h41
-rw-r--r--indra/llui/lllineeditor.cpp4
-rw-r--r--indra/llui/lllineeditor.h2
-rw-r--r--indra/llui/llloadingindicator.cpp7
-rw-r--r--indra/llui/llloadingindicator.h4
-rw-r--r--indra/llui/llmenubutton.cpp11
-rw-r--r--indra/llui/llmenubutton.h21
-rw-r--r--indra/llui/llmenugl.cpp38
-rw-r--r--indra/llui/llmenugl.h32
-rw-r--r--indra/llui/llmultislider.cpp6
-rw-r--r--indra/llui/llnotifications.cpp75
-rw-r--r--indra/llui/llnotifications.h4
-rw-r--r--indra/llui/llnotificationtemplate.h6
-rw-r--r--indra/llui/llnotificationvisibilityrule.h2
-rw-r--r--indra/llui/llpanel.cpp15
-rw-r--r--indra/llui/llpanel.h17
-rw-r--r--indra/llui/llradiogroup.cpp8
-rw-r--r--indra/llui/llresizehandle.h2
-rw-r--r--indra/llui/llscrollbar.cpp4
-rw-r--r--indra/llui/llscrollcontainer.cpp15
-rw-r--r--indra/llui/llscrollcontainer.h1
-rw-r--r--indra/llui/llscrollingpanellist.h7
-rw-r--r--indra/llui/llscrolllistcolumn.cpp5
-rw-r--r--indra/llui/llscrolllistcolumn.h6
-rw-r--r--indra/llui/llscrolllistctrl.cpp14
-rw-r--r--indra/llui/llsdparam.cpp272
-rw-r--r--indra/llui/llsdparam.h66
-rw-r--r--indra/llui/llsearcheditor.h4
-rw-r--r--indra/llui/llslider.cpp4
-rw-r--r--indra/llui/llsliderctrl.cpp65
-rw-r--r--indra/llui/llspinctrl.h3
-rw-r--r--indra/llui/llstatbar.h2
-rw-r--r--indra/llui/llstatview.h2
-rw-r--r--indra/llui/lltabcontainer.cpp204
-rw-r--r--indra/llui/lltabcontainer.h6
-rw-r--r--indra/llui/lltextbase.cpp19
-rw-r--r--indra/llui/lltextbase.h4
-rw-r--r--indra/llui/lltextparser.cpp2
-rw-r--r--indra/llui/lltoolbar.cpp1223
-rw-r--r--indra/llui/lltoolbar.h289
-rw-r--r--indra/llui/lltooltip.cpp10
-rw-r--r--indra/llui/llui.cpp146
-rw-r--r--indra/llui/llui.h132
-rw-r--r--indra/llui/lluicolortable.h2
-rw-r--r--indra/llui/lluictrl.cpp27
-rw-r--r--indra/llui/lluictrl.h14
-rw-r--r--indra/llui/lluictrlfactory.h17
-rw-r--r--indra/llui/lluiimage.cpp6
-rw-r--r--indra/llui/lluiimage.h4
-rw-r--r--indra/llui/llurlaction.cpp28
-rw-r--r--indra/llui/llurlaction.h21
-rw-r--r--indra/llui/llurlentry.cpp2
-rw-r--r--indra/llui/llview.cpp767
-rw-r--r--indra/llui/llview.h94
-rw-r--r--indra/llui/llviewborder.cpp3
-rw-r--r--indra/llui/llviewinject.cpp49
-rw-r--r--indra/llui/llviewinject.h56
-rw-r--r--indra/llui/llwindowshade.cpp2
-rw-r--r--indra/llui/tests/llurlentry_stub.cpp13
-rw-r--r--indra/llui/tests/llurlentry_test.cpp1
-rw-r--r--indra/llui/tests/llurlmatch_test.cpp17
-rw-r--r--indra/llvfs/CMakeLists.txt10
-rw-r--r--indra/llvfs/lldiriterator.cpp20
-rw-r--r--indra/llwindow/CMakeLists.txt2
-rw-r--r--indra/llwindow/GL/glh_extensions.h4
-rw-r--r--indra/llwindow/GL/glh_genext.h3
-rw-r--r--indra/llwindow/llmousehandler.h2
-rw-r--r--indra/llwindow/llwindow.cpp42
-rw-r--r--indra/llwindow/llwindow.h13
-rw-r--r--indra/llwindow/llwindowheadless.h4
-rw-r--r--indra/llwindow/llwindowlistener.cpp307
-rw-r--r--indra/llwindow/llwindowmacosx.cpp230
-rw-r--r--indra/llwindow/llwindowmacosx.h4
-rw-r--r--indra/llwindow/llwindowmesaheadless.h4
-rw-r--r--indra/llwindow/llwindowsdl.cpp49
-rw-r--r--indra/llwindow/llwindowsdl.h5
-rw-r--r--indra/llwindow/llwindowwin32.cpp116
-rw-r--r--indra/llwindow/llwindowwin32.h4
-rw-r--r--indra/llxml/CMakeLists.txt28
-rw-r--r--indra/llxml/llcontrol.h6
-rw-r--r--indra/llxuixml/llinitparam.cpp77
-rw-r--r--indra/llxuixml/llinitparam.h1136
-rw-r--r--indra/llxuixml/llxuiparser.cpp474
-rw-r--r--indra/llxuixml/llxuiparser.h42
-rw-r--r--indra/lscript/lscript_compile/bison.bat22
-rw-r--r--indra/lscript/lscript_compile/windows/unistd.h48
-rw-r--r--indra/mac_crash_logger/CrashReporter.nib/objects.xib2
-rw-r--r--indra/mac_crash_logger/llcrashloggermac.cpp6
-rw-r--r--indra/mac_crash_logger/mac_crash_logger.cpp15
-rw-r--r--indra/media_plugins/example/CMakeLists.txt2
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp107
-rw-r--r--indra/newview/CMakeLists.txt150
-rw-r--r--indra/newview/app_settings/CA.pem7318
-rw-r--r--indra/newview/app_settings/cmd_line.xml13
-rw-r--r--indra/newview/app_settings/commands.xml240
-rw-r--r--indra/newview/app_settings/keywords.ini86
-rw-r--r--indra/newview/app_settings/logcontrol.xml3
-rw-r--r--indra/newview/app_settings/settings.xml1054
-rw-r--r--indra/newview/app_settings/settings_files.xml5
-rw-r--r--indra/newview/app_settings/settings_minimal.xml475
-rw-r--r--indra/newview/app_settings/settings_per_account.xml22
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl55
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl44
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl44
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl84
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl89
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl97
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl89
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl39
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl47
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl113
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl28
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl39
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl53
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl58
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cofF.glsl87
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl52
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl52
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl48
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl67
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl63
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl48
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl2118
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/giF.glsl28
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/giV.glsl36
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl28
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl137
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl44
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl232
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl56
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl36
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl43
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl108
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl109
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl133
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl48
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl128
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl318
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl234
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/starsF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/starsV.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl123
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl36
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl49
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeShadowV.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeV.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterV.glsl57
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowF.glsl43
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowV.glsl44
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainF.glsl63
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainV.glsl69
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl66
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl101
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterF.glsl108
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl68
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterV.glsl48
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/debugF.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/debugV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl39
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl (renamed from indra/newview/llmenucommands.h)24
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl39
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/uiF.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/uiV.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl53
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl55
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightF.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl53
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl55
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedF.glsl48
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl56
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl54
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl53
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl53
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl48
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl43
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl55
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl52
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl51
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl55
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/bumpF.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/bumpV.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl58
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl56
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl20
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightNoColorV.glsl53
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl56
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl54
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/impostorF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/impostorV.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/indexedTextureF.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/nonindexedTextureV.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/previewV.glsl57
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl55
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyV.glsl63
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl59
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleNonIndexedV.glsl61
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl54
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl77
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleV.glsl51
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/treeV.glsl60
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/transportF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl48
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl142
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl98
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl100
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl90
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl63
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl74
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl244
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl94
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl307
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl36
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl245
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl202
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl78
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl241
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/blurF.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/blurV.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl16
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/extractF.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl44
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/simpleF.glsl16
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainV.glsl54
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl90
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/waterF.glsl119
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl56
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl25
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl32
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl28
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightV.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/shinyV.glsl37
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/simpleV.glsl33
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl56
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl50
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl81
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl57
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyF.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyV.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl58
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl88
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giF.glsl193
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giV.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl22
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl82
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl71
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl358
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl26
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/treeF.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl40
-rw-r--r--indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl42
-rw-r--r--indra/newview/app_settings/toolbars.xml25
-rw-r--r--indra/newview/character/avatar_lad.xml21
-rw-r--r--indra/newview/featuretable.txt23
-rw-r--r--indra/newview/featuretable_linux.txt17
-rw-r--r--indra/newview/featuretable_mac.txt28
-rw-r--r--indra/newview/featuretable_solaris.txt4
-rw-r--r--indra/newview/featuretable_xp.txt18
-rw-r--r--indra/newview/gpu_table.txt736
-rw-r--r--indra/newview/icons/beta/secondlife.icnsbin0 -> 242261 bytes
-rw-r--r--indra/newview/icons/beta/secondlife.icobin0 -> 78692 bytes
-rw-r--r--indra/newview/icons/beta/secondlife_128.pngbin0 -> 18268 bytes
-rw-r--r--indra/newview/icons/beta/secondlife_16.pngbin0 -> 3536 bytes
-rw-r--r--indra/newview/icons/beta/secondlife_256.BMPbin0 -> 196662 bytes
-rw-r--r--indra/newview/icons/beta/secondlife_256.pngbin0 -> 49418 bytes
-rw-r--r--indra/newview/icons/beta/secondlife_32.pngbin0 -> 4767 bytes
-rw-r--r--indra/newview/icons/beta/secondlife_48.pngbin0 -> 6438 bytes
-rw-r--r--indra/newview/icons/beta/secondlife_512.pngbin0 -> 151779 bytes
-rw-r--r--indra/newview/icons/development/secondlife.icnsbin0 -> 233026 bytes
-rw-r--r--indra/newview/icons/development/secondlife.icobin0 -> 77117 bytes
-rw-r--r--indra/newview/icons/development/secondlife_128.pngbin0 -> 17499 bytes
-rw-r--r--indra/newview/icons/development/secondlife_16.pngbin0 -> 3471 bytes
-rw-r--r--indra/newview/icons/development/secondlife_256.BMPbin0 -> 196662 bytes
-rw-r--r--indra/newview/icons/development/secondlife_256.pngbin0 -> 47952 bytes
-rw-r--r--indra/newview/icons/development/secondlife_32.pngbin0 -> 4649 bytes
-rw-r--r--indra/newview/icons/development/secondlife_48.pngbin0 -> 6190 bytes
-rw-r--r--indra/newview/icons/development/secondlife_512.pngbin0 -> 147689 bytes
-rw-r--r--indra/newview/icons/project/secondlife.icnsbin0 -> 235133 bytes
-rw-r--r--indra/newview/icons/project/secondlife.icobin0 -> 77791 bytes
-rw-r--r--indra/newview/icons/project/secondlife_128.pngbin0 -> 17706 bytes
-rw-r--r--indra/newview/icons/project/secondlife_16.pngbin0 -> 3471 bytes
-rw-r--r--indra/newview/icons/project/secondlife_256.BMPbin0 -> 196662 bytes
-rw-r--r--indra/newview/icons/project/secondlife_256.pngbin0 -> 48488 bytes
-rw-r--r--indra/newview/icons/project/secondlife_32.pngbin0 -> 4675 bytes
-rw-r--r--indra/newview/icons/project/secondlife_48.pngbin0 -> 6195 bytes
-rw-r--r--indra/newview/icons/project/secondlife_512.pngbin0 -> 149145 bytes
-rw-r--r--indra/newview/icons/release/secondlife.icnsbin0 -> 228390 bytes
-rw-r--r--indra/newview/icons/release/secondlife.icobin0 -> 77552 bytes
-rw-r--r--indra/newview/icons/release/secondlife_128.pngbin0 -> 17198 bytes
-rw-r--r--indra/newview/icons/release/secondlife_16.pngbin0 -> 3524 bytes
-rw-r--r--indra/newview/icons/release/secondlife_256.BMPbin0 -> 196662 bytes
-rw-r--r--indra/newview/icons/release/secondlife_256.pngbin0 -> 47946 bytes
-rw-r--r--indra/newview/icons/release/secondlife_32.pngbin0 -> 4746 bytes
-rw-r--r--indra/newview/icons/release/secondlife_48.pngbin0 -> 6249 bytes
-rw-r--r--indra/newview/icons/release/secondlife_512.pngbin0 -> 147963 bytes
-rw-r--r--indra/newview/icons/test/secondlife.icnsbin0 -> 232905 bytes
-rw-r--r--indra/newview/icons/test/secondlife.icobin0 -> 76861 bytes
-rw-r--r--indra/newview/icons/test/secondlife_128.pngbin0 -> 17156 bytes
-rw-r--r--indra/newview/icons/test/secondlife_16.pngbin0 -> 3471 bytes
-rw-r--r--indra/newview/icons/test/secondlife_256.BMPbin0 -> 196662 bytes
-rw-r--r--indra/newview/icons/test/secondlife_256.pngbin0 -> 47522 bytes
-rw-r--r--indra/newview/icons/test/secondlife_32.pngbin0 -> 4644 bytes
-rw-r--r--indra/newview/icons/test/secondlife_48.pngbin0 -> 6115 bytes
-rw-r--r--indra/newview/icons/test/secondlife_512.pngbin0 -> 146971 bytes
-rw-r--r--indra/newview/installers/darwin/dmg-cleanup.applescript2
-rw-r--r--indra/newview/installers/darwin/fix_application_icon_position.sh2
-rw-r--r--indra/newview/installers/darwin/release-dmg/_DS_Storebin12292 -> 12292 bytes
-rw-r--r--indra/newview/installers/windows/installer_template.nsi240
-rw-r--r--indra/newview/llaccountingcostmanager.cpp181
-rw-r--r--indra/newview/llaccountingcostmanager.h (renamed from indra/newview/llaccountingquotamanager.h)42
-rw-r--r--indra/newview/llaccountingquotamanager.cpp278
-rwxr-xr-xindra/newview/llagent.cpp125
-rw-r--r--indra/newview/llagent.h29
-rw-r--r--indra/newview/llagentcamera.cpp7
-rw-r--r--indra/newview/llagentwearables.cpp42
-rw-r--r--indra/newview/llagentwearables.h4
-rw-r--r--indra/newview/llappearancemgr.cpp103
-rw-r--r--indra/newview/llappearancemgr.h3
-rw-r--r--indra/newview/llappviewer.cpp496
-rw-r--r--indra/newview/llappviewer.h10
-rw-r--r--indra/newview/llappviewerlinux.cpp63
-rw-r--r--indra/newview/llappviewerwin32.cpp10
-rw-r--r--indra/newview/llassetuploadresponders.cpp26
-rwxr-xr-xindra/newview/llavataractions.cpp43
-rw-r--r--indra/newview/llavataractions.h3
-rw-r--r--indra/newview/llavatariconctrl.cpp1
-rw-r--r--indra/newview/llbottomtray.cpp1988
-rw-r--r--indra/newview/llbottomtray.h564
-rw-r--r--indra/newview/llcallfloater.cpp20
-rw-r--r--indra/newview/llchannelmanager.cpp51
-rw-r--r--indra/newview/llchannelmanager.h25
-rw-r--r--indra/newview/llchatbar.cpp3
-rw-r--r--indra/newview/llchathistory.cpp7
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp5
-rw-r--r--indra/newview/llchatmsgbox.cpp2
-rw-r--r--indra/newview/llchiclet.cpp18
-rw-r--r--indra/newview/llchiclet.h19
-rw-r--r--indra/newview/llchicletbar.cpp374
-rw-r--r--indra/newview/llchicletbar.h105
-rw-r--r--indra/newview/llcofwearables.cpp13
-rw-r--r--indra/newview/llcolorswatch.cpp1
-rw-r--r--indra/newview/llcylinder.cpp260
-rw-r--r--indra/newview/llcylinder.h33
-rw-r--r--indra/newview/lldateutil.cpp27
-rw-r--r--indra/newview/lldateutil.h14
-rw-r--r--indra/newview/lldebugview.cpp17
-rw-r--r--indra/newview/lldebugview.h3
-rw-r--r--indra/newview/lldirpicker.cpp4
-rw-r--r--indra/newview/lldndbutton.cpp9
-rw-r--r--indra/newview/lldndbutton.h5
-rw-r--r--indra/newview/lldrawpool.cpp21
-rw-r--r--indra/newview/lldrawpoolalpha.cpp107
-rw-r--r--indra/newview/lldrawpoolalpha.h1
-rw-r--r--indra/newview/lldrawpoolavatar.cpp311
-rw-r--r--indra/newview/lldrawpoolavatar.h3
-rw-r--r--indra/newview/lldrawpoolbump.cpp358
-rw-r--r--indra/newview/lldrawpoolground.cpp6
-rw-r--r--indra/newview/lldrawpoolsimple.cpp86
-rw-r--r--indra/newview/lldrawpoolsimple.h5
-rw-r--r--indra/newview/lldrawpoolsky.cpp22
-rw-r--r--indra/newview/lldrawpoolterrain.cpp230
-rw-r--r--indra/newview/lldrawpoolterrain.h3
-rw-r--r--indra/newview/lldrawpooltree.cpp52
-rw-r--r--indra/newview/lldrawpoolwater.cpp69
-rw-r--r--indra/newview/lldrawpoolwater.h1
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp101
-rw-r--r--indra/newview/lldynamictexture.cpp7
-rw-r--r--indra/newview/llenvmanager.cpp36
-rw-r--r--indra/newview/llenvmanager.h36
-rw-r--r--indra/newview/llestateinfomodel.cpp230
-rw-r--r--indra/newview/llestateinfomodel.h103
-rw-r--r--indra/newview/llexpandabletextbox.cpp9
-rw-r--r--indra/newview/llexpandabletextbox.h4
-rw-r--r--indra/newview/llface.cpp172
-rw-r--r--indra/newview/llface.h6
-rw-r--r--indra/newview/llfasttimerview.cpp176
-rw-r--r--indra/newview/llfasttimerview.h7
-rw-r--r--indra/newview/llfavoritesbar.cpp376
-rw-r--r--indra/newview/llfavoritesbar.h20
-rw-r--r--indra/newview/llfeaturemanager.cpp18
-rw-r--r--indra/newview/llfilepicker.cpp20
-rw-r--r--indra/newview/llfloaterabout.cpp297
-rw-r--r--indra/newview/llfloateranimpreview.cpp19
-rw-r--r--indra/newview/llfloaterauction.cpp15
-rw-r--r--indra/newview/llfloateravatar.cpp54
-rw-r--r--indra/newview/llfloateravatar.h43
-rw-r--r--indra/newview/llfloaterbuildoptions.cpp68
-rw-r--r--indra/newview/llfloaterbuildoptions.h23
-rw-r--r--indra/newview/llfloaterbuyland.cpp10
-rw-r--r--indra/newview/llfloatercamera.cpp40
-rw-r--r--indra/newview/llfloatercamera.h8
-rw-r--r--indra/newview/llfloaterchat.cpp485
-rw-r--r--indra/newview/llfloaterchat.h78
-rw-r--r--indra/newview/llfloaterchatterbox.cpp344
-rw-r--r--indra/newview/llfloaterchatterbox.h80
-rw-r--r--indra/newview/llfloaterdestinations.cpp54
-rw-r--r--indra/newview/llfloaterdestinations.h43
-rw-r--r--indra/newview/llfloaterfriends.cpp807
-rw-r--r--indra/newview/llfloaterfriends.h140
-rw-r--r--indra/newview/llfloatergesture.cpp2
-rw-r--r--indra/newview/llfloaterhardwaresettings.cpp38
-rw-r--r--indra/newview/llfloaterhelpbrowser.cpp17
-rw-r--r--indra/newview/llfloaterhelpbrowser.h4
-rw-r--r--indra/newview/llfloaterhud.cpp8
-rw-r--r--indra/newview/llfloaterimagepreview.cpp69
-rw-r--r--indra/newview/llfloaterinspect.cpp39
-rw-r--r--indra/newview/llfloaterinspect.h4
-rw-r--r--indra/newview/llfloaterinventory.cpp9
-rw-r--r--indra/newview/llfloaterinventory.h1
-rw-r--r--indra/newview/llfloaterland.cpp40
-rw-r--r--indra/newview/llfloaterland.h1
-rw-r--r--indra/newview/llfloatermap.cpp49
-rw-r--r--indra/newview/llfloatermap.h6
-rw-r--r--indra/newview/llfloatermediabrowser.cpp462
-rw-r--r--indra/newview/llfloatermediabrowser.h86
-rw-r--r--indra/newview/llfloatermemleak.cpp5
-rwxr-xr-x[-rw-r--r--]indra/newview/llfloatermodelpreview.cpp1842
-rw-r--r--indra/newview/llfloatermodelpreview.h86
-rw-r--r--indra/newview/llfloatermodeluploadbase.cpp58
-rw-r--r--indra/newview/llfloatermodeluploadbase.h61
-rw-r--r--indra/newview/llfloatermodelwizard.cpp303
-rw-r--r--indra/newview/llfloatermodelwizard.h37
-rw-r--r--indra/newview/llfloaterobjectweights.cpp266
-rw-r--r--indra/newview/llfloaterobjectweights.h93
-rw-r--r--indra/newview/llfloaterpostcard.cpp384
-rw-r--r--indra/newview/llfloaterpostcard.h79
-rwxr-xr-xindra/newview/llfloaterpreference.cpp373
-rw-r--r--indra/newview/llfloaterpreference.h50
-rw-r--r--indra/newview/llfloaterproperties.cpp20
-rw-r--r--indra/newview/llfloaterregioninfo.cpp397
-rw-r--r--indra/newview/llfloaterregioninfo.h23
-rw-r--r--indra/newview/llfloatersearch.cpp67
-rw-r--r--indra/newview/llfloatersearch.h28
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp111
-rw-r--r--indra/newview/llfloatersidepanelcontainer.h81
-rw-r--r--indra/newview/llfloatersidetraytab.cpp52
-rw-r--r--indra/newview/llfloatersnapshot.cpp1165
-rw-r--r--indra/newview/llfloatersnapshot.h31
-rw-r--r--indra/newview/llfloatersounddevices.cpp7
-rw-r--r--indra/newview/llfloatertools.cpp246
-rw-r--r--indra/newview/llfloatertools.h9
-rw-r--r--indra/newview/llfloatertoybox.cpp191
-rw-r--r--indra/newview/llfloatertoybox.h62
-rw-r--r--indra/newview/llfloatertranslationsettings.cpp296
-rw-r--r--indra/newview/llfloatertranslationsettings.h76
-rw-r--r--indra/newview/llfloatervoiceeffect.cpp2
-rw-r--r--indra/newview/llfloaterwebcontent.cpp259
-rw-r--r--indra/newview/llfloaterwebcontent.h49
-rw-r--r--indra/newview/llfloaterwebprofile.cpp79
-rw-r--r--indra/newview/llfloaterwebprofile.h (renamed from indra/newview/llfloatersidetraytab.h)44
-rw-r--r--indra/newview/llfloaterwindowsize.cpp35
-rw-r--r--indra/newview/llfloaterwindowsize.h22
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp56
-rw-r--r--indra/newview/llfloaterworldmap.h5
-rw-r--r--indra/newview/llfolderview.cpp82
-rw-r--r--indra/newview/llfolderview.h2
-rw-r--r--indra/newview/llfoldervieweventlistener.h3
-rw-r--r--indra/newview/llfolderviewitem.cpp104
-rw-r--r--indra/newview/llfolderviewitem.h17
-rw-r--r--indra/newview/llglsandbox.cpp44
-rw-r--r--indra/newview/llgroupactions.cpp16
-rw-r--r--indra/newview/llgrouplist.cpp2
-rw-r--r--indra/newview/llgroupmgr.cpp81
-rw-r--r--indra/newview/llhudeffectbeam.cpp12
-rw-r--r--indra/newview/llhudeffectblob.cpp8
-rw-r--r--indra/newview/llhudeffectblob.h2
-rw-r--r--indra/newview/llhudeffectlookat.cpp4
-rw-r--r--indra/newview/llhudeffectpointat.cpp2
-rw-r--r--indra/newview/llhudnametag.cpp2
-rw-r--r--indra/newview/llhudrender.cpp26
-rw-r--r--indra/newview/llimfloater.cpp57
-rw-r--r--indra/newview/llimfloater.h6
-rw-r--r--indra/newview/llimfloatercontainer.cpp3
-rw-r--r--indra/newview/llimfloatercontainer.h2
-rw-r--r--indra/newview/llimpanel.cpp1
-rw-r--r--indra/newview/llimview.cpp51
-rw-r--r--indra/newview/llimview.h11
-rw-r--r--indra/newview/llinspectobject.cpp4
-rw-r--r--indra/newview/llinventorybridge.cpp463
-rw-r--r--indra/newview/llinventorybridge.h26
-rw-r--r--indra/newview/llinventoryfilter.cpp49
-rw-r--r--indra/newview/llinventoryfilter.h4
-rw-r--r--indra/newview/llinventoryfunctions.cpp198
-rw-r--r--indra/newview/llinventoryfunctions.h7
-rw-r--r--indra/newview/llinventorymodel.cpp148
-rw-r--r--indra/newview/llinventorymodel.h16
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp6
-rw-r--r--indra/newview/llinventoryobserver.cpp19
-rw-r--r--indra/newview/llinventorypanel.cpp229
-rw-r--r--indra/newview/llinventorypanel.h12
-rw-r--r--indra/newview/lljoystickbutton.h4
-rw-r--r--indra/newview/lllandmarkactions.cpp2
-rw-r--r--indra/newview/lllocationinputctrl.cpp14
-rw-r--r--indra/newview/llloginhandler.cpp6
-rw-r--r--indra/newview/lllogininstance.cpp9
-rw-r--r--indra/newview/llmanip.cpp28
-rw-r--r--indra/newview/llmaniprotate.cpp120
-rw-r--r--indra/newview/llmanipscale.cpp42
-rw-r--r--indra/newview/llmaniptranslate.cpp43
-rw-r--r--indra/newview/llmediactrl.cpp103
-rw-r--r--indra/newview/llmediactrl.h52
-rw-r--r--indra/newview/llmemoryview.h4
-rw-r--r--indra/newview/llmenucommands.cpp94
-rw-r--r--indra/newview/llmeshrepository.cpp1077
-rw-r--r--indra/newview/llmeshrepository.h64
-rw-r--r--indra/newview/llmorphview.h4
-rw-r--r--indra/newview/llmoveview.cpp83
-rw-r--r--indra/newview/llmoveview.h6
-rw-r--r--indra/newview/llnamelistctrl.cpp1
-rw-r--r--indra/newview/llnamelistctrl.h2
-rw-r--r--indra/newview/llnavigationbar.cpp192
-rw-r--r--indra/newview/llnavigationbar.h7
-rw-r--r--indra/newview/llnearbychat.cpp100
-rw-r--r--indra/newview/llnearbychat.h19
-rw-r--r--indra/newview/llnearbychatbar.cpp459
-rw-r--r--indra/newview/llnearbychatbar.h75
-rw-r--r--indra/newview/llnearbychathandler.cpp120
-rw-r--r--indra/newview/llnetmap.cpp10
-rw-r--r--indra/newview/llnotificationalerthandler.cpp4
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp2
-rw-r--r--indra/newview/llnotificationtiphandler.cpp7
-rw-r--r--indra/newview/lloutfitslist.cpp4
-rw-r--r--indra/newview/lloverlaybar.cpp378
-rw-r--r--indra/newview/lloverlaybar.h95
-rw-r--r--indra/newview/llpanelavatar.cpp713
-rw-r--r--indra/newview/llpanelavatar.h191
-rw-r--r--indra/newview/llpanelblockedlist.cpp4
-rw-r--r--indra/newview/llpanelcontents.cpp2
-rw-r--r--indra/newview/llpanelgroup.cpp6
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp5
-rw-r--r--indra/newview/llpanelgrouplandmoney.cpp44
-rw-r--r--indra/newview/llpanelgroupnotices.cpp4
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp1
-rw-r--r--indra/newview/llpanellandmarks.cpp18
-rw-r--r--indra/newview/llpanellogin.cpp38
-rw-r--r--indra/newview/llpanellogin.h6
-rw-r--r--indra/newview/llpanelmaininventory.cpp27
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp498
-rw-r--r--indra/newview/llpanelmarketplaceinbox.h10
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp172
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.h56
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.cpp224
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.h18
-rw-r--r--indra/newview/llpanelmarketplaceoutboxinventory.cpp271
-rw-r--r--indra/newview/llpanelmarketplaceoutboxinventory.h97
-rw-r--r--indra/newview/llpanelme.cpp345
-rw-r--r--indra/newview/llpanelme.h66
-rw-r--r--indra/newview/llpanelnearbymedia.cpp42
-rw-r--r--indra/newview/llpanelnearbymedia.h1
-rw-r--r--indra/newview/llpanelobject.cpp13
-rw-r--r--indra/newview/llpanelobjectinventory.cpp69
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp9
-rw-r--r--indra/newview/llpanelpeople.cpp26
-rwxr-xr-xindra/newview/llpanelpicks.cpp61
-rwxr-xr-xindra/newview/llpanelpicks.h6
-rw-r--r--indra/newview/llpanelplaceprofile.cpp31
-rw-r--r--indra/newview/llpanelplaces.cpp182
-rw-r--r--indra/newview/llpanelplaces.h7
-rwxr-xr-xindra/newview/llpanelprofile.cpp56
-rwxr-xr-xindra/newview/llpanelprofile.h6
-rw-r--r--indra/newview/llpanelprofileview.cpp247
-rw-r--r--indra/newview/llpanelprofileview.h108
-rw-r--r--indra/newview/llpanelsnapshot.cpp201
-rw-r--r--indra/newview/llpanelsnapshot.h71
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp109
-rw-r--r--indra/newview/llpanelsnapshotlocal.cpp168
-rw-r--r--indra/newview/llpanelsnapshotoptions.cpp120
-rw-r--r--indra/newview/llpanelsnapshotpostcard.cpp270
-rw-r--r--indra/newview/llpanelsnapshotprofile.cpp101
-rw-r--r--indra/newview/llpanelteleporthistory.cpp81
-rw-r--r--indra/newview/llpanelteleporthistory.h2
-rw-r--r--indra/newview/llpaneltopinfobar.cpp27
-rw-r--r--indra/newview/llpaneltopinfobar.h8
-rw-r--r--indra/newview/llpanelvoicedevicesettings.cpp64
-rw-r--r--indra/newview/llpanelvoicedevicesettings.h3
-rw-r--r--indra/newview/llpanelvolume.cpp2
-rw-r--r--indra/newview/llpanelwearing.cpp4
-rw-r--r--indra/newview/llparticipantlist.cpp23
-rw-r--r--indra/newview/llparticipantlist.h2
-rw-r--r--indra/newview/llpostcard.cpp155
-rw-r--r--indra/newview/llpostcard.h (renamed from indra/newview/llsidetraylistener.h)39
-rw-r--r--indra/newview/llpreview.cpp25
-rw-r--r--indra/newview/llpreviewtexture.cpp2
-rw-r--r--indra/newview/llprogressview.cpp101
-rw-r--r--indra/newview/llprogressview.h5
-rw-r--r--indra/newview/llsceneview.cpp15
-rw-r--r--indra/newview/llscreenchannel.cpp231
-rw-r--r--indra/newview/llscreenchannel.h41
-rw-r--r--indra/newview/llscriptfloater.cpp31
-rw-r--r--indra/newview/llscriptfloater.h2
-rw-r--r--indra/newview/llsearchcombobox.cpp7
-rw-r--r--indra/newview/llsecapi.h14
-rw-r--r--indra/newview/llsechandler_basic.cpp8
-rw-r--r--indra/newview/llselectmgr.cpp179
-rw-r--r--indra/newview/llselectmgr.h2
-rw-r--r--indra/newview/llsidepanelappearance.cpp5
-rw-r--r--indra/newview/llsidepanelinventory.cpp399
-rw-r--r--indra/newview/llsidepanelinventory.h20
-rw-r--r--indra/newview/llsidetray.cpp1459
-rw-r--r--indra/newview/llsidetray.h260
-rw-r--r--indra/newview/llsidetraylistener.cpp179
-rw-r--r--indra/newview/llsidetraypanelcontainer.cpp11
-rw-r--r--indra/newview/llsidetraypanelcontainer.h5
-rw-r--r--indra/newview/llslurl.cpp6
-rw-r--r--indra/newview/llspatialpartition.cpp427
-rw-r--r--indra/newview/llspatialpartition.h3
-rw-r--r--indra/newview/llspeakbutton.cpp167
-rw-r--r--indra/newview/llspeakbutton.h88
-rw-r--r--indra/newview/llsprite.cpp2
-rw-r--r--indra/newview/llstartup.cpp540
-rw-r--r--indra/newview/llstartup.h4
-rw-r--r--indra/newview/llstatusbar.cpp5
-rw-r--r--indra/newview/llsurface.cpp11
-rw-r--r--indra/newview/llsurface.h3
-rw-r--r--indra/newview/llsyswellwindow.cpp23
-rw-r--r--indra/newview/llsyswellwindow.h5
-rw-r--r--indra/newview/llteleporthistory.cpp9
-rw-r--r--indra/newview/llteleporthistory.h3
-rw-r--r--indra/newview/llteleporthistorystorage.cpp1
-rw-r--r--indra/newview/llteleporthistorystorage.h6
-rw-r--r--indra/newview/lltexlayer.cpp117
-rw-r--r--indra/newview/lltexturecache.cpp38
-rw-r--r--indra/newview/lltexturectrl.h6
-rw-r--r--indra/newview/lltexturefetch.cpp16
-rw-r--r--indra/newview/lltextureview.cpp13
-rw-r--r--indra/newview/lltoast.cpp125
-rw-r--r--indra/newview/lltoast.h12
-rw-r--r--indra/newview/lltoastnotifypanel.cpp27
-rw-r--r--indra/newview/lltool.h2
-rw-r--r--indra/newview/lltoolbar.cpp365
-rw-r--r--indra/newview/lltoolbar.h82
-rw-r--r--indra/newview/lltoolbarview.cpp697
-rw-r--r--indra/newview/lltoolbarview.h137
-rw-r--r--indra/newview/lltoolbrush.cpp8
-rw-r--r--indra/newview/lltooldraganddrop.cpp45
-rw-r--r--indra/newview/lltooldraganddrop.h3
-rw-r--r--indra/newview/lltoolgun.cpp4
-rw-r--r--indra/newview/lltoolmgr.cpp42
-rw-r--r--indra/newview/lltoolmorph.cpp19
-rw-r--r--indra/newview/lltoolpie.cpp38
-rw-r--r--indra/newview/lltoolpie.h1
-rw-r--r--indra/newview/lltracker.cpp16
-rw-r--r--indra/newview/lltransientfloatermgr.cpp43
-rw-r--r--indra/newview/lltransientfloatermgr.h9
-rwxr-xr-x[-rw-r--r--]indra/newview/lltranslate.cpp357
-rwxr-xr-x[-rw-r--r--]indra/newview/lltranslate.h300
-rw-r--r--indra/newview/lluploadfloaterobservers.cpp56
-rw-r--r--indra/newview/lluploadfloaterobservers.h97
-rw-r--r--indra/newview/llurldispatcher.cpp8
-rw-r--r--indra/newview/llviewerassetstorage.cpp8
-rw-r--r--indra/newview/llviewerassettype.cpp4
-rw-r--r--indra/newview/llvieweraudio.cpp252
-rw-r--r--indra/newview/llvieweraudio.h47
-rw-r--r--indra/newview/llviewercamera.cpp68
-rw-r--r--indra/newview/llviewercontrol.cpp61
-rw-r--r--indra/newview/llviewercontrollistener.cpp231
-rw-r--r--indra/newview/llviewercontrollistener.h10
-rw-r--r--indra/newview/llviewerdisplay.cpp206
-rw-r--r--indra/newview/llviewerfloaterreg.cpp59
-rw-r--r--indra/newview/llviewerfoldertype.cpp71
-rw-r--r--indra/newview/llviewerfoldertype.h1
-rw-r--r--indra/newview/llviewerhelp.cpp38
-rw-r--r--indra/newview/llviewerhelp.h6
-rw-r--r--indra/newview/llviewerinventory.cpp60
-rw-r--r--indra/newview/llviewerinventory.h5
-rw-r--r--indra/newview/llviewerjoint.cpp18
-rw-r--r--indra/newview/llviewerjointmesh.cpp230
-rw-r--r--indra/newview/llviewerjointmesh.h19
-rw-r--r--indra/newview/llviewerjointmesh_sse.cpp114
-rw-r--r--indra/newview/llviewerjointmesh_sse2.cpp121
-rw-r--r--indra/newview/llviewerjointmesh_vec.cpp97
-rw-r--r--indra/newview/llviewerjoystick.cpp11
-rw-r--r--indra/newview/llviewermedia.cpp497
-rw-r--r--indra/newview/llviewermedia.h8
-rw-r--r--indra/newview/llviewermenu.cpp480
-rw-r--r--indra/newview/llviewermenu.h2
-rw-r--r--indra/newview/llviewermenufile.cpp18
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewermessage.cpp196
-rw-r--r--indra/newview/llviewermessage.h1
-rw-r--r--indra/newview/llviewernetwork.cpp2
-rw-r--r--indra/newview/llviewerobject.cpp135
-rw-r--r--indra/newview/llviewerobject.h31
-rw-r--r--indra/newview/llviewerobjectlist.cpp63
-rw-r--r--indra/newview/llviewerobjectlist.h3
-rw-r--r--indra/newview/llviewerparcelmedia.cpp6
-rw-r--r--indra/newview/llviewerparcelmgr.cpp172
-rw-r--r--indra/newview/llviewerparcelmgr.h2
-rw-r--r--indra/newview/llviewerparceloverlay.cpp96
-rw-r--r--indra/newview/llviewerparceloverlay.h2
-rw-r--r--indra/newview/llviewerprecompiledheaders.h7
-rw-r--r--indra/newview/llviewerregion.cpp237
-rw-r--r--indra/newview/llviewerregion.h12
-rw-r--r--indra/newview/llviewershadermgr.cpp1220
-rw-r--r--indra/newview/llviewershadermgr.h140
-rw-r--r--indra/newview/llviewerstats.cpp2
-rw-r--r--indra/newview/llviewertexteditor.cpp23
-rw-r--r--indra/newview/llviewertexteditor.h7
-rw-r--r--indra/newview/llviewertexture.cpp83
-rw-r--r--indra/newview/llviewertexture.h4
-rw-r--r--indra/newview/llviewertexturelist.cpp140
-rw-r--r--indra/newview/llviewertexturelist.h7
-rw-r--r--indra/newview/llviewerwindow.cpp523
-rw-r--r--indra/newview/llviewerwindow.h43
-rw-r--r--indra/newview/llvoavatar.cpp98
-rw-r--r--indra/newview/llvoavatar.h2
-rw-r--r--indra/newview/llvoavatarself.cpp85
-rw-r--r--indra/newview/llvoavatarself.h3
-rw-r--r--indra/newview/llvocache.cpp19
-rw-r--r--indra/newview/llvograss.cpp22
-rw-r--r--indra/newview/llvograss.h2
-rw-r--r--indra/newview/llvoground.cpp2
-rw-r--r--indra/newview/llvoicevivox.cpp50
-rw-r--r--indra/newview/llvopartgroup.cpp96
-rw-r--r--indra/newview/llvopartgroup.h2
-rw-r--r--indra/newview/llvosky.cpp59
-rw-r--r--indra/newview/llvosurfacepatch.cpp50
-rw-r--r--indra/newview/llvosurfacepatch.h7
-rw-r--r--indra/newview/llvotextbubble.cpp272
-rw-r--r--indra/newview/llvotextbubble.h66
-rw-r--r--indra/newview/llvotree.cpp30
-rw-r--r--indra/newview/llvovolume.cpp390
-rw-r--r--indra/newview/llvovolume.h21
-rw-r--r--indra/newview/llvowater.cpp10
-rw-r--r--indra/newview/llvowlsky.cpp28
-rw-r--r--indra/newview/llwatchdog.cpp2
-rw-r--r--indra/newview/llwaterparammanager.cpp1
-rw-r--r--indra/newview/llwearable.cpp8
-rw-r--r--indra/newview/llweb.cpp36
-rw-r--r--indra/newview/llweb.h18
-rw-r--r--indra/newview/llwebprofile.cpp305
-rw-r--r--indra/newview/llwebprofile.h69
-rw-r--r--indra/newview/llwind.cpp115
-rw-r--r--indra/newview/llwind.h7
-rw-r--r--indra/newview/llwindowlistener.cpp505
-rw-r--r--indra/newview/llwindowlistener.h (renamed from indra/llwindow/llwindowlistener.h)8
-rw-r--r--indra/newview/llwlhandlers.cpp36
-rw-r--r--indra/newview/llwlhandlers.h36
-rw-r--r--indra/newview/llwlparamset.cpp14
-rw-r--r--indra/newview/llworld.cpp49
-rw-r--r--indra/newview/llworldmapmessage.cpp5
-rw-r--r--indra/newview/llworldmapview.cpp10
-rw-r--r--indra/newview/llworldview.cpp61
-rw-r--r--indra/newview/llxmlrpctransaction.cpp23
-rw-r--r--indra/newview/pipeline.cpp3027
-rw-r--r--indra/newview/pipeline.h101
-rw-r--r--indra/newview/res-sdl/ll_icon.BMPbin262198 -> 0 bytes
-rw-r--r--indra/newview/res/ll_icon.BMPbin262198 -> 0 bytes
-rw-r--r--indra/newview/res/ll_icon.icobin367958 -> 0 bytes
-rw-r--r--indra/newview/res/ll_icon.pngbin29561 -> 0 bytes
-rw-r--r--indra/newview/res/viewerRes.rc6
-rw-r--r--indra/newview/skins/default/colors.xml25
-rw-r--r--indra/newview/skins/default/textures/arrow_keys.pngbin6558 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/Cam_Pan_Over.pngbin275 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/CameraView_Press.pngbin489 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.pngbin50975 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.pngbin54713 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.pngbin51053 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1_Dark.pngbin0 -> 602 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2_Dark.pngbin0 -> 669 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3_Dark.pngbin0 -> 639 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Off_Dark.pngbin0 -> 547 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_On_Dark.pngbin0 -> 526 bytes
-rw-r--r--indra/newview/skins/default/textures/checkerboard_transparency_bg.pngbin1110 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/circle.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.pngbin170 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.pngbin162 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Left_Over.pngbin337 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Middle_Over.pngbin285 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Right_Over.pngbin362 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/green_checkmark.pngbin0 -> 414 bytes
-rw-r--r--indra/newview/skins/default/textures/icn_label_web.tgabin4140 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icn_media.tgabin4140 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icn_voice-groupfocus.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icn_voice-localchat.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icn_voice-pvtfocus.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_day_cycle.tgabin25682 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_event_adult.tgabin1006 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_lock.tgabin1030 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AddItem_Over.pngbin165 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/BackArrow_Over.pngbin214 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/DragHandle.pngbin163 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Object.pngbin366 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Gift.pngbin1335 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OptionsMenu_Over.pngbin277 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.pngbin1912 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Damage_Light_Alt.pngbin285 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.pngbin620 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/TrashItem_Over.pngbin201 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/parcel_color_EVRY.pngbin393 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/parcel_color_EXP.pngbin272 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/parcel_color_M.pngbin306 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/image_edit_icon.tgabin3116 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/inv_folder_animation.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/inv_folder_inbox.tgabin2085 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/map_avatar_above_8.tgabin300 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/map_avatar_below_8.tgabin300 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/map_event_adult.tgabin1006 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/map_event_mature.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/map_track_8.tgabin300 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/mute_icon.tgabin1042 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Arrow_Left_Over.pngbin381 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Arrow_Right_Over.pngbin379 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Help_Over.pngbin348 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Home_Over.pngbin330 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/separator.pngbin0 -> 2826 bytes
-rw-r--r--indra/newview/skins/default/textures/places_rating_adult.tgabin648 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/places_rating_mature.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/places_rating_pg.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/propertyline.tgabin2092 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/avatar_free_mode.pngbin1447 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/camera_free_mode.pngbin2267 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/camera_orbit_mode.pngbin2381 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/camera_pan_mode.pngbin2418 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/camera_preset_front_view.pngbin2365 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/camera_preset_group_view.pngbin2595 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/camera_preset_rear_view.pngbin2221 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/move_fly_first.pngbin1528 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/move_fly_second.pngbin2128 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/move_run_first.pngbin1554 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/move_run_second.pngbin2534 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/move_walk_first.pngbin2106 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/quick_tips/move_walk_second.pngbin3108 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/red_x.pngbin0 -> 624 bytes
-rw-r--r--indra/newview/skins/default/textures/show_btn.tgabin3884 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/show_btn_selected.tgabin3884 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/smicon_warn.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/snapshot_download.pngbin0 -> 1226 bytes
-rw-r--r--indra/newview/skins/default/textures/snapshot_email.pngbin0 -> 1231 bytes
-rw-r--r--indra/newview/skins/default/textures/spacer35.tgabin3404 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/square_btn_32x128.tgabin6292 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/square_btn_selected_32x128.tgabin6983 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/startup_logo.j2cbin69118 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/status_busy.tgabin4140 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.pngbin273 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.pngbin349 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.pngbin749 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.pngbin359 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.pngbin536 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Large.pngbin709 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.pngbin653 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.pngbin297 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml80
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/appearance.pngbin0 -> 1205 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/avatars.pngbin0 -> 1432 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/build.pngbin0 -> 1246 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/caret_bottom.pngbin0 -> 195 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/caret_left.pngbin0 -> 948 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/caret_right.pngbin0 -> 949 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/chat.pngbin0 -> 1277 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/destinations.pngbin0 -> 1297 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/gestures.pngbin0 -> 1675 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/howto.pngbin0 -> 1306 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/inventory.pngbin0 -> 1114 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/land.pngbin0 -> 1123 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/map.pngbin0 -> 1206 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/marketplace.pngbin0 -> 1311 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/mini_cart.png (renamed from indra/newview/skins/default/textures/model_wizard/divider_line.png)bin2815 -> 2987 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/mini_map.pngbin0 -> 1766 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/move.pngbin0 -> 1328 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.pngbin0 -> 1479 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/people.pngbin0 -> 1313 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/picks.pngbin0 -> 1396 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/places.pngbin0 -> 1391 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/preferences.pngbin0 -> 1587 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/profile.pngbin0 -> 1180 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/search.pngbin0 -> 1406 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/snapshot.pngbin0 -> 1142 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/speak.pngbin0 -> 1253 bytes
-rw-r--r--indra/newview/skins/default/textures/toolbar_icons/view.pngbin0 -> 1487 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On_Over.pngbin547 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Over.pngbin318 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Up_On_Selected.pngbin482 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.pngbin164 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.pngbin165 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Error_Tag_Background.pngbin0 -> 1354 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/New_Tag_Background.pngbin0 -> 957 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/New_Tag_Border.pngbin0 -> 969 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_On_Over.pngbin498 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.pngbin498 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On_Over.pngbin635 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Over.pngbin575 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.pngbin257 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.pngbin295 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.pngbin283 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.pngbin276 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.pngbin311 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.pngbin311 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.pngbin404 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.pngbin404 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.pngbin394 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.pngbin495 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.pngbin308 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.pngbin300 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.pngbin393 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.pngbin286 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.pngbin300 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.pngbin420 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.pngbin416 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.pngbin416 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Over.pngbin482 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Down_Over.pngbin310 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Up_Over.pngbin314 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout.pngbin820 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout_Left.pngbin0 -> 271 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout_Pointer_Up.pngbin260 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout_Right.pngbin0 -> 280 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Over.pngbin293 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Undock_Press.pngbin267 -> 0 bytes
-rw-r--r--indra/newview/skins/default/xui/da/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/da/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/da/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/da/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/da/panel_profile.xml59
-rw-r--r--indra/newview/skins/default/xui/da/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/de/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/de/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/de/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/de/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/de/panel_profile.xml74
-rw-r--r--indra/newview/skins/default/xui/de/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml113
-rw-r--r--indra/newview/skins/default/xui/en/floater_activeim.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_build_options.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml17
-rw-r--r--indra/newview/skins/default/xui/en/floater_chat_bar.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_color_picker.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_event.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_gesture.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_live_lsleditor.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_lsl_guide.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_map.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_mem_leaking.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_appearance.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_web_profile.xml9
-rw-r--r--indra/newview/skins/default/xui/en/floater_people.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_places.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_notecard.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_texture.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_script.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_script_debug_panel.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_snapshot.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_stats.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_sys_well.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_effect.xml1
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml327
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_my_profile.xml146
-rw-r--r--indra/newview/skins/default/xui/en/panel_notes.xml236
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml458
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml162
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/es/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/es/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/es/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/es/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/es/panel_profile.xml70
-rw-r--r--indra/newview/skins/default/xui/es/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/fr/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/fr/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/fr/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/fr/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/fr/panel_profile.xml74
-rw-r--r--indra/newview/skins/default/xui/fr/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/it/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/it/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/it/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/it/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/it/panel_profile.xml70
-rw-r--r--indra/newview/skins/default/xui/it/panel_profile_view.xml22
-rw-r--r--indra/newview/skins/default/xui/ja/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/ja/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/ja/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/ja/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/ja/panel_profile.xml74
-rw-r--r--indra/newview/skins/default/xui/ja/panel_profile_view.xml22
-rw-r--r--indra/newview/skins/default/xui/pl/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/pl/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/pl/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/pl/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/pl/panel_profile.xml59
-rw-r--r--indra/newview/skins/default/xui/pl/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/pt/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/pt/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/pt/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/pt/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/pt/panel_profile.xml70
-rw-r--r--indra/newview/skins/default/xui/pt/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/ru/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/ru/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/ru/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/ru/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/ru/panel_profile.xml67
-rw-r--r--indra/newview/skins/default/xui/ru/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/tr/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/tr/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/tr/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/tr/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/tr/panel_profile.xml67
-rw-r--r--indra/newview/skins/default/xui/tr/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/zh/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/zh/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/zh/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/zh/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/zh/panel_profile.xml67
-rw-r--r--indra/newview/skins/default/xui/zh/panel_profile_view.xml20
-rw-r--r--indra/newview/tests/gpus_results.txt845
-rw-r--r--indra/newview/tests/gpus_seen.txt829
-rw-r--r--indra/newview/tests/lldir_stub.cpp21
-rw-r--r--indra/newview/tests/llglslshader_stub.cpp21
-rw-r--r--indra/newview/tests/llpipeline_stub.cpp21
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp3
-rw-r--r--indra/newview/tests/llsky_stub.cpp21
-rw-r--r--indra/newview/tests/lltranslate_test.cpp345
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp12
-rw-r--r--indra/newview/tests/llviewershadermgr_stub.cpp21
-rw-r--r--indra/newview/tests/llwlanimator_stub.cpp21
-rw-r--r--indra/newview/tests/llwldaycycle_stub.cpp21
-rw-r--r--indra/newview/tests/llwlparammanager_test.cpp21
-rw-r--r--indra/newview/tests/llwlparamset_stub.cpp21
-rw-r--r--indra/newview/viewer_manifest.py108
-rw-r--r--indra/test/CMakeLists.txt54
-rw-r--r--indra/test/io.cpp2
-rw-r--r--indra/test/llapp_tut.cpp162
-rw-r--r--indra/test/llevents_tut.cpp1384
-rw-r--r--indra/test/llhttpclient_tut.cpp5
-rw-r--r--indra/test/llsd_new_tut.cpp116
-rw-r--r--indra/test/llsdmessagebuilder_tut.cpp7
-rw-r--r--indra/test/lltemplatemessagebuilder_tut.cpp55
-rw-r--r--indra/test/lltut.cpp5
-rw-r--r--indra/viewer_components/updater/CMakeLists.txt6
-rw-r--r--indra/viewer_components/updater/scripts/darwin/update_install2
-rw-r--r--indra/viewer_components/updater/scripts/linux/update_install2
-rw-r--r--indra/win_crash_logger/CMakeLists.txt2
-rw-r--r--indra/win_crash_logger/StdAfx.h1
-rw-r--r--indra/win_crash_logger/llcrashloggerwindows.cpp8
-rw-r--r--indra/win_crash_logger/llcrashloggerwindows.h1
-rw-r--r--indra/win_crash_logger/win_crash_logger.cpp35
1374 files changed, 61442 insertions, 46131 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index d1042d6e86..4b1bf49d07 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -1,4 +1,3 @@
-
# -*- cmake -*-
# cmake_minimum_required should appear before any
@@ -70,6 +69,9 @@ if (VIEWER)
add_subdirectory(${LIBS_OPEN_PREFIX}llxuixml)
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
+ # Legacy C++ tests. Build always, run if LL_TESTS is true.
+ add_subdirectory(${VIEWER_PREFIX}test)
+
# viewer media plugins
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 0266239454..98eeed09b3 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -46,7 +46,7 @@ if (WINDOWS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP -D_SCL_SECURE_NO_WARNINGS=1"
CACHE STRING "C++ compiler debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Ob2 -D_SECURE_STL=0"
+ "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Ob0 -D_SECURE_STL=0"
CACHE STRING "C++ compiler release-with-debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
@@ -62,7 +62,7 @@ if (WINDOWS)
/D_UNICODE
/GS
/TP
- /W2
+ /W3
/c
/Zc:forScope
/nologo
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index d9efc8f40d..394db362b1 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -40,7 +40,7 @@ if(WINDOWS)
ssleay32.dll
libeay32.dll
libcollada14dom22-d.dll
- glod.dll
+ glod.dll
)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
@@ -71,7 +71,7 @@ if(WINDOWS)
if (MSVC80)
FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
PATHS
- ${MSVC_DEBUG_REDIST_PATH}
+ ${MSVC_DEBUG_REDIST_PATH}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
NO_DEFAULT_PATH
NO_DEFAULT_PATH
@@ -96,7 +96,7 @@ if (MSVC80)
FIND_PATH(release_msvc8_redist_path msvcr80.dll
PATHS
- ${MSVC_REDIST_PATH}
+ ${MSVC_REDIST_PATH}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
NO_DEFAULT_PATH
NO_DEFAULT_PATH
@@ -212,11 +212,11 @@ elseif(DARWIN)
libexpat.1.5.2.dylib
libexpat.dylib
libGLOD.dylib
- libllqtwebkit.dylib
- libminizip.a
+ libllqtwebkit.dylib
+ libminizip.a
libndofdev.dylib
libexception_handler.dylib
- libcollada14dom.dylib
+ libcollada14dom.dylib
)
# fmod is statically linked on darwin
@@ -252,19 +252,19 @@ elseif(LINUX)
libaprutil-1.so.0
libatk-1.0.so
libbreakpad_client.so.0
- libcollada14dom.so
+ libcollada14dom.so
libcrypto.so.1.0.0
libdb-5.1.so
libexpat.so
libexpat.so.1
- libglod.so
+ libglod.so
libgmock_main.so
libgmock.so.0
libgmodule-2.0.so
libgobject-2.0.so
libgtest_main.so
libgtest.so.0
- libminizip.so
+ libminizip.so
libopenal.so
libopenjpeg.so
libssl.so
diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake
index cb5124812d..3586c1160a 100644
--- a/indra/cmake/FMOD.cmake
+++ b/indra/cmake/FMOD.cmake
@@ -16,15 +16,15 @@ if (FMOD)
include(FindFMOD)
else (STANDALONE)
if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
- # If the path have been specified in the arguments, use that
+ # If the path have been specified in the arguments, use that
set(FMOD_LIBRARIES ${FMOD_LIBRARY})
- MESSAGE(STATUS "Using FMOD path: ${FMOD_LIBRARIES}, ${FMOD_INCLUDE_DIR}")
+ MESSAGE(STATUS "Using FMOD path: ${FMOD_LIBRARIES}, ${FMOD_INCLUDE_DIR}")
else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
- # If not, we're going to try to get the package listed in autobuild.xml
- # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL)
- # as accessing the private LL location will fail if you don't have the credential
- include(Prebuilt)
- use_prebuilt_binary(fmod)
+ # If not, we're going to try to get the package listed in autobuild.xml
+ # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL)
+ # as accessing the private LL location will fail if you don't have the credential
+ include(Prebuilt)
+ use_prebuilt_binary(fmod)
if (WINDOWS)
set(FMOD_LIBRARY fmod)
elseif (DARWIN)
diff --git a/indra/cmake/FindAutobuild.cmake b/indra/cmake/FindAutobuild.cmake
index 45db2b6ed0..4b5fd484ae 100644
--- a/indra/cmake/FindAutobuild.cmake
+++ b/indra/cmake/FindAutobuild.cmake
@@ -21,10 +21,10 @@ IF (NOT AUTOBUILD_EXECUTABLE)
AUTOBUILD_EXECUTABLE
NAMES ${AUTOBUILD_EXE_NAMES}
PATHS
- ENV PATH
- ${CMAKE_SOURCE_DIR}/..
- ${CMAKE_SOURCE_DIR}/../..
- ${CMAKE_SOURCE_DIR}/../../..
+ ENV PATH
+ ${CMAKE_SOURCE_DIR}/..
+ ${CMAKE_SOURCE_DIR}/../..
+ ${CMAKE_SOURCE_DIR}/../../..
PATH_SUFFIXES "/autobuild/bin/"
)
@@ -33,7 +33,7 @@ IF (NOT AUTOBUILD_EXECUTABLE)
MESSAGE(STATUS "Using autobuild at: ${AUTOBUILD_EXECUTABLE}")
ELSE (AUTOBUILD_EXECUTABLE)
IF (AUTOBUILD_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find autobuild executable")
+ MESSAGE(FATAL_ERROR "Could not find autobuild executable")
ENDIF (AUTOBUILD_FIND_REQUIRED)
ENDIF (AUTOBUILD_EXECUTABLE)
diff --git a/indra/cmake/FindGLH.cmake b/indra/cmake/FindGLH.cmake
new file mode 100644
index 0000000000..3d16adaf03
--- /dev/null
+++ b/indra/cmake/FindGLH.cmake
@@ -0,0 +1,30 @@
+# -*- cmake -*-
+
+# - Find GLH
+# Find the Graphic Library Helper includes.
+# This module defines
+# GLH_INCLUDE_DIR, where to find glh/glh_linear.h.
+# GLH_FOUND, If false, do not try to use GLH.
+
+find_path(GLH_INCLUDE_DIR glh/glh_linear.h
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+
+if (GLH_INCLUDE_DIR)
+ set(GLH_FOUND "YES")
+else (GLH_INCLUDE_DIR)
+ set(GLH_FOUND "NO")
+endif (GLH_INCLUDE_DIR)
+
+if (GLH_FOUND)
+ if (NOT GLH_FIND_QUIETLY)
+ message(STATUS "Found GLH: ${GLH_INCLUDE_DIR}")
+ set(GLH_FIND_QUIETLY TRUE) # Only alert us the first time
+ endif (NOT GLH_FIND_QUIETLY)
+else (GLH_FOUND)
+ if (GLH_FIND_REQUIRED)
+ message(FATAL_ERROR "Could not find GLH")
+ endif (GLH_FIND_REQUIRED)
+endif (GLH_FOUND)
+
+mark_as_advanced(GLH_INCLUDE_DIR)
diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake
index cf84b309c1..0b056ada58 100644
--- a/indra/cmake/FindJsonCpp.cmake
+++ b/indra/cmake/FindJsonCpp.cmake
@@ -24,8 +24,8 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
# Try to find a library that was compiled with the same compiler version as we currently use.
SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
IF (STANDALONE)
- # On standalone, assume that the system installed library was compiled with the used compiler.
- SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
+ # On standalone, assume that the system installed library was compiled with the used compiler.
+ SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
ENDIF (STANDALONE)
FIND_LIBRARY(JSONCPP_LIBRARY
NAMES ${JSONCPP_NAMES}
diff --git a/indra/cmake/FindLLQtWebkit.cmake b/indra/cmake/FindLLQtWebkit.cmake
index 4bf5f5cb73..2f666d3bf0 100644
--- a/indra/cmake/FindLLQtWebkit.cmake
+++ b/indra/cmake/FindLLQtWebkit.cmake
@@ -35,7 +35,7 @@ find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS $
find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
-if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config.
+if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config.
set(LLQTWEBKIT_LIBRARIES llqtwebkit)
get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
diff --git a/indra/cmake/FindZLIB.cmake b/indra/cmake/FindZLIB.cmake
index 6d630f1ba9..03a7db9d6f 100644
--- a/indra/cmake/FindZLIB.cmake
+++ b/indra/cmake/FindZLIB.cmake
@@ -30,12 +30,12 @@ endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
if (ZLIB_FOUND)
if (NOT ZLIB_FIND_QUIETLY)
- message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
- SET(ZLIB_FIND_QUIETLY TRUE)
+ message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
+ SET(ZLIB_FIND_QUIETLY TRUE)
endif (NOT ZLIB_FIND_QUIETLY)
else (ZLIB_FOUND)
if (ZLIB_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find ZLIB library")
+ message(FATAL_ERROR "Could not find ZLIB library")
endif (ZLIB_FIND_REQUIRED)
endif (ZLIB_FOUND)
diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake
new file mode 100644
index 0000000000..911dbe4017
--- /dev/null
+++ b/indra/cmake/GLH.cmake
@@ -0,0 +1,11 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+set(GLH_FIND_REQUIRED TRUE)
+set(GLH_FIND_QUIETLY TRUE)
+
+if (STANDALONE)
+ include(FindGLH)
+else (STANDALONE)
+ use_prebuilt_binary(glh_linear)
+endif (STANDALONE)
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake
index 06d6d847a0..c4c96a9af7 100644
--- a/indra/cmake/GoogleMock.cmake
+++ b/indra/cmake/GoogleMock.cmake
@@ -8,7 +8,7 @@ set(GOOGLEMOCK_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include)
if (LINUX)
- # VWR-24366: gmock is underlinked, it needs gtest.
+ # VWR-24366: gmock is underlinked, it needs gtest.
set(GOOGLEMOCK_LIBRARIES
gmock -Wl,--no-as-needed
gtest -Wl,--as-needed)
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake
index 8740e36753..d9f91193be 100644
--- a/indra/cmake/GooglePerfTools.cmake
+++ b/indra/cmake/GooglePerfTools.cmake
@@ -14,7 +14,7 @@ else (STANDALONE)
if (LINUX)
use_prebuilt_binary(tcmalloc)
set(TCMALLOC_LIBRARIES
- tcmalloc)
+ tcmalloc)
set(PROFILER_LIBRARIES profiler)
set(GOOGLE_PERFTOOLS_INCLUDE_DIR
${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake
index 7ee404b9bd..399cb332dd 100644
--- a/indra/cmake/LLPlugin.cmake
+++ b/indra/cmake/LLPlugin.cmake
@@ -8,7 +8,7 @@ set(LLPLUGIN_INCLUDE_DIRS
if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llplugin uses.
- set(LLPLUGIN_LIBRARIES llplugin pthread)
+ set(LLPLUGIN_LIBRARIES llplugin pthread)
else (LINUX)
- set(LLPLUGIN_LIBRARIES llplugin)
+ set(LLPLUGIN_LIBRARIES llplugin)
endif (LINUX)
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index e68d16ed08..f15a2c2649 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -10,7 +10,7 @@ set(LLPRIMITIVE_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llprimitive
)
if (WINDOWS)
- set(LLPRIMITIVE_LIBRARIES
+ set(LLPRIMITIVE_LIBRARIES
debug llprimitive
optimized llprimitive
debug libcollada14dom22-d
diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake
index c47e8878e9..8427928151 100644
--- a/indra/cmake/LLRender.cmake
+++ b/indra/cmake/LLRender.cmake
@@ -1,9 +1,11 @@
# -*- cmake -*-
include(FreeType)
+include(GLH)
set(LLRENDER_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llrender
+ ${GLH_INCLUDE_DIR}
)
if (SERVER AND LINUX)
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index e29076c738..14dd67f32f 100644
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -38,18 +38,17 @@ endmacro(ll_deploy_sharedlibs_command)
# ll_stage_sharedlib
# Performs config and adds a copy command for a sharedlib target.
macro(ll_stage_sharedlib DSO_TARGET)
- if(SHARED_LIB_STAGING_DIR)
- # target gets written to the DLL staging directory.
- # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
- set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
- if(NOT WINDOWS)
- get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
- get_filename_component(DSO_FILE ${DSO_PATH} NAME)
- if(DARWIN)
- set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
- else(DARWIN)
- set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
- endif(DARWIN)
+ # target gets written to the DLL staging directory.
+ # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
+ set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
+ if(NOT WINDOWS)
+ get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
+ get_filename_component(DSO_FILE ${DSO_PATH} NAME)
+ if(DARWIN)
+ set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
+ else(DARWIN)
+ set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ endif(DARWIN)
# *TODO - maybe make this a symbolic link? -brad
add_custom_command(
@@ -63,7 +62,6 @@ macro(ll_stage_sharedlib DSO_TARGET)
COMMENT "Copying llcommon to the staging folder."
)
endif(NOT WINDOWS)
- endif(SHARED_LIB_STAGING_DIR)
if (DARWIN)
set_target_properties(${DSO_TARGET} PROPERTIES
diff --git a/indra/cmake/LScript.cmake b/indra/cmake/LScript.cmake
index 86bfcb7440..21e78fc2c0 100644
--- a/indra/cmake/LScript.cmake
+++ b/indra/cmake/LScript.cmake
@@ -13,4 +13,4 @@ set(LSCRIPT_LIBRARIES
lscript_library
)
-set(LSCRIPT_EXECUTE_MONO_LIBRARIES lscript_execute_mono) \ No newline at end of file
+set(LSCRIPT_EXECUTE_MONO_LIBRARIES lscript_execute_mono)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 07db6ab257..c5f9e2c579 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -2,22 +2,19 @@
include(Variables)
-
-if (NOT STANDALONE)
- set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib)
- set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
- set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
- if (WINDOWS)
- set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
- set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
- elseif (LINUX)
- set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
- set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
- elseif (DARWIN)
- set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
- set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)")
- endif (WINDOWS)
-endif (NOT STANDALONE)
+set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib)
+set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
+set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
+if (WINDOWS)
+ set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+ set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+elseif (LINUX)
+ set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
+ set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
+elseif (DARWIN)
+ set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
+ set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)")
+endif (WINDOWS)
# Autobuild packages must provide 'release' versions of libraries, but may provide versions for
# specific build types. AUTOBUILD_LIBS_INSTALL_DIRS lists first the build type directory and then
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index 7a463d1190..be6fe415f2 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -5,19 +5,19 @@ set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
if (NDOF)
if (STANDALONE)
- set(NDOF_FIND_REQUIRED ON)
- include(FindNDOF)
+ set(NDOF_FIND_REQUIRED ON)
+ include(FindNDOF)
else (STANDALONE)
- use_prebuilt_binary(ndofdev)
+ use_prebuilt_binary(ndofdev)
- if (WINDOWS)
- set(NDOF_LIBRARY libndofdev)
- elseif (DARWIN OR LINUX)
- set(NDOF_LIBRARY ndofdev)
- endif (WINDOWS)
+ if (WINDOWS)
+ set(NDOF_LIBRARY libndofdev)
+ elseif (DARWIN OR LINUX)
+ set(NDOF_LIBRARY ndofdev)
+ endif (WINDOWS)
- set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
- set(NDOF_FOUND 1)
+ set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
+ set(NDOF_FOUND 1)
endif (STANDALONE)
endif (NDOF)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 5982ee9a49..2704912eb5 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -11,7 +11,7 @@ else (STANDALONE)
if (WINDOWS)
set(OPENSSL_LIBRARIES ssleay32 libeay32)
else (WINDOWS)
- set(OPENSSL_LIBRARIES ssl)
+ set(OPENSSL_LIBRARIES ssl crypto)
endif (WINDOWS)
set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
endif (STANDALONE)
diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake
index 7131445464..91b49e75d7 100644
--- a/indra/cmake/WebKitLibPlugin.cmake
+++ b/indra/cmake/WebKitLibPlugin.cmake
@@ -8,21 +8,21 @@ if (STANDALONE)
include(${QT_USE_FILE})
set(QTDIR $ENV{QTDIR})
if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
- message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; "
- "Qt is found by looking for qmake in your PATH. "
- "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, "
- "or unset QTDIR if the found Qt is correct.")
- endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
+ message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; "
+ "Qt is found by looking for qmake in your PATH. "
+ "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, "
+ "or unset QTDIR if the found Qt is correct.")
+ endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
find_package(LLQtWebkit REQUIRED QUIET)
# Add the plugins.
set(QT_PLUGIN_LIBRARIES)
foreach(qlibname qgif qjpeg)
- find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH)
- if (QT_PLUGIN_${qlibname})
- list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}})
- else (QT_PLUGIN_${qtlibname})
- message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!")
- endif (QT_PLUGIN_${qlibname})
+ find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH)
+ if (QT_PLUGIN_${qlibname})
+ list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}})
+ else (QT_PLUGIN_${qtlibname})
+ message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!")
+ endif (QT_PLUGIN_${qlibname})
endforeach(qlibname)
# qjpeg depends on libjpeg
list(APPEND QT_PLUGIN_LIBRARIES jpeg)
diff --git a/indra/fix-incredibuild.py b/indra/fix-incredibuild.py
index b96b00dc85..98f16e9d97 100644
--- a/indra/fix-incredibuild.py
+++ b/indra/fix-incredibuild.py
@@ -1,3 +1,26 @@
+#!/usr/bin/env python
+##
+## $LicenseInfo:firstyear=2011&license=viewerlgpl$
+## Second Life Viewer Source Code
+## Copyright (C) 2011, Linden Research, Inc.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation;
+## version 2.1 of the License only.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+##
+## Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+## $/LicenseInfo$
+
import sys
import os
import glob
diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt
index a687e60610..af5c9fb2e7 100644
--- a/indra/integration_tests/llimage_libtest/CMakeLists.txt
+++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt
@@ -59,15 +59,15 @@ endif (DARWIN)
# Libraries on which this application depends on
# Sort by high-level to low-level
target_link_libraries(llimage_libtest
- ${LLCOMMON_LIBRARIES}
- ${LLVFS_LIBRARIES}
+ ${LLCOMMON_LIBRARIES}
+ ${LLVFS_LIBRARIES}
${LLIMAGE_LIBRARIES}
${LLKDU_LIBRARIES}
${KDU_LIBRARY}
${LLIMAGEJ2COJ_LIBRARIES}
${OS_LIBRARIES}
)
-
+
if (DARWIN)
# Path inside the app bundle where we'll need to copy libraries
set(LLIMAGE_LIBTEST_DESTINATION_DIR
diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
index 976aae08bb..48e876429d 100644
--- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
+++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
@@ -38,6 +38,7 @@
#include "llimagetga.h"
#include "llimagej2c.h"
#include "lldir.h"
+#include "lldiriterator.h"
// system libraries
#include <iostream>
@@ -201,7 +202,8 @@ void store_input_file(std::list<std::string> &input_filenames, const std::string
{
// If file name is a pattern, iterate to get each file name and store
std::string next_name;
- while (gDirUtilp->getNextFileInDir(dir,name,next_name))
+ LLDirIterator iter(dir, name);
+ while (iter.next(next_name))
{
std::string file_name = dir + gDirUtilp->getDirDelimiter() + next_name;
input_filenames.push_back(file_name);
diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt
index df47167154..1180460f4b 100644
--- a/indra/integration_tests/llui_libtest/CMakeLists.txt
+++ b/indra/integration_tests/llui_libtest/CMakeLists.txt
@@ -71,6 +71,7 @@ endif (DARWIN)
# Sort by high-level to low-level
target_link_libraries(llui_libtest
llui
+ llinventory
llmessage
${LLRENDER_LIBRARIES}
${LLIMAGE_LIBRARIES}
diff --git a/indra/lib/python/indra/base/cllsd_test.py b/indra/lib/python/indra/base/cllsd_test.py
index 0b20d99d80..1f06898ffd 100644
--- a/indra/lib/python/indra/base/cllsd_test.py
+++ b/indra/lib/python/indra/base/cllsd_test.py
@@ -1,3 +1,25 @@
+#!/usr/bin/python
+##
+## $LicenseInfo:firstyear=2011&license=viewerlgpl$
+## Second Life Viewer Source Code
+## Copyright (C) 2011, Linden Research, Inc.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation;
+## version 2.1 of the License only.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+##
+## Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+## $/LicenseInfo$
from indra.base import llsd, lluuid
from datetime import datetime
import cllsd
diff --git a/indra/lib/python/indra/base/lluuid.py b/indra/lib/python/indra/base/lluuid.py
index 1cdd8e915b..369ae4e92f 100644
--- a/indra/lib/python/indra/base/lluuid.py
+++ b/indra/lib/python/indra/base/lluuid.py
@@ -163,7 +163,7 @@ class UUID(object):
def setFromMemoryDump(self, gdb_string):
"""
We expect to get gdb_string as four hex units. eg:
- 0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
+ 0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
Which will be translated to:
db547d14-1b3f4bc3-9b984f71-d22f890a
Returns self.
@@ -187,7 +187,7 @@ class UUID(object):
def getAsString(self):
"""
Return a different string representation of the form
- AAAAAAAA-AAAABBBB-BBBBBBBB-BBCCCCCC (a 128-bit number in hex)
+ AAAAAAAA-AAAABBBB-BBBBBBBB-BBCCCCCC (a 128-bit number in hex)
where A=network address, B=timestamp, C=random.
"""
i1 = _binstr2int(self._bits[0:4])
@@ -233,7 +233,7 @@ NULL = UUID()
def printTranslatedMemory(four_hex_uints):
"""
We expect to get the string as four hex units. eg:
- 0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
+ 0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2
Which will be translated to:
db547d14-1b3f4bc3-9b984f71-d22f890a
"""
diff --git a/indra/lib/python/indra/ipc/httputil.py b/indra/lib/python/indra/ipc/httputil.py
index c4ac0a379d..d53f34a771 100644
--- a/indra/lib/python/indra/ipc/httputil.py
+++ b/indra/lib/python/indra/ipc/httputil.py
@@ -1,3 +1,24 @@
+#!/usr/bin/python
+## $LicenseInfo:firstyear=2011&license=viewerlgpl$
+## Second Life Viewer Source Code
+## Copyright (C) 2011, Linden Research, Inc.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation;
+## version 2.1 of the License only.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+##
+## Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+## $/LicenseInfo$
import warnings
diff --git a/indra/lib/python/indra/ipc/russ.py b/indra/lib/python/indra/ipc/russ.py
index 35d8afb158..ac780f128b 100644
--- a/indra/lib/python/indra/ipc/russ.py
+++ b/indra/lib/python/indra/ipc/russ.py
@@ -110,7 +110,7 @@ def format(format_str, context):
def _find_sub_matches(format_str):
"""@brief Find all of the substitution matches.
-@param format_str the RUSS conformant format string.
+@param format_str the RUSS conformant format string.
@return Returns an array of depths of arrays of positional matches in input.
"""
depth = 0
diff --git a/indra/lib/python/indra/ipc/siesta_test.py b/indra/lib/python/indra/ipc/siesta_test.py
index 177ea710d1..a35eed2460 100644
--- a/indra/lib/python/indra/ipc/siesta_test.py
+++ b/indra/lib/python/indra/ipc/siesta_test.py
@@ -1,3 +1,24 @@
+#!/usr/bin/python
+## $LicenseInfo:firstyear=2011&license=viewerlgpl$
+## Second Life Viewer Source Code
+## Copyright (C) 2011, Linden Research, Inc.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation;
+## version 2.1 of the License only.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+##
+## Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+## $/LicenseInfo$
from indra.base import llsd, lluuid
from indra.ipc import siesta
import datetime, math, unittest
diff --git a/indra/lib/python/uuid.py b/indra/lib/python/uuid.py
index 0bc21a35f8..e956383cca 100644
--- a/indra/lib/python/uuid.py
+++ b/indra/lib/python/uuid.py
@@ -1,3 +1,24 @@
+#!/usr/bin/python
+## $LicenseInfo:firstyear=2011&license=viewerlgpl$
+## Second Life Viewer Source Code
+## Copyright (C) 2011, Linden Research, Inc.
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation;
+## version 2.1 of the License only.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+##
+## Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+## $/LicenseInfo$
r"""UUID objects (universally unique identifiers) according to RFC 4122.
This module provides immutable UUID objects (class UUID) and the functions
diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt
index ab62a0d0af..98ebdc7487 100644
--- a/indra/linux_crash_logger/CMakeLists.txt
+++ b/indra/linux_crash_logger/CMakeLists.txt
@@ -3,6 +3,7 @@
project(linux_crash_logger)
include(00-Common)
+include(GLH)
include(LLCommon)
include(LLCrashLogger)
include(LLMath)
diff --git a/indra/linux_crash_logger/linux_crash_logger.cpp b/indra/linux_crash_logger/linux_crash_logger.cpp
index 8beae555fb..99d0ad7e14 100644
--- a/indra/linux_crash_logger/linux_crash_logger.cpp
+++ b/indra/linux_crash_logger/linux_crash_logger.cpp
@@ -24,16 +24,24 @@
* $/LicenseInfo$
*/
+#include "linden_common.h"
#include "llcrashloggerlinux.h"
int main(int argc, char **argv)
{
+ llinfos << "Starting crash reporter." << llendl;
+
LLCrashLoggerLinux app;
app.parseCommandOptions(argc, argv);
- app.init();
+
+ if (! app.init())
+ {
+ llwarns << "Unable to initialize application." << llendl;
+ return 1;
+ }
+
app.mainLoop();
app.cleanup();
+ llinfos << "Crash reporter finished normally." << llendl;
return 0;
}
-
-
diff --git a/indra/linux_crash_logger/llcrashloggerlinux.cpp b/indra/linux_crash_logger/llcrashloggerlinux.cpp
index 7449c6426f..62465f9937 100644
--- a/indra/linux_crash_logger/llcrashloggerlinux.cpp
+++ b/indra/linux_crash_logger/llcrashloggerlinux.cpp
@@ -30,8 +30,6 @@
#include "linden_common.h"
-#include "boost/tokenizer.hpp"
-
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
#include "llerror.h"
#include "llfile.h"
@@ -135,6 +133,12 @@ bool LLCrashLoggerLinux::mainLoop()
return true;
}
+bool LLCrashLoggerLinux::cleanup()
+{
+ commonCleanup();
+ return true;
+}
+
void LLCrashLoggerLinux::updateApplication(const std::string& message)
{
LLCrashLogger::updateApplication(message);
diff --git a/indra/linux_crash_logger/llcrashloggerlinux.h b/indra/linux_crash_logger/llcrashloggerlinux.h
index 65d5e4e653..dae6c46651 100644
--- a/indra/linux_crash_logger/llcrashloggerlinux.h
+++ b/indra/linux_crash_logger/llcrashloggerlinux.h
@@ -39,6 +39,7 @@ public:
virtual bool mainLoop();
virtual void updateApplication(const std::string& = LLStringUtil::null);
virtual void gatherPlatformSpecificFiles();
+ virtual bool cleanup();
};
#endif
diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt
index 6eb154458d..a1712699eb 100644
--- a/indra/llcharacter/CMakeLists.txt
+++ b/indra/llcharacter/CMakeLists.txt
@@ -79,11 +79,11 @@ add_library (llcharacter ${llcharacter_SOURCE_FILES})
# Add tests
if (LL_TESTS)
- include(LLAddBuildTest)
- # UNIT TESTS
- SET(llcharacter_TEST_SOURCE_FILES
- lljoint.cpp
- )
- LL_ADD_PROJECT_UNIT_TESTS(llcharacter "${llcharacter_TEST_SOURCE_FILES}")
+ include(LLAddBuildTest)
+ # UNIT TESTS
+ SET(llcharacter_TEST_SOURCE_FILES
+ lljoint.cpp
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llcharacter "${llcharacter_TEST_SOURCE_FILES}")
endif (LL_TESTS)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 9910281b64..0a3eaec5c5 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -115,7 +115,7 @@ set(llcommon_HEADER_FILES
indra_constants.h
linden_common.h
linked_lists.h
- llaccountingquota.h
+ llaccountingcost.h
llallocator.h
llallocator_heap_profile.h
llagentconstants.h
@@ -317,7 +317,9 @@ if (LL_TESTS)
LL_ADD_INTEGRATION_TEST(lllazy "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}")
- LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}")
+ LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}"
+ "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/tests/setpython.py")
+ LL_ADD_INTEGRATION_TEST(llsingleton "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lluri "" "${test_libs}")
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index d0f287657e..0745696ef3 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -387,8 +387,6 @@ const S32 MAP_SIM_RETURN_NULL_SIMS = 0x00010000;
const S32 MAP_SIM_PRELUDE = 0x00020000;
// Crash reporter behavior
-const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
-const char* const CRASH_BEHAVIOR_SETTING = "CrashSubmitBehavior";
const S32 CRASH_BEHAVIOR_ASK = 0;
const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
diff --git a/indra/llcommon/llaccountingquota.h b/indra/llcommon/llaccountingcost.h
index 140333de07..0ef3b50c6d 100644
--- a/indra/llcommon/llaccountingquota.h
+++ b/indra/llcommon/llaccountingcost.h
@@ -1,5 +1,5 @@
/**
- * @file llaccountingquota.h
+ * @file llaccountingcost.h
* @
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
@@ -58,22 +58,28 @@ struct ParcelQuota
F32 mParcelCapacity;
};
-struct SelectionQuota
+//SelectionQuota atm does not require a id
+struct SelectionCost
{
- SelectionQuota( LLUUID localId, F32 renderCost, F32 physicsCost, F32 networkCost, F32 simulationCost )
- : mLocalId( localId)
- , mRenderCost( renderCost )
- , mPhysicsCost( physicsCost )
+ SelectionCost( /*LLTransactionID transactionId, */ F32 physicsCost, F32 networkCost, F32 simulationCost )
+ //: mTransactionId( transactionId)
+ : mPhysicsCost( physicsCost )
, mNetworkCost( networkCost )
, mSimulationCost( simulationCost )
{
}
- SelectionQuota() {}
+ SelectionCost()
+ : mPhysicsCost( 0.0f )
+ , mNetworkCost( 0.0f )
+ , mSimulationCost( 0.0f )
+ {}
- F32 mRenderCost, mPhysicsCost, mNetworkCost, mSimulationCost;
- LLUUID mLocalId;
+ F32 mPhysicsCost, mNetworkCost, mSimulationCost;
+ //LLTransactionID mTransactionId;
};
+typedef enum { Roots = 0 , Prims } eSelectionType;
+
#endif
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp
index 145dddd543..5e566d6c7c 100644
--- a/indra/llcommon/llassettype.cpp
+++ b/indra/llcommon/llassettype.cpp
@@ -93,7 +93,8 @@ LLAssetDictionary::LLAssetDictionary()
addEntry(LLAssetType::AT_LINK, new AssetEntry("LINK", "link", "sym link", false, false, true));
addEntry(LLAssetType::AT_LINK_FOLDER, new AssetEntry("FOLDER_LINK", "link_f", "sym folder link", false, false, true));
- addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, false, false));
+ addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, false, false));
+ addEntry(LLAssetType::AT_WIDGET, new AssetEntry("WIDGET", "widget", "widget", false, false, false));
addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, FALSE, FALSE, FALSE));
};
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 74ccd00324..d538accbf7 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -108,9 +108,13 @@ public:
AT_LINK_FOLDER = 25,
// Inventory folder link
+
+ AT_WIDGET = 40,
+ // UI Widget: this is *not* an inventory asset type, only a viewer side asset (e.g. button, other ui items...)
+
AT_MESH = 49,
- // Mesh data in our proprietary SLM format
-
+ // Mesh data in our proprietary SLM format
+
AT_COUNT = 50,
// +*********************************************************+
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index bb64152407..c35799bbb9 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -379,7 +379,7 @@ namespace
{
/* This pattern, of returning a reference to a static function
variable, is to ensure that this global is constructed before
- it is used, no matter what the global initializeation sequence
+ it is used, no matter what the global initialization sequence
is.
See C++ FAQ Lite, sections 10.12 through 10.14
*/
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h
index 4a42241c4f..b3e604f8e8 100644
--- a/indra/llcommon/llerror.h
+++ b/indra/llcommon/llerror.h
@@ -39,7 +39,7 @@
Information for most users:
- Code can log messages with constuctions like this:
+ Code can log messages with constructions like this:
LL_INFOS("StringTag") << "request to fizzbip agent " << agent_id
<< " denied due to timeout" << LL_ENDL;
@@ -47,9 +47,9 @@
Messages can be logged to one of four increasing levels of concern,
using one of four "streams":
- LL_DEBUGS("StringTag") - debug messages that are normally supressed
- LL_INFOS("StringTag") - informational messages that are normall shown
- LL_WARNS("StringTag") - warning messages that singal a problem
+ LL_DEBUGS("StringTag") - debug messages that are normally suppressed
+ LL_INFOS("StringTag") - informational messages that are normal shown
+ LL_WARNS("StringTag") - warning messages that signal a problem
LL_ERRS("StringTag") - error messages that are major, unrecoverable failures
The later (LL_ERRS("StringTag")) automatically crashes the process after the message
@@ -90,7 +90,7 @@
WARN: LLFoo::doSomething: called with a big value for i: 283
- Which messages are logged and which are supressed can be controled at run
+ Which messages are logged and which are suppressed can be controlled at run
time from the live file logcontrol.xml based on function, class and/or
source file. See etc/logcontrol-dev.xml for details.
@@ -106,7 +106,7 @@ namespace LLError
enum ELevel
{
LEVEL_ALL = 0,
- // used to indicate that all messagess should be logged
+ // used to indicate that all messages should be logged
LEVEL_DEBUG = 0,
LEVEL_INFO = 1,
@@ -220,7 +220,7 @@ namespace LLError
// See top of file for example of how to use this
typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
- // Outside a class declartion, or in class without LOG_CLASS(), this
+ // Outside a class declaration, or in class without LOG_CLASS(), this
// typedef causes the messages to not be associated with any class.
diff --git a/indra/llcommon/lleventapi.cpp b/indra/llcommon/lleventapi.cpp
index 4270c8b511..ff5459c1eb 100644
--- a/indra/llcommon/lleventapi.cpp
+++ b/indra/llcommon/lleventapi.cpp
@@ -34,6 +34,7 @@
// std headers
// external library headers
// other Linden headers
+#include "llerror.h"
LLEventAPI::LLEventAPI(const std::string& name, const std::string& desc, const std::string& field):
lbase(name, field),
@@ -45,3 +46,32 @@ LLEventAPI::LLEventAPI(const std::string& name, const std::string& desc, const s
LLEventAPI::~LLEventAPI()
{
}
+
+LLEventAPI::Response::Response(const LLSD& seed, const LLSD& request, const LLSD::String& replyKey):
+ mResp(seed),
+ mReq(request),
+ mKey(replyKey)
+{}
+
+LLEventAPI::Response::~Response()
+{
+ // When you instantiate a stack Response object, if the original
+ // request requested a reply, send it when we leave this block, no
+ // matter how.
+ sendReply(mResp, mReq, mKey);
+}
+
+void LLEventAPI::Response::warn(const std::string& warning)
+{
+ LL_WARNS("LLEventAPI::Response") << warning << LL_ENDL;
+ mResp["warnings"].append(warning);
+}
+
+void LLEventAPI::Response::error(const std::string& error)
+{
+ // Use LL_WARNS rather than LL_ERROR: we don't want the viewer to shut
+ // down altogether.
+ LL_WARNS("LLEventAPI::Response") << error << LL_ENDL;
+
+ mResp["error"] = error;
+}
diff --git a/indra/llcommon/lleventapi.h b/indra/llcommon/lleventapi.h
index d75d521e8e..1a37d780b6 100644
--- a/indra/llcommon/lleventapi.h
+++ b/indra/llcommon/lleventapi.h
@@ -76,6 +76,89 @@ public:
LLEventDispatcher::add(name, desc, callable, required);
}
+ /**
+ * Instantiate a Response object in any LLEventAPI subclass method that
+ * wants to guarantee a reply (if requested) will be sent on exit from the
+ * method. The reply will be sent if request.has(@a replyKey), default
+ * "reply". If specified, the value of request[replyKey] is the name of
+ * the LLEventPump on which to send the reply. Conventionally you might
+ * code something like:
+ *
+ * @code
+ * void MyEventAPI::someMethod(const LLSD& request)
+ * {
+ * // Send a reply event as long as request.has("reply")
+ * Response response(LLSD(), request);
+ * // ...
+ * // will be sent in reply event
+ * response["somekey"] = some_data;
+ * }
+ * @endcode
+ */
+ class LL_COMMON_API Response
+ {
+ public:
+ /**
+ * Instantiating a Response object in an LLEventAPI subclass method
+ * ensures that, if desired, a reply event will be sent.
+ *
+ * @a seed is the initial reply LLSD that will be further decorated before
+ * being sent as the reply
+ *
+ * @a request is the incoming request LLSD; we particularly care about
+ * [replyKey] and ["reqid"]
+ *
+ * @a replyKey [default "reply"] is the string name of the LLEventPump
+ * on which the caller wants a reply. If <tt>(!
+ * request.has(replyKey))</tt>, no reply will be sent.
+ */
+ Response(const LLSD& seed, const LLSD& request, const LLSD::String& replyKey="reply");
+ ~Response();
+
+ /**
+ * @code
+ * if (some condition)
+ * {
+ * response.warn("warnings are logged and collected in [\"warnings\"]");
+ * }
+ * @endcode
+ */
+ void warn(const std::string& warning);
+ /**
+ * @code
+ * if (some condition isn't met)
+ * {
+ * // In a function returning void, you can validly 'return
+ * // expression' if the expression is itself of type void. But
+ * // returning is up to you; response.error() has no effect on
+ * // flow of control.
+ * return response.error("error message, logged and also sent as [\"error\"]");
+ * }
+ * @endcode
+ */
+ void error(const std::string& error);
+
+ /**
+ * set other keys...
+ *
+ * @code
+ * // set any attributes you want to be sent in the reply
+ * response["info"] = some_value;
+ * // ...
+ * response["ok"] = went_well;
+ * @endcode
+ */
+ LLSD& operator[](const LLSD::String& key) { return mResp[key]; }
+
+ /**
+ * set the response to the given data
+ */
+ void setResponse(LLSD const & response){ mResp = response; }
+
+ LLSD mResp, mReq;
+ LLSD::String mKey;
+ };
+
private:
std::string mDesc;
};
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index ff03506e84..db1ea4792b 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -591,6 +591,17 @@ void LLReqID::stamp(LLSD& response) const
bool sendReply(const LLSD& reply, const LLSD& request, const std::string& replyKey)
{
+ // If the original request has no value for replyKey, it's pointless to
+ // construct or send a reply event: on which LLEventPump should we send
+ // it? Allow that to be optional: if the caller wants to require replyKey,
+ // it can so specify when registering the operation method.
+ if (! request.has(replyKey))
+ {
+ return false;
+ }
+
+ // Here the request definitely contains replyKey; reasonable to proceed.
+
// Copy 'reply' to modify it.
LLSD newreply(reply);
// Get the ["reqid"] element from request
diff --git a/indra/llcommon/lleventtimer.cpp b/indra/llcommon/lleventtimer.cpp
index 7743826c60..0d96e03da4 100644
--- a/indra/llcommon/lleventtimer.cpp
+++ b/indra/llcommon/lleventtimer.cpp
@@ -58,19 +58,15 @@ LLEventTimer::~LLEventTimer()
void LLEventTimer::updateClass()
{
std::list<LLEventTimer*> completed_timers;
-
+ for (instance_iter iter = beginInstances(); iter != endInstances(); )
{
- LLInstanceTrackerScopedGuard guard;
- for (instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); )
- {
- LLEventTimer& timer = *iter++;
- F32 et = timer.mEventTimer.getElapsedTimeF32();
- if (timer.mEventTimer.getStarted() && et > timer.mPeriod) {
- timer.mEventTimer.reset();
- if ( timer.tick() )
- {
- completed_timers.push_back( &timer );
- }
+ LLEventTimer& timer = *iter++;
+ F32 et = timer.mEventTimer.getElapsedTimeF32();
+ if (timer.mEventTimer.getStarted() && et > timer.mPeriod) {
+ timer.mEventTimer.reset();
+ if ( timer.tick() )
+ {
+ completed_timers.push_back( &timer );
}
}
}
diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp
index bd594b06cf..463f558c2c 100644
--- a/indra/llcommon/llfasttimer_class.cpp
+++ b/indra/llcommon/llfasttimer_class.cpp
@@ -219,15 +219,20 @@ LLFastTimer::DeclareTimer::DeclareTimer(const std::string& name)
// static
void LLFastTimer::DeclareTimer::updateCachedPointers()
{
- DeclareTimer::LLInstanceTrackerScopedGuard guard;
// propagate frame state pointers to timer declarations
- for (DeclareTimer::instance_iter it = guard.beginInstances();
- it != guard.endInstances();
- ++it)
+ for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
// update cached pointer
it->mFrameState = &it->mTimer.getFrameState();
}
+
+ // also update frame states of timers on stack
+ LLFastTimer* cur_timerp = LLFastTimer::sCurTimerData.mCurTimer;
+ while(cur_timerp->mLastTimerData.mCurTimer != cur_timerp)
+ {
+ cur_timerp->mFrameState = &cur_timerp->mFrameState->mTimer->getFrameState();
+ cur_timerp = cur_timerp->mLastTimerData.mCurTimer;
+ }
}
//static
@@ -298,14 +303,15 @@ LLFastTimer::NamedTimer::~NamedTimer()
std::string LLFastTimer::NamedTimer::getToolTip(S32 history_idx)
{
+ F64 ms_multiplier = 1000.0 / (F64)LLFastTimer::countsPerSecond();
if (history_idx < 0)
{
- // by default, show average number of calls
- return llformat("%s (%d calls)", getName().c_str(), (S32)getCallAverage());
+ // by default, show average number of call
+ return llformat("%s (%d ms, %d calls)", getName().c_str(), (S32)(getCountAverage() * ms_multiplier), (S32)getCallAverage());
}
else
{
- return llformat("%s (%d calls)", getName().c_str(), (S32)getHistoricalCalls(history_idx));
+ return llformat("%s (%d ms, %d calls)", getName().c_str(), (S32)(getHistoricalCount(history_idx) * ms_multiplier), (S32)getHistoricalCalls(history_idx));
}
}
@@ -388,10 +394,7 @@ void LLFastTimer::NamedTimer::buildHierarchy()
// set up initial tree
{
- NamedTimer::LLInstanceTrackerScopedGuard guard;
- for (instance_iter it = guard.beginInstances();
- it != guard.endInstances();
- ++it)
+ for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
NamedTimer& timer = *it;
if (&timer == NamedTimerFactory::instance().getRootTimer()) continue;
@@ -519,10 +522,7 @@ void LLFastTimer::NamedTimer::resetFrame()
LLSD sd;
{
- NamedTimer::LLInstanceTrackerScopedGuard guard;
- for (NamedTimer::instance_iter it = guard.beginInstances();
- it != guard.endInstances();
- ++it)
+ for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
NamedTimer& timer = *it;
FrameState& info = timer.getFrameState();
@@ -559,7 +559,7 @@ void LLFastTimer::NamedTimer::resetFrame()
llassert_always(timerp->mFrameStateIndex < (S32)getFrameStateList().size());
}
- // sort timers by dfs traversal order to improve cache coherency
+ // sort timers by DFS traversal order to improve cache coherency
std::sort(getFrameStateList().begin(), getFrameStateList().end(), SortTimersDFS());
// update pointers into framestatelist now that we've sorted it
@@ -567,10 +567,7 @@ void LLFastTimer::NamedTimer::resetFrame()
// reset for next frame
{
- NamedTimer::LLInstanceTrackerScopedGuard guard;
- for (NamedTimer::instance_iter it = guard.beginInstances();
- it != guard.endInstances();
- ++it)
+ for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
NamedTimer& timer = *it;
@@ -614,10 +611,7 @@ void LLFastTimer::NamedTimer::reset()
// reset all history
{
- NamedTimer::LLInstanceTrackerScopedGuard guard;
- for (NamedTimer::instance_iter it = guard.beginInstances();
- it != guard.endInstances();
- ++it)
+ for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
NamedTimer& timer = *it;
if (&timer != NamedTimerFactory::instance().getRootTimer())
@@ -700,17 +694,7 @@ void LLFastTimer::nextFrame()
llinfos << "Slow frame, fast timers inaccurate" << llendl;
}
- if (sPauseHistory)
- {
- sResetHistory = true;
- }
- else if (sResetHistory)
- {
- sLastFrameIndex = 0;
- sCurFrameIndex = 0;
- sResetHistory = false;
- }
- else // not paused
+ if (!sPauseHistory)
{
NamedTimer::processTimes();
sLastFrameIndex = sCurFrameIndex++;
@@ -865,7 +849,7 @@ std::string LLFastTimer::sClockType = "rdtsc";
#else
//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp
-// These use QueryPerformanceCounter, which is arguably fine and also works on amd architectures.
+// These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures.
U32 LLFastTimer::getCPUClockCount32()
{
return (U32)(get_clock_count()>>8);
diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h
index 827747f0c6..f481e968a6 100644
--- a/indra/llcommon/llfasttimer_class.h
+++ b/indra/llcommon/llfasttimer_class.h
@@ -66,7 +66,7 @@ public:
public:
~NamedTimer();
- enum { HISTORY_NUM = 60 };
+ enum { HISTORY_NUM = 300 };
const std::string& getName() const { return mName; }
NamedTimer* getParent() const { return mParent; }
diff --git a/indra/llcommon/llinstancetracker.cpp b/indra/llcommon/llinstancetracker.cpp
index f576204511..5dc3ea5d7b 100644
--- a/indra/llcommon/llinstancetracker.cpp
+++ b/indra/llcommon/llinstancetracker.cpp
@@ -35,14 +35,15 @@
//static
void * & LLInstanceTrackerBase::getInstances(std::type_info const & info)
{
- static std::map<std::string, void *> instances;
+ typedef std::map<std::string, void *> InstancesMap;
+ static InstancesMap instances;
- std::string k = info.name();
- if(instances.find(k) == instances.end())
- {
- instances[k] = NULL;
- }
-
- return instances[k];
+ // std::map::insert() is just what we want here. You attempt to insert a
+ // (key, value) pair. If the specified key doesn't yet exist, it inserts
+ // the pair and returns a std::pair of (iterator, true). If the specified
+ // key DOES exist, insert() simply returns (iterator, false). One lookup
+ // handles both cases.
+ return instances.insert(InstancesMap::value_type(info.name(),
+ InstancesMap::mapped_type()))
+ .first->second;
}
-
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
index b971b2f914..34d841a4e0 100644
--- a/indra/llcommon/llinstancetracker.h
+++ b/indra/llcommon/llinstancetracker.h
@@ -29,6 +29,7 @@
#define LL_LLINSTANCETRACKER_H
#include <map>
+#include <typeinfo>
#include "string_table.h"
#include <boost/utility.hpp>
@@ -37,10 +38,40 @@
#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator/indirect_iterator.hpp>
+/**
+ * Base class manages "class-static" data that must actually have singleton
+ * semantics: one instance per process, rather than one instance per module as
+ * sometimes happens with data simply declared static.
+ */
class LL_COMMON_API LLInstanceTrackerBase : public boost::noncopyable
{
- protected:
- static void * & getInstances(std::type_info const & info);
+protected:
+ /// Get a process-unique void* pointer slot for the specified type_info
+ static void * & getInstances(std::type_info const & info);
+
+ /// Find or create a STATICDATA instance for the specified TRACKED class.
+ /// STATICDATA must be default-constructible.
+ template<typename STATICDATA, class TRACKED>
+ static STATICDATA& getStatic()
+ {
+ void *& instances = getInstances(typeid(TRACKED));
+ if (! instances)
+ {
+ instances = new STATICDATA;
+ }
+ return *static_cast<STATICDATA*>(instances);
+ }
+
+ /// It's not essential to derive your STATICDATA (for use with
+ /// getStatic()) from StaticBase; it's just that both known
+ /// implementations do.
+ struct StaticBase
+ {
+ StaticBase():
+ sIterationNestDepth(0)
+ {}
+ S32 sIterationNestDepth;
+ };
};
/// This mix-in class adds support for tracking all instances of the specified class parameter T
@@ -50,15 +81,89 @@ class LL_COMMON_API LLInstanceTrackerBase : public boost::noncopyable
template<typename T, typename KEY = T*>
class LLInstanceTracker : public LLInstanceTrackerBase
{
- typedef typename std::map<KEY, T*> InstanceMap;
typedef LLInstanceTracker<T, KEY> MyT;
- typedef boost::function<const KEY&(typename InstanceMap::value_type&)> KeyGetter;
- typedef boost::function<T*(typename InstanceMap::value_type&)> InstancePtrGetter;
+ typedef typename std::map<KEY, T*> InstanceMap;
+ struct StaticData: public StaticBase
+ {
+ InstanceMap sMap;
+ };
+ static StaticData& getStatic() { return LLInstanceTrackerBase::getStatic<StaticData, MyT>(); }
+ static InstanceMap& getMap_() { return getStatic().sMap; }
+
public:
- /// Dereferencing key_iter gives you a const KEY&
- typedef boost::transform_iterator<KeyGetter, typename InstanceMap::iterator> key_iter;
- /// Dereferencing instance_iter gives you a T&
- typedef boost::indirect_iterator< boost::transform_iterator<InstancePtrGetter, typename InstanceMap::iterator> > instance_iter;
+ class instance_iter : public boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag>
+ {
+ public:
+ typedef boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag> super_t;
+
+ instance_iter(const typename InstanceMap::iterator& it)
+ : mIterator(it)
+ {
+ ++getStatic().sIterationNestDepth;
+ }
+
+ ~instance_iter()
+ {
+ --getStatic().sIterationNestDepth;
+ }
+
+
+ private:
+ friend class boost::iterator_core_access;
+
+ void increment() { mIterator++; }
+ bool equal(instance_iter const& other) const
+ {
+ return mIterator == other.mIterator;
+ }
+
+ T& dereference() const
+ {
+ return *(mIterator->second);
+ }
+
+ typename InstanceMap::iterator mIterator;
+ };
+
+ class key_iter : public boost::iterator_facade<key_iter, KEY, boost::forward_traversal_tag>
+ {
+ public:
+ typedef boost::iterator_facade<key_iter, KEY, boost::forward_traversal_tag> super_t;
+
+ key_iter(typename InstanceMap::iterator it)
+ : mIterator(it)
+ {
+ ++getStatic().sIterationNestDepth;
+ }
+
+ key_iter(const key_iter& other)
+ : mIterator(other.mIterator)
+ {
+ ++getStatic().sIterationNestDepth;
+ }
+
+ ~key_iter()
+ {
+ --getStatic().sIterationNestDepth;
+ }
+
+
+ private:
+ friend class boost::iterator_core_access;
+
+ void increment() { mIterator++; }
+ bool equal(key_iter const& other) const
+ {
+ return mIterator == other.mIterator;
+ }
+
+ KEY& dereference() const
+ {
+ return const_cast<KEY&>(mIterator->first);
+ }
+
+ typename InstanceMap::iterator mIterator;
+ };
static T* getInstance(const KEY& k)
{
@@ -66,57 +171,56 @@ public:
return (found == getMap_().end()) ? NULL : found->second;
}
- static key_iter beginKeys()
- {
- return boost::make_transform_iterator(getMap_().begin(),
- boost::bind(&InstanceMap::value_type::first, _1));
+ static instance_iter beginInstances()
+ {
+ return instance_iter(getMap_().begin());
}
- static key_iter endKeys()
+
+ static instance_iter endInstances()
{
- return boost::make_transform_iterator(getMap_().end(),
- boost::bind(&InstanceMap::value_type::first, _1));
+ return instance_iter(getMap_().end());
}
- static instance_iter beginInstances()
+
+ static S32 instanceCount() { return getMap_().size(); }
+
+ static key_iter beginKeys()
{
- return instance_iter(boost::make_transform_iterator(getMap_().begin(),
- boost::bind(&InstanceMap::value_type::second, _1)));
+ return key_iter(getMap_().begin());
}
- static instance_iter endInstances()
+ static key_iter endKeys()
{
- return instance_iter(boost::make_transform_iterator(getMap_().end(),
- boost::bind(&InstanceMap::value_type::second, _1)));
+ return key_iter(getMap_().end());
}
- static S32 instanceCount() { return getMap_().size(); }
+
protected:
- LLInstanceTracker(KEY key) { add_(key); }
- virtual ~LLInstanceTracker() { remove_(); }
+ LLInstanceTracker(KEY key)
+ {
+ // make sure static data outlives all instances
+ getStatic();
+ add_(key);
+ }
+ virtual ~LLInstanceTracker()
+ {
+ // it's unsafe to delete instances of this type while all instances are being iterated over.
+ llassert_always(getStatic().sIterationNestDepth == 0);
+ remove_();
+ }
virtual void setKey(KEY key) { remove_(); add_(key); }
- virtual const KEY& getKey() const { return mKey; }
+ virtual const KEY& getKey() const { return mInstanceKey; }
private:
void add_(KEY key)
{
- mKey = key;
+ mInstanceKey = key;
getMap_()[key] = static_cast<T*>(this);
}
void remove_()
{
- getMap_().erase(mKey);
+ getMap_().erase(mInstanceKey);
}
- static InstanceMap& getMap_()
- {
- void * & instances = getInstances(typeid(MyT));
- if (! instances)
- {
- instances = new InstanceMap;
- }
- return * static_cast<InstanceMap*>(instances);
- }
-
private:
-
- KEY mKey;
+ KEY mInstanceKey;
};
/// explicit specialization for default case where KEY is T*
@@ -124,73 +228,79 @@ private:
template<typename T>
class LLInstanceTracker<T, T*> : public LLInstanceTrackerBase
{
- typedef typename std::set<T*> InstanceSet;
typedef LLInstanceTracker<T, T*> MyT;
+ typedef typename std::set<T*> InstanceSet;
+ struct StaticData: public StaticBase
+ {
+ InstanceSet sSet;
+ };
+ static StaticData& getStatic() { return LLInstanceTrackerBase::getStatic<StaticData, MyT>(); }
+ static InstanceSet& getSet_() { return getStatic().sSet; }
+
public:
- /// Dereferencing key_iter gives you a T* (since T* is the key)
- typedef typename InstanceSet::iterator key_iter;
- /// Dereferencing instance_iter gives you a T&
- typedef boost::indirect_iterator<key_iter> instance_iter;
/// for completeness of analogy with the generic implementation
static T* getInstance(T* k) { return k; }
static S32 instanceCount() { return getSet_().size(); }
- // Instantiate this to get access to iterators for this type. It's a 'guard' in the sense
- // that it treats deletes of this type as errors as long as there is an instance of
- // this class alive in scope somewhere (i.e. deleting while iterating is bad).
- class LLInstanceTrackerScopedGuard
+ class instance_iter : public boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag>
{
public:
- LLInstanceTrackerScopedGuard()
+ instance_iter(const typename InstanceSet::iterator& it)
+ : mIterator(it)
+ {
+ ++getStatic().sIterationNestDepth;
+ }
+
+ instance_iter(const instance_iter& other)
+ : mIterator(other.mIterator)
+ {
+ ++getStatic().sIterationNestDepth;
+ }
+
+ ~instance_iter()
+ {
+ --getStatic().sIterationNestDepth;
+ }
+
+ private:
+ friend class boost::iterator_core_access;
+
+ void increment() { mIterator++; }
+ bool equal(instance_iter const& other) const
{
- ++sIterationNestDepth;
+ return mIterator == other.mIterator;
}
- ~LLInstanceTrackerScopedGuard()
+ T& dereference() const
{
- --sIterationNestDepth;
+ return **mIterator;
}
- static instance_iter beginInstances() { return instance_iter(getSet_().begin()); }
- static instance_iter endInstances() { return instance_iter(getSet_().end()); }
- static key_iter beginKeys() { return getSet_().begin(); }
- static key_iter endKeys() { return getSet_().end(); }
+ typename InstanceSet::iterator mIterator;
};
+ static instance_iter beginInstances() { return instance_iter(getSet_().begin()); }
+ static instance_iter endInstances() { return instance_iter(getSet_().end()); }
+
protected:
LLInstanceTracker()
{
- // it's safe but unpredictable to create instances of this type while all instances are being iterated over. I hate unpredictable. This assert will probably be turned on early in the next development cycle.
- //llassert(sIterationNestDepth == 0);
+ // make sure static data outlives all instances
+ getStatic();
getSet_().insert(static_cast<T*>(this));
}
virtual ~LLInstanceTracker()
{
// it's unsafe to delete instances of this type while all instances are being iterated over.
- llassert(sIterationNestDepth == 0);
+ llassert_always(getStatic().sIterationNestDepth == 0);
getSet_().erase(static_cast<T*>(this));
}
LLInstanceTracker(const LLInstanceTracker& other)
{
- //llassert(sIterationNestDepth == 0);
getSet_().insert(static_cast<T*>(this));
}
-
- static InstanceSet& getSet_()
- {
- void * & instances = getInstances(typeid(MyT));
- if (! instances)
- {
- instances = new InstanceSet;
- }
- return * static_cast<InstanceSet *>(instances);
- }
-
- static S32 sIterationNestDepth;
};
-template <typename T> S32 LLInstanceTracker<T, T*>::sIterationNestDepth = 0;
-
#endif
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 21d1c84d69..bb7998c0a8 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -26,14 +26,13 @@
#include "linden_common.h"
-#include "llmemory.h"
-#if MEM_TRACK_MEM
+//#if MEM_TRACK_MEM
#include "llthread.h"
-#endif
+//#endif
#if defined(LL_WINDOWS)
-# include <windows.h>
+//# include <windows.h>
# include <psapi.h>
#elif defined(LL_DARWIN)
# include <sys/types.h>
@@ -43,10 +42,24 @@
# include <unistd.h>
#endif
+#include "llmemory.h"
+
+#include "llsys.h"
+#include "llframetimer.h"
//----------------------------------------------------------------------------
//static
char* LLMemory::reserveMem = 0;
+U32 LLMemory::sAvailPhysicalMemInKB = U32_MAX ;
+U32 LLMemory::sMaxPhysicalMemInKB = 0;
+U32 LLMemory::sAllocatedMemInKB = 0;
+U32 LLMemory::sAllocatedPageSizeInKB = 0 ;
+U32 LLMemory::sMaxHeapSizeInKB = U32_MAX ;
+BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE;
+
+#if __DEBUG_PRIVATE_MEM__
+LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sMemAllocationTracker;
+#endif
//static
void LLMemory::initClass()
@@ -71,6 +84,175 @@ void LLMemory::freeReserve()
reserveMem = NULL;
}
+//static
+void LLMemory::initMaxHeapSizeGB(F32 max_heap_size_gb, BOOL prevent_heap_failure)
+{
+ sMaxHeapSizeInKB = (U32)(max_heap_size_gb * 1024 * 1024) ;
+ sEnableMemoryFailurePrevention = prevent_heap_failure ;
+}
+
+//static
+void LLMemory::updateMemoryInfo()
+{
+#if LL_WINDOWS
+ HANDLE self = GetCurrentProcess();
+ PROCESS_MEMORY_COUNTERS counters;
+
+ if (!GetProcessMemoryInfo(self, &counters, sizeof(counters)))
+ {
+ llwarns << "GetProcessMemoryInfo failed" << llendl;
+ return ;
+ }
+
+ sAllocatedMemInKB = (U32)(counters.WorkingSetSize / 1024) ;
+ sAllocatedPageSizeInKB = (U32)(counters.PagefileUsage / 1024) ;
+
+ U32 avail_phys, avail_virtual;
+ LLMemoryInfo::getAvailableMemoryKB(avail_phys, avail_virtual) ;
+ sMaxPhysicalMemInKB = llmin(avail_phys + sAllocatedMemInKB, sMaxHeapSizeInKB);
+
+ if(sMaxPhysicalMemInKB > sAllocatedMemInKB)
+ {
+ sAvailPhysicalMemInKB = sMaxPhysicalMemInKB - sAllocatedMemInKB ;
+ }
+ else
+ {
+ sAvailPhysicalMemInKB = 0 ;
+ }
+#else
+ //not valid for other systems for now.
+ sAllocatedMemInKB = (U32)(LLMemory::getCurrentRSS() / 1024) ;
+ sMaxPhysicalMemInKB = U32_MAX ;
+ sAvailPhysicalMemInKB = U32_MAX ;
+#endif
+
+ return ;
+}
+
+//
+//this function is to test if there is enough space with the size in the virtual address space.
+//it does not do any real allocation
+//if success, it returns the address where the memory chunk can fit in;
+//otherwise it returns NULL.
+//
+//static
+void* LLMemory::tryToAlloc(void* address, U32 size)
+{
+#if LL_WINDOWS
+ address = VirtualAlloc(address, size, MEM_RESERVE | MEM_TOP_DOWN, PAGE_NOACCESS) ;
+ if(address)
+ {
+ if(!VirtualFree(address, 0, MEM_RELEASE))
+ {
+ llerrs << "error happens when free some memory reservation." << llendl ;
+ }
+ }
+ return address ;
+#else
+ return (void*)0x01 ; //skip checking
+#endif
+}
+
+//static
+void LLMemory::logMemoryInfo(BOOL update)
+{
+ if(update)
+ {
+ updateMemoryInfo() ;
+ }
+
+ llinfos << "Current allocated physical memory(KB): " << sAllocatedMemInKB << llendl ;
+ llinfos << "Current allocated page size (KB): " << sAllocatedPageSizeInKB << llendl ;
+ llinfos << "Current availabe physical memory(KB): " << sAvailPhysicalMemInKB << llendl ;
+ llinfos << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << llendl ;
+
+ llinfos << "--- private pool information -- " << llendl ;
+ llinfos << "Total reserved (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalReservedSize / 1024 << llendl ;
+ llinfos << "Total allocated (KB): " << LLPrivateMemoryPoolManager::getInstance()->mTotalAllocatedSize / 1024 << llendl ;
+}
+
+//return 0: everything is normal;
+//return 1: the memory pool is low, but not in danger;
+//return -1: the memory pool is in danger, is about to crash.
+//static
+bool LLMemory::isMemoryPoolLow()
+{
+ static const U32 LOW_MEMEOY_POOL_THRESHOLD_KB = 64 * 1024 ; //64 MB for emergency use
+ const static U32 MAX_SIZE_CHECKED_MEMORY_BLOCK = 64 * 1024 * 1024 ; //64 MB
+ static void* last_reserved_address = NULL ;
+
+ if(!sEnableMemoryFailurePrevention)
+ {
+ return false ; //no memory failure prevention.
+ }
+
+ if(sAvailPhysicalMemInKB < (LOW_MEMEOY_POOL_THRESHOLD_KB >> 2)) //out of physical memory
+ {
+ return true ;
+ }
+
+ if(sAllocatedPageSizeInKB + (LOW_MEMEOY_POOL_THRESHOLD_KB >> 2) > sMaxHeapSizeInKB) //out of virtual address space.
+ {
+ return true ;
+ }
+
+ bool is_low = (S32)(sAvailPhysicalMemInKB < LOW_MEMEOY_POOL_THRESHOLD_KB ||
+ sAllocatedPageSizeInKB + LOW_MEMEOY_POOL_THRESHOLD_KB > sMaxHeapSizeInKB) ;
+
+ //check the virtual address space fragmentation
+ if(!is_low)
+ {
+ if(!last_reserved_address)
+ {
+ last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK) ;
+ }
+ else
+ {
+ last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK) ;
+ if(!last_reserved_address) //failed, try once more
+ {
+ last_reserved_address = LLMemory::tryToAlloc(last_reserved_address, MAX_SIZE_CHECKED_MEMORY_BLOCK) ;
+ }
+ }
+
+ is_low = !last_reserved_address ; //allocation failed
+ }
+
+ return is_low ;
+}
+
+//static
+U32 LLMemory::getAvailableMemKB()
+{
+ return sAvailPhysicalMemInKB ;
+}
+
+//static
+U32 LLMemory::getMaxMemKB()
+{
+ return sMaxPhysicalMemInKB ;
+}
+
+//static
+U32 LLMemory::getAllocatedMemKB()
+{
+ return sAllocatedMemInKB ;
+}
+
+void* ll_allocate (size_t size)
+{
+ if (size == 0)
+ {
+ llwarns << "Null allocation" << llendl;
+ }
+ void *p = malloc(size);
+ if (p == NULL)
+ {
+ LLMemory::freeReserve();
+ llerrs << "Out of memory Error" << llendl;
+ }
+ return p;
+}
//----------------------------------------------------------------------------
@@ -237,7 +419,7 @@ U64 LLMemory::getCurrentRSS()
U32 LLMemory::getWorkingSetSize()
{
- return 0 ;
+ return 0;
}
#endif
@@ -258,7 +440,7 @@ LLMemTracker::LLMemTracker()
mDrawnIndex = 0 ;
mPaused = FALSE ;
- mMutexp = new LLMutex(NULL) ;
+ mMutexp = new LLMutex() ;
mStringBuffer = new char*[128] ;
mStringBuffer[0] = new char[mCapacity * 128] ;
for(S32 i = 1 ; i < mCapacity ; i++)
@@ -376,3 +558,1728 @@ const char* LLMemTracker::getNextLine()
#endif //MEM_TRACK_MEM
//--------------------------------------------------------------------------------------------------
+
+//--------------------------------------------------------------------------------------------------
+//--------------------------------------------------------------------------------------------------
+//minimum slot size and minimal slot size interval
+const U32 ATOMIC_MEM_SLOT = 16 ; //bytes
+
+//minimum block sizes (page size) for small allocation, medium allocation, large allocation
+const U32 MIN_BLOCK_SIZES[LLPrivateMemoryPool::SUPER_ALLOCATION] = {2 << 10, 4 << 10, 16 << 10} ; //
+
+//maximum block sizes for small allocation, medium allocation, large allocation
+const U32 MAX_BLOCK_SIZES[LLPrivateMemoryPool::SUPER_ALLOCATION] = {64 << 10, 1 << 20, 4 << 20} ;
+
+//minimum slot sizes for small allocation, medium allocation, large allocation
+const U32 MIN_SLOT_SIZES[LLPrivateMemoryPool::SUPER_ALLOCATION] = {ATOMIC_MEM_SLOT, 2 << 10, 512 << 10};
+
+//maximum slot sizes for small allocation, medium allocation, large allocation
+const U32 MAX_SLOT_SIZES[LLPrivateMemoryPool::SUPER_ALLOCATION] = {(2 << 10) - ATOMIC_MEM_SLOT, (512 - 2) << 10, 4 << 20};
+
+//size of a block with multiple slots can not exceed CUT_OFF_SIZE
+const U32 CUT_OFF_SIZE = (64 << 10) ; //64 KB
+
+//max number of slots in a block
+const U32 MAX_NUM_SLOTS_IN_A_BLOCK = llmin(MIN_BLOCK_SIZES[0] / ATOMIC_MEM_SLOT, ATOMIC_MEM_SLOT * 8) ;
+
+//-------------------------------------------------------------
+//align val to be integer times of ATOMIC_MEM_SLOT
+U32 align(U32 val)
+{
+ U32 aligned = (val / ATOMIC_MEM_SLOT) * ATOMIC_MEM_SLOT ;
+ if(aligned < val)
+ {
+ aligned += ATOMIC_MEM_SLOT ;
+ }
+
+ return aligned ;
+}
+
+//-------------------------------------------------------------
+//class LLPrivateMemoryPool::LLMemoryBlock
+//-------------------------------------------------------------
+//
+//each memory block could fit for two page sizes: 0.75 * mSlotSize, which starts from the beginning of the memory chunk and grow towards the end of the
+//the block; another is mSlotSize, which starts from the end of the block and grows towards the beginning of the block.
+//
+LLPrivateMemoryPool::LLMemoryBlock::LLMemoryBlock()
+{
+ //empty
+}
+
+LLPrivateMemoryPool::LLMemoryBlock::~LLMemoryBlock()
+{
+ //empty
+}
+
+//create and initialize a memory block
+void LLPrivateMemoryPool::LLMemoryBlock::init(char* buffer, U32 buffer_size, U32 slot_size)
+{
+ mBuffer = buffer ;
+ mBufferSize = buffer_size ;
+ mSlotSize = slot_size ;
+ mTotalSlots = buffer_size / mSlotSize ;
+
+ llassert_always(buffer_size / mSlotSize <= MAX_NUM_SLOTS_IN_A_BLOCK) ; //max number is 128
+
+ mAllocatedSlots = 0 ;
+ mDummySize = 0 ;
+
+ //init the bit map.
+ //mark free bits
+ if(mTotalSlots > 32) //reserve extra space from mBuffer to store bitmap if needed.
+ {
+ mDummySize = ATOMIC_MEM_SLOT ;
+ mTotalSlots -= (mDummySize + mSlotSize - 1) / mSlotSize ;
+ mUsageBits = 0 ;
+
+ S32 usage_bit_len = (mTotalSlots + 31) / 32 ;
+
+ for(S32 i = 0 ; i < usage_bit_len - 1 ; i++)
+ {
+ *((U32*)mBuffer + i) = 0 ;
+ }
+ for(S32 i = usage_bit_len - 1 ; i < mDummySize / sizeof(U32) ; i++)
+ {
+ *((U32*)mBuffer + i) = 0xffffffff ;
+ }
+
+ if(mTotalSlots & 31)
+ {
+ *((U32*)mBuffer + usage_bit_len - 2) = (0xffffffff << (mTotalSlots & 31)) ;
+ }
+ }
+ else//no extra bitmap space reserved
+ {
+ mUsageBits = 0 ;
+ if(mTotalSlots & 31)
+ {
+ mUsageBits = (0xffffffff << (mTotalSlots & 31)) ;
+ }
+ }
+
+ mSelf = this ;
+ mNext = NULL ;
+ mPrev = NULL ;
+
+ llassert_always(mTotalSlots > 0) ;
+}
+
+//mark this block to be free with the memory [mBuffer, mBuffer + mBufferSize).
+void LLPrivateMemoryPool::LLMemoryBlock::setBuffer(char* buffer, U32 buffer_size)
+{
+ mBuffer = buffer ;
+ mBufferSize = buffer_size ;
+ mSelf = NULL ;
+ mTotalSlots = 0 ; //set the block is free.
+}
+
+//reserve a slot
+char* LLPrivateMemoryPool::LLMemoryBlock::allocate()
+{
+ llassert_always(mAllocatedSlots < mTotalSlots) ;
+
+ //find a free slot
+ U32* bits = NULL ;
+ U32 k = 0 ;
+ if(mUsageBits != 0xffffffff)
+ {
+ bits = &mUsageBits ;
+ }
+ else if(mDummySize > 0)//go to extra space
+ {
+ for(S32 i = 0 ; i < mDummySize / sizeof(U32); i++)
+ {
+ if(*((U32*)mBuffer + i) != 0xffffffff)
+ {
+ bits = (U32*)mBuffer + i ;
+ k = i + 1 ;
+ break ;
+ }
+ }
+ }
+ S32 idx = 0 ;
+ U32 tmp = *bits ;
+ for(; tmp & 1 ; tmp >>= 1, idx++) ;
+
+ //set the slot reserved
+ if(!idx)
+ {
+ *bits |= 1 ;
+ }
+ else
+ {
+ *bits |= (1 << idx) ;
+ }
+
+ mAllocatedSlots++ ;
+
+ return mBuffer + mDummySize + (k * 32 + idx) * mSlotSize ;
+}
+
+//free a slot
+void LLPrivateMemoryPool::LLMemoryBlock::freeMem(void* addr)
+{
+ //bit index
+ U32 idx = ((U32)addr - (U32)mBuffer - mDummySize) / mSlotSize ;
+
+ U32* bits = &mUsageBits ;
+ if(idx >= 32)
+ {
+ bits = (U32*)mBuffer + (idx - 32) / 32 ;
+ }
+
+ //reset the bit
+ if(idx & 31)
+ {
+ *bits &= ~(1 << (idx & 31)) ;
+ }
+ else
+ {
+ *bits &= ~1 ;
+ }
+
+ mAllocatedSlots-- ;
+}
+
+//for debug use: reset the entire bitmap.
+void LLPrivateMemoryPool::LLMemoryBlock::resetBitMap()
+{
+ for(S32 i = 0 ; i < mDummySize / sizeof(U32) ; i++)
+ {
+ *((U32*)mBuffer + i) = 0 ;
+ }
+ mUsageBits = 0 ;
+}
+//-------------------------------------------------------------------
+//class LLMemoryChunk
+//--------------------------------------------------------------------
+LLPrivateMemoryPool::LLMemoryChunk::LLMemoryChunk()
+{
+ //empty
+}
+
+LLPrivateMemoryPool::LLMemoryChunk::~LLMemoryChunk()
+{
+ //empty
+}
+
+//create and init a memory chunk
+void LLPrivateMemoryPool::LLMemoryChunk::init(char* buffer, U32 buffer_size, U32 min_slot_size, U32 max_slot_size, U32 min_block_size, U32 max_block_size)
+{
+ mBuffer = buffer ;
+ mBufferSize = buffer_size ;
+ mAlloatedSize = 0 ;
+
+ mMetaBuffer = mBuffer + sizeof(LLMemoryChunk) ;
+
+ mMinBlockSize = min_block_size; //page size
+ mMinSlotSize = min_slot_size;
+ mMaxSlotSize = max_slot_size ;
+ mBlockLevels = mMaxSlotSize / mMinSlotSize ;
+ mPartitionLevels = max_block_size / mMinBlockSize + 1 ;
+
+ S32 max_num_blocks = (buffer_size - sizeof(LLMemoryChunk) - mBlockLevels * sizeof(LLMemoryBlock*) - mPartitionLevels * sizeof(LLMemoryBlock*)) /
+ (mMinBlockSize + sizeof(LLMemoryBlock)) ;
+ //meta data space
+ mBlocks = (LLMemoryBlock*)mMetaBuffer ; //space reserved for all memory blocks.
+ mAvailBlockList = (LLMemoryBlock**)((char*)mBlocks + sizeof(LLMemoryBlock) * max_num_blocks) ;
+ mFreeSpaceList = (LLMemoryBlock**)((char*)mAvailBlockList + sizeof(LLMemoryBlock*) * mBlockLevels) ;
+
+ //data buffer, which can be used for allocation
+ mDataBuffer = (char*)mFreeSpaceList + sizeof(LLMemoryBlock*) * mPartitionLevels ;
+
+ //alignmnet
+ mDataBuffer = mBuffer + align(mDataBuffer - mBuffer) ;
+
+ //init
+ for(U32 i = 0 ; i < mBlockLevels; i++)
+ {
+ mAvailBlockList[i] = NULL ;
+ }
+ for(U32 i = 0 ; i < mPartitionLevels ; i++)
+ {
+ mFreeSpaceList[i] = NULL ;
+ }
+
+ //assign the entire chunk to the first block
+ mBlocks[0].mPrev = NULL ;
+ mBlocks[0].mNext = NULL ;
+ mBlocks[0].setBuffer(mDataBuffer, buffer_size - (mDataBuffer - mBuffer)) ;
+ addToFreeSpace(&mBlocks[0]) ;
+
+ mNext = NULL ;
+ mPrev = NULL ;
+}
+
+//static
+U32 LLPrivateMemoryPool::LLMemoryChunk::getMaxOverhead(U32 data_buffer_size, U32 min_slot_size,
+ U32 max_slot_size, U32 min_block_size, U32 max_block_size)
+{
+ //for large allocations, reserve some extra memory for meta data to avoid wasting much
+ if(data_buffer_size / min_slot_size < 64) //large allocations
+ {
+ U32 overhead = sizeof(LLMemoryChunk) + (data_buffer_size / min_block_size) * sizeof(LLMemoryBlock) +
+ sizeof(LLMemoryBlock*) * (max_slot_size / min_slot_size) + sizeof(LLMemoryBlock*) * (max_block_size / min_block_size + 1) ;
+
+ //round to integer times of min_block_size
+ overhead = ((overhead + min_block_size - 1) / min_block_size) * min_block_size ;
+ return overhead ;
+ }
+ else
+ {
+ return 0 ; //do not reserve extra overhead if for small allocations
+ }
+}
+
+char* LLPrivateMemoryPool::LLMemoryChunk::allocate(U32 size)
+{
+ if(mMinSlotSize > size)
+ {
+ size = mMinSlotSize ;
+ }
+ if(mAlloatedSize + size > mBufferSize - (mDataBuffer - mBuffer))
+ {
+ return NULL ; //no enough space in this chunk.
+ }
+
+ char* p = NULL ;
+ U32 blk_idx = getBlockLevel(size);
+
+ LLMemoryBlock* blk = NULL ;
+
+ //check if there is free block available
+ if(mAvailBlockList[blk_idx])
+ {
+ blk = mAvailBlockList[blk_idx] ;
+ p = blk->allocate() ;
+
+ if(blk->isFull())
+ {
+ popAvailBlockList(blk_idx) ;
+ }
+ }
+
+ //ask for a new block
+ if(!p)
+ {
+ blk = addBlock(blk_idx) ;
+ if(blk)
+ {
+ p = blk->allocate() ;
+
+ if(blk->isFull())
+ {
+ popAvailBlockList(blk_idx) ;
+ }
+ }
+ }
+
+ //ask for space from larger blocks
+ if(!p)
+ {
+ for(S32 i = blk_idx + 1 ; i < mBlockLevels; i++)
+ {
+ if(mAvailBlockList[i])
+ {
+ blk = mAvailBlockList[i] ;
+ p = blk->allocate() ;
+
+ if(blk->isFull())
+ {
+ popAvailBlockList(i) ;
+ }
+ break ;
+ }
+ }
+ }
+
+ if(p && blk)
+ {
+ mAlloatedSize += blk->getSlotSize() ;
+ }
+ return p ;
+}
+
+void LLPrivateMemoryPool::LLMemoryChunk::freeMem(void* addr)
+{
+ U32 blk_idx = getPageIndex((U32)addr) ;
+ LLMemoryBlock* blk = (LLMemoryBlock*)(mMetaBuffer + blk_idx * sizeof(LLMemoryBlock)) ;
+ blk = blk->mSelf ;
+
+ bool was_full = blk->isFull() ;
+ blk->freeMem(addr) ;
+ mAlloatedSize -= blk->getSlotSize() ;
+
+ if(blk->empty())
+ {
+ removeBlock(blk) ;
+ }
+ else if(was_full)
+ {
+ addToAvailBlockList(blk) ;
+ }
+}
+
+bool LLPrivateMemoryPool::LLMemoryChunk::empty()
+{
+ return !mAlloatedSize ;
+}
+
+bool LLPrivateMemoryPool::LLMemoryChunk::containsAddress(const char* addr) const
+{
+ return (U32)mBuffer <= (U32)addr && (U32)mBuffer + mBufferSize > (U32)addr ;
+}
+
+//debug use
+void LLPrivateMemoryPool::LLMemoryChunk::dump()
+{
+#if 0
+ //sanity check
+ //for(S32 i = 0 ; i < mBlockLevels ; i++)
+ //{
+ // LLMemoryBlock* blk = mAvailBlockList[i] ;
+ // while(blk)
+ // {
+ // blk_list.push_back(blk) ;
+ // blk = blk->mNext ;
+ // }
+ //}
+ for(S32 i = 0 ; i < mPartitionLevels ; i++)
+ {
+ LLMemoryBlock* blk = mFreeSpaceList[i] ;
+ while(blk)
+ {
+ blk_list.push_back(blk) ;
+ blk = blk->mNext ;
+ }
+ }
+
+ std::sort(blk_list.begin(), blk_list.end(), LLMemoryBlock::CompareAddress());
+
+ U32 total_size = blk_list[0]->getBufferSize() ;
+ for(U32 i = 1 ; i < blk_list.size(); i++)
+ {
+ total_size += blk_list[i]->getBufferSize() ;
+ if((U32)blk_list[i]->getBuffer() < (U32)blk_list[i-1]->getBuffer() + blk_list[i-1]->getBufferSize())
+ {
+ llerrs << "buffer corrupted." << llendl ;
+ }
+ }
+
+ llassert_always(total_size + mMinBlockSize >= mBufferSize - ((U32)mDataBuffer - (U32)mBuffer)) ;
+
+ U32 blk_num = (mBufferSize - (mDataBuffer - mBuffer)) / mMinBlockSize ;
+ for(U32 i = 0 ; i < blk_num ; )
+ {
+ LLMemoryBlock* blk = &mBlocks[i] ;
+ if(blk->mSelf)
+ {
+ U32 end = blk->getBufferSize() / mMinBlockSize ;
+ for(U32 j = 0 ; j < end ; j++)
+ {
+ llassert_always(blk->mSelf == blk || !blk->mSelf) ;
+ }
+ i += end ;
+ }
+ else
+ {
+ llerrs << "gap happens" << llendl ;
+ }
+ }
+#endif
+#if 0
+ llinfos << "---------------------------" << llendl ;
+ llinfos << "Chunk buffer: " << (U32)getBuffer() << " size: " << getBufferSize() << llendl ;
+
+ llinfos << "available blocks ... " << llendl ;
+ for(S32 i = 0 ; i < mBlockLevels ; i++)
+ {
+ LLMemoryBlock* blk = mAvailBlockList[i] ;
+ while(blk)
+ {
+ llinfos << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << llendl ;
+ blk = blk->mNext ;
+ }
+ }
+
+ llinfos << "free blocks ... " << llendl ;
+ for(S32 i = 0 ; i < mPartitionLevels ; i++)
+ {
+ LLMemoryBlock* blk = mFreeSpaceList[i] ;
+ while(blk)
+ {
+ llinfos << "blk buffer " << (U32)blk->getBuffer() << " size: " << blk->getBufferSize() << llendl ;
+ blk = blk->mNext ;
+ }
+ }
+#endif
+}
+
+//compute the size for a block, the size is round to integer times of mMinBlockSize.
+U32 LLPrivateMemoryPool::LLMemoryChunk::calcBlockSize(U32 slot_size)
+{
+ //
+ //Note: we try to make a block to have 32 slots if the size is not over 32 pages
+ //32 is the number of bits of an integer in a 32-bit system
+ //
+
+ U32 block_size;
+ U32 cut_off_size = llmin(CUT_OFF_SIZE, (U32)(mMinBlockSize << 5)) ;
+
+ if((slot_size << 5) <= mMinBlockSize)//for small allocations, return one page
+ {
+ block_size = mMinBlockSize ;
+ }
+ else if(slot_size >= cut_off_size)//for large allocations, return one-slot block
+ {
+ block_size = (slot_size / mMinBlockSize) * mMinBlockSize ;
+ if(block_size < slot_size)
+ {
+ block_size += mMinBlockSize ;
+ }
+ }
+ else //medium allocations
+ {
+ if((slot_size << 5) >= cut_off_size)
+ {
+ block_size = cut_off_size ;
+ }
+ else
+ {
+ block_size = ((slot_size << 5) / mMinBlockSize) * mMinBlockSize ;
+ }
+ }
+
+ llassert_always(block_size >= slot_size) ;
+
+ return block_size ;
+}
+
+//create a new block in the chunk
+LLPrivateMemoryPool::LLMemoryBlock* LLPrivateMemoryPool::LLMemoryChunk::addBlock(U32 blk_idx)
+{
+ U32 slot_size = mMinSlotSize * (blk_idx + 1) ;
+ U32 preferred_block_size = calcBlockSize(slot_size) ;
+ U16 idx = getPageLevel(preferred_block_size);
+ LLMemoryBlock* blk = NULL ;
+
+ if(mFreeSpaceList[idx])//if there is free slot for blk_idx
+ {
+ blk = createNewBlock(mFreeSpaceList[idx], preferred_block_size, slot_size, blk_idx) ;
+ }
+ else if(mFreeSpaceList[mPartitionLevels - 1]) //search free pool
+ {
+ blk = createNewBlock(mFreeSpaceList[mPartitionLevels - 1], preferred_block_size, slot_size, blk_idx) ;
+ }
+ else //search for other non-preferred but enough space slot.
+ {
+ S32 min_idx = 0 ;
+ if(slot_size > mMinBlockSize)
+ {
+ min_idx = getPageLevel(slot_size) ;
+ }
+ for(S32 i = (S32)idx - 1 ; i >= min_idx ; i--) //search the small slots first
+ {
+ if(mFreeSpaceList[i])
+ {
+ U32 new_preferred_block_size = mFreeSpaceList[i]->getBufferSize();
+ new_preferred_block_size = (new_preferred_block_size / mMinBlockSize) * mMinBlockSize ; //round to integer times of mMinBlockSize.
+
+ //create a NEW BLOCK THERE.
+ if(new_preferred_block_size >= slot_size) //at least there is space for one slot.
+ {
+
+ blk = createNewBlock(mFreeSpaceList[i], new_preferred_block_size, slot_size, blk_idx) ;
+ }
+ break ;
+ }
+ }
+
+ if(!blk)
+ {
+ for(U16 i = idx + 1 ; i < mPartitionLevels - 1; i++) //search the large slots
+ {
+ if(mFreeSpaceList[i])
+ {
+ //create a NEW BLOCK THERE.
+ blk = createNewBlock(mFreeSpaceList[i], preferred_block_size, slot_size, blk_idx) ;
+ break ;
+ }
+ }
+ }
+ }
+
+ return blk ;
+}
+
+//create a new block at the designed location
+LLPrivateMemoryPool::LLMemoryBlock* LLPrivateMemoryPool::LLMemoryChunk::createNewBlock(LLMemoryBlock* blk, U32 buffer_size, U32 slot_size, U32 blk_idx)
+{
+ //unlink from the free space
+ removeFromFreeSpace(blk) ;
+
+ //check the rest space
+ U32 new_free_blk_size = blk->getBufferSize() - buffer_size ;
+ if(new_free_blk_size < mMinBlockSize) //can not partition the memory into size smaller than mMinBlockSize
+ {
+ new_free_blk_size = 0 ; //discard the last small extra space.
+ }
+
+ //add the rest space back to the free list
+ if(new_free_blk_size > 0) //blk still has free space
+ {
+ LLMemoryBlock* next_blk = blk + (buffer_size / mMinBlockSize) ;
+ next_blk->mPrev = NULL ;
+ next_blk->mNext = NULL ;
+ next_blk->setBuffer(blk->getBuffer() + buffer_size, new_free_blk_size) ;
+ addToFreeSpace(next_blk) ;
+ }
+
+ blk->init(blk->getBuffer(), buffer_size, slot_size) ;
+ //insert to the available block list...
+ mAvailBlockList[blk_idx] = blk ;
+
+ //mark the address map: all blocks covered by this block space pointing back to this block.
+ U32 end = (buffer_size / mMinBlockSize) ;
+ for(U32 i = 1 ; i < end ; i++)
+ {
+ (blk + i)->mSelf = blk ;
+ }
+
+ return blk ;
+}
+
+//delete a block, release the block to the free pool.
+void LLPrivateMemoryPool::LLMemoryChunk::removeBlock(LLMemoryBlock* blk)
+{
+ //remove from the available block list
+ if(blk->mPrev)
+ {
+ blk->mPrev->mNext = blk->mNext ;
+ }
+ if(blk->mNext)
+ {
+ blk->mNext->mPrev = blk->mPrev ;
+ }
+ U32 blk_idx = getBlockLevel(blk->getSlotSize());
+ if(mAvailBlockList[blk_idx] == blk)
+ {
+ mAvailBlockList[blk_idx] = blk->mNext ;
+ }
+
+ blk->mNext = NULL ;
+ blk->mPrev = NULL ;
+
+ //mark it free
+ blk->setBuffer(blk->getBuffer(), blk->getBufferSize()) ;
+
+#if 1
+ //merge blk with neighbors if possible
+ if(blk->getBuffer() > mDataBuffer) //has the left neighbor
+ {
+ if((blk - 1)->mSelf->isFree())
+ {
+ LLMemoryBlock* left_blk = (blk - 1)->mSelf ;
+ removeFromFreeSpace((blk - 1)->mSelf);
+ left_blk->setBuffer(left_blk->getBuffer(), left_blk->getBufferSize() + blk->getBufferSize()) ;
+ blk = left_blk ;
+ }
+ }
+ if(blk->getBuffer() + blk->getBufferSize() <= mBuffer + mBufferSize - mMinBlockSize) //has the right neighbor
+ {
+ U32 d = blk->getBufferSize() / mMinBlockSize ;
+ if((blk + d)->isFree())
+ {
+ LLMemoryBlock* right_blk = blk + d ;
+ removeFromFreeSpace(blk + d) ;
+ blk->setBuffer(blk->getBuffer(), blk->getBufferSize() + right_blk->getBufferSize()) ;
+ }
+ }
+#endif
+
+ addToFreeSpace(blk) ;
+
+ return ;
+}
+
+//the top block in the list is full, pop it out of the list
+void LLPrivateMemoryPool::LLMemoryChunk::popAvailBlockList(U32 blk_idx)
+{
+ if(mAvailBlockList[blk_idx])
+ {
+ LLMemoryBlock* next = mAvailBlockList[blk_idx]->mNext ;
+ if(next)
+ {
+ next->mPrev = NULL ;
+ }
+ mAvailBlockList[blk_idx]->mPrev = NULL ;
+ mAvailBlockList[blk_idx]->mNext = NULL ;
+ mAvailBlockList[blk_idx] = next ;
+ }
+}
+
+//add the block back to the free pool
+void LLPrivateMemoryPool::LLMemoryChunk::addToFreeSpace(LLMemoryBlock* blk)
+{
+ llassert_always(!blk->mPrev) ;
+ llassert_always(!blk->mNext) ;
+
+ U16 free_idx = blk->getBufferSize() / mMinBlockSize - 1;
+
+ (blk + free_idx)->mSelf = blk ; //mark the end pointing back to the head.
+ free_idx = llmin(free_idx, (U16)(mPartitionLevels - 1)) ;
+
+ blk->mNext = mFreeSpaceList[free_idx] ;
+ if(mFreeSpaceList[free_idx])
+ {
+ mFreeSpaceList[free_idx]->mPrev = blk ;
+ }
+ mFreeSpaceList[free_idx] = blk ;
+ blk->mPrev = NULL ;
+ blk->mSelf = blk ;
+
+ return ;
+}
+
+//remove the space from the free pool
+void LLPrivateMemoryPool::LLMemoryChunk::removeFromFreeSpace(LLMemoryBlock* blk)
+{
+ U16 free_idx = blk->getBufferSize() / mMinBlockSize - 1;
+ free_idx = llmin(free_idx, (U16)(mPartitionLevels - 1)) ;
+
+ if(mFreeSpaceList[free_idx] == blk)
+ {
+ mFreeSpaceList[free_idx] = blk->mNext ;
+ }
+ if(blk->mPrev)
+ {
+ blk->mPrev->mNext = blk->mNext ;
+ }
+ if(blk->mNext)
+ {
+ blk->mNext->mPrev = blk->mPrev ;
+ }
+ blk->mNext = NULL ;
+ blk->mPrev = NULL ;
+ blk->mSelf = NULL ;
+
+ return ;
+}
+
+void LLPrivateMemoryPool::LLMemoryChunk::addToAvailBlockList(LLMemoryBlock* blk)
+{
+ llassert_always(!blk->mPrev) ;
+ llassert_always(!blk->mNext) ;
+
+ U32 blk_idx = getBlockLevel(blk->getSlotSize());
+
+ blk->mNext = mAvailBlockList[blk_idx] ;
+ if(blk->mNext)
+ {
+ blk->mNext->mPrev = blk ;
+ }
+ blk->mPrev = NULL ;
+ mAvailBlockList[blk_idx] = blk ;
+
+ return ;
+}
+
+U32 LLPrivateMemoryPool::LLMemoryChunk::getPageIndex(U32 addr)
+{
+ return (addr - (U32)mDataBuffer) / mMinBlockSize ;
+}
+
+//for mAvailBlockList
+U32 LLPrivateMemoryPool::LLMemoryChunk::getBlockLevel(U32 size)
+{
+ llassert(size >= mMinSlotSize && size <= mMaxSlotSize) ;
+
+ //start from 0
+ return (size + mMinSlotSize - 1) / mMinSlotSize - 1 ;
+}
+
+//for mFreeSpaceList
+U16 LLPrivateMemoryPool::LLMemoryChunk::getPageLevel(U32 size)
+{
+ //start from 0
+ U16 level = size / mMinBlockSize - 1 ;
+ if(level >= mPartitionLevels)
+ {
+ level = mPartitionLevels - 1 ;
+ }
+ return level ;
+}
+
+//-------------------------------------------------------------------
+//class LLPrivateMemoryPool
+//--------------------------------------------------------------------
+const U32 CHUNK_SIZE = 4 << 20 ; //4 MB
+const U32 LARGE_CHUNK_SIZE = 4 * CHUNK_SIZE ; //16 MB
+LLPrivateMemoryPool::LLPrivateMemoryPool(S32 type, U32 max_pool_size) :
+ mMutexp(NULL),
+ mReservedPoolSize(0),
+ mHashFactor(1),
+ mType(type),
+ mMaxPoolSize(max_pool_size)
+{
+ if(type == STATIC_THREADED || type == VOLATILE_THREADED)
+ {
+ mMutexp = new LLMutex(NULL) ;
+ }
+
+ for(S32 i = 0 ; i < SUPER_ALLOCATION ; i++)
+ {
+ mChunkList[i] = NULL ;
+ }
+
+ mNumOfChunks = 0 ;
+}
+
+LLPrivateMemoryPool::~LLPrivateMemoryPool()
+{
+ destroyPool();
+ delete mMutexp ;
+}
+
+char* LLPrivateMemoryPool::allocate(U32 size)
+{
+ if(!size)
+ {
+ return NULL ;
+ }
+
+ //if the asked size larger than MAX_BLOCK_SIZE, fetch from heap directly, the pool does not manage it
+ if(size >= CHUNK_SIZE)
+ {
+ return (char*)malloc(size) ;
+ }
+
+ char* p = NULL ;
+
+ //find the appropriate chunk
+ S32 chunk_idx = getChunkIndex(size) ;
+
+ lock() ;
+
+ LLMemoryChunk* chunk = mChunkList[chunk_idx];
+ while(chunk)
+ {
+ if((p = chunk->allocate(size)))
+ {
+ break ;
+ }
+ chunk = chunk->mNext ;
+ }
+
+ //fetch new memory chunk
+ if(!p)
+ {
+ if(mReservedPoolSize + CHUNK_SIZE > mMaxPoolSize)
+ {
+ chunk = mChunkList[chunk_idx];
+ while(chunk)
+ {
+ if((p = chunk->allocate(size)))
+ {
+ break ;
+ }
+ chunk = chunk->mNext ;
+ }
+ }
+ else
+ {
+ chunk = addChunk(chunk_idx) ;
+ if(chunk)
+ {
+ p = chunk->allocate(size) ;
+ }
+ }
+ }
+
+ unlock() ;
+
+ if(!p) //to get memory from the private pool failed, try the heap directly
+ {
+ static bool to_log = true ;
+
+ if(to_log)
+ {
+ llwarns << "The memory pool overflows, now using heap directly!" << llendl ;
+ to_log = false ;
+ }
+
+ return (char*)malloc(size) ;
+ }
+
+ return p ;
+}
+
+void LLPrivateMemoryPool::freeMem(void* addr)
+{
+ if(!addr)
+ {
+ return ;
+ }
+
+ lock() ;
+
+ LLMemoryChunk* chunk = findChunk((char*)addr) ;
+
+ if(!chunk)
+ {
+ free(addr) ; //release from heap
+ }
+ else
+ {
+ chunk->freeMem(addr) ;
+
+ if(chunk->empty())
+ {
+ removeChunk(chunk) ;
+ }
+ }
+
+ unlock() ;
+}
+
+void LLPrivateMemoryPool::dump()
+{
+}
+
+U32 LLPrivateMemoryPool::getTotalAllocatedSize()
+{
+ U32 total_allocated = 0 ;
+
+ LLMemoryChunk* chunk ;
+ for(S32 i = 0 ; i < SUPER_ALLOCATION ; i++)
+ {
+ chunk = mChunkList[i];
+ while(chunk)
+ {
+ total_allocated += chunk->getAllocatedSize() ;
+ chunk = chunk->mNext ;
+ }
+ }
+
+ return total_allocated ;
+}
+
+void LLPrivateMemoryPool::lock()
+{
+ if(mMutexp)
+ {
+ mMutexp->lock() ;
+ }
+}
+
+void LLPrivateMemoryPool::unlock()
+{
+ if(mMutexp)
+ {
+ mMutexp->unlock() ;
+ }
+}
+
+S32 LLPrivateMemoryPool::getChunkIndex(U32 size)
+{
+ S32 i ;
+ for(i = 0 ; size > MAX_SLOT_SIZES[i]; i++);
+
+ llassert_always(i < SUPER_ALLOCATION);
+
+ return i ;
+}
+
+//destroy the entire pool
+void LLPrivateMemoryPool::destroyPool()
+{
+ lock() ;
+
+ if(mNumOfChunks > 0)
+ {
+ llwarns << "There is some memory not freed when destroy the memory pool!" << llendl ;
+ }
+
+ mNumOfChunks = 0 ;
+ mChunkHashList.clear() ;
+ mHashFactor = 1 ;
+ for(S32 i = 0 ; i < SUPER_ALLOCATION ; i++)
+ {
+ mChunkList[i] = NULL ;
+ }
+
+ unlock() ;
+}
+
+bool LLPrivateMemoryPool::checkSize(U32 asked_size)
+{
+ if(mReservedPoolSize + asked_size > mMaxPoolSize)
+ {
+ llinfos << "Max pool size: " << mMaxPoolSize << llendl ;
+ llinfos << "Total reserved size: " << mReservedPoolSize + asked_size << llendl ;
+ llinfos << "Total_allocated Size: " << getTotalAllocatedSize() << llendl ;
+
+ //llerrs << "The pool is overflowing..." << llendl ;
+
+ return false ;
+ }
+
+ return true ;
+}
+
+LLPrivateMemoryPool::LLMemoryChunk* LLPrivateMemoryPool::addChunk(S32 chunk_index)
+{
+ U32 preferred_size ;
+ U32 overhead ;
+ if(chunk_index < LARGE_ALLOCATION)
+ {
+ preferred_size = CHUNK_SIZE ; //4MB
+ overhead = LLMemoryChunk::getMaxOverhead(preferred_size, MIN_SLOT_SIZES[chunk_index],
+ MAX_SLOT_SIZES[chunk_index], MIN_BLOCK_SIZES[chunk_index], MAX_BLOCK_SIZES[chunk_index]) ;
+ }
+ else
+ {
+ preferred_size = LARGE_CHUNK_SIZE ; //16MB
+ overhead = LLMemoryChunk::getMaxOverhead(preferred_size, MIN_SLOT_SIZES[chunk_index],
+ MAX_SLOT_SIZES[chunk_index], MIN_BLOCK_SIZES[chunk_index], MAX_BLOCK_SIZES[chunk_index]) ;
+ }
+
+ if(!checkSize(preferred_size + overhead))
+ {
+ return NULL ;
+ }
+
+ mReservedPoolSize += preferred_size + overhead ;
+
+ char* buffer = (char*)malloc(preferred_size + overhead) ;
+ if(!buffer)
+ {
+ return NULL ;
+ }
+
+ LLMemoryChunk* chunk = new (buffer) LLMemoryChunk() ;
+ chunk->init(buffer, preferred_size + overhead, MIN_SLOT_SIZES[chunk_index],
+ MAX_SLOT_SIZES[chunk_index], MIN_BLOCK_SIZES[chunk_index], MAX_BLOCK_SIZES[chunk_index]) ;
+
+ //add to the tail of the linked list
+ {
+ if(!mChunkList[chunk_index])
+ {
+ mChunkList[chunk_index] = chunk ;
+ }
+ else
+ {
+ LLMemoryChunk* cur = mChunkList[chunk_index] ;
+ while(cur->mNext)
+ {
+ cur = cur->mNext ;
+ }
+ cur->mNext = chunk ;
+ chunk->mPrev = cur ;
+ }
+ }
+
+ //insert into the hash table
+ addToHashTable(chunk) ;
+
+ mNumOfChunks++;
+
+ return chunk ;
+}
+
+void LLPrivateMemoryPool::removeChunk(LLMemoryChunk* chunk)
+{
+ if(!chunk)
+ {
+ return ;
+ }
+
+ //remove from the linked list
+ for(S32 i = 0 ; i < SUPER_ALLOCATION ; i++)
+ {
+ if(mChunkList[i] == chunk)
+ {
+ mChunkList[i] = chunk->mNext ;
+ }
+ }
+
+ if(chunk->mPrev)
+ {
+ chunk->mPrev->mNext = chunk->mNext ;
+ }
+ if(chunk->mNext)
+ {
+ chunk->mNext->mPrev = chunk->mPrev ;
+ }
+
+ //remove from the hash table
+ removeFromHashTable(chunk) ;
+
+ mNumOfChunks--;
+ mReservedPoolSize -= chunk->getBufferSize() ;
+
+ //release memory
+ free(chunk->getBuffer()) ;
+}
+
+U16 LLPrivateMemoryPool::findHashKey(const char* addr)
+{
+ return (((U32)addr) / CHUNK_SIZE) % mHashFactor ;
+}
+
+LLPrivateMemoryPool::LLMemoryChunk* LLPrivateMemoryPool::findChunk(const char* addr)
+{
+ U16 key = findHashKey(addr) ;
+ if(mChunkHashList.size() <= key)
+ {
+ return NULL ;
+ }
+
+ return mChunkHashList[key].findChunk(addr) ;
+}
+
+void LLPrivateMemoryPool::addToHashTable(LLMemoryChunk* chunk)
+{
+ static const U16 HASH_FACTORS[] = {41, 83, 193, 317, 419, 523, 719, 997, 1523, 0xFFFF};
+
+ U16 i ;
+ if(mChunkHashList.empty())
+ {
+ mHashFactor = HASH_FACTORS[0] ;
+ rehash() ;
+ }
+
+ U16 start_key = findHashKey(chunk->getBuffer()) ;
+ U16 end_key = findHashKey(chunk->getBuffer() + chunk->getBufferSize() - 1) ;
+ bool need_rehash = false ;
+
+ if(mChunkHashList[start_key].hasElement(chunk))
+ {
+ return; //already inserted.
+ }
+ need_rehash = mChunkHashList[start_key].add(chunk) ;
+
+ if(start_key == end_key && !need_rehash)
+ {
+ return ; //done
+ }
+
+ if(!need_rehash)
+ {
+ need_rehash = mChunkHashList[end_key].add(chunk) ;
+ }
+
+ if(!need_rehash)
+ {
+ if(end_key < start_key)
+ {
+ need_rehash = fillHashTable(start_key + 1, mHashFactor, chunk) ;
+ if(!need_rehash)
+ {
+ need_rehash = fillHashTable(0, end_key, chunk) ;
+ }
+ }
+ else
+ {
+ need_rehash = fillHashTable(start_key + 1, end_key, chunk) ;
+ }
+ }
+
+ if(need_rehash)
+ {
+ i = 0 ;
+ while(HASH_FACTORS[i] <= mHashFactor) i++;
+
+ mHashFactor = HASH_FACTORS[i] ;
+ llassert_always(mHashFactor != 0xFFFF) ;//stop point to prevent endlessly recursive calls
+
+ rehash() ;
+ }
+}
+
+void LLPrivateMemoryPool::removeFromHashTable(LLMemoryChunk* chunk)
+{
+ U16 start_key = findHashKey(chunk->getBuffer()) ;
+ U16 end_key = findHashKey(chunk->getBuffer() + chunk->getBufferSize() - 1) ;
+
+ mChunkHashList[start_key].remove(chunk) ;
+ if(start_key == end_key)
+ {
+ return ; //done
+ }
+
+ mChunkHashList[end_key].remove(chunk) ;
+
+ if(end_key < start_key)
+ {
+ for(U16 i = start_key + 1 ; i < mHashFactor; i++)
+ {
+ mChunkHashList[i].remove(chunk) ;
+ }
+ for(U16 i = 0 ; i < end_key; i++)
+ {
+ mChunkHashList[i].remove(chunk) ;
+ }
+ }
+ else
+ {
+ for(U16 i = start_key + 1 ; i < end_key; i++)
+ {
+ mChunkHashList[i].remove(chunk) ;
+ }
+ }
+}
+
+void LLPrivateMemoryPool::rehash()
+{
+ llinfos << "new hash factor: " << mHashFactor << llendl ;
+
+ mChunkHashList.clear() ;
+ mChunkHashList.resize(mHashFactor) ;
+
+ LLMemoryChunk* chunk ;
+ for(U16 i = 0 ; i < SUPER_ALLOCATION ; i++)
+ {
+ chunk = mChunkList[i] ;
+ while(chunk)
+ {
+ addToHashTable(chunk) ;
+ chunk = chunk->mNext ;
+ }
+ }
+}
+
+bool LLPrivateMemoryPool::fillHashTable(U16 start, U16 end, LLMemoryChunk* chunk)
+{
+ for(U16 i = start; i < end; i++)
+ {
+ if(mChunkHashList[i].add(chunk))
+ {
+ return true ;
+ }
+ }
+
+ return false ;
+}
+
+//--------------------------------------------------------------------
+// class LLChunkHashElement
+//--------------------------------------------------------------------
+LLPrivateMemoryPool::LLMemoryChunk* LLPrivateMemoryPool::LLChunkHashElement::findChunk(const char* addr)
+{
+ if(mFirst && mFirst->containsAddress(addr))
+ {
+ return mFirst ;
+ }
+ else if(mSecond && mSecond->containsAddress(addr))
+ {
+ return mSecond ;
+ }
+
+ return NULL ;
+}
+
+//return false if successfully inserted to the hash slot.
+bool LLPrivateMemoryPool::LLChunkHashElement::add(LLPrivateMemoryPool::LLMemoryChunk* chunk)
+{
+ llassert_always(!hasElement(chunk)) ;
+
+ if(!mFirst)
+ {
+ mFirst = chunk ;
+ }
+ else if(!mSecond)
+ {
+ mSecond = chunk ;
+ }
+ else
+ {
+ return true ; //failed
+ }
+
+ return false ;
+}
+
+void LLPrivateMemoryPool::LLChunkHashElement::remove(LLPrivateMemoryPool::LLMemoryChunk* chunk)
+{
+ if(mFirst == chunk)
+ {
+ mFirst = NULL ;
+ }
+ else if(mSecond ==chunk)
+ {
+ mSecond = NULL ;
+ }
+ else
+ {
+ llerrs << "This slot does not contain this chunk!" << llendl ;
+ }
+}
+
+//--------------------------------------------------------------------
+//class LLPrivateMemoryPoolManager
+//--------------------------------------------------------------------
+LLPrivateMemoryPoolManager* LLPrivateMemoryPoolManager::sInstance = NULL ;
+BOOL LLPrivateMemoryPoolManager::sPrivatePoolEnabled = FALSE ;
+std::vector<LLPrivateMemoryPool*> LLPrivateMemoryPoolManager::sDanglingPoolList ;
+
+LLPrivateMemoryPoolManager::LLPrivateMemoryPoolManager(BOOL enabled, U32 max_pool_size)
+{
+ mPoolList.resize(LLPrivateMemoryPool::MAX_TYPES) ;
+
+ for(S32 i = 0 ; i < LLPrivateMemoryPool::MAX_TYPES; i++)
+ {
+ mPoolList[i] = NULL ;
+ }
+
+ sPrivatePoolEnabled = enabled ;
+
+ const U32 MAX_POOL_SIZE = 256 * 1024 * 1024 ; //256 MB
+ mMaxPrivatePoolSize = llmax(max_pool_size, MAX_POOL_SIZE) ;
+}
+
+LLPrivateMemoryPoolManager::~LLPrivateMemoryPoolManager()
+{
+
+#if __DEBUG_PRIVATE_MEM__
+ if(!sMemAllocationTracker.empty())
+ {
+ llwarns << "there is potential memory leaking here. The list of not freed memory blocks are from: " <<llendl ;
+
+ S32 k = 0 ;
+ for(mem_allocation_info_t::iterator iter = sMemAllocationTracker.begin() ; iter != sMemAllocationTracker.end() ; ++iter)
+ {
+ llinfos << k++ << ", " << (U32)iter->first << " : " << iter->second << llendl ;
+ }
+ sMemAllocationTracker.clear() ;
+ }
+#endif
+
+#if 0
+ //all private pools should be released by their owners before reaching here.
+ for(S32 i = 0 ; i < LLPrivateMemoryPool::MAX_TYPES; i++)
+ {
+ llassert_always(!mPoolList[i]) ;
+ }
+ mPoolList.clear() ;
+
+#else
+ //forcefully release all memory
+ for(S32 i = 0 ; i < LLPrivateMemoryPool::MAX_TYPES; i++)
+ {
+ if(mPoolList[i])
+ {
+ if(mPoolList[i]->isEmpty())
+ {
+ delete mPoolList[i] ;
+ }
+ else
+ {
+ //can not delete this pool because it has alloacted memory to be freed.
+ //move it to the dangling list.
+ sDanglingPoolList.push_back(mPoolList[i]) ;
+ }
+
+ mPoolList[i] = NULL ;
+ }
+ }
+ mPoolList.clear() ;
+#endif
+}
+
+//static
+void LLPrivateMemoryPoolManager::initClass(BOOL enabled, U32 max_pool_size)
+{
+ llassert_always(!sInstance) ;
+
+ sInstance = new LLPrivateMemoryPoolManager(enabled, max_pool_size) ;
+}
+
+//static
+LLPrivateMemoryPoolManager* LLPrivateMemoryPoolManager::getInstance()
+{
+ //if(!sInstance)
+ //{
+ // sInstance = new LLPrivateMemoryPoolManager(FALSE) ;
+ //}
+ return sInstance ;
+}
+
+//static
+void LLPrivateMemoryPoolManager::destroyClass()
+{
+ if(sInstance)
+ {
+ delete sInstance ;
+ sInstance = NULL ;
+ }
+}
+
+LLPrivateMemoryPool* LLPrivateMemoryPoolManager::newPool(S32 type)
+{
+ if(!sPrivatePoolEnabled)
+ {
+ return NULL ;
+ }
+
+ if(!mPoolList[type])
+ {
+ mPoolList[type] = new LLPrivateMemoryPool(type, mMaxPrivatePoolSize) ;
+ }
+
+ return mPoolList[type] ;
+}
+
+void LLPrivateMemoryPoolManager::deletePool(LLPrivateMemoryPool* pool)
+{
+ if(pool && pool->isEmpty())
+ {
+ mPoolList[pool->getType()] = NULL ;
+ delete pool;
+ }
+}
+
+//debug
+void LLPrivateMemoryPoolManager::updateStatistics()
+{
+ mTotalReservedSize = 0 ;
+ mTotalAllocatedSize = 0 ;
+
+ for(U32 i = 0; i < mPoolList.size(); i++)
+ {
+ if(mPoolList[i])
+ {
+ mTotalReservedSize += mPoolList[i]->getTotalReservedSize() ;
+ mTotalAllocatedSize += mPoolList[i]->getTotalAllocatedSize() ;
+ }
+ }
+}
+
+#if __DEBUG_PRIVATE_MEM__
+//static
+char* LLPrivateMemoryPoolManager::allocate(LLPrivateMemoryPool* poolp, U32 size, const char* function, const int line)
+{
+ char* p ;
+
+ if(!poolp)
+ {
+ p = (char*)malloc(size) ;
+ }
+ else
+ {
+ p = poolp->allocate(size) ;
+ }
+
+ if(p)
+ {
+ char num[16] ;
+ sprintf(num, " line: %d ", line) ;
+ std::string str(function) ;
+ str += num;
+
+ sMemAllocationTracker[p] = str ;
+ }
+
+ return p ;
+}
+#else
+//static
+char* LLPrivateMemoryPoolManager::allocate(LLPrivateMemoryPool* poolp, U32 size)
+{
+ if(poolp)
+ {
+ return poolp->allocate(size) ;
+ }
+ else
+ {
+ return (char*)malloc(size) ;
+ }
+}
+#endif
+
+//static
+void LLPrivateMemoryPoolManager::freeMem(LLPrivateMemoryPool* poolp, void* addr)
+{
+ if(!addr)
+ {
+ return ;
+ }
+
+#if __DEBUG_PRIVATE_MEM__
+ sMemAllocationTracker.erase((char*)addr) ;
+#endif
+
+ if(poolp)
+ {
+ poolp->freeMem(addr) ;
+ }
+ else
+ {
+ if(!sPrivatePoolEnabled)
+ {
+ free(addr) ; //private pool is disabled.
+ }
+ else if(!sInstance) //the private memory manager is destroyed, try the dangling list
+ {
+ for(S32 i = 0 ; i < sDanglingPoolList.size(); i++)
+ {
+ if(sDanglingPoolList[i]->findChunk((char*)addr))
+ {
+ sDanglingPoolList[i]->freeMem(addr) ;
+ if(sDanglingPoolList[i]->isEmpty())
+ {
+ delete sDanglingPoolList[i] ;
+
+ if(i < sDanglingPoolList.size() - 1)
+ {
+ sDanglingPoolList[i] = sDanglingPoolList[sDanglingPoolList.size() - 1] ;
+ }
+ sDanglingPoolList.pop_back() ;
+ }
+
+ addr = NULL ;
+ break ;
+ }
+ }
+ llassert_always(!addr) ; //addr should be release before hitting here!
+ }
+ else
+ {
+ llerrs << "private pool is used before initialized.!" << llendl ;
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+//class LLPrivateMemoryPoolTester
+//--------------------------------------------------------------------
+#if 0
+LLPrivateMemoryPoolTester* LLPrivateMemoryPoolTester::sInstance = NULL ;
+LLPrivateMemoryPool* LLPrivateMemoryPoolTester::sPool = NULL ;
+LLPrivateMemoryPoolTester::LLPrivateMemoryPoolTester()
+{
+}
+
+LLPrivateMemoryPoolTester::~LLPrivateMemoryPoolTester()
+{
+}
+
+//static
+LLPrivateMemoryPoolTester* LLPrivateMemoryPoolTester::getInstance()
+{
+ if(!sInstance)
+ {
+ sInstance = ::new LLPrivateMemoryPoolTester() ;
+ }
+ return sInstance ;
+}
+
+//static
+void LLPrivateMemoryPoolTester::destroy()
+{
+ if(sInstance)
+ {
+ ::delete sInstance ;
+ sInstance = NULL ;
+ }
+
+ if(sPool)
+ {
+ LLPrivateMemoryPoolManager::getInstance()->deletePool(sPool) ;
+ sPool = NULL ;
+ }
+}
+
+void LLPrivateMemoryPoolTester::run(S32 type)
+{
+ if(sPool)
+ {
+ LLPrivateMemoryPoolManager::getInstance()->deletePool(sPool) ;
+ }
+ sPool = LLPrivateMemoryPoolManager::getInstance()->newPool(type) ;
+
+ //run the test
+ correctnessTest() ;
+ performanceTest() ;
+ //fragmentationtest() ;
+
+ //release pool.
+ LLPrivateMemoryPoolManager::getInstance()->deletePool(sPool) ;
+ sPool = NULL ;
+}
+
+void LLPrivateMemoryPoolTester::test(U32 min_size, U32 max_size, U32 stride, U32 times,
+ bool random_deletion, bool output_statistics)
+{
+ U32 levels = (max_size - min_size) / stride + 1 ;
+ char*** p ;
+ U32 i, j ;
+ U32 total_allocated_size = 0 ;
+
+ //allocate space for p ;
+ if(!(p = ::new char**[times]) || !(*p = ::new char*[times * levels]))
+ {
+ llerrs << "memory initialization for p failed" << llendl ;
+ }
+
+ //init
+ for(i = 0 ; i < times; i++)
+ {
+ p[i] = *p + i * levels ;
+ for(j = 0 ; j < levels; j++)
+ {
+ p[i][j] = NULL ;
+ }
+ }
+
+ //allocation
+ U32 size ;
+ for(i = 0 ; i < times ; i++)
+ {
+ for(j = 0 ; j < levels; j++)
+ {
+ size = min_size + j * stride ;
+ p[i][j] = ALLOCATE_MEM(sPool, size) ;
+
+ total_allocated_size+= size ;
+
+ *(U32*)p[i][j] = i ;
+ *((U32*)p[i][j] + 1) = j ;
+ //p[i][j][size - 1] = '\0' ; //access the last element to verify the success of the allocation.
+
+ //randomly release memory
+ if(random_deletion)
+ {
+ S32 k = rand() % levels ;
+
+ if(p[i][k])
+ {
+ llassert_always(*(U32*)p[i][k] == i && *((U32*)p[i][k] + 1) == k) ;
+ FREE_MEM(sPool, p[i][k]) ;
+ total_allocated_size -= min_size + k * stride ;
+ p[i][k] = NULL ;
+ }
+ }
+ }
+ }
+
+ //output pool allocation statistics
+ if(output_statistics)
+ {
+ }
+
+ //release all memory allocations
+ for(i = 0 ; i < times; i++)
+ {
+ for(j = 0 ; j < levels; j++)
+ {
+ if(p[i][j])
+ {
+ llassert_always(*(U32*)p[i][j] == i && *((U32*)p[i][j] + 1) == j) ;
+ FREE_MEM(sPool, p[i][j]) ;
+ total_allocated_size -= min_size + j * stride ;
+ p[i][j] = NULL ;
+ }
+ }
+ }
+
+ ::delete[] *p ;
+ ::delete[] p ;
+}
+
+void LLPrivateMemoryPoolTester::testAndTime(U32 size, U32 times)
+{
+ LLTimer timer ;
+
+ llinfos << " -**********************- " << llendl ;
+ llinfos << "test size: " << size << " test times: " << times << llendl ;
+
+ timer.reset() ;
+ char** p = new char*[times] ;
+
+ //using the customized memory pool
+ //allocation
+ for(U32 i = 0 ; i < times; i++)
+ {
+ p[i] = ALLOCATE_MEM(sPool, size) ;
+ if(!p[i])
+ {
+ llerrs << "allocation failed" << llendl ;
+ }
+ }
+ //de-allocation
+ for(U32 i = 0 ; i < times; i++)
+ {
+ FREE_MEM(sPool, p[i]) ;
+ p[i] = NULL ;
+ }
+ llinfos << "time spent using customized memory pool: " << timer.getElapsedTimeF32() << llendl ;
+
+ timer.reset() ;
+
+ //using the standard allocator/de-allocator:
+ //allocation
+ for(U32 i = 0 ; i < times; i++)
+ {
+ p[i] = ::new char[size] ;
+ if(!p[i])
+ {
+ llerrs << "allocation failed" << llendl ;
+ }
+ }
+ //de-allocation
+ for(U32 i = 0 ; i < times; i++)
+ {
+ ::delete[] p[i] ;
+ p[i] = NULL ;
+ }
+ llinfos << "time spent using standard allocator/de-allocator: " << timer.getElapsedTimeF32() << llendl ;
+
+ delete[] p;
+}
+
+void LLPrivateMemoryPoolTester::correctnessTest()
+{
+ //try many different sized allocation, and all kinds of edge cases, access the allocated memory
+ //to see if allocation is right.
+
+ //edge case
+ char* p = ALLOCATE_MEM(sPool, 0) ;
+ FREE_MEM(sPool, p) ;
+
+ //small sized
+ // [8 bytes, 2KB), each asks for 256 allocations and deallocations
+ test(8, 2040, 8, 256, true, true) ;
+
+ //medium sized
+ //[2KB, 512KB), each asks for 16 allocations and deallocations
+ test(2048, 512 * 1024 - 2048, 2048, 16, true, true) ;
+
+ //large sized
+ //[512KB, 4MB], each asks for 8 allocations and deallocations
+ test(512 * 1024, 4 * 1024 * 1024, 64 * 1024, 6, true, true) ;
+}
+
+void LLPrivateMemoryPoolTester::performanceTest()
+{
+ U32 test_size[3] = {768, 3* 1024, 3* 1024 * 1024};
+
+ //small sized
+ testAndTime(test_size[0], 8) ;
+
+ //medium sized
+ testAndTime(test_size[1], 8) ;
+
+ //large sized
+ testAndTime(test_size[2], 8) ;
+}
+
+void LLPrivateMemoryPoolTester::fragmentationtest()
+{
+ //for internal fragmentation statistics:
+ //every time when asking for a new chunk during correctness test, and performance test,
+ //print out the chunk usage statistices.
+}
+#endif
+//--------------------------------------------------------------------
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 3bd1403576..bbbdaa6497 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -27,7 +27,6 @@
#define LLMEMORY_H
#include "llmemtype.h"
-
#if LL_DEBUG
inline void* ll_aligned_malloc( size_t size, int align )
{
@@ -105,6 +104,10 @@ inline void ll_aligned_free_32(void *p)
#define ll_aligned_free_32 free
#endif // LL_DEBUG
+#ifndef __DEBUG_PRIVATE_MEM__
+#define __DEBUG_PRIVATE_MEM__ 0
+#endif
+
class LL_COMMON_API LLMemory
{
public:
@@ -115,8 +118,24 @@ public:
// Return value is zero if not known.
static U64 getCurrentRSS();
static U32 getWorkingSetSize();
+ static void* tryToAlloc(void* address, U32 size);
+ static void initMaxHeapSizeGB(F32 max_heap_size_gb, BOOL prevent_heap_failure);
+ static void updateMemoryInfo() ;
+ static void logMemoryInfo(BOOL update = FALSE);
+ static bool isMemoryPoolLow();
+
+ static U32 getAvailableMemKB() ;
+ static U32 getMaxMemKB() ;
+ static U32 getAllocatedMemKB() ;
private:
static char* reserveMem;
+ static U32 sAvailPhysicalMemInKB ;
+ static U32 sMaxPhysicalMemInKB ;
+ static U32 sAllocatedMemInKB;
+ static U32 sAllocatedPageSizeInKB ;
+
+ static U32 sMaxHeapSizeInKB;
+ static BOOL sEnableMemoryFailurePrevention;
};
//----------------------------------------------------------------------------
@@ -163,6 +182,328 @@ private:
//----------------------------------------------------------------------------
+
+//
+//class LLPrivateMemoryPool defines a private memory pool for an application to use, so the application does not
+//need to access the heap directly fro each memory allocation. Throught this, the allocation speed is faster,
+//and reduces virtaul address space gragmentation problem.
+//Note: this class is thread-safe by passing true to the constructor function. However, you do not need to do this unless
+//you are sure the memory allocation and de-allocation will happen in different threads. To make the pool thread safe
+//increases allocation and deallocation cost.
+//
+class LL_COMMON_API LLPrivateMemoryPool
+{
+ friend class LLPrivateMemoryPoolManager ;
+
+public:
+ class LL_COMMON_API LLMemoryBlock //each block is devided into slots uniformly
+ {
+ public:
+ LLMemoryBlock() ;
+ ~LLMemoryBlock() ;
+
+ void init(char* buffer, U32 buffer_size, U32 slot_size) ;
+ void setBuffer(char* buffer, U32 buffer_size) ;
+
+ char* allocate() ;
+ void freeMem(void* addr) ;
+
+ bool empty() {return !mAllocatedSlots;}
+ bool isFull() {return mAllocatedSlots == mTotalSlots;}
+ bool isFree() {return !mTotalSlots;}
+
+ U32 getSlotSize()const {return mSlotSize;}
+ U32 getTotalSlots()const {return mTotalSlots;}
+ U32 getBufferSize()const {return mBufferSize;}
+ char* getBuffer() const {return mBuffer;}
+
+ //debug use
+ void resetBitMap() ;
+ private:
+ char* mBuffer;
+ U32 mSlotSize ; //when the block is not initialized, it is the buffer size.
+ U32 mBufferSize ;
+ U32 mUsageBits ;
+ U8 mTotalSlots ;
+ U8 mAllocatedSlots ;
+ U8 mDummySize ; //size of extra bytes reserved for mUsageBits.
+
+ public:
+ LLMemoryBlock* mPrev ;
+ LLMemoryBlock* mNext ;
+ LLMemoryBlock* mSelf ;
+
+ struct CompareAddress
+ {
+ bool operator()(const LLMemoryBlock* const& lhs, const LLMemoryBlock* const& rhs)
+ {
+ return (U32)lhs->getBuffer() < (U32)rhs->getBuffer();
+ }
+ };
+ };
+
+ class LL_COMMON_API LLMemoryChunk //is divided into memory blocks.
+ {
+ public:
+ LLMemoryChunk() ;
+ ~LLMemoryChunk() ;
+
+ void init(char* buffer, U32 buffer_size, U32 min_slot_size, U32 max_slot_size, U32 min_block_size, U32 max_block_size) ;
+ void setBuffer(char* buffer, U32 buffer_size) ;
+
+ bool empty() ;
+
+ char* allocate(U32 size) ;
+ void freeMem(void* addr) ;
+
+ char* getBuffer() const {return mBuffer;}
+ U32 getBufferSize() const {return mBufferSize;}
+ U32 getAllocatedSize() const {return mAlloatedSize;}
+
+ bool containsAddress(const char* addr) const;
+
+ static U32 getMaxOverhead(U32 data_buffer_size, U32 min_slot_size,
+ U32 max_slot_size, U32 min_block_size, U32 max_block_size) ;
+
+ void dump() ;
+
+ private:
+ U32 getPageIndex(U32 addr) ;
+ U32 getBlockLevel(U32 size) ;
+ U16 getPageLevel(U32 size) ;
+ LLMemoryBlock* addBlock(U32 blk_idx) ;
+ void popAvailBlockList(U32 blk_idx) ;
+ void addToFreeSpace(LLMemoryBlock* blk) ;
+ void removeFromFreeSpace(LLMemoryBlock* blk) ;
+ void removeBlock(LLMemoryBlock* blk) ;
+ void addToAvailBlockList(LLMemoryBlock* blk) ;
+ U32 calcBlockSize(U32 slot_size);
+ LLMemoryBlock* createNewBlock(LLMemoryBlock* blk, U32 buffer_size, U32 slot_size, U32 blk_idx) ;
+
+ private:
+ LLMemoryBlock** mAvailBlockList ;//256 by mMinSlotSize
+ LLMemoryBlock** mFreeSpaceList;
+ LLMemoryBlock* mBlocks ; //index of blocks by address.
+
+ char* mBuffer ;
+ U32 mBufferSize ;
+ char* mDataBuffer ;
+ char* mMetaBuffer ;
+ U32 mMinBlockSize ;
+ U32 mMinSlotSize ;
+ U32 mMaxSlotSize ;
+ U32 mAlloatedSize ;
+ U16 mBlockLevels;
+ U16 mPartitionLevels;
+
+ public:
+ //form a linked list
+ LLMemoryChunk* mNext ;
+ LLMemoryChunk* mPrev ;
+ } ;
+
+private:
+ LLPrivateMemoryPool(S32 type, U32 max_pool_size) ;
+ ~LLPrivateMemoryPool() ;
+
+ char *allocate(U32 size) ;
+ void freeMem(void* addr) ;
+
+ void dump() ;
+ U32 getTotalAllocatedSize() ;
+ U32 getTotalReservedSize() {return mReservedPoolSize;}
+ S32 getType() const {return mType; }
+ bool isEmpty() const {return !mNumOfChunks; }
+
+private:
+ void lock() ;
+ void unlock() ;
+ S32 getChunkIndex(U32 size) ;
+ LLMemoryChunk* addChunk(S32 chunk_index) ;
+ bool checkSize(U32 asked_size) ;
+ void removeChunk(LLMemoryChunk* chunk) ;
+ U16 findHashKey(const char* addr);
+ void addToHashTable(LLMemoryChunk* chunk) ;
+ void removeFromHashTable(LLMemoryChunk* chunk) ;
+ void rehash() ;
+ bool fillHashTable(U16 start, U16 end, LLMemoryChunk* chunk) ;
+ LLMemoryChunk* findChunk(const char* addr) ;
+
+ void destroyPool() ;
+
+public:
+ enum
+ {
+ SMALL_ALLOCATION = 0, //from 8 bytes to 2KB(exclusive), page size 2KB, max chunk size is 4MB.
+ MEDIUM_ALLOCATION, //from 2KB to 512KB(exclusive), page size 32KB, max chunk size 4MB
+ LARGE_ALLOCATION, //from 512KB to 4MB(inclusive), page size 64KB, max chunk size 16MB
+ SUPER_ALLOCATION //allocation larger than 4MB.
+ };
+
+ enum
+ {
+ STATIC = 0 , //static pool(each alllocation stays for a long time) without threading support
+ VOLATILE, //Volatile pool(each allocation stays for a very short time) without threading support
+ STATIC_THREADED, //static pool with threading support
+ VOLATILE_THREADED, //volatile pool with threading support
+ MAX_TYPES
+ }; //pool types
+
+private:
+ LLMutex* mMutexp ;
+ U32 mMaxPoolSize;
+ U32 mReservedPoolSize ;
+
+ LLMemoryChunk* mChunkList[SUPER_ALLOCATION] ; //all memory chunks reserved by this pool, sorted by address
+ U16 mNumOfChunks ;
+ U16 mHashFactor ;
+
+ S32 mType ;
+
+ class LLChunkHashElement
+ {
+ public:
+ LLChunkHashElement() {mFirst = NULL ; mSecond = NULL ;}
+
+ bool add(LLMemoryChunk* chunk) ;
+ void remove(LLMemoryChunk* chunk) ;
+ LLMemoryChunk* findChunk(const char* addr) ;
+
+ bool empty() {return !mFirst && !mSecond; }
+ bool full() {return mFirst && mSecond; }
+ bool hasElement(LLMemoryChunk* chunk) {return mFirst == chunk || mSecond == chunk;}
+
+ private:
+ LLMemoryChunk* mFirst ;
+ LLMemoryChunk* mSecond ;
+ };
+ std::vector<LLChunkHashElement> mChunkHashList ;
+};
+
+class LL_COMMON_API LLPrivateMemoryPoolManager
+{
+private:
+ LLPrivateMemoryPoolManager(BOOL enabled, U32 max_pool_size) ;
+ ~LLPrivateMemoryPoolManager() ;
+
+public:
+ static LLPrivateMemoryPoolManager* getInstance() ;
+ static void initClass(BOOL enabled, U32 pool_size) ;
+ static void destroyClass() ;
+
+ LLPrivateMemoryPool* newPool(S32 type) ;
+ void deletePool(LLPrivateMemoryPool* pool) ;
+
+private:
+ std::vector<LLPrivateMemoryPool*> mPoolList ;
+ U32 mMaxPrivatePoolSize;
+
+ static LLPrivateMemoryPoolManager* sInstance ;
+ static BOOL sPrivatePoolEnabled;
+ static std::vector<LLPrivateMemoryPool*> sDanglingPoolList ;
+public:
+ //debug and statistics info.
+ void updateStatistics() ;
+
+ U32 mTotalReservedSize ;
+ U32 mTotalAllocatedSize ;
+
+public:
+#if __DEBUG_PRIVATE_MEM__
+ static char* allocate(LLPrivateMemoryPool* poolp, U32 size, const char* function, const int line) ;
+
+ typedef std::map<char*, std::string> mem_allocation_info_t ;
+ static mem_allocation_info_t sMemAllocationTracker;
+#else
+ static char* allocate(LLPrivateMemoryPool* poolp, U32 size) ;
+#endif
+ static void freeMem(LLPrivateMemoryPool* poolp, void* addr) ;
+};
+
+//-------------------------------------------------------------------------------------
+#if __DEBUG_PRIVATE_MEM__
+#define ALLOCATE_MEM(poolp, size) LLPrivateMemoryPoolManager::allocate((poolp), (size), __FUNCTION__, __LINE__)
+#else
+#define ALLOCATE_MEM(poolp, size) LLPrivateMemoryPoolManager::allocate((poolp), (size))
+#endif
+#define FREE_MEM(poolp, addr) LLPrivateMemoryPoolManager::freeMem((poolp), (addr))
+//-------------------------------------------------------------------------------------
+
+//
+//the below singleton is used to test the private memory pool.
+//
+#if 0
+class LL_COMMON_API LLPrivateMemoryPoolTester
+{
+private:
+ LLPrivateMemoryPoolTester() ;
+ ~LLPrivateMemoryPoolTester() ;
+
+public:
+ static LLPrivateMemoryPoolTester* getInstance() ;
+ static void destroy() ;
+
+ void run(S32 type) ;
+
+private:
+ void correctnessTest() ;
+ void performanceTest() ;
+ void fragmentationtest() ;
+
+ void test(U32 min_size, U32 max_size, U32 stride, U32 times, bool random_deletion, bool output_statistics) ;
+ void testAndTime(U32 size, U32 times) ;
+
+#if 0
+public:
+ void* operator new(size_t size)
+ {
+ return (void*)sPool->allocate(size) ;
+ }
+ void operator delete(void* addr)
+ {
+ sPool->freeMem(addr) ;
+ }
+ void* operator new[](size_t size)
+ {
+ return (void*)sPool->allocate(size) ;
+ }
+ void operator delete[](void* addr)
+ {
+ sPool->freeMem(addr) ;
+ }
+#endif
+
+private:
+ static LLPrivateMemoryPoolTester* sInstance;
+ static LLPrivateMemoryPool* sPool ;
+ static LLPrivateMemoryPool* sThreadedPool ;
+};
+#if 0
+//static
+void* LLPrivateMemoryPoolTester::operator new(size_t size)
+{
+ return (void*)sPool->allocate(size) ;
+}
+
+//static
+void LLPrivateMemoryPoolTester::operator delete(void* addr)
+{
+ sPool->free(addr) ;
+}
+
+//static
+void* LLPrivateMemoryPoolTester::operator new[](size_t size)
+{
+ return (void*)sPool->allocate(size) ;
+}
+
+//static
+void LLPrivateMemoryPoolTester::operator delete[](void* addr)
+{
+ sPool->free(addr) ;
+}
+#endif
+#endif
// LLRefCount moved to llrefcount.h
// LLPointer moved to llpointer.h
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 17a4287538..31d5f3d2c7 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -151,6 +151,7 @@
#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
+#pragma warning (disable : 4018) // '<' : signed/unsigned mismatch
#endif // LL_MSVC
#if LL_WINDOWS
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index efd9c4b68f..5dee7a3541 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -32,7 +32,7 @@
//============================================================================
// MAIN THREAD
-LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded) :
+LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded, bool should_pause) :
LLThread(name),
mThreaded(threaded),
mIdleThread(TRUE),
@@ -41,6 +41,11 @@ LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded) :
{
if (mThreaded)
{
+ if(should_pause)
+ {
+ pause() ; //call this before start the thread.
+ }
+
start();
}
}
diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h
index a53b22f6fc..499d13a792 100644
--- a/indra/llcommon/llqueuedthread.h
+++ b/indra/llcommon/llqueuedthread.h
@@ -149,7 +149,7 @@ public:
static handle_t nullHandle() { return handle_t(0); }
public:
- LLQueuedThread(const std::string& name, bool threaded = true);
+ LLQueuedThread(const std::string& name, bool threaded = true, bool should_pause = false);
virtual ~LLQueuedThread();
virtual void shutdown();
diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index 6ca0737445..e295e3c621 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -24,6 +24,9 @@
* $/LicenseInfo$
*/
+// Must turn on conditional declarations in header file so definitions end up
+// with proper linkage.
+#define LLSD_DEBUG_INFO
#include "linden_common.h"
#include "llsd.h"
@@ -31,6 +34,7 @@
#include "../llmath/llmath.h"
#include "llformat.h"
#include "llsdserialize.h"
+#include "stringize.h"
#ifndef LL_RELEASE_FOR_DOWNLOAD
#define NAME_UNNAMED_NAMESPACE
@@ -50,6 +54,18 @@ namespace
using namespace LLSDUnnamedNamespace;
#endif
+namespace llsd
+{
+
+// statics
+S32 sLLSDAllocationCount = 0;
+S32 sLLSDNetObjects = 0;
+
+} // namespace llsd
+
+#define ALLOC_LLSD_OBJECT { llsd::sLLSDNetObjects++; llsd::sLLSDAllocationCount++; }
+#define FREE_LLSD_OBJECT { llsd::sLLSDNetObjects--; }
+
class LLSD::Impl
/**< This class is the abstract base class of the implementation of LLSD
It provides the reference counting implementation, and the default
@@ -58,13 +74,10 @@ class LLSD::Impl
*/
{
-private:
- U32 mUseCount;
-
protected:
Impl();
- enum StaticAllocationMarker { STATIC };
+ enum StaticAllocationMarker { STATIC_USAGE_COUNT = 0xFFFFFFFF };
Impl(StaticAllocationMarker);
///< This constructor is used for static objects and causes the
// suppresses adjusting the debugging counters when they are
@@ -72,8 +85,10 @@ protected:
virtual ~Impl();
- bool shared() const { return mUseCount > 1; }
+ bool shared() const { return (mUseCount > 1) && (mUseCount != STATIC_USAGE_COUNT); }
+ U32 mUseCount;
+
public:
static void reset(Impl*& var, Impl* impl);
///< safely set var to refer to the new impl (possibly shared)
@@ -128,6 +143,18 @@ public:
virtual LLSD::array_const_iterator beginArray() const { return endArray(); }
virtual LLSD::array_const_iterator endArray() const { static const std::vector<LLSD> empty; return empty.end(); }
+ virtual void dumpStats() const;
+ virtual void calcStats(S32 type_counts[], S32 share_counts[]) const;
+ // Container subclasses contain LLSD objects, rather than directly
+ // containing Impl objects. This helper forwards through LLSD.
+ void calcStats(const LLSD& llsd, S32 type_counts[], S32 share_counts[]) const
+ {
+ safe(llsd.impl).calcStats(type_counts, share_counts);
+ }
+
+ static const Impl& getImpl(const LLSD& llsd) { return safe(llsd.impl); }
+ static Impl& getImpl(LLSD& llsd) { return safe(llsd.impl); }
+
static const LLSD& undef();
static U32 sAllocationCount;
@@ -360,6 +387,9 @@ namespace
LLSD::map_iterator endMap() { return mData.end(); }
virtual LLSD::map_const_iterator beginMap() const { return mData.begin(); }
virtual LLSD::map_const_iterator endMap() const { return mData.end(); }
+
+ virtual void dumpStats() const;
+ virtual void calcStats(S32 type_counts[], S32 share_counts[]) const;
};
ImplMap& ImplMap::makeMap(LLSD::Impl*& var)
@@ -414,6 +444,34 @@ namespace
return i->second;
}
+ void ImplMap::dumpStats() const
+ {
+ std::cout << "Map size: " << mData.size() << std::endl;
+
+ std::cout << "LLSD Net Objects: " << llsd::sLLSDNetObjects << std::endl;
+ std::cout << "LLSD allocations: " << llsd::sLLSDAllocationCount << std::endl;
+
+ std::cout << "LLSD::Impl Net Objects: " << sOutstandingCount << std::endl;
+ std::cout << "LLSD::Impl allocations: " << sAllocationCount << std::endl;
+
+ Impl::dumpStats();
+ }
+
+ void ImplMap::calcStats(S32 type_counts[], S32 share_counts[]) const
+ {
+ LLSD::map_const_iterator iter = beginMap();
+ while (iter != endMap())
+ {
+ //std::cout << " " << (*iter).first << ": " << (*iter).second << std::endl;
+ Impl::calcStats((*iter).second, type_counts, share_counts);
+ iter++;
+ }
+
+ // Add in the values for this map
+ Impl::calcStats(type_counts, share_counts);
+ }
+
+
class ImplArray : public LLSD::Impl
{
private:
@@ -449,6 +507,8 @@ namespace
LLSD::array_iterator endArray() { return mData.end(); }
virtual LLSD::array_const_iterator beginArray() const { return mData.begin(); }
virtual LLSD::array_const_iterator endArray() const { return mData.end(); }
+
+ virtual void calcStats(S32 type_counts[], S32 share_counts[]) const;
};
ImplArray& ImplArray::makeArray(Impl*& var)
@@ -490,12 +550,13 @@ namespace
void ImplArray::insert(LLSD::Integer i, const LLSD& v)
{
- if (i < 0) {
+ if (i < 0)
+ {
return;
}
DataVector::size_type index = i;
- if (index >= mData.size())
+ if (index >= mData.size()) // tbd - sanity check limit for index ?
{
mData.resize(index + 1);
}
@@ -543,6 +604,19 @@ namespace
return mData[index];
}
+
+ void ImplArray::calcStats(S32 type_counts[], S32 share_counts[]) const
+ {
+ LLSD::array_const_iterator iter = beginArray();
+ while (iter != endArray())
+ { // Add values for all items held in the array
+ Impl::calcStats((*iter), type_counts, share_counts);
+ iter++;
+ }
+
+ // Add in the values for this array
+ Impl::calcStats(type_counts, share_counts);
+ }
}
LLSD::Impl::Impl()
@@ -564,8 +638,11 @@ LLSD::Impl::~Impl()
void LLSD::Impl::reset(Impl*& var, Impl* impl)
{
- if (impl) ++impl->mUseCount;
- if (var && --var->mUseCount == 0)
+ if (impl && impl->mUseCount != STATIC_USAGE_COUNT)
+ {
+ ++impl->mUseCount;
+ }
+ if (var && var->mUseCount != STATIC_USAGE_COUNT && --var->mUseCount == 0)
{
delete var;
}
@@ -574,13 +651,13 @@ void LLSD::Impl::reset(Impl*& var, Impl* impl)
LLSD::Impl& LLSD::Impl::safe(Impl* impl)
{
- static Impl theUndefined(STATIC);
+ static Impl theUndefined(STATIC_USAGE_COUNT);
return impl ? *impl : theUndefined;
}
const LLSD::Impl& LLSD::Impl::safe(const Impl* impl)
{
- static Impl theUndefined(STATIC);
+ static Impl theUndefined(STATIC_USAGE_COUNT);
return impl ? *impl : theUndefined;
}
@@ -656,6 +733,43 @@ const LLSD& LLSD::Impl::undef()
return immutableUndefined;
}
+void LLSD::Impl::dumpStats() const
+{
+ S32 type_counts[LLSD::TypeLLSDNumTypes + 1];
+ memset(&type_counts, 0, sizeof(type_counts));
+
+ S32 share_counts[LLSD::TypeLLSDNumTypes + 1];
+ memset(&share_counts, 0, sizeof(share_counts));
+
+ // Add info from all the values this object has
+ calcStats(type_counts, share_counts);
+
+ S32 type_index = LLSD::TypeLLSDTypeBegin;
+ while (type_index != LLSD::TypeLLSDTypeEnd)
+ {
+ std::cout << LLSD::typeString((LLSD::Type)type_index) << " type "
+ << type_counts[type_index] << " objects, "
+ << share_counts[type_index] << " shared"
+ << std::endl;
+ type_index++;
+ }
+}
+
+
+void LLSD::Impl::calcStats(S32 type_counts[], S32 share_counts[]) const
+{
+ S32 tp = S32(type());
+ if (0 <= tp && tp < LLSD::TypeLLSDNumTypes)
+ {
+ type_counts[tp]++;
+ if (shared())
+ {
+ share_counts[tp]++;
+ }
+ }
+}
+
+
U32 LLSD::Impl::sAllocationCount = 0;
U32 LLSD::Impl::sOutstandingCount = 0;
@@ -681,10 +795,10 @@ namespace
}
-LLSD::LLSD() : impl(0) { }
-LLSD::~LLSD() { Impl::reset(impl, 0); }
+LLSD::LLSD() : impl(0) { ALLOC_LLSD_OBJECT; }
+LLSD::~LLSD() { FREE_LLSD_OBJECT; Impl::reset(impl, 0); }
-LLSD::LLSD(const LLSD& other) : impl(0) { assign(other); }
+LLSD::LLSD(const LLSD& other) : impl(0) { ALLOC_LLSD_OBJECT; assign(other); }
void LLSD::assign(const LLSD& other) { Impl::assign(impl, other.impl); }
@@ -692,18 +806,18 @@ void LLSD::clear() { Impl::assignUndefined(impl); }
LLSD::Type LLSD::type() const { return safe(impl).type(); }
-// Scaler Constructors
-LLSD::LLSD(Boolean v) : impl(0) { assign(v); }
-LLSD::LLSD(Integer v) : impl(0) { assign(v); }
-LLSD::LLSD(Real v) : impl(0) { assign(v); }
-LLSD::LLSD(const UUID& v) : impl(0) { assign(v); }
-LLSD::LLSD(const String& v) : impl(0) { assign(v); }
-LLSD::LLSD(const Date& v) : impl(0) { assign(v); }
-LLSD::LLSD(const URI& v) : impl(0) { assign(v); }
-LLSD::LLSD(const Binary& v) : impl(0) { assign(v); }
+// Scalar Constructors
+LLSD::LLSD(Boolean v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(Integer v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(Real v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const UUID& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const String& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const Date& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const URI& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const Binary& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
// Convenience Constructors
-LLSD::LLSD(F32 v) : impl(0) { assign((Real)v); }
+LLSD::LLSD(F32 v) : impl(0) { ALLOC_LLSD_OBJECT; assign((Real)v); }
// Scalar Assignment
void LLSD::assign(Boolean v) { safe(impl).assign(impl, v); }
@@ -726,7 +840,7 @@ LLSD::URI LLSD::asURI() const { return safe(impl).asURI(); }
LLSD::Binary LLSD::asBinary() const { return safe(impl).asBinary(); }
// const char * helpers
-LLSD::LLSD(const char* v) : impl(0) { assign(v); }
+LLSD::LLSD(const char* v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
void LLSD::assign(const char* v)
{
if(v) assign(std::string(v));
@@ -784,9 +898,6 @@ LLSD& LLSD::operator[](Integer i)
const LLSD& LLSD::operator[](Integer i) const
{ return safe(impl).ref(i); }
-U32 LLSD::allocationCount() { return Impl::sAllocationCount; }
-U32 LLSD::outstandingCount() { return Impl::sOutstandingCount; }
-
static const char *llsd_dump(const LLSD &llsd, bool useXMLFormat)
{
// sStorage is used to hold the string representation of the llsd last
@@ -801,15 +912,9 @@ static const char *llsd_dump(const LLSD &llsd, bool useXMLFormat)
{
std::ostringstream out;
if (useXMLFormat)
- {
- LLSDXMLStreamer xml_streamer(llsd);
- out << xml_streamer;
- }
+ out << LLSDXMLStreamer(llsd);
else
- {
- LLSDNotationStreamer notation_streamer(llsd);
- out << notation_streamer;
- }
+ out << LLSDNotationStreamer(llsd);
out_string = out.str();
}
int len = out_string.length();
@@ -840,3 +945,38 @@ LLSD::array_iterator LLSD::beginArray() { return makeArray(impl).beginArray();
LLSD::array_iterator LLSD::endArray() { return makeArray(impl).endArray(); }
LLSD::array_const_iterator LLSD::beginArray() const{ return safe(impl).beginArray(); }
LLSD::array_const_iterator LLSD::endArray() const { return safe(impl).endArray(); }
+
+namespace llsd
+{
+
+U32 allocationCount() { return LLSD::Impl::sAllocationCount; }
+U32 outstandingCount() { return LLSD::Impl::sOutstandingCount; }
+
+// Diagnostic dump of contents in an LLSD object
+void dumpStats(const LLSD& llsd) { LLSD::Impl::getImpl(llsd).dumpStats(); }
+
+} // namespace llsd
+
+// static
+std::string LLSD::typeString(Type type)
+{
+ static const char * sTypeNameArray[] = {
+ "Undefined",
+ "Boolean",
+ "Integer",
+ "Real",
+ "String",
+ "UUID",
+ "Date",
+ "URI",
+ "Binary",
+ "Map",
+ "Array"
+ };
+
+ if (0 <= type && type < LL_ARRAY_SIZE(sTypeNameArray))
+ {
+ return sTypeNameArray[type];
+ }
+ return STRINGIZE("** invalid type value " << type);
+}
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 90d0f97873..5eb69059ac 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -40,10 +40,10 @@
/**
LLSD provides a flexible data system similar to the data facilities of
dynamic languages like Perl and Python. It is created to support exchange
- of structured data between loosly coupled systems. (Here, "loosly coupled"
+ of structured data between loosely coupled systems. (Here, "loosely coupled"
means not compiled together into the same module.)
- Data in such exchanges must be highly tollerant of changes on either side
+ Data in such exchanges must be highly tolerant of changes on either side
such as:
- recompilation
- implementation in a different langauge
@@ -51,19 +51,19 @@
- execution of older versions (with fewer parameters)
To this aim, the C++ API of LLSD strives to be very easy to use, and to
- default to "the right thing" whereever possible. It is extremely tollerant
+ default to "the right thing" wherever possible. It is extremely tolerant
of errors and unexpected situations.
- The fundimental class is LLSD. LLSD is a value holding object. It holds
+ The fundamental class is LLSD. LLSD is a value holding object. It holds
one value that is either undefined, one of the scalar types, or a map or an
array. LLSD objects have value semantics (copying them copies the value,
- though it can be considered efficient, due to shareing.), and mutable.
+ though it can be considered efficient, due to sharing), and mutable.
Undefined is the singular value given to LLSD objects that are not
initialized with any data. It is also used as the return value for
- operations that return an LLSD,
+ operations that return an LLSD.
- The sclar data types are:
+ The scalar data types are:
- Boolean - true or false
- Integer - a 32 bit signed integer
- Real - a 64 IEEE 754 floating point value
@@ -80,9 +80,73 @@
An array is a sequence of zero or more LLSD values.
+ Thread Safety
+
+ In general, these LLSD classes offer *less* safety than STL container
+ classes. Implementations prior to this one were unsafe even when
+ completely unrelated LLSD trees were in two threads due to reference
+ sharing of special 'undefined' values that participated in the reference
+ counting mechanism.
+
+ The dereference-before-refcount and aggressive tree sharing also make
+ it impractical to share an LLSD across threads. A strategy of passing
+ ownership or a copy to another thread is still difficult due to a lack
+ of a cloning interface but it can be done with some care.
+
+ One way of transferring ownership is as follows:
+
+ void method(const LLSD input) {
+ ...
+ LLSD * xfer_tree = new LLSD();
+ {
+ // Top-level values
+ (* xfer_tree)['label'] = "Some text";
+ (* xfer_tree)['mode'] = APP_MODE_CONSTANT;
+
+ // There will be a second-level
+ LLSD subtree(LLSD::emptyMap());
+ (* xfer_tree)['subtree'] = subtree;
+
+ // Do *not* copy from LLSD objects via LLSD
+ // intermediaries. Only use plain-old-data
+ // types as intermediaries to prevent reference
+ // sharing.
+ subtree['value1'] = input['value1'].asInteger();
+ subtree['value2'] = input['value2'].asString();
+
+ // Close scope and drop 'subtree's reference.
+ // Only xfer_tree has a reference to the second
+ // level data.
+ }
+ ...
+ // Transfer the LLSD pointer to another thread. Ownership
+ // transfers, this thread no longer has a reference to any
+ // part of the xfer_tree and there's nothing to free or
+ // release here. Receiving thread does need to delete the
+ // pointer when it is done with the LLSD. Transfer
+ // mechanism must perform correct data ordering operations
+ // as dictated by architecture.
+ other_thread.sendMessageAndPointer("Take This", xfer_tree);
+ xfer_tree = NULL;
+
+
+ Avoid this pattern which provides half of a race condition:
+
+ void method(const LLSD input) {
+ ...
+ LLSD xfer_tree(LLSD::emptyMap());
+ xfer_tree['label'] = "Some text";
+ xfer_tree['mode'] = APP_MODE_CONSTANT;
+ ...
+ other_thread.sendMessageAndPointer("Take This", xfer_tree);
+
+
@nosubgrouping
*/
+// Normally undefined, used for diagnostics
+//#define LLSD_DEBUG_INFO 1
+
class LL_COMMON_API LLSD
{
public:
@@ -202,7 +266,7 @@ public:
//@}
/** @name Character Pointer Helpers
- These are helper routines to make working with char* the same as easy as
+ These are helper routines to make working with char* as easy as
working with strings.
*/
//@{
@@ -266,7 +330,7 @@ public:
/** @name Type Testing */
//@{
enum Type {
- TypeUndefined,
+ TypeUndefined = 0,
TypeBoolean,
TypeInteger,
TypeReal,
@@ -276,7 +340,10 @@ public:
TypeURI,
TypeBinary,
TypeMap,
- TypeArray
+ TypeArray,
+ TypeLLSDTypeEnd,
+ TypeLLSDTypeBegin = TypeUndefined,
+ TypeLLSDNumTypes = (TypeLLSDTypeEnd - TypeLLSDTypeBegin)
};
Type type() const;
@@ -302,7 +369,7 @@ public:
If you get a linker error about these being missing, you have made
mistake in your code. DO NOT IMPLEMENT THESE FUNCTIONS as a fix.
- All of thse problems stem from trying to support char* in LLSD or in
+ All of these problems stem from trying to support char* in LLSD or in
std::string. There are too many automatic casts that will lead to
using an arbitrary pointer or scalar type to std::string.
*/
@@ -311,7 +378,7 @@ public:
void assign(const void*); ///< assign from arbitrary pointers
LLSD& operator=(const void*); ///< assign from arbitrary pointers
- bool has(Integer) const; ///< has only works for Maps
+ bool has(Integer) const; ///< has() only works for Maps
//@}
/** @name Implementation */
@@ -320,13 +387,7 @@ public:
class Impl;
private:
Impl* impl;
- //@}
-
- /** @name Unit Testing Interface */
- //@{
-public:
- static U32 allocationCount(); ///< how many Impls have been made
- static U32 outstandingCount(); ///< how many Impls are still alive
+ friend class LLSD::Impl;
//@}
private:
@@ -338,6 +399,10 @@ private:
/// Returns Notation version of llsd -- only to be called from debugger
static const char *dump(const LLSD &llsd);
//@}
+
+public:
+
+ static std::string typeString(Type type); // Return human-readable type as a string
};
struct llsd_select_bool : public std::unary_function<LLSD, LLSD::Boolean>
@@ -385,9 +450,32 @@ struct llsd_select_string : public std::unary_function<LLSD, LLSD::String>
LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd);
+namespace llsd
+{
+
+#ifdef LLSD_DEBUG_INFO
+/** @name Unit Testing Interface */
+//@{
+ LL_COMMON_API void dumpStats(const LLSD&); ///< Output information on object and usage
+
+ /// @warn THE FOLLOWING COUNTS WILL NOT BE ACCURATE IN A MULTI-THREADED
+ /// ENVIRONMENT.
+ ///
+ /// These counts track LLSD::Impl (hidden) objects.
+ LL_COMMON_API U32 allocationCount(); ///< how many Impls have been made
+ LL_COMMON_API U32 outstandingCount(); ///< how many Impls are still alive
+
+ /// These counts track LLSD (public) objects.
+ LL_COMMON_API extern S32 sLLSDAllocationCount; ///< Number of LLSD objects ever created
+ LL_COMMON_API extern S32 sLLSDNetObjects; ///< Number of LLSD objects that exist
+#endif
+//@}
+
+} // namespace llsd
+
/** QUESTIONS & TO DOS
- - Would Binary be more convenient as usigned char* buffer semantics?
- - Should Binary be convertable to/from String, and if so how?
+ - Would Binary be more convenient as unsigned char* buffer semantics?
+ - Should Binary be convertible to/from String, and if so how?
- as UTF8 encoded strings (making not like UUID<->String)
- as Base64 or Base96 encoded (making like UUID<->String)
- Conversions to std::string and LLUUID do not result in easy assignment
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index c5a7c6fc15..be9db53906 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -373,10 +373,13 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
{
break;
}
- count = get_till_eol(input, (char *)buffer, BUFFER_SIZE);
- if (!count)
{
- break;
+
+ count = get_till_eol(input, (char *)buffer, BUFFER_SIZE);
+ if (!count)
+ {
+ break;
+ }
}
status = XML_ParseBuffer(mParser, count, false);
@@ -716,6 +719,7 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name)
case ELEMENT_INTEGER:
{
S32 i;
+ // sscanf okay here with different locales - ints don't change for different locale settings like floats do.
if ( sscanf(mCurrentContent.c_str(), "%d", &i ) == 1 )
{ // See if sscanf works - it's faster
value = i;
@@ -729,15 +733,19 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name)
case ELEMENT_REAL:
{
- F64 r;
- if ( sscanf(mCurrentContent.c_str(), "%lf", &r ) == 1 )
- { // See if sscanf works - it's faster
- value = r;
- }
- else
- {
- value = LLSD(mCurrentContent).asReal();
- }
+ value = LLSD(mCurrentContent).asReal();
+ // removed since this breaks when locale has decimal separator that isn't '.'
+ // investigated changing local to something compatible each time but deemed higher
+ // risk that just using LLSD.asReal() each time.
+ //F64 r;
+ //if ( sscanf(mCurrentContent.c_str(), "%lf", &r ) == 1 )
+ //{ // See if sscanf works - it's faster
+ // value = r;
+ //}
+ //else
+ //{
+ // value = LLSD(mCurrentContent).asReal();
+ //}
}
break;
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 7aee1bb85f..49d99f2cd0 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -100,12 +100,6 @@ private:
DELETED
} EInitState;
- static void deleteSingleton()
- {
- delete getData().mSingletonInstance;
- getData().mSingletonInstance = NULL;
- }
-
// stores pointer to singleton instance
// and tracks initialization state of singleton
struct SingletonInstanceData
@@ -120,7 +114,10 @@ private:
~SingletonInstanceData()
{
- deleteSingleton();
+ if (mInitState != DELETED)
+ {
+ deleteSingleton();
+ }
}
};
@@ -132,6 +129,33 @@ public:
data.mInitState = DELETED;
}
+ /**
+ * @brief Immediately delete the singleton.
+ *
+ * A subsequent call to LLProxy::getInstance() will construct a new
+ * instance of the class.
+ *
+ * LLSingletons are normally destroyed after main() has exited and the C++
+ * runtime is cleaning up statically-constructed objects. Some classes
+ * derived from LLSingleton have objects that are part of a runtime system
+ * that is terminated before main() exits. Calling the destructor of those
+ * objects after the termination of their respective systems can cause
+ * crashes and other problems during termination of the project. Using this
+ * method to destroy the singleton early can prevent these crashes.
+ *
+ * An example where this is needed is for a LLSingleton that has an APR
+ * object as a member that makes APR calls on destruction. The APR system is
+ * shut down explicitly before main() exits. This causes a crash on exit.
+ * Using this method before the call to apr_terminate() and NOT calling
+ * getInstance() again will prevent the crash.
+ */
+ static void deleteSingleton()
+ {
+ delete getData().mSingletonInstance;
+ getData().mSingletonInstance = NULL;
+ getData().mInitState = DELETED;
+ }
+
static SingletonInstanceData& getData()
{
// this is static to cache the lookup results
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index f3b48b0156..e7fe656808 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -936,13 +936,18 @@ LLStringUtil::size_type LLStringUtil::getSubstitution(const std::string& instr,
{
const std::string delims (",");
- // Find the first ]
- size_type pos2 = instr.find(']', start);
+ // Find the first [
+ size_type pos1 = instr.find('[', start);
+ if (pos1 == std::string::npos)
+ return std::string::npos;
+
+ //Find the first ] after the initial [
+ size_type pos2 = instr.find(']', pos1);
if (pos2 == std::string::npos)
return std::string::npos;
- // Find the last [ before ]
- size_type pos1 = instr.find_last_of('[', pos2-1);
+ // Find the last [ before ] in case of nested [[]]
+ pos1 = instr.find_last_of('[', pos2-1);
if (pos1 == std::string::npos || pos1 < start)
return std::string::npos;
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index e8616a9be6..d781687175 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -1,6 +1,6 @@
/**
* @file llsys.cpp
- * @brief Impelementation of the basic system query functions.
+ * @brief Implementation of the basic system query functions.
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -24,6 +24,10 @@
* $/LicenseInfo$
*/
+#if LL_WINDOWS
+#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
+#endif
+
#include "linden_common.h"
#include "llsys.h"
@@ -36,22 +40,45 @@
#endif
#include "llprocessor.h"
+#include "llerrorcontrol.h"
+#include "llevents.h"
+#include "lltimer.h"
+#include "llsdserialize.h"
+#include "llsdutil.h"
+#include <boost/bind.hpp>
+#include <boost/circular_buffer.hpp>
+#include <boost/regex.hpp>
+#include <boost/foreach.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/range.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_float.hpp>
+
+using namespace llsd;
#if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# include <windows.h>
+# include <psapi.h> // GetPerformanceInfo() et al.
#elif LL_DARWIN
# include <errno.h>
# include <sys/sysctl.h>
# include <sys/utsname.h>
# include <stdint.h>
# include <Carbon/Carbon.h>
+# include <stdexcept>
+# include <mach/host_info.h>
+# include <mach/mach_host.h>
+# include <mach/task.h>
+# include <mach/task_info.h>
#elif LL_LINUX
# include <errno.h>
# include <sys/utsname.h>
# include <unistd.h>
# include <sys/sysinfo.h>
+# include <stdexcept>
const char MEMINFO_FILE[] = "/proc/meminfo";
#elif LL_SOLARIS
# include <stdio.h>
@@ -70,6 +97,15 @@ extern int errno;
static const S32 CPUINFO_BUFFER_SIZE = 16383;
LLCPUInfo gSysCPU;
+// Don't log memory info any more often than this. It also serves as our
+// framerate sample size.
+static const F32 MEM_INFO_THROTTLE = 20;
+// Sliding window of samples. We intentionally limit the length of time we
+// remember "the slowest" framerate because framerate is very slow at login.
+// If we only triggered FrameWatcher logging when the session framerate
+// dropped below the login framerate, we'd have very little additional data.
+static const F32 MEM_INFO_WINDOW = 10*60;
+
#if LL_WINDOWS
#ifndef DLLVERSIONINFO
typedef struct _DllVersionInfo
@@ -613,8 +649,78 @@ void LLCPUInfo::stream(std::ostream& s) const
s << "->mCPUString: " << mCPUString << std::endl;
}
+// Helper class for LLMemoryInfo: accumulate stats in the form we store for
+// LLMemoryInfo::getStatsMap().
+class Stats
+{
+public:
+ Stats():
+ mStats(LLSD::emptyMap())
+ {}
+
+ // Store every integer type as LLSD::Integer.
+ template <class T>
+ void add(const LLSD::String& name, const T& value,
+ typename boost::enable_if<boost::is_integral<T> >::type* = 0)
+ {
+ mStats[name] = LLSD::Integer(value);
+ }
+
+ // Store every floating-point type as LLSD::Real.
+ template <class T>
+ void add(const LLSD::String& name, const T& value,
+ typename boost::enable_if<boost::is_float<T> >::type* = 0)
+ {
+ mStats[name] = LLSD::Real(value);
+ }
+
+ // Hope that LLSD::Date values are sufficiently unambiguous.
+ void add(const LLSD::String& name, const LLSD::Date& value)
+ {
+ mStats[name] = value;
+ }
+
+ LLSD get() const { return mStats; }
+
+private:
+ LLSD mStats;
+};
+
+// Wrap boost::regex_match() with a function that doesn't throw.
+template <typename S, typename M, typename R>
+static bool regex_match_no_exc(const S& string, M& match, const R& regex)
+{
+ try
+ {
+ return boost::regex_match(string, match, regex);
+ }
+ catch (const std::runtime_error& e)
+ {
+ LL_WARNS("LLMemoryInfo") << "error matching with '" << regex.str() << "': "
+ << e.what() << ":\n'" << string << "'" << LL_ENDL;
+ return false;
+ }
+}
+
+// Wrap boost::regex_search() with a function that doesn't throw.
+template <typename S, typename M, typename R>
+static bool regex_search_no_exc(const S& string, M& match, const R& regex)
+{
+ try
+ {
+ return boost::regex_search(string, match, regex);
+ }
+ catch (const std::runtime_error& e)
+ {
+ LL_WARNS("LLMemoryInfo") << "error searching with '" << regex.str() << "': "
+ << e.what() << ":\n'" << string << "'" << LL_ENDL;
+ return false;
+ }
+}
+
LLMemoryInfo::LLMemoryInfo()
{
+ refresh();
}
#if LL_WINDOWS
@@ -638,11 +744,7 @@ static U32 LLMemoryAdjustKBResult(U32 inKB)
U32 LLMemoryInfo::getPhysicalMemoryKB() const
{
#if LL_WINDOWS
- MEMORYSTATUSEX state;
- state.dwLength = sizeof(state);
- GlobalMemoryStatusEx(&state);
-
- return LLMemoryAdjustKBResult((U32)(state.ullTotalPhys >> 10));
+ return LLMemoryAdjustKBResult(mStatsMap["Total Physical KB"].asInteger());
#elif LL_DARWIN
// This might work on Linux as well. Someone check...
@@ -690,12 +792,82 @@ U32 LLMemoryInfo::getPhysicalMemoryClamped() const
void LLMemoryInfo::getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb)
{
#if LL_WINDOWS
- MEMORYSTATUSEX state;
- state.dwLength = sizeof(state);
- GlobalMemoryStatusEx(&state);
+ // Sigh, this shouldn't be a static method, then we wouldn't have to
+ // reload this data separately from refresh()
+ LLSD statsMap(loadStatsMap());
+
+ avail_physical_mem_kb = statsMap["Avail Physical KB"].asInteger();
+ avail_virtual_mem_kb = statsMap["Avail Virtual KB"].asInteger();
- avail_physical_mem_kb = (U32)(state.ullAvailPhys/1024) ;
- avail_virtual_mem_kb = (U32)(state.ullAvailVirtual/1024) ;
+#elif LL_DARWIN
+ // mStatsMap is derived from vm_stat, look for (e.g.) "kb free":
+ // $ vm_stat
+ // Mach Virtual Memory Statistics: (page size of 4096 bytes)
+ // Pages free: 462078.
+ // Pages active: 142010.
+ // Pages inactive: 220007.
+ // Pages wired down: 159552.
+ // "Translation faults": 220825184.
+ // Pages copy-on-write: 2104153.
+ // Pages zero filled: 167034876.
+ // Pages reactivated: 65153.
+ // Pageins: 2097212.
+ // Pageouts: 41759.
+ // Object cache: 841598 hits of 7629869 lookups (11% hit rate)
+ avail_physical_mem_kb = -1 ;
+ avail_virtual_mem_kb = -1 ;
+
+#elif LL_LINUX
+ // mStatsMap is derived from MEMINFO_FILE:
+ // $ cat /proc/meminfo
+ // MemTotal: 4108424 kB
+ // MemFree: 1244064 kB
+ // Buffers: 85164 kB
+ // Cached: 1990264 kB
+ // SwapCached: 0 kB
+ // Active: 1176648 kB
+ // Inactive: 1427532 kB
+ // Active(anon): 529152 kB
+ // Inactive(anon): 15924 kB
+ // Active(file): 647496 kB
+ // Inactive(file): 1411608 kB
+ // Unevictable: 16 kB
+ // Mlocked: 16 kB
+ // HighTotal: 3266316 kB
+ // HighFree: 721308 kB
+ // LowTotal: 842108 kB
+ // LowFree: 522756 kB
+ // SwapTotal: 6384632 kB
+ // SwapFree: 6384632 kB
+ // Dirty: 28 kB
+ // Writeback: 0 kB
+ // AnonPages: 528820 kB
+ // Mapped: 89472 kB
+ // Shmem: 16324 kB
+ // Slab: 159624 kB
+ // SReclaimable: 145168 kB
+ // SUnreclaim: 14456 kB
+ // KernelStack: 2560 kB
+ // PageTables: 5560 kB
+ // NFS_Unstable: 0 kB
+ // Bounce: 0 kB
+ // WritebackTmp: 0 kB
+ // CommitLimit: 8438844 kB
+ // Committed_AS: 1271596 kB
+ // VmallocTotal: 122880 kB
+ // VmallocUsed: 65252 kB
+ // VmallocChunk: 52356 kB
+ // HardwareCorrupted: 0 kB
+ // HugePages_Total: 0
+ // HugePages_Free: 0
+ // HugePages_Rsvd: 0
+ // HugePages_Surp: 0
+ // Hugepagesize: 2048 kB
+ // DirectMap4k: 434168 kB
+ // DirectMap2M: 477184 kB
+ // (could also run 'free', but easier to read a file than run a program)
+ avail_physical_mem_kb = -1 ;
+ avail_virtual_mem_kb = -1 ;
#else
//do not know how to collect available memory info for other systems.
@@ -708,56 +880,283 @@ void LLMemoryInfo::getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_v
void LLMemoryInfo::stream(std::ostream& s) const
{
+ // We want these memory stats to be easy to grep from the log, along with
+ // the timestamp. So preface each line with the timestamp and a
+ // distinctive marker. Without that, we'd have to search the log for the
+ // introducer line, then read subsequent lines, etc...
+ std::string pfx(LLError::utcTime() + " <mem> ");
+
+ // Max key length
+ size_t key_width(0);
+ BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+ {
+ size_t len(pair.first.length());
+ if (len > key_width)
+ {
+ key_width = len;
+ }
+ }
+
+ // Now stream stats
+ BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+ {
+ s << pfx << std::setw(key_width+1) << (pair.first + ':') << ' ';
+ LLSD value(pair.second);
+ if (value.isInteger())
+ s << std::setw(12) << value.asInteger();
+ else if (value.isReal())
+ s << std::fixed << std::setprecision(1) << value.asReal();
+ else if (value.isDate())
+ value.asDate().toStream(s);
+ else
+ s << value; // just use default LLSD formatting
+ s << std::endl;
+ }
+}
+
+LLSD LLMemoryInfo::getStatsMap() const
+{
+ return mStatsMap;
+}
+
+LLMemoryInfo& LLMemoryInfo::refresh()
+{
+ mStatsMap = loadStatsMap();
+
+ LL_DEBUGS("LLMemoryInfo") << "Populated mStatsMap:\n";
+ LLSDSerialize::toPrettyXML(mStatsMap, LL_CONT);
+ LL_ENDL;
+
+ return *this;
+}
+
+LLSD LLMemoryInfo::loadStatsMap()
+{
+ // This implementation is derived from stream() code (as of 2011-06-29).
+ Stats stats;
+
+ // associate timestamp for analysis over time
+ stats.add("timestamp", LLDate::now());
+
#if LL_WINDOWS
MEMORYSTATUSEX state;
state.dwLength = sizeof(state);
GlobalMemoryStatusEx(&state);
- s << "Percent Memory use: " << (U32)state.dwMemoryLoad << '%' << std::endl;
- s << "Total Physical KB: " << (U32)(state.ullTotalPhys/1024) << std::endl;
- s << "Avail Physical KB: " << (U32)(state.ullAvailPhys/1024) << std::endl;
- s << "Total page KB: " << (U32)(state.ullTotalPageFile/1024) << std::endl;
- s << "Avail page KB: " << (U32)(state.ullAvailPageFile/1024) << std::endl;
- s << "Total Virtual KB: " << (U32)(state.ullTotalVirtual/1024) << std::endl;
- s << "Avail Virtual KB: " << (U32)(state.ullAvailVirtual/1024) << std::endl;
+ stats.add("Percent Memory use", state.dwMemoryLoad);
+ stats.add("Total Physical KB", state.ullTotalPhys/1024);
+ stats.add("Avail Physical KB", state.ullAvailPhys/1024);
+ stats.add("Total page KB", state.ullTotalPageFile/1024);
+ stats.add("Avail page KB", state.ullAvailPageFile/1024);
+ stats.add("Total Virtual KB", state.ullTotalVirtual/1024);
+ stats.add("Avail Virtual KB", state.ullAvailVirtual/1024);
+
+ PERFORMANCE_INFORMATION perf;
+ perf.cb = sizeof(perf);
+ GetPerformanceInfo(&perf, sizeof(perf));
+
+ SIZE_T pagekb(perf.PageSize/1024);
+ stats.add("CommitTotal KB", perf.CommitTotal * pagekb);
+ stats.add("CommitLimit KB", perf.CommitLimit * pagekb);
+ stats.add("CommitPeak KB", perf.CommitPeak * pagekb);
+ stats.add("PhysicalTotal KB", perf.PhysicalTotal * pagekb);
+ stats.add("PhysicalAvail KB", perf.PhysicalAvailable * pagekb);
+ stats.add("SystemCache KB", perf.SystemCache * pagekb);
+ stats.add("KernelTotal KB", perf.KernelTotal * pagekb);
+ stats.add("KernelPaged KB", perf.KernelPaged * pagekb);
+ stats.add("KernelNonpaged KB", perf.KernelNonpaged * pagekb);
+ stats.add("PageSize KB", pagekb);
+ stats.add("HandleCount", perf.HandleCount);
+ stats.add("ProcessCount", perf.ProcessCount);
+ stats.add("ThreadCount", perf.ThreadCount);
+
+ PROCESS_MEMORY_COUNTERS_EX pmem;
+ pmem.cb = sizeof(pmem);
+ // GetProcessMemoryInfo() is documented to accept either
+ // PROCESS_MEMORY_COUNTERS* or PROCESS_MEMORY_COUNTERS_EX*, presumably
+ // using the redundant size info to distinguish. But its prototype
+ // specifically accepts PROCESS_MEMORY_COUNTERS*, and since this is a
+ // classic-C API, PROCESS_MEMORY_COUNTERS_EX isn't a subclass. Cast the
+ // pointer.
+ GetProcessMemoryInfo(GetCurrentProcess(), PPROCESS_MEMORY_COUNTERS(&pmem), sizeof(pmem));
+
+ stats.add("Page Fault Count", pmem.PageFaultCount);
+ stats.add("PeakWorkingSetSize KB", pmem.PeakWorkingSetSize/1024);
+ stats.add("WorkingSetSize KB", pmem.WorkingSetSize/1024);
+ stats.add("QutaPeakPagedPoolUsage KB", pmem.QuotaPeakPagedPoolUsage/1024);
+ stats.add("QuotaPagedPoolUsage KB", pmem.QuotaPagedPoolUsage/1024);
+ stats.add("QuotaPeakNonPagedPoolUsage KB", pmem.QuotaPeakNonPagedPoolUsage/1024);
+ stats.add("QuotaNonPagedPoolUsage KB", pmem.QuotaNonPagedPoolUsage/1024);
+ stats.add("PagefileUsage KB", pmem.PagefileUsage/1024);
+ stats.add("PeakPagefileUsage KB", pmem.PeakPagefileUsage/1024);
+ stats.add("PrivateUsage KB", pmem.PrivateUsage/1024);
+
#elif LL_DARWIN
- uint64_t phys = 0;
- size_t len = sizeof(phys);
+ const vm_size_t pagekb(vm_page_size / 1024);
+
+ //
+ // Collect the vm_stat's
+ //
- if(sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0)
{
- s << "Total Physical KB: " << phys/1024 << std::endl;
- }
- else
+ vm_statistics_data_t vmstat;
+ mach_msg_type_number_t vmstatCount = HOST_VM_INFO_COUNT;
+
+ if (host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t) &vmstat, &vmstatCount) != KERN_SUCCESS)
{
- s << "Unable to collect memory information";
+ LL_WARNS("LLMemoryInfo") << "Unable to collect memory information" << LL_ENDL;
+ }
+ else
+ {
+ stats.add("Pages free KB", pagekb * vmstat.free_count);
+ stats.add("Pages active KB", pagekb * vmstat.active_count);
+ stats.add("Pages inactive KB", pagekb * vmstat.inactive_count);
+ stats.add("Pages wired KB", pagekb * vmstat.wire_count);
+
+ stats.add("Pages zero fill", vmstat.zero_fill_count);
+ stats.add("Page reactivations", vmstat.reactivations);
+ stats.add("Page-ins", vmstat.pageins);
+ stats.add("Page-outs", vmstat.pageouts);
+
+ stats.add("Faults", vmstat.faults);
+ stats.add("Faults copy-on-write", vmstat.cow_faults);
+
+ stats.add("Cache lookups", vmstat.lookups);
+ stats.add("Cache hits", vmstat.hits);
+
+ stats.add("Page purgeable count", vmstat.purgeable_count);
+ stats.add("Page purges", vmstat.purges);
+
+ stats.add("Page speculative reads", vmstat.speculative_count);
+ }
}
+
+ //
+ // Collect the misc task info
+ //
+
+ {
+ task_events_info_data_t taskinfo;
+ unsigned taskinfoSize = sizeof(taskinfo);
+
+ if (task_info(mach_task_self(), TASK_EVENTS_INFO, (task_info_t) &taskinfo, &taskinfoSize) != KERN_SUCCESS)
+ {
+ LL_WARNS("LLMemoryInfo") << "Unable to collect task information" << LL_ENDL;
+ }
+ else
+ {
+ stats.add("Task page-ins", taskinfo.pageins);
+ stats.add("Task copy-on-write faults", taskinfo.cow_faults);
+ stats.add("Task messages sent", taskinfo.messages_sent);
+ stats.add("Task messages received", taskinfo.messages_received);
+ stats.add("Task mach system call count", taskinfo.syscalls_mach);
+ stats.add("Task unix system call count", taskinfo.syscalls_unix);
+ stats.add("Task context switch count", taskinfo.csw);
+ }
+ }
+
+ //
+ // Collect the basic task info
+ //
+
+ {
+ task_basic_info_64_data_t taskinfo;
+ unsigned taskinfoSize = sizeof(taskinfo);
+
+ if (task_info(mach_task_self(), TASK_BASIC_INFO_64, (task_info_t) &taskinfo, &taskinfoSize) != KERN_SUCCESS)
+ {
+ LL_WARNS("LLMemoryInfo") << "Unable to collect task information" << LL_ENDL;
+ }
+ else
+ {
+ stats.add("Basic suspend count", taskinfo.suspend_count);
+ stats.add("Basic virtual memory KB", taskinfo.virtual_size / 1024);
+ stats.add("Basic resident memory KB", taskinfo.resident_size / 1024);
+ stats.add("Basic new thread policy", taskinfo.policy);
+ }
+ }
+
#elif LL_SOLARIS
- U64 phys = 0;
+ U64 phys = 0;
- phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024);
+ phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024);
- s << "Total Physical KB: " << phys << std::endl;
-#else
- // *NOTE: This works on linux. What will it do on other systems?
- LLFILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb");
- if(meminfo)
+ stats.add("Total Physical KB", phys);
+
+#elif LL_LINUX
+ std::ifstream meminfo(MEMINFO_FILE);
+ if (meminfo.is_open())
{
- char line[MAX_STRING]; /* Flawfinder: ignore */
- memset(line, 0, MAX_STRING);
- while(fgets(line, MAX_STRING, meminfo))
+ // MemTotal: 4108424 kB
+ // MemFree: 1244064 kB
+ // Buffers: 85164 kB
+ // Cached: 1990264 kB
+ // SwapCached: 0 kB
+ // Active: 1176648 kB
+ // Inactive: 1427532 kB
+ // ...
+ // VmallocTotal: 122880 kB
+ // VmallocUsed: 65252 kB
+ // VmallocChunk: 52356 kB
+ // HardwareCorrupted: 0 kB
+ // HugePages_Total: 0
+ // HugePages_Free: 0
+ // HugePages_Rsvd: 0
+ // HugePages_Surp: 0
+ // Hugepagesize: 2048 kB
+ // DirectMap4k: 434168 kB
+ // DirectMap2M: 477184 kB
+
+ // Intentionally don't pass the boost::no_except flag. This
+ // boost::regex object is constructed with a string literal, so it
+ // should be valid every time. If it becomes invalid, we WANT an
+ // exception, hopefully even before the dev checks in.
+ boost::regex stat_rx("(.+): +([0-9]+)( kB)?");
+ boost::smatch matched;
+
+ std::string line;
+ while (std::getline(meminfo, line))
{
- line[strlen(line)-1] = ' '; /*Flawfinder: ignore*/
- s << line;
+ LL_DEBUGS("LLMemoryInfo") << line << LL_ENDL;
+ if (regex_match_no_exc(line, matched, stat_rx))
+ {
+ // e.g. "MemTotal: 4108424 kB"
+ LLSD::String key(matched[1].first, matched[1].second);
+ LLSD::String value_str(matched[2].first, matched[2].second);
+ LLSD::Integer value(0);
+ try
+ {
+ value = boost::lexical_cast<LLSD::Integer>(value_str);
+ }
+ catch (const boost::bad_lexical_cast&)
+ {
+ LL_WARNS("LLMemoryInfo") << "couldn't parse '" << value_str
+ << "' in " << MEMINFO_FILE << " line: "
+ << line << LL_ENDL;
+ continue;
+ }
+ // Store this statistic.
+ stats.add(key, value);
+ }
+ else
+ {
+ LL_WARNS("LLMemoryInfo") << "unrecognized " << MEMINFO_FILE << " line: "
+ << line << LL_ENDL;
+ }
}
- fclose(meminfo);
}
else
{
- s << "Unable to collect memory information";
+ LL_WARNS("LLMemoryInfo") << "Unable to collect memory information" << LL_ENDL;
}
+
+#else
+ LL_WARNS("LLMemoryInfo") << "Unknown system; unable to collect memory information" << LL_ENDL;
+
#endif
+
+ return stats.get();
}
std::ostream& operator<<(std::ostream& s, const LLOSInfo& info)
@@ -778,6 +1177,143 @@ std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info)
return s;
}
+class FrameWatcher
+{
+public:
+ FrameWatcher():
+ // Hooking onto the "mainloop" event pump gets us one call per frame.
+ mConnection(LLEventPumps::instance()
+ .obtain("mainloop")
+ .listen("FrameWatcher", boost::bind(&FrameWatcher::tick, this, _1))),
+ // Initializing mSampleStart to an invalid timestamp alerts us to skip
+ // trying to compute framerate on the first call.
+ mSampleStart(-1),
+ // Initializing mSampleEnd to 0 ensures that we treat the first call
+ // as the completion of a sample window.
+ mSampleEnd(0),
+ mFrames(0),
+ // Both MEM_INFO_WINDOW and MEM_INFO_THROTTLE are in seconds. We need
+ // the number of integer MEM_INFO_THROTTLE sample slots that will fit
+ // in MEM_INFO_WINDOW. Round up.
+ mSamples(int((MEM_INFO_WINDOW / MEM_INFO_THROTTLE) + 0.7)),
+ // Initializing to F32_MAX means that the first real frame will become
+ // the slowest ever, which sounds like a good idea.
+ mSlowest(F32_MAX)
+ {}
+
+ bool tick(const LLSD&)
+ {
+ F32 timestamp(mTimer.getElapsedTimeF32());
+
+ // Count this frame in the interval just completed.
+ ++mFrames;
+
+ // Have we finished a sample window yet?
+ if (timestamp < mSampleEnd)
+ {
+ // no, just keep waiting
+ return false;
+ }
+
+ // Set up for next sample window. Capture values for previous frame in
+ // local variables and reset data members.
+ U32 frames(mFrames);
+ F32 sampleStart(mSampleStart);
+ // No frames yet in next window
+ mFrames = 0;
+ // which starts right now
+ mSampleStart = timestamp;
+ // and ends MEM_INFO_THROTTLE seconds in the future
+ mSampleEnd = mSampleStart + MEM_INFO_THROTTLE;
+
+ // On the very first call, that's all we can do, no framerate
+ // computation is possible.
+ if (sampleStart < 0)
+ {
+ return false;
+ }
+
+ // How long did this actually take? As framerate slows, the duration
+ // of the frame we just finished could push us WELL beyond our desired
+ // sample window size.
+ F32 elapsed(timestamp - sampleStart);
+ F32 framerate(frames/elapsed);
+
+ // Remember previous slowest framerate because we're just about to
+ // update it.
+ F32 slowest(mSlowest);
+ // Remember previous number of samples.
+ boost::circular_buffer<F32>::size_type prevSize(mSamples.size());
+
+ // Capture new framerate in our samples buffer. Once the buffer is
+ // full (after MEM_INFO_WINDOW seconds), this will displace the oldest
+ // sample. ("So they all rolled over, and one fell out...")
+ mSamples.push_back(framerate);
+
+ // Calculate the new minimum framerate. I know of no way to update a
+ // rolling minimum without ever rescanning the buffer. But since there
+ // are only a few tens of items in this buffer, rescanning it is
+ // probably cheaper (and certainly easier to reason about) than
+ // attempting to optimize away some of the scans.
+ mSlowest = framerate; // pick an arbitrary entry to start
+ for (boost::circular_buffer<F32>::const_iterator si(mSamples.begin()), send(mSamples.end());
+ si != send; ++si)
+ {
+ if (*si < mSlowest)
+ {
+ mSlowest = *si;
+ }
+ }
+
+ // We're especially interested in memory as framerate drops. Only log
+ // when framerate drops below the slowest framerate we remember.
+ // (Should always be true for the end of the very first sample
+ // window.)
+ if (framerate >= slowest)
+ {
+ return false;
+ }
+ // Congratulations, we've hit a new low. :-P
+
+ LL_INFOS("FrameWatcher") << ' ';
+ if (! prevSize)
+ {
+ LL_CONT << "initial framerate ";
+ }
+ else
+ {
+ LL_CONT << "slowest framerate for last " << int(prevSize * MEM_INFO_THROTTLE)
+ << " seconds ";
+ }
+ LL_CONT << std::fixed << std::setprecision(1) << framerate << '\n'
+ << LLMemoryInfo() << LL_ENDL;
+
+ return false;
+ }
+
+private:
+ // Storing the connection in an LLTempBoundListener ensures it will be
+ // disconnected when we're destroyed.
+ LLTempBoundListener mConnection;
+ // Track elapsed time
+ LLTimer mTimer;
+ // Some of what you see here is in fact redundant with functionality you
+ // can get from LLTimer. Unfortunately the LLTimer API is missing the
+ // feature we need: has at least the stated interval elapsed, and if so,
+ // exactly how long has passed? So we have to do it by hand, sigh.
+ // Time at start, end of sample window
+ F32 mSampleStart, mSampleEnd;
+ // Frames this sample window
+ U32 mFrames;
+ // Sliding window of framerate samples
+ boost::circular_buffer<F32> mSamples;
+ // Slowest framerate in mSamples
+ F32 mSlowest;
+};
+
+// Need an instance of FrameWatcher before it does any good
+static FrameWatcher sFrameWatcher;
+
BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile)
{
std::string tmpfile;
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 41a4f25000..739e795d3a 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -36,6 +36,7 @@
// llinfos << info << llendl;
//
+#include "llsd.h"
#include <iosfwd>
#include <string>
@@ -117,6 +118,27 @@ public:
//get the available memory infomation in KiloBytes.
static void getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb);
+
+ // Retrieve a map of memory statistics. The keys of the map are platform-
+ // dependent. The values are in kilobytes to try to avoid integer overflow.
+ LLSD getStatsMap() const;
+
+ // Re-fetch memory data (as reported by stream() and getStatsMap()) from the
+ // system. Normally this is fetched at construction time. Return (*this)
+ // to permit usage of the form:
+ // @code
+ // LLMemoryInfo info;
+ // ...
+ // info.refresh().getStatsMap();
+ // @endcode
+ LLMemoryInfo& refresh();
+
+private:
+ // set mStatsMap
+ static LLSD loadStatsMap();
+
+ // Memory stats for getStatsMap().
+ LLSD mStatsMap;
};
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index d9400fb5b3..4063cc730b 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -323,7 +323,8 @@ LLMutex::LLMutex(apr_pool_t *poolp) :
LLMutex::~LLMutex()
{
#if MUTEX_DEBUG
- llassert_always(!isLocked()); // better not be locked!
+ //bad assertion, the subclass LLSignal might be "locked", and that's OK
+ //llassert_always(!isLocked()); // better not be locked!
#endif
apr_thread_mutex_destroy(mAPRMutexp);
mAPRMutexp = NULL;
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 0018b8e844..deac3d1780 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -27,9 +27,9 @@
#ifndef LL_LLVERSIONVIEWER_H
#define LL_LLVERSIONVIEWER_H
-const S32 LL_VERSION_MAJOR = 2;
-const S32 LL_VERSION_MINOR = 8;
-const S32 LL_VERSION_PATCH = 1;
+const S32 LL_VERSION_MAJOR = 3;
+const S32 LL_VERSION_MINOR = 2;
+const S32 LL_VERSION_PATCH = 5;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";
diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp
index 3ac50832fd..4988bdf570 100644
--- a/indra/llcommon/llworkerthread.cpp
+++ b/indra/llcommon/llworkerthread.cpp
@@ -34,8 +34,8 @@
//============================================================================
// Run on MAIN thread
-LLWorkerThread::LLWorkerThread(const std::string& name, bool threaded) :
- LLQueuedThread(name, threaded)
+LLWorkerThread::LLWorkerThread(const std::string& name, bool threaded, bool should_pause) :
+ LLQueuedThread(name, threaded, should_pause)
{
mDeleteMutex = new LLMutex(NULL);
diff --git a/indra/llcommon/llworkerthread.h b/indra/llcommon/llworkerthread.h
index 9bff18303e..78a4781d15 100644
--- a/indra/llcommon/llworkerthread.h
+++ b/indra/llcommon/llworkerthread.h
@@ -83,7 +83,7 @@ private:
LLMutex* mDeleteMutex;
public:
- LLWorkerThread(const std::string& name, bool threaded = true);
+ LLWorkerThread(const std::string& name, bool threaded = true, bool should_pause = false);
~LLWorkerThread();
/*virtual*/ S32 update(U32 max_time_ms);
diff --git a/indra/llcommon/stdenums.h b/indra/llcommon/stdenums.h
index 556eff8370..40b3364b36 100644
--- a/indra/llcommon/stdenums.h
+++ b/indra/llcommon/stdenums.h
@@ -49,8 +49,9 @@ enum EDragAndDropType
DAD_ANIMATION = 12,
DAD_GESTURE = 13,
DAD_LINK = 14,
- DAD_MESH = 15,
- DAD_COUNT = 16, // number of types in this enum
+ DAD_MESH = 15,
+ DAD_WIDGET = 16,
+ DAD_COUNT = 17, // number of types in this enum
};
// Reasons for drags to be denied.
diff --git a/indra/llcommon/tests/llinstancetracker_test.cpp b/indra/llcommon/tests/llinstancetracker_test.cpp
index c7cb488ca1..b34d1c5fd3 100644
--- a/indra/llcommon/tests/llinstancetracker_test.cpp
+++ b/indra/llcommon/tests/llinstancetracker_test.cpp
@@ -40,6 +40,7 @@
#include <boost/scoped_ptr.hpp>
// other Linden headers
#include "../test/lltut.h"
+#include "wrapllerrs.h"
struct Keyed: public LLInstanceTracker<Keyed, std::string>
{
@@ -151,33 +152,81 @@ namespace tut
{
Unkeyed one, two, three;
typedef std::set<Unkeyed*> KeySet;
- KeySet keys;
- keys.insert(&one);
- keys.insert(&two);
- keys.insert(&three);
- {
- Unkeyed::LLInstanceTrackerScopedGuard guard;
- for (Unkeyed::key_iter ki(guard.beginKeys()), kend(guard.endKeys());
- ki != kend; ++ki)
- {
- ensure_equals("spurious key", keys.erase(*ki), 1);
- }
- }
- ensure_equals("unreported key", keys.size(), 0);
-
+
KeySet instances;
instances.insert(&one);
instances.insert(&two);
instances.insert(&three);
- {
- Unkeyed::LLInstanceTrackerScopedGuard guard;
- for (Unkeyed::instance_iter ii(guard.beginInstances()), iend(guard.endInstances());
- ii != iend; ++ii)
+
+ for (Unkeyed::instance_iter ii(Unkeyed::beginInstances()), iend(Unkeyed::endInstances()); ii != iend; ++ii)
{
Unkeyed& ref = *ii;
ensure_equals("spurious instance", instances.erase(&ref), 1);
}
- }
+
ensure_equals("unreported instance", instances.size(), 0);
}
+
+ template<> template<>
+ void object::test<5>()
+ {
+ set_test_name("delete Keyed with outstanding instance_iter");
+ std::string what;
+ Keyed* keyed = new Keyed("one");
+ {
+ WrapLL_ERRS wrapper;
+ Keyed::instance_iter i(Keyed::beginInstances());
+ try
+ {
+ delete keyed;
+ }
+ catch (const WrapLL_ERRS::FatalException& e)
+ {
+ what = e.what();
+ }
+ }
+ ensure(! what.empty());
+ }
+
+ template<> template<>
+ void object::test<6>()
+ {
+ set_test_name("delete Keyed with outstanding key_iter");
+ std::string what;
+ Keyed* keyed = new Keyed("one");
+ {
+ WrapLL_ERRS wrapper;
+ Keyed::key_iter i(Keyed::beginKeys());
+ try
+ {
+ delete keyed;
+ }
+ catch (const WrapLL_ERRS::FatalException& e)
+ {
+ what = e.what();
+ }
+ }
+ ensure(! what.empty());
+ }
+
+ template<> template<>
+ void object::test<7>()
+ {
+ set_test_name("delete Unkeyed with outstanding instance_iter");
+ std::string what;
+ Unkeyed* unkeyed = new Unkeyed;
+ {
+ WrapLL_ERRS wrapper;
+ Unkeyed::instance_iter i(Unkeyed::beginInstances());
+ try
+ {
+ delete unkeyed;
+ }
+ catch (const WrapLL_ERRS::FatalException& e)
+ {
+ what = e.what();
+ }
+ }
+ ensure(! what.empty());
+ }
} // namespace tut
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 7b4c7d6a48..72322c3b72 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -25,35 +25,293 @@
* $/LicenseInfo$
*/
-#if !LL_WINDOWS
+
+#include "linden_common.h"
+
+#if LL_WINDOWS
+#include <winsock2.h>
+typedef U32 uint32_t;
+#include <process.h>
+#include <io.h>
+#else
+#include <unistd.h>
#include <netinet/in.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include "llprocesslauncher.h"
#endif
-#include "linden_common.h"
+#include <sstream>
+
+/*==========================================================================*|
+// Whoops, seems Linden's Boost package and the viewer are built with
+// different settings of VC's /Zc:wchar_t switch! Using Boost.Filesystem
+// pathname operations produces Windows link errors:
+// unresolved external symbol "private: static class std::codecvt<unsigned short,
+// char,int> const * & __cdecl boost::filesystem3::path::wchar_t_codecvt_facet()"
+// unresolved external symbol "void __cdecl boost::filesystem3::path_traits::convert()"
+// See:
+// http://boost.2283326.n4.nabble.com/filesystem-v3-unicode-and-std-codecvt-linker-error-td3455549.html
+// which points to:
+// http://msdn.microsoft.com/en-us/library/dh8che7s%28v=VS.100%29.aspx
+
+// As we're not trying to preserve compatibility with old Boost.Filesystem
+// code, but rather writing brand-new code, use the newest available
+// Filesystem API.
+#define BOOST_FILESYSTEM_VERSION 3
+#include "boost/filesystem.hpp"
+#include "boost/filesystem/v3/fstream.hpp"
+|*==========================================================================*/
+#include "boost/range.hpp"
+#include "boost/foreach.hpp"
+#include "boost/function.hpp"
+#include "boost/lambda/lambda.hpp"
+#include "boost/lambda/bind.hpp"
+namespace lambda = boost::lambda;
+/*==========================================================================*|
+// Aaaarrgh, Linden's Boost package doesn't even include Boost.Iostreams!
+#include "boost/iostreams/stream.hpp"
+#include "boost/iostreams/device/file_descriptor.hpp"
+|*==========================================================================*/
+
#include "../llsd.h"
#include "../llsdserialize.h"
+#include "llsdutil.h"
#include "../llformat.h"
#include "../test/lltut.h"
+#include "stringize.h"
+std::vector<U8> string_to_vector(const std::string& str)
+{
+ return std::vector<U8>(str.begin(), str.end());
+}
-#if LL_WINDOWS
-#include <winsock2.h>
-typedef U32 uint32_t;
-#endif
+#if ! LL_WINDOWS
+// We want to call strerror_r(), but alarmingly, there are two different
+// variants. The one that returns int always populates the passed buffer
+// (except in case of error), whereas the other one always returns a valid
+// char* but might or might not populate the passed buffer. How do we know
+// which one we're getting? Define adapters for each and let the compiler
+// select the applicable adapter.
-std::vector<U8> string_to_vector(std::string str)
+// strerror_r() returns char*
+std::string message_from(int /*orig_errno*/, const char* /*buffer*/, const char* strerror_ret)
{
- // bc LLSD can't...
- size_t len = (size_t)str.length();
- std::vector<U8> v(len);
- for (size_t i = 0; i < len ; i++)
- {
- v[i] = str[i];
- }
- return v;
+ return strerror_ret;
}
+// strerror_r() returns int
+std::string message_from(int orig_errno, const char* buffer, int strerror_ret)
+{
+ if (strerror_ret == 0)
+ {
+ return buffer;
+ }
+ // Here strerror_r() has set errno. Since strerror_r() has already failed,
+ // seems like a poor bet to call it again to diagnose its own error...
+ int stre_errno = errno;
+ if (stre_errno == ERANGE)
+ {
+ return STRINGIZE("strerror_r() can't explain errno " << orig_errno
+ << " (buffer too small)");
+ }
+ if (stre_errno == EINVAL)
+ {
+ return STRINGIZE("unknown errno " << orig_errno);
+ }
+ // Here we don't even understand the errno from strerror_r()!
+ return STRINGIZE("strerror_r() can't explain errno " << orig_errno
+ << " (error " << stre_errno << ')');
+}
+#endif // ! LL_WINDOWS
+
+// boost::filesystem::temp_directory_path() isn't yet in Boost 1.45! :-(
+std::string temp_directory_path()
+{
+#if LL_WINDOWS
+ char buffer[4096];
+ GetTempPathA(sizeof(buffer), buffer);
+ return buffer;
+
+#else // LL_DARWIN, LL_LINUX
+ static const char* vars[] = { "TMPDIR", "TMP", "TEMP", "TEMPDIR" };
+ BOOST_FOREACH(const char* var, vars)
+ {
+ const char* found = getenv(var);
+ if (found)
+ return found;
+ }
+ return "/tmp";
+#endif // LL_DARWIN, LL_LINUX
+}
+
+// Windows presents a kinda sorta compatibility layer. Code to the yucky
+// Windows names because they're less likely than the Posix names to collide
+// with any other names in this source.
+#if LL_WINDOWS
+#define _remove DeleteFileA
+#else // ! LL_WINDOWS
+#define _open open
+#define _write write
+#define _close close
+#define _remove remove
+#endif // ! LL_WINDOWS
+
+// Create a text file with specified content "somewhere in the
+// filesystem," cleaning up when it goes out of scope.
+class NamedTempFile
+{
+public:
+ // Function that accepts an ostream ref and (presumably) writes stuff to
+ // it, e.g.:
+ // (lambda::_1 << "the value is " << 17 << '\n')
+ typedef boost::function<void(std::ostream&)> Streamer;
+
+ NamedTempFile(const std::string& ext, const std::string& content):
+ mPath(temp_directory_path())
+ {
+ createFile(ext, lambda::_1 << content);
+ }
+
+ // Disambiguate when passing string literal
+ NamedTempFile(const std::string& ext, const char* content):
+ mPath(temp_directory_path())
+ {
+ createFile(ext, lambda::_1 << content);
+ }
+
+ NamedTempFile(const std::string& ext, const Streamer& func):
+ mPath(temp_directory_path())
+ {
+ createFile(ext, func);
+ }
+
+ ~NamedTempFile()
+ {
+ _remove(mPath.c_str());
+ }
+
+ std::string getName() const { return mPath; }
+
+private:
+ void createFile(const std::string& ext, const Streamer& func)
+ {
+ // Silly maybe, but use 'ext' as the name prefix. Strip off a leading
+ // '.' if present.
+ int pfx_offset = ((! ext.empty()) && ext[0] == '.')? 1 : 0;
+
+#if ! LL_WINDOWS
+ // Make sure mPath ends with a directory separator, if it doesn't already.
+ if (mPath.empty() ||
+ ! (mPath[mPath.length() - 1] == '\\' || mPath[mPath.length() - 1] == '/'))
+ {
+ mPath.append("/");
+ }
+
+ // mkstemp() accepts and modifies a char* template string. Generate
+ // the template string, then copy to modifiable storage.
+ // mkstemp() requires its template string to end in six X's.
+ mPath += ext.substr(pfx_offset) + "XXXXXX";
+ // Copy to vector<char>
+ std::vector<char> pathtemplate(mPath.begin(), mPath.end());
+ // append a nul byte for classic-C semantics
+ pathtemplate.push_back('\0');
+ // std::vector promises that a pointer to the 0th element is the same
+ // as a pointer to a contiguous classic-C array
+ int fd(mkstemp(&pathtemplate[0]));
+ if (fd == -1)
+ {
+ // The documented errno values (http://linux.die.net/man/3/mkstemp)
+ // are used in a somewhat unusual way, so provide context-specific
+ // errors.
+ if (errno == EEXIST)
+ {
+ LL_ERRS("NamedTempFile") << "mkstemp(\"" << mPath
+ << "\") could not create unique file " << LL_ENDL;
+ }
+ if (errno == EINVAL)
+ {
+ LL_ERRS("NamedTempFile") << "bad mkstemp() file path template '"
+ << mPath << "'" << LL_ENDL;
+ }
+ // Shrug, something else
+ int mkst_errno = errno;
+ char buffer[256];
+ LL_ERRS("NamedTempFile") << "mkstemp(\"" << mPath << "\") failed: "
+ << message_from(mkst_errno, buffer,
+ strerror_r(mkst_errno, buffer, sizeof(buffer)))
+ << LL_ENDL;
+ }
+ // mkstemp() seems to have worked! Capture the modified filename.
+ // Avoid the nul byte we appended.
+ mPath.assign(pathtemplate.begin(), (pathtemplate.end()-1));
+
+/*==========================================================================*|
+ // Define an ostream on the open fd. Tell it to close fd on destruction.
+ boost::iostreams::stream<boost::iostreams::file_descriptor_sink>
+ out(fd, boost::iostreams::close_handle);
+|*==========================================================================*/
+
+ // Write desired content.
+ std::ostringstream out;
+ // Stream stuff to it.
+ func(out);
+
+ std::string data(out.str());
+ int written(_write(fd, data.c_str(), data.length()));
+ int closed(_close(fd));
+ llassert_always(written == data.length() && closed == 0);
+
+#else // LL_WINDOWS
+ // GetTempFileName() is documented to require a MAX_PATH buffer.
+ char tempname[MAX_PATH];
+ // Use 'ext' as filename prefix, but skip leading '.' if any.
+ // The 0 param is very important: requests iterating until we get a
+ // unique name.
+ if (0 == GetTempFileNameA(mPath.c_str(), ext.c_str() + pfx_offset, 0, tempname))
+ {
+ // I always have to look up this call... :-P
+ LPSTR msgptr;
+ FormatMessageA(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ LPSTR(&msgptr), // have to cast (char**) to (char*)
+ 0, NULL );
+ LL_ERRS("NamedTempFile") << "GetTempFileName(\"" << mPath << "\", \""
+ << (ext.c_str() + pfx_offset) << "\") failed: "
+ << msgptr << LL_ENDL;
+ LocalFree(msgptr);
+ }
+ // GetTempFileName() appears to have worked! Capture the actual
+ // filename.
+ mPath = tempname;
+ // Open the file and stream content to it. Destructor will close.
+ std::ofstream out(tempname);
+ func(out);
+
+#endif // LL_WINDOWS
+ }
+
+ void peep()
+ {
+ std::cout << "File '" << mPath << "' contains:\n";
+ std::ifstream reader(mPath.c_str());
+ std::string line;
+ while (std::getline(reader, line))
+ std::cout << line << '\n';
+ std::cout << "---\n";
+ }
+
+ std::string mPath;
+};
+
namespace tut
{
struct sd_xml_data
@@ -1494,5 +1752,223 @@ namespace tut
ensureBinaryAndNotation("map", test);
ensureBinaryAndXML("map", test);
}
-}
+ struct TestPythonCompatible
+ {
+ TestPythonCompatible():
+ // Note the peculiar insertion of __FILE__ into this string. Since
+ // this script is being written into a platform-dependent temp
+ // directory, we can't locate indra/lib/python relative to
+ // Python's __file__. Use __FILE__ instead, navigating relative
+ // to this C++ source file. Use Python raw-string syntax so
+ // Windows pathname backslashes won't mislead Python's string
+ // scanner.
+ import_llsd("import os.path\n"
+ "import sys\n"
+ "sys.path.insert(0,\n"
+ " os.path.join(os.path.dirname(r'" __FILE__ "'),\n"
+ " os.pardir, os.pardir, 'lib', 'python'))\n"
+ "try:\n"
+ " from llbase import llsd\n"
+ "except ImportError:\n"
+ " from indra.base import llsd\n")
+ {}
+ ~TestPythonCompatible() {}
+
+ std::string import_llsd;
+
+ template <typename CONTENT>
+ void python(const std::string& desc, const CONTENT& script, int expect=0)
+ {
+ const char* PYTHON(getenv("PYTHON"));
+ ensure("Set $PYTHON to the Python interpreter", PYTHON);
+
+ NamedTempFile scriptfile(".py", script);
+
+#if LL_WINDOWS
+ std::string q("\"");
+ std::string qPYTHON(q + PYTHON + q);
+ std::string qscript(q + scriptfile.getName() + q);
+ int rc = _spawnl(_P_WAIT, PYTHON, qPYTHON.c_str(), qscript.c_str(), NULL);
+ if (rc == -1)
+ {
+ char buffer[256];
+ strerror_s(buffer, errno); // C++ can infer the buffer size! :-O
+ ensure(STRINGIZE("Couldn't run Python " << desc << "script: " << buffer), false);
+ }
+ else
+ {
+ ensure_equals(STRINGIZE(desc << " script terminated with rc " << rc), rc, expect);
+ }
+
+#else // LL_DARWIN, LL_LINUX
+ LLProcessLauncher py;
+ py.setExecutable(PYTHON);
+ py.addArgument(scriptfile.getName());
+ ensure_equals(STRINGIZE("Couldn't launch " << desc << " script"), py.launch(), 0);
+ // Implementing timeout would mean messing with alarm() and
+ // catching SIGALRM... later maybe...
+ int status(0);
+ if (waitpid(py.getProcessID(), &status, 0) == -1)
+ {
+ int waitpid_errno(errno);
+ ensure_equals(STRINGIZE("Couldn't retrieve rc from " << desc << " script: "
+ "waitpid() errno " << waitpid_errno),
+ waitpid_errno, ECHILD);
+ }
+ else
+ {
+ if (WIFEXITED(status))
+ {
+ int rc(WEXITSTATUS(status));
+ ensure_equals(STRINGIZE(desc << " script terminated with rc " << rc),
+ rc, expect);
+ }
+ else if (WIFSIGNALED(status))
+ {
+ ensure(STRINGIZE(desc << " script terminated by signal " << WTERMSIG(status)),
+ false);
+ }
+ else
+ {
+ ensure(STRINGIZE(desc << " script produced impossible status " << status),
+ false);
+ }
+ }
+#endif
+ }
+ };
+
+ typedef tut::test_group<TestPythonCompatible> TestPythonCompatibleGroup;
+ typedef TestPythonCompatibleGroup::object TestPythonCompatibleObject;
+ TestPythonCompatibleGroup pycompat("LLSD serialize Python compatibility");
+
+ template<> template<>
+ void TestPythonCompatibleObject::test<1>()
+ {
+ set_test_name("verify python()");
+ python("hello",
+ "import sys\n"
+ "sys.exit(17)\n",
+ 17); // expect nonzero rc
+ }
+
+ template<> template<>
+ void TestPythonCompatibleObject::test<2>()
+ {
+ set_test_name("verify NamedTempFile");
+ python("platform",
+ "import sys\n"
+ "print 'Running on', sys.platform\n");
+ }
+
+ template<> template<>
+ void TestPythonCompatibleObject::test<3>()
+ {
+ set_test_name("verify sequence to Python");
+
+ LLSD cdata(LLSDArray(17)(3.14)
+ ("This string\n"
+ "has several\n"
+ "lines."));
+
+ const char pydata[] =
+ "def verify(iterable):\n"
+ " it = iter(iterable)\n"
+ " assert it.next() == 17\n"
+ " assert abs(it.next() - 3.14) < 0.01\n"
+ " assert it.next() == '''\\\n"
+ "This string\n"
+ "has several\n"
+ "lines.'''\n"
+ " try:\n"
+ " it.next()\n"
+ " except StopIteration:\n"
+ " pass\n"
+ " else:\n"
+ " assert False, 'Too many data items'\n";
+
+ // Create a something.llsd file containing 'data' serialized to
+ // notation. It's important to separate with newlines because Python's
+ // llsd module doesn't support parsing from a file stream, only from a
+ // string, so we have to know how much of the file to read into a
+ // string.
+ NamedTempFile file(".llsd",
+ // NamedTempFile's boost::function constructor
+ // takes a callable. To this callable it passes the
+ // std::ostream with which it's writing the
+ // NamedTempFile. This lambda-based expression
+ // first calls LLSD::Serialize() with that ostream,
+ // then streams a newline to it, etc.
+ (lambda::bind(LLSDSerialize::toNotation, cdata[0], lambda::_1),
+ lambda::_1 << '\n',
+ lambda::bind(LLSDSerialize::toNotation, cdata[1], lambda::_1),
+ lambda::_1 << '\n',
+ lambda::bind(LLSDSerialize::toNotation, cdata[2], lambda::_1),
+ lambda::_1 << '\n'));
+
+ python("read C++ notation",
+ lambda::_1 <<
+ import_llsd <<
+ "def parse_each(iterable):\n"
+ " for item in iterable:\n"
+ " yield llsd.parse(item)\n" <<
+ pydata <<
+ // Don't forget raw-string syntax for Windows pathnames.
+ "verify(parse_each(open(r'" << file.getName() << "')))\n");
+ }
+
+ template<> template<>
+ void TestPythonCompatibleObject::test<4>()
+ {
+ set_test_name("verify sequence from Python");
+
+ // Create an empty data file. This is just a placeholder for our
+ // script to write into. Create it to establish a unique name that
+ // we know.
+ NamedTempFile file(".llsd", "");
+
+ python("write Python notation",
+ lambda::_1 <<
+ "from __future__ import with_statement\n" <<
+ import_llsd <<
+ "DATA = [\n"
+ " 17,\n"
+ " 3.14,\n"
+ " '''\\\n"
+ "This string\n"
+ "has several\n"
+ "lines.''',\n"
+ "]\n"
+ // Don't forget raw-string syntax for Windows pathnames.
+ // N.B. Using 'print' implicitly adds newlines.
+ "with open(r'" << file.getName() << "', 'w') as f:\n"
+ " for item in DATA:\n"
+ " print >>f, llsd.format_notation(item)\n");
+
+ std::ifstream inf(file.getName().c_str());
+ LLSD item;
+ // Notice that we're not doing anything special to parse out the
+ // newlines: LLSDSerialize::fromNotation ignores them. While it would
+ // seem they're not strictly necessary, going in this direction, we
+ // want to ensure that notation-separated-by-newlines works in both
+ // directions -- since in practice, a given file might be read by
+ // either language.
+ ensure_equals("Failed to read LLSD::Integer from Python",
+ LLSDSerialize::fromNotation(item, inf, LLSDSerialize::SIZE_UNLIMITED),
+ 1);
+ ensure_equals(item.asInteger(), 17);
+ ensure_equals("Failed to read LLSD::Real from Python",
+ LLSDSerialize::fromNotation(item, inf, LLSDSerialize::SIZE_UNLIMITED),
+ 1);
+ ensure_approximately_equals("Bad LLSD::Real value from Python",
+ item.asReal(), 3.14, 7); // 7 bits ~= 0.01
+ ensure_equals("Failed to read LLSD::String from Python",
+ LLSDSerialize::fromNotation(item, inf, LLSDSerialize::SIZE_UNLIMITED),
+ 1);
+ ensure_equals(item.asString(),
+ "This string\n"
+ "has several\n"
+ "lines.");
+ }
+}
diff --git a/indra/llcommon/tests/llsingleton_test.cpp b/indra/llcommon/tests/llsingleton_test.cpp
new file mode 100644
index 0000000000..385289aefe
--- /dev/null
+++ b/indra/llcommon/tests/llsingleton_test.cpp
@@ -0,0 +1,76 @@
+/**
+ * @file llsingleton_test.cpp
+ * @date 2011-08-11
+ * @brief Unit test for the LLSingleton class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llsingleton.h"
+#include "../test/lltut.h"
+
+namespace tut
+{
+ struct singleton
+ {
+ // We need a class created with the LLSingleton template to test with.
+ class LLSingletonTest: public LLSingleton<LLSingletonTest>
+ {
+
+ };
+ };
+
+ typedef test_group<singleton> singleton_t;
+ typedef singleton_t::object singleton_object_t;
+ tut::singleton_t tut_singleton("LLSingleton");
+
+ template<> template<>
+ void singleton_object_t::test<1>()
+ {
+
+ }
+ template<> template<>
+ void singleton_object_t::test<2>()
+ {
+ LLSingletonTest* singleton_test = LLSingletonTest::getInstance();
+ ensure(singleton_test);
+ }
+ template<> template<>
+ void singleton_object_t::test<3>()
+ {
+ //Construct the instance
+ LLSingletonTest::getInstance();
+ ensure(LLSingletonTest::instanceExists());
+
+ //Delete the instance
+ LLSingletonTest::deleteSingleton();
+ ensure(LLSingletonTest::destroyed());
+ ensure(!LLSingletonTest::instanceExists());
+
+ //Construct it again.
+ LLSingletonTest* singleton_test = LLSingletonTest::getInstance();
+ ensure(singleton_test);
+ ensure(LLSingletonTest::instanceExists());
+ }
+}
diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp
index 304e91ed92..6a1cbf652a 100644
--- a/indra/llcommon/tests/llstring_test.cpp
+++ b/indra/llcommon/tests/llstring_test.cpp
@@ -624,6 +624,14 @@ namespace tut
subcount = LLStringUtil::format(s, fmt_map);
ensure_equals("LLStringUtil::format: Assorted Test2 result", s, "?Am I not a long string?short[A]bbbaaaba[A]");
ensure_equals("LLStringUtil::format: Assorted Test2 result count", 9, subcount);
+
+ // Test on nested brackets
+ std::string srcs6 = "[[TRICK1]][[A]][[B]][[AAA]][[BBB]][[TRICK2]][[KEYLONGER]][[KEYSHORTER]]?[[DELETE]]";
+ s = srcs6;
+ subcount = LLStringUtil::format(s, fmt_map);
+ ensure_equals("LLStringUtil::format: Assorted Test2 result", s, "[[A]][a][b][aaa][bbb][[A]][short][Am I not a long string?]?[]");
+ ensure_equals("LLStringUtil::format: Assorted Test2 result count", 9, subcount);
+
// Test an assorted substitution
std::string srcs8 = "foo[DELETE]bar?";
diff --git a/indra/llcommon/tests/setpython.py b/indra/llcommon/tests/setpython.py
new file mode 100644
index 0000000000..df7b90428e
--- /dev/null
+++ b/indra/llcommon/tests/setpython.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+"""\
+@file setpython.py
+@author Nat Goodspeed
+@date 2011-07-13
+@brief Set PYTHON environment variable for tests that care.
+
+$LicenseInfo:firstyear=2011&license=viewerlgpl$
+Copyright (c) 2011, Linden Research, Inc.
+$/LicenseInfo$
+"""
+
+import os
+import sys
+import subprocess
+
+if __name__ == "__main__":
+ os.environ["PYTHON"] = sys.executable
+ sys.exit(subprocess.call(sys.argv[1:]))
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index 68e45f36e4..3461aa3e6c 100644
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -31,15 +31,18 @@
#include "llcrashlogger.h"
#include "linden_common.h"
#include "llstring.h"
-#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
+#include "indra_constants.h" // CRASH_BEHAVIOR_...
#include "llerror.h"
+#include "llerrorcontrol.h"
#include "lltimer.h"
#include "lldir.h"
+#include "llfile.h"
#include "llsdserialize.h"
#include "lliopipe.h"
#include "llpumpio.h"
#include "llhttpclient.h"
#include "llsdserialize.h"
+#include "llproxy.h"
LLPumpIO* gServicePump;
BOOL gBreak = false;
@@ -54,7 +57,7 @@ public:
virtual void error(U32 status, const std::string& reason)
{
- gBreak = true;
+ gBreak = true;
}
virtual void result(const LLSD& content)
@@ -64,21 +67,8 @@ public:
}
};
-bool LLCrashLoggerText::mainLoop()
-{
- std::cout << "Entering main loop" << std::endl;
- sendCrashLogs();
- return true;
-}
-
-void LLCrashLoggerText::updateApplication(const std::string& message)
-{
- LLCrashLogger::updateApplication(message);
- std::cout << message << std::endl;
-}
-
LLCrashLogger::LLCrashLogger() :
- mCrashBehavior(CRASH_BEHAVIOR_ASK),
+ mCrashBehavior(CRASH_BEHAVIOR_ALWAYS_SEND),
mCrashInPreviousExec(false),
mCrashSettings("CrashSettings"),
mSentCrashLogs(false),
@@ -281,26 +271,48 @@ LLSD LLCrashLogger::constructPostData()
return mCrashInfo;
}
+const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
+
S32 LLCrashLogger::loadCrashBehaviorSetting()
{
+ // First check user_settings (in the user's home dir)
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
+ if (! mCrashSettings.loadFromFile(filename))
+ {
+ // Next check app_settings (in the SL program dir)
+ std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, CRASH_SETTINGS_FILE);
+ mCrashSettings.loadFromFile(filename);
+ }
- mCrashSettings.loadFromFile(filename);
-
- S32 value = mCrashSettings.getS32(CRASH_BEHAVIOR_SETTING);
-
- if (value < CRASH_BEHAVIOR_ASK || CRASH_BEHAVIOR_NEVER_SEND < value) return CRASH_BEHAVIOR_ASK;
+ // If we didn't load any files above, this will return the default
+ S32 value = mCrashSettings.getS32("CrashSubmitBehavior");
+
+ // Whatever value we got, make sure it's valid
+ switch (value)
+ {
+ case CRASH_BEHAVIOR_NEVER_SEND:
+ return CRASH_BEHAVIOR_NEVER_SEND;
+ case CRASH_BEHAVIOR_ALWAYS_SEND:
+ return CRASH_BEHAVIOR_ALWAYS_SEND;
+ }
- return value;
+ return CRASH_BEHAVIOR_ASK;
}
bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
{
- if (crash_behavior != CRASH_BEHAVIOR_ASK && crash_behavior != CRASH_BEHAVIOR_ALWAYS_SEND) return false;
+ switch (crash_behavior)
+ {
+ case CRASH_BEHAVIOR_ASK:
+ case CRASH_BEHAVIOR_NEVER_SEND:
+ case CRASH_BEHAVIOR_ALWAYS_SEND:
+ break;
+ default:
+ return false;
+ }
- mCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior);
+ mCrashSettings.setS32("CrashSubmitBehavior", crash_behavior);
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
-
mCrashSettings.saveToFile(filename, FALSE);
return true;
@@ -309,14 +321,13 @@ bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg, int retries, int timeout)
{
gBreak = false;
- std::string status_message;
for(int i = 0; i < retries; ++i)
{
- status_message = llformat("%s, try %d...", msg.c_str(), i+1);
+ updateApplication(llformat("%s, try %d...", msg.c_str(), i+1));
LLHTTPClient::post(host, data, new LLCrashLoggerResponder(), timeout);
while(!gBreak)
{
- updateApplication(status_message);
+ updateApplication(); // No new message, just pump the IO
}
if(gSent)
{
@@ -336,7 +347,7 @@ bool LLCrashLogger::sendCrashLogs()
updateApplication("Sending reports...");
std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- "SecondLifeCrashReport");
+ "SecondLifeCrashReport");
std::string report_file = dump_path + ".log";
std::ofstream out_file(report_file.c_str());
@@ -365,23 +376,37 @@ void LLCrashLogger::updateApplication(const std::string& message)
{
gServicePump->pump();
gServicePump->callback();
+ if (!message.empty()) llinfos << message << llendl;
}
bool LLCrashLogger::init()
{
- LLCurl::initClass();
+ LLCurl::initClass(false);
// We assume that all the logs we're looking for reside on the current drive
gDirUtilp->initAppDirs("SecondLife");
+ LLError::initForApplication(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
+
// Default to the product name "Second Life" (this is overridden by the -name argument)
mProductName = "Second Life";
+
+ // Rename current log file to ".old"
+ std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log.old");
+ std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "crashreport.log");
+ LLFile::rename(log_file.c_str(), old_log_file.c_str());
+
+ // Set the log file to crashreport.log
+ LLError::logToFile(log_file);
- mCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes "
- "(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)");
+ mCrashSettings.declareS32("CrashSubmitBehavior", CRASH_BEHAVIOR_ALWAYS_SEND,
+ "Controls behavior when viewer crashes "
+ "(0 = ask before sending crash report, "
+ "1 = always send crash report, "
+ "2 = never send crash report)");
- llinfos << "Loading crash behavior setting" << llendl;
- mCrashBehavior = loadCrashBehaviorSetting();
+ // llinfos << "Loading crash behavior setting" << llendl;
+ // mCrashBehavior = loadCrashBehaviorSetting();
// If user doesn't want to send, bail out
if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND)
@@ -394,12 +419,19 @@ bool LLCrashLogger::init()
gServicePump->prime(gAPRPoolp);
LLHTTPClient::setPump(*gServicePump);
- //If we've opened the crash logger, assume we can delete the marker file if it exists
+ //If we've opened the crash logger, assume we can delete the marker file if it exists
if( gDirUtilp )
{
- std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
+ std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.exec_marker");
LLAPRFile::remove( marker_file );
}
return true;
}
+
+// For cleanup code common to all platforms.
+void LLCrashLogger::commonCleanup()
+{
+ LLProxy::cleanupClass();
+}
diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h
index a5daa74247..1510d7e0b3 100644
--- a/indra/llcrashlogger/llcrashlogger.h
+++ b/indra/llcrashlogger/llcrashlogger.h
@@ -48,7 +48,8 @@ public:
virtual void updateApplication(const std::string& message = LLStringUtil::null);
virtual bool init();
virtual bool mainLoop() = 0;
- virtual bool cleanup() { return true; }
+ virtual bool cleanup() = 0;
+ void commonCleanup();
void setUserText(const std::string& text) { mCrashInfo["UserNotes"] = text; }
S32 getCrashBehavior() { return mCrashBehavior; }
bool runCrashLogPost(std::string host, LLSD data, std::string msg, int retries, int timeout);
@@ -66,15 +67,4 @@ protected:
bool mSentCrashLogs;
};
-class LLCrashLoggerText : public LLCrashLogger
-{
-public:
- LLCrashLoggerText(void) {}
- ~LLCrashLoggerText(void) {}
-
- virtual bool mainLoop();
- virtual void updateApplication(const std::string& message = LLStringUtil::null);
-};
-
-
#endif //LLCRASHLOGGER_H
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index f0d15d9607..c239e3df88 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -39,6 +39,7 @@
#include "llimagepng.h"
#include "llimagedxt.h"
#include "llimageworker.h"
+#include "llmemory.h"
//---------------------------------------------------------------------------
// LLImage
@@ -47,11 +48,14 @@
//static
std::string LLImage::sLastErrorMessage;
LLMutex* LLImage::sMutex = NULL;
+LLPrivateMemoryPool* LLImageBase::sPrivatePoolp = NULL ;
//static
void LLImage::initClass()
{
sMutex = new LLMutex(NULL);
+
+ LLImageBase::createPrivatePool() ;
}
//static
@@ -59,6 +63,8 @@ void LLImage::cleanupClass()
{
delete sMutex;
sMutex = NULL;
+
+ LLImageBase::destroyPrivatePool() ;
}
//static
@@ -97,6 +103,25 @@ LLImageBase::~LLImageBase()
deleteData(); // virtual
}
+//static
+void LLImageBase::createPrivatePool()
+{
+ if(!sPrivatePoolp)
+ {
+ sPrivatePoolp = LLPrivateMemoryPoolManager::getInstance()->newPool(LLPrivateMemoryPool::STATIC_THREADED) ;
+ }
+}
+
+//static
+void LLImageBase::destroyPrivatePool()
+{
+ if(sPrivatePoolp)
+ {
+ LLPrivateMemoryPoolManager::getInstance()->deletePool(sPrivatePoolp) ;
+ sPrivatePoolp = NULL ;
+ }
+}
+
// virtual
void LLImageBase::dump()
{
@@ -130,7 +155,7 @@ void LLImageBase::sanityCheck()
// virtual
void LLImageBase::deleteData()
{
- delete[] mData;
+ FREE_MEM(sPrivatePoolp, mData) ;
mData = NULL;
mDataSize = 0;
}
@@ -167,7 +192,7 @@ U8* LLImageBase::allocateData(S32 size)
{
deleteData(); // virtual
mBadBufferAllocation = false ;
- mData = new U8[size];
+ mData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!mData)
{
llwarns << "allocate image data: " << size << llendl;
@@ -185,7 +210,7 @@ U8* LLImageBase::allocateData(S32 size)
U8* LLImageBase::reallocateData(S32 size)
{
LLMemType mt1(mMemType);
- U8 *new_datap = new U8[size];
+ U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!new_datap)
{
llwarns << "Out of memory in LLImageBase::reallocateData" << llendl;
@@ -195,7 +220,7 @@ U8* LLImageBase::reallocateData(S32 size)
{
S32 bytes = llmin(mDataSize, size);
memcpy(new_datap, mData, bytes); /* Flawfinder: ignore */
- delete[] mData;
+ FREE_MEM(sPrivatePoolp, mData) ;
}
mData = new_datap;
mDataSize = size;
@@ -341,6 +366,7 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components)
return TRUE;
}
+#if 0
U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
{
LLMemType mt1(mMemType);
@@ -361,6 +387,7 @@ U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
}
return data;
}
+#endif
BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height,
const U8 *data, U32 stride, BOOL reverse_y)
@@ -830,6 +857,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
}
}
+#if 0
//scale down image by not blending a pixel with its neighbors.
BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
{
@@ -853,7 +881,7 @@ BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
ratio_x -= 1.0f ;
ratio_y -= 1.0f ;
- U8* new_data = new U8[new_data_size] ;
+ U8* new_data = allocateMemory(new_data_size) ;
llassert_always(new_data != NULL) ;
U8* old_data = getData() ;
@@ -875,6 +903,7 @@ BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
return TRUE ;
}
+#endif
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
{
@@ -1506,6 +1535,7 @@ void LLImageFormatted::setData(U8 *data, S32 size)
{
deleteData();
setDataAndSize(data, size); // Access private LLImageBase members
+
sGlobalFormattedMemory += getDataSize();
}
}
@@ -1524,7 +1554,7 @@ void LLImageFormatted::appendData(U8 *data, S32 size)
S32 newsize = cursize + size;
reallocateData(newsize);
memcpy(getData() + cursize, data, size);
- delete[] data;
+ FREE_MEM(LLImageBase::getPrivatePool(), data);
}
}
}
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index c464c3b2b6..4469c9e860 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -29,7 +29,6 @@
#include "lluuid.h"
#include "llstring.h"
-//#include "llmemory.h"
#include "llthread.h"
#include "llmemtype.h"
@@ -69,6 +68,7 @@ const S32 MAX_IMG_PACKET_SIZE = 1000;
class LLImageFormatted;
class LLImageRaw;
class LLColor4U;
+class LLPrivateMemoryPool;
typedef enum e_image_codec
{
@@ -140,7 +140,7 @@ public:
protected:
// special accessor to allow direct setting of mData and mDataSize by LLImageFormatted
- void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; }
+ void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; }
public:
static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels);
@@ -151,6 +151,10 @@ public:
static EImageCodec getCodecFromExtension(const std::string& exten);
+ static void createPrivatePool() ;
+ static void destroyPrivatePool() ;
+ static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;}
+
private:
U8 *mData;
S32 mDataSize;
@@ -162,6 +166,8 @@ private:
bool mBadBufferAllocation ;
bool mAllowOverSize ;
+
+ static LLPrivateMemoryPool* sPrivatePoolp ;
public:
LLMemType::DeclareMemType& mMemType; // debug
};
@@ -185,7 +191,7 @@ public:
BOOL resize(U16 width, U16 height, S8 components);
- U8 * getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const;
+ //U8 * getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const;
BOOL setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height,
const U8 *data, U32 stride = 0, BOOL reverse_y = FALSE);
@@ -197,7 +203,7 @@ public:
void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE);
void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE);
BOOL scale( S32 new_width, S32 new_height, BOOL scale_image = TRUE );
- BOOL scaleDownWithoutBlending( S32 new_width, S32 new_height) ;
+ //BOOL scaleDownWithoutBlending( S32 new_width, S32 new_height) ;
// Fill the buffer with a constant color
void fill( const LLColor4U& color );
diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp
index 4bd3efddaa..34c6793522 100644
--- a/indra/llimage/llimagedxt.cpp
+++ b/indra/llimage/llimagedxt.cpp
@@ -26,6 +26,7 @@
#include "linden_common.h"
#include "llimagedxt.h"
+#include "llmemory.h"
//static
void LLImageDXT::checkMinWidthHeight(EFileFormat format, S32& width, S32& height)
@@ -429,7 +430,7 @@ bool LLImageDXT::convertToDXR()
S32 nmips = calcNumMips(width,height);
S32 total_bytes = getDataSize();
U8* olddata = getData();
- U8* newdata = new U8[total_bytes];
+ U8* newdata = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), total_bytes);
if (!newdata)
{
llerrs << "Out of memory in LLImageDXT::convertToDXR()" << llendl;
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 44e6b89dd3..cc8cb66d73 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -29,6 +29,7 @@
#include "llmemtype.h"
#include "lltimer.h"
#include "llmath.h"
+#include "llmemory.h"
typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)();
typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*);
@@ -385,14 +386,14 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename)
}
else
{
- U8 *data = new U8[file_size];
+ U8 *data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), file_size);
apr_size_t bytes_read = file_size;
apr_status_t s = apr_file_read(apr_file, data, &bytes_read); // modifies bytes_read
infile.close() ;
if (s != APR_SUCCESS || (S32)bytes_read != file_size)
{
- delete[] data;
+ FREE_MEM(LLImageBase::getPrivatePool(), data);
setLastError("Unable to read entire file");
res = FALSE;
}
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index 35a764b111..e45c809e7e 100644
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
@@ -62,14 +62,14 @@ add_library (llinventory ${llinventory_SOURCE_FILES})
#add unit tests
if (LL_TESTS)
- INCLUDE(LLAddBuildTest)
- SET(llinventory_TEST_SOURCE_FILES
- # no real unit tests yet!
- )
- LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}")
+ INCLUDE(LLAddBuildTest)
+ SET(llinventory_TEST_SOURCE_FILES
+ # no real unit tests yet!
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}")
- #set(TEST_DEBUG on)
- set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
- LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}")
- LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}")
+ #set(TEST_DEBUG on)
+ set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+ LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}")
+ LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}")
endif (LL_TESTS)
diff --git a/indra/llinventory/lleconomy.cpp b/indra/llinventory/lleconomy.cpp
index c6eaa6d3e1..d643ea6ed9 100644
--- a/indra/llinventory/lleconomy.cpp
+++ b/indra/llinventory/lleconomy.cpp
@@ -48,6 +48,31 @@ LLGlobalEconomy::LLGlobalEconomy()
LLGlobalEconomy::~LLGlobalEconomy()
{ }
+void LLGlobalEconomy::addObserver(LLEconomyObserver* observer)
+{
+ mObservers.push_back(observer);
+}
+
+void LLGlobalEconomy::removeObserver(LLEconomyObserver* observer)
+{
+ std::list<LLEconomyObserver*>::iterator it =
+ std::find(mObservers.begin(), mObservers.end(), observer);
+ if (it != mObservers.end())
+ {
+ mObservers.erase(it);
+ }
+}
+
+void LLGlobalEconomy::notifyObservers()
+{
+ for (std::list<LLEconomyObserver*>::iterator it = mObservers.begin();
+ it != mObservers.end();
+ ++it)
+ {
+ (*it)->onEconomyDataChange();
+ }
+}
+
// static
void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data)
{
@@ -88,6 +113,8 @@ void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy*
econ_data->setTeleportPriceExponent(f);
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i);
econ_data->setPriceGroupCreate(i);
+
+ econ_data->notifyObservers();
}
S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const
diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h
index cc6643f955..eb2ecf71ba 100644
--- a/indra/llinventory/lleconomy.h
+++ b/indra/llinventory/lleconomy.h
@@ -31,6 +31,16 @@
class LLMessageSystem;
class LLVector3;
+/**
+ * Register an observer to be notified of economy data updates coming from server.
+ */
+class LLEconomyObserver
+{
+public:
+ virtual ~LLEconomyObserver() {}
+ virtual void onEconomyDataChange() = 0;
+};
+
class LLGlobalEconomy
{
public:
@@ -46,6 +56,10 @@ public:
virtual void print();
+ void addObserver(LLEconomyObserver* observer);
+ void removeObserver(LLEconomyObserver* observer);
+ void notifyObservers();
+
static void processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data);
S32 calculateTeleportCost(F32 distance) const;
@@ -89,6 +103,8 @@ private:
S32 mTeleportMinPrice;
F32 mTeleportPriceExponent;
S32 mPriceGroupCreate;
+
+ std::list<LLEconomyObserver*> mObservers;
};
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index a3caf79519..76760aa414 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1034,8 +1034,11 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
}
+LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
+
bool LLInventoryItem::fromLLSD(const LLSD& sd)
{
+ LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE);
mInventoryType = LLInventoryType::IT_NONE;
mAssetUUID.setNull();
std::string w;
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp
index d2bba21648..8282d79b67 100644
--- a/indra/llinventory/llinventorytype.cpp
+++ b/indra/llinventory/llinventorytype.cpp
@@ -84,6 +84,7 @@ LLInventoryDictionary::LLInventoryDictionary()
addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION));
addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE));
addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH));
+ addEntry(LLInventoryType::IT_WIDGET, new InventoryEntry("widget", "widget", 1, LLAssetType::AT_WIDGET));
}
@@ -134,7 +135,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
LLInventoryType::IT_NONE, // 37 AT_NONE
LLInventoryType::IT_NONE, // 38 AT_NONE
LLInventoryType::IT_NONE, // 39 AT_NONE
- LLInventoryType::IT_NONE, // 40 AT_NONE
+ LLInventoryType::IT_WIDGET, // 40 AT_WIDGET
LLInventoryType::IT_NONE, // 41 AT_NONE
LLInventoryType::IT_NONE, // 42 AT_NONE
LLInventoryType::IT_NONE, // 43 AT_NONE
@@ -143,7 +144,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
LLInventoryType::IT_NONE, // 46 AT_NONE
LLInventoryType::IT_NONE, // 47 AT_NONE
LLInventoryType::IT_NONE, // 48 AT_NONE
- LLInventoryType::IT_MESH // 49 AT_MESH
+ LLInventoryType::IT_MESH, // 49 AT_MESH
};
// static
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index 1a24e351ad..4d1e0db040 100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -62,7 +62,8 @@ public:
IT_ANIMATION = 19,
IT_GESTURE = 20,
IT_MESH = 22,
- IT_COUNT = 23,
+ IT_WIDGET = 23,
+ IT_COUNT = 24,
IT_NONE = -1
};
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index c95f922301..433076c7a9 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -1373,12 +1373,3 @@ LLParcel::ECategory category_ui_string_to_category(const std::string& s)
// is a distinct option from "None" and "Other"
return LLParcel::C_ANY;
}
-
-void LLParcel::updateQuota( const LLUUID& objectId, const ParcelQuota& quota )
-{
- if ( mID == objectId )
- {
- mQuota = quota;
- }
-}
-
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index ff35caab4c..e36d0b20d2 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -34,7 +34,6 @@
#include "llpermissions.h"
#include "lltimer.h"
#include "v3math.h"
-#include "llaccountingquota.h"
// Grid out of which parcels taken is stepped every 4 meters.
const F32 PARCEL_GRID_STEP_METERS = 4.f;
@@ -603,9 +602,6 @@ public:
BOOL getSellWithObjects() const { return (mParcelFlags & PF_SELL_PARCEL_OBJECTS) ? TRUE : FALSE; }
- void updateQuota( const LLUUID& objectId, const ParcelQuota& quota );
- const ParcelQuota& getQuota( void ) { return mQuota; }
-
protected:
LLUUID mID;
LLUUID mOwnerID;
@@ -681,7 +677,6 @@ protected:
BOOL mAllowGroupAVSounds;
BOOL mAllowAnyAVSounds;
- ParcelQuota mQuota;
public:
// HACK, make private
diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt
index 046629b514..bdac2eded7 100644
--- a/indra/llkdu/CMakeLists.txt
+++ b/indra/llkdu/CMakeLists.txt
@@ -30,7 +30,7 @@ set(llkdu_SOURCE_FILES
set(llkdu_HEADER_FILES
CMakeLists.txt
-
+
llimagej2ckdu.h
llkdumem.h
)
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index cd100cdf9f..b5e59c1ca3 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -75,10 +75,6 @@ set(llmath_HEADER_FILES
llvector4a.h
llvector4a.inl
llvector4logical.h
- llv4math.h
- llv4matrix3.h
- llv4matrix4.h
- llv4vector3.h
llvolume.h
llvolumemgr.h
llvolumeoctree.h
diff --git a/indra/llmath/llcalc.cpp b/indra/llmath/llcalc.cpp
index 597d0815fb..1b2d609b67 100644
--- a/indra/llmath/llcalc.cpp
+++ b/indra/llmath/llcalc.cpp
@@ -1,9 +1,26 @@
/*
* LLCalc.cpp
- * SecondLife
- *
- * Created by Aimee Walton on 28/09/2008.
- * Copyright 2008 Aimee Walton.
+ * Copyright 2008 Aimee Walton.
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2008, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*
*/
diff --git a/indra/llmath/llcalc.h b/indra/llmath/llcalc.h
index cc31950cb6..ceb9dce585 100644
--- a/indra/llmath/llcalc.h
+++ b/indra/llmath/llcalc.h
@@ -1,9 +1,26 @@
/*
* LLCalc.h
- * SecondLife
- *
- * Created by Aimee Walton on 28/09/2008.
* Copyright 2008 Aimee Walton.
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2008, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*
*/
diff --git a/indra/llmath/llcalcparser.cpp b/indra/llmath/llcalcparser.cpp
index fd55376fa9..b4ca320659 100644
--- a/indra/llmath/llcalcparser.cpp
+++ b/indra/llmath/llcalcparser.cpp
@@ -1,9 +1,26 @@
/*
* LLCalcParser.cpp
- * SecondLife
- *
- * Created by Aimee Walton on 28/09/2008.
* Copyright 2008 Aimee Walton.
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2008, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*
*/
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index 600e173661..bd9c8c2519 100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -1,9 +1,26 @@
/*
* LLCalcParser.h
- * SecondLife
- *
- * Created by Aimee Walton on 28/09/2008.
* Copyright 2008 Aimee Walton.
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2008, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*
*/
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index eea7c977fb..9297bcbac2 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -510,6 +510,13 @@ inline void ll_remove_outliers(std::vector<VEC_TYPE>& data, F32 k)
VEC_TYPE Q1 = data[data.size()/4];
VEC_TYPE Q3 = data[data.size()-data.size()/4-1];
+ if ((F32)(Q3-Q1) < 1.f)
+ {
+ // not enough variation to detect outliers
+ return;
+ }
+
+
VEC_TYPE min = (VEC_TYPE) ((F32) Q1-k * (F32) (Q3-Q1));
VEC_TYPE max = (VEC_TYPE) ((F32) Q3+k * (F32) (Q3-Q1));
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index e5ca47da69..3c1ae45d68 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -681,7 +681,7 @@ public:
if (lt != 0x7)
{
- OCT_ERRS << "!!! ELEMENT EXCEEDS RANGE OF SPATIAL PARTITION !!!" << llendl;
+ //OCT_ERRS << "!!! ELEMENT EXCEEDS RANGE OF SPATIAL PARTITION !!!" << llendl;
return false;
}
diff --git a/indra/llmath/llv4math.h b/indra/llmath/llv4math.h
deleted file mode 100644
index 5f403ba526..0000000000
--- a/indra/llmath/llv4math.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * @file llv4math.h
- * @brief LLV4* class header file - vector processor enabled math
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLV4MATH_H
-#define LL_LLV4MATH_H
-
-// *NOTE: We do not support SSE acceleration on Windows builds.
-// Our minimum specification for the viewer includes 1 GHz Athlon processors,
-// which covers the Athlon Thunderbird series that does not support SSE.
-//
-// Our header files include statements like this
-// const F32 HAVOK_TIMESTEP = 1.f / 45.f;
-// This creates "globals" that are included in each .obj file. If a single
-// .cpp file has SSE code generation turned on (eg, llviewerjointmesh_sse.cpp)
-// these globals will be initialized using SSE instructions. This causes SL
-// to crash before main() on processors without SSE. Untangling all these
-// headers/variables is too much work for the small performance gains of
-// vectorization.
-//
-// Therefore we only support vectorization on builds where the everything is
-// built with SSE or Altivec. See https://jira.secondlife.com/browse/VWR-1610
-// and https://jira.lindenlab.com/browse/SL-47720 for details.
-//
-// Sorry the code is such a mess. JC
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4MATH - GNUC
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#if LL_GNUC && __GNUC__ >= 4 && __SSE__
-
-#define LL_VECTORIZE 1
-
-#if LL_DARWIN
-
-#include <Accelerate/Accelerate.h>
-#include <xmmintrin.h>
-typedef vFloat V4F32;
-
-#else
-
-#include <xmmintrin.h>
-typedef float V4F32 __attribute__((vector_size(16)));
-
-#endif
-
-#endif
-#if LL_GNUC
-
-#define LL_LLV4MATH_ALIGN_PREFIX
-#define LL_LLV4MATH_ALIGN_POSTFIX __attribute__((aligned(16)))
-
-#endif
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4MATH - MSVC
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-// Only vectorize if the entire Windows build uses SSE.
-// _M_IX86_FP is set when SSE code generation is turned on, and I have
-// confirmed this in VS2003, VS2003 SP1, and VS2005. JC
-#if LL_MSVC && _M_IX86_FP
-
-#define LL_VECTORIZE 1
-
-#include <xmmintrin.h>
-
-typedef __m128 V4F32;
-
-#endif
-#if LL_MSVC
-
-#define LL_LLV4MATH_ALIGN_PREFIX __declspec(align(16))
-#define LL_LLV4MATH_ALIGN_POSTFIX
-
-#endif
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4MATH - default - no vectorization
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#if !LL_VECTORIZE
-
-#define LL_VECTORIZE 0
-
-struct V4F32 { F32 __pad__[4]; };
-
-inline F32 llv4lerp(F32 a, F32 b, F32 w) { return ( b - a ) * w + a; }
-
-#endif
-
-#ifndef LL_LLV4MATH_ALIGN_PREFIX
-# define LL_LLV4MATH_ALIGN_PREFIX
-#endif
-#ifndef LL_LLV4MATH_ALIGN_POSTFIX
-# define LL_LLV4MATH_ALIGN_POSTFIX
-#endif
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4MATH
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-
-#define LLV4_NUM_AXIS 4
-
-class LLV4Vector3;
-class LLV4Matrix3;
-class LLV4Matrix4;
-
-#endif
diff --git a/indra/llmath/llv4matrix3.h b/indra/llmath/llv4matrix3.h
deleted file mode 100644
index 270f5d7dae..0000000000
--- a/indra/llmath/llv4matrix3.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- * @file llviewerjointmesh.cpp
- * @brief LLV4* class header file - vector processor enabled math
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLV4MATRIX3_H
-#define LL_LLV4MATRIX3_H
-
-#include "llv4math.h"
-#include "llv4vector3.h"
-#include "m3math.h" // for operator LLMatrix3()
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix3
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-LL_LLV4MATH_ALIGN_PREFIX
-
-class LLV4Matrix3
-{
-public:
- union {
- F32 mMatrix[LLV4_NUM_AXIS][LLV4_NUM_AXIS];
- V4F32 mV[LLV4_NUM_AXIS];
- };
-
- void lerp(const LLV4Matrix3 &a, const LLV4Matrix3 &b, const F32 &w);
- void multiply(const LLVector3 &a, LLVector3& out) const;
- void multiply(const LLVector4 &a, LLV4Vector3& out) const;
- void multiply(const LLVector3 &a, LLV4Vector3& out) const;
-
- const LLV4Matrix3& transpose();
- const LLV4Matrix3& operator=(const LLMatrix3& a);
-
- operator LLMatrix3() const { return (reinterpret_cast<const LLMatrix4*>(const_cast<const F32*>(&mMatrix[0][0])))->getMat3(); }
-
- friend LLVector3 operator*(const LLVector3& a, const LLV4Matrix3& b);
-}
-
-LL_LLV4MATH_ALIGN_POSTFIX;
-
-
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix3 - SSE
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#if LL_VECTORIZE
-
-inline void LLV4Matrix3::lerp(const LLV4Matrix3 &a, const LLV4Matrix3 &b, const F32 &w)
-{
- __m128 vw = _mm_set1_ps(w);
- mV[VX] = _mm_add_ps(_mm_mul_ps(_mm_sub_ps(b.mV[VX], a.mV[VX]), vw), a.mV[VX]); // ( b - a ) * w + a
- mV[VY] = _mm_add_ps(_mm_mul_ps(_mm_sub_ps(b.mV[VY], a.mV[VY]), vw), a.mV[VY]);
- mV[VZ] = _mm_add_ps(_mm_mul_ps(_mm_sub_ps(b.mV[VZ], a.mV[VZ]), vw), a.mV[VZ]);
-}
-
-inline void LLV4Matrix3::multiply(const LLVector3 &a, LLVector3& o) const
-{
- LLV4Vector3 j;
- j.v = _mm_mul_ps(_mm_set1_ps(a.mV[VX]), mV[VX]); // ( ax * vx ) + ...
- j.v = _mm_add_ps(j.v , _mm_mul_ps(_mm_set1_ps(a.mV[VY]), mV[VY]));
- j.v = _mm_add_ps(j.v , _mm_mul_ps(_mm_set1_ps(a.mV[VZ]), mV[VZ]));
- o.setVec(j.mV);
-}
-
-inline void LLV4Matrix3::multiply(const LLVector4 &a, LLV4Vector3& o) const
-{
- o.v = _mm_mul_ps(_mm_set1_ps(a.mV[VX]), mV[VX]); // ( ax * vx ) + ...
- o.v = _mm_add_ps(o.v , _mm_mul_ps(_mm_set1_ps(a.mV[VY]), mV[VY]));
- o.v = _mm_add_ps(o.v , _mm_mul_ps(_mm_set1_ps(a.mV[VZ]), mV[VZ]));
-}
-
-inline void LLV4Matrix3::multiply(const LLVector3 &a, LLV4Vector3& o) const
-{
- o.v = _mm_mul_ps(_mm_set1_ps(a.mV[VX]), mV[VX]); // ( ax * vx ) + ...
- o.v = _mm_add_ps(o.v , _mm_mul_ps(_mm_set1_ps(a.mV[VY]), mV[VY]));
- o.v = _mm_add_ps(o.v , _mm_mul_ps(_mm_set1_ps(a.mV[VZ]), mV[VZ]));
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix3
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#else
-
-inline void LLV4Matrix3::lerp(const LLV4Matrix3 &a, const LLV4Matrix3 &b, const F32 &w)
-{
- mMatrix[VX][VX] = llv4lerp(a.mMatrix[VX][VX], b.mMatrix[VX][VX], w);
- mMatrix[VX][VY] = llv4lerp(a.mMatrix[VX][VY], b.mMatrix[VX][VY], w);
- mMatrix[VX][VZ] = llv4lerp(a.mMatrix[VX][VZ], b.mMatrix[VX][VZ], w);
-
- mMatrix[VY][VX] = llv4lerp(a.mMatrix[VY][VX], b.mMatrix[VY][VX], w);
- mMatrix[VY][VY] = llv4lerp(a.mMatrix[VY][VY], b.mMatrix[VY][VY], w);
- mMatrix[VY][VZ] = llv4lerp(a.mMatrix[VY][VZ], b.mMatrix[VY][VZ], w);
-
- mMatrix[VZ][VX] = llv4lerp(a.mMatrix[VZ][VX], b.mMatrix[VZ][VX], w);
- mMatrix[VZ][VY] = llv4lerp(a.mMatrix[VZ][VY], b.mMatrix[VZ][VY], w);
- mMatrix[VZ][VZ] = llv4lerp(a.mMatrix[VZ][VZ], b.mMatrix[VZ][VZ], w);
-}
-
-inline void LLV4Matrix3::multiply(const LLVector3 &a, LLVector3& o) const
-{
- o.setVec( a.mV[VX] * mMatrix[VX][VX] +
- a.mV[VY] * mMatrix[VY][VX] +
- a.mV[VZ] * mMatrix[VZ][VX],
-
- a.mV[VX] * mMatrix[VX][VY] +
- a.mV[VY] * mMatrix[VY][VY] +
- a.mV[VZ] * mMatrix[VZ][VY],
-
- a.mV[VX] * mMatrix[VX][VZ] +
- a.mV[VY] * mMatrix[VY][VZ] +
- a.mV[VZ] * mMatrix[VZ][VZ]);
-}
-
-inline void LLV4Matrix3::multiply(const LLVector4 &a, LLV4Vector3& o) const
-{
- o.setVec( a.mV[VX] * mMatrix[VX][VX] +
- a.mV[VY] * mMatrix[VY][VX] +
- a.mV[VZ] * mMatrix[VZ][VX],
-
- a.mV[VX] * mMatrix[VX][VY] +
- a.mV[VY] * mMatrix[VY][VY] +
- a.mV[VZ] * mMatrix[VZ][VY],
-
- a.mV[VX] * mMatrix[VX][VZ] +
- a.mV[VY] * mMatrix[VY][VZ] +
- a.mV[VZ] * mMatrix[VZ][VZ]);
-}
-
-inline void LLV4Matrix3::multiply(const LLVector3 &a, LLV4Vector3& o) const
-{
- o.setVec( a.mV[VX] * mMatrix[VX][VX] +
- a.mV[VY] * mMatrix[VY][VX] +
- a.mV[VZ] * mMatrix[VZ][VX],
-
- a.mV[VX] * mMatrix[VX][VY] +
- a.mV[VY] * mMatrix[VY][VY] +
- a.mV[VZ] * mMatrix[VZ][VY],
-
- a.mV[VX] * mMatrix[VX][VZ] +
- a.mV[VY] * mMatrix[VY][VZ] +
- a.mV[VZ] * mMatrix[VZ][VZ]);
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix3
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#endif
-
-inline const LLV4Matrix3& LLV4Matrix3::transpose()
-{
-#if LL_VECTORIZE && defined(_MM_TRANSPOSE4_PS)
- _MM_TRANSPOSE4_PS(mV[VX], mV[VY], mV[VZ], mV[VW]);
- return *this;
-#else
- F32 temp;
- temp = mMatrix[VX][VY]; mMatrix[VX][VY] = mMatrix[VY][VX]; mMatrix[VY][VX] = temp;
- temp = mMatrix[VX][VZ]; mMatrix[VX][VZ] = mMatrix[VZ][VX]; mMatrix[VZ][VX] = temp;
- temp = mMatrix[VY][VZ]; mMatrix[VY][VZ] = mMatrix[VZ][VY]; mMatrix[VZ][VY] = temp;
-#endif
- return *this;
-}
-
-inline const LLV4Matrix3& LLV4Matrix3::operator=(const LLMatrix3& a)
-{
- memcpy(mMatrix[VX], a.mMatrix[VX], sizeof(F32) * 3 );
- memcpy(mMatrix[VY], a.mMatrix[VY], sizeof(F32) * 3 );
- memcpy(mMatrix[VZ], a.mMatrix[VZ], sizeof(F32) * 3 );
- return *this;
-}
-
-inline LLVector3 operator*(const LLVector3& a, const LLV4Matrix3& b)
-{
- return LLVector3(
- a.mV[VX] * b.mMatrix[VX][VX] +
- a.mV[VY] * b.mMatrix[VY][VX] +
- a.mV[VZ] * b.mMatrix[VZ][VX],
-
- a.mV[VX] * b.mMatrix[VX][VY] +
- a.mV[VY] * b.mMatrix[VY][VY] +
- a.mV[VZ] * b.mMatrix[VZ][VY],
-
- a.mV[VX] * b.mMatrix[VX][VZ] +
- a.mV[VY] * b.mMatrix[VY][VZ] +
- a.mV[VZ] * b.mMatrix[VZ][VZ] );
-}
-
-#endif
diff --git a/indra/llmath/llv4matrix4.h b/indra/llmath/llv4matrix4.h
deleted file mode 100644
index 2eb49d9294..0000000000
--- a/indra/llmath/llv4matrix4.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/**
- * @file llviewerjointmesh.cpp
- * @brief LLV4* class header file - vector processor enabled math
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLV4MATRIX4_H
-#define LL_LLV4MATRIX4_H
-
-#include "llv4math.h"
-#include "llv4matrix3.h" // just for operator LLV4Matrix3()
-#include "llv4vector3.h"
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix4
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-LL_LLV4MATH_ALIGN_PREFIX
-
-class LLV4Matrix4
-{
-public:
- union {
- F32 mMatrix[LLV4_NUM_AXIS][LLV4_NUM_AXIS];
- V4F32 mV[LLV4_NUM_AXIS];
- };
-
- void lerp(const LLV4Matrix4 &a, const LLV4Matrix4 &b, const F32 &w);
- void multiply(const LLVector3 &a, LLVector3& o) const;
- void multiply(const LLVector3 &a, LLV4Vector3& o) const;
-
- const LLV4Matrix4& transpose();
- const LLV4Matrix4& translate(const LLVector3 &vec);
- const LLV4Matrix4& translate(const LLV4Vector3 &vec);
- const LLV4Matrix4& operator=(const LLMatrix4& a);
-
- operator LLMatrix4() const { return *(reinterpret_cast<const LLMatrix4*>(const_cast<const F32*>(&mMatrix[0][0]))); }
- operator LLV4Matrix3() const { return *(reinterpret_cast<const LLV4Matrix3*>(const_cast<const F32*>(&mMatrix[0][0]))); }
-
- friend LLVector3 operator*(const LLVector3 &a, const LLV4Matrix4 &b);
-}
-
-LL_LLV4MATH_ALIGN_POSTFIX;
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix4 - SSE
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#if LL_VECTORIZE
-
-inline void LLV4Matrix4::lerp(const LLV4Matrix4 &a, const LLV4Matrix4 &b, const F32 &w)
-{
- __m128 vw = _mm_set1_ps(w);
- mV[VX] = _mm_add_ps(_mm_mul_ps(_mm_sub_ps(b.mV[VX], a.mV[VX]), vw), a.mV[VX]); // ( b - a ) * w + a
- mV[VY] = _mm_add_ps(_mm_mul_ps(_mm_sub_ps(b.mV[VY], a.mV[VY]), vw), a.mV[VY]);
- mV[VZ] = _mm_add_ps(_mm_mul_ps(_mm_sub_ps(b.mV[VZ], a.mV[VZ]), vw), a.mV[VZ]);
- mV[VW] = _mm_add_ps(_mm_mul_ps(_mm_sub_ps(b.mV[VW], a.mV[VW]), vw), a.mV[VW]);
-}
-
-inline void LLV4Matrix4::multiply(const LLVector3 &a, LLVector3& o) const
-{
- LLV4Vector3 j;
- j.v = _mm_add_ps(mV[VW], _mm_mul_ps(_mm_set1_ps(a.mV[VX]), mV[VX])); // ( ax * vx ) + vw
- j.v = _mm_add_ps(j.v , _mm_mul_ps(_mm_set1_ps(a.mV[VY]), mV[VY]));
- j.v = _mm_add_ps(j.v , _mm_mul_ps(_mm_set1_ps(a.mV[VZ]), mV[VZ]));
- o.setVec(j.mV);
-}
-
-inline void LLV4Matrix4::multiply(const LLVector3 &a, LLV4Vector3& o) const
-{
- o.v = _mm_add_ps(mV[VW], _mm_mul_ps(_mm_set1_ps(a.mV[VX]), mV[VX])); // ( ax * vx ) + vw
- o.v = _mm_add_ps(o.v , _mm_mul_ps(_mm_set1_ps(a.mV[VY]), mV[VY]));
- o.v = _mm_add_ps(o.v , _mm_mul_ps(_mm_set1_ps(a.mV[VZ]), mV[VZ]));
-}
-
-inline const LLV4Matrix4& LLV4Matrix4::translate(const LLV4Vector3 &vec)
-{
- mV[VW] = _mm_add_ps(mV[VW], vec.v);
- return (*this);
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix4
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#else
-
-inline void LLV4Matrix4::lerp(const LLV4Matrix4 &a, const LLV4Matrix4 &b, const F32 &w)
-{
- mMatrix[VX][VX] = llv4lerp(a.mMatrix[VX][VX], b.mMatrix[VX][VX], w);
- mMatrix[VX][VY] = llv4lerp(a.mMatrix[VX][VY], b.mMatrix[VX][VY], w);
- mMatrix[VX][VZ] = llv4lerp(a.mMatrix[VX][VZ], b.mMatrix[VX][VZ], w);
-
- mMatrix[VY][VX] = llv4lerp(a.mMatrix[VY][VX], b.mMatrix[VY][VX], w);
- mMatrix[VY][VY] = llv4lerp(a.mMatrix[VY][VY], b.mMatrix[VY][VY], w);
- mMatrix[VY][VZ] = llv4lerp(a.mMatrix[VY][VZ], b.mMatrix[VY][VZ], w);
-
- mMatrix[VZ][VX] = llv4lerp(a.mMatrix[VZ][VX], b.mMatrix[VZ][VX], w);
- mMatrix[VZ][VY] = llv4lerp(a.mMatrix[VZ][VY], b.mMatrix[VZ][VY], w);
- mMatrix[VZ][VZ] = llv4lerp(a.mMatrix[VZ][VZ], b.mMatrix[VZ][VZ], w);
-
- mMatrix[VW][VX] = llv4lerp(a.mMatrix[VW][VX], b.mMatrix[VW][VX], w);
- mMatrix[VW][VY] = llv4lerp(a.mMatrix[VW][VY], b.mMatrix[VW][VY], w);
- mMatrix[VW][VZ] = llv4lerp(a.mMatrix[VW][VZ], b.mMatrix[VW][VZ], w);
-}
-
-inline void LLV4Matrix4::multiply(const LLVector3 &a, LLVector3& o) const
-{
- o.setVec( a.mV[VX] * mMatrix[VX][VX] +
- a.mV[VY] * mMatrix[VY][VX] +
- a.mV[VZ] * mMatrix[VZ][VX] +
- mMatrix[VW][VX],
-
- a.mV[VX] * mMatrix[VX][VY] +
- a.mV[VY] * mMatrix[VY][VY] +
- a.mV[VZ] * mMatrix[VZ][VY] +
- mMatrix[VW][VY],
-
- a.mV[VX] * mMatrix[VX][VZ] +
- a.mV[VY] * mMatrix[VY][VZ] +
- a.mV[VZ] * mMatrix[VZ][VZ] +
- mMatrix[VW][VZ]);
-}
-
-inline void LLV4Matrix4::multiply(const LLVector3 &a, LLV4Vector3& o) const
-{
- o.setVec( a.mV[VX] * mMatrix[VX][VX] +
- a.mV[VY] * mMatrix[VY][VX] +
- a.mV[VZ] * mMatrix[VZ][VX] +
- mMatrix[VW][VX],
-
- a.mV[VX] * mMatrix[VX][VY] +
- a.mV[VY] * mMatrix[VY][VY] +
- a.mV[VZ] * mMatrix[VZ][VY] +
- mMatrix[VW][VY],
-
- a.mV[VX] * mMatrix[VX][VZ] +
- a.mV[VY] * mMatrix[VY][VZ] +
- a.mV[VZ] * mMatrix[VZ][VZ] +
- mMatrix[VW][VZ]);
-}
-
-inline const LLV4Matrix4& LLV4Matrix4::translate(const LLV4Vector3 &vec)
-{
- mMatrix[3][0] += vec.mV[0];
- mMatrix[3][1] += vec.mV[1];
- mMatrix[3][2] += vec.mV[2];
- return (*this);
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Matrix4
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-#endif
-
-inline const LLV4Matrix4& LLV4Matrix4::operator=(const LLMatrix4& a)
-{
- memcpy(mMatrix, a.mMatrix, sizeof(F32) * 16 );
- return *this;
-}
-
-inline const LLV4Matrix4& LLV4Matrix4::transpose()
-{
-#if LL_VECTORIZE && defined(_MM_TRANSPOSE4_PS)
- _MM_TRANSPOSE4_PS(mV[VX], mV[VY], mV[VZ], mV[VW]);
-#else
- LLV4Matrix4 mat;
- mat.mMatrix[0][0] = mMatrix[0][0];
- mat.mMatrix[1][0] = mMatrix[0][1];
- mat.mMatrix[2][0] = mMatrix[0][2];
- mat.mMatrix[3][0] = mMatrix[0][3];
-
- mat.mMatrix[0][1] = mMatrix[1][0];
- mat.mMatrix[1][1] = mMatrix[1][1];
- mat.mMatrix[2][1] = mMatrix[1][2];
- mat.mMatrix[3][1] = mMatrix[1][3];
-
- mat.mMatrix[0][2] = mMatrix[2][0];
- mat.mMatrix[1][2] = mMatrix[2][1];
- mat.mMatrix[2][2] = mMatrix[2][2];
- mat.mMatrix[3][2] = mMatrix[2][3];
-
- mat.mMatrix[0][3] = mMatrix[3][0];
- mat.mMatrix[1][3] = mMatrix[3][1];
- mat.mMatrix[2][3] = mMatrix[3][2];
- mat.mMatrix[3][3] = mMatrix[3][3];
-
- *this = mat;
-#endif
- return *this;
-}
-
-inline const LLV4Matrix4& LLV4Matrix4::translate(const LLVector3 &vec)
-{
- mMatrix[3][0] += vec.mV[0];
- mMatrix[3][1] += vec.mV[1];
- mMatrix[3][2] += vec.mV[2];
- return (*this);
-}
-
-inline LLVector3 operator*(const LLVector3 &a, const LLV4Matrix4 &b)
-{
- return LLVector3(a.mV[VX] * b.mMatrix[VX][VX] +
- a.mV[VY] * b.mMatrix[VY][VX] +
- a.mV[VZ] * b.mMatrix[VZ][VX] +
- b.mMatrix[VW][VX],
-
- a.mV[VX] * b.mMatrix[VX][VY] +
- a.mV[VY] * b.mMatrix[VY][VY] +
- a.mV[VZ] * b.mMatrix[VZ][VY] +
- b.mMatrix[VW][VY],
-
- a.mV[VX] * b.mMatrix[VX][VZ] +
- a.mV[VY] * b.mMatrix[VY][VZ] +
- a.mV[VZ] * b.mMatrix[VZ][VZ] +
- b.mMatrix[VW][VZ]);
-}
-
-
-#endif
diff --git a/indra/llmath/llv4vector3.h b/indra/llmath/llv4vector3.h
deleted file mode 100644
index a340d53f5a..0000000000
--- a/indra/llmath/llv4vector3.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @file llviewerjointmesh.cpp
- * @brief LLV4* class header file - vector processor enabled math
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLV4VECTOR3_H
-#define LL_LLV4VECTOR3_H
-
-#include "llv4math.h"
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Vector3
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-LL_LLV4MATH_ALIGN_PREFIX
-
-class LLV4Vector3
-{
-public:
- union {
- F32 mV[LLV4_NUM_AXIS];
- V4F32 v;
- };
-
- enum {
- ALIGNMENT = 16
- };
-
- void setVec(F32 x, F32 y, F32 z);
- void setVec(F32 a);
-}
-
-LL_LLV4MATH_ALIGN_POSTFIX;
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// LLV4Vector3
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-inline void LLV4Vector3::setVec(F32 x, F32 y, F32 z)
-{
- mV[VX] = x;
- mV[VY] = y;
- mV[VZ] = z;
-}
-
-inline void LLV4Vector3::setVec(F32 a)
-{
-#if LL_VECTORIZE
- v = _mm_set1_ps(a);
-#else
- setVec(a, a, a);
-#endif
-}
-
-#endif
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 21cc9b22f2..da0fa32963 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -32,6 +32,7 @@
#if !LL_WINDOWS
#include <stdint.h>
#endif
+#include <cmath>
#include "llerror.h"
#include "llmemtype.h"
@@ -2077,7 +2078,7 @@ LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL ge
mFaceMask = 0x0;
mDetail = detail;
mSculptLevel = -2;
- mIsTetrahedron = FALSE;
+ mIsMeshAssetLoaded = FALSE;
mLODScaleBias.setVec(1,1,1);
mHullPoints = NULL;
mHullIndices = NULL;
@@ -2099,7 +2100,7 @@ LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL ge
generate();
- if (mParams.getSculptID().isNull() && mParams.getSculptType() == LL_SCULPT_TYPE_NONE)
+ if (mParams.getSculptID().isNull() && mParams.getSculptType() == LL_SCULPT_TYPE_NONE || mParams.getSculptType() == LL_SCULPT_TYPE_MESH)
{
createVolumeFaces();
}
@@ -2379,11 +2380,16 @@ bool LLVolumeFace::VertexData::operator==(const LLVolumeFace::VertexData& rhs)co
bool LLVolumeFace::VertexData::compareNormal(const LLVolumeFace::VertexData& rhs, F32 angle_cutoff) const
{
bool retval = false;
- if (rhs.mData[POSITION].equals3(mData[POSITION]) && rhs.mTexCoord == mTexCoord)
+
+ const F32 epsilon = 0.00001f;
+
+ if (rhs.mData[POSITION].equals3(mData[POSITION], epsilon) &&
+ fabs(rhs.mTexCoord[0]-mTexCoord[0]) < epsilon &&
+ fabs(rhs.mTexCoord[1]-mTexCoord[1]) < epsilon)
{
if (angle_cutoff > 1.f)
{
- retval = (mData[NORMAL].equals3(rhs.mData[NORMAL]));
+ retval = (mData[NORMAL].equals3(rhs.mData[NORMAL], epsilon));
}
else
{
@@ -2402,7 +2408,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
LLSD mdl;
if (!unzip_llsd(mdl, is, size))
{
- llwarns << "not a valid mesh asset!" << llendl;
+ LL_DEBUGS("MeshStreaming") << "Failed to unzip LLSD blob for LoD, will probably fetch from sim again." << llendl;
return false;
}
@@ -2499,9 +2505,9 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
}
{
- U16* n = (U16*) &(norm[0]);
- if(n)
+ if (!norm.empty())
{
+ U16* n = (U16*) &(norm[0]);
for (U32 j = 0; j < num_verts; ++j)
{
norm_out->set((F32) n[0], (F32) n[1], (F32) n[2]);
@@ -2512,12 +2518,16 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
n += 3;
}
}
+ else
+ {
+ memset(norm_out, 0, sizeof(LLVector4a)*num_verts);
+ }
}
{
- U16* t = (U16*) &(tc[0]);
- if(t)
+ if (!tc.empty())
{
+ U16* t = (U16*) &(tc[0]);
for (U32 j = 0; j < num_verts; j+=2)
{
if (j < num_verts-1)
@@ -2538,6 +2548,10 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
tc_out++;
}
}
+ else
+ {
+ memset(tc_out, 0, sizeof(LLVector2)*num_verts);
+ }
}
if (mdl[i].has("Weights"))
@@ -2662,6 +2676,25 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
min.setMin(min, face.mPositions[i]);
max.setMax(max, face.mPositions[i]);
}
+
+ if (face.mTexCoords)
+ {
+ LLVector2& min_tc = face.mTexCoordExtents[0];
+ LLVector2& max_tc = face.mTexCoordExtents[1];
+
+ min_tc = face.mTexCoords[0];
+ max_tc = face.mTexCoords[0];
+
+ for (U32 j = 1; j < face.mNumVertices; ++j)
+ {
+ update_min_max(min_tc, max_tc, face.mTexCoords[j]);
+ }
+ }
+ else
+ {
+ face.mTexCoordExtents[0].set(0,0);
+ face.mTexCoordExtents[1].set(1,1);
+ }
}
}
}
@@ -2673,162 +2706,21 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
return true;
}
-void tetrahedron_set_normal(LLVolumeFace::VertexData* cv)
-{
- LLVector4a v0;
- v0.setSub(cv[1].getPosition(), cv[0].getNormal());
- LLVector4a v1;
- v1.setSub(cv[2].getNormal(), cv[0].getPosition());
-
- cv[0].getNormal().setCross3(v0,v1);
- cv[0].getNormal().normalize3fast();
- cv[1].setNormal(cv[0].getNormal());
- cv[2].setNormal(cv[1].getNormal());
-}
-BOOL LLVolume::isTetrahedron()
+BOOL LLVolume::isMeshAssetLoaded()
{
- return mIsTetrahedron;
+ return mIsMeshAssetLoaded;
}
-void LLVolume::makeTetrahedron()
+void LLVolume::setMeshAssetLoaded(BOOL loaded)
{
- mVolumeFaces.clear();
-
- LLVolumeFace face;
-
- F32 x = 0.25f;
- LLVector4a p[] =
- { //unit tetrahedron corners
- LLVector4a(x,x,x),
- LLVector4a(-x,-x,x),
- LLVector4a(-x,x,-x),
- LLVector4a(x,-x,-x)
- };
-
- face.mExtents[0].splat(-x);
- face.mExtents[1].splat(x);
-
- LLVolumeFace::VertexData cv[3];
-
- //set texture coordinates
- cv[0].mTexCoord = LLVector2(0,0);
- cv[1].mTexCoord = LLVector2(1,0);
- cv[2].mTexCoord = LLVector2(0.5f, 0.5f*F_SQRT3);
-
-
- //side 1
- cv[0].setPosition(p[1]);
- cv[1].setPosition(p[0]);
- cv[2].setPosition(p[2]);
-
- tetrahedron_set_normal(cv);
-
- face.resizeVertices(12);
- face.resizeIndices(12);
-
- LLVector4a* v = (LLVector4a*) face.mPositions;
- LLVector4a* n = (LLVector4a*) face.mNormals;
- LLVector2* tc = (LLVector2*) face.mTexCoords;
-
- v[0] = cv[0].getPosition();
- v[1] = cv[1].getPosition();
- v[2] = cv[2].getPosition();
- v += 3;
-
- n[0] = cv[0].getNormal();
- n[1] = cv[1].getNormal();
- n[2] = cv[2].getNormal();
- n += 3;
-
- tc[0] = cv[0].mTexCoord;
- tc[1] = cv[1].mTexCoord;
- tc[2] = cv[2].mTexCoord;
- tc += 3;
-
-
- //side 2
- cv[0].setPosition(p[3]);
- cv[1].setPosition(p[0]);
- cv[2].setPosition(p[1]);
-
- tetrahedron_set_normal(cv);
-
- v[0] = cv[0].getPosition();
- v[1] = cv[1].getPosition();
- v[2] = cv[2].getPosition();
- v += 3;
-
- n[0] = cv[0].getNormal();
- n[1] = cv[1].getNormal();
- n[2] = cv[2].getNormal();
- n += 3;
-
- tc[0] = cv[0].mTexCoord;
- tc[1] = cv[1].mTexCoord;
- tc[2] = cv[2].mTexCoord;
- tc += 3;
-
- //side 3
- cv[0].setPosition(p[3]);
- cv[1].setPosition(p[1]);
- cv[2].setPosition(p[2]);
-
- tetrahedron_set_normal(cv);
-
- v[0] = cv[0].getPosition();
- v[1] = cv[1].getPosition();
- v[2] = cv[2].getPosition();
- v += 3;
-
- n[0] = cv[0].getNormal();
- n[1] = cv[1].getNormal();
- n[2] = cv[2].getNormal();
- n += 3;
-
- tc[0] = cv[0].mTexCoord;
- tc[1] = cv[1].mTexCoord;
- tc[2] = cv[2].mTexCoord;
- tc += 3;
-
- //side 4
- cv[0].setPosition(p[2]);
- cv[1].setPosition(p[0]);
- cv[2].setPosition(p[3]);
-
- tetrahedron_set_normal(cv);
-
- v[0] = cv[0].getPosition();
- v[1] = cv[1].getPosition();
- v[2] = cv[2].getPosition();
- v += 3;
-
- n[0] = cv[0].getNormal();
- n[1] = cv[1].getNormal();
- n[2] = cv[2].getNormal();
- n += 3;
-
- tc[0] = cv[0].mTexCoord;
- tc[1] = cv[1].mTexCoord;
- tc[2] = cv[2].mTexCoord;
- tc += 3;
-
- //set index buffer
- for (U16 i = 0; i < 12; i++)
- {
- face.mIndices[i] = i;
- }
-
- mVolumeFaces.push_back(face);
- mSculptLevel = 0;
- mIsTetrahedron = TRUE;
+ mIsMeshAssetLoaded = loaded;
}
void LLVolume::copyVolumeFaces(const LLVolume* volume)
{
mVolumeFaces = volume->mVolumeFaces;
mSculptLevel = 0;
- mIsTetrahedron = FALSE;
}
void LLVolume::cacheOptimize()
@@ -2842,14 +2734,7 @@ void LLVolume::cacheOptimize()
S32 LLVolume::getNumFaces() const
{
- U8 sculpt_type = (mParams.getSculptType() & LL_SCULPT_TYPE_MASK);
-
- if (sculpt_type == LL_SCULPT_TYPE_MESH)
- {
- return LL_SCULPT_MESH_MAX_FACES;
- }
-
- return (S32)mProfilep->mFaces.size();
+ return mIsMeshAssetLoaded ? getNumVolumeFaces() : (S32)mProfilep->mFaces.size();
}
@@ -4420,15 +4305,25 @@ S32 LLVolume::getNumTriangleIndices() const
}
-S32 LLVolume::getNumTriangles() const
+S32 LLVolume::getNumTriangles(S32* vcount) const
{
U32 triangle_count = 0;
+ U32 vertex_count = 0;
for (S32 i = 0; i < getNumVolumeFaces(); ++i)
{
- triangle_count += getVolumeFace(i).mNumIndices/3;
+ const LLVolumeFace& face = getVolumeFace(i);
+ triangle_count += face.mNumIndices/3;
+
+ vertex_count += face.mNumVertices;
}
+
+ if (vcount)
+ {
+ *vcount = vertex_count;
+ }
+
return triangle_count;
}
@@ -5580,7 +5475,16 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src)
LLVector4a::memcpyNonAliased16((F32*) mPositions, (F32*) src.mPositions, vert_size);
LLVector4a::memcpyNonAliased16((F32*) mNormals, (F32*) src.mNormals, vert_size);
- LLVector4a::memcpyNonAliased16((F32*) mTexCoords, (F32*) src.mTexCoords, tc_size);
+
+ if(src.mTexCoords)
+ {
+ LLVector4a::memcpyNonAliased16((F32*) mTexCoords, (F32*) src.mTexCoords, tc_size);
+ }
+ else
+ {
+ ll_aligned_free_16(mTexCoords) ;
+ mTexCoords = NULL ;
+ }
if (src.mBinormals)
@@ -5702,8 +5606,23 @@ BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build)
void LLVolumeFace::getVertexData(U16 index, LLVolumeFace::VertexData& cv)
{
cv.setPosition(mPositions[index]);
- cv.setNormal(mNormals[index]);
- cv.mTexCoord = mTexCoords[index];
+ if (mNormals)
+ {
+ cv.setNormal(mNormals[index]);
+ }
+ else
+ {
+ cv.getNormal().clear();
+ }
+
+ if (mTexCoords)
+ {
+ cv.mTexCoord = mTexCoords[index];
+ }
+ else
+ {
+ cv.mTexCoord.clear();
+ }
}
bool LLVolumeFace::VertexMapData::operator==(const LLVolumeFace::VertexData& rhs) const
@@ -5733,7 +5652,10 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
LLVolumeFace new_face;
//map of points to vector of vertices at that point
- VertexMapData::PointMap point_map;
+ std::map<U64, std::vector<VertexMapData> > point_map;
+
+ LLVector4a range;
+ range.setSub(mExtents[1],mExtents[0]);
//remove redundant vertices
for (U32 i = 0; i < mNumIndices; ++i)
@@ -5744,7 +5666,19 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
getVertexData(index, cv);
BOOL found = FALSE;
- VertexMapData::PointMap::iterator point_iter = point_map.find(LLVector3(cv.getPosition().getF32ptr()));
+
+ LLVector4a pos;
+ pos.setSub(mPositions[index], mExtents[0]);
+ pos.div(range);
+
+ U64 pos64 = 0;
+
+ pos64 = (U16) (pos[0]*65535);
+ pos64 = pos64 | (((U64) (pos[1]*65535)) << 16);
+ pos64 = pos64 | (((U64) (pos[2]*65535)) << 32);
+
+ std::map<U64, std::vector<VertexMapData> >::iterator point_iter = point_map.find(pos64);
+
if (point_iter != point_map.end())
{ //duplicate point might exist
for (U32 j = 0; j < point_iter->second.size(); ++j)
@@ -5776,11 +5710,26 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
}
else
{
- point_map[LLVector3(d.getPosition().getF32ptr())].push_back(d);
+ point_map[pos64].push_back(d);
}
}
}
+ llassert(new_face.mNumIndices == mNumIndices);
+ llassert(new_face.mNumVertices <= mNumVertices);
+
+ if (angle_cutoff > 1.f && !mNormals)
+ {
+ ll_aligned_free_16(new_face.mNormals);
+ new_face.mNormals = NULL;
+ }
+
+ if (!mTexCoords)
+ {
+ ll_aligned_free_16(new_face.mTexCoords);
+ new_face.mTexCoords = NULL;
+ }
+
swapData(new_face);
}
@@ -7171,7 +7120,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
resizeVertices(num_vertices);
resizeIndices(num_indices);
- if ((volume->getParams().getSculptType() & LL_SCULPT_TYPE_MASK) != LL_SCULPT_TYPE_MESH)
+ if (!volume->isMeshAssetLoaded())
{
mEdge.resize(num_indices);
}
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index f67f8f644d..afd1ec5eed 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -990,7 +990,7 @@ public:
S32 getNumTriangleIndices() const;
static void getLoDTriangleCounts(const LLVolumeParams& params, S32* counts);
- S32 getNumTriangles() const;
+ S32 getNumTriangles(S32* vcount = NULL) const;
void generateSilhouetteVertices(std::vector<LLVector3> &vertices,
std::vector<LLVector3> &normals,
@@ -1058,14 +1058,14 @@ protected:
public:
virtual bool unpackVolumeFaces(std::istream& is, S32 size);
- virtual void makeTetrahedron();
- virtual BOOL isTetrahedron();
+ virtual void setMeshAssetLoaded(BOOL loaded);
+ virtual BOOL isMeshAssetLoaded();
protected:
BOOL mUnique;
F32 mDetail;
S32 mSculptLevel;
- BOOL mIsTetrahedron;
+ BOOL mIsMeshAssetLoaded;
LLVolumeParams mParams;
LLPath *mPathp;
diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp
index df7a77002f..e4ae1c10ef 100644
--- a/indra/llmath/tests/v3math_test.cpp
+++ b/indra/llmath/tests/v3math_test.cpp
@@ -564,4 +564,22 @@ namespace tut
z1 = U8_to_F32(F32_to_U8(z, lowerz, upperz), lowerz, upperz);
ensure("2:quantize8: Fail ", is_approx_equal(x1, vec3a.mV[VX]) && is_approx_equal(y1, vec3a.mV[VY]) && is_approx_equal(z1, vec3a.mV[VZ]));
}
+
+ template<> template<>
+ void v3math_object::test<35>()
+ {
+ LLSD sd = LLSD::emptyArray();
+ sd[0] = 1.f;
+
+ LLVector3 parsed_1(sd);
+ ensure("1:LLSD parse: Fail ", is_approx_equal(parsed_1.mV[VX], 1.f) && is_approx_equal(parsed_1.mV[VY], 0.f) && is_approx_equal(parsed_1.mV[VZ], 0.f));
+
+ sd[1] = 2.f;
+ LLVector3 parsed_2(sd);
+ ensure("2:LLSD parse: Fail ", is_approx_equal(parsed_2.mV[VX], 1.f) && is_approx_equal(parsed_2.mV[VY], 2.f) && is_approx_equal(parsed_2.mV[VZ], 0.f));
+
+ sd[2] = 3.f;
+ LLVector3 parsed_3(sd);
+ ensure("3:LLSD parse: Fail ", is_approx_equal(parsed_3.mV[VX], 1.f) && is_approx_equal(parsed_3.mV[VY], 2.f) && is_approx_equal(parsed_3.mV[VZ], 3.f));
+ }
}
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index c5f82cf052..0f40a670fa 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -65,6 +65,7 @@ set(llmessage_SOURCE_FILES
llpacketbuffer.cpp
llpacketring.cpp
llpartdata.cpp
+ llproxy.cpp
llpumpio.cpp
llregionpresenceverifier.cpp
llsdappservices.cpp
@@ -161,6 +162,7 @@ set(llmessage_HEADER_FILES
llpacketring.h
llpartdata.h
llpumpio.h
+ llproxy.h
llqueryflags.h
llregionflags.h
llregionhandle.h
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 31cdb1219b..9b86daebe5 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -149,8 +149,8 @@ void LLAssetInfo::setFromNameValue( const LLNameValue& nv )
setName( buf );
buf.assign( str, pos2, std::string::npos );
setDescription( buf );
- llinfos << "uuid: " << mUuid << llendl;
- llinfos << "creator: " << mCreatorID << llendl;
+ LL_DEBUGS("AssetStorage") << "uuid: " << mUuid << llendl;
+ LL_DEBUGS("AssetStorage") << "creator: " << mCreatorID << llendl;
}
///----------------------------------------------------------------------------
@@ -434,9 +434,9 @@ bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAsse
// IW - uuid is passed by value to avoid side effects, please don't re-add &
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, BOOL is_priority)
{
- lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
+ LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
- llinfos << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl;
+ LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl;
if (user_data)
{
@@ -446,7 +446,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
if (mShutDown)
{
- llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl;
+ LL_DEBUGS("AssetStorage") << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl;
if (callback)
{
@@ -468,7 +468,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
// Try static VFS first.
if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data))
{
- llinfos << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl;
+ LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl;
return;
}
@@ -486,7 +486,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
- llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl;
+ LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl;
}
else
{
@@ -520,7 +520,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
}
if (duplicate)
{
- llinfos << "Adding additional non-duplicate request for asset " << uuid
+ LL_DEBUGS("AssetStorage") << "Adding additional non-duplicate request for asset " << uuid
<< "." << LLAssetType::lookup(type) << llendl;
}
@@ -584,9 +584,9 @@ void LLAssetStorage::downloadCompleteCallback(
LLAssetType::EType file_type,
void* user_data, LLExtStat ext_status)
{
- llinfos << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << llendl;
+ LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << llendl;
- lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id
+ LL_DEBUGS("AssetStorage") << "LLAssetStorage::downloadCompleteCallback() for " << file_id
<< "," << LLAssetType::lookup(file_type) << llendl;
LLAssetRequest* req = (LLAssetRequest*)user_data;
if(!req)
@@ -731,7 +731,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
tpvf.setAsset(asset_id, atype);
tpvf.setCallback(downloadEstateAssetCompleteCallback, req);
- llinfos << "Starting transfer for " << asset_id << llendl;
+ LL_DEBUGS("AssetStorage") << "Starting transfer for " << asset_id << llendl;
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
ttcp->requestTransfer(spe, tpvf, 100.f + (is_priority ? 1.f : 0.f));
}
@@ -871,7 +871,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
tpvf.setAsset(asset_id, atype);
tpvf.setCallback(downloadInvItemCompleteCallback, req);
- llinfos << "Starting transfer for inventory asset "
+ LL_DEBUGS("AssetStorage") << "Starting transfer for inventory asset "
<< item_id << " owned by " << owner_id << "," << task_id
<< llendl;
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
@@ -1211,7 +1211,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
request_list_t* requests = getRequestList(rt);
if (deletePendingRequestImpl(requests, asset_type, asset_id))
{
- llinfos << "Asset " << getRequestName(rt) << " request for "
+ LL_DEBUGS("AssetStorage") << "Asset " << getRequestName(rt) << " request for "
<< asset_id << "." << LLAssetType::lookup(asset_type)
<< " removed from pending queue." << llendl;
return true;
@@ -1307,7 +1307,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
user_data == ((LLLegacyAssetRequest *)tmp->mUserData)->mUserData)
{
// this is a duplicate from the same subsystem - throw it away
- llinfos << "Discarding duplicate request for UUID " << uuid << llendl;
+ LL_DEBUGS("AssetStorage") << "Discarding duplicate request for UUID " << uuid << llendl;
return;
}
}
@@ -1490,7 +1490,7 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET
{
if( !metric_recipient )
{
- llinfos << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl;
+ LL_DEBUGS("AssetStorage") << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl;
return;
}
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 7c8b7e3584..330028c926 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -1,5 +1,5 @@
/**
- * @file llcurl.h
+ * @file llcurl.cpp
* @author Zero / Donovan
* @date 2006-10-15
* @brief Implementation of wrapper around libcurl.
@@ -46,8 +46,9 @@
#endif
#include "llbufferstream.h"
-#include "llstl.h"
+#include "llproxy.h"
#include "llsdserialize.h"
+#include "llstl.h"
#include "llthread.h"
#include "lltimer.h"
@@ -74,6 +75,7 @@ static const S32 MULTI_PERFORM_CALL_REPEAT = 5;
static const S32 CURL_REQUEST_TIMEOUT = 30; // seconds
static const S32 MAX_ACTIVE_REQUEST_COUNT = 100;
+static
// DEBUG //
S32 gCurlEasyCount = 0;
S32 gCurlMultiCount = 0;
@@ -85,6 +87,9 @@ std::vector<LLMutex*> LLCurl::sSSLMutex;
std::string LLCurl::sCAPath;
std::string LLCurl::sCAFile;
+bool LLCurl::sMultiThreaded = false;
+static U32 sMainThreadID = 0;
+
void check_curl_code(CURLcode code)
{
if (code != CURLE_OK)
@@ -204,7 +209,7 @@ namespace boost
void intrusive_ptr_release(LLCurl::Responder* p)
{
- if(p && 0 == --p->mReferenceCount)
+ if (p && 0 == --p->mReferenceCount)
{
delete p;
}
@@ -214,77 +219,10 @@ namespace boost
//////////////////////////////////////////////////////////////////////////////
-
-class LLCurl::Easy
-{
- LOG_CLASS(Easy);
-
-private:
- Easy();
-
-public:
- static Easy* getEasy();
- ~Easy();
-
- CURL* getCurlHandle() const { return mCurlEasyHandle; }
-
- void setErrorBuffer();
- void setCA();
-
- void setopt(CURLoption option, S32 value);
- // These assume the setter does not free value!
- void setopt(CURLoption option, void* value);
- void setopt(CURLoption option, char* value);
- // Copies the string so that it is gauranteed to stick around
- void setoptString(CURLoption option, const std::string& value);
-
- void slist_append(const char* str);
- void setHeaders();
-
- U32 report(CURLcode);
- void getTransferInfo(LLCurl::TransferInfo* info);
-
- void prepRequest(const std::string& url, const std::vector<std::string>& headers, ResponderPtr, bool post = false);
-
- const char* getErrorBuffer();
-
- std::stringstream& getInput() { return mInput; }
- std::stringstream& getHeaderOutput() { return mHeaderOutput; }
- LLIOPipe::buffer_ptr_t& getOutput() { return mOutput; }
- const LLChannelDescriptors& getChannels() { return mChannels; }
-
- void resetState();
-
- static CURL* allocEasyHandle();
- static void releaseEasyHandle(CURL* handle);
-
-private:
- friend class LLCurl;
-
- CURL* mCurlEasyHandle;
- struct curl_slist* mHeaders;
-
- std::stringstream mRequest;
- LLChannelDescriptors mChannels;
- LLIOPipe::buffer_ptr_t mOutput;
- std::stringstream mInput;
- std::stringstream mHeaderOutput;
- char mErrorBuffer[CURL_ERROR_SIZE];
-
- // Note: char*'s not strings since we pass pointers to curl
- std::vector<char*> mStrings;
-
- ResponderPtr mResponder;
-
- static std::set<CURL*> sFreeHandles;
- static std::set<CURL*> sActiveHandles;
- static LLMutex* sHandleMutex;
-};
-
std::set<CURL*> LLCurl::Easy::sFreeHandles;
std::set<CURL*> LLCurl::Easy::sActiveHandles;
LLMutex* LLCurl::Easy::sHandleMutex = NULL;
-
+LLMutex* LLCurl::Easy::sMultiMutex = NULL;
//static
CURL* LLCurl::Easy::allocEasyHandle()
@@ -404,11 +342,11 @@ const char* LLCurl::Easy::getErrorBuffer()
void LLCurl::Easy::setCA()
{
- if(!sCAPath.empty())
+ if (!sCAPath.empty())
{
setoptString(CURLOPT_CAPATH, sCAPath);
}
- if(!sCAFile.empty())
+ if (!sCAFile.empty())
{
setoptString(CURLOPT_CAINFO, sCAFile);
}
@@ -525,15 +463,18 @@ size_t curlHeaderCallback(void* data, size_t size, size_t nmemb, void* user_data
void LLCurl::Easy::prepRequest(const std::string& url,
const std::vector<std::string>& headers,
- ResponderPtr responder, bool post)
+ ResponderPtr responder, S32 time_out, bool post)
{
resetState();
if (post) setoptString(CURLOPT_ENCODING, "");
- //setopt(CURLOPT_VERBOSE, 1); // usefull for debugging
+ //setopt(CURLOPT_VERBOSE, 1); // useful for debugging
setopt(CURLOPT_NOSIGNAL, 1);
+ // Set the CURL options for either Socks or HTTP proxy
+ LLProxy::getInstance()->applyProxySettings(this);
+
mOutput.reset(new LLBufferArray);
setopt(CURLOPT_WRITEFUNCTION, (void*)&curlWriteCallback);
setopt(CURLOPT_WRITEDATA, (void*)this);
@@ -545,7 +486,7 @@ void LLCurl::Easy::prepRequest(const std::string& url,
setopt(CURLOPT_HEADERDATA, (void*)this);
// Allow up to five redirects
- if(responder && responder->followRedir())
+ if (responder && responder->followRedir())
{
setopt(CURLOPT_FOLLOWLOCATION, 1);
setopt(CURLOPT_MAXREDIRS, MAX_REDIRECTS);
@@ -558,7 +499,7 @@ void LLCurl::Easy::prepRequest(const std::string& url,
//don't verify host name so urls with scrubbed host names will work (improves DNS performance)
setopt(CURLOPT_SSL_VERIFYHOST, 0);
- setopt(CURLOPT_TIMEOUT, CURL_REQUEST_TIMEOUT);
+ setopt(CURLOPT_TIMEOUT, llmax(time_out, CURL_REQUEST_TIMEOUT));
setoptString(CURLOPT_URL, url);
@@ -579,44 +520,24 @@ void LLCurl::Easy::prepRequest(const std::string& url,
////////////////////////////////////////////////////////////////////////////
-class LLCurl::Multi
+LLCurl::Multi::Multi()
+ : LLThread("Curl Multi"),
+ mQueued(0),
+ mErrorCount(0),
+ mPerformState(PERFORM_STATE_READY)
{
- LOG_CLASS(Multi);
-public:
-
- Multi();
- ~Multi();
-
- Easy* allocEasy();
- bool addEasy(Easy* easy);
-
- void removeEasy(Easy* easy);
+ mQuitting = false;
- S32 process();
- S32 perform();
-
- CURLMsg* info_read(S32* msgs_in_queue);
-
- S32 mQueued;
- S32 mErrorCount;
-
-private:
- void easyFree(Easy*);
-
- CURLM* mCurlMultiHandle;
-
- typedef std::set<Easy*> easy_active_list_t;
- easy_active_list_t mEasyActiveList;
- typedef std::map<CURL*, Easy*> easy_active_map_t;
- easy_active_map_t mEasyActiveMap;
- typedef std::set<Easy*> easy_free_list_t;
- easy_free_list_t mEasyFreeList;
-};
+ mThreaded = LLCurl::sMultiThreaded && LLThread::currentID() == sMainThreadID;
+ if (mThreaded)
+ {
+ mSignal = new LLCondition(NULL);
+ }
+ else
+ {
+ mSignal = NULL;
+ }
-LLCurl::Multi::Multi()
- : mQueued(0),
- mErrorCount(0)
-{
mCurlMultiHandle = curl_multi_init();
if (!mCurlMultiHandle)
{
@@ -630,6 +551,16 @@ LLCurl::Multi::Multi()
LLCurl::Multi::~Multi()
{
+ llassert(isStopped());
+
+ if (LLCurl::sMultiThreaded)
+ {
+ LLCurl::Easy::sMultiMutex->lock();
+ }
+
+ delete mSignal;
+ mSignal = NULL;
+
// Clean up active
for(easy_active_list_t::iterator iter = mEasyActiveList.begin();
iter != mEasyActiveList.end(); ++iter)
@@ -647,6 +578,11 @@ LLCurl::Multi::~Multi()
check_curl_multi_code(curl_multi_cleanup(mCurlMultiHandle));
--gCurlMultiCount;
+
+ if (LLCurl::sMultiThreaded)
+ {
+ LLCurl::Easy::sMultiMutex->unlock();
+ }
}
CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue)
@@ -655,13 +591,43 @@ CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue)
return curlmsg;
}
+void LLCurl::Multi::perform()
+{
+ if (mThreaded)
+ {
+ if (mPerformState == PERFORM_STATE_READY)
+ {
+ mSignal->signal();
+ }
+ }
+ else
+ {
+ doPerform();
+ }
+}
+
+void LLCurl::Multi::run()
+{
+ llassert(mThreaded);
+
+ while (!mQuitting)
+ {
+ mSignal->wait();
+ mPerformState = PERFORM_STATE_PERFORMING;
+ if (!mQuitting)
+ {
+ LLMutexLock lock(LLCurl::Easy::sMultiMutex);
+ doPerform();
+ }
+ }
+}
-S32 LLCurl::Multi::perform()
+void LLCurl::Multi::doPerform()
{
S32 q = 0;
for (S32 call_count = 0;
- call_count < MULTI_PERFORM_CALL_REPEAT;
- call_count += 1)
+ call_count < MULTI_PERFORM_CALL_REPEAT;
+ call_count += 1)
{
CURLMcode code = curl_multi_perform(mCurlMultiHandle, &q);
if (CURLM_CALL_MULTI_PERFORM != code || q == 0)
@@ -672,13 +638,18 @@ S32 LLCurl::Multi::perform()
}
mQueued = q;
- return q;
+ mPerformState = PERFORM_STATE_COMPLETED;
}
S32 LLCurl::Multi::process()
{
perform();
-
+
+ if (mPerformState != PERFORM_STATE_COMPLETED)
+ {
+ return 0;
+ }
+
CURLMsg* msg;
int msgs_in_queue;
@@ -709,6 +680,8 @@ S32 LLCurl::Multi::process()
}
}
}
+
+ mPerformState = PERFORM_STATE_READY;
return processed;
}
@@ -787,6 +760,21 @@ LLCurlRequest::LLCurlRequest() :
LLCurlRequest::~LLCurlRequest()
{
llassert_always(mThreadID == LLThread::currentID());
+
+ //stop all Multi handle background threads
+ for (curlmulti_set_t::iterator iter = mMultiSet.begin(); iter != mMultiSet.end(); ++iter)
+ {
+ LLCurl::Multi* multi = *iter;
+ multi->mQuitting = true;
+ if (multi->mThreaded)
+ {
+ while (!multi->isStopped())
+ {
+ multi->mSignal->signal();
+ apr_sleep(1000);
+ }
+ }
+ }
for_each(mMultiSet.begin(), mMultiSet.end(), DeletePointer());
}
@@ -794,6 +782,10 @@ void LLCurlRequest::addMulti()
{
llassert_always(mThreadID == LLThread::currentID());
LLCurl::Multi* multi = new LLCurl::Multi();
+ if (multi->mThreaded)
+ {
+ multi->start();
+ }
mMultiSet.insert(multi);
mActiveMulti = multi;
mActiveRequestCount = 0;
@@ -855,14 +847,14 @@ bool LLCurlRequest::getByteRange(const std::string& url,
bool LLCurlRequest::post(const std::string& url,
const headers_t& headers,
const LLSD& data,
- LLCurl::ResponderPtr responder)
+ LLCurl::ResponderPtr responder, S32 time_out)
{
LLCurl::Easy* easy = allocEasy();
if (!easy)
{
return false;
}
- easy->prepRequest(url, headers, responder);
+ easy->prepRequest(url, headers, responder, time_out);
LLSDSerialize::toXML(data, easy->getInput());
S32 bytes = easy->getInput().str().length();
@@ -882,14 +874,14 @@ bool LLCurlRequest::post(const std::string& url,
bool LLCurlRequest::post(const std::string& url,
const headers_t& headers,
const std::string& data,
- LLCurl::ResponderPtr responder)
+ LLCurl::ResponderPtr responder, S32 time_out)
{
LLCurl::Easy* easy = allocEasy();
if (!easy)
{
return false;
}
- easy->prepRequest(url, headers, responder);
+ easy->prepRequest(url, headers, responder, time_out);
easy->getInput().write(data.data(), data.size());
S32 bytes = easy->getInput().str().length();
@@ -923,6 +915,16 @@ S32 LLCurlRequest::process()
if (multi != mActiveMulti && tres == 0 && multi->mQueued == 0)
{
mMultiSet.erase(curiter);
+ multi->mQuitting = true;
+ if (multi->mThreaded)
+ {
+ while (!multi->isStopped())
+ {
+ multi->mSignal->signal();
+ apr_sleep(1000);
+ }
+ }
+
delete multi;
}
}
@@ -940,6 +942,10 @@ S32 LLCurlRequest::getQueued()
curlmulti_set_t::iterator curiter = iter++;
LLCurl::Multi* multi = *curiter;
queued += multi->mQueued;
+ if (multi->mPerformState != LLCurl::Multi::PERFORM_STATE_READY)
+ {
+ ++queued;
+ }
}
return queued;
}
@@ -953,16 +959,31 @@ LLCurlEasyRequest::LLCurlEasyRequest()
mResultReturned(false)
{
mMulti = new LLCurl::Multi();
+ if (mMulti->mThreaded)
+ {
+ mMulti->start();
+ }
mEasy = mMulti->allocEasy();
if (mEasy)
{
mEasy->setErrorBuffer();
mEasy->setCA();
+ // Set proxy settings if configured to do so.
+ LLProxy::getInstance()->applyProxySettings(mEasy);
}
}
LLCurlEasyRequest::~LLCurlEasyRequest()
{
+ mMulti->mQuitting = true;
+ if (mMulti->mThreaded)
+ {
+ while (!mMulti->isStopped())
+ {
+ mMulti->mSignal->signal();
+ apr_sleep(1000);
+ }
+ }
delete mMulti;
}
@@ -1059,14 +1080,20 @@ void LLCurlEasyRequest::requestComplete()
}
}
-S32 LLCurlEasyRequest::perform()
+void LLCurlEasyRequest::perform()
{
- return mMulti->perform();
+ mMulti->perform();
}
// Usage: Call getRestult until it returns false (no more messages)
bool LLCurlEasyRequest::getResult(CURLcode* result, LLCurl::TransferInfo* info)
{
+ if (mMulti->mPerformState != LLCurl::Multi::PERFORM_STATE_COMPLETED)
+ { //we're busy, try again later
+ return false;
+ }
+ mMulti->mPerformState = LLCurl::Multi::PERFORM_STATE_READY;
+
if (!mEasy)
{
// Special case - we failed to initialize a curl_easy (can happen if too many open files)
@@ -1151,8 +1178,10 @@ unsigned long LLCurl::ssl_thread_id(void)
}
#endif
-void LLCurl::initClass()
+void LLCurl::initClass(bool multi_threaded)
{
+ sMainThreadID = LLThread::currentID();
+ sMultiThreaded = multi_threaded;
// Do not change this "unless you are familiar with and mean to control
// internal operations of libcurl"
// - http://curl.haxx.se/libcurl/c/curl_global_init.html
@@ -1161,6 +1190,7 @@ void LLCurl::initClass()
check_curl_code(code);
Easy::sHandleMutex = new LLMutex(NULL);
+ Easy::sMultiMutex = new LLMutex(NULL);
#if SAFE_SSL
S32 mutex_count = CRYPTO_num_locks();
@@ -1182,6 +1212,8 @@ void LLCurl::cleanupClass()
delete Easy::sHandleMutex;
Easy::sHandleMutex = NULL;
+ delete Easy::sMultiMutex;
+ Easy::sMultiMutex = NULL;
for (std::set<CURL*>::iterator iter = Easy::sFreeHandles.begin(); iter != Easy::sFreeHandles.end(); ++iter)
{
@@ -1195,3 +1227,13 @@ void LLCurl::cleanupClass()
}
const unsigned int LLCurl::MAX_REDIRECTS = 5;
+
+// Provide access to LLCurl free functions outside of llcurl.cpp without polluting the global namespace.
+void LLCurlFF::check_easy_code(CURLcode code)
+{
+ check_curl_code(code);
+}
+void LLCurlFF::check_multi_code(CURLMcode code)
+{
+ check_curl_multi_code(code);
+}
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index 4ce3fa1078..87de202717 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -41,6 +41,7 @@
#include "llbuffer.h"
#include "lliopipe.h"
#include "llsd.h"
+#include "llthread.h"
class LLMutex;
@@ -55,6 +56,8 @@ public:
class Easy;
class Multi;
+ static bool sMultiThreaded;
+
struct TransferInfo
{
TransferInfo() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {}
@@ -159,7 +162,7 @@ public:
/**
* @ brief Initialize LLCurl class
*/
- static void initClass();
+ static void initClass(bool multi_threaded = false);
/**
* @ brief Cleanup LLCurl class
@@ -184,6 +187,124 @@ private:
static const unsigned int MAX_REDIRECTS;
};
+class LLCurl::Easy
+{
+ LOG_CLASS(Easy);
+
+private:
+ Easy();
+
+public:
+ static Easy* getEasy();
+ ~Easy();
+
+ CURL* getCurlHandle() const { return mCurlEasyHandle; }
+
+ void setErrorBuffer();
+ void setCA();
+
+ void setopt(CURLoption option, S32 value);
+ // These assume the setter does not free value!
+ void setopt(CURLoption option, void* value);
+ void setopt(CURLoption option, char* value);
+ // Copies the string so that it is guaranteed to stick around
+ void setoptString(CURLoption option, const std::string& value);
+
+ void slist_append(const char* str);
+ void setHeaders();
+
+ U32 report(CURLcode);
+ void getTransferInfo(LLCurl::TransferInfo* info);
+
+ void prepRequest(const std::string& url, const std::vector<std::string>& headers, ResponderPtr, S32 time_out = 0, bool post = false);
+
+ const char* getErrorBuffer();
+
+ std::stringstream& getInput() { return mInput; }
+ std::stringstream& getHeaderOutput() { return mHeaderOutput; }
+ LLIOPipe::buffer_ptr_t& getOutput() { return mOutput; }
+ const LLChannelDescriptors& getChannels() { return mChannels; }
+
+ void resetState();
+
+ static CURL* allocEasyHandle();
+ static void releaseEasyHandle(CURL* handle);
+
+private:
+ friend class LLCurl;
+ friend class LLCurl::Multi;
+
+ CURL* mCurlEasyHandle;
+ struct curl_slist* mHeaders;
+
+ std::stringstream mRequest;
+ LLChannelDescriptors mChannels;
+ LLIOPipe::buffer_ptr_t mOutput;
+ std::stringstream mInput;
+ std::stringstream mHeaderOutput;
+ char mErrorBuffer[CURL_ERROR_SIZE];
+
+ // Note: char*'s not strings since we pass pointers to curl
+ std::vector<char*> mStrings;
+
+ ResponderPtr mResponder;
+
+ static std::set<CURL*> sFreeHandles;
+ static std::set<CURL*> sActiveHandles;
+ static LLMutex* sHandleMutex;
+ static LLMutex* sMultiMutex;
+};
+
+class LLCurl::Multi : public LLThread
+{
+ LOG_CLASS(Multi);
+public:
+
+ typedef enum
+ {
+ PERFORM_STATE_READY=0,
+ PERFORM_STATE_PERFORMING=1,
+ PERFORM_STATE_COMPLETED=2
+ } ePerformState;
+
+ Multi();
+ ~Multi();
+
+ Easy* allocEasy();
+ bool addEasy(Easy* easy);
+
+ void removeEasy(Easy* easy);
+
+ S32 process();
+ void perform();
+ void doPerform();
+
+ virtual void run();
+
+ CURLMsg* info_read(S32* msgs_in_queue);
+
+ S32 mQueued;
+ S32 mErrorCount;
+
+ S32 mPerformState;
+
+ LLCondition* mSignal;
+ bool mQuitting;
+ bool mThreaded;
+
+private:
+ void easyFree(Easy*);
+
+ CURLM* mCurlMultiHandle;
+
+ typedef std::set<Easy*> easy_active_list_t;
+ easy_active_list_t mEasyActiveList;
+ typedef std::map<CURL*, Easy*> easy_active_map_t;
+ easy_active_map_t mEasyActiveMap;
+ typedef std::set<Easy*> easy_free_list_t;
+ easy_free_list_t mEasyFreeList;
+};
+
namespace boost
{
void intrusive_ptr_add_ref(LLCurl::Responder* p);
@@ -201,8 +322,8 @@ public:
void get(const std::string& url, LLCurl::ResponderPtr responder);
bool getByteRange(const std::string& url, const headers_t& headers, S32 offset, S32 length, LLCurl::ResponderPtr responder);
- bool post(const std::string& url, const headers_t& headers, const LLSD& data, LLCurl::ResponderPtr responder);
- bool post(const std::string& url, const headers_t& headers, const std::string& data, LLCurl::ResponderPtr responder);
+ bool post(const std::string& url, const headers_t& headers, const LLSD& data, LLCurl::ResponderPtr responder, S32 time_out = 0);
+ bool post(const std::string& url, const headers_t& headers, const std::string& data, LLCurl::ResponderPtr responder, S32 time_out = 0);
S32 process();
S32 getQueued();
@@ -236,10 +357,12 @@ public:
void slist_append(const char* str);
void sendRequest(const std::string& url);
void requestComplete();
- S32 perform();
+ void perform();
bool getResult(CURLcode* result, LLCurl::TransferInfo* info = NULL);
std::string getErrorString();
+ LLCurl::Easy* getEasy() const { return mEasy; }
+
private:
CURLMsg* info_read(S32* queue, LLCurl::TransferInfo* info);
@@ -250,4 +373,11 @@ private:
bool mResultReturned;
};
+// Provide access to LLCurl free functions outside of llcurl.cpp without polluting the global namespace.
+namespace LLCurlFF
+{
+ void check_easy_code(CURLcode code);
+ void check_multi_code(CURLMcode code);
+}
+
#endif // LL_LLCURL_H
diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp
index 812ef7c151..e0ca056a5f 100644
--- a/indra/llmessage/llfiltersd2xmlrpc.cpp
+++ b/indra/llmessage/llfiltersd2xmlrpc.cpp
@@ -308,6 +308,7 @@ LLFilterSD2XMLRPCResponse::~LLFilterSD2XMLRPCResponse()
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_SD2XMLRPC_RESPONSE("SD2XMLRPC Response");
// virtual
LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl(
const LLChannelDescriptors& channels,
@@ -316,6 +317,8 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SD2XMLRPC_RESPONSE);
+
PUMP_DEBUG;
// This pipe does not work if it does not have everyting. This
// could be addressed by making a stream parser for llsd which
@@ -382,6 +385,8 @@ LLFilterSD2XMLRPCRequest::~LLFilterSD2XMLRPCRequest()
{
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_SD2XMLRPC_REQUEST("S22XMLRPC Request");
+
// virtual
LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl(
const LLChannelDescriptors& channels,
@@ -390,6 +395,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SD2XMLRPC_REQUEST);
// This pipe does not work if it does not have everyting. This
// could be addressed by making a stream parser for llsd which
// handled partial information.
@@ -586,6 +592,8 @@ LLFilterXMLRPCResponse2LLSD::~LLFilterXMLRPCResponse2LLSD()
{
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_XMLRPC2LLSD_RESPONSE("XMLRPC2LLSD Response");
+
LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl(
const LLChannelDescriptors& channels,
buffer_ptr_t& buffer,
@@ -593,6 +601,8 @@ LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_XMLRPC2LLSD_RESPONSE);
+
PUMP_DEBUG;
if(!eos) return STATUS_BREAK;
if(!buffer) return STATUS_ERROR;
@@ -668,6 +678,7 @@ LLFilterXMLRPCRequest2LLSD::~LLFilterXMLRPCRequest2LLSD()
{
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_XMLRPC2LLSD_REQUEST("XMLRPC2LLSD Request");
LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl(
const LLChannelDescriptors& channels,
buffer_ptr_t& buffer,
@@ -675,6 +686,7 @@ LLIOPipe::EStatus LLFilterXMLRPCRequest2LLSD::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_XMLRPC2LLSD_REQUEST);
PUMP_DEBUG;
if(!eos) return STATUS_BREAK;
if(!buffer) return STATUS_ERROR;
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp
index 5a38b7fd9f..2bca517e97 100644
--- a/indra/llmessage/llhttpassetstorage.cpp
+++ b/indra/llmessage/llhttpassetstorage.cpp
@@ -33,6 +33,7 @@
#include "indra_constants.h"
#include "message.h"
+#include "llproxy.h"
#include "llvfile.h"
#include "llvfs.h"
@@ -232,6 +233,10 @@ void LLHTTPAssetRequest::setupCurlHandle()
{
// *NOTE: Similar code exists in mapserver/llcurlutil.cpp JC
mCurlHandle = curl_easy_init();
+
+ // Apply proxy settings if configured to do so
+ LLProxy::getInstance()->applyProxySettings(mCurlHandle);
+
curl_easy_setopt(mCurlHandle, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_URL, mURLBuffer.c_str());
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp
index 0e5206a520..dd4e3a6300 100644
--- a/indra/llmessage/llhttpclient.cpp
+++ b/indra/llmessage/llhttpclient.cpp
@@ -428,6 +428,9 @@ static LLSD blocking_request(
std::string body_str;
// other request method checks root cert first, we skip?
+
+ // Apply configured proxy settings
+ LLProxy::getInstance()->applyProxySettings(curlp);
// * Set curl handle options
curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts
@@ -436,7 +439,7 @@ static LLSD blocking_request(
curl_easy_setopt(curlp, CURLOPT_WRITEDATA, &http_buffer);
curl_easy_setopt(curlp, CURLOPT_URL, url.c_str());
curl_easy_setopt(curlp, CURLOPT_ERRORBUFFER, curl_error_buffer);
-
+
// * Setup headers (don't forget to free them after the call!)
curl_slist* headers_list = NULL;
if (headers.isMap())
diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp
index 3b18a9177c..73e8a69085 100644
--- a/indra/llmessage/lliohttpserver.cpp
+++ b/indra/llmessage/lliohttpserver.cpp
@@ -140,6 +140,7 @@ private:
LLSD mHeaders;
};
+static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PIPE("HTTP Pipe");
LLIOPipe::EStatus LLHTTPPipe::process_impl(
const LLChannelDescriptors& channels,
buffer_ptr_t& buffer,
@@ -147,6 +148,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_HTTP_PIPE);
PUMP_DEBUG;
lldebugs << "LLSDHTTPServer::process_impl" << llendl;
@@ -428,6 +430,9 @@ protected:
/**
* LLHTTPResponseHeader
*/
+
+static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_HEADER("HTTP Header");
+
// virtual
LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
const LLChannelDescriptors& channels,
@@ -436,6 +441,7 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_HTTP_HEADER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
if(eos)
@@ -630,6 +636,8 @@ void LLHTTPResponder::markBad(
<< "</body>\n</html>\n";
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_RESPONDER("HTTP Responder");
+
// virtual
LLIOPipe::EStatus LLHTTPResponder::process_impl(
const LLChannelDescriptors& channels,
@@ -638,6 +646,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
LLIOPipe::EStatus status = STATUS_OK;
diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp
index 8c752fbe30..54ceab3422 100644
--- a/indra/llmessage/lliosocket.cpp
+++ b/indra/llmessage/lliosocket.cpp
@@ -251,6 +251,7 @@ LLSocket::~LLSocket()
{
ll_debug_socket("Destroying socket", mSocket);
apr_socket_close(mSocket);
+ mSocket = NULL;
}
if(mPool)
{
@@ -301,6 +302,8 @@ LLIOSocketReader::~LLIOSocketReader()
//lldebugs << "Destroying LLIOSocketReader" << llendl;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_SOCKET_READER("Socket Reader");
+
// virtual
LLIOPipe::EStatus LLIOSocketReader::process_impl(
const LLChannelDescriptors& channels,
@@ -309,6 +312,7 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SOCKET_READER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mSource) return STATUS_PRECONDITION_NOT_MET;
@@ -401,6 +405,7 @@ LLIOSocketWriter::~LLIOSocketWriter()
//lldebugs << "Destroying LLIOSocketWriter" << llendl;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_SOCKET_WRITER("Socket Writer");
// virtual
LLIOPipe::EStatus LLIOSocketWriter::process_impl(
const LLChannelDescriptors& channels,
@@ -409,6 +414,7 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SOCKET_WRITER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mDestination) return STATUS_PRECONDITION_NOT_MET;
@@ -555,6 +561,7 @@ void LLIOServerSocket::setResponseTimeout(F32 timeout_secs)
mResponseTimeout = timeout_secs;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_SERVER_SOCKET("Server Socket");
// virtual
LLIOPipe::EStatus LLIOServerSocket::process_impl(
const LLChannelDescriptors& channels,
@@ -563,6 +570,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SERVER_SOCKET);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!pump)
diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h
index e0f6c1e34d..be0f7dfcc6 100644
--- a/indra/llmessage/lliosocket.h
+++ b/indra/llmessage/lliosocket.h
@@ -145,13 +145,6 @@ public:
*/
apr_socket_t* getSocket() const { return mSocket; }
-protected:
- /**
- * @brief Protected constructor since should only make sockets
- * with one of the two <code>create()</code> calls.
- */
- LLSocket(apr_socket_t* socket, apr_pool_t* pool);
-
/**
* @brief Set default socket options, with SO_NONBLOCK = 0 and a timeout in us.
* @param timeout Number of microseconds to wait on this socket. Any
@@ -164,6 +157,13 @@ protected:
*/
void setNonBlocking();
+protected:
+ /**
+ * @brief Protected constructor since should only make sockets
+ * with one of the two <code>create()</code> calls.
+ */
+ LLSocket(apr_socket_t* socket, apr_pool_t* pool);
+
public:
/**
* @brief Do not call this directly.
diff --git a/indra/llmessage/llioutil.cpp b/indra/llmessage/llioutil.cpp
index 2e6ee59ff2..8c50fd5069 100644
--- a/indra/llmessage/llioutil.cpp
+++ b/indra/llmessage/llioutil.cpp
@@ -43,6 +43,8 @@ LLIOPipe::EStatus LLIOFlush::process_impl(
return STATUS_OK;
}
+
+static LLFastTimer::DeclareTimer FTM_PROCESS_SLEEP("IO Sleep");
/**
* @class LLIOSleep
*/
@@ -53,6 +55,7 @@ LLIOPipe::EStatus LLIOSleep::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SLEEP);
if(mSeconds > 0.0)
{
if(pump) pump->sleepChain(mSeconds);
@@ -62,6 +65,7 @@ LLIOPipe::EStatus LLIOSleep::process_impl(
return STATUS_DONE;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_ADD_CHAIN("Add Chain");
/**
* @class LLIOAddChain
*/
@@ -72,6 +76,7 @@ LLIOPipe::EStatus LLIOAddChain::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_ADD_CHAIN);
pump->addChain(mChain, mTimeout);
return STATUS_DONE;
}
diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp
index 8999dec64a..fc6e9c5193 100644
--- a/indra/llmessage/llpacketring.cpp
+++ b/indra/llmessage/llpacketring.cpp
@@ -28,11 +28,20 @@
#include "llpacketring.h"
+#if LL_WINDOWS
+ #include <winsock2.h>
+#else
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+#endif
+
// linden library includes
#include "llerror.h"
#include "lltimer.h"
-#include "timing.h"
+#include "llproxy.h"
#include "llrand.h"
+#include "message.h"
+#include "timing.h"
#include "u64.h"
///////////////////////////////////////////////////////////
@@ -216,8 +225,32 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap)
else
{
// no delay, pull straight from net
- packet_size = receive_packet(socket, datap);
- mLastSender = ::get_sender();
+ if (LLProxy::isSOCKSProxyEnabled())
+ {
+ U8 buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
+ packet_size = receive_packet(socket, static_cast<char*>(static_cast<void*>(buffer)));
+
+ if (packet_size > SOCKS_HEADER_SIZE)
+ {
+ // *FIX We are assuming ATYP is 0x01 (IPv4), not 0x03 (hostname) or 0x04 (IPv6)
+ memcpy(datap, buffer + SOCKS_HEADER_SIZE, packet_size - SOCKS_HEADER_SIZE);
+ proxywrap_t * header = static_cast<proxywrap_t*>(static_cast<void*>(buffer));
+ mLastSender.setAddress(header->addr);
+ mLastSender.setPort(ntohs(header->port));
+
+ packet_size -= SOCKS_HEADER_SIZE; // The unwrapped packet size
+ }
+ else
+ {
+ packet_size = 0;
+ }
+ }
+ else
+ {
+ packet_size = receive_packet(socket, datap);
+ mLastSender = ::get_sender();
+ }
+
mLastReceivingIF = ::get_receiving_interface();
if (packet_size) // did we actually get a packet?
@@ -243,7 +276,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
BOOL status = TRUE;
if (!mUseOutThrottle)
{
- return send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort() );
+ return sendPacketImpl(h_socket, send_buffer, buf_size, host );
}
else
{
@@ -264,7 +297,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
mOutBufferLength -= packetp->getSize();
packet_size = packetp->getSize();
- status = send_packet(h_socket, packetp->getData(), packet_size, packetp->getHost().getAddress(), packetp->getHost().getPort());
+ status = sendPacketImpl(h_socket, packetp->getData(), packet_size, packetp->getHost());
delete packetp;
// Update the throttle
@@ -273,7 +306,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
else
{
// If the queue's empty, we can just send this packet right away.
- status = send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort() );
+ status = sendPacketImpl(h_socket, send_buffer, buf_size, host );
packet_size = buf_size;
// Update the throttle
@@ -311,3 +344,29 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
return status;
}
+
+BOOL LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host)
+{
+
+ if (!LLProxy::isSOCKSProxyEnabled())
+ {
+ return send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort());
+ }
+
+ char headered_send_buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
+
+ proxywrap_t *socks_header = static_cast<proxywrap_t*>(static_cast<void*>(&headered_send_buffer));
+ socks_header->rsv = 0;
+ socks_header->addr = host.getAddress();
+ socks_header->port = htons(host.getPort());
+ socks_header->atype = ADDRESS_IPV4;
+ socks_header->frag = 0;
+
+ memcpy(headered_send_buffer + SOCKS_HEADER_SIZE, send_buffer, buf_size);
+
+ return send_packet( h_socket,
+ headered_send_buffer,
+ buf_size + SOCKS_HEADER_SIZE,
+ LLProxy::getInstance()->getUDPProxy().getAddress(),
+ LLProxy::getInstance()->getUDPProxy().getPort());
+}
diff --git a/indra/llmessage/llpacketring.h b/indra/llmessage/llpacketring.h
index e6409d2048..b214271e78 100644
--- a/indra/llmessage/llpacketring.h
+++ b/indra/llmessage/llpacketring.h
@@ -30,11 +30,11 @@
#include <queue>
-#include "llpacketbuffer.h"
#include "llhost.h"
-#include "net.h"
+#include "llpacketbuffer.h"
+#include "llproxy.h"
#include "llthrottle.h"
-
+#include "net.h"
class LLPacketRing
{
@@ -82,6 +82,9 @@ protected:
LLHost mLastSender;
LLHost mLastReceivingIF;
+
+private:
+ BOOL sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host);
};
diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp
new file mode 100644
index 0000000000..9988fcd9c0
--- /dev/null
+++ b/indra/llmessage/llproxy.cpp
@@ -0,0 +1,546 @@
+/**
+ * @file llproxy.cpp
+ * @brief UDP and HTTP proxy communications
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llproxy.h"
+
+#include <string>
+#include <curl/curl.h>
+
+#include "llapr.h"
+#include "llcurl.h"
+#include "llhost.h"
+
+// Static class variable instances
+
+// We want this to be static to avoid excessive indirection on every
+// incoming packet just to do a simple bool test. The getter for this
+// member is also static
+bool LLProxy::sUDPProxyEnabled = false;
+
+// Some helpful TCP static functions.
+static apr_status_t tcp_blocking_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outlen, char * datain, apr_size_t maxinlen); // Do a TCP data handshake
+static LLSocket::ptr_t tcp_open_channel(LLHost host); // Open a TCP channel to a given host
+static void tcp_close_channel(LLSocket::ptr_t* handle_ptr); // Close an open TCP channel
+
+LLProxy::LLProxy():
+ mHTTPProxyEnabled(false),
+ mProxyMutex(NULL),
+ mUDPProxy(),
+ mTCPProxy(),
+ mHTTPProxy(),
+ mProxyType(LLPROXY_SOCKS),
+ mAuthMethodSelected(METHOD_NOAUTH),
+ mSocksUsername(),
+ mSocksPassword()
+{
+}
+
+LLProxy::~LLProxy()
+{
+ stopSOCKSProxy();
+ disableHTTPProxy();
+}
+
+/**
+ * @brief Open the SOCKS 5 TCP control channel.
+ *
+ * Perform a SOCKS 5 authentication and UDP association with the proxy server.
+ *
+ * @param proxy The SOCKS 5 server to connect to.
+ * @return SOCKS_OK if successful, otherwise a socks error code from llproxy.h.
+ */
+S32 LLProxy::proxyHandshake(LLHost proxy)
+{
+ S32 result;
+
+ /* SOCKS 5 Auth request */
+ socks_auth_request_t socks_auth_request;
+ socks_auth_response_t socks_auth_response;
+
+ socks_auth_request.version = SOCKS_VERSION; // SOCKS version 5
+ socks_auth_request.num_methods = 1; // Sending 1 method.
+ socks_auth_request.methods = getSelectedAuthMethod(); // Send only the selected method.
+
+ result = tcp_blocking_handshake(mProxyControlChannel,
+ static_cast<char*>(static_cast<void*>(&socks_auth_request)),
+ sizeof(socks_auth_request),
+ static_cast<char*>(static_cast<void*>(&socks_auth_response)),
+ sizeof(socks_auth_response));
+ if (result != APR_SUCCESS)
+ {
+ LL_WARNS("Proxy") << "SOCKS authentication request failed, error on TCP control channel : " << result << LL_ENDL;
+ stopSOCKSProxy();
+ return SOCKS_CONNECT_ERROR;
+ }
+
+ if (socks_auth_response.method == AUTH_NOT_ACCEPTABLE)
+ {
+ LL_WARNS("Proxy") << "SOCKS 5 server refused all our authentication methods." << LL_ENDL;
+ stopSOCKSProxy();
+ return SOCKS_NOT_ACCEPTABLE;
+ }
+
+ /* SOCKS 5 USERNAME/PASSWORD authentication */
+ if (socks_auth_response.method == METHOD_PASSWORD)
+ {
+ // The server has requested a username/password combination
+ std::string socks_username(getSocksUser());
+ std::string socks_password(getSocksPwd());
+ U32 request_size = socks_username.size() + socks_password.size() + 3;
+ char * password_auth = new char[request_size];
+ password_auth[0] = 0x01;
+ password_auth[1] = socks_username.size();
+ memcpy(&password_auth[2], socks_username.c_str(), socks_username.size());
+ password_auth[socks_username.size() + 2] = socks_password.size();
+ memcpy(&password_auth[socks_username.size() + 3], socks_password.c_str(), socks_password.size());
+
+ authmethod_password_reply_t password_reply;
+
+ result = tcp_blocking_handshake(mProxyControlChannel,
+ password_auth,
+ request_size,
+ static_cast<char*>(static_cast<void*>(&password_reply)),
+ sizeof(password_reply));
+ delete[] password_auth;
+
+ if (result != APR_SUCCESS)
+ {
+ LL_WARNS("Proxy") << "SOCKS authentication failed, error on TCP control channel : " << result << LL_ENDL;
+ stopSOCKSProxy();
+ return SOCKS_CONNECT_ERROR;
+ }
+
+ if (password_reply.status != AUTH_SUCCESS)
+ {
+ LL_WARNS("Proxy") << "SOCKS authentication failed" << LL_ENDL;
+ stopSOCKSProxy();
+ return SOCKS_AUTH_FAIL;
+ }
+ }
+
+ /* SOCKS5 connect request */
+
+ socks_command_request_t connect_request;
+ socks_command_response_t connect_reply;
+
+ connect_request.version = SOCKS_VERSION; // SOCKS V5
+ connect_request.command = COMMAND_UDP_ASSOCIATE; // Associate UDP
+ connect_request.reserved = FIELD_RESERVED;
+ connect_request.atype = ADDRESS_IPV4;
+ connect_request.address = htonl(0); // 0.0.0.0
+ connect_request.port = htons(0); // 0
+ // "If the client is not in possession of the information at the time of the UDP ASSOCIATE,
+ // the client MUST use a port number and address of all zeros. RFC 1928"
+
+ result = tcp_blocking_handshake(mProxyControlChannel,
+ static_cast<char*>(static_cast<void*>(&connect_request)),
+ sizeof(connect_request),
+ static_cast<char*>(static_cast<void*>(&connect_reply)),
+ sizeof(connect_reply));
+ if (result != APR_SUCCESS)
+ {
+ LL_WARNS("Proxy") << "SOCKS connect request failed, error on TCP control channel : " << result << LL_ENDL;
+ stopSOCKSProxy();
+ return SOCKS_CONNECT_ERROR;
+ }
+
+ if (connect_reply.reply != REPLY_REQUEST_GRANTED)
+ {
+ LL_WARNS("Proxy") << "Connection to SOCKS 5 server failed, UDP forward request not granted" << LL_ENDL;
+ stopSOCKSProxy();
+ return SOCKS_UDP_FWD_NOT_GRANTED;
+ }
+
+ mUDPProxy.setPort(ntohs(connect_reply.port)); // reply port is in network byte order
+ mUDPProxy.setAddress(proxy.getAddress());
+ // The connection was successful. We now have the UDP port to send requests that need forwarding to.
+ LL_INFOS("Proxy") << "SOCKS 5 UDP proxy connected on " << mUDPProxy << LL_ENDL;
+
+ return SOCKS_OK;
+}
+
+/**
+ * @brief Initiates a SOCKS 5 proxy session.
+ *
+ * Performs basic checks on host to verify that it is a valid address. Opens the control channel
+ * and then negotiates the proxy connection with the server. Closes any existing SOCKS
+ * connection before proceeding. Also disables an HTTP proxy if it is using SOCKS as the proxy.
+ *
+ *
+ * @param host Socks server to connect to.
+ * @return SOCKS_OK if successful, otherwise a SOCKS error code defined in llproxy.h.
+ */
+S32 LLProxy::startSOCKSProxy(LLHost host)
+{
+ if (host.isOk())
+ {
+ mTCPProxy = host;
+ }
+ else
+ {
+ return SOCKS_INVALID_HOST;
+ }
+
+ // Close any running SOCKS connection.
+ stopSOCKSProxy();
+
+ mProxyControlChannel = tcp_open_channel(mTCPProxy);
+ if (!mProxyControlChannel)
+ {
+ return SOCKS_HOST_CONNECT_FAILED;
+ }
+
+ S32 status = proxyHandshake(mTCPProxy);
+
+ if (status != SOCKS_OK)
+ {
+ // Shut down the proxy if any of the above steps failed.
+ stopSOCKSProxy();
+ }
+ else
+ {
+ // Connection was successful.
+ sUDPProxyEnabled = true;
+ }
+
+ return status;
+}
+
+/**
+ * @brief Stop using the SOCKS 5 proxy.
+ *
+ * This will stop sending UDP packets through the SOCKS 5 proxy
+ * and will also stop the HTTP proxy if it is configured to use SOCKS.
+ * The proxy control channel will also be disconnected.
+ */
+void LLProxy::stopSOCKSProxy()
+{
+ sUDPProxyEnabled = false;
+
+ // If the SOCKS proxy is requested to stop and we are using that for HTTP as well
+ // then we must shut down any HTTP proxy operations. But it is allowable if web
+ // proxy is being used to continue proxying HTTP.
+
+ if (LLPROXY_SOCKS == getHTTPProxyType())
+ {
+ disableHTTPProxy();
+ }
+
+ if (mProxyControlChannel)
+ {
+ tcp_close_channel(&mProxyControlChannel);
+ }
+}
+
+/**
+ * @brief Set the proxy's SOCKS authentication method to none.
+ */
+void LLProxy::setAuthNone()
+{
+ LLMutexLock lock(&mProxyMutex);
+
+ mAuthMethodSelected = METHOD_NOAUTH;
+}
+
+/**
+ * @brief Set the proxy's SOCKS authentication method to password.
+ *
+ * Check whether the lengths of the supplied username
+ * and password conform to the lengths allowed by the
+ * SOCKS protocol.
+ *
+ * @param username The SOCKS username to send.
+ * @param password The SOCKS password to send.
+ * @return Return true if applying the settings was successful. No changes are made if false.
+ *
+ */
+bool LLProxy::setAuthPassword(const std::string &username, const std::string &password)
+{
+ if (username.length() > SOCKSMAXUSERNAMELEN || password.length() > SOCKSMAXPASSWORDLEN ||
+ username.length() < SOCKSMINUSERNAMELEN || password.length() < SOCKSMINPASSWORDLEN)
+ {
+ LL_WARNS("Proxy") << "Invalid SOCKS 5 password or username length." << LL_ENDL;
+ return false;
+ }
+
+ LLMutexLock lock(&mProxyMutex);
+
+ mAuthMethodSelected = METHOD_PASSWORD;
+ mSocksUsername = username;
+ mSocksPassword = password;
+
+ return true;
+}
+
+/**
+ * @brief Enable the HTTP proxy for either SOCKS or HTTP.
+ *
+ * Check the supplied host to see if it is a valid IP and port.
+ *
+ * @param httpHost Proxy server to connect to.
+ * @param type Is the host a SOCKS or HTTP proxy.
+ * @return Return true if applying the setting was successful. No changes are made if false.
+ */
+bool LLProxy::enableHTTPProxy(LLHost httpHost, LLHttpProxyType type)
+{
+ if (!httpHost.isOk())
+ {
+ LL_WARNS("Proxy") << "Invalid SOCKS 5 Server" << LL_ENDL;
+ return false;
+ }
+
+ LLMutexLock lock(&mProxyMutex);
+
+ mHTTPProxy = httpHost;
+ mProxyType = type;
+
+ mHTTPProxyEnabled = true;
+
+ return true;
+}
+
+/**
+ * @brief Enable the HTTP proxy without changing the proxy settings.
+ *
+ * This should not be called unless the proxy has already been set up.
+ *
+ * @return Return true only if the current settings are valid and the proxy was enabled.
+ */
+bool LLProxy::enableHTTPProxy()
+{
+ bool ok;
+
+ LLMutexLock lock(&mProxyMutex);
+
+ ok = (mHTTPProxy.isOk());
+ if (ok)
+ {
+ mHTTPProxyEnabled = true;
+ }
+
+ return ok;
+}
+
+/**
+ * @brief Disable the HTTP proxy.
+ */
+void LLProxy::disableHTTPProxy()
+{
+ LLMutexLock lock(&mProxyMutex);
+
+ mHTTPProxyEnabled = false;
+}
+
+/**
+ * @brief Get the currently selected HTTP proxy type
+ */
+LLHttpProxyType LLProxy::getHTTPProxyType() const
+{
+ LLMutexLock lock(&mProxyMutex);
+ return mProxyType;
+}
+
+/**
+ * @brief Get the SOCKS 5 password.
+ */
+std::string LLProxy::getSocksPwd() const
+{
+ LLMutexLock lock(&mProxyMutex);
+ return mSocksPassword;
+}
+
+/**
+ * @brief Get the SOCKS 5 username.
+ */
+std::string LLProxy::getSocksUser() const
+{
+ LLMutexLock lock(&mProxyMutex);
+ return mSocksUsername;
+}
+
+/**
+ * @brief Get the currently selected SOCKS 5 authentication method.
+ *
+ * @return Returns either none or password.
+ */
+LLSocks5AuthType LLProxy::getSelectedAuthMethod() const
+{
+ LLMutexLock lock(&mProxyMutex);
+ return mAuthMethodSelected;
+}
+
+/**
+ * @brief Stop the LLProxy and make certain that any APR pools and classes are deleted before terminating APR.
+ *
+ * Deletes the LLProxy singleton, destroying the APR pool used by the control channel as well as .
+ */
+//static
+void LLProxy::cleanupClass()
+{
+ getInstance()->stopSOCKSProxy();
+ deleteSingleton();
+}
+
+void LLProxy::applyProxySettings(LLCurlEasyRequest* handle)
+{
+ applyProxySettings(handle->getEasy());
+}
+
+void LLProxy::applyProxySettings(LLCurl::Easy* handle)
+{
+ applyProxySettings(handle->getCurlHandle());
+}
+
+/**
+ * @brief Apply proxy settings to a CuRL request if an HTTP proxy is enabled.
+ *
+ * This method has been designed to be safe to call from
+ * any thread in the viewer. This allows requests in the
+ * texture fetch thread to be aware of the proxy settings.
+ * When the HTTP proxy is enabled, the proxy mutex will
+ * be locked every time this method is called.
+ *
+ * @param handle A pointer to a valid CURL request, before it has been performed.
+ */
+void LLProxy::applyProxySettings(CURL* handle)
+{
+ // Do a faster unlocked check to see if we are supposed to proxy.
+ if (mHTTPProxyEnabled)
+ {
+ // We think we should proxy, lock the proxy mutex.
+ LLMutexLock lock(&mProxyMutex);
+ // Now test again to verify that the proxy wasn't disabled between the first check and the lock.
+ if (mHTTPProxyEnabled)
+ {
+ LLCurlFF::check_easy_code(curl_easy_setopt(handle, CURLOPT_PROXY, mHTTPProxy.getIPString().c_str()));
+ LLCurlFF::check_easy_code(curl_easy_setopt(handle, CURLOPT_PROXYPORT, mHTTPProxy.getPort()));
+
+ if (mProxyType == LLPROXY_SOCKS)
+ {
+ LLCurlFF::check_easy_code(curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5));
+ if (mAuthMethodSelected == METHOD_PASSWORD)
+ {
+ std::string auth_string = mSocksUsername + ":" + mSocksPassword;
+ LLCurlFF::check_easy_code(curl_easy_setopt(handle, CURLOPT_PROXYUSERPWD, auth_string.c_str()));
+ }
+ }
+ else
+ {
+ LLCurlFF::check_easy_code(curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP));
+ }
+ }
+ }
+}
+
+/**
+ * @brief Send one TCP packet and receive one in return.
+ *
+ * This operation is done synchronously with a 1000ms timeout. Therefore, it should not be used when a blocking
+ * operation would impact the operation of the viewer.
+ *
+ * @param handle_ptr Pointer to a connected LLSocket of type STREAM_TCP.
+ * @param dataout Data to send.
+ * @param outlen Length of dataout.
+ * @param datain Buffer for received data. Undefined if return value is not APR_SUCCESS.
+ * @param maxinlen Maximum possible length of received data. Short reads are allowed.
+ * @return Indicates APR status code of exchange. APR_SUCCESS if exchange was successful, -1 if invalid data length was received.
+ */
+static apr_status_t tcp_blocking_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outlen, char * datain, apr_size_t maxinlen)
+{
+ apr_socket_t* apr_socket = handle->getSocket();
+ apr_status_t rv = APR_SUCCESS;
+
+ apr_size_t expected_len = outlen;
+
+ handle->setBlocking(1000);
+
+ rv = apr_socket_send(apr_socket, dataout, &outlen);
+ if (APR_SUCCESS != rv)
+ {
+ LL_WARNS("Proxy") << "Error sending data to proxy control channel, status: " << rv << LL_ENDL;
+ ll_apr_warn_status(rv);
+ }
+ else if (expected_len != outlen)
+ {
+ LL_WARNS("Proxy") << "Incorrect data length sent. Expected: " << expected_len <<
+ " Sent: " << outlen << LL_ENDL;
+ rv = -1;
+ }
+
+ if (APR_SUCCESS == rv)
+ {
+ expected_len = maxinlen;
+ rv = apr_socket_recv(apr_socket, datain, &maxinlen);
+ if (rv != APR_SUCCESS)
+ {
+ LL_WARNS("Proxy") << "Error receiving data from proxy control channel, status: " << rv << LL_ENDL;
+ ll_apr_warn_status(rv);
+ }
+ else if (expected_len < maxinlen)
+ {
+ LL_WARNS("Proxy") << "Incorrect data length received. Expected: " << expected_len <<
+ " Received: " << maxinlen << LL_ENDL;
+ rv = -1;
+ }
+ }
+
+ handle->setNonBlocking();
+
+ return rv;
+}
+
+/**
+ * @brief Open a LLSocket and do a blocking connect to the chosen host.
+ *
+ * Checks for a successful connection, and makes sure the connection is closed if it fails.
+ *
+ * @param host The host to open the connection to.
+ * @return The created socket. Will evaluate as NULL if the connection is unsuccessful.
+ */
+static LLSocket::ptr_t tcp_open_channel(LLHost host)
+{
+ LLSocket::ptr_t socket = LLSocket::create(NULL, LLSocket::STREAM_TCP);
+ bool connected = socket->blockingConnect(host);
+ if (!connected)
+ {
+ tcp_close_channel(&socket);
+ }
+
+ return socket;
+}
+
+/**
+ * @brief Close the socket.
+ *
+ * @param handle_ptr The handle of the socket being closed. A pointer-to-pointer to avoid increasing the use count.
+ */
+static void tcp_close_channel(LLSocket::ptr_t* handle_ptr)
+{
+ LL_DEBUGS("Proxy") << "Resetting proxy LLSocket handle, use_count == " << handle_ptr->use_count() << LL_ENDL;
+ handle_ptr->reset();
+}
diff --git a/indra/llmessage/llproxy.h b/indra/llmessage/llproxy.h
new file mode 100644
index 0000000000..a919370540
--- /dev/null
+++ b/indra/llmessage/llproxy.h
@@ -0,0 +1,352 @@
+/**
+ * @file llproxy.h
+ * @brief UDP and HTTP proxy communications
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_PROXY_H
+#define LL_PROXY_H
+
+#include "llcurl.h"
+#include "llhost.h"
+#include "lliosocket.h"
+#include "llmemory.h"
+#include "llsingleton.h"
+#include "llthread.h"
+#include <string>
+
+// SOCKS error codes returned from the StartProxy method
+#define SOCKS_OK 0
+#define SOCKS_CONNECT_ERROR (-1)
+#define SOCKS_NOT_PERMITTED (-2)
+#define SOCKS_NOT_ACCEPTABLE (-3)
+#define SOCKS_AUTH_FAIL (-4)
+#define SOCKS_UDP_FWD_NOT_GRANTED (-5)
+#define SOCKS_HOST_CONNECT_FAILED (-6)
+#define SOCKS_INVALID_HOST (-7)
+
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN (255 + 1) /* socks5: 255, +1 for len. */
+#endif
+
+#define SOCKSMAXUSERNAMELEN 255
+#define SOCKSMAXPASSWORDLEN 255
+
+#define SOCKSMINUSERNAMELEN 1
+#define SOCKSMINPASSWORDLEN 1
+
+#define SOCKS_VERSION 0x05 // we are using SOCKS 5
+
+#define SOCKS_HEADER_SIZE 10
+
+// SOCKS 5 address/hostname types
+#define ADDRESS_IPV4 0x01
+#define ADDRESS_HOSTNAME 0x03
+#define ADDRESS_IPV6 0x04
+
+// Lets just use our own ipv4 struct rather than dragging in system
+// specific headers
+union ipv4_address_t {
+ U8 octets[4];
+ U32 addr32;
+};
+
+// SOCKS 5 control channel commands
+#define COMMAND_TCP_STREAM 0x01
+#define COMMAND_TCP_BIND 0x02
+#define COMMAND_UDP_ASSOCIATE 0x03
+
+// SOCKS 5 command replies
+#define REPLY_REQUEST_GRANTED 0x00
+#define REPLY_GENERAL_FAIL 0x01
+#define REPLY_RULESET_FAIL 0x02
+#define REPLY_NETWORK_UNREACHABLE 0x03
+#define REPLY_HOST_UNREACHABLE 0x04
+#define REPLY_CONNECTION_REFUSED 0x05
+#define REPLY_TTL_EXPIRED 0x06
+#define REPLY_PROTOCOL_ERROR 0x07
+#define REPLY_TYPE_NOT_SUPPORTED 0x08
+
+#define FIELD_RESERVED 0x00
+
+// The standard SOCKS 5 request packet
+// Push current alignment to stack and set alignment to 1 byte boundary
+// This enabled us to use structs directly to set up and receive network packets
+// into the correct fields, without fear of boundary alignment causing issues
+#pragma pack(push,1)
+
+// SOCKS 5 command packet
+struct socks_command_request_t {
+ U8 version;
+ U8 command;
+ U8 reserved;
+ U8 atype;
+ U32 address;
+ U16 port;
+};
+
+// Standard SOCKS 5 reply packet
+struct socks_command_response_t {
+ U8 version;
+ U8 reply;
+ U8 reserved;
+ U8 atype;
+ U8 add_bytes[4];
+ U16 port;
+};
+
+#define AUTH_NOT_ACCEPTABLE 0xFF // reply if preferred methods are not available
+#define AUTH_SUCCESS 0x00 // reply if authentication successful
+
+// SOCKS 5 authentication request, stating which methods the client supports
+struct socks_auth_request_t {
+ U8 version;
+ U8 num_methods;
+ U8 methods; // We are only using a single method currently
+};
+
+// SOCKS 5 authentication response packet, stating server preferred method
+struct socks_auth_response_t {
+ U8 version;
+ U8 method;
+};
+
+// SOCKS 5 password reply packet
+struct authmethod_password_reply_t {
+ U8 version;
+ U8 status;
+};
+
+// SOCKS 5 UDP packet header
+struct proxywrap_t {
+ U16 rsv;
+ U8 frag;
+ U8 atype;
+ U32 addr;
+ U16 port;
+};
+
+#pragma pack(pop) /* restore original alignment from stack */
+
+
+// Currently selected HTTP proxy type
+enum LLHttpProxyType
+{
+ LLPROXY_SOCKS = 0,
+ LLPROXY_HTTP = 1
+};
+
+// Auth types
+enum LLSocks5AuthType
+{
+ METHOD_NOAUTH = 0x00, // Client supports no auth
+ METHOD_GSSAPI = 0x01, // Client supports GSSAPI (Not currently supported)
+ METHOD_PASSWORD = 0x02 // Client supports username/password
+};
+
+/**
+ * @brief Manage SOCKS 5 UDP proxy and HTTP proxy.
+ *
+ * This class is responsible for managing two interconnected tasks,
+ * connecting to a SOCKS 5 proxy for use by LLPacketRing to send UDP
+ * packets and managing proxy settings for HTTP requests.
+ *
+ * <h1>Threading:</h1>
+ * Because HTTP requests can be generated in threads outside the
+ * main thread, it is necessary for some of the information stored
+ * by this class to be available to other threads. The members that
+ * need to be read across threads are in a labeled section below.
+ * To protect those members, a mutex, mProxyMutex should be locked
+ * before reading or writing those members. Methods that can lock
+ * mProxyMutex are in a labeled section below. Those methods should
+ * not be called while the mutex is already locked.
+ *
+ * There is also a LLAtomic type flag (mHTTPProxyEnabled) that is used
+ * to track whether the HTTP proxy is currently enabled. This allows
+ * for faster unlocked checks to see if the proxy is enabled. This
+ * allows us to cut down on the performance hit when the proxy is
+ * disabled compared to before this class was introduced.
+ *
+ * <h1>UDP Proxying:</h1>
+ * UDP datagrams are proxied via a SOCKS 5 proxy with the UDP associate
+ * command. To initiate the proxy, a TCP socket connection is opened
+ * to the SOCKS 5 host, and after a handshake exchange, the server
+ * returns a port and address to send the UDP traffic that is to be
+ * proxied to. The LLProxy class tracks this address and port after the
+ * exchange and provides it to LLPacketRing when required to. All UDP
+ * proxy management occurs in the main thread.
+ *
+ * <h1>HTTP Proxying:</h1>
+ * This class allows all viewer HTTP packets to be sent through a proxy.
+ * The user can select whether to send HTTP packets through a standard
+ * "web" HTTP proxy, through a SOCKS 5 proxy, or to not proxy HTTP
+ * communication. This class does not manage the integrated web browser
+ * proxy, which is handled in llviewermedia.cpp.
+ *
+ * The implementation of HTTP proxying is handled by libcurl. LLProxy
+ * is responsible for managing the HTTP proxy options and provides a
+ * thread-safe method to apply those options to a curl request
+ * (LLProxy::applyProxySettings()). This method is overloaded
+ * to accommodate the various abstraction libcurl layers that exist
+ * throughout the viewer (LLCurlEasyRequest, LLCurl::Easy, and CURL).
+ *
+ * If you are working with LLCurl or LLCurlEasyRequest objects,
+ * the configured proxy settings will be applied in the constructors
+ * of those request handles. If you are working with CURL objects
+ * directly, you will need to pass the handle of the request to
+ * applyProxySettings() before issuing the request.
+ *
+ * To ensure thread safety, all LLProxy members that relate to the HTTP
+ * proxy require the LLProxyMutex to be locked before accessing.
+ */
+class LLProxy: public LLSingleton<LLProxy>
+{
+ LOG_CLASS(LLProxy);
+public:
+ /*###########################################################################################
+ METHODS THAT DO NOT LOCK mProxyMutex!
+ ###########################################################################################*/
+ // Constructor, cannot have parameters due to LLSingleton parent class. Call from main thread only.
+ LLProxy();
+
+ // Static check for enabled status for UDP packets. Call from main thread only.
+ static bool isSOCKSProxyEnabled() { return sUDPProxyEnabled; }
+
+ // Get the UDP proxy address and port. Call from main thread only.
+ LLHost getUDPProxy() const { return mUDPProxy; }
+
+ /*###########################################################################################
+ END OF NON-LOCKING METHODS
+ ###########################################################################################*/
+
+ /*###########################################################################################
+ METHODS THAT LOCK mProxyMutex! DO NOT CALL WHILE mProxyMutex IS LOCKED!
+ ###########################################################################################*/
+ // Destructor, closes open connections. Do not call directly, use cleanupClass().
+ ~LLProxy();
+
+ // Delete LLProxy singleton. Allows the apr_socket used in the SOCKS 5 control channel to be
+ // destroyed before the call to apr_terminate. Call from main thread only.
+ static void cleanupClass();
+
+ // Apply the current proxy settings to a curl request. Doesn't do anything if mHTTPProxyEnabled is false.
+ // Safe to call from any thread.
+ void applyProxySettings(CURL* handle);
+ void applyProxySettings(LLCurl::Easy* handle);
+ void applyProxySettings(LLCurlEasyRequest* handle);
+
+ // Start a connection to the SOCKS 5 proxy. Call from main thread only.
+ S32 startSOCKSProxy(LLHost host);
+
+ // Disconnect and clean up any connection to the SOCKS 5 proxy. Call from main thread only.
+ void stopSOCKSProxy();
+
+ // Use Password auth when connecting to the SOCKS proxy. Call from main thread only.
+ bool setAuthPassword(const std::string &username, const std::string &password);
+
+ // Disable authentication when connecting to the SOCKS proxy. Call from main thread only.
+ void setAuthNone();
+
+ // Proxy HTTP packets via httpHost, which can be a SOCKS 5 or a HTTP proxy.
+ // as specified in type. Call from main thread only.
+ bool enableHTTPProxy(LLHost httpHost, LLHttpProxyType type);
+ bool enableHTTPProxy();
+
+ // Stop proxying HTTP packets. Call from main thread only.
+ void disableHTTPProxy();
+
+ /*###########################################################################################
+ END OF LOCKING METHODS
+ ###########################################################################################*/
+private:
+ /*###########################################################################################
+ METHODS THAT LOCK mProxyMutex! DO NOT CALL WHILE mProxyMutex IS LOCKED!
+ ###########################################################################################*/
+
+ // Perform a SOCKS 5 authentication and UDP association with the proxy server.
+ S32 proxyHandshake(LLHost proxy);
+
+ // Get the currently selected auth method.
+ LLSocks5AuthType getSelectedAuthMethod() const;
+
+ // Get the currently selected HTTP proxy type
+ LLHttpProxyType getHTTPProxyType() const;
+
+ std::string getSocksPwd() const;
+ std::string getSocksUser() const;
+
+ /*###########################################################################################
+ END OF LOCKING METHODS
+ ###########################################################################################*/
+
+private:
+ // Is the HTTP proxy enabled? Safe to read in any thread, but do not write directly.
+ // Instead use enableHTTPProxy() and disableHTTPProxy() instead.
+ mutable LLAtomic32<bool> mHTTPProxyEnabled;
+
+ // Mutex to protect shared members in non-main thread calls to applyProxySettings().
+ mutable LLMutex mProxyMutex;
+
+ /*###########################################################################################
+ MEMBERS READ AND WRITTEN ONLY IN THE MAIN THREAD. DO NOT SHARE!
+ ###########################################################################################*/
+
+ // Is the UDP proxy enabled?
+ static bool sUDPProxyEnabled;
+
+ // UDP proxy address and port
+ LLHost mUDPProxy;
+ // TCP proxy control channel address and port
+ LLHost mTCPProxy;
+
+ // socket handle to proxy TCP control channel
+ LLSocket::ptr_t mProxyControlChannel;
+
+ /*###########################################################################################
+ END OF UNSHARED MEMBERS
+ ###########################################################################################*/
+
+ /*###########################################################################################
+ MEMBERS WRITTEN IN MAIN THREAD AND READ IN ANY THREAD. ONLY READ OR WRITE AFTER LOCKING mProxyMutex!
+ ###########################################################################################*/
+
+ // HTTP proxy address and port
+ LLHost mHTTPProxy;
+
+ // Currently selected HTTP proxy type. Can be web or socks.
+ LLHttpProxyType mProxyType;
+
+ // SOCKS 5 selected authentication method.
+ LLSocks5AuthType mAuthMethodSelected;
+
+ // SOCKS 5 username
+ std::string mSocksUsername;
+ // SOCKS 5 password
+ std::string mSocksPassword;
+
+ /*###########################################################################################
+ END OF SHARED MEMBERS
+ ###########################################################################################*/
+};
+
+#endif
diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp
index 304a692cdf..3d8ca2ad9f 100644
--- a/indra/llmessage/llsdmessagereader.cpp
+++ b/indra/llmessage/llsdmessagereader.cpp
@@ -291,9 +291,10 @@ S32 getElementSize(const LLSD& llsd)
case LLSD::TypeMap:
case LLSD::TypeArray:
case LLSD::TypeUndefined:
+ default: // TypeLLSDTypeEnd, TypeLLSDNumTypes, etc.
return 0;
}
- return 0;
+ //return 0;
}
//virtual
diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp
index 86fe5c7912..91fd070f07 100644
--- a/indra/llmessage/llsdrpcclient.cpp
+++ b/indra/llmessage/llsdrpcclient.cpp
@@ -82,6 +82,8 @@ bool LLSDRPCResponse::extractResponse(const LLSD& sd)
return rv;
}
+static LLFastTimer::DeclareTimer FTM_SDRPC_RESPONSE("SDRPC Response");
+
// virtual
LLIOPipe::EStatus LLSDRPCResponse::process_impl(
const LLChannelDescriptors& channels,
@@ -90,6 +92,7 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_SDRPC_RESPONSE);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
if(mIsError)
@@ -178,6 +181,8 @@ bool LLSDRPCClient::call(
return true;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_SDRPC_CLIENT("SDRPC Client");
+
// virtual
LLIOPipe::EStatus LLSDRPCClient::process_impl(
const LLChannelDescriptors& channels,
@@ -186,6 +191,7 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SDRPC_CLIENT);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
if((STATE_NONE == mState) || (!pump))
diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp
index f87c418fb1..9f776aca72 100644
--- a/indra/llmessage/llsdrpcserver.cpp
+++ b/indra/llmessage/llsdrpcserver.cpp
@@ -97,6 +97,8 @@ void LLSDRPCServer::clearLock()
}
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_SDRPC_SERVER("SDRPC Server");
+
// virtual
LLIOPipe::EStatus LLSDRPCServer::process_impl(
const LLChannelDescriptors& channels,
@@ -105,6 +107,7 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_SDRPC_SERVER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
// lldebugs << "LLSDRPCServer::process_impl" << llendl;
diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp
index f470e1b2a5..ab91f74abe 100644
--- a/indra/llmessage/lltemplatemessagereader.cpp
+++ b/indra/llmessage/lltemplatemessagereader.cpp
@@ -795,7 +795,7 @@ const char* LLTemplateMessageReader::getMessageName() const
{
if (!mCurrentRMessageTemplate)
{
- llwarns << "no mCurrentRMessageTemplate" << llendl;
+ // no message currently being read
return "";
}
return mCurrentRMessageTemplate->mName;
diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp
index 28bd09fc4c..fa03bb7512 100644
--- a/indra/llmessage/llurlrequest.cpp
+++ b/indra/llmessage/llurlrequest.cpp
@@ -35,6 +35,7 @@
#include "llcurl.h"
#include "llioutil.h"
#include "llmemtype.h"
+#include "llproxy.h"
#include "llpumpio.h"
#include "llsd.h"
#include "llstring.h"
@@ -270,6 +271,8 @@ LLIOPipe::EStatus LLURLRequest::handleError(
return status;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST("URL Request");
+
// virtual
LLIOPipe::EStatus LLURLRequest::process_impl(
const LLChannelDescriptors& channels,
@@ -278,6 +281,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_URL_REQUEST);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
//llinfos << "LLURLRequest::process_impl()" << llendl;
@@ -288,6 +292,8 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
const S32 MIN_ACCUMULATION = 100000;
if(pump && (mDetail->mByteAccumulator > MIN_ACCUMULATION))
{
+ static LLFastTimer::DeclareTimer FTM_URL_ADJUST_TIMEOUT("Adjust Timeout");
+ LLFastTimer t(FTM_URL_ADJUST_TIMEOUT);
// This is a pretty sloppy calculation, but this
// tries to make the gross assumption that if data
// is coming in at 56kb/s, then this transfer will
@@ -335,16 +341,30 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
{
PUMP_DEBUG;
LLIOPipe::EStatus status = STATUS_BREAK;
- mDetail->mCurlRequest->perform();
+ static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform");
+ {
+ LLFastTimer t(FTM_URL_PERFORM);
+ mDetail->mCurlRequest->perform();
+ }
+
while(1)
{
CURLcode result;
- bool newmsg = mDetail->mCurlRequest->getResult(&result);
+
+ static LLFastTimer::DeclareTimer FTM_PROCESS_URL_REQUEST_GET_RESULT("Get Result");
+
+ bool newmsg = false;
+ {
+ LLFastTimer t(FTM_PROCESS_URL_REQUEST_GET_RESULT);
+ newmsg = mDetail->mCurlRequest->getResult(&result);
+ }
+
if(!newmsg)
{
// keep processing
break;
}
+
mState = STATE_HAVE_RESPONSE;
context[CONTEXT_REQUEST][CONTEXT_TRANSFERED_BYTES] = mRequestTransferedBytes;
@@ -370,7 +390,11 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
link.mChannels = LLBufferArray::makeChannelConsumer(
channels);
chain.push_back(link);
- pump->respond(chain, buffer, context);
+ static LLFastTimer::DeclareTimer FTM_PROCESS_URL_PUMP_RESPOND("Pump Respond");
+ {
+ LLFastTimer t(FTM_PROCESS_URL_PUMP_RESPOND);
+ pump->respond(chain, buffer, context);
+ }
mCompletionCallback = NULL;
}
break;
@@ -422,8 +446,11 @@ void LLURLRequest::initialize()
mResponseTransferedBytes = 0;
}
+static LLFastTimer::DeclareTimer FTM_URL_REQUEST_CONFIGURE("URL Configure");
bool LLURLRequest::configure()
{
+ LLFastTimer t(FTM_URL_REQUEST_CONFIGURE);
+
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
bool rv = false;
S32 bytes = mDetail->mResponseBuffer->countAfter(
@@ -624,6 +651,7 @@ static size_t headerCallback(void* data, size_t size, size_t nmemb, void* user)
return header_len;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_URL_EXTRACTOR("URL Extractor");
/**
* LLContextURLExtractor
*/
@@ -635,6 +663,7 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_URL_EXTRACTOR);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
// The destination host is in the context.
@@ -713,6 +742,7 @@ void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status)
mRequestStatus = status;
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_URL_COMPLETE("URL Complete");
// virtual
LLIOPipe::EStatus LLURLRequestComplete::process_impl(
const LLChannelDescriptors& channels,
@@ -721,6 +751,7 @@ LLIOPipe::EStatus LLURLRequestComplete::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_PROCESS_URL_COMPLETE);
PUMP_DEBUG;
complete(channels, buffer);
return STATUS_OK;
diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp
index 97611c3b51..85aef5da00 100644
--- a/indra/llmessage/net.cpp
+++ b/indra/llmessage/net.cpp
@@ -50,7 +50,6 @@
#include "lltimer.h"
#include "indra_constants.h"
-
// Globals
#if LL_WINDOWS
@@ -174,7 +173,7 @@ U32 ip_string_to_u32(const char* ip_string)
// use wildcard addresses. -Ambroff
U32 ip = inet_addr(ip_string);
if (ip == INADDR_NONE
- && strncmp(ip_string, BROADCAST_ADDRESS_STRING, MAXADDRSTR) != 0)
+ && strncmp(ip_string, BROADCAST_ADDRESS_STRING, MAXADDRSTR) != 0)
{
llwarns << "ip_string_to_u32() failed, Error: Invalid IP string '" << ip_string << "'" << llendl;
return INVALID_HOST_IP_ADDRESS;
@@ -188,11 +187,11 @@ U32 ip_string_to_u32(const char* ip_string)
//////////////////////////////////////////////////////////////////////////////////////////
#if LL_WINDOWS
-
+
S32 start_net(S32& socket_out, int& nPort)
{
// Create socket, make non-blocking
- // Init WinSock
+ // Init WinSock
int nRet;
int hSocket;
@@ -201,7 +200,7 @@ S32 start_net(S32& socket_out, int& nPort)
int buff_size = 4;
// Initialize windows specific stuff
- if(WSAStartup(0x0202, &stWSAData))
+ if (WSAStartup(0x0202, &stWSAData))
{
S32 err = WSAGetLastError();
WSACleanup();
@@ -210,8 +209,8 @@ S32 start_net(S32& socket_out, int& nPort)
}
// Get a datagram socket
- hSocket = (int)socket(AF_INET, SOCK_DGRAM, 0);
- if (hSocket == INVALID_SOCKET)
+ hSocket = (int)socket(AF_INET, SOCK_DGRAM, 0);
+ if (hSocket == INVALID_SOCKET)
{
S32 err = WSAGetLastError();
WSACleanup();
@@ -304,7 +303,7 @@ S32 start_net(S32& socket_out, int& nPort)
// Setup a destination address
stDstAddr.sin_family = AF_INET;
stDstAddr.sin_addr.s_addr = INVALID_HOST_IP_ADDRESS;
- stDstAddr.sin_port = htons(nPort);
+ stDstAddr.sin_port = htons(nPort);
socket_out = hSocket;
return 0;
@@ -393,10 +392,10 @@ S32 start_net(S32& socket_out, int& nPort)
int rec_size = RECEIVE_BUFFER_SIZE;
socklen_t buff_size = 4;
-
+
// Create socket
- hSocket = socket(AF_INET, SOCK_DGRAM, 0);
- if (hSocket < 0)
+ hSocket = socket(AF_INET, SOCK_DGRAM, 0);
+ if (hSocket < 0)
{
llwarns << "socket() failed" << llendl;
return 1;
@@ -429,7 +428,7 @@ S32 start_net(S32& socket_out, int& nPort)
}
else
{
- // Name the socket (assign the local port number to receive on)
+ // Name the socket (assign the local port number to receive on)
stLclAddr.sin_family = AF_INET;
stLclAddr.sin_addr.s_addr = htonl(INADDR_ANY);
stLclAddr.sin_port = htons(nPort);
@@ -474,7 +473,7 @@ S32 start_net(S32& socket_out, int& nPort)
nPort = attempt_port;
}
// Set socket to be non-blocking
- fcntl(hSocket, F_SETFL, O_NONBLOCK);
+ fcntl(hSocket, F_SETFL, O_NONBLOCK);
// set a large receive buffer
nRet = setsockopt(hSocket, SOL_SOCKET, SO_RCVBUF, (char *)&rec_size, buff_size);
if (nRet)
@@ -510,8 +509,8 @@ S32 start_net(S32& socket_out, int& nPort)
// Setup a destination address
char achMCAddr[MAXADDRSTR] = "127.0.0.1"; /* Flawfinder: ignore */
stDstAddr.sin_family = AF_INET;
- stDstAddr.sin_addr.s_addr = ip_string_to_u32(achMCAddr);
- stDstAddr.sin_port = htons(nPort);
+ stDstAddr.sin_addr.s_addr = ip_string_to_u32(achMCAddr);
+ stDstAddr.sin_port = htons(nPort);
socket_out = hSocket;
return 0;
@@ -537,7 +536,7 @@ static int recvfrom_destip( int socket, void *buf, int len, struct sockaddr *fro
iov[0].iov_base = buf;
iov[0].iov_len = len;
- memset( &msg, 0, sizeof msg );
+ memset(&msg, 0, sizeof msg);
msg.msg_name = from;
msg.msg_namelen = *fromlen;
msg.msg_iov = iov;
@@ -545,14 +544,14 @@ static int recvfrom_destip( int socket, void *buf, int len, struct sockaddr *fro
msg.msg_control = &cmsg;
msg.msg_controllen = sizeof(cmsg);
- size = recvmsg( socket, &msg, 0 );
+ size = recvmsg(socket, &msg, 0);
- if( size == -1 )
+ if (size == -1)
{
return -1;
}
- for( cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != NULL; cmsgptr = CMSG_NXTHDR( &msg, cmsgptr ) )
+ for (cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != NULL; cmsgptr = CMSG_NXTHDR( &msg, cmsgptr))
{
if( cmsgptr->cmsg_level == SOL_IP && cmsgptr->cmsg_type == IP_PKTINFO )
{
@@ -650,7 +649,7 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient,
}
}
}
- while ( resend && send_attempts < 3);
+ while (resend && send_attempts < 3);
if (send_attempts >= 3)
{
diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h
index 9f4f5c5821..0f2437479d 100644
--- a/indra/llmessage/net.h
+++ b/indra/llmessage/net.h
@@ -46,10 +46,10 @@ S32 receive_packet(int hSocket, char * receiveBuffer);
BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort); // Returns TRUE on success.
//void get_sender(char * tmp);
-LLHost get_sender();
+LLHost get_sender();
U32 get_sender_port();
U32 get_sender_ip(void);
-LLHost get_receiving_interface();
+LLHost get_receiving_interface();
U32 get_receiving_interface_ip(void);
const char* u32_to_ip_string(U32 ip); // Returns pointer to internal string buffer, "(bad IP addr)" on failure, cannot nest calls
diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt
index 2f28673c07..1353b7a458 100644
--- a/indra/llplugin/CMakeLists.txt
+++ b/indra/llplugin/CMakeLists.txt
@@ -68,18 +68,18 @@ add_subdirectory(slplugin)
# Add tests
if (LL_TESTS)
- include(LLAddBuildTest)
- # UNIT TESTS
- SET(llplugin_TEST_SOURCE_FILES
- llplugincookiestore.cpp
- )
+ include(LLAddBuildTest)
+ # UNIT TESTS
+ SET(llplugin_TEST_SOURCE_FILES
+ llplugincookiestore.cpp
+ )
- # llplugincookiestore has a dependency on curl, so we need to link the curl library into the test.
- set_source_files_properties(
- llplugincookiestore.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${CURL_LIBRARIES}"
- )
+ # llplugincookiestore has a dependency on curl, so we need to link the curl library into the test.
+ set_source_files_properties(
+ llplugincookiestore.cpp
+ PROPERTIES
+ LL_TEST_ADDITIONAL_LIBRARIES "${CURL_LIBRARIES}"
+ )
- LL_ADD_PROJECT_UNIT_TESTS(llplugin "${llplugin_TEST_SOURCE_FILES}")
+ LL_ADD_PROJECT_UNIT_TESTS(llplugin "${llplugin_TEST_SOURCE_FILES}")
endif (LL_TESTS)
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index d3d0403bbb..dbd96673a1 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -1,1424 +1,1453 @@
-/**
- * @file llpluginclassmedia.cpp
- * @brief LLPluginClassMedia handles a plugin which knows about the "media" message class.
- *
- * @cond
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- * @endcond
- */
-
-#include "linden_common.h"
-#include "indra_constants.h"
-
-#include "llpluginclassmedia.h"
-#include "llpluginmessageclasses.h"
-
-#include "llqtwebkit.h"
-
-static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256;
-
-static int nextPowerOf2( int value )
-{
- int next_power_of_2 = 1;
- while ( next_power_of_2 < value )
- {
- next_power_of_2 <<= 1;
- }
-
- return next_power_of_2;
-}
-
-LLPluginClassMedia::LLPluginClassMedia(LLPluginClassMediaOwner *owner)
-{
- mOwner = owner;
- mPlugin = NULL;
- reset();
-
- //debug use
- mDeleteOK = true ;
-}
-
-
-LLPluginClassMedia::~LLPluginClassMedia()
-{
- llassert_always(mDeleteOK) ;
- reset();
-}
-
-bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_dir, const std::string &plugin_filename, bool debug)
-{
- LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL;
- LL_DEBUGS("Plugin") << "dir: " << plugin_dir << LL_ENDL;
- LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
-
- mPlugin = new LLPluginProcessParent(this);
- mPlugin->setSleepTime(mSleepTime);
-
- // Queue up the media init message -- it will be sent after all the currently queued messages.
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "init");
- message.setValue("target", mTarget);
- sendMessage(message);
-
- mPlugin->init(launcher_filename, plugin_dir, plugin_filename, debug);
-
- return true;
-}
-
-
-void LLPluginClassMedia::reset()
-{
- if(mPlugin != NULL)
- {
- delete mPlugin;
- mPlugin = NULL;
- }
-
- mTextureParamsReceived = false;
- mRequestedTextureDepth = 0;
- mRequestedTextureInternalFormat = 0;
- mRequestedTextureFormat = 0;
- mRequestedTextureType = 0;
- mRequestedTextureSwapBytes = false;
- mRequestedTextureCoordsOpenGL = false;
- mTextureSharedMemorySize = 0;
- mTextureSharedMemoryName.clear();
- mDefaultMediaWidth = 0;
- mDefaultMediaHeight = 0;
- mNaturalMediaWidth = 0;
- mNaturalMediaHeight = 0;
- mSetMediaWidth = -1;
- mSetMediaHeight = -1;
- mRequestedMediaWidth = 0;
- mRequestedMediaHeight = 0;
- mRequestedTextureWidth = 0;
- mRequestedTextureHeight = 0;
- mFullMediaWidth = 0;
- mFullMediaHeight = 0;
- mTextureWidth = 0;
- mTextureHeight = 0;
- mMediaWidth = 0;
- mMediaHeight = 0;
- mDirtyRect = LLRect::null;
- mAutoScaleMedia = false;
- mRequestedVolume = 1.0f;
- mPriority = PRIORITY_NORMAL;
- mLowPrioritySizeLimit = LOW_PRIORITY_TEXTURE_SIZE_DEFAULT;
- mAllowDownsample = false;
- mPadding = 0;
- mLastMouseX = 0;
- mLastMouseY = 0;
- mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
- mSleepTime = 1.0f / 100.0f;
- mCanCut = false;
- mCanCopy = false;
- mCanPaste = false;
- mMediaName.clear();
- mMediaDescription.clear();
- mBackgroundColor = LLColor4(1.0f, 1.0f, 1.0f, 1.0f);
-
- // media_browser class
- mNavigateURI.clear();
- mNavigateResultCode = -1;
- mNavigateResultString.clear();
- mHistoryBackAvailable = false;
- mHistoryForwardAvailable = false;
- mStatusText.clear();
- mProgressPercent = 0;
- mClickURL.clear();
- mClickNavType.clear();
- mClickTarget.clear();
- mClickUUID.clear();
- mStatusCode = 0;
-
- // media_time class
- mCurrentTime = 0.0f;
- mDuration = 0.0f;
- mCurrentRate = 0.0f;
- mLoadedDuration = 0.0f;
-}
-
-void LLPluginClassMedia::idle(void)
-{
- if(mPlugin)
- {
- mPlugin->idle();
- }
-
- if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()) || (mOwner == NULL))
- {
- // Can't process a size change at this time
- }
- else if((mRequestedMediaWidth != mMediaWidth) || (mRequestedMediaHeight != mMediaHeight))
- {
- // Calculate the correct size for the media texture
- mRequestedTextureHeight = mRequestedMediaHeight;
- if(mPadding < 0)
- {
- // negative values indicate the plugin wants a power of 2
- mRequestedTextureWidth = nextPowerOf2(mRequestedMediaWidth);
- }
- else
- {
- mRequestedTextureWidth = mRequestedMediaWidth;
-
- if(mPadding > 1)
- {
- // Pad up to a multiple of the specified number of bytes per row
- int rowbytes = mRequestedTextureWidth * mRequestedTextureDepth;
- int pad = rowbytes % mPadding;
- if(pad != 0)
- {
- rowbytes += mPadding - pad;
- }
-
- if(rowbytes % mRequestedTextureDepth == 0)
- {
- mRequestedTextureWidth = rowbytes / mRequestedTextureDepth;
- }
- else
- {
- LL_WARNS("Plugin") << "Unable to pad texture width, padding size " << mPadding << "is not a multiple of pixel size " << mRequestedTextureDepth << LL_ENDL;
- }
- }
- }
-
-
- // Size change has been requested but not initiated yet.
- size_t newsize = mRequestedTextureWidth * mRequestedTextureHeight * mRequestedTextureDepth;
-
- // Add an extra line for padding, just in case.
- newsize += mRequestedTextureWidth * mRequestedTextureDepth;
-
- if(newsize != mTextureSharedMemorySize)
- {
- if(!mTextureSharedMemoryName.empty())
- {
- // Tell the plugin to remove the old memory segment
- mPlugin->removeSharedMemory(mTextureSharedMemoryName);
- mTextureSharedMemoryName.clear();
- }
-
- mTextureSharedMemorySize = newsize;
- mTextureSharedMemoryName = mPlugin->addSharedMemory(mTextureSharedMemorySize);
- if(!mTextureSharedMemoryName.empty())
- {
- void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
-
- // clear texture memory to avoid random screen visual fuzz from uninitialized texture data
- memset( addr, 0x00, newsize );
-
- // We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,
- // so it may not be worthwhile.
- // mDirtyRect.setOriginAndSize(0, 0, mRequestedMediaWidth, mRequestedMediaHeight);
- }
- }
-
- // This is our local indicator that a change is in progress.
- mTextureWidth = -1;
- mTextureHeight = -1;
- mMediaWidth = -1;
- mMediaHeight = -1;
-
- // This invalidates any existing dirty rect.
- resetDirty();
-
- // Send a size change message to the plugin
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change");
- message.setValue("name", mTextureSharedMemoryName);
- message.setValueS32("width", mRequestedMediaWidth);
- message.setValueS32("height", mRequestedMediaHeight);
- message.setValueS32("texture_width", mRequestedTextureWidth);
- message.setValueS32("texture_height", mRequestedTextureHeight);
- message.setValueReal("background_r", mBackgroundColor.mV[VX]);
- message.setValueReal("background_g", mBackgroundColor.mV[VY]);
- message.setValueReal("background_b", mBackgroundColor.mV[VZ]);
- message.setValueReal("background_a", mBackgroundColor.mV[VW]);
- mPlugin->sendMessage(message); // DO NOT just use sendMessage() here -- we want this to jump ahead of the queue.
-
- LL_DEBUGS("Plugin") << "Sending size_change" << LL_ENDL;
- }
- }
-
- if(mPlugin && mPlugin->isRunning())
- {
- // Send queued messages
- while(!mSendQueue.empty())
- {
- LLPluginMessage message = mSendQueue.front();
- mSendQueue.pop();
- mPlugin->sendMessage(message);
- }
- }
-}
-
-int LLPluginClassMedia::getTextureWidth() const
-{
- return nextPowerOf2(mTextureWidth);
-}
-
-int LLPluginClassMedia::getTextureHeight() const
-{
- return nextPowerOf2(mTextureHeight);
-}
-
-unsigned char* LLPluginClassMedia::getBitsData()
-{
- unsigned char *result = NULL;
- if((mPlugin != NULL) && !mTextureSharedMemoryName.empty())
- {
- result = (unsigned char*)mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
- }
- return result;
-}
-
-void LLPluginClassMedia::setSize(int width, int height)
-{
- if((width > 0) && (height > 0))
- {
- mSetMediaWidth = width;
- mSetMediaHeight = height;
- }
- else
- {
- mSetMediaWidth = -1;
- mSetMediaHeight = -1;
- }
-
- setSizeInternal();
-}
-
-void LLPluginClassMedia::setSizeInternal(void)
-{
- if((mSetMediaWidth > 0) && (mSetMediaHeight > 0))
- {
- mRequestedMediaWidth = mSetMediaWidth;
- mRequestedMediaHeight = mSetMediaHeight;
- }
- else if((mNaturalMediaWidth > 0) && (mNaturalMediaHeight > 0))
- {
- mRequestedMediaWidth = mNaturalMediaWidth;
- mRequestedMediaHeight = mNaturalMediaHeight;
- }
- else
- {
- mRequestedMediaWidth = mDefaultMediaWidth;
- mRequestedMediaHeight = mDefaultMediaHeight;
- }
-
- // Save these for size/interest calculations
- mFullMediaWidth = mRequestedMediaWidth;
- mFullMediaHeight = mRequestedMediaHeight;
-
- if(mAllowDownsample)
- {
- switch(mPriority)
- {
- case PRIORITY_SLIDESHOW:
- case PRIORITY_LOW:
- // Reduce maximum texture dimension to (or below) mLowPrioritySizeLimit
- while((mRequestedMediaWidth > mLowPrioritySizeLimit) || (mRequestedMediaHeight > mLowPrioritySizeLimit))
- {
- mRequestedMediaWidth /= 2;
- mRequestedMediaHeight /= 2;
- }
- break;
-
- default:
- // Don't adjust texture size
- break;
- }
- }
-
- if(mAutoScaleMedia)
- {
- mRequestedMediaWidth = nextPowerOf2(mRequestedMediaWidth);
- mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight);
- }
-
- if(mRequestedMediaWidth > 2048)
- mRequestedMediaWidth = 2048;
-
- if(mRequestedMediaHeight > 2048)
- mRequestedMediaHeight = 2048;
-}
-
-void LLPluginClassMedia::setAutoScale(bool auto_scale)
-{
- if(auto_scale != mAutoScaleMedia)
- {
- mAutoScaleMedia = auto_scale;
- setSizeInternal();
- }
-}
-
-bool LLPluginClassMedia::textureValid(void)
-{
- if(
- !mTextureParamsReceived ||
- mTextureWidth <= 0 ||
- mTextureHeight <= 0 ||
- mMediaWidth <= 0 ||
- mMediaHeight <= 0 ||
- mRequestedMediaWidth != mMediaWidth ||
- mRequestedMediaHeight != mMediaHeight ||
- getBitsData() == NULL
- )
- return false;
-
- return true;
-}
-
-bool LLPluginClassMedia::getDirty(LLRect *dirty_rect)
-{
- bool result = !mDirtyRect.isEmpty();
-
- if(dirty_rect != NULL)
- {
- *dirty_rect = mDirtyRect;
- }
-
- return result;
-}
-
-void LLPluginClassMedia::resetDirty(void)
-{
- mDirtyRect = LLRect::null;
-}
-
-std::string LLPluginClassMedia::translateModifiers(MASK modifiers)
-{
- std::string result;
-
-
- if(modifiers & MASK_CONTROL)
- {
- result += "control|";
- }
-
- if(modifiers & MASK_ALT)
- {
- result += "alt|";
- }
-
- if(modifiers & MASK_SHIFT)
- {
- result += "shift|";
- }
-
- // TODO: should I deal with platform differences here or in callers?
- // TODO: how do we deal with the Mac "command" key?
-/*
- if(modifiers & MASK_SOMETHING)
- {
- result += "meta|";
- }
-*/
- return result;
-}
-
-void LLPluginClassMedia::jsEnableObject( bool enable )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_enable_object");
- message.setValueBoolean( "enable", enable );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentLocationEvent( double x, double y, double z )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_location");
- message.setValueReal( "x", x );
- message.setValueReal( "y", y );
- message.setValueReal( "z", z );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentGlobalLocationEvent( double x, double y, double z )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_global_location");
- message.setValueReal( "x", x );
- message.setValueReal( "y", y );
- message.setValueReal( "z", z );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentOrientationEvent( double angle )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_orientation");
- message.setValueReal( "angle", angle );
-
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentLanguageEvent( const std::string& language )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_language");
- message.setValue( "language", language );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentRegionEvent( const std::string& region )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_region");
- message.setValue( "region", region );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::jsAgentMaturityEvent( const std::string& maturity )
-{
- if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
- {
- return;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_maturity");
- message.setValue( "maturity", maturity );
- sendMessage( message );
-}
-
-void LLPluginClassMedia::mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers)
-{
- if(type == MOUSE_EVENT_MOVE)
- {
- if(!mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked())
- {
- // Don't queue up mouse move events that can't be delivered.
- return;
- }
-
- if((x == mLastMouseX) && (y == mLastMouseY))
- {
- // Don't spam unnecessary mouse move events.
- return;
- }
-
- mLastMouseX = x;
- mLastMouseY = y;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "mouse_event");
- std::string temp;
- switch(type)
- {
- case MOUSE_EVENT_DOWN: temp = "down"; break;
- case MOUSE_EVENT_UP: temp = "up"; break;
- case MOUSE_EVENT_MOVE: temp = "move"; break;
- case MOUSE_EVENT_DOUBLE_CLICK: temp = "double_click"; break;
- }
- message.setValue("event", temp);
-
- message.setValueS32("button", button);
-
- message.setValueS32("x", x);
-
- // Incoming coordinates are OpenGL-style ((0,0) = lower left), so flip them here if the plugin has requested it.
- if(!mRequestedTextureCoordsOpenGL)
- {
- // TODO: Should I use mMediaHeight or mRequestedMediaHeight here?
- y = mMediaHeight - y;
- }
- message.setValueS32("y", y);
-
- message.setValue("modifiers", translateModifiers(modifiers));
-
- sendMessage(message);
-}
-
-bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data)
-{
- bool result = true;
-
- // FIXME:
- // HACK: we don't have an easy way to tell if the plugin is going to handle a particular keycode.
- // For now, return false for the ones the webkit plugin won't handle properly.
-
- switch(key_code)
- {
- case KEY_BACKSPACE:
- case KEY_TAB:
- case KEY_RETURN:
- case KEY_PAD_RETURN:
- case KEY_SHIFT:
- case KEY_CONTROL:
- case KEY_ALT:
- case KEY_CAPSLOCK:
- case KEY_ESCAPE:
- case KEY_PAGE_UP:
- case KEY_PAGE_DOWN:
- case KEY_END:
- case KEY_HOME:
- case KEY_LEFT:
- case KEY_UP:
- case KEY_RIGHT:
- case KEY_DOWN:
- case KEY_INSERT:
- case KEY_DELETE:
- // These will be handled
- break;
-
- default:
- // regular ASCII characters will also be handled
- if(key_code >= KEY_SPECIAL)
- {
- // Other "special" codes will not work properly.
- result = false;
- }
- break;
- }
-
-#if LL_DARWIN
- if(modifiers & MASK_ALT)
- {
- // Option-key modified characters should be handled by the unicode input path instead of this one.
- result = false;
- }
-#endif
-
- if(result)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "key_event");
- std::string temp;
- switch(type)
- {
- case KEY_EVENT_DOWN: temp = "down"; break;
- case KEY_EVENT_UP: temp = "up"; break;
- case KEY_EVENT_REPEAT: temp = "repeat"; break;
- }
- message.setValue("event", temp);
-
- message.setValueS32("key", key_code);
-
- message.setValue("modifiers", translateModifiers(modifiers));
- message.setValueLLSD("native_key_data", native_key_data);
-
- sendMessage(message);
- }
-
- return result;
-}
-
-void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "scroll_event");
-
- message.setValueS32("x", x);
- message.setValueS32("y", y);
- message.setValue("modifiers", translateModifiers(modifiers));
-
- sendMessage(message);
-}
-
-bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD native_key_data)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "text_event");
-
- message.setValue("text", text);
- message.setValue("modifiers", translateModifiers(modifiers));
- message.setValueLLSD("native_key_data", native_key_data);
-
- sendMessage(message);
-
- return true;
-}
-
-void LLPluginClassMedia::loadURI(const std::string &uri)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "load_uri");
-
- message.setValue("uri", uri);
-
- sendMessage(message);
-}
-
-const char* LLPluginClassMedia::priorityToString(EPriority priority)
-{
- const char* result = "UNKNOWN";
- switch(priority)
- {
- case PRIORITY_UNLOADED: result = "unloaded"; break;
- case PRIORITY_STOPPED: result = "stopped"; break;
- case PRIORITY_HIDDEN: result = "hidden"; break;
- case PRIORITY_SLIDESHOW: result = "slideshow"; break;
- case PRIORITY_LOW: result = "low"; break;
- case PRIORITY_NORMAL: result = "normal"; break;
- case PRIORITY_HIGH: result = "high"; break;
- }
-
- return result;
-}
-
-void LLPluginClassMedia::setPriority(EPriority priority)
-{
- if(mPriority != priority)
- {
- mPriority = priority;
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_priority");
-
- std::string priority_string = priorityToString(priority);
- switch(priority)
- {
- case PRIORITY_UNLOADED:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_STOPPED:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_HIDDEN:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_SLIDESHOW:
- mSleepTime = 1.0f;
- break;
- case PRIORITY_LOW:
- mSleepTime = 1.0f / 25.0f;
- break;
- case PRIORITY_NORMAL:
- mSleepTime = 1.0f / 50.0f;
- break;
- case PRIORITY_HIGH:
- mSleepTime = 1.0f / 100.0f;
- break;
- }
-
- message.setValue("priority", priority_string);
-
- sendMessage(message);
-
- if(mPlugin)
- {
- mPlugin->setSleepTime(mSleepTime);
- }
-
- LL_DEBUGS("PluginPriority") << this << ": setting priority to " << priority_string << LL_ENDL;
-
- // This may affect the calculated size, so recalculate it here.
- setSizeInternal();
- }
-}
-
-void LLPluginClassMedia::setLowPrioritySizeLimit(int size)
-{
- int power = nextPowerOf2(size);
- if(mLowPrioritySizeLimit != power)
- {
- mLowPrioritySizeLimit = power;
-
- // This may affect the calculated size, so recalculate it here.
- setSizeInternal();
- }
-}
-
-F64 LLPluginClassMedia::getCPUUsage()
-{
- F64 result = 0.0f;
-
- if(mPlugin)
- {
- result = mPlugin->getCPUUsage();
- }
-
- return result;
-}
-
-void LLPluginClassMedia::sendPickFileResponse(const std::string &file)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file_response");
- message.setValue("file", file);
- if(mPlugin && mPlugin->isBlocked())
- {
- // If the plugin sent a blocking pick-file request, the response should unblock it.
- message.setValueBoolean("blocking_response", true);
- }
- sendMessage(message);
-}
-
-void LLPluginClassMedia::sendAuthResponse(bool ok, const std::string &username, const std::string &password)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "auth_response");
- message.setValueBoolean("ok", ok);
- message.setValue("username", username);
- message.setValue("password", password);
- if(mPlugin && mPlugin->isBlocked())
- {
- // If the plugin sent a blocking pick-file request, the response should unblock it.
- message.setValueBoolean("blocking_response", true);
- }
- sendMessage(message);
-}
-
-void LLPluginClassMedia::cut()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_cut");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::copy()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_copy");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::paste()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_paste");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path");
- message.setValue("path", user_data_path);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setLanguageCode(const std::string &language_code)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_language_code");
- message.setValue("language", language_code);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setPluginsEnabled(const bool enabled)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "plugins_enabled");
- message.setValueBoolean("enable", enabled);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setJavascriptEnabled(const bool enabled)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "javascript_enabled");
- message.setValueBoolean("enable", enabled);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setTarget(const std::string &target)
-{
- mTarget = target;
-}
-
-/* virtual */
-void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
-{
- std::string message_class = message.getClass();
-
- if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
- {
- std::string message_name = message.getName();
- if(message_name == "texture_params")
- {
- mRequestedTextureDepth = message.getValueS32("depth");
- mRequestedTextureInternalFormat = message.getValueU32("internalformat");
- mRequestedTextureFormat = message.getValueU32("format");
- mRequestedTextureType = message.getValueU32("type");
- mRequestedTextureSwapBytes = message.getValueBoolean("swap_bytes");
- mRequestedTextureCoordsOpenGL = message.getValueBoolean("coords_opengl");
-
- // These two are optional, and will default to 0 if they're not specified.
- mDefaultMediaWidth = message.getValueS32("default_width");
- mDefaultMediaHeight = message.getValueS32("default_height");
-
- mAllowDownsample = message.getValueBoolean("allow_downsample");
- mPadding = message.getValueS32("padding");
-
- setSizeInternal();
-
- mTextureParamsReceived = true;
- }
- else if(message_name == "updated")
- {
- if(message.hasValue("left"))
- {
- LLRect newDirtyRect;
- newDirtyRect.mLeft = message.getValueS32("left");
- newDirtyRect.mTop = message.getValueS32("top");
- newDirtyRect.mRight = message.getValueS32("right");
- newDirtyRect.mBottom = message.getValueS32("bottom");
-
- // The plugin is likely to have top and bottom switched, due to vertical flip and OpenGL coordinate confusion.
- // If they're backwards, swap them.
- if(newDirtyRect.mTop < newDirtyRect.mBottom)
- {
- S32 temp = newDirtyRect.mTop;
- newDirtyRect.mTop = newDirtyRect.mBottom;
- newDirtyRect.mBottom = temp;
- }
-
- if(mDirtyRect.isEmpty())
- {
- mDirtyRect = newDirtyRect;
- }
- else
- {
- mDirtyRect.unionWith(newDirtyRect);
- }
-
- LL_DEBUGS("Plugin") << "adjusted incoming rect is: ("
- << newDirtyRect.mLeft << ", "
- << newDirtyRect.mTop << ", "
- << newDirtyRect.mRight << ", "
- << newDirtyRect.mBottom << "), new dirty rect is: ("
- << mDirtyRect.mLeft << ", "
- << mDirtyRect.mTop << ", "
- << mDirtyRect.mRight << ", "
- << mDirtyRect.mBottom << ")"
- << LL_ENDL;
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CONTENT_UPDATED);
- }
-
-
- bool time_duration_updated = false;
- int previous_percent = mProgressPercent;
-
- if(message.hasValue("current_time"))
- {
- mCurrentTime = message.getValueReal("current_time");
- time_duration_updated = true;
- }
- if(message.hasValue("duration"))
- {
- mDuration = message.getValueReal("duration");
- time_duration_updated = true;
- }
-
- if(message.hasValue("current_rate"))
- {
- mCurrentRate = message.getValueReal("current_rate");
- }
-
- if(message.hasValue("loaded_duration"))
- {
- mLoadedDuration = message.getValueReal("loaded_duration");
- time_duration_updated = true;
- }
- else
- {
- // If the message doesn't contain a loaded_duration param, assume it's equal to duration
- mLoadedDuration = mDuration;
- }
-
- // Calculate a percentage based on the loaded duration and total duration.
- if(mDuration != 0.0f) // Don't divide by zero.
- {
- mProgressPercent = (int)((mLoadedDuration * 100.0f)/mDuration);
- }
-
- if(time_duration_updated)
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_TIME_DURATION_UPDATED);
- }
-
- if(previous_percent != mProgressPercent)
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
- }
- }
- else if(message_name == "media_status")
- {
- std::string status = message.getValue("status");
-
- LL_DEBUGS("Plugin") << "Status changed to: " << status << LL_ENDL;
-
- if(status == "loading")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_LOADING;
- }
- else if(status == "loaded")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_LOADED;
- }
- else if(status == "error")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_ERROR;
- }
- else if(status == "playing")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_PLAYING;
- }
- else if(status == "paused")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_PAUSED;
- }
- else if(status == "done")
- {
- mStatus = LLPluginClassMediaOwner::MEDIA_DONE;
- }
- else
- {
- // empty string or any unknown string
- mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
- }
- }
- else if(message_name == "size_change_request")
- {
- S32 width = message.getValueS32("width");
- S32 height = message.getValueS32("height");
- std::string name = message.getValue("name");
-
- // TODO: check that name matches?
- mNaturalMediaWidth = width;
- mNaturalMediaHeight = height;
-
- setSizeInternal();
- }
- else if(message_name == "size_change_response")
- {
- std::string name = message.getValue("name");
-
- // TODO: check that name matches?
-
- mTextureWidth = message.getValueS32("texture_width");
- mTextureHeight = message.getValueS32("texture_height");
- mMediaWidth = message.getValueS32("width");
- mMediaHeight = message.getValueS32("height");
-
- // This invalidates any existing dirty rect.
- resetDirty();
-
- // TODO: should we verify that the plugin sent back the right values?
- // Two size changes in a row may cause them to not match, due to queueing, etc.
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_SIZE_CHANGED);
- }
- else if(message_name == "cursor_changed")
- {
- mCursorName = message.getValue("name");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CURSOR_CHANGED);
- }
- else if(message_name == "edit_state")
- {
- if(message.hasValue("cut"))
- {
- mCanCut = message.getValueBoolean("cut");
- }
- if(message.hasValue("copy"))
- {
- mCanCopy = message.getValueBoolean("copy");
- }
- if(message.hasValue("paste"))
- {
- mCanPaste = message.getValueBoolean("paste");
- }
- }
- else if(message_name == "name_text")
- {
- mMediaName = message.getValue("name");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
- }
- else if(message_name == "pick_file")
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PICK_FILE_REQUEST);
- }
- else if(message_name == "auth_request")
- {
- mAuthURL = message.getValue("url");
- mAuthRealm = message.getValue("realm");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
- }
- else
- {
- LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
- }
- }
- else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
- {
- std::string message_name = message.getName();
- if(message_name == "navigate_begin")
- {
- mNavigateURI = message.getValue("uri");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_BEGIN);
- }
- else if(message_name == "navigate_complete")
- {
- mNavigateURI = message.getValue("uri");
- mNavigateResultCode = message.getValueS32("result_code");
- mNavigateResultString = message.getValue("result_string");
- mHistoryBackAvailable = message.getValueBoolean("history_back_available");
- mHistoryForwardAvailable = message.getValueBoolean("history_forward_available");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_COMPLETE);
- }
- else if(message_name == "progress")
- {
- mProgressPercent = message.getValueS32("percent");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
- }
- else if(message_name == "status_text")
- {
- mStatusText = message.getValue("status");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_STATUS_TEXT_CHANGED);
- }
- else if(message_name == "location_changed")
- {
- mLocation = message.getValue("uri");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LOCATION_CHANGED);
- }
- else if(message_name == "click_href")
- {
- mClickURL = message.getValue("uri");
- mClickTarget = message.getValue("target");
- mClickUUID = message.getValue("uuid");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF);
- }
- else if(message_name == "click_nofollow")
- {
- mClickURL = message.getValue("uri");
- mClickNavType = message.getValue("nav_type");
- mClickTarget.clear();
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_NOFOLLOW);
- }
- else if(message_name == "navigate_error_page")
- {
- mStatusCode = message.getValueS32("status_code");
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_ERROR_PAGE);
- }
- else if(message_name == "cookie_set")
- {
- if(mOwner)
- {
- mOwner->handleCookieSet(this, message.getValue("cookie"));
- }
- }
- else if(message_name == "close_request")
- {
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLOSE_REQUEST);
- }
- else if(message_name == "geometry_change")
- {
- mClickUUID = message.getValue("uuid");
- mGeometryX = message.getValueS32("x");
- mGeometryY = message.getValueS32("y");
- mGeometryWidth = message.getValueS32("width");
- mGeometryHeight = message.getValueS32("height");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_GEOMETRY_CHANGE);
- }
- else if(message_name == "link_hovered")
- {
- // text is not currently used -- the tooltip hover text is taken from the "title".
- mHoverLink = message.getValue("link");
- mHoverText = message.getValue("title");
- // message.getValue("text");
-
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LINK_HOVERED);
- }
- else
- {
- LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
- }
- }
- else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
- {
- std::string message_name = message.getName();
-
- // This class hasn't defined any incoming messages yet.
-// if(message_name == "message_name")
-// {
-// }
-// else
- {
- LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
- }
- }
-
-}
-
-/* virtual */
-void LLPluginClassMedia::pluginLaunchFailed()
-{
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED_LAUNCH);
-}
-
-/* virtual */
-void LLPluginClassMedia::pluginDied()
-{
- mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED);
-}
-
-void LLPluginClassMedia::mediaEvent(LLPluginClassMediaOwner::EMediaEvent event)
-{
- if(mOwner)
- {
- mOwner->handleMediaEvent(this, event);
- }
-}
-
-void LLPluginClassMedia::sendMessage(const LLPluginMessage &message)
-{
- if(mPlugin && mPlugin->isRunning())
- {
- mPlugin->sendMessage(message);
- }
- else
- {
- // The plugin isn't set up yet -- queue this message to be sent after initialization.
- mSendQueue.push(message);
- }
-}
-
-////////////////////////////////////////////////////////////
-// MARK: media_browser class functions
-bool LLPluginClassMedia::pluginSupportsMediaBrowser(void)
-{
- std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER);
- return !version.empty();
-}
-
-void LLPluginClassMedia::focus(bool focused)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "focus");
-
- message.setValueBoolean("focused", focused);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::clear_cache()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cache");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::clear_cookies()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cookies");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::set_cookies(const std::string &cookies)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_cookies");
- message.setValue("cookies", cookies);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::enable_cookies(bool enable)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "enable_cookies");
- message.setValueBoolean("enable", enable);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::proxy_setup(bool enable, const std::string &host, int port)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_setup");
-
- message.setValueBoolean("enable", enable);
- message.setValue("host", host);
- message.setValueS32("port", port);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_stop()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_stop");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_reload(bool ignore_cache)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_reload");
-
- message.setValueBoolean("ignore_cache", ignore_cache);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_forward()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_forward");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::browse_back()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_back");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setBrowserUserAgent(const std::string& user_agent)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_user_agent");
-
- message.setValue("user_agent", user_agent);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::proxyWindowOpened(const std::string &target, const std::string &uuid)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_opened");
-
- message.setValue("target", target);
- message.setValue("uuid", uuid);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::proxyWindowClosed(const std::string &uuid)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_closed");
-
- message.setValue("uuid", uuid);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::ignore_ssl_cert_errors(bool ignore)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "ignore_ssl_cert_errors");
- message.setValueBoolean("ignore", ignore);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::addCertificateFilePath(const std::string& path)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "add_certificate_file_path");
- message.setValue("path", path);
- sendMessage(message);
-}
-
-void LLPluginClassMedia::crashPlugin()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash");
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::hangPlugin()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "hang");
-
- sendMessage(message);
-}
-
-
-////////////////////////////////////////////////////////////
-// MARK: media_time class functions
-bool LLPluginClassMedia::pluginSupportsMediaTime(void)
-{
- std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME);
- return !version.empty();
-}
-
-void LLPluginClassMedia::stop()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "stop");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::start(float rate)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "start");
-
- message.setValueReal("rate", rate);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::pause()
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "pause");
- sendMessage(message);
-}
-
-void LLPluginClassMedia::seek(float time)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "seek");
-
- message.setValueReal("time", time);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setLoop(bool loop)
-{
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_loop");
-
- message.setValueBoolean("loop", loop);
-
- sendMessage(message);
-}
-
-void LLPluginClassMedia::setVolume(float volume)
-{
- if(volume != mRequestedVolume)
- {
- mRequestedVolume = volume;
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_volume");
-
- message.setValueReal("volume", volume);
-
- sendMessage(message);
- }
-}
-
-float LLPluginClassMedia::getVolume()
-{
- return mRequestedVolume;
-}
-
-void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history)
-{
- // Send URL history to plugin
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "init_history");
- message.setValueLLSD("history", url_history);
- sendMessage(message);
-
- LL_DEBUGS("Plugin") << "Sending history" << LL_ENDL;
-}
-
+/**
+ * @file llpluginclassmedia.cpp
+ * @brief LLPluginClassMedia handles a plugin which knows about the "media" message class.
+ *
+ * @cond
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ * @endcond
+ */
+
+#include "linden_common.h"
+#include "indra_constants.h"
+
+#include "llpluginclassmedia.h"
+#include "llpluginmessageclasses.h"
+
+#include "llqtwebkit.h"
+
+static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256;
+
+static int nextPowerOf2( int value )
+{
+ int next_power_of_2 = 1;
+ while ( next_power_of_2 < value )
+ {
+ next_power_of_2 <<= 1;
+ }
+
+ return next_power_of_2;
+}
+
+LLPluginClassMedia::LLPluginClassMedia(LLPluginClassMediaOwner *owner)
+{
+ mOwner = owner;
+ mPlugin = NULL;
+ reset();
+
+ //debug use
+ mDeleteOK = true ;
+}
+
+
+LLPluginClassMedia::~LLPluginClassMedia()
+{
+ llassert_always(mDeleteOK) ;
+ reset();
+}
+
+bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_dir, const std::string &plugin_filename, bool debug)
+{
+ LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL;
+ LL_DEBUGS("Plugin") << "dir: " << plugin_dir << LL_ENDL;
+ LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
+
+ mPlugin = new LLPluginProcessParent(this);
+ mPlugin->setSleepTime(mSleepTime);
+
+ // Queue up the media init message -- it will be sent after all the currently queued messages.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "init");
+ message.setValue("target", mTarget);
+ sendMessage(message);
+
+ mPlugin->init(launcher_filename, plugin_dir, plugin_filename, debug);
+
+ return true;
+}
+
+
+void LLPluginClassMedia::reset()
+{
+ if(mPlugin != NULL)
+ {
+ delete mPlugin;
+ mPlugin = NULL;
+ }
+
+ mTextureParamsReceived = false;
+ mRequestedTextureDepth = 0;
+ mRequestedTextureInternalFormat = 0;
+ mRequestedTextureFormat = 0;
+ mRequestedTextureType = 0;
+ mRequestedTextureSwapBytes = false;
+ mRequestedTextureCoordsOpenGL = false;
+ mTextureSharedMemorySize = 0;
+ mTextureSharedMemoryName.clear();
+ mDefaultMediaWidth = 0;
+ mDefaultMediaHeight = 0;
+ mNaturalMediaWidth = 0;
+ mNaturalMediaHeight = 0;
+ mSetMediaWidth = -1;
+ mSetMediaHeight = -1;
+ mRequestedMediaWidth = 0;
+ mRequestedMediaHeight = 0;
+ mRequestedTextureWidth = 0;
+ mRequestedTextureHeight = 0;
+ mFullMediaWidth = 0;
+ mFullMediaHeight = 0;
+ mTextureWidth = 0;
+ mTextureHeight = 0;
+ mMediaWidth = 0;
+ mMediaHeight = 0;
+ mDirtyRect = LLRect::null;
+ mAutoScaleMedia = false;
+ mRequestedVolume = 1.0f;
+ mPriority = PRIORITY_NORMAL;
+ mLowPrioritySizeLimit = LOW_PRIORITY_TEXTURE_SIZE_DEFAULT;
+ mAllowDownsample = false;
+ mPadding = 0;
+ mLastMouseX = 0;
+ mLastMouseY = 0;
+ mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
+ mSleepTime = 1.0f / 100.0f;
+ mCanCut = false;
+ mCanCopy = false;
+ mCanPaste = false;
+ mMediaName.clear();
+ mMediaDescription.clear();
+ mBackgroundColor = LLColor4(1.0f, 1.0f, 1.0f, 1.0f);
+
+ // media_browser class
+ mNavigateURI.clear();
+ mNavigateResultCode = -1;
+ mNavigateResultString.clear();
+ mHistoryBackAvailable = false;
+ mHistoryForwardAvailable = false;
+ mStatusText.clear();
+ mProgressPercent = 0;
+ mClickURL.clear();
+ mClickNavType.clear();
+ mClickTarget.clear();
+ mClickUUID.clear();
+ mStatusCode = 0;
+
+ // media_time class
+ mCurrentTime = 0.0f;
+ mDuration = 0.0f;
+ mCurrentRate = 0.0f;
+ mLoadedDuration = 0.0f;
+}
+
+void LLPluginClassMedia::idle(void)
+{
+ if(mPlugin)
+ {
+ mPlugin->idle();
+ }
+
+ if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()) || (mOwner == NULL))
+ {
+ // Can't process a size change at this time
+ }
+ else if((mRequestedMediaWidth != mMediaWidth) || (mRequestedMediaHeight != mMediaHeight))
+ {
+ // Calculate the correct size for the media texture
+ mRequestedTextureHeight = mRequestedMediaHeight;
+ if(mPadding < 0)
+ {
+ // negative values indicate the plugin wants a power of 2
+ mRequestedTextureWidth = nextPowerOf2(mRequestedMediaWidth);
+ }
+ else
+ {
+ mRequestedTextureWidth = mRequestedMediaWidth;
+
+ if(mPadding > 1)
+ {
+ // Pad up to a multiple of the specified number of bytes per row
+ int rowbytes = mRequestedTextureWidth * mRequestedTextureDepth;
+ int pad = rowbytes % mPadding;
+ if(pad != 0)
+ {
+ rowbytes += mPadding - pad;
+ }
+
+ if(rowbytes % mRequestedTextureDepth == 0)
+ {
+ mRequestedTextureWidth = rowbytes / mRequestedTextureDepth;
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Unable to pad texture width, padding size " << mPadding << "is not a multiple of pixel size " << mRequestedTextureDepth << LL_ENDL;
+ }
+ }
+ }
+
+
+ // Size change has been requested but not initiated yet.
+ size_t newsize = mRequestedTextureWidth * mRequestedTextureHeight * mRequestedTextureDepth;
+
+ // Add an extra line for padding, just in case.
+ newsize += mRequestedTextureWidth * mRequestedTextureDepth;
+
+ if(newsize != mTextureSharedMemorySize)
+ {
+ if(!mTextureSharedMemoryName.empty())
+ {
+ // Tell the plugin to remove the old memory segment
+ mPlugin->removeSharedMemory(mTextureSharedMemoryName);
+ mTextureSharedMemoryName.clear();
+ }
+
+ mTextureSharedMemorySize = newsize;
+ mTextureSharedMemoryName = mPlugin->addSharedMemory(mTextureSharedMemorySize);
+ if(!mTextureSharedMemoryName.empty())
+ {
+ void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
+
+ // clear texture memory to avoid random screen visual fuzz from uninitialized texture data
+ memset( addr, 0x00, newsize );
+
+ // We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,
+ // so it may not be worthwhile.
+ // mDirtyRect.setOriginAndSize(0, 0, mRequestedMediaWidth, mRequestedMediaHeight);
+ }
+ }
+
+ // This is our local indicator that a change is in progress.
+ mTextureWidth = -1;
+ mTextureHeight = -1;
+ mMediaWidth = -1;
+ mMediaHeight = -1;
+
+ // This invalidates any existing dirty rect.
+ resetDirty();
+
+ // Send a size change message to the plugin
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change");
+ message.setValue("name", mTextureSharedMemoryName);
+ message.setValueS32("width", mRequestedMediaWidth);
+ message.setValueS32("height", mRequestedMediaHeight);
+ message.setValueS32("texture_width", mRequestedTextureWidth);
+ message.setValueS32("texture_height", mRequestedTextureHeight);
+ message.setValueReal("background_r", mBackgroundColor.mV[VX]);
+ message.setValueReal("background_g", mBackgroundColor.mV[VY]);
+ message.setValueReal("background_b", mBackgroundColor.mV[VZ]);
+ message.setValueReal("background_a", mBackgroundColor.mV[VW]);
+ mPlugin->sendMessage(message); // DO NOT just use sendMessage() here -- we want this to jump ahead of the queue.
+
+ LL_DEBUGS("Plugin") << "Sending size_change" << LL_ENDL;
+ }
+ }
+
+ if(mPlugin && mPlugin->isRunning())
+ {
+ // Send queued messages
+ while(!mSendQueue.empty())
+ {
+ LLPluginMessage message = mSendQueue.front();
+ mSendQueue.pop();
+ mPlugin->sendMessage(message);
+ }
+ }
+}
+
+int LLPluginClassMedia::getTextureWidth() const
+{
+ return nextPowerOf2(mTextureWidth);
+}
+
+int LLPluginClassMedia::getTextureHeight() const
+{
+ return nextPowerOf2(mTextureHeight);
+}
+
+unsigned char* LLPluginClassMedia::getBitsData()
+{
+ unsigned char *result = NULL;
+ if((mPlugin != NULL) && !mTextureSharedMemoryName.empty())
+ {
+ result = (unsigned char*)mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);
+ }
+ return result;
+}
+
+void LLPluginClassMedia::setSize(int width, int height)
+{
+ if((width > 0) && (height > 0))
+ {
+ mSetMediaWidth = width;
+ mSetMediaHeight = height;
+ }
+ else
+ {
+ mSetMediaWidth = -1;
+ mSetMediaHeight = -1;
+ }
+
+ setSizeInternal();
+}
+
+void LLPluginClassMedia::setSizeInternal(void)
+{
+ if((mSetMediaWidth > 0) && (mSetMediaHeight > 0))
+ {
+ mRequestedMediaWidth = mSetMediaWidth;
+ mRequestedMediaHeight = mSetMediaHeight;
+ }
+ else if((mNaturalMediaWidth > 0) && (mNaturalMediaHeight > 0))
+ {
+ mRequestedMediaWidth = mNaturalMediaWidth;
+ mRequestedMediaHeight = mNaturalMediaHeight;
+ }
+ else
+ {
+ mRequestedMediaWidth = mDefaultMediaWidth;
+ mRequestedMediaHeight = mDefaultMediaHeight;
+ }
+
+ // Save these for size/interest calculations
+ mFullMediaWidth = mRequestedMediaWidth;
+ mFullMediaHeight = mRequestedMediaHeight;
+
+ if(mAllowDownsample)
+ {
+ switch(mPriority)
+ {
+ case PRIORITY_SLIDESHOW:
+ case PRIORITY_LOW:
+ // Reduce maximum texture dimension to (or below) mLowPrioritySizeLimit
+ while((mRequestedMediaWidth > mLowPrioritySizeLimit) || (mRequestedMediaHeight > mLowPrioritySizeLimit))
+ {
+ mRequestedMediaWidth /= 2;
+ mRequestedMediaHeight /= 2;
+ }
+ break;
+
+ default:
+ // Don't adjust texture size
+ break;
+ }
+ }
+
+ if(mAutoScaleMedia)
+ {
+ mRequestedMediaWidth = nextPowerOf2(mRequestedMediaWidth);
+ mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight);
+ }
+
+ if(mRequestedMediaWidth > 2048)
+ mRequestedMediaWidth = 2048;
+
+ if(mRequestedMediaHeight > 2048)
+ mRequestedMediaHeight = 2048;
+}
+
+void LLPluginClassMedia::setAutoScale(bool auto_scale)
+{
+ if(auto_scale != mAutoScaleMedia)
+ {
+ mAutoScaleMedia = auto_scale;
+ setSizeInternal();
+ }
+}
+
+bool LLPluginClassMedia::textureValid(void)
+{
+ if(
+ !mTextureParamsReceived ||
+ mTextureWidth <= 0 ||
+ mTextureHeight <= 0 ||
+ mMediaWidth <= 0 ||
+ mMediaHeight <= 0 ||
+ mRequestedMediaWidth != mMediaWidth ||
+ mRequestedMediaHeight != mMediaHeight ||
+ getBitsData() == NULL
+ )
+ return false;
+
+ return true;
+}
+
+bool LLPluginClassMedia::getDirty(LLRect *dirty_rect)
+{
+ bool result = !mDirtyRect.isEmpty();
+
+ if(dirty_rect != NULL)
+ {
+ *dirty_rect = mDirtyRect;
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::resetDirty(void)
+{
+ mDirtyRect = LLRect::null;
+}
+
+std::string LLPluginClassMedia::translateModifiers(MASK modifiers)
+{
+ std::string result;
+
+
+ if(modifiers & MASK_CONTROL)
+ {
+ result += "control|";
+ }
+
+ if(modifiers & MASK_ALT)
+ {
+ result += "alt|";
+ }
+
+ if(modifiers & MASK_SHIFT)
+ {
+ result += "shift|";
+ }
+
+ // TODO: should I deal with platform differences here or in callers?
+ // TODO: how do we deal with the Mac "command" key?
+/*
+ if(modifiers & MASK_SOMETHING)
+ {
+ result += "meta|";
+ }
+*/
+ return result;
+}
+
+void LLPluginClassMedia::jsEnableObject( bool enable )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_enable_object");
+ message.setValueBoolean( "enable", enable );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentLocationEvent( double x, double y, double z )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_location");
+ message.setValueReal( "x", x );
+ message.setValueReal( "y", y );
+ message.setValueReal( "z", z );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentGlobalLocationEvent( double x, double y, double z )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_global_location");
+ message.setValueReal( "x", x );
+ message.setValueReal( "y", y );
+ message.setValueReal( "z", z );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentOrientationEvent( double angle )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_orientation");
+ message.setValueReal( "angle", angle );
+
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentLanguageEvent( const std::string& language )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_language");
+ message.setValue( "language", language );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentRegionEvent( const std::string& region )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_region");
+ message.setValue( "region", region );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::jsAgentMaturityEvent( const std::string& maturity )
+{
+ if( ! mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked() )
+ {
+ return;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "js_agent_maturity");
+ message.setValue( "maturity", maturity );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers)
+{
+ if(type == MOUSE_EVENT_MOVE)
+ {
+ if(!mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked())
+ {
+ // Don't queue up mouse move events that can't be delivered.
+ return;
+ }
+
+ if((x == mLastMouseX) && (y == mLastMouseY))
+ {
+ // Don't spam unnecessary mouse move events.
+ return;
+ }
+
+ mLastMouseX = x;
+ mLastMouseY = y;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "mouse_event");
+ std::string temp;
+ switch(type)
+ {
+ case MOUSE_EVENT_DOWN: temp = "down"; break;
+ case MOUSE_EVENT_UP: temp = "up"; break;
+ case MOUSE_EVENT_MOVE: temp = "move"; break;
+ case MOUSE_EVENT_DOUBLE_CLICK: temp = "double_click"; break;
+ }
+ message.setValue("event", temp);
+
+ message.setValueS32("button", button);
+
+ message.setValueS32("x", x);
+
+ // Incoming coordinates are OpenGL-style ((0,0) = lower left), so flip them here if the plugin has requested it.
+ if(!mRequestedTextureCoordsOpenGL)
+ {
+ // TODO: Should I use mMediaHeight or mRequestedMediaHeight here?
+ y = mMediaHeight - y;
+ }
+ message.setValueS32("y", y);
+
+ message.setValue("modifiers", translateModifiers(modifiers));
+
+ sendMessage(message);
+}
+
+bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data)
+{
+ bool result = true;
+
+ // FIXME:
+ // HACK: we don't have an easy way to tell if the plugin is going to handle a particular keycode.
+ // For now, return false for the ones the webkit plugin won't handle properly.
+
+ switch(key_code)
+ {
+ case KEY_BACKSPACE:
+ case KEY_TAB:
+ case KEY_RETURN:
+ case KEY_PAD_RETURN:
+ case KEY_SHIFT:
+ case KEY_CONTROL:
+ case KEY_ALT:
+ case KEY_CAPSLOCK:
+ case KEY_ESCAPE:
+ case KEY_PAGE_UP:
+ case KEY_PAGE_DOWN:
+ case KEY_END:
+ case KEY_HOME:
+ case KEY_LEFT:
+ case KEY_UP:
+ case KEY_RIGHT:
+ case KEY_DOWN:
+ case KEY_INSERT:
+ case KEY_DELETE:
+ // These will be handled
+ break;
+
+ default:
+ // regular ASCII characters will also be handled
+ if(key_code >= KEY_SPECIAL)
+ {
+ // Other "special" codes will not work properly.
+ result = false;
+ }
+ break;
+ }
+
+#if LL_DARWIN
+ if(modifiers & MASK_ALT)
+ {
+ // Option-key modified characters should be handled by the unicode input path instead of this one.
+ result = false;
+ }
+#endif
+
+ if(result)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "key_event");
+ std::string temp;
+ switch(type)
+ {
+ case KEY_EVENT_DOWN: temp = "down"; break;
+ case KEY_EVENT_UP: temp = "up"; break;
+ case KEY_EVENT_REPEAT: temp = "repeat"; break;
+ }
+ message.setValue("event", temp);
+
+ message.setValueS32("key", key_code);
+
+ message.setValue("modifiers", translateModifiers(modifiers));
+ message.setValueLLSD("native_key_data", native_key_data);
+
+ sendMessage(message);
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "scroll_event");
+
+ message.setValueS32("x", x);
+ message.setValueS32("y", y);
+ message.setValue("modifiers", translateModifiers(modifiers));
+
+ sendMessage(message);
+}
+
+bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD native_key_data)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "text_event");
+
+ message.setValue("text", text);
+ message.setValue("modifiers", translateModifiers(modifiers));
+ message.setValueLLSD("native_key_data", native_key_data);
+
+ sendMessage(message);
+
+ return true;
+}
+
+void LLPluginClassMedia::loadURI(const std::string &uri)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "load_uri");
+
+ message.setValue("uri", uri);
+
+ sendMessage(message);
+}
+
+const char* LLPluginClassMedia::priorityToString(EPriority priority)
+{
+ const char* result = "UNKNOWN";
+ switch(priority)
+ {
+ case PRIORITY_UNLOADED: result = "unloaded"; break;
+ case PRIORITY_STOPPED: result = "stopped"; break;
+ case PRIORITY_HIDDEN: result = "hidden"; break;
+ case PRIORITY_SLIDESHOW: result = "slideshow"; break;
+ case PRIORITY_LOW: result = "low"; break;
+ case PRIORITY_NORMAL: result = "normal"; break;
+ case PRIORITY_HIGH: result = "high"; break;
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::setPriority(EPriority priority)
+{
+ if(mPriority != priority)
+ {
+ mPriority = priority;
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_priority");
+
+ std::string priority_string = priorityToString(priority);
+ switch(priority)
+ {
+ case PRIORITY_UNLOADED:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_STOPPED:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_HIDDEN:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_SLIDESHOW:
+ mSleepTime = 1.0f;
+ break;
+ case PRIORITY_LOW:
+ mSleepTime = 1.0f / 25.0f;
+ break;
+ case PRIORITY_NORMAL:
+ mSleepTime = 1.0f / 50.0f;
+ break;
+ case PRIORITY_HIGH:
+ mSleepTime = 1.0f / 100.0f;
+ break;
+ }
+
+ message.setValue("priority", priority_string);
+
+ sendMessage(message);
+
+ if(mPlugin)
+ {
+ mPlugin->setSleepTime(mSleepTime);
+ }
+
+ LL_DEBUGS("PluginPriority") << this << ": setting priority to " << priority_string << LL_ENDL;
+
+ // This may affect the calculated size, so recalculate it here.
+ setSizeInternal();
+ }
+}
+
+void LLPluginClassMedia::setLowPrioritySizeLimit(int size)
+{
+ int power = nextPowerOf2(size);
+ if(mLowPrioritySizeLimit != power)
+ {
+ mLowPrioritySizeLimit = power;
+
+ // This may affect the calculated size, so recalculate it here.
+ setSizeInternal();
+ }
+}
+
+F64 LLPluginClassMedia::getCPUUsage()
+{
+ F64 result = 0.0f;
+
+ if(mPlugin)
+ {
+ result = mPlugin->getCPUUsage();
+ }
+
+ return result;
+}
+
+void LLPluginClassMedia::sendPickFileResponse(const std::string &file)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file_response");
+ message.setValue("file", file);
+ if(mPlugin && mPlugin->isBlocked())
+ {
+ // If the plugin sent a blocking pick-file request, the response should unblock it.
+ message.setValueBoolean("blocking_response", true);
+ }
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::sendAuthResponse(bool ok, const std::string &username, const std::string &password)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "auth_response");
+ message.setValueBoolean("ok", ok);
+ message.setValue("username", username);
+ message.setValue("password", password);
+ if(mPlugin && mPlugin->isBlocked())
+ {
+ // If the plugin sent a blocking pick-file request, the response should unblock it.
+ message.setValueBoolean("blocking_response", true);
+ }
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::cut()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_cut");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::copy()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_copy");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::paste()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_paste");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path");
+ message.setValue("path", user_data_path);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setLanguageCode(const std::string &language_code)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_language_code");
+ message.setValue("language", language_code);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setPluginsEnabled(const bool enabled)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "plugins_enabled");
+ message.setValueBoolean("enable", enabled);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setJavascriptEnabled(const bool enabled)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "javascript_enabled");
+ message.setValueBoolean("enable", enabled);
+ sendMessage(message);
+}
+
+
+void LLPluginClassMedia::enableMediaPluginDebugging( bool enable )
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "enable_media_plugin_debugging");
+ message.setValueBoolean( "enable", enable );
+ sendMessage( message );
+}
+
+void LLPluginClassMedia::setTarget(const std::string &target)
+{
+ mTarget = target;
+}
+
+/* virtual */
+void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
+{
+ std::string message_class = message.getClass();
+
+ if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
+ {
+ std::string message_name = message.getName();
+ if(message_name == "texture_params")
+ {
+ mRequestedTextureDepth = message.getValueS32("depth");
+ mRequestedTextureInternalFormat = message.getValueU32("internalformat");
+ mRequestedTextureFormat = message.getValueU32("format");
+ mRequestedTextureType = message.getValueU32("type");
+ mRequestedTextureSwapBytes = message.getValueBoolean("swap_bytes");
+ mRequestedTextureCoordsOpenGL = message.getValueBoolean("coords_opengl");
+
+ // These two are optional, and will default to 0 if they're not specified.
+ mDefaultMediaWidth = message.getValueS32("default_width");
+ mDefaultMediaHeight = message.getValueS32("default_height");
+
+ mAllowDownsample = message.getValueBoolean("allow_downsample");
+ mPadding = message.getValueS32("padding");
+
+ setSizeInternal();
+
+ mTextureParamsReceived = true;
+ }
+ else if(message_name == "updated")
+ {
+ if(message.hasValue("left"))
+ {
+ LLRect newDirtyRect;
+ newDirtyRect.mLeft = message.getValueS32("left");
+ newDirtyRect.mTop = message.getValueS32("top");
+ newDirtyRect.mRight = message.getValueS32("right");
+ newDirtyRect.mBottom = message.getValueS32("bottom");
+
+ // The plugin is likely to have top and bottom switched, due to vertical flip and OpenGL coordinate confusion.
+ // If they're backwards, swap them.
+ if(newDirtyRect.mTop < newDirtyRect.mBottom)
+ {
+ S32 temp = newDirtyRect.mTop;
+ newDirtyRect.mTop = newDirtyRect.mBottom;
+ newDirtyRect.mBottom = temp;
+ }
+
+ if(mDirtyRect.isEmpty())
+ {
+ mDirtyRect = newDirtyRect;
+ }
+ else
+ {
+ mDirtyRect.unionWith(newDirtyRect);
+ }
+
+ LL_DEBUGS("Plugin") << "adjusted incoming rect is: ("
+ << newDirtyRect.mLeft << ", "
+ << newDirtyRect.mTop << ", "
+ << newDirtyRect.mRight << ", "
+ << newDirtyRect.mBottom << "), new dirty rect is: ("
+ << mDirtyRect.mLeft << ", "
+ << mDirtyRect.mTop << ", "
+ << mDirtyRect.mRight << ", "
+ << mDirtyRect.mBottom << ")"
+ << LL_ENDL;
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CONTENT_UPDATED);
+ }
+
+
+ bool time_duration_updated = false;
+ int previous_percent = mProgressPercent;
+
+ if(message.hasValue("current_time"))
+ {
+ mCurrentTime = message.getValueReal("current_time");
+ time_duration_updated = true;
+ }
+ if(message.hasValue("duration"))
+ {
+ mDuration = message.getValueReal("duration");
+ time_duration_updated = true;
+ }
+
+ if(message.hasValue("current_rate"))
+ {
+ mCurrentRate = message.getValueReal("current_rate");
+ }
+
+ if(message.hasValue("loaded_duration"))
+ {
+ mLoadedDuration = message.getValueReal("loaded_duration");
+ time_duration_updated = true;
+ }
+ else
+ {
+ // If the message doesn't contain a loaded_duration param, assume it's equal to duration
+ mLoadedDuration = mDuration;
+ }
+
+ // Calculate a percentage based on the loaded duration and total duration.
+ if(mDuration != 0.0f) // Don't divide by zero.
+ {
+ mProgressPercent = (int)((mLoadedDuration * 100.0f)/mDuration);
+ }
+
+ if(time_duration_updated)
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_TIME_DURATION_UPDATED);
+ }
+
+ if(previous_percent != mProgressPercent)
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
+ }
+ }
+ else if(message_name == "media_status")
+ {
+ std::string status = message.getValue("status");
+
+ LL_DEBUGS("Plugin") << "Status changed to: " << status << LL_ENDL;
+
+ if(status == "loading")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_LOADING;
+ }
+ else if(status == "loaded")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_LOADED;
+ }
+ else if(status == "error")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_ERROR;
+ }
+ else if(status == "playing")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_PLAYING;
+ }
+ else if(status == "paused")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_PAUSED;
+ }
+ else if(status == "done")
+ {
+ mStatus = LLPluginClassMediaOwner::MEDIA_DONE;
+ }
+ else
+ {
+ // empty string or any unknown string
+ mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
+ }
+ }
+ else if(message_name == "size_change_request")
+ {
+ S32 width = message.getValueS32("width");
+ S32 height = message.getValueS32("height");
+ std::string name = message.getValue("name");
+
+ // TODO: check that name matches?
+ mNaturalMediaWidth = width;
+ mNaturalMediaHeight = height;
+
+ setSizeInternal();
+ }
+ else if(message_name == "size_change_response")
+ {
+ std::string name = message.getValue("name");
+
+ // TODO: check that name matches?
+
+ mTextureWidth = message.getValueS32("texture_width");
+ mTextureHeight = message.getValueS32("texture_height");
+ mMediaWidth = message.getValueS32("width");
+ mMediaHeight = message.getValueS32("height");
+
+ // This invalidates any existing dirty rect.
+ resetDirty();
+
+ // TODO: should we verify that the plugin sent back the right values?
+ // Two size changes in a row may cause them to not match, due to queueing, etc.
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_SIZE_CHANGED);
+ }
+ else if(message_name == "cursor_changed")
+ {
+ mCursorName = message.getValue("name");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CURSOR_CHANGED);
+ }
+ else if(message_name == "edit_state")
+ {
+ if(message.hasValue("cut"))
+ {
+ mCanCut = message.getValueBoolean("cut");
+ }
+ if(message.hasValue("copy"))
+ {
+ mCanCopy = message.getValueBoolean("copy");
+ }
+ if(message.hasValue("paste"))
+ {
+ mCanPaste = message.getValueBoolean("paste");
+ }
+ }
+ else if(message_name == "name_text")
+ {
+ mMediaName = message.getValue("name");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
+ }
+ else if(message_name == "pick_file")
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PICK_FILE_REQUEST);
+ }
+ else if(message_name == "auth_request")
+ {
+ mAuthURL = message.getValue("url");
+ mAuthRealm = message.getValue("realm");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
+ }
+ else if(message_name == "debug_message")
+ {
+ mDebugMessageText = message.getValue("message_text");
+ mDebugMessageLevel = message.getValue("message_level");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_DEBUG_MESSAGE);
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
+ }
+ }
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
+ {
+ std::string message_name = message.getName();
+ if(message_name == "navigate_begin")
+ {
+ mNavigateURI = message.getValue("uri");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_BEGIN);
+ }
+ else if(message_name == "navigate_complete")
+ {
+ mNavigateURI = message.getValue("uri");
+ mNavigateResultCode = message.getValueS32("result_code");
+ mNavigateResultString = message.getValue("result_string");
+ mHistoryBackAvailable = message.getValueBoolean("history_back_available");
+ mHistoryForwardAvailable = message.getValueBoolean("history_forward_available");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_COMPLETE);
+ }
+ else if(message_name == "progress")
+ {
+ mProgressPercent = message.getValueS32("percent");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PROGRESS_UPDATED);
+ }
+ else if(message_name == "status_text")
+ {
+ mStatusText = message.getValue("status");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_STATUS_TEXT_CHANGED);
+ }
+ else if(message_name == "location_changed")
+ {
+ mLocation = message.getValue("uri");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LOCATION_CHANGED);
+ }
+ else if(message_name == "click_href")
+ {
+ mClickURL = message.getValue("uri");
+ mClickTarget = message.getValue("target");
+ mClickUUID = message.getValue("uuid");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF);
+ }
+ else if(message_name == "click_nofollow")
+ {
+ mClickURL = message.getValue("uri");
+ mClickNavType = message.getValue("nav_type");
+ mClickTarget.clear();
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_NOFOLLOW);
+ }
+ else if(message_name == "navigate_error_page")
+ {
+ mStatusCode = message.getValueS32("status_code");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAVIGATE_ERROR_PAGE);
+ }
+ else if(message_name == "cookie_set")
+ {
+ if(mOwner)
+ {
+ mOwner->handleCookieSet(this, message.getValue("cookie"));
+ }
+ }
+ else if(message_name == "close_request")
+ {
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLOSE_REQUEST);
+ }
+ else if(message_name == "geometry_change")
+ {
+ mClickUUID = message.getValue("uuid");
+ mGeometryX = message.getValueS32("x");
+ mGeometryY = message.getValueS32("y");
+ mGeometryWidth = message.getValueS32("width");
+ mGeometryHeight = message.getValueS32("height");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_GEOMETRY_CHANGE);
+ }
+ else if(message_name == "link_hovered")
+ {
+ // text is not currently used -- the tooltip hover text is taken from the "title".
+ mHoverLink = message.getValue("link");
+ mHoverText = message.getValue("title");
+ // message.getValue("text");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LINK_HOVERED);
+ }
+ else
+ {
+ LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
+ }
+ }
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
+ {
+ std::string message_name = message.getName();
+
+ // This class hasn't defined any incoming messages yet.
+// if(message_name == "message_name")
+// {
+// }
+// else
+ {
+ LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
+ }
+ }
+
+}
+
+/* virtual */
+void LLPluginClassMedia::pluginLaunchFailed()
+{
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED_LAUNCH);
+}
+
+/* virtual */
+void LLPluginClassMedia::pluginDied()
+{
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PLUGIN_FAILED);
+}
+
+void LLPluginClassMedia::mediaEvent(LLPluginClassMediaOwner::EMediaEvent event)
+{
+ if(mOwner)
+ {
+ mOwner->handleMediaEvent(this, event);
+ }
+}
+
+void LLPluginClassMedia::sendMessage(const LLPluginMessage &message)
+{
+ if(mPlugin && mPlugin->isRunning())
+ {
+ mPlugin->sendMessage(message);
+ }
+ else
+ {
+ // The plugin isn't set up yet -- queue this message to be sent after initialization.
+ mSendQueue.push(message);
+ }
+}
+
+////////////////////////////////////////////////////////////
+// MARK: media_browser class functions
+bool LLPluginClassMedia::pluginSupportsMediaBrowser(void)
+{
+ std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER);
+ return !version.empty();
+}
+
+void LLPluginClassMedia::focus(bool focused)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "focus");
+
+ message.setValueBoolean("focused", focused);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::set_page_zoom_factor( double factor )
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_page_zoom_factor");
+
+ message.setValueReal("factor", factor);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::clear_cache()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cache");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::clear_cookies()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cookies");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::set_cookies(const std::string &cookies)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_cookies");
+ message.setValue("cookies", cookies);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::enable_cookies(bool enable)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "enable_cookies");
+ message.setValueBoolean("enable", enable);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::proxy_setup(bool enable, const std::string &host, int port)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_setup");
+
+ message.setValueBoolean("enable", enable);
+ message.setValue("host", host);
+ message.setValueS32("port", port);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_stop()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_stop");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_reload(bool ignore_cache)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_reload");
+
+ message.setValueBoolean("ignore_cache", ignore_cache);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_forward()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_forward");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::browse_back()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "browse_back");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setBrowserUserAgent(const std::string& user_agent)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_user_agent");
+
+ message.setValue("user_agent", user_agent);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::showWebInspector( bool show )
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "show_web_inspector");
+ message.setValueBoolean("show", true); // only open for now - closed manually by user
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::proxyWindowOpened(const std::string &target, const std::string &uuid)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_opened");
+
+ message.setValue("target", target);
+ message.setValue("uuid", uuid);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::proxyWindowClosed(const std::string &uuid)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_closed");
+
+ message.setValue("uuid", uuid);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::ignore_ssl_cert_errors(bool ignore)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "ignore_ssl_cert_errors");
+ message.setValueBoolean("ignore", ignore);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::addCertificateFilePath(const std::string& path)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "add_certificate_file_path");
+ message.setValue("path", path);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::crashPlugin()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash");
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::hangPlugin()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "hang");
+
+ sendMessage(message);
+}
+
+
+////////////////////////////////////////////////////////////
+// MARK: media_time class functions
+bool LLPluginClassMedia::pluginSupportsMediaTime(void)
+{
+ std::string version = mPlugin->getMessageClassVersion(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME);
+ return !version.empty();
+}
+
+void LLPluginClassMedia::stop()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "stop");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::start(float rate)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "start");
+
+ message.setValueReal("rate", rate);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::pause()
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "pause");
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::seek(float time)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "seek");
+
+ message.setValueReal("time", time);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setLoop(bool loop)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_loop");
+
+ message.setValueBoolean("loop", loop);
+
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setVolume(float volume)
+{
+ if(volume != mRequestedVolume)
+ {
+ mRequestedVolume = volume;
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME, "set_volume");
+
+ message.setValueReal("volume", volume);
+
+ sendMessage(message);
+ }
+}
+
+float LLPluginClassMedia::getVolume()
+{
+ return mRequestedVolume;
+}
+
+void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history)
+{
+ // Send URL history to plugin
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "init_history");
+ message.setValueLLSD("history", url_history);
+ sendMessage(message);
+
+ LL_DEBUGS("Plugin") << "Sending history" << LL_ENDL;
+}
+
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index f8ed89f644..5fe8254331 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -1,425 +1,436 @@
-/**
- * @file llpluginclassmedia.h
- * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class.
- *
- * @cond
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- * @endcond
- */
-
-#ifndef LL_LLPLUGINCLASSMEDIA_H
-#define LL_LLPLUGINCLASSMEDIA_H
-
-#include "llgltypes.h"
-#include "llpluginprocessparent.h"
-#include "llrect.h"
-#include "llpluginclassmediaowner.h"
-#include <queue>
-#include "v4color.h"
-
-class LLPluginClassMedia : public LLPluginProcessParentOwner
-{
- LOG_CLASS(LLPluginClassMedia);
-public:
- LLPluginClassMedia(LLPluginClassMediaOwner *owner);
- virtual ~LLPluginClassMedia();
-
- // local initialization, called by the media manager when creating a source
- virtual bool init(const std::string &launcher_filename,
- const std::string &plugin_dir,
- const std::string &plugin_filename,
- bool debug);
-
- // undoes everything init() didm called by the media manager when destroying a source
- virtual void reset();
-
- void idle(void);
-
- // All of these may return 0 or an actual valid value.
- // Callers need to check the return for 0, and not use the values in that case.
- int getWidth() const { return (mMediaWidth > 0) ? mMediaWidth : 0; };
- int getHeight() const { return (mMediaHeight > 0) ? mMediaHeight : 0; };
- int getNaturalWidth() const { return mNaturalMediaWidth; };
- int getNaturalHeight() const { return mNaturalMediaHeight; };
- int getSetWidth() const { return mSetMediaWidth; };
- int getSetHeight() const { return mSetMediaHeight; };
- int getBitsWidth() const { return (mTextureWidth > 0) ? mTextureWidth : 0; };
- int getBitsHeight() const { return (mTextureHeight > 0) ? mTextureHeight : 0; };
- int getTextureWidth() const;
- int getTextureHeight() const;
- int getFullWidth() const { return mFullMediaWidth; };
- int getFullHeight() const { return mFullMediaHeight; };
-
- // This may return NULL. Callers need to check for and handle this case.
- unsigned char* getBitsData();
-
- // gets the format details of the texture data
- // These may return 0 if they haven't been set up yet. The caller needs to detect this case.
- int getTextureDepth() const { return mRequestedTextureDepth; };
- int getTextureFormatInternal() const { return mRequestedTextureInternalFormat; };
- int getTextureFormatPrimary() const { return mRequestedTextureFormat; };
- int getTextureFormatType() const { return mRequestedTextureType; };
- bool getTextureFormatSwapBytes() const { return mRequestedTextureSwapBytes; };
- bool getTextureCoordsOpenGL() const { return mRequestedTextureCoordsOpenGL; };
-
- void setSize(int width, int height);
- void setAutoScale(bool auto_scale);
-
- void setBackgroundColor(LLColor4 color) { mBackgroundColor = color; };
-
- void setOwner(LLPluginClassMediaOwner *owner) { mOwner = owner; };
-
- // Returns true if all of the texture parameters (depth, format, size, and texture size) are set up and consistent.
- // This will initially be false, and will also be false for some time after setSize while the resize is processed.
- // Note that if this returns true, it is safe to use all the get() functions above without checking for invalid return values
- // until you call idle() again.
- bool textureValid(void);
-
- bool getDirty(LLRect *dirty_rect = NULL);
- void resetDirty(void);
-
- typedef enum
- {
- MOUSE_EVENT_DOWN,
- MOUSE_EVENT_UP,
- MOUSE_EVENT_MOVE,
- MOUSE_EVENT_DOUBLE_CLICK
- }EMouseEventType;
-
- void mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers);
-
- typedef enum
- {
- KEY_EVENT_DOWN,
- KEY_EVENT_UP,
- KEY_EVENT_REPEAT
- }EKeyEventType;
-
- bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data);
-
- void scrollEvent(int x, int y, MASK modifiers);
-
- // Javascript <-> viewer events
- void jsEnableObject( bool enable );
- void jsAgentLocationEvent( double x, double y, double z );
- void jsAgentGlobalLocationEvent( double x, double y, double z );
- void jsAgentOrientationEvent( double angle );
- void jsAgentLanguageEvent( const std::string& language );
- void jsAgentRegionEvent( const std::string& region_name );
- void jsAgentMaturityEvent( const std::string& maturity );
-
- // Text may be unicode (utf8 encoded)
- bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data);
-
- void loadURI(const std::string &uri);
-
- // "Loading" means uninitialized or any state prior to fully running (processing commands)
- bool isPluginLoading(void) { return mPlugin?mPlugin->isLoading():false; };
-
- // "Running" means the steady state -- i.e. processing messages
- bool isPluginRunning(void) { return mPlugin?mPlugin->isRunning():false; };
-
- // "Exited" means any regular or error state after "Running" (plugin may have crashed or exited normally)
- bool isPluginExited(void) { return mPlugin?mPlugin->isDone():false; };
-
- std::string getPluginVersion() { return mPlugin?mPlugin->getPluginVersion():std::string(""); };
-
- bool getDisableTimeout() { return mPlugin?mPlugin->getDisableTimeout():false; };
- void setDisableTimeout(bool disable) { if(mPlugin) mPlugin->setDisableTimeout(disable); };
-
- // Inherited from LLPluginProcessParentOwner
- /* virtual */ void receivePluginMessage(const LLPluginMessage &message);
- /* virtual */ void pluginLaunchFailed();
- /* virtual */ void pluginDied();
-
-
- typedef enum
- {
- PRIORITY_UNLOADED, // media plugin isn't even loaded.
- PRIORITY_STOPPED, // media is not playing, shouldn't need to update at all.
- PRIORITY_HIDDEN, // media is not being displayed or is out of view, don't need to do graphic updates, but may still update audio, playhead, etc.
- PRIORITY_SLIDESHOW, // media is in the far distance, updates very infrequently
- PRIORITY_LOW, // media is in the distance, may be rendered at reduced size
- PRIORITY_NORMAL, // normal (default) priority
- PRIORITY_HIGH // media has user focus and/or is taking up most of the screen
- }EPriority;
-
- static const char* priorityToString(EPriority priority);
- void setPriority(EPriority priority);
- void setLowPrioritySizeLimit(int size);
-
- F64 getCPUUsage();
-
- void sendPickFileResponse(const std::string &file);
-
- void sendAuthResponse(bool ok, const std::string &username, const std::string &password);
-
- // Valid after a MEDIA_EVENT_CURSOR_CHANGED event
- std::string getCursorName() const { return mCursorName; };
-
- LLPluginClassMediaOwner::EMediaStatus getStatus() const { return mStatus; }
-
- void cut();
- bool canCut() const { return mCanCut; };
-
- void copy();
- bool canCopy() const { return mCanCopy; };
-
- void paste();
- bool canPaste() const { return mCanPaste; };
-
- // These can be called before init(), and they will be queued and sent before the media init message.
- void setUserDataPath(const std::string &user_data_path);
- void setLanguageCode(const std::string &language_code);
- void setPluginsEnabled(const bool enabled);
- void setJavascriptEnabled(const bool enabled);
- void setTarget(const std::string &target);
-
- ///////////////////////////////////
- // media browser class functions
- bool pluginSupportsMediaBrowser(void);
-
- void focus(bool focused);
- void clear_cache();
- void clear_cookies();
- void set_cookies(const std::string &cookies);
- void enable_cookies(bool enable);
- void proxy_setup(bool enable, const std::string &host = LLStringUtil::null, int port = 0);
- void browse_stop();
- void browse_reload(bool ignore_cache = false);
- void browse_forward();
- void browse_back();
- void setBrowserUserAgent(const std::string& user_agent);
- void proxyWindowOpened(const std::string &target, const std::string &uuid);
- void proxyWindowClosed(const std::string &uuid);
- void ignore_ssl_cert_errors(bool ignore);
- void addCertificateFilePath(const std::string& path);
-
- // This is valid after MEDIA_EVENT_NAVIGATE_BEGIN or MEDIA_EVENT_NAVIGATE_COMPLETE
- std::string getNavigateURI() const { return mNavigateURI; };
-
- // These are valid after MEDIA_EVENT_NAVIGATE_COMPLETE
- S32 getNavigateResultCode() const { return mNavigateResultCode; };
- std::string getNavigateResultString() const { return mNavigateResultString; };
- bool getHistoryBackAvailable() const { return mHistoryBackAvailable; };
- bool getHistoryForwardAvailable() const { return mHistoryForwardAvailable; };
-
- // This is valid after MEDIA_EVENT_PROGRESS_UPDATED
- int getProgressPercent() const { return mProgressPercent; };
-
- // This is valid after MEDIA_EVENT_STATUS_TEXT_CHANGED
- std::string getStatusText() const { return mStatusText; };
-
- // This is valid after MEDIA_EVENT_LOCATION_CHANGED
- std::string getLocation() const { return mLocation; };
-
- // This is valid after MEDIA_EVENT_CLICK_LINK_HREF or MEDIA_EVENT_CLICK_LINK_NOFOLLOW
- std::string getClickURL() const { return mClickURL; };
-
- // This is valid after MEDIA_EVENT_CLICK_LINK_NOFOLLOW
- std::string getClickNavType() const { return mClickNavType; };
-
- // This is valid after MEDIA_EVENT_CLICK_LINK_HREF
- std::string getClickTarget() const { return mClickTarget; };
-
- // This is valid during MEDIA_EVENT_CLICK_LINK_HREF and MEDIA_EVENT_GEOMETRY_CHANGE
- std::string getClickUUID() const { return mClickUUID; };
-
- // This is valid after MEDIA_EVENT_NAVIGATE_ERROR_PAGE
- S32 getStatusCode() const { return mStatusCode; };
-
- // These are valid during MEDIA_EVENT_GEOMETRY_CHANGE
- S32 getGeometryX() const { return mGeometryX; };
- S32 getGeometryY() const { return mGeometryY; };
- S32 getGeometryWidth() const { return mGeometryWidth; };
- S32 getGeometryHeight() const { return mGeometryHeight; };
-
- // These are valid during MEDIA_EVENT_AUTH_REQUEST
- std::string getAuthURL() const { return mAuthURL; };
- std::string getAuthRealm() const { return mAuthRealm; };
-
- // These are valid during MEDIA_EVENT_LINK_HOVERED
- std::string getHoverText() const { return mHoverText; };
- std::string getHoverLink() const { return mHoverLink; };
-
- std::string getMediaName() const { return mMediaName; };
- std::string getMediaDescription() const { return mMediaDescription; };
-
- // Crash the plugin. If you use this outside of a testbed, you will be punished.
- void crashPlugin();
-
- // Hang the plugin. If you use this outside of a testbed, you will be punished.
- void hangPlugin();
-
- ///////////////////////////////////
- // media time class functions
- bool pluginSupportsMediaTime(void);
- void stop();
- void start(float rate = 0.0f);
- void pause();
- void seek(float time);
- void setLoop(bool loop);
- void setVolume(float volume);
- float getVolume();
-
- F64 getCurrentTime(void) const { return mCurrentTime; };
- F64 getDuration(void) const { return mDuration; };
- F64 getCurrentPlayRate(void) { return mCurrentRate; };
- F64 getLoadedDuration(void) const { return mLoadedDuration; };
-
- // Initialize the URL history of the plugin by sending
- // "init_history" message
- void initializeUrlHistory(const LLSD& url_history);
-
-protected:
-
- LLPluginClassMediaOwner *mOwner;
-
- // Notify this object's owner that an event has occurred.
- void mediaEvent(LLPluginClassMediaOwner::EMediaEvent event);
-
- void sendMessage(const LLPluginMessage &message); // Send message internally, either queueing or sending directly.
- std::queue<LLPluginMessage> mSendQueue; // Used to queue messages while the plugin initializes.
-
- void setSizeInternal(void);
-
- bool mTextureParamsReceived; // the mRequestedTexture* fields are only valid when this is true
- S32 mRequestedTextureDepth;
- LLGLenum mRequestedTextureInternalFormat;
- LLGLenum mRequestedTextureFormat;
- LLGLenum mRequestedTextureType;
- bool mRequestedTextureSwapBytes;
- bool mRequestedTextureCoordsOpenGL;
-
- std::string mTextureSharedMemoryName;
- size_t mTextureSharedMemorySize;
-
- // True to scale requested media up to the full size of the texture (i.e. next power of two)
- bool mAutoScaleMedia;
-
- // default media size for the plugin, from the texture_params message.
- int mDefaultMediaWidth;
- int mDefaultMediaHeight;
-
- // Size that has been requested by the plugin itself
- int mNaturalMediaWidth;
- int mNaturalMediaHeight;
-
- // Size that has been requested with setSize()
- int mSetMediaWidth;
- int mSetMediaHeight;
-
- // Full calculated media size (before auto-scale and downsample calculations)
- int mFullMediaWidth;
- int mFullMediaHeight;
-
- // Actual media size being set (after auto-scale)
- int mRequestedMediaWidth;
- int mRequestedMediaHeight;
-
- // Texture size calculated from actual media size
- int mRequestedTextureWidth;
- int mRequestedTextureHeight;
-
- // Size that the plugin has acknowledged
- int mTextureWidth;
- int mTextureHeight;
- int mMediaWidth;
- int mMediaHeight;
-
- float mRequestedVolume;
-
- // Priority of this media stream
- EPriority mPriority;
- int mLowPrioritySizeLimit;
-
- bool mAllowDownsample;
- int mPadding;
-
-
- LLPluginProcessParent *mPlugin;
-
- LLRect mDirtyRect;
-
- std::string translateModifiers(MASK modifiers);
-
- std::string mCursorName;
- int mLastMouseX;
- int mLastMouseY;
-
- LLPluginClassMediaOwner::EMediaStatus mStatus;
-
- F64 mSleepTime;
-
- bool mCanCut;
- bool mCanCopy;
- bool mCanPaste;
-
- std::string mMediaName;
- std::string mMediaDescription;
-
- LLColor4 mBackgroundColor;
-
- std::string mTarget;
-
- /////////////////////////////////////////
- // media_browser class
- std::string mNavigateURI;
- S32 mNavigateResultCode;
- std::string mNavigateResultString;
- bool mHistoryBackAvailable;
- bool mHistoryForwardAvailable;
- std::string mStatusText;
- int mProgressPercent;
- std::string mLocation;
- std::string mClickURL;
- std::string mClickNavType;
- std::string mClickTarget;
- std::string mClickUUID;
- S32 mGeometryX;
- S32 mGeometryY;
- S32 mGeometryWidth;
- S32 mGeometryHeight;
- S32 mStatusCode;
- std::string mAuthURL;
- std::string mAuthRealm;
- std::string mHoverText;
- std::string mHoverLink;
-
- /////////////////////////////////////////
- // media_time class
- F64 mCurrentTime;
- F64 mDuration;
- F64 mCurrentRate;
- F64 mLoadedDuration;
-
-//--------------------------------------
- //debug use only
- //
-private:
- bool mDeleteOK ;
-public:
- void setDeleteOK(bool flag) { mDeleteOK = flag ;}
-//--------------------------------------
-};
-
-#endif // LL_LLPLUGINCLASSMEDIA_H
+/**
+ * @file llpluginclassmedia.h
+ * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class.
+ *
+ * @cond
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ * @endcond
+ */
+
+#ifndef LL_LLPLUGINCLASSMEDIA_H
+#define LL_LLPLUGINCLASSMEDIA_H
+
+#include "llgltypes.h"
+#include "llpluginprocessparent.h"
+#include "llrect.h"
+#include "llpluginclassmediaowner.h"
+#include <queue>
+#include "v4color.h"
+
+class LLPluginClassMedia : public LLPluginProcessParentOwner
+{
+ LOG_CLASS(LLPluginClassMedia);
+public:
+ LLPluginClassMedia(LLPluginClassMediaOwner *owner);
+ virtual ~LLPluginClassMedia();
+
+ // local initialization, called by the media manager when creating a source
+ bool init(const std::string &launcher_filename,
+ const std::string &plugin_dir,
+ const std::string &plugin_filename,
+ bool debug);
+
+ // undoes everything init() didm called by the media manager when destroying a source
+ void reset();
+
+ void idle(void);
+
+ // All of these may return 0 or an actual valid value.
+ // Callers need to check the return for 0, and not use the values in that case.
+ int getWidth() const { return (mMediaWidth > 0) ? mMediaWidth : 0; };
+ int getHeight() const { return (mMediaHeight > 0) ? mMediaHeight : 0; };
+ int getNaturalWidth() const { return mNaturalMediaWidth; };
+ int getNaturalHeight() const { return mNaturalMediaHeight; };
+ int getSetWidth() const { return mSetMediaWidth; };
+ int getSetHeight() const { return mSetMediaHeight; };
+ int getBitsWidth() const { return (mTextureWidth > 0) ? mTextureWidth : 0; };
+ int getBitsHeight() const { return (mTextureHeight > 0) ? mTextureHeight : 0; };
+ int getTextureWidth() const;
+ int getTextureHeight() const;
+ int getFullWidth() const { return mFullMediaWidth; };
+ int getFullHeight() const { return mFullMediaHeight; };
+
+ // This may return NULL. Callers need to check for and handle this case.
+ unsigned char* getBitsData();
+
+ // gets the format details of the texture data
+ // These may return 0 if they haven't been set up yet. The caller needs to detect this case.
+ int getTextureDepth() const { return mRequestedTextureDepth; };
+ int getTextureFormatInternal() const { return mRequestedTextureInternalFormat; };
+ int getTextureFormatPrimary() const { return mRequestedTextureFormat; };
+ int getTextureFormatType() const { return mRequestedTextureType; };
+ bool getTextureFormatSwapBytes() const { return mRequestedTextureSwapBytes; };
+ bool getTextureCoordsOpenGL() const { return mRequestedTextureCoordsOpenGL; };
+
+ void setSize(int width, int height);
+ void setAutoScale(bool auto_scale);
+
+ void setBackgroundColor(LLColor4 color) { mBackgroundColor = color; };
+
+ void setOwner(LLPluginClassMediaOwner *owner) { mOwner = owner; };
+
+ // Returns true if all of the texture parameters (depth, format, size, and texture size) are set up and consistent.
+ // This will initially be false, and will also be false for some time after setSize while the resize is processed.
+ // Note that if this returns true, it is safe to use all the get() functions above without checking for invalid return values
+ // until you call idle() again.
+ bool textureValid(void);
+
+ bool getDirty(LLRect *dirty_rect = NULL);
+ void resetDirty(void);
+
+ typedef enum
+ {
+ MOUSE_EVENT_DOWN,
+ MOUSE_EVENT_UP,
+ MOUSE_EVENT_MOVE,
+ MOUSE_EVENT_DOUBLE_CLICK
+ }EMouseEventType;
+
+ void mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers);
+
+ typedef enum
+ {
+ KEY_EVENT_DOWN,
+ KEY_EVENT_UP,
+ KEY_EVENT_REPEAT
+ }EKeyEventType;
+
+ bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data);
+
+ void scrollEvent(int x, int y, MASK modifiers);
+
+ // enable/disable media plugin debugging messages and info spam
+ void enableMediaPluginDebugging( bool enable );
+
+ // Javascript <-> viewer events
+ void jsEnableObject( bool enable );
+ void jsAgentLocationEvent( double x, double y, double z );
+ void jsAgentGlobalLocationEvent( double x, double y, double z );
+ void jsAgentOrientationEvent( double angle );
+ void jsAgentLanguageEvent( const std::string& language );
+ void jsAgentRegionEvent( const std::string& region_name );
+ void jsAgentMaturityEvent( const std::string& maturity );
+
+ // Text may be unicode (utf8 encoded)
+ bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data);
+
+ void loadURI(const std::string &uri);
+
+ // "Loading" means uninitialized or any state prior to fully running (processing commands)
+ bool isPluginLoading(void) { return mPlugin?mPlugin->isLoading():false; };
+
+ // "Running" means the steady state -- i.e. processing messages
+ bool isPluginRunning(void) { return mPlugin?mPlugin->isRunning():false; };
+
+ // "Exited" means any regular or error state after "Running" (plugin may have crashed or exited normally)
+ bool isPluginExited(void) { return mPlugin?mPlugin->isDone():false; };
+
+ std::string getPluginVersion() { return mPlugin?mPlugin->getPluginVersion():std::string(""); };
+
+ bool getDisableTimeout() { return mPlugin?mPlugin->getDisableTimeout():false; };
+ void setDisableTimeout(bool disable) { if(mPlugin) mPlugin->setDisableTimeout(disable); };
+
+ // Inherited from LLPluginProcessParentOwner
+ /* virtual */ void receivePluginMessage(const LLPluginMessage &message);
+ /* virtual */ void pluginLaunchFailed();
+ /* virtual */ void pluginDied();
+
+
+ typedef enum
+ {
+ PRIORITY_UNLOADED, // media plugin isn't even loaded.
+ PRIORITY_STOPPED, // media is not playing, shouldn't need to update at all.
+ PRIORITY_HIDDEN, // media is not being displayed or is out of view, don't need to do graphic updates, but may still update audio, playhead, etc.
+ PRIORITY_SLIDESHOW, // media is in the far distance, updates very infrequently
+ PRIORITY_LOW, // media is in the distance, may be rendered at reduced size
+ PRIORITY_NORMAL, // normal (default) priority
+ PRIORITY_HIGH // media has user focus and/or is taking up most of the screen
+ }EPriority;
+
+ static const char* priorityToString(EPriority priority);
+ void setPriority(EPriority priority);
+ void setLowPrioritySizeLimit(int size);
+
+ F64 getCPUUsage();
+
+ void sendPickFileResponse(const std::string &file);
+
+ void sendAuthResponse(bool ok, const std::string &username, const std::string &password);
+
+ // Valid after a MEDIA_EVENT_CURSOR_CHANGED event
+ std::string getCursorName() const { return mCursorName; };
+
+ LLPluginClassMediaOwner::EMediaStatus getStatus() const { return mStatus; }
+
+ void cut();
+ bool canCut() const { return mCanCut; };
+
+ void copy();
+ bool canCopy() const { return mCanCopy; };
+
+ void paste();
+ bool canPaste() const { return mCanPaste; };
+
+ // These can be called before init(), and they will be queued and sent before the media init message.
+ void setUserDataPath(const std::string &user_data_path);
+ void setLanguageCode(const std::string &language_code);
+ void setPluginsEnabled(const bool enabled);
+ void setJavascriptEnabled(const bool enabled);
+ void setTarget(const std::string &target);
+
+ ///////////////////////////////////
+ // media browser class functions
+ bool pluginSupportsMediaBrowser(void);
+
+ void focus(bool focused);
+ void set_page_zoom_factor( double factor );
+ void clear_cache();
+ void clear_cookies();
+ void set_cookies(const std::string &cookies);
+ void enable_cookies(bool enable);
+ void proxy_setup(bool enable, const std::string &host = LLStringUtil::null, int port = 0);
+ void browse_stop();
+ void browse_reload(bool ignore_cache = false);
+ void browse_forward();
+ void browse_back();
+ void setBrowserUserAgent(const std::string& user_agent);
+ void showWebInspector( bool show );
+ void proxyWindowOpened(const std::string &target, const std::string &uuid);
+ void proxyWindowClosed(const std::string &uuid);
+ void ignore_ssl_cert_errors(bool ignore);
+ void addCertificateFilePath(const std::string& path);
+
+ // This is valid after MEDIA_EVENT_NAVIGATE_BEGIN or MEDIA_EVENT_NAVIGATE_COMPLETE
+ std::string getNavigateURI() const { return mNavigateURI; };
+
+ // These are valid after MEDIA_EVENT_NAVIGATE_COMPLETE
+ S32 getNavigateResultCode() const { return mNavigateResultCode; };
+ std::string getNavigateResultString() const { return mNavigateResultString; };
+ bool getHistoryBackAvailable() const { return mHistoryBackAvailable; };
+ bool getHistoryForwardAvailable() const { return mHistoryForwardAvailable; };
+
+ // This is valid after MEDIA_EVENT_PROGRESS_UPDATED
+ int getProgressPercent() const { return mProgressPercent; };
+
+ // This is valid after MEDIA_EVENT_STATUS_TEXT_CHANGED
+ std::string getStatusText() const { return mStatusText; };
+
+ // This is valid after MEDIA_EVENT_LOCATION_CHANGED
+ std::string getLocation() const { return mLocation; };
+
+ // This is valid after MEDIA_EVENT_CLICK_LINK_HREF or MEDIA_EVENT_CLICK_LINK_NOFOLLOW
+ std::string getClickURL() const { return mClickURL; };
+
+ // This is valid after MEDIA_EVENT_CLICK_LINK_NOFOLLOW
+ std::string getClickNavType() const { return mClickNavType; };
+
+ // This is valid after MEDIA_EVENT_CLICK_LINK_HREF
+ std::string getClickTarget() const { return mClickTarget; };
+
+ // This is valid during MEDIA_EVENT_CLICK_LINK_HREF and MEDIA_EVENT_GEOMETRY_CHANGE
+ std::string getClickUUID() const { return mClickUUID; };
+
+ // These are valid during MEDIA_EVENT_DEBUG_MESSAGE
+ std::string getDebugMessageText() const { return mDebugMessageText; };
+ std::string getDebugMessageLevel() const { return mDebugMessageLevel; };
+
+ // This is valid after MEDIA_EVENT_NAVIGATE_ERROR_PAGE
+ S32 getStatusCode() const { return mStatusCode; };
+
+ // These are valid during MEDIA_EVENT_GEOMETRY_CHANGE
+ S32 getGeometryX() const { return mGeometryX; };
+ S32 getGeometryY() const { return mGeometryY; };
+ S32 getGeometryWidth() const { return mGeometryWidth; };
+ S32 getGeometryHeight() const { return mGeometryHeight; };
+
+ // These are valid during MEDIA_EVENT_AUTH_REQUEST
+ std::string getAuthURL() const { return mAuthURL; };
+ std::string getAuthRealm() const { return mAuthRealm; };
+
+ // These are valid during MEDIA_EVENT_LINK_HOVERED
+ std::string getHoverText() const { return mHoverText; };
+ std::string getHoverLink() const { return mHoverLink; };
+
+ const std::string& getMediaName() const { return mMediaName; };
+ std::string getMediaDescription() const { return mMediaDescription; };
+
+ // Crash the plugin. If you use this outside of a testbed, you will be punished.
+ void crashPlugin();
+
+ // Hang the plugin. If you use this outside of a testbed, you will be punished.
+ void hangPlugin();
+
+ ///////////////////////////////////
+ // media time class functions
+ bool pluginSupportsMediaTime(void);
+ void stop();
+ void start(float rate = 0.0f);
+ void pause();
+ void seek(float time);
+ void setLoop(bool loop);
+ void setVolume(float volume);
+ float getVolume();
+
+ F64 getCurrentTime(void) const { return mCurrentTime; };
+ F64 getDuration(void) const { return mDuration; };
+ F64 getCurrentPlayRate(void) { return mCurrentRate; };
+ F64 getLoadedDuration(void) const { return mLoadedDuration; };
+
+ // Initialize the URL history of the plugin by sending
+ // "init_history" message
+ void initializeUrlHistory(const LLSD& url_history);
+
+protected:
+
+ LLPluginClassMediaOwner *mOwner;
+
+ // Notify this object's owner that an event has occurred.
+ void mediaEvent(LLPluginClassMediaOwner::EMediaEvent event);
+
+ void sendMessage(const LLPluginMessage &message); // Send message internally, either queueing or sending directly.
+ std::queue<LLPluginMessage> mSendQueue; // Used to queue messages while the plugin initializes.
+
+ void setSizeInternal(void);
+
+ bool mTextureParamsReceived; // the mRequestedTexture* fields are only valid when this is true
+ S32 mRequestedTextureDepth;
+ LLGLenum mRequestedTextureInternalFormat;
+ LLGLenum mRequestedTextureFormat;
+ LLGLenum mRequestedTextureType;
+ bool mRequestedTextureSwapBytes;
+ bool mRequestedTextureCoordsOpenGL;
+
+ std::string mTextureSharedMemoryName;
+ size_t mTextureSharedMemorySize;
+
+ // True to scale requested media up to the full size of the texture (i.e. next power of two)
+ bool mAutoScaleMedia;
+
+ // default media size for the plugin, from the texture_params message.
+ int mDefaultMediaWidth;
+ int mDefaultMediaHeight;
+
+ // Size that has been requested by the plugin itself
+ int mNaturalMediaWidth;
+ int mNaturalMediaHeight;
+
+ // Size that has been requested with setSize()
+ int mSetMediaWidth;
+ int mSetMediaHeight;
+
+ // Full calculated media size (before auto-scale and downsample calculations)
+ int mFullMediaWidth;
+ int mFullMediaHeight;
+
+ // Actual media size being set (after auto-scale)
+ int mRequestedMediaWidth;
+ int mRequestedMediaHeight;
+
+ // Texture size calculated from actual media size
+ int mRequestedTextureWidth;
+ int mRequestedTextureHeight;
+
+ // Size that the plugin has acknowledged
+ int mTextureWidth;
+ int mTextureHeight;
+ int mMediaWidth;
+ int mMediaHeight;
+
+ float mRequestedVolume;
+
+ // Priority of this media stream
+ EPriority mPriority;
+ int mLowPrioritySizeLimit;
+
+ bool mAllowDownsample;
+ int mPadding;
+
+
+ LLPluginProcessParent *mPlugin;
+
+ LLRect mDirtyRect;
+
+ std::string translateModifiers(MASK modifiers);
+
+ std::string mCursorName;
+ int mLastMouseX;
+ int mLastMouseY;
+
+ LLPluginClassMediaOwner::EMediaStatus mStatus;
+
+ F64 mSleepTime;
+
+ bool mCanCut;
+ bool mCanCopy;
+ bool mCanPaste;
+
+ std::string mMediaName;
+ std::string mMediaDescription;
+
+ LLColor4 mBackgroundColor;
+
+ std::string mTarget;
+
+ /////////////////////////////////////////
+ // media_browser class
+ std::string mNavigateURI;
+ S32 mNavigateResultCode;
+ std::string mNavigateResultString;
+ bool mHistoryBackAvailable;
+ bool mHistoryForwardAvailable;
+ std::string mStatusText;
+ int mProgressPercent;
+ std::string mLocation;
+ std::string mClickURL;
+ std::string mClickNavType;
+ std::string mClickTarget;
+ std::string mClickUUID;
+ std::string mDebugMessageText;
+ std::string mDebugMessageLevel;
+ S32 mGeometryX;
+ S32 mGeometryY;
+ S32 mGeometryWidth;
+ S32 mGeometryHeight;
+ S32 mStatusCode;
+ std::string mAuthURL;
+ std::string mAuthRealm;
+ std::string mHoverText;
+ std::string mHoverLink;
+
+ /////////////////////////////////////////
+ // media_time class
+ F64 mCurrentTime;
+ F64 mDuration;
+ F64 mCurrentRate;
+ F64 mLoadedDuration;
+
+//--------------------------------------
+ //debug use only
+ //
+private:
+ bool mDeleteOK ;
+public:
+ void setDeleteOK(bool flag) { mDeleteOK = flag ;}
+//--------------------------------------
+};
+
+#endif // LL_LLPLUGINCLASSMEDIA_H
diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h
index 5a4fb1ce90..2f3edba7f3 100644
--- a/indra/llplugin/llpluginclassmediaowner.h
+++ b/indra/llplugin/llpluginclassmediaowner.h
@@ -64,6 +64,8 @@ public:
MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog
+ MEDIA_EVENT_DEBUG_MESSAGE, // plugin sending back debug information for host to process
+
MEDIA_EVENT_LINK_HOVERED // Got a "link hovered" event from the plugin
} EMediaEvent;
diff --git a/indra/llplugin/llpluginmessagepipe.h b/indra/llplugin/llpluginmessagepipe.h
index 627577beb1..c6f1686bf4 100644
--- a/indra/llplugin/llpluginmessagepipe.h
+++ b/indra/llplugin/llpluginmessagepipe.h
@@ -41,6 +41,7 @@ class LLPluginMessagePipeOwner
public:
LLPluginMessagePipeOwner();
virtual ~LLPluginMessagePipeOwner();
+
// called with incoming messages
virtual void receiveMessageRaw(const std::string &message) = 0;
// called when the socket has an error
diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp
index 0beb46d0e5..f8a282184e 100644
--- a/indra/llplugin/llpluginprocesschild.cpp
+++ b/indra/llplugin/llpluginprocesschild.cpp
@@ -410,7 +410,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
}
else if(message_name == "sleep_time")
{
- mSleepTime = parsed.getValueReal("time");
+ mSleepTime = llmax(parsed.getValueReal("time"), 1.0 / 100.0); // clamp to maximum of 100Hz
}
else if(message_name == "crash")
{
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index 315096d4fd..110fac0f23 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -927,6 +927,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
}
// Send initial sleep time
+ llassert_always(mSleepTime != 0.f);
setSleepTime(mSleepTime, true);
setState(STATE_RUNNING);
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index 97e1ebde47..7d0e313ff3 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -59,9 +59,9 @@ add_library (llprimitive ${llprimitive_SOURCE_FILES})
#add unit tests
if (LL_TESTS)
- INCLUDE(LLAddBuildTest)
- SET(llprimitive_TEST_SOURCE_FILES
- llmediaentry.cpp
- )
- LL_ADD_PROJECT_UNIT_TESTS(llprimitive "${llprimitive_TEST_SOURCE_FILES}")
+ INCLUDE(LLAddBuildTest)
+ SET(llprimitive_TEST_SOURCE_FILES
+ llmediaentry.cpp
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llprimitive "${llprimitive_TEST_SOURCE_FILES}")
endif (LL_TESTS)
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp
index 99f32e4109..b4539ebee9 100644
--- a/indra/llprimitive/llmaterialtable.cpp
+++ b/indra/llprimitive/llmaterialtable.cpp
@@ -538,7 +538,7 @@ std::string LLMaterialTable::getName(U8 mcode)
}
}
- return NULL;
+ return std::string();
}
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 0463d5364b..cb32a510b8 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -27,14 +27,22 @@
#include "linden_common.h"
#include "llmodel.h"
+#include "llmemory.h"
#include "llconvexdecomposition.h"
#include "llsdserialize.h"
#include "llvector4a.h"
-
+#if LL_MSVC
+#pragma warning (disable : 4263)
+#pragma warning (disable : 4264)
+#endif
#include "dae.h"
#include "dae/daeErrorHandler.h"
#include "dom/domConstants.h"
#include "dom/domMesh.h"
+#if LL_MSVC
+#pragma warning (default : 4263)
+#pragma warning (default : 4264)
+#endif
#ifdef LL_STANDALONE
# include <zlib.h>
@@ -71,88 +79,10 @@ LLModel::~LLModel()
}
}
-void load_face_from_dom_inputs(LLVolumeFace& face, const domInputLocalOffset_Array& inputs, U32 min_idx, U32 max_idx)
-{
- for (U32 j = 0; j < inputs.getCount(); ++j)
- {
- if (strcmp(COMMON_PROFILE_INPUT_VERTEX, inputs[j]->getSemantic()) == 0)
- { //found vertex array
- const domURIFragmentType& uri = inputs[j]->getSource();
- daeElementRef elem = uri.getElement();
- domVertices* vertices = (domVertices*) elem.cast();
-
- domInputLocal_Array& v_inp = vertices->getInput_array();
- if (inputs[j]->getOffset() != 0)
- {
- llerrs << "Vertex array offset MUST be zero." << llendl;
- }
-
- for (U32 k = 0; k < v_inp.getCount(); ++k)
- {
- if (strcmp(COMMON_PROFILE_INPUT_POSITION, v_inp[k]->getSemantic()) == 0)
- {
- const domURIFragmentType& uri = v_inp[k]->getSource();
-
- daeElementRef elem = uri.getElement();
- domSource* src = (domSource*) elem.cast();
-
- if (src->getTechnique_common()->getAccessor()->getStride() != 3)
- {
- llerrs << "Vertex array stride MUST be three." << llendl;
- }
-
- domListOfFloats& v = src->getFloat_array()->getValue();
-
- LLVector4a min;
- min.set(v[min_idx], v[min_idx+1], v[min_idx+2]);
- LLVector4a max = min;
-
- for (U32 j = min_idx; j <= max_idx; ++j)
- { //copy vertex array
- face.mPositions[j-min_idx].set(v[j*3+0], v[j*3+1], v[j*3+2]);
- update_min_max(min, max, face.mPositions[j-min_idx]);
- }
-
- face.mExtents[0] = min;
- face.mExtents[1] = max;
- }
- }
- }
-
- if (strcmp(COMMON_PROFILE_INPUT_NORMAL, inputs[j]->getSemantic()) == 0)
- {
- //found normal array for this triangle list
- const domURIFragmentType& uri = inputs[j]->getSource();
- daeElementRef elem = uri.getElement();
- domSource* src = (domSource*) elem.cast();
- domListOfFloats& n = src->getFloat_array()->getValue();
-
- for (U32 j = min_idx; j <= max_idx; ++j)
- {
- LLVector4a* norm = (LLVector4a*) face.mNormals + (j-min_idx);
- norm->set(n[j*3+0], n[j*3+1], n[j*3+2]);
- norm->normalize3();
- }
- }
- else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[j]->getSemantic()) == 0)
- { //found texCoords
- const domURIFragmentType& uri = inputs[j]->getSource();
- daeElementRef elem = uri.getElement();
- domSource* src = (domSource*) elem.cast();
- domListOfFloats& u = src->getFloat_array()->getValue();
-
- for (U32 j = min_idx; j <= max_idx; ++j)
- {
- face.mTexCoords[j-min_idx].setVec(u[j*2+0], u[j*2+1]);
- }
- }
- }
-}
bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S32& tc_offset, S32& norm_offset, S32 &idx_stride,
domSource* &pos_source, domSource* &tc_source, domSource* &norm_source)
{
-
idx_stride = 0;
for (U32 j = 0; j < inputs.getCount(); ++j)
@@ -271,14 +201,13 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
cv.mTexCoord.setVec(tc[idx[i+tc_offset]*2+0],
tc[idx[i+tc_offset]*2+1]);
}
-
+
if (norm_source)
{
cv.setNormal(LLVector4a(n[idx[i+norm_offset]*3+0],
n[idx[i+norm_offset]*3+1],
n[idx[i+norm_offset]*3+2]));
}
-
BOOL found = FALSE;
@@ -329,10 +258,22 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
{
face_list.push_back(face);
face_list.rbegin()->fillFromLegacyData(verts, indices);
+ LLVolumeFace& new_face = *face_list.rbegin();
+ if (!norm_source)
+ {
+ ll_aligned_free_16(new_face.mNormals);
+ new_face.mNormals = NULL;
+ }
+
+ if (!tc_source)
+ {
+ ll_aligned_free_16(new_face.mTexCoords);
+ new_face.mTexCoords = NULL;
+ }
+
face = LLVolumeFace();
point_map.clear();
}
-
}
if (!verts.empty())
@@ -348,6 +289,18 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
face_list.push_back(face);
face_list.rbegin()->fillFromLegacyData(verts, indices);
+ LLVolumeFace& new_face = *face_list.rbegin();
+ if (!norm_source)
+ {
+ ll_aligned_free_16(new_face.mNormals);
+ new_face.mNormals = NULL;
+ }
+
+ if (!tc_source)
+ {
+ ll_aligned_free_16(new_face.mTexCoords);
+ new_face.mTexCoords = NULL;
+ }
}
return LLModel::NO_ERRORS ;
@@ -433,14 +386,14 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
cv.mTexCoord.setVec(tc[idx[cur_idx+tc_offset]*2+0],
tc[idx[cur_idx+tc_offset]*2+1]);
}
-
+
if (norm_source)
{
cv.getNormal().set(n[idx[cur_idx+norm_offset]*3+0],
n[idx[cur_idx+norm_offset]*3+1],
n[idx[cur_idx+norm_offset]*3+2]);
}
-
+
cur_idx += idx_stride;
BOOL found = FALSE;
@@ -524,6 +477,19 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
{
face_list.push_back(face);
face_list.rbegin()->fillFromLegacyData(verts, indices);
+ LLVolumeFace& new_face = *face_list.rbegin();
+ if (!norm_source)
+ {
+ ll_aligned_free_16(new_face.mNormals);
+ new_face.mNormals = NULL;
+ }
+
+ if (!tc_source)
+ {
+ ll_aligned_free_16(new_face.mTexCoords);
+ new_face.mTexCoords = NULL;
+ }
+
face = LLVolumeFace();
verts.clear();
indices.clear();
@@ -540,10 +506,23 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
{
material = std::string(poly->getMaterial());
}
-
+
materials.push_back(material);
face_list.push_back(face);
face_list.rbegin()->fillFromLegacyData(verts, indices);
+
+ LLVolumeFace& new_face = *face_list.rbegin();
+ if (!norm_source)
+ {
+ ll_aligned_free_16(new_face.mNormals);
+ new_face.mNormals = NULL;
+ }
+
+ if (!tc_source)
+ {
+ ll_aligned_free_16(new_face.mTexCoords);
+ new_face.mTexCoords = NULL;
+ }
}
return LLModel::NO_ERRORS ;
@@ -557,7 +536,6 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
const domInputLocalOffset_Array& inputs = poly->getInput_array();
-
S32 v_offset = -1;
S32 n_offset = -1;
S32 t_offset = -1;
@@ -662,15 +640,14 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
n->get(n_idx+1),
n->get(n_idx+2));
}
-
+
if (t)
{
U32 t_idx = idx[j*stride+t_offset]*2;
vert.mTexCoord.setVec(t->get(t_idx),
t->get(t_idx+1));
}
-
-
+
verts.push_back(vert);
}
}
@@ -733,6 +710,19 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
materials.push_back(material);
face_list.push_back(face);
face_list.rbegin()->fillFromLegacyData(new_verts, indices);
+
+ LLVolumeFace& new_face = *face_list.rbegin();
+ if (!n)
+ {
+ ll_aligned_free_16(new_face.mNormals);
+ new_face.mNormals = NULL;
+ }
+
+ if (!t)
+ {
+ ll_aligned_free_16(new_face.mTexCoords);
+ new_face.mTexCoords = NULL;
+ }
}
return LLModel::NO_ERRORS ;
@@ -817,9 +807,9 @@ BOOL LLModel::createVolumeFacesFromDomMesh(domMesh* mesh)
if (getNumVolumeFaces() > 0)
{
- optimizeVolumeFaces();
normalizeVolumeFaces();
-
+ optimizeVolumeFaces();
+
if (getNumVolumeFaces() > 0)
{
return TRUE;
@@ -853,81 +843,10 @@ void LLModel::offsetMesh( const LLVector3& pivotPoint )
void LLModel::optimizeVolumeFaces()
{
-#if 0 //VECTORIZE ?
- for (std::vector<LLVolumeFace>::iterator iter = mVolumeFaces.begin(); iter != mVolumeFaces.end(); )
- {
- std::vector<LLVolumeFace>::iterator cur_iter = iter++;
- LLVolumeFace& face = *cur_iter;
-
- for (S32 i = 0; i < (S32) face.mNumIndices; i += 3)
- { //remove zero area triangles
- U16 i0 = face.mIndices[i+0];
- U16 i1 = face.mIndices[i+1];
- U16 i2 = face.mIndices[i+2];
-
- if (i0 == i1 ||
- i1 == i2 ||
- i0 == i2)
- { //duplicate index in triangle, remove triangle
- face.mIndices.erase(face.mIndices.begin()+i, face.mIndices.begin()+i+3);
- i -= 3;
- }
- else
- {
- LLVolumeFace::VertexData& v0 = face.mVertices[i0];
- LLVolumeFace::VertexData& v1 = face.mVertices[i1];
- LLVolumeFace::VertexData& v2 = face.mVertices[i2];
-
- if (v0.mPosition == v1.mPosition ||
- v1.mPosition == v2.mPosition ||
- v2.mPosition == v0.mPosition)
- { //zero area triangle, delete
- face.mIndices.erase(face.mIndices.begin()+i, face.mIndices.begin()+i+3);
- i-=3;
- }
- }
- }
-
- //remove unreference vertices
- std::vector<bool> ref;
- ref.resize(face.mNumVertices);
-
- for (U32 i = 0; i < ref.size(); ++i)
- {
- ref[i] = false;
- }
-
- for (U32 i = 0; i < face.mNumIndices; ++i)
- {
- ref[face.mIndices[i]] = true;
- }
-
- U32 unref_count = 0;
- for (U32 i = 0; i < ref.size(); ++i)
- {
- if (!ref[i])
- {
- //vertex is unreferenced
- face.mVertices.erase(face.mVertices.begin()+(i-unref_count));
- U16 idx = (U16) (i-unref_count);
-
- for (U32 j = 0; j < face.mNumIndices; ++j)
- { //decrement every index array value greater than idx
- if (face.mIndices[j] > idx)
- {
- --face.mIndices[j];
- }
- }
- ++unref_count;
- }
- }
-
- if (face.mVertices.empty() || face.mIndices.empty())
- { //face is empty, remove it
- iter = mVolumeFaces.erase(cur_iter);
- }
+ for (U32 i = 0; i < getNumVolumeFaces(); ++i)
+ {
+ mVolumeFaces[i].optimize();
}
-#endif
}
// Shrink the model to fit
@@ -962,6 +881,25 @@ void LLModel::normalizeVolumeFaces()
update_min_max(min, max, face.mExtents[0]);
update_min_max(min, max, face.mExtents[1]);
+
+ if (face.mTexCoords)
+ {
+ LLVector2& min_tc = face.mTexCoordExtents[0];
+ LLVector2& max_tc = face.mTexCoordExtents[1];
+
+ min_tc = face.mTexCoords[0];
+ max_tc = face.mTexCoords[0];
+
+ for (U32 j = 1; j < face.mNumVertices; ++j)
+ {
+ update_min_max(min_tc, max_tc, face.mTexCoords[j]);
+ }
+ }
+ else
+ {
+ face.mTexCoordExtents[0].set(0,0);
+ face.mTexCoordExtents[1].set(1,1);
+ }
}
// Now that we have the extents of the model
@@ -1029,8 +967,11 @@ void LLModel::normalizeVolumeFaces()
{
pos[j].add(trans);
pos[j].mul(scale);
- norm[j].mul(inv_scale);
- norm[j].normalize3();
+ if (norm && !norm[j].equals3(LLVector4a::getZero()))
+ {
+ norm[j].mul(inv_scale);
+ norm[j].normalize3();
+ }
}
}
@@ -1073,8 +1014,26 @@ void LLModel::setVolumeFaceData(
face.resizeIndices(num_indices);
LLVector4a::memcpyNonAliased16((F32*) face.mPositions, (F32*) pos.get(), num_verts*4*sizeof(F32));
- LLVector4a::memcpyNonAliased16((F32*) face.mNormals, (F32*) norm.get(), num_verts*4*sizeof(F32));
- LLVector4a::memcpyNonAliased16((F32*) face.mTexCoords, (F32*) tc.get(), num_verts*2*sizeof(F32));
+ if (norm.get())
+ {
+ LLVector4a::memcpyNonAliased16((F32*) face.mNormals, (F32*) norm.get(), num_verts*4*sizeof(F32));
+ }
+ else
+ {
+ ll_aligned_free_16(face.mNormals);
+ face.mNormals = NULL;
+ }
+
+ if (tc.get())
+ {
+ LLVector4a::memcpyNonAliased16((F32*) face.mTexCoords, (F32*) tc.get(), num_verts*2*sizeof(F32));
+ }
+ else
+ {
+ ll_aligned_free_16(face.mTexCoords);
+ face.mTexCoords = NULL;
+ }
+
U32 size = (num_indices*2+0xF)&~0xF;
LLVector4a::memcpyNonAliased16((F32*) face.mIndices, (F32*) ind.get(), size);
}
@@ -1257,10 +1216,23 @@ void LLModel::generateNormals(F32 angle_cutoff)
LLVolumeFace::VertexData v;
new_face.mPositions[i] = vol_face.mPositions[idx];
new_face.mNormals[i].clear();
- new_face.mTexCoords[i] = vol_face.mTexCoords[idx];
new_face.mIndices[i] = i;
}
+ if (vol_face.mTexCoords)
+ {
+ for (U32 i = 0; i < vol_face.mNumIndices; i++)
+ {
+ U32 idx = vol_face.mIndices[i];
+ new_face.mTexCoords[i] = vol_face.mTexCoords[idx];
+ }
+ }
+ else
+ {
+ ll_aligned_free_16(new_face.mTexCoords);
+ new_face.mTexCoords = NULL;
+ }
+
//generate normals for new face
for (U32 i = 0; i < new_face.mNumIndices; i += 3)
{ //for each triangle
@@ -1395,7 +1367,8 @@ LLSD LLModel::writeModel(
const LLModel::Decomposition& decomp,
BOOL upload_skin,
BOOL upload_joints,
- BOOL nowrite)
+ BOOL nowrite,
+ BOOL as_slm)
{
LLSD mdl;
@@ -1419,12 +1392,20 @@ LLSD LLModel::writeModel(
!decomp.mHull.empty())
{
mdl["physics_convex"] = decomp.asLLSD();
- if (!decomp.mHull.empty())
- { //convex decomposition exists, physics mesh will not be used
+ if (!decomp.mHull.empty() && !as_slm)
+ { //convex decomposition exists, physics mesh will not be used (unless this is an slm file)
model[LLModel::LOD_PHYSICS] = NULL;
}
}
+ if (as_slm)
+ { //save material list names
+ for (U32 i = 0; i < high->mMaterialList.size(); ++i)
+ {
+ mdl["material_list"][i] = high->mMaterialList[i];
+ }
+ }
+
for (U32 idx = 0; idx < MODEL_NAMES_LENGTH; ++idx)
{
if (model[idx] && model[idx]->getNumVolumeFaces() > 0)
@@ -1462,13 +1443,19 @@ LLSD LLModel::writeModel(
U32 tc_idx = 0;
LLVector2* ftc = (LLVector2*) face.mTexCoords;
- LLVector2 min_tc = ftc[0];
- LLVector2 max_tc = min_tc;
-
- //get texture coordinate domain
- for (U32 j = 0; j < face.mNumVertices; ++j)
+ LLVector2 min_tc;
+ LLVector2 max_tc;
+
+ if (ftc)
{
- update_min_max(min_tc, max_tc, ftc[j]);
+ min_tc = ftc[0];
+ max_tc = min_tc;
+
+ //get texture coordinate domain
+ for (U32 j = 0; j < face.mNumVertices; ++j)
+ {
+ update_min_max(min_tc, max_tc, ftc[j]);
+ }
}
LLVector2 tc_range = max_tc - min_tc;
@@ -1477,9 +1464,8 @@ LLSD LLModel::writeModel(
{ //for each vert
F32* pos = face.mPositions[j].getF32ptr();
- F32* norm = face.mNormals[j].getF32ptr();
-
- //position + normal
+
+ //position
for (U32 k = 0; k < 3; ++k)
{ //for each component
//convert to 16-bit normalized across domain
@@ -1489,29 +1475,40 @@ LLSD LLModel::writeModel(
//write to binary buffer
verts[vert_idx++] = buff[0];
verts[vert_idx++] = buff[1];
-
- //convert to 16-bit normalized
- val = (U16) ((norm[k]+1.f)*0.5f*65535);
-
- //write to binary buffer
- normals[norm_idx++] = buff[0];
- normals[norm_idx++] = buff[1];
}
- F32* src_tc = (F32*) face.mTexCoords[j].mV;
+ if (face.mNormals)
+ { //normals
+ F32* norm = face.mNormals[j].getF32ptr();
- //texcoord
- for (U32 k = 0; k < 2; ++k)
- { //for each component
- //convert to 16-bit normalized
- U16 val = (U16) ((src_tc[k]-min_tc.mV[k])/tc_range.mV[k]*65535);
+ for (U32 k = 0; k < 3; ++k)
+ { //for each component
+ //convert to 16-bit normalized
+ U16 val = (U16) ((norm[k]+1.f)*0.5f*65535);
+ U8* buff = (U8*) &val;
- U8* buff = (U8*) &val;
- //write to binary buffer
- tc[tc_idx++] = buff[0];
- tc[tc_idx++] = buff[1];
+ //write to binary buffer
+ normals[norm_idx++] = buff[0];
+ normals[norm_idx++] = buff[1];
+ }
}
+ F32* src_tc = (F32*) face.mTexCoords[j].mV;
+
+ //texcoord
+ if (face.mTexCoords)
+ {
+ for (U32 k = 0; k < 2; ++k)
+ { //for each component
+ //convert to 16-bit normalized
+ U16 val = (U16) ((src_tc[k]-min_tc.mV[k])/tc_range.mV[k]*65535);
+
+ U8* buff = (U8*) &val;
+ //write to binary buffer
+ tc[tc_idx++] = buff[0];
+ tc[tc_idx++] = buff[1];
+ }
+ }
}
U32 idx_idx = 0;
@@ -1525,12 +1522,20 @@ LLSD LLModel::writeModel(
//write out face data
mdl[model_names[idx]][i]["PositionDomain"]["Min"] = min_pos.getValue();
mdl[model_names[idx]][i]["PositionDomain"]["Max"] = max_pos.getValue();
- mdl[model_names[idx]][i]["TexCoord0Domain"]["Min"] = min_tc.getValue();
- mdl[model_names[idx]][i]["TexCoord0Domain"]["Max"] = max_tc.getValue();
-
mdl[model_names[idx]][i]["Position"] = verts;
- mdl[model_names[idx]][i]["Normal"] = normals;
- mdl[model_names[idx]][i]["TexCoord0"] = tc;
+
+ if (face.mNormals)
+ {
+ mdl[model_names[idx]][i]["Normal"] = normals;
+ }
+
+ if (face.mTexCoords)
+ {
+ mdl[model_names[idx]][i]["TexCoord0Domain"]["Min"] = min_tc.getValue();
+ mdl[model_names[idx]][i]["TexCoord0Domain"]["Max"] = max_tc.getValue();
+ mdl[model_names[idx]][i]["TexCoord0"] = tc;
+ }
+
mdl[model_names[idx]][i]["TriangleList"] = indices;
if (skinning)
@@ -1588,10 +1593,10 @@ LLSD LLModel::writeModel(
}
}
- return writeModelToStream(ostr, mdl, nowrite);
+ return writeModelToStream(ostr, mdl, nowrite, as_slm);
}
-LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite)
+LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BOOL as_slm)
{
U32 bytes = 0;
@@ -1599,6 +1604,11 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite)
LLSD header;
+ if (as_slm && mdl.has("material_list"))
+ { //save material binding names to header
+ header["material_list"] = mdl["material_list"];
+ }
+
std::string skin;
if (mdl.has("skin"))
@@ -1676,6 +1686,19 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite)
LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
{
+ //1. If a vertex has been weighted then we'll find it via pos and return it's weight list
+ weight_map::iterator iterPos = mSkinWeights.begin();
+ weight_map::iterator iterEnd = mSkinWeights.end();
+
+ for ( ; iterPos!=iterEnd; ++iterPos )
+ {
+ if ( jointPositionalLookup( iterPos->first, pos ) )
+ {
+ return iterPos->second;
+ }
+ }
+
+ //2. Otherwise we'll use the older implementation
weight_map::iterator iter = mSkinWeights.find(pos);
if (iter != mSkinWeights.end())
@@ -1689,13 +1712,13 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
}
else
{ //no exact match found, get closest point
- const F32 epsilon = 2.f/65536;
+ const F32 epsilon = 1e-5f;
weight_map::iterator iter_up = mSkinWeights.lower_bound(pos);
weight_map::iterator iter_down = ++iter_up;
weight_map::iterator best = iter_up;
- F32 min_dist = (iter->first - pos).magVecSquared();
+ F32 min_dist = (iter->first - pos).magVec();
bool done = false;
while (!done)
@@ -1706,7 +1729,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
if (iter_up != mSkinWeights.end() && ++iter_up != mSkinWeights.end())
{
done = false;
- F32 dist = (iter_up->first - pos).magVecSquared();
+ F32 dist = (iter_up->first - pos).magVec();
if (dist < epsilon)
{
@@ -1724,7 +1747,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
{
done = false;
- F32 dist = (iter_down->first - pos).magVecSquared();
+ F32 dist = (iter_down->first - pos).magVec();
if (dist < epsilon)
{
@@ -1792,6 +1815,15 @@ bool LLModel::loadModel(std::istream& is)
}
}
+ if (header.has("material_list"))
+ { //load material list names
+ mMaterialList.clear();
+ for (U32 i = 0; i < header["material_list"].size(); ++i)
+ {
+ mMaterialList.push_back(header["material_list"][i].asString());
+ }
+ }
+
std::string nm[] =
{
"lowest_lod",
@@ -1808,6 +1840,7 @@ bool LLModel::loadModel(std::istream& is)
if (header[nm[lod]]["offset"].asInteger() == -1 ||
header[nm[lod]]["size"].asInteger() == 0 )
{ //cannot load requested LOD
+ llwarns << "LoD data is invalid!" << llendl;
return false;
}
@@ -1821,7 +1854,7 @@ bool LLModel::loadModel(std::istream& is)
is.seekg(cur_pos);
}
- if (lod == LLModel::LOD_PHYSICS)
+ if (lod == LLModel::LOD_HIGH || lod == LLModel::LOD_PHYSICS)
{
std::ios::pos_type cur_pos = is.tellg();
loadDecomposition(header, is);
@@ -1868,11 +1901,124 @@ bool LLModel::loadModel(std::istream& is)
}
return true;
}
+ else
+ {
+ llwarns << "unpackVolumeFaces failed!" << llendl;
+ }
return false;
}
+bool LLModel::isMaterialListSubset( LLModel* ref )
+{
+ int refCnt = ref->mMaterialList.size();
+ int modelCnt = mMaterialList.size();
+
+ for (U32 src = 0; src < modelCnt; ++src)
+ {
+ bool foundRef = false;
+
+ for (U32 dst = 0; dst < refCnt; ++dst)
+ {
+ //llinfos<<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<llendl;
+ foundRef = mMaterialList[src] == ref->mMaterialList[dst];
+
+ if ( foundRef )
+ {
+ break;
+ }
+ }
+ if (!foundRef)
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool LLModel::needToAddFaces( LLModel* ref, int& refFaceCnt, int& modelFaceCnt )
+{
+ bool changed = false;
+ if ( refFaceCnt< modelFaceCnt )
+ {
+ refFaceCnt += modelFaceCnt - refFaceCnt;
+ changed = true;
+ }
+ else
+ if ( modelFaceCnt < refFaceCnt )
+ {
+ modelFaceCnt += refFaceCnt - modelFaceCnt;
+ changed = true;
+ }
+
+ return changed;
+}
+
+bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCnt )
+{
+ //Is this a subset?
+ //LODs cannot currently add new materials, e.g.
+ //1. ref = a,b,c lod1 = d,e => This is not permitted
+ //2. ref = a,b,c lod1 = c => This would be permitted
+
+ bool isASubset = isMaterialListSubset( ref );
+ if ( !isASubset )
+ {
+ llinfos<<"Material of model is not a subset of reference."<<llendl;
+ return false;
+ }
+
+ std::map<std::string, U32> index_map;
+
+ //build a map of material slot names to face indexes
+ bool reorder = false;
+
+ std::set<std::string> base_mat;
+ std::set<std::string> cur_mat;
+
+ for (U32 i = 0; i < mMaterialList.size(); i++)
+ {
+ index_map[ref->mMaterialList[i]] = i;
+ if (!reorder)
+ { //if any material name does not match reference, we need to reorder
+ reorder = ref->mMaterialList[i] != mMaterialList[i];
+ }
+ base_mat.insert(ref->mMaterialList[i]);
+ cur_mat.insert(mMaterialList[i]);
+ }
+
+
+ if (reorder &&
+ base_mat == cur_mat) //don't reorder if material name sets don't match
+ {
+ std::vector<LLVolumeFace> new_face_list;
+ new_face_list.resize(mVolumeFaces.size());
+
+ std::vector<std::string> new_material_list;
+ new_material_list.resize(mVolumeFaces.size());
+
+ //rebuild face list so materials have the same order
+ //as the reference model
+ for (U32 i = 0; i < mMaterialList.size(); ++i)
+ {
+ U32 ref_idx = index_map[mMaterialList[i]];
+ new_face_list[ref_idx] = mVolumeFaces[i];
+
+ new_material_list[ref_idx] = mMaterialList[i];
+ }
+
+ llassert(new_material_list == ref->mMaterialList);
+
+ mVolumeFaces = new_face_list;
+ }
+
+ //override material list with reference model ordering
+ mMaterialList = ref->mMaterialList;
+ return true;
+}
+
bool LLModel::loadSkinInfo(LLSD& header, std::istream &is)
{
@@ -2034,7 +2180,7 @@ LLModel::Decomposition::Decomposition(LLSD& data)
void LLModel::Decomposition::fromLLSD(LLSD& decomp)
{
- if (decomp.has("HullList"))
+ if (decomp.has("HullList") && decomp.has("Positions"))
{
// updated for const-correctness. gcc is picky about this type of thing - Nyx
const LLSD::Binary& hulls = decomp["HullList"].asBinary();
@@ -2190,6 +2336,8 @@ LLSD LLModel::Decomposition::asLLSD() const
ret["Min"] = min.getValue();
ret["Max"] = max.getValue();
+ LLVector3 range = max-min;
+
if (!hulls.empty())
{
ret["HullList"] = hulls;
@@ -2199,10 +2347,6 @@ LLSD LLModel::Decomposition::asLLSD() const
{
LLSD::Binary p(total*3*2);
- LLVector3 min(-0.5f, -0.5f, -0.5f);
- LLVector3 max(0.5f, 0.5f, 0.5f);
- LLVector3 range = max-min;
-
U32 vert_idx = 0;
for (U32 i = 0; i < mHull.size(); ++i)
@@ -2214,12 +2358,10 @@ LLSD LLModel::Decomposition::asLLSD() const
for (U32 j = 0; j < mHull[i].size(); ++j)
{
U64 test = 0;
+ const F32* src = mHull[i][j].mV;
+
for (U32 k = 0; k < 3; k++)
{
- F32* src = (F32*) (mHull[i][j].mV);
-
- llassert(src[k] <= 0.501f && src[k] >= -0.501f);
-
//convert to 16-bit normalized across domain
U16 val = (U16) (((src[k]-min.mV[k])/range.mV[k])*65535);
@@ -2258,19 +2400,15 @@ LLSD LLModel::Decomposition::asLLSD() const
{
LLSD::Binary p(mBaseHull.size()*3*2);
- LLVector3 min(-0.5f, -0.5f, -0.5f);
- LLVector3 max(0.5f, 0.5f, 0.5f);
- LLVector3 range = max-min;
-
U32 vert_idx = 0;
for (U32 j = 0; j < mBaseHull.size(); ++j)
{
+ const F32* v = mBaseHull[j].mV;
+
for (U32 k = 0; k < 3; k++)
{
- llassert(mBaseHull[j].mV[k] <= 0.51f && mBaseHull[j].mV[k] >= -0.51f);
-
//convert to 16-bit normalized across domain
- U16 val = (U16) (((mBaseHull[j].mV[k]-min.mV[k])/range.mV[k])*65535);
+ U16 val = (U16) (((v[k]-min.mV[k])/range.mV[k])*65535);
U8* buff = (U8*) &val;
//write to binary buffer
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index cd9f76fcb7..1cf528fd9f 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -137,16 +137,18 @@ public:
const LLModel::Decomposition& decomp,
BOOL upload_skin,
BOOL upload_joints,
- BOOL nowrite = FALSE);
+ BOOL nowrite = FALSE,
+ BOOL as_slm = FALSE);
static LLSD writeModelToStream(
std::ostream& ostr,
LLSD& mdl,
- BOOL nowrite = FALSE);
+ BOOL nowrite = FALSE, BOOL as_slm = FALSE);
static LLModel* loadModelFromDomMesh(domMesh* mesh);
static std::string getElementLabel(daeElement* element);
std::string getName() const;
+ std::string getMetric() const {return mMetric;}
EModelStatus getStatus() const {return mStatus;}
static std::string getStatusString(U32 status) ;
@@ -171,6 +173,13 @@ public:
void optimizeVolumeFaces();
void offsetMesh( const LLVector3& pivotPoint );
void getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out);
+
+ //reorder face list based on mMaterialList in this and reference so
+ //order matches that of reference (material ordering touchup)
+ bool matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCnt );
+ bool isMaterialListSubset( LLModel* ref );
+ bool needToAddFaces( LLModel* ref, int& refFaceCnt, int& modelFaceCnt );
+
std::vector<std::string> mMaterialList;
//data used for skin weights
@@ -211,6 +220,19 @@ public:
}
};
+
+ //Are the doubles the same w/in epsilon specified tolerance
+ bool areEqual( double a, double b )
+ {
+ const float epsilon = 1e-5f;
+ return (fabs((a - b)) < epsilon) ? true : false ;
+ }
+ //Make sure that we return false for any values that are within the tolerance for equivalence
+ bool jointPositionalLookup( const LLVector3& a, const LLVector3& b )
+ {
+ return ( areEqual( a[0],b[0]) && areEqual( a[1],b[1] ) && areEqual( a[2],b[2]) ) ? true : false;
+ }
+
//copy of position array for this model -- mPosition[idx].mV[X,Y,Z]
std::vector<LLVector3> mPosition;
@@ -228,6 +250,8 @@ public:
std::string mRequestedLabel; // name requested in UI, if any.
std::string mLabel; // name computed from dae.
+ std::string mMetric; // user-supplied metric data for upload
+
LLVector3 mNormalizedScale;
LLVector3 mNormalizedTranslation;
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 76faa1b8c5..998016f8f6 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -103,6 +103,8 @@ public:
PARAMS_LIGHT = 0x20,
PARAMS_SCULPT = 0x30,
PARAMS_LIGHT_IMAGE = 0x40,
+ PARAMS_RESERVED = 0x50, // Used on server-side
+ PARAMS_MESH = 0x60,
};
public:
diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp
index fb22d7f1f5..45a3b18179 100644
--- a/indra/llrender/llcubemap.cpp
+++ b/indra/llrender/llcubemap.cpp
@@ -36,6 +36,7 @@
#include "m4math.h"
#include "llrender.h"
+#include "llglslshader.h"
#include "llglheaders.h"
@@ -195,7 +196,7 @@ void LLCubeMap::enableTexture(S32 stage)
void LLCubeMap::enableTextureCoords(S32 stage)
{
mTextureCoordStage = stage;
- if (gGLManager.mHasCubeMap && stage >= 0 && LLCubeMap::sUseCubeMaps)
+ if (!LLGLSLShader::sNoFixedFunction && gGLManager.mHasCubeMap && stage >= 0 && LLCubeMap::sUseCubeMaps)
{
if (stage > 0)
{
@@ -237,7 +238,7 @@ void LLCubeMap::disableTexture(void)
void LLCubeMap::disableTextureCoords(void)
{
- if (gGLManager.mHasCubeMap && mTextureCoordStage >= 0 && LLCubeMap::sUseCubeMaps)
+ if (!LLGLSLShader::sNoFixedFunction && gGLManager.mHasCubeMap && mTextureCoordStage >= 0 && LLCubeMap::sUseCubeMaps)
{
if (mTextureCoordStage > 0)
{
@@ -259,47 +260,47 @@ void LLCubeMap::setMatrix(S32 stage)
if (mMatrixStage < 0) return;
- if (stage > 0)
+ //if (stage > 0)
{
gGL.getTexUnit(stage)->activate();
}
- LLVector3 x(LLVector3d(gGLModelView+0));
- LLVector3 y(LLVector3d(gGLModelView+4));
- LLVector3 z(LLVector3d(gGLModelView+8));
+ LLVector3 x(gGLModelView+0);
+ LLVector3 y(gGLModelView+4);
+ LLVector3 z(gGLModelView+8);
LLMatrix3 mat3;
mat3.setRows(x,y,z);
LLMatrix4 trans(mat3);
trans.transpose();
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
- glLoadMatrixf((F32 *)trans.mMatrix);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.pushMatrix();
+ gGL.loadMatrix((F32 *)trans.mMatrix);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
- if (stage > 0)
+ /*if (stage > 0)
{
gGL.getTexUnit(0)->activate();
- }
+ }*/
}
void LLCubeMap::restoreMatrix()
{
if (mMatrixStage < 0) return;
- if (mMatrixStage > 0)
+ //if (mMatrixStage > 0)
{
gGL.getTexUnit(mMatrixStage)->activate();
}
- glMatrixMode(GL_TEXTURE);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
- if (mMatrixStage > 0)
+ /*if (mMatrixStage > 0)
{
gGL.getTexUnit(0)->activate();
- }
+ }*/
}
void LLCubeMap::setReflection (void)
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 91c8a37022..66d4ad2d87 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -55,7 +55,10 @@ FT_Library gFTLibrary = NULL;
//static
void LLFontManager::initClass()
{
- gFontManagerp = new LLFontManager;
+ if (!gFontManagerp)
+ {
+ gFontManagerp = new LLFontManager;
+ }
}
//static
@@ -136,7 +139,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
FT_Done_Face(mFTFace);
mFTFace = NULL;
}
-
+
int error;
error = FT_New_Face( gFTLibrary,
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 180ae4dfa6..607473d416 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -189,6 +189,9 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
origin.mV[VX] -= llround((F32)sCurOrigin.mX) - (sCurOrigin.mX);
origin.mV[VY] -= llround((F32)sCurOrigin.mY) - (sCurOrigin.mY);
+ // Depth translation, so that floating text appears 'inworld'
+ // and is correclty occluded.
+ gGL.translatef(0.f,0.f,sCurOrigin.mZ);
S32 chars_drawn = 0;
S32 i;
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index c224ab0e9b..946e602fee 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -48,6 +48,7 @@
#include "llstacktrace.h"
#include "llglheaders.h"
+#include "llglslshader.h"
#ifdef _DEBUG
//#define GL_STATE_VERIFY
@@ -66,6 +67,36 @@ static const std::string HEADLESS_VERSION_STRING("1.0");
std::ofstream gFailLog;
+#if GL_ARB_debug_output
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+
+void APIENTRY gl_debug_callback(GLenum source,
+ GLenum type,
+ GLuint id,
+ GLenum severity,
+ GLsizei length,
+ const GLchar* message,
+ GLvoid* userParam)
+{
+ if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
+ {
+ llwarns << "----- GL ERROR --------" << llendl;
+ }
+ else
+ {
+ llwarns << "----- GL WARNING -------" << llendl;
+ }
+ llwarns << "Type: " << std::hex << type << llendl;
+ llwarns << "ID: " << std::hex << id << llendl;
+ llwarns << "Severity: " << std::hex << severity << llendl;
+ llwarns << "Message: " << message << llendl;
+ llwarns << "-----------------------" << llendl;
+}
+#endif
+
void ll_init_fail_log(std::string filename)
{
gFailLog.open(filename.c_str());
@@ -109,6 +140,11 @@ std::list<LLGLUpdate*> LLGLUpdate::sGLQ;
#if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS
// ATI prototypes
+
+#if LL_WINDOWS
+PFNGLGETSTRINGIPROC glGetStringi = NULL;
+#endif
+
// vertex blending prototypes
PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB = NULL;
PFNGLVERTEXBLENDARBPROC glVertexBlendARB = NULL;
@@ -127,10 +163,28 @@ PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB = NULL;
PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB = NULL;
PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB = NULL;
-// GL_ARB_map_buffer_range
-PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
-PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
+//GL_ARB_vertex_array_object
+PFNGLBINDVERTEXARRAYPROC glBindVertexArray = NULL;
+PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays = NULL;
+PFNGLGENVERTEXARRAYSPROC glGenVertexArrays = NULL;
+PFNGLISVERTEXARRAYPROC glIsVertexArray = NULL;
+// GL_ARB_map_buffer_range
+PFNGLMAPBUFFERRANGEPROC glMapBufferRange = NULL;
+PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange = NULL;
+
+// GL_ARB_sync
+PFNGLFENCESYNCPROC glFenceSync = NULL;
+PFNGLISSYNCPROC glIsSync = NULL;
+PFNGLDELETESYNCPROC glDeleteSync = NULL;
+PFNGLCLIENTWAITSYNCPROC glClientWaitSync = NULL;
+PFNGLWAITSYNCPROC glWaitSync = NULL;
+PFNGLGETINTEGER64VPROC glGetInteger64v = NULL;
+PFNGLGETSYNCIVPROC glGetSynciv = NULL;
+
+// GL_APPLE_flush_buffer_range
+PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE = NULL;
+PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE = NULL;
// vertex object prototypes
PFNGLNEWOBJECTBUFFERATIPROC glNewObjectBufferATI = NULL;
@@ -184,10 +238,16 @@ PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample = NULL;
PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer = NULL;
//GL_ARB_texture_multisample
-PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
-PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
-PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
-PFNGLSAMPLEMASKIPROC glSampleMaski;
+PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample = NULL;
+PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample = NULL;
+PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv = NULL;
+PFNGLSAMPLEMASKIPROC glSampleMaski = NULL;
+
+//GL_ARB_debug_output
+PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB = NULL;
+PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB = NULL;
+PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB = NULL;
+PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB = NULL;
// GL_EXT_blend_func_separate
PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT = NULL;
@@ -236,6 +296,10 @@ PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB = NULL;
PFNGLGETUNIFORMIVARBPROC glGetUniformivARB = NULL;
PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB = NULL;
+#if LL_WINDOWS
+PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL;
+#endif
+
// vertex shader prototypes
#if LL_LINUX || LL_SOLARIS
PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB = NULL;
@@ -334,9 +398,11 @@ LLGLManager::LLGLManager() :
mHasFramebufferObject(FALSE),
mMaxSamples(0),
mHasBlendFuncSeparate(FALSE),
-
+ mHasSync(FALSE),
mHasVertexBufferObject(FALSE),
+ mHasVertexArrayObject(FALSE),
mHasMapBufferRange(FALSE),
+ mHasFlushBufferRange(FALSE),
mHasPBuffer(FALSE),
mHasShaderObjects(FALSE),
mHasVertexShader(FALSE),
@@ -356,6 +422,7 @@ LLGLManager::LLGLManager() :
mHasAnisotropic(FALSE),
mHasARBEnvCombine(FALSE),
mHasCubeMap(FALSE),
+ mHasDebugOutput(FALSE),
mIsATI(FALSE),
mIsNVIDIA(FALSE),
@@ -395,6 +462,15 @@ void LLGLManager::initWGL()
LL_WARNS("RenderInit") << "No ARB pixel format extensions" << LL_ENDL;
}
+ if (ExtensionExists("WGL_ARB_create_context",gGLHExts.mSysExts))
+ {
+ GLH_EXT_NAME(wglCreateContextAttribsARB) = (PFNWGLCREATECONTEXTATTRIBSARBPROC)GLH_EXT_GET_PROC_ADDRESS("wglCreateContextAttribsARB");
+ }
+ else
+ {
+ LL_WARNS("RenderInit") << "No ARB create context extensions" << LL_ENDL;
+ }
+
if (ExtensionExists("WGL_EXT_swap_control", gGLHExts.mSysExts))
{
GLH_EXT_NAME(wglSwapIntervalEXT) = (PFNWGLSWAPINTERVALEXTPROC)GLH_EXT_GET_PROC_ADDRESS("wglSwapIntervalEXT");
@@ -424,12 +500,44 @@ bool LLGLManager::initGL()
LL_ERRS("RenderInit") << "Calling init on LLGLManager after already initialized!" << LL_ENDL;
}
- GLint alpha_bits;
- glGetIntegerv( GL_ALPHA_BITS, &alpha_bits );
- if( 8 != alpha_bits )
+ stop_glerror();
+
+#if LL_WINDOWS
+ if (!glGetStringi)
+ {
+ glGetStringi = (PFNGLGETSTRINGIPROC) GLH_EXT_GET_PROC_ADDRESS("glGetStringi");
+ }
+
+ //reload extensions string (may have changed after using wglCreateContextAttrib)
+ if (glGetStringi)
{
- LL_WARNS("RenderInit") << "Frame buffer has less than 8 bits of alpha. Avatar texture compositing will fail." << LL_ENDL;
+ std::stringstream str;
+
+ GLint count = 0;
+ glGetIntegerv(GL_NUM_EXTENSIONS, &count);
+ for (GLint i = 0; i < count; ++i)
+ {
+ std::string ext((const char*) glGetStringi(GL_EXTENSIONS, i));
+ str << ext << " ";
+ LL_DEBUGS("GLExtensions") << ext << llendl;
+ }
+
+ {
+ PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = 0;
+ wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
+ if(wglGetExtensionsStringARB)
+ {
+ str << (const char*) wglGetExtensionsStringARB(wglGetCurrentDC());
+ }
+ }
+
+ free(gGLHExts.mSysExts);
+ std::string extensions = str.str();
+ gGLHExts.mSysExts = strdup(extensions.c_str());
}
+#endif
+
+ stop_glerror();
// Extract video card strings and convert to upper case to
// work around driver-to-driver variation in capitalization.
@@ -445,7 +553,7 @@ bool LLGLManager::initGL()
&mDriverVersionVendorString );
mGLVersion = mDriverVersionMajor + mDriverVersionMinor * .1f;
-
+
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
// from being recognized as ATI.
if (mGLVendor.substr(0,4) == "ATI ")
@@ -517,8 +625,12 @@ bool LLGLManager::initGL()
mGLVendorShort = "MISC";
}
+ stop_glerror();
// This is called here because it depends on the setting of mIsGF2or4MX, and sets up mHasMultitexture.
initExtensions();
+ stop_glerror();
+
+ S32 old_vram = mVRAM;
if (mHasATIMemInfo)
{ //ask the gl how much vram is free at startup and attempt to use no more than half of that
@@ -534,7 +646,27 @@ bool LLGLManager::initGL()
mVRAM = dedicated_memory/1024;
}
- if (mHasMultitexture)
+ if (mVRAM < 256)
+ { //something likely went wrong using the above extensions, fall back to old method
+ mVRAM = old_vram;
+ }
+
+ stop_glerror();
+
+ stop_glerror();
+
+ if (mHasFragmentShader)
+ {
+ GLint num_tex_image_units;
+ glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units);
+ mNumTextureImageUnits = llmin(num_tex_image_units, 32);
+ }
+
+ if (LLRender::sGLCoreProfile)
+ {
+ mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS);
+ }
+ else if (mHasMultitexture)
{
GLint num_tex_units;
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units);
@@ -553,12 +685,7 @@ bool LLGLManager::initGL()
return false;
}
- if (mHasFragmentShader)
- {
- GLint num_tex_image_units;
- glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units);
- mNumTextureImageUnits = llmin(num_tex_image_units, 32);
- }
+ stop_glerror();
if (mHasTextureMultisample)
{
@@ -568,6 +695,21 @@ bool LLGLManager::initGL()
glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords);
}
+ stop_glerror();
+
+#if LL_WINDOWS
+ if (mHasDebugOutput && gDebugGL)
+ { //setup debug output callback
+ //glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE);
+ glDebugMessageCallbackARB((GLDEBUGPROCARB) gl_debug_callback, NULL);
+ glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
+ }
+#endif
+
+ stop_glerror();
+
+ //HACK always disable texture multisample, use FXAA instead
+ mHasTextureMultisample = FALSE;
#if LL_WINDOWS
if (mIsATI)
{ //using multisample textures on ATI results in black screen for some reason
@@ -579,10 +721,17 @@ bool LLGLManager::initGL()
{
glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
}
+
+ stop_glerror();
setToDebugGPU();
+ stop_glerror();
+
initGLStates();
+
+ stop_glerror();
+
return true;
}
@@ -686,14 +835,6 @@ std::string LLGLManager::getRawGLString()
return gl_string;
}
-U32 LLGLManager::getNumFBOFSAASamples(U32 samples)
-{
- samples = llmin(samples, (U32) mMaxColorTextureSamples);
- samples = llmin(samples, (U32) mMaxDepthTextureSamples);
- samples = llmin(samples, (U32) 4);
- return samples;
-}
-
void LLGLManager::shutdownGL()
{
if (mInited)
@@ -760,7 +901,7 @@ void LLGLManager::initExtensions()
mHasVertexShader = FALSE;
mHasFragmentShader = FALSE;
mHasTextureRectangle = FALSE;
-#else // LL_MESA_HEADLESS
+#else // LL_MESA_HEADLESS //important, gGLHExts.mSysExts is uninitialized until after glh_init_extensions is called
mHasMultitexture = glh_init_extensions("GL_ARB_multitexture");
mHasATIMemInfo = ExtensionExists("GL_ATI_meminfo", gGLHExts.mSysExts);
mHasNVXMemInfo = ExtensionExists("GL_NVX_gpu_memory_info", gGLHExts.mSysExts);
@@ -774,7 +915,10 @@ void LLGLManager::initExtensions()
mHasOcclusionQuery = ExtensionExists("GL_ARB_occlusion_query", gGLHExts.mSysExts);
mHasOcclusionQuery2 = ExtensionExists("GL_ARB_occlusion_query2", gGLHExts.mSysExts);
mHasVertexBufferObject = ExtensionExists("GL_ARB_vertex_buffer_object", gGLHExts.mSysExts);
+ mHasVertexArrayObject = ExtensionExists("GL_ARB_vertex_array_object", gGLHExts.mSysExts);
+ mHasSync = ExtensionExists("GL_ARB_sync", gGLHExts.mSysExts);
mHasMapBufferRange = ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts);
+ mHasFlushBufferRange = ExtensionExists("GL_APPLE_flush_buffer_range", gGLHExts.mSysExts);
mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad
#ifdef GL_ARB_framebuffer_object
@@ -790,13 +934,14 @@ void LLGLManager::initExtensions()
mHasBlendFuncSeparate = ExtensionExists("GL_EXT_blend_func_separate", gGLHExts.mSysExts);
mHasTextureRectangle = ExtensionExists("GL_ARB_texture_rectangle", gGLHExts.mSysExts);
mHasTextureMultisample = ExtensionExists("GL_ARB_texture_multisample", gGLHExts.mSysExts);
+ mHasDebugOutput = ExtensionExists("GL_ARB_debug_output", gGLHExts.mSysExts);
#if !LL_DARWIN
mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts);
#endif
- mHasShaderObjects = ExtensionExists("GL_ARB_shader_objects", gGLHExts.mSysExts) && ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts);
+ mHasShaderObjects = ExtensionExists("GL_ARB_shader_objects", gGLHExts.mSysExts) && (LLRender::sGLCoreProfile || ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts));
mHasVertexShader = ExtensionExists("GL_ARB_vertex_program", gGLHExts.mSysExts) && ExtensionExists("GL_ARB_vertex_shader", gGLHExts.mSysExts)
- && ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts);
- mHasFragmentShader = ExtensionExists("GL_ARB_fragment_shader", gGLHExts.mSysExts) && ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts);
+ && (LLRender::sGLCoreProfile || ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts));
+ mHasFragmentShader = ExtensionExists("GL_ARB_fragment_shader", gGLHExts.mSysExts) && (LLRender::sGLCoreProfile || ExtensionExists("GL_ARB_shading_language_100", gGLHExts.mSysExts));
#endif
#if LL_LINUX || LL_SOLARIS
@@ -969,6 +1114,23 @@ void LLGLManager::initExtensions()
mHasVertexBufferObject = FALSE;
}
}
+ if (mHasVertexArrayObject)
+ {
+ glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) GLH_EXT_GET_PROC_ADDRESS("glBindVertexArray");
+ glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteVertexArrays");
+ glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenVertexArrays");
+ glIsVertexArray = (PFNGLISVERTEXARRAYPROC) GLH_EXT_GET_PROC_ADDRESS("glIsVertexArray");
+ }
+ if (mHasSync)
+ {
+ glFenceSync = (PFNGLFENCESYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glFenceSync");
+ glIsSync = (PFNGLISSYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glIsSync");
+ glDeleteSync = (PFNGLDELETESYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteSync");
+ glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glClientWaitSync");
+ glWaitSync = (PFNGLWAITSYNCPROC) GLH_EXT_GET_PROC_ADDRESS("glWaitSync");
+ glGetInteger64v = (PFNGLGETINTEGER64VPROC) GLH_EXT_GET_PROC_ADDRESS("glGetInteger64v");
+ glGetSynciv = (PFNGLGETSYNCIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetSynciv");
+ }
if (mHasMapBufferRange)
{
glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) GLH_EXT_GET_PROC_ADDRESS("glMapBufferRange");
@@ -1013,6 +1175,13 @@ void LLGLManager::initExtensions()
glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetMultisamplefv");
glSampleMaski = (PFNGLSAMPLEMASKIPROC) GLH_EXT_GET_PROC_ADDRESS("glSampleMaski");
}
+ if (mHasDebugOutput)
+ {
+ glDebugMessageControlARB = (PFNGLDEBUGMESSAGECONTROLARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageControlARB");
+ glDebugMessageInsertARB = (PFNGLDEBUGMESSAGEINSERTARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageInsertARB");
+ glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageCallbackARB");
+ glGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetDebugMessageLogARB");
+ }
#if (!LL_LINUX && !LL_SOLARIS) || LL_LINUX_NV_GL_HEADERS
// This is expected to be a static symbol on Linux GL implementations, except if we use the nvidia headers - bah
glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElements");
@@ -1167,7 +1336,7 @@ void rotate_quat(LLQuaternion& rotation)
{
F32 angle_radians, x, y, z;
rotation.getAngleAxis(&angle_radians, &x, &y, &z);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
}
void flush_glerror()
@@ -1204,10 +1373,6 @@ void log_glerror()
void do_assert_glerror()
{
- if (LL_UNLIKELY(!gGLManager.mInited))
- {
- LL_ERRS("RenderInit") << "GL not initialized" << LL_ENDL;
- }
// Create or update texture to be used with this data
GLenum error;
error = glGetError();
@@ -1300,11 +1465,6 @@ void LLGLState::initClass()
//make sure multisample defaults to disabled
sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE;
glDisable(GL_MULTISAMPLE_ARB);
-
- sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE;
- glDisable(GL_MULTISAMPLE_ARB);
-
- glEnableClientState(GL_VERTEX_ARRAY);
}
//static
@@ -1354,6 +1514,8 @@ void LLGLState::checkStates(const std::string& msg)
glGetIntegerv(GL_BLEND_SRC, &src);
glGetIntegerv(GL_BLEND_DST, &dst);
+ stop_glerror();
+
BOOL error = FALSE;
if (src != GL_SRC_ALPHA || dst != GL_ONE_MINUS_SRC_ALPHA)
@@ -1374,7 +1536,9 @@ void LLGLState::checkStates(const std::string& msg)
{
LLGLenum state = iter->first;
LLGLboolean cur_state = iter->second;
+ stop_glerror();
LLGLboolean gl_state = glIsEnabled(state);
+ stop_glerror();
if(cur_state != gl_state)
{
dumpStates();
@@ -1399,11 +1563,11 @@ void LLGLState::checkStates(const std::string& msg)
void LLGLState::checkTextureChannels(const std::string& msg)
{
+#if 0
if (!gDebugGL)
{
return;
}
-
stop_glerror();
GLint activeTexture;
@@ -1569,11 +1733,12 @@ void LLGLState::checkTextureChannels(const std::string& msg)
LL_GL_ERRS << "GL texture state corruption detected. " << msg << LL_ENDL;
}
}
+#endif
}
void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
{
- if (!gDebugGL)
+ if (!gDebugGL || LLGLSLShader::sNoFixedFunction)
{
return;
}
@@ -1594,7 +1759,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
error = TRUE;
}
- glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &active_texture);
+ /*glGetIntegerv(GL_ACTIVE_TEXTURE_ARB, &active_texture);
if (active_texture != GL_TEXTURE0_ARB)
{
llwarns << "Active texture corrupted: " << active_texture << llendl;
@@ -1603,7 +1768,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
gFailLog << "Active texture corrupted: " << active_texture << std::endl;
}
error = TRUE;
- }
+ }*/
static const char* label[] =
{
@@ -1630,7 +1795,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
};
- for (S32 j = 0; j < 4; j++)
+ for (S32 j = 1; j < 4; j++)
{
if (glIsEnabled(value[j]))
{
@@ -1685,7 +1850,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
}
}
- if (glIsEnabled(GL_TEXTURE_2D))
+ /*if (glIsEnabled(GL_TEXTURE_2D))
{
if (!(data_mask & 0x0008))
{
@@ -1708,7 +1873,7 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
gFailLog << "GL does not have GL_TEXTURE_2D enabled on channel 1." << std::endl;
}
}
- }
+ }*/
glClientActiveTextureARB(GL_TEXTURE0_ARB);
gGL.getTexUnit(0)->activate();
@@ -1751,8 +1916,27 @@ void LLGLState::checkClientArrays(const std::string& msg, U32 data_mask)
LLGLState::LLGLState(LLGLenum state, S32 enabled) :
mState(state), mWasEnabled(FALSE), mIsEnabled(FALSE)
{
+ if (LLGLSLShader::sNoFixedFunction)
+ { //always ignore state that's deprecated post GL 3.0
+ switch (state)
+ {
+ case GL_ALPHA_TEST:
+ case GL_NORMALIZE:
+ case GL_TEXTURE_GEN_R:
+ case GL_TEXTURE_GEN_S:
+ case GL_TEXTURE_GEN_T:
+ case GL_TEXTURE_GEN_Q:
+ case GL_LIGHTING:
+ case GL_COLOR_MATERIAL:
+ case GL_FOG:
+ case GL_LINE_STIPPLE:
+ mState = 0;
+ break;
+ }
+ }
+
stop_glerror();
- if (state)
+ if (mState)
{
mWasEnabled = sStateMap[state];
llassert(mWasEnabled == glIsEnabled(state));
@@ -1834,79 +2018,6 @@ void LLGLManager::initGLStates()
////////////////////////////////////////////////////////////////////////////////
-void enable_vertex_weighting(const S32 index)
-{
-#if GL_ARB_vertex_program
- if (index > 0) glEnableVertexAttribArrayARB(index); // vertex weights
-#endif
-}
-
-void disable_vertex_weighting(const S32 index)
-{
-#if GL_ARB_vertex_program
- if (index > 0) glDisableVertexAttribArrayARB(index); // vertex weights
-#endif
-}
-
-void enable_binormals(const S32 index)
-{
-#if GL_ARB_vertex_program
- if (index > 0)
- {
- glEnableVertexAttribArrayARB(index); // binormals
- }
-#endif
-}
-
-void disable_binormals(const S32 index)
-{
-#if GL_ARB_vertex_program
- if (index > 0)
- {
- glDisableVertexAttribArrayARB(index); // binormals
- }
-#endif
-}
-
-
-void enable_cloth_weights(const S32 index)
-{
-#if GL_ARB_vertex_program
- if (index > 0) glEnableVertexAttribArrayARB(index);
-#endif
-}
-
-void disable_cloth_weights(const S32 index)
-{
-#if GL_ARB_vertex_program
- if (index > 0) glDisableVertexAttribArrayARB(index);
-#endif
-}
-
-void set_vertex_weights(const S32 index, const U32 stride, const F32 *weights)
-{
-#if GL_ARB_vertex_program
- if (index > 0) glVertexAttribPointerARB(index, 1, GL_FLOAT, FALSE, stride, weights);
- stop_glerror();
-#endif
-}
-
-void set_vertex_clothing_weights(const S32 index, const U32 stride, const LLVector4 *weights)
-{
-#if GL_ARB_vertex_program
- if (index > 0) glVertexAttribPointerARB(index, 4, GL_FLOAT, TRUE, stride, weights);
- stop_glerror();
-#endif
-}
-
-void set_binormals(const S32 index, const U32 stride,const LLVector3 *binormals)
-{
-#if GL_ARB_vertex_program
- if (index > 0) glVertexAttribPointerARB(index, 3, GL_FLOAT, FALSE, stride, binormals);
- stop_glerror();
-#endif
-}
-
void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor_specific )
{
// GL_VERSION returns a null-terminated string with the format:
@@ -2019,20 +2130,20 @@ void LLGLUserClipPlane::setPlane(F32 a, F32 b, F32 c, F32 d)
glh::matrix4f suffix;
suffix.set_row(2, cplane);
glh::matrix4f newP = suffix * P;
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadMatrixf(newP.m);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadMatrix(newP.m);
gGLObliqueProjectionInverse = LLMatrix4(newP.inverse().transpose().m);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
LLGLUserClipPlane::~LLGLUserClipPlane()
{
if (mApply)
{
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
}
@@ -2110,8 +2221,7 @@ void LLGLNamePool::release(GLuint name)
void LLGLNamePool::upkeepPools()
{
LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS);
- tracker_t::LLInstanceTrackerScopedGuard guard;
- for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter)
+ for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
{
LLGLNamePool & pool = *iter;
pool.upkeep();
@@ -2121,8 +2231,7 @@ void LLGLNamePool::upkeepPools()
//static
void LLGLNamePool::cleanupPools()
{
- tracker_t::LLInstanceTrackerScopedGuard guard;
- for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter)
+ for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
{
LLGLNamePool & pool = *iter;
pool.cleanup();
@@ -2224,16 +2333,16 @@ LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P, U32 layer)
P.element(2, i) = P.element(3, i) * depth;
}
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadMatrixf(P.m);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadMatrix(P.m);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
LLGLSquashToFarClip::~LLGLSquashToFarClip()
{
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index d1bee00161..6a147b8e19 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -88,7 +88,10 @@ public:
// ARB Extensions
BOOL mHasVertexBufferObject;
+ BOOL mHasVertexArrayObject;
+ BOOL mHasSync;
BOOL mHasMapBufferRange;
+ BOOL mHasFlushBufferRange;
BOOL mHasPBuffer;
BOOL mHasShaderObjects;
BOOL mHasVertexShader;
@@ -110,6 +113,7 @@ public:
BOOL mHasAnisotropic;
BOOL mHasARBEnvCombine;
BOOL mHasCubeMap;
+ BOOL mHasDebugOutput;
// Vendor-specific extensions
BOOL mIsATI;
@@ -146,7 +150,6 @@ public:
void printGLInfoString();
void getGLInfo(LLSD& info);
- U32 getNumFBOFSAASamples(U32 desired_samples = 32);
// In ALL CAPS
std::string mGLVendor;
std::string mGLVendorShort;
@@ -250,7 +253,7 @@ public:
static void dumpStates();
static void checkStates(const std::string& msg = "");
static void checkTextureChannels(const std::string& msg = "");
- static void checkClientArrays(const std::string& msg = "", U32 data_mask = 0x0001);
+ static void checkClientArrays(const std::string& msg = "", U32 data_mask = 0);
protected:
static boost::unordered_map<LLGLenum, LLGLboolean> sStateMap;
@@ -417,15 +420,7 @@ extern LLMatrix4 gGLObliqueProjectionInverse;
#include "llglstates.h"
void init_glstates();
-void enable_vertex_weighting(const S32 index);
-void disable_vertex_weighting(const S32 index);
-void enable_binormals(const S32 index);
-void disable_binormals(const S32 index);
-void enable_cloth_weights(const S32 index);
-void disable_cloth_weights(const S32 index);
-void set_vertex_weights(const S32 index, const U32 stride, const F32 *weights);
-void set_vertex_clothing_weights(const S32 index, const U32 stride, const LLVector4 *weights);
-void set_binormals(const S32 index, const U32 stride, const LLVector3 *binormals);
+
void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor_specific );
extern BOOL gClothRipple;
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index f35f329f00..10aad202e1 100644
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
@@ -68,6 +68,25 @@ extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
+// GL_ARB_vertex_array_object
+extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
+extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
+extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
+extern PFNGLISVERTEXARRAYPROC glIsVertexArray;
+
+// GL_ARB_sync
+extern PFNGLFENCESYNCPROC glFenceSync;
+extern PFNGLISSYNCPROC glIsSync;
+extern PFNGLDELETESYNCPROC glDeleteSync;
+extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync;
+extern PFNGLWAITSYNCPROC glWaitSync;
+extern PFNGLGETINTEGER64VPROC glGetInteger64v;
+extern PFNGLGETSYNCIVPROC glGetSynciv;
+
+// GL_APPLE_flush_buffer_range
+extern PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE;
+
// GL_ARB_map_buffer_range
extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
@@ -297,6 +316,12 @@ extern PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB;
extern PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements;
#endif // LL_LINUX_NV_GL_HEADERS
+// GL_ARB_vertex_array_object
+extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
+extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
+extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
+extern PFNGLISVERTEXARRAYPROC glIsVertexArray;
+
// GL_ARB_vertex_buffer_object
extern PFNGLBINDBUFFERARBPROC glBindBufferARB;
extern PFNGLDELETEBUFFERSARBPROC glDeleteBuffersARB;
@@ -310,6 +335,19 @@ extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
+// GL_ARB_sync
+extern PFNGLFENCESYNCPROC glFenceSync;
+extern PFNGLISSYNCPROC glIsSync;
+extern PFNGLDELETESYNCPROC glDeleteSync;
+extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync;
+extern PFNGLWAITSYNCPROC glWaitSync;
+extern PFNGLGETINTEGER64VPROC glGetInteger64v;
+extern PFNGLGETSYNCIVPROC glGetSynciv;
+
+// GL_APPLE_flush_buffer_range
+extern PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE;
+
// GL_ARB_map_buffer_range
extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
@@ -505,6 +543,9 @@ extern PFNGLSAMPLEMASKIPROC glSampleMaski;
#include "GL/glext.h"
#include "GL/glh_extensions.h"
+// WGL_ARB_create_context
+extern PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB;
+extern PFNGLGETSTRINGIPROC glGetStringi;
// GL_ARB_vertex_buffer_object
extern PFNGLBINDBUFFERARBPROC glBindBufferARB;
@@ -519,6 +560,25 @@ extern PFNGLUNMAPBUFFERARBPROC glUnmapBufferARB;
extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
extern PFNGLGETBUFFERPOINTERVARBPROC glGetBufferPointervARB;
+// GL_ARB_vertex_array_object
+extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
+extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
+extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
+extern PFNGLISVERTEXARRAYPROC glIsVertexArray;
+
+// GL_ARB_sync
+extern PFNGLFENCESYNCPROC glFenceSync;
+extern PFNGLISSYNCPROC glIsSync;
+extern PFNGLDELETESYNCPROC glDeleteSync;
+extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync;
+extern PFNGLWAITSYNCPROC glWaitSync;
+extern PFNGLGETINTEGER64VPROC glGetInteger64v;
+extern PFNGLGETSYNCIVPROC glGetSynciv;
+
+// GL_APPLE_flush_buffer_range
+extern PFNGLBUFFERPARAMETERIAPPLEPROC glBufferParameteriAPPLE;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC glFlushMappedBufferRangeAPPLE;
+
// GL_ARB_map_buffer_range
extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
@@ -696,6 +756,12 @@ extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
extern PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
extern PFNGLSAMPLEMASKIPROC glSampleMaski;
+//GL_ARB_debug_output
+extern PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB;
+extern PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB;
+extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB;
+extern PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB;
+
#elif LL_DARWIN
//----------------------------------------------------------------------------
// LL_DARWIN
@@ -860,6 +926,31 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
#endif /* GL_GLEXT_FUNCTION_POINTERS */
#endif
+#ifndef GL_ARB_texture_rg
+#define GL_RG 0x8227
+#define GL_RG_INTEGER 0x8228
+#define GL_R8 0x8229
+#define GL_R16 0x822A
+#define GL_RG8 0x822B
+#define GL_RG16 0x822C
+#define GL_R16F 0x822D
+#define GL_R32F 0x822E
+#define GL_RG16F 0x822F
+#define GL_RG32F 0x8230
+#define GL_R8I 0x8231
+#define GL_R8UI 0x8232
+#define GL_R16I 0x8233
+#define GL_R16UI 0x8234
+#define GL_R32I 0x8235
+#define GL_R32UI 0x8236
+#define GL_RG8I 0x8237
+#define GL_RG8UI 0x8238
+#define GL_RG16I 0x8239
+#define GL_RG16UI 0x823A
+#define GL_RG32I 0x823B
+#define GL_RG32UI 0x823C
+#endif
+
// May be needed for DARWIN...
// #ifndef GL_ARB_compressed_tex_image
// #define GL_ARB_compressed_tex_image 1
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index ad2c662dfc..5a6f3d8292 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -31,6 +31,7 @@
#include "llshadermgr.h"
#include "llfile.h"
#include "llrender.h"
+#include "llvertexbuffer.h"
#if LL_DARWIN
#include "OpenGL/OpenGL.h"
@@ -49,6 +50,13 @@ using std::make_pair;
using std::string;
GLhandleARB LLGLSLShader::sCurBoundShader = 0;
+LLGLSLShader* LLGLSLShader::sCurBoundShaderPtr = NULL;
+S32 LLGLSLShader::sIndexedTextureChannels = 0;
+bool LLGLSLShader::sNoFixedFunction = false;
+
+//UI shader -- declared here so llui_libtest will link properly
+LLGLSLShader gUIProgram;
+LLGLSLShader gSolidColorProgram;
BOOL shouldChange(const LLVector4& v1, const LLVector4& v2)
{
@@ -58,7 +66,8 @@ BOOL shouldChange(const LLVector4& v1, const LLVector4& v2)
LLShaderFeatures::LLShaderFeatures()
: calculatesLighting(false), isShiny(false), isFullbright(false), hasWaterFog(false),
hasTransport(false), hasSkinning(false), hasObjectSkinning(false), hasAtmospherics(false), isSpecular(false),
-hasGamma(false), hasLighting(false), calculatesAtmospherics(false), mIndexedTextureChannels(0), disableTextureIndex(false)
+hasGamma(false), hasLighting(false), calculatesAtmospherics(false), mIndexedTextureChannels(0), disableTextureIndex(false),
+hasAlphaMask(false)
{
}
@@ -68,6 +77,7 @@ hasGamma(false), hasLighting(false), calculatesAtmospherics(false), mIndexedText
LLGLSLShader::LLGLSLShader()
: mProgramObject(0), mActiveTextureChannels(0), mShaderLevel(0), mShaderGroup(SG_DEFAULT), mUniformsDirty(FALSE)
{
+
}
void LLGLSLShader::unload()
@@ -103,17 +113,19 @@ void LLGLSLShader::unload()
BOOL LLGLSLShader::createShader(vector<string> * attributes,
vector<string> * uniforms)
{
+ //reloading, reset matrix hash values
+ for (U32 i = 0; i < LLRender::NUM_MATRIX_MODES; ++i)
+ {
+ mMatHash[i] = 0xFFFFFFFF;
+ }
+ mLightHash = 0xFFFFFFFF;
+
llassert_always(!mShaderFiles.empty());
BOOL success = TRUE;
// Create program
mProgramObject = glCreateProgramObjectARB();
- if (gGLManager.mGLVersion < 3.1f)
- { //force indexed texture channels to 1 if GL version is old (performance improvement for drivers with poor branching shader model support)
- mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1);
- }
-
//compile new source
vector< pair<string,GLenum> >::iterator fileIter = mShaderFiles.begin();
for ( ; fileIter != mShaderFiles.end(); fileIter++ )
@@ -228,6 +240,13 @@ void LLGLSLShader::attachObjects(GLhandleARB* objects, S32 count)
BOOL LLGLSLShader::mapAttributes(const vector<string> * attributes)
{
+ //before linking, make sure reserved attributes always have consistent locations
+ for (U32 i = 0; i < LLShaderMgr::instance()->mReservedAttribs.size(); i++)
+ {
+ const char* name = LLShaderMgr::instance()->mReservedAttribs[i].c_str();
+ glBindAttribLocationARB(mProgramObject, i, (const GLcharARB *) name);
+ }
+
//link the program
BOOL res = link();
@@ -301,7 +320,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<string> * uniforms)
for (S32 i = 0; i < (S32) LLShaderMgr::instance()->mReservedUniforms.size(); i++)
{
if ( (mUniform[i] == -1)
- && (LLShaderMgr::instance()->mReservedUniforms[i].compare(0, length, name, LLShaderMgr::instance()->mReservedUniforms[i].length()) == 0))
+ && (LLShaderMgr::instance()->mReservedUniforms[i] == name))
{
//found it
mUniform[i] = location;
@@ -315,7 +334,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<string> * uniforms)
for (U32 i = 0; i < uniforms->size(); i++)
{
if ( (mUniform[i+LLShaderMgr::instance()->mReservedUniforms.size()] == -1)
- && ((*uniforms)[i].compare(0, length, name, (*uniforms)[i].length()) == 0))
+ && ((*uniforms)[i] == name))
{
//found it
mUniform[i+LLShaderMgr::instance()->mReservedUniforms.size()] = location;
@@ -376,10 +395,13 @@ BOOL LLGLSLShader::link(BOOL suppress_errors)
void LLGLSLShader::bind()
{
+ gGL.flush();
if (gGLManager.mHasShaderObjects)
{
+ LLVertexBuffer::unbind();
glUseProgramObjectARB(mProgramObject);
sCurBoundShader = mProgramObject;
+ sCurBoundShaderPtr = this;
if (mUniformsDirty)
{
LLShaderMgr::instance()->updateShaderUniforms(this);
@@ -390,6 +412,7 @@ void LLGLSLShader::bind()
void LLGLSLShader::unbind()
{
+ gGL.flush();
if (gGLManager.mHasShaderObjects)
{
stop_glerror();
@@ -401,16 +424,23 @@ void LLGLSLShader::unbind()
stop_glerror();
}
}
+ LLVertexBuffer::unbind();
glUseProgramObjectARB(0);
sCurBoundShader = 0;
+ sCurBoundShaderPtr = NULL;
stop_glerror();
}
}
void LLGLSLShader::bindNoShader(void)
{
- glUseProgramObjectARB(0);
- sCurBoundShader = 0;
+ LLVertexBuffer::unbind();
+ if (gGLManager.mHasShaderObjects)
+ {
+ glUseProgramObjectARB(0);
+ sCurBoundShader = 0;
+ sCurBoundShaderPtr = NULL;
+ }
}
S32 LLGLSLShader::enableTexture(S32 uniform, LLTexUnit::eTextureType mode)
@@ -756,13 +786,17 @@ GLint LLGLSLShader::getUniformLocation(const string& uniform)
}
}
- /*if (gDebugGL)
+ return ret;
+}
+
+GLint LLGLSLShader::getUniformLocation(U32 index)
+{
+ GLint ret = -1;
+ if (mProgramObject > 0)
{
- if (ret == -1 && ret != glGetUniformLocationARB(mProgramObject, uniform.c_str()))
- {
- llerrs << "Uniform map invalid." << llendl;
- }
- }*/
+ llassert(index < mUniform.size());
+ return mUniform[index];
+ }
return ret;
}
@@ -918,7 +952,9 @@ void LLGLSLShader::uniform4fv(const string& uniform, U32 count, const GLfloat* v
std::map<GLint, LLVector4>::iterator iter = mValue.find(location);
if (iter == mValue.end() || shouldChange(iter->second,vec) || count != 1)
{
+ stop_glerror();
glUniform4fvARB(location, count, v);
+ stop_glerror();
mValue[location] = vec;
}
}
@@ -972,3 +1008,9 @@ void LLGLSLShader::vertexAttrib4fv(U32 index, GLfloat* v)
glVertexAttrib4fvARB(mAttribute[index], v);
}
}
+
+void LLGLSLShader::setMinimumAlpha(F32 minimum)
+{
+ gGL.flush();
+ uniform1f(LLShaderMgr::MINIMUM_ALPHA, minimum);
+}
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index 4922eb6d67..2a6c050eac 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -47,6 +47,7 @@ public:
bool hasGamma;
S32 mIndexedTextureChannels;
bool disableTextureIndex;
+ bool hasAlphaMask;
// char numLights;
@@ -67,6 +68,9 @@ public:
LLGLSLShader();
static GLhandleARB sCurBoundShader;
+ static LLGLSLShader* sCurBoundShaderPtr;
+ static S32 sIndexedTextureChannels;
+ static bool sNoFixedFunction;
void unload();
BOOL createShader(std::vector<std::string> * attributes,
@@ -104,14 +108,17 @@ public:
void uniformMatrix3fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
void uniformMatrix4fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
+ void setMinimumAlpha(F32 minimum);
+
void vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
void vertexAttrib4fv(U32 index, GLfloat* v);
GLint getUniformLocation(const std::string& uniform);
+ GLint getUniformLocation(U32 index);
+
GLint getAttribLocation(U32 attrib);
GLint mapUniformTextureChannel(GLint location, GLenum type);
-
//enable/disable texture channel for specified uniform
//if given texture uniform is active in the shader,
//the corresponding channel will be active upon return
@@ -126,6 +133,9 @@ public:
// Unbinds any previously bound shader by explicitly binding no shader.
static void bindNoShader(void);
+ U32 mMatHash[LLRender::NUM_MATRIX_MODES];
+ U32 mLightHash;
+
GLhandleARB mProgramObject;
std::vector<GLint> mAttribute; //lookup table of attribute enum to attribute channel
std::vector<GLint> mUniform; //lookup table of uniform enum to uniform location
@@ -141,4 +151,10 @@ public:
std::string mName;
};
+//UI shader (declared here so llui_libtest will link properly)
+extern LLGLSLShader gUIProgram;
+//output vec4(color.rgb,color.a*tex0[tc0].a)
+extern LLGLSLShader gSolidColorProgram;
+
+
#endif
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 60a5962234..78591ddd38 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -36,7 +36,9 @@
#include "llmath.h"
#include "llgl.h"
+#include "llglslshader.h"
#include "llrender.h"
+
//----------------------------------------------------------------------------
const F32 MIN_TEXTURE_LIFETIME = 10.f;
@@ -725,7 +727,10 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
{
if (mAutoGenMips)
{
- glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_GENERATE_MIPMAP_SGIS, TRUE);
+ if (!gGLManager.mHasFramebufferObject)
+ {
+ glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_GENERATE_MIPMAP_SGIS, TRUE);
+ }
stop_glerror();
{
// LLFastTimer t2(FTM_TEMP4);
@@ -754,6 +759,11 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
stop_glerror();
}
}
+
+ if (gGLManager.mHasFramebufferObject)
+ {
+ glGenerateMipmap(LLTexUnit::getInternalType(mBindTarget));
+ }
}
else
{
@@ -875,6 +885,9 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
{
+ //not compatible with core GL profile
+ llassert(!LLRender::sGLCoreProfile);
+
if (gGLManager.mIsDisabled)
{
llwarns << "Trying to create a texture while GL is disabled!" << llendl;
@@ -901,29 +914,29 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
{
switch (mComponents)
{
- case 1:
+ case 1:
// Use luminance alpha (for fonts)
mFormatInternal = GL_LUMINANCE8;
mFormatPrimary = GL_LUMINANCE;
mFormatType = GL_UNSIGNED_BYTE;
break;
- case 2:
+ case 2:
// Use luminance alpha (for fonts)
mFormatInternal = GL_LUMINANCE8_ALPHA8;
mFormatPrimary = GL_LUMINANCE_ALPHA;
mFormatType = GL_UNSIGNED_BYTE;
break;
- case 3:
+ case 3:
mFormatInternal = GL_RGB8;
mFormatPrimary = GL_RGB;
mFormatType = GL_UNSIGNED_BYTE;
break;
- case 4:
+ case 4:
mFormatInternal = GL_RGBA8;
mFormatPrimary = GL_RGBA;
mFormatType = GL_UNSIGNED_BYTE;
break;
- default:
+ default:
llerrs << "Bad number of components for texture: " << (U32)getComponents() << llendl;
}
}
@@ -1099,8 +1112,75 @@ void LLImageGL::deleteTextures(S32 numTextures, U32 *textures, bool immediate)
// static
void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels)
{
- glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, pixels);
+ bool use_scratch = false;
+ U32* scratch = NULL;
+ if (LLRender::sGLCoreProfile)
+ {
+ if (pixformat == GL_ALPHA && pixtype == GL_UNSIGNED_BYTE)
+ { //GL_ALPHA is deprecated, convert to RGBA
+ use_scratch = true;
+ scratch = new U32[width*height];
+
+ U32 pixel_count = (U32) (width*height);
+ for (U32 i = 0; i < pixel_count; i++)
+ {
+ U8* pix = (U8*) &scratch[i];
+ pix[0] = pix[1] = pix[2] = 0;
+ pix[3] = ((U8*) pixels)[i];
+ }
+
+ pixformat = GL_RGBA;
+ intformat = GL_RGBA8;
+ }
+
+ if (pixformat == GL_LUMINANCE_ALPHA && pixtype == GL_UNSIGNED_BYTE)
+ { //GL_LUMINANCE_ALPHA is deprecated, convert to RGBA
+ use_scratch = true;
+ scratch = new U32[width*height];
+
+ U32 pixel_count = (U32) (width*height);
+ for (U32 i = 0; i < pixel_count; i++)
+ {
+ U8 lum = ((U8*) pixels)[i*2+0];
+ U8 alpha = ((U8*) pixels)[i*2+1];
+
+ U8* pix = (U8*) &scratch[i];
+ pix[0] = pix[1] = pix[2] = lum;
+ pix[3] = alpha;
+ }
+
+ pixformat = GL_RGBA;
+ intformat = GL_RGBA8;
+ }
+
+ if (pixformat == GL_LUMINANCE && pixtype == GL_UNSIGNED_BYTE)
+ { //GL_LUMINANCE_ALPHA is deprecated, convert to RGB
+ use_scratch = true;
+ scratch = new U32[width*height];
+
+ U32 pixel_count = (U32) (width*height);
+ for (U32 i = 0; i < pixel_count; i++)
+ {
+ U8 lum = ((U8*) pixels)[i];
+
+ U8* pix = (U8*) &scratch[i];
+ pix[0] = pix[1] = pix[2] = lum;
+ pix[3] = 255;
+ }
+
+ pixformat = GL_RGBA;
+ intformat = GL_RGB8;
+ }
+ }
+
+ stop_glerror();
+ glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, use_scratch ? scratch : pixels);
stop_glerror();
+
+ if (use_scratch)
+ {
+ delete [] scratch;
+ }
}
//create an empty GL texture: just create a texture name
@@ -1167,29 +1247,29 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
{
switch (mComponents)
{
- case 1:
+ case 1:
// Use luminance alpha (for fonts)
mFormatInternal = GL_LUMINANCE8;
mFormatPrimary = GL_LUMINANCE;
mFormatType = GL_UNSIGNED_BYTE;
break;
- case 2:
+ case 2:
// Use luminance alpha (for fonts)
mFormatInternal = GL_LUMINANCE8_ALPHA8;
mFormatPrimary = GL_LUMINANCE_ALPHA;
mFormatType = GL_UNSIGNED_BYTE;
break;
- case 3:
+ case 3:
mFormatInternal = GL_RGB8;
mFormatPrimary = GL_RGB;
mFormatType = GL_UNSIGNED_BYTE;
break;
- case 4:
+ case 4:
mFormatInternal = GL_RGBA8;
mFormatPrimary = GL_RGBA;
mFormatType = GL_UNSIGNED_BYTE;
break;
- default:
+ default:
llerrs << "Bad number of components for texture: " << (U32)getComponents() << llendl;
}
@@ -1212,6 +1292,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_hasmips, S32 usename)
{
llassert(data_in);
+ stop_glerror();
if (discard_level < 0)
{
@@ -1240,8 +1321,11 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
stop_glerror();
{
llverify(gGL.getTexUnit(0)->bind(this));
+ stop_glerror();
glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_TEXTURE_BASE_LEVEL, 0);
+ stop_glerror();
glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_TEXTURE_MAX_LEVEL, mMaxDiscardLevel-discard_level);
+ stop_glerror();
}
}
if (!mTexName)
@@ -1414,6 +1498,8 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
void LLImageGL::deleteDeadTextures()
{
+ bool reset = false;
+
while (!sDeadTextureList.empty())
{
GLuint tex = sDeadTextureList.front();
@@ -1422,16 +1508,26 @@ void LLImageGL::deleteDeadTextures()
{
LLTexUnit* tex_unit = gGL.getTexUnit(i);
- if (tex_unit->getCurrTexture() == tex)
+ if (tex_unit && tex_unit->getCurrTexture() == tex)
{
tex_unit->unbind(tex_unit->getCurrType());
stop_glerror();
+
+ if (i > 0)
+ {
+ reset = true;
+ }
}
}
glDeleteTextures(1, &tex);
stop_glerror();
}
+
+ if (reset)
+ {
+ gGL.getTexUnit(0)->activate();
+ }
}
void LLImageGL::destroyGLTexture()
@@ -1742,7 +1838,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
// this to be an intentional effect and don't treat as a mask.
U32 midrangetotal = 0;
- for (U32 i = 4; i < 11; i++)
+ for (U32 i = 2; i < 13; i++)
{
midrangetotal += sample[i];
}
@@ -1757,7 +1853,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
upperhalftotal += sample[i];
}
- if (midrangetotal > length/16 || // lots of midrange, or
+ if (midrangetotal > length/48 || // lots of midrange, or
(lowerhalftotal == length && alphatotal != 0) || // all close to transparent but not all totally transparent, or
(upperhalftotal == length && alphatotal != 255*length)) // all close to opaque but not all totally opaque
{
@@ -1875,6 +1971,7 @@ BOOL LLImageGL::getMask(const LLVector2 &tc)
void LLImageGL::setCategory(S32 category)
{
+#if 0 //turn this off temporarily because it is not in use now.
if(!gAuditTexture)
{
return ;
@@ -1895,6 +1992,7 @@ void LLImageGL::setCategory(S32 category)
mCategory = -1 ;
}
}
+#endif
}
//for debug use
diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp
index d76b2d9004..c0045c8044 100644
--- a/indra/llrender/llpostprocess.cpp
+++ b/indra/llrender/llpostprocess.cpp
@@ -466,21 +466,21 @@ void LLPostProcess::drawOrthoQuad(unsigned int width, unsigned int height, QuadT
void LLPostProcess::viewOrthogonal(unsigned int width, unsigned int height)
{
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glOrtho( 0.f, (GLdouble) width , (GLdouble) height , 0.f, -1.f, 1.f );
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+ gGL.ortho( 0.f, (GLdouble) width , (GLdouble) height , 0.f, -1.f, 1.f );
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
}
void LLPostProcess::viewPerspective(void)
{
- glMatrixMode( GL_PROJECTION );
- glPopMatrix();
- glMatrixMode( GL_MODELVIEW );
- glPopMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
}
void LLPostProcess::changeOrthogonal(unsigned int width, unsigned int height)
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 1d82dda30f..812fa7024b 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1,4 +1,4 @@
-/**
+ /**
* @file llrender.cpp
* @brief LLRender implementation
*
@@ -34,18 +34,21 @@
#include "llimagegl.h"
#include "llrendertarget.h"
#include "lltexture.h"
+#include "llshadermgr.h"
LLRender gGL;
// Handy copies of last good GL matrices
-F64 gGLModelView[16];
-F64 gGLLastModelView[16];
-F64 gGLLastProjection[16];
-F64 gGLProjection[16];
+F32 gGLModelView[16];
+F32 gGLLastModelView[16];
+F32 gGLLastProjection[16];
+F32 gGLProjection[16];
S32 gGLViewport[4];
U32 LLRender::sUICalls = 0;
U32 LLRender::sUIVerts = 0;
+U32 LLTexUnit::sWhiteTexture = 0;
+bool LLRender::sGLCoreProfile = false;
static const U32 LL_NUM_TEXTURE_LAYERS = 32;
static const U32 LL_NUM_LIGHT_UNITS = 8;
@@ -126,7 +129,8 @@ void LLTexUnit::refreshState(void)
// Per apple spec, don't call glEnable/glDisable when index exceeds max texture units
// http://www.mailinglistarchive.com/html/mac-opengl@lists.apple.com/2008-07/msg00653.html
//
- bool enableDisable = (mIndex < gGLManager.mNumTextureUnits) && mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE;
+ bool enableDisable = !LLGLSLShader::sNoFixedFunction &&
+ (mIndex < gGLManager.mNumTextureUnits) && mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE;
if (mCurrTexType != TT_NONE)
{
@@ -176,18 +180,24 @@ void LLTexUnit::enable(eTextureType type)
if ( (mCurrTexType != type || gGL.mDirty) && (type != TT_NONE) )
{
+ stop_glerror();
activate();
+ stop_glerror();
if (mCurrTexType != TT_NONE && !gGL.mDirty)
{
disable(); // Force a disable of a previous texture type if it's enabled.
+ stop_glerror();
}
mCurrTexType = type;
gGL.flush();
- if (type != LLTexUnit::TT_MULTISAMPLE_TEXTURE &&
+ if (!LLGLSLShader::sNoFixedFunction &&
+ type != LLTexUnit::TT_MULTISAMPLE_TEXTURE &&
mIndex < gGLManager.mNumTextureUnits)
{
+ stop_glerror();
glEnable(sGLTextureType[type]);
+ stop_glerror();
}
}
}
@@ -201,7 +211,8 @@ void LLTexUnit::disable(void)
activate();
unbind(mCurrTexType);
gGL.flush();
- if (mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE &&
+ if (!LLGLSLShader::sNoFixedFunction &&
+ mCurrTexType != LLTexUnit::TT_MULTISAMPLE_TEXTURE &&
mIndex < gGLManager.mNumTextureUnits)
{
glDisable(sGLTextureType[mCurrTexType]);
@@ -282,26 +293,35 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind)
{
return bind(LLImageGL::sDefaultGLTexture) ;
}
+ stop_glerror();
return false ;
}
if ((mCurrTexture != texture->getTexName()) || forceBind)
{
gGL.flush();
+ stop_glerror();
activate();
+ stop_glerror();
enable(texture->getTarget());
+ stop_glerror();
mCurrTexture = texture->getTexName();
glBindTexture(sGLTextureType[texture->getTarget()], mCurrTexture);
+ stop_glerror();
texture->updateBindStats(texture->mTextureMemory);
mHasMipMaps = texture->mHasMipMaps;
if (texture->mTexOptionsDirty)
{
+ stop_glerror();
texture->mTexOptionsDirty = false;
setTextureAddressMode(texture->mAddressMode);
setTextureFilteringOption(texture->mFilterOption);
+ stop_glerror();
}
}
+ stop_glerror();
+
return true;
}
@@ -403,7 +423,14 @@ void LLTexUnit::unbind(eTextureType type)
activate();
mCurrTexture = 0;
- glBindTexture(sGLTextureType[type], 0);
+ if (LLGLSLShader::sNoFixedFunction && type == LLTexUnit::TT_TEXTURE)
+ {
+ glBindTexture(sGLTextureType[type], sWhiteTexture);
+ }
+ else
+ {
+ glBindTexture(sGLTextureType[type], 0);
+ }
stop_glerror();
}
}
@@ -474,6 +501,11 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio
void LLTexUnit::setTextureBlendType(eTextureBlendType type)
{
+ if (LLGLSLShader::sNoFixedFunction)
+ { //texture blend type means nothing when using shaders
+ return;
+ }
+
if (mIndex < 0) return;
// Do nothing if it's already correctly set.
@@ -594,6 +626,11 @@ GLint LLTexUnit::getTextureSourceType(eTextureBlendSrc src, bool isAlpha)
void LLTexUnit::setTextureCombiner(eTextureBlendOp op, eTextureBlendSrc src1, eTextureBlendSrc src2, bool isAlpha)
{
+ if (LLGLSLShader::sNoFixedFunction)
+ { //register combiners do nothing when not using fixed function
+ return;
+ }
+
if (mIndex < 0) return;
activate();
@@ -793,14 +830,16 @@ LLLightState::LLLightState(S32 index)
mAmbient.set(0,0,0,1);
mPosition.set(0,0,1,0);
mSpotDirection.set(0,0,-1);
-
}
void LLLightState::enable()
{
if (!mEnabled)
{
- glEnable(GL_LIGHT0+mIndex);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glEnable(GL_LIGHT0+mIndex);
+ }
mEnabled = true;
}
}
@@ -809,7 +848,10 @@ void LLLightState::disable()
{
if (mEnabled)
{
- glDisable(GL_LIGHT0+mIndex);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glDisable(GL_LIGHT0+mIndex);
+ }
mEnabled = false;
}
}
@@ -818,8 +860,12 @@ void LLLightState::setDiffuse(const LLColor4& diffuse)
{
if (mDiffuse != diffuse)
{
+ ++gGL.mLightHash;
mDiffuse = diffuse;
- glLightfv(GL_LIGHT0+mIndex, GL_DIFFUSE, mDiffuse.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightfv(GL_LIGHT0+mIndex, GL_DIFFUSE, mDiffuse.mV);
+ }
}
}
@@ -827,8 +873,12 @@ void LLLightState::setAmbient(const LLColor4& ambient)
{
if (mAmbient != ambient)
{
+ ++gGL.mLightHash;
mAmbient = ambient;
- glLightfv(GL_LIGHT0+mIndex, GL_AMBIENT, mAmbient.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightfv(GL_LIGHT0+mIndex, GL_AMBIENT, mAmbient.mV);
+ }
}
}
@@ -836,16 +886,34 @@ void LLLightState::setSpecular(const LLColor4& specular)
{
if (mSpecular != specular)
{
+ ++gGL.mLightHash;
mSpecular = specular;
- glLightfv(GL_LIGHT0+mIndex, GL_SPECULAR, mSpecular.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightfv(GL_LIGHT0+mIndex, GL_SPECULAR, mSpecular.mV);
+ }
}
}
void LLLightState::setPosition(const LLVector4& position)
{
//always set position because modelview matrix may have changed
+ ++gGL.mLightHash;
mPosition = position;
- glLightfv(GL_LIGHT0+mIndex, GL_POSITION, mPosition.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightfv(GL_LIGHT0+mIndex, GL_POSITION, mPosition.mV);
+ }
+ else
+ { //transform position by current modelview matrix
+ glh::vec4f pos(position.mV);
+
+ const glh::matrix4f& mat = gGL.getModelviewMatrix();
+ mat.mult_matrix_vec(pos);
+
+ mPosition.set(pos.v);
+ }
+
}
void LLLightState::setConstantAttenuation(const F32& atten)
@@ -853,7 +921,11 @@ void LLLightState::setConstantAttenuation(const F32& atten)
if (mConstantAtten != atten)
{
mConstantAtten = atten;
- glLightf(GL_LIGHT0+mIndex, GL_CONSTANT_ATTENUATION, atten);
+ ++gGL.mLightHash;
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightf(GL_LIGHT0+mIndex, GL_CONSTANT_ATTENUATION, atten);
+ }
}
}
@@ -861,8 +933,12 @@ void LLLightState::setLinearAttenuation(const F32& atten)
{
if (mLinearAtten != atten)
{
+ ++gGL.mLightHash;
mLinearAtten = atten;
- glLightf(GL_LIGHT0+mIndex, GL_LINEAR_ATTENUATION, atten);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightf(GL_LIGHT0+mIndex, GL_LINEAR_ATTENUATION, atten);
+ }
}
}
@@ -870,8 +946,12 @@ void LLLightState::setQuadraticAttenuation(const F32& atten)
{
if (mQuadraticAtten != atten)
{
+ ++gGL.mLightHash;
mQuadraticAtten = atten;
- glLightf(GL_LIGHT0+mIndex, GL_QUADRATIC_ATTENUATION, atten);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightf(GL_LIGHT0+mIndex, GL_QUADRATIC_ATTENUATION, atten);
+ }
}
}
@@ -879,8 +959,12 @@ void LLLightState::setSpotExponent(const F32& exponent)
{
if (mSpotExponent != exponent)
{
+ ++gGL.mLightHash;
mSpotExponent = exponent;
- glLightf(GL_LIGHT0+mIndex, GL_SPOT_EXPONENT, exponent);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightf(GL_LIGHT0+mIndex, GL_SPOT_EXPONENT, exponent);
+ }
}
}
@@ -888,31 +972,43 @@ void LLLightState::setSpotCutoff(const F32& cutoff)
{
if (mSpotCutoff != cutoff)
{
+ ++gGL.mLightHash;
mSpotCutoff = cutoff;
- glLightf(GL_LIGHT0+mIndex, GL_SPOT_CUTOFF, cutoff);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightf(GL_LIGHT0+mIndex, GL_SPOT_CUTOFF, cutoff);
+ }
}
}
void LLLightState::setSpotDirection(const LLVector3& direction)
{
//always set direction because modelview matrix may have changed
+ ++gGL.mLightHash;
mSpotDirection = direction;
- glLightfv(GL_LIGHT0+mIndex, GL_SPOT_DIRECTION, direction.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightfv(GL_LIGHT0+mIndex, GL_SPOT_DIRECTION, direction.mV);
+ }
+ else
+ { //transform direction by current modelview matrix
+ glh::vec3f dir(direction.mV);
+
+ const glh::matrix4f& mat = gGL.getModelviewMatrix();
+ mat.mult_matrix_dir(dir);
+
+ mSpotDirection.set(direction);
+ }
}
LLRender::LLRender()
: mDirty(false),
mCount(0),
+ mQuadCycle(0),
mMode(LLRender::TRIANGLES),
mCurrTextureUnitIndex(0),
mMaxAnisotropy(0.f)
-{
- mBuffer = new LLVertexBuffer(immediate_mask, 0);
- mBuffer->allocateBuffer(4096, 0, TRUE);
- mBuffer->getVertexStrider(mVerticesp);
- mBuffer->getTexCoord0Strider(mTexcoordsp);
- mBuffer->getColorStrider(mColorsp);
-
+{
mTexUnits.reserve(LL_NUM_TEXTURE_LAYERS);
for (U32 i = 0; i < LL_NUM_TEXTURE_LAYERS; i++)
{
@@ -936,6 +1032,17 @@ LLRender::LLRender()
mCurrBlendAlphaSFactor = BF_UNDEF;
mCurrBlendColorDFactor = BF_UNDEF;
mCurrBlendAlphaDFactor = BF_UNDEF;
+
+ mMatrixMode = LLRender::MM_MODELVIEW;
+
+ for (U32 i = 0; i < NUM_MATRIX_MODES; ++i)
+ {
+ mMatIdx[i] = 0;
+ mMatHash[i] = 0;
+ mCurMatHash[i] = 0xFFFFFFFF;
+ }
+
+ mLightHash = 0;
}
LLRender::~LLRender()
@@ -943,6 +1050,18 @@ LLRender::~LLRender()
shutdown();
}
+void LLRender::init()
+{
+ llassert_always(mBuffer.isNull()) ;
+ stop_glerror();
+ mBuffer = new LLVertexBuffer(immediate_mask, 0);
+ mBuffer->allocateBuffer(4096, 0, TRUE);
+ mBuffer->getVertexStrider(mVerticesp);
+ mBuffer->getTexCoord0Strider(mTexcoordsp);
+ mBuffer->getColorStrider(mColorsp);
+ stop_glerror();
+}
+
void LLRender::shutdown()
{
for (U32 i = 0; i < mTexUnits.size(); i++)
@@ -958,6 +1077,7 @@ void LLRender::shutdown()
delete mLightState[i];
}
mLightState.clear();
+ mBuffer = NULL ;
}
void LLRender::refreshState(void)
@@ -980,28 +1100,348 @@ void LLRender::refreshState(void)
mDirty = false;
}
+void LLRender::syncLightState()
+{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+
+ if (!shader)
+ {
+ return;
+ }
+
+ if (shader->mLightHash != mLightHash)
+ {
+ shader->mLightHash = mLightHash;
+
+ LLVector4 position[8];
+ LLVector3 direction[8];
+ LLVector3 attenuation[8];
+ LLVector3 diffuse[8];
+
+ for (U32 i = 0; i < 8; i++)
+ {
+ LLLightState* light = mLightState[i];
+
+ position[i] = light->mPosition;
+ direction[i] = light->mSpotDirection;
+ attenuation[i].set(light->mLinearAtten, light->mQuadraticAtten, light->mSpecular.mV[3]);
+ diffuse[i].set(light->mDiffuse.mV);
+ }
+
+ shader->uniform4fv(LLShaderMgr::LIGHT_POSITION, 8, position[0].mV);
+ shader->uniform3fv(LLShaderMgr::LIGHT_DIRECTION, 8, direction[0].mV);
+ shader->uniform3fv(LLShaderMgr::LIGHT_ATTENUATION, 8, attenuation[0].mV);
+ shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, 8, diffuse[0].mV);
+ shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV);
+ //HACK -- duplicate sunlight color for compatibility with drivers that can't deal with multiple shader objects referencing the same uniform
+ shader->uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, diffuse[0].mV);
+ }
+}
+
+void LLRender::syncMatrices()
+{
+ stop_glerror();
+
+ U32 name[] =
+ {
+ LLShaderMgr::MODELVIEW_MATRIX,
+ LLShaderMgr::PROJECTION_MATRIX,
+ LLShaderMgr::TEXTURE_MATRIX0,
+ LLShaderMgr::TEXTURE_MATRIX1,
+ LLShaderMgr::TEXTURE_MATRIX2,
+ LLShaderMgr::TEXTURE_MATRIX3,
+ };
+
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+
+ static glh::matrix4f cached_mvp;
+ static U32 cached_mvp_mdv_hash = 0xFFFFFFFF;
+ static U32 cached_mvp_proj_hash = 0xFFFFFFFF;
+
+ static glh::matrix4f cached_normal;
+ static U32 cached_normal_hash = 0xFFFFFFFF;
+
+ if (shader)
+ {
+ llassert(shader);
+
+ bool mvp_done = false;
+
+ U32 i = MM_MODELVIEW;
+ if (mMatHash[i] != shader->mMatHash[i])
+ { //update modelview, normal, and MVP
+ glh::matrix4f& mat = mMatrix[i][mMatIdx[i]];
+
+ shader->uniformMatrix4fv(name[i], 1, GL_FALSE, mat.m);
+ shader->mMatHash[i] = mMatHash[i];
+
+ //update normal matrix
+ S32 loc = shader->getUniformLocation(LLShaderMgr::NORMAL_MATRIX);
+ if (loc > -1)
+ {
+ if (cached_normal_hash != mMatHash[i])
+ {
+ cached_normal = mat.inverse().transpose();
+ cached_normal_hash = mMatHash[i];
+ }
+
+ glh::matrix4f& norm = cached_normal;
+
+ F32 norm_mat[] =
+ {
+ norm.m[0], norm.m[1], norm.m[2],
+ norm.m[4], norm.m[5], norm.m[6],
+ norm.m[8], norm.m[9], norm.m[10]
+ };
+
+ shader->uniformMatrix3fv(LLShaderMgr::NORMAL_MATRIX, 1, GL_FALSE, norm_mat);
+ }
+
+ //update MVP matrix
+ mvp_done = true;
+ loc = shader->getUniformLocation(LLShaderMgr::MODELVIEW_PROJECTION_MATRIX);
+ if (loc > -1)
+ {
+ U32 proj = MM_PROJECTION;
+
+ if (cached_mvp_mdv_hash != mMatHash[i] || cached_mvp_proj_hash != mMatHash[MM_PROJECTION])
+ {
+ cached_mvp = mat;
+ cached_mvp.mult_left(mMatrix[proj][mMatIdx[proj]]);
+ cached_mvp_mdv_hash = mMatHash[i];
+ cached_mvp_proj_hash = mMatHash[MM_PROJECTION];
+ }
+
+ shader->uniformMatrix4fv(LLShaderMgr::MODELVIEW_PROJECTION_MATRIX, 1, GL_FALSE, cached_mvp.m);
+ }
+ }
+
+
+ i = MM_PROJECTION;
+ if (mMatHash[i] != shader->mMatHash[i])
+ { //update projection matrix, normal, and MVP
+ glh::matrix4f& mat = mMatrix[i][mMatIdx[i]];
+
+ shader->uniformMatrix4fv(name[i], 1, GL_FALSE, mat.m);
+ shader->mMatHash[i] = mMatHash[i];
+
+ if (!mvp_done)
+ {
+ //update MVP matrix
+ S32 loc = shader->getUniformLocation(LLShaderMgr::MODELVIEW_PROJECTION_MATRIX);
+ if (loc > -1)
+ {
+ if (cached_mvp_mdv_hash != mMatHash[i] || cached_mvp_proj_hash != mMatHash[MM_PROJECTION])
+ {
+ U32 mdv = MM_MODELVIEW;
+ cached_mvp = mat;
+ cached_mvp.mult_right(mMatrix[mdv][mMatIdx[mdv]]);
+ cached_mvp_mdv_hash = mMatHash[MM_MODELVIEW];
+ cached_mvp_proj_hash = mMatHash[MM_PROJECTION];
+ }
+
+ shader->uniformMatrix4fv(LLShaderMgr::MODELVIEW_PROJECTION_MATRIX, 1, GL_FALSE, cached_mvp.m);
+ }
+ }
+ }
+
+ for (i = MM_TEXTURE0; i < NUM_MATRIX_MODES; ++i)
+ {
+ if (mMatHash[i] != shader->mMatHash[i])
+ {
+ shader->uniformMatrix4fv(name[i], 1, GL_FALSE, mMatrix[i][mMatIdx[i]].m);
+ shader->mMatHash[i] = mMatHash[i];
+ }
+ }
+
+
+ if (shader->mFeatures.hasLighting || shader->mFeatures.calculatesLighting)
+ { //also sync light state
+ syncLightState();
+ }
+ }
+ else if (!LLGLSLShader::sNoFixedFunction)
+ {
+ GLenum mode[] =
+ {
+ GL_MODELVIEW,
+ GL_PROJECTION,
+ GL_TEXTURE,
+ GL_TEXTURE,
+ GL_TEXTURE,
+ GL_TEXTURE,
+ };
+
+ for (U32 i = 0; i < 2; ++i)
+ {
+ if (mMatHash[i] != mCurMatHash[i])
+ {
+ glMatrixMode(mode[i]);
+ glLoadMatrixf(mMatrix[i][mMatIdx[i]].m);
+ mCurMatHash[i] = mMatHash[i];
+ }
+ }
+
+ for (U32 i = 2; i < NUM_MATRIX_MODES; ++i)
+ {
+ if (mMatHash[i] != mCurMatHash[i])
+ {
+ gGL.getTexUnit(i-2)->activate();
+ glMatrixMode(mode[i]);
+ glLoadMatrixf(mMatrix[i][mMatIdx[i]].m);
+ mCurMatHash[i] = mMatHash[i];
+ }
+ }
+ }
+
+ stop_glerror();
+}
+
void LLRender::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z)
{
flush();
- glTranslatef(x,y,z);
+
+ {
+ glh::matrix4f trans_mat(1,0,0,x,
+ 0,1,0,y,
+ 0,0,1,z,
+ 0,0,0,1);
+
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].mult_right(trans_mat);
+ mMatHash[mMatrixMode]++;
+ }
}
void LLRender::scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z)
{
flush();
- glScalef(x,y,z);
+
+ {
+ glh::matrix4f scale_mat(x,0,0,0,
+ 0,y,0,0,
+ 0,0,z,0,
+ 0,0,0,1);
+
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].mult_right(scale_mat);
+ mMatHash[mMatrixMode]++;
+ }
+}
+
+void LLRender::ortho(F32 left, F32 right, F32 bottom, F32 top, F32 zNear, F32 zFar)
+{
+ flush();
+
+ {
+
+ glh::matrix4f ortho_mat(2.f/(right-left),0,0, -(right+left)/(right-left),
+ 0,2.f/(top-bottom),0, -(top+bottom)/(top-bottom),
+ 0,0,-2.f/(zFar-zNear), -(zFar+zNear)/(zFar-zNear),
+ 0,0,0,1);
+
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].mult_right(ortho_mat);
+ mMatHash[mMatrixMode]++;
+ }
+}
+
+void LLRender::rotatef(const GLfloat& a, const GLfloat& x, const GLfloat& y, const GLfloat& z)
+{
+ flush();
+
+ {
+ F32 r = a * DEG_TO_RAD;
+
+ F32 c = cosf(r);
+ F32 s = sinf(r);
+
+ F32 ic = 1.f-c;
+
+ glh::matrix4f rot_mat(x*x*ic+c, x*y*ic-z*s, x*z*ic+y*s, 0,
+ x*y*ic+z*s, y*y*ic+c, y*z*ic-x*s, 0,
+ x*z*ic-y*s, y*z*ic+x*s, z*z*ic+c, 0,
+ 0,0,0,1);
+
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].mult_right(rot_mat);
+ mMatHash[mMatrixMode]++;
+ }
}
void LLRender::pushMatrix()
{
flush();
- glPushMatrix();
+
+ {
+ if (mMatIdx[mMatrixMode] < LL_MATRIX_STACK_DEPTH-1)
+ {
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]+1] = mMatrix[mMatrixMode][mMatIdx[mMatrixMode]];
+ ++mMatIdx[mMatrixMode];
+ }
+ else
+ {
+ llwarns << "Matrix stack overflow." << llendl;
+ }
+ }
}
void LLRender::popMatrix()
{
flush();
- glPopMatrix();
+ {
+ if (mMatIdx[mMatrixMode] > 0)
+ {
+ --mMatIdx[mMatrixMode];
+ mMatHash[mMatrixMode]++;
+ }
+ else
+ {
+ llwarns << "Matrix stack underflow." << llendl;
+ }
+ }
+}
+
+void LLRender::loadMatrix(const GLfloat* m)
+{
+ flush();
+ {
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].set_value((GLfloat*) m);
+ mMatHash[mMatrixMode]++;
+ }
+}
+
+void LLRender::multMatrix(const GLfloat* m)
+{
+ flush();
+ {
+ glh::matrix4f mat((GLfloat*) m);
+
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].mult_right(mat);
+ mMatHash[mMatrixMode]++;
+ }
+}
+
+void LLRender::matrixMode(U32 mode)
+{
+ if (mode == MM_TEXTURE)
+ {
+ mode = MM_TEXTURE0 + gGL.getCurrentTexUnitIndex();
+ }
+
+ llassert(mode < NUM_MATRIX_MODES);
+ mMatrixMode = mode;
+}
+
+void LLRender::loadIdentity()
+{
+ flush();
+
+ {
+ mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].make_identity();
+ mMatHash[mMatrixMode]++;
+ }
+}
+
+const glh::matrix4f& LLRender::getModelviewMatrix()
+{
+ return mMatrix[MM_MODELVIEW][mMatIdx[MM_MODELVIEW]];
}
void LLRender::translateUI(F32 x, F32 y, F32 z)
@@ -1147,6 +1587,11 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
{
flush();
+ if (LLGLSLShader::sNoFixedFunction)
+ { //glAlphaFunc is deprecated in OpenGL 3.3
+ return;
+ }
+
if (mCurrAlphaFunc != func ||
mCurrAlphaFuncVal != value)
{
@@ -1161,6 +1606,30 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
glAlphaFunc(sGLCompareFunc[func], value);
}
}
+
+ if (gDebugGL)
+ { //make sure cached state is correct
+ GLint cur_func = 0;
+ glGetIntegerv(GL_ALPHA_TEST_FUNC, &cur_func);
+
+ if (func == CF_DEFAULT)
+ {
+ func = CF_GREATER;
+ }
+
+ if (cur_func != sGLCompareFunc[func])
+ {
+ llerrs << "Alpha test function corrupted!" << llendl;
+ }
+
+ F32 ref = 0.f;
+ glGetFloatv(GL_ALPHA_TEST_REF, &ref);
+
+ if (ref != value)
+ {
+ llerrs << "Alpha test value corrupted!" << llendl;
+ }
+ }
}
void LLRender::blendFunc(eBlendFactor sfactor, eBlendFactor dfactor)
@@ -1228,6 +1697,19 @@ LLLightState* LLRender::getLight(U32 index)
return NULL;
}
+void LLRender::setAmbientLightColor(const LLColor4& color)
+{
+ if (color != mAmbientLightColor)
+ {
+ ++mLightHash;
+ mAmbientLightColor = color;
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightModelfv(GL_LIGHT_MODEL_AMBIENT, color.mV);
+ }
+ }
+}
+
bool LLRender::verifyTexUnitActive(U32 unitToVerify)
{
if (mCurrTextureUnitIndex == unitToVerify)
@@ -1253,6 +1735,11 @@ void LLRender::begin(const GLuint& mode)
{
if (mode != mMode)
{
+ if (mode == LLRender::QUADS)
+ {
+ mQuadCycle = 1;
+ }
+
if (mMode == LLRender::QUADS ||
mMode == LLRender::LINES ||
mMode == LLRender::TRIANGLES ||
@@ -1340,7 +1827,7 @@ void LLRender::flush()
if (gDebugGL)
{
- if (mMode == LLRender::QUADS)
+ if (mMode == LLRender::QUADS && !sGLCoreProfile)
{
if (mCount%4 != 0)
{
@@ -1365,12 +1852,34 @@ void LLRender::flush()
}
}
+ //store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
+ U32 count = mCount;
+ mCount = 0;
+
+ if (mBuffer->useVBOs() && !mBuffer->isLocked())
+ { //hack to only flush the part of the buffer that was updated (relies on stream draw using buffersubdata)
+ mBuffer->getVertexStrider(mVerticesp, 0, count);
+ mBuffer->getTexCoord0Strider(mTexcoordsp, 0, count);
+ mBuffer->getColorStrider(mColorsp, 0, count);
+ }
+
+ mBuffer->flush();
mBuffer->setBuffer(immediate_mask);
- mBuffer->drawArrays(mMode, 0, mCount);
+
+ if (mMode == LLRender::QUADS && sGLCoreProfile)
+ {
+ mBuffer->drawArrays(LLRender::TRIANGLES, 0, count);
+ mQuadCycle = 1;
+ }
+ else
+ {
+ mBuffer->drawArrays(mMode, 0, count);
+ }
+
+ mVerticesp[0] = mVerticesp[count];
+ mTexcoordsp[0] = mTexcoordsp[count];
+ mColorsp[0] = mColorsp[count];
- mVerticesp[0] = mVerticesp[mCount];
- mTexcoordsp[0] = mTexcoordsp[mCount];
- mColorsp[0] = mColorsp[mCount];
mCount = 0;
}
}
@@ -1378,6 +1887,17 @@ void LLRender::flush()
void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
{
//the range of mVerticesp, mColorsp and mTexcoordsp is [0, 4095]
+ if (mCount > 2048)
+ { //break when buffer gets reasonably full to keep GL command buffers happy and avoid overflow below
+ switch (mMode)
+ {
+ case LLRender::POINTS: flush(); break;
+ case LLRender::TRIANGLES: if (mCount%3==0) flush(); break;
+ case LLRender::QUADS: if(mCount%4 == 0) flush(); break;
+ case LLRender::LINES: if (mCount%2 == 0) flush(); break;
+ }
+ }
+
if (mCount > 4094)
{
// llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl;
@@ -1394,10 +1914,29 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
mVerticesp[mCount] = vert;
}
+ if (mMode == LLRender::QUADS && LLRender::sGLCoreProfile)
+ {
+ mQuadCycle++;
+ if (mQuadCycle == 4)
+ { //copy two vertices so fourth quad element will add a triangle
+ mQuadCycle = 0;
+
+ mCount++;
+ mVerticesp[mCount] = mVerticesp[mCount-3];
+ mColorsp[mCount] = mColorsp[mCount-3];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-3];
+
+ mCount++;
+ mVerticesp[mCount] = mVerticesp[mCount-2];
+ mColorsp[mCount] = mColorsp[mCount-2];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-2];
+ }
+ }
+
mCount++;
mVerticesp[mCount] = mVerticesp[mCount-1];
mColorsp[mCount] = mColorsp[mCount-1];
- mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
}
void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
@@ -1408,13 +1947,50 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
return;
}
- for (S32 i = 0; i < vert_count; i++)
+ if (sGLCoreProfile && mMode == LLRender::QUADS)
+ { //quads are deprecated, convert to triangle list
+ S32 i = 0;
+
+ while (i < vert_count)
+ {
+ //read first three
+ mVerticesp[mCount++] = verts[i++];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ mVerticesp[mCount++] = verts[i++];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ mVerticesp[mCount++] = verts[i++];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ //copy two
+ mVerticesp[mCount++] = verts[i-3];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ mVerticesp[mCount++] = verts[i-1];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ //copy last one
+ mVerticesp[mCount++] = verts[i++];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+ }
+ }
+ else
{
- mVerticesp[mCount] = verts[i];
+ for (S32 i = 0; i < vert_count; i++)
+ {
+ mVerticesp[mCount] = verts[i];
- mCount++;
- mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
- mColorsp[mCount] = mColorsp[mCount-1];
+ mCount++;
+ mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+ }
}
mVerticesp[mCount] = mVerticesp[mCount-1];
@@ -1428,13 +2004,50 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v
return;
}
- for (S32 i = 0; i < vert_count; i++)
+ if (sGLCoreProfile && mMode == LLRender::QUADS)
+ { //quads are deprecated, convert to triangle list
+ S32 i = 0;
+
+ while (i < vert_count)
+ {
+ //read first three
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount++] = uvs[i++];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount++] = uvs[i++];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount++] = uvs[i++];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ //copy last two
+ mVerticesp[mCount] = verts[i-3];
+ mTexcoordsp[mCount++] = uvs[i-3];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ mVerticesp[mCount] = verts[i-1];
+ mTexcoordsp[mCount++] = uvs[i-1];
+ mColorsp[mCount] = mColorsp[mCount-1];
+
+ //copy last one
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount++] = uvs[i++];
+ mColorsp[mCount] = mColorsp[mCount-1];
+ }
+ }
+ else
{
- mVerticesp[mCount] = verts[i];
- mTexcoordsp[mCount] = uvs[i];
+ for (S32 i = 0; i < vert_count; i++)
+ {
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount] = uvs[i];
- mCount++;
- mColorsp[mCount] = mColorsp[mCount-1];
+ mCount++;
+ mColorsp[mCount] = mColorsp[mCount-1];
+ }
}
mVerticesp[mCount] = mVerticesp[mCount-1];
@@ -1449,13 +2062,51 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLCol
return;
}
- for (S32 i = 0; i < vert_count; i++)
+
+ if (sGLCoreProfile && mMode == LLRender::QUADS)
+ { //quads are deprecated, convert to triangle list
+ S32 i = 0;
+
+ while (i < vert_count)
+ {
+ //read first three
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount] = uvs[i];
+ mColorsp[mCount++] = colors[i++];
+
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount] = uvs[i];
+ mColorsp[mCount++] = colors[i++];
+
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount] = uvs[i];
+ mColorsp[mCount++] = colors[i++];
+
+ //copy last two
+ mVerticesp[mCount] = verts[i-3];
+ mTexcoordsp[mCount] = uvs[i-3];
+ mColorsp[mCount++] = colors[i-3];
+
+ mVerticesp[mCount] = verts[i-1];
+ mTexcoordsp[mCount] = uvs[i-1];
+ mColorsp[mCount++] = colors[i-1];
+
+ //copy last one
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount] = uvs[i];
+ mColorsp[mCount++] = colors[i++];
+ }
+ }
+ else
{
- mVerticesp[mCount] = verts[i];
- mTexcoordsp[mCount] = uvs[i];
- mColorsp[mCount] = colors[i];
+ for (S32 i = 0; i < vert_count; i++)
+ {
+ mVerticesp[mCount] = verts[i];
+ mTexcoordsp[mCount] = uvs[i];
+ mColorsp[mCount] = colors[i];
- mCount++;
+ mCount++;
+ }
}
mVerticesp[mCount] = mVerticesp[mCount-1];
@@ -1530,6 +2181,81 @@ void LLRender::color3fv(const GLfloat* c)
color4f(c[0],c[1],c[2],1);
}
+void LLRender::diffuseColor3f(F32 r, F32 g, F32 b)
+{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(!LLGLSLShader::sNoFixedFunction || shader != NULL);
+
+ if (shader)
+ {
+ shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, r,g,b,1.f);
+ }
+ else
+ {
+ glColor3f(r,g,b);
+ }
+}
+
+void LLRender::diffuseColor3fv(const F32* c)
+{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(!LLGLSLShader::sNoFixedFunction || shader != NULL);
+
+ if (shader)
+ {
+ shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, c[0], c[1], c[2], 1.f);
+ }
+ else
+ {
+ glColor3fv(c);
+ }
+}
+
+void LLRender::diffuseColor4f(F32 r, F32 g, F32 b, F32 a)
+{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(!LLGLSLShader::sNoFixedFunction || shader != NULL);
+
+ if (shader)
+ {
+ shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, r,g,b,a);
+ }
+ else
+ {
+ glColor4f(r,g,b,a);
+ }
+}
+
+void LLRender::diffuseColor4fv(const F32* c)
+{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(!LLGLSLShader::sNoFixedFunction || shader != NULL);
+
+ if (shader)
+ {
+ shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, c);
+ }
+ else
+ {
+ glColor4fv(c);
+ }
+}
+
+void LLRender::diffuseColor4ubv(const U8* c)
+{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(!LLGLSLShader::sNoFixedFunction || shader != NULL);
+
+ if (shader)
+ {
+ shader->uniform4f(LLShaderMgr::DIFFUSE_COLOR, c[0]/255.f, c[1]/255.f, c[2]/255.f, c[3]/255.f);
+ }
+ else
+ {
+ glColor4ubv(c);
+ }
+}
+
void LLRender::debugTexUnits(void)
{
LL_INFOS("TextureUnit") << "Active TexUnit: " << mCurrTextureUnitIndex << LL_ENDL;
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 41e7b35341..7581b9f908 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -41,6 +41,8 @@
#include "llstrider.h"
#include "llpointer.h"
#include "llglheaders.h"
+#include "llmatrix4a.h"
+#include "glh/glh_linear.h"
class LLVertexBuffer;
class LLCubeMap;
@@ -48,10 +50,14 @@ class LLImageGL;
class LLRenderTarget;
class LLTexture ;
+#define LL_MATRIX_STACK_DEPTH 32
+
class LLTexUnit
{
friend class LLRender;
public:
+ static U32 sWhiteTexture;
+
typedef enum
{
TT_TEXTURE = 0, // Standard 2D Texture
@@ -233,6 +239,8 @@ public:
void setSpotDirection(const LLVector3& direction);
protected:
+ friend class LLRender;
+
S32 mIndex;
bool mEnabled;
LLColor4 mDiffuse;
@@ -306,8 +314,21 @@ public:
BF_UNDEF
} eBlendFactor;
+ typedef enum
+ {
+ MM_MODELVIEW = 0,
+ MM_PROJECTION,
+ MM_TEXTURE0,
+ MM_TEXTURE1,
+ MM_TEXTURE2,
+ MM_TEXTURE3,
+ NUM_MATRIX_MODES,
+ MM_TEXTURE
+ } eMatrixMode;
+
LLRender();
~LLRender();
+ void init() ;
void shutdown();
// Refreshes renderer state to the cached values
@@ -316,8 +337,20 @@ public:
void translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z);
void scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z);
+ void rotatef(const GLfloat& a, const GLfloat& x, const GLfloat& y, const GLfloat& z);
+ void ortho(F32 left, F32 right, F32 bottom, F32 top, F32 zNear, F32 zFar);
+
void pushMatrix();
void popMatrix();
+ void loadMatrix(const GLfloat* m);
+ void loadIdentity();
+ void multMatrix(const GLfloat* m);
+ void matrixMode(U32 mode);
+
+ const glh::matrix4f& getModelviewMatrix();
+
+ void syncMatrices();
+ void syncLightState();
void translateUI(F32 x, F32 y, F32 z);
void scaleUI(F32 x, F32 y, F32 z);
@@ -348,6 +381,12 @@ public:
void color3fv(const GLfloat* c);
void color4ubv(const GLubyte* c);
+ void diffuseColor3f(F32 r, F32 g, F32 b);
+ void diffuseColor3fv(const F32* c);
+ void diffuseColor4f(F32 r, F32 g, F32 b, F32 a);
+ void diffuseColor4fv(const F32* c);
+ void diffuseColor4ubv(const U8* c);
+
void vertexBatchPreTransformed(LLVector3* verts, S32 vert_count);
void vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 vert_count);
void vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLColor4U*, S32 vert_count);
@@ -365,7 +404,8 @@ public:
eBlendFactor alpha_sfactor, eBlendFactor alpha_dfactor);
LLLightState* getLight(U32 index);
-
+ void setAmbientLightColor(const LLColor4& color);
+
LLTexUnit* getTexUnit(U32 index);
U32 getCurrentTexUnitIndex(void) const { return mCurrTextureUnitIndex; }
@@ -386,9 +426,21 @@ public:
public:
static U32 sUICalls;
static U32 sUIVerts;
+ static bool sGLCoreProfile;
private:
- bool mDirty;
+ friend class LLLightState;
+
+ U32 mMatrixMode;
+ U32 mMatIdx[NUM_MATRIX_MODES];
+ U32 mMatHash[NUM_MATRIX_MODES];
+ glh::matrix4f mMatrix[NUM_MATRIX_MODES][LL_MATRIX_STACK_DEPTH];
+ U32 mCurMatHash[NUM_MATRIX_MODES];
+ U32 mLightHash;
+ LLColor4 mAmbientLightColor;
+
+ bool mDirty;
+ U32 mQuadCycle;
U32 mCount;
U32 mMode;
U32 mCurrTextureUnitIndex;
@@ -416,10 +468,10 @@ private:
};
-extern F64 gGLModelView[16];
-extern F64 gGLLastModelView[16];
-extern F64 gGLLastProjection[16];
-extern F64 gGLProjection[16];
+extern F32 gGLModelView[16];
+extern F32 gGLLastModelView[16];
+extern F32 gGLLastProjection[16];
+extern F32 gGLProjection[16];
extern S32 gGLViewport[4];
extern LLRender gGL;
diff --git a/indra/llrender/llrendersphere.cpp b/indra/llrender/llrendersphere.cpp
index a5cd70445f..26bfe036e8 100644
--- a/indra/llrender/llrendersphere.cpp
+++ b/indra/llrender/llrendersphere.cpp
@@ -35,106 +35,12 @@
#include "llglheaders.h"
-GLUquadricObj *gQuadObj2 = NULL;
LLRenderSphere gSphere;
-void drawSolidSphere(GLdouble radius, GLint slices, GLint stacks);
-
-void drawSolidSphere(GLdouble radius, GLint slices, GLint stacks)
-{
- if (!gQuadObj2)
- {
- gQuadObj2 = gluNewQuadric();
- if (!gQuadObj2)
- {
- llwarns << "drawSolidSphere couldn't allocate quadric" << llendl;
- return;
- }
- }
-
- gluQuadricDrawStyle(gQuadObj2, GLU_FILL);
- gluQuadricNormals(gQuadObj2, GLU_SMOOTH);
- // If we ever changed/used the texture or orientation state
- // of quadObj, we'd need to change it to the defaults here
- // with gluQuadricTexture and/or gluQuadricOrientation.
- gluQuadricTexture(gQuadObj2, GL_TRUE);
- gluSphere(gQuadObj2, radius, slices, stacks);
-}
-
-
-// A couple thoughts on sphere drawing:
-// 1) You need more slices than stacks, but little less than 2:1
-// 2) At low LOD, setting stacks to an odd number avoids a "band" around the equator, making things look smoother
-void LLRenderSphere::prerender()
-{
- // Create a series of display lists for different LODs
- mDList[0] = glGenLists(1);
- glNewList(mDList[0], GL_COMPILE);
- drawSolidSphere(1.0, 30, 20);
- glEndList();
-
- mDList[1] = glGenLists(1);
- glNewList(mDList[1], GL_COMPILE);
- drawSolidSphere(1.0, 20, 15);
- glEndList();
-
- mDList[2] = glGenLists(1);
- glNewList(mDList[2], GL_COMPILE);
- drawSolidSphere(1.0, 12, 8);
- glEndList();
-
- mDList[3] = glGenLists(1);
- glNewList(mDList[3], GL_COMPILE);
- drawSolidSphere(1.0, 8, 5);
- glEndList();
-}
-
-void LLRenderSphere::cleanupGL()
-{
- for (S32 detail = 0; detail < 4; detail++)
- {
- glDeleteLists(mDList[detail], 1);
- mDList[detail] = 0;
- }
-
- if (gQuadObj2)
- {
- gluDeleteQuadric(gQuadObj2);
- gQuadObj2 = NULL;
- }
-}
-
-// Constants here are empirically derived from my eyeballs, JNC
-//
-// The toughest adjustment is the cutoff for the lowest LOD
-// Maybe we should have more LODs at the low end?
-void LLRenderSphere::render(F32 pixel_area)
-{
- S32 level_of_detail;
-
- if (pixel_area > 10000.f)
- {
- level_of_detail = 0;
- }
- else if (pixel_area > 800.f)
- {
- level_of_detail = 1;
- }
- else if (pixel_area > 100.f)
- {
- level_of_detail = 2;
- }
- else
- {
- level_of_detail = 3;
- }
- glCallList(mDList[level_of_detail]);
-}
-
-
void LLRenderSphere::render()
{
- glCallList(mDList[0]);
+ renderGGL();
+ gGL.flush();
}
inline LLVector3 polar_to_cart(F32 latitude, F32 longitude)
diff --git a/indra/llrender/llrendersphere.h b/indra/llrender/llrendersphere.h
index 96a6bec80c..f8e9e86e7f 100644
--- a/indra/llrender/llrendersphere.h
+++ b/indra/llrender/llrendersphere.h
@@ -40,11 +40,6 @@ void lat2xyz(LLVector3 * result, F32 lat, F32 lon); // utility routine
class LLRenderSphere
{
public:
- LLGLuint mDList[5];
-
- void prerender();
- void cleanupGL();
- void render(F32 pixel_area); // of a box of size 1.0 at that position
void render(); // render at highest LOD
void renderGGL(); // render using LLRender
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index b6463309e1..1aa12614ea 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -31,8 +31,7 @@
#include "llgl.h"
LLRenderTarget* LLRenderTarget::sBoundTarget = NULL;
-
-
+U32 LLRenderTarget::sBytesAllocated = 0;
void check_framebuffer_status()
{
@@ -62,8 +61,7 @@ LLRenderTarget::LLRenderTarget() :
mStencil(0),
mUseDepth(false),
mRenderDepth(false),
- mUsage(LLTexUnit::TT_TEXTURE),
- mSamples(0)
+ mUsage(LLTexUnit::TT_TEXTURE)
{
}
@@ -72,11 +70,11 @@ LLRenderTarget::~LLRenderTarget()
release();
}
-void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)
+bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)
{
stop_glerror();
-
release();
+ stop_glerror();
mResX = resx;
mResY = resy;
@@ -84,28 +82,16 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo
mStencil = stencil;
mUsage = usage;
mUseDepth = depth;
- mSamples = samples;
-
- mSamples = gGLManager.getNumFBOFSAASamples(mSamples);
-
- if (mSamples > 1 && gGLManager.mHasTextureMultisample)
- {
- mUsage = LLTexUnit::TT_MULTISAMPLE_TEXTURE;
- //no support for multisampled stencil targets yet
- mStencil = false;
- }
- else
- {
- mSamples = 0;
- }
if ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject)
{
if (depth)
{
- stop_glerror();
- allocateDepth();
- stop_glerror();
+ if (!allocateDepth())
+ {
+ llwarns << "Failed to allocate depth buffer for render target." << llendl;
+ return false;
+ }
}
glGenFramebuffers(1, (GLuint *) &mFBO);
@@ -131,14 +117,14 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo
stop_glerror();
}
- addColorAttachment(color_fmt);
+ return addColorAttachment(color_fmt);
}
-void LLRenderTarget::addColorAttachment(U32 color_fmt)
+bool LLRenderTarget::addColorAttachment(U32 color_fmt)
{
if (color_fmt == 0)
{
- return;
+ return true;
}
U32 offset = mTex.size();
@@ -155,45 +141,42 @@ void LLRenderTarget::addColorAttachment(U32 color_fmt)
stop_glerror();
-#ifdef GL_ARB_texture_multisample
- if (mSamples > 1)
- {
- glTexImage2DMultisample(LLTexUnit::getInternalType(mUsage), mSamples, color_fmt, mResX, mResY, GL_TRUE);
- }
- else
-#else
- llassert_always(mSamples <= 1);
-#endif
{
+ clear_glerror();
LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ if (glGetError() != GL_NO_ERROR)
+ {
+ llwarns << "Could not allocate color buffer for render target." << llendl;
+ return false;
+ }
}
+ sBytesAllocated += mResX*mResY*4;
+
stop_glerror();
- if (mSamples == 0)
- {
- if (offset == 0)
- { //use bilinear filtering on single texture render targets that aren't multisampled
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- stop_glerror();
- }
- else
- { //don't filter data attachments
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- stop_glerror();
- }
+
+ if (offset == 0)
+ { //use bilinear filtering on single texture render targets that aren't multisampled
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+ stop_glerror();
+ }
+ else
+ { //don't filter data attachments
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
+ stop_glerror();
+ }
- if (mUsage != LLTexUnit::TT_RECT_TEXTURE)
- {
- gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR);
- stop_glerror();
- }
- else
- {
- // ATI doesn't support mirrored repeat for rectangular textures.
- gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
- stop_glerror();
- }
+ if (mUsage != LLTexUnit::TT_RECT_TEXTURE)
+ {
+ gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR);
+ stop_glerror();
+ }
+ else
+ {
+ // ATI doesn't support mirrored repeat for rectangular textures.
+ gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
+ stop_glerror();
}
if (mFBO)
@@ -217,15 +200,18 @@ void LLRenderTarget::addColorAttachment(U32 color_fmt)
flush();
}
+ return true;
}
-void LLRenderTarget::allocateDepth()
+bool LLRenderTarget::allocateDepth()
{
if (mStencil)
{
//use render buffers where stencil buffers are in play
glGenRenderbuffers(1, (GLuint *) &mDepth);
glBindRenderbuffer(GL_RENDERBUFFER, mDepth);
+ stop_glerror();
+ clear_glerror();
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, mResX, mResY);
glBindRenderbuffer(GL_RENDERBUFFER, 0);
}
@@ -233,21 +219,23 @@ void LLRenderTarget::allocateDepth()
{
LLImageGL::generateTextures(1, &mDepth);
gGL.getTexUnit(0)->bindManual(mUsage, mDepth);
- if (mSamples == 0)
- {
- U32 internal_type = LLTexUnit::getInternalType(mUsage);
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT32, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
- }
-#ifdef GL_ARB_texture_multisample
- else
- {
- glTexImage2DMultisample(LLTexUnit::getInternalType(mUsage), mSamples, GL_DEPTH_COMPONENT32, mResX, mResY, GL_TRUE);
- }
-#else
- llassert_always(mSamples <= 1);
-#endif
+
+ U32 internal_type = LLTexUnit::getInternalType(mUsage);
+ stop_glerror();
+ clear_glerror();
+ LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
+ gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
+
+ sBytesAllocated += mResX*mResY*4;
+
+ if (glGetError() != GL_NO_ERROR)
+ {
+ llwarns << "Unable to allocate depth buffer for render target." << llendl;
+ return false;
+ }
+
+ return true;
}
void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target)
@@ -310,14 +298,16 @@ void LLRenderTarget::release()
stop_glerror();
}
mDepth = 0;
+
+ sBytesAllocated -= mResX*mResY*4;
}
else if (mUseDepth && mFBO)
{ //detach shared depth buffer
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
if (mStencil)
{ //attached as a renderbuffer
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0);
mStencil = false;
}
else
@@ -335,6 +325,7 @@ void LLRenderTarget::release()
if (mTex.size() > 0)
{
+ sBytesAllocated -= mResX*mResY*4*mTex.size();
LLImageGL::deleteTextures(mTex.size(), &mTex[0], true);
mTex.clear();
}
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index 094b58b562..2735ab21c5 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -64,32 +64,33 @@ class LLRenderTarget
public:
//whether or not to use FBO implementation
static bool sUseFBO;
+ static U32 sBytesAllocated;
LLRenderTarget();
- virtual ~LLRenderTarget();
+ ~LLRenderTarget();
//allocate resources for rendering
//must be called before use
//multiple calls will release previously allocated resources
- void allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = false, S32 samples = 0);
+ bool allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = false, S32 samples = 0);
//add color buffer attachment
//limit of 4 color attachments per render target
- virtual void addColorAttachment(U32 color_fmt);
+ bool addColorAttachment(U32 color_fmt);
//allocate a depth texture
- virtual void allocateDepth();
+ bool allocateDepth();
//share depth buffer with provided render target
- virtual void shareDepthBuffer(LLRenderTarget& target);
+ void shareDepthBuffer(LLRenderTarget& target);
//free any allocated resources
//safe to call redundantly
- virtual void release();
+ void release();
//bind target for rendering
//applies appropriate viewport
- virtual void bindTarget();
+ void bindTarget();
//unbind target for rendering
static void unbindTarget();
@@ -147,7 +148,6 @@ protected:
bool mUseDepth;
bool mRenderDepth;
LLTexUnit::eTextureType mUsage;
- U32 mSamples;
static LLRenderTarget* sBoundTarget;
};
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 751b250d96..eea768a3ea 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -81,7 +81,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
// NOTE order of shader object attaching is VERY IMPORTANT!!!
if (features->calculatesAtmospherics)
{
- if (!shader->attachObject("windlight/atmosphericsVarsV.glsl"))
+ if (features->hasWaterFog)
+ {
+ if (!shader->attachObject("windlight/atmosphericsVarsWaterV.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else if (!shader->attachObject("windlight/atmosphericsVarsV.glsl"))
{
return FALSE;
}
@@ -161,7 +168,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if(features->calculatesAtmospherics)
{
- if (!shader->attachObject("windlight/atmosphericsVarsF.glsl"))
+ if (features->hasWaterFog)
+ {
+ if (!shader->attachObject("windlight/atmosphericsVarsWaterF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else if (!shader->attachObject("windlight/atmosphericsVarsF.glsl"))
{
return FALSE;
}
@@ -206,23 +220,42 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if (features->hasLighting)
{
-
if (features->hasWaterFog)
{
if (features->disableTextureIndex)
{
- if (!shader->attachObject("lighting/lightWaterNonIndexedF.glsl"))
+ if (features->hasAlphaMask)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightWaterAlphaMaskNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightWaterNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
}
}
else
{
- if (!shader->attachObject("lighting/lightWaterF.glsl"))
+ if (features->hasAlphaMask)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightWaterAlphaMaskF.glsl"))
+ {
+ return FALSE;
+ }
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ else
+ {
+ if (!shader->attachObject("lighting/lightWaterF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
@@ -230,18 +263,38 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (features->disableTextureIndex)
{
- if (!shader->attachObject("lighting/lightNonIndexedF.glsl"))
+ if (features->hasAlphaMask)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
}
}
else
{
- if (!shader->attachObject("lighting/lightF.glsl"))
+ if (features->hasAlphaMask)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightAlphaMaskF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightF.glsl"))
+ {
+ return FALSE;
+ }
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
}
@@ -265,25 +318,39 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
return FALSE;
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
else if (features->hasWaterFog)
{
if (features->disableTextureIndex)
{
- if (!shader->attachObject("lighting/lightFullbrightWaterNonIndexedF.glsl"))
+ if (features->hasAlphaMask)
+ {
+ if (!shader->attachObject("lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else if (!shader->attachObject("lighting/lightFullbrightWaterNonIndexedF.glsl"))
{
return FALSE;
}
}
else
{
- if (!shader->attachObject("lighting/lightFullbrightWaterF.glsl"))
+ if (features->hasAlphaMask)
+ {
+ if (!shader->attachObject("lighting/lightFullbrightWaterAlphaMaskF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else if (!shader->attachObject("lighting/lightFullbrightWaterF.glsl"))
{
return FALSE;
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
@@ -302,7 +369,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
return FALSE;
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
@@ -310,18 +377,39 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (features->disableTextureIndex)
{
- if (!shader->attachObject("lighting/lightFullbrightNonIndexedF.glsl"))
+
+ if (features->hasAlphaMask)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightFullbrightNonIndexedAlphaMaskF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("lighting/lightFullbrightNonIndexedF.glsl"))
+ {
+ return FALSE;
+ }
}
}
else
{
- if (!shader->attachObject("lighting/lightFullbrightF.glsl"))
+ if (features->hasAlphaMask)
{
- return FALSE;
+ if (!shader->attachObject("lighting/lightFullbrightAlphaMaskF.glsl"))
+ {
+ return FALSE;
+ }
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ else
+ {
+ if (!shader->attachObject("lighting/lightFullbrightF.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
}
@@ -345,7 +433,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
return FALSE;
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
@@ -364,10 +452,26 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
return FALSE;
}
- shader->mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits-1;
+ shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
}
}
}
+
+ if (features->mIndexedTextureChannels <= 1)
+ {
+ if (!shader->attachObject("objects/nonindexedTextureV.glsl"))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ if (!shader->attachObject("objects/indexedTextureV.glsl"))
+ {
+ return FALSE;
+ }
+ }
+
return TRUE;
}
@@ -403,10 +507,10 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns)
}
else
{
- LL_DEBUGS("ShaderLoading") << log << LL_ENDL;
+ LL_INFOS("ShaderLoading") << log << LL_ENDL;
}
}
-}
+ }
GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, S32 texture_index_channels)
{
@@ -457,23 +561,64 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
//we can't have any lines longer than 1024 characters
- //or any shaders longer than 1024 lines... deal - DaveP
+ //or any shaders longer than 4096 lines... deal - DaveP
GLcharARB buff[1024];
- GLcharARB* text[1024];
+ GLcharARB* text[4096];
GLuint count = 0;
- if (gGLManager.mGLVersion < 2.1f)
+ F32 version = gGLManager.mGLVersion;
+
+//hack to never use GLSL > 1.20 on OSX
+#if LL_DARWIN
+ version = llmin(version, 2.9f);
+#endif
+
+ if (version < 2.1f)
{
text[count++] = strdup("#version 110\n");
+ text[count++] = strdup("#define ATTRIBUTE attribute\n");
+ text[count++] = strdup("#define VARYING varying\n");
}
- else if (gGLManager.mGLVersion < 3.f)
+ else if (version < 3.f)
{
//set version to 1.20
text[count++] = strdup("#version 120\n");
+ text[count++] = strdup("#define FXAA_GLSL_120 1\n");
+ text[count++] = strdup("#define FXAA_FAST_PIXEL_OFFSET 0\n");
+ text[count++] = strdup("#define ATTRIBUTE attribute\n");
+ text[count++] = strdup("#define VARYING varying\n");
}
else
- { //set version to 1.30
- text[count++] = strdup("#version 130\n");
+ {
+ if (version < 4.f)
+ {
+ //set version to 1.30
+ text[count++] = strdup("#version 130\n");
+ }
+ else
+ { //set version to 400
+ text[count++] = strdup("#version 400\n");
+ }
+
+ text[count++] = strdup("#define DEFINE_GL_FRAGCOLOR 1\n");
+ text[count++] = strdup("#define FXAA_GLSL_130 1\n");
+
+ text[count++] = strdup("#define ATTRIBUTE in\n");
+
+ if (type == GL_VERTEX_SHADER_ARB)
+ { //"varying" state is "out" in a vertex program, "in" in a fragment program
+ // ("varying" is deprecated after version 1.20)
+ text[count++] = strdup("#define VARYING out\n");
+ }
+ else
+ {
+ text[count++] = strdup("#define VARYING in\n");
+ }
+
+ //backwards compatibility with legacy texture lookup syntax
+ text[count++] = strdup("#define textureCube texture\n");
+ text[count++] = strdup("#define texture2DLod textureLod\n");
+ text[count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n");
}
//copy preprocessor definitions into buffer
@@ -497,7 +642,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
.
uniform sampler2D texN;
- varying float vary_texture_index;
+ VARYING float vary_texture_index;
vec4 diffuseLookup(vec2 texcoord)
{
@@ -523,7 +668,11 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
text[count++] = strdup(decl.c_str());
}
- text[count++] = strdup("varying float vary_texture_index;\n");
+ if (texture_index_channels > 1)
+ {
+ text[count++] = strdup("VARYING float vary_texture_index;\n");
+ }
+
text[count++] = strdup("vec4 diffuseLookup(vec2 texcoord)\n");
text[count++] = strdup("{\n");
@@ -546,7 +695,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
}
text[count++] = strdup("\t}\n");
- text[count++] = strdup("\treturn vec4(0,0,0,0);\n");
+ text[count++] = strdup("\treturn vec4(1,0,1,1);\n");
text[count++] = strdup("}\n");
}
else
@@ -569,13 +718,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
text[count++] = strdup(if_str.c_str());
}
- text[count++] = strdup("\treturn vec4(0,0,0,0);\n");
+ text[count++] = strdup("\treturn vec4(1,0,1,1);\n");
text[count++] = strdup("}\n");
}
}
//copy file into memory
- while( fgets((char *)buff, 1024, file) != NULL && count < LL_ARRAY_SIZE(buff) )
+ while( fgets((char *)buff, 1024, file) != NULL && count < LL_ARRAY_SIZE(text) )
{
text[count++] = (GLcharARB *)strdup((char *)buff);
}
@@ -630,14 +779,24 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
LL_WARNS("ShaderLoading") << "GLSL Compilation Error: (" << error << ") in " << filename << LL_ENDL;
dumpObjectLog(ret);
+#if LL_WINDOWS
std::stringstream ostr;
//dump shader source for debugging
for (GLuint i = 0; i < count; i++)
{
ostr << i << ": " << text[i];
+
+ if (i % 128 == 0)
+ { //dump every 128 lines
+
+ LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;
+ ostr = std::stringstream();
+ }
+
}
LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;
+#endif // LL_WINDOWS
ret = 0;
}
@@ -745,3 +904,181 @@ BOOL LLShaderMgr::validateProgramObject(GLhandleARB obj)
return success;
}
+//virtual
+void LLShaderMgr::initAttribsAndUniforms()
+{
+ //MUST match order of enum in LLVertexBuffer.h
+ mReservedAttribs.push_back("position");
+ mReservedAttribs.push_back("normal");
+ mReservedAttribs.push_back("texcoord0");
+ mReservedAttribs.push_back("texcoord1");
+ mReservedAttribs.push_back("texcoord2");
+ mReservedAttribs.push_back("texcoord3");
+ mReservedAttribs.push_back("diffuse_color");
+ mReservedAttribs.push_back("emissive");
+ mReservedAttribs.push_back("binormal");
+ mReservedAttribs.push_back("weight");
+ mReservedAttribs.push_back("weight4");
+ mReservedAttribs.push_back("clothing");
+ mReservedAttribs.push_back("texture_index");
+
+ //matrix state
+ mReservedUniforms.push_back("modelview_matrix");
+ mReservedUniforms.push_back("projection_matrix");
+ mReservedUniforms.push_back("inv_proj");
+ mReservedUniforms.push_back("modelview_projection_matrix");
+ mReservedUniforms.push_back("normal_matrix");
+ mReservedUniforms.push_back("texture_matrix0");
+ mReservedUniforms.push_back("texture_matrix1");
+ mReservedUniforms.push_back("texture_matrix2");
+ mReservedUniforms.push_back("texture_matrix3");
+ llassert(mReservedUniforms.size() == LLShaderMgr::TEXTURE_MATRIX3+1);
+
+ mReservedUniforms.push_back("viewport");
+
+ mReservedUniforms.push_back("light_position");
+ mReservedUniforms.push_back("light_direction");
+ mReservedUniforms.push_back("light_attenuation");
+ mReservedUniforms.push_back("light_diffuse");
+ mReservedUniforms.push_back("light_ambient");
+ mReservedUniforms.push_back("light_count");
+ mReservedUniforms.push_back("light");
+ mReservedUniforms.push_back("light_col");
+ mReservedUniforms.push_back("far_z");
+
+ llassert(mReservedUniforms.size() == LLShaderMgr::MULTI_LIGHT_FAR_Z+1);
+
+
+ mReservedUniforms.push_back("proj_mat");
+ mReservedUniforms.push_back("proj_near");
+ mReservedUniforms.push_back("proj_p");
+ mReservedUniforms.push_back("proj_n");
+ mReservedUniforms.push_back("proj_origin");
+ mReservedUniforms.push_back("proj_range");
+ mReservedUniforms.push_back("proj_ambiance");
+ mReservedUniforms.push_back("proj_shadow_idx");
+ mReservedUniforms.push_back("shadow_fade");
+ mReservedUniforms.push_back("proj_focus");
+ mReservedUniforms.push_back("proj_lod");
+ mReservedUniforms.push_back("proj_ambient_lod");
+
+ llassert(mReservedUniforms.size() == LLShaderMgr::PROJECTOR_AMBIENT_LOD+1);
+
+ mReservedUniforms.push_back("color");
+
+ mReservedUniforms.push_back("diffuseMap");
+ mReservedUniforms.push_back("specularMap");
+ mReservedUniforms.push_back("bumpMap");
+ mReservedUniforms.push_back("environmentMap");
+ mReservedUniforms.push_back("cloude_noise_texture");
+ mReservedUniforms.push_back("fullbright");
+ mReservedUniforms.push_back("lightnorm");
+ mReservedUniforms.push_back("sunlight_color_copy");
+ mReservedUniforms.push_back("ambient");
+ mReservedUniforms.push_back("blue_horizon");
+ mReservedUniforms.push_back("blue_density");
+ mReservedUniforms.push_back("haze_horizon");
+ mReservedUniforms.push_back("haze_density");
+ mReservedUniforms.push_back("cloud_shadow");
+ mReservedUniforms.push_back("density_multiplier");
+ mReservedUniforms.push_back("distance_multiplier");
+ mReservedUniforms.push_back("max_y");
+ mReservedUniforms.push_back("glow");
+ mReservedUniforms.push_back("cloud_color");
+ mReservedUniforms.push_back("cloud_pos_density1");
+ mReservedUniforms.push_back("cloud_pos_density2");
+ mReservedUniforms.push_back("cloud_scale");
+ mReservedUniforms.push_back("gamma");
+ mReservedUniforms.push_back("scene_light_strength");
+
+ llassert(mReservedUniforms.size() == LLShaderMgr::SCENE_LIGHT_STRENGTH+1);
+
+ mReservedUniforms.push_back("center");
+ mReservedUniforms.push_back("size");
+ mReservedUniforms.push_back("falloff");
+
+
+ mReservedUniforms.push_back("minLuminance");
+ mReservedUniforms.push_back("maxExtractAlpha");
+ mReservedUniforms.push_back("lumWeights");
+ mReservedUniforms.push_back("warmthWeights");
+ mReservedUniforms.push_back("warmthAmount");
+ mReservedUniforms.push_back("glowStrength");
+ mReservedUniforms.push_back("glowDelta");
+
+ llassert(mReservedUniforms.size() == LLShaderMgr::GLOW_DELTA+1);
+
+
+ mReservedUniforms.push_back("minimum_alpha");
+
+ mReservedUniforms.push_back("shadow_matrix");
+ mReservedUniforms.push_back("env_mat");
+ mReservedUniforms.push_back("shadow_clip");
+ mReservedUniforms.push_back("sun_wash");
+ mReservedUniforms.push_back("shadow_noise");
+ mReservedUniforms.push_back("blur_size");
+ mReservedUniforms.push_back("ssao_radius");
+ mReservedUniforms.push_back("ssao_max_radius");
+ mReservedUniforms.push_back("ssao_factor");
+ mReservedUniforms.push_back("ssao_factor_inv");
+ mReservedUniforms.push_back("ssao_effect_mat");
+ mReservedUniforms.push_back("screen_res");
+ mReservedUniforms.push_back("near_clip");
+ mReservedUniforms.push_back("shadow_offset");
+ mReservedUniforms.push_back("shadow_bias");
+ mReservedUniforms.push_back("spot_shadow_bias");
+ mReservedUniforms.push_back("spot_shadow_offset");
+ mReservedUniforms.push_back("sun_dir");
+ mReservedUniforms.push_back("shadow_res");
+ mReservedUniforms.push_back("proj_shadow_res");
+ mReservedUniforms.push_back("depth_cutoff");
+ mReservedUniforms.push_back("norm_cutoff");
+
+ llassert(mReservedUniforms.size() == LLShaderMgr::DEFERRED_NORM_CUTOFF+1);
+
+ mReservedUniforms.push_back("tc_scale");
+ mReservedUniforms.push_back("rcp_screen_res");
+ mReservedUniforms.push_back("rcp_frame_opt");
+ mReservedUniforms.push_back("rcp_frame_opt2");
+
+ mReservedUniforms.push_back("focal_distance");
+ mReservedUniforms.push_back("blur_constant");
+ mReservedUniforms.push_back("tan_pixel_angle");
+ mReservedUniforms.push_back("magnification");
+ mReservedUniforms.push_back("max_cof");
+ mReservedUniforms.push_back("res_scale");
+
+ mReservedUniforms.push_back("depthMap");
+ mReservedUniforms.push_back("shadowMap0");
+ mReservedUniforms.push_back("shadowMap1");
+ mReservedUniforms.push_back("shadowMap2");
+ mReservedUniforms.push_back("shadowMap3");
+ mReservedUniforms.push_back("shadowMap4");
+ mReservedUniforms.push_back("shadowMap5");
+
+ llassert(mReservedUniforms.size() == LLShaderMgr::DEFERRED_SHADOW5+1);
+
+ mReservedUniforms.push_back("normalMap");
+ mReservedUniforms.push_back("positionMap");
+ mReservedUniforms.push_back("diffuseRect");
+ mReservedUniforms.push_back("specularRect");
+ mReservedUniforms.push_back("noiseMap");
+ mReservedUniforms.push_back("lightFunc");
+ mReservedUniforms.push_back("lightMap");
+ mReservedUniforms.push_back("bloomMap");
+ mReservedUniforms.push_back("projectionMap");
+
+ llassert(mReservedUniforms.size() == END_RESERVED_UNIFORMS);
+
+ std::set<std::string> dupe_check;
+
+ for (U32 i = 0; i < mReservedUniforms.size(); ++i)
+ {
+ if (dupe_check.find(mReservedUniforms[i]) != dupe_check.end())
+ {
+ llerrs << "Duplicate reserved uniform name found: " << mReservedUniforms[i] << llendl;
+ }
+ dupe_check.insert(mReservedUniforms[i]);
+ }
+}
+
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 2f30103811..950e6c9c2f 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -36,9 +36,137 @@ public:
LLShaderMgr();
virtual ~LLShaderMgr();
+ typedef enum
+ {
+ MODELVIEW_MATRIX = 0,
+ PROJECTION_MATRIX,
+ INVERSE_PROJECTION_MATRIX,
+ MODELVIEW_PROJECTION_MATRIX,
+ NORMAL_MATRIX,
+ TEXTURE_MATRIX0,
+ TEXTURE_MATRIX1,
+ TEXTURE_MATRIX2,
+ TEXTURE_MATRIX3,
+ VIEWPORT,
+ LIGHT_POSITION,
+ LIGHT_DIRECTION,
+ LIGHT_ATTENUATION,
+ LIGHT_DIFFUSE,
+ LIGHT_AMBIENT,
+ MULTI_LIGHT_COUNT,
+ MULTI_LIGHT,
+ MULTI_LIGHT_COL,
+ MULTI_LIGHT_FAR_Z,
+ PROJECTOR_MATRIX,
+ PROJECTOR_NEAR,
+ PROJECTOR_P,
+ PROJECTOR_N,
+ PROJECTOR_ORIGIN,
+ PROJECTOR_RANGE,
+ PROJECTOR_AMBIANCE,
+ PROJECTOR_SHADOW_INDEX,
+ PROJECTOR_SHADOW_FADE,
+ PROJECTOR_FOCUS,
+ PROJECTOR_LOD,
+ PROJECTOR_AMBIENT_LOD,
+ DIFFUSE_COLOR,
+ DIFFUSE_MAP,
+ SPECULAR_MAP,
+ BUMP_MAP,
+ ENVIRONMENT_MAP,
+ CLOUD_NOISE_MAP,
+ FULLBRIGHT,
+ LIGHTNORM,
+ SUNLIGHT_COLOR,
+ AMBIENT,
+ BLUE_HORIZON,
+ BLUE_DENSITY,
+ HAZE_HORIZON,
+ HAZE_DENSITY,
+ CLOUD_SHADOW,
+ DENSITY_MULTIPLIER,
+ DISTANCE_MULTIPLIER,
+ MAX_Y,
+ GLOW,
+ CLOUD_COLOR,
+ CLOUD_POS_DENSITY1,
+ CLOUD_POS_DENSITY2,
+ CLOUD_SCALE,
+ GAMMA,
+ SCENE_LIGHT_STRENGTH,
+ LIGHT_CENTER,
+ LIGHT_SIZE,
+ LIGHT_FALLOFF,
+
+ GLOW_MIN_LUMINANCE,
+ GLOW_MAX_EXTRACT_ALPHA,
+ GLOW_LUM_WEIGHTS,
+ GLOW_WARMTH_WEIGHTS,
+ GLOW_WARMTH_AMOUNT,
+ GLOW_STRENGTH,
+ GLOW_DELTA,
+
+ MINIMUM_ALPHA,
+
+ DEFERRED_SHADOW_MATRIX,
+ DEFERRED_ENV_MAT,
+ DEFERRED_SHADOW_CLIP,
+ DEFERRED_SUN_WASH,
+ DEFERRED_SHADOW_NOISE,
+ DEFERRED_BLUR_SIZE,
+ DEFERRED_SSAO_RADIUS,
+ DEFERRED_SSAO_MAX_RADIUS,
+ DEFERRED_SSAO_FACTOR,
+ DEFERRED_SSAO_FACTOR_INV,
+ DEFERRED_SSAO_EFFECT_MAT,
+ DEFERRED_SCREEN_RES,
+ DEFERRED_NEAR_CLIP,
+ DEFERRED_SHADOW_OFFSET,
+ DEFERRED_SHADOW_BIAS,
+ DEFERRED_SPOT_SHADOW_BIAS,
+ DEFERRED_SPOT_SHADOW_OFFSET,
+ DEFERRED_SUN_DIR,
+ DEFERRED_SHADOW_RES,
+ DEFERRED_PROJ_SHADOW_RES,
+ DEFERRED_DEPTH_CUTOFF,
+ DEFERRED_NORM_CUTOFF,
+
+ FXAA_TC_SCALE,
+ FXAA_RCP_SCREEN_RES,
+ FXAA_RCP_FRAME_OPT,
+ FXAA_RCP_FRAME_OPT2,
+
+ DOF_FOCAL_DISTANCE,
+ DOF_BLUR_CONSTANT,
+ DOF_TAN_PIXEL_ANGLE,
+ DOF_MAGNIFICATION,
+ DOF_MAX_COF,
+ DOF_RES_SCALE,
+
+ DEFERRED_DEPTH,
+ DEFERRED_SHADOW0,
+ DEFERRED_SHADOW1,
+ DEFERRED_SHADOW2,
+ DEFERRED_SHADOW3,
+ DEFERRED_SHADOW4,
+ DEFERRED_SHADOW5,
+ DEFERRED_NORMAL,
+ DEFERRED_POSITION,
+ DEFERRED_DIFFUSE,
+ DEFERRED_SPECULAR,
+ DEFERRED_NOISE,
+ DEFERRED_LIGHTFUNC,
+ DEFERRED_LIGHT,
+ DEFERRED_BLOOM,
+ DEFERRED_PROJECTION,
+ END_RESERVED_UNIFORMS
+ } eGLSLReservedUniforms;
+
// singleton pattern implementation
static LLShaderMgr * instance();
+ virtual void initAttribsAndUniforms(void);
+
BOOL attachShaderFeatures(LLGLSLShader * shader);
void dumpObjectLog(GLhandleARB ret, BOOL warns = TRUE);
BOOL linkProgramObject(GLhandleARB obj, BOOL suppress_errors = FALSE);
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 4a0b964e61..20a450fbfb 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -25,7 +25,6 @@
*/
#include "linden_common.h"
-#include "llmemory.h"
#include <boost/static_assert.hpp>
#include "llsys.h"
@@ -35,6 +34,21 @@
#include "llmemtype.h"
#include "llrender.h"
#include "llvector4a.h"
+#include "llshadermgr.h"
+#include "llglslshader.h"
+#include "llmemory.h"
+
+//Next Highest Power Of Two
+//helper function, returns first number > v that is a power of 2, or v if v is already a power of 2
+U32 nhpo2(U32 v)
+{
+ U32 r = 1;
+ while (r < v) {
+ r *= 2;
+ }
+ return r;
+}
+
//============================================================================
@@ -43,7 +57,9 @@ LLVBOPool LLVertexBuffer::sStreamVBOPool;
LLVBOPool LLVertexBuffer::sDynamicVBOPool;
LLVBOPool LLVertexBuffer::sStreamIBOPool;
LLVBOPool LLVertexBuffer::sDynamicIBOPool;
+U32 LLVBOPool::sBytesPooled = 0;
+LLPrivateMemoryPool* LLVertexBuffer::sPrivatePoolp = NULL ;
U32 LLVertexBuffer::sBindCount = 0;
U32 LLVertexBuffer::sSetCount = 0;
S32 LLVertexBuffer::sCount = 0;
@@ -52,6 +68,7 @@ S32 LLVertexBuffer::sMappedCount = 0;
BOOL LLVertexBuffer::sDisableVBOMapping = FALSE ;
BOOL LLVertexBuffer::sEnableVBOs = TRUE;
U32 LLVertexBuffer::sGLRenderBuffer = 0;
+U32 LLVertexBuffer::sGLRenderArray = 0;
U32 LLVertexBuffer::sGLRenderIndices = 0;
U32 LLVertexBuffer::sLastMask = 0;
BOOL LLVertexBuffer::sVBOActive = FALSE;
@@ -59,12 +76,166 @@ BOOL LLVertexBuffer::sIBOActive = FALSE;
U32 LLVertexBuffer::sAllocatedBytes = 0;
BOOL LLVertexBuffer::sMapped = FALSE;
BOOL LLVertexBuffer::sUseStreamDraw = TRUE;
+BOOL LLVertexBuffer::sUseVAO = FALSE;
BOOL LLVertexBuffer::sPreferStreamDraw = FALSE;
-S32 LLVertexBuffer::sWeight4Loc = -1;
-std::vector<U32> LLVertexBuffer::sDeleteList;
+const U32 FENCE_WAIT_TIME_NANOSECONDS = 10000; //1 ms
+
+class LLGLSyncFence : public LLGLFence
+{
+public:
+#ifdef GL_ARB_sync
+ GLsync mSync;
+#endif
+
+ LLGLSyncFence()
+ {
+#ifdef GL_ARB_sync
+ mSync = 0;
+#endif
+ }
+
+ virtual ~LLGLSyncFence()
+ {
+#ifdef GL_ARB_sync
+ if (mSync)
+ {
+ glDeleteSync(mSync);
+ }
+#endif
+ }
+
+ void placeFence()
+ {
+#ifdef GL_ARB_sync
+ if (mSync)
+ {
+ glDeleteSync(mSync);
+ }
+ mSync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
+#endif
+ }
+
+ void wait()
+ {
+#ifdef GL_ARB_sync
+ if (mSync)
+ {
+ while (glClientWaitSync(mSync, 0, FENCE_WAIT_TIME_NANOSECONDS) == GL_TIMEOUT_EXPIRED)
+ { //track the number of times we've waited here
+ static S32 waits = 0;
+ waits++;
+ }
+ }
+#endif
+ }
+
+
+};
+
+
+//which power of 2 is i?
+//assumes i is a power of 2 > 0
+U32 wpo2(U32 i)
+{
+ llassert(i > 0);
+ llassert(nhpo2(i) == i);
+
+ U32 r = 0;
+
+ while (i >>= 1) ++r;
+
+ return r;
+}
+
+U8* LLVBOPool::allocate(U32& name, U32 size)
+{
+ llassert(nhpo2(size) == size);
+
+ U32 i = wpo2(size);
+
+ if (mFreeList.size() <= i)
+ {
+ mFreeList.resize(i+1);
+ }
+
+ U8* ret = NULL;
+
+ if (mFreeList[i].empty())
+ {
+ //make a new buffer
+ glGenBuffersARB(1, &name);
+ glBindBufferARB(mType, name);
+ glBufferDataARB(mType, size, 0, mUsage);
+ LLVertexBuffer::sAllocatedBytes += size;
+
+ if (LLVertexBuffer::sDisableVBOMapping)
+ {
+ ret = (U8*) ll_aligned_malloc_16(size);
+ }
+ glBindBufferARB(mType, 0);
+ }
+ else
+ {
+ name = mFreeList[i].front().mGLName;
+ ret = mFreeList[i].front().mClientData;
+
+ sBytesPooled -= size;
+
+ mFreeList[i].pop_front();
+ }
+
+ return ret;
+}
+
+void LLVBOPool::release(U32 name, U8* buffer, U32 size)
+{
+ llassert(nhpo2(size) == size);
+
+ U32 i = wpo2(size);
+
+ llassert(mFreeList.size() > i);
+
+ Record rec;
+ rec.mGLName = name;
+ rec.mClientData = buffer;
+
+ sBytesPooled += size;
+
+ mFreeList[i].push_back(rec);
+}
+
+void LLVBOPool::cleanup()
+{
+ U32 size = 1;
+
+ for (U32 i = 0; i < mFreeList.size(); ++i)
+ {
+ record_list_t& l = mFreeList[i];
+
+ while (!l.empty())
+ {
+ Record& r = l.front();
+
+ glDeleteBuffersARB(1, &r.mGLName);
+
+ if (r.mClientData)
+ {
+ ll_aligned_free_16(r.mClientData);
+ }
+
+ l.pop_front();
+
+ LLVertexBuffer::sAllocatedBytes -= size;
+ sBytesPooled -= size;
+ }
+
+ size *= 2;
+ }
+}
+//NOTE: each component must be AT LEAST 4 bytes in size to avoid a performance penalty on AMD hardware
S32 LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_MAX] =
{
sizeof(LLVector4), // TYPE_VERTEX,
@@ -74,10 +245,12 @@ S32 LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_MAX] =
sizeof(LLVector2), // TYPE_TEXCOORD2,
sizeof(LLVector2), // TYPE_TEXCOORD3,
sizeof(LLColor4U), // TYPE_COLOR,
+ sizeof(LLColor4U), // TYPE_EMISSIVE, only alpha is used currently
sizeof(LLVector4), // TYPE_BINORMAL,
sizeof(F32), // TYPE_WEIGHT,
sizeof(LLVector4), // TYPE_WEIGHT4,
sizeof(LLVector4), // TYPE_CLOTHWEIGHT,
+ sizeof(LLVector4), // TYPE_TEXTURE_INDEX (actually exists as position.w), no extra data, but stride is 16 bytes
};
U32 LLVertexBuffer::sGLMode[LLRender::NUM_MODES] =
@@ -92,146 +265,147 @@ U32 LLVertexBuffer::sGLMode[LLRender::NUM_MODES] =
GL_LINE_LOOP,
};
+
//static
void LLVertexBuffer::setupClientArrays(U32 data_mask)
{
- /*if (LLGLImmediate::sStarted)
- {
- llerrs << "Cannot use LLGLImmediate and LLVertexBuffer simultaneously!" << llendl;
- }*/
-
if (sLastMask != data_mask)
{
- U32 mask[] =
+ BOOL error = FALSE;
+
+ if (LLGLSLShader::sNoFixedFunction)
{
- MAP_VERTEX,
- MAP_NORMAL,
- MAP_TEXCOORD0,
- MAP_COLOR,
- };
-
- GLenum array[] =
+ for (U32 i = 0; i < TYPE_MAX; ++i)
+ {
+ S32 loc = i;
+
+ U32 mask = 1 << i;
+
+ if (sLastMask & (1 << i))
+ { //was enabled
+ if (!(data_mask & mask))
+ { //needs to be disabled
+ glDisableVertexAttribArrayARB(loc);
+ }
+ }
+ else
+ { //was disabled
+ if (data_mask & mask)
+ { //needs to be enabled
+ glEnableVertexAttribArrayARB(loc);
+ }
+ }
+ }
+ }
+ else
{
- GL_VERTEX_ARRAY,
- GL_NORMAL_ARRAY,
- GL_TEXTURE_COORD_ARRAY,
- GL_COLOR_ARRAY,
- };
- BOOL error = FALSE;
- for (U32 i = 0; i < 4; ++i)
- {
- if (sLastMask & mask[i])
- { //was enabled
- if (!(data_mask & mask[i]) && i > 0)
- { //needs to be disabled
- glDisableClientState(array[i]);
+ GLenum array[] =
+ {
+ GL_VERTEX_ARRAY,
+ GL_NORMAL_ARRAY,
+ GL_TEXTURE_COORD_ARRAY,
+ GL_COLOR_ARRAY,
+ };
+
+ GLenum mask[] =
+ {
+ MAP_VERTEX,
+ MAP_NORMAL,
+ MAP_TEXCOORD0,
+ MAP_COLOR
+ };
+
+
+
+ for (U32 i = 0; i < 4; ++i)
+ {
+ if (sLastMask & mask[i])
+ { //was enabled
+ if (!(data_mask & mask[i]))
+ { //needs to be disabled
+ glDisableClientState(array[i]);
+ }
+ else if (gDebugGL)
+ { //needs to be enabled, make sure it was (DEBUG)
+ if (!glIsEnabled(array[i]))
+ {
+ if (gDebugSession)
+ {
+ error = TRUE;
+ gFailLog << "Bad client state! " << array[i] << " disabled." << std::endl;
+ }
+ else
+ {
+ llerrs << "Bad client state! " << array[i] << " disabled." << llendl;
+ }
+ }
+ }
}
- else if (gDebugGL)
- { //needs to be enabled, make sure it was (DEBUG TEMPORARY)
- if (i > 0 && !glIsEnabled(array[i]))
- {
+ else
+ { //was disabled
+ if (data_mask & mask[i])
+ { //needs to be enabled
+ glEnableClientState(array[i]);
+ }
+ else if (gDebugGL && glIsEnabled(array[i]))
+ { //needs to be disabled, make sure it was (DEBUG TEMPORARY)
if (gDebugSession)
{
error = TRUE;
- gFailLog << "Bad client state! " << array[i] << " disabled." << std::endl;
+ gFailLog << "Bad client state! " << array[i] << " enabled." << std::endl;
}
else
{
- llerrs << "Bad client state! " << array[i] << " disabled." << llendl;
+ llerrs << "Bad client state! " << array[i] << " enabled." << llendl;
}
}
}
}
- else
- { //was disabled
- if (data_mask & mask[i] && i > 0)
- { //needs to be enabled
- glEnableClientState(array[i]);
- }
- else if (gDebugGL && i > 0 && glIsEnabled(array[i]))
- { //needs to be disabled, make sure it was (DEBUG TEMPORARY)
- if (gDebugSession)
- {
- error = TRUE;
- gFailLog << "Bad client state! " << array[i] << " enabled." << std::endl;
- }
- else
- {
- llerrs << "Bad client state! " << array[i] << " enabled." << llendl;
+
+ U32 map_tc[] =
+ {
+ MAP_TEXCOORD1,
+ MAP_TEXCOORD2,
+ MAP_TEXCOORD3
+ };
+
+ for (U32 i = 0; i < 3; i++)
+ {
+ if (sLastMask & map_tc[i])
+ {
+ if (!(data_mask & map_tc[i]))
+ { //disable
+ glClientActiveTextureARB(GL_TEXTURE1_ARB+i);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glClientActiveTextureARB(GL_TEXTURE0_ARB);
}
}
+ else if (data_mask & map_tc[i])
+ {
+ glClientActiveTextureARB(GL_TEXTURE1_ARB+i);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glClientActiveTextureARB(GL_TEXTURE0_ARB);
+ }
}
- }
- if (error)
- {
- ll_fail("LLVertexBuffer::setupClientArrays failed");
- }
-
- U32 map_tc[] =
- {
- MAP_TEXCOORD1,
- MAP_TEXCOORD2,
- MAP_TEXCOORD3
- };
-
- for (U32 i = 0; i < 3; i++)
- {
- if (sLastMask & map_tc[i])
+ if (sLastMask & MAP_BINORMAL)
{
- if (!(data_mask & map_tc[i]))
+ if (!(data_mask & MAP_BINORMAL))
{
- glClientActiveTextureARB(GL_TEXTURE1_ARB+i);
+ glClientActiveTextureARB(GL_TEXTURE2_ARB);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glClientActiveTextureARB(GL_TEXTURE0_ARB);
}
}
- else if (data_mask & map_tc[i])
- {
- glClientActiveTextureARB(GL_TEXTURE1_ARB+i);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glClientActiveTextureARB(GL_TEXTURE0_ARB);
- }
- }
-
- if (sLastMask & MAP_BINORMAL)
- {
- if (!(data_mask & MAP_BINORMAL))
+ else if (data_mask & MAP_BINORMAL)
{
glClientActiveTextureARB(GL_TEXTURE2_ARB);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glClientActiveTextureARB(GL_TEXTURE0_ARB);
}
}
- else if (data_mask & MAP_BINORMAL)
- {
- glClientActiveTextureARB(GL_TEXTURE2_ARB);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glClientActiveTextureARB(GL_TEXTURE0_ARB);
- }
-
- if (sLastMask & MAP_WEIGHT4)
- {
- if (sWeight4Loc < 0)
- {
- llerrs << "Weighting disabled but vertex buffer still bound!" << llendl;
- }
-
- if (!(data_mask & MAP_WEIGHT4))
- { //disable 4-component skin weight
- glDisableVertexAttribArrayARB(sWeight4Loc);
- }
- }
- else if (data_mask & MAP_WEIGHT4)
- {
- if (sWeight4Loc >= 0)
- { //enable 4-component skin weight
- glEnableVertexAttribArrayARB(sWeight4Loc);
- }
- }
-
sLastMask = data_mask;
}
}
@@ -239,31 +413,90 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
//static
void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, const std::vector<LLVector3>& norm)
{
+ llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
+ gGL.syncMatrices();
+
U32 count = pos.size();
- llassert(norm.size() >= pos.size());
+ llassert_always(norm.size() >= pos.size());
+ llassert_always(count > 0) ;
unbind();
setupClientArrays(MAP_VERTEX | MAP_NORMAL);
- glVertexPointer(3, GL_FLOAT, 0, pos[0].mV);
- glNormalPointer(GL_FLOAT, 0, norm[0].mV);
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+
+ if (shader)
+ {
+ S32 loc = LLVertexBuffer::TYPE_VERTEX;
+ if (loc > -1)
+ {
+ glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 0, pos[0].mV);
+ }
+ loc = LLVertexBuffer::TYPE_NORMAL;
+ if (loc > -1)
+ {
+ glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 0, norm[0].mV);
+ }
+ }
+ else
+ {
+ glVertexPointer(3, GL_FLOAT, 0, pos[0].mV);
+ glNormalPointer(GL_FLOAT, 0, norm[0].mV);
+ }
glDrawArrays(sGLMode[mode], 0, count);
}
+//static
+void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp)
+{
+ llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
+
+ gGL.syncMatrices();
+
+ U32 mask = LLVertexBuffer::MAP_VERTEX;
+ if (tc)
+ {
+ mask = mask | LLVertexBuffer::MAP_TEXCOORD0;
+ }
+
+ unbind();
+
+ setupClientArrays(mask);
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ S32 loc = LLVertexBuffer::TYPE_VERTEX;
+ glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 16, pos);
+
+ if (tc)
+ {
+ loc = LLVertexBuffer::TYPE_TEXCOORD0;
+ glVertexAttribPointerARB(loc, 2, GL_FLOAT, GL_FALSE, 0, tc);
+ }
+ }
+ else
+ {
+ glTexCoordPointer(2, GL_FLOAT, 0, tc);
+ glVertexPointer(3, GL_FLOAT, 16, pos);
+ }
+
+ glDrawElements(sGLMode[mode], num_indices, GL_UNSIGNED_SHORT, indicesp);
+}
+
void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_offset) const
{
- if (start >= (U32) mRequestedNumVerts ||
- end >= (U32) mRequestedNumVerts)
+ if (start >= (U32) mNumVerts ||
+ end >= (U32) mNumVerts)
{
- llerrs << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mRequestedNumVerts << llendl;
+ llerrs << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << llendl;
}
- llassert(mRequestedNumIndices >= 0);
+ llassert(mNumIndices >= 0);
- if (indices_offset >= (U32) mRequestedNumIndices ||
- indices_offset + count > (U32) mRequestedNumIndices)
+ if (indices_offset >= (U32) mNumIndices ||
+ indices_offset + count > (U32) mNumIndices)
{
llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl;
}
@@ -278,6 +511,25 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
llerrs << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << llendl;
}
}
+
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+
+ if (shader && shader->mFeatures.mIndexedTextureChannels > 1)
+ {
+ LLStrider<LLVector4a> v;
+ //hack to get non-const reference
+ LLVertexBuffer* vb = (LLVertexBuffer*) this;
+ vb->getVertexStrider(v);
+
+ for (U32 i = start; i < end; i++)
+ {
+ S32 idx = (S32) (v[i][3]+0.25f);
+ if (idx < 0 || idx >= shader->mFeatures.mIndexedTextureChannels)
+ {
+ llerrs << "Bad texture index found in vertex data stream." << llendl;
+ }
+ }
+ }
}
}
@@ -285,16 +537,40 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
{
validateRange(start, end, count, indices_offset);
- llassert(mRequestedNumVerts >= 0);
+ gGL.syncMatrices();
+
+ llassert(mNumVerts >= 0);
+ llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
- if (mGLIndices != sGLRenderIndices)
+ if (mGLArray)
{
- llerrs << "Wrong index buffer bound." << llendl;
+ if (mGLArray != sGLRenderArray)
+ {
+ llerrs << "Wrong vertex array bound." << llendl;
+ }
+ }
+ else
+ {
+ if (mGLIndices != sGLRenderIndices)
+ {
+ llerrs << "Wrong index buffer bound." << llendl;
+ }
+
+ if (mGLBuffer != sGLRenderBuffer)
+ {
+ llerrs << "Wrong vertex buffer bound." << llendl;
+ }
}
- if (mGLBuffer != sGLRenderBuffer)
+ if (gDebugGL && !mGLArray && useVBOs())
{
- llerrs << "Wrong vertex buffer bound." << llendl;
+ GLint elem = 0;
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &elem);
+
+ if (elem != mGLIndices)
+ {
+ llerrs << "Wrong index buffer bound!" << llendl;
+ }
}
if (mode >= LLRender::NUM_MODES)
@@ -309,25 +585,40 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT,
idx);
stop_glerror();
+ placeFence();
}
void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
{
- llassert(mRequestedNumIndices >= 0);
- if (indices_offset >= (U32) mRequestedNumIndices ||
- indices_offset + count > (U32) mRequestedNumIndices)
+ llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
+
+ gGL.syncMatrices();
+
+ llassert(mNumIndices >= 0);
+ if (indices_offset >= (U32) mNumIndices ||
+ indices_offset + count > (U32) mNumIndices)
{
llerrs << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << llendl;
}
- if (mGLIndices != sGLRenderIndices)
+ if (mGLArray)
{
- llerrs << "Wrong index buffer bound." << llendl;
+ if (mGLArray != sGLRenderArray)
+ {
+ llerrs << "Wrong vertex array bound." << llendl;
+ }
}
-
- if (mGLBuffer != sGLRenderBuffer)
+ else
{
- llerrs << "Wrong vertex buffer bound." << llendl;
+ if (mGLIndices != sGLRenderIndices)
+ {
+ llerrs << "Wrong index buffer bound." << llendl;
+ }
+
+ if (mGLBuffer != sGLRenderBuffer)
+ {
+ llerrs << "Wrong vertex buffer bound." << llendl;
+ }
}
if (mode >= LLRender::NUM_MODES)
@@ -340,20 +631,35 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT,
((U16*) getIndicesPointer()) + indices_offset);
stop_glerror();
+ placeFence();
}
void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
{
- llassert(mRequestedNumVerts >= 0);
- if (first >= (U32) mRequestedNumVerts ||
- first + count > (U32) mRequestedNumVerts)
+ llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
+
+ gGL.syncMatrices();
+
+ llassert(mNumVerts >= 0);
+ if (first >= (U32) mNumVerts ||
+ first + count > (U32) mNumVerts)
{
llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl;
}
- if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive)
+ if (mGLArray)
{
- llerrs << "Wrong vertex buffer bound." << llendl;
+ if (mGLArray != sGLRenderArray)
+ {
+ llerrs << "Wrong vertex array bound." << llendl;
+ }
+ }
+ else
+ {
+ if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive)
+ {
+ llerrs << "Wrong vertex buffer bound." << llendl;
+ }
}
if (mode >= LLRender::NUM_MODES)
@@ -365,29 +671,44 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
stop_glerror();
glDrawArrays(sGLMode[mode], first, count);
stop_glerror();
+ placeFence();
}
//static
void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping)
{
sEnableVBOs = use_vbo && gGLManager.mHasVertexBufferObject ;
- if(sEnableVBOs)
- {
- //llassert_always(glBindBufferARB) ; //double check the extention for VBO is loaded.
+ sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ;
- llinfos << "VBO is enabled." << llendl ;
- }
- else
- {
- llinfos << "VBO is disabled." << llendl ;
+ if(!sPrivatePoolp)
+ {
+ sPrivatePoolp = LLPrivateMemoryPoolManager::getInstance()->newPool(LLPrivateMemoryPool::STATIC) ;
}
- sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ;
+ sStreamVBOPool.mType = GL_ARRAY_BUFFER_ARB;
+ sStreamVBOPool.mUsage= GL_STREAM_DRAW_ARB;
+ sStreamIBOPool.mType = GL_ELEMENT_ARRAY_BUFFER_ARB;
+ sStreamIBOPool.mUsage= GL_STREAM_DRAW_ARB;
+
+ sDynamicVBOPool.mType = GL_ARRAY_BUFFER_ARB;
+ sDynamicVBOPool.mUsage= GL_DYNAMIC_DRAW_ARB;
+ sDynamicIBOPool.mType = GL_ELEMENT_ARRAY_BUFFER_ARB;
+ sDynamicIBOPool.mUsage= GL_DYNAMIC_DRAW_ARB;
}
//static
void LLVertexBuffer::unbind()
{
+ if (sGLRenderArray)
+ {
+#if GL_ARB_vertex_array_object
+ glBindVertexArray(0);
+#endif
+ sGLRenderArray = 0;
+ sGLRenderIndices = 0;
+ sIBOActive = FALSE;
+ }
+
if (sVBOActive)
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
@@ -410,17 +731,16 @@ void LLVertexBuffer::cleanupClass()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS);
unbind();
- clientCopy(); // deletes GL buffers
-
- //llassert_always(!sCount) ;
-}
+
+ sStreamIBOPool.cleanup();
+ sDynamicIBOPool.cleanup();
+ sStreamVBOPool.cleanup();
+ sDynamicVBOPool.cleanup();
-void LLVertexBuffer::clientCopy(F64 max_time)
-{
- if (!sDeleteList.empty())
+ if(sPrivatePoolp)
{
- glDeleteBuffersARB(sDeleteList.size(), (GLuint*) &(sDeleteList[0]));
- sDeleteList.clear();
+ LLPrivateMemoryPoolManager::getInstance()->deletePool(sPrivatePoolp) ;
+ sPrivatePoolp = NULL ;
}
}
@@ -431,22 +751,20 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
mNumVerts(0),
mNumIndices(0),
- mRequestedNumVerts(-1),
- mRequestedNumIndices(-1),
mUsage(usage),
mGLBuffer(0),
+ mGLArray(0),
mGLIndices(0),
mMappedData(NULL),
mMappedIndexData(NULL),
mVertexLocked(FALSE),
mIndexLocked(FALSE),
mFinal(FALSE),
- mFilthy(FALSE),
mEmpty(TRUE),
- mResized(FALSE),
- mDynamicSize(FALSE)
+ mFence(NULL)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR);
+ mFence = NULL;
if (!sEnableVBOs)
{
mUsage = 0 ;
@@ -462,6 +780,16 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
mUsage = GL_STREAM_DRAW_ARB;
}
+ if (mUsage == 0 && LLRender::sGLCoreProfile)
+ { //MUST use VBOs for all rendering
+ mUsage = GL_STREAM_DRAW_ARB;
+ }
+
+ if (mUsage && mUsage != GL_STREAM_DRAW_ARB)
+ { //only stream_draw and dynamic_draw are supported when using VBOs, dynamic draw is the default
+ mUsage = GL_DYNAMIC_DRAW_ARB;
+ }
+
//zero out offsets
for (U32 i = 0; i < TYPE_MAX; i++)
{
@@ -470,6 +798,7 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
mTypeMask = typemask;
mSize = 0;
+ mIndicesSize = 0;
mAlignedOffset = 0;
mAlignedIndexOffset = 0;
@@ -480,12 +809,12 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
S32 LLVertexBuffer::calcOffsets(const U32& typemask, S32* offsets, S32 num_vertices)
{
S32 offset = 0;
- for (S32 i=0; i<TYPE_MAX; i++)
+ for (S32 i=0; i<TYPE_TEXTURE_INDEX; i++)
{
U32 mask = 1<<i;
if (typemask & mask)
{
- if (offsets)
+ if (offsets && LLVertexBuffer::sTypeSize[i])
{
offsets[i] = offset;
offset += LLVertexBuffer::sTypeSize[i]*num_vertices;
@@ -494,6 +823,8 @@ S32 LLVertexBuffer::calcOffsets(const U32& typemask, S32* offsets, S32 num_verti
}
}
+ offsets[TYPE_TEXTURE_INDEX] = offsets[TYPE_VERTEX] + 12;
+
return offset+16;
}
@@ -501,7 +832,7 @@ S32 LLVertexBuffer::calcOffsets(const U32& typemask, S32* offsets, S32 num_verti
S32 LLVertexBuffer::calcVertexSize(const U32& typemask)
{
S32 size = 0;
- for (S32 i = 0; i < TYPE_MAX; i++)
+ for (S32 i = 0; i < TYPE_TEXTURE_INDEX; i++)
{
U32 mask = 1<<i;
if (typemask & mask)
@@ -525,46 +856,81 @@ LLVertexBuffer::~LLVertexBuffer()
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR);
destroyGLBuffer();
destroyGLIndices();
+
+ if (mGLArray)
+ {
+#if GL_ARB_vertex_array_object
+ glDeleteVertexArrays(1, &mGLArray);
+#endif
+ }
+
sCount--;
+ if (mFence)
+ {
+ delete mFence;
+ }
+
+ mFence = NULL;
+
llassert_always(!mMappedData && !mMappedIndexData) ;
};
+void LLVertexBuffer::placeFence() const
+{
+ /*if (!mFence && useVBOs())
+ {
+ if (gGLManager.mHasSync)
+ {
+ mFence = new LLGLSyncFence();
+ }
+ }
+
+ if (mFence)
+ {
+ mFence->placeFence();
+ }*/
+}
+
+void LLVertexBuffer::waitFence() const
+{
+ /*if (mFence)
+ {
+ mFence->wait();
+ }*/
+}
+
//----------------------------------------------------------------------------
-void LLVertexBuffer::genBuffer()
+void LLVertexBuffer::genBuffer(U32 size)
{
+ mSize = nhpo2(size);
+
if (mUsage == GL_STREAM_DRAW_ARB)
{
- mGLBuffer = sStreamVBOPool.allocate();
- }
- else if (mUsage == GL_DYNAMIC_DRAW_ARB)
- {
- mGLBuffer = sDynamicVBOPool.allocate();
+ mMappedData = sStreamVBOPool.allocate(mGLBuffer, mSize);
}
else
{
- BOOST_STATIC_ASSERT(sizeof(mGLBuffer) == sizeof(GLuint));
- glGenBuffersARB(1, (GLuint*)&mGLBuffer);
+ mMappedData = sDynamicVBOPool.allocate(mGLBuffer, mSize);
}
+
sGLCount++;
}
-void LLVertexBuffer::genIndices()
+void LLVertexBuffer::genIndices(U32 size)
{
+ mIndicesSize = nhpo2(size);
+
if (mUsage == GL_STREAM_DRAW_ARB)
{
- mGLIndices = sStreamIBOPool.allocate();
- }
- else if (mUsage == GL_DYNAMIC_DRAW_ARB)
- {
- mGLIndices = sDynamicIBOPool.allocate();
+ mMappedIndexData = sStreamIBOPool.allocate(mGLIndices, mIndicesSize);
}
else
{
- BOOST_STATIC_ASSERT(sizeof(mGLBuffer) == sizeof(GLuint));
- glGenBuffersARB(1, (GLuint*)&mGLIndices);
+ mMappedIndexData = sDynamicIBOPool.allocate(mGLIndices, mIndicesSize);
}
+
sGLCount++;
}
@@ -572,16 +938,16 @@ void LLVertexBuffer::releaseBuffer()
{
if (mUsage == GL_STREAM_DRAW_ARB)
{
- sStreamVBOPool.release(mGLBuffer);
- }
- else if (mUsage == GL_DYNAMIC_DRAW_ARB)
- {
- sDynamicVBOPool.release(mGLBuffer);
+ sStreamVBOPool.release(mGLBuffer, mMappedData, mSize);
}
else
{
- sDeleteList.push_back(mGLBuffer);
+ sDynamicVBOPool.release(mGLBuffer, mMappedData, mSize);
}
+
+ mGLBuffer = 0;
+ mMappedData = NULL;
+
sGLCount--;
}
@@ -589,24 +955,23 @@ void LLVertexBuffer::releaseIndices()
{
if (mUsage == GL_STREAM_DRAW_ARB)
{
- sStreamIBOPool.release(mGLIndices);
- }
- else if (mUsage == GL_DYNAMIC_DRAW_ARB)
- {
- sDynamicIBOPool.release(mGLIndices);
+ sStreamIBOPool.release(mGLIndices, mMappedIndexData, mIndicesSize);
}
else
{
- sDeleteList.push_back(mGLIndices);
+ sDynamicIBOPool.release(mGLIndices, mMappedIndexData, mIndicesSize);
}
+
+ mGLIndices = 0;
+ mMappedIndexData = NULL;
+
sGLCount--;
}
-void LLVertexBuffer::createGLBuffer()
+void LLVertexBuffer::createGLBuffer(U32 size)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES);
- U32 size = getSize();
if (mGLBuffer)
{
destroyGLBuffer();
@@ -621,23 +986,21 @@ void LLVertexBuffer::createGLBuffer()
if (useVBOs())
{
- mMappedData = NULL;
- genBuffer();
- mResized = TRUE;
+ genBuffer(size);
}
else
{
static int gl_buffer_idx = 0;
mGLBuffer = ++gl_buffer_idx;
- mMappedData = (U8*) ll_aligned_malloc_16(size);
+ mMappedData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
+ mSize = size;
}
}
-void LLVertexBuffer::createGLIndices()
+void LLVertexBuffer::createGLIndices(U32 size)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES);
- U32 size = getIndicesSize();
-
+
if (mGLIndices)
{
destroyGLIndices();
@@ -657,15 +1020,14 @@ void LLVertexBuffer::createGLIndices()
{
//pad by another 16 bytes for VBO pointer adjustment
size += 16;
- mMappedIndexData = NULL;
- genIndices();
- mResized = TRUE;
+ genIndices(size);
}
else
{
- mMappedIndexData = (U8*) ll_aligned_malloc_16(size);
+ mMappedIndexData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
static int gl_buffer_idx = 0;
mGLIndices = ++gl_buffer_idx;
+ mIndicesSize = size;
}
}
@@ -676,22 +1038,14 @@ void LLVertexBuffer::destroyGLBuffer()
{
if (useVBOs())
{
- freeClientBuffer() ;
-
- if (mMappedData || mMappedIndexData)
- {
- llerrs << "Vertex buffer destroyed while mapped!" << llendl;
- }
releaseBuffer();
}
else
{
- ll_aligned_free_16(mMappedData);
+ FREE_MEM(sPrivatePoolp, mMappedData) ;
mMappedData = NULL;
mEmpty = TRUE;
}
-
- sAllocatedBytes -= getSize();
}
mGLBuffer = 0;
@@ -705,22 +1059,14 @@ void LLVertexBuffer::destroyGLIndices()
{
if (useVBOs())
{
- freeClientBuffer() ;
-
- if (mMappedData || mMappedIndexData)
- {
- llerrs << "Vertex buffer destroyed while mapped." << llendl;
- }
releaseIndices();
}
else
{
- ll_aligned_free_16(mMappedIndexData);
+ FREE_MEM(sPrivatePoolp, mMappedIndexData) ;
mMappedIndexData = NULL;
mEmpty = TRUE;
}
-
- sAllocatedBytes -= getIndicesSize();
}
mGLIndices = 0;
@@ -739,23 +1085,14 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
nverts = 65535;
}
- mRequestedNumVerts = nverts;
+ U32 needed_size = calcOffsets(mTypeMask, mOffsets, nverts);
- if (!mDynamicSize)
+ if (needed_size > mSize || needed_size <= mSize/2)
{
- mNumVerts = nverts;
+ createGLBuffer(needed_size);
}
- else if (mUsage == GL_STATIC_DRAW_ARB ||
- nverts > mNumVerts ||
- nverts < mNumVerts/2)
- {
- if (mUsage != GL_STATIC_DRAW_ARB && nverts + nverts/4 <= 65535)
- {
- nverts += nverts/4;
- }
- mNumVerts = nverts;
- }
- mSize = calcOffsets(mTypeMask, mOffsets, mNumVerts);
+
+ mNumVerts = nverts;
}
void LLVertexBuffer::updateNumIndices(S32 nindices)
@@ -764,28 +1101,22 @@ void LLVertexBuffer::updateNumIndices(S32 nindices)
llassert(nindices >= 0);
- mRequestedNumIndices = nindices;
- if (!mDynamicSize)
+ U32 needed_size = sizeof(U16) * nindices;
+
+ if (needed_size > mIndicesSize || needed_size <= mIndicesSize/2)
{
- mNumIndices = nindices;
+ createGLIndices(needed_size);
}
- else if (mUsage == GL_STATIC_DRAW_ARB ||
- nindices > mNumIndices ||
- nindices < mNumIndices/2)
- {
- if (mUsage != GL_STATIC_DRAW_ARB)
- {
- nindices += nindices/4;
- }
- mNumIndices = nindices;
- }
+ mNumIndices = nindices;
}
void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER);
-
+
+ stop_glerror();
+
if (nverts < 0 || nindices < 0 ||
nverts > 65536)
{
@@ -795,96 +1126,127 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
updateNumVerts(nverts);
updateNumIndices(nindices);
- if (mMappedData)
- {
- llerrs << "LLVertexBuffer::allocateBuffer() called redundantly." << llendl;
- }
if (create && (nverts || nindices))
{
- createGLBuffer();
- createGLIndices();
+ //actually allocate space for the vertex buffer if using VBO mapping
+ flush();
+
+ if (gGLManager.mHasVertexArrayObject && useVBOs() && (LLRender::sGLCoreProfile || sUseVAO))
+ {
+#if GL_ARB_vertex_array_object
+ glGenVertexArrays(1, &mGLArray);
+#endif
+ setupVertexArray();
+ }
}
-
- sAllocatedBytes += getSize() + getIndicesSize();
}
-void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
-{
- llassert(newnverts >= 0);
- llassert(newnindices >= 0);
+static LLFastTimer::DeclareTimer FTM_SETUP_VERTEX_ARRAY("Setup VAO");
- mRequestedNumVerts = newnverts;
- mRequestedNumIndices = newnindices;
-
- LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER);
- mDynamicSize = TRUE;
- if (mUsage == GL_STATIC_DRAW_ARB)
- { //always delete/allocate static buffers on resize
- destroyGLBuffer();
- destroyGLIndices();
- allocateBuffer(newnverts, newnindices, TRUE);
- mFinal = FALSE;
- }
- else if (newnverts > mNumVerts || newnindices > mNumIndices ||
- newnverts < mNumVerts/2 || newnindices < mNumIndices/2)
+void LLVertexBuffer::setupVertexArray()
+{
+ if (!mGLArray)
{
- sAllocatedBytes -= getSize() + getIndicesSize();
-
- updateNumVerts(newnverts);
- updateNumIndices(newnindices);
-
- S32 newsize = getSize();
- S32 new_index_size = getIndicesSize();
-
- sAllocatedBytes += newsize + new_index_size;
+ return;
+ }
- if (newsize)
- {
- if (!mGLBuffer)
- { //no buffer exists, create a new one
- createGLBuffer();
- }
- else
- {
- if (!useVBOs())
- {
- ll_aligned_free_16(mMappedData);
- mMappedData = (U8*) ll_aligned_malloc_16(newsize);
- }
- mResized = TRUE;
- }
- }
- else if (mGLBuffer)
+ LLFastTimer t(FTM_SETUP_VERTEX_ARRAY);
+#if GL_ARB_vertex_array_object
+ glBindVertexArray(mGLArray);
+#endif
+ sGLRenderArray = mGLArray;
+
+ U32 attrib_size[] =
+ {
+ 3, //TYPE_VERTEX,
+ 3, //TYPE_NORMAL,
+ 2, //TYPE_TEXCOORD0,
+ 2, //TYPE_TEXCOORD1,
+ 2, //TYPE_TEXCOORD2,
+ 2, //TYPE_TEXCOORD3,
+ 4, //TYPE_COLOR,
+ 4, //TYPE_EMISSIVE,
+ 3, //TYPE_BINORMAL,
+ 1, //TYPE_WEIGHT,
+ 4, //TYPE_WEIGHT4,
+ 4, //TYPE_CLOTHWEIGHT,
+ 1, //TYPE_TEXTURE_INDEX
+ };
+
+ U32 attrib_type[] =
+ {
+ GL_FLOAT, //TYPE_VERTEX,
+ GL_FLOAT, //TYPE_NORMAL,
+ GL_FLOAT, //TYPE_TEXCOORD0,
+ GL_FLOAT, //TYPE_TEXCOORD1,
+ GL_FLOAT, //TYPE_TEXCOORD2,
+ GL_FLOAT, //TYPE_TEXCOORD3,
+ GL_UNSIGNED_BYTE, //TYPE_COLOR,
+ GL_UNSIGNED_BYTE, //TYPE_EMISSIVE,
+ GL_FLOAT, //TYPE_BINORMAL,
+ GL_FLOAT, //TYPE_WEIGHT,
+ GL_FLOAT, //TYPE_WEIGHT4,
+ GL_FLOAT, //TYPE_CLOTHWEIGHT,
+ GL_FLOAT, //TYPE_TEXTURE_INDEX
+ };
+
+ U32 attrib_normalized[] =
+ {
+ GL_FALSE, //TYPE_VERTEX,
+ GL_FALSE, //TYPE_NORMAL,
+ GL_FALSE, //TYPE_TEXCOORD0,
+ GL_FALSE, //TYPE_TEXCOORD1,
+ GL_FALSE, //TYPE_TEXCOORD2,
+ GL_FALSE, //TYPE_TEXCOORD3,
+ GL_TRUE, //TYPE_COLOR,
+ GL_TRUE, //TYPE_EMISSIVE,
+ GL_FALSE, //TYPE_BINORMAL,
+ GL_FALSE, //TYPE_WEIGHT,
+ GL_FALSE, //TYPE_WEIGHT4,
+ GL_FALSE, //TYPE_CLOTHWEIGHT,
+ GL_FALSE, //TYPE_TEXTURE_INDEX
+ };
+
+ bindGLBuffer(true);
+ bindGLIndices(true);
+
+ for (U32 i = 0; i < TYPE_MAX; ++i)
+ {
+ if (mTypeMask & (1 << i))
{
- destroyGLBuffer();
+ glEnableVertexAttribArrayARB(i);
+ glVertexAttribPointerARB(i, attrib_size[i], attrib_type[i], attrib_normalized[i], sTypeSize[i], (void*) mOffsets[i]);
}
-
- if (new_index_size)
- {
- if (!mGLIndices)
- {
- createGLIndices();
- }
- else
- {
- if (!useVBOs())
- {
- ll_aligned_free_16(mMappedIndexData);
- mMappedIndexData = (U8*) ll_aligned_malloc_16(new_index_size);
- }
- mResized = TRUE;
- }
- }
- else if (mGLIndices)
+ else
{
- destroyGLIndices();
+ glDisableVertexAttribArrayARB(i);
}
}
- if (mResized && useVBOs())
+ //draw a dummy triangle to set index array pointer
+ //glDrawElements(GL_TRIANGLES, 0, GL_UNSIGNED_SHORT, NULL);
+
+ unbind();
+}
+
+void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
+{
+ llassert(newnverts >= 0);
+ llassert(newnindices >= 0);
+
+ LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER);
+
+ updateNumVerts(newnverts);
+ updateNumIndices(newnindices);
+
+ if (useVBOs())
{
- freeClientBuffer() ;
- setBuffer(0);
+ flush();
+
+ if (mGLArray)
+ { //if size changed, offsets changed
+ setupVertexArray();
+ }
}
}
@@ -892,47 +1254,15 @@ BOOL LLVertexBuffer::useVBOs() const
{
//it's generally ineffective to use VBO for things that are streaming on apple
-#if LL_DARWIN
- if (!mUsage || mUsage == GL_STREAM_DRAW_ARB)
- {
- return FALSE;
- }
-#else
if (!mUsage)
{
return FALSE;
}
-#endif
+
return TRUE;
}
//----------------------------------------------------------------------------
-void LLVertexBuffer::freeClientBuffer()
-{
- if(useVBOs() && sDisableVBOMapping && (mMappedData || mMappedIndexData))
- {
- ll_aligned_free_16(mMappedData) ;
- ll_aligned_free_16(mMappedIndexData) ;
- mMappedData = NULL ;
- mMappedIndexData = NULL ;
- }
-}
-
-void LLVertexBuffer::allocateClientVertexBuffer()
-{
- if(!mMappedData)
- {
- mMappedData = (U8*)ll_aligned_malloc_16(getSize());
- }
-}
-
-void LLVertexBuffer::allocateClientIndexBuffer()
-{
- if(!mMappedIndexData)
- {
- mMappedIndexData = (U8*)ll_aligned_malloc_16(getIndicesSize());
- }
-}
bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count)
{
@@ -955,6 +1285,7 @@ bool expand_region(LLVertexBuffer::MappedRegion& region, S32 index, S32 count)
// Map for data access
U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
{
+ bindGLBuffer(true);
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
if (mFinal)
{
@@ -967,8 +1298,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
if (useVBOs())
{
-
- if (sDisableVBOMapping || gGLManager.mHasMapBufferRange)
+ if (sDisableVBOMapping || gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange)
{
if (count == -1)
{
@@ -1006,41 +1336,73 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
if (!mVertexLocked)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES);
- setBuffer(0, type);
mVertexLocked = TRUE;
+ sMappedCount++;
stop_glerror();
if(sDisableVBOMapping)
{
map_range = false;
- allocateClientVertexBuffer() ;
}
else
{
U8* src = NULL;
-#ifdef GL_ARB_map_buffer_range
+ waitFence();
if (gGLManager.mHasMapBufferRange)
{
if (map_range)
{
+#ifdef GL_ARB_map_buffer_range
S32 offset = mOffsets[type] + sTypeSize[type]*index;
S32 length = (sTypeSize[type]*count+0xF) & ~0xF;
- src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_INVALIDATE_RANGE_BIT);
+ src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, offset, length,
+ GL_MAP_WRITE_BIT |
+ GL_MAP_FLUSH_EXPLICIT_BIT |
+ GL_MAP_INVALIDATE_RANGE_BIT);
+#endif
}
else
{
- src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT);
+#ifdef GL_ARB_map_buffer_range
+
+ if (gDebugGL)
+ {
+ GLint size = 0;
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size);
+
+ if (size < mSize)
+ {
+ llerrs << "Invalid buffer size." << llendl;
+ }
+ }
+
+ src = (U8*) glMapBufferRange(GL_ARRAY_BUFFER_ARB, 0, mSize,
+ GL_MAP_WRITE_BIT |
+ GL_MAP_FLUSH_EXPLICIT_BIT);
+#endif
+ }
+ }
+ else if (gGLManager.mHasFlushBufferRange)
+ {
+ if (map_range)
+ {
+ glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
+ glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
+ src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ }
+ else
+ {
+ src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
}
else
-#else
- llassert_always(!gGLManager.mHasMapBufferRange);
-#endif
{
map_range = false;
src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
+ llassert(src != NULL);
+
mMappedData = LL_NEXT_ALIGNED_ADDRESS<U8>(src);
mAlignedOffset = mMappedData - src;
@@ -1051,12 +1413,9 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
{
log_glerror();
- //check the availability of memory
- U32 avail_phy_mem, avail_vir_mem;
- LLMemoryInfo::getAvailableMemoryKB(avail_phy_mem, avail_vir_mem) ;
- llinfos << "Available physical mwmory(KB): " << avail_phy_mem << llendl ;
- llinfos << "Available virtual memory(KB): " << avail_vir_mem << llendl;
-
+ //check the availability of memory
+ LLMemory::logMemoryInfo(TRUE) ;
+
if(!sDisableVBOMapping)
{
//--------------------
@@ -1082,7 +1441,6 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
llerrs << "memory allocation for vertex data failed." << llendl ;
}
}
- sMappedCount++;
}
}
else
@@ -1090,7 +1448,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
map_range = false;
}
- if (map_range && !sDisableVBOMapping)
+ if (map_range && gGLManager.mHasMapBufferRange && !sDisableVBOMapping)
{
return mMappedData;
}
@@ -1103,6 +1461,7 @@ U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_ran
U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
+ bindGLIndices(true);
if (mFinal)
{
llerrs << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << llendl;
@@ -1114,7 +1473,7 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
if (useVBOs())
{
- if (sDisableVBOMapping || gGLManager.mHasMapBufferRange)
+ if (sDisableVBOMapping || gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange)
{
if (count == -1)
{
@@ -1150,41 +1509,73 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES);
- setBuffer(0, TYPE_INDEX);
mIndexLocked = TRUE;
+ sMappedCount++;
stop_glerror();
+ if (gDebugGL && useVBOs())
+ {
+ GLint elem = 0;
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &elem);
+
+ if (elem != mGLIndices)
+ {
+ llerrs << "Wrong index buffer bound!" << llendl;
+ }
+ }
+
if(sDisableVBOMapping)
{
map_range = false;
- allocateClientIndexBuffer() ;
}
else
{
U8* src = NULL;
-#ifdef GL_ARB_map_buffer_range
+ waitFence();
if (gGLManager.mHasMapBufferRange)
{
if (map_range)
{
+#ifdef GL_ARB_map_buffer_range
S32 offset = sizeof(U16)*index;
S32 length = sizeof(U16)*count;
- src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_INVALIDATE_RANGE_BIT);
+ src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length,
+ GL_MAP_WRITE_BIT |
+ GL_MAP_FLUSH_EXPLICIT_BIT |
+ GL_MAP_INVALIDATE_RANGE_BIT);
+#endif
+ }
+ else
+ {
+#ifdef GL_ARB_map_buffer_range
+ src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices,
+ GL_MAP_WRITE_BIT |
+ GL_MAP_FLUSH_EXPLICIT_BIT);
+#endif
+ }
+ }
+ else if (gGLManager.mHasFlushBufferRange)
+ {
+ if (map_range)
+ {
+ glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
+ glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
+ src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
else
{
- src = (U8*) glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, sizeof(U16)*mNumIndices, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT);
+ src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
}
else
-#else
- llassert_always(!gGLManager.mHasMapBufferRange);
-#endif
{
map_range = false;
src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
+ llassert(src != NULL);
+
+
mMappedIndexData = src; //LL_NEXT_ALIGNED_ADDRESS<U8>(src);
mAlignedIndexOffset = mMappedIndexData - src;
stop_glerror();
@@ -1194,6 +1585,7 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
if (!mMappedIndexData)
{
log_glerror();
+ LLMemory::logMemoryInfo(TRUE) ;
if(!sDisableVBOMapping)
{
@@ -1211,15 +1603,13 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
llerrs << "memory allocation for Index data failed. " << llendl ;
}
}
-
- sMappedCount++;
}
else
{
map_range = false;
}
- if (map_range && !sDisableVBOMapping)
+ if (map_range && gGLManager.mHasMapBufferRange && !sDisableVBOMapping)
{
return mMappedIndexData;
}
@@ -1229,19 +1619,20 @@ U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
}
}
-void LLVertexBuffer::unmapBuffer(S32 type)
+void LLVertexBuffer::unmapBuffer()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER);
- if (!useVBOs() || type == -2)
+ if (!useVBOs())
{
return ; //nothing to unmap
}
bool updated_all = false ;
- if (mMappedData && mVertexLocked && type != TYPE_INDEX)
+ if (mMappedData && mVertexLocked)
{
- updated_all = (mIndexLocked && type < 0) ; //both vertex and index buffers done updating
+ bindGLBuffer(true);
+ updated_all = mIndexLocked; //both vertex and index buffers done updating
if(sDisableVBOMapping)
{
@@ -1268,8 +1659,7 @@ void LLVertexBuffer::unmapBuffer(S32 type)
}
else
{
-#ifdef GL_ARB_map_buffer_range
- if (gGLManager.mHasMapBufferRange)
+ if (gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange)
{
if (!mMappedVertexRegions.empty())
{
@@ -1279,16 +1669,22 @@ void LLVertexBuffer::unmapBuffer(S32 type)
const MappedRegion& region = mMappedVertexRegions[i];
S32 offset = region.mIndex >= 0 ? mOffsets[region.mType]+sTypeSize[region.mType]*region.mIndex : 0;
S32 length = sTypeSize[region.mType]*region.mCount;
- glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length);
+ if (gGLManager.mHasMapBufferRange)
+ {
+#ifdef GL_ARB_map_buffer_range
+ glFlushMappedBufferRange(GL_ARRAY_BUFFER_ARB, offset, length);
+#endif
+ }
+ else if (gGLManager.mHasFlushBufferRange)
+ {
+ glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER_ARB, offset, length);
+ }
stop_glerror();
}
mMappedVertexRegions.clear();
}
}
-#else
- llassert_always(!gGLManager.mHasMapBufferRange);
-#endif
stop_glerror();
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
stop_glerror();
@@ -1300,8 +1696,9 @@ void LLVertexBuffer::unmapBuffer(S32 type)
sMappedCount--;
}
- if (mMappedIndexData && mIndexLocked && (type < 0 || type == TYPE_INDEX))
+ if (mMappedIndexData && mIndexLocked)
{
+ bindGLIndices();
if(sDisableVBOMapping)
{
if (!mMappedIndexRegions.empty())
@@ -1326,8 +1723,7 @@ void LLVertexBuffer::unmapBuffer(S32 type)
}
else
{
-#ifdef GL_ARB_map_buffer_range
- if (gGLManager.mHasMapBufferRange)
+ if (gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange)
{
if (!mMappedIndexRegions.empty())
{
@@ -1336,16 +1732,24 @@ void LLVertexBuffer::unmapBuffer(S32 type)
const MappedRegion& region = mMappedIndexRegions[i];
S32 offset = region.mIndex >= 0 ? sizeof(U16)*region.mIndex : 0;
S32 length = sizeof(U16)*region.mCount;
- glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
+ if (gGLManager.mHasMapBufferRange)
+ {
+#ifdef GL_ARB_map_buffer_range
+ glFlushMappedBufferRange(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
+#endif
+ }
+ else if (gGLManager.mHasFlushBufferRange)
+ {
+#ifdef GL_APPLE_flush_buffer_range
+ glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
+#endif
+ }
stop_glerror();
}
mMappedIndexRegions.clear();
}
}
-#else
- llassert_always(!gGLManager.mHasMapBufferRange);
-#endif
stop_glerror();
glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB);
stop_glerror();
@@ -1359,21 +1763,7 @@ void LLVertexBuffer::unmapBuffer(S32 type)
if(updated_all)
{
- if(mUsage == GL_STATIC_DRAW_ARB)
- {
- //static draw buffers can only be mapped a single time
- //throw out client data (we won't be using it again)
- mEmpty = TRUE;
- mFinal = TRUE;
- if(sDisableVBOMapping)
- {
- freeClientBuffer() ;
- }
- }
- else
- {
- mEmpty = FALSE;
- }
+ mEmpty = FALSE;
}
}
@@ -1428,6 +1818,10 @@ bool LLVertexBuffer::getVertexStrider(LLStrider<LLVector3>& strider, S32 index,
{
return VertexBufferStrider<LLVector3,TYPE_VERTEX>::get(*this, strider, index, count, map_range);
}
+bool LLVertexBuffer::getVertexStrider(LLStrider<LLVector4a>& strider, S32 index, S32 count, bool map_range)
+{
+ return VertexBufferStrider<LLVector4a,TYPE_VERTEX>::get(*this, strider, index, count, map_range);
+}
bool LLVertexBuffer::getIndexStrider(LLStrider<U16>& strider, S32 index, S32 count, bool map_range)
{
return VertexBufferStrider<U16,TYPE_INDEX>::get(*this, strider, index, count, map_range);
@@ -1453,6 +1847,10 @@ bool LLVertexBuffer::getColorStrider(LLStrider<LLColor4U>& strider, S32 index, S
{
return VertexBufferStrider<LLColor4U,TYPE_COLOR>::get(*this, strider, index, count, map_range);
}
+bool LLVertexBuffer::getEmissiveStrider(LLStrider<LLColor4U>& strider, S32 index, S32 count, bool map_range)
+{
+ return VertexBufferStrider<LLColor4U,TYPE_EMISSIVE>::get(*this, strider, index, count, map_range);
+}
bool LLVertexBuffer::getWeightStrider(LLStrider<F32>& strider, S32 index, S32 count, bool map_range)
{
return VertexBufferStrider<F32,TYPE_WEIGHT>::get(*this, strider, index, count, map_range);
@@ -1470,43 +1868,151 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 in
//----------------------------------------------------------------------------
+static LLFastTimer::DeclareTimer FTM_BIND_GL_ARRAY("Bind Array");
+bool LLVertexBuffer::bindGLArray()
+{
+ if (mGLArray && sGLRenderArray != mGLArray)
+ {
+ {
+ LLFastTimer t(FTM_BIND_GL_ARRAY);
+#if GL_ARB_vertex_array_object
+ glBindVertexArray(mGLArray);
+#endif
+ sGLRenderArray = mGLArray;
+ }
+
+ //really shouldn't be necessary, but some drivers don't properly restore the
+ //state of GL_ELEMENT_ARRAY_BUFFER_BINDING
+ bindGLIndices();
+
+ return true;
+ }
+
+ return false;
+}
+
+static LLFastTimer::DeclareTimer FTM_BIND_GL_BUFFER("Bind Buffer");
+
+bool LLVertexBuffer::bindGLBuffer(bool force_bind)
+{
+ bindGLArray();
+
+ bool ret = false;
+
+ if (useVBOs() && (force_bind || (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive))))
+ {
+ LLFastTimer t(FTM_BIND_GL_BUFFER);
+ /*if (sMapped)
+ {
+ llerrs << "VBO bound while another VBO mapped!" << llendl;
+ }*/
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer);
+ sGLRenderBuffer = mGLBuffer;
+ sBindCount++;
+ sVBOActive = TRUE;
+
+ if (mGLArray)
+ {
+ llassert(sGLRenderArray == mGLArray);
+ //mCachedRenderBuffer = mGLBuffer;
+ }
+
+ ret = true;
+ }
+
+ return ret;
+}
+
+static LLFastTimer::DeclareTimer FTM_BIND_GL_INDICES("Bind Indices");
+
+bool LLVertexBuffer::bindGLIndices(bool force_bind)
+{
+ bindGLArray();
+
+ bool ret = false;
+ if (useVBOs() && (force_bind || (mGLIndices && (mGLIndices != sGLRenderIndices || !sIBOActive))))
+ {
+ LLFastTimer t(FTM_BIND_GL_INDICES);
+ /*if (sMapped)
+ {
+ llerrs << "VBO bound while another VBO mapped!" << llendl;
+ }*/
+ glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices);
+ sGLRenderIndices = mGLIndices;
+ stop_glerror();
+ sBindCount++;
+ sIBOActive = TRUE;
+ ret = true;
+ }
+
+ return ret;
+}
+
+void LLVertexBuffer::flush()
+{
+ if (useVBOs())
+ {
+ unmapBuffer();
+ }
+}
+
// Set for rendering
-void LLVertexBuffer::setBuffer(U32 data_mask, S32 type)
+void LLVertexBuffer::setBuffer(U32 data_mask)
{
+ flush();
+
LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER);
//set up pointers if the data mask is different ...
BOOL setup = (sLastMask != data_mask);
+ if (gDebugGL && data_mask != 0)
+ { //make sure data requirements are fulfilled
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ if (shader)
+ {
+ U32 required_mask = 0;
+ for (U32 i = 0; i < LLVertexBuffer::TYPE_TEXTURE_INDEX; ++i)
+ {
+ if (shader->getAttribLocation(i) > -1)
+ {
+ U32 required = 1 << i;
+ if ((data_mask & required) == 0)
+ {
+ llwarns << "Missing attribute: " << LLShaderMgr::instance()->mReservedAttribs[i] << llendl;
+ }
+
+ required_mask |= required;
+ }
+ }
+
+ if ((data_mask & required_mask) != required_mask)
+ {
+ llerrs << "Shader consumption mismatches data provision." << llendl;
+ }
+ }
+ }
+
if (useVBOs())
{
- if (mGLBuffer && (mGLBuffer != sGLRenderBuffer || !sVBOActive))
+ if (mGLArray)
{
- /*if (sMapped)
- {
- llerrs << "VBO bound while another VBO mapped!" << llendl;
- }*/
- stop_glerror();
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, mGLBuffer);
- stop_glerror();
- sBindCount++;
- sVBOActive = TRUE;
- setup = TRUE; // ... or the bound buffer changed
+ bindGLArray();
+ setup = FALSE; //do NOT perform pointer setup if using VAO
}
- if (mGLIndices && (mGLIndices != sGLRenderIndices || !sIBOActive))
+ else
{
- /*if (sMapped)
+ if (bindGLBuffer())
{
- llerrs << "VBO bound while another VBO mapped!" << llendl;
- }*/
- stop_glerror();
- glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mGLIndices);
- stop_glerror();
- sBindCount++;
- sIBOActive = TRUE;
+ setup = TRUE;
+ }
+ if (bindGLIndices())
+ {
+ setup = TRUE;
+ }
}
-
+
BOOL error = FALSE;
- if (gDebugGL)
+ if (gDebugGL && !mGLArray)
{
GLint buff;
glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
@@ -1541,81 +2047,20 @@ void LLVertexBuffer::setBuffer(U32 data_mask, S32 type)
}
}
- if (mResized)
+
+ }
+ else
+ {
+ if (sGLRenderArray)
{
- if (gDebugGL)
- {
- GLint buff;
- glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff);
- if ((GLuint)buff != mGLBuffer)
- {
- if (gDebugSession)
- {
- error = TRUE;
- gFailLog << "Invalid GL vertex buffer bound: " << std::endl;
- }
- else
- {
- llerrs << "Invalid GL vertex buffer bound: " << buff << llendl;
- }
- }
-
- if (mGLIndices != 0)
- {
- glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff);
- if ((GLuint)buff != mGLIndices)
- {
- if (gDebugSession)
- {
- error = TRUE;
- gFailLog << "Invalid GL index buffer bound: "<< std::endl;
- }
- else
- {
- llerrs << "Invalid GL index buffer bound: " << buff << llendl;
- }
- }
- }
- }
-
- if (mGLBuffer)
- {
- stop_glerror();
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, getSize(), NULL, mUsage);
- stop_glerror();
- }
- if (mGLIndices)
- {
- stop_glerror();
- glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, getIndicesSize(), NULL, mUsage);
- stop_glerror();
- }
-
- mEmpty = TRUE;
- mResized = FALSE;
-
- if (data_mask != 0)
- {
- if (gDebugSession)
- {
- error = TRUE;
- gFailLog << "Buffer set for rendering before being filled after resize." << std::endl;
- }
- else
- {
- llerrs << "Buffer set for rendering before being filled after resize." << llendl;
- }
- }
+#if GL_ARB_vertex_array_object
+ glBindVertexArray(0);
+#endif
+ sGLRenderArray = 0;
+ sGLRenderIndices = 0;
+ sIBOActive = FALSE;
}
- if (error)
- {
- ll_fail("LLVertexBuffer::mapBuffer failed");
- }
- unmapBuffer(type);
- }
- else
- {
if (mGLBuffer)
{
if (sVBOActive)
@@ -1627,30 +2072,30 @@ void LLVertexBuffer::setBuffer(U32 data_mask, S32 type)
}
if (sGLRenderBuffer != mGLBuffer)
{
+ sGLRenderBuffer = mGLBuffer;
setup = TRUE; // ... or a client memory pointer changed
}
}
- if (mGLIndices && sIBOActive)
+ if (mGLIndices)
{
- /*if (sMapped)
+ if (sIBOActive)
{
- llerrs << "VBO unbound while potentially mapped!" << llendl;
- }*/
- glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
- sBindCount++;
- sIBOActive = FALSE;
+ glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
+ sBindCount++;
+ sIBOActive = FALSE;
+ }
+
+ sGLRenderIndices = mGLIndices;
}
}
- setupClientArrays(data_mask);
-
- if (mGLIndices)
+ if (!mGLArray)
{
- sGLRenderIndices = mGLIndices;
+ setupClientArrays(data_mask);
}
+
if (mGLBuffer)
{
- sGLRenderBuffer = mGLBuffer;
if (data_mask && setup)
{
setupVertexBuffer(data_mask); // subclass specific setup (virtual function)
@@ -1660,80 +2105,150 @@ void LLVertexBuffer::setBuffer(U32 data_mask, S32 type)
}
// virtual (default)
-void LLVertexBuffer::setupVertexBuffer(U32 data_mask) const
+void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER);
stop_glerror();
U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;
- if ((data_mask & mTypeMask) != data_mask)
+ /*if ((data_mask & mTypeMask) != data_mask)
{
llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl;
- }
-
- if (data_mask & MAP_NORMAL)
- {
- glNormalPointer(GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_NORMAL], (void*)(base + mOffsets[TYPE_NORMAL]));
- }
- if (data_mask & MAP_TEXCOORD3)
- {
- glClientActiveTextureARB(GL_TEXTURE3_ARB);
- glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], (void*)(base + mOffsets[TYPE_TEXCOORD3]));
- glClientActiveTextureARB(GL_TEXTURE0_ARB);
- }
- if (data_mask & MAP_TEXCOORD2)
- {
- glClientActiveTextureARB(GL_TEXTURE2_ARB);
- glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], (void*)(base + mOffsets[TYPE_TEXCOORD2]));
- glClientActiveTextureARB(GL_TEXTURE0_ARB);
- }
- if (data_mask & MAP_TEXCOORD1)
- {
- glClientActiveTextureARB(GL_TEXTURE1_ARB);
- glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], (void*)(base + mOffsets[TYPE_TEXCOORD1]));
- glClientActiveTextureARB(GL_TEXTURE0_ARB);
- }
- if (data_mask & MAP_BINORMAL)
- {
- glClientActiveTextureARB(GL_TEXTURE2_ARB);
- glTexCoordPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_BINORMAL], (void*)(base + mOffsets[TYPE_BINORMAL]));
- glClientActiveTextureARB(GL_TEXTURE0_ARB);
- }
- if (data_mask & MAP_TEXCOORD0)
- {
- glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], (void*)(base + mOffsets[TYPE_TEXCOORD0]));
- }
- if (data_mask & MAP_COLOR)
- {
- glColorPointer(4, GL_UNSIGNED_BYTE, LLVertexBuffer::sTypeSize[TYPE_COLOR], (void*)(base + mOffsets[TYPE_COLOR]));
- }
-
- if (data_mask & MAP_WEIGHT)
- {
- glVertexAttribPointerARB(1, 1, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], (void*)(base + mOffsets[TYPE_WEIGHT]));
- }
-
- if (data_mask & MAP_WEIGHT4 && sWeight4Loc != -1)
- {
- glVertexAttribPointerARB(sWeight4Loc, 4, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], (void*)(base+mOffsets[TYPE_WEIGHT4]));
- }
+ }*/
- if (data_mask & MAP_CLOTHWEIGHT)
- {
- glVertexAttribPointerARB(4, 4, GL_FLOAT, TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]));
- }
- if (data_mask & MAP_VERTEX)
+ if (LLGLSLShader::sNoFixedFunction)
{
+ if (data_mask & MAP_NORMAL)
+ {
+ S32 loc = TYPE_NORMAL;
+ void* ptr = (void*)(base + mOffsets[TYPE_NORMAL]);
+ glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL], ptr);
+ }
+ if (data_mask & MAP_TEXCOORD3)
+ {
+ S32 loc = TYPE_TEXCOORD3;
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD3]);
+ glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], ptr);
+ }
+ if (data_mask & MAP_TEXCOORD2)
+ {
+ S32 loc = TYPE_TEXCOORD2;
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD2]);
+ glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], ptr);
+ }
+ if (data_mask & MAP_TEXCOORD1)
+ {
+ S32 loc = TYPE_TEXCOORD1;
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD1]);
+ glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], ptr);
+ }
+ if (data_mask & MAP_BINORMAL)
+ {
+ S32 loc = TYPE_BINORMAL;
+ void* ptr = (void*)(base + mOffsets[TYPE_BINORMAL]);
+ glVertexAttribPointerARB(loc, 3,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_BINORMAL], ptr);
+ }
+ if (data_mask & MAP_TEXCOORD0)
+ {
+ S32 loc = TYPE_TEXCOORD0;
+ void* ptr = (void*)(base + mOffsets[TYPE_TEXCOORD0]);
+ glVertexAttribPointerARB(loc,2,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], ptr);
+ }
+ if (data_mask & MAP_COLOR)
+ {
+ S32 loc = TYPE_COLOR;
+ void* ptr = (void*)(base + mOffsets[TYPE_COLOR]);
+ glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_COLOR], ptr);
+ }
+ if (data_mask & MAP_EMISSIVE)
+ {
+ S32 loc = TYPE_EMISSIVE;
+ void* ptr = (void*)(base + mOffsets[TYPE_EMISSIVE]);
+ glVertexAttribPointerARB(loc, 4, GL_UNSIGNED_BYTE, GL_TRUE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE], ptr);
+ }
+ if (data_mask & MAP_WEIGHT)
+ {
+ S32 loc = TYPE_WEIGHT;
+ void* ptr = (void*)(base + mOffsets[TYPE_WEIGHT]);
+ glVertexAttribPointerARB(loc, 1, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], ptr);
+ }
+ if (data_mask & MAP_WEIGHT4)
+ {
+ S32 loc = TYPE_WEIGHT4;
+ void* ptr = (void*)(base+mOffsets[TYPE_WEIGHT4]);
+ glVertexAttribPointerARB(loc, 4, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], ptr);
+ }
+ if (data_mask & MAP_CLOTHWEIGHT)
+ {
+ S32 loc = TYPE_CLOTHWEIGHT;
+ void* ptr = (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]);
+ glVertexAttribPointerARB(loc, 4, GL_FLOAT, TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], ptr);
+ }
if (data_mask & MAP_TEXTURE_INDEX)
{
- glVertexPointer(4,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
+ S32 loc = TYPE_TEXTURE_INDEX;
+ void *ptr = (void*) (base + mOffsets[TYPE_VERTEX] + 12);
+ glVertexAttribPointerARB(loc, 1, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
}
- else
+ if (data_mask & MAP_VERTEX)
{
- glVertexPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
+ S32 loc = TYPE_VERTEX;
+ void* ptr = (void*)(base + mOffsets[TYPE_VERTEX]);
+ glVertexAttribPointerARB(loc, 3,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
+ }
+ }
+ else
+ {
+ if (data_mask & MAP_NORMAL)
+ {
+ glNormalPointer(GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_NORMAL], (void*)(base + mOffsets[TYPE_NORMAL]));
}
+ if (data_mask & MAP_TEXCOORD3)
+ {
+ glClientActiveTextureARB(GL_TEXTURE3_ARB);
+ glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD3], (void*)(base + mOffsets[TYPE_TEXCOORD3]));
+ glClientActiveTextureARB(GL_TEXTURE0_ARB);
+ }
+ if (data_mask & MAP_TEXCOORD2)
+ {
+ glClientActiveTextureARB(GL_TEXTURE2_ARB);
+ glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD2], (void*)(base + mOffsets[TYPE_TEXCOORD2]));
+ glClientActiveTextureARB(GL_TEXTURE0_ARB);
+ }
+ if (data_mask & MAP_TEXCOORD1)
+ {
+ glClientActiveTextureARB(GL_TEXTURE1_ARB);
+ glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD1], (void*)(base + mOffsets[TYPE_TEXCOORD1]));
+ glClientActiveTextureARB(GL_TEXTURE0_ARB);
+ }
+ if (data_mask & MAP_BINORMAL)
+ {
+ glClientActiveTextureARB(GL_TEXTURE2_ARB);
+ glTexCoordPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_BINORMAL], (void*)(base + mOffsets[TYPE_BINORMAL]));
+ glClientActiveTextureARB(GL_TEXTURE0_ARB);
+ }
+ if (data_mask & MAP_TEXCOORD0)
+ {
+ glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_TEXCOORD0], (void*)(base + mOffsets[TYPE_TEXCOORD0]));
+ }
+ if (data_mask & MAP_COLOR)
+ {
+ glColorPointer(4, GL_UNSIGNED_BYTE, LLVertexBuffer::sTypeSize[TYPE_COLOR], (void*)(base + mOffsets[TYPE_COLOR]));
+ }
+ if (data_mask & MAP_VERTEX)
+ {
+ glVertexPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
+ }
}
llglassertok();
}
+LLVertexBuffer::MappedRegion::MappedRegion(S32 type, S32 index, S32 count)
+: mType(type), mIndex(index), mCount(count)
+{
+ llassert(mType == LLVertexBuffer::TYPE_INDEX ||
+ mType < LLVertexBuffer::TYPE_TEXTURE_INDEX);
+}
+
+
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index aa5df305a6..3e6f6a959a 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -38,6 +38,8 @@
#include <vector>
#include <list>
+#define LL_MAX_VERTEX_ATTRIB_LOCATION 64
+
//============================================================================
// NOTES
// Threading:
@@ -49,31 +51,44 @@
//============================================================================
// gl name pools for dynamic and streaming buffers
-
-class LLVBOPool : public LLGLNamePool
+class LLVBOPool
{
-protected:
- virtual GLuint allocateName()
- {
- GLuint name;
- stop_glerror();
- glGenBuffersARB(1, &name);
- stop_glerror();
- return name;
- }
+public:
+ static U32 sBytesPooled;
+
+ U32 mUsage;
+ U32 mType;
+
+ //size MUST be a power of 2
+ U8* allocate(U32& name, U32 size);
+
+ //size MUST be the size provided to allocate that returned the given name
+ void release(U32 name, U8* buffer, U32 size);
+
+ //destroy all records in mFreeList
+ void cleanup();
- virtual void releaseName(GLuint name)
+ class Record
{
- stop_glerror();
- glDeleteBuffersARB(1, &name);
- stop_glerror();
- }
+ public:
+ U32 mGLName;
+ U8* mClientData;
+ };
+
+ typedef std::list<Record> record_list_t;
+ std::vector<record_list_t> mFreeList;
};
+class LLGLFence
+{
+public:
+ virtual void placeFence() = 0;
+ virtual void wait() = 0;
+};
//============================================================================
// base class
-
+class LLPrivateMemoryPool ;
class LLVertexBuffer : public LLRefCount
{
public:
@@ -84,9 +99,7 @@ public:
S32 mIndex;
S32 mCount;
- MappedRegion(S32 type, S32 index, S32 count)
- : mType(type), mIndex(index), mCount(count)
- { }
+ MappedRegion(S32 type, S32 index, S32 count);
};
LLVertexBuffer(const LLVertexBuffer& rhs)
@@ -105,18 +118,17 @@ public:
static LLVBOPool sStreamIBOPool;
static LLVBOPool sDynamicIBOPool;
- static S32 sWeight4Loc;
-
static BOOL sUseStreamDraw;
+ static BOOL sUseVAO;
static BOOL sPreferStreamDraw;
static void initClass(bool use_vbo, bool no_vbo_mapping);
static void cleanupClass();
static void setupClientArrays(U32 data_mask);
static void drawArrays(U32 mode, const std::vector<LLVector3>& pos, const std::vector<LLVector3>& norm);
+ static void drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp);
- static void clientCopy(F64 max_time = 0.005); //copy data from client to GL
- static void unbind(); //unbind any bound vertex buffer
+ static void unbind(); //unbind any bound vertex buffer
//get the size of a vertex with the given typemask
static S32 calcVertexSize(const U32& typemask);
@@ -127,24 +139,29 @@ public:
static S32 calcOffsets(const U32& typemask, S32* offsets, S32 num_vertices);
+ //WARNING -- when updating these enums you MUST
+ // 1 - update LLVertexBuffer::sTypeSize
+ // 2 - add a strider accessor
+ // 3 - modify LLVertexBuffer::setupVertexBuffer
+ // 4 - modify LLVertexBuffer::setupClientArray
+ // 5 - modify LLViewerShaderMgr::mReservedAttribs
+ // 6 - update LLVertexBuffer::setupVertexArray
enum {
- TYPE_VERTEX,
+ TYPE_VERTEX = 0,
TYPE_NORMAL,
TYPE_TEXCOORD0,
TYPE_TEXCOORD1,
TYPE_TEXCOORD2,
TYPE_TEXCOORD3,
TYPE_COLOR,
- // These use VertexAttribPointer and should possibly be made generic
+ TYPE_EMISSIVE,
TYPE_BINORMAL,
TYPE_WEIGHT,
TYPE_WEIGHT4,
TYPE_CLOTHWEIGHT,
- TYPE_MAX,
- TYPE_INDEX,
-
- //no actual additional data, but indicates position.w is texture index
TYPE_TEXTURE_INDEX,
+ TYPE_MAX,
+ TYPE_INDEX,
};
enum {
MAP_VERTEX = (1<<TYPE_VERTEX),
@@ -154,6 +171,7 @@ public:
MAP_TEXCOORD2 = (1<<TYPE_TEXCOORD2),
MAP_TEXCOORD3 = (1<<TYPE_TEXCOORD3),
MAP_COLOR = (1<<TYPE_COLOR),
+ MAP_EMISSIVE = (1<<TYPE_EMISSIVE),
// These use VertexAttribPointer and should possibly be made generic
MAP_BINORMAL = (1<<TYPE_BINORMAL),
MAP_WEIGHT = (1<<TYPE_WEIGHT),
@@ -167,24 +185,25 @@ protected:
virtual ~LLVertexBuffer(); // use unref()
- virtual void setupVertexBuffer(U32 data_mask) const; // pure virtual, called from mapBuffer()
+ virtual void setupVertexBuffer(U32 data_mask); // pure virtual, called from mapBuffer()
+ void setupVertexArray();
- void genBuffer();
- void genIndices();
+ void genBuffer(U32 size);
+ void genIndices(U32 size);
+ bool bindGLBuffer(bool force_bind = false);
+ bool bindGLIndices(bool force_bind = false);
+ bool bindGLArray();
void releaseBuffer();
void releaseIndices();
- void createGLBuffer();
- void createGLIndices();
+ void createGLBuffer(U32 size);
+ void createGLIndices(U32 size);
void destroyGLBuffer();
void destroyGLIndices();
void updateNumVerts(S32 nverts);
void updateNumIndices(S32 nindices);
virtual BOOL useVBOs() const;
- void unmapBuffer(S32 type);
- void freeClientBuffer() ;
- void allocateClientVertexBuffer() ;
- void allocateClientIndexBuffer() ;
-
+ void unmapBuffer();
+
public:
LLVertexBuffer(U32 typemask, S32 usage);
@@ -193,7 +212,8 @@ public:
U8* mapIndexBuffer(S32 index, S32 count, bool map_range);
// set for rendering
- virtual void setBuffer(U32 data_mask, S32 type = -1); // calls setupVertexBuffer() if data_mask is not 0
+ virtual void setBuffer(U32 data_mask); // calls setupVertexBuffer() if data_mask is not 0
+ void flush(); //flush pending data to GL memory
// allocate buffer
void allocateBuffer(S32 nverts, S32 nindices, bool create);
virtual void resizeBuffer(S32 newnverts, S32 newnindices);
@@ -206,29 +226,30 @@ public:
// setVertsNorms(verts, norms);
// vb->unmapBuffer();
bool getVertexStrider(LLStrider<LLVector3>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getVertexStrider(LLStrider<LLVector4a>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getIndexStrider(LLStrider<U16>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getTexCoord0Strider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getTexCoord1Strider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getNormalStrider(LLStrider<LLVector3>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getBinormalStrider(LLStrider<LLVector3>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getColorStrider(LLStrider<LLColor4U>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+ bool getEmissiveStrider(LLStrider<LLColor4U>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getWeightStrider(LLStrider<F32>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getWeight4Strider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
+
BOOL isEmpty() const { return mEmpty; }
BOOL isLocked() const { return mVertexLocked || mIndexLocked; }
S32 getNumVerts() const { return mNumVerts; }
S32 getNumIndices() const { return mNumIndices; }
- S32 getRequestedVerts() const { return mRequestedNumVerts; }
- S32 getRequestedIndices() const { return mRequestedNumIndices; }
-
+
U8* getIndicesPointer() const { return useVBOs() ? (U8*) mAlignedIndexOffset : mMappedIndexData; }
U8* getVerticesPointer() const { return useVBOs() ? (U8*) mAlignedOffset : mMappedData; }
U32 getTypeMask() const { return mTypeMask; }
bool hasDataType(S32 type) const { return ((1 << type) & getTypeMask()); }
S32 getSize() const;
- S32 getIndicesSize() const { return mNumIndices * sizeof(U16); }
+ S32 getIndicesSize() const { return mIndicesSize; }
U8* getMappedData() const { return mMappedData; }
U8* getMappedIndices() const { return mMappedIndexData; }
S32 getOffset(S32 type) const { return mOffsets[type]; }
@@ -246,36 +267,42 @@ public:
protected:
S32 mNumVerts; // Number of vertices allocated
S32 mNumIndices; // Number of indices allocated
- S32 mRequestedNumVerts; // Number of vertices requested
- S32 mRequestedNumIndices; // Number of indices requested
-
+
ptrdiff_t mAlignedOffset;
ptrdiff_t mAlignedIndexOffset;
S32 mSize;
+ S32 mIndicesSize;
U32 mTypeMask;
S32 mUsage; // GL usage
U32 mGLBuffer; // GL VBO handle
U32 mGLIndices; // GL IBO handle
+ U32 mGLArray; // GL VAO handle
+
U8* mMappedData; // pointer to currently mapped data (NULL if unmapped)
U8* mMappedIndexData; // pointer to currently mapped indices (NULL if unmapped)
BOOL mVertexLocked; // if TRUE, vertex buffer is being or has been written to in client memory
BOOL mIndexLocked; // if TRUE, index buffer is being or has been written to in client memory
BOOL mFinal; // if TRUE, buffer can not be mapped again
- BOOL mFilthy; // if TRUE, entire buffer must be copied (used to prevent redundant dirty flags)
BOOL mEmpty; // if TRUE, client buffer is empty (or NULL). Old values have been discarded.
- BOOL mResized; // if TRUE, client buffer has been resized and GL buffer has not
- BOOL mDynamicSize; // if TRUE, buffer has been resized at least once (and should be padded)
S32 mOffsets[TYPE_MAX];
std::vector<MappedRegion> mMappedVertexRegions;
std::vector<MappedRegion> mMappedIndexRegions;
+ mutable LLGLFence* mFence;
+
+ void placeFence() const;
+ void waitFence() const;
+
+
+private:
+ static LLPrivateMemoryPool* sPrivatePoolp ;
+
public:
static S32 sCount;
static S32 sGLCount;
static S32 sMappedCount;
static BOOL sMapped;
- static std::vector<U32> sDeleteList;
typedef std::list<LLVertexBuffer*> buffer_list_t;
static BOOL sDisableVBOMapping; //disable glMapBufferARB
@@ -283,6 +310,7 @@ public:
static S32 sTypeSize[TYPE_MAX];
static U32 sGLMode[LLRender::NUM_MODES];
static U32 sGLRenderBuffer;
+ static U32 sGLRenderArray;
static U32 sGLRenderIndices;
static BOOL sVBOActive;
static BOOL sIBOActive;
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 0bbdcfd6ff..772f173f17 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -5,6 +5,7 @@ project(llui)
include(00-Common)
include(LLCommon)
include(LLImage)
+include(LLInventory)
include(LLMath)
include(LLMessage)
include(LLRender)
@@ -16,6 +17,7 @@ include(LLXUIXML)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
${LLIMAGE_INCLUDE_DIRS}
+ ${LLINVENTORY_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
@@ -29,11 +31,13 @@ set(llui_SOURCE_FILES
llaccordionctrl.cpp
llaccordionctrltab.cpp
llbadge.cpp
+ llbadgeholder.cpp
llbadgeowner.cpp
llbutton.cpp
llcheckboxctrl.cpp
llclipboard.cpp
llcombobox.cpp
+ llcommandmanager.cpp
llconsole.cpp
llcontainerview.cpp
llctrlselectioninterface.cpp
@@ -98,6 +102,7 @@ set(llui_SOURCE_FILES
lltimectrl.cpp
lltransutil.cpp
lltoggleablemenu.cpp
+ lltoolbar.cpp
lltooltip.cpp
llui.cpp
lluicolortable.cpp
@@ -111,6 +116,7 @@ set(llui_SOURCE_FILES
llurlmatch.cpp
llurlregistry.cpp
llviewborder.cpp
+ llviewinject.cpp
llviewmodel.cpp
llview.cpp
llviewquery.cpp
@@ -123,12 +129,14 @@ set(llui_HEADER_FILES
llaccordionctrl.h
llaccordionctrltab.h
llbadge.h
+ llbadgeholder.h
llbadgeowner.h
llbutton.h
llcallbackmap.h
llcheckboxctrl.h
llclipboard.h
llcombobox.h
+ llcommandmanager.h
llconsole.h
llcontainerview.h
llctrlselectioninterface.h
@@ -165,7 +173,7 @@ set(llui_HEADER_FILES
llnotificationslistener.h
llnotificationsutil.h
llnotificationtemplate.h
- llnotificationvisibilityrule.h
+ llnotificationvisibilityrule.h
llpanel.h
llprogressbar.h
llradiogroup.h
@@ -198,6 +206,7 @@ set(llui_HEADER_FILES
lltextvalidate.h
lltimectrl.h
lltoggleablemenu.h
+ lltoolbar.h
lltooltip.h
lltransutil.h
lluicolortable.h
@@ -214,6 +223,7 @@ set(llui_HEADER_FILES
llurlmatch.h
llurlregistry.h
llviewborder.h
+ llviewinject.h
llviewmodel.h
llview.h
llviewquery.h
@@ -243,6 +253,7 @@ target_link_libraries(llui
${LLRENDER_LIBRARIES}
${LLWINDOW_LIBRARIES}
${LLIMAGE_LIBRARIES}
+ ${LLINVENTORY_LIBRARIES}
${LLVFS_LIBRARIES} # ugh, just for LLDir
${LLXUIXML_LIBRARIES}
${LLXML_LIBRARIES}
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 6afe276379..7a5f9f9fd6 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -339,7 +339,7 @@ LLAccordionCtrlTab::Params::Params()
,fit_panel("fit_panel",true)
,selection_enabled("selection_enabled", false)
{
- mouse_opaque(false);
+ changeDefault(mouse_opaque, false);
}
LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)
@@ -973,7 +973,7 @@ void LLAccordionCtrlTab::drawChild(const LLRect& root_rect,LLView* child)
if ( root_rect.overlaps(screen_rect) && LLUI::sDirtyRect.overlaps(screen_rect))
{
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
LLUI::pushMatrix();
{
LLUI::translate((F32)child->getRect().mLeft, (F32)child->getRect().mBottom, 0.f);
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index c28a947a7f..8ede4e3468 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -27,11 +27,14 @@
#define LLBADGE_CPP
#include "llbadge.h"
+#include "llscrollcontainer.h"
#include "lluictrlfactory.h"
static LLDefaultChildRegistry::Register<LLBadge> r("badge");
+static const S32 BADGE_OFFSET_NOT_SPECIFIED = 0x7FFFFFFF;
+
// Compiler optimization, generate extern template
template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, BOOL recurse) const;
@@ -43,15 +46,16 @@ LLBadge::Params::Params()
, image_color("image_color")
, label("label")
, label_color("label_color")
+ , label_offset_horiz("label_offset_horiz")
+ , label_offset_vert("label_offset_vert")
, location("location", LLRelPos::TOP_LEFT)
+ , location_offset_hcenter("location_offset_hcenter")
+ , location_offset_vcenter("location_offset_vcenter")
, location_percent_hcenter("location_percent_hcenter")
, location_percent_vcenter("location_percent_vcenter")
, padding_horiz("padding_horiz")
, padding_vert("padding_vert")
-{
- // We set a name here so the name isn't necessary in any xml files that use badges
- name = "badge";
-}
+{}
bool LLBadge::Params::equals(const Params& a) const
{
@@ -65,7 +69,11 @@ bool LLBadge::Params::equals(const Params& a) const
comp &= (image_color() == a.image_color());
comp &= (label() == a.label());
comp &= (label_color() == a.label_color());
+ comp &= (label_offset_horiz() == a.label_offset_horiz());
+ comp &= (label_offset_vert() == a.label_offset_vert());
comp &= (location() == a.location());
+ comp &= (location_offset_hcenter() == a.location_offset_hcenter());
+ comp &= (location_offset_vcenter() == a.location_offset_vcenter());
comp &= (location_percent_hcenter() == a.location_percent_hcenter());
comp &= (location_percent_vcenter() == a.location_percent_vcenter());
comp &= (padding_horiz() == a.padding_horiz());
@@ -84,17 +92,32 @@ LLBadge::LLBadge(const LLBadge::Params& p)
, mImageColor(p.image_color)
, mLabel(p.label)
, mLabelColor(p.label_color)
+ , mLabelOffsetHoriz(p.label_offset_horiz)
+ , mLabelOffsetVert(p.label_offset_vert)
, mLocation(p.location)
+ , mLocationOffsetHCenter(BADGE_OFFSET_NOT_SPECIFIED)
+ , mLocationOffsetVCenter(BADGE_OFFSET_NOT_SPECIFIED)
, mLocationPercentHCenter(0.5f)
, mLocationPercentVCenter(0.5f)
, mPaddingHoriz(p.padding_horiz)
, mPaddingVert(p.padding_vert)
+ , mParentScroller(NULL)
{
if (mImage.isNull())
{
llwarns << "Badge: " << getName() << " with no image!" << llendl;
}
+ if (p.location_offset_hcenter.isProvided())
+ {
+ mLocationOffsetHCenter = p.location_offset_hcenter();
+ }
+
+ if (p.location_offset_vcenter.isProvided())
+ {
+ mLocationOffsetVCenter = p.location_offset_vcenter();
+ }
+
//
// The following logic is to set the mLocationPercentHCenter and mLocationPercentVCenter
// based on the Location enum and our horizontal and vertical location percentages. The
@@ -131,6 +154,27 @@ LLBadge::~LLBadge()
{
}
+bool LLBadge::addToView(LLView * view)
+{
+ bool child_added = view->addChild(this);
+
+ if (child_added)
+ {
+ setShape(view->getLocalRect());
+
+ // Find a parent scroll container, if there is one in case we need it for positioning
+
+ LLView * parent = mOwner.get();
+
+ while ((parent != NULL) && ((mParentScroller = dynamic_cast<LLScrollContainer *>(parent)) == NULL))
+ {
+ parent = parent->getParent();
+ }
+ }
+
+ return child_added;
+}
+
void LLBadge::setLabel(const LLStringExplicit& label)
{
mLabel = label;
@@ -183,21 +227,11 @@ void LLBadge::draw()
if (owner_view)
{
//
- // Calculate badge position based on owner
- //
-
- LLRect owner_rect;
- owner_view->localRectToOtherView(owner_view->getLocalRect(), & owner_rect, this);
-
- F32 badge_center_x = owner_rect.mLeft + owner_rect.getWidth() * mLocationPercentHCenter;
- F32 badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
-
- //
// Calculate badge size based on label text
//
LLWString badge_label_wstring = mLabel;
-
+
S32 badge_label_begin_offset = 0;
S32 badge_char_length = S32_MAX;
S32 badge_pixel_length = S32_MAX;
@@ -210,6 +244,77 @@ void LLBadge::draw()
F32 badge_height = (2.0f * mPaddingVert) + mGLFont->getLineHeight();
//
+ // Calculate badge position based on owner
+ //
+
+ LLRect owner_rect;
+ owner_view->localRectToOtherView(owner_view->getLocalRect(), & owner_rect, this);
+
+ S32 location_offset_horiz = mLocationOffsetHCenter;
+ S32 location_offset_vert = mLocationOffsetVCenter;
+
+ // If we're in a scroll container, do some math to keep us in the same place on screen if applicable
+ if (mParentScroller != NULL)
+ {
+ LLRect visibleRect = mParentScroller->getVisibleContentRect();
+
+ if (mLocationOffsetHCenter != BADGE_OFFSET_NOT_SPECIFIED)
+ {
+ if (LLRelPos::IsRight(mLocation))
+ {
+ location_offset_horiz += visibleRect.mRight;
+ }
+ else if (LLRelPos::IsLeft(mLocation))
+ {
+ location_offset_horiz += visibleRect.mLeft;
+ }
+ else // center
+ {
+ location_offset_horiz += (visibleRect.mLeft + visibleRect.mRight) / 2;
+ }
+ }
+
+ if (mLocationOffsetVCenter != BADGE_OFFSET_NOT_SPECIFIED)
+ {
+ if (LLRelPos::IsTop(mLocation))
+ {
+ location_offset_vert += visibleRect.mTop;
+ }
+ else if (LLRelPos::IsBottom(mLocation))
+ {
+ location_offset_vert += visibleRect.mBottom;
+ }
+ else // center
+ {
+ location_offset_vert += (visibleRect.mBottom + visibleRect.mTop) / 2;
+ }
+ }
+ }
+
+ F32 badge_center_x;
+ F32 badge_center_y;
+
+ // Compute x position
+ if (mLocationOffsetHCenter == BADGE_OFFSET_NOT_SPECIFIED)
+ {
+ badge_center_x = owner_rect.mLeft + owner_rect.getWidth() * mLocationPercentHCenter;
+ }
+ else
+ {
+ badge_center_x = location_offset_horiz;
+ }
+
+ // Compute y position
+ if (mLocationOffsetVCenter == BADGE_OFFSET_NOT_SPECIFIED)
+ {
+ badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
+ }
+ else
+ {
+ badge_center_y = location_offset_vert;
+ }
+
+ //
// Draw button image, if available.
// Otherwise draw basic rectangular button.
//
@@ -241,8 +346,10 @@ void LLBadge::draw()
// Draw the label
//
- mGLFont->render(badge_label_wstring, badge_label_begin_offset,
- badge_center_x, badge_center_y,
+ mGLFont->render(badge_label_wstring,
+ badge_label_begin_offset,
+ badge_center_x + mLabelOffsetHoriz,
+ badge_center_y + mLabelOffsetVert,
mLabelColor % alpha,
LLFontGL::HCENTER, LLFontGL::VCENTER, // centered around the position
LLFontGL::NORMAL, // normal text (not bold, italics, etc.)
diff --git a/indra/llui/llbadge.h b/indra/llui/llbadge.h
index 0f923ef01b..4b21a71aaa 100644
--- a/indra/llui/llbadge.h
+++ b/indra/llui/llbadge.h
@@ -39,8 +39,9 @@
// Declarations
//
-class LLUICtrlFactory;
class LLFontGL;
+class LLScrollContainer;
+class LLUICtrlFactory;
//
// Relative Position Alignment
@@ -104,7 +105,12 @@ public:
Optional< std::string > label;
Optional< LLUIColor > label_color;
+ Optional< S32 > label_offset_horiz;
+ Optional< S32 > label_offset_vert;
+
Optional< LLRelPos::Location > location;
+ Optional< S32 > location_offset_hcenter;
+ Optional< S32 > location_offset_vcenter;
Optional< U32 > location_percent_hcenter;
Optional< U32 > location_percent_vcenter;
@@ -123,7 +129,9 @@ protected:
public:
~LLBadge();
-
+
+ bool addToView(LLView * view);
+
virtual void draw();
const std::string getLabel() const { return wstring_to_utf8str(mLabel); }
@@ -141,7 +149,12 @@ private:
LLUIString mLabel;
LLUIColor mLabelColor;
+ S32 mLabelOffsetHoriz;
+ S32 mLabelOffsetVert;
+
LLRelPos::Location mLocation;
+ S32 mLocationOffsetHCenter;
+ S32 mLocationOffsetVCenter;
F32 mLocationPercentHCenter;
F32 mLocationPercentVCenter;
@@ -149,6 +162,8 @@ private:
F32 mPaddingHoriz;
F32 mPaddingVert;
+
+ LLScrollContainer* mParentScroller;
};
// Build time optimization, generate once in .cpp file
diff --git a/indra/llui/llbadgeholder.cpp b/indra/llui/llbadgeholder.cpp
new file mode 100644
index 0000000000..1f786f36ae
--- /dev/null
+++ b/indra/llui/llbadgeholder.cpp
@@ -0,0 +1,45 @@
+/**
+ * @file llbadgeholder.cpp
+ * @brief Source for badge holders
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llbadgeholder.h"
+
+#include "llbadge.h"
+#include "llview.h"
+
+
+bool LLBadgeHolder::addBadge(LLBadge * badge)
+{
+ bool badge_added = false;
+
+ LLView * this_view = dynamic_cast<LLView *>(this);
+
+ if (this_view && mAcceptsBadge)
+ {
+ badge_added = badge->addToView(this_view);
+ }
+
+ return badge_added;
+}
diff --git a/indra/llui/llbadgeholder.h b/indra/llui/llbadgeholder.h
new file mode 100644
index 0000000000..2538eaae91
--- /dev/null
+++ b/indra/llui/llbadgeholder.h
@@ -0,0 +1,56 @@
+/**
+ * @file llbadgeholder.h
+ * @brief Header for badge holders
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLBADGEHOLDER_H
+#define LL_LLBADGEHOLDER_H
+
+//
+// Classes
+//
+
+class LLBadge;
+
+class LLBadgeHolder
+{
+public:
+
+ LLBadgeHolder(bool acceptsBadge)
+ : mAcceptsBadge(acceptsBadge)
+ {
+ }
+
+ void setAcceptsBadge(bool acceptsBadge) { mAcceptsBadge = acceptsBadge; }
+ bool acceptsBadge() const { return mAcceptsBadge; }
+
+ virtual bool addBadge(LLBadge * badge);
+
+private:
+
+ bool mAcceptsBadge;
+
+};
+
+#endif // LL_LLBADGEHOLDER_H
diff --git a/indra/llui/llbadgeowner.cpp b/indra/llui/llbadgeowner.cpp
index 77f15567bf..1860a05edd 100644
--- a/indra/llui/llbadgeowner.cpp
+++ b/indra/llui/llbadgeowner.cpp
@@ -26,6 +26,7 @@
#include "linden_common.h"
+#include "llbadgeholder.h"
#include "llbadgeowner.h"
#include "llpanel.h"
@@ -81,40 +82,44 @@ void LLBadgeOwner::setBadgeVisibility(bool visible)
}
}
-void LLBadgeOwner::addBadgeToParentPanel()
+bool LLBadgeOwner::addBadgeToParentPanel()
{
+ bool badge_added = false;
+
LLView * owner_view = mBadgeOwnerView.get();
if (mBadge && owner_view)
{
- // Badge parent is badge owner by default
- LLView * badge_parent = owner_view;
+ LLBadgeHolder * badge_holder = NULL;
- // Find the appropriate parent for the badge
+ // Find the appropriate holder for the badge
LLView * parent = owner_view->getParent();
while (parent)
{
- LLPanel * parent_panel = dynamic_cast<LLPanel *>(parent);
+ LLBadgeHolder * badge_holder_panel = dynamic_cast<LLBadgeHolder *>(parent);
- if (parent_panel && parent_panel->acceptsBadge())
+ if (badge_holder_panel && badge_holder_panel->acceptsBadge())
{
- badge_parent = parent;
+ badge_holder = badge_holder_panel;
break;
}
parent = parent->getParent();
}
- if (badge_parent)
+ if (badge_holder)
{
- badge_parent->addChild(mBadge);
+ badge_added = badge_holder->addBadge(mBadge);
}
else
{
- llwarns << "Unable to find parent panel for badge " << mBadge->getName() << " on " << owner_view->getName() << llendl;
+ // Badge parent is fallback badge owner if no valid holder exists in the hierarchy
+ badge_added = mBadge->addToView(owner_view);
}
}
+
+ return badge_added;
}
LLBadge* LLBadgeOwner::createBadge(const LLBadge::Params& p)
diff --git a/indra/llui/llbadgeowner.h b/indra/llui/llbadgeowner.h
index a2399189a5..8d03e30645 100644
--- a/indra/llui/llbadgeowner.h
+++ b/indra/llui/llbadgeowner.h
@@ -41,7 +41,7 @@ public:
LLBadgeOwner(LLHandle< LLView > viewHandle);
void initBadgeParams(const LLBadge::Params& p);
- void addBadgeToParentPanel();
+ bool addBadgeToParentPanel();
bool badgeHasParent() const { return (mBadge && mBadge->getParent()); }
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 7b015bd576..93d8282aa7 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -83,10 +83,11 @@ LLButton::Params::Params()
label_color_selected("label_color_selected"), // requires is_toggle true
label_color_disabled("label_color_disabled"),
label_color_disabled_selected("label_color_disabled_selected"),
- highlight_color("highlight_color"),
image_color("image_color"),
image_color_disabled("image_color_disabled"),
- image_overlay_color("image_overlay_color", LLColor4::white),
+ image_overlay_color("image_overlay_color", LLColor4::white % 0.75f),
+ image_overlay_disabled_color("image_overlay_disabled_color", LLColor4::white % 0.3f),
+ image_overlay_selected_color("image_overlay_selected_color", LLColor4::white),
flash_color("flash_color"),
pad_right("pad_right", LLUI::sSettingGroups["config"]->getS32("ButtonHPad")),
pad_left("pad_left", LLUI::sSettingGroups["config"]->getS32("ButtonHPad")),
@@ -99,19 +100,22 @@ LLButton::Params::Params()
scale_image("scale_image", true),
hover_glow_amount("hover_glow_amount"),
commit_on_return("commit_on_return", true),
+ display_pressed_state("display_pressed_state", true),
use_draw_context_alpha("use_draw_context_alpha", true),
badge("badge"),
- handle_right_mouse("handle_right_mouse")
+ handle_right_mouse("handle_right_mouse"),
+ held_down_delay("held_down_delay"),
+ button_flash_count("button_flash_count"),
+ button_flash_rate("button_flash_rate")
{
addSynonym(is_toggle, "toggle");
- held_down_delay.seconds = 0.5f;
- initial_value.set(LLSD(false), false);
+ changeDefault(initial_value, LLSD(false));
}
LLButton::LLButton(const LLButton::Params& p)
: LLUICtrl(p),
- LLBadgeOwner(LLView::getHandle()),
+ LLBadgeOwner(getHandle()),
mMouseDownFrame(0),
mMouseHeldDownCount(0),
mBorderEnabled( FALSE ),
@@ -136,12 +140,13 @@ LLButton::LLButton(const LLButton::Params& p)
mSelectedLabelColor(p.label_color_selected()),
mDisabledLabelColor(p.label_color_disabled()),
mDisabledSelectedLabelColor(p.label_color_disabled_selected()),
- mHighlightColor(p.highlight_color()),
mImageColor(p.image_color()),
mFlashBgColor(p.flash_color()),
mDisabledImageColor(p.image_color_disabled()),
mImageOverlay(p.image_overlay()),
mImageOverlayColor(p.image_overlay_color()),
+ mImageOverlayDisabledColor(p.image_overlay_disabled_color()),
+ mImageOverlaySelectedColor(p.image_overlay_selected_color()),
mImageOverlayAlignment(LLFontGL::hAlignFromName(p.image_overlay_alignment)),
mImageOverlayTopPad(p.image_top_pad),
mImageOverlayBottomPad(p.image_bottom_pad),
@@ -159,12 +164,15 @@ LLButton::LLButton(const LLButton::Params& p)
mCommitOnReturn(p.commit_on_return),
mFadeWhenDisabled(FALSE),
mForcePressedState(false),
+ mDisplayPressedState(p.display_pressed_state),
mLastDrawCharsCount(0),
mMouseDownSignal(NULL),
mMouseUpSignal(NULL),
mHeldDownSignal(NULL),
mUseDrawContextAlpha(p.use_draw_context_alpha),
- mHandleRightMouse(p.handle_right_mouse)
+ mHandleRightMouse(p.handle_right_mouse),
+ mButtonFlashCount(p.button_flash_count),
+ mButtonFlashRate(p.button_flash_rate)
{
static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0);
static Params default_params(LLUICtrlFactory::getDefaultParams<LLButton>());
@@ -292,6 +300,24 @@ void LLButton::onCommit()
LLUICtrl::onCommit();
}
+boost::signals2::connection LLButton::setClickedCallback(const CommitCallbackParam& cb)
+{
+ return setClickedCallback(initCommitCallback(cb));
+}
+boost::signals2::connection LLButton::setMouseDownCallback(const CommitCallbackParam& cb)
+{
+ return setMouseDownCallback(initCommitCallback(cb));
+}
+boost::signals2::connection LLButton::setMouseUpCallback(const CommitCallbackParam& cb)
+{
+ return setMouseUpCallback(initCommitCallback(cb));
+}
+boost::signals2::connection LLButton::setHeldDownCallback(const CommitCallbackParam& cb)
+{
+ return setHeldDownCallback(initCommitCallback(cb));
+}
+
+
boost::signals2::connection LLButton::setClickedCallback( const commit_signal_t::slot_type& cb )
{
if (!mCommitSignal) mCommitSignal = new commit_signal_t();
@@ -314,7 +340,7 @@ boost::signals2::connection LLButton::setHeldDownCallback( const commit_signal_t
}
-// *TODO: Deprecate (for backwards compatability only)
+// *TODO: Deprecate (for backwards compatibility only)
boost::signals2::connection LLButton::setClickedCallback( button_callback_t cb, void* data )
{
return setClickedCallback(boost::bind(cb, data));
@@ -511,15 +537,6 @@ BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
return TRUE;
}
-
-void LLButton::onMouseEnter(S32 x, S32 y, MASK mask)
-{
- LLUICtrl::onMouseEnter(x, y, mask);
-
- if (isInEnabledChain())
- mNeedsHighlight = TRUE;
-}
-
void LLButton::onMouseLeave(S32 x, S32 y, MASK mask)
{
LLUICtrl::onMouseLeave(x, y, mask);
@@ -534,6 +551,10 @@ void LLButton::setHighlight(bool b)
BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
{
+ if (isInEnabledChain()
+ && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this))
+ mNeedsHighlight = TRUE;
+
if (!childrenHandleHover(x, y, mask))
{
if (mMouseDownTimer.getStarted())
@@ -554,21 +575,29 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
return TRUE;
}
+void LLButton::getOverlayImageSize(S32& overlay_width, S32& overlay_height)
+{
+ overlay_width = mImageOverlay->getWidth();
+ overlay_height = mImageOverlay->getHeight();
+
+ F32 scale_factor = llmin((F32)getRect().getWidth() / (F32)overlay_width, (F32)getRect().getHeight() / (F32)overlay_height, 1.f);
+ overlay_width = llround((F32)overlay_width * scale_factor);
+ overlay_height = llround((F32)overlay_height * scale_factor);
+}
+
// virtual
void LLButton::draw()
{
F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
bool flash = FALSE;
- static LLUICachedControl<F32> button_flash_rate("ButtonFlashRate", 0);
- static LLUICachedControl<S32> button_flash_count("ButtonFlashCount", 0);
if( mFlashing )
{
F32 elapsed = mFlashingTimer.getElapsedTimeF32();
- S32 flash_count = S32(elapsed * button_flash_rate * 2.f);
+ S32 flash_count = S32(elapsed * mButtonFlashRate * 2.f);
// flash on or off?
- flash = (flash_count % 2 == 0) || flash_count > S32((F32)button_flash_count * 2.f);
+ flash = (flash_count % 2 == 0) || flash_count > S32((F32)mButtonFlashCount * 2.f);
}
bool pressed_by_keyboard = FALSE;
@@ -597,7 +626,7 @@ void LLButton::draw()
LLColor4 glow_color = LLColor4::white;
LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA;
LLUIImage* imagep = NULL;
- if (pressed)
+ if (pressed && mDisplayPressedState)
{
imagep = selected ? mImagePressedSelected : mImagePressed;
}
@@ -707,16 +736,7 @@ void LLButton::draw()
}
// Unselected label assignments
- LLWString label;
-
- if( getToggleState() )
- {
- label = mSelectedLabel;
- }
- else
- {
- label = mUnselectedLabel;
- }
+ LLWString label = getCurrentLabel();
// overlay with keyboard focus border
if (hasFocus())
@@ -781,18 +801,16 @@ void LLButton::draw()
if (mImageOverlay.notNull())
{
// get max width and height (discard level 0)
- S32 overlay_width = mImageOverlay->getWidth();
- S32 overlay_height = mImageOverlay->getHeight();
+ S32 overlay_width;
+ S32 overlay_height;
- F32 scale_factor = llmin((F32)getRect().getWidth() / (F32)overlay_width, (F32)getRect().getHeight() / (F32)overlay_height, 1.f);
- overlay_width = llround((F32)overlay_width * scale_factor);
- overlay_height = llround((F32)overlay_height * scale_factor);
+ getOverlayImageSize(overlay_width, overlay_height);
S32 center_x = getLocalRect().getCenterX();
S32 center_y = getLocalRect().getCenterY();
//FUGLY HACK FOR "DEPRESSED" BUTTONS
- if (pressed)
+ if (pressed && mDisplayPressedState)
{
center_y--;
center_x++;
@@ -803,7 +821,11 @@ void LLButton::draw()
LLColor4 overlay_color = mImageOverlayColor.get();
if (!enabled)
{
- overlay_color.mV[VALPHA] = 0.5f;
+ overlay_color = mImageOverlayDisabledColor.get();
+ }
+ else if (getToggleState())
+ {
+ overlay_color = mImageOverlaySelectedColor.get();
}
overlay_color.mV[VALPHA] *= alpha;
@@ -811,6 +833,7 @@ void LLButton::draw()
{
case LLFontGL::LEFT:
text_left += overlay_width + mImgOverlayLabelSpace;
+ text_width -= overlay_width + mImgOverlayLabelSpace;
mImageOverlay->draw(
mLeftHPad,
center_y - (overlay_height / 2),
@@ -828,6 +851,7 @@ void LLButton::draw()
break;
case LLFontGL::RIGHT:
text_right -= overlay_width + mImgOverlayLabelSpace;
+ text_width -= overlay_width + mImgOverlayLabelSpace;
mImageOverlay->draw(
getRect().getWidth() - mRightHPad - overlay_width,
center_y - (overlay_height / 2),
@@ -863,7 +887,7 @@ void LLButton::draw()
S32 y_offset = 2 + (getRect().getHeight() - 20)/2;
- if (pressed)
+ if (pressed && mDisplayPressedState)
{
y_offset--;
x++;
@@ -919,7 +943,7 @@ void LLButton::setToggleState(BOOL b)
void LLButton::setFlashing( BOOL b )
{
- if (b != mFlashing)
+ if ((bool)b != mFlashing)
{
mFlashing = b;
mFlashingTimer.reset();
@@ -959,6 +983,23 @@ void LLButton::setLabelSelected( const LLStringExplicit& label )
mSelectedLabel = label;
}
+bool LLButton::labelIsTruncated() const
+{
+ return getCurrentLabel().getString().size() > mLastDrawCharsCount;
+}
+
+const LLUIString& LLButton::getCurrentLabel() const
+{
+ if( getToggleState() )
+ {
+ return mSelectedLabel;
+ }
+ else
+ {
+ return mUnselectedLabel;
+ }
+}
+
void LLButton::setImageUnselected(LLPointer<LLUIImage> image)
{
mImageUnselected = image;
@@ -970,16 +1011,7 @@ void LLButton::setImageUnselected(LLPointer<LLUIImage> image)
void LLButton::autoResize()
{
- LLUIString label;
- if(getToggleState())
- {
- label = mSelectedLabel;
- }
- else
- {
- label = mUnselectedLabel;
- }
- resize(label);
+ resize(getCurrentLabel());
}
void LLButton::resize(LLUIString label)
@@ -989,11 +1021,32 @@ void LLButton::resize(LLUIString label)
// get current btn length
S32 btn_width =getRect().getWidth();
// check if it need resize
- if (mAutoResize == TRUE)
+ if (mAutoResize)
{
- if (btn_width - (mRightHPad + mLeftHPad) < label_width)
+ S32 min_width = label_width + mLeftHPad + mRightHPad;
+ if (mImageOverlay)
{
- setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mLeft + label_width + mLeftHPad + mRightHPad , getRect().mBottom));
+ S32 overlay_width = mImageOverlay->getWidth();
+ F32 scale_factor = (getRect().getHeight() - (mImageOverlayBottomPad + mImageOverlayTopPad)) / (F32)mImageOverlay->getHeight();
+ overlay_width = llround((F32)overlay_width * scale_factor);
+
+ switch(mImageOverlayAlignment)
+ {
+ case LLFontGL::LEFT:
+ case LLFontGL::RIGHT:
+ min_width += overlay_width + mImgOverlayLabelSpace;
+ break;
+ case LLFontGL::HCENTER:
+ min_width = llmax(min_width, overlay_width + mLeftHPad + mRightHPad);
+ break;
+ default:
+ // draw nothing
+ break;
+ }
+ }
+ if (btn_width < min_width)
+ {
+ reshape(min_width, getRect().getHeight());
}
}
}
@@ -1140,7 +1193,7 @@ void LLButton::setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname)
// Set the button control value (toggle state) to the floater visibility control (Sets the value as well)
button->setControlVariable(LLFloater::getControlGroup()->getControl(vis_control_name));
// Set the clicked callback to toggle the floater
- button->setClickedCallback(boost::bind(&LLFloaterReg::toggleFloaterInstance, sdname));
+ button->setClickedCallback(boost::bind(&LLFloaterReg::toggleInstance, sdname, LLSD()));
}
// static
@@ -1181,7 +1234,6 @@ void LLButton::resetMouseDownTimer()
mMouseDownTimer.reset();
}
-
BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// just treat a double click as a second click
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 5968916006..deaa0823c6 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -91,10 +91,11 @@ public:
label_color_selected,
label_color_disabled,
label_color_disabled_selected,
- highlight_color,
image_color,
image_color_disabled,
image_overlay_color,
+ image_overlay_selected_color,
+ image_overlay_disabled_color,
flash_color;
// layout
@@ -120,7 +121,8 @@ public:
// misc
Optional<bool> is_toggle,
scale_image,
- commit_on_return;
+ commit_on_return,
+ display_pressed_state;
Optional<F32> hover_glow_amount;
Optional<TimeIntervalParam> held_down_delay;
@@ -131,6 +133,9 @@ public:
Optional<bool> handle_right_mouse;
+ Optional<S32> button_flash_count;
+ Optional<F32> button_flash_rate;
+
Params();
};
@@ -157,7 +162,6 @@ public:
virtual void draw();
/*virtual*/ BOOL postBuild();
- virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
virtual void onMouseCaptureLost();
@@ -168,6 +172,11 @@ public:
void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; }
+ boost::signals2::connection setClickedCallback(const CommitCallbackParam& cb);
+ boost::signals2::connection setMouseDownCallback(const CommitCallbackParam& cb);
+ boost::signals2::connection setMouseUpCallback(const CommitCallbackParam& cb);
+ boost::signals2::connection setHeldDownCallback(const CommitCallbackParam& cb);
+
boost::signals2::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
@@ -235,6 +244,8 @@ public:
S32 getLastDrawCharsCount() const { return mLastDrawCharsCount; }
+ bool labelIsTruncated() const;
+ const LLUIString& getCurrentLabel() const;
void setScaleImage(BOOL scale) { mScaleImage = scale; }
BOOL getScaleImage() const { return mScaleImage; }
@@ -270,14 +281,16 @@ public:
protected:
LLPointer<LLUIImage> getImageUnselected() const { return mImageUnselected; }
LLPointer<LLUIImage> getImageSelected() const { return mImageSelected; }
+ void getOverlayImageSize(S32& overlay_width, S32& overlay_height);
LLFrameTimer mMouseDownTimer;
+ bool mNeedsHighlight;
+ S32 mButtonFlashCount;
+ F32 mButtonFlashRate;
-private:
void drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size);
void resetMouseDownTimer();
-private:
commit_signal_t* mMouseDownSignal;
commit_signal_t* mMouseUpSignal;
commit_signal_t* mHeldDownSignal;
@@ -293,6 +306,8 @@ private:
LLPointer<LLUIImage> mImageOverlay;
LLFontGL::HAlign mImageOverlayAlignment;
LLUIColor mImageOverlayColor;
+ LLUIColor mImageOverlaySelectedColor;
+ LLUIColor mImageOverlayDisabledColor;
LLPointer<LLUIImage> mImageUnselected;
LLUIString mUnselectedLabel;
@@ -321,21 +336,19 @@ private:
flash icon name is set in attributes(by default it isn't). First way is used otherwise. */
LLPointer<LLUIImage> mImageFlash;
- LLUIColor mHighlightColor;
LLUIColor mFlashBgColor;
LLUIColor mImageColor;
LLUIColor mDisabledImageColor;
- BOOL mIsToggle;
- BOOL mScaleImage;
-
- BOOL mDropShadowedText;
- BOOL mAutoResize;
- BOOL mUseEllipses;
- BOOL mBorderEnabled;
+ bool mIsToggle;
+ bool mScaleImage;
- BOOL mFlashing;
+ bool mDropShadowedText;
+ bool mAutoResize;
+ bool mUseEllipses;
+ bool mBorderEnabled;
+ bool mFlashing;
LLFontGL::HAlign mHAlign;
S32 mLeftHPad;
@@ -355,10 +368,10 @@ private:
F32 mHoverGlowStrength;
F32 mCurGlowStrength;
- BOOL mNeedsHighlight;
- BOOL mCommitOnReturn;
- BOOL mFadeWhenDisabled;
+ bool mCommitOnReturn;
+ bool mFadeWhenDisabled;
bool mForcePressedState;
+ bool mDisplayPressedState;
LLFrameTimer mFlashingTimer;
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index 984c4ec5fb..6910b962a1 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -40,6 +40,7 @@ LLClipboard gClipboard;
LLClipboard::LLClipboard()
{
+ mSourceItem = NULL;
}
@@ -134,3 +135,8 @@ BOOL LLClipboard::canPastePrimaryString() const
{
return LLView::getWindow()->isPrimaryTextAvailable();
}
+
+void LLClipboard::setSourceObject(const LLUUID& source_id, LLAssetType::EType type)
+{
+ mSourceItem = new LLInventoryObject (source_id, LLUUID::null, type, "");
+}
diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h
index 24cb46c3f4..9371b94284 100644
--- a/indra/llui/llclipboard.h
+++ b/indra/llui/llclipboard.h
@@ -30,6 +30,8 @@
#include "llstring.h"
#include "lluuid.h"
+#include "stdenums.h"
+#include "llinventory.h"
class LLClipboard
@@ -52,9 +54,14 @@ public:
BOOL canPastePrimaryString() const;
const LLWString& getPastePrimaryWString(LLUUID* source_id = NULL);
+ // Support clipboard for object known only by their uuid and asset type
+ void setSourceObject(const LLUUID& source_id, LLAssetType::EType type);
+ const LLInventoryObject* getSourceObject() { return mSourceItem; }
+
private:
- LLUUID mSourceID;
+ LLUUID mSourceID;
LLWString mString;
+ LLInventoryObject* mSourceItem;
};
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index a4d1854bc8..89d8842393 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -525,15 +525,12 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
else
{
mButton->setRect(rect);
- mButton->setTabStop(TRUE);
- mButton->setHAlign(LLFontGL::LEFT);
mButton->setLabel(mLabel.getString());
if (mTextEntry)
{
mTextEntry->setVisible(FALSE);
}
- mButton->setFollowsAll();
}
}
@@ -791,8 +788,10 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
// if selection has changed, pop open list
- else if (mList->getLastSelectedItem() != last_selected_item ||
- (key == KEY_DOWN || key == KEY_UP) && !mList->isEmpty())
+ else if (mList->getLastSelectedItem() != last_selected_item
+ || ((key == KEY_DOWN || key == KEY_UP)
+ && mList->getCanSelect()
+ && !mList->isEmpty()))
{
showList();
}
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
new file mode 100644
index 0000000000..0e2f3f1961
--- /dev/null
+++ b/indra/llui/llcommandmanager.cpp
@@ -0,0 +1,172 @@
+/**
+ * @file llcommandmanager.cpp
+ * @brief LLCommandManager class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+// A control that displays the name of the chosen item, which when
+// clicked shows a scrolling box of options.
+
+#include "linden_common.h"
+
+#include "llcommandmanager.h"
+#include "lldir.h"
+#include "llerror.h"
+#include "llxuiparser.h"
+
+#include <boost/foreach.hpp>
+
+
+//
+// LLCommandId class
+//
+
+const LLCommandId LLCommandId::null = LLCommandId("null command");
+
+//
+// LLCommand class
+//
+
+LLCommand::Params::Params()
+ : available_in_toybox("available_in_toybox", false)
+ , icon("icon")
+ , label_ref("label_ref")
+ , name("name")
+ , tooltip_ref("tooltip_ref")
+ , execute_function("execute_function")
+ , execute_parameters("execute_parameters")
+ , execute_stop_function("execute_stop_function")
+ , execute_stop_parameters("execute_stop_parameters")
+ , is_enabled_function("is_enabled_function")
+ , is_enabled_parameters("is_enabled_parameters")
+ , is_running_function("is_running_function")
+ , is_running_parameters("is_running_parameters")
+ , is_starting_function("is_starting_function")
+ , is_starting_parameters("is_starting_parameters")
+{
+}
+
+LLCommand::LLCommand(const LLCommand::Params& p)
+ : mIdentifier(p.name)
+ , mAvailableInToybox(p.available_in_toybox)
+ , mIcon(p.icon)
+ , mLabelRef(p.label_ref)
+ , mName(p.name)
+ , mTooltipRef(p.tooltip_ref)
+ , mExecuteFunction(p.execute_function)
+ , mExecuteParameters(p.execute_parameters)
+ , mExecuteStopFunction(p.execute_stop_function)
+ , mExecuteStopParameters(p.execute_stop_parameters)
+ , mIsEnabledFunction(p.is_enabled_function)
+ , mIsEnabledParameters(p.is_enabled_parameters)
+ , mIsRunningFunction(p.is_running_function)
+ , mIsRunningParameters(p.is_running_parameters)
+ , mIsStartingFunction(p.is_starting_function)
+ , mIsStartingParameters(p.is_starting_parameters)
+{
+}
+
+
+//
+// LLCommandManager class
+//
+
+LLCommandManager::LLCommandManager()
+{
+}
+
+LLCommandManager::~LLCommandManager()
+{
+ for (CommandVector::iterator cmdIt = mCommands.begin(); cmdIt != mCommands.end(); ++cmdIt)
+ {
+ LLCommand * command = *cmdIt;
+
+ delete command;
+ }
+}
+
+U32 LLCommandManager::commandCount() const
+{
+ return mCommands.size();
+}
+
+LLCommand * LLCommandManager::getCommand(U32 commandIndex)
+{
+ return mCommands[commandIndex];
+}
+
+LLCommand * LLCommandManager::getCommand(const LLCommandId& commandId)
+{
+ LLCommand * command_match = NULL;
+
+ CommandIndexMap::const_iterator found = mCommandIndices.find(commandId.uuid());
+
+ if (found != mCommandIndices.end())
+ {
+ command_match = mCommands[found->second];
+ }
+
+ return command_match;
+}
+
+void LLCommandManager::addCommand(LLCommand * command)
+{
+ LLCommandId command_id = command->id();
+ mCommandIndices[command_id.uuid()] = mCommands.size();
+ mCommands.push_back(command);
+
+ lldebugs << "Successfully added command: " << command->name() << llendl;
+}
+
+//static
+bool LLCommandManager::load()
+{
+ LLCommandManager& mgr = LLCommandManager::instance();
+
+ std::string commands_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "commands.xml");
+
+ LLCommandManager::Params commandsParams;
+
+ LLSimpleXUIParser parser;
+
+ if (!parser.readXUI(commands_file, commandsParams))
+ {
+ llerrs << "Unable to load xml file: " << commands_file << llendl;
+ return false;
+ }
+
+ if (!commandsParams.validateBlock())
+ {
+ llerrs << "Invalid commands file: " << commands_file << llendl;
+ return false;
+ }
+
+ BOOST_FOREACH(LLCommand::Params& commandParams, commandsParams.commands)
+ {
+ LLCommand * command = new LLCommand(commandParams);
+
+ mgr.addCommand(command);
+ }
+
+ return true;
+}
diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h
new file mode 100644
index 0000000000..a7276a48aa
--- /dev/null
+++ b/indra/llui/llcommandmanager.h
@@ -0,0 +1,202 @@
+/**
+ * @file llcommandmanager.h
+ * @brief LLCommandManager class to hold commands
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLCOMMANDMANAGER_H
+#define LL_LLCOMMANDMANAGER_H
+
+#include "llinitparam.h"
+#include "llsingleton.h"
+
+
+class LLCommand;
+class LLCommandManager;
+
+
+class LLCommandId
+{
+public:
+ friend class LLCommand;
+ friend class LLCommandManager;
+
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Mandatory<std::string> name;
+
+ Params()
+ : name("name")
+ {}
+ };
+
+ LLCommandId(const std::string& name)
+ {
+ mUUID = LLUUID::generateNewID(name);
+ }
+
+ LLCommandId(const Params& p)
+ {
+ mUUID = LLUUID::generateNewID(p.name);
+ }
+
+ LLCommandId(const LLUUID& uuid)
+ : mUUID(uuid)
+ {}
+
+ const LLUUID& uuid() const { return mUUID; }
+
+ bool operator!=(const LLCommandId& command) const
+ {
+ return (mUUID != command.mUUID);
+ }
+
+ bool operator==(const LLCommandId& command) const
+ {
+ return (mUUID == command.mUUID);
+ }
+
+ static const LLCommandId null;
+
+private:
+ LLUUID mUUID;
+};
+
+typedef std::list<LLCommandId> command_id_list_t;
+
+
+class LLCommand
+{
+public:
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Mandatory<bool> available_in_toybox;
+ Mandatory<std::string> icon;
+ Mandatory<std::string> label_ref;
+ Mandatory<std::string> name;
+ Mandatory<std::string> tooltip_ref;
+
+ Mandatory<std::string> execute_function;
+ Optional<LLSD> execute_parameters;
+
+ Optional<std::string> execute_stop_function;
+ Optional<LLSD> execute_stop_parameters;
+
+ Optional<std::string> is_enabled_function;
+ Optional<LLSD> is_enabled_parameters;
+
+ Optional<std::string> is_running_function;
+ Optional<LLSD> is_running_parameters;
+
+ Optional<std::string> is_starting_function;
+ Optional<LLSD> is_starting_parameters;
+
+ Params();
+ };
+
+ LLCommand(const LLCommand::Params& p);
+
+ const bool availableInToybox() const { return mAvailableInToybox; }
+ const std::string& icon() const { return mIcon; }
+ const LLCommandId& id() const { return mIdentifier; }
+ const std::string& labelRef() const { return mLabelRef; }
+ const std::string& name() const { return mName; }
+ const std::string& tooltipRef() const { return mTooltipRef; }
+
+ const std::string& executeFunctionName() const { return mExecuteFunction; }
+ const LLSD& executeParameters() const { return mExecuteParameters; }
+
+ const std::string& executeStopFunctionName() const { return mExecuteStopFunction; }
+ const LLSD& executeStopParameters() const { return mExecuteStopParameters; }
+
+ const std::string& isEnabledFunctionName() const { return mIsEnabledFunction; }
+ const LLSD& isEnabledParameters() const { return mIsEnabledParameters; }
+
+ const std::string& isRunningFunctionName() const { return mIsRunningFunction; }
+ const LLSD& isRunningParameters() const { return mIsRunningParameters; }
+
+ const std::string& isStartingFunctionName() const { return mIsStartingFunction; }
+ const LLSD& isStartingParameters() const { return mIsStartingParameters; }
+
+private:
+ LLCommandId mIdentifier;
+
+ bool mAvailableInToybox;
+ std::string mIcon;
+ std::string mLabelRef;
+ std::string mName;
+ std::string mTooltipRef;
+
+ std::string mExecuteFunction;
+ LLSD mExecuteParameters;
+
+ std::string mExecuteStopFunction;
+ LLSD mExecuteStopParameters;
+
+ std::string mIsEnabledFunction;
+ LLSD mIsEnabledParameters;
+
+ std::string mIsRunningFunction;
+ LLSD mIsRunningParameters;
+
+ std::string mIsStartingFunction;
+ LLSD mIsStartingParameters;
+};
+
+
+class LLCommandManager
+: public LLSingleton<LLCommandManager>
+{
+public:
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Multiple< LLCommand::Params, AtLeast<1> > commands;
+
+ Params()
+ : commands("command")
+ {
+ }
+ };
+
+ LLCommandManager();
+ ~LLCommandManager();
+
+ U32 commandCount() const;
+ LLCommand * getCommand(U32 commandIndex);
+ LLCommand * getCommand(const LLCommandId& commandId);
+
+ static bool load();
+
+protected:
+ void addCommand(LLCommand * command);
+
+private:
+ typedef std::map<LLUUID, U32> CommandIndexMap;
+ typedef std::vector<LLCommand *> CommandVector;
+
+ CommandVector mCommands;
+ CommandIndexMap mCommandIndices;
+};
+
+
+#endif // LL_LLCOMMANDMANAGER_H
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 04040200d0..161496b1f5 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -372,9 +372,7 @@ LLConsole::Paragraph::Paragraph (LLWString str, const LLColor4 &color, F32 add_t
// static
void LLConsole::updateClass()
{
- LLInstanceTrackerScopedGuard guard;
-
- for (instance_iter it = guard.beginInstances(); it != guard.endInstances(); ++it)
+ for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
it->update();
}
diff --git a/indra/llui/llconsole.h b/indra/llui/llconsole.h
index bb8ea50bed..f32f1dd74c 100644
--- a/indra/llui/llconsole.h
+++ b/indra/llui/llconsole.h
@@ -54,7 +54,7 @@ public:
persist_time("persist_time", 0.f), // forever
font_size_index("font_size_index")
{
- mouse_opaque(false);
+ changeDefault(mouse_opaque, false);
}
};
protected:
diff --git a/indra/llui/llcontainerview.h b/indra/llui/llcontainerview.h
index 7d3d5cf787..e81600fd6c 100644
--- a/indra/llui/llcontainerview.h
+++ b/indra/llui/llcontainerview.h
@@ -50,7 +50,7 @@ public:
show_label("show_label", FALSE),
display_children("display_children", TRUE)
{
- mouse_opaque(false);
+ changeDefault(mouse_opaque, false);
}
};
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index ca2dc644a4..3396213f1c 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -82,7 +82,7 @@ BOOL LLDockableFloater::postBuild()
mForceDocking = true;
}
- mDockTongue = LLUI::getUIImage("windows/Flyout_Pointer.png");
+ mDockTongue = LLUI::getUIImage("Flyout_Pointer");
LLFloater::setDocked(true);
return LLView::postBuild();
}
@@ -162,10 +162,15 @@ void LLDockableFloater::setVisible(BOOL visible)
void LLDockableFloater::setMinimized(BOOL minimize)
{
- if(minimize)
+ if(minimize && isDocked())
{
+ // minimizing a docked floater just hides it
setVisible(FALSE);
}
+ else
+ {
+ LLFloater::setMinimized(minimize);
+ }
}
LLView * LLDockableFloater::getDockWidget()
@@ -234,8 +239,21 @@ void LLDockableFloater::setDockControl(LLDockControl* dockControl)
setDocked(isDocked());
}
-const LLUIImagePtr& LLDockableFloater::getDockTongue()
+const LLUIImagePtr& LLDockableFloater::getDockTongue(LLDockControl::DocAt dock_side)
{
+ switch(dock_side)
+ {
+ case LLDockControl::LEFT:
+ mDockTongue = LLUI::getUIImage("Flyout_Left");
+ break;
+ case LLDockControl::RIGHT:
+ mDockTongue = LLUI::getUIImage("Flyout_Right");
+ break;
+ default:
+ mDockTongue = LLUI::getUIImage("Flyout_Pointer");
+ break;
+ }
+
return mDockTongue;
}
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 8deb6c1159..89c9852f4a 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -113,6 +113,8 @@ public:
bool getUniqueDocking() { return mUniqueDocking; }
bool getUseTongue() { return mUseTongue; }
+
+ void setUseTongue(bool use_tongue) { mUseTongue = use_tongue;}
private:
/**
* Provides unique of dockable floater.
@@ -122,7 +124,7 @@ private:
protected:
void setDockControl(LLDockControl* dockControl);
- const LLUIImagePtr& getDockTongue();
+ const LLUIImagePtr& getDockTongue(LLDockControl::DocAt dock_side = LLDockControl::TOP);
// Checks if docking should be forced.
// It may be useful e.g. if floater created in mouselook mode (see EXT-5609)
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index b1c27126d9..af39e41fa6 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -92,19 +92,24 @@ void LLDockControl::setDock(LLView* dockWidget)
void LLDockControl::getAllowedRect(LLRect& rect)
{
- rect = mDockableFloater->getRootView()->getRect();
+ rect = mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel")->getRect();
}
void LLDockControl::repositionDockable()
{
+ if (!mDockWidget) return;
LLRect dockRect = mDockWidget->calcScreenRect();
LLRect rootRect;
+ LLRect floater_rect = mDockableFloater->calcScreenRect();
mGetAllowedRectCallback(rootRect);
- // recalculate dockable position if dock position changed, dock visibility changed,
- // root view rect changed or recalculation is forced
- if (mPrevDockRect != dockRect || mDockWidgetVisible != isDockVisible()
- || mRootRect != rootRect || mRecalculateDocablePosition)
+ // recalculate dockable position if:
+ if (mPrevDockRect != dockRect //dock position changed
+ || mDockWidgetVisible != isDockVisible() //dock visibility changed
+ || mRootRect != rootRect //root view rect changed
+ || mFloaterRect != floater_rect //floater rect changed
+ || mRecalculateDockablePosition //recalculation is forced
+ )
{
// undock dockable and off() if dock not visible
if (!isDockVisible())
@@ -135,7 +140,8 @@ void LLDockControl::repositionDockable()
mPrevDockRect = dockRect;
mRootRect = rootRect;
- mRecalculateDocablePosition = false;
+ mFloaterRect = floater_rect;
+ mRecalculateDockablePosition = false;
mDockWidgetVisible = isDockVisible();
}
}
@@ -160,7 +166,7 @@ bool LLDockControl::isDockVisible()
case TOP:
{
// check is dock inside parent rect
- // assume that parent for all dockable flaoters
+ // assume that parent for all dockable floaters
// is the root view
LLRect dockParentRect =
mDockWidget->getRootView()->calcScreenRect();
@@ -202,21 +208,33 @@ void LLDockControl::moveDockable()
switch (mDockAt)
{
case LEFT:
- x = dockRect.mLeft;
- y = dockRect.mTop + mDockTongue->getHeight() + dockableRect.getHeight();
- // check is dockable inside root view rect
- if (x < rootRect.mLeft)
+
+ x = dockRect.mLeft - dockableRect.getWidth();
+ y = dockRect.getCenterY() + dockableRect.getHeight() / 2;
+
+ if (use_tongue)
{
- x = rootRect.mLeft;
+ x -= mDockTongue->getWidth();
}
- if (x + dockableRect.getWidth() > rootRect.mRight)
+
+ mDockTongueX = dockableRect.mRight;
+ mDockTongueY = dockableRect.getCenterY() - mDockTongue->getHeight() / 2;
+
+ break;
+
+ case RIGHT:
+
+ x = dockRect.mRight;
+ y = dockRect.getCenterY() + dockableRect.getHeight() / 2;
+
+ if (use_tongue)
{
- x = rootRect.mRight - dockableRect.getWidth();
+ x += mDockTongue->getWidth();
}
-
- mDockTongueX = x + dockableRect.getWidth()/2 - mDockTongue->getWidth() / 2;
-
- mDockTongueY = dockRect.mTop;
+
+ mDockTongueX = dockRect.mRight;
+ mDockTongueY = dockableRect.getCenterY() - mDockTongue->getHeight() / 2;
+
break;
case TOP:
@@ -314,13 +332,12 @@ void LLDockControl::moveDockable()
dockableRect.setLeftTopAndSize(x, y, dockableRect.getWidth(),
dockableRect.getHeight());
}
+
LLRect localDocableParentRect;
- mDockableFloater->getParent()->screenRectToLocal(dockableRect,
- &localDocableParentRect);
- mDockableFloater->setRect(localDocableParentRect);
- mDockableFloater->screenPointToLocal(mDockTongueX, mDockTongueY,
- &mDockTongueX, &mDockTongueY);
+ mDockableFloater->getParent()->screenRectToLocal(dockableRect, &localDocableParentRect);
+ mDockableFloater->setRect(localDocableParentRect);
+ mDockableFloater->screenPointToLocal(mDockTongueX, mDockTongueY, &mDockTongueX, &mDockTongueY);
}
@@ -329,7 +346,7 @@ void LLDockControl::on()
if (isDockVisible())
{
mEnabled = true;
- mRecalculateDocablePosition = true;
+ mRecalculateDockablePosition = true;
}
}
@@ -340,7 +357,7 @@ void LLDockControl::off()
void LLDockControl::forceRecalculatePosition()
{
- mRecalculateDocablePosition = true;
+ mRecalculateDockablePosition = true;
}
void LLDockControl::drawToungue()
diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h
index 2e7359245f..c9602011f6 100644
--- a/indra/llui/lldockcontrol.h
+++ b/indra/llui/lldockcontrol.h
@@ -43,6 +43,7 @@ public:
{
TOP,
LEFT,
+ RIGHT,
BOTTOM
};
@@ -79,12 +80,13 @@ private:
private:
get_allowed_rect_callback_t mGetAllowedRectCallback;
bool mEnabled;
- bool mRecalculateDocablePosition;
+ bool mRecalculateDockablePosition;
bool mDockWidgetVisible;
DocAt mDockAt;
LLView* mDockWidget;
LLRect mPrevDockRect;
LLRect mRootRect;
+ LLRect mFloaterRect;
LLFloater* mDockableFloater;
LLUIImagePtr mDockTongue;
S32 mDockTongueX;
diff --git a/indra/llui/lldraghandle.h b/indra/llui/lldraghandle.h
index 7c56475e75..e095e577b1 100644
--- a/indra/llui/lldraghandle.h
+++ b/indra/llui/lldraghandle.h
@@ -51,8 +51,8 @@ public:
drag_highlight_color("drag_highlight_color", LLUIColorTable::instance().getColor("DefaultHighlightLight")),
drag_shadow_color("drag_shadow_color", LLUIColorTable::instance().getColor("DefaultShadowDark"))
{
- mouse_opaque(true);
- follows.flags(FOLLOWS_ALL);
+ changeDefault(mouse_opaque, true);
+ changeDefault(follows.flags, FOLLOWS_ALL);
}
};
void initFromParams(const Params&);
diff --git a/indra/llui/llfiltereditor.h b/indra/llui/llfiltereditor.h
index 710699fdc1..3a05bc05a1 100644
--- a/indra/llui/llfiltereditor.h
+++ b/indra/llui/llfiltereditor.h
@@ -42,12 +42,7 @@ class LLFilterEditor : public LLSearchEditor
{
public:
struct Params : public LLInitParam::Block<Params, LLSearchEditor::Params>
- {
- Params()
- {
- name = "filter_editor";
- }
- };
+ {};
protected:
LLFilterEditor(const Params&);
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index d19e33ea55..33548151fd 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -58,10 +58,23 @@
#include "llhelp.h"
#include "llmultifloater.h"
#include "llsdutil.h"
+#include <boost/foreach.hpp>
+
// use this to control "jumping" behavior when Ctrl-Tabbing
const S32 TABBED_FLOATER_OFFSET = 0;
+namespace LLInitParam
+{
+ void TypeValues<LLFloaterEnums::EOpenPositioning>::declareValues()
+ {
+ declare("none", LLFloaterEnums::OPEN_POSITIONING_NONE);
+ declare("cascading", LLFloaterEnums::OPEN_POSITIONING_CASCADING);
+ declare("centered", LLFloaterEnums::OPEN_POSITIONING_CENTERED);
+ declare("specified", LLFloaterEnums::OPEN_POSITIONING_SPECIFIED);
+ }
+}
+
std::string LLFloater::sButtonNames[BUTTON_COUNT] =
{
"llfloater_close_btn", //BUTTON_CLOSE
@@ -100,7 +113,6 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
LLMultiFloater* LLFloater::sHostp = NULL;
BOOL LLFloater::sQuitting = FALSE; // Flag to prevent storing visibility controls while quitting
-LLFloater::handle_map_t LLFloater::sFloaterMap;
LLFloaterView* gFloaterView = NULL;
@@ -154,7 +166,7 @@ LLFloater::Params::Params()
: title("title"),
short_title("short_title"),
single_instance("single_instance", false),
- auto_tile("auto_tile", false),
+ reuse_instance("reuse_instance", false),
can_resize("can_resize", false),
can_minimize("can_minimize", true),
can_close("can_close", true),
@@ -164,7 +176,10 @@ LLFloater::Params::Params()
save_rect("save_rect", false),
save_visibility("save_visibility", false),
can_dock("can_dock", false),
- open_centered("open_centered", false),
+ show_title("show_title", true),
+ open_positioning("open_positioning", LLFloaterEnums::OPEN_POSITIONING_NONE),
+ specified_left("specified_left"),
+ specified_bottom("specified_bottom"),
header_height("header_height", 0),
legacy_header_height("legacy_header_height", 0),
close_image("close_image"),
@@ -180,9 +195,10 @@ LLFloater::Params::Params()
dock_pressed_image("dock_pressed_image"),
help_pressed_image("help_pressed_image"),
open_callback("open_callback"),
- close_callback("close_callback")
+ close_callback("close_callback"),
+ follows("follows")
{
- visible = false;
+ changeDefault(visible, false);
}
@@ -226,13 +242,16 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mTitle(p.title),
mShortTitle(p.short_title),
mSingleInstance(p.single_instance),
+ mReuseInstance(p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance), // reuse single-instance floaters by default
mKey(key),
- mAutoTile(p.auto_tile),
mCanTearOff(p.can_tear_off),
mCanMinimize(p.can_minimize),
mCanClose(p.can_close),
mDragOnLeft(p.can_drag_on_left),
mResizable(p.can_resize),
+ mOpenPositioning(p.open_positioning),
+ mSpecifiedLeft(p.specified_left),
+ mSpecifiedBottom(p.specified_bottom),
mMinWidth(p.min_width),
mMinHeight(p.min_height),
mHeaderHeight(p.header_height),
@@ -251,7 +270,6 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mMinimizeSignal(NULL)
// mNotificationContext(NULL)
{
- mHandle.bind(this);
// mNotificationContext = new LLFloaterNotificationContext(getHandle());
// Clicks stop here.
@@ -306,9 +324,6 @@ void LLFloater::initFloater(const Params& p)
// Floaters are created in the invisible state
setVisible(FALSE);
- // add self to handle->floater map
- sFloaterMap[mHandle] = this;
-
if (!getParent())
{
gFloaterView->addChild(this);
@@ -459,15 +474,24 @@ void LLFloater::layoutResizeCtrls()
mResizeHandle[3]->setRect(rect);
}
-void LLFloater::enableResizeCtrls(bool enable)
+void LLFloater::enableResizeCtrls(bool enable, bool width, bool height)
{
+ mResizeBar[LLResizeBar::LEFT]->setVisible(enable && width);
+ mResizeBar[LLResizeBar::LEFT]->setEnabled(enable && width);
+
+ mResizeBar[LLResizeBar::TOP]->setVisible(enable && height);
+ mResizeBar[LLResizeBar::TOP]->setEnabled(enable && height);
+
+ mResizeBar[LLResizeBar::RIGHT]->setVisible(enable && width);
+ mResizeBar[LLResizeBar::RIGHT]->setEnabled(enable && width);
+
+ mResizeBar[LLResizeBar::BOTTOM]->setVisible(enable && height);
+ mResizeBar[LLResizeBar::BOTTOM]->setEnabled(enable && height);
+
for (S32 i = 0; i < 4; ++i)
{
- mResizeBar[i]->setVisible(enable);
- mResizeBar[i]->setEnabled(enable);
-
- mResizeHandle[i]->setVisible(enable);
- mResizeHandle[i]->setEnabled(enable);
+ mResizeHandle[i]->setVisible(enable && width && height);
+ mResizeHandle[i]->setEnabled(enable && width && height);
}
}
@@ -506,8 +530,6 @@ LLFloater::~LLFloater()
// correct, non-minimized positions.
setMinimized( FALSE );
- sFloaterMap.erase(mHandle);
-
delete mDragHandle;
for (S32 i = 0; i < 4; i++)
{
@@ -515,7 +537,6 @@ LLFloater::~LLFloater()
delete mResizeHandle[i];
}
- storeRectControl();
setVisible(false); // We're not visible if we're destroyed
storeVisibilityControl();
storeDockStateControl();
@@ -660,6 +681,12 @@ void LLFloater::openFloater(const LLSD& key)
}
else
{
+ LLFloater* floater_to_stack = LLFloaterReg::getLastFloaterInGroup(mInstanceName);
+ if (!floater_to_stack)
+ {
+ floater_to_stack = LLFloaterReg::getLastFloaterCascading();
+ }
+ applyControlsAndPosition(floater_to_stack);
setMinimized(FALSE);
setVisibleAndFrontmost(mAutoFocus);
}
@@ -752,12 +779,19 @@ void LLFloater::closeFloater(bool app_quitting)
else
{
setVisible(FALSE);
+ if (!mReuseInstance)
+ {
+ destroy();
+ }
}
}
else
{
setVisible(FALSE); // hide before destroying (so handleVisibilityChange() gets called)
- destroy();
+ if (!mReuseInstance)
+ {
+ destroy();
+ }
}
}
}
@@ -766,7 +800,6 @@ void LLFloater::closeFloater(bool app_quitting)
void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLPanel::reshape(width, height, called_from_parent);
- storeRectControl();
}
void LLFloater::releaseFocus()
@@ -823,43 +856,108 @@ LLMultiFloater* LLFloater::getHost()
return (LLMultiFloater*)mHostHandle.get();
}
-void LLFloater::applySavedVariables()
+void LLFloater::applyControlsAndPosition(LLFloater* other)
{
- applyRectControl();
- applyDockState();
+ if (!applyDockState())
+ {
+ if (!applyRectControl())
+ {
+ applyPositioning(other);
+ }
+ }
}
-void LLFloater::applyRectControl()
+bool LLFloater::applyRectControl()
{
- // first, center on screen if requested
- if (mOpenCentered)
+ bool saved_rect = false;
+
+ LLFloater* last_in_group = LLFloaterReg::getLastFloaterInGroup(mInstanceName);
+ if (last_in_group && last_in_group != this)
{
- center();
+ // other floaters in our group, position ourselves relative to them and don't save the rect
+ mRectControl.clear();
+ mOpenPositioning = LLFloaterEnums::OPEN_POSITIONING_CASCADE_GROUP;
}
-
- // override center if we have saved rect control
- if (mRectControl.size() > 1)
+ else if (mRectControl.size() > 1)
{
+ // If we have a saved rect, use it
const LLRect& rect = getControlGroup()->getRect(mRectControl);
- if (rect.getWidth() > 0 && rect.getHeight() > 0)
+ saved_rect = rect.notEmpty();
+ if (saved_rect)
{
- translate( rect.mLeft - getRect().mLeft, rect.mBottom - getRect().mBottom);
+ setOrigin(rect.mLeft, rect.mBottom);
+
if (mResizable)
{
reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight()));
}
}
}
+
+ return saved_rect;
}
-void LLFloater::applyDockState()
+bool LLFloater::applyDockState()
{
+ bool docked = false;
+
if (mDocStateControl.size() > 1)
{
- bool dockState = getControlGroup()->getBOOL(mDocStateControl);
- setDocked(dockState);
+ docked = getControlGroup()->getBOOL(mDocStateControl);
+ setDocked(docked);
}
+ return docked;
+}
+
+void LLFloater::applyPositioning(LLFloater* other)
+{
+ // Otherwise position according to the positioning code
+ switch (mOpenPositioning)
+ {
+ case LLFloaterEnums::OPEN_POSITIONING_CENTERED:
+ center();
+ break;
+
+ case LLFloaterEnums::OPEN_POSITIONING_SPECIFIED:
+ {
+ // Translate relative to snap rect
+ setOrigin(mSpecifiedLeft, mSpecifiedBottom);
+ const LLRect& snap_rect = gFloaterView->getSnapRect();
+ translate(snap_rect.mLeft, snap_rect.mBottom);
+ translateIntoRect(snap_rect, FALSE);
+ }
+ break;
+
+ case LLFloaterEnums::OPEN_POSITIONING_CASCADE_GROUP:
+ case LLFloaterEnums::OPEN_POSITIONING_CASCADING:
+ if (other != NULL && other != this)
+ {
+ stackWith(*other);
+ }
+ else
+ {
+ static const U32 CASCADING_FLOATER_HOFFSET = 0;
+ static const U32 CASCADING_FLOATER_VOFFSET = 0;
+
+ const LLRect& snap_rect = gFloaterView->getSnapRect();
+
+ const S32 horizontal_offset = CASCADING_FLOATER_HOFFSET;
+ const S32 vertical_offset = snap_rect.getHeight() - CASCADING_FLOATER_VOFFSET;
+
+ S32 rect_height = getRect().getHeight();
+ setOrigin(horizontal_offset, vertical_offset - rect_height);
+
+ translate(snap_rect.mLeft, snap_rect.mBottom);
+ translateIntoRect(snap_rect, FALSE);
+ }
+ break;
+
+ case LLFloaterEnums::OPEN_POSITIONING_NONE:
+ default:
+ // Do nothing
+ break;
+ }
}
void LLFloater::applyTitle()
@@ -936,7 +1034,9 @@ BOOL LLFloater::canSnapTo(const LLView* other_view)
if (other_view != getParent())
{
const LLFloater* other_floaterp = dynamic_cast<const LLFloater*>(other_view);
- if (other_floaterp && other_floaterp->getSnapTarget() == getHandle() && mDependents.find(other_floaterp->getHandle()) != mDependents.end())
+ if (other_floaterp
+ && other_floaterp->getSnapTarget() == getHandle()
+ && mDependents.find(other_floaterp->getHandle()) != mDependents.end())
{
// this is a dependent that is already snapped to us, so don't snap back to it
return FALSE;
@@ -968,6 +1068,12 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
const LLRect old_rect = getRect();
LLView::handleReshape(new_rect, by_user);
+ if (by_user && !isMinimized())
+ {
+ storeRectControl();
+ mOpenPositioning = LLFloaterEnums::OPEN_POSITIONING_NONE;
+ }
+
// if not minimized, adjust all snapped dependents to new shape
if (!isMinimized())
{
@@ -1025,7 +1131,7 @@ void LLFloater::setMinimized(BOOL minimize)
if (minimize == mMinimized) return;
- if(mMinimizeSignal)
+ if (mMinimizeSignal)
{
(*mMinimizeSignal)(this, LLSD(minimize));
}
@@ -1057,10 +1163,6 @@ void LLFloater::setMinimized(BOOL minimize)
mButtonsEnabled[BUTTON_RESTORE] = TRUE;
}
- if (mDragHandle)
- {
- mDragHandle->setVisible(TRUE);
- }
setBorderVisible(TRUE);
for(handle_set_iter_t dependent_it = mDependents.begin();
@@ -1211,19 +1313,9 @@ void LLFloater::setIsChrome(BOOL is_chrome)
mButtons[BUTTON_CLOSE]->setToolTip(LLStringExplicit(getButtonTooltip(Params(), BUTTON_CLOSE, is_chrome)));
}
- // no titles displayed on "chrome" floaters
- if (mDragHandle)
- mDragHandle->setTitleVisible(!is_chrome);
-
LLPanel::setIsChrome(is_chrome);
}
-void LLFloater::setTitleVisible(bool visible)
-{
- if (mDragHandle)
- mDragHandle->setTitleVisible(visible);
-}
-
// Change the draw style to account for the foreground state.
void LLFloater::setForeground(BOOL front)
{
@@ -1311,7 +1403,10 @@ void LLFloater::moveResizeHandlesToFront()
BOOL LLFloater::isFrontmost()
{
- return gFloaterView && gFloaterView->getFrontmost() == this && getVisible();
+ LLFloaterView* floater_view = getParentByType<LLFloaterView>();
+ return getVisible()
+ && (floater_view
+ && floater_view->getFrontmost() == this);
}
void LLFloater::addDependentFloater(LLFloater* floaterp, BOOL reposition)
@@ -1384,6 +1479,7 @@ BOOL LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
if(offerClickToButton(x, y, mask, BUTTON_CLOSE)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_RESTORE)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_TEAR_OFF)) return TRUE;
+ if(offerClickToButton(x, y, mask, BUTTON_DOCK)) return TRUE;
// Otherwise pass to drag handle for movement
return mDragHandle->handleMouseDown(x, y, mask);
@@ -1489,6 +1585,13 @@ void LLFloater::setDocked(bool docked, bool pop_on_undock)
{
mDocked = docked;
mButtonsEnabled[BUTTON_DOCK] = !mDocked;
+
+ if (mDocked)
+ {
+ setMinimized(FALSE);
+ mOpenPositioning = LLFloaterEnums::OPEN_POSITIONING_NONE;
+ }
+
updateTitleButtons();
storeDockStateControl();
@@ -1572,18 +1675,17 @@ void LLFloater::onClickHelp( LLFloater* self )
LLFloater* LLFloater::getClosableFloaterFromFocus()
{
LLFloater* focused_floater = NULL;
-
- handle_map_iter_t iter;
- for(iter = sFloaterMap.begin(); iter != sFloaterMap.end(); ++iter)
+ LLInstanceTracker<LLFloater>::instance_iter it = beginInstances();
+ LLInstanceTracker<LLFloater>::instance_iter end_it = endInstances();
+ for (; it != end_it; ++it)
{
- focused_floater = iter->second;
- if (focused_floater->hasFocus())
+ if (it->hasFocus())
{
break;
}
}
- if (iter == sFloaterMap.end())
+ if (it == endInstances())
{
// nothing found, return
return NULL;
@@ -1727,7 +1829,7 @@ void LLFloater::draw()
{
drawChild(mButtons[i]);
}
- drawChild(mDragHandle);
+ drawChild(mDragHandle, 0, 0, TRUE);
}
else
{
@@ -1844,6 +1946,12 @@ void LLFloater::setCanDrag(BOOL can_drag)
}
}
+bool LLFloater::getCanDrag()
+{
+ return mDragHandle->getEnabled();
+}
+
+
void LLFloater::updateTitleButtons()
{
static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
@@ -2048,7 +2156,6 @@ static LLDefaultChildRegistry::Register<LLFloaterView> r("floater_view");
LLFloaterView::LLFloaterView (const Params& p)
: LLUICtrl (p),
-
mFocusCycleMode(FALSE),
mMinimizePositionVOffset(0),
mSnapOffsetBottom(0),
@@ -2059,14 +2166,15 @@ LLFloaterView::LLFloaterView (const Params& p)
// By default, adjust vertical.
void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
{
- reshapeFloater(width, height, called_from_parent, ADJUST_VERTICAL_YES);
-}
+ S32 old_right = mLastSnapRect.mRight;
+ S32 old_top = mLastSnapRect.mTop;
-// When reshaping this view, make the floaters follow their closest edge.
-void LLFloaterView::reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical)
-{
- S32 old_width = getRect().getWidth();
- S32 old_height = getRect().getHeight();
+ LLView::reshape(width, height, called_from_parent);
+
+ S32 new_right = getSnapRect().mRight;
+ S32 new_top = getSnapRect().mTop;
+
+ mLastSnapRect = getSnapRect();
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
@@ -2074,70 +2182,48 @@ void LLFloaterView::reshapeFloater(S32 width, S32 height, BOOL called_from_paren
LLFloater* floaterp = (LLFloater*)viewp;
if (floaterp->isDependent())
{
- // dependents use same follow flags as their "dependee"
+ // dependents are moved with their "dependee"
continue;
}
- // Make if follow the edge it is closest to
- U32 follow_flags = 0x0;
-
- if (floaterp->isMinimized())
- {
- follow_flags |= (FOLLOWS_LEFT | FOLLOWS_TOP);
- }
- else
+ if (!floaterp->isMinimized())
{
LLRect r = floaterp->getRect();
// Compute absolute distance from each edge of screen
S32 left_offset = llabs(r.mLeft - 0);
- S32 right_offset = llabs(old_width - r.mRight);
+ S32 right_offset = llabs(old_right - r.mRight);
- S32 top_offset = llabs(old_height - r.mTop);
+ S32 top_offset = llabs(old_top - r.mTop);
S32 bottom_offset = llabs(r.mBottom - 0);
+ S32 translate_x = 0;
+ S32 translate_y = 0;
- if (left_offset < right_offset)
- {
- follow_flags |= FOLLOWS_LEFT;
- }
- else
+ if (left_offset > right_offset)
{
- follow_flags |= FOLLOWS_RIGHT;
+ translate_x = new_right - old_right;
}
- // "No vertical adjustment" usually means that the bottom of the view
- // has been pushed up or down. Hence we want the floaters to follow
- // the top.
- if (!adjust_vertical)
+ if (top_offset < bottom_offset)
{
- follow_flags |= FOLLOWS_TOP;
+ translate_y = new_top - old_top;
}
- else if (top_offset < bottom_offset)
+
+ // don't reposition immovable floaters
+ if (floaterp->getCanDrag())
{
- follow_flags |= FOLLOWS_TOP;
+ floaterp->translate(translate_x, translate_y);
}
- else
+ BOOST_FOREACH(LLHandle<LLFloater> dependent_floater, floaterp->mDependents)
{
- follow_flags |= FOLLOWS_BOTTOM;
- }
- }
-
- floaterp->setFollows(follow_flags);
-
- //RN: all dependent floaters copy follow behavior of "parent"
- for(LLFloater::handle_set_iter_t dependent_it = floaterp->mDependents.begin();
- dependent_it != floaterp->mDependents.end(); ++dependent_it)
- {
- LLFloater* dependent_floaterp = dependent_it->get();
- if (dependent_floaterp)
- {
- dependent_floaterp->setFollows(follow_flags);
+ if (dependent_floater.get())
+ {
+ dependent_floater.get()->translate(translate_x, translate_y);
+ }
}
}
}
-
- LLView::reshape(width, height, called_from_parent);
}
@@ -2458,6 +2544,52 @@ void LLFloaterView::closeAllChildren(bool app_quitting)
}
}
+void LLFloaterView::hiddenFloaterClosed(LLFloater* floater)
+{
+ for (hidden_floaters_t::iterator it = mHiddenFloaters.begin(), end_it = mHiddenFloaters.end();
+ it != end_it;
+ ++it)
+ {
+ if (it->first.get() == floater)
+ {
+ it->second.disconnect();
+ mHiddenFloaters.erase(it);
+ break;
+ }
+ }
+}
+
+void LLFloaterView::hideAllFloaters()
+{
+ child_list_t child_list = *(getChildList());
+
+ for (child_list_iter_t it = child_list.begin(); it != child_list.end(); ++it)
+ {
+ LLFloater* floaterp = dynamic_cast<LLFloater*>(*it);
+ if (floaterp && floaterp->getVisible())
+ {
+ floaterp->setVisible(false);
+ boost::signals2::connection connection = floaterp->mCloseSignal.connect(boost::bind(&LLFloaterView::hiddenFloaterClosed, this, floaterp));
+ mHiddenFloaters.push_back(std::make_pair(floaterp->getHandle(), connection));
+ }
+ }
+}
+
+void LLFloaterView::showHiddenFloaters()
+{
+ for (hidden_floaters_t::iterator it = mHiddenFloaters.begin(), end_it = mHiddenFloaters.end();
+ it != end_it;
+ ++it)
+ {
+ LLFloater* floaterp = it->first.get();
+ if (floaterp)
+ {
+ floaterp->setVisible(true);
+ }
+ it->second.disconnect();
+ }
+ mHiddenFloaters.clear();
+}
BOOL LLFloaterView::allChildrenClosed()
{
@@ -2491,6 +2623,12 @@ void LLFloaterView::shiftFloaters(S32 x_offset, S32 y_offset)
void LLFloaterView::refresh()
{
+ LLRect snap_rect = getSnapRect();
+ if (snap_rect != mLastSnapRect)
+ {
+ reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
+ }
+
// Constrain children to be entirely on the screen
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
@@ -2556,7 +2694,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
}
// move window fully onscreen
- if (floater->translateIntoRect( getLocalRect(), allow_partial_outside ))
+ if (floater->translateIntoRect( getSnapRect(), allow_partial_outside ))
{
floater->clearSnapTarget();
}
@@ -2782,7 +2920,6 @@ void LLFloater::setInstanceName(const std::string& name)
{
mDocStateControl = LLFloaterReg::declareDockStateControl(ctrl_name);
}
-
}
}
@@ -2829,6 +2966,9 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
// control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
LLPanel::initFromParams(p);
+ // override any follows flags
+ setFollows(FOLLOWS_NONE);
+
mTitle = p.title;
mShortTitle = p.short_title;
applyTitle();
@@ -2844,10 +2984,13 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mHeaderHeight = p.header_height;
mLegacyHeaderHeight = p.legacy_header_height;
mSingleInstance = p.single_instance;
- mAutoTile = p.auto_tile;
- mOpenCentered = p.open_centered;
+ mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance;
+
+ mOpenPositioning = p.open_positioning;
+ mSpecifiedLeft = p.specified_left;
+ mSpecifiedBottom = p.specified_bottom;
- if (p.save_rect)
+ if (p.save_rect && mRectControl.empty())
{
mRectControl = "t"; // flag to build mRectControl name once mInstanceName is set
}
@@ -2855,7 +2998,6 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
{
mVisibilityControl = "t"; // flag to build mVisibilityControl name once mInstanceName is set
}
-
if(p.save_dock_state)
{
mDocStateControl = "t"; // flag to build mDocStateControl name once mInstanceName is set
@@ -2864,13 +3006,18 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
// open callback
if (p.open_callback.isProvided())
{
- mOpenSignal.connect(initCommitCallback(p.open_callback));
+ setOpenCallback(initCommitCallback(p.open_callback));
}
// close callback
if (p.close_callback.isProvided())
{
setCloseCallback(initCommitCallback(p.close_callback));
}
+
+ if (mDragHandle)
+ {
+ mDragHandle->setTitleVisible(p.show_title);
+ }
}
boost::signals2::connection LLFloater::setMinimizeCallback( const commit_signal_t::slot_type& cb )
@@ -2879,19 +3026,67 @@ boost::signals2::connection LLFloater::setMinimizeCallback( const commit_signal_
return mMinimizeSignal->connect(cb);
}
+boost::signals2::connection LLFloater::setOpenCallback( const commit_signal_t::slot_type& cb )
+{
+ return mOpenSignal.connect(cb);
+}
+
boost::signals2::connection LLFloater::setCloseCallback( const commit_signal_t::slot_type& cb )
{
return mCloseSignal.connect(cb);
}
LLFastTimer::DeclareTimer POST_BUILD("Floater Post Build");
+static LLFastTimer::DeclareTimer FTM_EXTERNAL_FLOATER_LOAD("Load Extern Floater Reference");
bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node)
{
- Params params(LLUICtrlFactory::getDefaultParams<LLFloater>());
+ Params default_params(LLUICtrlFactory::getDefaultParams<LLFloater>());
+ Params params(default_params);
+
LLXUIParser parser;
parser.readXUI(node, params, filename); // *TODO: Error checking
+ std::string xml_filename = params.filename;
+
+ if (!xml_filename.empty())
+ {
+ LLXMLNodePtr referenced_xml;
+
+ if (output_node)
+ {
+ //if we are exporting, we want to export the current xml
+ //not the referenced xml
+ Params output_params;
+ parser.readXUI(node, output_params, LLUICtrlFactory::getInstance()->getCurFileName());
+ setupParamsForExport(output_params, parent);
+ output_node->setName(node->getName()->mString);
+ parser.writeXUI(output_node, output_params, &default_params);
+ return TRUE;
+ }
+
+ LLUICtrlFactory::instance().pushFileName(xml_filename);
+
+ LLFastTimer _(FTM_EXTERNAL_FLOATER_LOAD);
+ if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml))
+ {
+ llwarns << "Couldn't parse panel from: " << xml_filename << llendl;
+
+ return FALSE;
+ }
+
+ Params referenced_params;
+ parser.readXUI(referenced_xml, referenced_params, LLUICtrlFactory::getInstance()->getCurFileName());
+ params.fillFrom(referenced_params);
+
+ // add children using dimensions from referenced xml for consistent layout
+ setShape(params.rect);
+ LLUICtrlFactory::createChildren(this, referenced_xml, child_registry_t::instance());
+
+ LLUICtrlFactory::instance().popFileName();
+ }
+
+
if (output_node)
{
Params output_params(params);
@@ -2912,7 +3107,6 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
{
params.rect.left.set(0);
}
-
params.from_xui = true;
applyXUILayout(params, parent);
initFromParams(params);
@@ -3054,3 +3248,24 @@ bool LLFloater::buildFromFile(const std::string& filename, LLXMLNodePtr output_n
return res;
}
+
+void LLFloater::stackWith(LLFloater& other)
+{
+ static LLUICachedControl<S32> floater_offset ("UIFloaterOffset", 16);
+
+ LLRect next_rect;
+ if (other.getHost())
+ {
+ next_rect = other.getHost()->getRect();
+ }
+ else
+ {
+ next_rect = other.getRect();
+ }
+ next_rect.translate(floater_offset, -floater_offset);
+
+ next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, getRect().getWidth(), getRect().getHeight());
+
+ setShape(next_rect);
+}
+
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 5b7b020881..59b35d206f 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -35,6 +35,7 @@
#include "lluuid.h"
//#include "llnotificationsutil.h"
#include <set>
+#include <boost/signals2.hpp>
class LLDragHandle;
class LLResizeHandle;
@@ -59,11 +60,35 @@ const BOOL CLOSE_NO = FALSE;
const BOOL ADJUST_VERTICAL_YES = TRUE;
const BOOL ADJUST_VERTICAL_NO = FALSE;
-class LLFloater : public LLPanel
+namespace LLFloaterEnums
{
-friend class LLFloaterView;
-friend class LLFloaterReg;
-friend class LLMultiFloater;
+ enum EOpenPositioning
+ {
+ OPEN_POSITIONING_NONE,
+ OPEN_POSITIONING_CASCADING,
+ OPEN_POSITIONING_CASCADE_GROUP,
+ OPEN_POSITIONING_CENTERED,
+ OPEN_POSITIONING_SPECIFIED,
+ OPEN_POSITIONING_COUNT
+ };
+}
+
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<LLFloaterEnums::EOpenPositioning> : public TypeValuesHelper<LLFloaterEnums::EOpenPositioning>
+ {
+ static void declareValues();
+ };
+}
+
+
+class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater>
+{
+ friend class LLFloaterView;
+ friend class LLFloaterReg;
+ friend class LLMultiFloater;
+
public:
struct KeyCompare
{
@@ -95,7 +120,7 @@ public:
short_title;
Optional<bool> single_instance,
- auto_tile,
+ reuse_instance,
can_resize,
can_minimize,
can_close,
@@ -105,7 +130,13 @@ public:
save_visibility,
save_dock_state,
can_dock,
- open_centered;
+ show_title;
+
+ Optional<LLFloaterEnums::EOpenPositioning> open_positioning;
+ Optional<S32> specified_left;
+ Optional<S32> specified_bottom;
+
+
Optional<S32> header_height,
legacy_header_height; // HACK see initFromXML()
@@ -125,6 +156,8 @@ public:
Optional<CommitCallbackParam> open_callback,
close_callback;
+
+ Ignored follows;
Params();
};
@@ -144,6 +177,7 @@ public:
bool buildFromFile(const std::string &filename, LLXMLNodePtr output_node = NULL);
boost::signals2::connection setMinimizeCallback( const commit_signal_t::slot_type& cb );
+ boost::signals2::connection setOpenCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setCloseCallback( const commit_signal_t::slot_type& cb );
void initFromParams(const LLFloater::Params& p);
@@ -179,7 +213,6 @@ public:
std::string getTitle() const;
void setShortTitle( const std::string& short_title );
std::string getShortTitle() const;
- void setTitleVisible(bool visible);
virtual void setMinimized(BOOL b);
void moveResizeHandlesToFront();
void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE);
@@ -203,6 +236,7 @@ public:
void setCanTearOff(BOOL can_tear_off);
virtual void setCanResize(BOOL can_resize);
void setCanDrag(BOOL can_drag);
+ bool getCanDrag();
void setHost(LLMultiFloater* host);
BOOL isResizable() const { return mResizable; }
void setResizeLimits( S32 min_width, S32 min_height );
@@ -251,9 +285,9 @@ public:
void clearSnapTarget() { mSnappedTo.markDead(); }
LLHandle<LLFloater> getSnapTarget() const { return mSnappedTo; }
- LLHandle<LLFloater> getHandle() const { return mHandle; }
+ LLHandle<LLFloater> getHandle() const { return getDerivedHandle<LLFloater>(); }
const LLSD& getKey() { return mKey; }
- BOOL matchesKey(const LLSD& key) { return mSingleInstance || KeyCompare::equate(key, mKey); }
+ virtual bool matchesKey(const LLSD& key) { return mSingleInstance || KeyCompare::equate(key, mKey); }
const std::string& getInstanceName() { return mInstanceName; }
@@ -288,14 +322,17 @@ public:
void updateTransparency(ETypeTransparency transparency_type);
-protected:
+ void enableResizeCtrls(bool enable, bool width = true, bool height = true);
- void setRectControl(const std::string& rectname) { mRectControl = rectname; };
+ bool isPositioning(LLFloaterEnums::EOpenPositioning p) const { return (p == mOpenPositioning); }
+protected:
+ void applyControlsAndPosition(LLFloater* other);
- virtual void applySavedVariables();
+ void stackWith(LLFloater& other);
- void applyRectControl();
- void applyDockState();
+ virtual bool applyRectControl();
+ bool applyDockState();
+ void applyPositioning(LLFloater* other);
void storeRectControl();
void storeVisibilityControl();
void storeDockStateControl();
@@ -340,7 +377,6 @@ private:
BOOL offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index);
void addResizeCtrls();
void layoutResizeCtrls();
- void enableResizeCtrls(bool enable);
void addDragHandle();
void layoutDragHandle(); // repair layout
@@ -377,15 +413,18 @@ private:
LLUIString mShortTitle;
BOOL mSingleInstance; // TRUE if there is only ever one instance of the floater
+ bool mReuseInstance; // true if we want to hide the floater when we close it instead of destroying it
std::string mInstanceName; // Store the instance name so we can remove ourselves from the list
- BOOL mAutoTile; // TRUE if placement of new instances tiles
BOOL mCanTearOff;
BOOL mCanMinimize;
BOOL mCanClose;
BOOL mDragOnLeft;
BOOL mResizable;
- bool mOpenCentered;
+
+ LLFloaterEnums::EOpenPositioning mOpenPositioning;
+ S32 mSpecifiedLeft;
+ S32 mSpecifiedBottom;
S32 mMinWidth;
S32 mMinHeight;
@@ -424,18 +463,9 @@ private:
typedef void(*click_callback)(LLFloater*);
static click_callback sButtonCallbacks[BUTTON_COUNT];
- typedef std::map<LLHandle<LLFloater>, LLFloater*> handle_map_t;
- typedef std::map<LLHandle<LLFloater>, LLFloater*>::iterator handle_map_iter_t;
- static handle_map_t sFloaterMap;
-
- std::vector<LLHandle<LLView> > mMinimizedHiddenChildren;
-
BOOL mHasBeenDraggedWhileMinimized;
S32 mPreviousMinimizedBottom;
S32 mPreviousMinimizedLeft;
-
-// LLFloaterNotificationContext* mNotificationContext;
- LLRootHandle<LLFloater> mHandle;
};
@@ -455,8 +485,6 @@ protected:
public:
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
-
/*virtual*/ void draw();
/*virtual*/ LLRect getSnapRect() const;
/*virtual*/ void refresh();
@@ -485,6 +513,10 @@ public:
BOOL allChildrenClosed();
void shiftFloaters(S32 x_offset, S32 y_offset);
+ void hideAllFloaters();
+ void showHiddenFloaters();
+
+
LLFloater* getFrontmost() const;
LLFloater* getBackmost() const;
LLFloater* getParentFloater(LLView* viewp) const;
@@ -499,11 +531,16 @@ public:
void setFloaterSnapView(LLHandle<LLView> snap_view) {mSnapView = snap_view; }
private:
+ void hiddenFloaterClosed(LLFloater* floater);
+
+ LLRect mLastSnapRect;
LLHandle<LLView> mSnapView;
BOOL mFocusCycleMode;
S32 mSnapOffsetBottom;
S32 mSnapOffsetRight;
S32 mMinimizePositionVOffset;
+ typedef std::vector<std::pair<LLHandle<LLFloater>, boost::signals2::connection> > hidden_floaters_t;
+ hidden_floaters_t mHiddenFloaters;
};
//
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 4677d535db..e144b68f5e 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -57,29 +57,57 @@ void LLFloaterReg::add(const std::string& name, const std::string& filename, con
}
//static
-LLRect LLFloaterReg::getFloaterRect(const std::string& name)
+LLFloater* LLFloaterReg::getLastFloaterInGroup(const std::string& name)
{
- LLRect rect;
const std::string& groupname = sGroupMap[name];
if (!groupname.empty())
{
instance_list_t& list = sInstanceMap[groupname];
if (!list.empty())
{
- static LLUICachedControl<S32> floater_offset ("UIFloaterOffset", 16);
- LLFloater* last_floater = list.back();
- if (last_floater->getHost())
+ for (instance_list_t::reverse_iterator iter = list.rbegin(); iter != list.rend(); ++iter)
{
- rect = last_floater->getHost()->getRect();
+ LLFloater* inst = *iter;
+
+ if (inst->getVisible() && !inst->isMinimized())
+ {
+ return inst;
+ }
}
- else
+ }
+ }
+ return NULL;
+}
+
+LLFloater* LLFloaterReg::getLastFloaterCascading()
+{
+ LLRect candidate_rect;
+ candidate_rect.mTop = 100000;
+ LLFloater* candidate_floater = NULL;
+
+ std::map<std::string,std::string>::const_iterator it = sGroupMap.begin(), it_end = sGroupMap.end();
+ for( ; it != it_end; ++it)
+ {
+ const std::string& group_name = it->second;
+
+ instance_list_t& instances = sInstanceMap[group_name];
+
+ for (instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); ++iter)
+ {
+ LLFloater* inst = *iter;
+
+ if (inst->getVisible() && inst->isPositioning(LLFloaterEnums::OPEN_POSITIONING_CASCADING))
{
- rect = last_floater->getRect();
+ if (candidate_rect.mTop > inst->getRect().mTop)
+ {
+ candidate_floater = inst;
+ candidate_rect = inst->getRect();
+ }
}
- rect.translate(floater_offset, -floater_offset);
}
}
- return rect;
+
+ return candidate_floater;
}
//static
@@ -117,34 +145,33 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
if (!groupname.empty())
{
instance_list_t& list = sInstanceMap[groupname];
- int index = list.size();
res = build_func(key);
-
+ if (!res)
+ {
+ llwarns << "Failed to build floater type: '" << name << "'." << llendl;
+ return NULL;
+ }
bool success = res->buildFromFile(xui_file, NULL);
if (!success)
{
llwarns << "Failed to build floater type: '" << name << "'." << llendl;
return NULL;
}
-
+
// Note: key should eventually be a non optional LLFloater arg; for now, set mKey to be safe
- res->mKey = key;
- res->setInstanceName(name);
- res->applySavedVariables(); // Can't apply rect and dock state until setting instance name
- if (res->mAutoTile && !res->getHost() && index > 0)
- {
- const LLRect& cur_rect = res->getRect();
- LLRect next_rect = getFloaterRect(groupname);
- next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, cur_rect.getWidth(), cur_rect.getHeight());
- res->setRect(next_rect);
- res->setRectControl(LLStringUtil::null); // don't save rect of tiled floaters
- gFloaterView->adjustToFitScreen(res, true);
- }
- else
+ if (res->mKey.isUndefined())
{
- gFloaterView->adjustToFitScreen(res, false);
+ res->mKey = key;
}
+ res->setInstanceName(name);
+
+ LLFloater *last_floater = (list.empty() ? NULL : list.back());
+
+ res->applyControlsAndPosition(last_floater);
+
+ gFloaterView->adjustToFitScreen(res, false);
+
list.push_back(res);
}
}
@@ -410,70 +437,71 @@ void LLFloaterReg::registerControlVariables()
}
}
-// Callbacks
-
-// static
-// Call once (i.e use for init callbacks)
-void LLFloaterReg::initUICtrlToFloaterVisibilityControl(LLUICtrl* ctrl, const LLSD& sdname)
+//static
+void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& key)
{
- // Get the visibility control name for the floater
- std::string vis_control_name = LLFloaterReg::declareVisibilityControl(sdname.asString());
- // Set the control value to the floater visibility control (Sets the value as well)
- ctrl->setControlVariable(LLFloater::getControlGroup()->getControl(vis_control_name));
-}
+ //
+ // Floaters controlled by the toolbar behave a bit differently from others.
+ // Namely they have 3-4 states as defined in the design wiki page here:
+ // https://wiki.lindenlab.com/wiki/FUI_Button_states
+ //
+ // The basic idea is this:
+ // * If the target floater is minimized, this button press will un-minimize it.
+ // * Else if the target floater is closed open it.
+ // * Else if the target floater does not have focus, give it focus.
+ // * Also, if it is not on top, bring it forward when focus is given.
+ // * Else the target floater is open, close it.
+ //
-// callback args may use "floatername.key" format
-static void parse_name_key(std::string& name, LLSD& key)
-{
- std::string instname = name;
- std::size_t dotpos = instname.find(".");
- if (dotpos != std::string::npos)
+ std::string name = sdname.asString();
+ LLFloater* instance = getInstance(name, key);
+
+ if (!instance)
{
- name = instname.substr(0, dotpos);
- key = LLSD(instname.substr(dotpos+1, std::string::npos));
+ lldebugs << "Unable to get instance of floater '" << name << "'" << llendl;
+ }
+ else if (instance->isMinimized())
+ {
+ instance->setMinimized(FALSE);
+ instance->setVisibleAndFrontmost();
+ }
+ else if (!instance->isShown())
+ {
+ instance->openFloater(key);
+ instance->setVisibleAndFrontmost();
+ }
+ else if (!instance->isFrontmost())
+ {
+ instance->setVisibleAndFrontmost();
+ }
+ else
+ {
+ instance->closeFloater();
}
}
-//static
-void LLFloaterReg::showFloaterInstance(const LLSD& sdname)
-{
- LLSD key;
- std::string name = sdname.asString();
- parse_name_key(name, key);
- showInstance(name, key, TRUE);
-}
-//static
-void LLFloaterReg::hideFloaterInstance(const LLSD& sdname)
-{
- LLSD key;
- std::string name = sdname.asString();
- parse_name_key(name, key);
- hideInstance(name, key);
-}
-//static
-void LLFloaterReg::toggleFloaterInstance(const LLSD& sdname)
+// static
+U32 LLFloaterReg::getVisibleFloaterInstanceCount()
{
- LLSD key;
- std::string name = sdname.asString();
- parse_name_key(name, key);
- toggleInstance(name, key);
-}
+ U32 count = 0;
-//static
-bool LLFloaterReg::floaterInstanceVisible(const LLSD& sdname)
-{
- LLSD key;
- std::string name = sdname.asString();
- parse_name_key(name, key);
- return instanceVisible(name, key);
-}
+ std::map<std::string,std::string>::const_iterator it = sGroupMap.begin(), it_end = sGroupMap.end();
+ for( ; it != it_end; ++it)
+ {
+ const std::string& group_name = it->second;
-//static
-bool LLFloaterReg::floaterInstanceMinimized(const LLSD& sdname)
-{
- LLSD key;
- std::string name = sdname.asString();
- parse_name_key(name, key);
- LLFloater* instance = findInstance(name, key);
- return LLFloater::isShown(instance);
+ instance_list_t& instances = sInstanceMap[group_name];
+
+ for (instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); ++iter)
+ {
+ LLFloater* inst = *iter;
+
+ if (inst->getVisible() && !inst->isMinimized())
+ {
+ count++;
+ }
+ }
+ }
+
+ return count;
}
diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h
index 8414b92113..534cf8b40a 100644
--- a/indra/llui/llfloaterreg.h
+++ b/indra/llui/llfloaterreg.h
@@ -86,7 +86,8 @@ public:
const std::string& groupname = LLStringUtil::null);
// Helpers
- static LLRect getFloaterRect(const std::string& name);
+ static LLFloater* getLastFloaterInGroup(const std::string& name);
+ static LLFloater* getLastFloaterCascading();
// Find / get (create) / remove / destroy
static LLFloater* findInstance(const std::string& name, const LLSD& key = LLSD());
@@ -123,12 +124,7 @@ public:
static void registerControlVariables();
// Callback wrappers
- static void initUICtrlToFloaterVisibilityControl(LLUICtrl* ctrl, const LLSD& sdname);
- static void showFloaterInstance(const LLSD& sdname);
- static void hideFloaterInstance(const LLSD& sdname);
- static void toggleFloaterInstance(const LLSD& sdname);
- static bool floaterInstanceVisible(const LLSD& sdname);
- static bool floaterInstanceMinimized(const LLSD& sdname);
+ static void toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& key = LLSD());
// Typed find / get / show
template <class T>
@@ -151,6 +147,7 @@ public:
static void blockShowFloaters(bool value) { sBlockShowFloaters = value;}
+ static U32 getVisibleFloaterInstanceCount();
};
#endif
diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h
index 8d59380a00..36998eba2e 100644
--- a/indra/llui/llflyoutbutton.h
+++ b/indra/llui/llflyoutbutton.h
@@ -46,7 +46,7 @@ public:
: action_button("action_button"),
allow_text_entry("allow_text_entry")
{
- LLComboBox::Params::allow_text_entry = false;
+ changeDefault(LLComboBox::Params::allow_text_entry, false);
}
};
diff --git a/indra/llui/llfunctorregistry.h b/indra/llui/llfunctorregistry.h
index 752c7df7ee..899cc3a326 100644
--- a/indra/llui/llfunctorregistry.h
+++ b/indra/llui/llfunctorregistry.h
@@ -103,7 +103,7 @@ public:
}
else
{
- llwarns << "tried to find '" << name << "' in LLFunctorRegistry, but it wasn't there." << llendl;
+ lldebugs << "tried to find '" << name << "' in LLFunctorRegistry, but it wasn't there." << llendl;
return mMap[LOGFUNCTOR];
}
}
@@ -115,7 +115,7 @@ private:
static void log_functor(const LLSD& notification, const LLSD& payload)
{
- llwarns << "log_functor called with payload: " << payload << llendl;
+ lldebugs << "log_functor called with payload: " << payload << llendl;
}
static void do_nothing(const LLSD& notification, const LLSD& payload)
diff --git a/indra/llui/llhandle.h b/indra/llui/llhandle.h
index 8c000eee48..37c657dd92 100644
--- a/indra/llui/llhandle.h
+++ b/indra/llui/llhandle.h
@@ -28,17 +28,18 @@
#define LLHANDLE_H
#include "llpointer.h"
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
-template <typename T>
class LLTombStone : public LLRefCount
{
public:
- LLTombStone(T* target = NULL) : mTarget(target) {}
+ LLTombStone(void* target = NULL) : mTarget(target) {}
- void setTarget(T* target) { mTarget = target; }
- T* getTarget() const { return mTarget; }
+ void setTarget(void* target) { mTarget = target; }
+ void* getTarget() const { return mTarget; }
private:
- T* mTarget;
+ mutable void* mTarget;
};
// LLHandles are used to refer to objects whose lifetime you do not control or influence.
@@ -53,13 +54,15 @@ private:
template <typename T>
class LLHandle
{
+ template <typename U> friend class LLHandle;
+ template <typename U> friend class LLHandleProvider;
public:
LLHandle() : mTombStone(getDefaultTombStone()) {}
- const LLHandle<T>& operator =(const LLHandle<T>& other)
- {
- mTombStone = other.mTombStone;
- return *this;
- }
+
+ template<typename U>
+ LLHandle(const LLHandle<U>& other, typename boost::enable_if< typename boost::is_convertible<U*, T*> >::type* dummy = 0)
+ : mTombStone(other.mTombStone)
+ {}
bool isDead() const
{
@@ -73,7 +76,7 @@ public:
T* get() const
{
- return mTombStone->getTarget();
+ return reinterpret_cast<T*>(mTombStone->getTarget());
}
friend bool operator== (const LLHandle<T>& lhs, const LLHandle<T>& rhs)
@@ -94,12 +97,13 @@ public:
}
protected:
- LLPointer<LLTombStone<T> > mTombStone;
+ LLPointer<LLTombStone> mTombStone;
private:
- static LLPointer<LLTombStone<T> >& getDefaultTombStone()
+ typedef T* pointer_t;
+ static LLPointer<LLTombStone>& getDefaultTombStone()
{
- static LLPointer<LLTombStone<T> > sDefaultTombStone = new LLTombStone<T>;
+ static LLPointer<LLTombStone> sDefaultTombStone = new LLTombStone;
return sDefaultTombStone;
}
};
@@ -108,23 +112,26 @@ template <typename T>
class LLRootHandle : public LLHandle<T>
{
public:
+ typedef LLRootHandle<T> self_t;
+ typedef LLHandle<T> base_t;
+
LLRootHandle(T* object) { bind(object); }
LLRootHandle() {};
~LLRootHandle() { unbind(); }
- // this is redundant, since a LLRootHandle *is* an LLHandle
- LLHandle<T> getHandle() { return LLHandle<T>(*this); }
+ // this is redundant, since an LLRootHandle *is* an LLHandle
+ //LLHandle<T> getHandle() { return LLHandle<T>(*this); }
void bind(T* object)
{
// unbind existing tombstone
if (LLHandle<T>::mTombStone.notNull())
{
- if (LLHandle<T>::mTombStone->getTarget() == object) return;
+ if (LLHandle<T>::mTombStone->getTarget() == (void*)object) return;
LLHandle<T>::mTombStone->setTarget(NULL);
}
// tombstone reference counted, so no paired delete
- LLHandle<T>::mTombStone = new LLTombStone<T>(object);
+ LLHandle<T>::mTombStone = new LLTombStone((void*)object);
}
void unbind()
@@ -142,6 +149,15 @@ private:
template <typename T>
class LLHandleProvider
{
+public:
+ LLHandle<T> getHandle() const
+ {
+ // perform lazy binding to avoid small tombstone allocations for handle
+ // providers whose handles are never referenced
+ mHandle.bind(static_cast<T*>(const_cast<LLHandleProvider<T>* >(this)));
+ return mHandle;
+ }
+
protected:
typedef LLHandle<T> handle_type_t;
LLHandleProvider()
@@ -149,16 +165,17 @@ protected:
// provided here to enforce T deriving from LLHandleProvider<T>
}
- LLHandle<T> getHandle()
- {
- // perform lazy binding to avoid small tombstone allocations for handle
- // providers whose handles are never referenced
- mHandle.bind(static_cast<T*>(this));
- return mHandle;
+ template <typename U>
+ LLHandle<U> getDerivedHandle(typename boost::enable_if< typename boost::is_convertible<U*, T*> >::type* dummy = 0) const
+ {
+ LLHandle<U> downcast_handle;
+ downcast_handle.mTombStone = getHandle().mTombStone;
+ return downcast_handle;
}
+
private:
- LLRootHandle<T> mHandle;
+ mutable LLRootHandle<T> mHandle;
};
#endif
diff --git a/indra/llui/llhelp.h b/indra/llui/llhelp.h
index 83317bd03c..1726347a78 100644
--- a/indra/llui/llhelp.h
+++ b/indra/llui/llhelp.h
@@ -32,6 +32,7 @@ class LLHelp
{
public:
virtual void showTopic(const std::string &topic) = 0;
+ virtual std::string getURL(const std::string &topic) = 0;
// return default (fallback) topic name suitable for showTopic()
virtual std::string defaultTopic() = 0;
// return topic to use before the user logs in
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp
index 47f2cfaf89..30b79b4d20 100644
--- a/indra/llui/lliconctrl.cpp
+++ b/indra/llui/lliconctrl.cpp
@@ -43,10 +43,7 @@ LLIconCtrl::Params::Params()
color("color"),
use_draw_context_alpha("use_draw_context_alpha", true),
scale_image("scale_image")
-{
- tab_stop = false;
- mouse_opaque = false;
-}
+{}
LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
: LLUICtrl(p),
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index ceec9c7eb1..c1cd04186b 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -57,6 +57,22 @@ LLKeywords::LLKeywords() : mLoaded(FALSE)
{
}
+inline BOOL LLKeywordToken::isTail(const llwchar* s) const
+{
+ BOOL res = TRUE;
+ const llwchar* t = mDelimiter.c_str();
+ S32 len = mDelimiter.size();
+ for (S32 i=0; i<len; i++)
+ {
+ if (s[i] != t[i])
+ {
+ res = FALSE;
+ break;
+ }
+ }
+ return res;
+}
+
LLKeywords::~LLKeywords()
{
std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer());
@@ -106,6 +122,7 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
std::string SOL_LINE("[line ");
std::string SOL_ONE_SIDED_DELIMITER("[one_sided_delimiter ");
std::string SOL_TWO_SIDED_DELIMITER("[two_sided_delimiter ");
+ std::string SOL_DOUBLE_QUOTATION_MARKS("[double_quotation_marks ");
LLColor3 cur_color( 1, 0, 0 );
LLKeywordToken::TOKEN_TYPE cur_type = LLKeywordToken::WORD;
@@ -137,6 +154,12 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
cur_type = LLKeywordToken::TWO_SIDED_DELIMITER;
continue;
}
+ else if( line.find(SOL_DOUBLE_QUOTATION_MARKS) == 0 )
+ {
+ cur_color = readColor( line.substr(SOL_DOUBLE_QUOTATION_MARKS.size()) );
+ cur_type = LLKeywordToken::DOUBLE_QUOTATION_MARKS;
+ continue;
+ }
else if( line.find(SOL_ONE_SIDED_DELIMITER) == 0 )
{
cur_color = readColor( line.substr(SOL_ONE_SIDED_DELIMITER.size()) );
@@ -154,10 +177,26 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
if( !token_buffer.empty() && token_word_iter != word_tokens.end() )
{
- // first word is keyword
+ // first word is the keyword or a left delimiter
std::string keyword = (*token_word_iter);
LLStringUtil::trim(keyword);
+ // second word may be a right delimiter
+ std::string delimiter;
+ if (cur_type == LLKeywordToken::TWO_SIDED_DELIMITER)
+ {
+ while (delimiter.length() == 0 && ++token_word_iter != word_tokens.end())
+ {
+ delimiter = *token_word_iter;
+ LLStringUtil::trim(delimiter);
+ }
+ }
+ else if (cur_type == LLKeywordToken::DOUBLE_QUOTATION_MARKS)
+ {
+ // Closing delimiter is identical to the opening one.
+ delimiter = keyword;
+ }
+
// following words are tooltip
std::string tool_tip;
while (++token_word_iter != word_tokens.end())
@@ -170,11 +209,11 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
{
// Replace : with \n for multi-line tool tips.
LLStringUtil::replaceChar( tool_tip, ':', '\n' );
- addToken(cur_type, keyword, cur_color, tool_tip );
+ addToken(cur_type, keyword, cur_color, tool_tip, delimiter );
}
else
{
- addToken(cur_type, keyword, cur_color, LLStringUtil::null );
+ addToken(cur_type, keyword, cur_color, LLStringUtil::null, delimiter );
}
}
}
@@ -189,23 +228,26 @@ BOOL LLKeywords::loadFromFile( const std::string& filename )
void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type,
const std::string& key_in,
const LLColor3& color,
- const std::string& tool_tip_in )
+ const std::string& tool_tip_in,
+ const std::string& delimiter_in)
{
LLWString key = utf8str_to_wstring(key_in);
LLWString tool_tip = utf8str_to_wstring(tool_tip_in);
+ LLWString delimiter = utf8str_to_wstring(delimiter_in);
switch(type)
{
case LLKeywordToken::WORD:
- mWordTokenMap[key] = new LLKeywordToken(type, color, key, tool_tip);
+ mWordTokenMap[key] = new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null);
break;
case LLKeywordToken::LINE:
- mLineTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip));
+ mLineTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null));
break;
case LLKeywordToken::TWO_SIDED_DELIMITER:
+ case LLKeywordToken::DOUBLE_QUOTATION_MARKS:
case LLKeywordToken::ONE_SIDED_DELIMITER:
- mDelimiterTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip));
+ mDelimiterTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, delimiter));
break;
default:
@@ -357,7 +399,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
}
// cur is now at the first non-whitespace character of a new line
-
+
// Line start tokens
{
BOOL line_done = FALSE;
@@ -418,14 +460,15 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
S32 seg_end = 0;
seg_start = cur - base;
- cur += cur_delimiter->getLength();
+ cur += cur_delimiter->getLengthHead();
- if( cur_delimiter->getType() == LLKeywordToken::TWO_SIDED_DELIMITER )
+ LLKeywordToken::TOKEN_TYPE type = cur_delimiter->getType();
+ if( type == LLKeywordToken::TWO_SIDED_DELIMITER || type == LLKeywordToken::DOUBLE_QUOTATION_MARKS )
{
- while( *cur && !cur_delimiter->isHead(cur))
+ while( *cur && !cur_delimiter->isTail(cur))
{
// Check for an escape sequence.
- if (*cur == '\\')
+ if (type == LLKeywordToken::DOUBLE_QUOTATION_MARKS && *cur == '\\')
{
// Count the number of backslashes.
S32 num_backslashes = 0;
@@ -435,10 +478,10 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
between_delimiters++;
cur++;
}
- // Is the next character the end delimiter?
- if (cur_delimiter->isHead(cur))
+ // If the next character is the end delimiter?
+ if (cur_delimiter->isTail(cur))
{
- // Is there was an odd number of backslashes, then this delimiter
+ // If there was an odd number of backslashes, then this delimiter
// does not end the sequence.
if (num_backslashes % 2 == 1)
{
@@ -461,13 +504,13 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
if( *cur )
{
- cur += cur_delimiter->getLength();
- seg_end = seg_start + between_delimiters + 2 * cur_delimiter->getLength();
+ cur += cur_delimiter->getLengthHead();
+ seg_end = seg_start + between_delimiters + cur_delimiter->getLengthHead() + cur_delimiter->getLengthTail();
}
else
{
// eof
- seg_end = seg_start + between_delimiters + cur_delimiter->getLength();
+ seg_end = seg_start + between_delimiters + cur_delimiter->getLengthHead();
}
}
else
@@ -479,7 +522,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
between_delimiters++;
cur++;
}
- seg_end = seg_start + between_delimiters + cur_delimiter->getLength();
+ seg_end = seg_start + between_delimiters + cur_delimiter->getLengthHead();
}
insertSegments(wtext, *seg_list,cur_delimiter, text_len, seg_start, seg_end, defaultColor, editor);
diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h
index f6d75b7e75..ac34015393 100644
--- a/indra/llui/llkeywords.h
+++ b/indra/llui/llkeywords.h
@@ -41,23 +41,44 @@ typedef LLPointer<LLTextSegment> LLTextSegmentPtr;
class LLKeywordToken
{
public:
- enum TOKEN_TYPE { WORD, LINE, TWO_SIDED_DELIMITER, ONE_SIDED_DELIMITER };
+ /**
+ * @brief Types of tokens/delimters being parsed.
+ *
+ * @desc Tokens/delimiters that need to be identified/highlighted. All are terminated if an EOF is encountered.
+ * - WORD are keywords in the normal sense, i.e. constants, events, etc.
+ * - LINE are for entire lines (currently only flow control labels use this).
+ * - ONE_SIDED_DELIMITER are for open-ended delimiters which are terminated by EOL.
+ * - TWO_SIDED_DELIMITER are for delimiters that end with a different delimiter than they open with.
+ * - DOUBLE_QUOTATION_MARKS are for delimiting areas using the same delimiter to open and close.
+ */
+ enum TOKEN_TYPE
+ {
+ WORD,
+ LINE,
+ TWO_SIDED_DELIMITER,
+ ONE_SIDED_DELIMITER,
+ DOUBLE_QUOTATION_MARKS
+ };
- LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip )
+ LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
:
mType( type ),
mToken( token ),
mColor( color ),
- mToolTip( tool_tip )
+ mToolTip( tool_tip ),
+ mDelimiter( delimiter ) // right delimiter
{
}
- S32 getLength() const { return mToken.size(); }
+ S32 getLengthHead() const { return mToken.size(); }
+ S32 getLengthTail() const { return mDelimiter.size(); }
BOOL isHead(const llwchar* s) const;
+ BOOL isTail(const llwchar* s) const;
const LLWString& getToken() const { return mToken; }
const LLColor3& getColor() const { return mColor; }
TOKEN_TYPE getType() const { return mType; }
const LLWString& getToolTip() const { return mToolTip; }
+ const LLWString& getDelimiter() const { return mDelimiter; }
#ifdef _DEBUG
void dump();
@@ -68,6 +89,7 @@ private:
LLWString mToken;
LLColor3 mColor;
LLWString mToolTip;
+ LLWString mDelimiter;
};
class LLKeywords
@@ -85,7 +107,8 @@ public:
void addToken(LLKeywordToken::TOKEN_TYPE type,
const std::string& key,
const LLColor3& color,
- const std::string& tool_tip = LLStringUtil::null);
+ const std::string& tool_tip = LLStringUtil::null,
+ const std::string& delimiter = LLStringUtil::null);
// This class is here as a performance optimization.
// The word token map used to be defined as std::map<LLWString, LLKeywordToken*>.
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 6a91ec56e4..0e7060e22c 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -47,6 +47,19 @@ void LLLayoutStack::OrientationNames::declareValues()
//
// LLLayoutPanel
//
+LLLayoutPanel::Params::Params()
+: expanded_min_dim("expanded_min_dim", 0),
+ min_dim("min_dim", 0),
+ max_dim("max_dim", S32_MAX),
+ user_resize("user_resize", true),
+ auto_resize("auto_resize", true)
+{
+ addSynonym(min_dim, "min_width");
+ addSynonym(min_dim, "min_height");
+ addSynonym(max_dim, "max_width");
+ addSynonym(max_dim, "max_height");
+}
+
LLLayoutPanel::LLLayoutPanel(const Params& p)
: LLPanel(p),
mExpandedMinDimSpecified(false),
@@ -58,7 +71,9 @@ LLLayoutPanel::LLLayoutPanel(const Params& p)
mCollapsed(FALSE),
mCollapseAmt(0.f),
mVisibleAmt(1.f), // default to fully visible
- mResizeBar(NULL)
+ mResizeBar(NULL),
+ mFractionalSize(0.f),
+ mOrientation(LLLayoutStack::HORIZONTAL)
{
// Set the expanded min dim if it is provided, otherwise it gets the p.min_dim value
if (p.expanded_min_dim.isProvided())
@@ -88,9 +103,22 @@ LLLayoutPanel::~LLLayoutPanel()
mResizeBar = NULL;
}
-F32 LLLayoutPanel::getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation)
+void LLLayoutPanel::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ if (mOrientation == LLLayoutStack::HORIZONTAL)
+ {
+ mFractionalSize += width - llround(mFractionalSize);
+ }
+ else
+ {
+ mFractionalSize += height - llround(mFractionalSize);
+ }
+ LLPanel::reshape(width, height, called_from_parent);
+}
+
+F32 LLLayoutPanel::getCollapseFactor()
{
- if (orientation == LLLayoutStack::HORIZONTAL)
+ if (mOrientation == LLLayoutStack::HORIZONTAL)
{
F32 collapse_amt =
clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)getRelevantMinDim() / (F32)llmax(1, getRect().getWidth()));
@@ -115,9 +143,7 @@ LLLayoutStack::Params::Params()
open_time_constant("open_time_constant", 0.02f),
close_time_constant("close_time_constant", 0.03f),
border_size("border_size", LLCachedControl<S32>(*LLUI::sSettingGroups["config"], "UIResizeBarHeight", 0))
-{
- name="stack";
-}
+{}
LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
: LLView(p),
@@ -151,11 +177,11 @@ void LLLayoutStack::draw()
// scale clipping rectangle by visible amount
if (mOrientation == HORIZONTAL)
{
- clip_rect.mRight = clip_rect.mLeft + llround((F32)clip_rect.getWidth() * (*panel_it)->getCollapseFactor(mOrientation));
+ clip_rect.mRight = clip_rect.mLeft + llround((F32)clip_rect.getWidth() * (*panel_it)->getCollapseFactor());
}
else
{
- clip_rect.mBottom = clip_rect.mTop - llround((F32)clip_rect.getHeight() * (*panel_it)->getCollapseFactor(mOrientation));
+ clip_rect.mBottom = clip_rect.mTop - llround((F32)clip_rect.getHeight() * (*panel_it)->getCollapseFactor());
}
LLPanel* panelp = (*panel_it);
@@ -195,36 +221,15 @@ bool LLLayoutStack::addChild(LLView* child, S32 tab_group)
LLLayoutPanel* panelp = dynamic_cast<LLLayoutPanel*>(child);
if (panelp)
{
+ panelp->mFractionalSize = (mOrientation == HORIZONTAL)
+ ? panelp->getRect().getWidth()
+ : panelp->getRect().getHeight();
+ panelp->setOrientation(mOrientation);
mPanels.push_back(panelp);
}
return LLView::addChild(child, tab_group);
}
-
-S32 LLLayoutStack::getDefaultHeight(S32 cur_height)
-{
- // if we are spanning our children (crude upward propagation of size)
- // then don't enforce our size on our children
- if (mOrientation == HORIZONTAL)
- {
- cur_height = llmax(mMinHeight, getRect().getHeight());
- }
-
- return cur_height;
-}
-
-S32 LLLayoutStack::getDefaultWidth(S32 cur_width)
-{
- // if we are spanning our children (crude upward propagation of size)
- // then don't enforce our size on our children
- if (mOrientation == VERTICAL)
- {
- cur_width = llmax(mMinWidth, getRect().getWidth());
- }
-
- return cur_width;
-}
-
void LLLayoutStack::movePanel(LLPanel* panel_to_move, LLPanel* target_panel, bool move_to_front)
{
LLLayoutPanel* embedded_panel_to_move = findEmbeddedPanel(panel_to_move);
@@ -319,9 +324,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
createResizeBars();
// calculate current extents
- S32 total_width = 0;
- S32 total_height = 0;
+ F32 total_size = 0.f;
+ //
+ // animate visibility
+ //
e_panel_list_t::iterator panel_it;
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
@@ -363,179 +370,110 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
}
}
- if (panelp->mCollapsed)
- {
- panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
- }
- else
- {
- panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
- }
+ F32 collapse_state = panelp->mCollapsed ? 1.f : 0.f;
+ panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, collapse_state, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
- if (mOrientation == HORIZONTAL)
+ total_size += panelp->mFractionalSize * panelp->getCollapseFactor();
+ // want n-1 panel gaps for n panels
+ if (panel_it != mPanels.begin())
{
- // enforce minimize size constraint by default
- if (panelp->getRect().getWidth() < panelp->getRelevantMinDim())
- {
- panelp->reshape(panelp->getRelevantMinDim(), panelp->getRect().getHeight());
- }
- total_width += llround(panelp->getRect().getWidth() * panelp->getCollapseFactor(mOrientation));
- // want n-1 panel gaps for n panels
- if (panel_it != mPanels.begin())
- {
- total_width += mPanelSpacing;
- }
- }
- else //VERTICAL
- {
- // enforce minimize size constraint by default
- if (panelp->getRect().getHeight() < panelp->getRelevantMinDim())
- {
- panelp->reshape(panelp->getRect().getWidth(), panelp->getRelevantMinDim());
- }
- total_height += llround(panelp->getRect().getHeight() * panelp->getCollapseFactor(mOrientation));
- if (panel_it != mPanels.begin())
- {
- total_height += mPanelSpacing;
- }
+ total_size += mPanelSpacing;
}
}
S32 num_resizable_panels = 0;
- S32 shrink_headroom_available = 0;
- S32 shrink_headroom_total = 0;
+ F32 shrink_headroom_available = 0.f;
+ F32 shrink_headroom_total = 0.f;
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
+ LLLayoutPanel* panelp = (*panel_it);
+
// panels that are not fully visible do not count towards shrink headroom
- if ((*panel_it)->getCollapseFactor(mOrientation) < 1.f)
+ if (panelp->getCollapseFactor() < 1.f)
{
continue;
}
- S32 relevant_dimension = (mOrientation == HORIZONTAL) ? (*panel_it)->getRect().getWidth() : (*panel_it)->getRect().getHeight();
- S32 relevant_min = (*panel_it)->getRelevantMinDim();
+ F32 cur_size = panelp->mFractionalSize;
+ F32 min_size = (F32)panelp->getRelevantMinDim();
// if currently resizing a panel or the panel is flagged as not automatically resizing
// only track total available headroom, but don't use it for automatic resize logic
- if ((*panel_it)->mResizeBar->hasMouseCapture()
- || (!(*panel_it)->mAutoResize
+ if (panelp->mResizeBar->hasMouseCapture()
+ || (!panelp->mAutoResize
&& !force_resize))
{
- shrink_headroom_total += relevant_dimension - relevant_min;
+ shrink_headroom_total += cur_size - min_size;
}
else
{
num_resizable_panels++;
- shrink_headroom_available += relevant_dimension - relevant_min;
- shrink_headroom_total += relevant_dimension - relevant_min;
+ shrink_headroom_available += cur_size - min_size;
+ shrink_headroom_total += cur_size - min_size;
}
}
// calculate how many pixels need to be distributed among layout panels
// positive means panels need to grow, negative means shrink
- S32 pixels_to_distribute;
- if (mOrientation == HORIZONTAL)
- {
- pixels_to_distribute = getRect().getWidth() - total_width;
- }
- else //VERTICAL
- {
- pixels_to_distribute = getRect().getHeight() - total_height;
- }
+ F32 pixels_to_distribute = (mOrientation == HORIZONTAL)
+ ? getRect().getWidth() - total_size
+ : getRect().getHeight() - total_size;
// now we distribute the pixels...
- S32 cur_x = 0;
- S32 cur_y = getRect().getHeight();
+ F32 cur_x = 0.f;
+ F32 cur_y = (F32)getRect().getHeight();
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
LLLayoutPanel* panelp = (*panel_it);
- S32 cur_width = panelp->getRect().getWidth();
- S32 cur_height = panelp->getRect().getHeight();
- S32 new_width = cur_width;
- S32 new_height = cur_height;
- S32 relevant_min = panelp->getRelevantMinDim();
-
- if (mOrientation == HORIZONTAL)
- {
- new_width = llmax(relevant_min, new_width);
- }
- else
- {
- new_height = llmax(relevant_min, new_height);
- }
- S32 delta_size = 0;
+ F32 min_size = panelp->getRelevantMinDim();
+ F32 delta_size = 0.f;
// if panel can automatically resize (not animating, and resize flag set)...
- if (panelp->getCollapseFactor(mOrientation) == 1.f
+ if (panelp->getCollapseFactor() == 1.f
&& (force_resize || panelp->mAutoResize)
&& !panelp->mResizeBar->hasMouseCapture())
{
- if (mOrientation == HORIZONTAL)
- {
- // if we're shrinking
- if (pixels_to_distribute < 0)
- {
- // shrink proportionally to amount over minimum
- // so we can do this in one pass
- delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - relevant_min) / (F32)shrink_headroom_available)) : 0;
- shrink_headroom_available -= (cur_width - relevant_min);
- }
- else
- {
- // grow all elements equally
- delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels);
- num_resizable_panels--;
- }
- pixels_to_distribute -= delta_size;
- new_width = llmax(relevant_min, cur_width + delta_size);
- }
- else
+ if (pixels_to_distribute < 0.f)
{
- new_width = getDefaultWidth(new_width);
- }
-
- if (mOrientation == VERTICAL)
- {
- if (pixels_to_distribute < 0)
- {
- // shrink proportionally to amount over minimum
- // so we can do this in one pass
- delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - relevant_min) / (F32)shrink_headroom_available)) : 0;
- shrink_headroom_available -= (cur_height - relevant_min);
- }
- else
- {
- delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels);
- num_resizable_panels--;
- }
- pixels_to_distribute -= delta_size;
- new_height = llmax(relevant_min, cur_height + delta_size);
+ // shrink proportionally to amount over minimum
+ // so we can do this in one pass
+ delta_size = (shrink_headroom_available > 0.f)
+ ? pixels_to_distribute * ((F32)(panelp->mFractionalSize - min_size) / shrink_headroom_available)
+ : 0.f;
+ shrink_headroom_available -= (panelp->mFractionalSize - min_size);
}
else
{
- new_height = getDefaultHeight(new_height);
- }
- }
- else
- {
- if (mOrientation == HORIZONTAL)
- {
- new_height = getDefaultHeight(new_height);
- }
- else // VERTICAL
- {
- new_width = getDefaultWidth(new_width);
+ // grow all elements equally
+ delta_size = pixels_to_distribute / (F32)num_resizable_panels;
+ num_resizable_panels--;
}
+
+ panelp->mFractionalSize = llmax(min_size, panelp->mFractionalSize + delta_size);
+ pixels_to_distribute -= delta_size;
}
// adjust running headroom count based on new sizes
shrink_headroom_total += delta_size;
LLRect panel_rect;
- panel_rect.setLeftTopAndSize(cur_x, cur_y, new_width, new_height);
+ if (mOrientation == HORIZONTAL)
+ {
+ panel_rect.setLeftTopAndSize(llround(cur_x),
+ llround(cur_y),
+ llround(panelp->mFractionalSize),
+ getRect().getHeight());
+ }
+ else
+ {
+ panel_rect.setLeftTopAndSize(llround(cur_x),
+ llround(cur_y),
+ getRect().getWidth(),
+ llround(panelp->mFractionalSize));
+ }
panelp->setShape(panel_rect);
LLRect resize_bar_rect = panel_rect;
@@ -551,13 +489,14 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
}
(*panel_it)->mResizeBar->setRect(resize_bar_rect);
+ F32 size = ((*panel_it)->mFractionalSize * (*panel_it)->getCollapseFactor()) + (F32)mPanelSpacing;
if (mOrientation == HORIZONTAL)
{
- cur_x += llround(new_width * (*panel_it)->getCollapseFactor(mOrientation)) + mPanelSpacing;
+ cur_x += size;
}
else //VERTICAL
{
- cur_y -= llround(new_height * (*panel_it)->getCollapseFactor(mOrientation)) + mPanelSpacing;
+ cur_y -= size;
}
}
@@ -572,13 +511,13 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
(*panel_it)->mResizeBar->setResizeLimits(
relevant_min,
- relevant_min + shrink_headroom_total);
+ relevant_min + llround(shrink_headroom_total));
}
else //VERTICAL
{
(*panel_it)->mResizeBar->setResizeLimits(
relevant_min,
- relevant_min + shrink_headroom_total);
+ relevant_min + llround(shrink_headroom_total));
}
// toggle resize bars based on panel visibility, resizability, etc
@@ -601,8 +540,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
// not enough room to fit existing contents
if (force_resize == FALSE
// layout did not complete by reaching target position
- && ((mOrientation == VERTICAL && cur_y != -mPanelSpacing)
- || (mOrientation == HORIZONTAL && cur_x != getRect().getWidth() + mPanelSpacing)))
+ && ((mOrientation == VERTICAL && llround(cur_y) != -mPanelSpacing)
+ || (mOrientation == HORIZONTAL && llround(cur_x) != getRect().getWidth() + mPanelSpacing)))
{
// do another layout pass with all stacked elements contributing
// even those that don't usually resize
@@ -713,10 +652,7 @@ void LLLayoutStack::createResizeBars()
//static
void LLLayoutStack::updateClass()
{
- LLInstanceTrackerScopedGuard guard;
- for (LLLayoutStack::instance_iter it = guard.beginInstances();
- it != guard.endInstances();
- ++it)
+ for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
it->updateLayout();
}
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index d8ef0aeaca..ede6149a80 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -126,8 +126,6 @@ protected:
private:
void createResizeBars();
void calcMinExtents();
- S32 getDefaultHeight(S32 cur_height);
- S32 getDefaultWidth(S32 cur_width);
const ELayoutOrientation mOrientation;
@@ -163,24 +161,15 @@ public:
Optional<bool> user_resize,
auto_resize;
- Params()
- : expanded_min_dim("expanded_min_dim", 0),
- min_dim("min_dim", 0),
- max_dim("max_dim", 0),
- user_resize("user_resize", true),
- auto_resize("auto_resize", true)
- {
- addSynonym(min_dim, "min_width");
- addSynonym(min_dim, "min_height");
- addSynonym(max_dim, "max_width");
- addSynonym(max_dim, "max_height");
- }
+ Params();
};
~LLLayoutPanel();
void initFromParams(const Params& p);
+ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
S32 getMinDim() const { return mMinDim; }
void setMinDim(S32 value) { mMinDim = value; if (!mExpandedMinDimSpecified) mExpandedMinDim = value; }
@@ -202,22 +191,26 @@ public:
return min_dim;
}
+ void setOrientation(LLLayoutStack::ELayoutOrientation orientation) { mOrientation = orientation; }
+
protected:
LLLayoutPanel(const Params& p);
- F32 getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation);
+ F32 getCollapseFactor();
- bool mExpandedMinDimSpecified;
- S32 mExpandedMinDim;
+ bool mExpandedMinDimSpecified;
+ S32 mExpandedMinDim;
- S32 mMinDim;
- S32 mMaxDim;
- BOOL mAutoResize;
- BOOL mUserResize;
- BOOL mCollapsed;
+ S32 mMinDim;
+ S32 mMaxDim;
+ bool mAutoResize;
+ bool mUserResize;
+ bool mCollapsed;
+ F32 mVisibleAmt;
+ F32 mCollapseAmt;
+ F32 mFractionalSize;
+ LLLayoutStack::ELayoutOrientation mOrientation;
class LLResizeBar* mResizeBar;
- F32 mVisibleAmt;
- F32 mCollapseAmt;
};
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index 06fbc0f234..06dfc90d83 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -103,10 +103,11 @@ LLLineEditor::Params::Params()
text_pad_right("text_pad_right"),
default_text("default_text")
{
- mouse_opaque = true;
+ changeDefault(mouse_opaque, true);
addSynonym(select_on_focus, "select_all_on_focus_received");
addSynonym(border, "border");
addSynonym(label, "watermark_text");
+ addSynonym(max_length.chars, "max_length");
}
LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
@@ -197,6 +198,7 @@ LLLineEditor::~LLLineEditor()
void LLLineEditor::onFocusReceived()
{
+ gEditMenuHandler = this;
LLUICtrl::onFocusReceived();
updateAllowingLanguageInput();
}
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index 583bde360a..2518dbe3c7 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -60,7 +60,7 @@ public:
typedef boost::function<void (LLLineEditor* caller)> keystroke_callback_t;
- struct MaxLength : public LLInitParam::Choice<MaxLength>
+ struct MaxLength : public LLInitParam::ChoiceBlock<MaxLength>
{
Alternative<S32> bytes, chars;
diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp
index c4eec1835c..6ac38f5ad4 100644
--- a/indra/llui/llloadingindicator.cpp
+++ b/indra/llui/llloadingindicator.cpp
@@ -34,6 +34,7 @@
// Project includes
#include "lluictrlfactory.h"
#include "lluiimage.h"
+#include "boost/foreach.hpp"
// registered in llui.cpp to avoid being left out by MS linker
//static LLDefaultChildRegistry::Register<LLLoadingIndicator> r("loading_indicator");
@@ -51,11 +52,9 @@ LLLoadingIndicator::LLLoadingIndicator(const Params& p)
void LLLoadingIndicator::initFromParams(const Params& p)
{
- for (LLInitParam::ParamIterator<LLUIImage*>::const_iterator it = p.images().image.begin(), end_it = p.images().image.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLUIImage* image, p.images.image)
{
- mImages.push_back(it->getValue());
+ mImages.push_back(image);
}
// Start timer for switching images.
diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h
index 7c44478848..c1f979c111 100644
--- a/indra/llui/llloadingindicator.h
+++ b/indra/llui/llloadingindicator.h
@@ -51,7 +51,7 @@ class LLLoadingIndicator
LOG_CLASS(LLLoadingIndicator);
public:
- struct Images : public LLInitParam::Block<Images>
+ struct Images : public LLInitParam::BatchBlock<Images>
{
Multiple<LLUIImage*> image;
@@ -63,7 +63,7 @@ public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
Optional<F32> images_per_sec;
- Batch<Images> images;
+ Optional<Images> images;
Params()
: images_per_sec("images_per_sec", 1.0f),
diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp
index eed0085273..50d59f79f4 100644
--- a/indra/llui/llmenubutton.cpp
+++ b/indra/llui/llmenubutton.cpp
@@ -35,9 +35,16 @@
static LLDefaultChildRegistry::Register<LLMenuButton> r("menu_button");
+void LLMenuButton::MenuPositions::declareValues()
+{
+ declare("topleft", MP_TOP_LEFT);
+ declare("topright", MP_TOP_RIGHT);
+ declare("bottomleft", MP_BOTTOM_LEFT);
+}
LLMenuButton::Params::Params()
-: menu_filename("menu_filename")
+: menu_filename("menu_filename"),
+ position("position", MP_BOTTOM_LEFT)
{
}
@@ -45,7 +52,7 @@ LLMenuButton::Params::Params()
LLMenuButton::LLMenuButton(const LLMenuButton::Params& p)
: LLButton(p),
mIsMenuShown(false),
- mMenuPosition(MP_BOTTOM_LEFT)
+ mMenuPosition(p.position)
{
std::string menu_filename = p.menu_filename;
diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h
index 7b657595da..e2396e7fb2 100644
--- a/indra/llui/llmenubutton.h
+++ b/indra/llui/llmenubutton.h
@@ -35,21 +35,30 @@ class LLMenuButton
: public LLButton
{
public:
+ typedef enum e_menu_position
+ {
+ MP_TOP_LEFT,
+ MP_TOP_RIGHT,
+ MP_BOTTOM_LEFT
+ } EMenuPosition;
+
+ struct MenuPositions
+ : public LLInitParam::TypeValuesHelper<EMenuPosition, MenuPositions>
+ {
+ static void declareValues();
+ };
+
struct Params
: public LLInitParam::Block<Params, LLButton::Params>
{
// filename for it's toggleable menu
Optional<std::string> menu_filename;
+ Optional<EMenuPosition> position;
Params();
};
- typedef enum e_menu_position
- {
- MP_TOP_LEFT,
- MP_TOP_RIGHT,
- MP_BOTTOM_LEFT
- } EMenuPosition;
+
boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb );
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 8de9c769e2..cb237fca7c 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -90,7 +90,6 @@ const S32 TEAROFF_SEPARATOR_HEIGHT_PIXELS = 10;
const S32 MENU_ITEM_PADDING = 4;
const std::string SEPARATOR_NAME("separator");
-const std::string SEPARATOR_LABEL( "-----------" );
const std::string VERTICAL_SEPARATOR_LABEL( "|" );
const std::string LLMenuGL::BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK
@@ -149,7 +148,7 @@ LLMenuItemGL::Params::Params()
highlight_bg_color("highlight_bg_color"),
highlight_fg_color("highlight_fg_color")
{
- mouse_opaque = true;
+ changeDefault(mouse_opaque, true);
}
// Default constructor
@@ -566,8 +565,6 @@ void LLMenuItemGL::handleVisibilityChange(BOOL new_visibility)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LLMenuItemSeparatorGL::Params::Params()
{
- name = "separator";
- label = SEPARATOR_LABEL;
}
LLMenuItemSeparatorGL::LLMenuItemSeparatorGL(const LLMenuItemSeparatorGL::Params& p) :
@@ -755,30 +752,6 @@ U32 LLMenuItemTearOffGL::getNominalHeight( void ) const
return TEAROFF_SEPARATOR_HEIGHT_PIXELS;
}
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLMenuItemBlankGL
-//
-// This class represents a blank, non-functioning item.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLMenuItemBlankGL : public LLMenuItemGL
-{
-public:
- struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
- {
- Params()
- {
- name="";
- enabled = false;
- }
- };
- LLMenuItemBlankGL( const Params& p ) : LLMenuItemGL( p )
- {}
- virtual void draw( void ) {}
-};
-
-
///============================================================================
/// Class LLMenuItemCallGL
///============================================================================
@@ -974,7 +947,7 @@ LLMenuItemBranchGL::LLMenuItemBranchGL(const LLMenuItemBranchGL::Params& p)
LLMenuItemBranchGL::~LLMenuItemBranchGL()
{
- LLView::deleteViewByHandle(mBranchHandle);
+ delete mBranchHandle.get();
}
// virtual
@@ -1713,7 +1686,8 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p)
mSpilloverMenu(NULL),
mJumpKey(p.jump_key),
mCreateJumpKeys(p.create_jump_keys),
- mNeedsArrange(FALSE),
+ mNeedsArrange(FALSE),
+ mResetScrollPositionOnShow(true),
mShortcutPad(p.shortcut_pad)
{
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
@@ -1758,7 +1732,7 @@ void LLMenuGL::setCanTearOff(BOOL tear_off)
{
LLMenuItemTearOffGL::Params p;
mTearOffItem = LLUICtrlFactory::create<LLMenuItemTearOffGL>(p);
- addChildInBack(mTearOffItem);
+ addChild(mTearOffItem);
}
else if (!tear_off && mTearOffItem != NULL)
{
@@ -3070,7 +3044,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
S32 mouse_x, mouse_y;
// Resetting scrolling position
- if (menu->isScrollable())
+ if (menu->isScrollable() && menu->isScrollPositionOnShowReset())
{
menu->mFirstVisibleItem = NULL;
}
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 7bde8e83ec..36f3ba34b9 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -372,17 +372,16 @@ public:
drop_shadow("drop_shadow", true),
bg_visible("bg_visible", true),
create_jump_keys("create_jump_keys", false),
+ keep_fixed_size("keep_fixed_size", false),
bg_color("bg_color", LLUIColorTable::instance().getColor( "MenuDefaultBgColor" )),
scrollable("scrollable", false),
max_scrollable_items("max_scrollable_items", U32_MAX),
preferred_width("preferred_width", U32_MAX),
shortcut_pad("shortcut_pad")
-
{
addSynonym(bg_visible, "opaque");
addSynonym(bg_color, "color");
-
- name = "menu";
+ addSynonym(can_tear_off, "can_tear_off");
}
};
@@ -517,6 +516,9 @@ public:
static class LLMenuHolderGL* sMenuContainer;
+ void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
+ bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
+
protected:
void createSpilloverBranch();
void cleanupSpilloverBranch();
@@ -566,6 +568,7 @@ private:
KEY mJumpKey;
BOOL mCreateJumpKeys;
S32 mShortcutPad;
+ bool mResetScrollPositionOnShow;
}; // end class LLMenuGL
@@ -650,7 +653,7 @@ public:
{
Params()
{
- visible = false;
+ changeDefault(visible, false);
}
};
@@ -678,7 +681,7 @@ public:
BOOL appendContextSubMenu(LLContextMenu *menu);
- LLHandle<LLContextMenu> getHandle() { mHandle.bind(this); return mHandle; }
+ LLHandle<LLContextMenu> getHandle() { return getDerivedHandle<LLContextMenu>(); }
protected:
BOOL mHoveredAnyItem;
@@ -698,16 +701,7 @@ class LLMenuBarGL : public LLMenuGL
{
public:
struct Params : public LLInitParam::Block<Params, LLMenuGL::Params>
- {
- Params()
- {
- can_tear_off = false;
- keep_fixed_size = true;
- horizontal_layout = true;
- visible = true;
- drop_shadow = false;
- }
- };
+ {};
LLMenuBarGL( const Params& p );
virtual ~LLMenuBarGL();
@@ -825,13 +819,7 @@ class LLMenuItemTearOffGL : public LLMenuItemGL
{
public:
struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
- {
- Params()
- {
- name = "tear off";
- label = "~~~~~~~~~~~";
- }
- };
+ {};
LLMenuItemTearOffGL( const Params& );
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index 9052bc7d1d..70bcfb5b4f 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -66,11 +66,7 @@ LLMultiSlider::Params::Params()
mouse_up_callback("mouse_up_callback"),
thumb_width("thumb_width"),
sliders("slider")
-{
- name = "multi_slider_bar";
- mouse_opaque(true);
- follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
-}
+{}
LLMultiSlider::LLMultiSlider(const LLMultiSlider::Params& p)
: LLF32UICtrl(p),
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 6085c61f9a..d232e27ef2 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -46,6 +46,7 @@
#include <algorithm>
#include <boost/regex.hpp>
+#include <boost/foreach.hpp>
const std::string NOTIFICATION_PERSIST_VERSION = "0.93";
@@ -245,7 +246,6 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
LLParamSDParser parser;
parser.writeSD(mFormData, p.form_elements);
- mFormData = mFormData[""];
if (!mFormData.isArray())
{
// change existing contents to a one element array
@@ -417,23 +417,17 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mSoundEffect = LLUUID(LLUI::sSettingGroups["config"]->getString(p.sound));
}
- for(LLInitParam::ParamIterator<LLNotificationTemplate::UniquenessContext>::const_iterator it = p.unique.contexts.begin(),
- end_it = p.unique.contexts.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const LLNotificationTemplate::UniquenessContext& context, p.unique.contexts)
{
- mUniqueContext.push_back(it->value);
+ mUniqueContext.push_back(context.value);
}
lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl;
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Tag>::const_iterator it = p.tags.begin(),
- end_it = p.tags.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags)
{
- lldebugs << " tag \"" << std::string(it->value) << "\"" << llendl;
- mTags.push_back(it->value);
+ lldebugs << " tag \"" << std::string(tag.value) << "\"" << llendl;
+ mTags.push_back(tag.value);
}
mForm = LLNotificationFormPtr(new LLNotificationForm(p.name, p.form_ref.form));
@@ -1398,14 +1392,12 @@ void replaceFormText(LLNotificationForm::Params& form, const std::string& patter
{
form.ignore.text = replace;
}
- for (LLInitParam::ParamIterator<LLNotificationForm::FormElement>::iterator it = form.form_elements.elements.begin(),
- end_it = form.form_elements.elements.end();
- it != end_it;
- ++it)
+
+ BOOST_FOREACH(LLNotificationForm::FormElement& element, form.form_elements.elements)
{
- if (it->button.isChosen() && it->button.text() == pattern)
+ if (element.button.isChosen() && element.button.text() == pattern)
{
- it->button.text = replace;
+ element.button.text = replace;
}
}
}
@@ -1454,48 +1446,42 @@ bool LLNotifications::loadTemplates()
mTemplates.clear();
- for(LLInitParam::ParamIterator<LLNotificationTemplate::GlobalString>::const_iterator it = params.strings.begin(), end_it = params.strings.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationTemplate::GlobalString& string, params.strings)
{
- mGlobalStrings[it->name] = it->value;
+ mGlobalStrings[string.name] = string.value;
}
std::map<std::string, LLNotificationForm::Params> form_templates;
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Template>::const_iterator it = params.templates.begin(), end_it = params.templates.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationTemplate::Template& notification_template, params.templates)
{
- form_templates[it->name] = it->form;
+ form_templates[notification_template.name] = notification_template.form;
}
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Params>::iterator it = params.notifications.begin(), end_it = params.notifications.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationTemplate::Params& notification, params.notifications)
{
- if (it->form_ref.form_template.isChosen())
+ if (notification.form_ref.form_template.isChosen())
{
// replace form contents from template
- it->form_ref.form = form_templates[it->form_ref.form_template.name];
- if(it->form_ref.form_template.yes_text.isProvided())
+ notification.form_ref.form = form_templates[notification.form_ref.form_template.name];
+ if(notification.form_ref.form_template.yes_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$yestext", it->form_ref.form_template.yes_text);
+ replaceFormText(notification.form_ref.form, "$yestext", notification.form_ref.form_template.yes_text);
}
- if(it->form_ref.form_template.no_text.isProvided())
+ if(notification.form_ref.form_template.no_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$notext", it->form_ref.form_template.no_text);
+ replaceFormText(notification.form_ref.form, "$notext", notification.form_ref.form_template.no_text);
}
- if(it->form_ref.form_template.cancel_text.isProvided())
+ if(notification.form_ref.form_template.cancel_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$canceltext", it->form_ref.form_template.cancel_text);
+ replaceFormText(notification.form_ref.form, "$canceltext", notification.form_ref.form_template.cancel_text);
}
- if(it->form_ref.form_template.ignore_text.isProvided())
+ if(notification.form_ref.form_template.ignore_text.isProvided())
{
- replaceFormText(it->form_ref.form, "$ignoretext", it->form_ref.form_template.ignore_text);
+ replaceFormText(notification.form_ref.form, "$ignoretext", notification.form_ref.form_template.ignore_text);
}
}
- mTemplates[it->name] = LLNotificationTemplatePtr(new LLNotificationTemplate(*it));
+ mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification));
}
return true;
@@ -1518,12 +1504,9 @@ bool LLNotifications::loadVisibilityRules()
mVisibilityRules.clear();
- for(LLInitParam::ParamIterator<LLNotificationVisibilityRule::Rule>::iterator it = params.rules.begin(),
- end_it = params.rules.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(LLNotificationVisibilityRule::Rule& rule, params.rules)
{
- mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(*it)));
+ mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(rule)));
}
return true;
@@ -1641,7 +1624,7 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid)
LLNotificationSet::iterator it=mItems.find(target);
if (it == mItems.end())
{
- llwarns << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl;
+ LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl;
return LLNotificationPtr((LLNotification*)NULL);
}
else
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 0c4d4fc897..462d69be2e 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -201,7 +201,7 @@ public:
FormInput();
};
- struct FormElement : public LLInitParam::Choice<FormElement>
+ struct FormElement : public LLInitParam::ChoiceBlock<FormElement>
{
Alternative<FormButton> button;
Alternative<FormInput> input;
@@ -312,7 +312,7 @@ public:
Optional<LLNotificationContext*> context;
Optional<void*> responder;
- struct Functor : public LLInitParam::Choice<Functor>
+ struct Functor : public LLInitParam::ChoiceBlock<Functor>
{
Alternative<std::string> name;
Alternative<LLNotificationFunctorRegistry::ResponseFunctor> function;
diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h
index eff572b553..fb50c9c123 100644
--- a/indra/llui/llnotificationtemplate.h
+++ b/indra/llui/llnotificationtemplate.h
@@ -88,10 +88,10 @@ struct LLNotificationTemplate
{
private:
// this idiom allows
- // <notification unique="true">
+ // <notification> <unique/> </notification>
// as well as
// <notification> <unique> <context></context> </unique>...
- Optional<bool> dummy_val;
+ Optional<LLInitParam::Flag> dummy_val;
public:
Multiple<UniquenessContext> contexts;
@@ -147,7 +147,7 @@ struct LLNotificationTemplate
{}
};
- struct FormRef : public LLInitParam::Choice<FormRef>
+ struct FormRef : public LLInitParam::ChoiceBlock<FormRef>
{
Alternative<LLNotificationForm::Params> form;
Alternative<TemplateRef> form_template;
diff --git a/indra/llui/llnotificationvisibilityrule.h b/indra/llui/llnotificationvisibilityrule.h
index 78bdec2a8f..78788a275c 100644
--- a/indra/llui/llnotificationvisibilityrule.h
+++ b/indra/llui/llnotificationvisibilityrule.h
@@ -59,7 +59,7 @@ struct LLNotificationVisibilityRule
{}
};
- struct Rule : public LLInitParam::Choice<Rule>
+ struct Rule : public LLInitParam::ChoiceBlock<Rule>
{
Alternative<Filter> show;
Alternative<Filter> hide;
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 1dcdd79efa..00318cec6b 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -90,7 +90,6 @@ LLPanel::Params::Params()
visible_callback("visible_callback"),
accepts_badge("accepts_badge")
{
- name = "panel";
addSynonym(background_visible, "bg_visible");
addSynonym(has_border, "border_visible");
addSynonym(label, "title");
@@ -99,6 +98,7 @@ LLPanel::Params::Params()
LLPanel::LLPanel(const LLPanel::Params& p)
: LLUICtrl(p),
+ LLBadgeHolder(p.accepts_badge),
mBgVisible(p.background_visible),
mBgOpaque(p.background_opaque),
mBgOpaqueColor(p.bg_opaque_color()),
@@ -114,8 +114,7 @@ LLPanel::LLPanel(const LLPanel::Params& p)
mCommitCallbackRegistrar(false),
mEnableCallbackRegistrar(false),
mXMLFilename(p.filename),
- mVisibleSignal(NULL),
- mAcceptsBadge(p.accepts_badge)
+ mVisibleSignal(NULL)
// *NOTE: Be sure to also change LLPanel::initFromParams(). We have too
// many classes derived from LLPanel to retrofit them all to pass in params.
{
@@ -123,8 +122,6 @@ LLPanel::LLPanel(const LLPanel::Params& p)
{
addBorder(p.border);
}
-
- mPanelHandle.bind(this);
}
LLPanel::~LLPanel()
@@ -488,7 +485,7 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
mBgOpaqueImageOverlay = p.bg_opaque_image_overlay;
mBgAlphaImageOverlay = p.bg_alpha_image_overlay;
- mAcceptsBadge = p.accepts_badge;
+ setAcceptsBadge(p.accepts_badge);
}
static LLFastTimer::DeclareTimer FTM_PANEL_SETUP("Panel Setup");
@@ -515,9 +512,6 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
if (!xml_filename.empty())
{
- LLUICtrlFactory::instance().pushFileName(xml_filename);
-
- LLFastTimer timer(FTM_EXTERNAL_PANEL_LOAD);
if (output_node)
{
//if we are exporting, we want to export the current xml
@@ -530,6 +524,9 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
return TRUE;
}
+ LLUICtrlFactory::instance().pushFileName(xml_filename);
+
+ LLFastTimer timer(FTM_EXTERNAL_PANEL_LOAD);
if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml))
{
llwarns << "Couldn't parse panel from: " << xml_filename << llendl;
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 67674fab7e..cd33938226 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -35,6 +35,7 @@
#include "lluiimage.h"
#include "lluistring.h"
#include "v4color.h"
+#include "llbadgeholder.h"
#include <list>
#include <queue>
@@ -51,7 +52,7 @@ class LLUIImage;
* With or without border,
* Can contain LLUICtrls.
*/
-class LLPanel : public LLUICtrl
+class LLPanel : public LLUICtrl, public LLBadgeHolder
{
public:
struct LocalizedString : public LLInitParam::Block<LocalizedString>
@@ -95,9 +96,6 @@ public:
Params();
};
- // valid children for LLPanel are stored in this registry
- typedef LLDefaultChildRegistry child_registry_t;
-
protected:
friend class LLUICtrlFactory;
// RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8
@@ -155,7 +153,7 @@ public:
void setCtrlsEnabled(BOOL b);
- LLHandle<LLPanel> getHandle() const { return mPanelHandle; }
+ LLHandle<LLPanel> getHandle() const { return getDerivedHandle<LLPanel>(); }
const LLCallbackMap::map_t& getFactoryMap() const { return mFactoryMap; }
@@ -252,8 +250,6 @@ public:
boost::signals2::connection setVisibleCallback( const commit_signal_t::slot_type& cb );
- bool acceptsBadge() const { return mAcceptsBadge; }
-
protected:
// Override to set not found list
LLButton* getDefaultButton() { return mDefaultBtn; }
@@ -266,9 +262,11 @@ protected:
std::string mHelpTopic; // the name of this panel's help topic to display in the Help Viewer
typedef std::deque<const LLCallbackMap::map_t*> factory_stack_t;
static factory_stack_t sFactoryStack;
+
+ // for setting the xml filename when building panel in context dependent cases
+ std::string mXMLFilename;
private:
- bool mAcceptsBadge;
BOOL mBgVisible; // any background at all?
BOOL mBgOpaque; // use opaque color or image
LLUIColor mBgOpaqueColor;
@@ -280,13 +278,10 @@ private:
LLViewBorder* mBorder;
LLButton* mDefaultBtn;
LLUIString mLabel;
- LLRootHandle<LLPanel> mPanelHandle;
typedef std::map<std::string, std::string> ui_string_map_t;
ui_string_map_t mUIStrings;
- // for setting the xml filename when building panel in context dependent cases
- std::string mXMLFilename;
}; // end class LLPanel
diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp
index 3a12debf7e..95a7d09382 100644
--- a/indra/llui/llradiogroup.cpp
+++ b/indra/llui/llradiogroup.cpp
@@ -74,9 +74,6 @@ LLRadioGroup::Params::Params()
{
addSynonym(items, "radio_item");
- name = "radio_group";
- mouse_opaque = true;
- follows.flags = FOLLOWS_LEFT | FOLLOWS_TOP;
// radio items are not tabbable until they are selected
tab_stop = false;
}
@@ -96,7 +93,10 @@ void LLRadioGroup::initFromParams(const Params& p)
{
LLRadioGroup::ItemParams item_params(*it);
- item_params.font.setIfNotProvided(mFont); // apply radio group font by default
+ if (!item_params.font.isProvided())
+ {
+ item_params.font = mFont; // apply radio group font by default
+ }
item_params.commit_callback.function = boost::bind(&LLRadioGroup::onClickButton, this, _1);
item_params.from_xui = p.from_xui;
if (p.from_xui)
diff --git a/indra/llui/llresizehandle.h b/indra/llui/llresizehandle.h
index 531eb1db61..7541b9e6c0 100644
--- a/indra/llui/llresizehandle.h
+++ b/indra/llui/llresizehandle.h
@@ -55,7 +55,7 @@ public:
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
void setResizeLimits( S32 min_width, S32 min_height ) { mMinWidth = min_width; mMinHeight = min_height; }
-
+
private:
BOOL pointInHandle( S32 x, S32 y );
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index 3a867a10a7..5d3bf7a670 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -63,9 +63,7 @@ LLScrollbar::Params::Params()
right_button("right_button"),
bg_visible("bg_visible", false),
bg_color("bg_color", LLColor4::black)
-{
- tab_stop = false;
-}
+{}
LLScrollbar::LLScrollbar(const Params & p)
: LLUICtrl(p),
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 380c477eb2..fe3f688fc5 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -74,11 +74,7 @@ LLScrollContainer::Params::Params()
min_auto_scroll_rate("min_auto_scroll_rate", 100),
max_auto_scroll_rate("max_auto_scroll_rate", 1000),
reserve_scroll_corner("reserve_scroll_corner", false)
-{
- name = "scroll_container";
- mouse_opaque(true);
- tab_stop(false);
-}
+{}
// Default constructor
@@ -227,6 +223,15 @@ BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
+BOOL LLScrollContainer::handleUnicodeCharHere(llwchar uni_char)
+{
+ if (mScrolledView && mScrolledView->handleUnicodeCharHere(uni_char))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
// Give event to my child views - they may have scroll bars
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index 46a71a7e30..3aa79cc255 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -103,6 +103,7 @@ public:
// LLView functionality
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual BOOL handleKeyHere(KEY key, MASK mask);
+ virtual BOOL handleUnicodeCharHere(llwchar uni_char);
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h
index 8f569c2a58..e8df176ec3 100644
--- a/indra/llui/llscrollingpanellist.h
+++ b/indra/llui/llscrollingpanellist.h
@@ -51,12 +51,7 @@ class LLScrollingPanelList : public LLUICtrl
{
public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
- {
- Params()
- {
- name = "scrolling_panel_list";
- }
- };
+ {};
LLScrollingPanelList(const Params& p)
: LLUICtrl(p)
{}
diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp
index 696e4a2bb1..07a6dfaa10 100644
--- a/indra/llui/llscrolllistcolumn.cpp
+++ b/indra/llui/llscrolllistcolumn.cpp
@@ -46,10 +46,7 @@ static LLWidgetNameRegistry::StaticRegistrar sRegisterColumnHeaderParams(&typeid
//---------------------------------------------------------------------------
LLScrollColumnHeader::Params::Params()
: column("column")
-{
- name = "column_header";
- tab_stop(false);
-}
+{}
LLScrollColumnHeader::LLScrollColumnHeader(const LLScrollColumnHeader::Params& p)
diff --git a/indra/llui/llscrolllistcolumn.h b/indra/llui/llscrolllistcolumn.h
index e2711ac75a..b4d4a6d05e 100644
--- a/indra/llui/llscrolllistcolumn.h
+++ b/indra/llui/llscrolllistcolumn.h
@@ -95,7 +95,7 @@ public:
Optional<ESortDirection, SortNames> sort_direction;
Optional<bool> sort_ascending;
- struct Width : public LLInitParam::Choice<Width>
+ struct Width : public LLInitParam::ChoiceBlock<Width>
{
Alternative<bool> dynamic_width;
Alternative<S32> pixel_width;
@@ -112,7 +112,7 @@ public:
Optional<Width> width;
// either an image or label is used in column header
- struct Header : public LLInitParam::Choice<Header>
+ struct Header : public LLInitParam::ChoiceBlock<Header>
{
Alternative<std::string> label;
Alternative<LLUIImage*> image;
@@ -135,7 +135,7 @@ public:
halign("halign", LLFontGL::LEFT)
{
// default choice to "dynamic_width"
- width.dynamic_width = true;
+ changeDefault(width.dynamic_width, true);
addSynonym(sort_column, "sort");
}
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index b7848ec37c..622f3e215c 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -147,12 +147,9 @@ LLScrollListCtrl::Params::Params()
highlighted_color("highlighted_color"),
contents(""),
scroll_bar_bg_visible("scroll_bar_bg_visible"),
- scroll_bar_bg_color("scroll_bar_bg_color")
- , border("border")
-{
- name = "scroll_list";
- mouse_opaque = true;
-}
+ scroll_bar_bg_color("scroll_bar_bg_color"),
+ border("border")
+{}
LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
: LLUICtrl(p),
@@ -2813,7 +2810,10 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
}
S32 index = columnp->mIndex;
- cell_p.width.setIfNotProvided(columnp->getWidth());
+ if (!cell_p.width.isProvided())
+ {
+ cell_p.width = columnp->getWidth();
+ }
LLScrollListCell* cell = LLScrollListCell::create(cell_p);
diff --git a/indra/llui/llsdparam.cpp b/indra/llui/llsdparam.cpp
index 9ad13054cb..0e29873bb0 100644
--- a/indra/llui/llsdparam.cpp
+++ b/indra/llui/llsdparam.cpp
@@ -34,6 +34,9 @@
static LLInitParam::Parser::parser_read_func_map_t sReadFuncs;
static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs;
static LLInitParam::Parser::parser_inspect_func_map_t sInspectFuncs;
+static const LLSD NO_VALUE_MARKER;
+
+LLFastTimer::DeclareTimer FTM_SD_PARAM_ADAPTOR("LLSD to LLInitParam conversion");
//
// LLParamSDParser
@@ -45,7 +48,7 @@ LLParamSDParser::LLParamSDParser()
if (sReadFuncs.empty())
{
- registerParserFuncs<LLInitParam::NoParamValue>(readNoValue, &LLParamSDParser::writeNoValue);
+ registerParserFuncs<LLInitParam::Flag>(readFlag, &LLParamSDParser::writeFlag);
registerParserFuncs<S32>(readS32, &LLParamSDParser::writeTypedValue<S32>);
registerParserFuncs<U32>(readU32, &LLParamSDParser::writeU32Param);
registerParserFuncs<F32>(readF32, &LLParamSDParser::writeTypedValue<F32>);
@@ -60,29 +63,34 @@ LLParamSDParser::LLParamSDParser()
}
// special case handling of U32 due to ambiguous LLSD::assign overload
-bool LLParamSDParser::writeU32Param(LLParamSDParser::parser_t& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
+bool LLParamSDParser::writeU32Param(LLParamSDParser::parser_t& parser, const void* val_ptr, parser_t::name_stack_t& name_stack)
{
LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
if (!sdparser.mWriteRootSD) return false;
- LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
- if (!sd_to_write) return false;
+ parser_t::name_stack_range_t range(name_stack.begin(), name_stack.end());
+ LLSD& sd_to_write = LLParamSDParserUtilities::getSDWriteNode(*sdparser.mWriteRootSD, range);
+ sd_to_write.assign((S32)*((const U32*)val_ptr));
- sd_to_write->assign((S32)*((const U32*)val_ptr));
return true;
}
-bool LLParamSDParser::writeNoValue(LLParamSDParser::parser_t& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
+bool LLParamSDParser::writeFlag(LLParamSDParser::parser_t& parser, const void* val_ptr, parser_t::name_stack_t& name_stack)
{
LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
if (!sdparser.mWriteRootSD) return false;
- LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
- if (!sd_to_write) return false;
+ parser_t::name_stack_range_t range(name_stack.begin(), name_stack.end());
+ LLParamSDParserUtilities::getSDWriteNode(*sdparser.mWriteRootSD, range);
return true;
}
+void LLParamSDParser::submit(LLInitParam::BaseBlock& block, const LLSD& sd, LLInitParam::Parser::name_stack_t& name_stack)
+{
+ mCurReadSD = &sd;
+ block.submitValue(name_stack, *this);
+}
void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool silent)
{
@@ -90,51 +98,17 @@ void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool
mNameStack.clear();
setParseSilently(silent);
- readSDValues(sd, block);
+ LLParamSDParserUtilities::readSDValues(boost::bind(&LLParamSDParser::submit, this, boost::ref(block), _1, _2), sd, mNameStack);
+ //readSDValues(sd, block);
}
void LLParamSDParser::writeSD(LLSD& sd, const LLInitParam::BaseBlock& block)
{
mNameStack.clear();
mWriteRootSD = &sd;
- block.serializeBlock(*this);
-}
-
-const LLSD NO_VALUE_MARKER;
-void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block)
-{
- if (sd.isMap())
- {
- for (LLSD::map_const_iterator it = sd.beginMap();
- it != sd.endMap();
- ++it)
- {
- mNameStack.push_back(make_pair(it->first, newParseGeneration()));
- readSDValues(it->second, block);
- mNameStack.pop_back();
- }
- }
- else if (sd.isArray())
- {
- for (LLSD::array_const_iterator it = sd.beginArray();
- it != sd.endArray();
- ++it)
- {
- mNameStack.back().second = newParseGeneration();
- readSDValues(*it, block);
- }
- }
- else if (sd.isUndefined())
- {
- mCurReadSD = &NO_VALUE_MARKER;
- block.submitValue(mNameStack, *this);
- }
- else
- {
- mCurReadSD = &sd;
- block.submitValue(mNameStack, *this);
- }
+ name_stack_t name_stack;
+ block.serializeBlock(*this, name_stack);
}
/*virtual*/ std::string LLParamSDParser::getCurrentElementName()
@@ -150,83 +124,8 @@ void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block
return full_name;
}
-LLSD* LLParamSDParser::getSDWriteNode(const parser_t::name_stack_t& name_stack)
-{
- //TODO: implement nested LLSD writing
- LLSD* sd_to_write = mWriteRootSD;
- bool new_traversal = false;
- for (name_stack_t::const_iterator it = name_stack.begin(), prev_it = mNameStack.begin();
- it != name_stack.end();
- ++it)
- {
- bool new_array_entry = false;
- if (prev_it == mNameStack.end())
- {
- new_traversal = true;
- }
- else
- {
- if (!new_traversal // have not diverged yet from previous trace
- && prev_it->first == it->first // names match
- && prev_it->second != it->second) // versions differ
- {
- // name stacks match, but version numbers differ in last place.
- // create a different entry at this point using an LLSD array
- new_array_entry = true;
- }
- if (prev_it->first != it->first // names differ
- || prev_it->second != it->second) // versions differ
- {
- // at this point we have diverged from our last trace
- // so any elements referenced here are new
- new_traversal = true;
- }
- }
-
- LLSD* child_sd = &(*sd_to_write)[it->first];
- if (child_sd->isArray())
- {
- if (new_traversal)
- {
- // write to new element at end
- sd_to_write = &(*child_sd)[child_sd->size()];
- }
- else
- {
- // write to last of existing elements, or first element if empty
- sd_to_write = &(*child_sd)[llmax(0, child_sd->size() - 1)];
- }
- }
- else
- {
- if (new_array_entry && !child_sd->isArray())
- {
- // copy child contents into first element of an array
- LLSD new_array = LLSD::emptyArray();
- new_array.append(*child_sd);
- // assign array to slot that previously held the single value
- *child_sd = new_array;
- // return next element in that array
- sd_to_write = &((*child_sd)[1]);
- }
- else
- {
- sd_to_write = child_sd;
- }
- }
- if (prev_it != mNameStack.end())
- {
- ++prev_it;
- }
- }
- mNameStack = name_stack;
-
- //llinfos << ll_pretty_print_sd(*mWriteRootSD) << llendl;
- return sd_to_write;
-}
-
-bool LLParamSDParser::readNoValue(Parser& parser, void* val_ptr)
+bool LLParamSDParser::readFlag(Parser& parser, void* val_ptr)
{
LLParamSDParser& self = static_cast<LLParamSDParser&>(parser);
return self.mCurReadSD == &NO_VALUE_MARKER;
@@ -312,3 +211,132 @@ bool LLParamSDParser::readSD(Parser& parser, void* val_ptr)
*((LLSD*)val_ptr) = *self.mCurReadSD;
return true;
}
+
+// static
+LLSD& LLParamSDParserUtilities::getSDWriteNode(LLSD& input, LLInitParam::Parser::name_stack_range_t& name_stack_range)
+{
+ LLSD* sd_to_write = &input;
+
+ for (LLInitParam::Parser::name_stack_t::iterator it = name_stack_range.first;
+ it != name_stack_range.second;
+ ++it)
+ {
+ bool new_traversal = it->second;
+
+ LLSD* child_sd = it->first.empty() ? sd_to_write : &(*sd_to_write)[it->first];
+
+ if (child_sd->isArray())
+ {
+ if (new_traversal)
+ {
+ // write to new element at end
+ sd_to_write = &(*child_sd)[child_sd->size()];
+ }
+ else
+ {
+ // write to last of existing elements, or first element if empty
+ sd_to_write = &(*child_sd)[llmax(0, child_sd->size() - 1)];
+ }
+ }
+ else
+ {
+ if (new_traversal
+ && child_sd->isDefined()
+ && !child_sd->isArray())
+ {
+ // copy child contents into first element of an array
+ LLSD new_array = LLSD::emptyArray();
+ new_array.append(*child_sd);
+ // assign array to slot that previously held the single value
+ *child_sd = new_array;
+ // return next element in that array
+ sd_to_write = &((*child_sd)[1]);
+ }
+ else
+ {
+ sd_to_write = child_sd;
+ }
+ }
+ it->second = false;
+ }
+
+ return *sd_to_write;
+}
+
+//static
+void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd, LLInitParam::Parser::name_stack_t& stack)
+{
+ if (sd.isMap())
+ {
+ for (LLSD::map_const_iterator it = sd.beginMap();
+ it != sd.endMap();
+ ++it)
+ {
+ stack.push_back(make_pair(it->first, true));
+ readSDValues(cb, it->second, stack);
+ stack.pop_back();
+ }
+ }
+ else if (sd.isArray())
+ {
+ for (LLSD::array_const_iterator it = sd.beginArray();
+ it != sd.endArray();
+ ++it)
+ {
+ stack.back().second = true;
+ readSDValues(cb, *it, stack);
+ }
+ }
+ else if (sd.isUndefined())
+ {
+ if (!cb.empty())
+ {
+ cb(NO_VALUE_MARKER, stack);
+ }
+ }
+ else
+ {
+ if (!cb.empty())
+ {
+ cb(sd, stack);
+ }
+ }
+}
+
+//static
+void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd)
+{
+ LLInitParam::Parser::name_stack_t stack = LLInitParam::Parser::name_stack_t();
+ readSDValues(cb, sd, stack);
+}
+namespace LLInitParam
+{
+ // LLSD specialization
+ // block param interface
+ bool ParamValue<LLSD, TypeValues<LLSD>, false>::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name)
+ {
+ LLSD& sd = LLParamSDParserUtilities::getSDWriteNode(mValue, name_stack);
+
+ LLSD::String string;
+
+ if (p.readValue<LLSD::String>(string))
+ {
+ sd = string;
+ return true;
+ }
+ return false;
+ }
+
+ //static
+ void ParamValue<LLSD, TypeValues<LLSD>, false>::serializeElement(Parser& p, const LLSD& sd, Parser::name_stack_t& name_stack)
+ {
+ p.writeValue<LLSD::String>(sd.asString(), name_stack);
+ }
+
+ void ParamValue<LLSD, TypeValues<LLSD>, false>::serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block) const
+ {
+ // read from LLSD value and serialize out to parser (which could be LLSD, XUI, etc)
+ Parser::name_stack_t stack;
+ LLParamSDParserUtilities::readSDValues(boost::bind(&serializeElement, boost::ref(p), _1, _2), mValue, stack);
+ }
+}
diff --git a/indra/llui/llsdparam.h b/indra/llui/llsdparam.h
index 69dab2b411..3dfc6d020e 100644
--- a/indra/llui/llsdparam.h
+++ b/indra/llui/llsdparam.h
@@ -29,6 +29,16 @@
#define LL_LLSDPARAM_H
#include "llinitparam.h"
+#include "boost/function.hpp"
+
+struct LLParamSDParserUtilities
+{
+ static LLSD& getSDWriteNode(LLSD& input, LLInitParam::Parser::name_stack_range_t& name_stack_range);
+
+ typedef boost::function<void (const LLSD&, LLInitParam::Parser::name_stack_t&)> read_sd_cb_t;
+ static void readSDValues(read_sd_cb_t cb, const LLSD& sd, LLInitParam::Parser::name_stack_t& stack);
+ static void readSDValues(read_sd_cb_t cb, const LLSD& sd);
+};
class LLParamSDParser
: public LLInitParam::Parser
@@ -45,27 +55,25 @@ public:
/*virtual*/ std::string getCurrentElementName();
private:
- void readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block);
+ void submit(LLInitParam::BaseBlock& block, const LLSD& sd, LLInitParam::Parser::name_stack_t& name_stack);
template<typename T>
- static bool writeTypedValue(Parser& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
+ static bool writeTypedValue(Parser& parser, const void* val_ptr, parser_t::name_stack_t& name_stack)
{
LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
if (!sdparser.mWriteRootSD) return false;
- LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
- if (!sd_to_write) return false;
+ LLInitParam::Parser::name_stack_range_t range(name_stack.begin(), name_stack.end());
+ LLSD& sd_to_write = LLParamSDParserUtilities::getSDWriteNode(*sdparser.mWriteRootSD, range);
- sd_to_write->assign(*((const T*)val_ptr));
+ sd_to_write.assign(*((const T*)val_ptr));
return true;
}
- LLSD* getSDWriteNode(const parser_t::name_stack_t& name_stack);
+ static bool writeU32Param(Parser& parser, const void* value_ptr, parser_t::name_stack_t& name_stack);
+ static bool writeFlag(Parser& parser, const void* value_ptr, parser_t::name_stack_t& name_stack);
- static bool writeU32Param(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
- static bool writeNoValue(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
-
- static bool readNoValue(Parser& parser, void* val_ptr);
+ static bool readFlag(Parser& parser, void* val_ptr);
static bool readS32(Parser& parser, void* val_ptr);
static bool readU32(Parser& parser, void* val_ptr);
static bool readF32(Parser& parser, void* val_ptr);
@@ -83,22 +91,36 @@ private:
LLSD* mCurWriteSD;
};
+
+extern LLFastTimer::DeclareTimer FTM_SD_PARAM_ADAPTOR;
template<typename T>
class LLSDParamAdapter : public T
+{
+public:
+ LLSDParamAdapter() {}
+ LLSDParamAdapter(const LLSD& sd)
{
- public:
- LLSDParamAdapter() {}
- LLSDParamAdapter(const LLSD& sd)
- {
- LLParamSDParser parser;
- parser.readSD(sd, *this);
- }
+ LLFastTimer _(FTM_SD_PARAM_ADAPTOR);
+ LLParamSDParser parser;
+ // don't spam for implicit parsing of LLSD, as we want to allow arbitrary freeform data and ignore most of it
+ bool parse_silently = true;
+ parser.readSD(sd, *this, parse_silently);
+ }
+
+ operator LLSD() const
+ {
+ LLParamSDParser parser;
+ LLSD sd;
+ parser.writeSD(sd, *this);
+ return sd;
+ }
- LLSDParamAdapter(const T& val)
- {
- T::operator=(val);
- }
- };
+ LLSDParamAdapter(const T& val)
+ : T(val)
+ {
+ T::operator=(val);
+ }
+};
#endif // LL_LLSDPARAM_H
diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h
index f5c3b532c4..c2d7916938 100644
--- a/indra/llui/llsearcheditor.h
+++ b/indra/llui/llsearcheditor.h
@@ -55,9 +55,7 @@ public:
search_button_visible("search_button_visible"),
clear_button("clear_button"),
clear_button_visible("clear_button_visible")
- {
- name = "search_editor";
- }
+ {}
};
void setCommitOnFocusLost(BOOL b) { if (mSearchEditor) mSearchEditor->setCommitOnFocusLost(b); }
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index 013950a5ad..db72234f94 100644
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -54,9 +54,7 @@ LLSlider::Params::Params()
track_highlight_vertical_image("track_highlight_vertical_image"),
mouse_down_callback("mouse_down_callback"),
mouse_up_callback("mouse_up_callback")
-{
- follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
-}
+{}
LLSlider::LLSlider(const LLSlider::Params& p)
: LLF32UICtrl(p),
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index d760178e35..583ed1ed2e 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -76,8 +76,14 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
}
LLRect label_rect( left, top, label_width, bottom );
LLTextBox::Params params(p.slider_label);
- params.rect.setIfNotProvided(label_rect);
- params.font.setIfNotProvided(p.font);
+ if (!params.rect.isProvided())
+ {
+ params.rect = label_rect;
+ }
+ if (!params.font.isProvided())
+ {
+ params.font = p.font;
+ }
params.initial_value(p.label());
mLabelBox = LLUICtrlFactory::create<LLTextBox> (params);
addChild(mLabelBox);
@@ -113,15 +119,33 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
S32 slider_left = label_width ? label_width + sliderctrl_spacing : 0;
LLSlider::Params slider_p(p.slider_bar);
slider_p.name("slider_bar");
- slider_p.rect.setIfNotProvided(LLRect(slider_left,top,slider_right,bottom));
- slider_p.initial_value.setIfNotProvided(p.initial_value().asReal());
- slider_p.min_value.setIfNotProvided(p.min_value);
- slider_p.max_value.setIfNotProvided(p.max_value);
- slider_p.increment.setIfNotProvided(p.increment);
- slider_p.orientation.setIfNotProvided(p.orientation);
+ if (!slider_p.rect.isProvided())
+ {
+ slider_p.rect = LLRect(slider_left,top,slider_right,bottom);
+ }
+ if (!slider_p.initial_value.isProvided())
+ {
+ slider_p.initial_value = p.initial_value().asReal();
+ }
+ if (!slider_p.min_value.isProvided())
+ {
+ slider_p.min_value = p.min_value;
+ }
+ if (!slider_p.max_value.isProvided())
+ {
+ slider_p.max_value = p.max_value;
+ }
+ if (!slider_p.increment.isProvided())
+ {
+ slider_p.increment = p.increment;
+ }
+ if (!slider_p.orientation.isProvided())
+ {
+ slider_p.orientation = p.orientation;
+ }
- slider_p.commit_callback.function(&LLSliderCtrl::onSliderCommit);
- slider_p.control_name(p.control_name);
+ slider_p.commit_callback.function = &LLSliderCtrl::onSliderCommit;
+ slider_p.control_name = p.control_name;
slider_p.mouse_down_callback( p.mouse_down_callback );
slider_p.mouse_up_callback( p.mouse_up_callback );
mSlider = LLUICtrlFactory::create<LLSlider> (slider_p);
@@ -134,8 +158,15 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
if( p.can_edit_text() )
{
LLLineEditor::Params line_p(p.value_editor);
- line_p.rect.setIfNotProvided(text_rect);
- line_p.font.setIfNotProvided(p.font);
+ if (!line_p.rect.isProvided())
+ {
+ line_p.rect = text_rect;
+ }
+ if (!line_p.font.isProvided())
+ {
+ line_p.font = p.font;
+ }
+
line_p.commit_callback.function(&LLSliderCtrl::onEditorCommit);
line_p.prevalidate_callback(&LLTextValidate::validateFloat);
mEditor = LLUICtrlFactory::create<LLLineEditor>(line_p);
@@ -149,8 +180,14 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
else
{
LLTextBox::Params text_p(p.value_text);
- text_p.rect.setIfNotProvided(text_rect);
- text_p.font.setIfNotProvided(p.font);
+ if (!text_p.rect.isProvided())
+ {
+ text_p.rect = text_rect;
+ }
+ if (!text_p.font.isProvided())
+ {
+ text_p.font = p.font;
+ }
mTextBox = LLUICtrlFactory::create<LLTextBox>(text_p);
addChild(mTextBox);
}
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index d197084e38..87814f838e 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -96,6 +96,9 @@ public:
void onUpBtn(const LLSD& data);
void onDownBtn(const LLSD& data);
+
+ const LLColor4& getEnabledTextColor() const { return mTextEnabledColor.get(); }
+ const LLColor4& getDisabledTextColor() const { return mTextDisabledColor.get(); }
private:
void updateLabelColor();
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
index 62a9db82fe..513fff3234 100644
--- a/indra/llui/llstatbar.h
+++ b/indra/llui/llstatbar.h
@@ -65,7 +65,7 @@ public:
show_mean("show_mean", TRUE),
stat("stat")
{
- follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+ changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT);
}
};
LLStatBar(const Params&);
diff --git a/indra/llui/llstatview.h b/indra/llui/llstatview.h
index 22a9fcd672..5abdc42448 100644
--- a/indra/llui/llstatview.h
+++ b/indra/llui/llstatview.h
@@ -46,7 +46,7 @@ public:
Params()
: setting("setting")
{
- follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
+ changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT);
}
};
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 7f0d650403..d5f8707381 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -214,13 +214,11 @@ LLTabContainer::Params::Params()
middle_tab("middle_tab"),
last_tab("last_tab"),
use_custom_icon_ctrl("use_custom_icon_ctrl", false),
+ open_tabs_on_drag_and_drop("open_tabs_on_drag_and_drop", false),
tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
use_ellipses("use_ellipses"),
font_halign("halign")
-{
- name(std::string("tab_container"));
- mouse_opaque = false;
-}
+{}
LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
: LLPanel(p),
@@ -253,6 +251,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
mMiddleTabParams(p.middle_tab),
mLastTabParams(p.last_tab),
mCustomIconCtrlUsed(p.use_custom_icon_ctrl),
+ mOpenTabsOnDragAndDrop(p.open_tabs_on_drag_and_drop),
mTabIconCtrlPad(p.tab_icon_ctrl_pad),
mUseTabEllipses(p.use_ellipses)
{
@@ -551,23 +550,23 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
}
S32 tab_count = getTabCount();
- if (tab_count > 0)
+ if (tab_count > 0 && !getTabsHidden())
{
LLTabTuple* firsttuple = getTab(0);
LLRect tab_rect;
if (mIsVertical)
{
tab_rect = LLRect(firsttuple->mButton->getRect().mLeft,
- has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop,
- firsttuple->mButton->getRect().mRight,
- has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom );
+ has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop,
+ firsttuple->mButton->getRect().mRight,
+ has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom );
}
else
{
tab_rect = LLRect(has_scroll_arrows ? mPrevArrowBtn->getRect().mRight : mJumpPrevArrowBtn->getRect().mLeft,
- firsttuple->mButton->getRect().mTop,
- has_scroll_arrows ? mNextArrowBtn->getRect().mLeft : mJumpNextArrowBtn->getRect().mRight,
- firsttuple->mButton->getRect().mBottom );
+ firsttuple->mButton->getRect().mTop,
+ has_scroll_arrows ? mNextArrowBtn->getRect().mLeft : mJumpNextArrowBtn->getRect().mRight,
+ firsttuple->mButton->getRect().mBottom );
}
if( tab_rect.pointInRect( x, y ) )
{
@@ -684,7 +683,7 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask)
{
static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
BOOL handled = LLPanel::handleToolTip( x, y, mask);
- if (!handled && getTabCount() > 0)
+ if (!handled && getTabCount() > 0 && !getTabsHidden())
{
LLTabTuple* firsttuple = getTab(0);
@@ -815,48 +814,62 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag
{
BOOL has_scroll_arrows = (getMaxScrollPos() > 0);
- if( mDragAndDropDelayTimer.getStarted() && mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME )
+ if(mOpenTabsOnDragAndDrop && !getTabsHidden())
{
- if (has_scroll_arrows)
+ // In that case, we'll open the hovered tab while dragging and dropping items.
+ // This allows for drilling through tabs.
+ if (mDragAndDropDelayTimer.getStarted())
{
- if (mJumpPrevArrowBtn && mJumpPrevArrowBtn->getRect().pointInRect(x, y))
- {
- S32 local_x = x - mJumpPrevArrowBtn->getRect().mLeft;
- S32 local_y = y - mJumpPrevArrowBtn->getRect().mBottom;
- mJumpPrevArrowBtn->handleHover(local_x, local_y, mask);
- }
- if (mJumpNextArrowBtn && mJumpNextArrowBtn->getRect().pointInRect(x, y))
- {
- S32 local_x = x - mJumpNextArrowBtn->getRect().mLeft;
- S32 local_y = y - mJumpNextArrowBtn->getRect().mBottom;
- mJumpNextArrowBtn->handleHover(local_x, local_y, mask);
- }
- if (mPrevArrowBtn->getRect().pointInRect(x, y))
- {
- S32 local_x = x - mPrevArrowBtn->getRect().mLeft;
- S32 local_y = y - mPrevArrowBtn->getRect().mBottom;
- mPrevArrowBtn->handleHover(local_x, local_y, mask);
- }
- else if (mNextArrowBtn->getRect().pointInRect(x, y))
+ if (mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME)
{
- S32 local_x = x - mNextArrowBtn->getRect().mLeft;
- S32 local_y = y - mNextArrowBtn->getRect().mBottom;
- mNextArrowBtn->handleHover(local_x, local_y, mask);
- }
- }
+ if (has_scroll_arrows)
+ {
+ if (mJumpPrevArrowBtn && mJumpPrevArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mJumpPrevArrowBtn->getRect().mLeft;
+ S32 local_y = y - mJumpPrevArrowBtn->getRect().mBottom;
+ mJumpPrevArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ if (mJumpNextArrowBtn && mJumpNextArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mJumpNextArrowBtn->getRect().mLeft;
+ S32 local_y = y - mJumpNextArrowBtn->getRect().mBottom;
+ mJumpNextArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ if (mPrevArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mPrevArrowBtn->getRect().mLeft;
+ S32 local_y = y - mPrevArrowBtn->getRect().mBottom;
+ mPrevArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ else if (mNextArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mNextArrowBtn->getRect().mLeft;
+ S32 local_y = y - mNextArrowBtn->getRect().mBottom;
+ mNextArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ }
- for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
- {
- LLTabTuple* tuple = *iter;
- tuple->mButton->setVisible( TRUE );
- S32 local_x = x - tuple->mButton->getRect().mLeft;
- S32 local_y = y - tuple->mButton->getRect().mBottom;
- if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible())
- {
- tuple->mButton->onCommit();
+ for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
+ {
+ LLTabTuple* tuple = *iter;
+ tuple->mButton->setVisible( TRUE );
+ S32 local_x = x - tuple->mButton->getRect().mLeft;
+ S32 local_y = y - tuple->mButton->getRect().mBottom;
+ if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible())
+ {
+ tuple->mButton->onCommit();
+ }
+ }
+ // Stop the timer whether successful or not. Don't let it run forever.
mDragAndDropDelayTimer.stop();
}
}
+ else
+ {
+ // Start a timer so we don't open tabs as soon as we hover on them
+ mDragAndDropDelayTimer.start();
+ }
}
return LLView::handleDragAndDrop(x, y, mask, drop, type, cargo_data, accept, tooltip);
@@ -1026,85 +1039,50 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
}
else
{
+ LLButton::Params& p = (mCustomIconCtrlUsed ? custom_btn_params : normal_btn_params);
+
+ p.rect(btn_rect);
+ p.font(mFont);
+ p.font_halign = mFontHalign;
+ p.label(trimmed_label);
+ p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
+ if (indent)
+ {
+ p.pad_left(indent);
+ }
+ p.pad_bottom( mLabelPadBottom );
+ p.scale_image(true);
+ p.tab_stop(false);
+ p.label_shadow(false);
+ p.follows.flags = FOLLOWS_LEFT;
+
if (mIsVertical)
{
- LLButton::Params& p = (mCustomIconCtrlUsed)?
- custom_btn_params:normal_btn_params;
-
p.name(std::string("vert tab button"));
- p.rect(btn_rect);
- p.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
- p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
- p.font(mFont);
- p.label(trimmed_label);
p.image_unselected(mMiddleTabParams.tab_left_image_unselected);
p.image_selected(mMiddleTabParams.tab_left_image_selected);
- p.scale_image(true);
- p.font_halign = mFontHalign;
- p.pad_bottom( mLabelPadBottom );
- p.tab_stop(false);
- p.label_shadow(false);
- if (indent)
- {
- p.pad_left(indent);
- }
-
-
- if(mCustomIconCtrlUsed)
- {
- btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
-
- }
- else
- {
- btn = LLUICtrlFactory::create<LLButton>(p);
- }
+ p.follows.flags = p.follows.flags() | FOLLOWS_TOP;
}
else
{
- LLButton::Params& p = (mCustomIconCtrlUsed)?
- custom_btn_params:normal_btn_params;
p.name(std::string(child->getName()) + " tab");
- p.rect(btn_rect);
- p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
- p.font(mFont);
- p.label(trimmed_label);
p.visible(false);
- p.scale_image(true);
p.image_unselected(tab_img);
p.image_selected(tab_selected_img);
- p.tab_stop(false);
- p.label_shadow(false);
+ p.follows.flags = p.follows.flags() | (getTabPosition() == TOP ? FOLLOWS_TOP : FOLLOWS_BOTTOM);
// Try to squeeze in a bit more text
p.pad_left( mLabelPadLeft );
p.pad_right(2);
- p.pad_bottom( mLabelPadBottom );
- p.font_halign = mFontHalign;
- p.follows.flags = FOLLOWS_LEFT;
- p.follows.flags = FOLLOWS_LEFT;
-
- if (indent)
- {
- p.pad_left(indent);
- }
-
- if( getTabPosition() == TOP )
- {
- p.follows.flags = p.follows.flags() | FOLLOWS_TOP;
- }
- else
- {
- p.follows.flags = p.follows.flags() | FOLLOWS_BOTTOM;
- }
-
- if(mCustomIconCtrlUsed)
- {
- btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
- }
- else
- {
- btn = LLUICtrlFactory::create<LLButton>(p);
- }
+ }
+
+ // *TODO : It seems wrong not to use p in both cases considering the way p is initialized
+ if (mCustomIconCtrlUsed)
+ {
+ btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
+ }
+ else
+ {
+ btn = LLUICtrlFactory::create<LLButton>(p);
}
}
@@ -1281,6 +1259,10 @@ void LLTabContainer::enableTabButton(S32 which, BOOL enable)
{
mTabList[which]->mButton->setEnabled(enable);
}
+ // Stop the DaD timer as it might run forever
+ // enableTabButton() is typically called on refresh and draw when anything changed
+ // in the tab container so it's a good time to reset that.
+ mDragAndDropDelayTimer.stop();
}
void LLTabContainer::deleteAllTabs()
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index eaa2fd54e0..cebace2ceb 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -105,6 +105,11 @@ public:
Optional<bool> use_custom_icon_ctrl;
/**
+ * Open tabs on hover in drag and drop situations
+ */
+ Optional<bool> open_tabs_on_drag_and_drop;
+
+ /**
* Paddings for LLIconCtrl in case of LLCustomButtonIconCtrl usage(use_custom_icon_ctrl = true)
*/
Optional<S32> tab_icon_ctrl_pad;
@@ -300,6 +305,7 @@ private:
TabParams mLastTabParams;
bool mCustomIconCtrlUsed;
+ bool mOpenTabsOnDragAndDrop;
S32 mTabIconCtrlPad;
bool mUseTabEllipses;
};
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 349dbc3405..3b768166f1 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2024,8 +2024,17 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,
}
else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd)
{
- // segment wraps to next line, so just set doc pos to the end of the line
- pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength());
+ if (getLineNumFromDocIndex(line_iter->mDocIndexEnd - 1) == line_iter->mLineNum)
+ {
+ // if segment wraps to the next line we should step one char back
+ // to compensate for the space char between words
+ // which is removed due to wrapping
+ pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength());
+ }
+ else
+ {
+ pos = llclamp(line_iter->mDocIndexEnd, 0, getLength());
+ }
break;
}
start_x += text_width;
@@ -2509,7 +2518,11 @@ BOOL LLTextSegment::handleDoubleClick(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleHover(S32 x, S32 y, MASK mask) { return FALSE; }
BOOL LLTextSegment::handleScrollWheel(S32 x, S32 y, S32 clicks) { return FALSE; }
BOOL LLTextSegment::handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; }
-std::string LLTextSegment::getName() const { return ""; }
+const std::string& LLTextSegment::getName() const
+{
+ static std::string empty_string("");
+ return empty_string;
+}
void LLTextSegment::onMouseCaptureLost() {}
void LLTextSegment::screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {}
void LLTextSegment::localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {}
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 7d545a1ba6..b699601908 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -84,7 +84,7 @@ public:
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
- /*virtual*/ std::string getName() const;
+ /*virtual*/ const std::string& getName() const;
/*virtual*/ void onMouseCaptureLost();
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const;
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const;
@@ -237,7 +237,7 @@ public:
friend class LLNormalTextSegment;
friend class LLUICtrlFactory;
- struct LineSpacingParams : public LLInitParam::Choice<LineSpacingParams>
+ struct LineSpacingParams : public LLInitParam::ChoiceBlock<LineSpacingParams>
{
Alternative<F32> multiple;
Alternative<S32> pixels;
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index a4fe4f6ca8..8a85f99e0c 100644
--- a/indra/llui/lltextparser.cpp
+++ b/indra/llui/lltextparser.cpp
@@ -46,8 +46,6 @@ LLTextParser::LLTextParser()
{}
-// Moved triggerAlerts() to llfloaterchat.cpp to break llui/llaudio library dependency.
-
S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
{
if (!highlight.has("pattern")) return -1;
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
new file mode 100644
index 0000000000..7f96c1373c
--- /dev/null
+++ b/indra/llui/lltoolbar.cpp
@@ -0,0 +1,1223 @@
+/**
+ * @file lltoolbar.cpp
+ * @author Richard Nelson
+ * @brief User customizable toolbar class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include <boost/foreach.hpp>
+#include "lltoolbar.h"
+
+#include "llcommandmanager.h"
+#include "llmenugl.h"
+#include "lltrans.h"
+#include "llinventory.h"
+#include "lliconctrl.h"
+
+// uncomment this and remove the one in llui.cpp when there is an external reference to this translation unit
+// thanks, MSVC!
+//static LLDefaultChildRegistry::Register<LLToolBar> r1("toolbar");
+
+namespace LLToolBarEnums
+{
+ LLLayoutStack::ELayoutOrientation getOrientation(SideType sideType)
+ {
+ LLLayoutStack::ELayoutOrientation orientation = LLLayoutStack::HORIZONTAL;
+
+ if ((sideType == SIDE_LEFT) || (sideType == SIDE_RIGHT))
+ {
+ orientation = LLLayoutStack::VERTICAL;
+ }
+
+ return orientation;
+ }
+}
+
+using namespace LLToolBarEnums;
+
+
+namespace LLInitParam
+{
+ void TypeValues<ButtonType>::declareValues()
+ {
+ declare("icons_with_text", BTNTYPE_ICONS_WITH_TEXT);
+ declare("icons_only", BTNTYPE_ICONS_ONLY);
+ }
+
+ void TypeValues<SideType>::declareValues()
+ {
+ declare("bottom", SIDE_BOTTOM);
+ declare("left", SIDE_LEFT);
+ declare("right", SIDE_RIGHT);
+ declare("top", SIDE_TOP);
+ }
+}
+
+LLToolBar::Params::Params()
+: button_display_mode("button_display_mode"),
+ commands("command"),
+ side("side", SIDE_TOP),
+ button_icon("button_icon"),
+ button_icon_and_text("button_icon_and_text"),
+ read_only("read_only", false),
+ wrap("wrap", true),
+ pad_left("pad_left"),
+ pad_top("pad_top"),
+ pad_right("pad_right"),
+ pad_bottom("pad_bottom"),
+ pad_between("pad_between"),
+ min_girth("min_girth"),
+ button_panel("button_panel")
+{}
+
+LLToolBar::LLToolBar(const LLToolBar::Params& p)
+: LLUICtrl(p),
+ mReadOnly(p.read_only),
+ mButtonType(p.button_display_mode),
+ mSideType(p.side),
+ mWrap(p.wrap),
+ mNeedsLayout(false),
+ mModified(false),
+ mButtonPanel(NULL),
+ mCenteringStack(NULL),
+ mPadLeft(p.pad_left),
+ mPadRight(p.pad_right),
+ mPadTop(p.pad_top),
+ mPadBottom(p.pad_bottom),
+ mPadBetween(p.pad_between),
+ mMinGirth(p.min_girth),
+ mPopupMenuHandle(),
+ mRightMouseTargetButton(NULL),
+ mStartDragItemCallback(NULL),
+ mHandleDragItemCallback(NULL),
+ mHandleDropCallback(NULL),
+ mButtonAddSignal(NULL),
+ mButtonEnterSignal(NULL),
+ mButtonLeaveSignal(NULL),
+ mButtonRemoveSignal(NULL),
+ mDragAndDropTarget(false)
+{
+ mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text;
+ mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon;
+}
+
+LLToolBar::~LLToolBar()
+{
+ delete mPopupMenuHandle.get();
+ delete mButtonAddSignal;
+ delete mButtonEnterSignal;
+ delete mButtonLeaveSignal;
+ delete mButtonRemoveSignal;
+}
+
+void LLToolBar::createContextMenu()
+{
+ if (!mPopupMenuHandle.get())
+ {
+ // Setup bindings specific to this instance for the context menu options
+
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar commit_reg;
+ commit_reg.add("Toolbars.EnableSetting", boost::bind(&LLToolBar::onSettingEnable, this, _2));
+ commit_reg.add("Toolbars.RemoveSelectedCommand", boost::bind(&LLToolBar::onRemoveSelectedCommand, this));
+
+ LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_reg;
+ enable_reg.add("Toolbars.CheckSetting", boost::bind(&LLToolBar::isSettingChecked, this, _2));
+
+ // Create the context menu
+ LLContextMenu* menu = LLUICtrlFactory::instance().createFromFile<LLContextMenu>("menu_toolbars.xml", LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance());
+
+ if (menu)
+ {
+ menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
+
+ mPopupMenuHandle = menu->getHandle();
+ }
+ else
+ {
+ llwarns << "Unable to load toolbars context menu." << llendl;
+ }
+ }
+}
+
+void LLToolBar::initFromParams(const LLToolBar::Params& p)
+{
+ // Initialize the base object
+ LLUICtrl::initFromParams(p);
+
+ LLLayoutStack::ELayoutOrientation orientation = getOrientation(p.side);
+
+ LLLayoutStack::Params centering_stack_p;
+ centering_stack_p.name = "centering_stack";
+ centering_stack_p.rect = getLocalRect();
+ centering_stack_p.follows.flags = FOLLOWS_ALL;
+ centering_stack_p.orientation = orientation;
+ centering_stack_p.mouse_opaque = false;
+
+ mCenteringStack = LLUICtrlFactory::create<LLLayoutStack>(centering_stack_p);
+ addChild(mCenteringStack);
+
+ LLLayoutPanel::Params border_panel_p;
+ border_panel_p.name = "border_panel";
+ border_panel_p.rect = getLocalRect();
+ border_panel_p.auto_resize = true;
+ border_panel_p.user_resize = false;
+ border_panel_p.mouse_opaque = false;
+
+ mCenteringStack->addChild(LLUICtrlFactory::create<LLLayoutPanel>(border_panel_p));
+
+ LLLayoutPanel::Params center_panel_p;
+ center_panel_p.name = "center_panel";
+ center_panel_p.rect = getLocalRect();
+ center_panel_p.auto_resize = false;
+ center_panel_p.user_resize = false;
+ center_panel_p.mouse_opaque = false;
+ LLLayoutPanel* center_panel = LLUICtrlFactory::create<LLLayoutPanel>(center_panel_p);
+ mCenteringStack->addChild(center_panel);
+
+ LLPanel::Params button_panel_p(p.button_panel);
+ button_panel_p.rect = center_panel->getLocalRect();
+ button_panel_p.follows.flags = FOLLOWS_BOTTOM|FOLLOWS_LEFT;
+ mButtonPanel = LLUICtrlFactory::create<LLPanel>(button_panel_p);
+ center_panel->addChild(mButtonPanel);
+
+ mCenteringStack->addChild(LLUICtrlFactory::create<LLLayoutPanel>(border_panel_p));
+
+ BOOST_FOREACH(LLCommandId id, p.commands)
+ {
+ addCommand(id);
+ }
+
+ mNeedsLayout = true;
+}
+
+bool LLToolBar::addCommand(const LLCommandId& commandId, int rank)
+{
+ LLCommand * command = LLCommandManager::instance().getCommand(commandId);
+ if (!command) return false;
+
+ // Create the button and do the things that don't need ordering
+ LLToolBarButton* button = createButton(commandId);
+ mButtonPanel->addChild(button);
+ mButtonMap.insert(std::make_pair(commandId.uuid(), button));
+
+ // Insert the command and button in the right place in their respective lists
+ if ((rank >= mButtonCommands.size()) || (rank == RANK_NONE))
+ {
+ // In that case, back load
+ mButtonCommands.push_back(command->id());
+ mButtons.push_back(button);
+ }
+ else
+ {
+ // Insert in place: iterate to the right spot...
+ std::list<LLToolBarButton*>::iterator it_button = mButtons.begin();
+ command_id_list_t::iterator it_command = mButtonCommands.begin();
+ while (rank > 0)
+ {
+ ++it_button;
+ ++it_command;
+ rank--;
+ }
+ // ...then insert
+ mButtonCommands.insert(it_command, command->id());
+ mButtons.insert(it_button,button);
+ }
+
+ mNeedsLayout = true;
+
+ updateLayoutAsNeeded();
+
+
+ if (mButtonAddSignal)
+ {
+ (*mButtonAddSignal)(button);
+ }
+
+ return true;
+}
+
+// Remove a command from the list
+// Returns the rank of the command in the original list so that doing addCommand(id,rank) right after
+// a removeCommand(id) would leave the list unchanged.
+// Returns RANK_NONE if the command is not found in the list
+int LLToolBar::removeCommand(const LLCommandId& commandId)
+{
+ if (!hasCommand(commandId)) return RANK_NONE;
+
+ // First erase the map record
+ command_id_map::iterator it = mButtonMap.find(commandId.uuid());
+ mButtonMap.erase(it);
+
+ // Now iterate on the commands and buttons to identify the relevant records
+ int rank = 0;
+ std::list<LLToolBarButton*>::iterator it_button = mButtons.begin();
+ command_id_list_t::iterator it_command = mButtonCommands.begin();
+ while (*it_command != commandId)
+ {
+ ++it_button;
+ ++it_command;
+ ++rank;
+ }
+
+ if (mButtonRemoveSignal)
+ {
+ (*mButtonRemoveSignal)(*it_button);
+ }
+
+ // Delete the button and erase the command and button records
+ delete (*it_button);
+ mButtonCommands.erase(it_command);
+ mButtons.erase(it_button);
+
+ mNeedsLayout = true;
+
+ return rank;
+}
+
+void LLToolBar::clearCommandsList()
+{
+ // Clears the commands list
+ mButtonCommands.clear();
+ // This will clear the buttons
+ createButtons();
+}
+
+bool LLToolBar::hasCommand(const LLCommandId& commandId) const
+{
+ if (commandId != LLCommandId::null)
+ {
+ command_id_map::const_iterator it = mButtonMap.find(commandId.uuid());
+ return (it != mButtonMap.end());
+ }
+
+ return false;
+}
+
+bool LLToolBar::enableCommand(const LLCommandId& commandId, bool enabled)
+{
+ LLButton * command_button = NULL;
+
+ if (commandId != LLCommandId::null)
+ {
+ command_id_map::iterator it = mButtonMap.find(commandId.uuid());
+ if (it != mButtonMap.end())
+ {
+ command_button = it->second;
+ command_button->setEnabled(enabled);
+ }
+ }
+
+ return (command_button != NULL);
+}
+
+bool LLToolBar::stopCommandInProgress(const LLCommandId& commandId)
+{
+ //
+ // Note from Leslie:
+ //
+ // This implementation was largely put in place to handle EXP-1348 which is related to
+ // dragging and dropping the "speak" button. The "speak" button can be in one of two
+ // modes, i.e., either a toggle action or a push-to-talk action. Because of this it
+ // responds to mouse down and mouse up in different ways, based on which behavior the
+ // button is currently set to obey. This was the simplest way of getting the button
+ // to turn off the microphone for both behaviors without risking duplicate state.
+ //
+
+ LLToolBarButton * command_button = NULL;
+
+ if (commandId != LLCommandId::null)
+ {
+ LLCommand* command = LLCommandManager::instance().getCommand(commandId);
+ llassert(command);
+
+ // If this command has an explicit function for execution stop
+ if (command->executeStopFunctionName().length() > 0)
+ {
+ command_id_map::iterator it = mButtonMap.find(commandId.uuid());
+ if (it != mButtonMap.end())
+ {
+ command_button = it->second;
+ llassert(command_button->mIsRunningSignal);
+
+ // Check to see if it is running
+ if ((*command_button->mIsRunningSignal)(command_button, command->isRunningParameters()))
+ {
+ // Trigger an additional button commit, which calls mouse down, mouse up and commit
+ command_button->onCommit();
+ }
+ }
+ }
+ }
+
+ return (command_button != NULL);
+}
+
+bool LLToolBar::flashCommand(const LLCommandId& commandId, bool flash)
+{
+ LLButton * command_button = NULL;
+
+ if (commandId != LLCommandId::null)
+ {
+ command_id_map::iterator it = mButtonMap.find(commandId.uuid());
+ if (it != mButtonMap.end())
+ {
+ command_button = it->second;
+ command_button->setFlashing(flash ? TRUE : FALSE);
+ }
+ }
+
+ return (command_button != NULL);
+}
+
+BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+ LLRect button_panel_rect;
+ mButtonPanel->localRectToOtherView(mButtonPanel->getLocalRect(), &button_panel_rect, this);
+ BOOL handle_it_here = !mReadOnly && button_panel_rect.pointInRect(x, y);
+
+ if (handle_it_here)
+ {
+ // Determine which button the mouse was over during the click in case the context menu action
+ // is intended to affect the button.
+ BOOST_FOREACH(LLToolBarButton* button, mButtons)
+ {
+ LLRect button_rect;
+ button->localRectToOtherView(button->getLocalRect(), &button_rect, this);
+
+ if (button_rect.pointInRect(x, y))
+ {
+ mRightMouseTargetButton = button;
+ break;
+ }
+ }
+
+ createContextMenu();
+
+ LLContextMenu * menu = (LLContextMenu *) mPopupMenuHandle.get();
+
+ if (menu)
+ {
+ menu->show(x, y);
+
+ LLMenuGL::showPopup(this, menu, x, y);
+ }
+ }
+
+ return handle_it_here;
+}
+
+BOOL LLToolBar::isSettingChecked(const LLSD& userdata)
+{
+ BOOL retval = FALSE;
+
+ const std::string setting_name = userdata.asString();
+
+ if (setting_name == "icons_with_text")
+ {
+ retval = (mButtonType == BTNTYPE_ICONS_WITH_TEXT);
+ }
+ else if (setting_name == "icons_only")
+ {
+ retval = (mButtonType == BTNTYPE_ICONS_ONLY);
+ }
+
+ return retval;
+}
+
+void LLToolBar::onSettingEnable(const LLSD& userdata)
+{
+ llassert(!mReadOnly);
+
+ const std::string setting_name = userdata.asString();
+
+ if (setting_name == "icons_with_text")
+ {
+ setButtonType(BTNTYPE_ICONS_WITH_TEXT);
+ }
+ else if (setting_name == "icons_only")
+ {
+ setButtonType(BTNTYPE_ICONS_ONLY);
+ }
+}
+
+void LLToolBar::onRemoveSelectedCommand()
+{
+ llassert(!mReadOnly);
+
+ if (mRightMouseTargetButton)
+ {
+ removeCommand(mRightMouseTargetButton->getCommandId());
+
+ mRightMouseTargetButton = NULL;
+ }
+}
+
+void LLToolBar::setButtonType(LLToolBarEnums::ButtonType button_type)
+{
+ bool regenerate_buttons = (mButtonType != button_type);
+
+ mButtonType = button_type;
+
+ if (regenerate_buttons)
+ {
+ createButtons();
+ }
+}
+
+void LLToolBar::resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth)
+{
+ // make buttons in current row all same girth
+ BOOST_FOREACH(LLToolBarButton* button, buttons_in_row)
+ {
+ if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL)
+ {
+ button->reshape(button->mWidthRange.clamp(button->getRect().getWidth()), max_row_girth);
+ }
+ else // VERTICAL
+ {
+ button->reshape(max_row_girth, button->getRect().getHeight());
+ }
+ }
+}
+
+// Returns the position of the coordinates as a rank in the button list.
+// The rank is the position a tool dropped in (x,y) would assume in the button list.
+// The returned value is between 0 and mButtons.size(), 0 being the first element to the left
+// (or top) and mButtons.size() the last one to the right (or bottom).
+// Various drag data are stored in the toolbar object though are not exposed outside (and shouldn't).
+int LLToolBar::getRankFromPosition(S32 x, S32 y)
+{
+ if (mButtons.empty())
+ {
+ return RANK_NONE;
+ }
+
+ int rank = 0;
+
+ // Convert the toolbar coord into button panel coords
+ LLLayoutStack::ELayoutOrientation orientation = getOrientation(mSideType);
+ S32 button_panel_x = 0;
+ S32 button_panel_y = 0;
+ localPointToOtherView(x, y, &button_panel_x, &button_panel_y, mButtonPanel);
+ S32 dx = x - button_panel_x;
+ S32 dy = y - button_panel_y;
+
+ // Simply compare the passed coord with the buttons outbound box + padding
+ std::list<LLToolBarButton*>::iterator it_button = mButtons.begin();
+ std::list<LLToolBarButton*>::iterator end_button = mButtons.end();
+ LLRect button_rect;
+ while (it_button != end_button)
+ {
+ button_rect = (*it_button)->getRect();
+ S32 point_x = button_rect.mRight + mPadRight;
+ S32 point_y = button_rect.mBottom - mPadBottom;
+
+ if ((button_panel_x < point_x) && (button_panel_y > point_y))
+ {
+ break;
+ }
+ rank++;
+ ++it_button;
+ }
+
+ // Update the passed coordinates to the hit button relevant corner
+ // (different depending on toolbar orientation)
+ if (rank < mButtons.size())
+ {
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ // Horizontal
+ S32 mid_point = (button_rect.mRight + button_rect.mLeft) / 2;
+ if (button_panel_x < mid_point)
+ {
+ mDragx = button_rect.mLeft - mPadLeft;
+ mDragy = button_rect.mTop + mPadTop;
+ }
+ else
+ {
+ rank++;
+ mDragx = button_rect.mRight + mPadRight - 1;
+ mDragy = button_rect.mTop + mPadTop;
+ }
+ }
+ else
+ {
+ // Vertical
+ S32 mid_point = (button_rect.mTop + button_rect.mBottom) / 2;
+ if (button_panel_y > mid_point)
+ {
+ mDragx = button_rect.mLeft - mPadLeft;
+ mDragy = button_rect.mTop + mPadTop;
+ }
+ else
+ {
+ rank++;
+ mDragx = button_rect.mLeft - mPadLeft;
+ mDragy = button_rect.mBottom - mPadBottom + 1;
+ }
+ }
+ }
+ else
+ {
+ // We hit passed the end of the list so put the insertion point at the end
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ mDragx = button_rect.mRight + mPadRight;
+ mDragy = button_rect.mTop + mPadTop;
+ }
+ else
+ {
+ mDragx = button_rect.mLeft - mPadLeft;
+ mDragy = button_rect.mBottom - mPadBottom;
+ }
+ }
+
+ // Update the "girth" of the caret, i.e. the width or height (depending of orientation)
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ mDragGirth = button_rect.getHeight() + mPadBottom + mPadTop;
+ }
+ else
+ {
+ mDragGirth = button_rect.getWidth() + mPadLeft + mPadRight;
+ }
+
+ // The delta account for the coord model change (i.e. convert back to toolbar coord)
+ mDragx += dx;
+ mDragy += dy;
+
+ return rank;
+}
+
+int LLToolBar::getRankFromPosition(const LLCommandId& id)
+{
+ if (!hasCommand(id))
+ {
+ return RANK_NONE;
+ }
+ int rank = 0;
+ std::list<LLToolBarButton*>::iterator it_button = mButtons.begin();
+ std::list<LLToolBarButton*>::iterator end_button = mButtons.end();
+ while (it_button != end_button)
+ {
+ if ((*it_button)->mId == id)
+ {
+ break;
+ }
+ rank++;
+ ++it_button;
+ }
+ return rank;
+}
+
+void LLToolBar::updateLayoutAsNeeded()
+{
+ if (!mNeedsLayout) return;
+
+ LLLayoutStack::ELayoutOrientation orientation = getOrientation(mSideType);
+
+ // our terminology for orientation-agnostic layout is such that
+ // length refers to a distance in the direction we stack the buttons
+ // and girth refers to a distance in the direction buttons wrap
+ S32 max_row_girth = 0;
+ S32 max_row_length = 0;
+
+ S32 max_length;
+ S32 max_total_girth;
+ S32 cur_start;
+ S32 cur_row ;
+ S32 row_pad_start;
+ S32 row_pad_end;
+ S32 girth_pad_end;
+ S32 row_running_length;
+
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ max_length = getRect().getWidth() - mPadLeft - mPadRight;
+ max_total_girth = getRect().getHeight() - mPadTop - mPadBottom;
+ row_pad_start = mPadLeft;
+ row_pad_end = mPadRight;
+ cur_row = mPadTop;
+ girth_pad_end = mPadBottom;
+ }
+ else // VERTICAL
+ {
+ max_length = getRect().getHeight() - mPadTop - mPadBottom;
+ max_total_girth = getRect().getWidth() - mPadLeft - mPadRight;
+ row_pad_start = mPadTop;
+ row_pad_end = mPadBottom;
+ cur_row = mPadLeft;
+ girth_pad_end = mPadRight;
+ }
+
+ row_running_length = row_pad_start;
+ cur_start = row_pad_start;
+
+
+ LLRect panel_rect = mButtonPanel->getLocalRect();
+
+ std::vector<LLToolBarButton*> buttons_in_row;
+
+ BOOST_FOREACH(LLToolBarButton* button, mButtons)
+ {
+ button->reshape(button->mWidthRange.getMin(), button->mDesiredHeight);
+ button->autoResize();
+
+ S32 button_clamped_width = button->mWidthRange.clamp(button->getRect().getWidth());
+ S32 button_length = (orientation == LLLayoutStack::HORIZONTAL)
+ ? button_clamped_width
+ : button->getRect().getHeight();
+ S32 button_girth = (orientation == LLLayoutStack::HORIZONTAL)
+ ? button->getRect().getHeight()
+ : button_clamped_width;
+
+ // wrap if needed
+ if (mWrap
+ && row_running_length + button_length > max_length // out of room...
+ && cur_start != row_pad_start) // ...and not first button in row
+ {
+ if (orientation == LLLayoutStack::VERTICAL)
+ { // row girth (width in this case) is clamped to allowable button widths
+ max_row_girth = button->mWidthRange.clamp(max_row_girth);
+ }
+
+ // make buttons in current row all same girth
+ resizeButtonsInRow(buttons_in_row, max_row_girth);
+ buttons_in_row.clear();
+
+ max_row_length = llmax(max_row_length, row_running_length);
+ row_running_length = row_pad_start;
+ cur_start = row_pad_start;
+ cur_row += max_row_girth + mPadBetween;
+ max_row_girth = 0;
+ }
+
+ LLRect button_rect;
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ button_rect.setLeftTopAndSize(cur_start, panel_rect.mTop - cur_row, button_clamped_width, button->getRect().getHeight());
+ }
+ else // VERTICAL
+ {
+ button_rect.setLeftTopAndSize(cur_row, panel_rect.mTop - cur_start, button_clamped_width, button->getRect().getHeight());
+ }
+ button->setShape(button_rect);
+
+ buttons_in_row.push_back(button);
+
+ row_running_length += button_length + mPadBetween;
+ cur_start = row_running_length;
+ max_row_girth = llmax(button_girth, max_row_girth);
+ }
+
+ // final resizing in "girth" direction
+ S32 total_girth = cur_row // current row position...
+ + max_row_girth // ...incremented by size of final row...
+ + girth_pad_end; // ...plus padding reserved on end
+ total_girth = llmax(total_girth,mMinGirth);
+
+ max_row_length = llmax(max_row_length, row_running_length - mPadBetween + row_pad_end);
+
+ resizeButtonsInRow(buttons_in_row, max_row_girth);
+
+ // grow and optionally shift toolbar to accommodate buttons
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ if (mSideType == SIDE_TOP)
+ { // shift down to maintain top edge
+ translate(0, getRect().getHeight() - total_girth);
+ }
+
+ reshape(getRect().getWidth(), total_girth);
+ mButtonPanel->reshape(max_row_length, total_girth);
+ }
+ else // VERTICAL
+ {
+ if (mSideType == SIDE_RIGHT)
+ { // shift left to maintain right edge
+ translate(getRect().getWidth() - total_girth, 0);
+ }
+
+ reshape(total_girth, getRect().getHeight());
+ mButtonPanel->reshape(total_girth, max_row_length);
+ }
+
+ // make parent fit button panel
+ mButtonPanel->getParent()->setShape(mButtonPanel->getLocalRect());
+
+ // re-center toolbar buttons
+ mCenteringStack->updateLayout();
+
+ if (!mButtons.empty())
+ {
+ mButtonPanel->setVisible(TRUE);
+ mButtonPanel->setMouseOpaque(TRUE);
+ }
+
+ // don't clear flag until after we've resized ourselves, to avoid laying out every frame
+ mNeedsLayout = false;
+}
+
+
+void LLToolBar::draw()
+{
+ if (mButtons.empty())
+ {
+ mButtonPanel->setVisible(FALSE);
+ mButtonPanel->setMouseOpaque(FALSE);
+ }
+ else
+ {
+ mButtonPanel->setVisible(TRUE);
+ mButtonPanel->setMouseOpaque(TRUE);
+ }
+
+ // Update enable/disable state and highlight state for editable toolbars
+ if (!mReadOnly)
+ {
+ for (toolbar_button_list::iterator btn_it = mButtons.begin(); btn_it != mButtons.end(); ++btn_it)
+ {
+ LLToolBarButton* btn = *btn_it;
+ LLCommand* command = LLCommandManager::instance().getCommand(btn->mId);
+
+ if (command && btn->mIsEnabledSignal)
+ {
+ const bool button_command_enabled = (*btn->mIsEnabledSignal)(btn, command->isEnabledParameters());
+ btn->setEnabled(button_command_enabled);
+ }
+
+ if (command && btn->mIsRunningSignal)
+ {
+ const bool button_command_running = (*btn->mIsRunningSignal)(btn, command->isRunningParameters());
+ btn->setToggleState(button_command_running);
+ }
+ }
+ }
+
+ updateLayoutAsNeeded();
+ // rect may have shifted during layout
+ LLUI::popMatrix();
+ LLUI::pushMatrix();
+ LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom, 0.f);
+
+ // Position the caret
+ LLIconCtrl* caret = getChild<LLIconCtrl>("caret");
+ caret->setVisible(FALSE);
+ if (mDragAndDropTarget && !mButtonCommands.empty())
+ {
+ LLRect caret_rect = caret->getRect();
+ LLRect toolbar_rect = getRect();
+ if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL)
+ {
+ caret->setRect(LLRect(mDragx-caret_rect.getWidth()/2+1,
+ mDragy,
+ mDragx+caret_rect.getWidth()/2+1,
+ mDragy-mDragGirth));
+ }
+ else
+ {
+ caret->setRect(LLRect(mDragx,
+ mDragy+caret_rect.getHeight()/2,
+ mDragx+mDragGirth,
+ mDragy-caret_rect.getHeight()/2));
+ }
+ caret->setVisible(TRUE);
+ }
+
+ LLUICtrl::draw();
+ caret->setVisible(FALSE);
+ mDragAndDropTarget = false;
+}
+
+void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLUICtrl::reshape(width, height, called_from_parent);
+ mNeedsLayout = true;
+}
+
+void LLToolBar::createButtons()
+{
+ BOOST_FOREACH(LLToolBarButton* button, mButtons)
+ {
+ if (mButtonRemoveSignal)
+ {
+ (*mButtonRemoveSignal)(button);
+ }
+
+ delete button;
+ }
+ mButtons.clear();
+ mButtonMap.clear();
+ mRightMouseTargetButton = NULL;
+
+ BOOST_FOREACH(LLCommandId& command_id, mButtonCommands)
+ {
+ LLToolBarButton* button = createButton(command_id);
+ mButtons.push_back(button);
+ mButtonPanel->addChild(button);
+ mButtonMap.insert(std::make_pair(command_id.uuid(), button));
+
+ if (mButtonAddSignal)
+ {
+ (*mButtonAddSignal)(button);
+ }
+ }
+ mNeedsLayout = true;
+}
+
+void LLToolBarButton::callIfEnabled(LLUICtrl::commit_callback_t commit, LLUICtrl* ctrl, const LLSD& param )
+{
+ LLCommand* command = LLCommandManager::instance().getCommand(mId);
+
+ if (!mIsEnabledSignal || (*mIsEnabledSignal)(this, command->isEnabledParameters()))
+ {
+ commit(ctrl, param);
+ }
+}
+
+LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
+{
+ LLCommand* commandp = LLCommandManager::instance().getCommand(id);
+ if (!commandp) return NULL;
+
+ LLToolBarButton::Params button_p;
+ button_p.name = commandp->name();
+ button_p.label = LLTrans::getString(commandp->labelRef());
+ button_p.tool_tip = LLTrans::getString(commandp->tooltipRef());
+ button_p.image_overlay = LLUI::getUIImage(commandp->icon());
+ button_p.overwriteFrom(mButtonParams[mButtonType]);
+ LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p);
+
+ if (!mReadOnly)
+ {
+ enable_callback_t isEnabledCB;
+
+ const std::string& isEnabledFunction = commandp->isEnabledFunctionName();
+ if (isEnabledFunction.length() > 0)
+ {
+ LLUICtrl::EnableCallbackParam isEnabledParam;
+ isEnabledParam.function_name = isEnabledFunction;
+ isEnabledParam.parameter = commandp->isEnabledParameters();
+ isEnabledCB = initEnableCallback(isEnabledParam);
+
+ if (NULL == button->mIsEnabledSignal)
+ {
+ button->mIsEnabledSignal = new enable_signal_t();
+ }
+
+ button->mIsEnabledSignal->connect(isEnabledCB);
+ }
+
+ LLUICtrl::CommitCallbackParam executeParam;
+ executeParam.function_name = commandp->executeFunctionName();
+ executeParam.parameter = commandp->executeParameters();
+
+ // If we have a "stop" function then we map the command to mouse down / mouse up otherwise commit
+ const std::string& executeStopFunction = commandp->executeStopFunctionName();
+ if (executeStopFunction.length() > 0)
+ {
+ LLUICtrl::CommitCallbackParam executeStopParam;
+ executeStopParam.function_name = executeStopFunction;
+ executeStopParam.parameter = commandp->executeStopParameters();
+ LLUICtrl::commit_callback_t execute_func = initCommitCallback(executeParam);
+ LLUICtrl::commit_callback_t stop_func = initCommitCallback(executeStopParam);
+
+ button->setMouseDownCallback(boost::bind(&LLToolBarButton::callIfEnabled, button, execute_func, _1, _2));
+ button->setMouseUpCallback(boost::bind(&LLToolBarButton::callIfEnabled, button, stop_func, _1, _2));
+ }
+ else
+ {
+ button->setCommitCallback(executeParam);
+ }
+
+ // Set up "is running" query callback
+ const std::string& isRunningFunction = commandp->isRunningFunctionName();
+ if (isRunningFunction.length() > 0)
+ {
+ LLUICtrl::EnableCallbackParam isRunningParam;
+ isRunningParam.function_name = isRunningFunction;
+ isRunningParam.parameter = commandp->isRunningParameters();
+ enable_signal_t::slot_type isRunningCB = initEnableCallback(isRunningParam);
+
+ if (NULL == button->mIsRunningSignal)
+ {
+ button->mIsRunningSignal = new enable_signal_t();
+ }
+
+ button->mIsRunningSignal->connect(isRunningCB);
+ }
+ }
+
+ // Drag and drop behavior must work also if provided in the Toybox and, potentially, any read-only toolbar
+ button->setStartDragCallback(mStartDragItemCallback);
+ button->setHandleDragCallback(mHandleDragItemCallback);
+
+ button->setCommandId(id);
+
+ return button;
+}
+
+boost::signals2::connection connectSignal(LLToolBar::button_signal_t*& signal, const LLToolBar::button_signal_t::slot_type& cb)
+{
+ if (!signal)
+ {
+ signal = new LLToolBar::button_signal_t();
+ }
+
+ return signal->connect(cb);
+}
+
+boost::signals2::connection LLToolBar::setButtonAddCallback(const button_signal_t::slot_type& cb)
+{
+ return connectSignal(mButtonAddSignal, cb);
+}
+
+boost::signals2::connection LLToolBar::setButtonEnterCallback(const button_signal_t::slot_type& cb)
+{
+ return connectSignal(mButtonEnterSignal, cb);
+}
+
+boost::signals2::connection LLToolBar::setButtonLeaveCallback(const button_signal_t::slot_type& cb)
+{
+ return connectSignal(mButtonLeaveSignal, cb);
+}
+
+boost::signals2::connection LLToolBar::setButtonRemoveCallback(const button_signal_t::slot_type& cb)
+{
+ return connectSignal(mButtonRemoveSignal, cb);
+}
+
+BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ // If we have a drop callback, that means that we can handle the drop
+ BOOL handled = (mHandleDropCallback ? TRUE : FALSE);
+
+ // if drop is set, it's time to call the callback to get the operation done
+ if (handled && drop)
+ {
+ handled = mHandleDropCallback(cargo_data, x, y ,this);
+ }
+
+ // We accept only single tool drop on toolbars
+ *accept = (handled ? ACCEPT_YES_SINGLE : ACCEPT_NO);
+
+ // We'll use that flag to change the visual aspect of the toolbar target on draw()
+ mDragAndDropTarget = false;
+
+ // Convert drag position into insert position and rank
+ if (!isReadOnly() && handled && !drop)
+ {
+ LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
+ LLAssetType::EType type = inv_item->getType();
+ if (type == LLAssetType::AT_WIDGET)
+ {
+ LLCommandId dragged_command(inv_item->getUUID());
+ int orig_rank = getRankFromPosition(dragged_command);
+ mDragRank = getRankFromPosition(x, y);
+ // Don't DaD if we're dragging a command on itself
+ mDragAndDropTarget = ((orig_rank != RANK_NONE) && ((mDragRank == orig_rank) || ((mDragRank-1) == orig_rank)) ? false : true);
+ //llinfos << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << llendl;
+ /* Do the following if you want to animate the button itself
+ LLCommandId dragged_command(inv_item->getUUID());
+ removeCommand(dragged_command);
+ addCommand(dragged_command,rank);
+ */
+ }
+ else
+ {
+ handled = FALSE;
+ }
+ }
+
+ return handled;
+}
+
+LLToolBarButton::LLToolBarButton(const Params& p)
+: LLButton(p),
+ mMouseDownX(0),
+ mMouseDownY(0),
+ mWidthRange(p.button_width),
+ mDesiredHeight(p.desired_height),
+ mId(""),
+ mIsEnabledSignal(NULL),
+ mIsRunningSignal(NULL),
+ mIsStartingSignal(NULL),
+ mIsDragged(false),
+ mStartDragItemCallback(NULL),
+ mHandleDragItemCallback(NULL),
+ mOriginalImageSelected(p.image_selected),
+ mOriginalImageUnselected(p.image_unselected),
+ mOriginalImagePressed(p.image_pressed),
+ mOriginalImagePressedSelected(p.image_pressed_selected),
+ mOriginalLabelColor(p.label_color),
+ mOriginalLabelColorSelected(p.label_color_selected),
+ mOriginalImageOverlayColor(p.image_overlay_color),
+ mOriginalImageOverlaySelectedColor(p.image_overlay_selected_color)
+{
+}
+
+LLToolBarButton::~LLToolBarButton()
+{
+ delete mIsEnabledSignal;
+ delete mIsRunningSignal;
+ delete mIsStartingSignal;
+}
+
+BOOL LLToolBarButton::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+ mMouseDownX = x;
+ mMouseDownY = y;
+ return LLButton::handleMouseDown(x, y, mask);
+}
+
+BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = FALSE;
+
+ S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
+ S32 drag_threshold = LLUI::sSettingGroups["config"]->getS32("DragAndDropDistanceThreshold");
+ if (mouse_distance_squared > drag_threshold * drag_threshold
+ && hasMouseCapture() &&
+ mStartDragItemCallback && mHandleDragItemCallback)
+ {
+ if (!mIsDragged)
+ {
+ mStartDragItemCallback(x, y, this);
+ mIsDragged = true;
+ handled = TRUE;
+ }
+ else
+ {
+ handled = mHandleDragItemCallback(x, y, mId.uuid(), LLAssetType::AT_WIDGET);
+ }
+ }
+ else
+ {
+ handled = LLButton::handleHover(x, y, mask);
+ }
+
+ return handled;
+}
+
+void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+ LLUICtrl::onMouseEnter(x, y, mask);
+
+ // Always highlight toolbar buttons, even if they are disabled
+ if (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this)
+ {
+ mNeedsHighlight = TRUE;
+ }
+
+ LLToolBar* parent_toolbar = getParentByType<LLToolBar>();
+ if (parent_toolbar && parent_toolbar->mButtonEnterSignal)
+ {
+ (*(parent_toolbar->mButtonEnterSignal))(this);
+ }
+}
+
+void LLToolBarButton::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ LLButton::onMouseLeave(x, y, mask);
+
+ LLToolBar* parent_toolbar = getParentByType<LLToolBar>();
+ if (parent_toolbar && parent_toolbar->mButtonLeaveSignal)
+ {
+ (*(parent_toolbar->mButtonLeaveSignal))(this);
+ }
+}
+
+void LLToolBarButton::onMouseCaptureLost()
+{
+ mIsDragged = false;
+}
+
+void LLToolBarButton::onCommit()
+{
+ LLCommand* command = LLCommandManager::instance().getCommand(mId);
+
+ if (!mIsEnabledSignal || (*mIsEnabledSignal)(this, command->isEnabledParameters()))
+ {
+ LLButton::onCommit();
+ }
+}
+
+void LLToolBarButton::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLButton::reshape(mWidthRange.clamp(width), height, called_from_parent);
+}
+
+void LLToolBarButton::setEnabled(BOOL enabled)
+{
+ if (enabled)
+ {
+ mImageSelected = mOriginalImageSelected;
+ mImageUnselected = mOriginalImageUnselected;
+ mImagePressed = mOriginalImagePressed;
+ mImagePressedSelected = mOriginalImagePressedSelected;
+ mUnselectedLabelColor = mOriginalLabelColor;
+ mSelectedLabelColor = mOriginalLabelColorSelected;
+ mImageOverlayColor = mOriginalImageOverlayColor;
+ mImageOverlaySelectedColor = mOriginalImageOverlaySelectedColor;
+ }
+ else
+ {
+ mImageSelected = mImageDisabledSelected;
+ mImageUnselected = mImageDisabled;
+ mImagePressed = mImageDisabled;
+ mImagePressedSelected = mImageDisabledSelected;
+ mUnselectedLabelColor = mDisabledLabelColor;
+ mSelectedLabelColor = mDisabledSelectedLabelColor;
+ mImageOverlayColor = mImageOverlayDisabledColor;
+ mImageOverlaySelectedColor = mImageOverlayDisabledColor;
+ }
+}
+
+const std::string LLToolBarButton::getToolTip() const
+{
+ std::string tooltip;
+
+ if (labelIsTruncated() || getCurrentLabel().empty())
+ {
+ tooltip = LLTrans::getString(LLCommandManager::instance().getCommand(mId)->labelRef()) + " -- " + LLView::getToolTip();
+ }
+ else
+ {
+ tooltip = LLView::getToolTip();
+ }
+
+ LLToolBar* parent_toolbar = getParentByType<LLToolBar>();
+ if (parent_toolbar && parent_toolbar->mButtonTooltipSuffix.length() > 0)
+ {
+ tooltip = tooltip + "\n(" + parent_toolbar->mButtonTooltipSuffix + ")";
+ }
+
+ return tooltip;
+}
+
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
new file mode 100644
index 0000000000..51fe23ddd1
--- /dev/null
+++ b/indra/llui/lltoolbar.h
@@ -0,0 +1,289 @@
+/**
+ * @file lltoolbar.h
+ * @author Richard Nelson
+ * @brief User customizable toolbar class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLTOOLBAR_H
+#define LL_LLTOOLBAR_H
+
+#include "llbutton.h"
+#include "llcommandmanager.h"
+#include "lllayoutstack.h"
+#include "lluictrl.h"
+#include "llcommandmanager.h"
+#include "llassettype.h"
+
+class LLToolBar;
+class LLToolBarButton;
+
+typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t;
+typedef boost::function<BOOL (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t;
+typedef boost::function<BOOL (void* data, S32 x, S32 y, LLToolBar* toolbar)> tool_handledrop_callback_t;
+
+class LLToolBarButton : public LLButton
+{
+ friend class LLToolBar;
+public:
+ struct Params : public LLInitParam::Block<Params, LLButton::Params>
+ {
+ Optional<LLUI::RangeS32::Params> button_width;
+ Optional<S32> desired_height;
+
+ Params()
+ : button_width("button_width"),
+ desired_height("desired_height", 20)
+ {}
+
+ };
+
+ LLToolBarButton(const Params& p);
+ ~LLToolBarButton();
+
+ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ BOOL handleHover(S32 x, S32 y, MASK mask);
+
+ void reshape(S32 width, S32 height, BOOL called_from_parent = true);
+ void setEnabled(BOOL enabled);
+ void setCommandId(const LLCommandId& id) { mId = id; }
+ LLCommandId getCommandId() { return mId; }
+
+ void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; }
+ void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
+
+ void onMouseEnter(S32 x, S32 y, MASK mask);
+ void onMouseLeave(S32 x, S32 y, MASK mask);
+ void onMouseCaptureLost();
+
+ void onCommit();
+
+ virtual const std::string getToolTip() const;
+
+private:
+ void callIfEnabled(LLUICtrl::commit_callback_t commit, LLUICtrl* ctrl, const LLSD& param );
+
+ LLCommandId mId;
+ S32 mMouseDownX;
+ S32 mMouseDownY;
+ LLUI::RangeS32 mWidthRange;
+ S32 mDesiredHeight;
+ bool mIsDragged;
+ tool_startdrag_callback_t mStartDragItemCallback;
+ tool_handledrag_callback_t mHandleDragItemCallback;
+
+ enable_signal_t* mIsEnabledSignal;
+ enable_signal_t* mIsRunningSignal;
+ enable_signal_t* mIsStartingSignal;
+ LLPointer<LLUIImage> mOriginalImageSelected,
+ mOriginalImageUnselected,
+ mOriginalImagePressed,
+ mOriginalImagePressedSelected;
+ LLUIColor mOriginalLabelColor,
+ mOriginalLabelColorSelected,
+ mOriginalImageOverlayColor,
+ mOriginalImageOverlaySelectedColor;
+};
+
+
+namespace LLToolBarEnums
+{
+ enum ButtonType
+ {
+ BTNTYPE_ICONS_WITH_TEXT = 0,
+ BTNTYPE_ICONS_ONLY,
+
+ BTNTYPE_COUNT
+ };
+
+ enum SideType
+ {
+ SIDE_BOTTOM,
+ SIDE_LEFT,
+ SIDE_RIGHT,
+ SIDE_TOP,
+ };
+
+ LLLayoutStack::ELayoutOrientation getOrientation(SideType sideType);
+}
+
+// NOTE: This needs to occur before Param block declaration for proper compilation.
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<LLToolBarEnums::ButtonType> : public TypeValuesHelper<LLToolBarEnums::ButtonType>
+ {
+ static void declareValues();
+ };
+
+ template<>
+ struct TypeValues<LLToolBarEnums::SideType> : public TypeValuesHelper<LLToolBarEnums::SideType>
+ {
+ static void declareValues();
+ };
+}
+
+
+class LLToolBar
+: public LLUICtrl
+{
+ friend class LLToolBarButton;
+public:
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Mandatory<LLToolBarEnums::ButtonType> button_display_mode;
+ Mandatory<LLToolBarEnums::SideType> side;
+
+ Optional<LLToolBarButton::Params> button_icon,
+ button_icon_and_text;
+
+ Optional<bool> read_only,
+ wrap;
+
+ Optional<S32> pad_left,
+ pad_top,
+ pad_right,
+ pad_bottom,
+ pad_between,
+ min_girth;
+
+ // default command set
+ Multiple<LLCommandId::Params> commands;
+
+ Optional<LLPanel::Params> button_panel;
+
+ Params();
+ };
+
+ // virtuals
+ void draw();
+ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+
+ static const int RANK_NONE = -1;
+ bool addCommand(const LLCommandId& commandId, int rank = RANK_NONE);
+ int removeCommand(const LLCommandId& commandId); // Returns the rank the removed command was at, RANK_NONE if not found
+ bool hasCommand(const LLCommandId& commandId) const; // is this command bound to a button in this toolbar
+ bool enableCommand(const LLCommandId& commandId, bool enabled); // enable/disable button bound to the specified command, if it exists in this toolbar
+ bool stopCommandInProgress(const LLCommandId& commandId); // stop command if it is currently active
+ bool flashCommand(const LLCommandId& commandId, bool flash); // flash button associated with given command, if in this toolbar
+
+ void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; } // connects drag and drop behavior to external logic
+ void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
+ void setHandleDropCallback(tool_handledrop_callback_t cb) { mHandleDropCallback = cb; }
+ bool isReadOnly() const { return mReadOnly; }
+
+ LLToolBarButton* createButton(const LLCommandId& id);
+
+ typedef boost::signals2::signal<void (LLView* button)> button_signal_t;
+ boost::signals2::connection setButtonAddCallback(const button_signal_t::slot_type& cb);
+ boost::signals2::connection setButtonEnterCallback(const button_signal_t::slot_type& cb);
+ boost::signals2::connection setButtonLeaveCallback(const button_signal_t::slot_type& cb);
+ boost::signals2::connection setButtonRemoveCallback(const button_signal_t::slot_type& cb);
+
+ // append the specified string to end of tooltip
+ void setTooltipButtonSuffix(const std::string& suffix) { mButtonTooltipSuffix = suffix; }
+
+ LLToolBarEnums::SideType getSideType() const { return mSideType; }
+ bool hasButtons() const { return !mButtons.empty(); }
+ bool isModified() const { return mModified; }
+
+ int getRankFromPosition(S32 x, S32 y);
+ int getRankFromPosition(const LLCommandId& id);
+
+ // Methods used in loading and saving toolbar settings
+ void setButtonType(LLToolBarEnums::ButtonType button_type);
+ LLToolBarEnums::ButtonType getButtonType() { return mButtonType; }
+ command_id_list_t& getCommandsList() { return mButtonCommands; }
+ void clearCommandsList();
+
+private:
+ friend class LLUICtrlFactory;
+ LLToolBar(const Params&);
+ ~LLToolBar();
+
+ void initFromParams(const Params&);
+ void createContextMenu();
+ void updateLayoutAsNeeded();
+ void createButtons();
+ void resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth);
+ BOOL isSettingChecked(const LLSD& userdata);
+ void onSettingEnable(const LLSD& userdata);
+ void onRemoveSelectedCommand();
+
+private:
+ // static layout state
+ const bool mReadOnly;
+ const LLToolBarEnums::SideType mSideType;
+ const bool mWrap;
+ const S32 mPadLeft,
+ mPadRight,
+ mPadTop,
+ mPadBottom,
+ mPadBetween,
+ mMinGirth;
+
+ // drag and drop state
+ tool_startdrag_callback_t mStartDragItemCallback;
+ tool_handledrag_callback_t mHandleDragItemCallback;
+ tool_handledrop_callback_t mHandleDropCallback;
+ bool mDragAndDropTarget;
+ int mDragRank;
+ S32 mDragx,
+ mDragy,
+ mDragGirth;
+
+ typedef std::list<LLToolBarButton*> toolbar_button_list;
+ typedef std::map<LLUUID, LLToolBarButton*> command_id_map;
+ toolbar_button_list mButtons;
+ command_id_list_t mButtonCommands;
+ command_id_map mButtonMap;
+
+ LLToolBarEnums::ButtonType mButtonType;
+ LLToolBarButton::Params mButtonParams[LLToolBarEnums::BTNTYPE_COUNT];
+
+ // related widgets
+ LLLayoutStack* mCenteringStack;
+ LLPanel* mButtonPanel;
+ LLHandle<class LLContextMenu> mPopupMenuHandle;
+
+ LLToolBarButton* mRightMouseTargetButton;
+
+ bool mNeedsLayout;
+ bool mModified;
+
+ button_signal_t* mButtonAddSignal;
+ button_signal_t* mButtonEnterSignal;
+ button_signal_t* mButtonLeaveSignal;
+ button_signal_t* mButtonRemoveSignal;
+
+ std::string mButtonTooltipSuffix;
+};
+
+
+#endif // LL_LLTOOLBAR_H
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index 6390039794..23cdd9ad9a 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -55,7 +55,7 @@ static LLDefaultChildRegistry::Register<LLToolTipView> register_tooltip_view("to
LLToolTipView::Params::Params()
{
- mouse_opaque = false;
+ changeDefault(mouse_opaque, false);
}
LLToolTipView::LLToolTipView(const LLToolTipView::Params& p)
@@ -156,7 +156,7 @@ LLToolTip::Params::Params()
web_based_media("web_based_media", false),
media_playing("media_playing", false)
{
- chrome = true;
+ changeDefault(chrome, true);
}
LLToolTip::LLToolTip(const LLToolTip::Params& p)
@@ -200,7 +200,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
icon_params.image_selected(imagep);
icon_params.scale_image(true);
- icon_params.flash_color(icon_params.highlight_color());
+ icon_params.flash_color.control = "ButtonUnselectedFgColor";
mInfoButton = LLUICtrlFactory::create<LLButton>(icon_params);
if (p.click_callback.isProvided())
{
@@ -402,12 +402,12 @@ void LLToolTipMgr::createToolTip(const LLToolTip::Params& params)
LLToolTip::Params tooltip_params(params);
// block mouse events if there is a click handler registered (specifically, hover)
- if (params.click_callback.isProvided())
+ if (params.click_callback.isProvided() && !params.mouse_opaque.isProvided())
{
// set mouse_opaque to true if it wasn't already set to something else
// this prevents mouse down from going "through" the tooltip and ultimately
// causing the tooltip to disappear
- tooltip_params.mouse_opaque.setIfNotProvided(true);
+ tooltip_params.mouse_opaque = true;
}
tooltip_params.rect = LLRect (0, 1, 1, 0);
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 8020ca802b..33bc247987 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -41,6 +41,7 @@
#include "llgl.h"
// Project includes
+#include "llcommandmanager.h"
#include "llcontrol.h"
#include "llui.h"
#include "lluicolortable.h"
@@ -57,6 +58,7 @@
#include "llfiltereditor.h"
#include "llflyoutbutton.h"
#include "llsearcheditor.h"
+#include "lltoolbar.h"
// for XUIParse
#include "llquaternion.h"
@@ -87,14 +89,14 @@ std::list<std::string> gUntranslated;
/*static*/ LLUI::remove_popup_t LLUI::sRemovePopupFunc;
/*static*/ LLUI::clear_popups_t LLUI::sClearPopupsFunc;
-// register filtereditor here
+// register filter editor here
static LLDefaultChildRegistry::Register<LLFilterEditor> register_filter_editor("filter_editor");
static LLDefaultChildRegistry::Register<LLFlyoutButton> register_flyout_button("flyout_button");
static LLDefaultChildRegistry::Register<LLSearchEditor> register_search_editor("search_editor");
// register other widgets which otherwise may not be linked in
static LLDefaultChildRegistry::Register<LLLoadingIndicator> register_loading_indicator("loading_indicator");
-
+static LLDefaultChildRegistry::Register<LLToolBar> register_toolbar("toolbar");
//
// Functions
@@ -104,7 +106,7 @@ void make_ui_sound(const char* namep)
std::string name = ll_safe_string(namep);
if (!LLUI::sSettingGroups["config"]->controlExists(name))
{
- llwarns << "tried to make ui sound for unknown sound name: " << name << llendl;
+ llwarns << "tried to make UI sound for unknown sound name: " << name << llendl;
}
else
{
@@ -115,12 +117,12 @@ void make_ui_sound(const char* namep)
{
if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle"))
{
- llinfos << "ui sound name: " << name << " triggered but silent (null uuid)" << llendl;
+ llinfos << "UI sound name: " << name << " triggered but silent (null uuid)" << llendl;
}
}
else
{
- llwarns << "ui sound named: " << name << " does not translate to a valid uuid" << llendl;
+ llwarns << "UI sound named: " << name << " does not translate to a valid uuid" << llendl;
}
}
@@ -128,7 +130,7 @@ void make_ui_sound(const char* namep)
{
if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle"))
{
- llinfos << "ui sound name: " << name << llendl;
+ llinfos << "UI sound name: " << name << llendl;
}
LLUI::sAudioCallback(uuid);
}
@@ -151,11 +153,11 @@ void gl_state_for_2d(S32 width, S32 height)
F32 window_width = (F32) width;//gViewerWindow->getWindowWidth();
F32 window_height = (F32) height;//gViewerWindow->getWindowHeight();
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0.0f, llmax(window_width, 1.f), 0.0f, llmax(window_height,1.f), -1.0f, 1.0f);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.loadIdentity();
+ gGL.ortho(0.0f, llmax(window_width, 1.f), 0.0f, llmax(window_height,1.f), -1.0f, 1.0f);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.loadIdentity();
stop_glerror();
}
@@ -472,7 +474,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
return;
}
- // add in offset of current image to current ui translation
+ // add in offset of current image to current UI translation
const LLVector3 ui_scale = gGL.getUIScale();
const LLVector3 ui_translation = (gGL.getUITranslation() + LLVector3(x, y, 0.f)).scaledVec(ui_scale);
@@ -524,11 +526,18 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
if (solid_color)
{
- 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);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gSolidColorProgram.bind();
+ }
+ else
+ {
+ 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.getTexUnit(0)->bind(image);
+ gGL.getTexUnit(0)->bind(image, true);
gGL.color4fv(color.mV);
@@ -699,7 +708,14 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
if (solid_color)
{
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+ else
+ {
+ gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ }
}
}
@@ -719,7 +735,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->bind(image);
+ gGL.getTexUnit(0)->bind(image, true);
gGL.color4fv(color.mV);
@@ -772,7 +788,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
LLMatrix3 quat(0.f, 0.f, degrees*DEG_TO_RAD);
- gGL.getTexUnit(0)->bind(image);
+ gGL.getTexUnit(0)->bind(image, true);
gGL.color4fv(color.mV);
@@ -939,10 +955,12 @@ void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor
if( render_center )
{
gGL.color4fv(center_color.mV);
+ gGL.diffuseColor4fv(center_color.mV);
gl_deep_circle( radius, width, steps );
}
else
{
+ gGL.diffuseColor4fv(side_color.mV);
gl_washer_2d(radius, radius - width, steps, side_color, side_color);
gGL.translateUI(0.f, 0.f, width);
gl_washer_2d(radius - width, radius, steps, side_color, side_color);
@@ -979,10 +997,18 @@ void gl_rect_2d_checkerboard(const LLRect& rect, GLfloat alpha)
// ...gray squares
gGL.color4f( .7f, .7f, .7f, alpha );
gGL.flush();
- glPolygonStipple( checkerboard );
- LLGLEnable polygon_stipple(GL_POLYGON_STIPPLE);
- gl_rect_2d(rect);
+ if (!LLGLSLShader::sNoFixedFunction)
+ { //polygon stipple is deprecated
+ glPolygonStipple( checkerboard );
+
+ LLGLEnable polygon_stipple(GL_POLYGON_STIPPLE);
+ gl_rect_2d(rect);
+ }
+ else
+ {
+ gl_rect_2d(rect);
+ }
gGL.flush();
}
@@ -1600,16 +1626,16 @@ void LLUI::initClass(const settings_map_t& settings,
LLUICtrl::CommitCallbackRegistry::Registrar& reg = LLUICtrl::CommitCallbackRegistry::defaultRegistrar();
- // Callbacks for associating controls with floater visibilty:
- reg.add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleFloaterInstance, _2));
- reg.add("Floater.Show", boost::bind(&LLFloaterReg::showFloaterInstance, _2));
- reg.add("Floater.Hide", boost::bind(&LLFloaterReg::hideFloaterInstance, _2));
- reg.add("Floater.InitToVisibilityControl", boost::bind(&LLFloaterReg::initUICtrlToFloaterVisibilityControl, _1, _2));
+ // Callbacks for associating controls with floater visibility:
+ reg.add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleInstance, _2, LLSD()));
+ reg.add("Floater.ToggleOrBringToFront", boost::bind(&LLFloaterReg::toggleInstanceOrBringToFront, _2, LLSD()));
+ reg.add("Floater.Show", boost::bind(&LLFloaterReg::showInstance, _2, LLSD(), FALSE));
+ reg.add("Floater.Hide", boost::bind(&LLFloaterReg::hideInstance, _2, LLSD()));
// Button initialization callback for toggle buttons
reg.add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2));
- // Button initialization callback for toggle buttons on dockale floaters
+ // Button initialization callback for toggle buttons on dockable floaters
reg.add("Button.SetDockableFloaterToggle", boost::bind(&LLButton::setDockableFloaterToggle, _1, _2));
// Display the help topic for the current context
@@ -1618,8 +1644,12 @@ void LLUI::initClass(const settings_map_t& settings,
// Currently unused, but kept for reference:
reg.add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2));
- // Used by menus along with Floater.Toggle to display visibility as a checkmark
- LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::floaterInstanceVisible, _2));
+ // Used by menus along with Floater.Toggle to display visibility as a check-mark
+ LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD()));
+ LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.IsOpen", boost::bind(&LLFloaterReg::instanceVisible, _2, LLSD()));
+
+ // Parse the master list of commands
+ LLCommandManager::load();
}
void LLUI::cleanupClass()
@@ -2013,12 +2043,12 @@ void LLUI::positionViewNearMouse(LLView* view, S32 spawn_x, S32 spawn_y)
CURSOR_HEIGHT + MOUSE_CURSOR_PADDING * 2);
S32 local_x, local_y;
- // convert screen coordinates to tooltipview-local coordinates
+ // convert screen coordinates to tooltip view-local coordinates
parent->screenPointToLocal(spawn_x, spawn_y, &local_x, &local_y);
// Start at spawn position (using left/top)
view->setOrigin( local_x, local_y - view->getRect().getHeight());
- // Make sure we're onscreen and not overlapping the mouse
+ // Make sure we're on-screen and not overlapping the mouse
view->translateIntoRectWithExclusion( virtual_window_rect, mouse_rect, FALSE );
}
@@ -2082,12 +2112,12 @@ namespace LLInitParam
alpha("alpha"),
control("")
{
- updateBlockFromValue();
+ updateBlockFromValue(false);
}
void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateValueFromBlock()
{
- if (control.isProvided())
+ if (control.isProvided() && !control().empty())
{
updateValue(LLUIColorTable::instance().getColor(control));
}
@@ -2097,14 +2127,14 @@ namespace LLInitParam
}
}
- void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue()
+ void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue(bool make_block_authoritative)
{
LLColor4 color = getValue();
- red.set(color.mV[VRED], false);
- green.set(color.mV[VGREEN], false);
- blue.set(color.mV[VBLUE], false);
- alpha.set(color.mV[VALPHA], false);
- control.set("", false);
+ red.set(color.mV[VRED], make_block_authoritative);
+ green.set(color.mV[VGREEN], make_block_authoritative);
+ blue.set(color.mV[VBLUE], make_block_authoritative);
+ alpha.set(color.mV[VALPHA], make_block_authoritative);
+ control.set("", make_block_authoritative);
}
bool ParamCompare<const LLFontGL*, false>::equals(const LLFontGL* a, const LLFontGL* b)
@@ -2124,7 +2154,7 @@ namespace LLInitParam
updateValue(LLFontGL::getFontDefault());
}
addSynonym(name, "");
- updateBlockFromValue();
+ updateBlockFromValue(false);
}
void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateValueFromBlock()
@@ -2150,13 +2180,13 @@ namespace LLInitParam
}
}
- void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue()
+ void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue(bool make_block_authoritative)
{
if (getValue())
{
- name.set(LLFontGL::nameFromFont(getValue()), false);
- size.set(LLFontGL::sizeFromFont(getValue()), false);
- style.set(LLFontGL::getStringFromStyle(getValue()->getFontDesc().getStyle()), false);
+ name.set(LLFontGL::nameFromFont(getValue()), make_block_authoritative);
+ size.set(LLFontGL::sizeFromFont(getValue()), make_block_authoritative);
+ style.set(LLFontGL::getStringFromStyle(getValue()->getFontDesc().getStyle()), make_block_authoritative);
}
}
@@ -2169,7 +2199,7 @@ namespace LLInitParam
width("width"),
height("height")
{
- updateBlockFromValue();
+ updateBlockFromValue(false);
}
void ParamValue<LLRect, TypeValues<LLRect> >::updateValueFromBlock()
@@ -2236,19 +2266,21 @@ namespace LLInitParam
updateValue(rect);
}
- void ParamValue<LLRect, TypeValues<LLRect> >::updateBlockFromValue()
+ void ParamValue<LLRect, TypeValues<LLRect> >::updateBlockFromValue(bool make_block_authoritative)
{
// because of the ambiguity in specifying a rect by position and/or dimensions
- // we clear the "provided" flag so that values from xui/etc have priority
- // over those calculated from the rect object
-
+ // we use the lowest priority pairing so that any valid pairing in xui
+ // will override those calculated from the rect object
+ // in this case, that is left+width and bottom+height
LLRect& value = getValue();
- left.set(value.mLeft, false);
+
right.set(value.mRight, false);
- bottom.set(value.mBottom, false);
+ left.set(value.mLeft, make_block_authoritative);
+ width.set(value.getWidth(), make_block_authoritative);
+
top.set(value.mTop, false);
- width.set(value.getWidth(), false);
- height.set(value.getHeight(), false);
+ bottom.set(value.mBottom, make_block_authoritative);
+ height.set(value.getHeight(), make_block_authoritative);
}
ParamValue<LLCoordGL, TypeValues<LLCoordGL> >::ParamValue(const LLCoordGL& coord)
@@ -2256,7 +2288,7 @@ namespace LLInitParam
x("x"),
y("y")
{
- updateBlockFromValue();
+ updateBlockFromValue(false);
}
void ParamValue<LLCoordGL, TypeValues<LLCoordGL> >::updateValueFromBlock()
@@ -2264,10 +2296,10 @@ namespace LLInitParam
updateValue(LLCoordGL(x, y));
}
- void ParamValue<LLCoordGL, TypeValues<LLCoordGL> >::updateBlockFromValue()
+ void ParamValue<LLCoordGL, TypeValues<LLCoordGL> >::updateBlockFromValue(bool make_block_authoritative)
{
- x.set(getValue().mX, false);
- y.set(getValue().mY, false);
+ x.set(getValue().mX, make_block_authoritative);
+ y.set(getValue().mY, make_block_authoritative);
}
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index c583d58d5a..28e84fa444 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -33,6 +33,7 @@
#include "llrect.h"
#include "llcontrol.h"
#include "llcoord.h"
+#include "llglslshader.h"
#include "llinitparam.h"
#include "llregistry.h"
#include "lluicolor.h"
@@ -40,6 +41,7 @@
#include <boost/signals2.hpp>
#include "lllazyvalue.h"
#include "llframetimer.h"
+#include <limits>
// LLUIFactory
#include "llsd.h"
@@ -47,6 +49,7 @@
// for initparam specialization
#include "llfontgl.h"
+
class LLColor4;
class LLVector3;
class LLVector2;
@@ -146,6 +149,122 @@ class LLUI
LOG_CLASS(LLUI);
public:
//
+ // Classes
+ //
+
+ struct RangeS32
+ {
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Optional<S32> minimum,
+ maximum;
+
+ Params()
+ : minimum("min", 0),
+ maximum("max", S32_MAX)
+ {}
+ };
+
+ // correct for inverted params
+ RangeS32(const Params& p = Params())
+ : mMin(p.minimum),
+ mMax(p.maximum)
+ {
+ sanitizeRange();
+ }
+
+ RangeS32(S32 minimum, S32 maximum)
+ : mMin(minimum),
+ mMax(maximum)
+ {
+ sanitizeRange();
+ }
+
+ S32 clamp(S32 input)
+ {
+ if (input < mMin) return mMin;
+ if (input > mMax) return mMax;
+ return input;
+ }
+
+ void setRange(S32 minimum, S32 maximum)
+ {
+ mMin = minimum;
+ mMax = maximum;
+ sanitizeRange();
+ }
+
+ S32 getMin() { return mMin; }
+ S32 getMax() { return mMax; }
+
+ bool operator==(const RangeS32& other) const
+ {
+ return mMin == other.mMin
+ && mMax == other.mMax;
+ }
+ private:
+ void sanitizeRange()
+ {
+ if (mMin > mMax)
+ {
+ llwarns << "Bad interval range (" << mMin << ", " << mMax << ")" << llendl;
+ // since max is usually the most dangerous one to ignore (buffer overflow, etc), prefer it
+ // in the case of a malformed range
+ mMin = mMax;
+ }
+ }
+
+
+ S32 mMin,
+ mMax;
+ };
+
+ struct ClampedS32 : public RangeS32
+ {
+ struct Params : public LLInitParam::Block<Params, RangeS32::Params>
+ {
+ Mandatory<S32> value;
+
+ Params()
+ : value("", 0)
+ {
+ addSynonym(value, "value");
+ }
+ };
+
+ ClampedS32(const Params& p)
+ : RangeS32(p)
+ {}
+
+ ClampedS32(const RangeS32& range)
+ : RangeS32(range)
+ {
+ // set value here, after range has been sanitized
+ mValue = clamp(0);
+ }
+
+ ClampedS32(S32 value, const RangeS32& range = RangeS32())
+ : RangeS32(range)
+ {
+ mValue = clamp(value);
+ }
+
+ S32 get()
+ {
+ return mValue;
+ }
+
+ void set(S32 value)
+ {
+ mValue = clamp(value);
+ }
+
+
+ private:
+ S32 mValue;
+ };
+
+ //
// Methods
//
typedef std::map<std::string, LLControlGroup*> settings_map_t;
@@ -363,7 +482,7 @@ template <typename T> LLRegisterWith<LLInitClassList> LLInitClass<T>::sRegister(
template <typename T> LLRegisterWith<LLDestroyClassList> LLDestroyClass<T>::sRegister(&T::destroyClass);
// useful parameter blocks
-struct TimeIntervalParam : public LLInitParam::Choice<TimeIntervalParam>
+struct TimeIntervalParam : public LLInitParam::ChoiceBlock<TimeIntervalParam>
{
Alternative<F32> seconds;
Alternative<S32> frames;
@@ -408,7 +527,7 @@ namespace LLInitParam
ParamValue(const LLRect& value);
void updateValueFromBlock();
- void updateBlockFromValue();
+ void updateBlockFromValue(bool make_block_authoritative);
};
template<>
@@ -426,7 +545,7 @@ namespace LLInitParam
ParamValue(const LLUIColor& color);
void updateValueFromBlock();
- void updateBlockFromValue();
+ void updateBlockFromValue(bool make_block_authoritative);
};
template<>
@@ -441,7 +560,7 @@ namespace LLInitParam
ParamValue(const LLFontGL* value);
void updateValueFromBlock();
- void updateBlockFromValue();
+ void updateBlockFromValue(bool make_block_authoritative);
};
template<>
@@ -480,8 +599,11 @@ namespace LLInitParam
ParamValue(const LLCoordGL& val);
void updateValueFromBlock();
- void updateBlockFromValue();
+ void updateBlockFromValue(bool make_block_authoritative);
};
}
+extern LLGLSLShader gSolidColorProgram;
+extern LLGLSLShader gUIProgram;
+
#endif
diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h
index 76518789ec..6a7a681d57 100644
--- a/indra/llui/lluicolortable.h
+++ b/indra/llui/lluicolortable.h
@@ -44,7 +44,7 @@ LOG_CLASS(LLUIColorTable);
typedef std::map<std::string, LLUIColor> string_color_map_t;
public:
- struct ColorParams : LLInitParam::Choice<ColorParams>
+ struct ColorParams : LLInitParam::ChoiceBlock<ColorParams>
{
Alternative<LLColor4> value;
Alternative<std::string> reference;
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index d58df5801b..b9c843e931 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -118,7 +118,6 @@ LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
mDoubleClickSignal(NULL),
mTransparencyType(TT_DEFAULT)
{
- mUICtrlHandle.bind(this);
}
void LLUICtrl::initFromParams(const Params& p)
@@ -460,7 +459,7 @@ void LLUICtrl::setControlVariable(LLControlVariable* control)
if (control)
{
mControlVariable = control;
- mControlConnection = mControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("value")));
+ mControlConnection = mControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("value")));
setValue(mControlVariable->getValue());
}
}
@@ -491,7 +490,7 @@ void LLUICtrl::setEnabledControlVariable(LLControlVariable* control)
if (control)
{
mEnabledControlVariable = control;
- mEnabledControlConnection = mEnabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("enabled")));
+ mEnabledControlConnection = mEnabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("enabled")));
setEnabled(mEnabledControlVariable->getValue().asBoolean());
}
}
@@ -506,7 +505,7 @@ void LLUICtrl::setDisabledControlVariable(LLControlVariable* control)
if (control)
{
mDisabledControlVariable = control;
- mDisabledControlConnection = mDisabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("disabled")));
+ mDisabledControlConnection = mDisabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("disabled")));
setEnabled(!(mDisabledControlVariable->getValue().asBoolean()));
}
}
@@ -521,7 +520,7 @@ void LLUICtrl::setMakeVisibleControlVariable(LLControlVariable* control)
if (control)
{
mMakeVisibleControlVariable = control;
- mMakeVisibleControlConnection = mMakeVisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("visible")));
+ mMakeVisibleControlConnection = mMakeVisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("visible")));
setVisible(mMakeVisibleControlVariable->getValue().asBoolean());
}
}
@@ -536,7 +535,7 @@ void LLUICtrl::setMakeInvisibleControlVariable(LLControlVariable* control)
if (control)
{
mMakeInvisibleControlVariable = control;
- mMakeInvisibleControlConnection = mMakeInvisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("invisible")));
+ mMakeInvisibleControlConnection = mMakeInvisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("invisible")));
setVisible(!(mMakeInvisibleControlVariable->getValue().asBoolean()));
}
}
@@ -992,6 +991,16 @@ void LLUICtrl::setTransparencyType(ETypeTransparency type)
mTransparencyType = type;
}
+boost::signals2::connection LLUICtrl::setCommitCallback(const CommitCallbackParam& cb)
+{
+ return setCommitCallback(initCommitCallback(cb));
+}
+
+boost::signals2::connection LLUICtrl::setValidateCallback(const EnableCallbackParam& cb)
+{
+ return setValidateCallback(initEnableCallback(cb));
+}
+
boost::signals2::connection LLUICtrl::setCommitCallback( const commit_signal_t::slot_type& cb )
{
if (!mCommitSignal) mCommitSignal = new commit_signal_t();
@@ -1045,3 +1054,9 @@ boost::signals2::connection LLUICtrl::setDoubleClickCallback( const mouse_signal
if (!mDoubleClickSignal) mDoubleClickSignal = new mouse_signal_t();
return mDoubleClickSignal->connect(cb);
}
+
+void LLUICtrl::addInfo(LLSD & info)
+{
+ LLView::addInfo(info);
+ info["value"] = getValue();
+}
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index 09bed9b958..fb2196bb16 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -76,14 +76,14 @@ public:
Optional<enable_callback_t> function;
};
- struct EnableControls : public LLInitParam::Choice<EnableControls>
+ struct EnableControls : public LLInitParam::ChoiceBlock<EnableControls>
{
Alternative<std::string> enabled;
Alternative<std::string> disabled;
EnableControls();
};
- struct ControlVisibility : public LLInitParam::Choice<ControlVisibility>
+ struct ControlVisibility : public LLInitParam::ChoiceBlock<ControlVisibility>
{
Alternative<std::string> visible;
Alternative<std::string> invisible;
@@ -223,7 +223,7 @@ public:
BOOL focusLastItem(BOOL prefer_text_fields = FALSE);
// Non Virtuals
- LLHandle<LLUICtrl> getUICtrlHandle() const { return mUICtrlHandle; }
+ LLHandle<LLUICtrl> getHandle() const { return getDerivedHandle<LLUICtrl>(); }
BOOL getIsChrome() const;
void setTabStop( BOOL b );
@@ -235,6 +235,9 @@ public:
// topic then put in help_topic_out
bool findHelpTopic(std::string& help_topic_out);
+ boost::signals2::connection setCommitCallback(const CommitCallbackParam& cb);
+ boost::signals2::connection setValidateCallback(const EnableCallbackParam& cb);
+
boost::signals2::connection setCommitCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setValidateCallback( const enable_signal_t::slot_type& cb );
@@ -301,14 +304,15 @@ protected:
static F32 sActiveControlTransparency;
static F32 sInactiveControlTransparency;
-
+
+ virtual void addInfo(LLSD & info);
+
private:
BOOL mIsChrome;
BOOL mRequestsFront;
BOOL mTabStop;
BOOL mTentative;
- LLRootHandle<LLUICtrl> mUICtrlHandle;
ETypeTransparency mTransparencyType;
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 499b97f52d..d612ad5005 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -104,14 +104,17 @@ private:
public:
ParamDefaults()
{
- // recursively initialize from base class param block
- ((typename PARAM_BLOCK::base_block_t&)mPrototype).fillFrom(ParamDefaults<typename PARAM_BLOCK::base_block_t, DUMMY>::instance().get());
- // after initializing base classes, look up template file for this param block
+ // look up template file for this param block...
const std::string* param_block_tag = getWidgetTag(&typeid(PARAM_BLOCK));
if (param_block_tag)
- {
- LLUICtrlFactory::loadWidgetTemplate(*param_block_tag, mPrototype);
+ { // ...and if it exists, back fill values using the most specific template first
+ PARAM_BLOCK params;
+ LLUICtrlFactory::loadWidgetTemplate(*param_block_tag, params);
+ mPrototype.fillFrom(params);
}
+ // recursively fill from base class param block
+ ((typename PARAM_BLOCK::base_block_t&)mPrototype).fillFrom(ParamDefaults<typename PARAM_BLOCK::base_block_t, DUMMY>::instance().get());
+
}
const PARAM_BLOCK& get() { return mPrototype; }
@@ -169,7 +172,7 @@ public:
static T* createFromFile(const std::string &filename, LLView *parent, const widget_registry_t& registry, LLXMLNodePtr output_node = NULL)
{
T* widget = NULL;
-
+
std::string skinned_filename = findSkinnedFilename(filename);
instance().pushFileName(filename);
{
@@ -198,10 +201,10 @@ public:
// not of right type, so delete it
if (!widget)
{
+ llwarns << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << llendl;
delete view;
view = NULL;
}
-
}
}
fail:
diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp
index f37947a50b..1d9ce29ba9 100644
--- a/indra/llui/lluiimage.cpp
+++ b/indra/llui/lluiimage.cpp
@@ -172,15 +172,15 @@ namespace LLInitParam
}
}
- void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue()
+ void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue(bool make_block_authoritative)
{
if (getValue() == NULL)
{
- name.set("none", false);
+ name.set("none", make_block_authoritative);
}
else
{
- name.set(getValue()->getName(), false);
+ name.set(getValue()->getName(), make_block_authoritative);
}
}
diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h
index 139d88e0ac..f07e8fa746 100644
--- a/indra/llui/lluiimage.h
+++ b/indra/llui/lluiimage.h
@@ -103,12 +103,12 @@ namespace LLInitParam
ParamValue(LLUIImage* const& image)
: super_t(image)
{
- updateBlockFromValue();
+ updateBlockFromValue(false);
addSynonym(name, "name");
}
void updateValueFromBlock();
- void updateBlockFromValue();
+ void updateBlockFromValue(bool make_block_authoritative);
};
// Need custom comparison function for our test app, which only loads
diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp
index 42b779bd28..fd9b3d9a6d 100644
--- a/indra/llui/llurlaction.cpp
+++ b/indra/llui/llurlaction.cpp
@@ -33,28 +33,28 @@
#include "llurlregistry.h"
// global state for the callback functions
-void (*LLUrlAction::sOpenURLCallback) (const std::string& url) = NULL;
-void (*LLUrlAction::sOpenURLInternalCallback) (const std::string& url) = NULL;
-void (*LLUrlAction::sOpenURLExternalCallback) (const std::string& url) = NULL;
-bool (*LLUrlAction::sExecuteSLURLCallback) (const std::string& url) = NULL;
+LLUrlAction::url_callback_t LLUrlAction::sOpenURLCallback;
+LLUrlAction::url_callback_t LLUrlAction::sOpenURLInternalCallback;
+LLUrlAction::url_callback_t LLUrlAction::sOpenURLExternalCallback;
+LLUrlAction::execute_url_callback_t LLUrlAction::sExecuteSLURLCallback;
-void LLUrlAction::setOpenURLCallback(void (*cb) (const std::string& url))
+void LLUrlAction::setOpenURLCallback(url_callback_t cb)
{
sOpenURLCallback = cb;
}
-void LLUrlAction::setOpenURLInternalCallback(void (*cb) (const std::string& url))
+void LLUrlAction::setOpenURLInternalCallback(url_callback_t cb)
{
sOpenURLInternalCallback = cb;
}
-void LLUrlAction::setOpenURLExternalCallback(void (*cb) (const std::string& url))
+void LLUrlAction::setOpenURLExternalCallback(url_callback_t cb)
{
sOpenURLExternalCallback = cb;
}
-void LLUrlAction::setExecuteSLURLCallback(bool (*cb) (const std::string& url))
+void LLUrlAction::setExecuteSLURLCallback(execute_url_callback_t cb)
{
sExecuteSLURLCallback = cb;
}
@@ -63,7 +63,7 @@ void LLUrlAction::openURL(std::string url)
{
if (sOpenURLCallback)
{
- (*sOpenURLCallback)(url);
+ sOpenURLCallback(url);
}
}
@@ -71,7 +71,7 @@ void LLUrlAction::openURLInternal(std::string url)
{
if (sOpenURLInternalCallback)
{
- (*sOpenURLInternalCallback)(url);
+ sOpenURLInternalCallback(url);
}
}
@@ -79,7 +79,7 @@ void LLUrlAction::openURLExternal(std::string url)
{
if (sOpenURLExternalCallback)
{
- (*sOpenURLExternalCallback)(url);
+ sOpenURLExternalCallback(url);
}
}
@@ -87,18 +87,18 @@ void LLUrlAction::executeSLURL(std::string url)
{
if (sExecuteSLURLCallback)
{
- (*sExecuteSLURLCallback)(url);
+ sExecuteSLURLCallback(url);
}
}
void LLUrlAction::clickAction(std::string url)
{
// Try to handle as SLURL first, then http Url
- if ( (sExecuteSLURLCallback) && !(*sExecuteSLURLCallback)(url) )
+ if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url) )
{
if (sOpenURLCallback)
{
- (*sOpenURLCallback)(url);
+ sOpenURLCallback(url);
}
}
}
diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h
index 0132dbaaf0..c34960b826 100644
--- a/indra/llui/llurlaction.h
+++ b/indra/llui/llurlaction.h
@@ -29,6 +29,7 @@
#define LL_LLURLACTION_H
#include <string>
+#include <boost/function.hpp>
///
/// The LLUrlAction class provides a number of static functions that
@@ -77,17 +78,21 @@ public:
static void showProfile(std::string url);
/// specify the callbacks to enable this class's functionality
- static void setOpenURLCallback(void (*cb) (const std::string& url));
- static void setOpenURLInternalCallback(void (*cb) (const std::string& url));
- static void setOpenURLExternalCallback(void (*cb) (const std::string& url));
- static void setExecuteSLURLCallback(bool (*cb) (const std::string& url));
+ typedef boost::function<void (const std::string&)> url_callback_t;
+ typedef boost::function<bool(const std::string& url)> execute_url_callback_t;
+
+ static void setOpenURLCallback(url_callback_t cb);
+ static void setOpenURLInternalCallback(url_callback_t cb);
+ static void setOpenURLExternalCallback(url_callback_t cb);
+ static void setExecuteSLURLCallback(execute_url_callback_t cb);
private:
// callbacks for operations we can perform on Urls
- static void (*sOpenURLCallback) (const std::string& url);
- static void (*sOpenURLInternalCallback) (const std::string& url);
- static void (*sOpenURLExternalCallback) (const std::string& url);
- static bool (*sExecuteSLURLCallback) (const std::string& url);
+ static url_callback_t sOpenURLCallback;
+ static url_callback_t sOpenURLInternalCallback;
+ static url_callback_t sOpenURLExternalCallback;
+
+ static execute_url_callback_t sExecuteSLURLCallback;
};
#endif
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 9db1feafd1..a9e8fbb4e4 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -1134,7 +1134,7 @@ std::string LLUrlEntryWorldMap::getLocation(const std::string &url) const
//
LLUrlEntryNoLink::LLUrlEntryNoLink()
{
- mPattern = boost::regex("<nolink>.*</nolink>",
+ mPattern = boost::regex("<nolink>.*?</nolink>",
boost::regex::perl|boost::regex::icase);
}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 8803d106ba..486babb0ab 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -31,7 +31,10 @@
#include "llview.h"
#include <cassert>
+#include <sstream>
#include <boost/tokenizer.hpp>
+#include <boost/foreach.hpp>
+#include <boost/bind.hpp>
#include "llrender.h"
#include "llevent.h"
@@ -44,6 +47,7 @@
#include "v3color.h"
#include "lluictrlfactory.h"
#include "lltooltip.h"
+#include "llsdutil.h"
// for ui edit hack
#include "llbutton.h"
@@ -66,6 +70,8 @@ S32 LLView::sLastLeftXML = S32_MIN;
S32 LLView::sLastBottomXML = S32_MIN;
std::vector<LLViewDrawContext*> LLViewDrawContext::sDrawContextStack;
+LLView::DrilldownFunc LLView::sDrilldown =
+ boost::bind(&LLView::pointInView, _1, _2, _3, HIT_TEST_USE_BOUNDING_RECT);
//#if LL_DEBUG
BOOL LLView::sIsDrawing = FALSE;
@@ -219,9 +225,11 @@ BOOL LLView::getUseBoundingRect() const
}
// virtual
-std::string LLView::getName() const
+const std::string& LLView::getName() const
{
- return mName.empty() ? std::string("(no name)") : mName;
+ static std::string no_name("(no name)");
+
+ return mName.empty() ? no_name : mName;
}
void LLView::sendChildToFront(LLView* child)
@@ -346,13 +354,11 @@ void LLView::removeChild(LLView* child)
LLView::ctrl_list_t LLView::getCtrlList() const
{
ctrl_list_t controls;
- for(child_list_const_iter_t iter = mChildList.begin();
- iter != mChildList.end();
- iter++)
+ BOOST_FOREACH(LLView* viewp, mChildList)
{
- if((*iter)->isCtrl())
+ if(viewp->isCtrl())
{
- controls.push_back(static_cast<LLUICtrl*>(*iter));
+ controls.push_back(static_cast<LLUICtrl*>(viewp));
}
}
return controls;
@@ -428,6 +434,36 @@ BOOL LLView::isInEnabledChain() const
return enabled;
}
+static void buildPathname(std::ostream& out, const LLView* view)
+{
+ if (! (view && view->getParent()))
+ {
+ return; // Don't include root in the path.
+ }
+
+ buildPathname(out, view->getParent());
+
+ // Build pathname into ostream on the way back from recursion.
+ out << '/' << view->getName();
+}
+
+std::string LLView::getPathname() const
+{
+ std::ostringstream out;
+ buildPathname(out, this);
+ return out.str();
+}
+
+//static
+std::string LLView::getPathname(const LLView* view)
+{
+ if (! view)
+ {
+ return "NULL";
+ }
+ return view->getPathname();
+}
+
// virtual
BOOL LLView::canFocusChildren() const
{
@@ -574,9 +610,8 @@ void LLView::deleteAllChildren()
void LLView::setAllChildrenEnabled(BOOL b)
{
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* viewp, mChildList)
{
- LLView* viewp = *child_it;
viewp->setEnabled(b);
}
}
@@ -602,9 +637,8 @@ void LLView::setVisible(BOOL visible)
// virtual
void LLView::handleVisibilityChange ( BOOL new_visibility )
{
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* viewp, mChildList)
{
- LLView* viewp = *child_it;
// only views that are themselves visible will have their overall visibility affected by their ancestors
if (viewp->getVisible())
{
@@ -646,56 +680,178 @@ void LLView::onMouseLeave(S32 x, S32 y, MASK mask)
//llinfos << "Mouse left " << getName() << llendl;
}
+bool LLView::visibleAndContains(S32 local_x, S32 local_y)
+{
+ return sDrilldown(this, local_x, local_y)
+ && getVisible();
+}
+
+bool LLView::visibleEnabledAndContains(S32 local_x, S32 local_y)
+{
+ return visibleAndContains(local_x, local_y)
+ && getEnabled();
+}
+
+void LLView::logMouseEvent()
+{
+ if (sDebugMouseHandling)
+ {
+ sMouseHandlerMessage = std::string("/") + mName + sMouseHandlerMessage;
+ }
+}
+
+template <typename METHOD, typename CHARTYPE>
+LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& method,
+ CHARTYPE c, MASK mask)
+{
+ if ( getVisible() && getEnabled() )
+ {
+ BOOST_FOREACH(LLView* viewp, mChildList)
+ {
+ if ((viewp->*method)(c, mask, TRUE))
+ {
+ if (LLView::sDebugKeys)
+ {
+ llinfos << desc << " handled by " << viewp->getName() << llendl;
+ }
+ return viewp;
+ }
+ }
+ }
+ return NULL;
+}
+
+// XDATA might be MASK, or S32 clicks
+template <typename METHOD, typename XDATA>
+LLView* LLView::childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block)
+{
+ BOOST_FOREACH(LLView* viewp, mChildList)
+ {
+ S32 local_x = x - viewp->getRect().mLeft;
+ S32 local_y = y - viewp->getRect().mBottom;
+
+ if (!viewp->visibleEnabledAndContains(local_x, local_y))
+ {
+ continue;
+ }
+
+ if ((viewp->*method)( local_x, local_y, extra )
+ || (allow_mouse_block && viewp->blockMouseEvent( local_x, local_y )))
+ {
+ viewp->logMouseEvent();
+ return viewp;
+ }
+ }
+ return NULL;
+}
LLView* LLView::childrenHandleToolTip(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* viewp, mChildList)
{
- LLView* viewp = *child_it;
S32 local_x = x - viewp->getRect().mLeft;
S32 local_y = y - viewp->getRect().mBottom;
- if(!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible())
+ // Differs from childrenHandleMouseEvent() in that we want to offer
+ // tooltips even for disabled widgets.
+ if(!viewp->visibleAndContains(local_x, local_y))
{
continue;
}
- if (viewp->handleToolTip(local_x, local_y, mask) )
+ if (viewp->handleToolTip(local_x, local_y, mask)
+ || viewp->blockMouseEvent(local_x, local_y))
{
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
+ viewp->logMouseEvent();
+ return viewp;
+ }
+ }
+ return NULL;
+}
- handled_view = viewp;
- break;
+LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask,
+ BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ // default to not accepting drag and drop, will be overridden by handler
+ *accept = ACCEPT_NO;
+
+ BOOST_FOREACH(LLView* viewp, mChildList)
+ {
+ S32 local_x = x - viewp->getRect().mLeft;
+ S32 local_y = y - viewp->getRect().mBottom;
+ if( !viewp->visibleEnabledAndContains(local_x, local_y))
+ {
+ continue;
}
- if (viewp->blockMouseEvent(local_x, local_y))
+ // Differs from childrenHandleMouseEvent() simply in that this virtual
+ // method call diverges pretty radically from the usual (x, y, int).
+ if (viewp->handleDragAndDrop(local_x, local_y, mask, drop,
+ cargo_type,
+ cargo_data,
+ accept,
+ tooltip_msg)
+ || viewp->blockMouseEvent(local_x, local_y))
{
- handled_view = viewp;
- break;
+ return viewp;
}
}
- return handled_view;
+ return NULL;
}
+LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask)
+{
+ BOOST_FOREACH(LLView* viewp, mChildList)
+ {
+ S32 local_x = x - viewp->getRect().mLeft;
+ S32 local_y = y - viewp->getRect().mBottom;
+ if(!viewp->visibleEnabledAndContains(local_x, local_y))
+ {
+ continue;
+ }
+
+ // This call differentiates this method from childrenHandleMouseEvent().
+ LLUI::sWindow->setCursor(viewp->getHoverCursor());
-LLView* LLView::childFromPoint(S32 x, S32 y)
+ if (viewp->handleHover(local_x, local_y, mask)
+ || viewp->blockMouseEvent(local_x, local_y))
+ {
+ viewp->logMouseEvent();
+ return viewp;
+ }
+ }
+ return NULL;
+}
+
+LLView* LLView::childFromPoint(S32 x, S32 y, bool recur)
{
- if (!getVisible() )
+ if (!getVisible())
return false;
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+
+ BOOST_FOREACH(LLView* viewp, mChildList)
{
- LLView* viewp = *child_it;
S32 local_x = x - viewp->getRect().mLeft;
S32 local_y = y - viewp->getRect().mBottom;
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible() )
+ if (!viewp->visibleAndContains(local_x, local_y))
{
continue;
}
+ // Here we've found the first (frontmost) visible child at this level
+ // containing the specified point. Is the caller asking us to drill
+ // down and return the innermost leaf child at this point, or just the
+ // top-level child?
+ if (recur)
+ {
+ LLView* leaf(viewp->childFromPoint(local_x, local_y, recur));
+ // Maybe viewp is already a leaf LLView, or maybe it has children
+ // but this particular (x, y) point falls between them. If the
+ // recursive call returns non-NULL, great, use that; else just use
+ // viewp.
+ return leaf? leaf : viewp;
+ }
return viewp;
}
@@ -708,15 +864,16 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask)
// parents provide tooltips first, which are optionally
// overridden by children, in case child is mouse_opaque
- if (!mToolTipMsg.empty())
+ std::string tooltip = getToolTip();
+ if (!tooltip.empty())
{
// allow "scrubbing" over ui by showing next tooltip immediately
// if previous one was still visible
F32 timeout = LLToolTipMgr::instance().toolTipVisible()
- ? 0.f
+ ? LLUI::sSettingGroups["config"]->getF32( "ToolTipFastDelay" )
: LLUI::sSettingGroups["config"]->getF32( "ToolTipDelay" );
LLToolTipMgr::instance().show(LLToolTip::Params()
- .message(mToolTipMsg)
+ .message(tooltip)
.sticky_rect(calcScreenRect())
.delay_time(timeout));
@@ -815,45 +972,6 @@ BOOL LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
return childrenHandleDragAndDrop( x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL;
}
-LLView* LLView::childrenHandleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
-{
- LLView* handled_view = NULL;
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
- if( !viewp->pointInView(local_x, local_y) ||
- !viewp->getVisible() ||
- !viewp->getEnabled())
- {
- continue;
- }
- if (viewp->handleDragAndDrop(local_x, local_y, mask, drop,
- cargo_type,
- cargo_data,
- accept,
- tooltip_msg))
- {
- handled_view = viewp;
- break;
- }
-
- if (viewp->blockMouseEvent(x, y))
- {
- *accept = ACCEPT_NO;
- handled_view = viewp;
- break;
- }
- }
- return handled_view;
-}
-
void LLView::onMouseCaptureLost()
{
}
@@ -903,391 +1021,57 @@ BOOL LLView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
return childrenHandleMiddleMouseUp( x, y, mask ) != NULL;
}
-
LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks)
{
- LLView* handled_view = NULL;
- if (getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if (viewp->handleScrollWheel( local_x, local_y, clicks ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
-
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
-}
-
-LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask)
-{
- LLView* handled_view = NULL;
- if (getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
- if(!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if (viewp->handleHover(local_x, local_y, mask) )
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
-
- handled_view = viewp;
- break;
- }
-
- if (viewp->blockMouseEvent(local_x, local_y))
- {
- LLUI::sWindow->setCursor(viewp->getHoverCursor());
-
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleScrollWheel, x, y, clicks, false);
}
// Called during downward traversal
LLView* LLView::childrenHandleKey(KEY key, MASK mask)
{
- LLView* handled_view = NULL;
-
- if ( getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- if (viewp->handleKey(key, mask, TRUE))
- {
- if (LLView::sDebugKeys)
- {
- llinfos << "Key handled by " << viewp->getName() << llendl;
- }
- handled_view = viewp;
- break;
- }
- }
- }
-
- return handled_view;
+ return childrenHandleCharEvent("Key", &LLView::handleKey, key, mask);
}
// Called during downward traversal
LLView* LLView::childrenHandleUnicodeChar(llwchar uni_char)
{
- LLView* handled_view = NULL;
-
- if ( getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- if (viewp->handleUnicodeChar(uni_char, TRUE))
- {
- if (LLView::sDebugKeys)
- {
- llinfos << "Unicode character handled by " << viewp->getName() << llendl;
- }
- handled_view = viewp;
- break;
- }
- }
- }
-
- return handled_view;
+ return childrenHandleCharEvent("Unicode character", &LLView::handleUnicodeCharWithDummyMask,
+ uni_char, MASK_NONE);
}
LLView* LLView::childrenHandleMouseDown(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
-
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
-
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if(viewp->handleMouseDown( local_x, local_y, mask ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
- handled_view = viewp;
- break;
- }
-
- if(viewp->blockMouseEvent(local_x, local_y))
- {
- handled_view = viewp;
- break;
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleMouseDown, x, y, mask);
}
LLView* LLView::childrenHandleRightMouseDown(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
-
- if (getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
-
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if (viewp->handleRightMouseDown( local_x, local_y, mask ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
-
- handled_view = viewp;
- break;
- }
-
- if (viewp->blockMouseEvent(local_x, local_y))
- {
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleRightMouseDown, x, y, mask);
}
LLView* LLView::childrenHandleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
-
- if (getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if(viewp->handleMiddleMouseDown( local_x, local_y, mask ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
- handled_view = viewp;
- break;
- }
-
- if (viewp->blockMouseEvent(local_x, local_y))
- {
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleMiddleMouseDown, x, y, mask);
}
LLView* LLView::childrenHandleDoubleClick(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
-
- if (getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
-
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if (viewp->handleDoubleClick( local_x, local_y, mask ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
- handled_view = viewp;
- break;
- }
-
- if (viewp->blockMouseEvent(local_x, local_y))
- {
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleDoubleClick, x, y, mask);
}
LLView* LLView::childrenHandleMouseUp(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
- if( getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if (viewp->handleMouseUp( local_x, local_y, mask ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
- handled_view = viewp;
- break;
- }
-
- if (viewp->blockMouseEvent(local_x, local_y))
- {
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleMouseUp, x, y, mask);
}
LLView* LLView::childrenHandleRightMouseUp(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
- if( getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled() )
- {
- continue;
- }
-
- if(viewp->handleRightMouseUp( local_x, local_y, mask ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
- handled_view = viewp;
- break;
- }
-
- if(viewp->blockMouseEvent(local_x, local_y))
- {
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleRightMouseUp, x, y, mask);
}
LLView* LLView::childrenHandleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
- LLView* handled_view = NULL;
- if( getVisible() && getEnabled() )
- {
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
- {
- LLView* viewp = *child_it;
- S32 local_x = x - viewp->getRect().mLeft;
- S32 local_y = y - viewp->getRect().mBottom;
- if (!viewp->pointInView(local_x, local_y)
- || !viewp->getVisible()
- || !viewp->getEnabled())
- {
- continue;
- }
-
- if(viewp->handleMiddleMouseUp( local_x, local_y, mask ))
- {
- if (sDebugMouseHandling)
- {
- sMouseHandlerMessage = std::string("/") + viewp->mName + sMouseHandlerMessage;
- }
- handled_view = viewp;
- break;
- }
-
- if (viewp->blockMouseEvent(local_x, local_y))
- {
- handled_view = viewp;
- break;
- }
- }
- }
- return handled_view;
+ return childrenHandleMouseEvent(&LLView::handleMiddleMouseUp, x, y, mask);
}
void LLView::draw()
@@ -1433,7 +1217,7 @@ void LLView::drawChild(LLView* childp, S32 x_offset, S32 y_offset, BOOL force_dr
if ((childp->getVisible() && childp->getRect().isValid())
|| force_draw)
{
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
LLUI::pushMatrix();
{
LLUI::translate((F32)childp->getRect().mLeft + x_offset, (F32)childp->getRect().mBottom + y_offset, 0.f);
@@ -1460,9 +1244,8 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent)
mRect.mTop = getRect().mBottom + height;
// move child views according to reshape flags
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* viewp, mChildList)
{
- LLView* viewp = *child_it;
LLRect child_rect( viewp->mRect );
if (viewp->followsRight() && viewp->followsLeft())
@@ -1525,10 +1308,8 @@ LLRect LLView::calcBoundingRect()
{
LLRect local_bounding_rect = LLRect::null;
- child_list_const_iter_t child_it;
- for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* childp, mChildList)
{
- LLView* childp = *child_it;
// ignore invisible and "top" children when calculating bounding rect
// such as combobox popups
if (!childp->getVisible() || childp == gFocusMgr.getTopCtrl())
@@ -1655,15 +1436,19 @@ BOOL LLView::hasAncestor(const LLView* parentp) const
BOOL LLView::childHasKeyboardFocus( const std::string& childname ) const
{
- LLView *child = findChildView(childname, TRUE);
- if (child)
- {
- return gFocusMgr.childHasKeyboardFocus(child);
- }
- else
+ LLView *focus = dynamic_cast<LLView *>(gFocusMgr.getKeyboardFocus());
+
+ while (focus != NULL)
{
- return FALSE;
+ if (focus->getName() == childname)
+ {
+ return TRUE;
+ }
+
+ focus = focus->getParent();
}
+
+ return FALSE;
}
//-----------------------------------------------------------------------------
@@ -1689,11 +1474,9 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
//richard: should we allow empty names?
//if(name.empty())
// return NULL;
- child_list_const_iter_t child_it;
// Look for direct children *first*
- for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* childp, mChildList)
{
- LLView* childp = *child_it;
llassert(childp);
if (childp->getName() == name)
{
@@ -1703,9 +1486,8 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
if (recurse)
{
// Look inside each child as well.
- for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* childp, mChildList)
{
- LLView* childp = *child_it;
llassert(childp);
LLView* viewp = childp->findChildView(name, recurse);
if ( viewp )
@@ -1822,13 +1604,6 @@ LLView* LLView::findNextSibling(LLView* child)
return (next_it != mChildList.end()) ? *next_it : NULL;
}
-void LLView::deleteViewByHandle(LLHandle<LLView> handle)
-{
- LLView* viewp = handle.get();
-
- delete viewp;
-}
-
LLCoordGL getNeededTranslation(const LLRect& input, const LLRect& constraint, BOOL allow_partial_outside)
{
@@ -2481,7 +2256,7 @@ void LLView::applyXUILayout(LLView::Params& p, LLView* parent)
{
LLRect parent_rect = parent->getLocalRect();
// overwrite uninitialized rect params, using context
- LLRect last_rect = parent->getLocalRect();
+ LLRect default_rect = parent->getLocalRect();
bool layout_topleft = (p.layout() == "topleft");
@@ -2505,15 +2280,13 @@ void LLView::applyXUILayout(LLView::Params& p, LLView* parent)
p.rect.height = MIN_WIDGET_HEIGHT;
}
- last_rect.translate(0, last_rect.getHeight());
+ default_rect.translate(0, default_rect.getHeight());
// If there was a recently constructed child, use its rectangle
- get_last_child_rect(parent, &last_rect);
+ get_last_child_rect(parent, &default_rect);
if (layout_topleft)
{
- p.bottom_delta.setIfNotProvided(0, false);
-
// Invert the sense of bottom_delta for topleft layout
if (p.bottom_delta.isProvided())
{
@@ -2526,33 +2299,44 @@ void LLView::applyXUILayout(LLView::Params& p, LLView* parent)
else if (p.top_delta.isProvided())
{
p.bottom_delta =
- -(p.top_delta + p.rect.height - last_rect.getHeight());
+ -(p.top_delta + p.rect.height - default_rect.getHeight());
}
- else if (!p.bottom_delta.isProvided()
- && !p.left_delta.isProvided()
- && !p.top_pad.isProvided()
+ else if (!p.left_delta.isProvided()
&& !p.left_pad.isProvided())
{
// set default position is just below last rect
p.bottom_delta.set(-(p.rect.height + VPAD), false);
}
+ else
+ {
+ p.bottom_delta.set(0, false);
+ }
// default to same left edge
- p.left_delta.setIfNotProvided(0, false);
+ if (!p.left_delta.isProvided())
+ {
+ p.left_delta.set(0, false);
+ }
if (p.left_pad.isProvided())
{
// left_pad is based on prior widget's right edge
- p.left_delta.set(p.left_pad + last_rect.getWidth(), false);
+ p.left_delta.set(p.left_pad + default_rect.getWidth(), false);
}
- last_rect.translate(p.left_delta, p.bottom_delta);
+ default_rect.translate(p.left_delta, p.bottom_delta);
}
else
{
// set default position is just below last rect
- p.bottom_delta.setIfNotProvided(-(p.rect.height + VPAD), false);
- p.left_delta.setIfNotProvided(0, false);
- last_rect.translate(p.left_delta, p.bottom_delta);
+ if (!p.bottom_delta.isProvided())
+ {
+ p.bottom_delta.set(-(p.rect.height + VPAD), false);
+ }
+ if (!p.left_delta.isProvided())
+ {
+ p.left_delta.set(0, false);
+ }
+ default_rect.translate(p.left_delta, p.bottom_delta);
}
// this handles case where *both* x and x_delta are provided
@@ -2563,12 +2347,38 @@ void LLView::applyXUILayout(LLView::Params& p, LLView* parent)
// selectively apply rectangle defaults, making sure that
// params are not flagged as having been "provided"
// as rect params are overconstrained and rely on provided flags
- p.rect.left.setIfNotProvided(last_rect.mLeft, false);
- p.rect.bottom.setIfNotProvided(last_rect.mBottom, false);
- p.rect.top.setIfNotProvided(last_rect.mTop, false);
- p.rect.right.setIfNotProvided(last_rect.mRight, false);
- p.rect.width.setIfNotProvided(last_rect.getWidth(), false);
- p.rect.height.setIfNotProvided(last_rect.getHeight(), false);
+ if (!p.rect.left.isProvided())
+ {
+ p.rect.left.set(default_rect.mLeft, false);
+ //HACK: get around the fact that setting a rect param component value won't invalidate the existing rect object value
+ p.rect.paramChanged(p.rect.left, true);
+ }
+ if (!p.rect.bottom.isProvided())
+ {
+ p.rect.bottom.set(default_rect.mBottom, false);
+ p.rect.paramChanged(p.rect.bottom, true);
+ }
+ if (!p.rect.top.isProvided())
+ {
+ p.rect.top.set(default_rect.mTop, false);
+ p.rect.paramChanged(p.rect.top, true);
+ }
+ if (!p.rect.right.isProvided())
+ {
+ p.rect.right.set(default_rect.mRight, false);
+ p.rect.paramChanged(p.rect.right, true);
+
+ }
+ if (!p.rect.width.isProvided())
+ {
+ p.rect.width.set(default_rect.getWidth(), false);
+ p.rect.paramChanged(p.rect.width, true);
+ }
+ if (!p.rect.height.isProvided())
+ {
+ p.rect.height.set(default_rect.getHeight(), false);
+ p.rect.paramChanged(p.rect.height, true);
+ }
}
}
@@ -2811,9 +2621,9 @@ S32 LLView::notifyParent(const LLSD& info)
bool LLView::notifyChildren(const LLSD& info)
{
bool ret = false;
- for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ BOOST_FOREACH(LLView* childp, mChildList)
{
- ret |= (*child_it)->notifyChildren(info);
+ ret = ret || childp->notifyChildren(info);
}
return ret;
}
@@ -2833,3 +2643,24 @@ const LLViewDrawContext& LLViewDrawContext::getCurrentContext()
return *sDrawContextStack.back();
}
+
+LLSD LLView::getInfo(void)
+{
+ LLSD info;
+ addInfo(info);
+ return info;
+}
+
+void LLView::addInfo(LLSD & info)
+{
+ info["path"] = getPathname();
+ info["class"] = typeid(*this).name();
+ info["visible"] = getVisible();
+ info["visible_chain"] = isInVisibleChain();
+ info["enabled"] = getEnabled();
+ info["enabled_chain"] = isInEnabledChain();
+ info["available"] = isAvailable();
+ LLRect rect(calcScreenRect());
+ info["rect"] = LLSDMap("left", rect.mLeft)("top", rect.mTop)
+ ("right", rect.mRight)("bottom", rect.mBottom);
+}
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 594a5eec6b..f21fb37e18 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -50,6 +50,8 @@
#include "llfocusmgr.h"
#include <list>
+#include <boost/function.hpp>
+#include <boost/noncopyable.hpp>
class LLSD;
@@ -95,13 +97,14 @@ private:
static std::vector<LLViewDrawContext*> sDrawContextStack;
};
-class LLViewWidgetRegistry : public LLChildRegistry<LLViewWidgetRegistry>
-{};
-
-class LLView : public LLMouseHandler, public LLMortician, public LLFocusableElement
+class LLView
+: public LLMouseHandler, // handles mouse events
+ public LLFocusableElement, // handles keyboard events
+ public LLMortician, // lazy deletion
+ public LLHandleProvider<LLView> // passes out weak references to self
{
public:
- struct Follows : public LLInitParam::Choice<Follows>
+ struct Follows : public LLInitParam::ChoiceBlock<Follows>
{
Alternative<std::string> string;
Alternative<U32> flags;
@@ -150,7 +153,8 @@ public:
Params();
};
- typedef LLViewWidgetRegistry child_registry_t;
+ // most widgets are valid children of LLView
+ typedef LLDefaultChildRegistry child_registry_t;
void initFromParams(const LLView::Params&);
@@ -240,7 +244,7 @@ public:
ECursorType getHoverCursor() { return mHoverCursor; }
- const std::string& getToolTip() const { return mToolTipMsg.getString(); }
+ virtual const std::string getToolTip() const { return mToolTipMsg.getString(); }
void sendChildToFront(LLView* child);
void sendChildToBack(LLView* child);
@@ -306,8 +310,6 @@ public:
void popVisible() { setVisible(mLastVisible); }
BOOL getLastVisible() const { return mLastVisible; }
- LLHandle<LLView> getHandle() { mHandle.bind(this); return mHandle; }
-
U32 getFollows() const { return mReshapeFlags; }
BOOL followsLeft() const { return mReshapeFlags & FOLLOWS_LEFT; }
BOOL followsRight() const { return mReshapeFlags & FOLLOWS_RIGHT; }
@@ -431,18 +433,21 @@ public:
/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
- /*virtual*/ std::string getName() const;
+ /*virtual*/ const std::string& getName() const;
/*virtual*/ void onMouseCaptureLost();
/*virtual*/ BOOL hasMouseCapture();
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const;
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const;
- virtual LLView* childFromPoint(S32 x, S32 y);
+ virtual LLView* childFromPoint(S32 x, S32 y, bool recur=false);
// view-specific handlers
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
+ std::string getPathname() const;
+ // static method handles NULL pointer too
+ static std::string getPathname(const LLView*);
template <class T> T* findChild(const std::string& name, BOOL recurse = TRUE) const
{
@@ -467,6 +472,20 @@ public:
return dynamic_cast<T*>(widgetp);
}
+ template <class T> T* getParentByType() const
+ {
+ LLView* parent = getParent();
+ while(parent)
+ {
+ if (dynamic_cast<T*>(parent))
+ {
+ return static_cast<T*>(parent);
+ }
+ parent = parent->getParent();
+ }
+ return NULL;
+ }
+
//////////////////////////////////////////////
// statics
//////////////////////////////////////////////
@@ -482,7 +501,6 @@ public:
// return query for iterating over focus roots in tab order
static const LLCtrlQuery & getFocusRootsQuery();
- static void deleteViewByHandle(LLHandle<LLView> handle);
static LLWindow* getWindow(void) { return LLUI::sWindow; }
// Set up params after XML load before calling new(),
@@ -511,11 +529,17 @@ public:
virtual S32 notify(const LLSD& info) { return 0;};
static const LLViewDrawContext& getDrawContext();
+
+ // Returns useful information about this ui widget.
+ LLSD getInfo(void);
protected:
void drawDebugRect();
void drawChild(LLView* childp, S32 x_offset = 0, S32 y_offset = 0, BOOL force_draw = FALSE);
void drawChildren();
+ bool visibleAndContains(S32 local_x, S32 local_Y);
+ bool visibleEnabledAndContains(S32 local_x, S32 local_y);
+ void logMouseEvent();
LLView* childrenHandleKey(KEY key, MASK mask);
LLView* childrenHandleUnicodeChar(llwchar uni_char);
@@ -538,9 +562,24 @@ protected:
LLView* childrenHandleToolTip(S32 x, S32 y, MASK mask);
ECursorType mHoverCursor;
-
+
+ virtual void addInfo(LLSD & info);
private:
+ template <typename METHOD, typename XDATA>
+ LLView* childrenHandleMouseEvent(const METHOD& method, S32 x, S32 y, XDATA extra, bool allow_mouse_block = true);
+
+ template <typename METHOD, typename CHARTYPE>
+ LLView* childrenHandleCharEvent(const std::string& desc, const METHOD& method,
+ CHARTYPE c, MASK mask);
+
+ // adapter to blur distinction between handleKey() and handleUnicodeChar()
+ // for childrenHandleCharEvent()
+ BOOL handleUnicodeCharWithDummyMask(llwchar uni_char, MASK /* dummy */, BOOL from_parent)
+ {
+ return handleUnicodeChar(uni_char, from_parent);
+ }
+
LLView* mParentView;
child_list_t mChildList;
@@ -569,7 +608,6 @@ private:
BOOL mIsFocusRoot;
BOOL mUseBoundingRect; // hit test against bounding rectangle that includes all child elements
- LLRootHandle<LLView> mHandle;
BOOL mLastVisible;
S32 mNextInsertionOrdinal;
@@ -582,7 +620,35 @@ private:
LLView& getDefaultWidgetContainer() const;
+ // This allows special mouse-event targeting logic for testing.
+ typedef boost::function<bool(const LLView*, S32 x, S32 y)> DrilldownFunc;
+ static DrilldownFunc sDrilldown;
+
public:
+ // This is the only public accessor to alter sDrilldown. This is not
+ // an accident. The intended usage pattern is like:
+ // {
+ // LLView::TemporaryDrilldownFunc scoped_func(myfunctor);
+ // // ... test with myfunctor ...
+ // } // exiting block restores original LLView::sDrilldown
+ class TemporaryDrilldownFunc: public boost::noncopyable
+ {
+ public:
+ TemporaryDrilldownFunc(const DrilldownFunc& func):
+ mOldDrilldown(sDrilldown)
+ {
+ sDrilldown = func;
+ }
+
+ ~TemporaryDrilldownFunc()
+ {
+ sDrilldown = mOldDrilldown;
+ }
+
+ private:
+ DrilldownFunc mOldDrilldown;
+ };
+
// Depth in view hierarchy during rendering
static S32 sDepth;
diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp
index 32d7ea7c25..919267dcc6 100644
--- a/indra/llui/llviewborder.cpp
+++ b/indra/llui/llviewborder.cpp
@@ -57,9 +57,6 @@ LLViewBorder::Params::Params()
{
addSynonym(border_thickness, "thickness");
addSynonym(render_style, "style");
- name = "view_border";
- mouse_opaque = false;
- follows.flags = FOLLOWS_ALL;
}
diff --git a/indra/llui/llviewinject.cpp b/indra/llui/llviewinject.cpp
new file mode 100644
index 0000000000..46c5839f8e
--- /dev/null
+++ b/indra/llui/llviewinject.cpp
@@ -0,0 +1,49 @@
+/**
+ * @file llviewinject.cpp
+ * @author Nat Goodspeed
+ * @date 2011-08-16
+ * @brief Implementation for llviewinject.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Copyright (c) 2011, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// Precompiled header
+#include "linden_common.h"
+// associated header
+#include "llviewinject.h"
+// STL headers
+// std headers
+// external library headers
+// other Linden headers
+
+llview::TargetEvent::TargetEvent(LLView* view)
+{
+ // Walk up the view tree from target LLView to the root (NULL). If
+ // passed NULL, iterate 0 times.
+ for (; view; view = view->getParent())
+ {
+ // At each level, operator() is going to ask: for a particular parent
+ // LLView*, which of its children should I select? So for this view's
+ // parent, select this view.
+ mChildMap[view->getParent()] = view;
+ }
+}
+
+bool llview::TargetEvent::operator()(const LLView* view, S32 /*x*/, S32 /*y*/) const
+{
+ // We are being called to decide whether to direct an incoming mouse event
+ // to this child view. (Normal LLView processing is to check whether the
+ // incoming (x, y) is within the view.) Look up the parent to decide
+ // whether, for that parent, this is the previously-selected child.
+ ChildMap::const_iterator found(mChildMap.find(view->getParent()));
+ // If we're looking at a child whose parent isn't even in the map, never
+ // mind.
+ if (found == mChildMap.end())
+ {
+ return false;
+ }
+ // So, is this the predestined child for this parent?
+ return (view == found->second);
+}
diff --git a/indra/llui/llviewinject.h b/indra/llui/llviewinject.h
new file mode 100644
index 0000000000..0de3d155c4
--- /dev/null
+++ b/indra/llui/llviewinject.h
@@ -0,0 +1,56 @@
+/**
+ * @file llviewinject.h
+ * @author Nat Goodspeed
+ * @date 2011-08-16
+ * @brief Supplemental LLView functionality used for simulating UI events.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Copyright (c) 2011, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLVIEWINJECT_H)
+#define LL_LLVIEWINJECT_H
+
+#include "llview.h"
+#include <map>
+
+namespace llview
+{
+
+ /**
+ * TargetEvent is a callable with state, specifically intended for use as
+ * an LLView::TemporaryDrilldownFunc. Instantiate it with the desired
+ * target LLView*; pass it to a TemporaryDrilldownFunc instance;
+ * TargetEvent::operator() will then attempt to direct subsequent mouse
+ * events to the desired target LLView*. (This is an "attempt" because
+ * LLView will still balk unless the target LLView and every parent are
+ * visible and enabled.)
+ */
+ class TargetEvent
+ {
+ public:
+ /**
+ * Construct TargetEvent with the desired target LLView*. (See
+ * LLUI::resolvePath() to obtain an LLView* given a string pathname.)
+ * This sets up for operator().
+ */
+ TargetEvent(LLView* view);
+
+ /**
+ * This signature must match LLView::DrilldownFunc. When you install
+ * this TargetEvent instance using LLView::TemporaryDrilldownFunc,
+ * LLView will call this method to decide whether to propagate an
+ * incoming mouse event to the passed child LLView*.
+ */
+ bool operator()(const LLView*, S32 x, S32 y) const;
+
+ private:
+ // For a given parent LLView, identify which child to select.
+ typedef std::map<LLView*, LLView*> ChildMap;
+ ChildMap mChildMap;
+ };
+
+} // llview namespace
+
+#endif /* ! defined(LL_LLVIEWINJECT_H) */
diff --git a/indra/llui/llwindowshade.cpp b/indra/llui/llwindowshade.cpp
index 77e94385d4..cf76202215 100644
--- a/indra/llui/llwindowshade.cpp
+++ b/indra/llui/llwindowshade.cpp
@@ -43,7 +43,7 @@ LLWindowShade::Params::Params()
text_color("text_color"),
can_close("can_close", true)
{
- mouse_opaque = false;
+ changeDefault(mouse_opaque, false);
}
LLWindowShade::LLWindowShade(const LLWindowShade::Params& params)
diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp
index 26b3b17577..c75df86891 100644
--- a/indra/llui/tests/llurlentry_stub.cpp
+++ b/indra/llui/tests/llurlentry_stub.cpp
@@ -105,8 +105,6 @@ LLStyle::Params::Params()
namespace LLInitParam
{
- BaseBlock::BaseBlock() {}
- BaseBlock::~BaseBlock() {}
Param::Param(BaseBlock* enclosing_block)
: mIsProvided(false)
{
@@ -114,7 +112,6 @@ namespace LLInitParam
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
mEnclosingBlockOffset = (U16)(my_addr - block_addr);
}
- void BaseBlock::paramChanged(const Param& last_param, bool user_provided) {}
void BaseBlock::addParam(BlockDescriptor& block_data, const ParamDescriptorPtr in_param, const char* char_name){}
void BaseBlock::addSynonym(Param& param, const std::string& synonym) {}
@@ -124,8 +121,8 @@ namespace LLInitParam
{
descriptor.mCurrentBlockPtr = this;
}
- bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; }
- void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {}
+ bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name){ return true; }
+ void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const LLInitParam::BaseBlock* diff_block) const {}
bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_value, S32 max_value) const { return true; }
bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; }
bool BaseBlock::validateBlock(bool emit_errors) const { return true; }
@@ -137,7 +134,7 @@ namespace LLInitParam
void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateValueFromBlock()
{}
- void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue()
+ void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue(bool)
{}
bool ParamCompare<const LLFontGL*, false>::equals(const LLFontGL* a, const LLFontGL* b)
@@ -152,7 +149,7 @@ namespace LLInitParam
void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateValueFromBlock()
{}
- void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue()
+ void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue(bool)
{}
void TypeValues<LLFontGL::HAlign>::declareValues()
@@ -167,7 +164,7 @@ namespace LLInitParam
void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateValueFromBlock()
{}
- void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue()
+ void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue(bool)
{}
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp
index 2f814f4200..c1fb050206 100644
--- a/indra/llui/tests/llurlentry_test.cpp
+++ b/indra/llui/tests/llurlentry_test.cpp
@@ -72,7 +72,6 @@ S32 LLUIImage::getHeight() const
namespace LLInitParam
{
- S32 Parser::sNextParseGeneration = 0;
BlockDescriptor::BlockDescriptor() {}
ParamDescriptor::ParamDescriptor(param_handle_t p,
merge_func_t merge_func,
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index 3cd61e574e..7183413463 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -63,11 +63,6 @@ S32 LLUIImage::getHeight() const
namespace LLInitParam
{
- BaseBlock::BaseBlock() {}
- BaseBlock::~BaseBlock() {}
-
- S32 Parser::sNextParseGeneration = 0;
-
BlockDescriptor::BlockDescriptor() {}
ParamDescriptor::ParamDescriptor(param_handle_t p,
merge_func_t merge_func,
@@ -79,8 +74,6 @@ namespace LLInitParam
S32 max_count){}
ParamDescriptor::~ParamDescriptor() {}
- void BaseBlock::paramChanged(const Param& last_param, bool user_provided) {}
-
void BaseBlock::addParam(BlockDescriptor& block_data, const ParamDescriptorPtr in_param, const char* char_name){}
param_handle_t BaseBlock::getHandleFromParam(const Param* param) const {return 0;}
void BaseBlock::addSynonym(Param& param, const std::string& synonym) {}
@@ -98,8 +91,8 @@ namespace LLInitParam
mEnclosingBlockOffset = 0x7FFFffff & ((U32)(my_addr - block_addr));
}
- bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; }
- void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {}
+ bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, bool new_name){ return true; }
+ void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const LLInitParam::BaseBlock* diff_block) const {}
bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_count, S32 max_count) const { return true; }
bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; }
bool BaseBlock::validateBlock(bool emit_errors) const { return true; }
@@ -111,7 +104,7 @@ namespace LLInitParam
void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateValueFromBlock()
{}
- void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue()
+ void ParamValue<LLUIColor, TypeValues<LLUIColor> >::updateBlockFromValue(bool)
{}
bool ParamCompare<const LLFontGL*, false>::equals(const LLFontGL* a, const LLFontGL* b)
@@ -127,7 +120,7 @@ namespace LLInitParam
void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateValueFromBlock()
{}
- void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue()
+ void ParamValue<const LLFontGL*, TypeValues<const LLFontGL*> >::updateBlockFromValue(bool)
{}
void TypeValues<LLFontGL::HAlign>::declareValues()
@@ -142,7 +135,7 @@ namespace LLInitParam
void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateValueFromBlock()
{}
- void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue()
+ void ParamValue<LLUIImage*, TypeValues<LLUIImage*> >::updateBlockFromValue(bool)
{}
bool ParamCompare<LLUIImage*, false>::equals(
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt
index 2c581cf8d6..a819d12861 100644
--- a/indra/llvfs/CMakeLists.txt
+++ b/indra/llvfs/CMakeLists.txt
@@ -83,13 +83,13 @@ if (LL_TESTS)
include(LLAddBuildTest)
# UNIT TESTS
SET(llvfs_TEST_SOURCE_FILES
- lldiriterator.cpp
- )
+ lldiriterator.cpp
+ )
set_source_files_properties(lldiriterator.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${vfs_BOOST_LIBRARIES}"
- )
+ PROPERTIES
+ LL_TEST_ADDITIONAL_LIBRARIES "${vfs_BOOST_LIBRARIES}"
+ )
LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}")
# INTEGRATION TESTS
diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp
index 25550321f0..ff92cbb7fd 100644
--- a/indra/llvfs/lldiriterator.cpp
+++ b/indra/llvfs/lldiriterator.cpp
@@ -52,8 +52,20 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
{
fs::path dir_path(dirname);
- // Check if path exists.
- if (!fs::exists(dir_path))
+ bool is_dir = false;
+
+ // Check if path is a directory.
+ try
+ {
+ is_dir = fs::is_directory(dir_path);
+ }
+ catch (fs::basic_filesystem_error<fs::path>& e)
+ {
+ llwarns << e.what() << llendl;
+ return;
+ }
+
+ if (!is_dir)
{
llwarns << "Invalid path: \"" << dir_path.string() << "\"" << llendl;
return;
@@ -66,7 +78,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
}
catch (fs::basic_filesystem_error<fs::path>& e)
{
- llerrs << e.what() << llendl;
+ llwarns << e.what() << llendl;
return;
}
@@ -82,7 +94,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
}
catch (boost::regex_error& e)
{
- llerrs << "\"" << exp << "\" is not a valid regular expression: "
+ llwarns << "\"" << exp << "\" is not a valid regular expression: "
<< e.what() << llendl;
return;
}
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index 3d89867bc1..341bddfffd 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -38,7 +38,6 @@ set(llwindow_SOURCE_FILES
llkeyboardheadless.cpp
llwindowheadless.cpp
llwindowcallbacks.cpp
- llwindowlistener.cpp
)
set(llwindow_HEADER_FILES
@@ -48,7 +47,6 @@ set(llwindow_HEADER_FILES
llkeyboardheadless.h
llwindowheadless.h
llwindowcallbacks.h
- llwindowlistener.h
)
set(viewer_SOURCE_FILES
diff --git a/indra/llwindow/GL/glh_extensions.h b/indra/llwindow/GL/glh_extensions.h
index b936b5d307..d89d85930b 100644
--- a/indra/llwindow/GL/glh_extensions.h
+++ b/indra/llwindow/GL/glh_extensions.h
@@ -1,5 +1,7 @@
/*
* glh_extensions.h
+ * $LicenseInfo:firstyear=2006&license=mit$ (mit used here to satisfy validity checker)
+ * Copyright (C) 2006, NVIDIA
* From nVidia Corporation, downloaded 2006-12-18 from:
* http://developer.nvidia.com/attach/8196
* ("NVParse Library with Source (.zip) (2390 KB)")
@@ -8,6 +10,8 @@
* "The files bison.exe, bison.simple, and flex.exe are covered by
* the GPL. All other files in this distribution can be used however
* you want."
+ * $/LicenseInfo$
+
*/
#ifndef GLH_EXTENSIONS
diff --git a/indra/llwindow/GL/glh_genext.h b/indra/llwindow/GL/glh_genext.h
index 8d42025198..cd5d1604a8 100644
--- a/indra/llwindow/GL/glh_genext.h
+++ b/indra/llwindow/GL/glh_genext.h
@@ -1,5 +1,7 @@
/*
* glh_genext.h
+ * $LicenseInfo:firstyear=2008&license=mit$ (mit used here to satisfy validity checker)
+ * Copyright (C) 2008, NVIDIA
* From nVidia Corporation, downloaded 2006-12-18 from:
* http://developer.nvidia.com/attach/8196
* ("NVParse Library with Source (.zip) (2390 KB)")
@@ -8,6 +10,7 @@
* "The files bison.exe, bison.simple, and flex.exe are covered by
* the GPL. All other files in this distribution can be used however
* you want."
+ * $/LicenseInfo$
*/
/* File generated by extgen.cpp -- do not modify */
diff --git a/indra/llwindow/llmousehandler.h b/indra/llwindow/llmousehandler.h
index bbbc3d4406..d825a3424c 100644
--- a/indra/llwindow/llmousehandler.h
+++ b/indra/llwindow/llmousehandler.h
@@ -65,7 +65,7 @@ public:
virtual BOOL handleHover(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) = 0;
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask) = 0;
- virtual std::string getName() const = 0;
+ virtual const std::string& getName() const = 0;
virtual void onMouseCaptureLost() = 0;
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 71a5df910d..1351bed547 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -41,8 +41,6 @@
#include "llkeyboard.h"
#include "linked_lists.h"
#include "llwindowcallbacks.h"
-#include "llwindowlistener.h"
-#include <boost/lambda/core.hpp>
//
@@ -110,25 +108,21 @@ LLWindow::LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags)
mSupportedResolutions(NULL),
mNumSupportedResolutions(0),
mCurrentCursor(UI_CURSOR_ARROW),
+ mNextCursor(UI_CURSOR_ARROW),
mCursorHidden(FALSE),
mBusyCount(0),
mIsMouseClipping(FALSE),
+ mMinWindowWidth(0),
+ mMinWindowHeight(0),
mSwapMethod(SWAP_METHOD_UNDEFINED),
mHideCursorPermanent(FALSE),
mFlags(flags),
mHighSurrogate(0)
{
- // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to
- // pass its value right now. Instead, pass it a nullary function that
- // will, when we later need it, return the value of gKeyboard.
- // boost::lambda::var() constructs such a functor on the fly.
- mListener = new LLWindowListener(callbacks, boost::lambda::var(gKeyboard));
}
LLWindow::~LLWindow()
{
- delete mListener;
- mListener = NULL;
}
//virtual
@@ -188,6 +182,36 @@ void *LLWindow::getMediaWindow()
return getPlatformWindow();
}
+BOOL LLWindow::setSize(LLCoordScreen size)
+{
+ if (!getMaximized())
+ {
+ size.mX = llmin(size.mX, mMinWindowWidth);
+ size.mY = llmin(size.mY, mMinWindowHeight);
+ }
+ return setSizeImpl(size);
+}
+
+
+// virtual
+void LLWindow::setMinSize(U32 min_width, U32 min_height, bool enforce_immediately)
+{
+ mMinWindowWidth = min_width;
+ mMinWindowHeight = min_height;
+
+ if (enforce_immediately)
+ {
+ LLCoordScreen cur_size;
+ if (!getMaximized() && getSize(&cur_size))
+ {
+ if (cur_size.mX < mMinWindowWidth || cur_size.mY < mMinWindowHeight)
+ {
+ setSizeImpl(LLCoordScreen(llmin(cur_size.mX, mMinWindowWidth), llmin(cur_size.mY, mMinWindowHeight)));
+ }
+ }
+ }
+}
+
//virtual
void LLWindow::processMiscNativeEvents()
{
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 6bdc01ae88..cab2d0a8fb 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -36,7 +36,6 @@
class LLSplashScreen;
class LLPreeditor;
class LLWindowCallbacks;
-class LLWindowListener;
// Refer to llwindow_test in test/common/llwindow for usage example
@@ -73,7 +72,8 @@ public:
virtual BOOL getSize(LLCoordScreen *size) = 0;
virtual BOOL getSize(LLCoordWindow *size) = 0;
virtual BOOL setPosition(LLCoordScreen position) = 0;
- virtual BOOL setSize(LLCoordScreen size) = 0;
+ BOOL setSize(LLCoordScreen size);
+ virtual void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
virtual BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) = 0;
virtual BOOL setCursorPosition(LLCoordWindow position) = 0;
virtual BOOL getCursorPosition(LLCoordWindow *position) = 0;
@@ -92,8 +92,9 @@ public:
virtual S32 getBusyCount() const;
// Sets cursor, may set to arrow+hourglass
- virtual void setCursor(ECursorType cursor) = 0;
+ virtual void setCursor(ECursorType cursor) { mNextCursor = cursor; };
virtual ECursorType getCursor() const;
+ virtual void updateCursor() = 0;
virtual void captureMouse() = 0;
virtual void releaseMouse() = 0;
@@ -170,6 +171,8 @@ protected:
// Defaults to true
virtual BOOL canDelete();
+ virtual BOOL setSizeImpl(LLCoordScreen size) = 0;
+
protected:
LLWindowCallbacks* mCallbacks;
@@ -182,6 +185,7 @@ protected:
LLWindowResolution* mSupportedResolutions;
S32 mNumSupportedResolutions;
ECursorType mCurrentCursor;
+ ECursorType mNextCursor;
BOOL mCursorHidden;
S32 mBusyCount; // how deep is the "cursor busy" stack?
BOOL mIsMouseClipping; // Is this window currently clipping the mouse
@@ -189,7 +193,8 @@ protected:
BOOL mHideCursorPermanent;
U32 mFlags;
U16 mHighSurrogate;
- LLWindowListener* mListener;
+ S32 mMinWindowWidth;
+ S32 mMinWindowHeight;
// Handle a UTF-16 encoding unit received from keyboard.
// Converting the series of UTF-16 encoding units to UTF-32 data,
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index ac53e6a86e..d4a778cb85 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -46,7 +46,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
- /*virtual*/ BOOL setSize(LLCoordScreen size) {return FALSE;};
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
@@ -55,7 +55,7 @@ public:
/*virtual*/ void showCursorFromMouseMove() {};
/*virtual*/ void hideCursorUntilMouseMove() {};
/*virtual*/ BOOL isCursorHidden() {return FALSE;};
- /*virtual*/ void setCursor(ECursorType cursor) {};
+ /*virtual*/ void updateCursor() {};
//virtual ECursorType getCursor() { return mCurrentCursor; };
/*virtual*/ void captureMouse() {};
/*virtual*/ void releaseMouse() {};
diff --git a/indra/llwindow/llwindowlistener.cpp b/indra/llwindow/llwindowlistener.cpp
deleted file mode 100644
index 91b99d83c6..0000000000
--- a/indra/llwindow/llwindowlistener.cpp
+++ /dev/null
@@ -1,307 +0,0 @@
-/**
- * @file llwindowlistener.cpp
- * @brief EventAPI interface for injecting input into LLWindow
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "linden_common.h"
-
-#include "llwindowlistener.h"
-
-#include "llcoord.h"
-#include "llkeyboard.h"
-#include "llwindowcallbacks.h"
-#include <map>
-
-LLWindowListener::LLWindowListener(LLWindowCallbacks *window, const KeyboardGetter& kbgetter)
- : LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"),
- mWindow(window),
- mKbGetter(kbgetter)
-{
- std::string keySomething =
- "Given [\"keysym\"], [\"keycode\"] or [\"char\"], inject the specified ";
- std::string keyExplain =
- "(integer keycode values, or keysym \"XXXX\" from any KEY_XXXX, in\n"
- "http://hg.secondlife.com/viewer-development/src/tip/indra/llcommon/indra_constants.h )";
- std::string mask =
- "Specify optional [\"mask\"] as an array containing any of \"CONTROL\", \"ALT\",\n"
- "\"SHIFT\" or \"MAC_CONTROL\"; the corresponding modifier bits will be combined\n"
- "to form the mask used with the event.";
-
- std::string mouseSomething =
- "Given [\"button\"], [\"x\"] and [\"y\"], inject the given mouse ";
- std::string mouseExplain =
- "(button values \"LEFT\", \"MIDDLE\", \"RIGHT\")";
-
- add("keyDown",
- keySomething + "keypress event.\n" + keyExplain + '\n' + mask,
- &LLWindowListener::keyDown);
- add("keyUp",
- keySomething + "key release event.\n" + keyExplain + '\n' + mask,
- &LLWindowListener::keyUp);
- add("mouseDown",
- mouseSomething + "click event.\n" + mouseExplain + '\n' + mask,
- &LLWindowListener::mouseDown);
- add("mouseUp",
- mouseSomething + "release event.\n" + mouseExplain + '\n' + mask,
- &LLWindowListener::mouseUp);
- add("mouseMove",
- std::string("Given [\"x\"] and [\"y\"], inject the given mouse movement event.\n") +
- mask,
- &LLWindowListener::mouseMove);
- add("mouseScroll",
- "Given an integer number of [\"clicks\"], inject the given mouse scroll event.\n"
- "(positive clicks moves downward through typical content)",
- &LLWindowListener::mouseScroll);
-}
-
-template <typename MAPPED>
-class StringLookup
-{
-private:
- std::string mDesc;
- typedef std::map<std::string, MAPPED> Map;
- Map mMap;
-
-public:
- StringLookup(const std::string& desc): mDesc(desc) {}
-
- MAPPED lookup(const typename Map::key_type& key) const
- {
- typename Map::const_iterator found = mMap.find(key);
- if (found == mMap.end())
- {
- LL_WARNS("LLWindowListener") << "Unknown " << mDesc << " '" << key << "'" << LL_ENDL;
- return MAPPED();
- }
- return found->second;
- }
-
-protected:
- void add(const typename Map::key_type& key, const typename Map::mapped_type& value)
- {
- mMap.insert(typename Map::value_type(key, value));
- }
-};
-
-// for WhichKeysym. KeyProxy is like the typedef KEY, except that KeyProxy()
-// (default-constructed) is guaranteed to have the value KEY_NONE.
-class KeyProxy
-{
-public:
- KeyProxy(KEY k): mKey(k) {}
- KeyProxy(): mKey(KEY_NONE) {}
- operator KEY() const { return mKey; }
-
-private:
- KEY mKey;
-};
-
-struct WhichKeysym: public StringLookup<KeyProxy>
-{
- WhichKeysym(): StringLookup<KeyProxy>("keysym")
- {
- add("RETURN", KEY_RETURN);
- add("LEFT", KEY_LEFT);
- add("RIGHT", KEY_RIGHT);
- add("UP", KEY_UP);
- add("DOWN", KEY_DOWN);
- add("ESCAPE", KEY_ESCAPE);
- add("BACKSPACE", KEY_BACKSPACE);
- add("DELETE", KEY_DELETE);
- add("SHIFT", KEY_SHIFT);
- add("CONTROL", KEY_CONTROL);
- add("ALT", KEY_ALT);
- add("HOME", KEY_HOME);
- add("END", KEY_END);
- add("PAGE_UP", KEY_PAGE_UP);
- add("PAGE_DOWN", KEY_PAGE_DOWN);
- add("HYPHEN", KEY_HYPHEN);
- add("EQUALS", KEY_EQUALS);
- add("INSERT", KEY_INSERT);
- add("CAPSLOCK", KEY_CAPSLOCK);
- add("TAB", KEY_TAB);
- add("ADD", KEY_ADD);
- add("SUBTRACT", KEY_SUBTRACT);
- add("MULTIPLY", KEY_MULTIPLY);
- add("DIVIDE", KEY_DIVIDE);
- add("F1", KEY_F1);
- add("F2", KEY_F2);
- add("F3", KEY_F3);
- add("F4", KEY_F4);
- add("F5", KEY_F5);
- add("F6", KEY_F6);
- add("F7", KEY_F7);
- add("F8", KEY_F8);
- add("F9", KEY_F9);
- add("F10", KEY_F10);
- add("F11", KEY_F11);
- add("F12", KEY_F12);
-
- add("PAD_UP", KEY_PAD_UP);
- add("PAD_DOWN", KEY_PAD_DOWN);
- add("PAD_LEFT", KEY_PAD_LEFT);
- add("PAD_RIGHT", KEY_PAD_RIGHT);
- add("PAD_HOME", KEY_PAD_HOME);
- add("PAD_END", KEY_PAD_END);
- add("PAD_PGUP", KEY_PAD_PGUP);
- add("PAD_PGDN", KEY_PAD_PGDN);
- add("PAD_CENTER", KEY_PAD_CENTER); // the 5 in the middle
- add("PAD_INS", KEY_PAD_INS);
- add("PAD_DEL", KEY_PAD_DEL);
- add("PAD_RETURN", KEY_PAD_RETURN);
- add("PAD_ADD", KEY_PAD_ADD); // not used
- add("PAD_SUBTRACT", KEY_PAD_SUBTRACT); // not used
- add("PAD_MULTIPLY", KEY_PAD_MULTIPLY); // not used
- add("PAD_DIVIDE", KEY_PAD_DIVIDE); // not used
-
- add("BUTTON0", KEY_BUTTON0);
- add("BUTTON1", KEY_BUTTON1);
- add("BUTTON2", KEY_BUTTON2);
- add("BUTTON3", KEY_BUTTON3);
- add("BUTTON4", KEY_BUTTON4);
- add("BUTTON5", KEY_BUTTON5);
- add("BUTTON6", KEY_BUTTON6);
- add("BUTTON7", KEY_BUTTON7);
- add("BUTTON8", KEY_BUTTON8);
- add("BUTTON9", KEY_BUTTON9);
- add("BUTTON10", KEY_BUTTON10);
- add("BUTTON11", KEY_BUTTON11);
- add("BUTTON12", KEY_BUTTON12);
- add("BUTTON13", KEY_BUTTON13);
- add("BUTTON14", KEY_BUTTON14);
- add("BUTTON15", KEY_BUTTON15);
- }
-};
-static WhichKeysym keysyms;
-
-struct WhichMask: public StringLookup<MASK>
-{
- WhichMask(): StringLookup<MASK>("shift mask")
- {
- add("NONE", MASK_NONE);
- add("CONTROL", MASK_CONTROL); // Mapped to cmd on Macs
- add("ALT", MASK_ALT);
- add("SHIFT", MASK_SHIFT);
- add("MAC_CONTROL", MASK_MAC_CONTROL); // Un-mapped Ctrl key on Macs, not used on Windows
- }
-};
-static WhichMask masks;
-
-static MASK getMask(const LLSD& event)
-{
- MASK mask(MASK_NONE);
- LLSD masknames(event["mask"]);
- for (LLSD::array_const_iterator ai(masknames.beginArray()), aend(masknames.endArray());
- ai != aend; ++ai)
- {
- mask |= masks.lookup(*ai);
- }
- return mask;
-}
-
-static KEY getKEY(const LLSD& event)
-{
- if (event.has("keysym"))
- {
- return keysyms.lookup(event["keysym"]);
- }
- else if (event.has("keycode"))
- {
- return KEY(event["keycode"].asInteger());
- }
- else
- {
- return KEY(event["char"].asString()[0]);
- }
-}
-
-void LLWindowListener::keyDown(LLSD const & evt)
-{
- mKbGetter()->handleTranslatedKeyDown(getKEY(evt), getMask(evt));
-}
-
-void LLWindowListener::keyUp(LLSD const & evt)
-{
- mKbGetter()->handleTranslatedKeyUp(getKEY(evt), getMask(evt));
-}
-
-// for WhichButton
-typedef BOOL (LLWindowCallbacks::*MouseFunc)(LLWindow *, LLCoordGL, MASK);
-struct Actions
-{
- Actions(const MouseFunc& d, const MouseFunc& u): down(d), up(u), valid(true) {}
- Actions(): valid(false) {}
- MouseFunc down, up;
- bool valid;
-};
-
-struct WhichButton: public StringLookup<Actions>
-{
- WhichButton(): StringLookup<Actions>("mouse button")
- {
- add("LEFT", Actions(&LLWindowCallbacks::handleMouseDown,
- &LLWindowCallbacks::handleMouseUp));
- add("RIGHT", Actions(&LLWindowCallbacks::handleRightMouseDown,
- &LLWindowCallbacks::handleRightMouseUp));
- add("MIDDLE", Actions(&LLWindowCallbacks::handleMiddleMouseDown,
- &LLWindowCallbacks::handleMiddleMouseUp));
- }
-};
-static WhichButton buttons;
-
-static LLCoordGL getPos(const LLSD& event)
-{
- return LLCoordGL(event["x"].asInteger(), event["y"].asInteger());
-}
-
-void LLWindowListener::mouseDown(LLSD const & evt)
-{
- Actions actions(buttons.lookup(evt["button"]));
- if (actions.valid)
- {
- (mWindow->*(actions.down))(NULL, getPos(evt), getMask(evt));
- }
-}
-
-void LLWindowListener::mouseUp(LLSD const & evt)
-{
- Actions actions(buttons.lookup(evt["button"]));
- if (actions.valid)
- {
- (mWindow->*(actions.up))(NULL, getPos(evt), getMask(evt));
- }
-}
-
-void LLWindowListener::mouseMove(LLSD const & evt)
-{
- mWindow->handleMouseMove(NULL, getPos(evt), getMask(evt));
-}
-
-void LLWindowListener::mouseScroll(LLSD const & evt)
-{
- S32 clicks = evt["clicks"].asInteger();
-
- mWindow->handleScrollWheel(NULL, clicks);
-}
-
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index cb2abc5bc0..c952f8bbcf 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1,25 +1,25 @@
-/**
+/**
* @file llwindowmacosx.cpp
* @brief Platform-dependent implementation of llwindow
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -220,10 +220,10 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
// Route them to a dummy callback structure until the end of constructor.
LLWindowCallbacks null_callbacks;
mCallbacks = &null_callbacks;
-
+
// Voodoo for calling cocoa from carbon (see llwindowmacosx-objc.mm).
setupCocoa();
-
+
// Initialize the keyboard
gKeyboard = new LLKeyboardMacOSX();
gKeyboard->setCallbacks(callbacks);
@@ -254,10 +254,10 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
mRawKeyEvent = NULL;
mFSAASamples = fsaa_samples;
mForceRebuild = FALSE;
-
+
// For reasons that aren't clear to me, LLTimers seem to be created in the "started" state.
// Since the started state of this one is used to track whether the NMRec has been installed, it wants to start out in the "stopped" state.
- mBounceTimer.stop();
+ mBounceTimer.stop();
// Get the original aspect ratio of the main device.
mOriginalAspectRatio = (double)CGDisplayPixelsWide(mDisplay) / (double)CGDisplayPixelsHigh(mDisplay);
@@ -270,7 +270,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
mMoveEventCampartorUPP = NewEventComparatorUPP(staticMoveEventComparator);
mGlobalHandlerRef = NULL;
mWindowHandlerRef = NULL;
-
+
mDragOverrideCursor = -1;
// We're not clipping yet
@@ -445,7 +445,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
mFullscreenBits = -1;
mFullscreenRefresh = -1;
- std::string error= llformat("Unable to run fullscreen at %d x %d.\nRunning in window.", width, height);
+ std::string error= llformat("Unable to run fullscreen at %d x %d.\nRunning in window.", width, height);
OSMessageBox(error, "Error", OSMB_OK);
}
}
@@ -477,7 +477,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
kFirstWindowOfClass,
true,
(long)this);
-
+
if (!mWindow)
{
setupFailure("Window creation error", "Error", OSMB_OK);
@@ -493,7 +493,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
InstallStandardEventHandler(GetWindowEventTarget(mWindow));
InstallWindowEventHandler(mWindow, mEventHandlerUPP, GetEventTypeCount (WindowHandlerEventList), WindowHandlerEventList, (void*)this, &mWindowHandlerRef); // add event handler
#if LL_OS_DRAGDROP_ENABLED
- InstallTrackingHandler( dragTrackingHandler, mWindow, (void*)this );
+ InstallTrackingHandler( dragTrackingHandler, mWindow, (void*)this );
InstallReceiveHandler( dragReceiveHandler, mWindow, (void*)this );
#endif // LL_OS_DRAGDROP_ENABLED
}
@@ -790,7 +790,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
LL_DEBUGS("GLinit") << "Keeping vertical sync" << LL_ENDL;
frames_per_swap = 1;
}
- aglSetInteger(mContext, AGL_SWAP_INTERVAL, &frames_per_swap);
+ aglSetInteger(mContext, AGL_SWAP_INTERVAL, &frames_per_swap);
//enable multi-threaded OpenGL
if (sUseMultGL)
@@ -803,7 +803,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
if (cgl_err != kCGLNoError )
{
LL_DEBUGS("GLInit") << "Multi-threaded OpenGL not available." << LL_ENDL;
- }
+ }
else
{
LL_DEBUGS("GLInit") << "Multi-threaded OpenGL enabled." << LL_ENDL;
@@ -1109,7 +1109,7 @@ BOOL LLWindowMacOSX::maximize()
{
ZoomWindow(mWindow, inContent, true);
}
-
+
return mMaximized;
}
@@ -1164,6 +1164,8 @@ void LLWindowMacOSX::gatherInput()
}
}
+
+ updateCursor();
}
BOOL LLWindowMacOSX::getPosition(LLCoordScreen *position)
@@ -1254,7 +1256,7 @@ BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position)
return TRUE;
}
-BOOL LLWindowMacOSX::setSize(const LLCoordScreen size)
+BOOL LLWindowMacOSX::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
@@ -1432,7 +1434,7 @@ static void fixOrigin(void)
GrafPtr port;
Rect portrect;
- ::GetPort(&port);
+ ::GetPort(&port);
::GetPortBounds(port, &portrect);
if((portrect.left != 0) || (portrect.top != 0))
{
@@ -1446,17 +1448,17 @@ BOOL LLWindowMacOSX::getCursorPosition(LLCoordWindow *position)
Point cursor_point;
LLCoordScreen screen_pos;
GrafPtr save;
-
+
if(mWindow == NULL)
return FALSE;
-
+
::GetPort(&save);
::SetPort(GetWindowPort(mWindow));
fixOrigin();
// gets the mouse location in local coordinates
::GetMouse(&cursor_point);
-
+
// lldebugs << "getCursorPosition(): cursor is at " << cursor_point.h << ", " << cursor_point.v << " port origin: " << portrect.left << ", " << portrect.top << llendl;
::SetPort(save);
@@ -1521,7 +1523,7 @@ F32 LLWindowMacOSX::getNativeAspectRatio()
{
// The constructor for this class grabs the aspect ratio of the monitor before doing any resolution
// switching, and stashes it in mOriginalAspectRatio. Here, we just return it.
-
+
if (mOverrideAspectRatio > 0.f)
{
return mOverrideAspectRatio;
@@ -1996,7 +1998,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
if (mPreeditor
&& (result = GetEventParameter(event, kEventParamTextInputSendFixLen,
typeLongInteger, &param_type, sizeof(fix_len), NULL, &fix_len)) == noErr
- && typeLongInteger == param_type
+ && typeLongInteger == param_type
&& (result = GetEventParameter(event, kEventParamTextInputSendText,
typeUnicodeText, &param_type, 0, &text_len, NULL)) == noErr
&& typeUnicodeText == param_type)
@@ -2016,7 +2018,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
mPreeditor->markAsPreedit(location, length);
}
mPreeditor->resetPreedit();
-
+
// Receive the text from input method.
U16 *const text = new U16[text_len / sizeof(U16)];
GetEventParameter(event, kEventParamTextInputSendText, typeUnicodeText, NULL, text_len, NULL, text);
@@ -2055,11 +2057,11 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
GetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray,
NULL, text_range_array_size, NULL, text_range_array);
- // WARNING: We assume ranges are in ascending order,
+ // WARNING: We assume ranges are in ascending order,
// although the condition is undocumented. It seems
// OK to assume this. I also assumed
// the ranges are contiguous in previous versions, but I
- // have heard a rumore that older versions os ATOK may
+ // have heard a rumore that older versions os ATOK may
// return ranges with some _gap_. I don't know whether
// it is true, but I'm preparing my code for the case.
@@ -2123,7 +2125,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
}
}
break;
-
+
case kEventTextInputUnicodeForKeyEvent:
{
UInt32 modifiers = 0;
@@ -2132,7 +2134,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
// First, process the raw event.
{
EventRef rawEvent = NULL;
-
+
// Get the original event and extract the modifier keys, so we can ignore command-key events.
if (GetEventParameter(event, kEventParamTextInputSendKeyboardEvent, typeEventRef, NULL, sizeof(rawEvent), NULL, &rawEvent) == noErr)
{
@@ -2141,7 +2143,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
// and call this function recursively to handle the raw key event.
eventHandler (myHandler, rawEvent);
-
+
// save the raw event until we're done processing the unicode input as well.
mRawKeyEvent = rawEvent;
}
@@ -2172,7 +2174,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
else
{
MASK mask = LLWindowMacOSX::modifiersToMask(modifiers);
-
+
llassert( actualType == typeUnicodeText );
// The result is a UTF16 buffer. Pass the characters in turn to handleUnicodeChar.
@@ -2198,7 +2200,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
result = err;
}
break;
-
+
case kEventTextInputOffsetToPos:
{
EventParamType param_type;
@@ -2211,7 +2213,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
S32 preedit, preedit_length;
mPreeditor->getPreeditRange(&preedit, &preedit_length);
const LLWString & text = mPreeditor->getPreeditString();
-
+
LLCoordGL caret_coord;
LLRect preedit_bounds;
if (0 <= offset
@@ -2225,10 +2227,10 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
qd_point.h = caret_base_coord_screen.mX;
qd_point.v = caret_base_coord_screen.mY;
SetEventParameter(event, kEventParamTextInputReplyPoint, typeQDPoint, sizeof(qd_point), &qd_point);
-
+
short line_height = (short) preedit_bounds.getHeight();
SetEventParameter(event, kEventParamTextInputReplyLineHeight, typeShortInteger, sizeof(line_height), &line_height);
-
+
result = noErr;
}
else
@@ -2281,7 +2283,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventRawKeyRepeat:
if (gDebugWindowProc)
{
- printf("key down, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
+ printf("key down, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
(unsigned int)keyCode, charCode, (char)charCode, (unsigned int)modifiers);
fflush(stdout);
}
@@ -2292,7 +2294,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventRawKeyUp:
if (gDebugWindowProc)
{
- printf("key up, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
+ printf("key up, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
(unsigned int)keyCode, charCode, (char)charCode, (unsigned int)modifiers);
fflush(stdout);
}
@@ -2350,7 +2352,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
}
// When the state of the 'Fn' key (the one that changes some of the mappings on a powerbook/macbook keyboard
- // to an embedded keypad) changes, it may subsequently cause a key up event to be lost, which may lead to
+ // to an embedded keypad) changes, it may subsequently cause a key up event to be lost, which may lead to
// a movement key getting "stuck" down. This is bad.
// This is an OS bug -- even the GetKeys() API doesn't tell you the key has been released.
// This workaround causes all held-down keys to be reset whenever the state of the Fn key changes. This isn't
@@ -2360,14 +2362,14 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
if (gDebugWindowProc) printf("Fn key state change event\n");
gKeyboard->resetKeys();
}
-
+
if (gDebugWindowProc) fflush(stdout);
mLastModifiers = modifiers;
result = eventNotHandledErr;
break;
}
-
+
mRawKeyEvent = NULL;
}
break;
@@ -2462,7 +2464,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventMouseButtonSecondary:
mCallbacks->handleRightMouseDown(this, outCoords, mask);
break;
-
+
case kEventMouseButtonTertiary:
mCallbacks->handleMiddleMouseDown(this, outCoords, mask);
break;
@@ -2524,7 +2526,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventClassWindow:
switch(evtKind)
- {
+ {
case kEventWindowActivated:
if (mTSMDocument)
{
@@ -2539,20 +2541,20 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
}
mCallbacks->handleFocusLost(this);
break;
-
+
case kEventWindowBoundsChanging:
{
// This is where we would constrain move/resize to a particular screen
- const S32 MIN_WIDTH = 320;
- const S32 MIN_HEIGHT = 240;
-
+ const S32 MIN_WIDTH = mMinWindowWidth;
+ const S32 MIN_HEIGHT = mMinWindowHeight;
+
Rect currentBounds;
Rect previousBounds;
GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &currentBounds);
GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &previousBounds);
-
+
// Put an offset into window un-maximize operation since the kEventWindowGetIdealSize
// event only allows the specification of size and not position.
if (mMaximized)
@@ -2560,7 +2562,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
short leftOffset = mPreviousWindowRect.left - currentBounds.left;
currentBounds.left += leftOffset;
currentBounds.right += leftOffset;
-
+
short topOffset = mPreviousWindowRect.top - currentBounds.top;
currentBounds.top += topOffset;
currentBounds.bottom += topOffset;
@@ -2580,7 +2582,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
{
currentBounds.bottom = currentBounds.top + MIN_HEIGHT;
}
-
+
SetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, sizeof(Rect), &currentBounds);
result = noErr;
}
@@ -2591,38 +2593,38 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
// Get new window bounds
Rect newBounds;
GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &newBounds);
-
+
// Get previous window bounds
Rect oldBounds;
GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &oldBounds);
-
+
// Determine if the new size is larger than the old
bool newBoundsLarger = ((newBounds.right - newBounds.left) >= (oldBounds.right - oldBounds.left));
newBoundsLarger &= ((newBounds.bottom - newBounds.top) >= (oldBounds.bottom - oldBounds.top));
-
+
// Check to see if this is a zoom event (+ button on window pane)
unsigned int eventParams;
GetEventParameter(event, kEventParamAttributes, typeUInt32, NULL, sizeof(int), NULL, &eventParams);
bool isZoomEvent = ((eventParams & kWindowBoundsChangeZoom) != 0);
-
+
// Maximized flag is if zoom event and increasing window size
mMaximized = (isZoomEvent && newBoundsLarger);
-
+
aglUpdateContext(mContext);
-
+
mCallbacks->handleResize(this, newBounds.right - newBounds.left, newBounds.bottom - newBounds.top);
}
break;
-
+
case kEventWindowGetIdealSize:
// Only recommend a new ideal size when un-maximizing
if (mMaximized == TRUE)
{
Point nonMaximizedSize;
-
+
nonMaximizedSize.v = mPreviousWindowRect.bottom - mPreviousWindowRect.top;
nonMaximizedSize.h = mPreviousWindowRect.right - mPreviousWindowRect.left;
-
+
SetEventParameter(event, kEventParamDimensions, typeQDPoint, sizeof(Point), &nonMaximizedSize);
result = noErr;
}
@@ -2677,7 +2679,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
if (mPreeditor)
{
switch(evtKind)
- {
+ {
case kEventTSMDocumentAccessGetLength:
{
@@ -2696,14 +2698,14 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
{
// Return the selected range, excluding preedit.
// In our preeditor, preedit and selection are exclusive, so,
- // when it has a preedit, there is no selection and the
+ // when it has a preedit, there is no selection and the
// insertion point is on the preedit that corrupses into the
// beginning of the preedit when the preedit was removed.
S32 preedit, preedit_length;
mPreeditor->getPreeditRange(&preedit, &preedit_length);
const LLWString & text = mPreeditor->getPreeditString();
-
+
CFRange range;
if (preedit_length)
{
@@ -2767,7 +2769,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
memcpy(target_pointer, text_utf16.c_str() + range.location, range.length * sizeof(UniChar));
// Note that result has already been set above.
- }
+ }
}
break;
@@ -2814,14 +2816,14 @@ const char* cursorIDToName(int id)
case UI_CURSOR_TOOLPLAY: return "UI_CURSOR_TOOLPLAY";
case UI_CURSOR_TOOLPAUSE: return "UI_CURSOR_TOOLPAUSE";
case UI_CURSOR_TOOLMEDIAOPEN: return "UI_CURSOR_TOOLMEDIAOPEN";
- case UI_CURSOR_PIPETTE: return "UI_CURSOR_PIPETTE";
+ case UI_CURSOR_PIPETTE: return "UI_CURSOR_PIPETTE";
case UI_CURSOR_TOOLSIT: return "UI_CURSOR_TOOLSIT";
case UI_CURSOR_TOOLBUY: return "UI_CURSOR_TOOLBUY";
case UI_CURSOR_TOOLOPEN: return "UI_CURSOR_TOOLOPEN";
}
llerrs << "cursorIDToName: unknown cursor id" << id << llendl;
-
+
return "UI_CURSOR_ARROW";
}
@@ -2837,42 +2839,42 @@ static void initPixmapCursor(int cursorid, int hotspotX, int hotspotY)
fullpath += gDirUtilp->getDirDelimiter();
fullpath += cursorIDToName(cursorid);
fullpath += ".tif";
-
+
gCursors[cursorid] = createImageCursor(fullpath.c_str(), hotspotX, hotspotY);
}
-void LLWindowMacOSX::setCursor(ECursorType cursor)
+void LLWindowMacOSX::updateCursor()
{
OSStatus result = noErr;
- if (mDragOverrideCursor != -1)
+ if (mDragOverrideCursor != -1)
{
// A drag is in progress...remember the requested cursor and we'll
// restore it when it is done
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
return;
}
- if (cursor == UI_CURSOR_ARROW
+ if (mNextCursor == UI_CURSOR_ARROW
&& mBusyCount > 0)
{
- cursor = UI_CURSOR_WORKING;
+ mNextCursor = UI_CURSOR_WORKING;
}
- if(mCurrentCursor == cursor)
+ if(mCurrentCursor == mNextCursor)
return;
// RN: replace multi-drag cursors with single versions
- if (cursor == UI_CURSOR_ARROWDRAGMULTI)
+ if (mNextCursor == UI_CURSOR_ARROWDRAGMULTI)
{
- cursor = UI_CURSOR_ARROWDRAG;
+ mNextCursor = UI_CURSOR_ARROWDRAG;
}
- else if (cursor == UI_CURSOR_ARROWCOPYMULTI)
+ else if (mNextCursor == UI_CURSOR_ARROWCOPYMULTI)
{
- cursor = UI_CURSOR_ARROWCOPY;
+ mNextCursor = UI_CURSOR_ARROWCOPY;
}
- switch(cursor)
+ switch(mNextCursor)
{
default:
case UI_CURSOR_ARROW:
@@ -2923,7 +2925,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
case UI_CURSOR_TOOLSIT:
case UI_CURSOR_TOOLBUY:
case UI_CURSOR_TOOLOPEN:
- result = setImageCursor(gCursors[cursor]);
+ result = setImageCursor(gCursors[mNextCursor]);
break;
}
@@ -2933,7 +2935,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
InitCursor();
}
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
}
ECursorType LLWindowMacOSX::getCursor() const
@@ -3268,14 +3270,14 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
LLSD LLWindowMacOSX::getNativeKeyData()
{
LLSD result = LLSD::emptyMap();
-
+
if(mRawKeyEvent)
{
char char_code = 0;
UInt32 key_code = 0;
UInt32 modifiers = 0;
UInt32 keyboard_type = 0;
-
+
GetEventParameter (mRawKeyEvent, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &char_code);
GetEventParameter (mRawKeyEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &key_code);
GetEventParameter (mRawKeyEvent, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers);
@@ -3285,7 +3287,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
result["key_code"] = (S32)key_code;
result["modifiers"] = (S32)modifiers;
result["keyboard_type"] = (S32)keyboard_type;
-
+
#if 0
// This causes trouble for control characters -- apparently character codes less than 32 (escape, control-A, etc)
// cause llsd serialization to create XML that the llsd deserializer won't parse!
@@ -3294,7 +3296,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
EventParamType actualType = typeUTF8Text;
UInt32 actualSize = 0;
char *buffer = NULL;
-
+
err = GetEventParameter (mRawKeyEvent, kEventParamKeyUnicodes, typeUTF8Text, &actualType, 0, &actualSize, NULL);
if(err == noErr)
{
@@ -3307,7 +3309,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
}
delete[] buffer;
}
-
+
result["unicode"] = unicode;
#endif
@@ -3315,7 +3317,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
lldebugs << "native key data is: " << result << llendl;
-
+
return result;
}
@@ -3362,17 +3364,17 @@ void *LLWindowMacOSX::getPlatformWindow()
void *LLWindowMacOSX::getMediaWindow()
{
- /*
- Mozilla needs to be initialized with a WindowRef to function properly.
+ /*
+ Mozilla needs to be initialized with a WindowRef to function properly.
(There's no good reason for this, since it shouldn't be interacting with our window in any way, but that's another issue.)
- If we're in windowed mode, we _could_ hand it our actual window pointer, but a subsequent switch to fullscreen will destroy that window,
+ If we're in windowed mode, we _could_ hand it our actual window pointer, but a subsequent switch to fullscreen will destroy that window,
which trips up Mozilla.
Instead of using our actual window, we create an invisible window which will persist for the lifetime of the application and pass that to Mozilla.
This satisfies its deep-seated need to latch onto a WindowRef and solves the issue with switching between fullscreen and windowed modes.
Note that we will never destroy this window (by design!), but since only one will ever be created per run of the application, that's okay.
*/
-
+
if(sMediaWindow == NULL)
{
Rect window_rect = {100, 100, 200, 200};
@@ -3381,13 +3383,13 @@ void *LLWindowMacOSX::getMediaWindow()
NULL,
&window_rect,
(ConstStr255Param) "\p",
- false, // Create the window invisible.
+ false, // Create the window invisible.
zoomDocProc, // Window with a grow box and a zoom box
kLastWindowOfClass, // create it behind other windows
false, // no close box
0);
}
-
+
return (void*)sMediaWindow;
}
@@ -3437,7 +3439,7 @@ void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
}
UseInputWindow(mTSMDocument, !b);
-
+
// Take care of old and new preeditors.
if (preeditor != mPreeditor || !b)
{
@@ -3456,7 +3458,7 @@ void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
return;
}
mLanguageTextInputAllowed = b;
-
+
if (b)
{
if (mTSMScriptCode != smRoman)
@@ -3505,7 +3507,7 @@ MASK LLWindowMacOSX::modifiersToMask(SInt16 modifiers)
if(modifiers & (cmdKey | controlKey)) { mask |= MASK_CONTROL; }
if(modifiers & optionKey) { mask |= MASK_ALT; }
return mask;
-}
+}
#if LL_OS_DRAGDROP_ENABLED
@@ -3516,53 +3518,53 @@ OSErr LLWindowMacOSX::dragTrackingHandler(DragTrackingMessage message, WindowRef
LLWindowMacOSX *self = (LLWindowMacOSX*)handlerRefCon;
lldebugs << "drag tracking handler, message = " << message << llendl;
-
+
switch(message)
{
case kDragTrackingInWindow:
result = self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_TRACK);
break;
-
+
case kDragTrackingEnterHandler:
result = self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_START_TRACKING);
break;
-
+
case kDragTrackingLeaveHandler:
result = self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_STOP_TRACKING);
break;
-
+
default:
break;
}
-
+
return result;
}
-OSErr LLWindowMacOSX::dragReceiveHandler(WindowRef theWindow, void * handlerRefCon,
+OSErr LLWindowMacOSX::dragReceiveHandler(WindowRef theWindow, void * handlerRefCon,
DragRef drag)
-{
+{
LLWindowMacOSX *self = (LLWindowMacOSX*)handlerRefCon;
return self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_DROPPED);
}
OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDropAction action)
-{
+{
OSErr result = dragNotAcceptedErr; // overall function result
OSErr err = noErr; // for local error handling
-
+
// Get the mouse position and modifiers of this drag.
SInt16 modifiers, mouseDownModifiers, mouseUpModifiers;
::GetDragModifiers(drag, &modifiers, &mouseDownModifiers, &mouseUpModifiers);
MASK mask = LLWindowMacOSX::modifiersToMask(modifiers);
-
+
Point mouse_point;
// This will return the mouse point in global screen coords
::GetDragMouse(drag, &mouse_point, NULL);
LLCoordScreen screen_coords(mouse_point.h, mouse_point.v);
LLCoordGL gl_pos;
convertCoords(screen_coords, &gl_pos);
-
+
// Look at the pasteboard and try to extract an URL from it
PasteboardRef pasteboard;
if(GetDragPasteboard(drag, &pasteboard) == noErr)
@@ -3570,22 +3572,22 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
ItemCount num_items = 0;
// Treat an error here as an item count of 0
(void)PasteboardGetItemCount(pasteboard, &num_items);
-
+
// Only deal with single-item drags.
if(num_items == 1)
{
PasteboardItemID item_id = NULL;
CFArrayRef flavors = NULL;
CFDataRef data = NULL;
-
+
err = PasteboardGetItemIdentifier(pasteboard, 1, &item_id); // Yes, this really is 1-based.
-
+
// Try to extract an URL from the pasteboard
if(err == noErr)
{
err = PasteboardCopyItemFlavors( pasteboard, item_id, &flavors);
}
-
+
if(err == noErr)
{
if(CFArrayContainsValue(flavors, CFRangeMake(0, CFArrayGetCount(flavors)), kUTTypeURL))
@@ -3598,9 +3600,9 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
// This is a string that might be an URL.
err = PasteboardCopyItemFlavorData(pasteboard, item_id, kUTTypeUTF8PlainText, &data);
}
-
+
}
-
+
if(flavors != NULL)
{
CFRelease(flavors);
@@ -3611,12 +3613,12 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
std::string url;
url.assign((char*)CFDataGetBytePtr(data), CFDataGetLength(data));
CFRelease(data);
-
+
if(!url.empty())
{
- LLWindowCallbacks::DragNDropResult res =
+ LLWindowCallbacks::DragNDropResult res =
mCallbacks->handleDragNDrop(this, gl_pos, mask, action, url);
-
+
switch (res) {
case LLWindowCallbacks::DND_NONE: // No drop allowed
if (action == LLWindowCallbacks::DNDA_TRACK)
@@ -3651,7 +3653,7 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
// Restore the cursor
ECursorType temp_cursor = mCurrentCursor;
// get around the "setting the same cursor" code in setCursor()
- mCurrentCursor = UI_CURSOR_COUNT;
+ mCurrentCursor = UI_CURSOR_COUNT;
setCursor(temp_cursor);
}
else {
@@ -3663,7 +3665,7 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
}
}
}
-
+
return result;
}
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 6c9e075a21..073f294b54 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -58,7 +58,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
- /*virtual*/ BOOL setSize(LLCoordScreen size);
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -67,7 +67,7 @@ public:
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
- /*virtual*/ void setCursor(ECursorType cursor);
+ /*virtual*/ void updateCursor();
/*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index fd4bd635e2..8f70aee4f6 100644
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -50,7 +50,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
- /*virtual*/ BOOL setSize(LLCoordScreen size) {return FALSE;};
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
@@ -59,7 +59,7 @@ public:
/*virtual*/ void showCursorFromMouseMove() {};
/*virtual*/ void hideCursorUntilMouseMove() {};
/*virtual*/ BOOL isCursorHidden() {return FALSE;};
- /*virtual*/ void setCursor(ECursorType cursor) {};
+ /*virtual*/ void updateCursor() {};
//virtual ECursorType getCursor() { return mCurrentCursor; };
/*virtual*/ void captureMouse() {};
/*virtual*/ void releaseMouse() {};
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index b65287715c..5f5baceef8 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -963,7 +963,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
return TRUE;
}
-BOOL LLWindowSDL::setSize(const LLCoordScreen size)
+BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
@@ -984,7 +984,9 @@ BOOL LLWindowSDL::setSize(const LLCoordScreen size)
void LLWindowSDL::swapBuffers()
{
if (mWindow)
+ {
SDL_GL_SwapBuffers();
+ }
}
U32 LLWindowSDL::getFSAASamples()
@@ -1031,6 +1033,25 @@ void LLWindowSDL::setMouseClipping( BOOL b )
//SDL_WM_GrabInput(b ? SDL_GRAB_ON : SDL_GRAB_OFF);
}
+// virtual
+void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immediately)
+{
+ LLWindow::setMinSize(min_width, min_height, enforce_immediately);
+
+#if LL_X11
+ // Set the minimum size limits for X11 window
+ // so the window manager doesn't allow resizing below those limits.
+ XSizeHints* hints = XAllocSizeHints();
+ hints->flags |= PMinSize;
+ hints->min_width = mMinWindowWidth;
+ hints->min_height = mMinWindowHeight;
+
+ XSetWMNormalHints(mSDL_Display, mSDL_XWindowID, hints);
+
+ XFree(hints);
+#endif
+}
+
BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position)
{
BOOL result = TRUE;
@@ -1840,11 +1861,15 @@ void LLWindowSDL::gatherInput()
break;
case SDL_VIDEORESIZE: // *FIX: handle this?
+ {
llinfos << "Handling a resize event: " << event.resize.w <<
"x" << event.resize.h << llendl;
+ S32 width = llmax(event.resize.w, (S32)mMinWindowWidth);
+ S32 height = llmax(event.resize.h, (S32)mMinWindowHeight);
+
// *FIX: I'm not sure this is necessary!
- mWindow = SDL_SetVideoMode(event.resize.w, event.resize.h, 32, mSDLFlags);
+ mWindow = SDL_SetVideoMode(width, height, 32, mSDLFlags);
if (!mWindow)
{
// *FIX: More informative dialog?
@@ -1857,10 +1882,10 @@ void LLWindowSDL::gatherInput()
}
break;
}
-
- mCallbacks->handleResize(this, event.resize.w, event.resize.h );
- break;
+ mCallbacks->handleResize(this, width, height);
+ break;
+ }
case SDL_ACTIVEEVENT:
if (event.active.state & SDL_APPINPUTFOCUS)
{
@@ -1911,6 +1936,8 @@ void LLWindowSDL::gatherInput()
break;
}
}
+
+ updateCursor();
#if LL_X11
// This is a good time to stop flashing the icon if our mFlashTimer has
@@ -1997,7 +2024,7 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty
return sdlcursor;
}
-void LLWindowSDL::setCursor(ECursorType cursor)
+void LLWindowSDL::updateCursor()
{
if (ATIbug) {
// cursor-updating is very flaky when this bug is
@@ -2005,11 +2032,11 @@ void LLWindowSDL::setCursor(ECursorType cursor)
return;
}
- if (mCurrentCursor != cursor)
+ if (mCurrentCursor != mNextCursor)
{
- if (cursor < UI_CURSOR_COUNT)
+ if (mNextCursor < UI_CURSOR_COUNT)
{
- SDL_Cursor *sdlcursor = mSDLCursors[cursor];
+ SDL_Cursor *sdlcursor = mSDLCursors[mNextCursor];
// Try to default to the arrow for any cursors that
// did not load correctly.
if (!sdlcursor && mSDLCursors[UI_CURSOR_ARROW])
@@ -2017,9 +2044,9 @@ void LLWindowSDL::setCursor(ECursorType cursor)
if (sdlcursor)
SDL_SetCursor(sdlcursor);
} else {
- llwarns << "Tried to set invalid cursor number " << cursor << llendl;
+ llwarns << "Tried to set invalid cursor number " << mNextCursor << llendl;
}
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
}
}
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index fa544b16ce..59719e4046 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -63,7 +63,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
- /*virtual*/ BOOL setSize(LLCoordScreen size);
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -72,10 +72,11 @@ public:
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
- /*virtual*/ void setCursor(ECursorType cursor);
+ /*virtual*/ void updateCursor();
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
+ /*virtual*/ void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 551d487cc8..52c27b6736 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -41,6 +41,7 @@
#include "llgl.h"
#include "llstring.h"
#include "lldir.h"
+#include "llglslshader.h"
// System includes
#include <commdlg.h>
@@ -861,7 +862,7 @@ BOOL LLWindowWin32::setPosition(const LLCoordScreen position)
return TRUE;
}
-BOOL LLWindowWin32::setSize(const LLCoordScreen size)
+BOOL LLWindowWin32::setSizeImpl(const LLCoordScreen size)
{
LLCoordScreen position;
@@ -1031,6 +1032,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
mhInstance,
NULL);
+ LL_INFOS("Window") << "window is created." << llendl ;
+
//-----------------------------------------------------------------------
// Create GL drawing context
//-----------------------------------------------------------------------
@@ -1120,8 +1123,10 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
return FALSE;
}
- gGLManager.initWGL();
+ LL_INFOS("Window") << "Drawing context is created." << llendl ;
+ gGLManager.initWGL();
+
if (wglChoosePixelFormatARB)
{
// OK, at this point, use the ARB wglChoosePixelFormatsARB function to see if we
@@ -1172,8 +1177,39 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
// First we try and get a 32 bit depth pixel format
BOOL result = wglChoosePixelFormatARB(mhDC, attrib_list, NULL, 256, pixel_formats, &num_formats);
+
+ while(!result && mFSAASamples > 0)
+ {
+ llwarns << "FSAASamples: " << mFSAASamples << " not supported." << llendl ;
+
+ mFSAASamples /= 2 ; //try to decrease sample pixel number until to disable anti-aliasing
+ if(mFSAASamples < 2)
+ {
+ mFSAASamples = 0 ;
+ }
+
+ if (mFSAASamples > 0)
+ {
+ attrib_list[end_attrib + 3] = mFSAASamples;
+ }
+ else
+ {
+ cur_attrib = end_attrib ;
+ end_attrib = 0 ;
+ attrib_list[cur_attrib++] = 0 ; //end
+ }
+ result = wglChoosePixelFormatARB(mhDC, attrib_list, NULL, 256, pixel_formats, &num_formats);
+
+ if(result)
+ {
+ llwarns << "Only support FSAASamples: " << mFSAASamples << llendl ;
+ }
+ }
+
if (!result)
{
+ llwarns << "mFSAASamples: " << mFSAASamples << llendl ;
+
close();
show_window_creation_error("Error after wglChoosePixelFormatARB 32-bit");
return FALSE;
@@ -1225,7 +1261,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
LL_INFOS("Window") << "Choosing pixel formats: " << num_formats << " pixel formats returned" << LL_ENDL;
}
-
+ LL_INFOS("Window") << "pixel formats done." << llendl ;
S32 swap_method = 0;
S32 cur_format = num_formats-1;
@@ -1275,6 +1311,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
mhInstance,
NULL);
+ LL_INFOS("Window") << "recreate window done." << llendl ;
+
if (!(mhDC = GetDC(mWindowHandle)))
{
close();
@@ -1347,7 +1385,53 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
return FALSE;
}
- if (!(mhRC = wglCreateContext(mhDC)))
+ mhRC = 0;
+ if (wglCreateContextAttribsARB)
+ { //attempt to create a specific versioned context
+ S32 attribs[] =
+ { //start at 4.2
+ WGL_CONTEXT_MAJOR_VERSION_ARB, 4,
+ WGL_CONTEXT_MINOR_VERSION_ARB, 2,
+ WGL_CONTEXT_PROFILE_MASK_ARB, LLRender::sGLCoreProfile ? WGL_CONTEXT_CORE_PROFILE_BIT_ARB : WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
+ WGL_CONTEXT_FLAGS_ARB, gDebugGL ? WGL_CONTEXT_DEBUG_BIT_ARB : 0,
+ 0
+ };
+
+ bool done = false;
+ while (!done)
+ {
+ mhRC = wglCreateContextAttribsARB(mhDC, mhRC, attribs);
+
+ if (!mhRC)
+ {
+ if (attribs[3] > 0)
+ { //decrement minor version
+ attribs[3]--;
+ }
+ else if (attribs[1] > 3)
+ { //decrement major version and start minor version over at 3
+ attribs[1]--;
+ attribs[3] = 3;
+ }
+ else
+ { //we reached 3.0 and still failed, bail out
+ done = true;
+ }
+ }
+ else
+ {
+ llinfos << "Created OpenGL " << llformat("%d.%d", attribs[1], attribs[3]) << " context." << llendl;
+ done = true;
+
+ if (LLRender::sGLCoreProfile)
+ {
+ LLGLSLShader::sNoFixedFunction = true;
+ }
+ }
+ }
+ }
+
+ if (!mhRC && !(mhRC = wglCreateContext(mhDC)))
{
close();
OSMessageBox(mCallbacks->translateString("MBGLContextErr"), mCallbacks->translateString("MBError"), OSMB_OK);
@@ -1367,7 +1451,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
OSMessageBox(mCallbacks->translateString("MBVideoDrvErr"), mCallbacks->translateString("MBError"), OSMB_OK);
return FALSE;
}
-
+
// Disable vertical sync for swap
if (disable_vsync && wglSwapIntervalEXT)
{
@@ -1583,18 +1667,18 @@ void LLWindowWin32::initCursors()
-void LLWindowWin32::setCursor(ECursorType cursor)
+void LLWindowWin32::updateCursor()
{
- if (cursor == UI_CURSOR_ARROW
+ if (mNextCursor == UI_CURSOR_ARROW
&& mBusyCount > 0)
{
- cursor = UI_CURSOR_WORKING;
+ mNextCursor = UI_CURSOR_WORKING;
}
- if( mCurrentCursor != cursor )
+ if( mCurrentCursor != mNextCursor )
{
- mCurrentCursor = cursor;
- SetCursor( mCursor[cursor] );
+ mCurrentCursor = mNextCursor;
+ SetCursor( mCursor[mNextCursor] );
}
}
@@ -1676,6 +1760,8 @@ void LLWindowWin32::gatherInput()
mInputProcessingPaused = FALSE;
+ updateCursor();
+
// clear this once we've processed all mouse messages that might have occurred after
// we slammed the mouse position
mMousePositionModified = FALSE;
@@ -2323,6 +2409,14 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
return 0;
}
+ case WM_GETMINMAXINFO:
+ {
+ LPMINMAXINFO min_max = (LPMINMAXINFO)l_param;
+ min_max->ptMinTrackSize.x = window_imp->mMinWindowWidth;
+ min_max->ptMinTrackSize.y = window_imp->mMinWindowHeight;
+ return 0;
+ }
+
case WM_SIZE:
{
window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SIZE");
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 387e4cbdb6..b3602be8b7 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -57,7 +57,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
- /*virtual*/ BOOL setSize(LLCoordScreen size);
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -66,7 +66,7 @@ public:
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
- /*virtual*/ void setCursor(ECursorType cursor);
+ /*virtual*/ void updateCursor();
/*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt
index 21cdf5f926..beefcda361 100644
--- a/indra/llxml/CMakeLists.txt
+++ b/indra/llxml/CMakeLists.txt
@@ -48,22 +48,22 @@ target_link_libraries( llxml
# tests
if (LL_TESTS)
- # unit tests
+ # unit tests
- SET(llxml_TEST_SOURCE_FILES
- # none yet!
- )
- LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}")
+ SET(llxml_TEST_SOURCE_FILES
+ # none yet!
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}")
- # integration tests
+ # integration tests
- # set(TEST_DEBUG on)
- set(test_libs
- ${LLXML_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- )
+ # set(TEST_DEBUG on)
+ set(test_libs
+ ${LLXML_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
+ ${LLMATH_LIBRARIES}
+ ${LLCOMMON_LIBRARIES}
+ )
- LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}")
+ LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}")
endif (LL_TESTS)
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index e402061e1f..bf38a8b062 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -185,9 +185,10 @@ protected:
ctrl_name_table_t mNameTable;
std::string mTypeString[TYPE_COUNT];
+public:
eControlType typeStringToEnum(const std::string& typestr);
std::string typeEnumToString(eControlType typeenum);
-public:
+
LLControlGroup(const std::string& name);
~LLControlGroup();
void cleanup();
@@ -385,7 +386,8 @@ class LLCachedControl
{
public:
LLCachedControl(LLControlGroup& group,
- const std::string& name,
+ const std::string& name,
+
const T& default_value,
const std::string& comment = "Declared In Code")
{
diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp
index c024fd405e..db72aa19b9 100644
--- a/indra/llxuixml/llinitparam.cpp
+++ b/indra/llxuixml/llinitparam.cpp
@@ -40,7 +40,7 @@ namespace LLInitParam
{
const U8* my_addr = reinterpret_cast<const U8*>(this);
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
- mEnclosingBlockOffset = 0x7FFFffff & ((U32)(my_addr - block_addr));
+ mEnclosingBlockOffset = 0x7FFFffff & (U32)(my_addr - block_addr);
}
//
@@ -62,7 +62,6 @@ namespace LLInitParam
mInspectFunc(inspect_func),
mMinCount(min_count),
mMaxCount(max_count),
- mGeneration(0),
mUserData(NULL)
{}
@@ -75,7 +74,6 @@ namespace LLInitParam
mInspectFunc(NULL),
mMinCount(0),
mMaxCount(0),
- mGeneration(0),
mUserData(NULL)
{}
@@ -87,8 +85,6 @@ namespace LLInitParam
//
// Parser
//
- S32 Parser::sNextParseGeneration = 0;
-
Parser::~Parser()
{}
@@ -122,16 +118,6 @@ namespace LLInitParam
mCurrentBlockPtr(NULL)
{}
- //
- // BaseBlock
- //
- BaseBlock::BaseBlock()
- : mChangeVersion(0)
- {}
-
- BaseBlock::~BaseBlock()
- {}
-
// called by each derived class in least to most derived order
void BaseBlock::init(BlockDescriptor& descriptor, BlockDescriptor& base_descriptor, size_t block_size)
{
@@ -162,9 +148,9 @@ namespace LLInitParam
return (param_address - baseblock_address);
}
- bool BaseBlock::submitValue(const Parser::name_stack_t& name_stack, Parser& p, bool silent)
+ bool BaseBlock::submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent)
{
- if (!deserializeBlock(p, std::make_pair(name_stack.begin(), name_stack.end()), -1))
+ if (!deserializeBlock(p, std::make_pair(name_stack.begin(), name_stack.end()), true))
{
if (!silent)
{
@@ -194,7 +180,7 @@ namespace LLInitParam
return true;
}
- void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const
+ void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const LLInitParam::BaseBlock* diff_block) const
{
// named param is one like LLView::Params::follows
// unnamed param is like LLView::Params::rect - implicit
@@ -213,8 +199,7 @@ namespace LLInitParam
// each param descriptor remembers its serial number
// so we can inspect the same param under different names
// and see that it has the same number
- (*it)->mGeneration = parser.newParseGeneration();
- name_stack.push_back(std::make_pair("", (*it)->mGeneration));
+ name_stack.push_back(std::make_pair("", true));
serialize_func(*param, parser, name_stack, diff_param);
name_stack.pop_back();
}
@@ -250,12 +235,7 @@ namespace LLInitParam
continue;
}
- if (!duplicate)
- {
- it->second->mGeneration = parser.newParseGeneration();
- }
-
- name_stack.push_back(std::make_pair(it->first, it->second->mGeneration));
+ name_stack.push_back(std::make_pair(it->first, !duplicate));
const Param* diff_param = diff_block ? diff_block->getParamFromHandle(param_handle) : NULL;
serialize_func(*param, parser, name_stack, diff_param);
name_stack.pop_back();
@@ -278,8 +258,7 @@ namespace LLInitParam
ParamDescriptor::inspect_func_t inspect_func = (*it)->mInspectFunc;
if (inspect_func)
{
- (*it)->mGeneration = parser.newParseGeneration();
- name_stack.push_back(std::make_pair("", (*it)->mGeneration));
+ name_stack.push_back(std::make_pair("", true));
inspect_func(*param, parser, name_stack, (*it)->mMinCount, (*it)->mMaxCount);
name_stack.pop_back();
}
@@ -307,11 +286,7 @@ namespace LLInitParam
}
}
- if (!duplicate)
- {
- it->second->mGeneration = parser.newParseGeneration();
- }
- name_stack.push_back(std::make_pair(it->first, it->second->mGeneration));
+ name_stack.push_back(std::make_pair(it->first, !duplicate));
inspect_func(*param, parser, name_stack, it->second->mMinCount, it->second->mMaxCount);
name_stack.pop_back();
}
@@ -320,16 +295,18 @@ namespace LLInitParam
return true;
}
- bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 parent_generation)
+ bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool ignored)
{
BlockDescriptor& block_data = mostDerivedBlockDescriptor();
- bool names_left = name_stack.first != name_stack.second;
+ bool names_left = name_stack_range.first != name_stack_range.second;
- S32 parse_generation = name_stack.first == name_stack.second ? -1 : name_stack.first->second;
+ bool new_name = names_left
+ ? name_stack_range.first->second
+ : true;
if (names_left)
{
- const std::string& top_name = name_stack.first->first;
+ const std::string& top_name = name_stack_range.first->first;
ParamDescriptor::deserialize_func_t deserialize_func = NULL;
Param* paramp = NULL;
@@ -341,9 +318,18 @@ namespace LLInitParam
paramp = getParamFromHandle(found_it->second->mParamHandle);
deserialize_func = found_it->second->mDeserializeFunc;
- Parser::name_stack_range_t new_name_stack(name_stack.first, name_stack.second);
+ Parser::name_stack_range_t new_name_stack(name_stack_range.first, name_stack_range.second);
++new_name_stack.first;
- return deserialize_func(*paramp, p, new_name_stack, parse_generation);
+ if (deserialize_func(*paramp, p, new_name_stack, new_name))
+ {
+ // value is no longer new, we know about it now
+ name_stack_range.first->second = false;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
}
@@ -355,7 +341,7 @@ namespace LLInitParam
Param* paramp = getParamFromHandle((*it)->mParamHandle);
ParamDescriptor::deserialize_func_t deserialize_func = (*it)->mDeserializeFunc;
- if (deserialize_func && deserialize_func(*paramp, p, name_stack, parse_generation))
+ if (deserialize_func && deserialize_func(*paramp, p, name_stack_range, new_name))
{
return true;
}
@@ -365,7 +351,7 @@ namespace LLInitParam
// verify by calling readValue with NoParamValue type, an inherently unparseable type
if (!names_left)
{
- NoParamValue no_value;
+ Flag no_value;
return p.readValue(no_value);
}
@@ -431,14 +417,6 @@ namespace LLInitParam
}
}
- void BaseBlock::paramChanged(const Param& changed_param, bool user_provided)
- {
- if (user_provided)
- {
- mChangeVersion++;
- }
- }
-
const std::string& BaseBlock::getParamName(const BlockDescriptor& block_data, const Param* paramp) const
{
param_handle_t handle = getHandleFromParam(paramp);
@@ -482,6 +460,7 @@ namespace LLInitParam
if (merge_func)
{
Param* paramp = getParamFromHandle((*it)->mParamHandle);
+ llassert(paramp->mEnclosingBlockOffset == (*it)->mParamHandle);
some_param_changed |= merge_func(*paramp, *other_paramp, overwrite);
}
}
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h
index 35c889b69f..ab20957760 100644
--- a/indra/llxuixml/llinitparam.h
+++ b/indra/llxuixml/llinitparam.h
@@ -38,6 +38,9 @@
namespace LLInitParam
{
+ // used to indicate no matching value to a given name when parsing
+ struct Flag{};
+
template<typename T> const T& defaultValue() { static T value; return value; }
template <typename T, bool IS_BOOST_FUNCTION = boost::is_convertible<T, boost::function_base>::value >
@@ -48,7 +51,7 @@ namespace LLInitParam
return a == b;
}
};
-
+
// boost function types are not comparable
template<typename T>
struct ParamCompare<T, true>
@@ -65,6 +68,13 @@ namespace LLInitParam
static bool equals(const LLSD &a, const LLSD &b) { return false; }
};
+ template<>
+ struct ParamCompare<Flag, false>
+ {
+ static bool equals(const Flag& a, const Flag& b) { return false; }
+ };
+
+
// helper functions and classes
typedef ptrdiff_t param_handle_t;
@@ -73,11 +83,15 @@ namespace LLInitParam
template <typename T>
class TypeValues
{
+ private:
+ struct Inaccessable{};
public:
typedef std::map<std::string, T> value_name_map_t;
+ typedef Inaccessable name_t;
void setValueName(const std::string& key) {}
std::string getValueName() const { return ""; }
+ std::string calcValueName(const T& value) const { return ""; }
void clearValueName() const {}
static bool getValueFromName(const std::string& name, T& value)
@@ -103,6 +117,7 @@ namespace LLInitParam
{
public:
typedef typename std::map<std::string, T> value_name_map_t;
+ typedef std::string name_t;
//TODO: cache key by index to save on param block size
void setValueName(const std::string& value_name)
@@ -115,6 +130,22 @@ namespace LLInitParam
return mValueName;
}
+ std::string calcValueName(const T& value) const
+ {
+ value_name_map_t* map = getValueNames();
+ for (typename value_name_map_t::iterator it = map->begin(), end_it = map->end();
+ it != end_it;
+ ++it)
+ {
+ if (ParamCompare<T>::equals(it->second, value))
+ {
+ return it->first;
+ }
+ }
+
+ return "";
+ }
+
void clearValueName() const
{
mValueName.clear();
@@ -188,13 +219,13 @@ namespace LLInitParam
}
};
- typedef std::vector<std::pair<std::string, S32> > name_stack_t;
- typedef std::pair<name_stack_t::const_iterator, name_stack_t::const_iterator> name_stack_range_t;
- typedef std::vector<std::string> possible_values_t;
+ typedef std::vector<std::pair<std::string, bool> > name_stack_t;
+ typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t;
+ typedef std::vector<std::string> possible_values_t;
typedef bool (*parser_read_func_t)(Parser& parser, void* output);
- typedef bool (*parser_write_func_t)(Parser& parser, const void*, const name_stack_t&);
- typedef boost::function<void (const name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t;
+ typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&);
+ typedef boost::function<void (name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t;
typedef std::map<const std::type_info*, parser_read_func_t, CompareTypeID> parser_read_func_map_t;
typedef std::map<const std::type_info*, parser_write_func_t, CompareTypeID> parser_write_func_map_t;
@@ -202,7 +233,6 @@ namespace LLInitParam
Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)
: mParseSilently(false),
- mParseGeneration(sNextParseGeneration),
mParserReadFuncs(&read_map),
mParserWriteFuncs(&write_map),
mParserInspectFuncs(&inspect_map)
@@ -219,7 +249,7 @@ namespace LLInitParam
return false;
}
- template <typename T> bool writeValue(const T& param, const name_stack_t& name_stack)
+ template <typename T> bool writeValue(const T& param, name_stack_t& name_stack)
{
parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T));
if (found_it != mParserWriteFuncs->end())
@@ -230,7 +260,7 @@ namespace LLInitParam
}
// dispatch inspection to registered inspection functions, for each parameter in a param block
- template <typename T> bool inspectValue(const name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values)
+ template <typename T> bool inspectValue(name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values)
{
parser_inspect_func_map_t::iterator found_it = mParserInspectFuncs->find(&typeid(T));
if (found_it != mParserInspectFuncs->end())
@@ -246,10 +276,6 @@ namespace LLInitParam
virtual void parserError(const std::string& message);
void setParseSilently(bool silent) { mParseSilently = silent; }
- S32 getParseGeneration() { return mParseGeneration; }
- S32 newParseGeneration() { return mParseGeneration = ++sNextParseGeneration; }
-
-
protected:
template <typename T>
void registerParserFuncs(parser_read_func_t read_func, parser_write_func_t write_func = NULL)
@@ -270,44 +296,9 @@ namespace LLInitParam
parser_read_func_map_t* mParserReadFuncs;
parser_write_func_map_t* mParserWriteFuncs;
parser_inspect_func_map_t* mParserInspectFuncs;
- S32 mParseGeneration;
-
- static S32 sNextParseGeneration;
};
- // used to indicate no matching value to a given name when parsing
- struct NoParamValue{};
-
- class BaseBlock;
-
- class Param
- {
- public:
- // public to allow choice blocks to clear provided flag on stale choices
- void setProvided(bool is_provided) { mIsProvided = is_provided; }
-
- protected:
- bool anyProvided() const { return mIsProvided; }
-
- Param(class BaseBlock* enclosing_block);
-
- // store pointer to enclosing block as offset to reduce space and allow for quick copying
- class BaseBlock& enclosingBlock() const
- {
- const U8* my_addr = reinterpret_cast<const U8*>(this);
- // get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class
- return *const_cast<class BaseBlock*>
- (reinterpret_cast<const class BaseBlock*>
- (my_addr - (ptrdiff_t)(S32)mEnclosingBlockOffset));
- }
-
- private:
- friend class BaseBlock;
-
- U32 mEnclosingBlockOffset:31;
- U32 mIsProvided:1;
-
- };
+ class Param;
// various callbacks and constraints associated with an individual param
struct ParamDescriptor
@@ -318,7 +309,7 @@ namespace LLInitParam
};
typedef bool(*merge_func_t)(Param&, const Param&, bool);
- typedef bool(*deserialize_func_t)(Param&, Parser&, const Parser::name_stack_range_t&, S32);
+ typedef bool(*deserialize_func_t)(Param&, Parser&, const Parser::name_stack_range_t&, bool);
typedef void(*serialize_func_t)(const Param&, Parser&, Parser::name_stack_t&, const Param* diff_param);
typedef void(*inspect_func_t)(const Param&, Parser&, Parser::name_stack_t&, S32 min_count, S32 max_count);
typedef bool(*validation_func_t)(const Param*);
@@ -343,7 +334,6 @@ namespace LLInitParam
validation_func_t mValidationFunc;
S32 mMinCount;
S32 mMaxCount;
- S32 mGeneration;
S32 mNumRefs;
UserData* mUserData;
};
@@ -367,56 +357,133 @@ namespace LLInitParam
typedef boost::unordered_map<const std::string, ParamDescriptorPtr> param_map_t;
typedef std::vector<ParamDescriptorPtr> param_list_t;
- typedef std::list<ParamDescriptorPtr> all_params_list_t;
+ typedef std::list<ParamDescriptorPtr> all_params_list_t;
typedef std::vector<std::pair<param_handle_t, ParamDescriptor::validation_func_t> > param_validation_list_t;
param_map_t mNamedParams; // parameters with associated names
param_list_t mUnnamedParams; // parameters with_out_ associated names
param_validation_list_t mValidationList; // parameters that must be validated
all_params_list_t mAllParams; // all parameters, owns descriptors
-
- size_t mMaxParamOffset;
-
- EInitializationState mInitializationState; // whether or not static block data has been initialized
- class BaseBlock* mCurrentBlockPtr; // pointer to block currently being constructed
+ size_t mMaxParamOffset;
+ EInitializationState mInitializationState; // whether or not static block data has been initialized
+ class BaseBlock* mCurrentBlockPtr; // pointer to block currently being constructed
};
class BaseBlock
{
public:
+ //TODO: implement in terms of owned_ptr
+ template<typename T>
+ class Lazy
+ {
+ public:
+ Lazy()
+ : mPtr(NULL)
+ {}
+
+ ~Lazy()
+ {
+ delete mPtr;
+ }
+
+ Lazy(const Lazy& other)
+ {
+ if (other.mPtr)
+ {
+ mPtr = new T(*other.mPtr);
+ }
+ else
+ {
+ mPtr = NULL;
+ }
+ }
+
+ Lazy<T>& operator = (const Lazy<T>& other)
+ {
+ if (other.mPtr)
+ {
+ mPtr = new T(*other.mPtr);
+ }
+ else
+ {
+ mPtr = NULL;
+ }
+ return *this;
+ }
+
+ bool empty() const
+ {
+ return mPtr == NULL;
+ }
+
+ void set(const T& other)
+ {
+ delete mPtr;
+ mPtr = new T(other);
+ }
+
+ const T& get() const
+ {
+ return ensureInstance();
+ }
+
+ T& get()
+ {
+ return ensureInstance();
+ }
+
+ private:
+ // lazily allocate an instance of T
+ T* ensureInstance() const
+ {
+ if (mPtr == NULL)
+ {
+ mPtr = new T();
+ }
+ return mPtr;
+ }
+
+ private:
+ // if you get a compilation error with this, that means you are using a forward declared struct for T
+ // unfortunately, the type traits we rely on don't work with forward declared typed
+ //static const int dummy = sizeof(T);
+
+ mutable T* mPtr;
+ };
+
// "Multiple" constraint types, put here in root class to avoid ambiguity during use
struct AnyAmount
{
- static U32 minCount() { return 0; }
- static U32 maxCount() { return U32_MAX; }
+ enum { minCount = 0 };
+ enum { maxCount = U32_MAX };
};
template<U32 MIN_AMOUNT>
struct AtLeast
{
- static U32 minCount() { return MIN_AMOUNT; }
- static U32 maxCount() { return U32_MAX; }
+ enum { minCount = MIN_AMOUNT };
+ enum { maxCount = U32_MAX };
};
template<U32 MAX_AMOUNT>
struct AtMost
{
- static U32 minCount() { return 0; }
- static U32 maxCount() { return MAX_AMOUNT; }
+ enum { minCount = 0 };
+ enum { maxCount = MAX_AMOUNT };
};
template<U32 MIN_AMOUNT, U32 MAX_AMOUNT>
struct Between
{
- static U32 minCount() { return MIN_AMOUNT; }
- static U32 maxCount() { return MAX_AMOUNT; }
+ enum { minCount = MIN_AMOUNT };
+ enum { maxCount = MAX_AMOUNT };
};
template<U32 EXACT_COUNT>
struct Exactly
{
- static U32 minCount() { return EXACT_COUNT; }
- static U32 maxCount() { return EXACT_COUNT; }
+ enum { minCount = EXACT_COUNT };
+ enum { maxCount = EXACT_COUNT };
};
// this typedef identifies derived classes as being blocks
@@ -424,9 +491,8 @@ namespace LLInitParam
LOG_CLASS(BaseBlock);
friend class Param;
- BaseBlock();
- virtual ~BaseBlock();
- bool submitValue(const Parser::name_stack_t& name_stack, Parser& p, bool silent=false);
+ virtual ~BaseBlock() {}
+ bool submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent=false);
param_handle_t getHandleFromParam(const Param* param) const;
bool validateBlock(bool emit_errors = true) const;
@@ -448,12 +514,10 @@ namespace LLInitParam
void addSynonym(Param& param, const std::string& synonym);
// Blocks can override this to do custom tracking of changes
- virtual void paramChanged(const Param& changed_param, bool user_provided);
+ virtual void paramChanged(const Param& changed_param, bool user_provided) {}
- S32 getLastChangeVersion() const { return mChangeVersion; }
-
- bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation);
- void serializeBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), const BaseBlock* diff_block = NULL) const;
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name);
+ void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const;
bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const;
virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); }
@@ -479,16 +543,13 @@ namespace LLInitParam
void init(BlockDescriptor& descriptor, BlockDescriptor& base_descriptor, size_t block_size);
- bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const BaseBlock& other, bool overwrite)
+ bool mergeBlockParam(bool source_provided, bool dst_provided, BlockDescriptor& block_data, const BaseBlock& source, bool overwrite)
{
- return mergeBlock(block_data, other, overwrite);
+ return mergeBlock(block_data, source, overwrite);
}
// take all provided params from other and apply to self
bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite);
- // can be updated in getters
- mutable S32 mChangeVersion;
-
static BlockDescriptor& selfBlockDescriptor()
{
static BlockDescriptor sBlockDescriptor;
@@ -499,18 +560,73 @@ namespace LLInitParam
const std::string& getParamName(const BlockDescriptor& block_data, const Param* paramp) const;
};
+ template<typename T>
+ struct ParamCompare<BaseBlock::Lazy<T>, false >
+ {
+ static bool equals(const BaseBlock::Lazy<T>& a, const BaseBlock::Lazy<T>& b) { return !a.empty() || !b.empty(); }
+ };
+
+ class Param
+ {
+ public:
+ void setProvided(bool is_provided = true)
+ {
+ mIsProvided = is_provided;
+ enclosingBlock().paramChanged(*this, is_provided);
+ }
+
+ Param& operator =(const Param& other)
+ {
+ mIsProvided = other.mIsProvided;
+ // don't change mEnclosingblockoffset
+ return *this;
+ }
+ protected:
+
+ bool anyProvided() const { return mIsProvided; }
+
+ Param(BaseBlock* enclosing_block);
+
+ // store pointer to enclosing block as offset to reduce space and allow for quick copying
+ BaseBlock& enclosingBlock() const
+ {
+ const U8* my_addr = reinterpret_cast<const U8*>(this);
+ // get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class
+ return *const_cast<BaseBlock*>
+ (reinterpret_cast<const BaseBlock*>
+ (my_addr - (ptrdiff_t)(S32)mEnclosingBlockOffset));
+ }
+
+ private:
+ friend class BaseBlock;
+
+ U32 mEnclosingBlockOffset:31;
+ U32 mIsProvided:1;
+
+ };
+
// these templates allow us to distinguish between template parameters
// that derive from BaseBlock and those that don't
template<typename T, typename Void = void>
struct IsBlock
{
static const bool value = false;
+ struct EmptyBase {};
+ typedef EmptyBase base_class_t;
};
template<typename T>
struct IsBlock<T, typename T::baseblock_base_class_t>
{
static const bool value = true;
+ typedef BaseBlock base_class_t;
+ };
+
+ template<typename T>
+ struct IsBlock<BaseBlock::Lazy<T>, typename T::baseblock_base_class_t >
+ {
+ static const bool value = true;
+ typedef BaseBlock base_class_t;
};
template<typename T, typename NAME_VALUE_LOOKUP, bool VALUE_IS_BLOCK = IsBlock<T>::value>
@@ -518,9 +634,11 @@ namespace LLInitParam
{
public:
typedef const T& value_assignment_t;
+ typedef T value_t;
+ typedef ParamValue<T, NAME_VALUE_LOOKUP, VALUE_IS_BLOCK> self_t;
ParamValue(): mValue() {}
- ParamValue(const T& other) : mValue(other) {}
+ ParamValue(value_assignment_t other) : mValue(other) {}
void setValue(value_assignment_t val)
{
@@ -537,7 +655,32 @@ namespace LLInitParam
return mValue;
}
- private:
+ operator value_assignment_t() const
+ {
+ return mValue;
+ }
+
+ value_assignment_t operator()() const
+ {
+ return mValue;
+ }
+
+ void operator ()(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ *this = name;
+ }
+
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ if (NAME_VALUE_LOOKUP::getValueFromName(name, mValue))
+ {
+ setValueName(name);
+ }
+
+ return *this;
+ }
+
+ protected:
T mValue;
};
@@ -548,25 +691,18 @@ namespace LLInitParam
{
public:
typedef const T& value_assignment_t;
-
- S32 mKeyVersion;
- mutable S32 mValidatedVersion;
- mutable bool mValidated; // lazy validation flag
+ typedef T value_t;
+ typedef ParamValue<T, NAME_VALUE_LOOKUP, true> self_t;
ParamValue()
: T(),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
{}
- ParamValue(const T& other)
+ ParamValue(value_assignment_t other)
: T(other),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
- {
- }
+ {}
void setValue(value_assignment_t val)
{
@@ -582,8 +718,85 @@ namespace LLInitParam
{
return *this;
}
+
+ operator value_assignment_t() const
+ {
+ return *this;
+ }
+
+ value_assignment_t operator()() const
+ {
+ return *this;
+ }
+
+ void operator ()(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ *this = name;
+ }
+
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ if (NAME_VALUE_LOOKUP::getValueFromName(name, *this))
+ {
+ setValueName(name);
+ }
+
+ return *this;
+ }
+
+ protected:
+ mutable bool mValidated; // lazy validation flag
};
+ template<typename NAME_VALUE_LOOKUP>
+ class ParamValue<std::string, NAME_VALUE_LOOKUP, false>
+ : public NAME_VALUE_LOOKUP
+ {
+ public:
+ typedef const std::string& value_assignment_t;
+ typedef std::string value_t;
+ typedef ParamValue<std::string, NAME_VALUE_LOOKUP, false> self_t;
+
+ ParamValue(): mValue() {}
+ ParamValue(value_assignment_t other) : mValue(other) {}
+
+ void setValue(value_assignment_t val)
+ {
+ if (NAME_VALUE_LOOKUP::getValueFromName(val, mValue))
+ {
+ NAME_VALUE_LOOKUP::setValueName(val);
+ }
+ else
+ {
+ mValue = val;
+ }
+ }
+
+ value_assignment_t getValue() const
+ {
+ return mValue;
+ }
+
+ std::string& getValue()
+ {
+ return mValue;
+ }
+
+ operator value_assignment_t() const
+ {
+ return mValue;
+ }
+
+ value_assignment_t operator()() const
+ {
+ return mValue;
+ }
+
+ protected:
+ std::string mValue;
+ };
+
+
template<typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> >
struct ParamIterator
{
@@ -602,10 +815,12 @@ namespace LLInitParam
public ParamValue<T, NAME_VALUE_LOOKUP>
{
public:
- typedef const T& value_assignment_t;
typedef TypedParam<T, NAME_VALUE_LOOKUP, HAS_MULTIPLE_VALUES, VALUE_IS_BLOCK> self_t;
- typedef NAME_VALUE_LOOKUP name_value_lookup_t;
typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t;
+ typedef typename param_value_t::value_assignment_t value_assignment_t;
+ typedef NAME_VALUE_LOOKUP name_value_lookup_t;
+
+ using param_value_t::operator();
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
: Param(block_descriptor.mCurrentBlockPtr)
@@ -628,17 +843,16 @@ namespace LLInitParam
bool isProvided() const { return Param::anyProvided(); }
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
// no further names in stack, attempt to parse value now
- if (name_stack.first == name_stack.second)
+ if (name_stack_range.first == name_stack_range.second)
{
if (parser.readValue(typed_param.getValue()))
{
typed_param.clearValueName();
- typed_param.setProvided(true);
- typed_param.enclosingBlock().paramChanged(param, true);
+ typed_param.setProvided();
return true;
}
@@ -653,8 +867,7 @@ namespace LLInitParam
if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
typed_param.setValueName(name);
- typed_param.setProvided(true);
- typed_param.enclosingBlock().paramChanged(param, true);
+ typed_param.setProvided();
return true;
}
@@ -671,7 +884,7 @@ namespace LLInitParam
if (!name_stack.empty())
{
- name_stack.back().second = parser.newParseGeneration();
+ name_stack.back().second = true;
}
std::string key = typed_param.getValueName();
@@ -682,10 +895,7 @@ namespace LLInitParam
{
if (!diff_param || !ParamCompare<std::string>::equals(static_cast<const self_t*>(diff_param)->getValueName(), key))
{
- if (!parser.writeValue(key, name_stack))
- {
- return;
- }
+ parser.writeValue(key, name_stack);
}
}
// then try to serialize value directly
@@ -693,7 +903,11 @@ namespace LLInitParam
{
if (!parser.writeValue(typed_param.getValue(), name_stack))
{
- return;
+ std::string calculated_key = typed_param.calcValueName(typed_param.getValue());
+ if (!diff_param || !ParamCompare<std::string>::equals(static_cast<const self_t*>(diff_param)->getValueName(), calculated_key))
+ {
+ parser.writeValue(calculated_key, name_stack);
+ }
}
}
}
@@ -711,27 +925,25 @@ namespace LLInitParam
void set(value_assignment_t val, bool flag_as_provided = true)
{
- setValue(val);
param_value_t::clearValueName();
+ setValue(val);
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
}
- void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true)
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
{
- if (!isProvided())
- {
- set(val, flag_as_provided);
- }
+ return static_cast<self_t&>(param_value_t::operator =(name));
}
- // implicit conversion
- operator value_assignment_t() const { return param_value_t::getValue(); }
- // explicit conversion
- value_assignment_t operator()() const { return param_value_t::getValue(); }
-
protected:
+ self_t& operator =(const self_t& other)
+ {
+ param_value_t::operator =(other);
+ Param::operator =(other);
+ return *this;
+ }
+
static bool mergeWith(Param& dst, const Param& src, bool overwrite)
{
const self_t& src_typed_param = static_cast<const self_t&>(src);
@@ -740,7 +952,6 @@ namespace LLInitParam
if (src_typed_param.isProvided()
&& (overwrite || !dst_typed_param.isProvided()))
{
- dst_typed_param.clearValueName();
dst_typed_param.set(src_typed_param.getValue());
return true;
}
@@ -755,12 +966,12 @@ namespace LLInitParam
public ParamValue<T, NAME_VALUE_LOOKUP>
{
public:
- typedef const T value_const_t;
- typedef T value_t;
- typedef value_const_t& value_assignment_t;
+ typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t;
+ typedef typename param_value_t::value_assignment_t value_assignment_t;
typedef TypedParam<T, NAME_VALUE_LOOKUP, false, true> self_t;
typedef NAME_VALUE_LOOKUP name_value_lookup_t;
- typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t;
+
+ using param_value_t::operator();
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
: Param(block_descriptor.mCurrentBlockPtr),
@@ -780,15 +991,14 @@ namespace LLInitParam
}
}
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
// attempt to parse block...
- if(typed_param.deserializeBlock(parser, name_stack, generation))
+ if(typed_param.deserializeBlock(parser, name_stack_range, new_name))
{
typed_param.clearValueName();
- typed_param.enclosingBlock().paramChanged(param, true);
- typed_param.setProvided(true);
+ typed_param.setProvided();
return true;
}
@@ -801,10 +1011,8 @@ namespace LLInitParam
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
- typed_param.enclosingBlock().paramChanged(param, true);
typed_param.setValueName(name);
- typed_param.setProvided(true);
- typed_param.mKeyVersion = typed_param.getLastChangeVersion();
+ typed_param.setProvided();
return true;
}
@@ -820,11 +1028,11 @@ namespace LLInitParam
if (!name_stack.empty())
{
- name_stack.back().second = parser.newParseGeneration();
+ name_stack.back().second = true;
}
std::string key = typed_param.getValueName();
- if (!key.empty() && typed_param.mKeyVersion == typed_param.getLastChangeVersion())
+ if (!key.empty())
{
if (!parser.writeValue(key, name_stack))
{
@@ -849,11 +1057,10 @@ namespace LLInitParam
bool isProvided() const
{
// only validate block when it hasn't already passed validation with current data
- if (Param::anyProvided() && param_value_t::mValidatedVersion < param_value_t::getLastChangeVersion())
+ if (Param::anyProvided() && !param_value_t::mValidated)
{
// a sub-block is "provided" when it has been filled in enough to be valid
param_value_t::mValidated = param_value_t::validateBlock(false);
- param_value_t::mValidatedVersion = param_value_t::getLastChangeVersion();
}
return Param::anyProvided() && param_value_t::mValidated;
}
@@ -863,41 +1070,44 @@ namespace LLInitParam
{
setValue(val);
param_value_t::clearValueName();
- // force revalidation of block by clearing known provided version
+ // force revalidation of block
// next call to isProvided() will update provision status based on validity
- param_value_t::mValidatedVersion = -1;
+ param_value_t::mValidated = false;
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
}
- void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true)
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
{
- if (!isProvided())
- {
- set(val, flag_as_provided);
- }
+ return static_cast<self_t&>(param_value_t::operator =(name));
}
// propagate changed status up to enclosing block
/*virtual*/ void paramChanged(const Param& changed_param, bool user_provided)
{
- ParamValue<T, NAME_VALUE_LOOKUP>::paramChanged(changed_param, user_provided);
- Param::enclosingBlock().paramChanged(*this, user_provided);
+ param_value_t::paramChanged(changed_param, user_provided);
if (user_provided)
{
// a child param has been explicitly changed
// so *some* aspect of this block is now provided
- setProvided(true);
+ param_value_t::mValidated = false;
+ setProvided();
+ param_value_t::clearValueName();
+ }
+ else
+ {
+ Param::enclosingBlock().paramChanged(*this, user_provided);
}
}
- // implicit conversion
- operator value_assignment_t() const { return param_value_t::getValue(); }
- // explicit conversion
- value_assignment_t operator()() const { return param_value_t::getValue(); }
-
protected:
+ self_t& operator =(const self_t& other)
+ {
+ param_value_t::operator =(other);
+ Param::operator =(other);
+ return *this;
+ }
+
static bool mergeWith(Param& dst, const Param& src, bool overwrite)
{
const self_t& src_typed_param = static_cast<const self_t&>(src);
@@ -905,12 +1115,10 @@ namespace LLInitParam
if (src_typed_param.anyProvided())
{
- bool param_provided = src_typed_param.isProvided() && (overwrite || !dst_typed_param.isProvided());
- if (dst_typed_param.mergeBlockParam(param_provided, param_value_t::selfBlockDescriptor(), src_typed_param, overwrite))
+ if (dst_typed_param.mergeBlockParam(src_typed_param.isProvided(), dst_typed_param.isProvided(), param_value_t::selfBlockDescriptor(), src_typed_param, overwrite))
{
dst_typed_param.clearValueName();
dst_typed_param.setProvided(true);
- dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true);
return true;
}
}
@@ -925,11 +1133,11 @@ namespace LLInitParam
{
public:
typedef TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, false> self_t;
- typedef ParamValue<VALUE_TYPE, NAME_VALUE_LOOKUP> param_value_t;
+ typedef ParamValue<VALUE_TYPE, NAME_VALUE_LOOKUP> param_value_t;
typedef typename std::vector<param_value_t> container_t;
typedef const container_t& value_assignment_t;
- typedef VALUE_TYPE value_t;
+ typedef typename param_value_t::value_t value_t;
typedef NAME_VALUE_LOOKUP name_value_lookup_t;
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
@@ -953,12 +1161,12 @@ namespace LLInitParam
bool isProvided() const { return Param::anyProvided(); }
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
value_t value;
// no further names in stack, attempt to parse value now
- if (name_stack.first == name_stack.second)
+ if (name_stack_range.first == name_stack_range.second)
{
// attempt to read value directly
if (parser.readValue(value))
@@ -975,7 +1183,7 @@ namespace LLInitParam
if (parser.readValue(name))
{
// try to parse a per type named value
- if (name_value_lookup_t::getValueFromName(name, typed_param.mValues))
+ if (name_value_lookup_t::getValueFromName(name, value))
{
typed_param.add(value);
typed_param.mValues.back().setValueName(name);
@@ -997,15 +1205,20 @@ namespace LLInitParam
it != end_it;
++it)
{
- std::string key = it->getValue();
- name_stack.back().second = parser.newParseGeneration();
+ std::string key = it->getValueName();
+ name_stack.back().second = true;
if(key.empty())
// not parsed via name values, write out value directly
{
- if (!parser.writeValue(*it, name_stack))
+ bool value_written = parser.writeValue(*it, name_stack);
+ if (!value_written)
{
- break;
+ std::string calculated_key = it->calcValueName(it->getValue());
+ if (!parser.writeValue(calculated_key, name_stack))
+ {
+ break;
+ }
}
}
else
@@ -1031,35 +1244,39 @@ namespace LLInitParam
{
mValues = val;
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
- }
-
-
- void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true)
- {
- if (!isProvided())
- {
- set(val, flag_as_provided);
- }
}
- value_t& add()
+ param_value_t& add()
{
mValues.push_back(param_value_t(value_t()));
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ Param::setProvided();
return mValues.back();
}
void add(const value_t& item)
{
- mValues.push_back(param_value_t(item));
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ param_value_t param_value;
+ param_value.setValue(item);
+ mValues.push_back(param_value);
+ setProvided();
+ }
+
+ void add(const typename name_value_lookup_t::name_t& name)
+ {
+ value_t value;
+
+ // try to parse a per type named value
+ if (name_value_lookup_t::getValueFromName(name, value))
+ {
+ add(value);
+ mValues.back().setValueName(name);
+ }
}
// implicit conversion
operator value_assignment_t() const { return mValues; }
+ // explicit conversion
+ value_assignment_t operator()() const { return mValues; }
typedef typename container_t::iterator iterator;
typedef typename container_t::const_iterator const_iterator;
@@ -1094,8 +1311,7 @@ namespace LLInitParam
if (src_typed_param.begin() != src_typed_param.end())
{
- dst_typed_param.setProvided(true);
- dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true);
+ dst_typed_param.setProvided();
}
return true;
}
@@ -1113,12 +1329,11 @@ namespace LLInitParam
typedef ParamValue<VALUE_TYPE, NAME_VALUE_LOOKUP> param_value_t;
typedef typename std::vector<param_value_t> container_t;
typedef const container_t& value_assignment_t;
- typedef VALUE_TYPE value_t;
+ typedef typename param_value_t::value_t value_t;
typedef NAME_VALUE_LOOKUP name_value_lookup_t;
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
- : Param(block_descriptor.mCurrentBlockPtr),
- mLastParseGeneration(0)
+ : Param(block_descriptor.mCurrentBlockPtr)
{
std::copy(value.begin(), value.end(), back_inserter(mValues));
@@ -1138,13 +1353,12 @@ namespace LLInitParam
bool isProvided() const { return Param::anyProvided(); }
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
bool new_value = false;
- if (generation != typed_param.mLastParseGeneration
- || typed_param.mValues.empty())
+ if (new_name || typed_param.mValues.empty())
{
new_value = true;
typed_param.mValues.push_back(value_t());
@@ -1153,14 +1367,9 @@ namespace LLInitParam
param_value_t& value = typed_param.mValues.back();
// attempt to parse block...
- if(value.deserializeBlock(parser, name_stack, generation))
+ if(value.deserializeBlock(parser, name_stack_range, new_name))
{
- if (new_value)
- { // successfully parsed new value, let's keep it
- typed_param.mLastParseGeneration = generation;
- }
- typed_param.enclosingBlock().paramChanged(param, true);
- typed_param.setProvided(true);
+ typed_param.setProvided();
return true;
}
else if(name_value_lookup_t::valueNamesExist())
@@ -1172,15 +1381,8 @@ namespace LLInitParam
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, value.getValue()))
{
- if (new_value)
- { // successfully parsed new value, let's keep it
- typed_param.mLastParseGeneration = generation;
- }
-
typed_param.mValues.back().setValueName(name);
- typed_param.mValues.back().mKeyVersion = value.getLastChangeVersion();
- typed_param.enclosingBlock().paramChanged(param, true);
- typed_param.setProvided(true);
+ typed_param.setProvided();
return true;
}
@@ -1204,10 +1406,10 @@ namespace LLInitParam
it != end_it;
++it)
{
- name_stack.back().second = parser.newParseGeneration();
+ name_stack.back().second = true;
std::string key = it->getValueName();
- if (!key.empty() && it->mKeyVersion == it->getLastChangeVersion())
+ if (!key.empty())
{
parser.writeValue(key, name_stack);
}
@@ -1230,34 +1432,37 @@ namespace LLInitParam
{
mValues = val;
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
}
- void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true)
- {
- if (!isProvided())
- {
- set(val, flag_as_provided);
- }
- }
-
- value_t& add()
+ param_value_t& add()
{
mValues.push_back(value_t());
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ setProvided();
return mValues.back();
}
void add(const value_t& item)
{
mValues.push_back(item);
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ setProvided();
+ }
+
+ void add(const typename name_value_lookup_t::name_t& name)
+ {
+ value_t value;
+
+ // try to parse a per type named value
+ if (name_value_lookup_t::getValueFromName(name, value))
+ {
+ add(value);
+ mValues.back().setValueName(name);
+ }
}
// implicit conversion
operator value_assignment_t() const { return mValues; }
+ // explicit conversion
+ value_assignment_t operator()() const { return mValues; }
typedef typename container_t::iterator iterator;
typedef typename container_t::const_iterator const_iterator;
@@ -1300,43 +1505,43 @@ namespace LLInitParam
if (src_typed_param.begin() != src_typed_param.end())
{
- dst_typed_param.setProvided(true);
- dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true);
+ dst_typed_param.setProvided();
}
return true;
}
container_t mValues;
-
- S32 mLastParseGeneration;
};
- template <typename DERIVED_BLOCK>
- class Choice : public BaseBlock
+ template <typename DERIVED_BLOCK, typename BASE_BLOCK = BaseBlock>
+ class ChoiceBlock : public BASE_BLOCK
{
- typedef Choice<DERIVED_BLOCK> self_t;
- typedef Choice<DERIVED_BLOCK> enclosing_block_t;
+ typedef ChoiceBlock<DERIVED_BLOCK, BASE_BLOCK> self_t;
+ typedef ChoiceBlock<DERIVED_BLOCK, BASE_BLOCK> enclosing_block_t;
+ typedef BASE_BLOCK base_block_t;
LOG_CLASS(self_t);
public:
// take all provided params from other and apply to self
bool overwriteFrom(const self_t& other)
{
- return mergeBlock(selfBlockDescriptor(), other, true);
+ return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, true);
}
// take all provided params that are not already provided, and apply to self
bool fillFrom(const self_t& other)
{
- return mergeBlock(selfBlockDescriptor(), other, false);
+ return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, false);
}
- bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const self_t& other, bool overwrite)
+ bool mergeBlockParam(bool source_provided, bool dest_provided, BlockDescriptor& block_data, const self_t& source, bool overwrite)
{
- if (param_provided)
+ bool source_override = source_provided && (overwrite || !dest_provided);
+
+ if (source_override || source.mCurChoice == mCurChoice)
{
- return mergeBlock(block_data, other, overwrite);
+ return mergeBlock(block_data, source, overwrite);
}
return false;
}
@@ -1345,35 +1550,35 @@ namespace LLInitParam
bool mergeBlock(BlockDescriptor& block_data, const self_t& other, bool overwrite)
{
mCurChoice = other.mCurChoice;
- return BaseBlock::mergeBlock(selfBlockDescriptor(), other, overwrite);
+ return base_block_t::mergeBlock(selfBlockDescriptor(), other, overwrite);
}
// clear out old choice when param has changed
/*virtual*/ void paramChanged(const Param& changed_param, bool user_provided)
{
- param_handle_t changed_param_handle = BaseBlock::getHandleFromParam(&changed_param);
+ param_handle_t changed_param_handle = base_block_t::getHandleFromParam(&changed_param);
// if we have a new choice...
if (changed_param_handle != mCurChoice)
{
// clear provided flag on previous choice
- Param* previous_choice = BaseBlock::getParamFromHandle(mCurChoice);
+ Param* previous_choice = base_block_t::getParamFromHandle(mCurChoice);
if (previous_choice)
{
previous_choice->setProvided(false);
}
mCurChoice = changed_param_handle;
}
- BaseBlock::paramChanged(changed_param, user_provided);
+ base_block_t::paramChanged(changed_param, user_provided);
}
virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); }
virtual BlockDescriptor& mostDerivedBlockDescriptor() { return selfBlockDescriptor(); }
protected:
- Choice()
+ ChoiceBlock()
: mCurChoice(0)
{
- BaseBlock::init(selfBlockDescriptor(), BaseBlock::selfBlockDescriptor(), sizeof(DERIVED_BLOCK));
+ BaseBlock::init(selfBlockDescriptor(), base_block_t::selfBlockDescriptor(), sizeof(DERIVED_BLOCK));
}
// Alternatives are mutually exclusive wrt other Alternatives in the same block.
@@ -1383,13 +1588,15 @@ namespace LLInitParam
class Alternative : public TypedParam<T, NAME_VALUE_LOOKUP, false>
{
public:
- friend class Choice<DERIVED_BLOCK>;
+ friend class ChoiceBlock<DERIVED_BLOCK>;
typedef Alternative<T, NAME_VALUE_LOOKUP> self_t;
typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t;
typedef typename super_t::value_assignment_t value_assignment_t;
- explicit Alternative(const char* name, value_assignment_t val = defaultValue<T>())
+ using super_t::operator =;
+
+ explicit Alternative(const char* name = "", value_assignment_t val = defaultValue<T>())
: super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1),
mOriginalValue(val)
{
@@ -1404,10 +1611,19 @@ namespace LLInitParam
}
}
- Alternative& operator=(value_assignment_t val)
+ void choose()
+ {
+ static_cast<enclosing_block_t&>(Param::enclosingBlock()).paramChanged(*this, true);
+ }
+
+ void chooseAs(value_assignment_t val)
+ {
+ super_t::set(val);
+ }
+
+ void operator =(value_assignment_t val)
{
super_t::set(val);
- return *this;
}
void operator()(typename super_t::value_assignment_t val)
@@ -1416,12 +1632,8 @@ namespace LLInitParam
}
operator value_assignment_t() const
- {
- if (static_cast<enclosing_block_t&>(Param::enclosingBlock()).getCurrentChoice() == this)
- {
- return super_t::getValue();
- }
- return mOriginalValue;
+ {
+ return (*this)();
}
value_assignment_t operator()() const
@@ -1454,7 +1666,7 @@ namespace LLInitParam
const Param* getCurrentChoice() const
{
- return BaseBlock::getParamFromHandle(mCurChoice);
+ return base_block_t::getParamFromHandle(mCurChoice);
}
};
@@ -1500,13 +1712,16 @@ namespace LLInitParam
typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t;
typedef typename super_t::value_assignment_t value_assignment_t;
+ using super_t::operator();
+ using super_t::operator =;
+
explicit Optional(const char* name = "", value_assignment_t val = defaultValue<T>())
: super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1)
{
//#pragma message("Parsing LLInitParam::Block::Optional")
}
- Optional& operator=(value_assignment_t val)
+ Optional& operator =(value_assignment_t val)
{
set(val);
return *this;
@@ -1517,7 +1732,6 @@ namespace LLInitParam
super_t::set(val);
return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock());
}
- using super_t::operator();
};
template <typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> >
@@ -1528,12 +1742,15 @@ namespace LLInitParam
typedef Mandatory<T, NAME_VALUE_LOOKUP> self_t;
typedef typename super_t::value_assignment_t value_assignment_t;
+ using super_t::operator();
+ using super_t::operator =;
+
// mandatory parameters require a name to be parseable
explicit Mandatory(const char* name = "", value_assignment_t val = defaultValue<T>())
: super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, &validate, 1, 1)
{}
- Mandatory& operator=(value_assignment_t val)
+ Mandatory& operator =(value_assignment_t val)
{
set(val);
return *this;
@@ -1544,7 +1761,6 @@ namespace LLInitParam
super_t::set(val);
return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock());
}
- using super_t::operator();
static bool validate(const Param* p)
{
@@ -1566,10 +1782,10 @@ namespace LLInitParam
typedef typename super_t::const_iterator const_iterator;
explicit Multiple(const char* name = "")
- : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, container_t(), &validate, RANGE::minCount(), RANGE::maxCount())
+ : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, container_t(), &validate, RANGE::minCount, RANGE::maxCount)
{}
- Multiple& operator=(value_assignment_t val)
+ Multiple& operator =(value_assignment_t val)
{
set(val);
return *this;
@@ -1584,100 +1800,10 @@ namespace LLInitParam
static bool validate(const Param* paramp)
{
U32 num_valid = ((super_t*)paramp)->numValidElements();
- return RANGE::minCount() <= num_valid && num_valid <= RANGE::maxCount();
+ return RANGE::minCount <= num_valid && num_valid <= RANGE::maxCount;
}
};
- template <typename T, typename RANGE = BaseBlock::AnyAmount, typename NAME_VALUE_LOOKUP = TypeValues<T> >
- class Batch : private TypedParam<T, NAME_VALUE_LOOKUP, false>
- {
- public:
- typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t;
- typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<param_value_t>::value> super_t;
- typedef Batch<T, RANGE, NAME_VALUE_LOOKUP> self_t;
- typedef typename super_t::value_assignment_t value_assignment_t;
- typedef typename super_t::value_t value_t;
-
- struct BatchDefaultValue : public ParamDescriptor::UserData
- {
- BatchDefaultValue(const T& value)
- : mValue(value)
- {}
-
- T mValue;
- };
-
- explicit Batch(const char* name, value_assignment_t val)
- : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1),
- mLastParseGeneration(-1)
- {
- BlockDescriptor& block_descriptor = DERIVED_BLOCK::selfBlockDescriptor();
- if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING))
- {
- ParamDescriptorPtr param_descriptorp = block_descriptor.mCurrentBlockPtr->findParamDescriptor(*this);
-
- if (param_descriptorp)
- {
- param_descriptorp->mDeserializeFunc = &deserializeParam;
- param_descriptorp->mUserData = new BatchDefaultValue(new param_value_t(val));
- }
- }
- }
-
- explicit Batch(const char* name = "")
- : super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, defaultValue<T>(), NULL, 0, 1),
- mLastParseGeneration(-1)
- {
- BlockDescriptor& block_descriptor = DERIVED_BLOCK::selfBlockDescriptor();
- if (LL_UNLIKELY(block_descriptor.mInitializationState == BlockDescriptor::INITIALIZING))
- {
- ParamDescriptorPtr param_descriptorp = block_descriptor.mCurrentBlockPtr->findParamDescriptor(*this);
-
- if (param_descriptorp)
- {
- param_descriptorp->mDeserializeFunc = &deserializeParam;
- }
- }
- }
-
- Batch& operator=(value_assignment_t val)
- {
- set(val);
- return *this;
- }
-
- DERIVED_BLOCK& operator()(value_assignment_t val)
- {
- super_t::set(val);
- return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock());
- }
-
- using super_t::operator();
-
- private:
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
- {
- self_t& typed_param = static_cast<self_t&>(param);
-
- if (generation != typed_param.mLastParseGeneration)
- {
- ParamDescriptorPtr descriptor = typed_param.enclosingBlock().findParamDescriptor(param);
- if (descriptor && static_cast<BatchDefaultValue*>(descriptor->mUserData))
- {
- static_cast<param_value_t&>(typed_param) = (static_cast<BatchDefaultValue*>(descriptor->mUserData))->mValue;
- }
- else
- {
- static_cast<param_value_t&>(typed_param) = param_value_t(value_t());
- }
- typed_param.mLastParseGeneration = generation;
- }
- return super_t::deserializeParam(param, parser, name_stack, generation);
- }
-
- S32 mLastParseGeneration;
- };
-
class Deprecated : public Param
{
public:
@@ -1699,9 +1825,9 @@ namespace LLInitParam
}
}
- static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack, S32 generation)
+ static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
- if (name_stack.first == name_stack.second)
+ if (name_stack_range.first == name_stack_range.second)
{
//std::string message = llformat("Deprecated value %s ignored", getName().c_str());
//parser.parserWarning(message);
@@ -1712,6 +1838,7 @@ namespace LLInitParam
}
};
+ // different semantics for documentation purposes, but functionally identical
typedef Deprecated Ignored;
protected:
@@ -1720,8 +1847,233 @@ namespace LLInitParam
static BlockDescriptor sBlockDescriptor;
return sBlockDescriptor;
}
+
+ template <typename T, typename NAME_VALUE_LOOKUP, bool multiple, bool is_block>
+ void changeDefault(TypedParam<T, NAME_VALUE_LOOKUP, multiple, is_block>& param,
+ typename TypedParam<T, NAME_VALUE_LOOKUP, multiple, is_block>::value_assignment_t value)
+ {
+ if (!param.isProvided())
+ {
+ param.set(value, false);
+ }
+ }
+
};
+ template <typename DERIVED_BLOCK, typename BASE_BLOCK = BaseBlock>
+ class BatchBlock
+ : public Block<DERIVED_BLOCK, BASE_BLOCK>
+ {
+ public:
+ typedef BatchBlock<DERIVED_BLOCK, BASE_BLOCK> self_t;
+ typedef Block<DERIVED_BLOCK, BASE_BLOCK> super_t;
+
+ BatchBlock()
+ {}
+
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name)
+ {
+ if (new_name)
+ {
+ // reset block
+ *static_cast<DERIVED_BLOCK*>(this) = defaultBatchValue();
+ }
+ return super_t::deserializeBlock(p, name_stack_range, new_name);
+ }
+
+ bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite)
+ {
+ if (overwrite)
+ {
+ *static_cast<DERIVED_BLOCK*>(this) = defaultBatchValue();
+ // merge individual parameters into destination
+ return super_t::mergeBlock(super_t::selfBlockDescriptor(), other, overwrite);
+ }
+ return false;
+ }
+ protected:
+ static const DERIVED_BLOCK& defaultBatchValue()
+ {
+ static DERIVED_BLOCK default_value;
+ return default_value;
+ }
+ };
+
+ // FIXME: this specialization is not currently used, as it only matches against the BatchBlock base class
+ // and not the derived class with the actual params
+ template<typename DERIVED_BLOCK,
+ typename BASE_BLOCK,
+ typename NAME_VALUE_LOOKUP>
+ class ParamValue <BatchBlock<DERIVED_BLOCK, BASE_BLOCK>,
+ NAME_VALUE_LOOKUP,
+ true>
+ : public NAME_VALUE_LOOKUP,
+ protected BatchBlock<DERIVED_BLOCK, BASE_BLOCK>
+ {
+ public:
+ typedef BatchBlock<DERIVED_BLOCK, BASE_BLOCK> block_t;
+ typedef const BatchBlock<DERIVED_BLOCK, BASE_BLOCK>& value_assignment_t;
+ typedef block_t value_t;
+
+ ParamValue()
+ : block_t(),
+ mValidated(false)
+ {}
+
+ ParamValue(value_assignment_t other)
+ : block_t(other),
+ mValidated(false)
+ {
+ }
+
+ void setValue(value_assignment_t val)
+ {
+ *this = val;
+ }
+
+ value_assignment_t getValue() const
+ {
+ return *this;
+ }
+
+ BatchBlock<DERIVED_BLOCK, BASE_BLOCK>& getValue()
+ {
+ return *this;
+ }
+
+ operator value_assignment_t() const
+ {
+ return *this;
+ }
+
+ value_assignment_t operator()() const
+ {
+ return *this;
+ }
+
+ protected:
+ mutable bool mValidated; // lazy validation flag
+ };
+
+ template<typename T, bool IS_BLOCK>
+ class ParamValue <BaseBlock::Lazy<T>,
+ TypeValues<T>,
+ IS_BLOCK>
+ : public IsBlock<T>::base_class_t
+ {
+ public:
+ typedef ParamValue <BaseBlock::Lazy<T>, TypeValues<T>, false> self_t;
+ typedef const T& value_assignment_t;
+ typedef T value_t;
+
+ ParamValue()
+ : mValue(),
+ mValidated(false)
+ {}
+
+ ParamValue(value_assignment_t other)
+ : mValue(other),
+ mValidated(false)
+ {}
+
+ void setValue(value_assignment_t val)
+ {
+ mValue.set(val);
+ }
+
+ value_assignment_t getValue() const
+ {
+ return mValue.get();
+ }
+
+ T& getValue()
+ {
+ return mValue.get();
+ }
+
+ operator value_assignment_t() const
+ {
+ return mValue.get();
+ }
+
+ value_assignment_t operator()() const
+ {
+ return mValue.get();
+ }
+
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name)
+ {
+ return mValue.get().deserializeBlock(p, name_stack_range, new_name);
+ }
+
+ void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const
+ {
+ if (mValue.empty()) return;
+
+ mValue.get().serializeBlock(p, name_stack, diff_block);
+ }
+
+ bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
+ {
+ if (mValue.empty()) return false;
+
+ return mValue.get().inspectBlock(p, name_stack, min_count, max_count);
+ }
+
+ protected:
+ mutable bool mValidated; // lazy validation flag
+
+ private:
+ BaseBlock::Lazy<T> mValue;
+ };
+
+ template <>
+ class ParamValue <LLSD,
+ TypeValues<LLSD>,
+ false>
+ : public TypeValues<LLSD>,
+ public BaseBlock
+ {
+ public:
+ typedef ParamValue<LLSD, TypeValues<LLSD>, false> self_t;
+ typedef const LLSD& value_assignment_t;
+
+ ParamValue()
+ : mValidated(false)
+ {}
+
+ ParamValue(value_assignment_t other)
+ : mValue(other),
+ mValidated(false)
+ {}
+
+ void setValue(value_assignment_t val) { mValue = val; }
+
+ value_assignment_t getValue() const { return mValue; }
+ LLSD& getValue() { return mValue; }
+
+ operator value_assignment_t() const { return mValue; }
+ value_assignment_t operator()() const { return mValue; }
+
+
+ // block param interface
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name);
+ void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const;
+ bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
+ {
+ //TODO: implement LLSD params as schema type Any
+ return true;
+ }
+
+ protected:
+ mutable bool mValidated; // lazy validation flag
+
+ private:
+ static void serializeElement(Parser& p, const LLSD& sd, Parser::name_stack_t& name_stack);
+
+ LLSD mValue;
+ };
+
template<typename T>
class CustomParamValue
: public Block<ParamValue<T, TypeValues<T> > >,
@@ -1737,46 +2089,42 @@ namespace LLInitParam
typedef ParamValue<T, TypeValues<T> > derived_t;
typedef CustomParamValue<T> self_t;
- typedef Block<derived_t> block_t;
+ typedef Block<derived_t> block_t;
typedef const T& value_assignment_t;
+ typedef T value_t;
+
CustomParamValue(const T& value = T())
: mValue(value),
mValueAge(VALUE_AUTHORITATIVE),
- mKeyVersion(0),
- mValidatedVersion(-1)
+ mValidated(false)
{}
- bool deserializeBlock(Parser& parser, Parser::name_stack_range_t name_stack, S32 generation)
+ bool deserializeBlock(Parser& parser, Parser::name_stack_range_t name_stack_range, bool new_name)
{
derived_t& typed_param = static_cast<derived_t&>(*this);
- // type to apply parse direct value T
- if (name_stack.first == name_stack.second)
+ // try to parse direct value T
+ if (name_stack_range.first == name_stack_range.second)
{
if(parser.readValue(typed_param.mValue))
{
- typed_param.clearValueName();
typed_param.mValueAge = VALUE_AUTHORITATIVE;
- typed_param.updateBlockFromValue();
+ typed_param.updateBlockFromValue(false);
+
+ typed_param.clearValueName();
return true;
}
}
// fall back on parsing block components for T
- // if we deserialized at least one component...
- if (typed_param.BaseBlock::deserializeBlock(parser, name_stack, generation))
- {
- return true;
- }
-
- return false;
+ return typed_param.BaseBlock::deserializeBlock(parser, name_stack_range, new_name);
}
- void serializeBlock(Parser& parser, Parser::name_stack_t name_stack = Parser::name_stack_t(), const BaseBlock* diff_block = NULL) const
+ void serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const
{
- const self_t& typed_param = static_cast<const self_t&>(*this);
- const self_t* diff_param = static_cast<const self_t*>(diff_block);
+ const derived_t& typed_param = static_cast<const derived_t&>(*this);
+ const derived_t* diff_param = static_cast<const derived_t*>(diff_block);
std::string key = typed_param.getValueName();
@@ -1801,7 +2149,20 @@ namespace LLInitParam
// be exported as <color green="1"/>, since it was probably the intent of the user to
// be specific about the RGB color values. This also fixes an issue where we distinguish
// between rect.left not being provided and rect.left being explicitly set to 0 (same as default)
- block_t::serializeBlock(parser, name_stack, NULL);
+
+ if (typed_param.mValueAge == VALUE_AUTHORITATIVE)
+ {
+ // if the value is authoritative but the parser doesn't accept the value type
+ // go ahead and make a copy, and splat the value out to its component params
+ // and serialize those params
+ derived_t copy(typed_param);
+ copy.updateBlockFromValue(true);
+ copy.block_t::serializeBlock(parser, name_stack, NULL);
+ }
+ else
+ {
+ block_t::serializeBlock(parser, name_stack, NULL);
+ }
}
}
}
@@ -1850,7 +2211,7 @@ namespace LLInitParam
{
BaseBlock::paramChanged(changed_param, user_provided);
if (user_provided)
- {
+ {
// a parameter changed, so our value is out of date
mValueAge = VALUE_NEEDS_UPDATE;
}
@@ -1863,7 +2224,7 @@ namespace LLInitParam
mValueAge = VALUE_AUTHORITATIVE;
mValue = val;
typed_param.clearValueName();
- static_cast<derived_t*>(const_cast<self_t*>(this))->updateBlockFromValue();
+ static_cast<derived_t*>(this)->updateBlockFromValue(false);
}
value_assignment_t getValue() const
@@ -1878,7 +2239,15 @@ namespace LLInitParam
return mValue;
}
- S32 mKeyVersion;
+ operator value_assignment_t() const
+ {
+ return getValue();
+ }
+
+ value_assignment_t operator()() const
+ {
+ return getValue();
+ }
protected:
@@ -1888,37 +2257,34 @@ namespace LLInitParam
mValue = value;
}
- bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const BaseBlock& other, bool overwrite)
+ bool mergeBlockParam(bool source_provided, bool dst_provided, BlockDescriptor& block_data, const BaseBlock& source, bool overwrite)
{
- if (param_provided)
- {
- return mergeBlock(block_data, other, overwrite);
- }
- return false;
- }
+ bool source_override = source_provided && (overwrite || !dst_provided);
- bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite)
- {
- const derived_t& src_typed_param = static_cast<const derived_t&>(other);
+ const derived_t& src_typed_param = static_cast<const derived_t&>(source);
- if (src_typed_param.mValueAge == VALUE_AUTHORITATIVE)
+ if (source_override && src_typed_param.mValueAge == VALUE_AUTHORITATIVE)
{
// copy value over
setValue(src_typed_param.getValue());
return true;
}
- else
+ // merge individual parameters into destination
+ if (mValueAge == VALUE_AUTHORITATIVE)
{
- // merge individual parameters into destination
- return block_t::mergeBlock(block_t::selfBlockDescriptor(), src_typed_param, overwrite);
+ static_cast<derived_t*>(this)->updateBlockFromValue(dst_provided);
}
+ return mergeBlock(block_data, source, overwrite);
+ }
+
+ bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& source, bool overwrite)
+ {
+ return block_t::mergeBlock(block_data, source, overwrite);
}
- mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
private:
-
mutable T mValue;
mutable EValueAge mValueAge;
};
diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp
index 72a7bb7af5..58654dcc21 100644
--- a/indra/llxuixml/llxuiparser.cpp
+++ b/indra/llxuixml/llxuiparser.cpp
@@ -51,6 +51,270 @@ static LLInitParam::Parser::parser_read_func_map_t sXSDReadFuncs;
static LLInitParam::Parser::parser_write_func_map_t sXSDWriteFuncs;
static LLInitParam::Parser::parser_inspect_func_map_t sXSDInspectFuncs;
+static LLInitParam::Parser::parser_read_func_map_t sSimpleXUIReadFuncs;
+static LLInitParam::Parser::parser_write_func_map_t sSimpleXUIWriteFuncs;
+static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
+
+const char* NO_VALUE_MARKER = "no_value";
+
+const S32 LINE_NUMBER_HERE = 0;
+
+struct MaxOccursValues : public LLInitParam::TypeValuesHelper<U32, MaxOccursValues>
+{
+ static void declareValues()
+ {
+ declare("unbounded", U32_MAX);
+ }
+};
+
+struct Occurs : public LLInitParam::Block<Occurs>
+{
+ Optional<U32> minOccurs;
+ Optional<U32, MaxOccursValues> maxOccurs;
+
+ Occurs()
+ : minOccurs("minOccurs", 0),
+ maxOccurs("maxOccurs", U32_MAX)
+
+ {}
+};
+
+
+typedef enum
+{
+ USE_REQUIRED,
+ USE_OPTIONAL
+} EUse;
+
+namespace LLInitParam
+{
+ template<>
+ struct TypeValues<EUse> : public TypeValuesHelper<EUse>
+ {
+ static void declareValues()
+ {
+ declare("required", USE_REQUIRED);
+ declare("optional", USE_OPTIONAL);
+ }
+ };
+}
+
+struct Element;
+struct Group;
+struct Choice;
+struct Sequence;
+struct Any;
+
+struct Attribute : public LLInitParam::Block<Attribute>
+{
+ Mandatory<std::string> name;
+ Mandatory<std::string> type;
+ Mandatory<EUse> use;
+
+ Attribute()
+ : name("name"),
+ type("type"),
+ use("use")
+ {}
+};
+
+struct Any : public LLInitParam::Block<Any, Occurs>
+{
+ Optional<std::string> _namespace;
+
+ Any()
+ : _namespace("namespace")
+ {}
+};
+
+struct All : public LLInitParam::Block<All, Occurs>
+{
+ Multiple< Lazy<Element> > elements;
+
+ All()
+ : elements("element")
+ {
+ maxOccurs = 1;
+ }
+};
+
+struct Choice : public LLInitParam::ChoiceBlock<Choice, Occurs>
+{
+ Alternative< Lazy<Element> > element;
+ Alternative< Lazy<Group> > group;
+ Alternative< Lazy<Choice> > choice;
+ Alternative< Lazy<Sequence> > sequence;
+ Alternative< Lazy<Any> > any;
+
+ Choice()
+ : element("element"),
+ group("group"),
+ choice("choice"),
+ sequence("sequence"),
+ any("any")
+ {}
+
+};
+
+struct Sequence : public LLInitParam::ChoiceBlock<Sequence, Occurs>
+{
+ Alternative< Lazy<Element> > element;
+ Alternative< Lazy<Group> > group;
+ Alternative< Lazy<Choice> > choice;
+ Alternative< Lazy<Sequence> > sequence;
+ Alternative< Lazy<Any> > any;
+};
+
+struct GroupContents : public LLInitParam::ChoiceBlock<GroupContents, Occurs>
+{
+ Alternative<All> all;
+ Alternative<Choice> choice;
+ Alternative<Sequence> sequence;
+
+ GroupContents()
+ : all("all"),
+ choice("choice"),
+ sequence("sequence")
+ {}
+};
+
+struct Group : public LLInitParam::Block<Group, GroupContents>
+{
+ Optional<std::string> name,
+ ref;
+
+ Group()
+ : name("name"),
+ ref("ref")
+ {}
+};
+
+struct Restriction : public LLInitParam::Block<Restriction>
+{
+};
+
+struct Extension : public LLInitParam::Block<Extension>
+{
+};
+
+struct SimpleContent : public LLInitParam::ChoiceBlock<SimpleContent>
+{
+ Alternative<Restriction> restriction;
+ Alternative<Extension> extension;
+
+ SimpleContent()
+ : restriction("restriction"),
+ extension("extension")
+ {}
+};
+
+struct SimpleType : public LLInitParam::Block<SimpleType>
+{
+ // TODO
+};
+
+struct ComplexContent : public LLInitParam::Block<ComplexContent, SimpleContent>
+{
+ Optional<bool> mixed;
+
+ ComplexContent()
+ : mixed("mixed", true)
+ {}
+};
+
+struct ComplexTypeContents : public LLInitParam::ChoiceBlock<ComplexTypeContents>
+{
+ Alternative<SimpleContent> simple_content;
+ Alternative<ComplexContent> complex_content;
+ Alternative<Group> group;
+ Alternative<All> all;
+ Alternative<Choice> choice;
+ Alternative<Sequence> sequence;
+
+ ComplexTypeContents()
+ : simple_content("simpleContent"),
+ complex_content("complexContent"),
+ group("group"),
+ all("all"),
+ choice("choice"),
+ sequence("sequence")
+ {}
+};
+
+struct ComplexType : public LLInitParam::Block<ComplexType, ComplexTypeContents>
+{
+ Optional<std::string> name;
+ Optional<bool> mixed;
+
+ Multiple<Attribute> attribute;
+ Multiple< Lazy<Element> > elements;
+
+ ComplexType()
+ : name("name"),
+ attribute("xs:attribute"),
+ elements("xs:element"),
+ mixed("mixed")
+ {
+ }
+};
+
+struct ElementContents : public LLInitParam::ChoiceBlock<ElementContents, Occurs>
+{
+ Alternative<SimpleType> simpleType;
+ Alternative<ComplexType> complexType;
+
+ ElementContents()
+ : simpleType("simpleType"),
+ complexType("complexType")
+ {}
+};
+
+struct Element : public LLInitParam::Block<Element, ElementContents>
+{
+ Optional<std::string> name,
+ ref,
+ type;
+
+ Element()
+ : name("xs:name"),
+ ref("xs:ref"),
+ type("xs:type")
+ {}
+};
+
+struct Schema : public LLInitParam::Block<Schema>
+{
+private:
+ Mandatory<std::string> targetNamespace,
+ xmlns,
+ xs;
+
+public:
+ Optional<std::string> attributeFormDefault,
+ elementFormDefault;
+
+ Mandatory<Element> root_element;
+
+ void setNameSpace(const std::string& ns) {targetNamespace = ns; xmlns = ns;}
+
+ Schema(const std::string& ns = LLStringUtil::null)
+ : attributeFormDefault("attributeFormDefault"),
+ elementFormDefault("elementFormDefault"),
+ xs("xmlns:xs"),
+ targetNamespace("targetNamespace"),
+ xmlns("xmlns"),
+ root_element("xs:element")
+ {
+ attributeFormDefault = "unqualified";
+ elementFormDefault = "qualified";
+ xs = "http://www.w3.org/2001/XMLSchema";
+ if (!ns.empty())
+ {
+ setNameSpace(ns);
+ };
+ }
+
+};
//
// LLXSDWriter
@@ -76,22 +340,30 @@ LLXSDWriter::LLXSDWriter()
void LLXSDWriter::writeXSD(const std::string& type_name, LLXMLNodePtr node, const LLInitParam::BaseBlock& block, const std::string& xml_namespace)
{
+ Schema schema(xml_namespace);
+
+ schema.root_element.name = type_name;
+ Choice& choice = schema.root_element.complexType.choice;
+
+ choice.minOccurs = 0;
+ choice.maxOccurs = "unbounded";
+
mSchemaNode = node;
- node->setName("xs:schema");
- node->createChild("attributeFormDefault", true)->setStringValue("unqualified");
- node->createChild("elementFormDefault", true)->setStringValue("qualified");
- node->createChild("targetNamespace", true)->setStringValue(xml_namespace);
- node->createChild("xmlns:xs", true)->setStringValue("http://www.w3.org/2001/XMLSchema");
- node->createChild("xmlns", true)->setStringValue(xml_namespace);
-
- node = node->createChild("xs:complexType", false);
- node->createChild("name", true)->setStringValue(type_name);
- node->createChild("mixed", true)->setStringValue("true");
-
- mAttributeNode = node;
- mElementNode = node->createChild("xs:choice", false);
- mElementNode->createChild("minOccurs", true)->setStringValue("0");
- mElementNode->createChild("maxOccurs", true)->setStringValue("unbounded");
+ //node->setName("xs:schema");
+ //node->createChild("attributeFormDefault", true)->setStringValue("unqualified");
+ //node->createChild("elementFormDefault", true)->setStringValue("qualified");
+ //node->createChild("targetNamespace", true)->setStringValue(xml_namespace);
+ //node->createChild("xmlns:xs", true)->setStringValue("http://www.w3.org/2001/XMLSchema");
+ //node->createChild("xmlns", true)->setStringValue(xml_namespace);
+
+ //node = node->createChild("xs:complexType", false);
+ //node->createChild("name", true)->setStringValue(type_name);
+ //node->createChild("mixed", true)->setStringValue("true");
+
+ //mAttributeNode = node;
+ //mElementNode = node->createChild("xs:choice", false);
+ //mElementNode->createChild("minOccurs", true)->setStringValue("0");
+ //mElementNode->createChild("maxOccurs", true)->setStringValue("unbounded");
block.inspectBlock(*this);
// duplicate element choices
@@ -383,12 +655,11 @@ static LLInitParam::Parser::parser_inspect_func_map_t sXUIInspectFuncs;
//
LLXUIParser::LLXUIParser()
: Parser(sXUIReadFuncs, sXUIWriteFuncs, sXUIInspectFuncs),
- mLastWriteGeneration(-1),
mCurReadDepth(0)
{
if (sXUIReadFuncs.empty())
{
- registerParserFuncs<LLInitParam::NoParamValue>(readNoValue, writeNoValue);
+ registerParserFuncs<LLInitParam::Flag>(readFlag, writeFlag);
registerParserFuncs<bool>(readBoolValue, writeBoolValue);
registerParserFuncs<std::string>(readStringValue, writeStringValue);
registerParserFuncs<U8>(readU8Value, writeU8Value);
@@ -440,12 +711,11 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
&& nodep->mAttributes.empty()
&& nodep->getSanitizedValue().empty())
{
- // empty node, just parse as NoValue
+ // empty node, just parse as flag
mCurReadNode = DUMMY_NODE;
return block.submitValue(mNameStack, *this, silent);
}
-
// submit attributes for current node
values_parsed |= readAttributes(nodep, block);
@@ -454,7 +724,7 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
if (!text_contents.empty())
{
mCurReadNode = nodep;
- mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
+ mNameStack.push_back(std::make_pair(std::string("value"), true));
// child nodes are not necessarily valid parameters (could be a child widget)
// so don't complain once we've recursed
if (!block.submitValue(mNameStack, *this, true))
@@ -489,7 +759,7 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
// since there is no widget named "rect"
if (child_name.find(".") == std::string::npos)
{
- mNameStack.push_back(std::make_pair(child_name, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(child_name, true));
num_tokens_pushed++;
}
else
@@ -525,7 +795,7 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_token_it; token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
}
@@ -575,7 +845,7 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_tokens.begin(); token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
@@ -594,48 +864,40 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
void LLXUIParser::writeXUI(LLXMLNodePtr node, const LLInitParam::BaseBlock &block, const LLInitParam::BaseBlock* diff_block)
{
mWriteRootNode = node;
- block.serializeBlock(*this, Parser::name_stack_t(), diff_block);
+ name_stack_t name_stack = Parser::name_stack_t();
+ block.serializeBlock(*this, name_stack, diff_block);
mOutNodes.clear();
}
// go from a stack of names to a specific XML node
-LLXMLNodePtr LLXUIParser::getNode(const name_stack_t& stack)
+LLXMLNodePtr LLXUIParser::getNode(name_stack_t& stack)
{
- name_stack_t name_stack;
- for (name_stack_t::const_iterator it = stack.begin();
- it != stack.end();
- ++it)
- {
- if (!it->first.empty())
- {
- name_stack.push_back(*it);
- }
- }
-
LLXMLNodePtr out_node = mWriteRootNode;
- name_stack_t::const_iterator next_it = name_stack.begin();
- for (name_stack_t::const_iterator it = name_stack.begin();
- it != name_stack.end();
+ name_stack_t::iterator next_it = stack.begin();
+ for (name_stack_t::iterator it = stack.begin();
+ it != stack.end();
it = next_it)
{
++next_it;
if (it->first.empty())
{
+ it->second = false;
continue;
}
- out_nodes_t::iterator found_it = mOutNodes.lower_bound(it->second);
+ out_nodes_t::iterator found_it = mOutNodes.find(it->first);
// node with this name not yet written
- if (found_it == mOutNodes.end() || mOutNodes.key_comp()(found_it->first, it->second))
+ if (found_it == mOutNodes.end() || it->second)
{
// make an attribute if we are the last element on the name stack
- bool is_attribute = next_it == name_stack.end();
+ bool is_attribute = next_it == stack.end();
LLXMLNodePtr new_node = new LLXMLNode(it->first.c_str(), is_attribute);
out_node->addChild(new_node);
- mOutNodes.insert(found_it, std::make_pair(it->second, new_node));
+ mOutNodes[it->first] = new_node;
out_node = new_node;
+ it->second = false;
}
else
{
@@ -646,13 +908,13 @@ LLXMLNodePtr LLXUIParser::getNode(const name_stack_t& stack)
return (out_node == mWriteRootNode ? LLXMLNodePtr(NULL) : out_node);
}
-bool LLXUIParser::readNoValue(Parser& parser, void* val_ptr)
+bool LLXUIParser::readFlag(Parser& parser, void* val_ptr)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
return self.mCurReadNode == DUMMY_NODE;
}
-bool LLXUIParser::writeNoValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeFlag(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
// just create node
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
@@ -669,7 +931,7 @@ bool LLXUIParser::readBoolValue(Parser& parser, void* val_ptr)
return success;
}
-bool LLXUIParser::writeBoolValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeBoolValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -688,7 +950,7 @@ bool LLXUIParser::readStringValue(Parser& parser, void* val_ptr)
return true;
}
-bool LLXUIParser::writeStringValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeStringValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -726,7 +988,7 @@ bool LLXUIParser::readU8Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getByteValue(1, (U8*)val_ptr);
}
-bool LLXUIParser::writeU8Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeU8Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -750,7 +1012,7 @@ bool LLXUIParser::readS8Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeS8Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeS8Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -774,7 +1036,7 @@ bool LLXUIParser::readU16Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeU16Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeU16Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -798,7 +1060,7 @@ bool LLXUIParser::readS16Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeS16Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeS16Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -816,7 +1078,7 @@ bool LLXUIParser::readU32Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getUnsignedValue(1, (U32*)val_ptr);
}
-bool LLXUIParser::writeU32Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeU32Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -834,7 +1096,7 @@ bool LLXUIParser::readS32Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getIntValue(1, (S32*)val_ptr);
}
-bool LLXUIParser::writeS32Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeS32Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -852,7 +1114,7 @@ bool LLXUIParser::readF32Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getFloatValue(1, (F32*)val_ptr);
}
-bool LLXUIParser::writeF32Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeF32Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -870,7 +1132,7 @@ bool LLXUIParser::readF64Value(Parser& parser, void* val_ptr)
return self.mCurReadNode->getDoubleValue(1, (F64*)val_ptr);
}
-bool LLXUIParser::writeF64Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeF64Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -894,7 +1156,7 @@ bool LLXUIParser::readColor4Value(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeColor4Value(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeColor4Value(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -921,7 +1183,7 @@ bool LLXUIParser::readUIColorValue(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeUIColorValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeUIColorValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -950,7 +1212,7 @@ bool LLXUIParser::readUUIDValue(Parser& parser, void* val_ptr)
return false;
}
-bool LLXUIParser::writeUUIDValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeUUIDValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
LLXMLNodePtr node = self.getNode(stack);
@@ -969,7 +1231,7 @@ bool LLXUIParser::readSDValue(Parser& parser, void* val_ptr)
return true;
}
-bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t& stack)
{
LLXUIParser& self = static_cast<LLXUIParser&>(parser);
@@ -1070,21 +1332,14 @@ struct ScopedFile
LLFILE* mFile;
};
-static LLInitParam::Parser::parser_read_func_map_t sSimpleXUIReadFuncs;
-static LLInitParam::Parser::parser_write_func_map_t sSimpleXUIWriteFuncs;
-static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
-
-const char* NO_VALUE_MARKER = "no_value";
-
LLSimpleXUIParser::LLSimpleXUIParser(LLSimpleXUIParser::element_start_callback_t element_cb)
: Parser(sSimpleXUIReadFuncs, sSimpleXUIWriteFuncs, sSimpleXUIInspectFuncs),
- mLastWriteGeneration(-1),
mCurReadDepth(0),
mElementCB(element_cb)
{
if (sSimpleXUIReadFuncs.empty())
{
- registerParserFuncs<LLInitParam::NoParamValue>(readNoValue);
+ registerParserFuncs<LLInitParam::Flag>(readFlag);
registerParserFuncs<bool>(readBoolValue);
registerParserFuncs<std::string>(readStringValue);
registerParserFuncs<U8>(readU8Value);
@@ -1181,6 +1436,11 @@ void LLSimpleXUIParser::characterDataHandler(void *userData, const char *s, int
self->characterData(s, len);
}
+void LLSimpleXUIParser::characterData(const char *s, int len)
+{
+ mTextContents += std::string(s, len);
+}
+
void LLSimpleXUIParser::startElement(const char *name, const char **atts)
{
processText();
@@ -1209,7 +1469,7 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts)
{ // compound attribute
if (child_name.find(".") == std::string::npos)
{
- mNameStack.push_back(std::make_pair(child_name, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(child_name, true));
num_tokens_pushed++;
mScope.push_back(child_name);
}
@@ -1236,7 +1496,7 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts)
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_token_it; token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
mScope.push_back(mNameStack.back().first);
@@ -1253,6 +1513,37 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts)
}
+void LLSimpleXUIParser::endElement(const char *name)
+{
+ bool has_text = processText();
+
+ // no text, attributes, or children
+ if (!has_text && mEmptyLeafNode.back())
+ {
+ // submit this as a valueless name (even though there might be text contents we haven't seen yet)
+ mCurAttributeValueBegin = NO_VALUE_MARKER;
+ mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently);
+ }
+
+ if (--mOutputStack.back().second == 0)
+ {
+ if (mOutputStack.empty())
+ {
+ LL_ERRS("ReadXUI") << "Parameter block output stack popped while empty." << LL_ENDL;
+ }
+ mOutputStack.pop_back();
+ }
+
+ S32 num_tokens_to_pop = mTokenSizeStack.back();
+ mTokenSizeStack.pop_back();
+ while(num_tokens_to_pop-- > 0)
+ {
+ mNameStack.pop_back();
+ }
+ mScope.pop_back();
+ mEmptyLeafNode.pop_back();
+}
+
bool LLSimpleXUIParser::readAttributes(const char **atts)
{
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
@@ -1269,7 +1560,7 @@ bool LLSimpleXUIParser::readAttributes(const char **atts)
// copy remaining tokens on to our running token list
for(tokenizer::iterator token_to_push = name_tokens.begin(); token_to_push != name_tokens.end(); ++token_to_push)
{
- mNameStack.push_back(std::make_pair(*token_to_push, newParseGeneration()));
+ mNameStack.push_back(std::make_pair(*token_to_push, true));
num_tokens_pushed++;
}
@@ -1291,7 +1582,7 @@ bool LLSimpleXUIParser::processText()
LLStringUtil::trim(mTextContents);
if (!mTextContents.empty())
{
- mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
+ mNameStack.push_back(std::make_pair(std::string("value"), true));
mCurAttributeValueBegin = mTextContents.c_str();
mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently);
mNameStack.pop_back();
@@ -1302,43 +1593,6 @@ bool LLSimpleXUIParser::processText()
return false;
}
-void LLSimpleXUIParser::endElement(const char *name)
-{
- bool has_text = processText();
-
- // no text, attributes, or children
- if (!has_text && mEmptyLeafNode.back())
- {
- // submit this as a valueless name (even though there might be text contents we haven't seen yet)
- mCurAttributeValueBegin = NO_VALUE_MARKER;
- mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently);
- }
-
- if (--mOutputStack.back().second == 0)
- {
- if (mOutputStack.empty())
- {
- LL_ERRS("ReadXUI") << "Parameter block output stack popped while empty." << LL_ENDL;
- }
- mOutputStack.pop_back();
- }
-
- S32 num_tokens_to_pop = mTokenSizeStack.back();
- mTokenSizeStack.pop_back();
- while(num_tokens_to_pop-- > 0)
- {
- mNameStack.pop_back();
- }
- mScope.pop_back();
- mEmptyLeafNode.pop_back();
-}
-
-void LLSimpleXUIParser::characterData(const char *s, int len)
-{
- mTextContents += std::string(s, len);
-}
-
-
/*virtual*/ std::string LLSimpleXUIParser::getCurrentElementName()
{
std::string full_name;
@@ -1352,8 +1606,6 @@ void LLSimpleXUIParser::characterData(const char *s, int len)
return full_name;
}
-const S32 LINE_NUMBER_HERE = 0;
-
void LLSimpleXUIParser::parserWarning(const std::string& message)
{
#ifdef LL_WINDOWS
@@ -1377,7 +1629,7 @@ void LLSimpleXUIParser::parserError(const std::string& message)
#endif
}
-bool LLSimpleXUIParser::readNoValue(Parser& parser, void* val_ptr)
+bool LLSimpleXUIParser::readFlag(Parser& parser, void* val_ptr)
{
LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser);
return self.mCurAttributeValueBegin == NO_VALUE_MARKER;
diff --git a/indra/llxuixml/llxuiparser.h b/indra/llxuixml/llxuiparser.h
index 0c38c4da93..d7cd256967 100644
--- a/indra/llxuixml/llxuiparser.h
+++ b/indra/llxuixml/llxuiparser.h
@@ -116,7 +116,7 @@ private:
bool readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block);
//reader helper functions
- static bool readNoValue(Parser& parser, void* val_ptr);
+ static bool readFlag(Parser& parser, void* val_ptr);
static bool readBoolValue(Parser& parser, void* val_ptr);
static bool readStringValue(Parser& parser, void* val_ptr);
static bool readU8Value(Parser& parser, void* val_ptr);
@@ -133,23 +133,23 @@ private:
static bool readSDValue(Parser& parser, void* val_ptr);
//writer helper functions
- static bool writeNoValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeBoolValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeStringValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeU8Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeS8Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeU16Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeS16Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeU32Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeS32Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeF32Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeF64Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeColor4Value(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeUIColorValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeUUIDValue(Parser& parser, const void* val_ptr, const name_stack_t&);
- static bool writeSDValue(Parser& parser, const void* val_ptr, const name_stack_t&);
-
- LLXMLNodePtr getNode(const name_stack_t& stack);
+ static bool writeFlag(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeBoolValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeStringValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeU8Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeS8Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeU16Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeS16Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeU32Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeS32Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeF32Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeF64Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeColor4Value(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeUIColorValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeUUIDValue(Parser& parser, const void* val_ptr, name_stack_t&);
+ static bool writeSDValue(Parser& parser, const void* val_ptr, name_stack_t&);
+
+ LLXMLNodePtr getNode(name_stack_t& stack);
private:
Parser::name_stack_t mNameStack;
@@ -157,9 +157,8 @@ private:
// Root of the widget XML sub-tree, for example, "line_editor"
LLXMLNodePtr mWriteRootNode;
- typedef std::map<S32, LLXMLNodePtr> out_nodes_t;
+ typedef std::map<std::string, LLXMLNodePtr> out_nodes_t;
out_nodes_t mOutNodes;
- S32 mLastWriteGeneration;
LLXMLNodePtr mLastWrittenChild;
S32 mCurReadDepth;
std::string mCurFileName;
@@ -197,7 +196,7 @@ public:
private:
//reader helper functions
- static bool readNoValue(Parser&, void* val_ptr);
+ static bool readFlag(Parser&, void* val_ptr);
static bool readBoolValue(Parser&, void* val_ptr);
static bool readStringValue(Parser&, void* val_ptr);
static bool readU8Value(Parser&, void* val_ptr);
@@ -226,7 +225,6 @@ private:
Parser::name_stack_t mNameStack;
struct XML_ParserStruct* mParser;
- S32 mLastWriteGeneration;
LLXMLNodePtr mLastWrittenChild;
S32 mCurReadDepth;
std::string mCurFileName;
diff --git a/indra/lscript/lscript_compile/bison.bat b/indra/lscript/lscript_compile/bison.bat
index 54cf0231d9..0baff4e5ef 100644
--- a/indra/lscript/lscript_compile/bison.bat
+++ b/indra/lscript/lscript_compile/bison.bat
@@ -1,11 +1,11 @@
-@REM Run bison under Windows. This script is needed so that bison can
-@REM find m4, even if neither program is present in PATH.
-
-@set bison=%1
-set M4PATH=%2
-set M4=
-@set output=%3
-@set input=%4
-
-set PATH=%M4PATH%;%PATH%
-%bison% -d -o %output% %input%
+@REM Run bison under Windows. This script is needed so that bison can
+@REM find m4, even if neither program is present in PATH.
+
+@set bison=%1
+set M4PATH=%2
+set M4=
+@set output=%3
+@set input=%4
+
+set PATH=%M4PATH%;%PATH%
+%bison% -d -o %output% %input%
diff --git a/indra/lscript/lscript_compile/windows/unistd.h b/indra/lscript/lscript_compile/windows/unistd.h
index 49e9152d63..0b7e2581e3 100644
--- a/indra/lscript/lscript_compile/windows/unistd.h
+++ b/indra/lscript/lscript_compile/windows/unistd.h
@@ -1,24 +1,24 @@
-/**
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-/* After all that, this file is empty. */
+/**
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+/* After all that, this file is empty. */
diff --git a/indra/mac_crash_logger/CrashReporter.nib/objects.xib b/indra/mac_crash_logger/CrashReporter.nib/objects.xib
index 634d1c5321..32647391b6 100644
--- a/indra/mac_crash_logger/CrashReporter.nib/objects.xib
+++ b/indra/mac_crash_logger/CrashReporter.nib/objects.xib
@@ -15,7 +15,7 @@
<string name="bounds">414 390 434 487 </string>
</object>
<object class="IBCarbonStaticText" id="181">
- <string name="title">Second Life appears to have crashed or frozen the last time it ran.&#10;&#10;This crash reporter collects information about your computer&apos;s hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only.&#10;&#10;In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help!&#10;&#10;This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/&#10;&#10;If you don&apos;t wish to send Linden Lab a crash report, press Cancel.&#10;</string>
+ <string name="title">Second Life appears to have crashed or frozen the last time it ran.&#10;&#10;This crash reporter collects information about your computer&apos;s hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only.&#10;&#10;In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help!&#10;&#10;This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/&#10;&#10;If you don&apos;t wish to send Linden Lab a crash report, press Don&apos;t Send.&#10;</string>
<string name="bounds">20 20 231 487 </string>
</object>
<object class="IBCarbonWindow" id="166">
diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp
index bec8cce04e..8f1c1a2dd0 100644
--- a/indra/mac_crash_logger/llcrashloggermac.cpp
+++ b/indra/mac_crash_logger/llcrashloggermac.cpp
@@ -29,9 +29,6 @@
#include <Carbon/Carbon.h>
#include <iostream>
-#include <sstream>
-
-#include "boost/tokenizer.hpp"
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
#include "llerror.h"
@@ -247,10 +244,11 @@ bool LLCrashLoggerMac::mainLoop()
void LLCrashLoggerMac::updateApplication(const std::string& message)
{
- LLCrashLogger::updateApplication();
+ LLCrashLogger::updateApplication(message);
}
bool LLCrashLoggerMac::cleanup()
{
+ commonCleanup();
return true;
}
diff --git a/indra/mac_crash_logger/mac_crash_logger.cpp b/indra/mac_crash_logger/mac_crash_logger.cpp
index 20b491c401..6571b35241 100644
--- a/indra/mac_crash_logger/mac_crash_logger.cpp
+++ b/indra/mac_crash_logger/mac_crash_logger.cpp
@@ -25,22 +25,23 @@
*/
#include "linden_common.h"
-
#include "llcrashloggermac.h"
int main(int argc, char **argv)
{
- //time(&gLaunchTime);
-
- llinfos << "Starting Second Life Viewer Crash Reporter" << llendl;
+ llinfos << "Starting crash reporter." << llendl;
LLCrashLoggerMac app;
app.parseCommandOptions(argc, argv);
- if(!app.init())
+
+ if (! app.init())
{
- return 0;
+ llwarns << "Unable to initialize application." << llendl;
+ return 1;
}
+
app.mainLoop();
-
+ app.cleanup();
+ llinfos << "Crash reporter finished normally." << llendl;
return 0;
}
diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt
index 56cefde4bd..54dc5de1ea 100644
--- a/indra/media_plugins/example/CMakeLists.txt
+++ b/indra/media_plugins/example/CMakeLists.txt
@@ -79,4 +79,4 @@ if (DARWIN)
LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
-endif (DARWIN) \ No newline at end of file
+endif (DARWIN)
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index fca071c628..47f8dcd545 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -25,12 +25,11 @@
* $/LicenseInfo$
* @endcond
*/
-
#include "llqtwebkit.h"
-
#include "linden_common.h"
#include "indra_constants.h" // for indra keyboard codes
+#include "lltimer.h"
#include "llgl.h"
#include "llplugininstance.h"
@@ -90,6 +89,7 @@ private:
bool mCookiesEnabled;
bool mJavascriptEnabled;
bool mPluginsEnabled;
+ bool mEnableMediaPluginDebugging;
enum
{
@@ -116,9 +116,24 @@ private:
F32 mBackgroundG;
F32 mBackgroundB;
std::string mTarget;
-
+ LLTimer mElapsedTime;
+
VolumeCatcher mVolumeCatcher;
+ void postDebugMessage( const std::string& msg )
+ {
+ if ( mEnableMediaPluginDebugging )
+ {
+ std::stringstream str;
+ str << "@Media Msg> " << "[" << (double)mElapsedTime.getElapsedTimeF32() << "] -- " << msg;
+
+ LLPluginMessage debug_message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "debug_message");
+ debug_message.setValue("message_text", str.str());
+ debug_message.setValue("message_level", "info");
+ sendMessage(debug_message);
+ }
+ }
+
void setInitState(int state)
{
// std::cerr << "changing init state to " << state << std::endl;
@@ -252,6 +267,9 @@ private:
std::string component_dir = application_dir;
#endif
+ // debug spam sent to viewer and displayed in the log as usual
+ postDebugMessage( "Component dir set to: " + component_dir );
+
// window handle - needed on Windows and must be app window.
#if LL_WINDOWS
char window_title[ MAX_PATH ];
@@ -266,10 +284,16 @@ private:
if ( result )
{
mInitState = INIT_STATE_INITIALIZED;
-
+
+ // debug spam sent to viewer and displayed in the log as usual
+ postDebugMessage( "browser initialized okay" );
+
return true;
};
+ // debug spam sent to viewer and displayed in the log as usual
+ postDebugMessage( "browser nOT initialized." );
+
return false;
};
@@ -292,20 +316,34 @@ private:
if(!mHostLanguage.empty())
{
LLQtWebKit::getInstance()->setHostLanguage(mHostLanguage);
+ postDebugMessage( "Setting language to " + mHostLanguage );
}
// turn on/off cookies based on what host app tells us
LLQtWebKit::getInstance()->enableCookies( mCookiesEnabled );
-
+
// turn on/off plugins based on what host app tells us
LLQtWebKit::getInstance()->enablePlugins( mPluginsEnabled );
// turn on/off Javascript based on what host app tells us
+#if LLQTWEBKIT_API_VERSION >= 11
+ LLQtWebKit::getInstance()->enableJavaScript( mJavascriptEnabled );
+#else
LLQtWebKit::getInstance()->enableJavascript( mJavascriptEnabled );
-
+#endif
+
+ std::stringstream str;
+ str << "Cookies enabled = " << mCookiesEnabled << ", plugins enabled = " << mPluginsEnabled << ", Javascript enabled = " << mJavascriptEnabled;
+ postDebugMessage( str.str() );
+
// create single browser window
mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight, mTarget);
+ str.str("");
+ str.clear();
+ str << "Setting browser window size to " << mWidth << " x " << mHeight;
+ postDebugMessage( str.str() );
+
// tell LLQtWebKit about the size of the browser window
LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
@@ -314,7 +352,8 @@ private:
// append details to agent string
LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent );
-
+ postDebugMessage( "Updating user agent with " + mUserAgent );
+
#if !LL_QTWEBKIT_USES_PIXMAPS
// don't flip bitmap
LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
@@ -342,7 +381,17 @@ private:
url << "%22%3E%3C/body%3E%3C/html%3E";
//lldebugs << "data url is: " << url.str() << llendl;
-
+
+ // always display loading overlay now
+#if LLQTWEBKIT_API_VERSION >= 16
+ LLQtWebKit::getInstance()->enableLoadingOverlay(mBrowserWindowId, true);
+#else
+ llwarns << "Ignoring enableLoadingOverlay() call (llqtwebkit version is too old)." << llendl;
+#endif
+ str.clear();
+ str << "Loading overlay enabled = " << mEnableMediaPluginDebugging << " for mBrowserWindowId = " << mBrowserWindowId;
+ postDebugMessage( str.str() );
+
LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, url.str() );
// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
@@ -410,7 +459,10 @@ private:
message.setValueBoolean("history_back_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_BACK));
message.setValueBoolean("history_forward_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_FORWARD));
sendMessage(message);
-
+
+ // debug spam sent to viewer and displayed in the log as usual
+ postDebugMessage( "Navigate begin event at: " + event.getEventUri() );
+
setStatus(STATUS_LOADING);
}
@@ -452,6 +504,8 @@ private:
setInitState(INIT_STATE_NAVIGATE_COMPLETE);
}
+ // debug spam sent to viewer and displayed in the log as usual
+ postDebugMessage( "Navigate complete event at: " + event.getEventUri() );
}
////////////////////////////////////////////////////////////////////////////////
@@ -546,6 +600,10 @@ private:
// These could be passed through as well, but aren't really needed.
// message.setValue("uri", event.getEventUri());
// message.setValueBoolean("dead", (event.getIntValue() != 0))
+
+ // debug spam
+ postDebugMessage( "Sending cookie_set message from plugin: " + event.getStringValue() );
+
sendMessage(message);
}
@@ -824,7 +882,10 @@ MediaPluginWebKit::MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_
mHostLanguage = "en"; // default to english
mJavascriptEnabled = true; // default to on
mPluginsEnabled = true; // default to on
+ mEnableMediaPluginDebugging = false;
mUserAgent = "LLPluginMedia Web Browser";
+
+ mElapsedTime.reset();
}
MediaPluginWebKit::~MediaPluginWebKit()
@@ -1168,6 +1229,11 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
authResponse(message_in);
}
else
+ if(message_name == "enable_media_plugin_debugging")
+ {
+ mEnableMediaPluginDebugging = message_in.getValueBoolean( "enable" );
+ }
+ else
if(message_name == "js_enable_object")
{
#if LLQTWEBKIT_API_VERSION >= 9
@@ -1254,6 +1320,15 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
mFirstFocus = false;
}
}
+ else if(message_name == "set_page_zoom_factor")
+ {
+#if LLQTWEBKIT_API_VERSION >= 15
+ F32 factor = message_in.getValueReal("factor");
+ LLQtWebKit::getInstance()->setPageZoomFactor(factor);
+#else
+ llwarns << "Ignoring setPageZoomFactor message (llqtwebkit version is too old)." << llendl;
+#endif
+ }
else if(message_name == "clear_cache")
{
LLQtWebKit::getInstance()->clearCache();
@@ -1280,6 +1355,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
else if(message_name == "set_cookies")
{
LLQtWebKit::getInstance()->setCookies(message_in.getValue("cookies"));
+
+ // debug spam
+ postDebugMessage( "Plugin setting cookie: " + message_in.getValue("cookies") );
}
else if(message_name == "proxy_setup")
{
@@ -1321,6 +1399,15 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
mUserAgent = message_in.getValue("user_agent");
LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent );
}
+ else if(message_name == "show_web_inspector")
+ {
+#if LLQTWEBKIT_API_VERSION >= 10
+ bool val = message_in.getValueBoolean("show");
+ LLQtWebKit::getInstance()->showWebInspector( val );
+#else
+ llwarns << "Ignoring showWebInspector message (llqtwebkit version is too old)." << llendl;
+#endif
+ }
else if(message_name == "ignore_ssl_cert_errors")
{
#if LLQTWEBKIT_API_VERSION >= 3
@@ -1332,7 +1419,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
else if(message_name == "add_certificate_file_path")
{
#if LLQTWEBKIT_API_VERSION >= 6
- LLQtWebKit::getInstance()->addCAFile( message_in.getValue("path") );
+ LLQtWebKit::getInstance()->setCAFile( message_in.getValue("path") );
#else
llwarns << "Ignoring add_certificate_file_path message (llqtwebkit version is too old)." << llendl;
#endif
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index da9a145423..6b2fe1e45a 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -77,7 +77,7 @@ include_directories(
set(viewer_SOURCE_FILES
groupchatlistener.cpp
- llaccountingquotamanager.cpp
+ llaccountingcostmanager.cpp
llagent.cpp
llagentaccess.cpp
llagentcamera.cpp
@@ -102,7 +102,6 @@ set(viewer_SOURCE_FILES
llavatarlist.cpp
llavatarlistitem.cpp
llavatarpropertiesprocessor.cpp
- llbottomtray.cpp
llbox.cpp
llbreadcrumbview.cpp
llbrowsernotification.cpp
@@ -118,6 +117,7 @@ set(viewer_SOURCE_FILES
llchatitemscontainerctrl.cpp
llchatmsgbox.cpp
llchiclet.cpp
+ llchicletbar.cpp
llclassifiedinfo.cpp
llclassifiedstatsresponder.cpp
llcofwearables.cpp
@@ -150,8 +150,9 @@ set(viewer_SOURCE_FILES
lldrawpoolwlsky.cpp
lldriverparam.cpp
lldynamictexture.cpp
- llenvmanager.cpp
llemote.cpp
+ llenvmanager.cpp
+ llestateinfomodel.cpp
lleventnotifier.cpp
lleventpoll.cpp
llexpandabletextbox.cpp
@@ -167,6 +168,7 @@ set(viewer_SOURCE_FILES
llfloaterabout.cpp
llfloateranimpreview.cpp
llfloaterauction.cpp
+ llfloateravatar.cpp
llfloateravatarpicker.cpp
llfloateravatartextures.cpp
llfloaterbeacons.cpp
@@ -181,6 +183,7 @@ set(viewer_SOURCE_FILES
llfloatercamera.cpp
llfloatercolorpicker.cpp
llfloaterdeleteenvpreset.cpp
+ llfloaterdestinations.cpp
llfloaterdisplayname.cpp
llfloatereditdaycycle.cpp
llfloatereditsky.cpp
@@ -204,17 +207,17 @@ set(viewer_SOURCE_FILES
llfloaterland.cpp
llfloaterlandholdings.cpp
llfloatermap.cpp
- llfloatermediabrowser.cpp
llfloatermediasettings.cpp
llfloatermemleak.cpp
llfloatermodelpreview.cpp
+ llfloatermodeluploadbase.cpp
llfloatermodelwizard.cpp
llfloaternamedesc.cpp
llfloaternotificationsconsole.cpp
+ llfloaterobjectweights.cpp
llfloateropenobject.cpp
llfloaterpay.cpp
llfloaterperms.cpp
- llfloaterpostcard.cpp
llfloaterpostprocess.cpp
llfloaterpreference.cpp
llfloaterproperties.cpp
@@ -226,7 +229,7 @@ set(viewer_SOURCE_FILES
llfloatersearch.cpp
llfloatersellland.cpp
llfloatersettingsdebug.cpp
- llfloatersidetraytab.cpp
+ llfloatersidepanelcontainer.cpp
llfloatersnapshot.cpp
llfloatersounddevices.cpp
llfloatertelehub.cpp
@@ -235,10 +238,13 @@ set(viewer_SOURCE_FILES
llfloatertools.cpp
llfloatertopobjects.cpp
llfloatertos.cpp
+ llfloatertoybox.cpp
+ llfloatertranslationsettings.cpp
llfloateruipreview.cpp
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
llfloaterwebcontent.cpp
+ llfloaterwebprofile.cpp
llfloaterwhitelistentry.cpp
llfloaterwindowsize.cpp
llfloaterworldmap.cpp
@@ -311,7 +317,6 @@ set(viewer_SOURCE_FILES
llmediactrl.cpp
llmediadataclient.cpp
llmemoryview.cpp
- llmenucommands.cpp
llmeshrepository.cpp
llmimetypes.cpp
llmorphview.cpp
@@ -366,6 +371,7 @@ set(viewer_SOURCE_FILES
llpanelmarketplaceinbox.cpp
llpanelmarketplaceinboxinventory.cpp
llpanelmarketplaceoutbox.cpp
+ llpanelmarketplaceoutboxinventory.cpp
llpanelmediasettingsgeneral.cpp
llpanelmediasettingspermissions.cpp
llpanelmediasettingssecurity.cpp
@@ -387,7 +393,12 @@ set(viewer_SOURCE_FILES
llpanelplacestab.cpp
llpanelprimmediacontrols.cpp
llpanelprofile.cpp
- llpanelprofileview.cpp
+ llpanelsnapshot.cpp
+ llpanelsnapshotinventory.cpp
+ llpanelsnapshotlocal.cpp
+ llpanelsnapshotoptions.cpp
+ llpanelsnapshotpostcard.cpp
+ llpanelsnapshotprofile.cpp
llpanelteleporthistory.cpp
llpaneltiptoast.cpp
llpanelvoiceeffect.cpp
@@ -406,6 +417,7 @@ set(viewer_SOURCE_FILES
llpopupview.cpp
llpolymesh.cpp
llpolymorph.cpp
+ llpostcard.cpp
llpreview.cpp
llpreviewanim.cpp
llpreviewgesture.cpp
@@ -437,13 +449,10 @@ set(viewer_SOURCE_FILES
llsidepanelinventorysubpanel.cpp
llsidepaneliteminfo.cpp
llsidepaneltaskinfo.cpp
- llsidetray.cpp
- llsidetraylistener.cpp
llsidetraypanelcontainer.cpp
llsky.cpp
llslurl.cpp
llspatialpartition.cpp
- llspeakbutton.cpp
llspeakers.cpp
llspeakingindicatormanager.cpp
llsplitbutton.cpp
@@ -479,6 +488,7 @@ set(viewer_SOURCE_FILES
lltoastpanel.cpp
lltoastscripttextbox.cpp
lltool.cpp
+ lltoolbarview.cpp
lltoolbrush.cpp
lltoolcomp.cpp
lltooldraganddrop.cpp
@@ -502,6 +512,7 @@ set(viewer_SOURCE_FILES
lltranslate.cpp
lluilistener.cpp
lluploaddialog.cpp
+ lluploadfloaterobservers.cpp
llurl.cpp
llurldispatcher.cpp
llurldispatcherlistener.cpp
@@ -533,9 +544,6 @@ set(viewer_SOURCE_FILES
llviewerjoint.cpp
llviewerjointattachment.cpp
llviewerjointmesh.cpp
- llviewerjointmesh_sse.cpp
- llviewerjointmesh_sse2.cpp
- llviewerjointmesh_vec.cpp
llviewerjoystick.cpp
llviewerkeyboard.cpp
llviewerlayer.cpp
@@ -583,7 +591,6 @@ set(viewer_SOURCE_FILES
llvopartgroup.cpp
llvosky.cpp
llvosurfacepatch.cpp
- llvotextbubble.cpp
llvotree.cpp
llvovolume.cpp
llvowater.cpp
@@ -596,8 +603,10 @@ set(viewer_SOURCE_FILES
llwearablelist.cpp
llwearabletype.cpp
llweb.cpp
+ llwebprofile.cpp
llwebsharing.cpp
llwind.cpp
+ llwindowlistener.cpp
llwlanimator.cpp
llwldaycycle.cpp
llwlhandlers.cpp
@@ -617,25 +626,11 @@ set(viewer_SOURCE_FILES
set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
"The name of the viewer executable to create.")
-if (LINUX)
- # We can't set these flags for Darwin, because they get passed to
- # the PPC compiler. Ugh.
-
- set_source_files_properties(
- llviewerjointmesh_sse.cpp
- PROPERTIES COMPILE_FLAGS "-msse -mfpmath=sse"
- )
- set_source_files_properties(
- llviewerjointmesh_sse2.cpp
- PROPERTIES COMPILE_FLAGS "-msse2 -mfpmath=sse"
- )
-endif (LINUX)
-
set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
groupchatlistener.h
- llaccountingquotamanager.h
+ llaccountingcostmanager.h
llagent.h
llagentaccess.h
llagentcamera.h
@@ -661,7 +656,6 @@ set(viewer_HEADER_FILES
llavatarlist.h
llavatarlistitem.h
llavatarpropertiesprocessor.h
- llbottomtray.h
llbox.h
llbreadcrumbview.h
llbuycurrencyhtml.h
@@ -677,6 +671,7 @@ set(viewer_HEADER_FILES
llchatitemscontainerctrl.h
llchatmsgbox.h
llchiclet.h
+ llchicletbar.h
llclassifiedinfo.h
llclassifiedstatsresponder.h
llcofwearables.h
@@ -711,6 +706,7 @@ set(viewer_HEADER_FILES
lldynamictexture.h
llemote.h
llenvmanager.h
+ llestateinfomodel.h
lleventnotifier.h
lleventpoll.h
llexpandabletextbox.h
@@ -726,6 +722,7 @@ set(viewer_HEADER_FILES
llfloaterabout.h
llfloateranimpreview.h
llfloaterauction.h
+ llfloateravatar.h
llfloateravatarpicker.h
llfloateravatartextures.h
llfloaterbeacons.h
@@ -740,6 +737,7 @@ set(viewer_HEADER_FILES
llfloatercamera.h
llfloatercolorpicker.h
llfloaterdeleteenvpreset.h
+ llfloaterdestinations.h
llfloaterdisplayname.h
llfloatereditdaycycle.h
llfloatereditsky.h
@@ -763,17 +761,17 @@ set(viewer_HEADER_FILES
llfloaterland.h
llfloaterlandholdings.h
llfloatermap.h
- llfloatermediabrowser.h
llfloatermediasettings.h
llfloatermemleak.h
llfloatermodelpreview.h
+ llfloatermodeluploadbase.h
llfloatermodelwizard.h
llfloaternamedesc.h
llfloaternotificationsconsole.h
+ llfloaterobjectweights.h
llfloateropenobject.h
llfloaterpay.h
llfloaterperms.h
- llfloaterpostcard.h
llfloaterpostprocess.h
llfloaterpreference.h
llfloaterproperties.h
@@ -785,7 +783,7 @@ set(viewer_HEADER_FILES
llfloatersearch.h
llfloatersellland.h
llfloatersettingsdebug.h
- llfloatersidetraytab.h
+ llfloatersidepanelcontainer.h
llfloatersnapshot.h
llfloatersounddevices.h
llfloatertelehub.h
@@ -794,10 +792,13 @@ set(viewer_HEADER_FILES
llfloatertools.h
llfloatertopobjects.h
llfloatertos.h
+ llfloatertoybox.h
+ llfloatertranslationsettings.h
llfloateruipreview.h
llfloaterurlentry.h
llfloatervoiceeffect.h
llfloaterwebcontent.h
+ llfloaterwebprofile.h
llfloaterwhitelistentry.h
llfloaterwindowsize.h
llfloaterworldmap.h
@@ -870,7 +871,6 @@ set(viewer_HEADER_FILES
llmediactrl.h
llmediadataclient.h
llmemoryview.h
- llmenucommands.h
llmeshrepository.h
llmimetypes.h
llmorphview.h
@@ -919,6 +919,7 @@ set(viewer_HEADER_FILES
llpanelmarketplaceinbox.h
llpanelmarketplaceinboxinventory.h
llpanelmarketplaceoutbox.h
+ llpanelmarketplaceoutboxinventory.h
llpanelmediasettingsgeneral.h
llpanelmediasettingspermissions.h
llpanelmediasettingssecurity.h
@@ -940,7 +941,7 @@ set(viewer_HEADER_FILES
llpanelplacestab.h
llpanelprimmediacontrols.h
llpanelprofile.h
- llpanelprofileview.h
+ llpanelsnapshot.h
llpanelteleporthistory.h
llpaneltiptoast.h
llpanelvoicedevicesettings.h
@@ -959,6 +960,7 @@ set(viewer_HEADER_FILES
llpolymesh.h
llpolymorph.h
llpopupview.h
+ llpostcard.h
llpreview.h
llpreviewanim.h
llpreviewgesture.h
@@ -991,13 +993,10 @@ set(viewer_HEADER_FILES
llsidepanelinventorysubpanel.h
llsidepaneliteminfo.h
llsidepaneltaskinfo.h
- llsidetray.h
- llsidetraylistener.h
llsidetraypanelcontainer.h
llsky.h
llslurl.h
llspatialpartition.h
- llspeakbutton.h
llspeakers.h
llspeakingindicatormanager.h
llsplitbutton.h
@@ -1034,6 +1033,7 @@ set(viewer_HEADER_FILES
lltoastpanel.h
lltoastscripttextbox.h
lltool.h
+ lltoolbarview.h
lltoolbrush.h
lltoolcomp.h
lltooldraganddrop.h
@@ -1058,6 +1058,7 @@ set(viewer_HEADER_FILES
lluiconstants.h
lluilistener.h
lluploaddialog.h
+ lluploadfloaterobservers.h
llurl.h
llurldispatcher.h
llurldispatcherlistener.h
@@ -1135,7 +1136,6 @@ set(viewer_HEADER_FILES
llvopartgroup.h
llvosky.h
llvosurfacepatch.h
- llvotextbubble.h
llvotree.h
llvotreenew.h
llvovolume.h
@@ -1149,8 +1149,10 @@ set(viewer_HEADER_FILES
llwearablelist.h
llwearabletype.h
llweb.h
+ llwebprofile.h
llwebsharing.h
llwind.h
+ llwindowlistener.h
llwlanimator.h
llwldaycycle.h
llwlhandlers.h
@@ -1246,6 +1248,36 @@ if (WINDOWS)
set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp)
endif(USE_PRECOMPILED_HEADERS)
+ # Replace the icons with the appropriate ones for the channel
+ # ('test' is the default)
+ set(ICON_PATH "test")
+ string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
+ if(channel_lower MATCHES "^second life release")
+ set(ICON_PATH "release")
+ elseif(channel_lower MATCHES "^second life beta viewer")
+ set(ICON_PATH "beta")
+ elseif(channel_lower MATCHES "^second life development")
+ set(ICON_PATH "development")
+ elseif(channel_lower MATCHES "project")
+ set(ICON_PATH "project")
+ endif()
+ message("Copying icons for ${ICON_PATH}")
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_PATH}/secondlife.ico"
+ "${CMAKE_CURRENT_SOURCE_DIR}/res/ll_icon.ico"
+ )
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_PATH}/secondlife_256.BMP"
+ "${CMAKE_CURRENT_SOURCE_DIR}/res/ll_icon.BMP"
+ )
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_PATH}/secondlife_256.BMP"
+ "${CMAKE_CURRENT_SOURCE_DIR}/res-sdl/ll_icon.BMP"
+ )
+
# Add resource files to the project.
# viewerRes.rc is the only buildable file, but
# the rest are all dependencies of it.
@@ -1275,6 +1307,7 @@ if (WINDOWS)
res/lltooltranslate.cur
res/lltoolzoomin.cur
res/lltoolzoomout.cur
+ res-sdl/ll_icon.BMP
res/ll_icon.BMP
res/ll_icon.ico
res/resource.h
@@ -1342,11 +1375,6 @@ endif (WINDOWS)
set(viewer_XUI_FILES
skins/default/colors.xml
skins/default/textures/textures.xml
- skins/minimal/colors.xml
- skins/minimal/textures/textures.xml
-
-
-
)
file(GLOB DEFAULT_XUI_FILE_GLOB_LIST
${CMAKE_CURRENT_SOURCE_DIR}/skins/*/xui/en/*.xml)
@@ -1373,6 +1401,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
set(viewer_APPSETTINGS_FILES
app_settings/anim.ini
app_settings/cmd_line.xml
+ app_settings/commands.xml
app_settings/grass.xml
app_settings/high_graphics.xml
app_settings/ignorable_dialogs.xml
@@ -1385,8 +1414,8 @@ set(viewer_APPSETTINGS_FILES
app_settings/settings_crash_behavior.xml
app_settings/settings_files.xml
app_settings/settings_per_account.xml
- app_settings/settings_minimal.xml
app_settings/std_bump.ini
+ app_settings/toolbars.xml
app_settings/trees.xml
app_settings/ultra_graphics.xml
app_settings/viewerart.xml
@@ -1697,7 +1726,7 @@ endif (WINDOWS)
# that they depend upon. -brad
target_link_libraries(${VIEWER_BINARY_NAME}
${UPDATER_LIBRARIES}
- ${GOOGLE_PERFTOOLS_LIBRARIES}
+ ${GOOGLE_PERFTOOLS_LIBRARIES}
${LLAUDIO_LIBRARIES}
${LLCHARACTER_LIBRARIES}
${LLIMAGE_LIBRARIES}
@@ -1760,14 +1789,14 @@ if (LINUX)
# These are the generated targets that are copied to package/
set(COPY_INPUT_DEPENDENCIES
- ${VIEWER_BINARY_NAME}
- linux-crash-logger
- linux-updater
- SLPlugin
- media_plugin_webkit
- media_plugin_gstreamer010
- llcommon
- )
+ ${VIEWER_BINARY_NAME}
+ linux-crash-logger
+ linux-updater
+ SLPlugin
+ media_plugin_webkit
+ media_plugin_gstreamer010
+ llcommon
+ )
add_custom_command(
OUTPUT ${product}.tar.bz2
@@ -1946,12 +1975,19 @@ if (LL_TESTS)
llmediadataclient.cpp
lllogininstance.cpp
llremoteparcelrequest.cpp
+ lltranslate.cpp
llviewerhelputil.cpp
llversioninfo.cpp
llworldmap.cpp
llworldmipmap.cpp
)
+ set_source_files_properties(
+ lltranslate.cpp
+ PROPERTIES
+ LL_TEST_ADDITIONAL_LIBRARIES "${JSONCPP_LIBRARIES}"
+ )
+
##################################################
# DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
##################################################
@@ -2026,12 +2062,12 @@ if (LL_TESTS)
)
LL_ADD_INTEGRATION_TEST(llsimplestat
- ""
+ ""
"${test_libs}"
)
LL_ADD_INTEGRATION_TEST(llviewerassetstats
- llviewerassetstats.cpp
+ llviewerassetstats.cpp
"${test_libs}"
)
diff --git a/indra/newview/app_settings/CA.pem b/indra/newview/app_settings/CA.pem
index 63bb036c92..8c1b9a1f37 100644
--- a/indra/newview/app_settings/CA.pem
+++ b/indra/newview/app_settings/CA.pem
@@ -1,362 +1,322 @@
-----BEGIN CERTIFICATE-----
-MIIEuDCCA6CgAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMCQlIx
-EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h
-bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxETAPBgNVBAcTCEJy
-YXNpbGlhMQswCQYDVQQIEwJERjExMC8GA1UEAxMoQXV0b3JpZGFkZSBDZXJ0aWZp
-Y2Fkb3JhIFJhaXogQnJhc2lsZWlyYTAeFw0wMTExMzAxMjU4MDBaFw0xMTExMzAy
-MzU5MDBaMIG0MQswCQYDVQQGEwJCUjETMBEGA1UEChMKSUNQLUJyYXNpbDE9MDsG
-A1UECxM0SW5zdGl0dXRvIE5hY2lvbmFsIGRlIFRlY25vbG9naWEgZGEgSW5mb3Jt
-YWNhbyAtIElUSTERMA8GA1UEBxMIQnJhc2lsaWExCzAJBgNVBAgTAkRGMTEwLwYD
-VQQDEyhBdXRvcmlkYWRlIENlcnRpZmljYWRvcmEgUmFpeiBCcmFzaWxlaXJhMIIB
-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwPMudwX/hvm+Uh2b/lQAcHVA
-isamaLkWdkwP9/S/tOKIgRrL6Oy+ZIGlOUdd6uYtk9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MP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
+/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIFajCCBFKgAwIBAgIEPLU9RjANBgkqhkiG9w0BAQUFADBmMRIwEAYDVQQKEwli
@@ -390,184 +350,85 @@ gkHNZTfqjjJ+vWuZXTARyNtIVBw74acT02pIk/c9jH8F6M7ziCpjBLjqflh8AXtb
CReJf8Py05yc493EG931t3GzUwWJBtDLSoDByFOQtTwxiBdQn8nEDovYqAJjDQ==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
-MIIGUTCCBTmgAwIBAgIEPLVPQDANBgkqhkiG9w0BAQUFADBmMRIwEAYDVQQKEwli
-ZVRSVVNUZWQxGzAZBgNVBAsTEmJlVFJVU1RlZCBSb290IENBczEzMDEGA1UEAxMq
-YmVUUlVTVGVkIFJvb3QgQ0EgLSBFbnRydXN0IEltcGxlbWVudGF0aW9uMB4XDTAy
-MDQxMTA4MjQyN1oXDTIyMDQxMTA4NTQyN1owZjESMBAGA1UEChMJYmVUUlVTVGVk
-MRswGQYDVQQLExJiZVRSVVNUZWQgUm9vdCBDQXMxMzAxBgNVBAMTKmJlVFJVU1Rl
-ZCBSb290IENBIC0gRW50cnVzdCBJbXBsZW1lbnRhdGlvbjCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBALr0RAOqEmq1Q+xVkrYwfTVXDNvzDSduTPdQqJtO
-K2/b9a0cS12zqcH+e0TrW6MFDR/FNCswACnxeECypP869AGIF37m1CbTukzqMvtD
-d5eHI8XbQ6P1KqNRXuE70mVpflUVm3rnafdE4Fe1FehmYA8NA/uCjqPoEXtsvsdj
-DheT389Lrm5zdeDzqrmkwAkbhepxKYhBMvnwKg5sCfJ0a2ZsUhMfGLzUPvfYbiCe
-yv78IZTuEyhL11xeDGbu6bsPwTSxfwh28z0mcMmLJR1iJAzqHHVOwBLkuhMdMCkt
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Bj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
+mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
+Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
+WD9f
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDdTCCAl2gAwIBAgILAgAAAAAA1ni3lAUwDQYJKoZIhvcNAQEEBQAwVzELMAkG
@@ -837,19 +825,305 @@ ncJWWJh3w/cbrPad+D6qp1RF8PX51TFl/mtYnHGzHtdS6jIX/EBgHcl5JLL2bP2o
Zg6C3ZjL2sJETy6ge/L3ayx2EYRGinij4w==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
-MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
-VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
-bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
-b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
-UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
-cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
-b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
-iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
-r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
-04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAU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/rn9X9R+WfN9v3YIwLGUb
+QErNaLly7HF27FSOH4UMAWr6pjisH8SE
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW
@@ -2495,327 +4372,37 @@ OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH
QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
-MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
-A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
-Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
-MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
-A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
-v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
-eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
-tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
-C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
-zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
-mTAOBgNVHQ8BAf8EBAMCAQY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bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbwMVcoEoJz6TMvplW0C5GUR5z6
+u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3ynGQI0DvDKcWy
+7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
+iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
-----END CERTIFICATE-----
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 89e5949fbe..15434f2b8f 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -220,8 +220,7 @@
<map>
<key>desc</key>
<string>Set the detail level.
- 0 - low, 1 - medium, 2 - high, 3 - ultra
- </string>
+0 - low, 1 - medium, 2 - high, 3 - ultra</string>
<key>count</key>
<integer>1</integer>
</map>
@@ -229,10 +228,7 @@
<key>setdefault</key>
<map>
<key>desc</key>
- <string> specify the value of a particular
- configuration variable which can be
- overridden by settings.xml
- </string>
+ <string>specify the value of a particular configuration variable which can be overridden by settings.xml.</string>
<key>count</key>
<integer>2</integer>
<!-- Special case. Mapped to settings procedurally. -->
@@ -241,10 +237,7 @@
<key>set</key>
<map>
<key>desc</key>
- <string> specify the value of a particular
- configuration variable that
- overrides all other settings
- </string>
+ <string>specify the value of a particular configuration variable that overrides all other settings.</string>
<key>count</key>
<integer>2</integer>
<key>compose</key>
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
new file mode 100644
index 0000000000..a44b895f7b
--- /dev/null
+++ b/indra/newview/app_settings/commands.xml
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<commands>
+ <command name="aboutland"
+ available_in_toybox="true"
+ icon="Command_AboutLand_Icon"
+ label_ref="Command_AboutLand_Label"
+ tooltip_ref="Command_AboutLand_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="about_land"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="about_land"
+ />
+ <command name="appearance"
+ available_in_toybox="true"
+ icon="Command_Appearance_Icon"
+ label_ref="Command_Appearance_Label"
+ tooltip_ref="Command_Appearance_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="appearance"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="appearance"
+ />
+ <command name="avatar"
+ available_in_toybox="true"
+ icon="Command_Avatar_Icon"
+ label_ref="Command_Avatar_Label"
+ tooltip_ref="Command_Avatar_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="avatar"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="avatar"
+ />
+ <command name="build"
+ available_in_toybox="true"
+ icon="Command_Build_Icon"
+ label_ref="Command_Build_Label"
+ tooltip_ref="Command_Build_Tooltip"
+ execute_function="Build.Toggle"
+ execute_parameters="build"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="build"
+ />
+ <command name="chat"
+ available_in_toybox="true"
+ icon="Command_Chat_Icon"
+ label_ref="Command_Chat_Label"
+ tooltip_ref="Command_Chat_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="chat_bar"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="chat_bar"
+ />
+ <command name="compass"
+ available_in_toybox="false"
+ icon="Command_Compass_Icon"
+ label_ref="Command_Compass_Label"
+ tooltip_ref="Command_Compass_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="compass"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="compass"
+ />
+ <command name="destinations"
+ available_in_toybox="true"
+ icon="Command_Destinations_Icon"
+ label_ref="Command_Destinations_Label"
+ tooltip_ref="Command_Destinations_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="destinations"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="destinations"
+ />
+ <command name="gestures"
+ available_in_toybox="true"
+ icon="Command_Gestures_Icon"
+ label_ref="Command_Gestures_Label"
+ tooltip_ref="Command_Gestures_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="gestures"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="gestures"
+ />
+ <command name="howto"
+ available_in_toybox="true"
+ icon="Command_HowTo_Icon"
+ label_ref="Command_HowTo_Label"
+ tooltip_ref="Command_HowTo_Tooltip"
+ execute_function="Help.ToggleHowTo"
+ is_running_function="Help.HowToVisible"
+ />
+ <command name="inventory"
+ available_in_toybox="true"
+ icon="Command_Inventory_Icon"
+ label_ref="Command_Inventory_Label"
+ tooltip_ref="Command_Inventory_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="inventory"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="inventory"
+ />
+ <command name="map"
+ available_in_toybox="true"
+ icon="Command_Map_Icon"
+ label_ref="Command_Map_Label"
+ tooltip_ref="Command_Map_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="world_map"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="world_map"
+ />
+ <command name="marketplace"
+ available_in_toybox="false"
+ icon="Command_Marketplace_Icon"
+ label_ref="Command_Marketplace_Label"
+ tooltip_ref="Command_Marketplace_Tooltip"
+ execute_function="Avatar.OpenMarketplace"
+ />
+ <command name="minimap"
+ available_in_toybox="true"
+ icon="Command_MiniMap_Icon"
+ label_ref="Command_MiniMap_Label"
+ tooltip_ref="Command_MiniMap_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="mini_map"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="mini_map"
+ />
+ <command name="move"
+ available_in_toybox="true"
+ icon="Command_Move_Icon"
+ label_ref="Command_Move_Label"
+ tooltip_ref="Command_Move_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="moveview"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="moveview"
+ />
+ <command name="people"
+ available_in_toybox="true"
+ icon="Command_People_Icon"
+ label_ref="Command_People_Label"
+ tooltip_ref="Command_People_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="people"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="people"
+ />
+ <command name="picks"
+ available_in_toybox="true"
+ icon="Command_Picks_Icon"
+ label_ref="Command_Picks_Label"
+ tooltip_ref="Command_Picks_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="picks"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="picks"
+ />
+ <command name="places"
+ available_in_toybox="true"
+ icon="Command_Places_Icon"
+ label_ref="Command_Places_Label"
+ tooltip_ref="Command_Places_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="places"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="places"
+ />
+ <command name="preferences"
+ available_in_toybox="true"
+ icon="Command_Preferences_Icon"
+ label_ref="Command_Preferences_Label"
+ tooltip_ref="Command_Preferences_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="preferences"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="preferences"
+ />
+ <command name="profile"
+ available_in_toybox="true"
+ icon="Command_Profile_Icon"
+ label_ref="Command_Profile_Label"
+ tooltip_ref="Command_Profile_Tooltip"
+ execute_function="Avatar.ToggleMyProfile"
+ is_running_function="Avatar.IsMyProfileOpen"
+ />
+ <command name="search"
+ available_in_toybox="true"
+ icon="Command_Search_Icon"
+ label_ref="Command_Search_Label"
+ tooltip_ref="Command_Search_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="search"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="search"
+ />
+ <command name="snapshot"
+ available_in_toybox="true"
+ icon="Command_Snapshot_Icon"
+ label_ref="Command_Snapshot_Label"
+ tooltip_ref="Command_Snapshot_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="snapshot"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="snapshot"
+ />
+ <command name="speak"
+ available_in_toybox="true"
+ icon="Command_Speak_Icon"
+ label_ref="Command_Speak_Label"
+ tooltip_ref="Command_Speak_Tooltip"
+ execute_function="Agent.PressMicrophone"
+ execute_parameters="speak"
+ execute_stop_function="Agent.ReleaseMicrophone"
+ execute_stop_parameters="speak"
+ is_enabled_function="Agent.IsActionAllowed"
+ is_enabled_parameters="speak"
+ is_running_function="Agent.IsMicrophoneOn"
+ is_running_parameters="speak"
+ />
+ <command name="view"
+ available_in_toybox="true"
+ icon="Command_View_Icon"
+ label_ref="Command_View_Label"
+ tooltip_ref="Command_View_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="camera"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="camera"
+ />
+ <command name="voice"
+ available_in_toybox="true"
+ icon="Command_Voice_Icon"
+ label_ref="Command_Voice_Label"
+ tooltip_ref="Command_Voice_Tooltip"
+ execute_function="Floater.ToggleOrBringToFront"
+ execute_parameters="voice_controls"
+ is_running_function="Floater.IsOpen"
+ is_running_parameters="voice_controls"
+ />
+</commands>
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 9fa4046fdf..82b43432eb 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -10,7 +10,7 @@ state Keyword to indicate state block or state transition
integer Integer type
float Floating-point type
string String type
-key Key type. Use NULL_KEY to test for empty keys.
+key Key type. Use NULL_KEY to test for empty keys
vector Vector type of 3 floats. Used to represent 3D motion, Euler angles, and color.:Access components by .x, .y. or .z
rotation Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y., .z, or .w
list List of various data types
@@ -28,7 +28,7 @@ collision_end collision_end(integer num_detected):Triggered when task stops coll
land_collision_start land_collision_start(vector pos):Triggered when task starts colliding with land
land_collision land_collision(vector pos):Triggered when task is colliding with land
land_collision_end land_collision_end(vector pos):Triggered when task stops colliding with land
-timer timer():Result of the llSetTimerEvent library function call.
+timer timer():Result of the llSetTimerEvent library function call
listen listen(integer channel, string name, key id, string message):Result of the llListen library function call
sensor sensor(integer num_detected):Result of the llSensor library function call
no_sensor no_sensor():Result of the llSensor library function call
@@ -44,8 +44,8 @@ attach attach(key id):Triggered when task attaches or detaches from agent
dataserver dataserver(key queryid, string data):Triggered when task receives asynchronous data
moving_start moving_start():Triggered when task begins moving
moving_end moving_end():Triggered when task stops moving
-on_rez on_rez(integer start_param):Triggered when task is rezed in from inventory or another task
-object_rez object_rez(key id):Triggered when task rezes in another task
+on_rez on_rez(integer start_param):Triggered when task is rezzed in from inventory or another task
+object_rez object_rez(key id):Triggered when task rezzes in another task
link_message link_message(integer sender_num, integer num, string str, key id):Triggered when task receives a link message via LLMessageLinked library function call
changed changed( integer change ):Triggered various event change the task:(test change with CHANGED_INVENTORY, CHANGED_COLOR, CHANGED_SHAPE, CHANGED_SCALE, CHANGED_TEXTURE, CHANGED_LINK, CHANGED_ALLOWED_DROP, CHANGED_OWNER, CHANGED_REGION, CHANGED_TELEPORT, CHANGED_REGION_START, CHANGED_MEDIA)
remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY)
@@ -151,15 +151,15 @@ PSYS_SRC_PATTERN_ANGLE
PSYS_SRC_PATTERN_ANGLE_CONE
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
-OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type.
-OBJECT_NAME Used with llGetObjectDetails to get an object's name.
-OBJECT_DESC Used with llGetObjectDetails to get an object's description.
-OBJECT_POS Used with llGetObjectDetails to get an object's position.
-OBJECT_ROT Used with llGetObjectDetails to get an object's rotation.
-OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity.
-OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned.
-OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key.
-OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key.
+OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type
+OBJECT_NAME Used with llGetObjectDetails to get an object's name
+OBJECT_DESC Used with llGetObjectDetails to get an object's description
+OBJECT_POS Used with llGetObjectDetails to get an object's position
+OBJECT_ROT Used with llGetObjectDetails to get an object's rotation
+OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity
+OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned
+OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key
+OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key
# some vehicle params
VEHICLE_TYPE_NONE
@@ -198,7 +198,7 @@ VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY A slider between 0 (bouncy) and 1 (critic
VEHICLE_VERTICAL_ATTRACTION_TIMESCALE The exponential timescale for the vehicle to align its z-axis to the world z-axis (vertical)
VEHICLE_BANKING_EFFICIENCY A slider between -1 (leans out of turns), 0 (no banking), and +1 (leans into turns)
-VEHICLE_BANKING_MIX A slider betwen 0 (static banking) and 1 (dynamic banking)
+VEHICLE_BANKING_MIX A slider between 0 (static banking) and 1 (dynamic banking)
VEHICLE_BANKING_TIMESCALE The exponential timescale for the banking behavior to take full effect
VEHICLE_FLAG_NO_DEFLECTION_UP Prevents linear deflection along world-z axis
@@ -208,9 +208,9 @@ VEHICLE_FLAG_HOVER_TERRAIN_ONLY Hover only pays attention to terrain height
VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT Hover only pays attention to global height
VEHICLE_FLAG_HOVER_UP_ONLY Hover only pushes up
VEHICLE_FLAG_LIMIT_MOTOR_UP Prevents ground vehicles from motoring into the sky
-VEHICLE_FLAG_MOUSELOOK_STEER Makes vehicle try to turn toward mouselook direction.
-VEHICLE_FLAG_MOUSELOOK_BANK Makes vehicle try to turn toward mouselook direction assuming banking is enabled.
-VEHICLE_FLAG_CAMERA_DECOUPLED Causes the camera look-at axis to NOT move when the vehicle rotates.
+VEHICLE_FLAG_MOUSELOOK_STEER Makes vehicle try to turn toward mouselook direction
+VEHICLE_FLAG_MOUSELOOK_BANK Makes vehicle try to turn toward mouselook direction assuming banking is enabled
+VEHICLE_FLAG_CAMERA_DECOUPLED Causes the camera look-at axis to NOT move when the vehicle rotates
CAMERA_PITCH (-45 to 80) (Adjusts the angular amount that the camera aims straight ahead vs. straight down, maintaining the same distance. Analogous to 'incidence'.")
CAMERA_FOCUS_OFFSET (-10 to 10) A vector that adjusts the position of the camera focus position relative to the subject
@@ -238,7 +238,7 @@ INVENTORY_BODYPART Passed to task inventory library functions to reference body
INVENTORY_ANIMATION Passed to task inventory library functions to reference animations
INVENTORY_GESTURE Passed to task inventory library functions to reference gestures
INVENTORY_ALL Passed to task inventory library functions to reference all inventory items
-INVENTORY_NONE Returned by llGetInventoryType when no item is found.
+INVENTORY_NONE Returned by llGetInventoryType when no item is found
ATTACH_CHEST Passed to llAttachToAvatar to attach task to chest
ATTACH_HEAD Passed to llAttachToAvatar to attach task to head
@@ -256,7 +256,7 @@ ATTACH_LEAR Passed to llAttachToAvatar to attach task to left ear
ATTACH_REAR Passed to llAttachToAvatar to attach task to right ear
ATTACH_LEYE Passed to llAttachToAvatar to attach task to left eye
ATTACH_REYE Passed to llAttachToAvatar to attach task to right eye
-ATTACH_NOSE Passed to llAttachToAvatar to attach task to noce
+ATTACH_NOSE Passed to llAttachToAvatar to attach task to nose
ATTACH_RUARM Passed to llAttachToAvatar to attach task to right upper arm
ATTACH_RLARM Passed to llAttachToAvatar to attach task to right lower arm
ATTACH_LUARM Passed to llAttachToAvatar to attach task to left upper arm
@@ -296,7 +296,7 @@ PAYMENT_INFO_USED Used with llRequestAgentData to tell if Agent is of "Payment I
ANIM_ON Enable texture animation
LOOP Loop when animating textures
REVERSE Animate in the reverse direction
-PING_PONG Animate forward, then reverse.
+PING_PONG Animate forward, then reverse
SMOOTH Textures slides, instead of stepping
ROTATE Rotates the texture, instead of using frames
SCALE Scales the texture, instead of using frames
@@ -343,7 +343,7 @@ PRIM_FLEXIBLE Followed by TRUE or FALSE, integer softness, float gravity, float
PRIM_POINT_LIGHT Followed by TRUE or FALSE, vector color, float intensity, float radius, float falloff
PRIM_TEMP_ON_REZ Sets temporay on rez to TRUE or FALSE
PRIM_PHANTOM Sets phantom to TRUE or FALSE
-PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an integer, but has no effect when set and always returns 0 if used in llGetPrimitiveParams.
+PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an integer, but has no effect when set and always returns 0 if used in llGetPrimitiveParams
PRIM_POSITION Sets primitive position to a vector position
PRIM_SIZE Sets primitive size to a vector size
PRIM_ROTATION Sets primitive rotation
@@ -363,10 +363,10 @@ PRIM_TYPE_TUBE Followed by integer hole shape, vector cut, float hollow, vector
PRIM_TYPE_RING Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew
PRIM_TYPE_SCULPT Followed by a key/string texture uuid, and one of PRIM_SCULPT_TYPE_SPHERE, PRIM_SCULPT_TYPE_TORUS, PRIM_SCULPT_TYPE_PLANE, or PRIM_SCULPT_TYPE_CYLINDER
-PRIM_HOLE_DEFAULT Sets hole type to match the prim type.
-PRIM_HOLE_SQUARE Sets hole type to square.
-PRIM_HOLE_CIRCLE Sets hole type to circle.
-PRIM_HOLE_TRIANGLE Sets hole type to triangle.
+PRIM_HOLE_DEFAULT Sets hole type to match the prim type
+PRIM_HOLE_SQUARE Sets hole type to square
+PRIM_HOLE_CIRCLE Sets hole type to circle
+PRIM_HOLE_TRIANGLE Sets hole type to triangle
PRIM_MATERIAL_STONE Sets material to stone
PRIM_MATERIAL_METAL Sets material to metal
@@ -436,7 +436,7 @@ PARCEL_MEDIA_COMMAND_TIME Set media stream to specific time
PARCEL_MEDIA_COMMAND_SIZE Get or set the parcel's media pixel resolution
PARCEL_MEDIA_COMMAND_AGENT Allows media stream commands to apply to only one agent
PARCEL_MEDIA_COMMAND_UNLOAD Unloads the media stream
-PARCEL_MEDIA_COMMAND_AUTO_ALIGN Auto aligns the media stream to the texture size. May cause a performance hit and loss of some visual quality.
+PARCEL_MEDIA_COMMAND_AUTO_ALIGN Auto aligns the media stream to the texture size. May cause a performance hit and loss of some visual quality
PAY_HIDE Used with llSetPayPrice to hide a button
PAY_DEFAULT Used with llSetPayPrice to use the default price for a button
@@ -481,7 +481,7 @@ REGION_FLAG_RESTRICT_PUSHOBJECT Used with llGetRegionFlags to find if a region
HTTP_METHOD Used with llHTTPRequest to specify the method, such as "GET" or "POST"
HTTP_MIMETYPE Used with llHTTPRequest to specify the MIME type, defaults to "text/plain"
-HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maxium reponse body to return
+HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum response body to return
HTTP_VERIFY_CERT Used with llHTTPRequest to specify SSL certificate verification
HTTP_BODY_TRUNCATED Used with http_response to indicate truncation point in bytes
@@ -492,17 +492,17 @@ PARCEL_COUNT_OTHER Used with llGetParcelPrimCount to get the number of prims on
PARCEL_COUNT_SELECTED Used with llGetParcelPrimCount to get the number of prims on the parcel currently selected or sat upon
PARCEL_COUNT_TEMP Used with llGetParcelPrimCount to get the number of prims on the parcel that are temp on rez
-PARCEL_DETAILS_NAME Used with llGetParcelDetails to get the parcel name.
-PARCEL_DETAILS_DESC Used with llGetParcelDetails to get the parcel description.
-PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id.
-PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id.
-PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters.
-PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id.
-PARCEL_DETAILS_SEE_AVATARS Used with llGetParcelDetails to get the avatars visibility setting.
+PARCEL_DETAILS_NAME Used with llGetParcelDetails to get the parcel name
+PARCEL_DETAILS_DESC Used with llGetParcelDetails to get the parcel description
+PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id
+PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id
+PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters
+PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id
+PARCEL_DETAILS_SEE_AVATARS Used with llGetParcelDetails to get the avatars visibility setting
-STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string.
-STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string.
-STRING_TRIM Used with llStringTrim to trim both leading and trailing spaces from a string.
+STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string
+STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string
+STRING_TRIM Used with llStringTrim to trim both leading and trailing spaces from a string
CLICK_ACTION_NONE Used with llSetClickAction to disable the click action
CLICK_ACTION_TOUCH Used with llSetClickAction to set touch as the default action when object is clicked
@@ -514,9 +514,9 @@ CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default ac
CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked
CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked
-TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid.
-TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid.
-TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid.
+TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid
+TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid
+TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid
PRIM_MEDIA_ALT_IMAGE_ENABLE Used with ll{Get,Set}PrimMediaParams to enable the default alt image for media
PRIM_MEDIA_CONTROLS Used with ll{Get,Set}PrimMediaParams to determine the controls shown for media
@@ -603,9 +603,11 @@ return Leave current function or event handler
# Comment
[one_sided_delimiter .8, .3, .15]
// Comment:Non-functional commentary or disabled code
+[two_sided_delimiter .8, .3, .15]
+/* */ Comment:Non-functional commentary or disabled code
# String literals
-[two_sided_delimiter 0, .2, 0]
+[double_quotation_marks 0, .2, 0]
" String literal
-#functions are supplied by the program now.
+#functions are supplied by the program now
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 9f4e89691f..a76eb3cd37 100644
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -43,8 +43,7 @@
<key>tags</key>
<array>
<!-- sample entry for debugging a specific item -->
-<!-- <string>Voice</string> -->
- <string>Capabilities</string>
+<!-- <string>Voice</string> -->
</array>
</map>
</array>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4b62e376b5..c1a3f8480d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16,8 +16,10 @@
<key>AFKTimeout</key>
<map>
<key>Comment</key>
- <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never).
- Valid values are: 0, 120, 300, 600, 1800</string>
+ <string>
+ Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never).
+ Valid values are: 0, 120, 300, 600, 1800
+</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -617,7 +619,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string></string>
+ <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html</string>
</map>
<key>AvatarBakedTextureUploadTimeout</key>
<map>
@@ -796,6 +798,61 @@
<key>Value</key>
<integer>5</integer>
</map>
+ <key>Socks5ProxyEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Use Socks5 Proxy</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>HttpProxyType</key>
+ <map>
+ <key>Comment</key>
+ <string>Proxy type to use for HTTP operations</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>Socks</string>
+ </map>
+ <key>Socks5ProxyHost</key>
+ <map>
+ <key>Comment</key>
+ <string>Socks 5 Proxy Host</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
+ <key>Socks5ProxyPort</key>
+ <map>
+ <key>Comment</key>
+ <string>Socks 5 Proxy Port</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>1080</integer>
+ </map>
+ <key>Socks5AuthType</key>
+ <map>
+ <key>Comment</key>
+ <string>Selected Auth mechanism for Socks5</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>None</string>
+ </map>
<key>BuildAxisDeadZone0</key>
<map>
<key>Comment</key>
@@ -1093,28 +1150,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ButtonFlashCount</key>
- <map>
- <key>Comment</key>
- <string>Number of flashes after which flashing buttons stay lit up</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>8</integer>
- </map>
- <key>ButtonFlashRate</key>
- <map>
- <key>Comment</key>
- <string>Frequency at which buttons flash (hz)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.25</real>
- </map>
<key>ButtonHPad</key>
<map>
<key>Comment</key>
@@ -1357,6 +1392,18 @@
<real>0.5</real>
</map>
+ <key>CameraMaxCoF</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum camera circle of confusion for DoF effect</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>10.0</real>
+ </map>
+
<key>CameraFNumber</key>
<map>
<key>Comment</key>
@@ -1515,17 +1562,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ChatVisible</key>
- <map>
- <key>Comment</key>
- <string>Chat bar is visible</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ChatWindow</key>
<map>
<key>Comment</key>
@@ -1570,17 +1606,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>CloseSnapshotOnKeep</key>
- <map>
- <key>Comment</key>
- <string>Close snapshot window after saving snapshot</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>CmdLineDisableVoice</key>
<map>
<key>Comment</key>
@@ -1627,17 +1652,6 @@
<string />
</array>
</map>
- <key>CompressSnapshotsToDisk</key>
- <map>
- <key>Comment</key>
- <string>Compress snapshots saved to disk (Using JPEG 2000)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ConnectAsGod</key>
<map>
<key>Comment</key>
@@ -1803,6 +1817,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>CurlUseMultipleThreads</key>
+ <map>
+ <key>Comment</key>
+ <string>Use background threads for executing curl_multi_perform (requires restart)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>Cursor3D</key>
<map>
<key>Comment</key>
@@ -1869,6 +1894,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>DebugHideEmptySystemFolders</key>
+ <map>
+ <key>Comment</key>
+ <string>Hide empty system folders when on</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>DebugInventoryFilters</key>
<map>
<key>Comment</key>
@@ -1924,6 +1960,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>DebugShowPrivateMem</key>
+ <map>
+ <key>Comment</key>
+ <string>Show Private Mem Info</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DebugShowRenderInfo</key>
<map>
<key>Comment</key>
@@ -1935,17 +1982,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>DebugShowUploadCost</key>
- <map>
- <key>Comment</key>
- <string>Show what it would cost to upload assets in current scene</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>DebugShowRenderMatrices</key>
<map>
<key>Comment</key>
@@ -1979,6 +2015,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>DebugShowUploadCost</key>
+ <map>
+ <key>Comment</key>
+ <string>Show mesh upload cost</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>DebugShowXUINames</key>
<map>
<key>Comment</key>
@@ -2660,7 +2707,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string></string>
+ <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/guide.html</string>
</map>
<key>DisableCameraConstraints</key>
<map>
@@ -3080,17 +3127,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>EnableRippleWater</key>
- <map>
- <key>Comment</key>
- <string>Whether to use ripple water shader or not</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>EnableTextureAtlas</key>
<map>
<key>Comment</key>
@@ -3111,7 +3147,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>0</integer>
</map>
<key>EnableVoiceChat</key>
<map>
@@ -3848,7 +3884,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://www.xstreetsl.com/modules.php?name=Marketplace&amp;CategoryID=233</string>
+ <string>https://marketplace.secondlife.com/products/search?search[category_id]=200&amp;search[maturity][]=General&amp;search[page]=1&amp;search[per_page]=12</string>
</map>
<key>GridCrossSections</key>
<map>
@@ -3971,6 +4007,17 @@
<key>Value</key>
<string>http://viewer-help.secondlife.com/[LANGUAGE]/[CHANNEL]/[VERSION]/[TOPIC][DEBUG_MODE]</string>
</map>
+ <key>HowToHelpURL</key>
+ <map>
+ <key>Comment</key>
+ <string>URL for How To help content</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/howto/index.html</string>
+ </map>
<key>HomeSidePanelURL</key>
<map>
<key>Comment</key>
@@ -3991,7 +4038,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://search-beta.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
+ <string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
<key>WebProfileURL</key>
<map>
@@ -4213,6 +4260,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>InventoryMarketplaceUserStatus</key>
+ <map>
+ <key>Comment</key>
+ <string>Marketplace user status.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>InventorySortOrder</key>
<map>
<key>Comment</key>
@@ -4444,17 +4502,6 @@
<key>Value</key>
<real>2.0</real>
</map>
- <key>LastInventoryInboxExpand</key>
- <map>
- <key>Comment</key>
- <string>The last time the received items inbox was expanded.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string />
- </map>
<key>LCDDestination</key>
<map>
<key>Comment</key>
@@ -4521,21 +4568,21 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>LastGPUClass</key>
+ <key>LastGPUString</key>
<map>
<key>Comment</key>
- <string>[DO NOT MODIFY] previous GPU class for tracking hardware changes</string>
+ <string>[DO NOT MODIFY] previous GPU id string for tracking hardware changes</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>S32</string>
+ <string>String</string>
<key>Value</key>
- <integer>-1</integer>
+ <string></string>
</map>
<key>LastFeatureVersion</key>
<map>
<key>Comment</key>
- <string>[DO NOT MODIFY] Version number for tracking hardware changes</string>
+ <string>[DO NOT MODIFY] Feature Table Version number for tracking rendering system changes</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -4599,6 +4646,17 @@
<string>0.0.0</string>
</map>
+ <key>LastSnapshotToProfileHeight</key>
+ <map>
+ <key>Comment</key>
+ <string>The height of the last profile snapshot, in px</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>768</integer>
+ </map>
<key>LastSnapshotToEmailHeight</key>
<map>
<key>Comment</key>
@@ -4610,6 +4668,17 @@
<key>Value</key>
<integer>768</integer>
</map>
+ <key>LastSnapshotToProfileWidth</key>
+ <map>
+ <key>Comment</key>
+ <string>The width of the last profile snapshot, in px</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>1024</integer>
+ </map>
<key>LastSnapshotToEmailWidth</key>
<map>
<key>Comment</key>
@@ -4665,17 +4734,6 @@
<key>Value</key>
<integer>512</integer>
</map>
- <key>LastSnapshotType</key>
- <map>
- <key>Comment</key>
- <string>Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>LeftClickShowMenu</key>
<map>
<key>Comment</key>
@@ -4872,7 +4930,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string />
+ <string/>
</map>
<key>LosslessJ2CUpload</key>
<map>
@@ -4894,7 +4952,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>20.0</real>
+ <real>60.0</real>
</map>
<key>MapOverlayIndex</key>
<map>
@@ -5026,7 +5084,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/</string>
+ <string>https://marketplace.secondlife.com/</string>
</map>
<key>MarketplaceURL_objectFemale</key>
<map>
@@ -5037,7 +5095,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/attachments</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/attachments</string>
</map>
<key>MarketplaceURL_objectMale</key>
<map>
@@ -5048,7 +5106,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/attachments</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/attachments</string>
</map>
<key>MarketplaceURL_clothingFemale</key>
<map>
@@ -5059,7 +5117,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/clothing_female_avatar</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/clothing_female_avatar</string>
</map>
<key>MarketplaceURL_clothingMale</key>
<map>
@@ -5070,7 +5128,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/clothing_male_avatar</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/clothing_male_avatar</string>
</map>
<key>MarketplaceURL_bodypartFemale</key>
<map>
@@ -5081,7 +5139,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com</string>
+ <string>https://marketplace.secondlife.com/</string>
</map>
<key>MarketplaceURL_bodypartMale</key>
<map>
@@ -5092,7 +5150,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/</string>
+ <string>https://marketplace.secondlife.com/</string>
</map>
<key>MarketplaceURL_glovesMale</key>
<map>
@@ -5103,7 +5161,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string>
</map>
<key>MarketplaceURL_glovesFemale</key>
<map>
@@ -5114,7 +5172,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men</string>
</map>
<key>MarketplaceURL_jacketFemale</key>
<map>
@@ -5125,7 +5183,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/jacket_womens</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/jacket_womens</string>
</map>
<key>MarketplaceURL_jacketMale</key>
<map>
@@ -5136,7 +5194,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/jacket_mens</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/jacket_mens</string>
</map>
<key>MarketplaceURL_shirtFemale</key>
<map>
@@ -5147,7 +5205,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/shirt_womens</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/shirt_womens</string>
</map>
<key>MarketplaceURL_shirtMale</key>
<map>
@@ -5158,7 +5216,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/shirt_mens</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/shirt_mens</string>
</map>
<key>MarketplaceURL_undershirtFemale</key>
<map>
@@ -5169,7 +5227,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/undershirt_womens</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/undershirt_womens</string>
</map>
<key>MarketplaceURL_undershirtMale</key>
<map>
@@ -5180,7 +5238,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/undershirt_mens</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/undershirt_mens</string>
</map>
<key>MarketplaceURL_skirtFemale</key>
<map>
@@ -5191,7 +5249,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string>
</map>
<key>MarketplaceURL_skirtMale</key>
<map>
@@ -5202,7 +5260,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/skirts_women</string>
</map>
<key>MarketplaceURL_pantsFemale</key>
<map>
@@ -5213,7 +5271,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/pants_women</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/pants_women</string>
</map>
<key>MarketplaceURL_pantsMale</key>
<map>
@@ -5224,7 +5282,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/pants_men</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/pants_men</string>
</map>
<key>MarketplaceURL_underpantsFemale</key>
<map>
@@ -5235,7 +5293,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/underwear_women</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/underwear_women</string>
</map>
<key>MarketplaceURL_underpantsMale</key>
<map>
@@ -5246,7 +5304,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/underwear_men</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/underwear_men</string>
</map>
<key>MarketplaceURL_shoesFemale</key>
<map>
@@ -5257,7 +5315,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/shoes_women</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/shoes_women</string>
</map>
<key>MarketplaceURL_shoesMale</key>
<map>
@@ -5268,7 +5326,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/shoes_men</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/shoes_men</string>
</map>
<key>MarketplaceURL_socksFemale</key>
<map>
@@ -5279,7 +5337,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/socks_women</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/socks_women</string>
</map>
<key>MarketplaceURL_socksMale</key>
<map>
@@ -5290,7 +5348,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/socks_women</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/socks_women</string>
</map>
<key>MarketplaceURL_tattooMale</key>
<map>
@@ -5301,7 +5359,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string>
</map>
<key>MarketplaceURL_tattooFemale</key>
<map>
@@ -5312,7 +5370,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men</string>
</map>
<key>MarketplaceURL_hairFemale</key>
<map>
@@ -5323,7 +5381,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_hair</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/womens_hair</string>
</map>
<key>MarketplaceURL_hairMale</key>
<map>
@@ -5334,7 +5392,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_hair</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/mens_hair</string>
</map>
<key>MarketplaceURL_eyesFemale</key>
<map>
@@ -5345,7 +5403,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_eyes</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/womens_eyes</string>
</map>
<key>MarketplaceURL_eyesMale</key>
<map>
@@ -5356,7 +5414,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_eyes</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/mens_eyes</string>
</map>
<key>MarketplaceURL_shapeFemale</key>
<map>
@@ -5367,7 +5425,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_shape</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/womens_shape</string>
</map>
<key>MarketplaceURL_shapeMale</key>
<map>
@@ -5378,7 +5436,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_shape</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/mens_shape</string>
</map>
<key>MarketplaceURL_skinFemale</key>
<map>
@@ -5389,7 +5447,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/womens_skin</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/womens_skin</string>
</map>
<key>MarketplaceURL_skinMale</key>
<map>
@@ -5400,7 +5458,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://marketplace.secondlife.com/trampoline/viewer21/mens_skin</string>
+ <string>https://marketplace.secondlife.com/trampoline/viewer21/mens_skin</string>
</map>
<key>MaxDragDistance</key>
<map>
@@ -5413,6 +5471,17 @@
<key>Value</key>
<real>48.0</real>
</map>
+ <key>MaxHeapSize</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum heap size (GB)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>1.6</real>
+ </map>
<key>MaxSelectDistance</key>
<map>
<key>Comment</key>
@@ -5422,7 +5491,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>64.0</real>
+ <real>128.0</real>
</map>
<key>MaxWearableWaitTime</key>
<map>
@@ -5435,6 +5504,17 @@
<key>Value</key>
<real>60.0</real>
</map>
+ <key>MediaPluginDebugging</key>
+ <map>
+ <key>Comment</key>
+ <string>Turn on debugging messages that may help diagnosing media issues (WARNING: May reduce performance).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>MediaControlFadeTime</key>
<map>
<key>Comment</key>
@@ -5534,6 +5614,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>MemoryFailurePreventionEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>If set, the viewer will quit to avoid crash when memory failure happens</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>MemoryLogFrequency</key>
<map>
<key>Comment</key>
@@ -5545,6 +5636,28 @@
<key>Value</key>
<real>600.0</real>
</map>
+ <key>MemoryPrivatePoolEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable the private memory pool management</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>MemoryPrivatePoolSize</key>
+ <map>
+ <key>Comment</key>
+ <string>Size of the private memory pool in MB (min. value is 256)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>512</integer>
+ </map>
<key>MemProfiling</key>
<map>
<key>Comment</key>
@@ -5609,7 +5722,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <real>0</real>
+ <real>1</real>
</map>
<key>MeshImportUseSLM</key>
<map>
@@ -5620,7 +5733,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <real>0</real>
+ <real>1</real>
</map>
<key>MeshUploadLogXML</key>
<map>
@@ -5644,6 +5757,17 @@
<key>Value</key>
<real>0</real>
</map>
+ <key>MeshUploadTimeOut</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum time in seconds for llcurl to execute a mesh uoloading request</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <real>600</real>
+ </map>
<key>MigrateCacheDirectory</key>
<map>
<key>Comment</key>
@@ -6054,10 +6178,12 @@
<key>ToastButtonWidth</key>
<map>
<key>Comment</key>
- <string>Default width of buttons in the toast.
+ <string>
+ Default width of buttons in the toast.
Notes:
If required width will be less then this one, a button will be reshaped to default size , otherwise to required
- Change of this parameter will affect the layout of buttons in notification toast.</string>
+ Change of this parameter will affect the layout of buttons in notification toast.
+</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -6599,7 +6725,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <string>0</string>
+ <integer>0</integer>
</map>
<key>PrecachingDelay</key>
<map>
@@ -6991,17 +7117,6 @@
<key>Value</key>
<real>0.0</real>
</map>
- <key>QuitAfterSecondsOfAFK</key>
- <map>
- <key>Comment</key>
- <string>The duration allowed after being AFK before quitting.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.0</real>
- </map>
<key>QuitOnLoginActivated</key>
<map>
<key>Comment</key>
@@ -7302,6 +7417,88 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>RenderAvatarComplexityLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>Max visual complexity of avatars in a scene</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>-1</integer>
+ </map>
+ <key>RenderComplexityColorMin</key>
+ <map>
+ <key>Comment</key>
+ <string>Max visual complexity of avatars in a scene</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>0.5</real>
+ </array>
+ </map>
+ <key>RenderComplexityColorMid</key>
+ <map>
+ <key>Comment</key>
+ <string>Max visual complexity of avatars in a scene</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.5</real>
+ </array>
+ </map>
+ <key>RenderComplexityColorMax</key>
+ <map>
+ <key>Comment</key>
+ <string>Max visual complexity of avatars in a scene</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>0.5</real>
+ </array>
+ </map>
+ <key>RenderComplexityThreshold</key>
+ <map>
+ <key>Comment</key>
+ <string>Only color objects higher than render threshold</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>-1</integer>
+ </map>
+ <key>RenderComplexityStaticMax</key>
+ <map>
+ <key>Comment</key>
+ <string>Sets a static max value for scaling of RenderComplexity
+ display (-1 for dynamic scaling)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>-1</integer>
+ </map>
<key>RenderAvatarLODFactor</key>
<map>
<key>Comment</key>
@@ -7349,8 +7546,10 @@
<key>RenderPerformanceTest</key>
<map>
<key>Comment</key>
- <string>Disable rendering of everything but in-world content for
- performance testing</string>
+ <string>
+ Disable rendering of everything but in-world content for
+ performance testing
+</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -7598,7 +7797,7 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>6</integer>
+ <integer>16</integer>
</map>
<key>RenderDebugTextureBind</key>
<map>
@@ -7670,151 +7869,7 @@
<key>Value</key>
<integer>0</integer>
</map>
-
- <key>RenderGIRange</key>
- <map>
- <key>Comment</key>
- <string>Distance to cut off GI effect.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>96</real>
- </map>
-
- <key>RenderGILuminance</key>
- <map>
- <key>Comment</key>
- <string>Luminance factor of global illumination contribution.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.075</real>
- </map>
- <key>RenderGIBrightness</key>
- <map>
- <key>Comment</key>
- <string>Brightness factor of global illumination contribution.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.3</real>
- </map>
-
- <key>RenderGINoise</key>
- <map>
- <key>Comment</key>
- <string>Noise of position sampling for GI photon mapping.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.7</real>
- </map>
-
- <key>RenderGIAttenuation</key>
- <map>
- <key>Comment</key>
- <string>Distance attenuation factor for indirect lighting.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.1</real>
- </map>
-
- <key>RenderGIBlurBrightness</key>
- <map>
- <key>Comment</key>
- <string>Brightness factor of global illumination blur effect.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.025</real>
- </map>
-
- <key>RenderGIBlurEdgeWeight</key>
- <map>
- <key>Comment</key>
- <string>Edge weight for GI soften filter (sharpness).</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.8</real>
- </map>
-
- <key>RenderGIBlurIncrement</key>
- <map>
- <key>Comment</key>
- <string>Increment of scale for each pass of global illumination blur effect.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.8</real>
- </map>
-
- <key>RenderLuminanceScale</key>
- <map>
- <key>Comment</key>
- <string>Luminance value scalar for darkening effect.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.0</real>
- </map>
-
- <key>RenderSunLuminanceScale</key>
- <map>
- <key>Comment</key>
- <string>Sun Luminance value scalar for darkening effect.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.0</real>
- </map>
-
- <key>RenderSunLuminanceOffset</key>
- <map>
- <key>Comment</key>
- <string>Sun Luminance value offset for darkening effect.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0</real>
- </map>
-
- <key>RenderLuminanceDetail</key>
- <map>
- <key>Comment</key>
- <string>Mipmap level to use for luminance</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>16.0</real>
- </map>
-
<key>RenderMinimumLODTriangleCount</key>
<map>
<key>Comment</key>
@@ -7951,7 +8006,19 @@
<key>Value</key>
<integer>0</integer>
</map>
-
+
+ <key>CameraDoFResScale</key>
+ <map>
+ <key>Comment</key>
+ <string>Amount to scale down depth of field resolution. Valid range is 0.25 (quarter res) to 1.0 (full res)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.7</real>
+ </map>
+
<key>RenderSpotLightsInNondeferred</key>
<map>
<key>Comment</key>
@@ -8135,18 +8202,6 @@
<integer>0</integer>
</map>
- <key>RenderDeferredGI</key>
- <map>
- <key>Comment</key>
- <string>Enable GI in deferred renderer.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
-
<key>RenderDeferredSun</key>
<map>
<key>Comment</key>
@@ -8290,92 +8345,6 @@
<real>0</real>
</map>
- <key>RenderGIAmbiance</key>
- <map>
- <key>Comment</key>
- <string>Ambiance factor of global illumination contribution.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.5</real>
- </map>
-
- <key>RenderGIMinRenderSize</key>
- <map>
- <key>Comment</key>
- <string>Minimum size of objects to put into GI source map.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.5</real>
- </map>
-
- <key>RenderGIBlurColorCurve</key>
- <map>
- <key>Comment</key>
- <string>Color curve for GI softening kernel</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.6</real>
- <real>0.02</real>
- </array>
- </map>
-
- <key>RenderGIBlurPasses</key>
- <map>
- <key>Comment</key>
- <string>Scale of GI softening kernel.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <real>4</real>
- </map>
-
- <key>RenderGIBlurSize</key>
- <map>
- <key>Comment</key>
- <string>Scale of GI softening kernel.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>4.0</real>
- </map>
- <key>RenderGIBlurSamples</key>
- <map>
- <key>Comment</key>
- <string>Number of samples to take for each pass of GI blur (value range 1-16). Actual number of samples is value * 2 - 1.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <real>16</real>
- </map>
- <key>RenderGIBlurDistFactor</key>
- <map>
- <key>Comment</key>
- <string>Distance scaler for GI blur.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.0</real>
- </map>
-
<key>RenderDynamicLOD</key>
<map>
<key>Comment</key>
@@ -8418,7 +8387,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>RenderAutoMaskAlphaDeferred</key>
<map>
@@ -8475,6 +8444,17 @@
<key>Value</key>
<real>1.0</real>
</map>
+ <key>RenderGLCoreProfile</key>
+ <map>
+ <key>Comment</key>
+ <string>Don't use a compatibility profile OpenGL context. Requires restart. Basic shaders MUST be enabled.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderGlow</key>
<map>
<key>Comment</key>
@@ -9078,6 +9058,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>RenderUseVAO</key>
+ <map>
+ <key>Comment</key>
+ <string>Use GL Vertex Array Objects</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderVBOMappingDisable</key>
<map>
<key>Comment</key>
@@ -9087,7 +9078,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>RenderUseStreamVBO</key>
<map>
@@ -9188,28 +9179,51 @@
<key>Value</key>
<real>1.0</real>
</map>
- <key>MeshStreamingCostScaler</key>
+ <key>MeshTriangleBudget</key>
<map>
<key>Comment</key>
- <string>DEBUG</string>
+ <string>Target visible triangle budget to use when estimating streaming cost.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>F32</string>
+ <string>U32</string>
<key>Value</key>
- <real>2.0</real>
+ <real>250000</real>
</map>
- <key>MeshThreadCount</key>
+ <key>MeshMetaDataDiscount</key>
<map>
<key>Comment</key>
- <string>Number of threads to use for loading meshes.</string>
+ <string>Number of bytes to deduct for metadata when determining streaming cost.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>8</integer>
+ <real>384</real>
</map>
+ <key>MeshMinimumByteSize</key>
+ <map>
+ <key>Comment</key>
+ <string>Minimum number of bytes per LoD block when determining streaming cost.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <real>16</real>
+ </map>
+ <key>MeshBytesPerTriangle</key>
+ <map>
+ <key>Comment</key>
+ <string>Approximation of bytes per triangle to use for determining mesh streaming cost.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <real>16</real>
+ </map>
+
<key>MeshMaxConcurrentRequests</key>
<map>
<key>Comment</key>
@@ -9499,7 +9513,7 @@
<key>ShowBuildButton</key>
<map>
<key>Comment</key>
- <string>Shows/Hides Build button in the bottom tray.</string>
+ <string>Shows/hides build button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9510,7 +9524,7 @@
<key>ShowCameraButton</key>
<map>
<key>Comment</key>
- <string>Show/Hide View button in the bottom tray.</string>
+ <string>Show/hide view button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9598,7 +9612,7 @@
<key>ShowGestureButton</key>
<map>
<key>Comment</key>
- <string>Shows/Hides Gesture button in the bottom tray.</string>
+ <string>Shows/hides gesture button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9631,7 +9645,7 @@
<key>ShowMiniMapButton</key>
<map>
<key>Comment</key>
- <string>Shows/Hides Mini-Map button in the bottom tray.</string>
+ <string>Shows/hides mini-map button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9642,7 +9656,7 @@
<key>ShowMoveButton</key>
<map>
<key>Comment</key>
- <string>Shows/Hides Move button in the bottom tray.</string>
+ <string>Shows/hides move button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9675,7 +9689,7 @@
<key>ShowSearchButton</key>
<map>
<key>Comment</key>
- <string>Shows/Hides Search button in the bottom tray.</string>
+ <string>Shows/hides search button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9686,7 +9700,7 @@
<key>ShowSnapshotButton</key>
<map>
<key>Comment</key>
- <string>Shows/Hides Snapshot button button in the bottom tray.</string>
+ <string>Shows/hides snapshot button button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9708,7 +9722,7 @@
<key>ShowNavbarFavoritesPanel</key>
<map>
<key>Comment</key>
- <string>Show/Hide Navigation Bar Favorites Panel</string>
+ <string>Show/hide navigation bar favorites panel</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9719,7 +9733,7 @@
<key>ShowNavbarNavigationPanel</key>
<map>
<key>Comment</key>
- <string>Show/Hide Navigation Bar Navigation Panel</string>
+ <string>Show/hide navigation bar navigation panel</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9730,7 +9744,7 @@
<key>ShowWorldMapButton</key>
<map>
<key>Comment</key>
- <string>Shows/Hides Map button in the bottom tray.</string>
+ <string>Shows/hides map button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9741,18 +9755,7 @@
<key>ShowMiniLocationPanel</key>
<map>
<key>Comment</key>
- <string>Show/Hide Mini-Location Panel</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>SidebarCameraMovement</key>
- <map>
- <key>Comment</key>
- <string>Reflects world rect changing while changing sidebar visibility.</string>
+ <string>Show/hide mini-location panel</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -10387,6 +10390,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>SnapshotProfileLastResolution</key>
+ <map>
+ <key>Comment</key>
+ <string>Take next profile snapshot at this resolution</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>SnapshotPostcardLastResolution</key>
<map>
<key>Comment</key>
@@ -10695,7 +10709,17 @@
<key>Value</key>
<real>0.699999988079</real>
</map>
- <key>ToolTipFadeTime</key>
+ <key>ToolTipFastDelay</key>
+ <map>
+ <key>Comment</key>
+ <string>Seconds before displaying tooltip when mouse stops over UI element (when a tooltip is already visible)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.1</real>
+ </map> <key>ToolTipFadeTime</key>
<map>
<key>Comment</key>
<string>Seconds over which tooltip fades away</string>
@@ -10783,6 +10807,39 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>TranslationService</key>
+ <map>
+ <key>Comment</key>
+ <string>Translation API to use. (google|bing)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>bing</string>
+ </map>
+ <key>GoogleTranslateAPIKey</key>
+ <map>
+ <key>Comment</key>
+ <string>Google Translate API key</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
+ <key>BingTranslateAPIKey</key>
+ <map>
+ <key>Comment</key>
+ <string>Bing AppID to use with the Microsoft Translator API</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
<key>TutorialURL</key>
<map>
<key>Comment</key>
@@ -12013,7 +12070,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <boolean>1</boolean>
</map>
<key>UseFreezeFrame</key>
<map>
@@ -12157,50 +12214,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>VectorizeEnable</key>
- <map>
- <key>Comment</key>
- <string>Enable general vector operations and data alignment.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>VectorizePerfTest</key>
- <map>
- <key>Comment</key>
- <string>Test SSE/vectorization performance and choose fastest version.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>VectorizeProcessor</key>
- <map>
- <key>Comment</key>
- <string>0=Compiler Default, 1=SSE, 2=SSE2, autodetected</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>VectorizeSkin</key>
- <map>
- <key>Comment</key>
- <string>Enable vector operations for avatar skinning.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>VelocityInterpolate</key>
<map>
<key>Comment</key>
@@ -12578,13 +12591,13 @@
<key>WatchdogEnabled</key>
<map>
<key>Comment</key>
- <string>Controls whether the thread watchdog timer is activated.</string>
+ <string>Controls whether the thread watchdog timer is activated. Value is boolean. Set to -1 to defer to built-in default.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>20</integer>
+ <integer>0</integer>
</map>
<key>WaterGLFogDensityScale</key>
<map>
@@ -12652,10 +12665,10 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>WindowFullScreen</key>
+ <key>FullScreen</key>
<map>
<key>Comment</key>
- <string>SL viewer window full screen</string>
+ <string>run a fullscreen session</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -12663,6 +12676,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MinWindowHeight</key>
+ <map>
+ <key>Comment</key>
+ <string>SL viewer minimum window height in pixels</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>WindowHeight</key>
<map>
<key>Comment</key>
@@ -12670,7 +12694,7 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>S32</string>
+ <string>U32</string>
<key>Value</key>
<integer>738</integer>
</map>
@@ -12685,6 +12709,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MinWindowWidth</key>
+ <map>
+ <key>Comment</key>
+ <string>SL viewer minimum window width in pixels</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>WindowWidth</key>
<map>
<key>Comment</key>
@@ -12692,7 +12727,7 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>S32</string>
+ <string>U32</string>
<key>Value</key>
<integer>1024</integer>
</map>
@@ -13119,7 +13154,7 @@
<key>Comment</key>
<string>Settings that are a applied per session (not saved).</string>
<key>Persist</key>
- <integer>1</integer>
+ <integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
@@ -13130,7 +13165,7 @@
<key>Comment</key>
<string>User settings that are a applied per session (not saved).</string>
<key>Persist</key>
- <integer>1</integer>
+ <integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
@@ -13343,7 +13378,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>ShowOfferedInventory</key>
<map>
@@ -13367,17 +13402,6 @@
<key>Value</key>
<string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/404.html</string>
</map>
- <key>DestinationsAndAvatarsVisibility</key>
- <map>
- <key>Comment</key>
- <string>Whether destination panel or avatar picker are open (0=destination guide, 1=avatar picker, default=nothing)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>OpenIMOnVoice</key>
<map>
<key>Comment</key>
@@ -13400,10 +13424,10 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>WebProfileRect</key>
+ <key>WebProfileFloaterRect</key>
<map>
<key>Comment</key>
- <string>Web profile dimensions</string>
+ <string>Web profile floater dimensions</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -13411,12 +13435,12 @@
<key>Value</key>
<array>
<integer>0</integer>
- <integer>650</integer>
- <integer>490</integer>
+ <integer>680</integer>
+ <integer>485</integer>
<integer>0</integer>
- </array>
- </map>
- <key>HelpFloaterOpen</key>
+ </array>
+ </map>
+ <key>HelpFloaterOpen</key>
<map>
<key>Comment</key>
<string>Show Help Floater on login?</string>
diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml
index 079a54f957..bfc09286e3 100644
--- a/indra/newview/app_settings/settings_files.xml
+++ b/indra/newview/app_settings/settings_files.xml
@@ -20,7 +20,8 @@
file_name="settings.xml"
file_name_setting="ClientSettingsFile"/>
<file name="CrashSettings"
- file_name="settings_crash_behavior"/>
+ file_name="settings_crash_behavior.xml"
+ file_name_setting="CrashSettingsFile"/>
<file name="Warnings"
file_name="ignorable_dialogs.xml"
file_name_setting="WarningSettingsFile"/>
@@ -61,4 +62,4 @@
file_name="colors.xml"
file_name_setting="SkinningSettingsFile"/>
</group>
-</settings_files> \ No newline at end of file
+</settings_files>
diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml
index 29e52ab054..01a70f2671 100644
--- a/indra/newview/app_settings/settings_minimal.xml
+++ b/indra/newview/app_settings/settings_minimal.xml
@@ -1,474 +1 @@
-<llsd>
- <map>
- <key>ChannelBottomPanelMargin</key>
- <map>
- <key>Comment</key>
- <string>Space from a lower toast to the Bottom Tray</string>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>2</integer>
- </map>
- <key>ClickActionBuyEnabled</key>
- <map>
- <key>Comment</key>
- <string>Enable click to buy actions in tool pie menu</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ClickActionPayEnabled</key>
- <map>
- <key>Comment</key>
- <string>Enable click to pay actions in tool pie menu</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableGrab</key>
- <map>
- <key>Comment</key>
- <string>Use Ctrl+mouse to grab and manipulate objects</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableMouselook</key>
- <map>
- <key>Comment</key>
- <string>Allow first person perspective and mouse control of camera</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>HelpURLFormat</key>
- <map>
- <key>Comment</key>
- <string>URL pattern for help page; arguments will be encoded; see llviewerhelp.cpp:buildHelpURL for arguments</string>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/howto/index.html?topic=[TOPIC]</string>
- </map>
- <key>PreferredMaturity</key>
- <map>
- <key>Comment</key>
- <string>Setting for the user&apos;s preferred maturity level (consts in indra_constants.h)</string>
- <key>Type</key>
- <string>U32</string>
- <key>Value</key>
- <integer>21</integer>
- </map>
- <key>RenderTrackerBeacon</key>
- <map>
- <key>Comment</key>
- <string>Display tracking arrow and beacon to target avatar, teleport destination</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowScriptErrors</key>
- <map>
- <key>Comment</key>
- <string>Show script errors</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowScriptErrorsLocation</key>
- <map>
- <key>Comment</key>
- <string>Show script error in chat or window</string>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>SkinCurrent</key>
- <map>
- <key>Comment</key>
- <string>The currently selected skin.</string>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>minimal</string>
- </map>
- <key>UseExternalBrowser</key>
- <map>
- <key>Comment</key>
- <string>Use default browser when opening web pages instead of in-world browser.</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>VoiceCallsRejectGroup</key>
- <map>
- <key>Comment</key>
- <string>Silently reject all incoming group voice calls.</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>VoiceDisableMic</key>
- <map>
- <key>Comment</key>
- <string>Completely disable the ability to open the mic.</string>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ScriptsCanShowUI</key>
- <map>
- <key>Comment</key>
- <string>Allow LSL calls (such as LLMapDestination) to spawn viewer UI</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ChatFontSize</key>
- <map>
- <key>Comment</key>
- <string>Size of chat text in chat console (0 = small, 1 = big, 2 = extra large)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>AvatarPickerHintTimeout</key>
- <map>
- <key>Comment</key>
- <string>Number of seconds to wait before telling resident about avatar picker.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.0</real>
- </map>
- <key>RenderShowGroupTitleAll</key>
- <map>
- <key>Comment</key>
- <string>Show group titles in name labels</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>OpenSidePanelsInFloaters</key>
- <map>
- <key>Comment</key>
- <string>If true, will always open side panel contents in a floater.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>AvatarInspectorTooltipDelay</key>
- <map>
- <key>Comment</key>
- <string>Seconds before displaying avatar inspector tooltip</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.1</real>
- </map>
- <key>AFKTimeout</key>
- <map>
- <key>Comment</key>
- <string>
- Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never).
- Valid values are: 0, 120, 300, 600, 1800
- </string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <real>0</real>
- </map>
- <key>SLURLTeleportDirectly</key>
- <map>
- <key>Comment</key>
- <string>Clicking on a slurl will teleport you directly instead of opening places panel</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>EnableClassifieds</key>
- <map>
- <key>Comment</key>
- <string>Enable creation of new classified ads</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableGroupInfo</key>
- <map>
- <key>Comment</key>
- <string>Enable viewing and editing of group info.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnablePlaceProfile</key>
- <map>
- <key>Comment</key>
- <string>Enable viewing of place profile from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnablePicks</key>
- <map>
- <key>Comment</key>
- <string>Enable editing of picks</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableWorldMap</key>
- <map>
- <key>Comment</key>
- <string>Enable opening world map from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableAvatarPay</key>
- <map>
- <key>Comment</key>
- <string>Enable paying other avatars from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableVoiceCall</key>
- <map>
- <key>Comment</key>
- <string>Enable voice calls from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>EnableAvatarShare</key>
- <map>
- <key>Comment</key>
- <string>Enable sharing from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableInventory</key>
- <map>
- <key>Comment</key>
- <string>Enable opening inventory from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableSearch</key>
- <map>
- <key>Comment</key>
- <string>Enable opening search from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableAppearance</key>
- <map>
- <key>Comment</key>
- <string>Enable opening appearance from web link</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>DoubleClickShowWorldMap</key>
- <map>
- <key>Comment</key>
- <string>Enable double-click to show world map from mini map</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>EnableGroupChatPopups</key>
- <map>
- <key>Comment</key>
- <string>Enable Incoming Group Chat Popups</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>SearchFromAddressBar</key>
- <map>
- <key>Comment</key>
- <string>Can enter search queries into navigation address bar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>DestinationGuideURL</key>
- <map>
- <key>Comment</key>
- <string>Destination guide contents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/guide.html</string>
- </map>
- <key>AvatarPickerURL</key>
- <map>
- <key>Comment</key>
- <string>Avatar picker contents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/avatars.html</string>
- </map>
- <key>LogInventoryDecline</key>
- <map>
- <key>Comment</key>
- <string>Log in system chat whenever an inventory offer is declined</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>UseHTTPInventory</key>
- <map>
- <key>Comment</key>
- <string>Allow use of http inventory transfers instead of UDP</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ClickToWalk</key>
- <map>
- <key>Comment</key>
- <string>Click in world to walk to location</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>ShowOfferedInventory</key>
- <map>
- <key>Comment</key>
- <string>Show inventory window with last inventory offer selected when receiving inventory from other users.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>OpenIMOnVoice</key>
- <map>
- <key>Comment</key>
- <string>Open the corresponding IM window when connecting to a voice call.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- <key>AllowBottomTrayButtonReordering</key>
- <map>
- <key>Comment</key>
- <string>Allow user to move and hide bottom tray buttons</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>ShowHelpOnFirstLogin</key>
- <map>
- <key>Comment</key>
- <string>Show Help Floater on first login</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
- </map>
-</llsd>
+<llsd/> \ No newline at end of file
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index ff24efaf2c..8cdd8ed838 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -33,6 +33,28 @@
<key>Value</key>
<string />
</map>
+ <key>DisplayDestinationsOnInitialRun</key>
+ <map>
+ <key>Comment</key>
+ <string>Display the destinations guide when a user first launches Second Life.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>LastInventoryInboxActivity</key>
+ <map>
+ <key>Comment</key>
+ <string>The last time the received items inbox was poked by the user.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>LastLogoff</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
index b0fa0ddd3e..b631ecb7d2 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
@@ -2,6 +2,24 @@
* @file avatarF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
index d9f29ced4f..bc63d07d72 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
@@ -2,12 +2,29 @@
* @file avatarSkinV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-attribute vec4 weight; //1
+ATTRIBUTE vec4 weight;
uniform vec4 matrixPalette[45];
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
index 2796222c68..19203ab670 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
@@ -2,10 +2,37 @@
* @file avatarV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+uniform vec4 color;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
@@ -13,32 +40,30 @@ void calcAtmospherics(vec3 inPositionEye);
void main()
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
vec4 pos;
vec3 norm;
+ vec4 pos_in = vec4(position.xyz, 1.0);
+
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], gl_Vertex);
- pos.y = dot(trans[1], gl_Vertex);
- pos.z = dot(trans[2], gl_Vertex);
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
pos.w = 1.0;
- norm.x = dot(trans[0].xyz, gl_Normal);
- norm.y = dot(trans[1].xyz, gl_Normal);
- norm.z = dot(trans[2].xyz, gl_Normal);
+ norm.x = dot(trans[0].xyz, normal);
+ norm.y = dot(trans[1].xyz, normal);
+ norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
- gl_Position = gl_ProjectionMatrix * pos;
-
- //gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = projection_matrix * pos;
- gl_FogFragCoord = length(pos.xyz);
-
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0,0,0,0));
- gl_FrontColor = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0,0,0,0));
+ vertex_color = col;
}
diff --git a/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl b/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
index d86ef19a04..4296e551db 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
@@ -2,6 +2,24 @@
* @file eyeballF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
index 2eb814bd91..82db15c3ae 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
@@ -2,10 +2,39 @@
* @file eyeballV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -13,17 +42,18 @@ void calcAtmospherics(vec3 inPositionEye);
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vec3 pos = (modelview_matrix * vec4(position.xyz, 1.0)).xyz;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
- vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 norm = normalize(normal_matrix * normal);
calcAtmospherics(pos.xyz);
vec4 specular = vec4(1.0);
- vec4 color = calcLightingSpecular(pos, norm, gl_Color, specular, vec4(0.0));
- gl_FrontColor = color;
+ vec4 color = calcLightingSpecular(pos, norm, diffuse_color, specular, vec4(0.0));
+ vertex_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 7613e50dca..43ed41a205 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -1,13 +1,30 @@
/**
* @file objectSkinV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
-attribute vec4 object_weight;
+ATTRIBUTE vec4 weight4;
uniform mat4 matrixPalette[32];
@@ -15,8 +32,8 @@ mat4 getObjectSkinnedTransform()
{
int i;
- vec4 w = fract(object_weight);
- vec4 index = floor(object_weight);
+ vec4 w = fract(weight4);
+ vec4 index = floor(weight4);
float scale = 1.0/(w.x+w.y+w.z+w.w);
w *= scale;
diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
index 2638351e96..3e4d438ed3 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
@@ -2,14 +2,37 @@
* @file pickAvatarF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
uniform sampler2D diffuseMap;
void main()
{
- gl_FragColor = vec4(gl_Color.rgb, texture2D(diffuseMap, gl_TexCoord[0].xy).a);
+ gl_FragColor = vec4(vertex_color.rgb, texture2D(diffuseMap, vary_texcoord0.xy).a);
}
diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
index 86b189b282..78b5328c9a 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
@@ -2,24 +2,49 @@
* @file pickAvatarV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
mat4 getSkinnedTransform();
void main()
{
vec4 pos;
-
+ vec4 pos_in = vec4(position, 1.0);
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], gl_Vertex);
- pos.y = dot(trans[1], gl_Vertex);
- pos.z = dot(trans[2], gl_Vertex);
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
pos.w = 1.0;
- gl_FrontColor = gl_Color;
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_Position = gl_ProjectionMatrix * pos;
+ vertex_color = diffuse_color;
+ vary_texcoord0 = texcoord0;
+ gl_Position = projection_matrix * pos;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 4a0815a163..4cca287356 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -2,13 +2,33 @@
* @file alphaF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect depthMap;
vec4 diffuseLookup(vec2 texcoord);
@@ -20,11 +40,14 @@ uniform vec2 screen_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
uniform mat4 inv_proj;
@@ -48,9 +71,9 @@ void main()
vec4 pos = vec4(vary_position, 1.0);
- vec4 diff= diffuseLookup(gl_TexCoord[0].xy);
+ vec4 diff= diffuseLookup(vary_texcoord0.xy);
- vec4 col = vec4(vary_ambient + vary_directional.rgb, gl_Color.a);
+ vec4 col = vec4(vary_ambient + vary_directional.rgb, vertex_color.a);
vec4 color = diff * col;
color.rgb = atmosLighting(color.rgb);
@@ -60,8 +83,5 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
gl_FragColor = color;
- //gl_FragColor = vec4(1,0,1,1);
- //gl_FragColor = vec4(1,0,1,1)*shadow;
-
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
index b0d029dbf4..8641827777 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
@@ -2,13 +2,33 @@
* @file alphaF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect depthMap;
uniform sampler2D diffuseMap;
@@ -20,11 +40,13 @@ uniform vec2 screen_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
+VARYING vec2 vary_texcoord0;
+VARYING vec4 vertex_color;
uniform mat4 inv_proj;
@@ -48,9 +70,9 @@ void main()
vec4 pos = vec4(vary_position, 1.0);
- vec4 diff= texture2D(diffuseMap,gl_TexCoord[0].xy);
+ vec4 diff= texture2D(diffuseMap,vary_texcoord0.xy);
- vec4 col = vec4(vary_ambient + vary_directional.rgb, gl_Color.a);
+ vec4 col = vec4(vary_ambient + vary_directional.rgb, vertex_color.a);
vec4 color = diff * col;
color.rgb = atmosLighting(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl
new file mode 100644
index 0000000000..c13ea702db
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl
@@ -0,0 +1,84 @@
+/**
+ * @file alphaNonIndexedNoColorF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRect depthMap;
+uniform sampler2D diffuseMap;
+
+uniform mat4 shadow_matrix[6];
+uniform vec4 shadow_clip;
+uniform vec2 screen_res;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
+VARYING vec2 vary_texcoord0;
+
+uniform mat4 inv_proj;
+
+vec4 getPosition(vec2 pos_screen)
+{
+ float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+void main()
+{
+ vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
+ frag *= screen_res;
+
+ vec4 pos = vec4(vary_position, 1.0);
+
+ vec4 diff= texture2D(diffuseMap,vary_texcoord0.xy);
+
+ vec4 col = vec4(vary_ambient + vary_directional.rgb, 1.0);
+ vec4 color = diff * col;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ color.rgb += diff.rgb * vary_pointlight_col.rgb;
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
index ac3f7189c2..b09441f7eb 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl
@@ -1,11 +1,34 @@
/**
* @file alphaSkinnedV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
+uniform mat4 modelview_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getObjectSkinnedTransform();
@@ -18,15 +41,23 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_position;
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_normal;
-varying vec3 vary_fragcoord;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_position;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_normal;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_pointlight_col;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
uniform float near_clip;
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
@@ -59,20 +90,20 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
vec4 pos;
vec3 norm;
mat4 trans = getObjectSkinnedTransform();
- trans = gl_ModelViewMatrix * trans;
+ trans = modelview_matrix * trans;
- pos = trans * gl_Vertex;
+ pos = trans * vec4(position.xyz, 1.0);
- norm = gl_Vertex.xyz + gl_Normal.xyz;
+ norm = position.xyz + normal.xyz;
norm = normalize(( trans*vec4(norm, 1.0) ).xyz-pos.xyz);
- vec4 frag_pos = gl_ProjectionMatrix * pos;
+ vec4 frag_pos = projection_matrix * pos;
gl_Position = frag_pos;
vary_position = pos.xyz;
@@ -80,31 +111,31 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a);
+ vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a);
// Collect normal lights
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a);
-
- vary_pointlight_col = col.rgb*gl_Color.rgb;
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].y, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].y, light_attenuation[3].z);
+ col.rgb += light_diffuse[4].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[4], light_direction[4], light_attenuation[4].x, light_attenuation[4].y, light_attenuation[4].z);
+ col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].y, light_attenuation[5].z);
+ col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
+ col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
+
+ vary_pointlight_col = col.rgb*diffuse_color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb*gl_Color.rgb;
- vary_directional = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a)));
+ vary_ambient = col.rgb*diffuse_color.rgb;
+ vary_directional = diffuse_color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), (1.0-diffuse_color.a)*(1.0-diffuse_color.a)));
- col.rgb = min(col.rgb*gl_Color.rgb, 1.0);
+ col.rgb = min(col.rgb*diffuse_color.rgb, 1.0);
- gl_FrontColor = col;
+ vertex_color = col;
- gl_FogFragCoord = pos.z;
+
vary_fragcoord.xyz = frag_pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 44cb78e914..93b1a114db 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -2,10 +2,37 @@
* @file alphaV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -17,18 +44,26 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_light;
-varying vec3 vary_pointlight_col;
-varying float vary_texture_index;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_light;
+VARYING vec3 vary_pointlight_col;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
uniform float near_clip;
uniform float shadow_offset;
uniform float shadow_bias;
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
@@ -62,50 +97,50 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
//transform vertex
- vec4 vert = vec4(gl_Vertex.xyz, 1.0);
- vary_texture_index = gl_Vertex.w;
- gl_Position = gl_ModelViewProjectionMatrix * vert;
+ vec4 vert = vec4(position.xyz, 1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vec4 pos = (gl_ModelViewMatrix * vert);
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 norm = normalize(normal_matrix * normal);
- float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));
- vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset;
+ float dp_directional_light = max(0.0, dot(norm, light_position[0].xyz));
+ vary_position = pos.xyz + light_position[0].xyz * (1.0-dp_directional_light)*shadow_offset;
calcAtmospherics(pos.xyz);
- //vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
- vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a);
+ //vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
+ vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a);
// Collect normal lights
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a);
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].y, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].y, light_attenuation[3].z);
+ col.rgb += light_diffuse[4].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[4], light_direction[4], light_attenuation[4].x, light_attenuation[4].y, light_attenuation[4].z);
+ col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].y, light_attenuation[5].z);
+ col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
+ col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb*gl_Color.rgb;
+ vary_pointlight_col = col.rgb*diffuse_color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_light = gl_LightSource[0].position.xyz;
+ vary_light = light_position[0].xyz;
- vary_ambient = col.rgb*gl_Color.rgb;
- vary_directional.rgb = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a)));
+ vary_ambient = col.rgb*diffuse_color.rgb;
+ vary_directional.rgb = diffuse_color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), (1.0-diffuse_color.a)*(1.0-diffuse_color.a)));
- col.rgb = col.rgb*gl_Color.rgb;
+ col.rgb = col.rgb*diffuse_color.rgb;
- gl_FrontColor = col;
+ vertex_color = col;
- gl_FogFragCoord = pos.z;
- pos = gl_ModelViewProjectionMatrix * vert;
+
+ pos = modelview_projection_matrix * vert;
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl
index 870d593311..402f681631 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl
@@ -1,18 +1,39 @@
/**
* @file avatarShadowF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
uniform sampler2D diffuseMap;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
- //gl_FragColor = vec4(1,1,1,gl_Color.a * texture2D(diffuseMap, gl_TexCoord[0].xy).a);
+ //gl_FragColor = vec4(1,1,1,vertex_color.a * texture2D(diffuseMap, vary_texcoord0.xy).a);
gl_FragColor = vec4(1,1,1,1);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
index c7a4f86727..ded6cced27 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
@@ -1,27 +1,50 @@
/**
* @file attachmentShadowV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
+uniform mat4 projection_matrix;
+uniform mat4 modelview_matrix;
+uniform mat4 texture_matrix0;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
mat4 getObjectSkinnedTransform();
void main()
{
//transform vertex
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
- vec4 p = gl_ProjectionMatrix * vec4(pos, 1.0);
+ vec4 p = projection_matrix * vec4(pos, 1.0);
p.z = max(p.z, -p.w+0.01);
gl_Position = p;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
index 68e4055cf2..d7b90978ba 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
@@ -2,10 +2,32 @@
* @file avatarAlphaV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
@@ -19,14 +41,24 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_position;
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_position;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_pointlight_col;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
uniform float near_clip;
+uniform vec4 color;
+
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
@@ -59,56 +91,55 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
vec4 pos;
vec3 norm;
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], gl_Vertex);
- pos.y = dot(trans[1], gl_Vertex);
- pos.z = dot(trans[2], gl_Vertex);
+ vec4 pos_in = vec4(position.xyz, 1.0);
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
pos.w = 1.0;
- norm.x = dot(trans[0].xyz, gl_Normal);
- norm.y = dot(trans[1].xyz, gl_Normal);
- norm.z = dot(trans[2].xyz, gl_Normal);
+ norm.x = dot(trans[0].xyz, normal);
+ norm.y = dot(trans[1].xyz, normal);
+ norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
- vec4 frag_pos = gl_ProjectionMatrix * pos;
+ vec4 frag_pos = projection_matrix * pos;
gl_Position = frag_pos;
vary_position = pos.xyz;
calcAtmospherics(pos.xyz);
- //vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
-
- vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a);
+ vec4 col = vec4(0.0, 0.0, 0.0, 1.0);
// Collect normal lights
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a);
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].y, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].y, light_attenuation[3].z);
+ col.rgb += light_diffuse[4].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[4], light_direction[4], light_attenuation[4].x, light_attenuation[4].y, light_attenuation[4].z);
+ col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].y, light_attenuation[5].z);
+ col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
+ col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb*gl_Color.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb*gl_Color.rgb;
- vary_directional = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a)));
+ vary_ambient = col.rgb*color.rgb;
+ vary_directional = color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb*gl_Color.rgb, 1.0);
+ col.rgb = col.rgb * color.rgb;
- gl_FrontColor = col;
+ vertex_color = col;
- gl_FogFragCoord = pos.z;
+
vary_fragcoord.xyz = frag_pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
index 7bc78fe407..01ffb862f7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarEyesV.glsl
@@ -2,20 +2,47 @@
* @file avatarEyesV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
-varying vec3 vary_normal;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec3 vary_normal;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vary_normal = normalize(gl_NormalMatrix * gl_Normal);
+ vary_normal = normalize(normal_matrix * normal);
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
index 3268618093..9a3b2e3e8a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
@@ -2,18 +2,39 @@
* @file avatarF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
uniform sampler2D diffuseMap;
-varying vec3 vary_normal;
+VARYING vec3 vary_normal;
+VARYING vec2 vary_texcoord0;
void main()
{
- vec4 diff = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 diff = texture2D(diffuseMap, vary_texcoord0.xy);
if (diff.a < 0.2)
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl
index 78986ab12e..558a88009a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl
@@ -2,18 +2,37 @@
* @file avatarShadowF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
uniform sampler2D diffuseMap;
-varying vec4 post_pos;
+VARYING vec4 post_pos;
void main()
{
- //gl_FragColor = vec4(1,1,1,gl_Color.a * texture2D(diffuseMap, gl_TexCoord[0].xy).a);
gl_FragColor = vec4(1,1,1,1);
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
index f177fcd8f1..23feb09d72 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
@@ -2,41 +2,58 @@
* @file avatarShadowV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
mat4 getSkinnedTransform();
-attribute vec4 weight;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
-varying vec4 post_pos;
+VARYING vec4 post_pos;
void main()
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
-
vec4 pos;
vec3 norm;
+ vec4 pos_in = vec4(position.xyz, 1.0);
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], gl_Vertex);
- pos.y = dot(trans[1], gl_Vertex);
- pos.z = dot(trans[2], gl_Vertex);
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
pos.w = 1.0;
- norm.x = dot(trans[0].xyz, gl_Normal);
- norm.y = dot(trans[1].xyz, gl_Normal);
- norm.z = dot(trans[2].xyz, gl_Normal);
+ norm.x = dot(trans[0].xyz, normal);
+ norm.y = dot(trans[1].xyz, normal);
+ norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
- pos = gl_ProjectionMatrix * pos;
+ pos = projection_matrix * pos;
post_pos = pos;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
-
- gl_FrontColor = gl_Color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
index 7eac11287a..1bd8fee7c9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
@@ -2,41 +2,62 @@
* @file avatarV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 projection_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
mat4 getSkinnedTransform();
-attribute vec4 weight;
+ATTRIBUTE vec4 weight;
-varying vec3 vary_normal;
+VARYING vec3 vary_normal;
+VARYING vec2 vary_texcoord0;
void main()
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
vec4 pos;
vec3 norm;
+ vec4 pos_in = vec4(position.xyz, 1.0);
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], gl_Vertex);
- pos.y = dot(trans[1], gl_Vertex);
- pos.z = dot(trans[2], gl_Vertex);
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
pos.w = 1.0;
- norm.x = dot(trans[0].xyz, gl_Normal);
- norm.y = dot(trans[1].xyz, gl_Normal);
- norm.z = dot(trans[2].xyz, gl_Normal);
+ norm.x = dot(trans[0].xyz, normal);
+ norm.y = dot(trans[1].xyz, normal);
+ norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
vary_normal = norm;
- gl_Position = gl_ProjectionMatrix * pos;
- //gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
-
- gl_FrontColor = gl_Color;
+ gl_Position = projection_matrix * pos;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
index 8c75c8045a..60d4dae99f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
@@ -2,13 +2,33 @@
* @file blurLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
uniform sampler2DRect lightMap;
@@ -19,11 +39,16 @@ uniform vec2 delta;
uniform vec3 kern[4];
uniform float kern_scale;
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
+vec3 getKern(int i)
+{
+ return kern[i];
+}
+
vec4 getPosition(vec2 pos_screen)
{
float depth = texture2DRect(depthMap, pos_screen.xy).r;
@@ -48,35 +73,38 @@ void main()
vec2 dlt = kern_scale * delta / (1.0+norm.xy*norm.xy);
dlt /= max(-pos.z*dist_factor, 1.0);
- vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
+ vec2 defined_weight = getKern(0).xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
vec4 col = defined_weight.xyxx * ccol;
// relax tolerance according to distance to avoid speckling artifacts, as angles and distances are a lot more abrupt within a small screen area at larger distances
float pointplanedist_tolerance_pow2 = pos.z*pos.z*0.00005;
// perturb sampling origin slightly in screen-space to hide edge-ghosting artifacts where smoothing radius is quite large
- tc += ( (mod(tc.x+tc.y,2) - 0.5) * kern[1].z * dlt * 0.5 );
+ float tc_mod = 0.5*(tc.x + tc.y); // mod(tc.x+tc.y,2)
+ tc_mod -= floor(tc_mod);
+ tc_mod *= 2.0;
+ tc += ( (tc_mod - 0.5) * getKern(1).z * dlt * 0.5 );
for (int i = 1; i < 4; i++)
{
- vec2 samptc = tc + kern[i].z*dlt;
+ vec2 samptc = tc + getKern(i).z*dlt;
vec3 samppos = getPosition(samptc).xyz;
float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane
if (d*d <= pointplanedist_tolerance_pow2)
{
- col += texture2DRect(lightMap, samptc)*kern[i].xyxx;
- defined_weight += kern[i].xy;
+ col += texture2DRect(lightMap, samptc)*getKern(i).xyxx;
+ defined_weight += getKern(i).xy;
}
}
for (int i = 1; i < 4; i++)
{
- vec2 samptc = tc - kern[i].z*dlt;
+ vec2 samptc = tc - getKern(i).z*dlt;
vec3 samppos = getPosition(samptc).xyz;
float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane
if (d*d <= pointplanedist_tolerance_pow2)
{
- col += texture2DRect(lightMap, samptc)*kern[i].xyxx;
- defined_weight += kern[i].xy;
+ col += texture2DRect(lightMap, samptc)*getKern(i).xyxx;
+ defined_weight += getKern(i).xy;
}
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl
deleted file mode 100644
index 6ca51377c1..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightMSF.glsl
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * @file blurLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2DRect lightMap;
-
-uniform float dist_factor;
-uniform float blur_size;
-uniform vec2 delta;
-uniform vec3 kern[4];
-uniform float kern_scale;
-
-varying vec2 vary_fragcoord;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-vec3 texture2DMS3(sampler2DMS tex, ivec2 tc)
-{
- vec3 ret = vec3(0,0,0);
- for (int i = 0; i < samples; i++)
- {
- ret += texelFetch(tex, tc, i).rgb;
- }
-
- return ret/samples;
-}
-
-float texture2DMS1(sampler2DMS tex, ivec2 tc)
-{
- float ret = 0;
- for (int i = 0; i < samples; i++)
- {
- ret += texelFetch(tex, tc, i).r;
- }
-
- return ret/samples;
-}
-
-vec4 getPosition(ivec2 pos_screen)
-{
- float depth = texture2DMS1(depthMap, pos_screen.xy);
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- ivec2 itc = ivec2(tc);
-
- vec3 norm = texture2DMS3(normalMap, itc).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- vec3 pos = getPosition(itc).xyz;
- vec4 ccol = texture2DRect(lightMap, tc).rgba;
-
- vec2 dlt = kern_scale * delta / (1.0+norm.xy*norm.xy);
- dlt /= max(-pos.z*dist_factor, 1.0);
-
- vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
- vec4 col = defined_weight.xyxx * ccol;
-
- // relax tolerance according to distance to avoid speckling artifacts, as angles and distances are a lot more abrupt within a small screen area at larger distances
- float pointplanedist_tolerance_pow2 = pos.z*pos.z*0.00005;
-
- // perturb sampling origin slightly in screen-space to hide edge-ghosting artifacts where smoothing radius is quite large
- tc += ( (mod(tc.x+tc.y,2) - 0.5) * kern[1].z * dlt * 0.5 );
-
- for (int i = 1; i < 4; i++)
- {
- vec2 samptc = tc + kern[i].z*dlt;
- vec3 samppos = getPosition(ivec2(samptc)).xyz;
- float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane
- if (d*d <= pointplanedist_tolerance_pow2)
- {
- col += texture2DRect(lightMap, samptc)*kern[i].xyxx;
- defined_weight += kern[i].xy;
- }
- }
- for (int i = 1; i < 4; i++)
- {
- vec2 samptc = vec2(tc - kern[i].z*dlt);
- vec3 samppos = getPosition(ivec2(samptc)).xyz;
- float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane
- if (d*d <= pointplanedist_tolerance_pow2)
- {
- col += texture2DRect(lightMap, samptc)*kern[i].xyxx;
- defined_weight += kern[i].xy;
- }
- }
-
- col /= defined_weight.xyxx;
- col.y *= col.y;
-
- gl_FragColor = col;
-}
-
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl
index 862f809de5..212f7e56ad 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightV.glsl
@@ -2,18 +2,38 @@
* @file blurLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
-varying vec2 vary_fragcoord;
+ATTRIBUTE vec3 position;
+
+VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
index 75b4dc624a..6cc5f23aca 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
@@ -2,30 +2,53 @@
* @file bumpF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
-varying vec3 vary_mat0;
-varying vec3 vary_mat1;
-varying vec3 vary_mat2;
+VARYING vec3 vary_mat0;
+VARYING vec3 vary_mat1;
+VARYING vec3 vary_mat2;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
- vec3 col = gl_Color.rgb * texture2D(diffuseMap, gl_TexCoord[0].xy).rgb;
- vec3 norm = texture2D(bumpMap, gl_TexCoord[0].xy).rgb * 2.0 - 1.0;
+ vec3 col = vertex_color.rgb * texture2D(diffuseMap, vary_texcoord0.xy).rgb;
+ vec3 norm = texture2D(bumpMap, vary_texcoord0.xy).rgb * 2.0 - 1.0;
vec3 tnorm = vec3(dot(norm,vary_mat0),
dot(norm,vary_mat1),
dot(norm,vary_mat2));
gl_FragData[0] = vec4(col, 0.0);
- gl_FragData[1] = gl_Color.aaaa; // spec
- //gl_FragData[1] = vec4(vec3(gl_Color.a), gl_Color.a+(1.0-gl_Color.a)*gl_Color.a); // spec - from former class3 - maybe better, but not so well tested
+ gl_FragData[1] = vertex_color.aaaa; // spec
+ //gl_FragData[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(tnorm);
gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl
index dc69519a85..6c205074b4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpSkinnedV.glsl
@@ -1,37 +1,64 @@
/**
* @file bumpV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
+uniform mat4 projection_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec2 texcoord2;
-varying vec3 vary_mat0;
-varying vec3 vary_mat1;
-varying vec3 vary_mat2;
+VARYING vec3 vary_mat0;
+VARYING vec3 vary_mat1;
+VARYING vec3 vary_mat2;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
mat4 getObjectSkinnedTransform();
void main()
{
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
+ mat = modelview_matrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
- vec3 n = normalize((mat * vec4(gl_Normal.xyz+gl_Vertex.xyz, 1.0)).xyz-pos.xyz);
- vec3 b = normalize((mat * vec4(gl_MultiTexCoord2.xyz+gl_Vertex.xyz, 1.0)).xyz-pos.xyz);
+ vec3 n = normalize((mat * vec4(normal.xyz+position.xyz, 1.0)).xyz-pos.xyz);
+ vec3 b = normalize((mat * vec4(vec4(texcoord2,0,1).xyz+position.xyz, 1.0)).xyz-pos.xyz);
vec3 t = cross(b, n);
vary_mat0 = vec3(t.x, b.x, n.x);
vary_mat1 = vec3(t.y, b.y, n.y);
vary_mat2 = vec3(t.z, b.z, n.z);
- gl_Position = gl_ProjectionMatrix*vec4(pos, 1.0);
- gl_FrontColor = gl_Color;
+ gl_Position = projection_matrix*vec4(pos, 1.0);
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
index 5b6726488b..c8d38bb8f7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
@@ -2,28 +2,56 @@
* @file bumpV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
-varying vec3 vary_mat0;
-varying vec3 vary_mat1;
-varying vec3 vary_mat2;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 binormal;
+
+VARYING vec3 vary_mat0;
+VARYING vec3 vary_mat1;
+VARYING vec3 vary_mat2;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
//transform vertex
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vec3 n = normalize(gl_NormalMatrix * gl_Normal);
- vec3 b = normalize(gl_NormalMatrix * gl_MultiTexCoord2.xyz);
+ vec3 n = normalize(normal_matrix * normal);
+ vec3 b = normalize(normal_matrix * binormal);
vec3 t = cross(b, n);
vary_mat0 = vec3(t.x, b.x, n.x);
vary_mat1 = vec3(t.y, b.y, n.y);
vary_mat2 = vec3(t.z, b.z, n.z);
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
index ef300d5631..db272cf601 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
@@ -2,24 +2,50 @@
* @file WLCloudsF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
/////////////////////////////////////////////////////////////////////////
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
-varying vec4 vary_CloudColorSun;
-varying vec4 vary_CloudColorAmbient;
-varying float vary_CloudDensity;
+VARYING vec4 vary_CloudColorSun;
+VARYING vec4 vary_CloudColorAmbient;
+VARYING float vary_CloudDensity;
uniform sampler2D cloud_noise_texture;
uniform vec4 cloud_pos_density1;
uniform vec4 cloud_pos_density2;
uniform vec4 gamma;
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+VARYING vec2 vary_texcoord2;
+VARYING vec2 vary_texcoord3;
+
/// Soft clips the light with a gamma correction
vec3 scaleSoftClip(vec3 light) {
//soft clip effect:
@@ -32,14 +58,14 @@ vec3 scaleSoftClip(vec3 light) {
void main()
{
// Set variables
- vec2 uv1 = gl_TexCoord[0].xy;
- vec2 uv2 = gl_TexCoord[1].xy;
+ vec2 uv1 = vary_texcoord0.xy;
+ vec2 uv2 = vary_texcoord1.xy;
vec4 cloudColorSun = vary_CloudColorSun;
vec4 cloudColorAmbient = vary_CloudColorAmbient;
float cloudDensity = vary_CloudDensity;
- vec2 uv3 = gl_TexCoord[2].xy;
- vec2 uv4 = gl_TexCoord[3].xy;
+ vec2 uv3 = vary_texcoord2.xy;
+ vec2 uv4 = vary_texcoord3.xy;
// Offset texture coords
uv1 += cloud_pos_density1.xy; //large texture, visible density
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index 3eac63076c..64e094e3c5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -2,19 +2,45 @@
* @file WLCloudsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
//////////////////////////////////////////////////////////////////////////
// The vertex shader for creating the atmospheric sky
///////////////////////////////////////////////////////////////////////////////
// Output parameters
-varying vec4 vary_CloudColorSun;
-varying vec4 vary_CloudColorAmbient;
-varying float vary_CloudDensity;
+VARYING vec4 vary_CloudColorSun;
+VARYING vec4 vary_CloudColorAmbient;
+VARYING float vary_CloudDensity;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+VARYING vec2 vary_texcoord2;
+VARYING vec2 vary_texcoord3;
// Inputs
uniform vec3 camPosLocal;
@@ -41,12 +67,12 @@ void main()
{
// World / view / projection
- gl_Position = ftransform();
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
// Get relative position
- vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
+ vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
// Set altitude
if (P.y > 0.)
@@ -142,17 +168,17 @@ void main()
// Texture coords
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_TexCoord[0].xy -= 0.5;
- gl_TexCoord[0].xy /= cloud_scale.x;
- gl_TexCoord[0].xy += 0.5;
+ vary_texcoord0 = texcoord0;
+ vary_texcoord0.xy -= 0.5;
+ vary_texcoord0.xy /= cloud_scale.x;
+ vary_texcoord0.xy += 0.5;
- gl_TexCoord[1] = gl_TexCoord[0];
- gl_TexCoord[1].x += lightnorm.x * 0.0125;
- gl_TexCoord[1].y += lightnorm.z * 0.0125;
+ vary_texcoord1 = vary_texcoord0;
+ vary_texcoord1.x += lightnorm.x * 0.0125;
+ vary_texcoord1.y += lightnorm.z * 0.0125;
- gl_TexCoord[2] = gl_TexCoord[0] * 16.;
- gl_TexCoord[3] = gl_TexCoord[1] * 16.;
+ vary_texcoord2 = vary_texcoord0 * 16.;
+ vary_texcoord3 = vary_texcoord1 * 16.;
// Combine these to minimize register use
vary_CloudColorAmbient += oHazeColorBelowCloud;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
new file mode 100644
index 0000000000..88fe3c3dee
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
@@ -0,0 +1,87 @@
+/**
+ * @file cofF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRect diffuseRect;
+uniform sampler2DRect depthMap;
+uniform sampler2D bloomMap;
+
+uniform float depth_cutoff;
+uniform float norm_cutoff;
+uniform float focal_distance;
+uniform float blur_constant;
+uniform float tan_pixel_angle;
+uniform float magnification;
+uniform float max_cof;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+VARYING vec2 vary_fragcoord;
+
+float getDepth(vec2 pos_screen)
+{
+ float z = texture2DRect(depthMap, pos_screen.xy).r;
+ z = z*2.0-1.0;
+ vec4 ndc = vec4(0.0, 0.0, z, 1.0);
+ vec4 p = inv_proj*ndc;
+ return p.z/p.w;
+}
+
+float calc_cof(float depth)
+{
+ float sc = abs(depth-focal_distance)/-depth*blur_constant;
+
+ sc /= magnification;
+
+ // tan_pixel_angle = pixel_length/-depth;
+ float pixel_length = tan_pixel_angle*-focal_distance;
+
+ sc = sc/pixel_length;
+ sc *= 1.414;
+
+ return sc;
+}
+
+void main()
+{
+ vec2 tc = vary_fragcoord.xy;
+
+ float depth = getDepth(tc);
+
+ vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
+
+ float sc = calc_cof(depth);
+ sc = min(abs(sc), max_cof);
+
+ vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
+ gl_FragColor.rgb = diff.rgb + bloom.rgb;
+ gl_FragColor.a = sc/max_cof;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
new file mode 100644
index 0000000000..e9989a4e48
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
@@ -0,0 +1,52 @@
+/**
+ * @file diffuseAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+VARYING vec3 vary_normal;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ vec4 col = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
+
+ if (col.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragData[0] = vec4(col.rgb, 0.0);
+ gl_FragData[1] = vec4(0,0,0,0); // spec
+ vec3 nvn = normalize(vary_normal);
+ gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
new file mode 100644
index 0000000000..fdf8d72b38
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
@@ -0,0 +1,50 @@
+/**
+ * @file diffuseAlphaMaskIndexedF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
+
+VARYING vec3 vary_normal;
+
+uniform float minimum_alpha;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ vec4 col = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ if (col.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragData[0] = vec4(col.rgb, 0.0);
+ gl_FragData[1] = vec4(0,0,0,0);
+ vec3 nvn = normalize(vary_normal);
+ gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
new file mode 100644
index 0000000000..bb20e2ca47
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
@@ -0,0 +1,52 @@
+/**
+ * @file diffuseAlphaMaskNoColorF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+VARYING vec3 vary_normal;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
+
+ if (col.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragData[0] = vec4(col.rgb, 0.0);
+ gl_FragData[1] = vec4(0,0,0,0); // spec
+ vec3 nvn = normalize(vary_normal);
+ gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
index 43af480c50..7bde49eb86 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
@@ -2,21 +2,43 @@
* @file diffuseF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
uniform sampler2D diffuseMap;
-varying vec3 vary_normal;
+VARYING vec3 vary_normal;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
- vec3 col = gl_Color.rgb * texture2D(diffuseMap, gl_TexCoord[0].xy).rgb;
+ vec3 col = vertex_color.rgb * texture2D(diffuseMap, vary_texcoord0.xy).rgb;
gl_FragData[0] = vec4(col, 0.0);
- gl_FragData[1] = gl_Color.aaaa; // spec
- //gl_FragData[1] = vec4(vec3(gl_Color.a), gl_Color.a+(1.0-gl_Color.a)*gl_Color.a); // spec - from former class3 - maybe better, but not so well tested
+ gl_FragData[1] = vertex_color.aaaa; // spec
+ //gl_FragData[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(vary_normal);
gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
index e7b5dcce7f..75b45111e0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
@@ -2,18 +2,42 @@
* @file diffuseIndexedF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-varying vec3 vary_normal;
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
+
+VARYING vec3 vary_normal;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
- vec3 col = gl_Color.rgb * diffuseLookup(gl_TexCoord[0].xy).rgb;
+ vec3 col = vertex_color.rgb * diffuseLookup(vary_texcoord0.xy).rgb;
gl_FragData[0] = vec4(col, 0.0);
- gl_FragData[1] = gl_Color.aaaa; // spec
- //gl_FragData[1] = vec4(vec3(gl_Color.a), gl_Color.a+(1.0-gl_Color.a)*gl_Color.a); // spec - from former class3 - maybe better, but not so well tested
+ gl_FragData[1] = vertex_color.aaaa; // spec
+ //gl_FragData[1] = vec4(vec3(vertex_color.a), vertex_color.a+(1.0-vertex_color.a)*vertex_color.a); // spec - from former class3 - maybe better, but not so well tested
vec3 nvn = normalize(vary_normal);
gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl
new file mode 100644
index 0000000000..9461e3e32e
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl
@@ -0,0 +1,45 @@
+/**
+ * @file diffuseNoColorV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec3 vary_normal;
+
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ //transform vertex
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ vary_normal = normalize(normal_matrix * normal);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl
index 2c4caea109..a74290bfcd 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseSkinnedV.glsl
@@ -1,33 +1,59 @@
/**
* @file diffuseSkinnedV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
+uniform mat4 projection_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
-varying vec3 vary_normal;
+VARYING vec3 vary_normal;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
mat4 getObjectSkinnedTransform();
void main()
{
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
- vec4 norm = gl_Vertex;
- norm.xyz += gl_Normal.xyz;
+ vec4 norm = vec4(position.xyz, 1.0);
+ norm.xyz += normal.xyz;
norm.xyz = (mat*norm).xyz;
norm.xyz = normalize(norm.xyz-pos.xyz);
vary_normal = norm.xyz;
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
- gl_Position = gl_ProjectionMatrix*vec4(pos, 1.0);
+ gl_Position = projection_matrix*vec4(pos, 1.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
index b56d1493c3..76d29b1df7 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
@@ -2,22 +2,51 @@
* @file diffuseV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
-varying vec3 vary_normal;
-varying float vary_texture_index;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec3 vary_normal;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void passTextureIndex();
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.xyz, 1.0);
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vary_texture_index = gl_Vertex.w;
- vary_normal = normalize(gl_NormalMatrix * gl_Normal);
+ passTextureIndex();
+ vary_normal = normalize(normal_matrix * normal);
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
new file mode 100644
index 0000000000..21453aefaa
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -0,0 +1,67 @@
+/**
+ * @file dofCombineF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRect diffuseRect;
+uniform sampler2DRect lightMap;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+uniform float max_cof;
+uniform float res_scale;
+
+VARYING vec2 vary_fragcoord;
+
+void main()
+{
+ vec2 tc = vary_fragcoord.xy;
+
+ vec4 dof = texture2DRect(diffuseRect, vary_fragcoord.xy*res_scale);
+
+ vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy);
+
+ float a = min(diff.a * max_cof*res_scale*res_scale, 1.0);
+
+ if (a > 0.25 && a < 0.75)
+ { //help out the transition a bit
+ float sc = a/res_scale;
+
+ vec4 col;
+ col = texture2DRect(lightMap, vary_fragcoord.xy+vec2(sc,sc));
+ col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(-sc,sc));
+ col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(sc,-sc));
+ col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(-sc,-sc));
+
+ diff = mix(diff, col*0.25, a);
+ }
+
+ gl_FragColor = mix(diff, dof, a);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl
new file mode 100644
index 0000000000..92f78125d8
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl
@@ -0,0 +1,50 @@
+/**
+ * @file emissiveF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ float shadow = 1.0;
+
+ vec4 color = diffuseLookup(vary_texcoord0.xy)*vertex_color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl
new file mode 100644
index 0000000000..115b04797f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl
@@ -0,0 +1,63 @@
+/**
+ * @file emissiveV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec4 emissive;
+ATTRIBUTE vec2 texcoord0;
+
+void calcAtmospherics(vec3 inPositionEye);
+
+vec3 atmosAmbient(vec3 light);
+vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 scaleDownLight(vec3 light);
+vec3 scaleUpLight(vec3 light);
+
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(position.xyz, 1.0);
+ vec4 pos = (modelview_matrix * vert);
+ passTextureIndex();
+
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ calcAtmospherics(pos.xyz);
+
+ vertex_color = emissive;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index d781e08548..84ae2f9f10 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -2,12 +2,35 @@
* @file fullbrightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-#extension GL_ARB_texture_rectangle : enable
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -17,7 +40,7 @@ void main()
{
float shadow = 1.0;
- vec4 color = diffuseLookup(gl_TexCoord[0].xy)*gl_Color;
+ vec4 color = diffuseLookup(vary_texcoord0.xy)*vertex_color;
color.rgb = fullbrightAtmosTransport(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
index 2eed044b7c..2e6982d101 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
@@ -2,10 +2,36 @@
* @file fullbrightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
void calcAtmospherics(vec3 inPositionEye);
@@ -14,23 +40,25 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying float vary_texture_index;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
void main()
{
//transform vertex
- vec4 vert = vec4(gl_Vertex.xyz, 1.0);
- vary_texture_index = gl_Vertex.w;
+ vec4 vert = vec4(position.xyz, 1.0);
+ vec4 pos = (modelview_matrix * vert);
+ passTextureIndex();
- gl_Position = gl_ModelViewProjectionMatrix*vert;
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vec4 pos = (gl_ModelViewMatrix * vert);
-
calcAtmospherics(pos.xyz);
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
- gl_FogFragCoord = pos.z;
+
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
new file mode 100644
index 0000000000..5af9406452
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl
@@ -0,0 +1,2118 @@
+/**
+ * @file fxaaF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+#define FXAA_PC 1
+//#define FXAA_GLSL_130 1
+#define FXAA_QUALITY__PRESET 12
+
+/*============================================================================
+
+
+ NVIDIA FXAA 3.11 by TIMOTHY LOTTES
+
+
+------------------------------------------------------------------------------
+COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED.
+------------------------------------------------------------------------------
+TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
+*AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA
+OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR
+CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR
+LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION,
+OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE
+THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+------------------------------------------------------------------------------
+ INTEGRATION CHECKLIST
+------------------------------------------------------------------------------
+(1.)
+In the shader source, setup defines for the desired configuration.
+When providing multiple shaders (for different presets),
+simply setup the defines differently in multiple files.
+Example,
+
+ #define FXAA_PC 1
+ #define FXAA_HLSL_5 1
+ #define FXAA_QUALITY__PRESET 12
+
+Or,
+
+ #define FXAA_360 1
+
+Or,
+
+ #define FXAA_PS3 1
+
+Etc.
+
+(2.)
+Then include this file,
+
+ #include "Fxaa3_11.h"
+
+(3.)
+Then call the FXAA pixel shader from within your desired shader.
+Look at the FXAA Quality FxaaPixelShader() for docs on inputs.
+As for FXAA 3.11 all inputs for all shaders are the same
+to enable easy porting between platforms.
+
+ return FxaaPixelShader(...);
+
+(4.)
+Insure pass prior to FXAA outputs RGBL (see next section).
+Or use,
+
+ #define FXAA_GREEN_AS_LUMA 1
+
+(5.)
+Setup engine to provide the following constants
+which are used in the FxaaPixelShader() inputs,
+
+ FxaaFloat2 fxaaQualityRcpFrame,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt2,
+ FxaaFloat4 fxaaConsole360RcpFrameOpt2,
+ FxaaFloat fxaaQualitySubpix,
+ FxaaFloat fxaaQualityEdgeThreshold,
+ FxaaFloat fxaaQualityEdgeThresholdMin,
+ FxaaFloat fxaaConsoleEdgeSharpness,
+ FxaaFloat fxaaConsoleEdgeThreshold,
+ FxaaFloat fxaaConsoleEdgeThresholdMin,
+ FxaaFloat4 fxaaConsole360ConstDir
+
+Look at the FXAA Quality FxaaPixelShader() for docs on inputs.
+
+(6.)
+Have FXAA vertex shader run as a full screen triangle,
+and output "pos" and "fxaaConsolePosPos"
+such that inputs in the pixel shader provide,
+
+ // {xy} = center of pixel
+ FxaaFloat2 pos,
+
+ // {xy__} = upper left of pixel
+ // {__zw} = lower right of pixel
+ FxaaFloat4 fxaaConsolePosPos,
+
+(7.)
+Insure the texture sampler(s) used by FXAA are set to bilinear filtering.
+
+
+------------------------------------------------------------------------------
+ INTEGRATION - RGBL AND COLORSPACE
+------------------------------------------------------------------------------
+FXAA3 requires RGBL as input unless the following is set,
+
+ #define FXAA_GREEN_AS_LUMA 1
+
+In which case the engine uses green in place of luma,
+and requires RGB input is in a non-linear colorspace.
+
+RGB should be LDR (low dynamic range).
+Specifically do FXAA after tonemapping.
+
+RGB data as returned by a texture fetch can be non-linear,
+or linear when FXAA_GREEN_AS_LUMA is not set.
+Note an "sRGB format" texture counts as linear,
+because the result of a texture fetch is linear data.
+Regular "RGBA8" textures in the sRGB colorspace are non-linear.
+
+If FXAA_GREEN_AS_LUMA is not set,
+luma must be stored in the alpha channel prior to running FXAA.
+This luma should be in a perceptual space (could be gamma 2.0).
+Example pass before FXAA where output is gamma 2.0 encoded,
+
+ color.rgb = ToneMap(color.rgb); // linear color output
+ color.rgb = sqrt(color.rgb); // gamma 2.0 color output
+ return color;
+
+To use FXAA,
+
+ color.rgb = ToneMap(color.rgb); // linear color output
+ color.rgb = sqrt(color.rgb); // gamma 2.0 color output
+ color.a = dot(color.rgb, FxaaFloat3(0.299, 0.587, 0.114)); // compute luma
+ return color;
+
+Another example where output is linear encoded,
+say for instance writing to an sRGB formated render target,
+where the render target does the conversion back to sRGB after blending,
+
+ color.rgb = ToneMap(color.rgb); // linear color output
+ return color;
+
+To use FXAA,
+
+ color.rgb = ToneMap(color.rgb); // linear color output
+ color.a = sqrt(dot(color.rgb, FxaaFloat3(0.299, 0.587, 0.114))); // compute luma
+ return color;
+
+Getting luma correct is required for the algorithm to work correctly.
+
+
+------------------------------------------------------------------------------
+ BEING LINEARLY CORRECT?
+------------------------------------------------------------------------------
+Applying FXAA to a framebuffer with linear RGB color will look worse.
+This is very counter intuitive, but happends to be true in this case.
+The reason is because dithering artifacts will be more visiable
+in a linear colorspace.
+
+
+------------------------------------------------------------------------------
+ COMPLEX INTEGRATION
+------------------------------------------------------------------------------
+Q. What if the engine is blending into RGB before wanting to run FXAA?
+
+A. In the last opaque pass prior to FXAA,
+ have the pass write out luma into alpha.
+ Then blend into RGB only.
+ FXAA should be able to run ok
+ assuming the blending pass did not any add aliasing.
+ This should be the common case for particles and common blending passes.
+
+A. Or use FXAA_GREEN_AS_LUMA.
+
+============================================================================*/
+
+/*============================================================================
+
+ INTEGRATION KNOBS
+
+============================================================================*/
+//
+// FXAA_PS3 and FXAA_360 choose the console algorithm (FXAA3 CONSOLE).
+// FXAA_360_OPT is a prototype for the new optimized 360 version.
+//
+// 1 = Use API.
+// 0 = Don't use API.
+//
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_PS3
+ #define FXAA_PS3 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_360
+ #define FXAA_360 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_360_OPT
+ #define FXAA_360_OPT 0
+#endif
+/*==========================================================================*/
+#ifndef FXAA_PC
+ //
+ // FXAA Quality
+ // The high quality PC algorithm.
+ //
+ #define FXAA_PC 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_PC_CONSOLE
+ //
+ // The console algorithm for PC is included
+ // for developers targeting really low spec machines.
+ // Likely better to just run FXAA_PC, and use a really low preset.
+ //
+ #define FXAA_PC_CONSOLE 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_GLSL_120
+ #define FXAA_GLSL_120 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_GLSL_130
+ #define FXAA_GLSL_130 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_HLSL_3
+ #define FXAA_HLSL_3 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_HLSL_4
+ #define FXAA_HLSL_4 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_HLSL_5
+ #define FXAA_HLSL_5 0
+#endif
+/*==========================================================================*/
+#ifndef FXAA_GREEN_AS_LUMA
+ //
+ // For those using non-linear color,
+ // and either not able to get luma in alpha, or not wanting to,
+ // this enables FXAA to run using green as a proxy for luma.
+ // So with this enabled, no need to pack luma in alpha.
+ //
+ // This will turn off AA on anything which lacks some amount of green.
+ // Pure red and blue or combination of only R and B, will get no AA.
+ //
+ // Might want to lower the settings for both,
+ // fxaaConsoleEdgeThresholdMin
+ // fxaaQualityEdgeThresholdMin
+ // In order to insure AA does not get turned off on colors
+ // which contain a minor amount of green.
+ //
+ // 1 = On.
+ // 0 = Off.
+ //
+ #define FXAA_GREEN_AS_LUMA 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_EARLY_EXIT
+ //
+ // Controls algorithm's early exit path.
+ // On PS3 turning this ON adds 2 cycles to the shader.
+ // On 360 turning this OFF adds 10ths of a millisecond to the shader.
+ // Turning this off on console will result in a more blurry image.
+ // So this defaults to on.
+ //
+ // 1 = On.
+ // 0 = Off.
+ //
+ #define FXAA_EARLY_EXIT 1
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_DISCARD
+ //
+ // Only valid for PC OpenGL currently.
+ // Probably will not work when FXAA_GREEN_AS_LUMA = 1.
+ //
+ // 1 = Use discard on pixels which don't need AA.
+ // For APIs which enable concurrent TEX+ROP from same surface.
+ // 0 = Return unchanged color on pixels which don't need AA.
+ //
+ #define FXAA_DISCARD 0
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_FAST_PIXEL_OFFSET
+ //
+ // Used for GLSL 120 only.
+ //
+ // 1 = GL API supports fast pixel offsets
+ // 0 = do not use fast pixel offsets
+ //
+ #ifdef GL_EXT_gpu_shader4
+ #define FXAA_FAST_PIXEL_OFFSET 1
+ #endif
+ #ifdef GL_NV_gpu_shader5
+ #define FXAA_FAST_PIXEL_OFFSET 1
+ #endif
+ #ifdef GL_ARB_gpu_shader5
+ #define FXAA_FAST_PIXEL_OFFSET 1
+ #endif
+ #ifndef FXAA_FAST_PIXEL_OFFSET
+ #define FXAA_FAST_PIXEL_OFFSET 0
+ #endif
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_GATHER4_ALPHA
+ //
+ // 1 = API supports gather4 on alpha channel.
+ // 0 = API does not support gather4 on alpha channel.
+ //
+ #if (FXAA_HLSL_5 == 1)
+ #define FXAA_GATHER4_ALPHA 1
+ #endif
+ #ifdef GL_ARB_gpu_shader5
+ #define FXAA_GATHER4_ALPHA 1
+ #endif
+ #ifdef GL_NV_gpu_shader5
+ #define FXAA_GATHER4_ALPHA 1
+ #endif
+ #ifndef FXAA_GATHER4_ALPHA
+ #define FXAA_GATHER4_ALPHA 0
+ #endif
+#endif
+
+/*============================================================================
+ FXAA CONSOLE PS3 - TUNING KNOBS
+============================================================================*/
+#ifndef FXAA_CONSOLE__PS3_EDGE_SHARPNESS
+ //
+ // Consoles the sharpness of edges on PS3 only.
+ // Non-PS3 tuning is done with shader input.
+ //
+ // Due to the PS3 being ALU bound,
+ // there are only two safe values here: 4 and 8.
+ // These options use the shaders ability to a free *|/ by 2|4|8.
+ //
+ // 8.0 is sharper
+ // 4.0 is softer
+ // 2.0 is really soft (good for vector graphics inputs)
+ //
+ #if 1
+ #define FXAA_CONSOLE__PS3_EDGE_SHARPNESS 8.0
+ #endif
+ #if 0
+ #define FXAA_CONSOLE__PS3_EDGE_SHARPNESS 4.0
+ #endif
+ #if 0
+ #define FXAA_CONSOLE__PS3_EDGE_SHARPNESS 2.0
+ #endif
+#endif
+/*--------------------------------------------------------------------------*/
+#ifndef FXAA_CONSOLE__PS3_EDGE_THRESHOLD
+ //
+ // Only effects PS3.
+ // Non-PS3 tuning is done with shader input.
+ //
+ // The minimum amount of local contrast required to apply algorithm.
+ // The console setting has a different mapping than the quality setting.
+ //
+ // This only applies when FXAA_EARLY_EXIT is 1.
+ //
+ // Due to the PS3 being ALU bound,
+ // there are only two safe values here: 0.25 and 0.125.
+ // These options use the shaders ability to a free *|/ by 2|4|8.
+ //
+ // 0.125 leaves less aliasing, but is softer
+ // 0.25 leaves more aliasing, and is sharper
+ //
+ #if 1
+ #define FXAA_CONSOLE__PS3_EDGE_THRESHOLD 0.125
+ #else
+ #define FXAA_CONSOLE__PS3_EDGE_THRESHOLD 0.25
+ #endif
+#endif
+
+/*============================================================================
+ FXAA QUALITY - TUNING KNOBS
+------------------------------------------------------------------------------
+NOTE the other tuning knobs are now in the shader function inputs!
+============================================================================*/
+#ifndef FXAA_QUALITY__PRESET
+ //
+ // Choose the quality preset.
+ // This needs to be compiled into the shader as it effects code.
+ // Best option to include multiple presets is to
+ // in each shader define the preset, then include this file.
+ //
+ // OPTIONS
+ // -----------------------------------------------------------------------
+ // 10 to 15 - default medium dither (10=fastest, 15=highest quality)
+ // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
+ // 39 - no dither, very expensive
+ //
+ // NOTES
+ // -----------------------------------------------------------------------
+ // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
+ // 13 = about same speed as FXAA 3.9 and better than 12
+ // 23 = closest to FXAA 3.9 visually and performance wise
+ // _ = the lowest digit is directly related to performance
+ // _ = the highest digit is directly related to style
+ //
+ #define FXAA_QUALITY__PRESET 12
+#endif
+
+
+/*============================================================================
+
+ FXAA QUALITY - PRESETS
+
+============================================================================*/
+
+/*============================================================================
+ FXAA QUALITY - MEDIUM DITHER PRESETS
+============================================================================*/
+#if (FXAA_QUALITY__PRESET == 10)
+ #define FXAA_QUALITY__PS 3
+ #define FXAA_QUALITY__P0 1.5
+ #define FXAA_QUALITY__P1 3.0
+ #define FXAA_QUALITY__P2 12.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 11)
+ #define FXAA_QUALITY__PS 4
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 3.0
+ #define FXAA_QUALITY__P3 12.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 12)
+ #define FXAA_QUALITY__PS 5
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 4.0
+ #define FXAA_QUALITY__P4 12.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 13)
+ #define FXAA_QUALITY__PS 6
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 4.0
+ #define FXAA_QUALITY__P5 12.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 14)
+ #define FXAA_QUALITY__PS 7
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 4.0
+ #define FXAA_QUALITY__P6 12.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 15)
+ #define FXAA_QUALITY__PS 8
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 2.0
+ #define FXAA_QUALITY__P6 4.0
+ #define FXAA_QUALITY__P7 12.0
+#endif
+
+/*============================================================================
+ FXAA QUALITY - LOW DITHER PRESETS
+============================================================================*/
+#if (FXAA_QUALITY__PRESET == 20)
+ #define FXAA_QUALITY__PS 3
+ #define FXAA_QUALITY__P0 1.5
+ #define FXAA_QUALITY__P1 2.0
+ #define FXAA_QUALITY__P2 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 21)
+ #define FXAA_QUALITY__PS 4
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 22)
+ #define FXAA_QUALITY__PS 5
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 23)
+ #define FXAA_QUALITY__PS 6
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 24)
+ #define FXAA_QUALITY__PS 7
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 3.0
+ #define FXAA_QUALITY__P6 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 25)
+ #define FXAA_QUALITY__PS 8
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 2.0
+ #define FXAA_QUALITY__P6 4.0
+ #define FXAA_QUALITY__P7 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 26)
+ #define FXAA_QUALITY__PS 9
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 2.0
+ #define FXAA_QUALITY__P6 2.0
+ #define FXAA_QUALITY__P7 4.0
+ #define FXAA_QUALITY__P8 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 27)
+ #define FXAA_QUALITY__PS 10
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 2.0
+ #define FXAA_QUALITY__P6 2.0
+ #define FXAA_QUALITY__P7 2.0
+ #define FXAA_QUALITY__P8 4.0
+ #define FXAA_QUALITY__P9 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 28)
+ #define FXAA_QUALITY__PS 11
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 2.0
+ #define FXAA_QUALITY__P6 2.0
+ #define FXAA_QUALITY__P7 2.0
+ #define FXAA_QUALITY__P8 2.0
+ #define FXAA_QUALITY__P9 4.0
+ #define FXAA_QUALITY__P10 8.0
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_QUALITY__PRESET == 29)
+ #define FXAA_QUALITY__PS 12
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.5
+ #define FXAA_QUALITY__P2 2.0
+ #define FXAA_QUALITY__P3 2.0
+ #define FXAA_QUALITY__P4 2.0
+ #define FXAA_QUALITY__P5 2.0
+ #define FXAA_QUALITY__P6 2.0
+ #define FXAA_QUALITY__P7 2.0
+ #define FXAA_QUALITY__P8 2.0
+ #define FXAA_QUALITY__P9 2.0
+ #define FXAA_QUALITY__P10 4.0
+ #define FXAA_QUALITY__P11 8.0
+#endif
+
+/*============================================================================
+ FXAA QUALITY - EXTREME QUALITY
+============================================================================*/
+#if (FXAA_QUALITY__PRESET == 39)
+ #define FXAA_QUALITY__PS 12
+ #define FXAA_QUALITY__P0 1.0
+ #define FXAA_QUALITY__P1 1.0
+ #define FXAA_QUALITY__P2 1.0
+ #define FXAA_QUALITY__P3 1.0
+ #define FXAA_QUALITY__P4 1.0
+ #define FXAA_QUALITY__P5 1.5
+ #define FXAA_QUALITY__P6 2.0
+ #define FXAA_QUALITY__P7 2.0
+ #define FXAA_QUALITY__P8 2.0
+ #define FXAA_QUALITY__P9 2.0
+ #define FXAA_QUALITY__P10 4.0
+ #define FXAA_QUALITY__P11 8.0
+#endif
+
+
+
+/*============================================================================
+
+ API PORTING
+
+============================================================================*/
+#if (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1)
+ #define FxaaBool bool
+ #define FxaaDiscard discard
+ #define FxaaFloat float
+ #define FxaaFloat2 vec2
+ #define FxaaFloat3 vec3
+ #define FxaaFloat4 vec4
+ #define FxaaHalf float
+ #define FxaaHalf2 vec2
+ #define FxaaHalf3 vec3
+ #define FxaaHalf4 vec4
+ #define FxaaInt2 ivec2
+ #define FxaaSat(x) clamp(x, 0.0, 1.0)
+ #define FxaaTex sampler2D
+#else
+ #define FxaaBool bool
+ #define FxaaDiscard clip(-1)
+ #define FxaaFloat float
+ #define FxaaFloat2 float2
+ #define FxaaFloat3 float3
+ #define FxaaFloat4 float4
+ #define FxaaHalf half
+ #define FxaaHalf2 half2
+ #define FxaaHalf3 half3
+ #define FxaaHalf4 half4
+ #define FxaaSat(x) saturate(x)
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_GLSL_120 == 1)
+ // Requires,
+ // #version 120
+ // And at least,
+ // #extension GL_EXT_gpu_shader4 : enable
+ // (or set FXAA_FAST_PIXEL_OFFSET 1 to work like DX9)
+ #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
+ #if (FXAA_FAST_PIXEL_OFFSET == 1)
+ #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o)
+ #else
+ #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
+ #endif
+ #if (FXAA_GATHER4_ALPHA == 1)
+ // use #extension GL_ARB_gpu_shader5 : enable
+ #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)
+ #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)
+ #define FxaaTexGreen4(t, p) textureGather(t, p, 1)
+ #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)
+ #endif
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_GLSL_130 == 1)
+ // Requires "#version 130" or better
+ #define FxaaTexTop(t, p) textureLod(t, p, 0.0)
+ #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o)
+ #if (FXAA_GATHER4_ALPHA == 1)
+ // use #extension GL_ARB_gpu_shader5 : enable
+ #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)
+ #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)
+ #define FxaaTexGreen4(t, p) textureGather(t, p, 1)
+ #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)
+ #endif
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_HLSL_3 == 1) || (FXAA_360 == 1) || (FXAA_PS3 == 1)
+ #define FxaaInt2 float2
+ #define FxaaTex sampler2D
+ #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))
+ #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_HLSL_4 == 1)
+ #define FxaaInt2 int2
+ struct FxaaTex { SamplerState smpl; Texture2D tex; };
+ #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)
+ #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)
+#endif
+/*--------------------------------------------------------------------------*/
+#if (FXAA_HLSL_5 == 1)
+ #define FxaaInt2 int2
+ struct FxaaTex { SamplerState smpl; Texture2D tex; };
+ #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)
+ #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)
+ #define FxaaTexAlpha4(t, p) t.tex.GatherAlpha(t.smpl, p)
+ #define FxaaTexOffAlpha4(t, p, o) t.tex.GatherAlpha(t.smpl, p, o)
+ #define FxaaTexGreen4(t, p) t.tex.GatherGreen(t.smpl, p)
+ #define FxaaTexOffGreen4(t, p, o) t.tex.GatherGreen(t.smpl, p, o)
+#endif
+
+
+/*============================================================================
+ GREEN AS LUMA OPTION SUPPORT FUNCTION
+============================================================================*/
+#if (FXAA_GREEN_AS_LUMA == 0)
+ FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.w; }
+#else
+ FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
+#endif
+
+
+
+
+/*============================================================================
+
+ FXAA3 QUALITY - PC
+
+============================================================================*/
+#if (FXAA_PC == 1)
+/*--------------------------------------------------------------------------*/
+FxaaFloat4 FxaaPixelShader(
+ //
+ // Use noperspective interpolation here (turn off perspective interpolation).
+ // {xy} = center of pixel
+ FxaaFloat2 pos,
+ //
+ // Used only for FXAA Console, and not used on the 360 version.
+ // Use noperspective interpolation here (turn off perspective interpolation).
+ // {xy__} = upper left of pixel
+ // {__zw} = lower right of pixel
+ FxaaFloat4 fxaaConsolePosPos,
+ //
+ // Input color texture.
+ // {rgb_} = color in linear or perceptual color space
+ // if (FXAA_GREEN_AS_LUMA == 0)
+ // {___a} = luma in perceptual color space (not linear)
+ FxaaTex tex,
+ //
+ // Only used on the optimized 360 version of FXAA Console.
+ // For everything but 360, just use the same input here as for "tex".
+ // For 360, same texture, just alias with a 2nd sampler.
+ // This sampler needs to have an exponent bias of -1.
+ FxaaTex fxaaConsole360TexExpBiasNegOne,
+ //
+ // Only used on the optimized 360 version of FXAA Console.
+ // For everything but 360, just use the same input here as for "tex".
+ // For 360, same texture, just alias with a 3nd sampler.
+ // This sampler needs to have an exponent bias of -2.
+ FxaaTex fxaaConsole360TexExpBiasNegTwo,
+ //
+ // Only used on FXAA Quality.
+ // This must be from a constant/uniform.
+ // {x_} = 1.0/screenWidthInPixels
+ // {_y} = 1.0/screenHeightInPixels
+ FxaaFloat2 fxaaQualityRcpFrame,
+ //
+ // Only used on FXAA Console.
+ // This must be from a constant/uniform.
+ // This effects sub-pixel AA quality and inversely sharpness.
+ // Where N ranges between,
+ // N = 0.50 (default)
+ // N = 0.33 (sharper)
+ // {x___} = -N/screenWidthInPixels
+ // {_y__} = -N/screenHeightInPixels
+ // {__z_} = N/screenWidthInPixels
+ // {___w} = N/screenHeightInPixels
+ FxaaFloat4 fxaaConsoleRcpFrameOpt,
+ //
+ // Only used on FXAA Console.
+ // Not used on 360, but used on PS3 and PC.
+ // This must be from a constant/uniform.
+ // {x___} = -2.0/screenWidthInPixels
+ // {_y__} = -2.0/screenHeightInPixels
+ // {__z_} = 2.0/screenWidthInPixels
+ // {___w} = 2.0/screenHeightInPixels
+ FxaaFloat4 fxaaConsoleRcpFrameOpt2,
+ //
+ // Only used on FXAA Console.
+ // Only used on 360 in place of fxaaConsoleRcpFrameOpt2.
+ // This must be from a constant/uniform.
+ // {x___} = 8.0/screenWidthInPixels
+ // {_y__} = 8.0/screenHeightInPixels
+ // {__z_} = -4.0/screenWidthInPixels
+ // {___w} = -4.0/screenHeightInPixels
+ FxaaFloat4 fxaaConsole360RcpFrameOpt2,
+ //
+ // Only used on FXAA Quality.
+ // This used to be the FXAA_QUALITY__SUBPIX define.
+ // It is here now to allow easier tuning.
+ // Choose the amount of sub-pixel aliasing removal.
+ // This can effect sharpness.
+ // 1.00 - upper limit (softer)
+ // 0.75 - default amount of filtering
+ // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
+ // 0.25 - almost off
+ // 0.00 - completely off
+ FxaaFloat fxaaQualitySubpix,
+ //
+ // Only used on FXAA Quality.
+ // This used to be the FXAA_QUALITY__EDGE_THRESHOLD define.
+ // It is here now to allow easier tuning.
+ // The minimum amount of local contrast required to apply algorithm.
+ // 0.333 - too little (faster)
+ // 0.250 - low quality
+ // 0.166 - default
+ // 0.125 - high quality
+ // 0.063 - overkill (slower)
+ FxaaFloat fxaaQualityEdgeThreshold,
+ //
+ // Only used on FXAA Quality.
+ // This used to be the FXAA_QUALITY__EDGE_THRESHOLD_MIN define.
+ // It is here now to allow easier tuning.
+ // Trims the algorithm from processing darks.
+ // 0.0833 - upper limit (default, the start of visible unfiltered edges)
+ // 0.0625 - high quality (faster)
+ // 0.0312 - visible limit (slower)
+ // Special notes when using FXAA_GREEN_AS_LUMA,
+ // Likely want to set this to zero.
+ // As colors that are mostly not-green
+ // will appear very dark in the green channel!
+ // Tune by looking at mostly non-green content,
+ // then start at zero and increase until aliasing is a problem.
+ FxaaFloat fxaaQualityEdgeThresholdMin,
+ //
+ // Only used on FXAA Console.
+ // This used to be the FXAA_CONSOLE__EDGE_SHARPNESS define.
+ // It is here now to allow easier tuning.
+ // This does not effect PS3, as this needs to be compiled in.
+ // Use FXAA_CONSOLE__PS3_EDGE_SHARPNESS for PS3.
+ // Due to the PS3 being ALU bound,
+ // there are only three safe values here: 2 and 4 and 8.
+ // These options use the shaders ability to a free *|/ by 2|4|8.
+ // For all other platforms can be a non-power of two.
+ // 8.0 is sharper (default!!!)
+ // 4.0 is softer
+ // 2.0 is really soft (good only for vector graphics inputs)
+ FxaaFloat fxaaConsoleEdgeSharpness,
+ //
+ // Only used on FXAA Console.
+ // This used to be the FXAA_CONSOLE__EDGE_THRESHOLD define.
+ // It is here now to allow easier tuning.
+ // This does not effect PS3, as this needs to be compiled in.
+ // Use FXAA_CONSOLE__PS3_EDGE_THRESHOLD for PS3.
+ // Due to the PS3 being ALU bound,
+ // there are only two safe values here: 1/4 and 1/8.
+ // These options use the shaders ability to a free *|/ by 2|4|8.
+ // The console setting has a different mapping than the quality setting.
+ // Other platforms can use other values.
+ // 0.125 leaves less aliasing, but is softer (default!!!)
+ // 0.25 leaves more aliasing, and is sharper
+ FxaaFloat fxaaConsoleEdgeThreshold,
+ //
+ // Only used on FXAA Console.
+ // This used to be the FXAA_CONSOLE__EDGE_THRESHOLD_MIN define.
+ // It is here now to allow easier tuning.
+ // Trims the algorithm from processing darks.
+ // The console setting has a different mapping than the quality setting.
+ // This only applies when FXAA_EARLY_EXIT is 1.
+ // This does not apply to PS3,
+ // PS3 was simplified to avoid more shader instructions.
+ // 0.06 - faster but more aliasing in darks
+ // 0.05 - default
+ // 0.04 - slower and less aliasing in darks
+ // Special notes when using FXAA_GREEN_AS_LUMA,
+ // Likely want to set this to zero.
+ // As colors that are mostly not-green
+ // will appear very dark in the green channel!
+ // Tune by looking at mostly non-green content,
+ // then start at zero and increase until aliasing is a problem.
+ FxaaFloat fxaaConsoleEdgeThresholdMin,
+ //
+ // Extra constants for 360 FXAA Console only.
+ // Use zeros or anything else for other platforms.
+ // These must be in physical constant registers and NOT immedates.
+ // Immedates will result in compiler un-optimizing.
+ // {xyzw} = float4(1.0, -1.0, 0.25, -0.25)
+ FxaaFloat4 fxaaConsole360ConstDir
+) {
+/*--------------------------------------------------------------------------*/
+ FxaaFloat2 posM;
+ posM.x = pos.x;
+ posM.y = pos.y;
+ #if (FXAA_GATHER4_ALPHA == 1)
+ #if (FXAA_DISCARD == 0)
+ FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ #define lumaM rgbyM.w
+ #else
+ #define lumaM rgbyM.y
+ #endif
+ #endif
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ FxaaFloat4 luma4A = FxaaTexAlpha4(tex, posM);
+ FxaaFloat4 luma4B = FxaaTexOffAlpha4(tex, posM, FxaaInt2(-1, -1));
+ #else
+ FxaaFloat4 luma4A = FxaaTexGreen4(tex, posM);
+ FxaaFloat4 luma4B = FxaaTexOffGreen4(tex, posM, FxaaInt2(-1, -1));
+ #endif
+ #if (FXAA_DISCARD == 1)
+ #define lumaM luma4A.w
+ #endif
+ #define lumaE luma4A.z
+ #define lumaS luma4A.x
+ #define lumaSE luma4A.y
+ #define lumaNW luma4B.w
+ #define lumaN luma4B.z
+ #define lumaW luma4B.x
+ #else
+ FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ #define lumaM rgbyM.w
+ #else
+ #define lumaM rgbyM.y
+ #endif
+ FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
+ FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
+ FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
+ FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
+ #endif
+/*--------------------------------------------------------------------------*/
+ FxaaFloat maxSM = max(lumaS, lumaM);
+ FxaaFloat minSM = min(lumaS, lumaM);
+ FxaaFloat maxESM = max(lumaE, maxSM);
+ FxaaFloat minESM = min(lumaE, minSM);
+ FxaaFloat maxWN = max(lumaN, lumaW);
+ FxaaFloat minWN = min(lumaN, lumaW);
+ FxaaFloat rangeMax = max(maxWN, maxESM);
+ FxaaFloat rangeMin = min(minWN, minESM);
+ FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
+ FxaaFloat range = rangeMax - rangeMin;
+ FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
+ FxaaBool earlyExit = range < rangeMaxClamped;
+/*--------------------------------------------------------------------------*/
+ if(earlyExit)
+ #if (FXAA_DISCARD == 1)
+ FxaaDiscard;
+ #else
+ return rgbyM;
+ #endif
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_GATHER4_ALPHA == 0)
+ FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
+ FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
+ FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
+ FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
+ #else
+ FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(1, -1), fxaaQualityRcpFrame.xy));
+ FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
+ #endif
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaNS = lumaN + lumaS;
+ FxaaFloat lumaWE = lumaW + lumaE;
+ FxaaFloat subpixRcpRange = 1.0/range;
+ FxaaFloat subpixNSWE = lumaNS + lumaWE;
+ FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
+ FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaNESE = lumaNE + lumaSE;
+ FxaaFloat lumaNWNE = lumaNW + lumaNE;
+ FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
+ FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaNWSW = lumaNW + lumaSW;
+ FxaaFloat lumaSWSE = lumaSW + lumaSE;
+ FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
+ FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
+ FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
+ FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
+ FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
+ FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
+ FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
+ FxaaBool horzSpan = edgeHorz >= edgeVert;
+ FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
+/*--------------------------------------------------------------------------*/
+ if(!horzSpan) lumaN = lumaW;
+ if(!horzSpan) lumaS = lumaE;
+ if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
+ FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat gradientN = lumaN - lumaM;
+ FxaaFloat gradientS = lumaS - lumaM;
+ FxaaFloat lumaNN = lumaN + lumaM;
+ FxaaFloat lumaSS = lumaS + lumaM;
+ FxaaBool pairN = abs(gradientN) >= abs(gradientS);
+ FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
+ if(pairN) lengthSign = -lengthSign;
+ FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
+/*--------------------------------------------------------------------------*/
+ FxaaFloat2 posB;
+ posB.x = posM.x;
+ posB.y = posM.y;
+ FxaaFloat2 offNP;
+ offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
+ offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
+ if(!horzSpan) posB.x += lengthSign * 0.5;
+ if( horzSpan) posB.y += lengthSign * 0.5;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat2 posN;
+ posN.x = posB.x - offNP.x * FXAA_QUALITY__P0;
+ posN.y = posB.y - offNP.y * FXAA_QUALITY__P0;
+ FxaaFloat2 posP;
+ posP.x = posB.x + offNP.x * FXAA_QUALITY__P0;
+ posP.y = posB.y + offNP.y * FXAA_QUALITY__P0;
+ FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
+ FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
+ FxaaFloat subpixE = subpixC * subpixC;
+ FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
+/*--------------------------------------------------------------------------*/
+ if(!pairN) lumaNN = lumaSS;
+ FxaaFloat gradientScaled = gradient * 1.0/4.0;
+ FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
+ FxaaFloat subpixF = subpixD * subpixE;
+ FxaaBool lumaMLTZero = lumaMM < 0.0;
+/*--------------------------------------------------------------------------*/
+ lumaEndN -= lumaNN * 0.5;
+ lumaEndP -= lumaNN * 0.5;
+ FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
+ FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P1;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P1;
+ FxaaBool doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P1;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P1;
+/*--------------------------------------------------------------------------*/
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P2;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P2;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P2;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P2;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 3)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P3;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P3;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P3;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P3;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 4)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P4;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P4;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P4;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P4;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 5)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P5;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P5;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P5;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P5;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 6)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P6;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P6;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P6;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P6;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 7)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P7;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P7;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P7;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P7;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 8)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P8;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P8;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P8;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P8;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 9)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P9;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P9;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P9;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P9;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 10)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P10;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P10;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P10;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P10;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 11)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P11;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P11;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P11;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P11;
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_QUALITY__PS > 12)
+ if(doneNP) {
+ if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
+ if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
+ if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
+ if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
+ doneN = abs(lumaEndN) >= gradientScaled;
+ doneP = abs(lumaEndP) >= gradientScaled;
+ if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P12;
+ if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P12;
+ doneNP = (!doneN) || (!doneP);
+ if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P12;
+ if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P12;
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+ #endif
+/*--------------------------------------------------------------------------*/
+ }
+/*--------------------------------------------------------------------------*/
+ FxaaFloat dstN = posM.x - posN.x;
+ FxaaFloat dstP = posP.x - posM.x;
+ if(!horzSpan) dstN = posM.y - posN.y;
+ if(!horzSpan) dstP = posP.y - posM.y;
+/*--------------------------------------------------------------------------*/
+ FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
+ FxaaFloat spanLength = (dstP + dstN);
+ FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
+ FxaaFloat spanLengthRcp = 1.0/spanLength;
+/*--------------------------------------------------------------------------*/
+ FxaaBool directionN = dstN < dstP;
+ FxaaFloat dst = min(dstN, dstP);
+ FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
+ FxaaFloat subpixG = subpixF * subpixF;
+ FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
+ FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
+ FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
+ if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
+ if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
+ #if (FXAA_DISCARD == 1)
+ return FxaaTexTop(tex, posM);
+ #else
+ return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
+ #endif
+}
+/*==========================================================================*/
+#endif
+
+
+
+
+/*============================================================================
+
+ FXAA3 CONSOLE - PC VERSION
+
+------------------------------------------------------------------------------
+Instead of using this on PC, I'd suggest just using FXAA Quality with
+ #define FXAA_QUALITY__PRESET 10
+Or
+ #define FXAA_QUALITY__PRESET 20
+Either are higher qualilty and almost as fast as this on modern PC GPUs.
+============================================================================*/
+#if (FXAA_PC_CONSOLE == 1)
+/*--------------------------------------------------------------------------*/
+FxaaFloat4 FxaaPixelShader(
+ // See FXAA Quality FxaaPixelShader() source for docs on Inputs!
+ FxaaFloat2 pos,
+ FxaaFloat4 fxaaConsolePosPos,
+ FxaaTex tex,
+ FxaaTex fxaaConsole360TexExpBiasNegOne,
+ FxaaTex fxaaConsole360TexExpBiasNegTwo,
+ FxaaFloat2 fxaaQualityRcpFrame,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt2,
+ FxaaFloat4 fxaaConsole360RcpFrameOpt2,
+ FxaaFloat fxaaQualitySubpix,
+ FxaaFloat fxaaQualityEdgeThreshold,
+ FxaaFloat fxaaQualityEdgeThresholdMin,
+ FxaaFloat fxaaConsoleEdgeSharpness,
+ FxaaFloat fxaaConsoleEdgeThreshold,
+ FxaaFloat fxaaConsoleEdgeThresholdMin,
+ FxaaFloat4 fxaaConsole360ConstDir
+) {
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaNw = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.xy));
+ FxaaFloat lumaSw = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.xw));
+ FxaaFloat lumaNe = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.zy));
+ FxaaFloat lumaSe = FxaaLuma(FxaaTexTop(tex, fxaaConsolePosPos.zw));
+/*--------------------------------------------------------------------------*/
+ FxaaFloat4 rgbyM = FxaaTexTop(tex, pos.xy);
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ FxaaFloat lumaM = rgbyM.w;
+ #else
+ FxaaFloat lumaM = rgbyM.y;
+ #endif
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaMaxNwSw = max(lumaNw, lumaSw);
+ lumaNe += 1.0/384.0;
+ FxaaFloat lumaMinNwSw = min(lumaNw, lumaSw);
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaMaxNeSe = max(lumaNe, lumaSe);
+ FxaaFloat lumaMinNeSe = min(lumaNe, lumaSe);
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaMax = max(lumaMaxNeSe, lumaMaxNwSw);
+ FxaaFloat lumaMin = min(lumaMinNeSe, lumaMinNwSw);
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaMaxScaled = lumaMax * fxaaConsoleEdgeThreshold;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat lumaMinM = min(lumaMin, lumaM);
+ FxaaFloat lumaMaxScaledClamped = max(fxaaConsoleEdgeThresholdMin, lumaMaxScaled);
+ FxaaFloat lumaMaxM = max(lumaMax, lumaM);
+ FxaaFloat dirSwMinusNe = lumaSw - lumaNe;
+ FxaaFloat lumaMaxSubMinM = lumaMaxM - lumaMinM;
+ FxaaFloat dirSeMinusNw = lumaSe - lumaNw;
+ if(lumaMaxSubMinM < lumaMaxScaledClamped) return rgbyM;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat2 dir;
+ dir.x = dirSwMinusNe + dirSeMinusNw;
+ dir.y = dirSwMinusNe - dirSeMinusNw;
+/*--------------------------------------------------------------------------*/
+ FxaaFloat2 dir1 = normalize(dir.xy);
+ FxaaFloat4 rgbyN1 = FxaaTexTop(tex, pos.xy - dir1 * fxaaConsoleRcpFrameOpt.zw);
+ FxaaFloat4 rgbyP1 = FxaaTexTop(tex, pos.xy + dir1 * fxaaConsoleRcpFrameOpt.zw);
+/*--------------------------------------------------------------------------*/
+ FxaaFloat dirAbsMinTimesC = min(abs(dir1.x), abs(dir1.y)) * fxaaConsoleEdgeSharpness;
+ FxaaFloat2 dir2 = clamp(dir1.xy / dirAbsMinTimesC, -2.0, 2.0);
+/*--------------------------------------------------------------------------*/
+ FxaaFloat4 rgbyN2 = FxaaTexTop(tex, pos.xy - dir2 * fxaaConsoleRcpFrameOpt2.zw);
+ FxaaFloat4 rgbyP2 = FxaaTexTop(tex, pos.xy + dir2 * fxaaConsoleRcpFrameOpt2.zw);
+/*--------------------------------------------------------------------------*/
+ FxaaFloat4 rgbyA = rgbyN1 + rgbyP1;
+ FxaaFloat4 rgbyB = ((rgbyN2 + rgbyP2) * 0.25) + (rgbyA * 0.25);
+/*--------------------------------------------------------------------------*/
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ FxaaBool twoTap = (rgbyB.w < lumaMin) || (rgbyB.w > lumaMax);
+ #else
+ FxaaBool twoTap = (rgbyB.y < lumaMin) || (rgbyB.y > lumaMax);
+ #endif
+ if(twoTap) rgbyB.xyz = rgbyA.xyz * 0.5;
+ return rgbyB; }
+/*==========================================================================*/
+#endif
+
+
+
+/*============================================================================
+
+ FXAA3 CONSOLE - 360 PIXEL SHADER
+
+------------------------------------------------------------------------------
+This optimized version thanks to suggestions from Andy Luedke.
+Should be fully tex bound in all cases.
+As of the FXAA 3.11 release, I have still not tested this code,
+however I fixed a bug which was in both FXAA 3.9 and FXAA 3.10.
+And note this is replacing the old unoptimized version.
+If it does not work, please let me know so I can fix it.
+============================================================================*/
+#if (FXAA_360 == 1)
+/*--------------------------------------------------------------------------*/
+[reduceTempRegUsage(4)]
+float4 FxaaPixelShader(
+ // See FXAA Quality FxaaPixelShader() source for docs on Inputs!
+ FxaaFloat2 pos,
+ FxaaFloat4 fxaaConsolePosPos,
+ FxaaTex tex,
+ FxaaTex fxaaConsole360TexExpBiasNegOne,
+ FxaaTex fxaaConsole360TexExpBiasNegTwo,
+ FxaaFloat2 fxaaQualityRcpFrame,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt2,
+ FxaaFloat4 fxaaConsole360RcpFrameOpt2,
+ FxaaFloat fxaaQualitySubpix,
+ FxaaFloat fxaaQualityEdgeThreshold,
+ FxaaFloat fxaaQualityEdgeThresholdMin,
+ FxaaFloat fxaaConsoleEdgeSharpness,
+ FxaaFloat fxaaConsoleEdgeThreshold,
+ FxaaFloat fxaaConsoleEdgeThresholdMin,
+ FxaaFloat4 fxaaConsole360ConstDir
+) {
+/*--------------------------------------------------------------------------*/
+ float4 lumaNwNeSwSe;
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ asm {
+ tfetch2D lumaNwNeSwSe.w___, tex, pos.xy, OffsetX = -0.5, OffsetY = -0.5, UseComputedLOD=false
+ tfetch2D lumaNwNeSwSe._w__, tex, pos.xy, OffsetX = 0.5, OffsetY = -0.5, UseComputedLOD=false
+ tfetch2D lumaNwNeSwSe.__w_, tex, pos.xy, OffsetX = -0.5, OffsetY = 0.5, UseComputedLOD=false
+ tfetch2D lumaNwNeSwSe.___w, tex, pos.xy, OffsetX = 0.5, OffsetY = 0.5, UseComputedLOD=false
+ };
+ #else
+ asm {
+ tfetch2D lumaNwNeSwSe.y___, tex, pos.xy, OffsetX = -0.5, OffsetY = -0.5, UseComputedLOD=false
+ tfetch2D lumaNwNeSwSe._y__, tex, pos.xy, OffsetX = 0.5, OffsetY = -0.5, UseComputedLOD=false
+ tfetch2D lumaNwNeSwSe.__y_, tex, pos.xy, OffsetX = -0.5, OffsetY = 0.5, UseComputedLOD=false
+ tfetch2D lumaNwNeSwSe.___y, tex, pos.xy, OffsetX = 0.5, OffsetY = 0.5, UseComputedLOD=false
+ };
+ #endif
+/*--------------------------------------------------------------------------*/
+ lumaNwNeSwSe.y += 1.0/384.0;
+ float2 lumaMinTemp = min(lumaNwNeSwSe.xy, lumaNwNeSwSe.zw);
+ float2 lumaMaxTemp = max(lumaNwNeSwSe.xy, lumaNwNeSwSe.zw);
+ float lumaMin = min(lumaMinTemp.x, lumaMinTemp.y);
+ float lumaMax = max(lumaMaxTemp.x, lumaMaxTemp.y);
+/*--------------------------------------------------------------------------*/
+ float4 rgbyM = tex2Dlod(tex, float4(pos.xy, 0.0, 0.0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ float lumaMinM = min(lumaMin, rgbyM.w);
+ float lumaMaxM = max(lumaMax, rgbyM.w);
+ #else
+ float lumaMinM = min(lumaMin, rgbyM.y);
+ float lumaMaxM = max(lumaMax, rgbyM.y);
+ #endif
+ if((lumaMaxM - lumaMinM) < max(fxaaConsoleEdgeThresholdMin, lumaMax * fxaaConsoleEdgeThreshold)) return rgbyM;
+/*--------------------------------------------------------------------------*/
+ float2 dir;
+ dir.x = dot(lumaNwNeSwSe, fxaaConsole360ConstDir.yyxx);
+ dir.y = dot(lumaNwNeSwSe, fxaaConsole360ConstDir.xyxy);
+ dir = normalize(dir);
+/*--------------------------------------------------------------------------*/
+ float4 dir1 = dir.xyxy * fxaaConsoleRcpFrameOpt.xyzw;
+/*--------------------------------------------------------------------------*/
+ float4 dir2;
+ float dirAbsMinTimesC = min(abs(dir.x), abs(dir.y)) * fxaaConsoleEdgeSharpness;
+ dir2 = saturate(fxaaConsole360ConstDir.zzww * dir.xyxy / dirAbsMinTimesC + 0.5);
+ dir2 = dir2 * fxaaConsole360RcpFrameOpt2.xyxy + fxaaConsole360RcpFrameOpt2.zwzw;
+/*--------------------------------------------------------------------------*/
+ float4 rgbyN1 = tex2Dlod(fxaaConsole360TexExpBiasNegOne, float4(pos.xy + dir1.xy, 0.0, 0.0));
+ float4 rgbyP1 = tex2Dlod(fxaaConsole360TexExpBiasNegOne, float4(pos.xy + dir1.zw, 0.0, 0.0));
+ float4 rgbyN2 = tex2Dlod(fxaaConsole360TexExpBiasNegTwo, float4(pos.xy + dir2.xy, 0.0, 0.0));
+ float4 rgbyP2 = tex2Dlod(fxaaConsole360TexExpBiasNegTwo, float4(pos.xy + dir2.zw, 0.0, 0.0));
+/*--------------------------------------------------------------------------*/
+ float4 rgbyA = rgbyN1 + rgbyP1;
+ float4 rgbyB = rgbyN2 + rgbyP2 * 0.5 + rgbyA;
+/*--------------------------------------------------------------------------*/
+ float4 rgbyR = ((rgbyB.w - lumaMax) > 0.0) ? rgbyA : rgbyB;
+ rgbyR = ((rgbyB.w - lumaMin) > 0.0) ? rgbyR : rgbyA;
+ return rgbyR; }
+/*==========================================================================*/
+#endif
+
+
+
+/*============================================================================
+
+ FXAA3 CONSOLE - OPTIMIZED PS3 PIXEL SHADER (NO EARLY EXIT)
+
+==============================================================================
+The code below does not exactly match the assembly.
+I have a feeling that 12 cycles is possible, but was not able to get there.
+Might have to increase register count to get full performance.
+Note this shader does not use perspective interpolation.
+
+Use the following cgc options,
+
+ --fenable-bx2 --fastmath --fastprecision --nofloatbindings
+
+------------------------------------------------------------------------------
+ NVSHADERPERF OUTPUT
+------------------------------------------------------------------------------
+For reference and to aid in debug, output of NVShaderPerf should match this,
+
+Shader to schedule:
+ 0: texpkb h0.w(TRUE), v5.zyxx, #0
+ 2: addh h2.z(TRUE), h0.w, constant(0.001953, 0.000000, 0.000000, 0.000000).x
+ 4: texpkb h0.w(TRUE), v5.xwxx, #0
+ 6: addh h0.z(TRUE), -h2, h0.w
+ 7: texpkb h1.w(TRUE), v5, #0
+ 9: addh h0.x(TRUE), h0.z, -h1.w
+ 10: addh h3.w(TRUE), h0.z, h1
+ 11: texpkb h2.w(TRUE), v5.zwzz, #0
+ 13: addh h0.z(TRUE), h3.w, -h2.w
+ 14: addh h0.x(TRUE), h2.w, h0
+ 15: nrmh h1.xz(TRUE), h0_n
+ 16: minh_m8 h0.x(TRUE), |h1|, |h1.z|
+ 17: maxh h4.w(TRUE), h0, h1
+ 18: divx h2.xy(TRUE), h1_n.xzzw, h0_n
+ 19: movr r1.zw(TRUE), v4.xxxy
+ 20: madr r2.xz(TRUE), -h1, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w).zzww, r1.zzww
+ 22: minh h5.w(TRUE), h0, h1
+ 23: texpkb h0(TRUE), r2.xzxx, #0
+ 25: madr r0.zw(TRUE), h1.xzxz, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w), r1
+ 27: maxh h4.x(TRUE), h2.z, h2.w
+ 28: texpkb h1(TRUE), r0.zwzz, #0
+ 30: addh_d2 h1(TRUE), h0, h1
+ 31: madr r0.xy(TRUE), -h2, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w).xyxx, r1.zwzz
+ 33: texpkb h0(TRUE), r0, #0
+ 35: minh h4.z(TRUE), h2, h2.w
+ 36: fenct TRUE
+ 37: madr r1.xy(TRUE), h2, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w).xyxx, r1.zwzz
+ 39: texpkb h2(TRUE), r1, #0
+ 41: addh_d2 h0(TRUE), h0, h2
+ 42: maxh h2.w(TRUE), h4, h4.x
+ 43: minh h2.x(TRUE), h5.w, h4.z
+ 44: addh_d2 h0(TRUE), h0, h1
+ 45: slth h2.x(TRUE), h0.w, h2
+ 46: sgth h2.w(TRUE), h0, h2
+ 47: movh h0(TRUE), h0
+ 48: addx.c0 rc(TRUE), h2, h2.w
+ 49: movh h0(c0.NE.x), h1
+
+IPU0 ------ Simplified schedule: --------
+Pass | Unit | uOp | PC: Op
+-----+--------+------+-------------------------
+ 1 | SCT0/1 | mov | 0: TXLr h0.w, g[TEX1].zyxx, const.xxxx, TEX0;
+ | TEX | txl | 0: TXLr h0.w, g[TEX1].zyxx, const.xxxx, TEX0;
+ | SCB1 | add | 2: ADDh h2.z, h0.--w-, const.--x-;
+ | | |
+ 2 | SCT0/1 | mov | 4: TXLr h0.w, g[TEX1].xwxx, const.xxxx, TEX0;
+ | TEX | txl | 4: TXLr h0.w, g[TEX1].xwxx, const.xxxx, TEX0;
+ | SCB1 | add | 6: ADDh h0.z,-h2, h0.--w-;
+ | | |
+ 3 | SCT0/1 | mov | 7: TXLr h1.w, g[TEX1], const.xxxx, TEX0;
+ | TEX | txl | 7: TXLr h1.w, g[TEX1], const.xxxx, TEX0;
+ | SCB0 | add | 9: ADDh h0.x, h0.z---,-h1.w---;
+ | SCB1 | add | 10: ADDh h3.w, h0.---z, h1;
+ | | |
+ 4 | SCT0/1 | mov | 11: TXLr h2.w, g[TEX1].zwzz, const.xxxx, TEX0;
+ | TEX | txl | 11: TXLr h2.w, g[TEX1].zwzz, const.xxxx, TEX0;
+ | SCB0 | add | 14: ADDh h0.x, h2.w---, h0;
+ | SCB1 | add | 13: ADDh h0.z, h3.--w-,-h2.--w-;
+ | | |
+ 5 | SCT1 | mov | 15: NRMh h1.xz, h0;
+ | SRB | nrm | 15: NRMh h1.xz, h0;
+ | SCB0 | min | 16: MINh*8 h0.x, |h1|, |h1.z---|;
+ | SCB1 | max | 17: MAXh h4.w, h0, h1;
+ | | |
+ 6 | SCT0 | div | 18: DIVx h2.xy, h1.xz--, h0;
+ | SCT1 | mov | 19: MOVr r1.zw, g[TEX0].--xy;
+ | SCB0 | mad | 20: MADr r2.xz,-h1, const.z-w-, r1.z-w-;
+ | SCB1 | min | 22: MINh h5.w, h0, h1;
+ | | |
+ 7 | SCT0/1 | mov | 23: TXLr h0, r2.xzxx, const.xxxx, TEX0;
+ | TEX | txl | 23: TXLr h0, r2.xzxx, const.xxxx, TEX0;
+ | SCB0 | max | 27: MAXh h4.x, h2.z---, h2.w---;
+ | SCB1 | mad | 25: MADr r0.zw, h1.--xz, const, r1;
+ | | |
+ 8 | SCT0/1 | mov | 28: TXLr h1, r0.zwzz, const.xxxx, TEX0;
+ | TEX | txl | 28: TXLr h1, r0.zwzz, const.xxxx, TEX0;
+ | SCB0/1 | add | 30: ADDh/2 h1, h0, h1;
+ | | |
+ 9 | SCT0 | mad | 31: MADr r0.xy,-h2, const.xy--, r1.zw--;
+ | SCT1 | mov | 33: TXLr h0, r0, const.zzzz, TEX0;
+ | TEX | txl | 33: TXLr h0, r0, const.zzzz, TEX0;
+ | SCB1 | min | 35: MINh h4.z, h2, h2.--w-;
+ | | |
+ 10 | SCT0 | mad | 37: MADr r1.xy, h2, const.xy--, r1.zw--;
+ | SCT1 | mov | 39: TXLr h2, r1, const.zzzz, TEX0;
+ | TEX | txl | 39: TXLr h2, r1, const.zzzz, TEX0;
+ | SCB0/1 | add | 41: ADDh/2 h0, h0, h2;
+ | | |
+ 11 | SCT0 | min | 43: MINh h2.x, h5.w---, h4.z---;
+ | SCT1 | max | 42: MAXh h2.w, h4, h4.---x;
+ | SCB0/1 | add | 44: ADDh/2 h0, h0, h1;
+ | | |
+ 12 | SCT0 | set | 45: SLTh h2.x, h0.w---, h2;
+ | SCT1 | set | 46: SGTh h2.w, h0, h2;
+ | SCB0/1 | mul | 47: MOVh h0, h0;
+ | | |
+ 13 | SCT0 | mad | 48: ADDxc0_s rc, h2, h2.w---;
+ | SCB0/1 | mul | 49: MOVh h0(NE0.xxxx), h1;
+
+Pass SCT TEX SCB
+ 1: 0% 100% 25%
+ 2: 0% 100% 25%
+ 3: 0% 100% 50%
+ 4: 0% 100% 50%
+ 5: 0% 0% 50%
+ 6: 100% 0% 75%
+ 7: 0% 100% 75%
+ 8: 0% 100% 100%
+ 9: 0% 100% 25%
+ 10: 0% 100% 100%
+ 11: 50% 0% 100%
+ 12: 50% 0% 100%
+ 13: 25% 0% 100%
+
+MEAN: 17% 61% 67%
+
+Pass SCT0 SCT1 TEX SCB0 SCB1
+ 1: 0% 0% 100% 0% 100%
+ 2: 0% 0% 100% 0% 100%
+ 3: 0% 0% 100% 100% 100%
+ 4: 0% 0% 100% 100% 100%
+ 5: 0% 0% 0% 100% 100%
+ 6: 100% 100% 0% 100% 100%
+ 7: 0% 0% 100% 100% 100%
+ 8: 0% 0% 100% 100% 100%
+ 9: 0% 0% 100% 0% 100%
+ 10: 0% 0% 100% 100% 100%
+ 11: 100% 100% 0% 100% 100%
+ 12: 100% 100% 0% 100% 100%
+ 13: 100% 0% 0% 100% 100%
+
+MEAN: 30% 23% 61% 76% 100%
+Fragment Performance Setup: Driver RSX Compiler, GPU RSX, Flags 0x5
+Results 13 cycles, 3 r regs, 923,076,923 pixels/s
+============================================================================*/
+#if (FXAA_PS3 == 1) && (FXAA_EARLY_EXIT == 0)
+/*--------------------------------------------------------------------------*/
+#pragma regcount 7
+#pragma disablepc all
+#pragma option O3
+#pragma option OutColorPrec=fp16
+#pragma texformat default RGBA8
+/*==========================================================================*/
+half4 FxaaPixelShader(
+ // See FXAA Quality FxaaPixelShader() source for docs on Inputs!
+ FxaaFloat2 pos,
+ FxaaFloat4 fxaaConsolePosPos,
+ FxaaTex tex,
+ FxaaTex fxaaConsole360TexExpBiasNegOne,
+ FxaaTex fxaaConsole360TexExpBiasNegTwo,
+ FxaaFloat2 fxaaQualityRcpFrame,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt2,
+ FxaaFloat4 fxaaConsole360RcpFrameOpt2,
+ FxaaFloat fxaaQualitySubpix,
+ FxaaFloat fxaaQualityEdgeThreshold,
+ FxaaFloat fxaaQualityEdgeThresholdMin,
+ FxaaFloat fxaaConsoleEdgeSharpness,
+ FxaaFloat fxaaConsoleEdgeThreshold,
+ FxaaFloat fxaaConsoleEdgeThresholdMin,
+ FxaaFloat4 fxaaConsole360ConstDir
+) {
+/*--------------------------------------------------------------------------*/
+// (1)
+ half4 dir;
+ half4 lumaNe = h4tex2Dlod(tex, half4(fxaaConsolePosPos.zy, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ lumaNe.w += half(1.0/512.0);
+ dir.x = -lumaNe.w;
+ dir.z = -lumaNe.w;
+ #else
+ lumaNe.y += half(1.0/512.0);
+ dir.x = -lumaNe.y;
+ dir.z = -lumaNe.y;
+ #endif
+/*--------------------------------------------------------------------------*/
+// (2)
+ half4 lumaSw = h4tex2Dlod(tex, half4(fxaaConsolePosPos.xw, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ dir.x += lumaSw.w;
+ dir.z += lumaSw.w;
+ #else
+ dir.x += lumaSw.y;
+ dir.z += lumaSw.y;
+ #endif
+/*--------------------------------------------------------------------------*/
+// (3)
+ half4 lumaNw = h4tex2Dlod(tex, half4(fxaaConsolePosPos.xy, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ dir.x -= lumaNw.w;
+ dir.z += lumaNw.w;
+ #else
+ dir.x -= lumaNw.y;
+ dir.z += lumaNw.y;
+ #endif
+/*--------------------------------------------------------------------------*/
+// (4)
+ half4 lumaSe = h4tex2Dlod(tex, half4(fxaaConsolePosPos.zw, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ dir.x += lumaSe.w;
+ dir.z -= lumaSe.w;
+ #else
+ dir.x += lumaSe.y;
+ dir.z -= lumaSe.y;
+ #endif
+/*--------------------------------------------------------------------------*/
+// (5)
+ half4 dir1_pos;
+ dir1_pos.xy = normalize(dir.xyz).xz;
+ half dirAbsMinTimesC = min(abs(dir1_pos.x), abs(dir1_pos.y)) * half(FXAA_CONSOLE__PS3_EDGE_SHARPNESS);
+/*--------------------------------------------------------------------------*/
+// (6)
+ half4 dir2_pos;
+ dir2_pos.xy = clamp(dir1_pos.xy / dirAbsMinTimesC, half(-2.0), half(2.0));
+ dir1_pos.zw = pos.xy;
+ dir2_pos.zw = pos.xy;
+ half4 temp1N;
+ temp1N.xy = dir1_pos.zw - dir1_pos.xy * fxaaConsoleRcpFrameOpt.zw;
+/*--------------------------------------------------------------------------*/
+// (7)
+ temp1N = h4tex2Dlod(tex, half4(temp1N.xy, 0.0, 0.0));
+ half4 rgby1;
+ rgby1.xy = dir1_pos.zw + dir1_pos.xy * fxaaConsoleRcpFrameOpt.zw;
+/*--------------------------------------------------------------------------*/
+// (8)
+ rgby1 = h4tex2Dlod(tex, half4(rgby1.xy, 0.0, 0.0));
+ rgby1 = (temp1N + rgby1) * 0.5;
+/*--------------------------------------------------------------------------*/
+// (9)
+ half4 temp2N;
+ temp2N.xy = dir2_pos.zw - dir2_pos.xy * fxaaConsoleRcpFrameOpt2.zw;
+ temp2N = h4tex2Dlod(tex, half4(temp2N.xy, 0.0, 0.0));
+/*--------------------------------------------------------------------------*/
+// (10)
+ half4 rgby2;
+ rgby2.xy = dir2_pos.zw + dir2_pos.xy * fxaaConsoleRcpFrameOpt2.zw;
+ rgby2 = h4tex2Dlod(tex, half4(rgby2.xy, 0.0, 0.0));
+ rgby2 = (temp2N + rgby2) * 0.5;
+/*--------------------------------------------------------------------------*/
+// (11)
+ // compilier moves these scalar ops up to other cycles
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ half lumaMin = min(min(lumaNw.w, lumaSw.w), min(lumaNe.w, lumaSe.w));
+ half lumaMax = max(max(lumaNw.w, lumaSw.w), max(lumaNe.w, lumaSe.w));
+ #else
+ half lumaMin = min(min(lumaNw.y, lumaSw.y), min(lumaNe.y, lumaSe.y));
+ half lumaMax = max(max(lumaNw.y, lumaSw.y), max(lumaNe.y, lumaSe.y));
+ #endif
+ rgby2 = (rgby2 + rgby1) * 0.5;
+/*--------------------------------------------------------------------------*/
+// (12)
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ bool twoTapLt = rgby2.w < lumaMin;
+ bool twoTapGt = rgby2.w > lumaMax;
+ #else
+ bool twoTapLt = rgby2.y < lumaMin;
+ bool twoTapGt = rgby2.y > lumaMax;
+ #endif
+/*--------------------------------------------------------------------------*/
+// (13)
+ if(twoTapLt || twoTapGt) rgby2 = rgby1;
+/*--------------------------------------------------------------------------*/
+ return rgby2; }
+/*==========================================================================*/
+#endif
+
+
+
+/*============================================================================
+
+ FXAA3 CONSOLE - OPTIMIZED PS3 PIXEL SHADER (WITH EARLY EXIT)
+
+==============================================================================
+The code mostly matches the assembly.
+I have a feeling that 14 cycles is possible, but was not able to get there.
+Might have to increase register count to get full performance.
+Note this shader does not use perspective interpolation.
+
+Use the following cgc options,
+
+ --fenable-bx2 --fastmath --fastprecision --nofloatbindings
+
+Use of FXAA_GREEN_AS_LUMA currently adds a cycle (16 clks).
+Will look at fixing this for FXAA 3.12.
+------------------------------------------------------------------------------
+ NVSHADERPERF OUTPUT
+------------------------------------------------------------------------------
+For reference and to aid in debug, output of NVShaderPerf should match this,
+
+Shader to schedule:
+ 0: texpkb h0.w(TRUE), v5.zyxx, #0
+ 2: addh h2.y(TRUE), h0.w, constant(0.001953, 0.000000, 0.000000, 0.000000).x
+ 4: texpkb h1.w(TRUE), v5.xwxx, #0
+ 6: addh h0.x(TRUE), h1.w, -h2.y
+ 7: texpkb h2.w(TRUE), v5.zwzz, #0
+ 9: minh h4.w(TRUE), h2.y, h2
+ 10: maxh h5.x(TRUE), h2.y, h2.w
+ 11: texpkb h0.w(TRUE), v5, #0
+ 13: addh h3.w(TRUE), -h0, h0.x
+ 14: addh h0.x(TRUE), h0.w, h0
+ 15: addh h0.z(TRUE), -h2.w, h0.x
+ 16: addh h0.x(TRUE), h2.w, h3.w
+ 17: minh h5.y(TRUE), h0.w, h1.w
+ 18: nrmh h2.xz(TRUE), h0_n
+ 19: minh_m8 h2.w(TRUE), |h2.x|, |h2.z|
+ 20: divx h4.xy(TRUE), h2_n.xzzw, h2_n.w
+ 21: movr r1.zw(TRUE), v4.xxxy
+ 22: maxh h2.w(TRUE), h0, h1
+ 23: fenct TRUE
+ 24: madr r0.xy(TRUE), -h2.xzzw, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w).zwzz, r1.zwzz
+ 26: texpkb h0(TRUE), r0, #0
+ 28: maxh h5.x(TRUE), h2.w, h5
+ 29: minh h5.w(TRUE), h5.y, h4
+ 30: madr r1.xy(TRUE), h2.xzzw, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w).zwzz, r1.zwzz
+ 32: texpkb h2(TRUE), r1, #0
+ 34: addh_d2 h2(TRUE), h0, h2
+ 35: texpkb h1(TRUE), v4, #0
+ 37: maxh h5.y(TRUE), h5.x, h1.w
+ 38: minh h4.w(TRUE), h1, h5
+ 39: madr r0.xy(TRUE), -h4, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w).xyxx, r1.zwzz
+ 41: texpkb h0(TRUE), r0, #0
+ 43: addh_m8 h5.z(TRUE), h5.y, -h4.w
+ 44: madr r2.xy(TRUE), h4, constant(cConst5.x, cConst5.y, cConst5.z, cConst5.w).xyxx, r1.zwzz
+ 46: texpkb h3(TRUE), r2, #0
+ 48: addh_d2 h0(TRUE), h0, h3
+ 49: addh_d2 h3(TRUE), h0, h2
+ 50: movh h0(TRUE), h3
+ 51: slth h3.x(TRUE), h3.w, h5.w
+ 52: sgth h3.w(TRUE), h3, h5.x
+ 53: addx.c0 rc(TRUE), h3.x, h3
+ 54: slth.c0 rc(TRUE), h5.z, h5
+ 55: movh h0(c0.NE.w), h2
+ 56: movh h0(c0.NE.x), h1
+
+IPU0 ------ Simplified schedule: --------
+Pass | Unit | uOp | PC: Op
+-----+--------+------+-------------------------
+ 1 | SCT0/1 | mov | 0: TXLr h0.w, g[TEX1].zyxx, const.xxxx, TEX0;
+ | TEX | txl | 0: TXLr h0.w, g[TEX1].zyxx, const.xxxx, TEX0;
+ | SCB0 | add | 2: ADDh h2.y, h0.-w--, const.-x--;
+ | | |
+ 2 | SCT0/1 | mov | 4: TXLr h1.w, g[TEX1].xwxx, const.xxxx, TEX0;
+ | TEX | txl | 4: TXLr h1.w, g[TEX1].xwxx, const.xxxx, TEX0;
+ | SCB0 | add | 6: ADDh h0.x, h1.w---,-h2.y---;
+ | | |
+ 3 | SCT0/1 | mov | 7: TXLr h2.w, g[TEX1].zwzz, const.xxxx, TEX0;
+ | TEX | txl | 7: TXLr h2.w, g[TEX1].zwzz, const.xxxx, TEX0;
+ | SCB0 | max | 10: MAXh h5.x, h2.y---, h2.w---;
+ | SCB1 | min | 9: MINh h4.w, h2.---y, h2;
+ | | |
+ 4 | SCT0/1 | mov | 11: TXLr h0.w, g[TEX1], const.xxxx, TEX0;
+ | TEX | txl | 11: TXLr h0.w, g[TEX1], const.xxxx, TEX0;
+ | SCB0 | add | 14: ADDh h0.x, h0.w---, h0;
+ | SCB1 | add | 13: ADDh h3.w,-h0, h0.---x;
+ | | |
+ 5 | SCT0 | mad | 16: ADDh h0.x, h2.w---, h3.w---;
+ | SCT1 | mad | 15: ADDh h0.z,-h2.--w-, h0.--x-;
+ | SCB0 | min | 17: MINh h5.y, h0.-w--, h1.-w--;
+ | | |
+ 6 | SCT1 | mov | 18: NRMh h2.xz, h0;
+ | SRB | nrm | 18: NRMh h2.xz, h0;
+ | SCB1 | min | 19: MINh*8 h2.w, |h2.---x|, |h2.---z|;
+ | | |
+ 7 | SCT0 | div | 20: DIVx h4.xy, h2.xz--, h2.ww--;
+ | SCT1 | mov | 21: MOVr r1.zw, g[TEX0].--xy;
+ | SCB1 | max | 22: MAXh h2.w, h0, h1;
+ | | |
+ 8 | SCT0 | mad | 24: MADr r0.xy,-h2.xz--, const.zw--, r1.zw--;
+ | SCT1 | mov | 26: TXLr h0, r0, const.xxxx, TEX0;
+ | TEX | txl | 26: TXLr h0, r0, const.xxxx, TEX0;
+ | SCB0 | max | 28: MAXh h5.x, h2.w---, h5;
+ | SCB1 | min | 29: MINh h5.w, h5.---y, h4;
+ | | |
+ 9 | SCT0 | mad | 30: MADr r1.xy, h2.xz--, const.zw--, r1.zw--;
+ | SCT1 | mov | 32: TXLr h2, r1, const.xxxx, TEX0;
+ | TEX | txl | 32: TXLr h2, r1, const.xxxx, TEX0;
+ | SCB0/1 | add | 34: ADDh/2 h2, h0, h2;
+ | | |
+ 10 | SCT0/1 | mov | 35: TXLr h1, g[TEX0], const.xxxx, TEX0;
+ | TEX | txl | 35: TXLr h1, g[TEX0], const.xxxx, TEX0;
+ | SCB0 | max | 37: MAXh h5.y, h5.-x--, h1.-w--;
+ | SCB1 | min | 38: MINh h4.w, h1, h5;
+ | | |
+ 11 | SCT0 | mad | 39: MADr r0.xy,-h4, const.xy--, r1.zw--;
+ | SCT1 | mov | 41: TXLr h0, r0, const.zzzz, TEX0;
+ | TEX | txl | 41: TXLr h0, r0, const.zzzz, TEX0;
+ | SCB0 | mad | 44: MADr r2.xy, h4, const.xy--, r1.zw--;
+ | SCB1 | add | 43: ADDh*8 h5.z, h5.--y-,-h4.--w-;
+ | | |
+ 12 | SCT0/1 | mov | 46: TXLr h3, r2, const.xxxx, TEX0;
+ | TEX | txl | 46: TXLr h3, r2, const.xxxx, TEX0;
+ | SCB0/1 | add | 48: ADDh/2 h0, h0, h3;
+ | | |
+ 13 | SCT0/1 | mad | 49: ADDh/2 h3, h0, h2;
+ | SCB0/1 | mul | 50: MOVh h0, h3;
+ | | |
+ 14 | SCT0 | set | 51: SLTh h3.x, h3.w---, h5.w---;
+ | SCT1 | set | 52: SGTh h3.w, h3, h5.---x;
+ | SCB0 | set | 54: SLThc0 rc, h5.z---, h5;
+ | SCB1 | add | 53: ADDxc0_s rc, h3.---x, h3;
+ | | |
+ 15 | SCT0/1 | mul | 55: MOVh h0(NE0.wwww), h2;
+ | SCB0/1 | mul | 56: MOVh h0(NE0.xxxx), h1;
+
+Pass SCT TEX SCB
+ 1: 0% 100% 25%
+ 2: 0% 100% 25%
+ 3: 0% 100% 50%
+ 4: 0% 100% 50%
+ 5: 50% 0% 25%
+ 6: 0% 0% 25%
+ 7: 100% 0% 25%
+ 8: 0% 100% 50%
+ 9: 0% 100% 100%
+ 10: 0% 100% 50%
+ 11: 0% 100% 75%
+ 12: 0% 100% 100%
+ 13: 100% 0% 100%
+ 14: 50% 0% 50%
+ 15: 100% 0% 100%
+
+MEAN: 26% 60% 56%
+
+Pass SCT0 SCT1 TEX SCB0 SCB1
+ 1: 0% 0% 100% 100% 0%
+ 2: 0% 0% 100% 100% 0%
+ 3: 0% 0% 100% 100% 100%
+ 4: 0% 0% 100% 100% 100%
+ 5: 100% 100% 0% 100% 0%
+ 6: 0% 0% 0% 0% 100%
+ 7: 100% 100% 0% 0% 100%
+ 8: 0% 0% 100% 100% 100%
+ 9: 0% 0% 100% 100% 100%
+ 10: 0% 0% 100% 100% 100%
+ 11: 0% 0% 100% 100% 100%
+ 12: 0% 0% 100% 100% 100%
+ 13: 100% 100% 0% 100% 100%
+ 14: 100% 100% 0% 100% 100%
+ 15: 100% 100% 0% 100% 100%
+
+MEAN: 33% 33% 60% 86% 80%
+Fragment Performance Setup: Driver RSX Compiler, GPU RSX, Flags 0x5
+Results 15 cycles, 3 r regs, 800,000,000 pixels/s
+============================================================================*/
+#if (FXAA_PS3 == 1) && (FXAA_EARLY_EXIT == 1)
+/*--------------------------------------------------------------------------*/
+#pragma regcount 7
+#pragma disablepc all
+#pragma option O2
+#pragma option OutColorPrec=fp16
+#pragma texformat default RGBA8
+/*==========================================================================*/
+half4 FxaaPixelShader(
+ // See FXAA Quality FxaaPixelShader() source for docs on Inputs!
+ FxaaFloat2 pos,
+ FxaaFloat4 fxaaConsolePosPos,
+ FxaaTex tex,
+ FxaaTex fxaaConsole360TexExpBiasNegOne,
+ FxaaTex fxaaConsole360TexExpBiasNegTwo,
+ FxaaFloat2 fxaaQualityRcpFrame,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt,
+ FxaaFloat4 fxaaConsoleRcpFrameOpt2,
+ FxaaFloat4 fxaaConsole360RcpFrameOpt2,
+ FxaaFloat fxaaQualitySubpix,
+ FxaaFloat fxaaQualityEdgeThreshold,
+ FxaaFloat fxaaQualityEdgeThresholdMin,
+ FxaaFloat fxaaConsoleEdgeSharpness,
+ FxaaFloat fxaaConsoleEdgeThreshold,
+ FxaaFloat fxaaConsoleEdgeThresholdMin,
+ FxaaFloat4 fxaaConsole360ConstDir
+) {
+/*--------------------------------------------------------------------------*/
+// (1)
+ half4 rgbyNe = h4tex2Dlod(tex, half4(fxaaConsolePosPos.zy, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ half lumaNe = rgbyNe.w + half(1.0/512.0);
+ #else
+ half lumaNe = rgbyNe.y + half(1.0/512.0);
+ #endif
+/*--------------------------------------------------------------------------*/
+// (2)
+ half4 lumaSw = h4tex2Dlod(tex, half4(fxaaConsolePosPos.xw, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ half lumaSwNegNe = lumaSw.w - lumaNe;
+ #else
+ half lumaSwNegNe = lumaSw.y - lumaNe;
+ #endif
+/*--------------------------------------------------------------------------*/
+// (3)
+ half4 lumaNw = h4tex2Dlod(tex, half4(fxaaConsolePosPos.xy, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ half lumaMaxNwSw = max(lumaNw.w, lumaSw.w);
+ half lumaMinNwSw = min(lumaNw.w, lumaSw.w);
+ #else
+ half lumaMaxNwSw = max(lumaNw.y, lumaSw.y);
+ half lumaMinNwSw = min(lumaNw.y, lumaSw.y);
+ #endif
+/*--------------------------------------------------------------------------*/
+// (4)
+ half4 lumaSe = h4tex2Dlod(tex, half4(fxaaConsolePosPos.zw, 0, 0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ half dirZ = lumaNw.w + lumaSwNegNe;
+ half dirX = -lumaNw.w + lumaSwNegNe;
+ #else
+ half dirZ = lumaNw.y + lumaSwNegNe;
+ half dirX = -lumaNw.y + lumaSwNegNe;
+ #endif
+/*--------------------------------------------------------------------------*/
+// (5)
+ half3 dir;
+ dir.y = 0.0;
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ dir.x = lumaSe.w + dirX;
+ dir.z = -lumaSe.w + dirZ;
+ half lumaMinNeSe = min(lumaNe, lumaSe.w);
+ #else
+ dir.x = lumaSe.y + dirX;
+ dir.z = -lumaSe.y + dirZ;
+ half lumaMinNeSe = min(lumaNe, lumaSe.y);
+ #endif
+/*--------------------------------------------------------------------------*/
+// (6)
+ half4 dir1_pos;
+ dir1_pos.xy = normalize(dir).xz;
+ half dirAbsMinTimes8 = min(abs(dir1_pos.x), abs(dir1_pos.y)) * half(FXAA_CONSOLE__PS3_EDGE_SHARPNESS);
+/*--------------------------------------------------------------------------*/
+// (7)
+ half4 dir2_pos;
+ dir2_pos.xy = clamp(dir1_pos.xy / dirAbsMinTimes8, half(-2.0), half(2.0));
+ dir1_pos.zw = pos.xy;
+ dir2_pos.zw = pos.xy;
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ half lumaMaxNeSe = max(lumaNe, lumaSe.w);
+ #else
+ half lumaMaxNeSe = max(lumaNe, lumaSe.y);
+ #endif
+/*--------------------------------------------------------------------------*/
+// (8)
+ half4 temp1N;
+ temp1N.xy = dir1_pos.zw - dir1_pos.xy * fxaaConsoleRcpFrameOpt.zw;
+ temp1N = h4tex2Dlod(tex, half4(temp1N.xy, 0.0, 0.0));
+ half lumaMax = max(lumaMaxNwSw, lumaMaxNeSe);
+ half lumaMin = min(lumaMinNwSw, lumaMinNeSe);
+/*--------------------------------------------------------------------------*/
+// (9)
+ half4 rgby1;
+ rgby1.xy = dir1_pos.zw + dir1_pos.xy * fxaaConsoleRcpFrameOpt.zw;
+ rgby1 = h4tex2Dlod(tex, half4(rgby1.xy, 0.0, 0.0));
+ rgby1 = (temp1N + rgby1) * 0.5;
+/*--------------------------------------------------------------------------*/
+// (10)
+ half4 rgbyM = h4tex2Dlod(tex, half4(pos.xy, 0.0, 0.0));
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ half lumaMaxM = max(lumaMax, rgbyM.w);
+ half lumaMinM = min(lumaMin, rgbyM.w);
+ #else
+ half lumaMaxM = max(lumaMax, rgbyM.y);
+ half lumaMinM = min(lumaMin, rgbyM.y);
+ #endif
+/*--------------------------------------------------------------------------*/
+// (11)
+ half4 temp2N;
+ temp2N.xy = dir2_pos.zw - dir2_pos.xy * fxaaConsoleRcpFrameOpt2.zw;
+ temp2N = h4tex2Dlod(tex, half4(temp2N.xy, 0.0, 0.0));
+ half4 rgby2;
+ rgby2.xy = dir2_pos.zw + dir2_pos.xy * fxaaConsoleRcpFrameOpt2.zw;
+ half lumaRangeM = (lumaMaxM - lumaMinM) / FXAA_CONSOLE__PS3_EDGE_THRESHOLD;
+/*--------------------------------------------------------------------------*/
+// (12)
+ rgby2 = h4tex2Dlod(tex, half4(rgby2.xy, 0.0, 0.0));
+ rgby2 = (temp2N + rgby2) * 0.5;
+/*--------------------------------------------------------------------------*/
+// (13)
+ rgby2 = (rgby2 + rgby1) * 0.5;
+/*--------------------------------------------------------------------------*/
+// (14)
+ #if (FXAA_GREEN_AS_LUMA == 0)
+ bool twoTapLt = rgby2.w < lumaMin;
+ bool twoTapGt = rgby2.w > lumaMax;
+ #else
+ bool twoTapLt = rgby2.y < lumaMin;
+ bool twoTapGt = rgby2.y > lumaMax;
+ #endif
+ bool earlyExit = lumaRangeM < lumaMax;
+ bool twoTap = twoTapLt || twoTapGt;
+/*--------------------------------------------------------------------------*/
+// (15)
+ if(twoTap) rgby2 = rgby1;
+ if(earlyExit) rgby2 = rgbyM;
+/*--------------------------------------------------------------------------*/
+ return rgby2; }
+/*==========================================================================*/
+#endif
+
+uniform sampler2D diffuseMap;
+
+uniform vec2 rcp_screen_res;
+uniform vec4 rcp_frame_opt;
+uniform vec4 rcp_frame_opt2;
+uniform vec2 screen_res;
+VARYING vec2 vary_fragcoord;
+VARYING vec2 vary_tc;
+
+void main()
+{
+ vec4 diff = FxaaPixelShader(vary_tc, //pos
+ vec4(vary_fragcoord.xy, 0, 0), //fxaaConsolePosPos
+ diffuseMap, //tex
+ diffuseMap,
+ diffuseMap,
+ rcp_screen_res, //fxaaQualityRcpFrame
+ vec4(0,0,0,0), //fxaaConsoleRcpFrameOpt
+ rcp_frame_opt, //fxaaConsoleRcpFrameOpt2
+ rcp_frame_opt2, //fxaaConsole360RcpFrameOpt2
+ 0.75, //fxaaQualitySubpix
+ 0.07, //fxaaQualityEdgeThreshold
+ 0.03, //fxaaQualityEdgeThresholdMin
+ 8.0, //fxaaConsoleEdgeSharpness
+ 0.125, //fxaaConsoleEdgeThreshold
+ 0.05, //fxaaConsoleEdgeThresholdMin
+ vec4(0,0,0,0)); //fxaaConsole360ConstDir
+
+
+
+ //diff = texture2D(diffuseMap, vary_tc);
+
+ gl_FragColor = diff;
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
index 41c149e774..29ca80ae92 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl
@@ -2,13 +2,33 @@
* @file giF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
uniform sampler2D noiseMap;
@@ -20,7 +40,7 @@ uniform sampler2D depthGIMap;
uniform sampler2D lightFunc;
// Inputs
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
@@ -164,5 +184,5 @@ void main()
vec3 norm = texture2DRect(normalMap, pos_screen).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- gl_FragData[0].xyz = giAmbient(pos, norm);
+ gl_FragColor.xyz = giAmbient(pos, norm);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/giV.glsl b/indra/newview/app_settings/shaders/class1/deferred/giV.glsl
index e86f2896da..e5d3bb8ea6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/giV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/giV.glsl
@@ -2,23 +2,47 @@
* @file giV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
-varying vec2 vary_fragcoord;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
+
vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
- vec4 tex = gl_MultiTexCoord0;
+ vec4 tex = vec4(texcoord0,0,1);
tex.w = 1.0;
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index fa811f0d55..a44173a2a4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -1,20 +1,51 @@
/**
* @file impostorF.glsl
*
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
+
+uniform float minimum_alpha;
uniform sampler2D diffuseMap;
uniform sampler2D normalMap;
uniform sampler2D specularMap;
+VARYING vec2 vary_texcoord0;
+
void main()
{
- vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
+
+ if (col.a < minimum_alpha)
+ {
+ discard;
+ }
+
gl_FragData[0] = vec4(col.rgb, col.a * 0.005);
- gl_FragData[1] = texture2D(specularMap, gl_TexCoord[0].xy);
- gl_FragData[2] = vec4(texture2D(normalMap, gl_TexCoord[0].xy).xyz, 0.0);
+ gl_FragData[1] = texture2D(specularMap, vary_texcoord0.xy);
+ gl_FragData[2] = vec4(texture2D(normalMap, vary_texcoord0.xy).xyz, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
index 723777bd3a..42266e9378 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
@@ -2,16 +2,38 @@
* @file impostorV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_texcoord0;
void main()
{
//transform vertex
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
- gl_FrontColor = gl_Color;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
index 25e93ae266..e014a14ad8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
@@ -2,14 +2,34 @@
* @file luminanceF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
-
+
uniform sampler2DRect diffuseMap;
-varying vec2 vary_fragcoord;
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec2 vary_fragcoord;
void main()
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl
index 4baf1fc65a..f2dc60aa5d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl
@@ -2,22 +2,44 @@
* @file giV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
-
-
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
+VARYING vec4 vertex_color;
uniform vec2 screen_res;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
+
vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index 3c5c780d94..179c721a2f 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -2,13 +2,33 @@
* @file multiPointLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect depthMap;
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
@@ -27,7 +47,7 @@ uniform int light_count;
uniform vec4 light[MAX_LIGHT_COUNT];
uniform vec4 light_col[MAX_LIGHT_COUNT];
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform float far_z;
@@ -106,7 +126,7 @@ void main()
if (sa > 0.0)
{
- sa = texture2D(lightFunc,vec2(sa, spec.a)).a * min(dist_atten*4.0, 1.0);
+ sa = texture2D(lightFunc,vec2(sa, spec.a)).r * min(dist_atten*4.0, 1.0);
sa *= noise;
col += da*sa*light_col[i].rgb*spec.rgb;
}
@@ -123,6 +143,4 @@ void main()
gl_FragColor.rgb = out_col;
gl_FragColor.a = 0.0;
-
- //gl_FragColor = vec4(0.1, 0.025, 0.025/4.0, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl
deleted file mode 100644
index 6c43679acf..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightMSF.glsl
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * @file multiPointLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS depthMap;
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS normalMap;
-uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
-
-
-uniform vec3 env_mat[3];
-uniform float sun_wash;
-
-uniform int light_count;
-
-#define MAX_LIGHT_COUNT 16
-uniform vec4 light[MAX_LIGHT_COUNT];
-uniform vec4 light_col[MAX_LIGHT_COUNT];
-
-varying vec4 vary_fragcoord;
-uniform vec2 screen_res;
-
-uniform float far_z;
-
-uniform mat4 inv_proj;
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = vec2(pos_screen.xy)*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-void main()
-{
- vec2 frag = (vary_fragcoord.xy*0.5+0.5)*screen_res;
- ivec2 itc = ivec2(frag);
-
- int wght = 0;
- vec3 fcol = vec3(0,0,0);
-
- for (int s = 0; s < samples; ++s)
- {
- vec3 pos = getPosition(itc, s).xyz;
- if (pos.z >= far_z)
- {
- vec3 norm = texelFetch(normalMap, itc, s).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- norm = normalize(norm);
- vec4 spec = texelFetch(specularRect, itc, s);
- vec3 diff = texelFetch(diffuseRect, itc, s).rgb;
- float noise = texture2D(noiseMap, frag.xy/128.0).b;
- vec3 out_col = vec3(0,0,0);
- vec3 npos = normalize(-pos);
-
- // As of OSX 10.6.7 ATI Apple's crash when using a variable size loop
- for (int i = 0; i < MAX_LIGHT_COUNT; ++i)
- {
- bool light_contrib = (i < light_count);
-
- vec3 lv = light[i].xyz-pos;
- float dist2 = dot(lv,lv);
- dist2 /= light[i].w;
- if (dist2 > 1.0)
- {
- light_contrib = false;
- }
-
- float da = dot(norm, lv);
- if (da < 0.0)
- {
- light_contrib = false;
- }
-
- if (light_contrib)
- {
- lv = normalize(lv);
- da = dot(norm, lv);
-
- float fa = light_col[i].a+1.0;
- float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
- dist_atten *= noise;
-
- float lit = da * dist_atten;
-
- vec3 col = light_col[i].rgb*lit*diff;
- //vec3 col = vec3(dist2, light_col[i].a, lit);
-
- if (spec.a > 0.0)
- {
- //vec3 ref = dot(pos+lv, norm);
-
- float sa = dot(normalize(lv+npos),norm);
-
- if (sa > 0.0)
- {
- sa = texture2D(lightFunc,vec2(sa, spec.a)).a * min(dist_atten*4.0, 1.0);
- sa *= noise;
- col += da*sa*light_col[i].rgb*spec.rgb;
- }
- }
-
- out_col += col;
- }
- }
-
- fcol += out_col;
- ++wght;
- }
- }
-
- if (wght <= 0)
- {
- discard;
- }
-
- gl_FragColor.rgb = fcol/samples;
- gl_FragColor.a = 0.0;
-
-
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl
index 434fb6f534..eefefa640d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl
@@ -2,19 +2,38 @@
* @file multiPointLightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
void main()
{
//transform vertex
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_fragcoord = pos;
gl_Position = pos;
- gl_FrontColor = gl_Color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index 0d25d7792d..2196d14895 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -2,10 +2,30 @@
* @file multiSpotLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
//class 1 -- no shadows
@@ -17,7 +37,6 @@ uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
uniform samplerCube environmentMap;
uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
uniform sampler2D projectionMap;
uniform mat4 proj_mat; //screen space to light space
@@ -37,9 +56,12 @@ uniform float sun_wash;
uniform int proj_shadow_idx;
uniform float shadow_fade;
-varying vec4 vary_light;
+uniform vec3 center;
+uniform vec3 color;
+uniform float falloff;
+uniform float size;
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;
@@ -92,7 +114,7 @@ vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
vec4 getPosition(vec2 pos_screen)
{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ float depth = texture2DRect(depthMap, pos_screen.xy).r;
vec2 sc = pos_screen.xy*2.0;
sc /= screen_res;
sc -= vec2(1.0,1.0);
@@ -111,9 +133,9 @@ void main()
frag.xy *= screen_res;
vec3 pos = getPosition(frag.xy).xyz;
- vec3 lv = vary_light.xyz-pos.xyz;
+ vec3 lv = center.xyz-pos.xyz;
float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
+ dist2 /= size;
if (dist2 > 1.0)
{
discard;
@@ -132,7 +154,7 @@ void main()
proj_tc.xyz /= proj_tc.w;
- float fa = gl_Color.a+1.0;
+ float fa = falloff+1.0;
float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
if (dist_atten <= 0.0)
{
@@ -164,7 +186,7 @@ void main()
vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+ vec3 lcol = color.rgb * plcol.rgb * plcol.a;
lit = da * dist_atten * noise;
@@ -181,7 +203,7 @@ void main()
amb_da = min(amb_da, 1.0-lit);
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
}
@@ -214,7 +236,7 @@ void main()
stc.y > 0.0)
{
vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb;
+ col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb;
}
}
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl
deleted file mode 100644
index c80a54346e..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightMSF.glsl
+++ /dev/null
@@ -1,232 +0,0 @@
-/**
- * @file multiSpotLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-//class 1 -- no shadows
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
-uniform sampler2D projectionMap;
-
-uniform mat4 proj_mat; //screen space to light space
-uniform float proj_near; //near clip for projection
-uniform vec3 proj_p; //plane projection is emitting from (in screen space)
-uniform vec3 proj_n;
-uniform float proj_focus; //distance from plane to begin blurring
-uniform float proj_lod; //(number of mips in proj map)
-uniform float proj_range; //range between near clip and far clip plane of projection
-uniform float proj_ambient_lod;
-uniform float proj_ambiance;
-uniform float near_clip;
-uniform float far_clip;
-
-uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
-uniform float sun_wash;
-uniform float shadow_fade;
-
-varying vec4 vary_light;
-
-varying vec4 vary_fragcoord;
-uniform vec2 screen_res;
-
-uniform mat4 inv_proj;
-
-vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float det = max(1.0-lod/(proj_lod*0.5), 0.0);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
-
- float det = min(lod/(proj_lod*0.5), 1.0);
-
- float d = min(dist.x, dist.y);
-
- float edge = 0.25*det;
-
- ret *= clamp(d/edge, 0.0, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
-
- return ret;
-}
-
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = vec2(pos_screen.xy)*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-void main()
-{
- int wght = 0;
-
- vec3 fcol = vec3(0,0,0);
-
- vec2 frag = (vary_fragcoord.xy*0.5+0.5)*screen_res;
-
- ivec2 itc = ivec2(frag.xy);
-
- for (int i = 0; i < samples; ++i)
- {
- vec3 pos = getPosition(itc, i).xyz;
- vec3 lv = vary_light.xyz-pos.xyz;
- float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
- if (dist2 <= 1.0)
- {
- vec3 norm = texelFetch(normalMap, itc, i).xyz*2.0-1.0;
-
- norm = normalize(norm);
- float l_dist = -dot(lv, proj_n);
-
- vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
- if (proj_tc.z >= 0.0)
- {
- proj_tc.xyz /= proj_tc.w;
-
- float fa = gl_Color.a+1.0;
- float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
- if (dist_atten > 0.0)
- {
- lv = proj_origin-pos.xyz;
- lv = normalize(lv);
- float da = dot(norm, lv);
-
- vec3 col = vec3(0,0,0);
-
- vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
-
- float noise = texture2D(noiseMap, frag.xy/128.0).b;
- if (proj_tc.z > 0.0 &&
- proj_tc.x < 1.0 &&
- proj_tc.y < 1.0 &&
- proj_tc.x > 0.0 &&
- proj_tc.y > 0.0)
- {
- float lit = 0.0;
- float amb_da = proj_ambiance;
-
- if (da > 0.0)
- {
- float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
- float lod = diff * proj_lod;
-
- vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
-
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
-
- lit = da * dist_atten * noise;
-
- col = lcol*lit*diff_tex;
- amb_da += (da*0.5)*proj_ambiance;
- }
-
- //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
- vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
-
- amb_da += (da*da*0.5+0.5)*proj_ambiance;
-
- amb_da *= dist_atten * noise;
-
- amb_da = min(amb_da, 1.0-lit);
-
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
- }
-
-
- vec4 spec = texelFetch(specularRect, itc, i);
- if (spec.a > 0.0)
- {
- vec3 ref = reflect(normalize(pos), norm);
-
- //project from point pos in direction ref to plane proj_p, proj_n
- vec3 pdelta = proj_p-pos;
- float ds = dot(ref, proj_n);
-
- if (ds < 0.0)
- {
- vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
-
- vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
-
- if (stc.z > 0.0)
- {
- stc.xy /= stc.w;
-
- float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
-
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
-
- if (stc.x < 1.0 &&
- stc.y < 1.0 &&
- stc.x > 0.0 &&
- stc.y > 0.0)
- {
- vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb;
- }
- }
- }
- }
-
- fcol += col;
- ++wght;
- }
- }
- }
- }
-
- if (wght <= 0)
- {
- discard;
- }
-
- gl_FragColor.rgb = fcol/samples;
- gl_FragColor.a = 0.0;
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
new file mode 100644
index 0000000000..879942d8fa
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
@@ -0,0 +1,56 @@
+/**
+ * @file normgenF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D alphaMap;
+
+VARYING vec2 vary_texcoord0;
+
+uniform float stepX;
+uniform float stepY;
+uniform float norm_scale;
+
+void main()
+{
+ float alpha = texture2D(alphaMap, vary_texcoord0).a;
+
+ vec3 right = vec3(norm_scale, 0, (texture2D(alphaMap, vary_texcoord0+vec2(stepX, 0)).a-alpha)*255);
+ vec3 left = vec3(-norm_scale, 0, (texture2D(alphaMap, vary_texcoord0-vec2(stepX, 0)).a-alpha)*255);
+ vec3 up = vec3(0, -norm_scale, (texture2D(alphaMap, vary_texcoord0-vec2(0, stepY)).a-alpha)*255);
+ vec3 down = vec3(0, norm_scale, (texture2D(alphaMap, vary_texcoord0+vec2(0, stepY)).a-alpha)*255);
+
+ vec3 norm = cross(right, down) + cross(down, left) + cross(left,up) + cross(up, right);
+
+ norm = normalize(norm);
+ norm *= 0.5;
+ norm += 0.5;
+
+ gl_FragColor = vec4(norm, alpha);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
new file mode 100644
index 0000000000..9bceae05b7
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
@@ -0,0 +1,36 @@
+/**
+ * @file normgenV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_fragcoord;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = vec4(position.x*2.0-1.0, position.y*2.0-1.0, -1.0, 1.0);
+ vary_texcoord0 = texcoord0;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
index 5efa3200d4..b673d00d6e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl
@@ -2,13 +2,33 @@
* @file pointLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
uniform sampler2DRect normalMap;
@@ -20,9 +40,12 @@ uniform sampler2DRect depthMap;
uniform vec3 env_mat[3];
uniform float sun_wash;
-varying vec4 vary_light;
+uniform vec3 center;
+uniform vec3 color;
+uniform float falloff;
+uniform float size;
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;
@@ -49,9 +72,9 @@ void main()
frag.xy *= screen_res;
vec3 pos = getPosition(frag.xy).xyz;
- vec3 lv = vary_light.xyz-pos;
+ vec3 lv = center.xyz-pos;
float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
+ dist2 /= size;
if (dist2 > 1.0)
{
discard;
@@ -72,11 +95,11 @@ void main()
float noise = texture2D(noiseMap, frag.xy/128.0).b;
vec3 col = texture2DRect(diffuseRect, frag.xy).rgb;
- float fa = gl_Color.a+1.0;
+ float fa = falloff+1.0;
float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
float lit = da * dist_atten * noise;
- col = gl_Color.rgb*lit*col;
+ col = color.rgb*lit*col;
vec4 spec = texture2DRect(specularRect, frag.xy);
if (spec.a > 0.0)
@@ -84,9 +107,9 @@ void main()
float sa = dot(normalize(lv-normalize(pos)),norm);
if (sa > 0.0)
{
- sa = texture2D(lightFunc, vec2(sa, spec.a)).a * min(dist_atten*4.0, 1.0);
+ sa = texture2D(lightFunc, vec2(sa, spec.a)).r * min(dist_atten*4.0, 1.0);
sa *= noise;
- col += da*sa*gl_Color.rgb*spec.rgb;
+ col += da*sa*color.rgb*spec.rgb;
}
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl
deleted file mode 100644
index feaf38115d..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightMSF.glsl
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file pointLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS depthMap;
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS normalMap;
-uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
-
-
-uniform vec3 env_mat[3];
-uniform float sun_wash;
-
-varying vec4 vary_light;
-
-varying vec4 vary_fragcoord;
-uniform vec2 screen_res;
-
-uniform mat4 inv_proj;
-uniform vec4 viewport;
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = (vec2(pos_screen.xy)-viewport.xy)*2.0;
- sc /= viewport.zw;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-void main()
-{
- vec4 frag = vary_fragcoord;
- frag.xyz /= frag.w;
- frag.xyz = frag.xyz*0.5+0.5;
- frag.xy *= screen_res;
-
- ivec2 itc = ivec2(frag.xy);
-
- int wght = 0;
- vec3 fcol = vec3(0,0,0);
-
- for (int s = 0; s < samples; ++s)
- {
- vec3 pos = getPosition(itc, s).xyz;
- vec3 lv = vary_light.xyz-pos;
- float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
- if (dist2 <= 1.0)
- {
- vec3 norm = texelFetch(normalMap, itc, s).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float da = dot(norm, lv);
- if (da >= 0.0)
- {
- norm = normalize(norm);
- lv = normalize(lv);
- da = dot(norm, lv);
-
- float noise = texture2D(noiseMap, frag.xy/128.0).b;
-
- vec3 col = texelFetch(diffuseRect, itc, s).rgb;
- float fa = gl_Color.a+1.0;
- float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
- float lit = da * dist_atten * noise;
-
- col = gl_Color.rgb*lit*col;
-
- vec4 spec = texelFetch(specularRect, itc, s);
- if (spec.a > 0.0)
- {
- float sa = dot(normalize(lv-normalize(pos)),norm);
- if (sa > 0.0)
- {
- sa = texture2D(lightFunc, vec2(sa, spec.a)).a * min(dist_atten*4.0, 1.0);
- sa *= noise;
- col += da*sa*gl_Color.rgb*spec.rgb;
- }
- }
-
- fcol += col;
- ++wght;
- }
- }
- }
-
- if (wght <= 0)
- {
- discard;
- }
-
- gl_FragColor.rgb = fcol/samples;
- gl_FragColor.a = 0.0;
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl
index c510d8ad77..cb14e6d4e8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl
@@ -2,26 +2,38 @@
* @file pointLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
-varying vec4 vary_light;
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
void main()
{
//transform vertex
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_fragcoord = pos;
- vec4 tex = gl_MultiTexCoord0;
- tex.w = 1.0;
-
- vary_light = gl_MultiTexCoord0;
-
gl_Position = pos;
-
- gl_FrontColor = gl_Color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index f6b0402bb9..4603d99c5e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -2,84 +2,52 @@
* @file postDeferredF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect edgeMap;
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2D bloomMap;
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-uniform float depth_cutoff;
-uniform float norm_cutoff;
-uniform float focal_distance;
-uniform float blur_constant;
-uniform float tan_pixel_angle;
-uniform float magnification;
+uniform sampler2DRect diffuseRect;
uniform mat4 inv_proj;
uniform vec2 screen_res;
+uniform float max_cof;
+uniform float res_scale;
-varying vec2 vary_fragcoord;
-
-float getDepth(vec2 pos_screen)
-{
- float z = texture2DRect(depthMap, pos_screen.xy).r;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-float calc_cof(float depth)
-{
- float sc = abs(depth-focal_distance)/-depth*blur_constant;
-
- sc /= magnification;
-
- // tan_pixel_angle = pixel_length/-depth;
- float pixel_length = tan_pixel_angle*-focal_distance;
-
- sc = sc/pixel_length;
- sc *= 1.414;
-
- return sc;
-}
+VARYING vec2 vary_fragcoord;
-void dofSampleNear(inout vec4 diff, inout float w, float cur_sc, vec2 tc)
+void dofSample(inout vec4 diff, inout float w, float min_sc, vec2 tc)
{
- float d = getDepth(tc);
-
- float sc = calc_cof(d);
-
- float wg = 0.25;
-
vec4 s = texture2DRect(diffuseRect, tc);
- // de-weight dull areas to make highlights 'pop'
- wg += s.r+s.g+s.b;
-
- diff += wg*s;
-
- w += wg;
-}
-void dofSample(inout vec4 diff, inout float w, float min_sc, float cur_depth, vec2 tc)
-{
- float d = getDepth(tc);
-
- float sc = calc_cof(d);
-
- if (sc > min_sc //sampled pixel is more "out of focus" than current sample radius
- || d < cur_depth) //sampled pixel is further away than current pixel
+ float sc = s.a*max_cof;
+
+ if (sc > min_sc) //sampled pixel is more "out of focus" than current sample radius
{
float wg = 0.25;
- vec4 s = texture2DRect(diffuseRect, tc);
// de-weight dull areas to make highlights 'pop'
wg += s.r+s.g+s.b;
@@ -89,30 +57,20 @@ void dofSample(inout vec4 diff, inout float w, float min_sc, float cur_depth, ve
}
}
-
void main()
{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
-
vec2 tc = vary_fragcoord.xy;
- float depth = getDepth(tc);
-
vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
{
float w = 1.0;
- float sc = calc_cof(depth);
- sc = min(abs(sc), 10.0);
-
- float fd = depth*0.5f;
-
+ float sc = diff.a*max_cof;
+
float PI = 3.14159265358979323846264;
// sample quite uniformly spaced points within a circle, for a circular 'bokeh'
- //if (depth < focal_distance)
{
while (sc > 0.5)
{
@@ -123,7 +81,7 @@ void main()
float samp_x = sc*sin(ang);
float samp_y = sc*cos(ang);
// you could test sample coords against an interesting non-circular aperture shape here, if desired.
- dofSample(diff, w, sc, depth, vary_fragcoord.xy + vec2(samp_x,samp_y));
+ dofSample(diff, w, sc, vary_fragcoord.xy + vec2(samp_x,samp_y));
}
sc -= 1.0;
}
@@ -132,6 +90,5 @@ void main()
diff /= w;
}
- vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
- gl_FragColor = diff + bloom;
+ gl_FragColor = diff;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl
deleted file mode 100644
index 62ae5f917a..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredMSF.glsl
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * @file postDeferredF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS edgeMap;
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2D bloomMap;
-
-uniform float depth_cutoff;
-uniform float norm_cutoff;
-uniform float focal_distance;
-uniform float blur_constant;
-uniform float tan_pixel_angle;
-uniform float magnification;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-varying vec2 vary_fragcoord;
-
-vec4 texture2DMS(sampler2DMS tex, ivec2 tc)
-{
- vec4 ret = vec4(0,0,0,0);
- for (int i = 0; i < samples; ++i)
- {
- ret += texelFetch(tex, tc, i);
- }
-
- return ret/samples;
-}
-
-float getDepth(ivec2 pos_screen)
-{
- float z = texture2DMS(depthMap, pos_screen.xy).r;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-float calc_cof(float depth)
-{
- float sc = abs(depth-focal_distance)/-depth*blur_constant;
-
- sc /= magnification;
-
- // tan_pixel_angle = pixel_length/-depth;
- float pixel_length = tan_pixel_angle*-focal_distance;
-
- sc = sc/pixel_length;
- sc *= 1.414;
-
- return sc;
-}
-
-void dofSample(inout vec4 diff, inout float w, float min_sc, float cur_depth, ivec2 tc)
-{
- float d = getDepth(tc);
-
- float sc = calc_cof(d);
-
- if (sc > min_sc //sampled pixel is more "out of focus" than current sample radius
- || d < cur_depth) //sampled pixel is further away than current pixel
- {
- float wg = 0.25;
-
- vec4 s = texture2DMS(diffuseRect, tc);
- // de-weight dull areas to make highlights 'pop'
- wg += s.r+s.g+s.b;
-
- diff += wg*s;
-
- w += wg;
- }
-}
-
-
-void main()
-{
- ivec2 itc = ivec2(vary_fragcoord.xy);
-
- vec3 norm = texture2DMS(normalMap, itc).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
-
- float depth = getDepth(itc);
-
- vec4 diff = texture2DMS(diffuseRect, itc);
-
- {
- float w = 1.0;
-
- float sc = calc_cof(depth);
- sc = min(abs(sc), 10.0);
-
- float fd = depth*0.5f;
-
- float PI = 3.14159265358979323846264;
-
- int isc = int(sc);
-
- // sample quite uniformly spaced points within a circle, for a circular 'bokeh'
- //if (depth < focal_distance)
- {
- for (int x = -isc; x <= isc; x+=2)
- {
- for (int y = -isc; y <= isc; y+=2)
- {
- ivec2 cur_samp = ivec2(x,y);
- float cur_sc = length(vec2(cur_samp));
- if (cur_sc < sc)
- {
- dofSample(diff, w, cur_sc, depth, itc+cur_samp);
- }
- }
- }
- }
-
- diff /= w;
- }
-
- vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
- gl_FragColor = diff + bloom;
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
index bf829bfc56..c275434777 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl
@@ -1,19 +1,39 @@
/**
- * @file postDeferredF.glsl
+ * @file postDeferredNoDoFF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseRect;
uniform sampler2D bloomMap;
uniform vec2 screen_res;
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
void main()
{
@@ -22,3 +42,4 @@ void main()
vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
gl_FragColor = diff + bloom;
}
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl
deleted file mode 100644
index bf35dfe11c..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFMSF.glsl
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file postDeferredF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2D bloomMap;
-
-uniform vec2 screen_res;
-varying vec2 vary_fragcoord;
-
-vec4 texture2DMS(sampler2DMS tex, ivec2 tc)
-{
- vec4 ret = vec4(0,0,0,0);
-
- for (int i = 0; i < samples; ++i)
- {
- ret += texelFetch(tex,tc,i);
- }
-
- return ret/samples;
-}
-
-void main()
-{
- vec4 diff = texture2DMS(diffuseRect, ivec2(vary_fragcoord.xy));
-
- vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
- gl_FragColor = diff + bloom;
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl
index 876f65ee3a..8edf5b2723 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredV.glsl
@@ -2,18 +2,43 @@
* @file postDeferredV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+
+VARYING vec2 vary_fragcoord;
+VARYING vec2 vary_tc;
+
+uniform vec2 tc_scale;
-varying vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
+ vary_tc = (pos.xy*0.5+0.5)*tc_scale;
vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
index fa3f04bcc8..84d65d5b3b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
@@ -2,11 +2,31 @@
* @file postgiF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
+ #ifdef DEFINE_GL_FRAGCOLOR
+ out vec4 gl_FragColor;
+ #endif
+
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
uniform sampler2DRect giLightMap;
@@ -20,7 +40,7 @@ uniform int kern_length;
uniform float kern_scale;
uniform vec3 blur_quad;
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
@@ -76,7 +96,5 @@ void main()
col = col*col*blur_quad.x + col*blur_quad.y + blur_quad.z;
- gl_FragData[0].xyz = col;
-
- //gl_FragColor = ccol;
+ gl_FragColor.rgb = col;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl
index eebe930666..0d5c8e7287 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postgiV.glsl
@@ -2,18 +2,39 @@
* @file postgiV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
new file mode 100644
index 0000000000..46d42d2a4a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
@@ -0,0 +1,50 @@
+/**
+ * @file shadowAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+VARYING vec4 post_pos;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a;
+
+ if (alpha < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragColor = vec4(1,1,1,1);
+
+ gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
new file mode 100644
index 0000000000..6a3cba771b
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
@@ -0,0 +1,48 @@
+/**
+ * @file shadowAlphaMaskV.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 post_pos;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ //transform vertex
+ vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
+
+ post_pos = pos;
+
+ gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
+
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vertex_color = diffuse_color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl
index e0c5406483..bf75ca262e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl
@@ -1,19 +1,37 @@
/**
* @file shadowF.glsl
*
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-
-uniform sampler2D diffuseMap;
-
-varying vec4 post_pos;
+VARYING vec4 post_pos;
void main()
{
- gl_FragColor = vec4(1,1,1,texture2D(diffuseMap, gl_TexCoord[0].xy).a * gl_Color.a);
+ gl_FragColor = vec4(1,1,1,1);
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl
index 9271a5115c..8b46e81f90 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowV.glsl
@@ -1,23 +1,40 @@
/**
* @file shadowV.glsl
*
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
-varying vec4 post_pos;
+ATTRIBUTE vec3 position;
+
+VARYING vec4 post_pos;
void main()
{
//transform vertex
- vec4 pos = gl_ModelViewProjectionMatrix*gl_Vertex;
+ vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
post_pos = pos;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_FrontColor = gl_Color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index 820c82ffd7..96ad0aa93a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -2,16 +2,36 @@
* @file WLSkyF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
/////////////////////////////////////////////////////////////////////////
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
-varying vec4 vary_HazeColor;
+VARYING vec4 vary_HazeColor;
uniform sampler2D cloud_noise_texture;
uniform vec4 gamma;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
index 1ea00f723a..721de18e0b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -2,17 +2,39 @@
* @file WLSkyV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
// SKY ////////////////////////////////////////////////////////////////////////
// The vertex shader for creating the atmospheric sky
///////////////////////////////////////////////////////////////////////////////
// Output parameters
-varying vec4 vary_HazeColor;
+VARYING vec4 vary_HazeColor;
+VARYING vec2 vary_texcoord0;
// Inputs
uniform vec3 camPosLocal;
@@ -39,12 +61,12 @@ void main()
{
// World / view / projection
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = texcoord0;
// Get relative position
- vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
- //vec3 P = gl_Vertex.xyz + vec3(0,50,0);
+ vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
+ //vec3 P = position.xyz + vec3(0,50,0);
// Set altitude
if (P.y > 0.)
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 60082f40d6..60952ea38e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -2,13 +2,33 @@
* @file softenLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
uniform sampler2DRect positionMap;
@@ -45,8 +65,8 @@ uniform vec3 env_mat[3];
//uniform vec4 shadow_clip;
uniform mat3 ssao_effect_mat;
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
+uniform vec3 sun_dir;
+VARYING vec2 vary_fragcoord;
vec3 vary_PositionEye;
@@ -128,10 +148,6 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
vec3 P = inPositionEye;
setPositionEye(P);
- //(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
-
vec3 tmpLightnorm = lightnorm.xyz;
vec3 Pn = normalize(P);
@@ -265,77 +281,47 @@ void main()
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
//vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
+ float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
vec4 diffuse = texture2DRect(diffuseRect, tc);
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
- calcAtmospherics(pos.xyz, 1.0);
+ vec3 col;
+ float bloom = 0.0;
+ if (diffuse.a < 0.9)
+ {
+ calcAtmospherics(pos.xyz, 1.0);
+
+ col = atmosAmbient(vec3(0));
+ col += atmosAffectDirectionalLight(max(min(da, 1.0), diffuse.a));
- vec3 col = atmosAmbient(vec3(0));
- col += atmosAffectDirectionalLight(max(min(da, 1.0), diffuse.a));
+ col *= diffuse.rgb;
- col *= diffuse.rgb;
+ if (spec.a > 0.0) // specular reflection
+ {
+ // the old infinite-sky shiny reflection
+ //
+ vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
+ float sa = dot(refnormpersp, sun_dir.xyz);
+ vec3 dumbshiny = vary_SunlitColor*texture2D(lightFunc, vec2(sa, spec.a)).r;
+
+ // add the two types of shiny together
+ vec3 spec_contrib = dumbshiny * spec.rgb;
+ bloom = dot(spec_contrib, spec_contrib);
+ col += spec_contrib;
+ }
- if (spec.a > 0.0) // specular reflection
+ col = atmosLighting(col);
+ col = scaleSoftClip(col);
+
+ col = mix(col.rgb, diffuse.rgb, diffuse.a);
+ }
+ else
{
- // the old infinite-sky shiny reflection
- //
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*texture2D(lightFunc, vec2(sa, spec.a)).a;
-
- /*
- // screen-space cheap fakey reflection map
- //
- vec3 refnorm = normalize(reflect(vec3(0,0,-1), norm.xyz));
- depth -= 0.5; // unbias depth
- // first figure out where we'll make our 2D guess from
- vec2 ref2d = (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
- // Offset the guess source a little according to a trivial
- // checkerboard dither function and spec.a.
- // This is meant to be similar to sampling a blurred version
- // of the diffuse map. LOD would be better in that regard.
- // The goal of the blur is to soften reflections in surfaces
- // with low shinyness, and also to disguise our lameness.
- float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
- float checkoffset = (3.0 + (7.0*(1.0-spec.a)))*(checkerboard-0.5);
- ref2d += vec2(checkoffset, checkoffset);
- ref2d += tc.xy; // use as offset from destination
- // Get attributes from the 2D guess point.
- // We average two samples of diffuse (not of anything else) per
- // pixel to try to reduce aliasing some more.
- vec3 refcol = 0.5 * (texture2DRect(diffuseRect, ref2d + vec2(0.0, -checkoffset)).rgb +
- texture2DRect(diffuseRect, ref2d + vec2(-checkoffset, 0.0)).rgb);
- float refdepth = texture2DRect(depthMap, ref2d).a;
- vec3 refpos = getPosition_d(ref2d, refdepth).xyz;
- vec3 refn = texture2DRect(normalMap, ref2d).rgb;
- refn = normalize(vec3((refn.xy-0.5)*2.0,refn.z)); // unpack norm
- // figure out how appropriate our guess actually was
- float refapprop = max(0.0, dot(-refnorm, normalize(pos - refpos)));
- // darken reflections from points which face away from the reflected ray - our guess was a back-face
- //refapprop *= step(dot(refnorm, refn), 0.0);
- refapprop = min(refapprop, max(0.0, -dot(refnorm, refn))); // more conservative variant
- // get appropriate light strength for guess-point.
- // reflect light direction to increase the illusion that
- // these are reflections.
- vec3 reflight = reflect(lightnorm.xyz, norm.xyz);
- float reflit = max(dot(refn, reflight.xyz), 0.0);
- // apply sun color to guess-point, dampen according to inappropriateness of guess
- float refmod = min(refapprop, reflit);
- vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
- vec3 ssshiny = (refprod * spec.a);
- ssshiny *= 0.3; // dampen it even more
- */
- vec3 ssshiny = vec3(0,0,0);
-
- // add the two types of shiny together
- col += (ssshiny + dumbshiny) * spec.rgb;
+ col = diffuse.rgb;
}
-
- col = atmosLighting(col);
- col = scaleSoftClip(col);
-
+
gl_FragColor.rgb = col;
- gl_FragColor.a = 0.0;
+
+ gl_FragColor.a = bloom;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
deleted file mode 100644
index 9dfacfb520..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
+++ /dev/null
@@ -1,318 +0,0 @@
-/**
- * @file softenLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS normalMap;
-uniform sampler2DMS depthMap;
-uniform sampler2D noiseMap;
-uniform samplerCube environmentMap;
-uniform sampler2D lightFunc;
-
-uniform float blur_size;
-uniform float blur_fidelity;
-
-// Inputs
-uniform vec4 morphFactor;
-uniform vec3 camPosLocal;
-//uniform vec4 camPosWorld;
-uniform vec4 gamma;
-uniform vec4 lightnorm;
-uniform vec4 sunlight_color;
-uniform vec4 ambient;
-uniform vec4 blue_horizon;
-uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
-uniform vec4 glow;
-uniform float scene_light_strength;
-uniform vec3 env_mat[3];
-//uniform mat4 shadow_matrix[3];
-//uniform vec4 shadow_clip;
-uniform mat3 ssao_effect_mat;
-
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
-
-vec3 vary_PositionEye;
-
-vec3 vary_SunlitColor;
-vec3 vary_AmblitColor;
-vec3 vary_AdditiveColor;
-vec3 vary_AtmosAttenuation;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-vec4 getPosition_d(vec2 pos_screen, float depth)
-{
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
-vec3 getSunlitColor()
-{
- return vary_SunlitColor;
-}
-vec3 getAmblitColor()
-{
- return vary_AmblitColor;
-}
-vec3 getAdditiveColor()
-{
- return vary_AdditiveColor;
-}
-vec3 getAtmosAttenuation()
-{
- return vary_AtmosAttenuation;
-}
-
-
-void setPositionEye(vec3 v)
-{
- vary_PositionEye = v;
-}
-
-void setSunlitColor(vec3 v)
-{
- vary_SunlitColor = v;
-}
-
-void setAmblitColor(vec3 v)
-{
- vary_AmblitColor = v;
-}
-
-void setAdditiveColor(vec3 v)
-{
- vary_AdditiveColor = v;
-}
-
-void setAtmosAttenuation(vec3 v)
-{
- vary_AtmosAttenuation = v;
-}
-
-void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
-
- vec3 P = inPositionEye;
- setPositionEye(P);
-
- //(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
-
- vec3 tmpLightnorm = lightnorm.xyz;
-
- vec3 Pn = normalize(P);
- float Plen = length(P);
-
- vec4 temp1 = vec4(0);
- vec3 temp2 = vec3(0);
- vec4 blue_weight;
- vec4 haze_weight;
- vec4 sunlight = sunlight_color;
- vec4 light_atten;
-
- //sunlight attenuation effect (hue and brightness) due to atmosphere
- //this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
- //I had thought blue_density and haze_density should have equal weighting,
- //but attenuation due to haze_density tends to seem too strong
-
- temp1 = blue_density + vec4(haze_density.r);
- blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
-
- //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
- temp2.y = max(0.0, tmpLightnorm.y);
- temp2.y = 1. / temp2.y;
- sunlight *= exp( - light_atten * temp2.y);
-
- // main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
-
- // Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
- // compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
-
- //final atmosphere attenuation factor
- setAtmosAttenuation(temp1.rgb);
-
- //compute haze glow
- //(can use temp2.x as temp because we haven't used it yet)
- temp2.x = dot(Pn, tmpLightnorm.xyz);
- temp2.x = 1. - temp2.x;
- //temp2.x is 0 at the sun and increases away from sun
- temp2.x = max(temp2.x, .03); //was glow.y
- //set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
- //higher glow.x gives dimmer glow (because next step is 1 / "angle")
- temp2.x = pow(temp2.x, glow.z);
- //glow.z should be negative, so we're doing a sort of (1 / "angle") function
-
- //add "minimum anti-solar illumination"
- temp2.x += .25;
-
- //increase ambient when there are more clouds
- vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
-
- /* decrease value and saturation (that in HSV, not HSL) for occluded areas
- * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
- * // The following line of code performs the equivalent of:
- * float ambAlpha = tmpAmbient.a;
- * float ambValue = dot(vec3(tmpAmbient), vec3(0.577)); // projection onto <1/rt(3), 1/rt(3), 1/rt(3)>, the neutral white-black axis
- * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue);
- * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha);
- */
- tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a);
-
- //haze color
- setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
- + tmpAmbient)));
-
- //brightness of surface both sunlight and ambient
- setSunlitColor(vec3(sunlight * .5));
- setAmblitColor(vec3(tmpAmbient * .25));
- setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
-}
-
-vec3 atmosLighting(vec3 light)
-{
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor();
- return (2.0 * light);
-}
-
-vec3 atmosTransport(vec3 light) {
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor() * 2.0;
- return light;
-}
-vec3 atmosGetDiffuseSunlightColor()
-{
- return getSunlitColor();
-}
-
-vec3 scaleDownLight(vec3 light)
-{
- return (light / scene_light_strength );
-}
-
-vec3 scaleUpLight(vec3 light)
-{
- return (light * scene_light_strength);
-}
-
-vec3 atmosAmbient(vec3 light)
-{
- return getAmblitColor() + light / 2.0;
-}
-
-vec3 atmosAffectDirectionalLight(float lightIntensity)
-{
- return getSunlitColor() * lightIntensity;
-}
-
-vec3 scaleSoftClip(vec3 light)
-{
- //soft clip effect:
- light = 1. - clamp(light, vec3(0.), vec3(1.));
- light = 1. - pow(light, gamma.xxx);
-
- return light;
-}
-
-vec4 texture2DMS(sampler2DMS tex, ivec2 tc)
-{
- vec4 ret = vec4(0,0,0,0);
-
- for (int i = 0; i < samples; ++i)
- {
- ret += texelFetch(tex,tc,i);
- }
-
- return ret/samples;
-}
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- ivec2 itc = ivec2(tc);
-
- vec3 fcol = vec3(0,0,0);
-
- for (int i = 0; i < samples; ++i)
- {
- float depth = texelFetch(depthMap, itc, i).r;
- vec3 pos = getPosition_d(tc, depth).xyz;
- vec3 norm = texelFetch(normalMap, itc, i).xyz;
-
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- //vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
-
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
-
- vec4 diffuse = texelFetch(diffuseRect, itc, i);
- if (diffuse.a >= 1.0)
- {
- fcol += diffuse.rgb;
- }
- else
- {
- vec4 spec = texelFetch(specularRect, itc, i);
-
- calcAtmospherics(pos.xyz, 1.0);
-
- vec3 col = atmosAmbient(vec3(0));
- col += atmosAffectDirectionalLight(max(min(da, 1.0), diffuse.a));
-
- col *= diffuse.rgb;
-
- if (spec.a > 0.0) // specular reflection
- {
- // the old infinite-sky shiny reflection
- //
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*texture2D(lightFunc, vec2(sa, spec.a)).a;
-
- // add the two types of shiny together
- col += dumbshiny * spec.rgb;
- }
-
- col = atmosLighting(col);
- col = scaleSoftClip(col);
- fcol += col;
- }
- }
-
- gl_FragColor.rgb = fcol.rgb/samples;
- gl_FragColor.a = 0.0;
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl
index 745cc01992..c6031fc45a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl
@@ -2,25 +2,39 @@
* @file softenLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
uniform vec2 screen_res;
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
void main()
{
//transform vertex
- gl_Position = ftransform();
-
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
- vec4 tex = gl_MultiTexCoord0;
- tex.w = 1.0;
-
- vary_light = gl_MultiTexCoord0;
+ vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index 9aaffc15bf..cc0f4e5b6b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -2,20 +2,39 @@
* @file spotLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
+
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
-uniform samplerCube environmentMap;
uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
uniform sampler2D projectionMap;
uniform mat4 proj_mat; //screen space to light space
@@ -32,9 +51,12 @@ uniform float far_clip;
uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
uniform float sun_wash;
-varying vec4 vary_light;
+uniform vec3 center;
+uniform vec3 color;
+uniform float falloff;
+uniform float size;
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;
@@ -60,9 +82,9 @@ void main()
frag.xy *= screen_res;
vec3 pos = getPosition(frag.xy).xyz;
- vec3 lv = vary_light.xyz-pos.xyz;
+ vec3 lv = center.xyz-pos.xyz;
float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
+ dist2 /= size;
if (dist2 > 1.0)
{
discard;
@@ -82,7 +104,7 @@ void main()
proj_tc.xyz /= proj_tc.w;
- float fa = gl_Color.a+1.0;
+ float fa = falloff+1.0;
float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
lv = proj_origin-pos.xyz;
@@ -108,7 +130,7 @@ void main()
vec4 plcol = texture2DLod(projectionMap, proj_tc.xy, lod);
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+ vec3 lcol = color.rgb * plcol.rgb * plcol.a;
lit = da * dist_atten * noise;
@@ -127,7 +149,7 @@ void main()
amb_da = min(amb_da, 1.0-lit);
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
}
@@ -156,7 +178,7 @@ void main()
stc.y > 0.0)
{
vec4 scol = texture2DLod(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb;
+ col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb;
}
}
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl
deleted file mode 100644
index 4bb9bad275..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightMSF.glsl
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * @file multiSpotLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-//class 1 -- no shadows
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
-uniform sampler2D projectionMap;
-
-uniform mat4 proj_mat; //screen space to light space
-uniform float proj_near; //near clip for projection
-uniform vec3 proj_p; //plane projection is emitting from (in screen space)
-uniform vec3 proj_n;
-uniform float proj_focus; //distance from plane to begin blurring
-uniform float proj_lod; //(number of mips in proj map)
-uniform float proj_range; //range between near clip and far clip plane of projection
-uniform float proj_ambient_lod;
-uniform float proj_ambiance;
-uniform float near_clip;
-uniform float far_clip;
-
-uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
-uniform float sun_wash;
-uniform int proj_shadow_idx;
-uniform float shadow_fade;
-
-varying vec4 vary_light;
-
-varying vec4 vary_fragcoord;
-uniform vec2 screen_res;
-
-uniform mat4 inv_proj;
-
-vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float det = max(1.0-lod/(proj_lod*0.5), 0.0);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
-
- float det = min(lod/(proj_lod*0.5), 1.0);
-
- float d = min(dist.x, dist.y);
-
- float edge = 0.25*det;
-
- ret *= clamp(d/edge, 0.0, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
-
- return ret;
-}
-
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = vec2(pos_screen.xy)*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-void main()
-{
- vec4 frag = vary_fragcoord;
- frag.xyz /= frag.w;
- frag.xyz = frag.xyz*0.5+0.5;
- frag.xy *= screen_res;
- ivec2 itc = ivec2(frag.xy);
-
- vec3 fcol = vec3(0,0,0);
- int wght = 0;
-
- for (int i = 0; i < samples; ++i)
- {
- vec3 pos = getPosition(itc, i).xyz;
- vec3 lv = vary_light.xyz-pos.xyz;
- float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
- if (dist2 <= 1.0)
- {
- vec3 norm = texelFetch(normalMap, itc, i).xyz*2.0-1.0;
-
- norm = normalize(norm);
- float l_dist = -dot(lv, proj_n);
-
- vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
- if (proj_tc.z >= 0.0)
- {
- proj_tc.xyz /= proj_tc.w;
-
- float fa = gl_Color.a+1.0;
- float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
- if (dist_atten > 0.0)
- {
- lv = proj_origin-pos.xyz;
- lv = normalize(lv);
- float da = dot(norm, lv);
-
- vec3 col = vec3(0,0,0);
-
- vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
-
- float noise = texture2D(noiseMap, frag.xy/128.0).b;
- if (proj_tc.z > 0.0 &&
- proj_tc.x < 1.0 &&
- proj_tc.y < 1.0 &&
- proj_tc.x > 0.0 &&
- proj_tc.y > 0.0)
- {
- float lit = 0.0;
- float amb_da = proj_ambiance;
-
- if (da > 0.0)
- {
- float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
- float lod = diff * proj_lod;
-
- vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
-
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
-
- lit = da * dist_atten * noise;
-
- col = lcol*lit*diff_tex;
- amb_da += (da*0.5)*proj_ambiance;
- }
-
- //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
- vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
-
- amb_da += (da*da*0.5+0.5)*proj_ambiance;
-
- amb_da *= dist_atten * noise;
-
- amb_da = min(amb_da, 1.0-lit);
-
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
- }
-
-
- vec4 spec = texelFetch(specularRect, itc, i);
- if (spec.a > 0.0)
- {
- vec3 ref = reflect(normalize(pos), norm);
-
- //project from point pos in direction ref to plane proj_p, proj_n
- vec3 pdelta = proj_p-pos;
- float ds = dot(ref, proj_n);
-
- if (ds < 0.0)
- {
- vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
-
- vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
-
- if (stc.z > 0.0)
- {
- stc.xy /= stc.w;
-
- float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
-
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
-
- if (stc.x < 1.0 &&
- stc.y < 1.0 &&
- stc.x > 0.0 &&
- stc.y > 0.0)
- {
- vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb;
- }
- }
- }
- }
-
- fcol += col;
- ++wght;
- }
- }
- }
- }
-
- if (wght <= 0)
- {
- discard;
- }
-
- gl_FragColor.rgb = fcol/samples;
- gl_FragColor.a = 0.0;
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
index 2cf7d194cc..03fccd2766 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
@@ -2,16 +2,39 @@
* @file starsF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
uniform sampler2D diffuseMap;
void main()
{
- vec4 col = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 col = vertex_color * texture2D(diffuseMap, vary_texcoord0.xy);
gl_FragData[0] = col;
gl_FragData[1] = vec4(0,0,0,0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
index c43125dad9..8bc5b06379 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsV.glsl
@@ -2,16 +2,41 @@
* @file starsV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_FrontColor = gl_Color;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
index f20886565a..adc7c5d005 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl
@@ -2,15 +2,35 @@
* @file sunLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
//class 1, no shadow, no SSAO, should never be called
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
void main()
{
gl_FragColor = vec4(0,0,0,0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl
deleted file mode 100644
index f20886565a..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightMSF.glsl
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * @file sunLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-//class 1, no shadow, no SSAO, should never be called
-
-#extension GL_ARB_texture_rectangle : enable
-
-void main()
-{
- gl_FragColor = vec4(0,0,0,0);
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
index 665d8126a0..fc5959a33c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl
@@ -1,14 +1,34 @@
/**
* @file sunLightSSAOF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
//class 1 -- no shadow, SSAO only
uniform sampler2DRect depthMap;
@@ -24,8 +44,7 @@ uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
-varying vec2 vary_fragcoord;
-varying vec4 vary_light;
+VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl
deleted file mode 100644
index 32d1b2149a..0000000000
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOMSF.glsl
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @file sunLightSSAOF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-//class 1 -- no shadow, SSAO only
-
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2D noiseMap;
-
-
-// Inputs
-uniform mat4 shadow_matrix[6];
-uniform vec4 shadow_clip;
-uniform float ssao_radius;
-uniform float ssao_max_radius;
-uniform float ssao_factor;
-uniform float ssao_factor_inv;
-
-varying vec2 vary_fragcoord;
-varying vec4 vary_light;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-uniform float shadow_bias;
-uniform float shadow_offset;
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-//calculate decreases in ambient lighting when crowded out (SSAO)
-float calcAmbientOcclusion(vec4 pos, vec3 norm, int sample)
-{
- float ret = 1.0;
-
- vec2 kern[8];
- // exponentially (^2) distant occlusion samples spread around origin
- kern[0] = vec2(-1.0, 0.0) * 0.125*0.125;
- kern[1] = vec2(1.0, 0.0) * 0.250*0.250;
- kern[2] = vec2(0.0, 1.0) * 0.375*0.375;
- kern[3] = vec2(0.0, -1.0) * 0.500*0.500;
- kern[4] = vec2(0.7071, 0.7071) * 0.625*0.625;
- kern[5] = vec2(-0.7071, -0.7071) * 0.750*0.750;
- kern[6] = vec2(-0.7071, 0.7071) * 0.875*0.875;
- kern[7] = vec2(0.7071, -0.7071) * 1.000*1.000;
-
- vec2 pos_screen = vary_fragcoord.xy;
- vec3 pos_world = pos.xyz;
- vec2 noise_reflect = texture2D(noiseMap, vary_fragcoord.xy/128.0).xy;
-
- float angle_hidden = 0.0;
- int points = 0;
-
- float scale = min(ssao_radius / -pos_world.z, ssao_max_radius);
-
- // it was found that keeping # of samples a constant was the fastest, probably due to compiler optimizations unrolling?)
- for (int i = 0; i < 8; i++)
- {
- ivec2 samppos_screen = ivec2(pos_screen + scale * reflect(kern[i], noise_reflect));
- vec3 samppos_world = getPosition(samppos_screen, sample).xyz;
-
- vec3 diff = pos_world - samppos_world;
- float dist2 = dot(diff, diff);
-
- // assume each sample corresponds to an occluding sphere with constant radius, constant x-sectional area
- // --> solid angle shrinking by the square of distance
- //radius is somewhat arbitrary, can approx with just some constant k * 1 / dist^2
- //(k should vary inversely with # of samples, but this is taken care of later)
-
- angle_hidden = angle_hidden + float(dot((samppos_world - 0.05*norm - pos_world), norm) > 0.0) * min(1.0/dist2, ssao_factor_inv);
-
- // 'blocked' samples (significantly closer to camera relative to pos_world) are "no data", not "no occlusion"
- points = points + int(diff.z > -1.0);
- }
-
- angle_hidden = min(ssao_factor*angle_hidden/float(points), 1.0);
-
- ret = (1.0 - (float(points != 0) * angle_hidden));
-
- return min(ret, 1.0);
-}
-
-void main()
-{
- vec2 pos_screen = vary_fragcoord.xy;
- ivec2 itc = ivec2(pos_screen);
-
- float col = 0;
-
- for (int i = 0; i < samples; i++)
- {
- vec4 pos = getPosition(itc, i);
- vec3 norm = texelFetch(normalMap, itc, i).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- col += calcAmbientOcclusion(pos,norm,i);
- }
-
- col /= samples;
-
- gl_FragColor[0] = 1.0;
- gl_FragColor[1] = col;
- gl_FragColor[2] = 1.0;
- gl_FragColor[3] = 1.0;
-}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl
index 814deb3677..473d6df8fa 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl
@@ -2,26 +2,40 @@
* @file sunLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
- vec4 tex = gl_MultiTexCoord0;
- tex.w = 1.0;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
- vary_light = gl_MultiTexCoord0;
-
- gl_FrontColor = gl_Color;
+ vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
index d005f67bf6..e014e53d25 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
@@ -2,10 +2,30 @@
* @file terrainF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
uniform sampler2D detail_0;
uniform sampler2D detail_1;
@@ -13,20 +33,22 @@ uniform sampler2D detail_2;
uniform sampler2D detail_3;
uniform sampler2D alpha_ramp;
-varying vec3 vary_normal;
+VARYING vec3 vary_normal;
+VARYING vec4 vary_texcoord0;
+VARYING vec4 vary_texcoord1;
void main()
{
/// Note: This should duplicate the blending functionality currently used for the terrain rendering.
- vec4 color0 = texture2D(detail_0, gl_TexCoord[0].xy);
- vec4 color1 = texture2D(detail_1, gl_TexCoord[0].xy);
- vec4 color2 = texture2D(detail_2, gl_TexCoord[0].xy);
- vec4 color3 = texture2D(detail_3, gl_TexCoord[0].xy);
+ vec4 color0 = texture2D(detail_0, vary_texcoord0.xy);
+ vec4 color1 = texture2D(detail_1, vary_texcoord0.xy);
+ vec4 color2 = texture2D(detail_2, vary_texcoord0.xy);
+ vec4 color3 = texture2D(detail_3, vary_texcoord0.xy);
- float alpha1 = texture2D(alpha_ramp, gl_TexCoord[0].zw).a;
- float alpha2 = texture2D(alpha_ramp,gl_TexCoord[1].xy).a;
- float alphaFinal = texture2D(alpha_ramp, gl_TexCoord[1].zw).a;
+ float alpha1 = texture2D(alpha_ramp, vary_texcoord0.zw).a;
+ float alpha2 = texture2D(alpha_ramp,vary_texcoord1.xy).a;
+ float alphaFinal = texture2D(alpha_ramp, vary_texcoord1.zw).a;
vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
gl_FragData[0] = vec4(outColor.rgb, 0.0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
index 3038fd2966..5effee4e4e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainV.glsl
@@ -2,12 +2,44 @@
* @file terrainV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
-varying vec3 vary_normal;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec2 texcoord1;
+
+VARYING vec3 vary_normal;
+
+VARYING vec4 vary_texcoord0;
+VARYING vec4 vary_texcoord1;
+
+uniform vec4 object_plane_s;
+uniform vec4 object_plane_t;
vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
{
@@ -26,16 +58,16 @@ vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
- vary_normal = normalize(gl_NormalMatrix * gl_Normal);
+ vary_normal = normalize(normal_matrix * normal);
// Transform and pass tex coords
- gl_TexCoord[0].xy = texgen_object(gl_Vertex, gl_MultiTexCoord0, gl_TextureMatrix[0], gl_ObjectPlaneS[0], gl_ObjectPlaneT[0]).xy;
+ vary_texcoord0.xy = texgen_object(vec4(position, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy;
- vec4 t = gl_MultiTexCoord1;
+ vec4 t = vec4(texcoord1,0,1);
- gl_TexCoord[0].zw = t.xy;
- gl_TexCoord[1].xy = t.xy-vec2(2.0, 0.0);
- gl_TexCoord[1].zw = t.xy-vec2(1.0, 0.0);
+ vary_texcoord0.zw = t.xy;
+ vary_texcoord1.xy = t.xy-vec2(2.0, 0.0);
+ vary_texcoord1.zw = t.xy-vec2(1.0, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index de7e038402..ea98d6884c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -2,19 +2,48 @@
* @file treeF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
uniform sampler2D diffuseMap;
-varying vec3 vary_normal;
+VARYING vec4 vertex_color;
+VARYING vec3 vary_normal;
+VARYING vec2 vary_texcoord0;
+
+uniform float minimum_alpha;
void main()
{
- vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy);
- gl_FragData[0] = vec4(gl_Color.rgb*col.rgb, col.a <= 0.5 ? 0.0 : 0.005);
+ vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
+ if (col.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragData[0] = vec4(vertex_color.rgb*col.rgb, 0.0);
gl_FragData[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
new file mode 100644
index 0000000000..20d0170535
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
@@ -0,0 +1,49 @@
+/**
+ * @file treeShadowF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+VARYING vec4 post_pos;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a;
+
+ if (alpha < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragColor = vec4(1,1,1,1);
+
+ gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeShadowV.glsl
new file mode 100644
index 0000000000..e472a75304
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeShadowV.glsl
@@ -0,0 +1,45 @@
+/**
+ * @file treeShadowV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 post_pos;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ //transform vertex
+ vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
+
+ post_pos = pos;
+
+ gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
+
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
index a9bef4292d..3b6571a24a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeV.glsl
@@ -2,20 +2,46 @@
* @file treeV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+uniform mat3 normal_matrix;
-varying vec3 vary_normal;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec3 vary_normal;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
void main()
{
//transform vertex
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vary_normal = normalize(gl_NormalMatrix * gl_Normal);
+ vary_normal = normalize(normal_matrix * normal);
- gl_FrontColor = gl_Color;
+ vertex_color = vec4(1,1,1,1);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 2710422d32..4c9ea24a24 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -2,13 +2,33 @@
* @file waterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragData[3];
+#endif
+
vec3 scaleSoftClip(vec3 inColor);
vec3 atmosTransport(vec3 inColor);
@@ -40,10 +60,10 @@ uniform vec2 screen_res;
uniform mat4 norm_mat; //region space to screen space
//bigWave is (refCoord.w, view.w);
-varying vec4 refCoord;
-varying vec4 littleWave;
-varying vec4 view;
-varying vec4 vary_position;
+VARYING vec4 refCoord;
+VARYING vec4 littleWave;
+VARYING vec4 view;
+VARYING vec4 vary_position;
void main()
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
index 5397290b11..9734acf005 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterV.glsl
@@ -2,9 +2,31 @@
* @file waterV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
void calcAtmospherics(vec3 inPositionEye);
@@ -15,11 +37,11 @@ uniform float time;
uniform vec3 eyeVec;
uniform float waterHeight;
-varying vec4 refCoord;
-varying vec4 littleWave;
-varying vec4 view;
+VARYING vec4 refCoord;
+VARYING vec4 littleWave;
+VARYING vec4 view;
-varying vec4 vary_position;
+VARYING vec4 vary_position;
float wave(vec2 v, float t, float f, vec2 d, float s)
{
@@ -29,43 +51,42 @@ float wave(vec2 v, float t, float f, vec2 d, float s)
void main()
{
//transform vertex
- vec4 position = gl_Vertex;
- mat4 modelViewProj = gl_ModelViewProjectionMatrix;
+ vec4 pos = vec4(position.xyz, 1.0);
+ mat4 modelViewProj = modelview_projection_matrix;
vec4 oPosition;
//get view vector
vec3 oEyeVec;
- oEyeVec.xyz = position.xyz-eyeVec;
+ oEyeVec.xyz = pos.xyz-eyeVec;
float d = length(oEyeVec.xy);
float ld = min(d, 2560.0);
- position.xy = eyeVec.xy + oEyeVec.xy/d*ld;
+ pos.xy = eyeVec.xy + oEyeVec.xy/d*ld;
view.xyz = oEyeVec;
d = clamp(ld/1536.0-0.5, 0.0, 1.0);
d *= d;
- oPosition = position;
+ oPosition = vec4(position, 1.0);
oPosition.z = mix(oPosition.z, max(eyeVec.z*0.75, 0.0), d);
- vary_position = gl_ModelViewMatrix * oPosition;
+ vary_position = modelview_matrix * oPosition;
oPosition = modelViewProj * oPosition;
refCoord.xyz = oPosition.xyz + vec3(0,0,0.2);
//get wave position parameter (create sweeping horizontal waves)
- vec3 v = position.xyz;
+ vec3 v = pos.xyz;
v.x += (cos(v.x*0.08/*+time*0.01*/)+sin(v.y*0.02))*6.0;
//push position for further horizon effect.
- position.xyz = oEyeVec.xyz*(waterHeight/oEyeVec.z);
- position.w = 1.0;
- position = position*gl_ModelViewMatrix;
-
- calcAtmospherics((gl_ModelViewMatrix * gl_Vertex).xyz);
-
+ pos.xyz = oEyeVec.xyz*(waterHeight/oEyeVec.z);
+ pos.w = 1.0;
+ pos = modelview_matrix*pos;
+ calcAtmospherics(pos.xyz);
+
//pass wave parameters to pixel shader
vec2 bigWave = (v.xy) * vec2(0.04,0.04) + d1 * time * 0.055;
//get two normal map (detail map) texture coordinates
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
index 32f5f5f236..9a3d792224 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
@@ -2,13 +2,33 @@
* @file glowExtractF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseMap;
uniform float minLuminance;
uniform float maxExtractAlpha;
@@ -16,10 +36,11 @@ uniform vec3 lumWeights;
uniform vec3 warmthWeights;
uniform float warmthAmount;
+VARYING vec2 vary_texcoord0;
+
void main()
{
- vec4 col = texture2DRect(diffuseMap, gl_TexCoord[0].xy);
-
+ vec4 col = texture2DRect(diffuseMap, vary_texcoord0.xy);
/// CALCULATING LUMINANCE (Using NTSC lum weights)
/// http://en.wikipedia.org/wiki/Luma_%28video%29
float lum = smoothstep(minLuminance, minLuminance+1.0, dot(col.rgb, lumWeights ) );
@@ -27,4 +48,5 @@ void main()
gl_FragColor.rgb = col.rgb;
gl_FragColor.a = max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha);
+
}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl
deleted file mode 100644
index 9267a8585d..0000000000
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * @file glowExtractF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseMap;
-uniform float minLuminance;
-uniform float maxExtractAlpha;
-uniform vec3 lumWeights;
-uniform vec3 warmthWeights;
-uniform float warmthAmount;
-
-void main()
-{
- ivec2 itc = ivec2(gl_TexCoord[0].xy);
- vec4 fcol = vec4(0,0,0,0);
-
- for (int i = 0; i < samples; i++)
- {
- vec4 col = texelFetch(diffuseMap, itc, i);
-
- /// CALCULATING LUMINANCE (Using NTSC lum weights)
- /// http://en.wikipedia.org/wiki/Luma_%28video%29
- float lum = smoothstep(minLuminance, minLuminance+1.0, dot(col.rgb, lumWeights ) );
- float warmth = smoothstep(minLuminance, minLuminance+1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) );
-
- fcol += vec4(col.rgb, max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha));
- }
-
- gl_FragColor = fcol/samples;
-}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
index 76736fed53..1396dc6973 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
@@ -2,14 +2,37 @@
* @file glowExtractV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_texcoord0;
void main()
{
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = modelview_projection_matrix * vec4(position, 1.0);
- gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+ vary_texcoord0.xy = texcoord0;
}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
index d3225546b3..90bb84323c 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
@@ -2,14 +2,39 @@
* @file glowF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
uniform sampler2D diffuseMap;
uniform float glowStrength;
+VARYING vec4 vary_texcoord0;
+VARYING vec4 vary_texcoord1;
+VARYING vec4 vary_texcoord2;
+VARYING vec4 vary_texcoord3;
+
void main()
{
@@ -20,14 +45,14 @@ void main()
kern[0] = 0.25; kern[1] = 0.5; kern[2] = 0.8; kern[3] = 1.0;
kern[4] = 1.0; kern[5] = 0.8; kern[6] = 0.5; kern[7] = 0.25;
- col += kern[0] * texture2D(diffuseMap, gl_TexCoord[0].xy);
- col += kern[1] * texture2D(diffuseMap, gl_TexCoord[1].xy);
- col += kern[2] * texture2D(diffuseMap, gl_TexCoord[2].xy);
- col += kern[3] * texture2D(diffuseMap, gl_TexCoord[3].xy);
- col += kern[4] * texture2D(diffuseMap, gl_TexCoord[0].zw);
- col += kern[5] * texture2D(diffuseMap, gl_TexCoord[1].zw);
- col += kern[6] * texture2D(diffuseMap, gl_TexCoord[2].zw);
- col += kern[7] * texture2D(diffuseMap, gl_TexCoord[3].zw);
+ col += kern[0] * texture2D(diffuseMap, vary_texcoord0.xy);
+ col += kern[1] * texture2D(diffuseMap, vary_texcoord1.xy);
+ col += kern[2] * texture2D(diffuseMap, vary_texcoord2.xy);
+ col += kern[3] * texture2D(diffuseMap, vary_texcoord3.xy);
+ col += kern[4] * texture2D(diffuseMap, vary_texcoord0.zw);
+ col += kern[5] * texture2D(diffuseMap, vary_texcoord1.zw);
+ col += kern[6] * texture2D(diffuseMap, vary_texcoord2.zw);
+ col += kern[7] * texture2D(diffuseMap, vary_texcoord3.zw);
gl_FragColor = vec4(col.rgb * glowStrength, col.a);
}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
index 9bb41626ae..cdb2281578 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
@@ -2,23 +2,49 @@
* @file glowV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
uniform vec2 glowDelta;
+VARYING vec4 vary_texcoord0;
+VARYING vec4 vary_texcoord1;
+VARYING vec4 vary_texcoord2;
+VARYING vec4 vary_texcoord3;
+
void main()
{
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = modelview_projection_matrix * vec4(position, 1.0);
- gl_TexCoord[0].xy = gl_MultiTexCoord0.xy + glowDelta*(-3.5);
- gl_TexCoord[1].xy = gl_MultiTexCoord0.xy + glowDelta*(-2.5);
- gl_TexCoord[2].xy = gl_MultiTexCoord0.xy + glowDelta*(-1.5);
- gl_TexCoord[3].xy = gl_MultiTexCoord0.xy + glowDelta*(-0.5);
- gl_TexCoord[0].zw = gl_MultiTexCoord0.xy + glowDelta*(0.5);
- gl_TexCoord[1].zw = gl_MultiTexCoord0.xy + glowDelta*(1.5);
- gl_TexCoord[2].zw = gl_MultiTexCoord0.xy + glowDelta*(2.5);
- gl_TexCoord[3].zw = gl_MultiTexCoord0.xy + glowDelta*(3.5);
+ vary_texcoord0.xy = texcoord0 + glowDelta*(-3.5);
+ vary_texcoord1.xy = texcoord0 + glowDelta*(-2.5);
+ vary_texcoord2.xy = texcoord0 + glowDelta*(-1.5);
+ vary_texcoord3.xy = texcoord0 + glowDelta*(-0.5);
+ vary_texcoord0.zw = texcoord0 + glowDelta*(0.5);
+ vary_texcoord1.zw = texcoord0 + glowDelta*(1.5);
+ vary_texcoord2.zw = texcoord0 + glowDelta*(2.5);
+ vary_texcoord3.zw = texcoord0 + glowDelta*(3.5);
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
index cdc2ca3da2..18f6d91804 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
@@ -1,23 +1,64 @@
-/**
+/**
* @file terrainF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+VARYING vec4 vertex_color;
+VARYING vec4 vary_texcoord0;
+VARYING vec4 vary_texcoord1;
-uniform sampler2D detail0;
-uniform sampler2D detail1;
-uniform sampler2D alphaRamp;
+uniform sampler2D detail_0;
+uniform sampler2D detail_1;
+uniform sampler2D detail_2;
+uniform sampler2D detail_3;
+uniform sampler2D alpha_ramp;
-void main()
+vec3 atmosLighting(vec3 light);
+
+vec3 scaleSoftClip(vec3 color);
+
+void main()
{
- float a = texture2D(alphaRamp, gl_TexCoord[1].xy).a;
- vec3 color = mix(texture2D(detail1, gl_TexCoord[2].xy).rgb,
- texture2D(detail0, gl_TexCoord[0].xy).rgb,
- a);
+ /// Note: This should duplicate the blending functionality currently used for the terrain rendering.
+
+ /// TODO Confirm tex coords and bind them appropriately in vert shader.
+ vec4 color0 = texture2D(detail_0, vary_texcoord0.xy);
+ vec4 color1 = texture2D(detail_1, vary_texcoord0.xy);
+ vec4 color2 = texture2D(detail_2, vary_texcoord0.xy);
+ vec4 color3 = texture2D(detail_3, vary_texcoord0.xy);
- gl_FragColor.rgb = color;
- gl_FragColor.a = texture2D(alphaRamp, gl_TexCoord[3].xy).a;
+ float alpha1 = texture2D(alpha_ramp, vary_texcoord0.zw).a;
+ float alpha2 = texture2D(alpha_ramp,vary_texcoord1.xy).a;
+ float alphaFinal = texture2D(alpha_ramp, vary_texcoord1.zw).a;
+ vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
+
+ /// Add WL Components
+ outColor.rgb = atmosLighting(outColor.rgb * vertex_color.rgb);
+
+ gl_FragColor = vec4(scaleSoftClip(outColor.rgb), 1.0);
}
+
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
index 8af981915b..d09c5f9247 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
@@ -1,11 +1,46 @@
-/**
+/**
* @file terrainV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+uniform vec4 object_plane_t;
+uniform vec4 object_plane_s;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec2 texcoord1;
+
+VARYING vec4 vertex_color;
+VARYING vec4 vary_texcoord0;
+VARYING vec4 vary_texcoord1;
+
+void calcAtmospherics(vec3 inPositionEye);
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
@@ -26,17 +61,27 @@ vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
-
- vec4 pos = gl_ModelViewMatrix * gl_Vertex;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+
+ vec4 pos = modelview_matrix * vec4(position.xyz, 1.0);
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ /// Potentially better without it for water.
+ pos /= pos.w;
+
+ vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0));
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), gl_Color);
+ vertex_color = color;
+
+ // Transform and pass tex coords
+ vary_texcoord0.xy = texgen_object(vec4(position.xyz, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy;
- gl_FrontColor = color;
+ vec4 t = vec4(texcoord1,0,1);
- gl_TexCoord[0] = texgen_object(gl_Vertex,gl_MultiTexCoord0,gl_TextureMatrix[0],gl_ObjectPlaneS[0],gl_ObjectPlaneT[0]);
- gl_TexCoord[1] = gl_TextureMatrix[1]*gl_MultiTexCoord1;
- gl_TexCoord[2] = texgen_object(gl_Vertex,gl_MultiTexCoord2,gl_TextureMatrix[2],gl_ObjectPlaneS[2],gl_ObjectPlaneT[2]);
- gl_TexCoord[3] = gl_TextureMatrix[3]*gl_MultiTexCoord3;
+ vary_texcoord0.zw = t.xy;
+ vary_texcoord1.xy = t.xy-vec2(2.0, 0.0);
+ vary_texcoord1.zw = t.xy-vec2(1.0, 0.0);
}
+
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
index d94d986581..e5c7ced52c 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
@@ -1,25 +1,65 @@
-/**
+/**
* @file terrainWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-// this class1 shader is just a copy of terrainF
+VARYING vec4 vertex_color;
+VARYING vec4 vary_texcoord0;
+VARYING vec4 vary_texcoord1;
-uniform sampler2D detail0;
-uniform sampler2D detail1;
-uniform sampler2D alphaRamp;
+uniform sampler2D detail_0;
+uniform sampler2D detail_1;
+uniform sampler2D detail_2;
+uniform sampler2D detail_3;
+uniform sampler2D alpha_ramp;
-void main()
+vec3 atmosLighting(vec3 light);
+
+vec4 applyWaterFog(vec4 color);
+
+void main()
{
- float a = texture2D(alphaRamp, gl_TexCoord[1].xy).a;
- vec3 color = mix(texture2D(detail1, gl_TexCoord[2].xy).rgb,
- texture2D(detail0, gl_TexCoord[0].xy).rgb,
- a);
+ /// Note: This should duplicate the blending functionality currently used for the terrain rendering.
+
+ /// TODO Confirm tex coords and bind them appropriately in vert shader.
+ vec4 color0 = texture2D(detail_0, vary_texcoord0.xy);
+ vec4 color1 = texture2D(detail_1, vary_texcoord0.xy);
+ vec4 color2 = texture2D(detail_2, vary_texcoord0.xy);
+ vec4 color3 = texture2D(detail_3, vary_texcoord0.xy);
- gl_FragColor.rgb = color;
- gl_FragColor.a = texture2D(alphaRamp, gl_TexCoord[3].xy).a;
+ float alpha1 = texture2D(alpha_ramp, vary_texcoord0.zw).a;
+ float alpha2 = texture2D(alpha_ramp,vary_texcoord1.xy).a;
+ float alphaFinal = texture2D(alpha_ramp, vary_texcoord1.zw).a;
+ vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
+
+ /// Add WL Components
+ outColor.rgb = atmosLighting(outColor.rgb * vertex_color.rgb);
+
+ outColor = applyWaterFog(outColor);
+ gl_FragColor = outColor;
}
+
diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
index 06854fcc0a..1fdb90f792 100644
--- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
@@ -2,39 +2,103 @@
* @file underWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
uniform sampler2D screenTex;
+uniform sampler2D refTex;
+uniform sampler2D screenDepth;
+uniform vec4 fogCol;
+uniform vec3 lightDir;
+uniform vec3 specular;
+uniform float lightExp;
+uniform vec2 fbScale;
uniform float refScale;
+uniform float znear;
+uniform float zfar;
+uniform float kd;
+uniform vec4 waterPlane;
+uniform vec3 eyeVec;
uniform vec4 waterFogColor;
+uniform float waterFogDensity;
+uniform float waterFogKS;
+uniform vec2 screenRes;
//bigWave is (refCoord.w, view.w);
-varying vec4 refCoord;
-varying vec4 littleWave;
-varying vec4 view;
+VARYING vec4 refCoord;
+VARYING vec4 littleWave;
+VARYING vec4 view;
-void main()
+vec4 applyWaterFog(vec4 color, vec3 viewVec)
{
- vec4 color;
+ //normalize view vector
+ vec3 view = normalize(viewVec);
+ float es = -view.z;
+
+ //find intersection point with water plane and eye vector
- //get bigwave normal
- vec3 wavef = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0;
-
- //get detail normals
- vec3 dcol = texture2D(bumpMap, littleWave.xy).rgb*0.75;
- dcol += texture2D(bumpMap, littleWave.zw).rgb*1.25;
-
- //interpolate between big waves and little waves (big waves in deep water)
- wavef = (wavef+dcol)*0.5;
+ //get eye depth
+ float e0 = max(-waterPlane.w, 0.0);
+
+ //get object depth
+ float depth = length(viewVec);
+
+ //get "thickness" of water
+ float l = max(depth, 0.1);
- //crunch normal to range [-1,1]
- wavef -= vec3(1,1,1);
+ float kd = waterFogDensity;
+ float ks = waterFogKS;
+ vec4 kc = waterFogColor;
+
+ float F = 0.98;
+
+ float t1 = -kd * pow(F, ks * e0);
+ float t2 = kd + ks * es;
+ float t3 = pow(F, t2*l) - 1.0;
+
+ float L = min(t1/t2*t3, 1.0);
+
+ float D = pow(0.98, l*kd);
+ //return vec4(1.0, 0.0, 1.0, 1.0);
+ return color * D + kc * L;
+ //depth /= 10.0;
+ //return vec4(depth,depth,depth,0.0);
+}
+
+void main()
+{
+ vec4 color;
+
+ //get detail normals
+ vec3 wave1 = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0-1.0;
+ vec3 wave2 = texture2D(bumpMap, littleWave.xy).xyz*2.0-1.0;
+ vec3 wave3 = texture2D(bumpMap, littleWave.zw).xyz*2.0-1.0;
+ vec3 wavef = normalize(wave1+wave2+wave3);
//figure out distortion vector (ripply)
vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
@@ -42,6 +106,5 @@ void main()
vec4 fb = texture2D(screenTex, distort);
- gl_FragColor.rgb = mix(waterFogColor.rgb, fb.rgb, waterFogColor.a * 0.001 + 0.999);
- gl_FragColor.a = fb.a;
+ gl_FragColor = applyWaterFog(fb,view.xyz);
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 0f24e3c35a..444c896d38 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -2,23 +2,40 @@
* @file waterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
vec3 scaleSoftClip(vec3 inColor);
vec3 atmosTransport(vec3 inColor);
-vec3 applyWaterFog(vec4 inColor);
-uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
uniform sampler2D screenTex;
uniform sampler2D refTex;
uniform float sunAngle;
uniform float sunAngle2;
-uniform float scaledAngle;
uniform vec3 lightDir;
uniform vec3 specular;
uniform float lightExp;
@@ -29,67 +46,92 @@ uniform vec3 normScale;
uniform float fresnelScale;
uniform float fresnelOffset;
uniform float blurMultiplier;
-uniform vec4 fogCol;
+
//bigWave is (refCoord.w, view.w);
-varying vec4 refCoord;
-varying vec4 littleWave;
-varying vec4 view;
+VARYING vec4 refCoord;
+VARYING vec4 littleWave;
+VARYING vec4 view;
void main()
{
- vec3 viewVec = view.xyz;
vec4 color;
- float dist = length(viewVec.xy);
+ float dist = length(view.xy);
//normalize view vector
- viewVec = normalize(viewVec);
+ vec3 viewVec = normalize(view.xyz);
//get wave normals
- vec3 wavef = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0;
-
- //get detail normals
- vec3 dcol = texture2D(bumpMap, littleWave.xy).rgb*0.75;
- dcol += texture2D(bumpMap, littleWave.zw).rgb*1.25;
-
- //interpolate between big waves and little waves (big waves in deep water)
- wavef = (wavef + dcol) * 0.5;
-
- //crunch normal to range [-1,1]
- wavef -= vec3(1,1,1);
- wavef = normalize(wavef);
-
+ vec3 wave1 = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0-1.0;
+ vec3 wave2 = texture2D(bumpMap, littleWave.xy).xyz*2.0-1.0;
+ vec3 wave3 = texture2D(bumpMap, littleWave.zw).xyz*2.0-1.0;
//get base fresnel components
- float df = dot(viewVec,wavef) * fresnelScale + fresnelOffset;
+ vec3 df = vec3(
+ dot(viewVec, wave1),
+ dot(viewVec, (wave2 + wave3) * 0.5),
+ dot(viewVec, wave3)
+ ) * fresnelScale + fresnelOffset;
+ df *= df;
vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
float dist2 = dist;
dist = max(dist, 5.0);
+ float dmod = sqrt(dist);
+
+ vec2 dmod_scale = vec2(dmod*dmod, dmod);
+
//get reflected color
- vec2 refdistort = wavef.xy*dot(normScale, vec3(0.333));
- vec2 refvec = distort+refdistort/dist;
- vec4 refcol = texture2D(refTex, refvec);
+ vec2 refdistort1 = wave1.xy*normScale.x;
+ vec2 refvec1 = distort+refdistort1/dmod_scale;
+ vec4 refcol1 = texture2D(refTex, refvec1);
+
+ vec2 refdistort2 = wave2.xy*normScale.y;
+ vec2 refvec2 = distort+refdistort2/dmod_scale;
+ vec4 refcol2 = texture2D(refTex, refvec2);
+
+ vec2 refdistort3 = wave3.xy*normScale.z;
+ vec2 refvec3 = distort+refdistort3/dmod_scale;
+ vec4 refcol3 = texture2D(refTex, refvec3);
+
+ vec4 refcol = refcol1 + refcol2 + refcol3;
+ float df1 = df.x + df.y + df.z;
+ refcol *= df1 * 0.333;
+
+ vec3 wavef = (wave1 + wave2 * 0.4 + wave3 * 0.6) * 0.5;
+
+ wavef.z *= max(-viewVec.z, 0.1);
+ wavef = normalize(wavef);
+
+ float df2 = dot(viewVec, wavef) * fresnelScale+fresnelOffset;
+
+ vec2 refdistort4 = wavef.xy*0.125;
+ refdistort4.y -= abs(refdistort4.y);
+ vec2 refvec4 = distort+refdistort4/dmod;
+ float dweight = min(dist2*blurMultiplier, 1.0);
+ vec4 baseCol = texture2D(refTex, refvec4);
+ refcol = mix(baseCol*df2, refcol, dweight);
//get specular component
float spec = clamp(dot(lightDir, (reflect(viewVec,wavef))),0.0,1.0);
-
+
//harden specular
- spec = pow(spec, lightExp);
+ spec = pow(spec, 128.0);
//figure out distortion vector (ripply)
- vec2 distort2 = distort+wavef.xy*refScale/max(dist*df, 1.0);
+ vec2 distort2 = distort+wavef.xy*refScale/max(dmod*df1, 1.0);
vec4 fb = texture2D(screenTex, distort2);
//mix with reflection
- color.rgb = mix(mix(fogCol.rgb, fb.rgb, fogCol.a), refcol.rgb, df);
+ // Note we actually want to use just df1, but multiplying by 0.999999 gets around and nvidia compiler bug
+ color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999);
color.rgb += spec * specular;
- //color.rgb = applyWaterFog(color);//atmosTransport(color.rgb);
+ color.rgb = atmosTransport(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
color.a = spec * sunAngle2;
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index 630459b324..4bdfce9260 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
@@ -2,21 +2,73 @@
* @file waterFogF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform vec4 lightnorm;
+uniform vec4 waterPlane;
+uniform vec4 waterFogColor;
+uniform float waterFogDensity;
+uniform float waterFogKS;
+
+vec3 getPositionEye();
+
vec4 applyWaterFog(vec4 color)
{
- // GL_EXP2 Fog
- //float fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord);
- // GL_EXP Fog
- // float fog = exp(-gl_Fog.density * gl_FogFragCoord);
- // GL_LINEAR Fog
- float fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale;
- fog = clamp(fog, 0.0, 1.0);
- color.rgb = mix(gl_Fog.color.rgb, color.rgb, fog);
+ //normalize view vector
+ vec3 view = normalize(getPositionEye());
+ float es = -(dot(view, waterPlane.xyz));
+
+ //find intersection point with water plane and eye vector
+
+ //get eye depth
+ float e0 = max(-waterPlane.w, 0.0);
+
+ vec3 int_v = waterPlane.w > 0.0 ? view * waterPlane.w/es : vec3(0.0, 0.0, 0.0);
+
+ //get object depth
+ float depth = length(getPositionEye() - int_v);
+
+ //get "thickness" of water
+ float l = max(depth, 0.1);
+
+ float kd = waterFogDensity;
+ float ks = waterFogKS;
+ vec4 kc = waterFogColor;
+
+ float F = 0.98;
+
+ float t1 = -kd * pow(F, ks * e0);
+ float t2 = kd + ks * es;
+ float t3 = pow(F, t2*l) - 1.0;
+
+ float L = min(t1/t2*t3, 1.0);
+
+ float D = pow(0.98, l*kd);
+
+ color.rgb = color.rgb * D + kc.rgb * L;
+ color.a = kc.a + color.a;
+
return color;
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
index 831d6a761c..f66ba1d2d9 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
@@ -2,10 +2,31 @@
* @file waterV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
void calcAtmospherics(vec3 inPositionEye);
@@ -15,9 +36,9 @@ uniform float time;
uniform vec3 eyeVec;
uniform float waterHeight;
-varying vec4 refCoord;
-varying vec4 littleWave;
-varying vec4 view;
+VARYING vec4 refCoord;
+VARYING vec4 littleWave;
+VARYING vec4 view;
float wave(vec2 v, float t, float f, vec2 d, float s)
{
@@ -27,8 +48,7 @@ float wave(vec2 v, float t, float f, vec2 d, float s)
void main()
{
//transform vertex
- vec4 position = gl_Vertex;
- mat4 modelViewProj = gl_ModelViewProjectionMatrix;
+ mat4 modelViewProj = modelview_projection_matrix;
vec4 oPosition;
@@ -39,27 +59,29 @@ void main()
float d = length(oEyeVec.xy);
float ld = min(d, 2560.0);
- position.xy = eyeVec.xy + oEyeVec.xy/d*ld;
+ vec3 lpos = position;
+ lpos.xy = eyeVec.xy + oEyeVec.xy/d*ld;
view.xyz = oEyeVec;
d = clamp(ld/1536.0-0.5, 0.0, 1.0);
d *= d;
- oPosition = position;
+ oPosition = vec4(lpos, 1.0);
oPosition.z = mix(oPosition.z, max(eyeVec.z*0.75, 0.0), d);
oPosition = modelViewProj * oPosition;
refCoord.xyz = oPosition.xyz + vec3(0,0,0.2);
//get wave position parameter (create sweeping horizontal waves)
- vec3 v = position.xyz;
+ vec3 v = lpos;
v.x += (cos(v.x*0.08/*+time*0.01*/)+sin(v.y*0.02))*6.0;
//push position for further horizon effect.
- position.xyz = oEyeVec.xyz*(waterHeight/oEyeVec.z);
- position.w = 1.0;
- position = position*gl_ModelViewMatrix;
+ vec4 pos;
+ pos.xyz = oEyeVec.xyz*(waterHeight/oEyeVec.z);
+ pos.w = 1.0;
+ pos = modelview_matrix*pos;
- calcAtmospherics((gl_ModelViewMatrix * gl_Vertex).xyz);
+ calcAtmospherics(pos.xyz);
//pass wave parameters to pixel shader
diff --git a/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
new file mode 100644
index 0000000000..d2f5e1987a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
@@ -0,0 +1,46 @@
+/**
+ * @file alphamaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D diffuseMap;
+
+uniform float minimum_alpha;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec4 vertex_color;
+
+void main()
+{
+ vec4 col = vertex_color*texture2D(diffuseMap, vary_texcoord0.xy);
+ if (col.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragColor = col;
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl b/indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl
new file mode 100644
index 0000000000..3580d1f27b
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file alphamaskV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position, 1);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vertex_color = diffuse_color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl
new file mode 100644
index 0000000000..4b481ba834
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file customalphaF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D diffuseMap;
+
+uniform float custom_alpha;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ vec4 color = vertex_color*texture2D(diffuseMap, vary_texcoord0.xy);
+ color.a *= custom_alpha;
+ gl_FragColor = color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl
new file mode 100644
index 0000000000..890474d6d8
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file customalphaV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = texcoord0;
+ vertex_color = diffuse_color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/debugF.glsl b/indra/newview/app_settings/shaders/class1/interface/debugF.glsl
new file mode 100644
index 0000000000..6bcc97ba18
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/debugF.glsl
@@ -0,0 +1,35 @@
+/**
+ * @file debugF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform vec4 color;
+
+void main()
+{
+ gl_FragColor = color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl
new file mode 100644
index 0000000000..f4d704577a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl
@@ -0,0 +1,34 @@
+/**
+ * @file debugV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
new file mode 100644
index 0000000000..f67703b839
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file glowcombineF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2D glowMap;
+uniform sampler2DRect screenMap;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ gl_FragColor = texture2D(glowMap, vary_texcoord0.xy) +
+ texture2DRect(screenMap, vary_texcoord1.xy);
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
new file mode 100644
index 0000000000..c66a6e5b48
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file glowcombineFXAAF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRect diffuseRect;
+
+uniform vec2 screen_res;
+VARYING vec2 vary_tc;
+
+void main()
+{
+ vec3 col = texture2DRect(diffuseRect, vary_tc*screen_res).rgb;
+
+ gl_FragColor = vec4(col.rgb, dot(col.rgb, vec3(0.299, 0.587, 0.144)));
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl
new file mode 100644
index 0000000000..058f3b1b82
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl
@@ -0,0 +1,39 @@
+/**
+ * @file glowcombineFXAAV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+
+VARYING vec2 vary_tc;
+
+void main()
+{
+ vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ gl_Position = pos;
+
+ vary_tc = pos.xy*0.5+0.5;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl
new file mode 100644
index 0000000000..f7970b7f78
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file glowcombineV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec2 texcoord1;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = texcoord0;
+ vary_texcoord1 = texcoord1;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
index f6c6d945de..ecbc30f05f 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
@@ -2,14 +2,37 @@
* @file highlightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-
+uniform vec4 color;
uniform sampler2D diffuseMap;
+VARYING vec2 vary_texcoord0;
+
void main()
{
- gl_FragColor = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy);
+ gl_FragColor = color*texture2D(diffuseMap, vary_texcoord0.xy);
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
index f114f766bf..9bf7b60eb7 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
@@ -2,26 +2,39 @@
* @file highlightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_texcoord0;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
- pos = normalize(pos);
- float d = dot(pos, normalize(gl_NormalMatrix * gl_Normal));
- d *= d;
- d = 1.0 - d;
- d *= d;
-
- d = min(d, gl_Color.a*2.0);
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_FrontColor.rgb = gl_Color.rgb;
- gl_FrontColor.a = max(d, gl_Color.a);
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl
new file mode 100644
index 0000000000..85f819f4c2
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl
@@ -0,0 +1,33 @@
+/**
+ * @file occlusionF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+void main()
+{
+ gl_FragColor = vec4(1,1,1,1);
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl
new file mode 100644
index 0000000000..c26fa08ddc
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl
@@ -0,0 +1,34 @@
+/**
+ * @file uiV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+}
+
diff --git a/indra/newview/llmenucommands.h b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl
index fa845c6f02..fafeb5a7b4 100644
--- a/indra/newview/llmenucommands.h
+++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl
@@ -1,10 +1,9 @@
/**
- * @file llmenucommands.h
- * @brief Implementations of menu commands.
+ * @file onetexturenocolorF.glsl
*
- * $LicenseInfo:firstyear=2003&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2005, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -24,14 +23,15 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLMENUCOMMANDS_H
-#define LL_LLMENUCOMMANDS_H
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-class LLUUID;
+uniform sampler2D tex0;
-void handle_mouselook(void*);
-void handle_chat(void*);
-void handle_return_key(void*);
-void handle_slash_key(void*);
+VARYING vec2 vary_texcoord0;
-#endif
+void main()
+{
+ gl_FragColor = texture2D(tex0, vary_texcoord0.xy);
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl
new file mode 100644
index 0000000000..6b9986c8d7
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl
@@ -0,0 +1,38 @@
+/**
+ * @file onetexturenocolorV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position, 1);
+ vary_texcoord0 = texcoord0;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl
new file mode 100644
index 0000000000..f790122749
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl
@@ -0,0 +1,40 @@
+/**
+ * @file twotextureaddF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D tex0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ float alpha = texture2D(tex0, vary_texcoord0.xy).a * vertex_color.a;
+
+ gl_FragColor = vec4(vertex_color.rgb, alpha);
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl
new file mode 100644
index 0000000000..c58f9dfdaf
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file solidcolorV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vertex_color = diffuse_color;
+ vary_texcoord0 = texcoord0;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl
new file mode 100644
index 0000000000..a0bb255cfa
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl
@@ -0,0 +1,40 @@
+/**
+ * @file splattexturerectF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRect screenMap;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_FragColor = texture2DRect(screenMap, vary_texcoord0.xy) * vertex_color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl
new file mode 100644
index 0000000000..641d670c26
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file splattexturerectV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec4 diffuse_color;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = texcoord0;
+ vertex_color = diffuse_color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl
new file mode 100644
index 0000000000..cdb48163dd
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl
@@ -0,0 +1,39 @@
+/**
+ * @file twotextureaddF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D tex0;
+uniform sampler2D tex1;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ gl_FragColor = texture2D(tex0, vary_texcoord0.xy)+texture2D(tex1, vary_texcoord1.xy);
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl
new file mode 100644
index 0000000000..3c2f297f7f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file twotextureaddV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec2 texcoord1;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = texcoord0;
+ vary_texcoord1 = texcoord1;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/interface/uiF.glsl b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl
new file mode 100644
index 0000000000..36d6e06fc5
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl
@@ -0,0 +1,38 @@
+/**
+ * @file uiF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D diffuseMap;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec4 vertex_color;
+
+void main()
+{
+ gl_FragColor = vertex_color*texture2D(diffuseMap, vary_texcoord0.xy);
+}
diff --git a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl
new file mode 100644
index 0000000000..220dafef25
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file uiV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = modelview_projection_matrix * vec4(position, 1);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vertex_color = diffuse_color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
new file mode 100644
index 0000000000..10413bdeb0
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -0,0 +1,53 @@
+/**
+ * @file lightAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void default_lighting()
+{
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
new file mode 100644
index 0000000000..1164e5b0a6
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
@@ -0,0 +1,55 @@
+/**
+ * @file lightAlphaMaskNonIndexedF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void default_lighting()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
index 1796730c92..735f5b3813 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
@@ -2,16 +2,45 @@
* @file lightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-uniform sampler2D diffuseMap;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
void default_lighting()
{
- vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
gl_FragColor = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
new file mode 100644
index 0000000000..ba99c0ed71
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
@@ -0,0 +1,53 @@
+/**
+ * @file lightFullbrightAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void fullbright_lighting()
+{
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
index bfe0be9fdf..c3edc0bd70 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
@@ -2,16 +2,45 @@
* @file lightFullbrightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
-uniform sampler2D diffuseMap;
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
void fullbright_lighting()
{
- gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
new file mode 100644
index 0000000000..276fad4f44
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
@@ -0,0 +1,55 @@
+/**
+ * @file lightFullbrightNonIndexedAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+uniform sampler2D diffuseMap;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void fullbright_lighting()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedF.glsl
new file mode 100644
index 0000000000..4e1e664e6b
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedF.glsl
@@ -0,0 +1,48 @@
+/**
+ * @file lightFullbrightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+uniform sampler2D diffuseMap;
+
+void fullbright_lighting()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
index 6f1fe91007..c981e9eba2 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -2,16 +2,54 @@
* @file lightFullbrightShinyF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
-uniform sampler2D diffuseMap;
uniform samplerCube environmentMap;
-void fullbright_shiny_lighting()
+vec3 fullbrightShinyAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+void fullbright_shiny_lighting()
{
- gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ color.a = max(color.a, vertex_color.a);
+
+ gl_FragColor = color;
}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
new file mode 100644
index 0000000000..a4893f0359
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
@@ -0,0 +1,56 @@
+/**
+ * @file lightFullbrightShinyF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
+
+uniform samplerCube environmentMap;
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightShinyAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+void fullbright_shiny_lighting()
+{
+ vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ color.a = max(color.a, vertex_color.a);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
index 19072cd052..c10cde98e0 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
@@ -1,17 +1,53 @@
/**
* @file lightFullbrightShinyWaterF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
-uniform sampler2D diffuseMap;
uniform samplerCube environmentMap;
-void fullbright_shiny_lighting_water()
+vec3 fullbrightShinyAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void fullbright_shiny_lighting_water()
{
- gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.a = max(color.a, vertex_color.a);
+
+ gl_FragColor = applyWaterFog(color);
}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..e9b26087f4
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
@@ -0,0 +1,54 @@
+/**
+ * @file lightFullbrightShinyWaterF.glsl
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
+
+uniform samplerCube environmentMap;
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightShinyAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void fullbright_shiny_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.a = max(color.a, vertex_color.a);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
new file mode 100644
index 0000000000..754b2922d9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
@@ -0,0 +1,53 @@
+/**
+ * @file lightFullbrightWaterAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+vec4 diffuseLookup(vec2 texcoord);
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void fullbright_lighting_water()
+{
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
index 0ae6dc89e2..2547f9e750 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
@@ -2,16 +2,45 @@
* @file lightFullbrightWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
-uniform sampler2D diffuseMap;
+vec4 diffuseLookup(vec2 texcoord);
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec4 applyWaterFog(vec4 color);
void fullbright_lighting_water()
{
- gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
new file mode 100644
index 0000000000..f69b907dc7
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
@@ -0,0 +1,53 @@
+/**
+ * @file lightFullbrightWaterNonIndexedAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void fullbright_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..aa3ef8cdd9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedF.glsl
@@ -0,0 +1,46 @@
+/**
+ * @file lightFullbrightWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void fullbright_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
index 5d4bf2c33e..85cddc647d 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
@@ -2,6 +2,24 @@
* @file lightFuncSpecularV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
index 574252af12..a9288b3df6 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
@@ -2,6 +2,24 @@
* @file lightFuncV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl
new file mode 100644
index 0000000000..9f1a358b53
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightNonIndexedF.glsl
@@ -0,0 +1,48 @@
+/**
+ * @file lightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+uniform sampler2D diffuseMap;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+void default_lighting()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
index 29f575b7e5..e9c27dbefd 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
@@ -2,18 +2,53 @@
* @file lightShinyF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
-uniform sampler2D diffuseMap;
uniform samplerCube environmentMap;
-void shiny_lighting()
+vec3 scaleSoftClip(vec3 light);
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting()
{
- vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+ color.a = max(color.a, vertex_color.a);
gl_FragColor = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
new file mode 100644
index 0000000000..595ad74365
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
@@ -0,0 +1,55 @@
+/**
+ * @file lightShinyF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
+
+uniform samplerCube environmentMap;
+uniform sampler2D diffuseMap;
+
+vec3 scaleSoftClip(vec3 light);
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+ color.a = max(color.a, vertex_color.a);
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
index 65da5a6825..68c727d62c 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
@@ -2,18 +2,50 @@
* @file lightShinyWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
-uniform sampler2D diffuseMap;
uniform samplerCube environmentMap;
-void shiny_lighting_water()
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting_water()
{
- vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
- gl_FragColor = color;
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+ color.a = max(color.a, vertex_color.a);
+ gl_FragColor = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..f32b9e1958
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
@@ -0,0 +1,52 @@
+/**
+ * @file lightShinyWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
+ color.rgb *= vertex_color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+ color.a = max(color.a, vertex_color.a);
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
index d491f1102e..24bf9b3cee 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
@@ -1,28 +1,36 @@
/**
- * @file lightV.glsl
+ * @file lightSpecularV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-float calcDirectionalLight(vec3 n, vec3 l);
+// All lights, no specular highlights
+
+vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
-// Same as non-specular lighting in lightV.glsl
vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
{
- specularColor.rgb = vec3(0.0, 0.0, 0.0);
- vec4 col;
- col.a = color.a;
-
- col.rgb = gl_LightModel.ambient.rgb + baseCol.rgb;
-
- col.rgb += gl_LightSource[0].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[0].position.xyz);
- col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
-
- col.rgb = min(col.rgb*color.rgb, 1.0);
-
- return col;
+ return sumLightsSpecular(pos, norm, color, specularColor, baseCol);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
index ef38ee9699..8045809b82 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
@@ -2,25 +2,35 @@
* @file lightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-float calcDirectionalLight(vec3 n, vec3 l);
+// All lights, no specular highlights
+
+vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight);
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
{
- vec4 col;
- col.a = color.a;
-
- col.rgb = gl_LightModel.ambient.rgb + baseLight.rgb;
-
- col.rgb += gl_LightSource[0].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[0].position.xyz);
- col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
-
- col.rgb = min(col.rgb*color.rgb, 1.0);
-
- return col;
+ return sumLights(pos, norm, color, baseLight);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
new file mode 100644
index 0000000000..103dd633c9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
@@ -0,0 +1,51 @@
+/**
+ * @file lightWaterAlphaMaskF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void default_lighting_water()
+{
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = atmosLighting(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
new file mode 100644
index 0000000000..bef72752da
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
@@ -0,0 +1,55 @@
+/**
+ * @file lightWaterAlphaMaskNonIndexedF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void default_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color = applyWaterFog(color);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
index 286c92326b..e9537d1e9d 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
@@ -2,16 +2,43 @@
* @file lightWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-uniform sampler2D diffuseMap;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
-void default_lighting_water()
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void default_lighting_water()
{
- vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
- gl_FragColor = color;
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl
new file mode 100644
index 0000000000..8b0c25b705
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterNonIndexedF.glsl
@@ -0,0 +1,46 @@
+/**
+ * @file lightWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+uniform sampler2D diffuseMap;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void default_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
index 772a420e33..7059ff31ae 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
@@ -2,6 +2,24 @@
* @file sumLightsSpecularV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -13,21 +31,22 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 atmosGetDiffuseSunlightColor();
vec3 scaleDownLight(vec3 light);
+uniform vec4 light_position[8];
+uniform vec3 light_diffuse[8];
+
vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
{
- vec4 col;
- col.a = color.a;
-
-
+ vec4 col = vec4(0,0,0, color.a);
+
vec3 view = normalize(pos);
/// collect all the specular values from each calcXXXLightSpecular() function
vec4 specularSum = vec4(0.0);
- col.rgb = gl_LightSource[1].diffuse.rgb * calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[1].position.xyz, gl_LightSource[1].diffuse.rgb, 1.0);
+ col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0);
col.rgb = scaleDownLight(col.rgb);
col.rgb += atmosAmbient(baseCol.rgb);
- col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, gl_LightSource[0].position.xyz,atmosGetDiffuseSunlightColor() * baseCol.a, 1.0));
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz,atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
col.rgb = min(col.rgb * color.rgb, 1.0);
specularColor.rgb = min(specularColor.rgb * specularSum.rgb, 1.0);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
index da60a3ddf5..41288c21c1 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
@@ -2,10 +2,29 @@
* @file sumLightsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform vec4 light_position[8];
+uniform vec3 light_diffuse[8];
float calcDirectionalLight(vec3 n, vec3 l);
@@ -18,10 +37,10 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
vec4 col;
col.a = color.a;
- col.rgb = gl_LightSource[1].diffuse.rgb * calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
+ col.rgb = light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz);
col.rgb = scaleDownLight(col.rgb);
col.rgb += atmosAmbient(baseLight.rgb);
- col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, gl_LightSource[0].position.xyz));
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));
col.rgb = min(col.rgb*color.rgb, 1.0);
diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl
new file mode 100644
index 0000000000..4b85d61aca
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file bumpF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D texture0;
+uniform sampler2D texture1;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ float tex0 = texture2D(texture0, vary_texcoord0.xy).a;
+ float tex1 = texture2D(texture1, vary_texcoord1.xy).a;
+
+ gl_FragColor = vec4(tex0+(1.0-tex1)-0.5);
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
new file mode 100644
index 0000000000..a7738087dc
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file bumpV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec2 texcoord1;
+
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+
+void main()
+{
+ //transform vertex
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
new file mode 100644
index 0000000000..8494ffba52
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
@@ -0,0 +1,58 @@
+/**
+ * @file emissiveSkinnedV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 projection_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 emissive;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
+void calcAtmospherics(vec3 inPositionEye);
+mat4 getObjectSkinnedTransform();
+
+void main()
+{
+ //transform vertex
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ mat4 mat = getObjectSkinnedTransform();
+
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
+
+ calcAtmospherics(pos.xyz);
+
+ vertex_color = emissive;
+
+ gl_Position = projection_matrix*vec4(pos, 1.0);
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl
new file mode 100644
index 0000000000..e984deb0c8
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl
@@ -0,0 +1,56 @@
+/**
+ * @file emissiveV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec4 emissive;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void calcAtmospherics(vec3 inPositionEye);
+
+
+
+
+void main()
+{
+ //transform vertex
+ passTextureIndex();
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0));
+ calcAtmospherics(pos.xyz);
+
+ vertex_color = emissive;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
index c0b72115dd..a54c0caf81 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
@@ -2,7 +2,25 @@
* @file fullbrightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$F
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightNoColorV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightNoColorV.glsl
new file mode 100644
index 0000000000..5d6f14230c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightNoColorV.glsl
@@ -0,0 +1,53 @@
+/**
+ * @file fullbrightNoColorV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
+void calcAtmospherics(vec3 inPositionEye);
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(position.xyz,1.0);
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ calcAtmospherics(pos.xyz);
+
+ vertex_color = vec4(1,1,1,1);
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
index 391c06edc8..b312665032 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
@@ -2,6 +2,24 @@
* @file fullbrightShinyF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl
index f44a5ce32e..79b552ee1a 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinySkinnedV.glsl
@@ -1,39 +1,67 @@
/**
* @file shinySimpleSkinnedV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
+uniform mat4 texture_matrix0;
+uniform mat4 texture_matrix1;
+uniform mat4 modelview_matrix;
+uniform mat4 projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
void calcAtmospherics(vec3 inPositionEye);
mat4 getObjectSkinnedTransform();
-attribute vec4 object_weight;
-
void main()
{
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
- vec4 norm = gl_Vertex;
- norm.xyz += gl_Normal.xyz;
+ vec4 norm = vec4(position.xyz, 1.0);
+ norm.xyz += normal.xyz;
norm.xyz = (mat*norm).xyz;
norm.xyz = normalize(norm.xyz-pos.xyz);
vec3 ref = reflect(pos.xyz, -norm.xyz);
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz;
calcAtmospherics(pos.xyz);
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
+
+ gl_Position = projection_matrix*vec4(pos, 1.0);
- gl_Position = gl_ProjectionMatrix*vec4(pos, 1.0);
- gl_FogFragCoord = pos.z;
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
index 31e0f0a429..34bd8d445a 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
@@ -2,30 +2,66 @@
* @file fullbrightShinyV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 texture_matrix1;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
void calcAtmospherics(vec3 inPositionEye);
uniform vec4 origin;
+
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
+
+
void main()
{
//transform vertex
- gl_Position = ftransform();
+ vec4 vert = vec4(position.xyz,1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 norm = normalize(normal_matrix * normal);
vec3 ref = reflect(pos.xyz, -norm);
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz;
calcAtmospherics(pos.xyz);
- gl_FrontColor = gl_Color;
-
- gl_FogFragCoord = pos.z;
+ vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl
index 8ffb252f57..e1f3919907 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl
@@ -1,8 +1,25 @@
/**
* @file fullbrightShinyWaterF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl
index e5dafa8c78..eff75435a9 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightSkinnedV.glsl
@@ -1,37 +1,57 @@
/**
* @file fullbrightSkinnedV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
+uniform mat4 projection_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
void calcAtmospherics(vec3 inPositionEye);
mat4 getObjectSkinnedTransform();
-attribute vec4 object_weight;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
void main()
{
//transform vertex
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
- vec4 norm = gl_Vertex;
- norm.xyz += gl_Normal.xyz;
- norm.xyz = (mat*norm).xyz;
- norm.xyz = normalize(norm.xyz-pos.xyz);
-
calcAtmospherics(pos.xyz);
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
- gl_Position = gl_ProjectionMatrix*vec4(pos, 1.0);
+ gl_Position = projection_matrix*vec4(pos, 1.0);
- gl_FogFragCoord = pos.z;
+
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
index 3382384c99..fc20d3270e 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
@@ -2,24 +2,57 @@
* @file fullbrightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
void calcAtmospherics(vec3 inPositionEye);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
void main()
{
//transform vertex
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vec4 vert = vec4(position.xyz,1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
-
calcAtmospherics(pos.xyz);
- gl_FrontColor = gl_Color;
+ vertex_color = diffuse_color;
- gl_FogFragCoord = pos.z;
+
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
index 220f26614f..5d0ea0a8dd 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
@@ -2,6 +2,24 @@
* @file fullbrightWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
new file mode 100644
index 0000000000..3c6e22b295
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
@@ -0,0 +1,46 @@
+/**
+ * @file impostorF.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform float minimum_alpha;
+
+uniform sampler2D diffuseMap;
+
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
+
+ if (color.a < minimum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragColor = color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/impostorV.glsl b/indra/newview/app_settings/shaders/class1/objects/impostorV.glsl
new file mode 100644
index 0000000000..e90dbb115a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/impostorV.glsl
@@ -0,0 +1,40 @@
+/**
+ * @file impostorV.glsl
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_projection_matrix;
+
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ //transform vertex
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/indexedTextureF.glsl b/indra/newview/app_settings/shaders/class1/objects/indexedTextureF.glsl
new file mode 100644
index 0000000000..254c1d4fc2
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/indexedTextureF.glsl
@@ -0,0 +1,33 @@
+/**
+ * @file fullbrightF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+
+
+
+void main()
+{
+ fullbright_lighting();
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl b/indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl
new file mode 100644
index 0000000000..a95c9e0ab9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/indexedTextureV.glsl
@@ -0,0 +1,34 @@
+/**
+ * @file indexedTextureV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+ATTRIBUTE float texture_index;
+
+VARYING float vary_texture_index;
+
+void passTextureIndex()
+{
+ vary_texture_index = texture_index;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/objects/nonindexedTextureV.glsl b/indra/newview/app_settings/shaders/class1/objects/nonindexedTextureV.glsl
new file mode 100644
index 0000000000..80ea286ac0
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/nonindexedTextureV.glsl
@@ -0,0 +1,31 @@
+/**
+ * @file nonindexedTextureV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+void passTextureIndex()
+{
+
+}
+
+
diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
new file mode 100644
index 0000000000..5dcfa87066
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
@@ -0,0 +1,57 @@
+/**
+ * @file previewV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+void main()
+{
+ //transform vertex
+ vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0));
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
+ vertex_color = color;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
index d079de5377..f8f88e2577 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
@@ -2,6 +2,24 @@
* @file shinyF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl
index cd655f3bb5..591d6fc5c9 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinySimpleSkinnedV.glsl
@@ -1,39 +1,66 @@
/**
* @file shinySimpleSkinnedV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
+uniform mat4 projection_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 texture_matrix1;
+uniform mat4 modelview_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
mat4 getObjectSkinnedTransform();
-attribute vec4 object_weight;
-
void main()
{
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
- vec4 norm = gl_Vertex;
- norm.xyz += gl_Normal.xyz;
+ vec4 norm = vec4(position.xyz, 1.0);
+ norm.xyz += normal.xyz;
norm.xyz = (mat*norm).xyz;
norm.xyz = normalize(norm.xyz-pos.xyz);
vec3 ref = reflect(pos.xyz, -norm.xyz);
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz;
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm.xyz, gl_Color, vec4(0.));
- gl_FrontColor = color;
+ vec4 color = calcLighting(pos.xyz, norm.xyz, diffuse_color, vec4(0.));
+ vertex_color = color;
- gl_Position = gl_ProjectionMatrix*vec4(pos, 1.0);
+ gl_Position = projection_matrix*vec4(pos, 1.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
index 68a086dbc1..fdb3453cc5 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
@@ -1,11 +1,45 @@
-/**
+/**
* @file shinyV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 texture_matrix1;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING vec3 vary_texcoord1;
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -14,19 +48,18 @@ uniform vec4 origin;
void main()
{
//transform vertex
- gl_Position = ftransform();
-
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec4 vert = vec4(position.xyz,1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+
+ vec3 norm = normalize(normal_matrix * normal);
+ vec3 ref = reflect(pos.xyz, -norm);
+
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ vary_texcoord1 = (texture_matrix1*vec4(ref,1.0)).xyz;
calcAtmospherics(pos.xyz);
-
- gl_FrontColor = gl_Color;
-
- vec3 ref = reflect(pos.xyz, -norm);
-
- gl_TexCoord[0] = gl_TextureMatrix[0]*vec4(ref,1.0);
-
- gl_FogFragCoord = pos.z;
-}
+ vertex_color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.0));
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
index 4649d1c47c..1e72e23eef 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
@@ -2,6 +2,24 @@
* @file shinyWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
index b4e4dcfbbf..29a2ce617b 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
@@ -2,6 +2,24 @@
* @file simpleF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
new file mode 100644
index 0000000000..0be52a52af
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
@@ -0,0 +1,59 @@
+/**
+ * @file simpleNoColorV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+uniform vec4 color;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+void main()
+{
+ //transform vertex
+ vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0));
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.));
+ vertex_color = col;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleNonIndexedV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleNonIndexedV.glsl
new file mode 100644
index 0000000000..cb80697d15
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleNonIndexedV.glsl
@@ -0,0 +1,61 @@
+/**
+ * @file simpleNonIndexedV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(position.xyz,1.0);
+
+ gl_Position = modelview_projection_matrix*vert;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
+
+ vec4 pos = (modelview_matrix * vert);
+
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
+ vertex_color = color;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl
index 900448035c..1c6e53b187 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleSkinnedV.glsl
@@ -1,39 +1,65 @@
/**
* @file simpleSkinnedV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
mat4 getObjectSkinnedTransform();
-attribute vec4 object_weight;
-
void main()
{
//transform vertex
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
- vec4 norm = gl_Vertex;
- norm.xyz += gl_Normal.xyz;
+ vec4 norm = vec4(position.xyz, 1.0);
+ norm.xyz += normal.xyz;
norm.xyz = (mat*norm).xyz;
norm.xyz = normalize(norm.xyz-pos.xyz);
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm.xyz, gl_Color, vec4(0.));
- gl_FrontColor = color;
+ vec4 color = calcLighting(pos.xyz, norm.xyz, diffuse_color, vec4(0.));
+ vertex_color = color;
+
+ gl_Position = projection_matrix*vec4(pos, 1.0);
- gl_Position = gl_ProjectionMatrix*vec4(pos, 1.0);
- gl_FogFragCoord = pos.z;
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
new file mode 100644
index 0000000000..d4dee78793
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
@@ -0,0 +1,77 @@
+/**
+ * @file simpleV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+
+uniform vec4 color;
+uniform vec4 object_plane_t;
+uniform vec4 object_plane_s;
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
+{
+ vec4 tcoord;
+
+ tcoord.x = dot(vpos, tp0);
+ tcoord.y = dot(vpos, tp1);
+ tcoord.z = tc.z;
+ tcoord.w = tc.w;
+
+ tcoord = mat * tcoord;
+
+ return tcoord;
+}
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(position.xyz,1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ vary_texcoord0.xy = texgen_object(vec4(position.xyz, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy;
+
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, color, vec4(0.));
+ vertex_color = color;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
index b493f76fcc..37a20383e2 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
@@ -2,28 +2,63 @@
* @file simpleV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
void main()
{
//transform vertex
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vec4 vert = vec4(position.xyz,1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
+
- vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 norm = normalize(normal_matrix * normal);
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
- gl_FrontColor = color;
+ vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
+ vertex_color = color;
- gl_FogFragCoord = pos.z;
+
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
index 4ec5ee43b4..2e87ac5bbc 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
@@ -2,6 +2,24 @@
* @file simpleWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/objects/treeV.glsl b/indra/newview/app_settings/shaders/class1/objects/treeV.glsl
new file mode 100644
index 0000000000..fa01a27ec0
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/treeV.glsl
@@ -0,0 +1,60 @@
+/**
+ * @file treeV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(position.xyz,1.0);
+
+ gl_Position = modelview_projection_matrix*vert;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
+
+ vec4 pos = (modelview_matrix * vert);
+
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
+ vertex_color = color;
+
+
+}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
index 3d05850ab3..aacc503e13 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
@@ -2,6 +2,24 @@
* @file atmosphericsF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
index f1a0af21af..6ff860362c 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -2,24 +2,43 @@
* @file atmosphericsHelpersV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform vec4 sunlight_color_copy;
+uniform vec4 light_ambient;
vec3 atmosAmbient(vec3 light)
{
- return gl_LightModel.ambient.rgb + light;
+ return light + light_ambient.rgb;
}
vec3 atmosAffectDirectionalLight(float lightIntensity)
{
- return gl_LightSource[0].diffuse.rgb * lightIntensity;
+ return sunlight_color_copy.rgb * lightIntensity;
}
vec3 atmosGetDiffuseSunlightColor()
{
- return gl_LightSource[0].diffuse.rgb;
+ return sunlight_color_copy.rgb;
}
vec3 scaleDownLight(vec3 light)
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
index 73bbd57315..76d7d5059d 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
@@ -2,6 +2,24 @@
* @file atmosphericsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
index e0eb7b3767..8bdae328bd 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
@@ -2,14 +2,29 @@
* @file atmosphericVarsF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-varying vec3 vary_PositionEye;
-
vec3 getPositionEye()
{
- return vary_PositionEye;
+ return vec3(0,0,0);
}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
index a251213ff5..8ec9ae617c 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
@@ -2,20 +2,35 @@
* @file atmosphericVarsV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-varying vec3 vary_PositionEye;
-
-
vec3 getPositionEye()
{
- return vary_PositionEye;
+ return vec3(0,0,0);
}
void setPositionEye(vec3 v)
{
- vary_PositionEye = v;
+
}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl
new file mode 100644
index 0000000000..636d4af006
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl
@@ -0,0 +1,33 @@
+/**
+ * @file atmosphericVarsWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+
+VARYING vec3 vary_PositionEye;
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
new file mode 100644
index 0000000000..8afcc20f6d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
@@ -0,0 +1,37 @@
+/**
+ * @file atmosphericVarsWaterV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+
+VARYING vec3 vary_PositionEye;
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+
+void setPositionEye(vec3 v)
+{
+ vary_PositionEye = v;
+}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
index 4958cb2f72..62f4e51449 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
@@ -2,6 +2,24 @@
* @file gammaF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
index 75929bc609..7c95ecdb14 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
@@ -2,6 +2,24 @@
* @file transportF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
index 3e8b719f93..5af9f5c902 100644
--- a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
@@ -2,9 +2,39 @@
* @file eyeballV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
@@ -13,20 +43,20 @@ void calcAtmospherics(vec3 inPositionEye);
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
- vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 pos = (modelview_matrix * vec4(position.xyz, 1.0)).xyz;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ vec3 norm = normalize(normal_matrix * normal);
calcAtmospherics(pos.xyz);
// vec4 specular = specularColor;
vec4 specular = vec4(1.0);
- vec4 color = calcLightingSpecular(pos, norm, gl_Color, specular, vec4(0.0));
+ vec4 color = calcLightingSpecular(pos, norm, diffuse_color, specular, vec4(0.0));
- gl_FrontColor = color;
- gl_FogFragCoord = pos.z;
+ vertex_color = color;
+
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 681e52de2a..8d88e93698 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -2,13 +2,36 @@
* @file alphaF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
@@ -23,11 +46,11 @@ uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
uniform float shadow_bias;
@@ -104,9 +127,9 @@ void main()
}
}
- vec4 diff = diffuseLookup(gl_TexCoord[0].xy);
+ vec4 diff = diffuseLookup(vary_texcoord0.xy);
- vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, gl_Color.a);
+ vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, vertex_color.a);
vec4 color = diff * col;
color.rgb = atmosLighting(color.rgb);
@@ -115,10 +138,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
- //gl_FragColor = gl_Color;
gl_FragColor = color;
- //gl_FragColor.r = 0.0;
- //gl_FragColor = vec4(1,shadow,1,1);
-
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
index 5350359f75..0df557f2aa 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
@@ -2,13 +2,33 @@
* @file alphaF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRectShadow shadowMap0;
uniform sampler2DRectShadow shadowMap1;
uniform sampler2DRectShadow shadowMap2;
@@ -24,11 +44,13 @@ uniform vec2 shadow_res;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
+VARYING vec2 vary_texcoord0;
+VARYING vec4 vertex_color;
uniform float shadow_bias;
@@ -105,9 +127,9 @@ void main()
}
}
- vec4 diff = texture2D(diffuseMap,gl_TexCoord[0].xy);
+ vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
- vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, gl_Color.a);
+ vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, vertex_color.a);
vec4 color = diff * col;
color.rgb = atmosLighting(color.rgb);
@@ -116,10 +138,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
- //gl_FragColor = gl_Color;
- gl_FragColor = color;
- //gl_FragColor.r = 0.0;
- //gl_FragColor = vec4(1,shadow,1,1);
-
+ gl_FragColor = color;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
new file mode 100644
index 0000000000..331dbc7079
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
@@ -0,0 +1,142 @@
+/**
+ * @file alphaNonIndexedNoColorF.glsl
+ *
+ * $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRectShadow shadowMap0;
+uniform sampler2DRectShadow shadowMap1;
+uniform sampler2DRectShadow shadowMap2;
+uniform sampler2DRectShadow shadowMap3;
+uniform sampler2DRect depthMap;
+uniform sampler2D diffuseMap;
+
+uniform mat4 shadow_matrix[6];
+uniform vec4 shadow_clip;
+uniform vec2 screen_res;
+uniform vec2 shadow_res;
+
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
+VARYING vec2 vary_texcoord0;
+
+uniform float shadow_bias;
+
+uniform mat4 inv_proj;
+
+vec4 getPosition(vec2 pos_screen)
+{
+ float depth = texture2DRect(depthMap, pos_screen.xy).a;
+ vec2 sc = pos_screen.xy*2.0;
+ sc /= screen_res;
+ sc -= vec2(1.0,1.0);
+ vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
+ vec4 pos = inv_proj * ndc;
+ pos.xyz /= pos.w;
+ pos.w = 1.0;
+ return pos;
+}
+
+float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
+{
+ stc.xyz /= stc.w;
+ stc.z += shadow_bias;
+
+ float cs = shadow2DRect(shadowMap, stc.xyz).x;
+ float shadow = cs;
+
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, scl, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, -scl, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, scl, 0.0)).x, cs);
+ shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, -scl, 0.0)).x, cs);
+
+ return shadow/5.0;
+}
+
+
+void main()
+{
+ vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
+ frag *= screen_res;
+
+ float shadow = 1.0;
+ vec4 pos = vec4(vary_position, 1.0);
+
+ vec4 spos = pos;
+
+ if (spos.z > -shadow_clip.w)
+ {
+ vec4 lpos;
+
+ if (spos.z < -shadow_clip.z)
+ {
+ lpos = shadow_matrix[3]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap3, lpos, 1.5);
+ shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0);
+ }
+ else if (spos.z < -shadow_clip.y)
+ {
+ lpos = shadow_matrix[2]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap2, lpos, 1.5);
+ }
+ else if (spos.z < -shadow_clip.x)
+ {
+ lpos = shadow_matrix[1]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap1, lpos, 1.5);
+ }
+ else
+ {
+ lpos = shadow_matrix[0]*spos;
+ lpos.xy *= shadow_res;
+ shadow = pcfShadow(shadowMap0, lpos, 1.5);
+ }
+ }
+
+ vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
+
+ vec4 col = vec4(vary_ambient + vary_directional.rgb*shadow, 1.0);
+ vec4 color = diff * col;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+
+ color.rgb += diff.rgb * vary_pointlight_col.rgb;
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
index 948a52da5b..5a3955ef00 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl
@@ -1,11 +1,36 @@
/**
* @file alphaSkinnedV.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -17,16 +42,25 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
uniform float near_clip;
uniform float shadow_offset;
uniform float shadow_bias;
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
@@ -59,56 +93,56 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
mat4 mat = getObjectSkinnedTransform();
- mat = gl_ModelViewMatrix * mat;
+ mat = modelview_matrix * mat;
- vec3 pos = (mat*gl_Vertex).xyz;
+ vec3 pos = (mat*vec4(position, 1.0)).xyz;
- gl_Position = gl_ProjectionMatrix * vec4(pos, 1.0);
+ gl_Position = projection_matrix * vec4(pos, 1.0);
- vec4 n = gl_Vertex;
- n.xyz += gl_Normal.xyz;
+ vec4 n = vec4(position, 1.0);
+ n.xyz += normal.xyz;
n.xyz = (mat*n).xyz;
n.xyz = normalize(n.xyz-pos.xyz);
vec3 norm = n.xyz;
- float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));
- vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset;
+ float dp_directional_light = max(0.0, dot(norm, light_position[0].xyz));
+ vary_position = pos.xyz + light_position[0].xyz * (1.0-dp_directional_light)*shadow_offset;
calcAtmospherics(pos.xyz);
- //vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
- vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a);
+ //vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
+ vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a);
// Collect normal lights
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a);
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].y, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].y, light_attenuation[3].z);
+ col.rgb += light_diffuse[4].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[4], light_direction[4], light_attenuation[4].x, light_attenuation[4].y, light_attenuation[4].z);
+ col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].y, light_attenuation[5].z);
+ col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
+ col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb*gl_Color.rgb;
+ vary_pointlight_col = col.rgb*diffuse_color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb*gl_Color.rgb;
- vary_directional.rgb = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a)));
+ vary_ambient = col.rgb*diffuse_color.rgb;
+ vary_directional.rgb = diffuse_color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), (1.0-diffuse_color.a)*(1.0-diffuse_color.a)));
- col.rgb = min(col.rgb*gl_Color.rgb, 1.0);
+ col.rgb = min(col.rgb*diffuse_color.rgb, 1.0);
- gl_FrontColor = col;
+ vertex_color = col;
- gl_FogFragCoord = pos.z;
- pos.xyz = (gl_ModelViewProjectionMatrix * gl_Vertex).xyz;
+
+ pos.xyz = (modelview_projection_matrix * vec4(position.xyz, 1.0)).xyz;
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index f616ecc872..9540ddd2e8 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -2,10 +2,37 @@
* @file alphaV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec4 diffuse_color;
+ATTRIBUTE vec2 texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -17,17 +44,25 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_position;
-varying vec3 vary_pointlight_col;
-varying float vary_texture_index;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_position;
+VARYING vec3 vary_pointlight_col;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
uniform float near_clip;
uniform float shadow_offset;
uniform float shadow_bias;
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
@@ -61,48 +96,49 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
//transform vertex
- vec4 vert = vec4(gl_Vertex.xyz, 1.0);
- vary_texture_index = gl_Vertex.w;
- gl_Position = gl_ModelViewProjectionMatrix * vert;
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ vec4 vert = vec4(position.xyz, 1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
- vec4 pos = (gl_ModelViewMatrix * vert);
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ vec3 norm = normalize(normal_matrix * normal);
- float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));
- vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset;
+ float dp_directional_light = max(0.0, dot(norm, light_position[0].xyz));
+ vary_position = pos.xyz + light_position[0].xyz * (1.0-dp_directional_light)*shadow_offset;
calcAtmospherics(pos.xyz);
- //vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
- vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a);
+ //vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
+ vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a);
- // Collect normal lights
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a);
- vary_pointlight_col = col.rgb*gl_Color.rgb;
+ // Collect normal lights
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].y, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].y, light_attenuation[3].z);
+ col.rgb += light_diffuse[4].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[4], light_direction[4], light_attenuation[4].x, light_attenuation[4].y, light_attenuation[4].z);
+ col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].y, light_attenuation[5].z);
+ col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
+ col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
+
+ vary_pointlight_col = col.rgb*diffuse_color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb*gl_Color.rgb;
- vary_directional.rgb = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a)));
+ vary_ambient = col.rgb*diffuse_color.rgb;
+ vary_directional.rgb = diffuse_color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), (1.0-diffuse_color.a)*(1.0-diffuse_color.a)));
- col.rgb = col.rgb*gl_Color.rgb;
+ col.rgb = col.rgb*diffuse_color.rgb;
- gl_FrontColor = col;
+ vertex_color = col;
- gl_FogFragCoord = pos.z;
- pos = gl_ModelViewProjectionMatrix * vert;
+
+ pos = modelview_projection_matrix * vert;
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
index 01e40afc4f..9c7a332417 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
@@ -2,10 +2,32 @@
* @file avatarAlphaV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 projection_matrix;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
@@ -19,16 +41,25 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_position;
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_position;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_pointlight_col;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+uniform vec4 color;
uniform float near_clip;
uniform float shadow_offset;
uniform float shadow_bias;
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
@@ -61,56 +92,55 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
vec4 pos;
vec3 norm;
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], gl_Vertex);
- pos.y = dot(trans[1], gl_Vertex);
- pos.z = dot(trans[2], gl_Vertex);
+ vec4 pos_in = vec4(position.xyz, 1.0);
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
pos.w = 1.0;
- norm.x = dot(trans[0].xyz, gl_Normal);
- norm.y = dot(trans[1].xyz, gl_Normal);
- norm.z = dot(trans[2].xyz, gl_Normal);
+ norm.x = dot(trans[0].xyz, normal);
+ norm.y = dot(trans[1].xyz, normal);
+ norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
- gl_Position = gl_ProjectionMatrix * pos;
+ gl_Position = projection_matrix * pos;
- float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));
- vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset;
+ float dp_directional_light = max(0.0, dot(norm, light_position[0].xyz));
+ vary_position = pos.xyz + light_position[0].xyz * (1.0-dp_directional_light)*shadow_offset;
calcAtmospherics(pos.xyz);
- //vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
-
- vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a);
+ vec4 col = vec4(0.0, 0.0, 0.0, 1.0);
// Collect normal lights
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a);
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].y, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].y, light_attenuation[3].z);
+ col.rgb += light_diffuse[4].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[4], light_direction[4], light_attenuation[4].x, light_attenuation[4].y, light_attenuation[4].z);
+ col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].y, light_attenuation[5].z);
+ col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
+ col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb*gl_Color.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb*gl_Color.rgb;
- vary_directional = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a)));
+ vary_ambient = col.rgb*color.rgb;
+ vary_directional = atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb*gl_Color.rgb, 1.0);
+ col.rgb = col.rgb*color.rgb;
- gl_FrontColor = col;
+ vertex_color = col;
- gl_FogFragCoord = pos.z;
+
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
deleted file mode 100644
index 729e4b5543..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * @file edgeF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-
-varying vec2 vary_fragcoord;
-
-uniform float depth_cutoff;
-uniform float norm_cutoff;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-float getDepth(vec2 pos_screen)
-{
- float z = texture2DRect(depthMap, pos_screen.xy).r;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-void main()
-{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float depth = getDepth(vary_fragcoord.xy);
-
- vec2 tc = vary_fragcoord.xy;
-
- float sc = 0.75;
-
- vec2 de;
- de.x = (depth-getDepth(tc+vec2(sc, sc))) + (depth-getDepth(tc+vec2(-sc, -sc)));
- de.y = (depth-getDepth(tc+vec2(-sc, sc))) + (depth-getDepth(tc+vec2(sc, -sc)));
- de /= depth;
- de *= de;
- de = step(depth_cutoff, de);
-
- vec2 ne;
- vec3 nexnorm = texture2DRect(normalMap, tc+vec2(-sc,-sc)).rgb;
- nexnorm = vec3((nexnorm.xy-0.5)*2.0,nexnorm.z); // unpack norm
- ne.x = dot(nexnorm, norm);
- vec3 neynorm = texture2DRect(normalMap, tc+vec2(sc,sc)).rgb;
- neynorm = vec3((neynorm.xy-0.5)*2.0,neynorm.z); // unpack norm
- ne.y = dot(neynorm, norm);
-
- ne = 1.0-ne;
-
- ne = step(norm_cutoff, ne);
-
- gl_FragColor.a = dot(de,de)+dot(ne,ne);
- //gl_FragColor.a = dot(de,de);
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl
deleted file mode 100644
index b22bc5b288..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeMSF.glsl
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @file edgeF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-
-varying vec2 vary_fragcoord;
-
-uniform float depth_cutoff;
-uniform float norm_cutoff;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-float getDepth(ivec2 pos_screen, int sample)
-{
- float z = texelFetch(depthMap, pos_screen, sample).r;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-void main()
-{
- float e = 0;
-
- ivec2 itc = ivec2(vary_fragcoord.xy);
-
- for (int i = 0; i < samples; i++)
- {
- vec3 norm = texelFetch(normalMap, itc, i).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float depth = getDepth(itc, i);
-
- vec2 tc = vary_fragcoord.xy;
-
- int sc = 1;
-
- vec2 de;
- de.x = (depth-getDepth(itc+ivec2(sc, sc),i)) + (depth-getDepth(itc+ivec2(-sc, -sc), i));
- de.y = (depth-getDepth(itc+ivec2(-sc, sc),i)) + (depth-getDepth(itc+ivec2(sc, -sc), i));
- de /= depth;
- de *= de;
- de = step(depth_cutoff, de);
-
- vec2 ne;
- vec3 nexnorm = texelFetch(normalMap, itc+ivec2(-sc,-sc), i).rgb;
- nexnorm = vec3((nexnorm.xy-0.5)*2.0,nexnorm.z); // unpack norm
- ne.x = dot(nexnorm, norm);
- vec3 neynorm = texelFetch(normalMap, itc+ivec2(sc,sc), i).rgb;
- neynorm = vec3((neynorm.xy-0.5)*2.0,neynorm.z); // unpack norm
- ne.y = dot(neynorm, norm);
-
- ne = 1.0-ne;
-
- ne = step(norm_cutoff, ne);
-
- e += dot(de,de)+dot(ne,ne);
- }
-
- e /= samples;
-
- gl_FragColor.a = e;
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
deleted file mode 100644
index 393084a3db..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @file edgeV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-varying vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index f54186ffca..14a683971a 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -2,13 +2,33 @@
* @file multiSpotLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
-
+
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
uniform sampler2DRect depthMap;
@@ -16,7 +36,6 @@ uniform sampler2DRect normalMap;
uniform samplerCube environmentMap;
uniform sampler2DRect lightMap;
uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
uniform sampler2D projectionMap;
uniform mat4 proj_mat; //screen space to light space
@@ -36,9 +55,12 @@ uniform float sun_wash;
uniform int proj_shadow_idx;
uniform float shadow_fade;
-varying vec4 vary_light;
+uniform vec3 center;
+uniform float size;
+uniform vec3 color;
+uniform float falloff;
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;
@@ -110,9 +132,9 @@ void main()
frag.xy *= screen_res;
vec3 pos = getPosition(frag.xy).xyz;
- vec3 lv = vary_light.xyz-pos.xyz;
+ vec3 lv = center.xyz-pos.xyz;
float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
+ dist2 /= size;
if (dist2 > 1.0)
{
discard;
@@ -143,7 +165,7 @@ void main()
proj_tc.xyz /= proj_tc.w;
- float fa = gl_Color.a+1.0;
+ float fa = falloff+1.0;
float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
if (dist_atten <= 0.0)
{
@@ -175,7 +197,7 @@ void main()
vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+ vec3 lcol = color.rgb * plcol.rgb * plcol.a;
lit = da * dist_atten * noise;
@@ -192,7 +214,7 @@ void main()
amb_da = min(amb_da, 1.0-lit);
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
}
@@ -225,7 +247,7 @@ void main()
stc.y > 0.0)
{
vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb*shadow;
+ col += dist_atten*scol.rgb*color.rgb*scol.a*spec.rgb*shadow;
}
}
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl
deleted file mode 100644
index fee32be3e3..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightMSF.glsl
+++ /dev/null
@@ -1,244 +0,0 @@
-/**
- * @file multiSpotLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
-uniform sampler2D projectionMap;
-
-uniform mat4 proj_mat; //screen space to light space
-uniform float proj_near; //near clip for projection
-uniform vec3 proj_p; //plane projection is emitting from (in screen space)
-uniform vec3 proj_n;
-uniform float proj_focus; //distance from plane to begin blurring
-uniform float proj_lod; //(number of mips in proj map)
-uniform float proj_range; //range between near clip and far clip plane of projection
-uniform float proj_ambient_lod;
-uniform float proj_ambiance;
-uniform float near_clip;
-uniform float far_clip;
-
-uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
-uniform float sun_wash;
-uniform int proj_shadow_idx;
-uniform float shadow_fade;
-
-varying vec4 vary_light;
-
-varying vec4 vary_fragcoord;
-uniform vec2 screen_res;
-
-uniform mat4 inv_proj;
-
-vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float det = max(1.0-lod/(proj_lod*0.5), 0.0);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
-
- float det = min(lod/(proj_lod*0.5), 1.0);
-
- float d = min(dist.x, dist.y);
-
- float edge = 0.25*det;
-
- ret *= clamp(d/edge, 0.0, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
-
- return ret;
-}
-
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = vec2(pos_screen.xy)*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-void main()
-{
- int wght = 0;
-
- vec3 fcol = vec3(0,0,0);
-
- vec2 frag = (vary_fragcoord.xy*0.5+0.5)*screen_res;
-
- ivec2 itc = ivec2(frag.xy);
-
- float shadow = 1.0;
-
- if (proj_shadow_idx >= 0)
- {
- vec4 shd = texture2DRect(lightMap, frag);
- float sh[2];
- sh[0] = shd.b;
- sh[1] = shd.a;
- shadow = min(sh[proj_shadow_idx]+shadow_fade, 1.0);
- }
-
- for (int i = 0; i < samples; i++)
- {
- vec3 pos = getPosition(itc, i).xyz;
- vec3 lv = vary_light.xyz-pos.xyz;
- float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
- if (dist2 <= 1.0)
- {
- vec3 norm = texelFetch(normalMap, itc, i).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
-
- norm = normalize(norm);
- float l_dist = -dot(lv, proj_n);
-
- vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
- if (proj_tc.z >= 0.0)
- {
- proj_tc.xyz /= proj_tc.w;
-
- float fa = gl_Color.a+1.0;
- float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
- if (dist_atten > 0.0)
- {
- lv = proj_origin-pos.xyz;
- lv = normalize(lv);
- float da = dot(norm, lv);
-
- vec3 col = vec3(0,0,0);
-
- vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
-
- float noise = texture2D(noiseMap, frag.xy/128.0).b;
- if (proj_tc.z > 0.0 &&
- proj_tc.x < 1.0 &&
- proj_tc.y < 1.0 &&
- proj_tc.x > 0.0 &&
- proj_tc.y > 0.0)
- {
- float lit = 0.0;
- float amb_da = proj_ambiance;
-
- if (da > 0.0)
- {
- float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
- float lod = diff * proj_lod;
-
- vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
-
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
-
- lit = da * dist_atten * noise;
-
- col = lcol*lit*diff_tex*shadow;
- amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance;
- }
-
- //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
- vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
-
- amb_da += (da*da*0.5+0.5)*proj_ambiance;
-
- amb_da *= dist_atten * noise;
-
- amb_da = min(amb_da, 1.0-lit);
-
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
- }
-
-
- vec4 spec = texelFetch(specularRect, itc, i);
- if (spec.a > 0.0)
- {
- vec3 ref = reflect(normalize(pos), norm);
-
- //project from point pos in direction ref to plane proj_p, proj_n
- vec3 pdelta = proj_p-pos;
- float ds = dot(ref, proj_n);
-
- if (ds < 0.0)
- {
- vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
-
- vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
-
- if (stc.z > 0.0)
- {
- stc.xy /= stc.w;
-
- float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
-
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
-
- if (stc.x < 1.0 &&
- stc.y < 1.0 &&
- stc.x > 0.0 &&
- stc.y > 0.0)
- {
- vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb*shadow;
- }
- }
- }
- }
-
- fcol += col;
- wght++;
- }
- }
- }
- }
-
- if (wght <= 0)
- {
- discard;
- }
-
- gl_FragColor.rgb = fcol/samples;
- gl_FragColor.a = 0.0;
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 66a1a8515f..eb367d4ad6 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -2,13 +2,33 @@
* @file softenLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
uniform sampler2DRect normalMap;
@@ -47,8 +67,9 @@ uniform mat3 ssao_effect_mat;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
+uniform vec3 sun_dir;
+
+VARYING vec2 vary_fragcoord;
vec3 vary_PositionEye;
@@ -127,10 +148,6 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
vec3 P = inPositionEye;
setPositionEye(P);
- //(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
-
vec3 tmpLightnorm = lightnorm.xyz;
vec3 Pn = normalize(P);
@@ -264,37 +281,52 @@ void main()
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
//vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
+ float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
vec4 diffuse = texture2DRect(diffuseRect, tc);
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
-
- vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
- float scol = max(scol_ambocc.r, diffuse.a);
- float ambocc = scol_ambocc.g;
+
+ vec3 col;
+ float bloom = 0.0;
+
+ if (diffuse.a < 0.9)
+ {
+ vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
+
+ vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
+ float scol = max(scol_ambocc.r, diffuse.a);
+ float ambocc = scol_ambocc.g;
- calcAtmospherics(pos.xyz, ambocc);
+ calcAtmospherics(pos.xyz, ambocc);
- vec3 col = atmosAmbient(vec3(0));
- col += atmosAffectDirectionalLight(max(min(da, scol), diffuse.a));
+ col = atmosAmbient(vec3(0));
+ col += atmosAffectDirectionalLight(max(min(da, scol), diffuse.a));
- col *= diffuse.rgb;
+ col *= diffuse.rgb;
- if (spec.a > 0.0) // specular reflection
+ if (spec.a > 0.0) // specular reflection
+ {
+ // the old infinite-sky shiny reflection
+ //
+ vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
+ float sa = dot(refnormpersp, sun_dir.xyz);
+ vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).r;
+
+ // add the two types of shiny together
+ vec3 spec_contrib = dumbshiny * spec.rgb;
+ bloom = dot(spec_contrib, spec_contrib);
+ col += spec_contrib;
+ }
+
+ col = atmosLighting(col);
+ col = scaleSoftClip(col);
+
+ col = mix(col, diffuse.rgb, diffuse.a);
+ }
+ else
{
- // the old infinite-sky shiny reflection
- //
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
-
- // add the two types of shiny together
- col += dumbshiny * spec.rgb;
+ col = diffuse.rgb;
}
-
- col = atmosLighting(col);
- col = scaleSoftClip(col);
gl_FragColor.rgb = col;
- gl_FragColor.a = 0.0;
+ gl_FragColor.a = bloom;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl
deleted file mode 100644
index 0bae10ca7d..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightMSF.glsl
+++ /dev/null
@@ -1,307 +0,0 @@
-/**
- * @file softenLightMSF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2DMS depthMap;
-uniform sampler2D noiseMap;
-uniform samplerCube environmentMap;
-uniform sampler2D lightFunc;
-uniform vec3 gi_quad;
-
-uniform float blur_size;
-uniform float blur_fidelity;
-
-// Inputs
-uniform vec4 morphFactor;
-uniform vec3 camPosLocal;
-//uniform vec4 camPosWorld;
-uniform vec4 gamma;
-uniform vec4 lightnorm;
-uniform vec4 sunlight_color;
-uniform vec4 ambient;
-uniform vec4 blue_horizon;
-uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
-uniform vec4 glow;
-uniform float scene_light_strength;
-uniform vec3 env_mat[3];
-uniform vec4 shadow_clip;
-uniform mat3 ssao_effect_mat;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
-
-vec3 vary_PositionEye;
-
-vec3 vary_SunlitColor;
-vec3 vary_AmblitColor;
-vec3 vary_AdditiveColor;
-vec3 vary_AtmosAttenuation;
-
-vec4 getPosition_d(vec2 pos_screen, float depth)
-{
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
-vec3 getSunlitColor()
-{
- return vary_SunlitColor;
-}
-vec3 getAmblitColor()
-{
- return vary_AmblitColor;
-}
-vec3 getAdditiveColor()
-{
- return vary_AdditiveColor;
-}
-vec3 getAtmosAttenuation()
-{
- return vary_AtmosAttenuation;
-}
-
-
-void setPositionEye(vec3 v)
-{
- vary_PositionEye = v;
-}
-
-void setSunlitColor(vec3 v)
-{
- vary_SunlitColor = v;
-}
-
-void setAmblitColor(vec3 v)
-{
- vary_AmblitColor = v;
-}
-
-void setAdditiveColor(vec3 v)
-{
- vary_AdditiveColor = v;
-}
-
-void setAtmosAttenuation(vec3 v)
-{
- vary_AtmosAttenuation = v;
-}
-
-void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
-
- vec3 P = inPositionEye;
- setPositionEye(P);
-
- //(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
-
- vec3 tmpLightnorm = lightnorm.xyz;
-
- vec3 Pn = normalize(P);
- float Plen = length(P);
-
- vec4 temp1 = vec4(0);
- vec3 temp2 = vec3(0);
- vec4 blue_weight;
- vec4 haze_weight;
- vec4 sunlight = sunlight_color;
- vec4 light_atten;
-
- //sunlight attenuation effect (hue and brightness) due to atmosphere
- //this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
- //I had thought blue_density and haze_density should have equal weighting,
- //but attenuation due to haze_density tends to seem too strong
-
- temp1 = blue_density + vec4(haze_density.r);
- blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
-
- //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
- temp2.y = max(0.0, tmpLightnorm.y);
- temp2.y = 1. / temp2.y;
- sunlight *= exp( - light_atten * temp2.y);
-
- // main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
-
- // Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
- // compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
-
- //final atmosphere attenuation factor
- setAtmosAttenuation(temp1.rgb);
-
- //compute haze glow
- //(can use temp2.x as temp because we haven't used it yet)
- temp2.x = dot(Pn, tmpLightnorm.xyz);
- temp2.x = 1. - temp2.x;
- //temp2.x is 0 at the sun and increases away from sun
- temp2.x = max(temp2.x, .03); //was glow.y
- //set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
- //higher glow.x gives dimmer glow (because next step is 1 / "angle")
- temp2.x = pow(temp2.x, glow.z);
- //glow.z should be negative, so we're doing a sort of (1 / "angle") function
-
- //add "minimum anti-solar illumination"
- temp2.x += .25;
-
- //increase ambient when there are more clouds
- vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
-
- /* decrease value and saturation (that in HSV, not HSL) for occluded areas
- * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
- * // The following line of code performs the equivalent of:
- * float ambAlpha = tmpAmbient.a;
- * float ambValue = dot(vec3(tmpAmbient), vec3(0.577)); // projection onto <1/rt(3), 1/rt(3), 1/rt(3)>, the neutral white-black axis
- * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue);
- * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha);
- */
- tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a);
-
- //haze color
- setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
- + tmpAmbient)));
-
- //brightness of surface both sunlight and ambient
- setSunlitColor(vec3(sunlight * .5));
- setAmblitColor(vec3(tmpAmbient * .25));
- setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
-}
-
-vec3 atmosLighting(vec3 light)
-{
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor();
- return (2.0 * light);
-}
-
-vec3 atmosTransport(vec3 light) {
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor() * 2.0;
- return light;
-}
-vec3 atmosGetDiffuseSunlightColor()
-{
- return getSunlitColor();
-}
-
-vec3 scaleDownLight(vec3 light)
-{
- return (light / scene_light_strength );
-}
-
-vec3 scaleUpLight(vec3 light)
-{
- return (light * scene_light_strength);
-}
-
-vec3 atmosAmbient(vec3 light)
-{
- return getAmblitColor() + light / 2.0;
-}
-
-vec3 atmosAffectDirectionalLight(float lightIntensity)
-{
- return getSunlitColor() * lightIntensity;
-}
-
-vec3 scaleSoftClip(vec3 light)
-{
- //soft clip effect:
- light = 1. - clamp(light, vec3(0.), vec3(1.));
- light = 1. - pow(light, gamma.xxx);
-
- return light;
-}
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- ivec2 itc = ivec2(tc);
-
- vec3 fcol = vec3(0,0,0);
-
- vec2 scol_ambocc = texture2DRect(lightMap, tc).rg;
- float ambocc = scol_ambocc.g;
-
- for (int i = 0; i < samples; ++i)
- {
- float depth = texelFetch(depthMap, itc.xy, i).r;
- vec3 pos = getPosition_d(tc, depth).xyz;
- vec3 norm = texelFetch(normalMap, itc, i).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
-
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
-
- vec4 diffuse = texelFetch(diffuseRect, itc, i);
- vec4 spec = texelFetch(specularRect, itc, i);
-
- float amb = 0;
-
- float scol = max(scol_ambocc.r, diffuse.a);
- amb += ambocc;
-
- calcAtmospherics(pos.xyz, ambocc);
-
- vec3 col = atmosAmbient(vec3(0));
- col += atmosAffectDirectionalLight(max(min(da, scol), diffuse.a));
-
- col *= diffuse.rgb;
-
- if (spec.a > 0.0) // specular reflection
- {
- // the old infinite-sky shiny reflection
- //
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
-
- // add the two types of shiny together
- col += dumbshiny * spec.rgb;
- }
-
- col = atmosLighting(col);
- col = scaleSoftClip(col);
-
- fcol += col;
- }
-
- gl_FragColor.rgb = fcol/samples;
- gl_FragColor.a = 0.0;
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl
index 745cc01992..c840d72784 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl
@@ -2,25 +2,41 @@
* @file softenLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
uniform vec2 screen_res;
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
+
void main()
{
//transform vertex
- gl_Position = ftransform();
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-
- vec4 tex = gl_MultiTexCoord0;
- tex.w = 1.0;
- vary_light = gl_MultiTexCoord0;
+ vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index cd3828fbd4..31bd0c79da 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -2,12 +2,34 @@
* @file spotLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
-#extension GL_ARB_texture_rectangle : enable
+VARYING vec4 vertex_color;
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
@@ -16,7 +38,6 @@ uniform sampler2DRect normalMap;
uniform samplerCube environmentMap;
uniform sampler2DRect lightMap;
uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
uniform sampler2D projectionMap;
uniform mat4 proj_mat; //screen space to light space
@@ -35,9 +56,9 @@ uniform float sun_wash;
uniform int proj_shadow_idx;
uniform float shadow_fade;
-varying vec4 vary_light;
+VARYING vec4 vary_light;
-varying vec4 vary_fragcoord;
+VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;
@@ -96,7 +117,7 @@ void main()
proj_tc.xyz /= proj_tc.w;
- float fa = gl_Color.a+1.0;
+ float fa = vertex_color.a+1.0;
float dist_atten = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 0.0, 1.0);
lv = proj_origin-pos.xyz;
@@ -122,7 +143,7 @@ void main()
vec4 plcol = texture2DLod(projectionMap, proj_tc.xy, lod);
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
+ vec3 lcol = vertex_color.rgb * plcol.rgb * plcol.a;
lit = da * dist_atten * noise;
@@ -145,7 +166,7 @@ void main()
amb_da = min(amb_da, 1.0-lit);
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
+ col += amb_da*vertex_color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
}
@@ -174,7 +195,7 @@ void main()
stc.y > 0.0)
{
vec4 scol = texture2DLod(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb*shadow;
+ col += dist_atten*scol.rgb*vertex_color.rgb*scol.a*spec.rgb*shadow;
}
}
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl
deleted file mode 100644
index ec9b547a47..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightMSF.glsl
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * @file multiSpotLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-uniform sampler2DMS diffuseRect;
-uniform sampler2DMS specularRect;
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
-uniform sampler2D projectionMap;
-
-uniform mat4 proj_mat; //screen space to light space
-uniform float proj_near; //near clip for projection
-uniform vec3 proj_p; //plane projection is emitting from (in screen space)
-uniform vec3 proj_n;
-uniform float proj_focus; //distance from plane to begin blurring
-uniform float proj_lod; //(number of mips in proj map)
-uniform float proj_range; //range between near clip and far clip plane of projection
-uniform float proj_ambient_lod;
-uniform float proj_ambiance;
-uniform float near_clip;
-uniform float far_clip;
-
-uniform vec3 proj_origin; //origin of projection to be used for angular attenuation
-uniform float sun_wash;
-uniform int proj_shadow_idx;
-uniform float shadow_fade;
-
-varying vec4 vary_light;
-
-varying vec4 vary_fragcoord;
-uniform vec2 screen_res;
-
-uniform mat4 inv_proj;
-
-vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float det = max(1.0-lod/(proj_lod*0.5), 0.0);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0)+det, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
-
- float det = min(lod/(proj_lod*0.5), 1.0);
-
- float d = min(dist.x, dist.y);
-
- float edge = 0.25*det;
-
- ret *= clamp(d/edge, 0.0, 1.0);
-
- return ret;
-}
-
-vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
-{
- vec4 ret = texture2DLod(projectionMap, tc, lod);
-
- vec2 dist = tc-vec2(0.5);
-
- float d = dot(dist,dist);
-
- ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0);
-
- return ret;
-}
-
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = vec2(pos_screen.xy)*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-void main()
-{
- vec4 frag = vary_fragcoord;
- frag.xyz /= frag.w;
- frag.xyz = frag.xyz*0.5+0.5;
- frag.xy *= screen_res;
- ivec2 itc = ivec2(frag.xy);
-
- vec3 fcol = vec3(0,0,0);
- int wght = 0;
-
- float shadow = 1.0;
-
- if (proj_shadow_idx >= 0)
- {
- vec4 shd = texture2DRect(lightMap, frag.xy);
- float sh[2];
- sh[0] = shd.b;
- sh[1] = shd.a;
- shadow = min(sh[proj_shadow_idx]+shadow_fade, 1.0);
- }
-
- for (int i = 0; i < samples; i++)
- {
- vec3 pos = getPosition(itc, i).xyz;
- vec3 lv = vary_light.xyz-pos.xyz;
- float dist2 = dot(lv,lv);
- dist2 /= vary_light.w;
- if (dist2 <= 1.0)
- {
- vec3 norm = texelFetch(normalMap, itc, i).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
-
- norm = normalize(norm);
- float l_dist = -dot(lv, proj_n);
-
- vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
- if (proj_tc.z >= 0.0)
- {
- proj_tc.xyz /= proj_tc.w;
-
- float fa = gl_Color.a+1.0;
- float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
- if (dist_atten > 0.0)
- {
- lv = proj_origin-pos.xyz;
- lv = normalize(lv);
- float da = dot(norm, lv);
-
- vec3 col = vec3(0,0,0);
-
- vec3 diff_tex = texelFetch(diffuseRect, itc, i).rgb;
-
- float noise = texture2D(noiseMap, frag.xy/128.0).b;
- if (proj_tc.z > 0.0 &&
- proj_tc.x < 1.0 &&
- proj_tc.y < 1.0 &&
- proj_tc.x > 0.0 &&
- proj_tc.y > 0.0)
- {
- float lit = 0.0;
- float amb_da = proj_ambiance;
-
- if (da > 0.0)
- {
- float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0);
- float lod = diff * proj_lod;
-
- vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod);
-
- vec3 lcol = gl_Color.rgb * plcol.rgb * plcol.a;
-
- lit = da * dist_atten * noise;
-
- col = lcol*lit*diff_tex*shadow;
- amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance;
- }
-
- //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0);
- vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod);
-
- amb_da += (da*da*0.5+0.5)*proj_ambiance;
-
- amb_da *= dist_atten * noise;
-
- amb_da = min(amb_da, 1.0-lit);
-
- col += amb_da*gl_Color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a;
- }
-
-
- vec4 spec = texelFetch(specularRect, itc, i);
- if (spec.a > 0.0)
- {
- vec3 ref = reflect(normalize(pos), norm);
-
- //project from point pos in direction ref to plane proj_p, proj_n
- vec3 pdelta = proj_p-pos;
- float ds = dot(ref, proj_n);
-
- if (ds < 0.0)
- {
- vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds;
-
- vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0));
-
- if (stc.z > 0.0)
- {
- stc.xy /= stc.w;
-
- float fatten = clamp(spec.a*spec.a+spec.a*0.5, 0.25, 1.0);
-
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
-
- if (stc.x < 1.0 &&
- stc.y < 1.0 &&
- stc.x > 0.0 &&
- stc.y > 0.0)
- {
- vec4 scol = texture2DLodSpecular(projectionMap, stc.xy, proj_lod-spec.a*proj_lod);
- col += dist_atten*scol.rgb*gl_Color.rgb*scol.a*spec.rgb*shadow;
- }
- }
- }
- }
-
- fcol += col;
- wght++;
- }
- }
- }
- }
-
- if (wght <= 0)
- {
- discard;
- }
-
- gl_FragColor.rgb = fcol/wght;
- gl_FragColor.a = 0.0;
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 315139b415..229c2f4b67 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -2,13 +2,33 @@
* @file sunLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
//class 2, shadows, no SSAO
uniform sampler2DRect depthMap;
@@ -29,13 +49,13 @@ uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
-varying vec2 vary_fragcoord;
-varying vec4 vary_light;
+VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
uniform vec2 shadow_res;
uniform vec2 proj_shadow_res;
+uniform vec3 sun_dir;
uniform float shadow_bias;
uniform float shadow_offset;
@@ -114,10 +134,10 @@ void main()
}*/
float shadow = 1.0;
- float dp_directional_light = max(0.0, dot(norm, vary_light.xyz));
+ float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz));
vec3 shadow_pos = pos.xyz + displace*norm;
- vec3 offset = vary_light.xyz * (1.0-dp_directional_light);
+ vec3 offset = sun_dir.xyz * (1.0-dp_directional_light);
vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl
deleted file mode 100644
index 63d13c996d..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightMSF.glsl
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * @file sunLightMSF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-//class 2, shadows, no SSAO
-
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
-uniform sampler2DShadow shadowMap4;
-uniform sampler2DShadow shadowMap5;
-
-
-// Inputs
-uniform mat4 shadow_matrix[6];
-uniform vec4 shadow_clip;
-uniform float ssao_radius;
-uniform float ssao_max_radius;
-uniform float ssao_factor;
-uniform float ssao_factor_inv;
-
-varying vec2 vary_fragcoord;
-varying vec4 vary_light;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-uniform vec2 shadow_res;
-uniform vec2 proj_shadow_res;
-
-uniform float shadow_bias;
-uniform float shadow_offset;
-
-uniform float spot_shadow_bias;
-uniform float spot_shadow_offset;
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen.xy, sample).r;
- vec2 sc = vec2(pos_screen.xy)*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
-{
- stc.xyz /= stc.w;
- stc.z += shadow_bias*scl;
-
- float cs = shadow2DRect(shadowMap, stc.xyz).x;
- float shadow = cs;
-
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, 1.5, 0.0)).x, cs);
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, -1.5, 0.0)).x, cs);
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, 1.5, 0.0)).x, cs);
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, -1.5, 0.0)).x, cs);
-
- return shadow/5.0;
-
- //return shadow;
-}
-
-float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
-{
- stc.xyz /= stc.w;
- stc.z += spot_shadow_bias*scl;
-
- float cs = shadow2D(shadowMap, stc.xyz).x;
- float shadow = cs;
-
- vec2 off = 1.5/proj_shadow_res;
-
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs);
-
- return shadow/5.0;
-
- //return shadow;
-}
-
-void main()
-{
- vec2 pos_screen = vary_fragcoord.xy;
- ivec2 itc = ivec2(pos_screen);
-
- //try doing an unproject here
-
- vec4 fcol = vec4(0,0,0,0);
-
- for (int i = 0; i < samples; i++)
- {
- vec4 pos = getPosition(itc, i);
-
- vec4 nmap4 = texelFetch(normalMap, itc, i);
- nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm
- float displace = nmap4.w;
- vec3 norm = nmap4.xyz;
-
- /*if (pos.z == 0.0) // do nothing for sky *FIX: REMOVE THIS IF/WHEN THE POSITION MAP IS BEING USED AS A STENCIL
- {
- gl_FragColor = vec4(0.0); // doesn't matter
- return;
- }*/
-
- float shadow = 1.0;
- float dp_directional_light = max(0.0, dot(norm, vary_light.xyz));
-
- vec3 shadow_pos = pos.xyz + displace*norm;
- vec3 offset = vary_light.xyz * (1.0-dp_directional_light);
-
- vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0);
-
- if (spos.z > -shadow_clip.w)
- {
- if (dp_directional_light == 0.0)
- {
- // if we know this point is facing away from the sun then we know it's in shadow without having to do a squirrelly shadow-map lookup
- shadow = 0.0;
- }
- else
- {
- vec4 lpos;
-
- if (spos.z < -shadow_clip.z)
- {
- lpos = shadow_matrix[3]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap3, lpos, 0.25);
- shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0);
- }
- else if (spos.z < -shadow_clip.y)
- {
- lpos = shadow_matrix[2]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap2, lpos, 0.5);
- }
- else if (spos.z < -shadow_clip.x)
- {
- lpos = shadow_matrix[1]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap1, lpos, 0.75);
- }
- else
- {
- lpos = shadow_matrix[0]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap0, lpos, 1.0);
- }
-
- // take the most-shadowed value out of these two:
- // * the blurred sun shadow in the light (shadow) map
- // * an unblurred dot product between the sun and this norm
- // the goal is to err on the side of most-shadow to fill-in shadow holes and reduce artifacting
- shadow = min(shadow, dp_directional_light);
-
- //lpos.xy /= lpos.w*32.0;
- //if (fract(lpos.x) < 0.1 || fract(lpos.y) < 0.1)
- //{
- // shadow = 0.0;
- //}
-
- }
- }
- else
- {
- // more distant than the shadow map covers
- shadow = 1.0;
- }
-
- fcol[0] += shadow;
- fcol[1] += 1.0;
-
- spos = vec4(shadow_pos+norm*spot_shadow_offset, 1.0);
-
- //spotlight shadow 1
- vec4 lpos = shadow_matrix[4]*spos;
- fcol[2] += pcfShadow(shadowMap4, lpos, 0.8);
-
- //spotlight shadow 2
- lpos = shadow_matrix[5]*spos;
- fcol[3] += pcfShadow(shadowMap5, lpos, 0.8);
- }
-
- gl_FragColor = fcol/samples;
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index d53850b489..6b420833b9 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -1,14 +1,33 @@
/**
* @file sunLightSSAOF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
//class 2 -- shadows and SSAO
uniform sampler2DRect depthMap;
@@ -21,6 +40,7 @@ uniform sampler2DShadow shadowMap4;
uniform sampler2DShadow shadowMap5;
uniform sampler2D noiseMap;
+
// Inputs
uniform mat4 shadow_matrix[6];
uniform vec4 shadow_clip;
@@ -29,13 +49,13 @@ uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
-varying vec2 vary_fragcoord;
-varying vec4 vary_light;
+VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
uniform vec2 shadow_res;
uniform vec2 proj_shadow_res;
+uniform vec3 sun_dir;
uniform float shadow_bias;
uniform float shadow_offset;
@@ -56,11 +76,8 @@ vec4 getPosition(vec2 pos_screen)
return pos;
}
-//calculate decreases in ambient lighting when crowded out (SSAO)
-float calcAmbientOcclusion(vec4 pos, vec3 norm)
+vec2 getKern(int i)
{
- float ret = 1.0;
-
vec2 kern[8];
// exponentially (^2) distant occlusion samples spread around origin
kern[0] = vec2(-1.0, 0.0) * 0.125*0.125;
@@ -71,22 +88,30 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm)
kern[5] = vec2(-0.7071, -0.7071) * 0.750*0.750;
kern[6] = vec2(-0.7071, 0.7071) * 0.875*0.875;
kern[7] = vec2(0.7071, -0.7071) * 1.000*1.000;
+
+ return kern[i];
+}
+
+//calculate decreases in ambient lighting when crowded out (SSAO)
+float calcAmbientOcclusion(vec4 pos, vec3 norm)
+{
+ float ret = 1.0;
vec2 pos_screen = vary_fragcoord.xy;
vec3 pos_world = pos.xyz;
vec2 noise_reflect = texture2D(noiseMap, vary_fragcoord.xy/128.0).xy;
float angle_hidden = 0.0;
- int points = 0;
+ float points = 0;
float scale = min(ssao_radius / -pos_world.z, ssao_max_radius);
-
+
// it was found that keeping # of samples a constant was the fastest, probably due to compiler optimizations (unrolling?)
for (int i = 0; i < 8; i++)
{
- vec2 samppos_screen = pos_screen + scale * reflect(kern[i], noise_reflect);
+ vec2 samppos_screen = pos_screen + scale * reflect(getKern(i), noise_reflect);
vec3 samppos_world = getPosition(samppos_screen).xyz;
-
+
vec3 diff = pos_world - samppos_world;
float dist2 = dot(diff, diff);
@@ -94,17 +119,21 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm)
// --> solid angle shrinking by the square of distance
//radius is somewhat arbitrary, can approx with just some constant k * 1 / dist^2
//(k should vary inversely with # of samples, but this is taken care of later)
-
- angle_hidden = angle_hidden + float(dot((samppos_world - 0.05*norm - pos_world), norm) > 0.0) * min(1.0/dist2, ssao_factor_inv);
+
+ float funky_val = (dot((samppos_world - 0.05*norm - pos_world), norm) > 0.0) ? 1.0 : 0.0;
+ angle_hidden = angle_hidden + funky_val * min(1.0/dist2, ssao_factor_inv);
// 'blocked' samples (significantly closer to camera relative to pos_world) are "no data", not "no occlusion"
- points = points + int(diff.z > -1.0);
+ float diffz_val = (diff.z > -1.0) ? 1.0 : 0.0;
+ points = points + diffz_val;
}
- angle_hidden = min(ssao_factor*angle_hidden/float(points), 1.0);
-
- ret = (1.0 - (float(points != 0) * angle_hidden));
+ angle_hidden = min(ssao_factor*angle_hidden/points, 1.0);
+ float points_val = (points > 0.0) ? 1.0 : 0.0;
+ ret = (1.0 - (points_val * angle_hidden));
+
+ ret = max(ret, 0.0);
return min(ret, 1.0);
}
@@ -141,7 +170,6 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs);
shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs);
-
return shadow/5.0;
//return shadow;
@@ -167,10 +195,10 @@ void main()
}*/
float shadow = 1.0;
- float dp_directional_light = max(0.0, dot(norm, vary_light.xyz));
+ float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz));
vec3 shadow_pos = pos.xyz + displace*norm;
- vec3 offset = vary_light.xyz * (1.0-dp_directional_light);
+ vec3 offset = sun_dir.xyz * (1.0-dp_directional_light);
vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0);
@@ -234,7 +262,7 @@ void main()
gl_FragColor[0] = shadow;
gl_FragColor[1] = calcAmbientOcclusion(pos, norm);
- spos.xyz = shadow_pos+norm*spot_shadow_offset;
+ spos = vec4(shadow_pos+norm*spot_shadow_offset, 1.0);
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl
deleted file mode 100644
index a2a76eed9f..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOMSF.glsl
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * @file sunLightSSAOF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-#extension GL_ARB_texture_multisample : enable
-
-//class 2 -- shadows and SSAO
-
-uniform sampler2DMS depthMap;
-uniform sampler2DMS normalMap;
-uniform sampler2DRectShadow shadowMap0;
-uniform sampler2DRectShadow shadowMap1;
-uniform sampler2DRectShadow shadowMap2;
-uniform sampler2DRectShadow shadowMap3;
-uniform sampler2DShadow shadowMap4;
-uniform sampler2DShadow shadowMap5;
-uniform sampler2D noiseMap;
-
-// Inputs
-uniform mat4 shadow_matrix[6];
-uniform vec4 shadow_clip;
-uniform float ssao_radius;
-uniform float ssao_max_radius;
-uniform float ssao_factor;
-uniform float ssao_factor_inv;
-
-varying vec2 vary_fragcoord;
-varying vec4 vary_light;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-uniform vec2 shadow_res;
-uniform vec2 proj_shadow_res;
-
-uniform float shadow_bias;
-uniform float shadow_offset;
-
-uniform float spot_shadow_bias;
-uniform float spot_shadow_offset;
-
-vec4 getPosition(ivec2 pos_screen, int sample)
-{
- float depth = texelFetch(depthMap, pos_screen, sample).r;
- vec2 sc = vec2(pos_screen.xy)*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-//calculate decreases in ambient lighting when crowded out (SSAO)
-float calcAmbientOcclusion(vec4 pos, vec3 norm, int sample)
-{
- float ret = 1.0;
-
- vec2 kern[8];
- // exponentially (^2) distant occlusion samples spread around origin
- kern[0] = vec2(-1.0, 0.0) * 0.125*0.125;
- kern[1] = vec2(1.0, 0.0) * 0.250*0.250;
- kern[2] = vec2(0.0, 1.0) * 0.375*0.375;
- kern[3] = vec2(0.0, -1.0) * 0.500*0.500;
- kern[4] = vec2(0.7071, 0.7071) * 0.625*0.625;
- kern[5] = vec2(-0.7071, -0.7071) * 0.750*0.750;
- kern[6] = vec2(-0.7071, 0.7071) * 0.875*0.875;
- kern[7] = vec2(0.7071, -0.7071) * 1.000*1.000;
-
- vec2 pos_screen = vary_fragcoord.xy;
- vec3 pos_world = pos.xyz;
- vec2 noise_reflect = texture2D(noiseMap, vary_fragcoord.xy/128.0).xy;
-
- float angle_hidden = 0.0;
- int points = 0;
-
- float scale = min(ssao_radius / -pos_world.z, ssao_max_radius);
-
- // it was found that keeping # of samples a constant was the fastest, probably due to compiler optimizations (unrolling?)
- for (int i = 0; i < 8; i++)
- {
- ivec2 samppos_screen = ivec2(pos_screen + scale * reflect(kern[i], noise_reflect));
- vec3 samppos_world = getPosition(samppos_screen, sample).xyz;
-
- vec3 diff = pos_world - samppos_world;
- float dist2 = dot(diff, diff);
-
- // assume each sample corresponds to an occluding sphere with constant radius, constant x-sectional area
- // --> solid angle shrinking by the square of distance
- //radius is somewhat arbitrary, can approx with just some constant k * 1 / dist^2
- //(k should vary inversely with # of samples, but this is taken care of later)
-
- angle_hidden = angle_hidden + float(dot((samppos_world - 0.05*norm - pos_world), norm) > 0.0) * min(1.0/dist2, ssao_factor_inv);
-
- // 'blocked' samples (significantly closer to camera relative to pos_world) are "no data", not "no occlusion"
- points = points + int(diff.z > -1.0);
- }
-
- angle_hidden = min(ssao_factor*angle_hidden/float(points), 1.0);
-
- ret = (1.0 - (float(points != 0) * angle_hidden));
-
- return min(ret, 1.0);
-}
-
-float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
-{
- stc.xyz /= stc.w;
- stc.z += shadow_bias*scl;
-
- float cs = shadow2DRect(shadowMap, stc.xyz).x;
- float shadow = cs;
-
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, 1.5, 0.0)).x, cs);
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(1.5, -1.5, 0.0)).x, cs);
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, 1.5, 0.0)).x, cs);
- shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-1.5, -1.5, 0.0)).x, cs);
-
- return shadow/5.0;
-
- //return shadow;
-}
-
-float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
-{
- stc.xyz /= stc.w;
- stc.z += spot_shadow_bias*scl;
-
- float cs = shadow2D(shadowMap, stc.xyz).x;
- float shadow = cs;
-
- vec2 off = 1.5/proj_shadow_res;
-
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs);
-
-
- return shadow/5.0;
-
- //return shadow;
-}
-
-void main()
-{
- vec2 pos_screen = vary_fragcoord.xy;
- ivec2 itc = ivec2(pos_screen);
- vec4 fcol = vec4(0,0,0,0);
-
- for (int i = 0; i < samples; i++)
- {
- vec4 pos = getPosition(itc, i);
-
- vec4 nmap4 = texelFetch(normalMap, itc, i);
- nmap4 = vec4((nmap4.xy-0.5)*2.0,nmap4.z,nmap4.w); // unpack norm
- float displace = nmap4.w;
- vec3 norm = nmap4.xyz;
-
- float shadow = 1.0;
- float dp_directional_light = max(0.0, dot(norm, vary_light.xyz));
-
- vec3 shadow_pos = pos.xyz + displace*norm;
- vec3 offset = vary_light.xyz * (1.0-dp_directional_light);
-
- vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0);
-
- if (spos.z > -shadow_clip.w)
- {
- if (dp_directional_light == 0.0)
- {
- // if we know this point is facing away from the sun then we know it's in shadow without having to do a squirrelly shadow-map lookup
- shadow = 0.0;
- }
- else
- {
- vec4 lpos;
-
- if (spos.z < -shadow_clip.z)
- {
- lpos = shadow_matrix[3]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap3, lpos, 0.25);
- shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0);
- }
- else if (spos.z < -shadow_clip.y)
- {
- lpos = shadow_matrix[2]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap2, lpos, 0.5);
- }
- else if (spos.z < -shadow_clip.x)
- {
- lpos = shadow_matrix[1]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap1, lpos, 0.75);
- }
- else
- {
- lpos = shadow_matrix[0]*spos;
- lpos.xy *= shadow_res;
- shadow = pcfShadow(shadowMap0, lpos, 1.0);
- }
-
- // take the most-shadowed value out of these two:
- // * the blurred sun shadow in the light (shadow) map
- // * an unblurred dot product between the sun and this norm
- // the goal is to err on the side of most-shadow to fill-in shadow holes and reduce artifacting
- shadow = min(shadow, dp_directional_light);
-
- }
- }
- else
- {
- // more distant than the shadow map covers
- shadow = 1.0;
- }
-
-
- fcol[0] += shadow;
- fcol[1] += calcAmbientOcclusion(pos, norm, i);
-
- spos.xyz = shadow_pos+offset*spot_shadow_offset;
-
- //spotlight shadow 1
- vec4 lpos = shadow_matrix[4]*spos;
- fcol[2] += pcfShadow(shadowMap4, lpos, 0.8);
-
- //spotlight shadow 2
- lpos = shadow_matrix[5]*spos;
- fcol[3] += pcfShadow(shadowMap5, lpos, 0.8);
- }
-
- gl_FragColor = fcol / samples;
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
index 814deb3677..bc5eb5181d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
@@ -1,27 +1,41 @@
/**
- * @file sunLightF.glsl
+ * @file sunLightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
+ATTRIBUTE vec3 position;
+
+VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
void main()
{
//transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
- vec4 tex = gl_MultiTexCoord0;
- tex.w = 1.0;
+ vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ gl_Position = pos;
- vary_light = gl_MultiTexCoord0;
-
- gl_FrontColor = gl_Color;
+ vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
}
diff --git a/indra/newview/app_settings/shaders/class2/effects/blurF.glsl b/indra/newview/app_settings/shaders/class2/effects/blurF.glsl
deleted file mode 100644
index dff4d4a68f..0000000000
--- a/indra/newview/app_settings/shaders/class2/effects/blurF.glsl
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file blurf.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2DRect RenderTexture;
-uniform float bloomStrength;
-
-varying vec4 gl_TexCoord[gl_MaxTextureCoords];
-void main(void)
-{
- float blurWeights[7];
- blurWeights[0] = 0.05;
- blurWeights[1] = 0.1;
- blurWeights[2] = 0.2;
- blurWeights[3] = 0.3;
- blurWeights[4] = 0.2;
- blurWeights[5] = 0.1;
- blurWeights[6] = 0.05;
-
- vec3 color = vec3(0,0,0);
- for (int i = 0; i < 7; i++){
- color += vec3(texture2DRect(RenderTexture, gl_TexCoord[i].st)) * blurWeights[i];
- }
-
- color *= bloomStrength;
-
- gl_FragColor = vec4(color, 1.0);
-}
diff --git a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl
deleted file mode 100644
index de469542f9..0000000000
--- a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file blurV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform vec2 texelSize;
-uniform vec2 blurDirection;
-uniform float blurWidth;
-
-void main(void)
-{
- // Transform vertex
- gl_Position = ftransform();
-
- vec2 blurDelta = texelSize * blurDirection * vec2(blurWidth, blurWidth);
- vec2 s = gl_MultiTexCoord0.st - (blurDelta * 3.0);
-
- // for (int i = 0; i < 7; i++) {
- // gl_TexCoord[i].st = s + (i * blurDelta);
- // }
-
- // MANUALLY UNROLL
- gl_TexCoord[0].st = s;
- gl_TexCoord[1].st = s + blurDelta;
- gl_TexCoord[2].st = s + (2. * blurDelta);
- gl_TexCoord[3].st = s + (3. * blurDelta);
- gl_TexCoord[4].st = s + (4. * blurDelta);
- gl_TexCoord[5].st = s + (5. * blurDelta);
- gl_TexCoord[6].st = s + (6. * blurDelta);
-
- // gl_TexCoord[0].st = s;
- // gl_TexCoord[1].st = blurDelta;
-}
diff --git a/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl b/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl
deleted file mode 100644
index 8871bb3fc7..0000000000
--- a/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file colorFilterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2DRect RenderTexture;
-uniform float brightness;
-uniform float contrast;
-uniform vec3 contrastBase;
-uniform float saturation;
-uniform vec3 lumWeights;
-
-const float gamma = 2.0;
-
-void main(void)
-{
- vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
-
- /// Modulate brightness
- color *= brightness;
-
- /// Modulate contrast
- color = mix(contrastBase, color, contrast);
-
- /// Modulate saturation
- color = mix(vec3(dot(color, lumWeights)), color, saturation);
-
- gl_FragColor = vec4(color, 1.0);
-}
diff --git a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl
deleted file mode 100644
index 9c52b8dd5d..0000000000
--- a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @file drawQuadV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-void main(void)
-{
- //transform vertex
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_TexCoord[1] = gl_MultiTexCoord1;
-}
diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl
deleted file mode 100644
index 713f8021de..0000000000
--- a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * @file extractF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2DRect RenderTexture;
-uniform float extractLow;
-uniform float extractHigh;
-uniform vec3 lumWeights;
-
-void main(void)
-{
- /// Get scene color
- vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
-
- /// Extract luminance and scale up by night vision brightness
- float lum = smoothstep(extractLow, extractHigh, dot(color, lumWeights));
-
- gl_FragColor = vec4(vec3(lum), 1.0);
-}
diff --git a/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl b/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl
deleted file mode 100644
index fd94b2e95f..0000000000
--- a/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file nightVisionF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2DRect RenderTexture;
-uniform sampler2D NoiseTexture;
-uniform float brightMult;
-uniform float noiseStrength;
-
-float luminance(vec3 color)
-{
- /// CALCULATING LUMINANCE (Using NTSC lum weights)
- /// http://en.wikipedia.org/wiki/Luma_%28video%29
- return dot(color, vec3(0.299, 0.587, 0.114));
-}
-
-void main(void)
-{
- /// Get scene color
- vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
-
- /// Extract luminance and scale up by night vision brightness
- float lum = luminance(color) * brightMult;
-
- /// Convert into night vision color space
- /// Newer NVG colors (crisper and more saturated)
- vec3 outColor = (lum * vec3(0.91, 1.21, 0.9)) + vec3(-0.07, 0.1, -0.12);
-
- /// Add noise
- float noiseValue = texture2D(NoiseTexture, gl_TexCoord[1].st).r;
- noiseValue = (noiseValue - 0.5) * noiseStrength;
-
- /// Older NVG colors (more muted)
- // vec3 outColor = (lum * vec3(0.82, 0.75, 0.83)) + vec3(0.05, 0.32, -0.11);
-
- outColor += noiseValue;
-
- gl_FragColor = vec4(outColor, 1.0);
-}
diff --git a/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl b/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl
deleted file mode 100644
index a1a9c9716c..0000000000
--- a/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @file simpleF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2DRect RenderTexture;
-
-void main(void)
-{
- vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
- gl_FragColor = vec4(1.0 - color, 1.0);
-}
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl
deleted file mode 100644
index 9527dc469b..0000000000
--- a/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file terrainF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2D detail_0;
-uniform sampler2D detail_1;
-uniform sampler2D detail_2;
-uniform sampler2D detail_3;
-uniform sampler2D alpha_ramp;
-
-vec3 atmosLighting(vec3 light);
-
-vec3 scaleSoftClip(vec3 color);
-
-void main()
-{
- /// Note: This should duplicate the blending functionality currently used for the terrain rendering.
-
- /// TODO Confirm tex coords and bind them appropriately in vert shader.
- vec4 color0 = texture2D(detail_0, gl_TexCoord[0].xy);
- vec4 color1 = texture2D(detail_1, gl_TexCoord[0].xy);
- vec4 color2 = texture2D(detail_2, gl_TexCoord[0].xy);
- vec4 color3 = texture2D(detail_3, gl_TexCoord[0].xy);
-
- float alpha1 = texture2D(alpha_ramp, gl_TexCoord[0].zw).a;
- float alpha2 = texture2D(alpha_ramp,gl_TexCoord[1].xy).a;
- float alphaFinal = texture2D(alpha_ramp, gl_TexCoord[1].zw).a;
- vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
-
- /// Add WL Components
- outColor.rgb = atmosLighting(outColor.rgb * gl_Color.rgb);
-
- gl_FragColor = vec4(scaleSoftClip(outColor.rgb), 1.0);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl
deleted file mode 100644
index 2658bee88d..0000000000
--- a/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file terrainV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-void calcAtmospherics(vec3 inPositionEye);
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
-
-vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
-{
- vec4 tcoord;
-
- tcoord.x = dot(vpos, tp0);
- tcoord.y = dot(vpos, tp1);
- tcoord.z = tc.z;
- tcoord.w = tc.w;
-
- tcoord = mat * tcoord;
-
- return tcoord;
-}
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
-
- vec4 pos = gl_ModelViewMatrix * gl_Vertex;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
-
- /// Potentially better without it for water.
- pos /= pos.w;
-
- calcAtmospherics((gl_ModelViewMatrix * gl_Vertex).xyz);
-
- vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0));
-
- gl_FrontColor = color;
-
- // Transform and pass tex coords
- gl_TexCoord[0].xy = texgen_object(gl_Vertex, gl_MultiTexCoord0, gl_TextureMatrix[0], gl_ObjectPlaneS[0], gl_ObjectPlaneT[0]).xy;
-
- vec4 t = gl_MultiTexCoord1;
-
- gl_TexCoord[0].zw = t.xy;
- gl_TexCoord[1].xy = t.xy-vec2(2.0, 0.0);
- gl_TexCoord[1].zw = t.xy-vec2(1.0, 0.0);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl
deleted file mode 100644
index 974e227b77..0000000000
--- a/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file terrainWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2D detail_0;
-uniform sampler2D detail_1;
-uniform sampler2D detail_2;
-uniform sampler2D detail_3;
-uniform sampler2D alpha_ramp;
-
-vec3 atmosLighting(vec3 light);
-
-vec4 applyWaterFog(vec4 color);
-
-void main()
-{
- /// Note: This should duplicate the blending functionality currently used for the terrain rendering.
-
- /// TODO Confirm tex coords and bind them appropriately in vert shader.
- vec4 color0 = texture2D(detail_0, gl_TexCoord[0].xy);
- vec4 color1 = texture2D(detail_1, gl_TexCoord[0].xy);
- vec4 color2 = texture2D(detail_2, gl_TexCoord[0].xy);
- vec4 color3 = texture2D(detail_3, gl_TexCoord[0].xy);
-
- float alpha1 = texture2D(alpha_ramp, gl_TexCoord[0].zw).a;
- float alpha2 = texture2D(alpha_ramp,gl_TexCoord[1].xy).a;
- float alphaFinal = texture2D(alpha_ramp, gl_TexCoord[1].zw).a;
- vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
-
- /// Add WL Components
- outColor.rgb = atmosLighting(outColor.rgb * gl_Color.rgb);
-
- outColor = applyWaterFog(outColor);
- gl_FragColor = outColor;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl
deleted file mode 100644
index 702e0881ac..0000000000
--- a/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * @file underWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2D diffuseMap;
-uniform sampler2D bumpMap;
-uniform sampler2D screenTex;
-uniform sampler2D refTex;
-uniform sampler2D screenDepth;
-
-uniform vec4 fogCol;
-uniform vec3 lightDir;
-uniform vec3 specular;
-uniform float lightExp;
-uniform vec2 fbScale;
-uniform float refScale;
-uniform float znear;
-uniform float zfar;
-uniform float kd;
-uniform vec4 waterPlane;
-uniform vec3 eyeVec;
-uniform vec4 waterFogColor;
-uniform float waterFogDensity;
-uniform float waterFogKS;
-uniform vec2 screenRes;
-
-//bigWave is (refCoord.w, view.w);
-varying vec4 refCoord;
-varying vec4 littleWave;
-varying vec4 view;
-
-vec4 applyWaterFog(vec4 color, vec3 viewVec)
-{
- //normalize view vector
- vec3 view = normalize(viewVec);
- float es = -view.z;
-
- //find intersection point with water plane and eye vector
-
- //get eye depth
- float e0 = max(-waterPlane.w, 0.0);
-
- //get object depth
- float depth = length(viewVec);
-
- //get "thickness" of water
- float l = max(depth, 0.1);
-
- float kd = waterFogDensity;
- float ks = waterFogKS;
- vec4 kc = waterFogColor;
-
- float F = 0.98;
-
- float t1 = -kd * pow(F, ks * e0);
- float t2 = kd + ks * es;
- float t3 = pow(F, t2*l) - 1.0;
-
- float L = min(t1/t2*t3, 1.0);
-
- float D = pow(0.98, l*kd);
- //return vec4(1.0, 0.0, 1.0, 1.0);
- return color * D + kc * L;
- //depth /= 10.0;
- //return vec4(depth,depth,depth,0.0);
-}
-
-void main()
-{
- vec4 color;
-
- //get detail normals
- vec3 wave1 = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0-1.0;
- vec3 wave2 = texture2D(bumpMap, littleWave.xy).xyz*2.0-1.0;
- vec3 wave3 = texture2D(bumpMap, littleWave.zw).xyz*2.0-1.0;
- vec3 wavef = normalize(wave1+wave2+wave3);
-
- //figure out distortion vector (ripply)
- vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
- distort = distort+wavef.xy*refScale;
-
- vec4 fb = texture2D(screenTex, distort);
-
- gl_FragColor = applyWaterFog(fb,view.xyz);
-}
diff --git a/indra/newview/app_settings/shaders/class2/environment/waterF.glsl b/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
deleted file mode 100644
index c4e4bc08c5..0000000000
--- a/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * @file waterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec3 scaleSoftClip(vec3 inColor);
-vec3 atmosTransport(vec3 inColor);
-
-uniform sampler2D bumpMap;
-uniform sampler2D screenTex;
-uniform sampler2D refTex;
-
-uniform float sunAngle;
-uniform float sunAngle2;
-uniform vec3 lightDir;
-uniform vec3 specular;
-uniform float lightExp;
-uniform float refScale;
-uniform float kd;
-uniform vec2 screenRes;
-uniform vec3 normScale;
-uniform float fresnelScale;
-uniform float fresnelOffset;
-uniform float blurMultiplier;
-
-
-//bigWave is (refCoord.w, view.w);
-varying vec4 refCoord;
-varying vec4 littleWave;
-varying vec4 view;
-
-void main()
-{
- vec4 color;
-
- float dist = length(view.xy);
-
- //normalize view vector
- vec3 viewVec = normalize(view.xyz);
-
- //get wave normals
- vec3 wave1 = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0-1.0;
- vec3 wave2 = texture2D(bumpMap, littleWave.xy).xyz*2.0-1.0;
- vec3 wave3 = texture2D(bumpMap, littleWave.zw).xyz*2.0-1.0;
- //get base fresnel components
-
- vec3 df = vec3(
- dot(viewVec, wave1),
- dot(viewVec, (wave2 + wave3) * 0.5),
- dot(viewVec, wave3)
- ) * fresnelScale + fresnelOffset;
- df *= df;
-
- vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
-
- float dist2 = dist;
- dist = max(dist, 5.0);
-
- float dmod = sqrt(dist);
-
- vec2 dmod_scale = vec2(dmod*dmod, dmod);
-
- //get reflected color
- vec2 refdistort1 = wave1.xy*normScale.x;
- vec2 refvec1 = distort+refdistort1/dmod_scale;
- vec4 refcol1 = texture2D(refTex, refvec1);
-
- vec2 refdistort2 = wave2.xy*normScale.y;
- vec2 refvec2 = distort+refdistort2/dmod_scale;
- vec4 refcol2 = texture2D(refTex, refvec2);
-
- vec2 refdistort3 = wave3.xy*normScale.z;
- vec2 refvec3 = distort+refdistort3/dmod_scale;
- vec4 refcol3 = texture2D(refTex, refvec3);
-
- vec4 refcol = refcol1 + refcol2 + refcol3;
- float df1 = df.x + df.y + df.z;
- refcol *= df1 * 0.333;
-
- vec3 wavef = (wave1 + wave2 * 0.4 + wave3 * 0.6) * 0.5;
-
- wavef.z *= max(-viewVec.z, 0.1);
- wavef = normalize(wavef);
-
- float df2 = dot(viewVec, wavef) * fresnelScale+fresnelOffset;
-
- vec2 refdistort4 = wavef.xy*0.125;
- refdistort4.y -= abs(refdistort4.y);
- vec2 refvec4 = distort+refdistort4/dmod;
- float dweight = min(dist2*blurMultiplier, 1.0);
- vec4 baseCol = texture2D(refTex, refvec4);
- refcol = mix(baseCol*df2, refcol, dweight);
-
- //get specular component
- float spec = clamp(dot(lightDir, (reflect(viewVec,wavef))),0.0,1.0);
-
- //harden specular
- spec = pow(spec, 128.0);
-
- //figure out distortion vector (ripply)
- vec2 distort2 = distort+wavef.xy*refScale/max(dmod*df1, 1.0);
-
- vec4 fb = texture2D(screenTex, distort2);
-
- //mix with reflection
- // Note we actually want to use just df1, but multiplying by 0.999999 gets around and nvidia compiler bug
- color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999);
- color.rgb += spec * specular;
-
- color.rgb = atmosTransport(color.rgb);
- color.rgb = scaleSoftClip(color.rgb);
- color.a = spec * sunAngle2;
-
- gl_FragColor = color;
-}
diff --git a/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl
deleted file mode 100644
index b66b72b401..0000000000
--- a/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @file waterFogF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform vec4 lightnorm;
-uniform vec4 waterPlane;
-uniform vec4 waterFogColor;
-uniform float waterFogDensity;
-uniform float waterFogKS;
-
-vec3 getPositionEye();
-
-vec4 applyWaterFog(vec4 color)
-{
- //normalize view vector
- vec3 view = normalize(getPositionEye());
- float es = -(dot(view, waterPlane.xyz));
-
- //find intersection point with water plane and eye vector
-
- //get eye depth
- float e0 = max(-waterPlane.w, 0.0);
-
- vec3 int_v = waterPlane.w > 0.0 ? view * waterPlane.w/es : vec3(0.0, 0.0, 0.0);
-
- //get object depth
- float depth = length(getPositionEye() - int_v);
-
- //get "thickness" of water
- float l = max(depth, 0.1);
-
- float kd = waterFogDensity;
- float ks = waterFogKS;
- vec4 kc = waterFogColor;
-
- float F = 0.98;
-
- float t1 = -kd * pow(F, ks * e0);
- float t2 = kd + ks * es;
- float t3 = pow(F, t2*l) - 1.0;
-
- float L = min(t1/t2*t3, 1.0);
-
- float D = pow(0.98, l*kd);
-
- color.rgb = color.rgb * D + kc.rgb * L;
- color.a = kc.a + color.a;
-
- return color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
deleted file mode 100644
index 4c31602736..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file lightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec3 atmosLighting(vec3 light);
-vec3 scaleSoftClip(vec3 light);
-
-void default_lighting()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = atmosLighting(color.rgb);
-
- color.rgb = scaleSoftClip(color.rgb);
-
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl
deleted file mode 100644
index 95bd052b5d..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file lightFullbrightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec3 fullbrightAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
-
-void fullbright_lighting()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = fullbrightAtmosTransport(color.rgb);
-
- color.rgb = fullbrightScaleSoftClip(color.rgb);
-
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl
deleted file mode 100644
index b1e61e1a33..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightNonIndexedF.glsl
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * @file lightFullbrightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec3 fullbrightAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
-
-uniform sampler2D diffuseMap;
-
-void fullbright_lighting()
-{
- vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = fullbrightAtmosTransport(color.rgb);
-
- color.rgb = fullbrightScaleSoftClip(color.rgb);
-
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl
deleted file mode 100644
index 26f0ea84e0..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file lightFullbrightShinyF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform samplerCube environmentMap;
-
-vec3 fullbrightShinyAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
-
-void fullbright_shiny_lighting()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = fullbrightShinyAtmosTransport(color.rgb);
-
- color.rgb = fullbrightScaleSoftClip(color.rgb);
-
- color.a = max(color.a, gl_Color.a);
-
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl
deleted file mode 100644
index 953298da0d..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyNonIndexedF.glsl
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file lightFullbrightShinyF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform samplerCube environmentMap;
-uniform sampler2D diffuseMap;
-
-vec3 fullbrightShinyAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
-
-void fullbright_shiny_lighting()
-{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = fullbrightShinyAtmosTransport(color.rgb);
-
- color.rgb = fullbrightScaleSoftClip(color.rgb);
-
- color.a = max(color.a, gl_Color.a);
-
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl
deleted file mode 100644
index a6e10a249d..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterF.glsl
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file lightFullbrightShinyWaterF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
- */
-
-
-
-
-uniform samplerCube environmentMap;
-
-vec3 fullbrightShinyAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void fullbright_shiny_lighting_water()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = fullbrightShinyAtmosTransport(color.rgb);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, gl_Color.a);
-
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
deleted file mode 100644
index b4bb665a2b..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file lightFullbrightShinyWaterF.glsl
- *
- * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
- * $License$
- */
-
-
-
-
-uniform samplerCube environmentMap;
-uniform sampler2D diffuseMap;
-
-vec3 fullbrightShinyAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void fullbright_shiny_lighting_water()
-{
- vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = fullbrightShinyAtmosTransport(color.rgb);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, gl_Color.a);
-
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl
deleted file mode 100644
index 887d4130e7..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file lightFullbrightWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec4 diffuseLookup(vec2 texcoord);
-
-vec3 fullbrightAtmosTransport(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void fullbright_lighting_water()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = fullbrightAtmosTransport(color.rgb);
-
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl
deleted file mode 100644
index 1234682ae9..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterNonIndexedF.glsl
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file lightFullbrightWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2D diffuseMap;
-
-vec3 fullbrightAtmosTransport(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void fullbright_lighting_water()
-{
- vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = fullbrightAtmosTransport(color.rgb);
-
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl
deleted file mode 100644
index 149cf791f5..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightNonIndexedF.glsl
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * @file lightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2D diffuseMap;
-
-vec3 atmosLighting(vec3 light);
-vec3 scaleSoftClip(vec3 light);
-
-void default_lighting()
-{
- vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = atmosLighting(color.rgb);
-
- color.rgb = scaleSoftClip(color.rgb);
-
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl
deleted file mode 100644
index 300fcac092..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file lightShinyF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-
-uniform samplerCube environmentMap;
-
-vec3 scaleSoftClip(vec3 light);
-vec3 atmosLighting(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void shiny_lighting()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = atmosLighting(color.rgb);
-
- color.rgb = scaleSoftClip(color.rgb);
- color.a = max(color.a, gl_Color.a);
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl
deleted file mode 100644
index e877c0abb1..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightShinyNonIndexedF.glsl
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file lightShinyF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-
-uniform samplerCube environmentMap;
-uniform sampler2D diffuseMap;
-
-vec3 scaleSoftClip(vec3 light);
-vec3 atmosLighting(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void shiny_lighting()
-{
- vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = atmosLighting(color.rgb);
-
- color.rgb = scaleSoftClip(color.rgb);
- color.a = max(color.a, gl_Color.a);
- gl_FragColor = color;
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
deleted file mode 100644
index 07572fa915..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * @file lightShinyWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-
-uniform samplerCube environmentMap;
-
-vec3 atmosLighting(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void shiny_lighting_water()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = atmosLighting(color.rgb);
- color.a = max(color.a, gl_Color.a);
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl
deleted file mode 100644
index 3904179427..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterNonIndexedF.glsl
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file lightShinyWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-
-uniform sampler2D diffuseMap;
-uniform samplerCube environmentMap;
-
-vec3 atmosLighting(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void shiny_lighting_water()
-{
- vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy);
- color.rgb *= gl_Color.rgb;
-
- vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
-
- color.rgb = atmosLighting(color.rgb);
- color.a = max(color.a, gl_Color.a);
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl
deleted file mode 100644
index 3384f64d07..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * @file lightSpecularV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-// All lights, no specular highlights
-
-vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
-
-vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
-{
- return sumLightsSpecular(pos, norm, color, specularColor, baseCol);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
deleted file mode 100644
index 10c770fcc2..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * @file lightV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-// All lights, no specular highlights
-
-vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight);
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
-{
- return sumLights(pos, norm, color, baseLight);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl
deleted file mode 100644
index 61341a9f1f..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * @file lightWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec3 atmosLighting(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void default_lighting_water()
-{
- vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = atmosLighting(color.rgb);
-
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl
deleted file mode 100644
index ba850b61d0..0000000000
--- a/indra/newview/app_settings/shaders/class2/lighting/lightWaterNonIndexedF.glsl
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @file lightWaterF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2D diffuseMap;
-
-vec3 atmosLighting(vec3 light);
-vec4 applyWaterFog(vec4 color);
-
-void default_lighting_water()
-{
- vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
-
- color.rgb = atmosLighting(color.rgb);
-
- gl_FragColor = applyWaterFog(color);
-}
-
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
index 8df2e6f222..3acf9fe883 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
@@ -2,6 +2,24 @@
* @file sumLightsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -15,6 +33,10 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 atmosGetDiffuseSunlightColor();
vec3 scaleDownLight(vec3 light);
+uniform vec4 light_position[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
{
vec4 col = vec4(0.0, 0.0, 0.0, color.a);
@@ -25,15 +47,14 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor
vec4 specularSum = vec4(0.0);
// Collect normal lights (need to be divided by two, as we later multiply by 2)
- col.rgb += gl_LightSource[1].diffuse.rgb * calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[1].position.xyz, gl_LightSource[1].diffuse.rgb, 1.0);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[2].position.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[3].position.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation, gl_LightSource[3].diffuse.rgb);
- //col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[4].position.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].diffuse.rgb);
+ col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[2].xyz, light_attenuation[2].x, light_attenuation[2].y, light_diffuse[2].rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[3].xyz, light_attenuation[3].x, light_attenuation[3].y, light_diffuse[3].rgb);
col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
col.rgb += atmosAmbient(baseCol.rgb);
- col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, gl_LightSource[0].position.xyz, atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz,atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
col.rgb = min(col.rgb*color.rgb, 1.0);
specularColor.rgb = min(specularColor.rgb*specularSum.rgb, 1.0);
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
index 3d43a1813a..c9987ef3b9 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -2,11 +2,27 @@
* @file sumLightsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
float calcDirectionalLight(vec3 n, vec3 l);
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight);
@@ -14,21 +30,26 @@ vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
{
vec4 col = vec4(0.0, 0.0, 0.0, color.a);
// Collect normal lights (need to be divided by two, as we later multiply by 2)
- col.rgb += gl_LightSource[1].diffuse.rgb * calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
+ col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz);
+
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
- col.rgb += gl_LightSource[2].diffuse.rgb * calcPointLightOrSpotLight(pos, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb * calcPointLightOrSpotLight(pos, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].specular.a);
- //col.rgb += gl_LightSource[4].diffuse.rgb * calcPointLightOrSpotLight(pos, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].specular.a);
col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
col.rgb += atmosAmbient(baseLight.rgb);
- col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, gl_LightSource[0].position.xyz));
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));
col.rgb = min(col.rgb*color.rgb, 1.0);
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
deleted file mode 100644
index f49e74406f..0000000000
--- a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * @file fullbrightShinyV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-void calcAtmospherics(vec3 inPositionEye);
-
-uniform vec4 origin;
-
-varying float vary_texture_index;
-
-void main()
-{
- //transform vertex
- vec4 vert = vec4(gl_Vertex.xyz,1.0);
- vary_texture_index = gl_Vertex.w;
- gl_Position = gl_ModelViewProjectionMatrix*vert;
-
- vec4 pos = (gl_ModelViewMatrix * vert);
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
- vec3 ref = reflect(pos.xyz, -norm);
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
-
- calcAtmospherics(pos.xyz);
-
- gl_FrontColor = gl_Color;
-
- gl_FogFragCoord = pos.z;
-}
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
deleted file mode 100644
index 3076fa3260..0000000000
--- a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file fullbrightV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-void calcAtmospherics(vec3 inPositionEye);
-
-varying float vary_texture_index;
-
-void main()
-{
- //transform vertex
- vec4 vert = vec4(gl_Vertex.xyz,1.0);
- vary_texture_index = gl_Vertex.w;
- gl_Position = gl_ModelViewProjectionMatrix*vert;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
- vec4 pos = (gl_ModelViewMatrix * vert);
-
- calcAtmospherics(pos.xyz);
-
- gl_FrontColor = gl_Color;
-
- gl_FogFragCoord = pos.z;
-}
diff --git a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
deleted file mode 100644
index 49992d3535..0000000000
--- a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file shinyV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
-
-void calcAtmospherics(vec3 inPositionEye);
-
-varying float vary_texture_index;
-
-uniform vec4 origin;
-
-void main()
-{
- //transform vertex
- vec4 vert = vec4(gl_Vertex.xyz,1.0);
- vary_texture_index = gl_Vertex.w;
- gl_Position = gl_ModelViewProjectionMatrix*vert;
-
- vec4 pos = (gl_ModelViewMatrix * vert);
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
- vec3 ref = reflect(pos.xyz, -norm);
-
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
-
- calcAtmospherics(pos.xyz);
-
- gl_FrontColor = calcLighting(pos.xyz, norm, gl_Color, vec4(0.0));
-
- gl_FogFragCoord = pos.z;
-}
diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
deleted file mode 100644
index 5e02391767..0000000000
--- a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * @file simpleV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
-void calcAtmospherics(vec3 inPositionEye);
-
-varying float vary_texture_index;
-
-void main()
-{
- //transform vertex
- vec4 vert = vec4(gl_Vertex.xyz,1.0);
- vary_texture_index = gl_Vertex.w;
- gl_Position = gl_ModelViewProjectionMatrix*vert;
- gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
-
- vec4 pos = (gl_ModelViewMatrix * vert);
-
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
-
- calcAtmospherics(pos.xyz);
-
- vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
- gl_FrontColor = color;
-
- gl_FogFragCoord = pos.z;
-}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
index 21a0812c1b..fea3cbf69b 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
@@ -2,6 +2,24 @@
* @file atmosphericsF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
index ab4cf4806d..62a034ce05 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
@@ -2,6 +2,24 @@
* @file atmosphericsHelpersV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
index b61b0bb396..6a83be1426 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -2,12 +2,30 @@
* @file atmosphericsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-// varying param funcs
+// VARYING param funcs
void setSunlitColor(vec3 v);
void setAmblitColor(vec3 v);
void setAdditiveColor(vec3 v);
@@ -16,8 +34,8 @@ void setPositionEye(vec3 v);
vec3 getAdditiveColor();
-//varying vec4 vary_CloudUVs;
-//varying float vary_CloudDensity;
+//VARYING vec4 vary_CloudUVs;
+//VARYING float vary_CloudDensity;
// Inputs
uniform vec4 morphFactor;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
index 3a6585bb33..765b0927c3 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
@@ -2,29 +2,39 @@
* @file atmosphericVars.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+VARYING vec3 vary_SunlitColor;
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
-varying vec3 vary_PositionEye;
-
-varying vec3 vary_SunlitColor;
-varying vec3 vary_AmblitColor;
-varying vec3 vary_AdditiveColor;
-varying vec3 vary_AtmosAttenuation;
-
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
vec3 getSunlitColor()
{
- return vary_SunlitColor;
+ return vec3(0,0,0);
}
vec3 getAmblitColor()
{
- return vary_AmblitColor;
+ return vec3(0,0,0);
}
vec3 getAdditiveColor()
{
@@ -32,5 +42,5 @@ vec3 getAdditiveColor()
}
vec3 getAtmosAttenuation()
{
- return vary_AtmosAttenuation;
+ return vec3(vary_AtmosAttenuation);
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index 0f6e231ca6..99dbee15ee 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -2,61 +2,83 @@
* @file atmosphericVars.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
-varying vec3 vary_PositionEye;
+vec3 additive_color;
+vec3 atmos_attenuation;
+vec3 sunlit_color;
+vec3 amblit_color;
+vec3 position_eye;
-varying vec3 vary_SunlitColor;
-varying vec3 vary_AmblitColor;
-varying vec3 vary_AdditiveColor;
-varying vec3 vary_AtmosAttenuation;
-
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
vec3 getSunlitColor()
{
- return vary_SunlitColor;
+ return sunlit_color;
}
vec3 getAmblitColor()
{
- return vary_AmblitColor;
+ return amblit_color;
}
+
vec3 getAdditiveColor()
{
- return vary_AdditiveColor;
+ return additive_color;
}
vec3 getAtmosAttenuation()
{
- return vary_AtmosAttenuation;
+ return atmos_attenuation;
}
+vec3 getPositionEye()
+{
+ return position_eye;
+}
void setPositionEye(vec3 v)
{
- vary_PositionEye = v;
+ position_eye = v;
}
void setSunlitColor(vec3 v)
{
- vary_SunlitColor = v;
+ sunlit_color = v;
}
void setAmblitColor(vec3 v)
{
- vary_AmblitColor = v;
+ amblit_color = v;
}
void setAdditiveColor(vec3 v)
{
+ additive_color = v;
vary_AdditiveColor = v;
}
void setAtmosAttenuation(vec3 v)
{
+ atmos_attenuation = v;
vary_AtmosAttenuation = v;
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl
new file mode 100644
index 0000000000..163ef26444
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl
@@ -0,0 +1,50 @@
+/**
+ * @file atmosphericVarsWaterF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+VARYING vec3 vary_PositionEye;
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
+
+vec3 getSunlitColor()
+{
+ return vec3(0,0,0);
+}
+vec3 getAmblitColor()
+{
+ return vec3(0,0,0);
+}
+vec3 getAdditiveColor()
+{
+ return vary_AdditiveColor;
+}
+vec3 getAtmosAttenuation()
+{
+ return vary_AtmosAttenuation;
+}
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl
new file mode 100644
index 0000000000..553f6752e6
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl
@@ -0,0 +1,81 @@
+/**
+ * @file atmosphericVarsWaterV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+VARYING vec3 vary_PositionEye;
+VARYING vec3 vary_AdditiveColor;
+VARYING vec3 vary_AtmosAttenuation;
+
+vec3 atmos_attenuation;
+vec3 sunlit_color;
+vec3 amblit_color;
+
+vec3 getSunlitColor()
+{
+ return sunlit_color;
+}
+vec3 getAmblitColor()
+{
+ return amblit_color;
+}
+
+vec3 getAdditiveColor()
+{
+ return vary_AdditiveColor;
+}
+vec3 getAtmosAttenuation()
+{
+ return atmos_attenuation;
+}
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+
+void setPositionEye(vec3 v)
+{
+ vary_PositionEye = v;
+}
+
+void setSunlitColor(vec3 v)
+{
+ sunlit_color = v;
+}
+
+void setAmblitColor(vec3 v)
+{
+ amblit_color = v;
+}
+
+void setAdditiveColor(vec3 v)
+{
+ vary_AdditiveColor = v;
+}
+
+void setAtmosAttenuation(vec3 v)
+{
+ atmos_attenuation = v;
+ vary_AtmosAttenuation = v;
+}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
index 20f907a006..4ab06c6e21 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
@@ -2,18 +2,42 @@
* @file WLCloudsF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
/////////////////////////////////////////////////////////////////////////
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
-varying vec4 vary_CloudColorSun;
-varying vec4 vary_CloudColorAmbient;
-varying float vary_CloudDensity;
+VARYING vec4 vary_CloudColorSun;
+VARYING vec4 vary_CloudColorAmbient;
+VARYING float vary_CloudDensity;
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+VARYING vec2 vary_texcoord2;
+VARYING vec2 vary_texcoord3;
uniform sampler2D cloud_noise_texture;
uniform vec4 cloud_pos_density1;
@@ -32,14 +56,14 @@ vec3 scaleSoftClip(vec3 light) {
void main()
{
// Set variables
- vec2 uv1 = gl_TexCoord[0].xy;
- vec2 uv2 = gl_TexCoord[1].xy;
+ vec2 uv1 = vary_texcoord0.xy;
+ vec2 uv2 = vary_texcoord1.xy;
vec4 cloudColorSun = vary_CloudColorSun;
vec4 cloudColorAmbient = vary_CloudColorAmbient;
float cloudDensity = vary_CloudDensity;
- vec2 uv3 = gl_TexCoord[2].xy;
- vec2 uv4 = gl_TexCoord[3].xy;
+ vec2 uv3 = vary_texcoord2.xy;
+ vec2 uv4 = vary_texcoord3.xy;
// Offset texture coords
uv1 += cloud_pos_density1.xy; //large texture, visible density
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index 3eac63076c..c5bb52169c 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -2,19 +2,44 @@
* @file WLCloudsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
//////////////////////////////////////////////////////////////////////////
// The vertex shader for creating the atmospheric sky
///////////////////////////////////////////////////////////////////////////////
// Output parameters
-varying vec4 vary_CloudColorSun;
-varying vec4 vary_CloudColorAmbient;
-varying float vary_CloudDensity;
+VARYING vec4 vary_CloudColorSun;
+VARYING vec4 vary_CloudColorAmbient;
+VARYING float vary_CloudDensity;
+VARYING vec2 vary_texcoord0;
+VARYING vec2 vary_texcoord1;
+VARYING vec2 vary_texcoord2;
+VARYING vec2 vary_texcoord3;
// Inputs
uniform vec3 camPosLocal;
@@ -41,12 +66,12 @@ void main()
{
// World / view / projection
- gl_Position = ftransform();
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
// Get relative position
- vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
+ vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
// Set altitude
if (P.y > 0.)
@@ -142,17 +167,17 @@ void main()
// Texture coords
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_TexCoord[0].xy -= 0.5;
- gl_TexCoord[0].xy /= cloud_scale.x;
- gl_TexCoord[0].xy += 0.5;
+ vary_texcoord0 = texcoord0;
+ vary_texcoord0.xy -= 0.5;
+ vary_texcoord0.xy /= cloud_scale.x;
+ vary_texcoord0.xy += 0.5;
- gl_TexCoord[1] = gl_TexCoord[0];
- gl_TexCoord[1].x += lightnorm.x * 0.0125;
- gl_TexCoord[1].y += lightnorm.z * 0.0125;
+ vary_texcoord1 = vary_texcoord0;
+ vary_texcoord1.x += lightnorm.x * 0.0125;
+ vary_texcoord1.y += lightnorm.z * 0.0125;
- gl_TexCoord[2] = gl_TexCoord[0] * 16.;
- gl_TexCoord[3] = gl_TexCoord[1] * 16.;
+ vary_texcoord2 = vary_texcoord0 * 16.;
+ vary_texcoord3 = vary_texcoord1 * 16.;
// Combine these to minimize register use
vary_CloudColorAmbient += oHazeColorBelowCloud;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
index 6570dcb608..478373d729 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
@@ -2,6 +2,24 @@
* @file gammaF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
index d14c638130..c9d96b2cf4 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
@@ -2,16 +2,36 @@
* @file WLSkyF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
/////////////////////////////////////////////////////////////////////////
// The fragment shader for the sky
/////////////////////////////////////////////////////////////////////////
-varying vec4 vary_HazeColor;
+VARYING vec4 vary_HazeColor;
uniform sampler2D cloud_noise_texture;
uniform vec4 gamma;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
index 1ea00f723a..46773cf89f 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -2,17 +2,37 @@
* @file WLSkyV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
+uniform mat4 modelview_projection_matrix;
+ATTRIBUTE vec3 position;
// SKY ////////////////////////////////////////////////////////////////////////
// The vertex shader for creating the atmospheric sky
///////////////////////////////////////////////////////////////////////////////
// Output parameters
-varying vec4 vary_HazeColor;
+VARYING vec4 vary_HazeColor;
// Inputs
uniform vec3 camPosLocal;
@@ -39,12 +59,11 @@ void main()
{
// World / view / projection
- gl_Position = ftransform();
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
// Get relative position
- vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
- //vec3 P = gl_Vertex.xyz + vec3(0,50,0);
+ vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
+ //vec3 P = position.xyz + vec3(0,50,0);
// Set altitude
if (P.y > 0.)
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index 28381482c1..8a8e4cb0f6 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -2,6 +2,24 @@
* @file transportF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
index 3d970d252c..721054b5ad 100644
--- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
@@ -2,41 +2,67 @@
* @file avatarV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+uniform mat4 projection_matrix;
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec4 clothing;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
void calcAtmospherics(vec3 inPositionEye);
-attribute vec4 clothing; //4
+uniform vec4 color;
-attribute vec4 gWindDir; //7
-attribute vec4 gSinWaveParams; //3
-attribute vec4 gGravity; //5
+uniform vec4 gWindDir;
+uniform vec4 gSinWaveParams;
+uniform vec4 gGravity;
const vec4 gMinMaxConstants = vec4(1.0, 0.166666, 0.0083143, .00018542); // #minimax-generated coefficients
const vec4 gPiConstants = vec4(0.159154943, 6.28318530, 3.141592653, 1.5707963); // # {1/2PI, 2PI, PI, PI/2}
void main()
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
+ vary_texcoord0 = texcoord0;
vec4 pos;
mat4 trans = getSkinnedTransform();
vec3 norm;
- norm.x = dot(trans[0].xyz, gl_Normal);
- norm.y = dot(trans[1].xyz, gl_Normal);
- norm.z = dot(trans[2].xyz, gl_Normal);
+ norm.x = dot(trans[0].xyz, normal);
+ norm.y = dot(trans[1].xyz, normal);
+ norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
//wind
vec4 windEffect;
windEffect = vec4(dot(norm, gWindDir.xyz));
- pos.x = dot(trans[2].xyz, gl_Vertex.xyz);
+ pos.x = dot(trans[2].xyz, position.xyz);
windEffect.xyz = pos.x * vec3(0.015, 0.015, 0.015)
+ windEffect.xyz;
windEffect.w = windEffect.w * 2.0 + 1.0; // move wind offset value to [-1, 3]
@@ -83,7 +109,7 @@ void main()
sinWave.xyz = max(sinWave.xyz, vec3(-1.0, -1.0, -1.0)); // clamp to underlying body shape
offsetPos = clothing * sinWave.x; // multiply wind effect times clothing displacement
temp2 = gWindDir*sinWave.z + vec4(norm,0); // calculate normal offset due to wind oscillation
- offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+gl_Vertex; // add to offset vertex position, and zero out effect from w
+ offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+vec4(position.xyz, 1.0); // add to offset vertex position, and zero out effect from w
norm += temp2.xyz*2.0; // add sin wave effect on normals (exaggerated)
//add "backlighting" effect
@@ -101,12 +127,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.0));
- gl_FrontColor = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.0));
+ vertex_color = col;
- gl_Position = gl_ProjectionMatrix * pos;
-
-
- gl_TexCoord[2] = vec4(pos.xyz, 1.0);
-
+ gl_Position = projection_matrix * pos;
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
deleted file mode 100644
index 498fee7c66..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * @file giDownsampleF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2DRect giLightMap;
-
-uniform vec2 kern[32];
-uniform float dist_factor;
-uniform float blur_size;
-uniform vec2 delta;
-uniform int kern_length;
-uniform float kern_scale;
-uniform vec3 blur_quad;
-
-varying vec2 vary_fragcoord;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-float getDepth(vec2 pos_screen)
-{
- float z = texture2DRect(depthMap, pos_screen.xy).a;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-void main()
-{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float depth = getDepth(vary_fragcoord.xy);
-
- vec3 ccol = texture2DRect(giLightMap, vary_fragcoord.xy).rgb;
- vec2 dlt = kern_scale * delta/(vec2(1.0,1.0)+norm.xy*norm.xy);
- dlt /= clamp(-depth*blur_quad.x, 1.0, 3.0);
- float defined_weight = kern[0].x;
- vec3 col = ccol*kern[0].x;
-
- for (int i = 0; i < kern_length; i++)
- {
- vec2 tc = vary_fragcoord.xy + kern[i].y*dlt;
- vec3 sampNorm = texture2DRect(normalMap, tc.xy).xyz;
- sampNorm = vec3((sampNorm.xy-0.5)*2.0,sampNorm.z); // unpack norm
-
- float d = dot(norm.xyz, sampNorm);
-
- if (d > 0.5)
- {
- float sampdepth = getDepth(tc.xy);
- sampdepth -= depth;
- if (sampdepth*sampdepth < blur_quad.z)
- {
- col += texture2DRect(giLightMap, tc).rgb*kern[i].x;
- defined_weight += kern[i].x;
- }
- }
- }
-
- col /= defined_weight;
-
- //col = ccol;
-
- col = col*blur_quad.y;
-
- gl_FragData[0].xyz = col;
-
- //gl_FragColor = ccol;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
deleted file mode 100644
index eebe930666..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @file postgiV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-varying vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
deleted file mode 100644
index 9896f8dafe..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * @file giF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2DRect specularRect;
-
-uniform sampler2D noiseMap;
-
-uniform sampler2D diffuseGIMap;
-uniform sampler2D specularGIMap;
-uniform sampler2D normalGIMap;
-uniform sampler2D depthGIMap;
-
-uniform sampler2D lightFunc;
-
-// Inputs
-varying vec2 vary_fragcoord;
-
-uniform vec2 screen_res;
-
-uniform vec4 sunlight_color;
-
-uniform mat4 inv_proj;
-uniform mat4 gi_mat; //gPipeline.mGIMatrix - eye space to sun space
-uniform mat4 gi_mat_proj; //gPipeline.mGIMatrixProj - eye space to projected sun space
-uniform mat4 gi_norm_mat; //gPipeline.mGINormalMatrix - eye space normal to sun space normal matrix
-uniform mat4 gi_inv_proj; //gPipeline.mGIInvProj - projected sun space to sun space
-uniform float gi_sample_width;
-uniform float gi_noise;
-uniform float gi_attenuation;
-uniform float gi_range;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec4 getGIPosition(vec2 gi_tc)
-{
- float depth = texture2D(depthGIMap, gi_tc).a;
- vec2 sc = gi_tc*2.0;
- sc -= vec2(1.0, 1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = gi_inv_proj*ndc;
- pos.xyz /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec3 giAmbient(vec3 pos, vec3 norm)
-{
- vec4 gi_c = gi_mat_proj * vec4(pos, 1.0);
- gi_c.xyz /= gi_c.w;
-
- vec4 gi_pos = gi_mat*vec4(pos,1.0);
- vec3 gi_norm = (gi_norm_mat*vec4(norm,1.0)).xyz;
- gi_norm = normalize(gi_norm);
-
- vec4 c_spec = texture2DRect(specularRect, vary_fragcoord.xy);
- vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).rgb;
- gi_pos.xyz += nz.x*gi_noise*gi_norm.xyz;
- vec2 tcx = gi_norm.xy;
- vec2 tcy = gi_norm.yx;
-
- vec4 eye_pos = gi_mat*vec4(0,0,0,1.0);
-
- vec3 eye_dir = normalize(gi_pos.xyz-eye_pos.xyz);
- vec3 eye_ref = reflect(eye_dir, gi_norm);
-
- float da = 0.0; //texture2DRect(lightMap, vary_fragcoord.xy).r*0.5;
- vec3 fdiff = vec3(da);
- float fda = da;
-
- vec3 rcol = vec3(0,0,0);
-
- float fsa = 0.0;
-
-
- for (int i = -1; i <= 1; i += 2 )
- {
- for (int j = -1; j <= 1; j+= 2)
- {
- vec2 tc = vec2(i, j)*0.75+gi_norm.xy*nz.z;
- tc += nz.xy*2.0;
- tc *= gi_sample_width*0.25;
- tc += gi_c.xy;
-
- vec3 lnorm = -(texture2D(normalGIMap, tc.xy).xyz*2.0-1.0);
- vec3 lpos = getGIPosition(tc.xy).xyz;
-
- vec3 at = lpos-gi_pos.xyz;
- float dist = length(at);
- float dist_atten = clamp(1.0/(gi_attenuation*dist), 0.0, 1.0);
-
-
- if (dist_atten > 0.01)
- { //possible contribution of indirect light to this surface
- vec3 ldir = at;
-
- float ld = -dot(ldir, lnorm);
-
- if (ld < 0.0)
- {
- float ang_atten = dot(ldir, gi_norm);
-
- if (ang_atten > 0.0)
- {
- vec4 spec = texture2D(specularGIMap, tc.xy);
- at = normalize(at);
- vec3 diff;
-
- float da = 0.0;
-
- //contribution from indirect source to visible pixel
- vec3 ha = at;
- ha.z -= 1.0;
- ha = normalize(ha);
- if (spec.a > 0.0)
- {
- float sa = dot(ha,lnorm);
- da = texture2D(lightFunc, vec2(sa, spec.a)).a;
- }
- else
- {
- da = -lnorm.z;
- }
-
- diff = texture2D(diffuseGIMap, tc.xy).rgb+spec.rgb*spec.a*2.0;
-
- if (da > 0.0)
- { //contribution from visible pixel to eye
- vec3 ha = normalize(at-eye_dir);
- if (c_spec.a > 0.0)
- {
- float sa = dot(ha, gi_norm);
- da = dist_atten*texture2D(lightFunc, vec2(sa, c_spec.a)).a;
- }
- else
- {
- da = dist_atten*dot(gi_norm, normalize(ldir));
- }
- fda += da;
- fdiff += da*(c_spec.rgb*c_spec.a*2.0+vec3(1,1,1))*diff.rgb;
- }
- }
- }
- }
- }
- }
-
- fdiff *= sunlight_color.rgb;
-
- vec3 ret = fda*fdiff;
-
- return clamp(ret,vec3(0.0), vec3(1.0));
-}
-
-void main()
-{
- vec2 pos_screen = vary_fragcoord.xy;
- vec4 pos = getPosition(pos_screen);
-
- float rad = gi_range*0.5;
-
- vec3 norm = texture2DRect(normalMap, pos_screen).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float dist = max(length(pos.xyz)-rad, 0.0);
-
- float da = clamp(1.0-dist/rad, 0.0, 1.0);
-
- vec3 ambient = da > 0.0 ? giAmbient(pos.xyz, norm) : vec3(0);
-
-
- gl_FragData[0].xyz = mix(vec3(0), ambient, da);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
deleted file mode 100644
index df4c6b3e0a..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @file giFinalF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2D bloomMap;
-uniform sampler2DRect edgeMap;
-
-uniform vec2 screen_res;
-varying vec2 vary_fragcoord;
-
-
-void main()
-{
- vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
- vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
-
- gl_FragColor = bloom + diff;
- //gl_FragColor.rgb = vec3(texture2DRect(edgeMap, vary_fragcoord.xy).a);
-} \ No newline at end of file
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
deleted file mode 100644
index 7e20d71529..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @file giFinalV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-varying vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
deleted file mode 100644
index e86f2896da..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * @file giV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-varying vec2 vary_fragcoord;
-
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
- vec4 tex = gl_MultiTexCoord0;
- tex.w = 1.0;
-
- gl_FrontColor = gl_Color;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
deleted file mode 100644
index 980def6443..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * @file luminanceF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2DRect lightMap;
-uniform sampler2DRect diffuseRect;
-
-varying vec2 vary_fragcoord;
-void main()
-{
- float i = texture2DRect(lightMap, vary_fragcoord.xy).r;
- gl_FragColor.rgb = vec3(i);
- gl_FragColor.a = 1.0;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
deleted file mode 100644
index 9afeac6ddf..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * @file giV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-varying vec2 vary_fragcoord;
-
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
-
- gl_FrontColor = gl_Color;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
deleted file mode 100644
index 6d4c20f68c..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * @file postDeferredF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect specularRect;
-
-uniform sampler2DRect localLightMap;
-uniform sampler2DRect sunLightMap;
-uniform sampler2DRect giLightMap;
-uniform sampler2DRect edgeMap;
-
-uniform sampler2D luminanceMap;
-
-uniform sampler2DRect lightMap;
-
-uniform sampler2D lightFunc;
-uniform sampler2D noiseMap;
-
-uniform float sun_lum_scale;
-uniform float sun_lum_offset;
-uniform float lum_scale;
-uniform float lum_lod;
-uniform vec4 ambient;
-uniform float gi_brightness;
-uniform float gi_luminance;
-
-uniform vec4 sunlight_color;
-
-uniform vec2 screen_res;
-varying vec2 vary_fragcoord;
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- vec4 lcol = texture2DLod(luminanceMap, vec2(0.5, 0.5), lum_lod);
-
- vec3 gi_col = texture2DRect(giLightMap, vary_fragcoord.xy).rgb;
- vec4 sun_col = texture2DRect(sunLightMap, vary_fragcoord.xy);
- vec3 local_col = texture2DRect(localLightMap, vary_fragcoord.xy).rgb;
-
- float scol = texture2DRect(lightMap, vary_fragcoord.xy).r;
-
- vec3 diff = texture2DRect(diffuseRect, vary_fragcoord.xy).rgb;
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
-
- gi_col = gi_col*(diff.rgb+spec.rgb*spec.a);
-
- float lum = 1.0-clamp(pow(lcol.r, gi_brightness)+sun_lum_offset, 0.0, 1.0);
-
- lum *= sun_lum_scale;
-
- sun_col *= 1.0+(lum*lum_scale*scol);
-
- vec4 col;
- col.rgb = gi_col+sun_col.rgb+local_col;
-
- col.a = sun_col.a;
-
- vec3 bcol = vec3(0,0,0);
- float tweight = 0.0;
- for (int i = 0; i < 16; i++)
- {
- float weight = (float(i)+1.0)/2.0;
- bcol += texture2DLod(luminanceMap, vary_fragcoord.xy/screen_res, weight).rgb*weight*weight*weight;
- tweight += weight*weight;
- }
-
- bcol /= tweight;
- bcol *= gi_luminance;
- col.rgb += bcol*lum;
-
- gl_FragColor = col;
- //gl_FragColor.rgb = texture2DRect(giLightMap, vary_fragcoord.xy).rgb;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
deleted file mode 100644
index 876f65ee3a..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @file postDeferredV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-varying vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
deleted file mode 100644
index fc65881680..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * @file postgiF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect giLightMap;
-uniform sampler2D noiseMap;
-uniform sampler2D giMip;
-uniform sampler2DRect edgeMap;
-
-
-uniform vec2 delta;
-uniform float kern_scale;
-uniform float gi_edge_weight;
-uniform float gi_blur_brightness;
-
-varying vec2 vary_fragcoord;
-
-void main()
-{
- vec2 dlt = kern_scale*delta;
- float defined_weight = 0.0;
- vec3 col = vec3(0.0);
-
- float e = 1.0;
-
- for (int i = 1; i < 8; i++)
- {
- vec2 tc = vary_fragcoord.xy + float(i) * dlt;
-
- e = max(e, 0.0);
- float wght = e;
-
- col += texture2DRect(giLightMap, tc).rgb*wght;
- defined_weight += wght;
-
- e *= e;
- e -=(texture2DRect(edgeMap, tc.xy-dlt*0.25).a+
- texture2DRect(edgeMap, tc.xy+dlt*0.25).a)*gi_edge_weight;
- }
-
- e = 1.0;
-
- for (int i = 1; i < 8; i++)
- {
- vec2 tc = vary_fragcoord.xy - float(i) * dlt;
-
- e = max(e,0.0);
- float wght = e;
-
- col += texture2DRect(giLightMap, tc).rgb*wght;
- defined_weight += wght;
-
- e *= e;
- e -= (texture2DRect(edgeMap, tc.xy-dlt*0.25).a+
- texture2DRect(edgeMap, tc.xy+dlt*0.25).a)*gi_edge_weight;
-
- }
-
- col /= max(defined_weight, 0.01);
-
- gl_FragColor.rgb = col * gi_blur_brightness;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
deleted file mode 100644
index eebe930666..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * @file postgiV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-varying vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
deleted file mode 100644
index d38d33cc21..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ /dev/null
@@ -1,358 +0,0 @@
-/**
- * @file softenLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-#extension GL_ARB_texture_rectangle : enable
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect specularRect;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2D noiseMap;
-uniform samplerCube environmentMap;
-uniform sampler2D lightFunc;
-uniform vec3 gi_quad;
-
-uniform float blur_size;
-uniform float blur_fidelity;
-
-// Inputs
-uniform vec4 morphFactor;
-uniform vec3 camPosLocal;
-//uniform vec4 camPosWorld;
-uniform vec4 gamma;
-uniform vec4 lightnorm;
-uniform vec4 sunlight_color;
-uniform vec4 ambient;
-uniform vec4 blue_horizon;
-uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
-uniform vec4 glow;
-uniform float scene_light_strength;
-uniform vec3 env_mat[3];
-uniform vec4 shadow_clip;
-uniform mat3 ssao_effect_mat;
-
-uniform sampler2DRect depthMap;
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
-
-vec3 vary_PositionEye;
-
-vec3 vary_SunlitColor;
-vec3 vary_AmblitColor;
-vec3 vary_AdditiveColor;
-vec3 vary_AtmosAttenuation;
-uniform float gi_ambiance;
-
-vec4 getPosition_d(vec2 pos_screen, float depth)
-{
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec4 getPosition(vec2 pos_screen)
-{ //get position in screen space (world units) given window coordinate and depth map
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- return getPosition_d(pos_screen, depth);
-}
-
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
-vec3 getSunlitColor()
-{
- return vary_SunlitColor;
-}
-vec3 getAmblitColor()
-{
- return vary_AmblitColor;
-}
-vec3 getAdditiveColor()
-{
- return vary_AdditiveColor;
-}
-vec3 getAtmosAttenuation()
-{
- return vary_AtmosAttenuation;
-}
-
-
-void setPositionEye(vec3 v)
-{
- vary_PositionEye = v;
-}
-
-void setSunlitColor(vec3 v)
-{
- vary_SunlitColor = v;
-}
-
-void setAmblitColor(vec3 v)
-{
- vary_AmblitColor = v;
-}
-
-void setAdditiveColor(vec3 v)
-{
- vary_AdditiveColor = v;
-}
-
-void setAtmosAttenuation(vec3 v)
-{
- vary_AtmosAttenuation = v;
-}
-
-void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
-
- vec3 P = inPositionEye;
- setPositionEye(P);
-
- //(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
-
- vec3 tmpLightnorm = lightnorm.xyz;
-
- vec3 Pn = normalize(P);
- float Plen = length(P);
-
- vec4 temp1 = vec4(0);
- vec3 temp2 = vec3(0);
- vec4 blue_weight;
- vec4 haze_weight;
- vec4 sunlight = sunlight_color;
- vec4 light_atten;
-
- //sunlight attenuation effect (hue and brightness) due to atmosphere
- //this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
- //I had thought blue_density and haze_density should have equal weighting,
- //but attenuation due to haze_density tends to seem too strong
-
- temp1 = blue_density + vec4(haze_density.r);
- blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
-
- //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
- temp2.y = max(0.0, tmpLightnorm.y);
- temp2.y = 1. / temp2.y;
- sunlight *= exp( - light_atten * temp2.y);
-
- // main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
-
- // Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
- // compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
-
- //final atmosphere attenuation factor
- setAtmosAttenuation(temp1.rgb);
-
- //compute haze glow
- //(can use temp2.x as temp because we haven't used it yet)
- temp2.x = dot(Pn, tmpLightnorm.xyz);
- temp2.x = 1. - temp2.x;
- //temp2.x is 0 at the sun and increases away from sun
- temp2.x = max(temp2.x, .03); //was glow.y
- //set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
- //higher glow.x gives dimmer glow (because next step is 1 / "angle")
- temp2.x = pow(temp2.x, glow.z);
- //glow.z should be negative, so we're doing a sort of (1 / "angle") function
-
- //add "minimum anti-solar illumination"
- temp2.x += .25;
-
- //increase ambient when there are more clouds
- vec4 tmpAmbient = ambient*gi_ambiance + (vec4(1.) - ambient*gi_ambiance) * cloud_shadow.x * 0.5;
-
- /* decrease value and saturation (that in HSV, not HSL) for occluded areas
- * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
- * // The following line of code performs the equivalent of:
- * float ambAlpha = tmpAmbient.a;
- * float ambValue = dot(vec3(tmpAmbient), vec3(0.577)); // projection onto <1/rt(3), 1/rt(3), 1/rt(3)>, the neutral white-black axis
- * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue);
- * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha);
- */
- tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a);
-
- //haze color
- setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
- + tmpAmbient)));
-
- //brightness of surface both sunlight and ambient
- setSunlitColor(vec3(sunlight * .5));
- setAmblitColor(vec3(tmpAmbient * .25));
- setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
-}
-
-vec3 atmosLighting(vec3 light)
-{
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor();
- return (2.0 * light);
-}
-
-vec3 atmosTransport(vec3 light) {
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor() * 2.0;
- return light;
-}
-vec3 atmosGetDiffuseSunlightColor()
-{
- return getSunlitColor();
-}
-
-vec3 scaleDownLight(vec3 light)
-{
- return (light / scene_light_strength );
-}
-
-vec3 scaleUpLight(vec3 light)
-{
- return (light * scene_light_strength);
-}
-
-vec3 atmosAmbient(vec3 light)
-{
- return getAmblitColor() + light / 2.0;
-}
-
-vec3 atmosAffectDirectionalLight(float lightIntensity)
-{
- return getSunlitColor() * lightIntensity;
-}
-
-vec3 scaleSoftClip(vec3 light)
-{
- //soft clip effect:
- light = 1. - clamp(light, vec3(0.), vec3(1.));
- light = 1. - pow(light, gamma.xxx);
-
- return light;
-}
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- float depth = texture2DRect(depthMap, tc.xy).a;
- vec3 pos = getPosition_d(tc, depth).xyz;
- vec3 norm = texture2DRect(normalMap, tc).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- //vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
-
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
-
- vec4 diffuse = texture2DRect(diffuseRect, tc);
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
-
- da = texture2D(lightFunc, vec2(da, 0.0)).a;
-
- vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
- float scol = max(scol_ambocc.r, diffuse.a);
- float ambocc = scol_ambocc.g;
-
- calcAtmospherics(pos.xyz, ambocc);
-
- vec3 col = atmosAmbient(vec3(0));
- col += atmosAffectDirectionalLight(max(min(da, scol), diffuse.a));
-
- col *= diffuse.rgb;
-
- if (spec.a > 0.0) // specular reflection
- {
- // the old infinite-sky shiny reflection
- //
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*scol*texture2D(lightFunc, vec2(sa, spec.a)).a;
-
- /*
- // screen-space cheap fakey reflection map
- //
- vec3 refnorm = normalize(reflect(vec3(0,0,-1), norm.xyz));
- depth -= 0.5; // unbias depth
- // first figure out where we'll make our 2D guess from
- vec2 ref2d = (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
- // Offset the guess source a little according to a trivial
- // checkerboard dither function and spec.a.
- // This is meant to be similar to sampling a blurred version
- // of the diffuse map. LOD would be better in that regard.
- // The goal of the blur is to soften reflections in surfaces
- // with low shinyness, and also to disguise our lameness.
- float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
- float checkoffset = (3.0 + (7.0*(1.0-spec.a)))*(checkerboard-0.5);
-
- ref2d += vec2(checkoffset, checkoffset);
- ref2d += tc.xy; // use as offset from destination
- // Get attributes from the 2D guess point.
- // We average two samples of diffuse (not of anything else) per
- // pixel to try to reduce aliasing some more.
- vec3 refcol = 0.5 * (texture2DRect(diffuseRect, ref2d + vec2(0.0, -checkoffset)).rgb +
- texture2DRect(diffuseRect, ref2d + vec2(-checkoffset, 0.0)).rgb);
- float refdepth = texture2DRect(depthMap, ref2d).a;
- vec3 refpos = getPosition_d(ref2d, refdepth).xyz;
- float refshad = texture2DRect(lightMap, ref2d).r;
- vec3 refn = texture2DRect(normalMap, ref2d).rgb;
- refn = vec3((refn.xy-0.5)*2.0,refn.z); // unpack norm
- refn = normalize(refn);
- // figure out how appropriate our guess actually was
- float refapprop = max(0.0, dot(-refnorm, normalize(pos - refpos)));
- // darken reflections from points which face away from the reflected ray - our guess was a back-face
- //refapprop *= step(dot(refnorm, refn), 0.0);
- refapprop = min(refapprop, max(0.0, -dot(refnorm, refn))); // more conservative variant
- // get appropriate light strength for guess-point.
- // reflect light direction to increase the illusion that
- // these are reflections.
- vec3 reflight = reflect(lightnorm.xyz, norm.xyz);
- float reflit = min(max(dot(refn, reflight.xyz), 0.0), refshad);
- // apply sun color to guess-point, dampen according to inappropriateness of guess
- float refmod = min(refapprop, reflit);
- vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
- vec3 ssshiny = (refprod * spec.a);
- ssshiny *= 0.3; // dampen it even more
- */
- vec3 ssshiny = vec3(0,0,0);
-
- // add the two types of shiny together
- col += (ssshiny + dumbshiny) * spec.rgb;
- }
-
- col = atmosLighting(col);
- col = scaleSoftClip(col);
-
- gl_FragColor.rgb = col;
-
- //gl_FragColor.rgb = gi_col.rgb;
- gl_FragColor.a = 0.0;
-
- //gl_FragColor.rg = scol_ambocc.rg;
- //gl_FragColor.rgb = texture2DRect(lightMap, vary_fragcoord.xy).rgb;
- //gl_FragColor.rgb = norm.rgb*0.5+0.5;
- //gl_FragColor.rgb = vec3(ambocc);
- //gl_FragColor.rgb = vec3(scol);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
deleted file mode 100644
index 745cc01992..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * @file softenLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform vec2 screen_res;
-
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
-void main()
-{
- //transform vertex
- gl_Position = ftransform();
-
- vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-
- vec4 tex = gl_MultiTexCoord0;
- tex.w = 1.0;
-
- vary_light = gl_MultiTexCoord0;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
deleted file mode 100644
index de7e038402..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * @file treeF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * $/LicenseInfo$
- */
-
-
-
-uniform sampler2D diffuseMap;
-
-varying vec3 vary_normal;
-
-void main()
-{
- vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy);
- gl_FragData[0] = vec4(gl_Color.rgb*col.rgb, col.a <= 0.5 ? 0.0 : 0.005);
- gl_FragData[1] = vec4(0,0,0,0);
- vec3 nvn = normalize(vary_normal);
- gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
-}
diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
index 92347a5b4a..e043ac873e 100644
--- a/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
@@ -2,11 +2,27 @@
* @file sumLightsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol);
@@ -15,6 +31,10 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 atmosGetDiffuseSunlightColor();
vec3 scaleDownLight(vec3 light);
+uniform vec4 light_position[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
{
vec4 col = vec4(0.0, 0.0, 0.0, color.a);
@@ -25,18 +45,18 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor
vec4 specularSum = vec4(0.0);
// Collect normal lights (need to be divided by two, as we later multiply by 2)
- col.rgb += gl_LightSource[1].diffuse.rgb * calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[1].position.xyz,gl_LightSource[1].diffuse.rgb, 1.0);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[2].position.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation,gl_LightSource[2].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[3].position.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation,gl_LightSource[3].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[4].position.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation,gl_LightSource[4].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[5].position.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation,gl_LightSource[5].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[6].position.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation,gl_LightSource[6].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[7].position.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation,gl_LightSource[7].diffuse.rgb);
+ col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[2].xyz, light_attenuation[2].x, light_attenuation[2].y, light_diffuse[2].rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[3].xyz, light_attenuation[3].x, light_attenuation[3].y, light_diffuse[3].rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[4].xyz, light_attenuation[4].x, light_attenuation[4].y, light_diffuse[4].rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[5].xyz, light_attenuation[5].x, light_attenuation[5].y, light_diffuse[5].rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[6].xyz, light_attenuation[6].x, light_attenuation[6].y, light_diffuse[6].rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[7].xyz, light_attenuation[7].x, light_attenuation[7].y, light_diffuse[7].rgb);
col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
col.rgb += atmosAmbient(baseCol.rgb);
- col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, gl_LightSource[0].position.xyz,atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz,atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
col.rgb = min(col.rgb*color.rgb, 1.0);
specularColor.rgb = min(specularColor.rgb*specularSum.rgb, 1.0);
diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
index 24bbc0a1a1..dadff40933 100644
--- a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
@@ -2,11 +2,28 @@
* @file sumLightsV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2005, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
float calcDirectionalLight(vec3 n, vec3 l);
float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight);
@@ -15,22 +32,29 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
{
vec4 col = vec4(0.0, 0.0, 0.0, color.a);
// Collect normal lights (need to be divided by two, as we later multiply by 2)
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].specular.a);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].specular.a);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].specular.a);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].specular.a);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].specular.a);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].specular.a);
- col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
+
+ // Collect normal lights
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
+ col.rgb += light_diffuse[4].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[4], light_direction[4], light_attenuation[4].x, light_attenuation[4].z);
+ col.rgb += light_diffuse[5].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[5], light_direction[5], light_attenuation[5].x, light_attenuation[5].z);
+ col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].z);
+ col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].z);
+ col.rgb += light_diffuse[1].rgb*calcDirectionalLight(norm, light_position[1].xyz);
col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
- col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, gl_LightSource[0].position.xyz));
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));
col.rgb += atmosAmbient(baseLight.rgb);
col.rgb = min(col.rgb*color.rgb, 1.0);
diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml
new file mode 100644
index 0000000000..29c019719d
--- /dev/null
+++ b/indra/newview/app_settings/toolbars.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toolbars>
+ <bottom_toolbar
+ button_display_mode="icons_with_text">
+ <command name="chat"/>
+ <command name="speak"/>
+ <command name="destinations"/>
+ <command name="people"/>
+ <command name="profile"/>
+ <command name="move"/>
+ <command name="view"/>
+ <command name="howto"/>
+ </bottom_toolbar>
+ <left_toolbar
+ button_display_mode="icons_only">
+ <command name="avatar"/>
+ <command name="appearance"/>
+ <command name="inventory"/>
+ <command name="search"/>
+ <command name="places"/>
+ <command name="voice"/>
+ <command name="minimap"/>
+ <command name="snapshot"/>
+ </left_toolbar>
+</toolbars>
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index 5d6b10c047..99dbfcae51 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -393,7 +393,26 @@
max_attachment_offset="2.0"
visible_in_first_person="true" />
-
+ <attachment_point
+ id="39"
+ group="6"
+ pie_slice="1"
+ name="Neck"
+ joint="mNeck"
+ position="0 0 0"
+ rotation="0 0 0"
+ visible_in_first_person="true" />
+
+ <attachment_point
+ id="40"
+ group="6"
+ pie_slice="2"
+ name="Avatar Center"
+ joint="mRoot"
+ position="0 0 0"
+ rotation="0 0 0"
+ visible_in_first_person="true" />
+
<param
id="32"
group="1"
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 22c79a4cbd..0f33d40ac3 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -1,6 +1,10 @@
-version 30
+version 32
+// The version number above should be implemented IF AND ONLY IF some
+// change has been made that is sufficiently important to justify
+// resetting the graphics preferences of all users to the recommended
+// defaults. This should be as rare an event as we can manage.
-// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
+// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
//
@@ -65,6 +69,8 @@ RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
+
//
// Low Graphics Settings
@@ -88,7 +94,7 @@ RenderTerrainLODFactor 1 1
RenderTransparentWater 1 0
RenderTreeLODFactor 1 0
RenderUseImpostors 1 1
-RenderVolumeLODFactor 1 0.5
+RenderVolumeLODFactor 1 1.125
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
@@ -155,7 +161,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -184,7 +190,7 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
@@ -244,10 +250,10 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
//
-// No GL_ARB_map_buffer_range
+// GL_ARB_map_buffer_range exists
//
-list NoMapBufferRange
-RenderVBOMappingDisable 1 0
+list MapBufferRange
+RenderVBOMappingDisable 1 1
//
@@ -292,6 +298,7 @@ RenderVBOEnable 1 0
list OpenGLPre30
RenderDeferred 0 0
+RenderMaxTextureIndex 1 1
list Intel
RenderAnisotropic 1 0
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 649f5ebd18..8142311a55 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -1,4 +1,8 @@
-version 25
+version 27
+// The version number above should be implemented IF AND ONLY IF some
+// change has been made that is sufficiently important to justify
+// resetting the graphics preferences of all users to the recommended
+// defaults. This should be as rare an event as we can manage.
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -63,6 +67,7 @@ RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
@@ -153,7 +158,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -183,7 +188,7 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
@@ -242,10 +247,10 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
//
-// No GL_ARB_map_buffer_range
+// GL_ARB_map_buffer_range exists
//
-list NoMapBufferRange
-RenderVBOMappingDisable 1 0
+list MapBufferRange
+RenderVBOMappingDisable 1 1
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index ee08e78af5..390da2273d 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,8 @@
-version 26
+version 31
+// The version number above should be implemented IF AND ONLY IF some
+// change has been made that is sufficiently important to justify
+// resetting the graphics preferences of all users to the recommended
+// defaults. This should be as rare an event as we can manage.
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -47,10 +51,10 @@ RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
-RenderVBOEnable 1 1
-RenderVBOMappingDisable 1 1
+RenderVBOEnable 1 0
+RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
-UseStartScreen 1 1
+UseStartScreen 1 1
UseOcclusion 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@@ -63,8 +67,9 @@ RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
WatchdogDisabled 1 1
-RenderUseStreamVBO 1 1
+RenderUseStreamVBO 1 0
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
@@ -155,7 +160,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -185,7 +190,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
@@ -244,13 +249,6 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
//
-// No GL_ARB_map_buffer_range
-//
-list NoMapBufferRange
-RenderVBOMappingDisable 1 0
-
-
-//
// "Default" setups for safe, low, medium, high
//
list safe
@@ -293,7 +291,7 @@ list TexUnit8orLess
RenderDeferredSSAO 0 0
list ATI
-RenderDeferredSSAO 0 0
+RenderDeferredSSAO 1 0
list Intel
RenderAnisotropic 1 0
diff --git a/indra/newview/featuretable_solaris.txt b/indra/newview/featuretable_solaris.txt
index 7df75687f2..e7cae1abdc 100644
--- a/indra/newview/featuretable_solaris.txt
+++ b/indra/newview/featuretable_solaris.txt
@@ -1,4 +1,8 @@
version 15
+// The version number above should be implemented IF AND ONLY IF some
+// change has been made that is sufficiently important to justify
+// resetting the graphics preferences of all users to the recommended
+// defaults. This should be as rare an event as we can manage.
// NOTE: This is mostly identical to featuretable.txt with a few differences
// Should be combined into one table
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index ba74f9a6c2..278d601860 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -1,4 +1,8 @@
-version 30
+version 31
+// The version number above should be implemented IF AND ONLY IF some
+// change has been made that is sufficiently important to justify
+// resetting the graphics preferences of all users to the recommended
+// defaults. This should be as rare an event as we can manage.
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@@ -65,6 +69,7 @@ RenderShadowDetail 1 0
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
@@ -155,7 +160,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -185,7 +190,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
@@ -244,10 +249,10 @@ RenderDeferredSSAO 0 0
RenderShadowDetail 0 0
//
-// No GL_ARB_map_buffer_range
+// GL_ARB_map_buffer_range exists
//
-list NoMapBufferRange
-RenderVBOMappingDisable 1 0
+list MapBufferRange
+RenderVBOMappingDisable 1 1
//
@@ -290,6 +295,7 @@ RenderVBOEnable 1 0
list OpenGLPre30
RenderDeferred 0 0
+RenderMaxTextureIndex 1 1
list Intel
RenderAnisotropic 1 0
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 6ed4e3b7f7..198e702459 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -5,6 +5,10 @@
// against driver strings, a class number, and whether we claim
// to support them or not.
//
+// Case is not significant in either the regular expressions or the
+// driver strings; the recognizer code lowercases both before using
+// them.
+//
// If you modify this table, use the (perl) gpu_table_tester
// to compare the results of recognizing known cards (it is easy
// to mess this up by putting things in the wrong order):
@@ -12,13 +16,13 @@
// perl ../../scripts/gpu_table_tester -g gpu_table.txt tests/gpus_seen.txt | diff - tests/gpus_results.txt
//
// Format:
-// Fields are separated by one or more tab (not space) characters
-// <recognizer name> <regular expression> <class> <supported>
+// Fields are separated by one or more tab (not space) characters
+// <recognizer name> <regular expression> <class> <supported>
//
// Class Numbers:
-// 0 - Defaults to low graphics settings. No shaders on by default
-// 1 - Defaults to mid graphics settings. Basic shaders on by default
-// 2 - Defaults to high graphics settings. Atmospherics on by default.
+// 0 - Defaults to low graphics settings. No shaders on by default
+// 1 - Defaults to mid graphics settings. Basic shaders on by default
+// 2 - Defaults to high graphics settings. Atmospherics on by default.
// 3 - Same as class 2 for now.
//
// Supported Number:
@@ -39,7 +43,8 @@ ATI All-in-Wonder X800 .*ATI.*All-in-Wonder X8.* 2 1
ATI All-in-Wonder X1800 .*ATI.*All-in-Wonder X18.* 3 1
ATI All-in-Wonder X1900 .*ATI.*All-in-Wonder X19.* 3 1
ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1
-ATI All-in-Wonder Radeon .*ATI.*All-in-Wonder Radeon.* 0 1
+ATI All-in-Wonder Radeon .*ATI.*All-in-Wonder Radeon.* 0 1
+ATI ASUS ARES .*ATI.*ASUS.*ARES.* 3 1
ATI ASUS A9xxx .*ATI.*ASUS.*A9.* 1 1
ATI ASUS AH24xx .*ATI.*ASUS.*AH24.* 1 1
ATI ASUS AH26xx .*ATI.*ASUS.*AH26.* 3 1
@@ -51,6 +56,7 @@ ATI ASUS AX5xx .*ATI.*ASUS.*AX5.* 1 1
ATI ASUS AX8xx .*ATI.*ASUS.*AX8.* 2 1
ATI ASUS EAH24xx .*ATI.*ASUS.*EAH24.* 2 1
ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1
+ATI ASUS EAH29xx .*ATI.*ASUS.*EAH29.* 3 1
ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1
ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 3 1
ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1
@@ -59,12 +65,17 @@ ATI ASUS EAH45xx .*ATI.*ASUS.*EAH45.* 1 1
ATI ASUS EAH48xx .*ATI.*ASUS.*EAH48.* 3 1
ATI ASUS EAH57xx .*ATI.*ASUS.*EAH57.* 3 1
ATI ASUS EAH58xx .*ATI.*ASUS.*EAH58.* 3 1
+ATI ASUS EAH6xxx .*ATI.*ASUS.*EAH6.* 3 1
ATI ASUS Radeon X1xxx .*ATI.*ASUS.*X1.* 3 1
ATI Radeon X7xx .*ATI.*ASUS.*X7.* 1 1
-ATI Radeon X1xxx .*ATI.*X1.* 0 1
-ATI Radeon X13xx .*ATI.*Diamond X13.* 1 1
-ATI Radeon X16xx .*ATI.*Diamond X16.* 1 1
-ATI Radeon X19xx .*ATI.*Diamond X19.* 1 1
+ATI Radeon X19xx .*ATI.*(Radeon|Diamond) X19.* ?.* 3 1
+ATI Radeon X18xx .*ATI.*(Radeon|Diamond) X18.* ?.* 3 1
+ATI Radeon X17xx .*ATI.*(Radeon|Diamond) X17.* ?.* 2 1
+ATI Radeon X16xx .*ATI.*(Radeon|Diamond) X16.* ?.* 2 1
+ATI Radeon X15xx .*ATI.*(Radeon|Diamond) X15.* ?.* 2 1
+ATI Radeon X13xx .*ATI.*(Radeon|Diamond) X13.* ?.* 1 1
+ATI Radeon X1xxx .*ATI.*(Radeon|Diamond) X1.. ?.* 1 1
+ATI Radeon X2xxx .*ATI.*(Radeon|Diamond) X2.. ?.* 1 1
ATI Display Adapter .*ATI.*display adapter.* 0 1
ATI FireGL 5200 .*ATI.*FireGL V52.* 0 1
ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 1
@@ -74,8 +85,9 @@ ATI FirePro M5800 .*ATI.*FirePro.*M58.* 3 1
ATI FirePro M7740 .*ATI.*FirePro.*M77.* 3 1
ATI FirePro M7820 .*ATI.*FirePro.*M78.* 3 1
ATI FireMV .*ATI.*FireMV.* 0 1
-ATI Geforce 9500 GT .*ATI.*Geforce 9500 *GT 2 1
-ATI Geforce 9800 GT .*ATI.*Geforce 9800 *GT 2 1
+ATI Geforce 9500 GT .*ATI.*Geforce 9500 *GT.* 2 1
+ATI Geforce 9600 GT .*ATI.*Geforce 9600 *GT.* 2 1
+ATI Geforce 9800 GT .*ATI.*Geforce 9800 *GT.* 2 1
ATI Generic .*ATI.*Generic.* 0 0
ATI Hercules 9800 .*ATI.*Hercules.*9800.* 1 1
ATI IGP 340M .*ATI.*IGP.*340M.* 0 0
@@ -85,168 +97,156 @@ ATI M56 .*ATI.*M56.* 1 1
ATI M71 .*ATI.*M71.* 1 1
ATI M72 .*ATI.*M72.* 1 1
ATI M76 .*ATI.*M76.* 3 1
-ATI Mobility Radeon 4100 .*ATI.*(Mobility|MOBILITY).*41.* 0 1
-ATI Mobility Radeon 7xxx .*ATI.*(Mobility|MOBILITY).*Radeon 7.* 0 1
-ATI Mobility Radeon 8xxx .*ATI.*(Mobility|MOBILITY).*Radeon 8.* 0 1
-ATI Mobility Radeon 9800 .*ATI.*(Mobility|MOBILITY).*98.* 1 1
-ATI Mobility Radeon 9700 .*ATI.*(Mobility|MOBILITY).*97.* 1 1
-ATI Mobility Radeon 9600 .*ATI.*(Mobility|MOBILITY).*96.* 0 1
-ATI Mobility Radeon HD 530v .*ATI.*(Mobility|MOBILITY).*HD *530v.* 1 1
-ATI Mobility Radeon HD 540v .*ATI.*(Mobility|MOBILITY).*HD *540v.* 2 1
-ATI Mobility Radeon HD 545v .*ATI.*(Mobility|MOBILITY).*HD *545v.* 2 1
-ATI Mobility Radeon HD 550v .*ATI.*(Mobility|MOBILITY).*HD *550v.* 2 1
-ATI Mobility Radeon HD 560v .*ATI.*(Mobility|MOBILITY).*HD *560v.* 2 1
-ATI Mobility Radeon HD 565v .*ATI.*(Mobility|MOBILITY).*HD *565v.* 2 1
-ATI Mobility Radeon HD 2300 .*ATI.*(Mobility|MOBILITY).*HD *23.* 1 1
-ATI Mobility Radeon HD 2400 .*ATI.*(Mobility|MOBILITY).*HD *24.* 1 1
-ATI Mobility Radeon HD 2600 .*ATI.*(Mobility|MOBILITY).*HD *26.* 3 1
-ATI Mobility Radeon HD 2700 .*ATI.*(Mobility|MOBILITY).*HD *27.* 3 1
-ATI Mobility Radeon HD 3100 .*ATI.*(Mobility|MOBILITY).*HD *31.* 0 1
-ATI Mobility Radeon HD 3200 .*ATI.*(Mobility|MOBILITY).*HD *32.* 0 1
-ATI Mobility Radeon HD 3400 .*ATI.*(Mobility|MOBILITY).*HD *34.* 2 1
-ATI Mobility Radeon HD 3600 .*ATI.*(Mobility|MOBILITY).*HD *36.* 3 1
-ATI Mobility Radeon HD 3800 .*ATI.*(Mobility|MOBILITY).*HD *38.* 3 1
-ATI Mobility Radeon HD 4200 .*ATI.*(Mobility|MOBILITY).*HD *42.* 2 1
-ATI Mobility Radeon HD 4300 .*ATI.*(Mobility|MOBILITY).*HD *43.* 2 1
-ATI Mobility Radeon HD 4500 .*ATI.*(Mobility|MOBILITY).*HD *45.* 3 1
-ATI Mobility Radeon HD 4600 .*ATI.*(Mobility|MOBILITY).*HD *46.* 3 1
-ATI Mobility Radeon HD 4800 .*ATI.*(Mobility|MOBILITY).*HD *48.* 3 1
-ATI Mobility Radeon HD 5100 .*ATI.*(Mobility|MOBILITY).*HD *51.* 2 1
-ATI Mobility Radeon HD 5300 .*ATI.*(Mobility|MOBILITY).*HD *53.* 2 1
-ATI Mobility Radeon HD 5400 .*ATI.*(Mobility|MOBILITY).*HD *54.* 2 1
-ATI Mobility Radeon HD 5500 .*ATI.*(Mobility|MOBILITY).*HD *55.* 2 1
-ATI Mobility Radeon HD 5600 .*ATI.*(Mobility|MOBILITY).*HD *56.* 2 1
-ATI Mobility Radeon HD 5700 .*ATI.*(Mobility|MOBILITY).*HD *57.* 3 1
-ATI Mobility Radeon HD 6200 .*ATI.*(Mobility|MOBILITY).*HD *62.* 2 1
-ATI Mobility Radeon HD 6300 .*ATI.*(Mobility|MOBILITY).*HD *63.* 2 1
-ATI Mobility Radeon HD 6400M .*ATI.*(Mobility|MOBILITY).*HD *64.* 3 1
-ATI Mobility Radeon HD 6500M .*ATI.*(Mobility|MOBILITY).*HD *65.* 3 1
-ATI Mobility Radeon HD 6600M .*ATI.*(Mobility|MOBILITY).*HD *66.* 3 1
-ATI Mobility Radeon HD 6700M .*ATI.*(Mobility|MOBILITY).*HD *67.* 3 1
-ATI Mobility Radeon HD 6800M .*ATI.*(Mobility|MOBILITY).*HD *68.* 3 1
-ATI Mobility Radeon HD 6900M .*ATI.*(Mobility|MOBILITY).*HD *69.* 3 1
-ATI Mobility Radeon X1xxx .*ATI.*(Mobility|MOBILITY).*X1.* 0 1
-ATI Mobility Radeon X2xxx .*ATI.*(Mobility|MOBILITY).*X2.* 0 1
-ATI Mobility Radeon X3xx .*ATI.*(Mobility|MOBILITY).*X3.* 1 1
-ATI Mobility Radeon X6xx .*ATI.*(Mobility|MOBILITY).*X6.* 1 1
-ATI Mobility Radeon X7xx .*ATI.*(Mobility|MOBILITY).*X7.* 1 1
-ATI Mobility Radeon Xxxx .*ATI.*(Mobility|MOBILITY).*X.* 0 1
-ATI Mobility Radeon .*ATI.*(Mobility|MOBILITY).* 0 1
-ATI Radeon HD 2300 .*ATI.*(Radeon|RADEON) HD *23.* 0 1
-ATI Radeon HD 2400 .*ATI.*(Radeon|RADEON) HD *24.* 1 1
-ATI Radeon HD 2600 .*ATI.*(Radeon|RADEON) HD *26.* 2 1
-ATI Radeon HD 2900 .*ATI.*(Radeon|RADEON) HD *29.* 3 1
-ATI Radeon HD 3000 .*ATI.*(Radeon|RADEON) HD *30.* 0 1
-ATI Radeon HD 3100 .*ATI.*(Radeon|RADEON) HD *31.* 1 1
-ATI Radeon HD 3200 .*ATI.*(Radeon|RADEON) HD *32.* 0 1
-ATI Radeon HD 3300 .*ATI.*(Radeon|RADEON) HD *33.* 1 1
-ATI Radeon HD 3400 .*ATI.*(Radeon|RADEON) HD *34.* 1 1
-ATI Radeon HD 3500 .*ATI.*(Radeon|RADEON) HD *35.* 1 1
-ATI Radeon HD 3600 .*ATI.*(Radeon|RADEON) HD *36.* 3 1
-ATI Radeon HD 3700 .*ATI.*(Radeon|RADEON) HD *37.* 3 1
-ATI Radeon HD 3800 .*ATI.*(Radeon|RADEON) HD *38.* 3 1
-ATI Radeon HD 4200 .*ATI.*(Radeon|RADEON) HD *42.* 1 1
-ATI Radeon HD 4300 .*ATI.*(Radeon|RADEON) HD *43.* 1 1
-ATI Radeon HD 4400 .*ATI.*(Radeon|RADEON) HD *44.* 1 1
-ATI Radeon HD 4500 .*ATI.*(Radeon|RADEON) HD *45.* 3 1
-ATI Radeon HD 4600 .*ATI.*(Radeon|RADEON) HD *46.* 3 1
-ATI Radeon HD 4700 .*ATI.*(Radeon|RADEON) HD *47.* 3 1
-ATI Radeon HD 4800 .*ATI.*(Radeon|RADEON) HD *48.* 3 1
-ATI Radeon HD 5400 .*ATI.*(Radeon|RADEON) HD *54.* 3 1
-ATI Radeon HD 5500 .*ATI.*(Radeon|RADEON) HD *55.* 3 1
-ATI Radeon HD 5600 .*ATI.*(Radeon|RADEON) HD *56.* 3 1
-ATI Radeon HD 5700 .*ATI.*(Radeon|RADEON) HD *57.* 3 1
-ATI Radeon HD 5800 .*ATI.*(Radeon|RADEON) HD *58.* 3 1
-ATI Radeon HD 5900 .*ATI.*(Radeon|RADEON) HD *59.* 3 1
-ATI Radeon HD 6200 .*ATI.*(Radeon|RADEON) HD *62.* 2 1
-ATI Radeon HD 6300 .*ATI.*(Radeon|RADEON) HD *63.* 2 1
-ATI Radeon HD 6400 .*ATI.*(Radeon|RADEON) HD *64.* 3 1
-ATI Radeon HD 6500 .*ATI.*(Radeon|RADEON) HD *65.* 3 1
-ATI Radeon HD 66xx .*ATI.*(Radeon|RADEON) HD *66.* 3 1
-ATI Radeon HD 6700 .*ATI.*(Radeon|RADEON) HD *67.* 3 1
-ATI Radeon HD 6800 .*ATI.*(Radeon|RADEON) HD *68.* 3 1
-ATI Radeon HD 6900 .*ATI.*(Radeon|RADEON) HD *69.* 3 1
-ATI Radeon OpenGL .*ATI.*(Radeon|RADEON) OpenGL.* 0 0
-ATI Radeon 2100 .*ATI.*(Radeon|RADEON) 21.* 0 1
-ATI Radeon 3000 .*ATI.*(Radeon|RADEON) 30.* 0 1
-ATI Radeon 3100 .*ATI.*(Radeon|RADEON) 31.* 1 1
-ATI Radeon 5xxx .*ATI.*(Radeon|RADEON) 5.* 3 1
-ATI Radeon 7xxx .*ATI.*(Radeon|RADEON) 7.* 0 1
-ATI Radeon 8xxx .*ATI.*(Radeon|RADEON) 8.* 0 1
-ATI Radeon 9000 .*ATI.*(Radeon|RADEON) 90.* 0 1
-ATI Radeon 9100 .*ATI.*(Radeon|RADEON) 91.* 0 1
-ATI Radeon 9200 .*ATI.*(Radeon|RADEON) 92.* 0 1
-ATI Radeon 9500 .*ATI.*(Radeon|RADEON) 95.* 0 1
-ATI Radeon 9600 .*ATI.*(Radeon|RADEON) 96.* 0 1
-ATI Radeon 9700 .*ATI.*(Radeon|RADEON) 97.* 1 1
-ATI Radeon 9800 .*ATI.*(Radeon|RADEON) 98.* 1 1
+ATI Radeon HD 64xx .*ATI.*AMD Radeon.* HD [67]4..[MG] 3 1
+ATI Radeon HD 65xx .*ATI.*AMD Radeon.* HD [67]5..[MG] 3 1
+ATI Radeon HD 66xx .*ATI.*AMD Radeon.* HD [67]6..[MG] 3 1
+ATI Mobility Radeon 4100 .*ATI.*Mobility.*41.. 1 1
+ATI Mobility Radeon 7xxx .*ATI.*Mobility.*Radeon 7.* 0 1
+ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1
+ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
+ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
+ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
+ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1
+ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 2 1
+ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1
+ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 2 1
+ATI Mobility Radeon HD 560v .*ATI.*Mobility.*HD *560v.* 2 1
+ATI Mobility Radeon HD 565v .*ATI.*Mobility.*HD *565v.* 2 1
+ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 2 1
+ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 2 1
+ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 3 1
+ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1
+ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1
+ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1
+ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 2 1
+ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD *36.* 3 1
+ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD *38.* 3 1
+ATI Mobility Radeon HD 4200 .*ATI.*Mobility.*HD *42.* 2 1
+ATI Mobility Radeon HD 4300 .*ATI.*Mobility.*HD *43.* 2 1
+ATI Mobility Radeon HD 4500 .*ATI.*Mobility.*HD *45.* 3 1
+ATI Mobility Radeon HD 4600 .*ATI.*Mobility.*HD *46.* 3 1
+ATI Mobility Radeon HD 4800 .*ATI.*Mobility.*HD *48.* 3 1
+ATI Mobility Radeon HD 5100 .*ATI.*Mobility.*HD *51.* 3 1
+ATI Mobility Radeon HD 5300 .*ATI.*Mobility.*HD *53.* 3 1
+ATI Mobility Radeon HD 5400 .*ATI.*Mobility.*HD *54.* 3 1
+ATI Mobility Radeon HD 5500 .*ATI.*Mobility.*HD *55.* 3 1
+ATI Mobility Radeon HD 5600 .*ATI.*Mobility.*HD *56.* 3 1
+ATI Mobility Radeon HD 5700 .*ATI.*Mobility.*HD *57.* 3 1
+ATI Mobility Radeon HD 6200 .*ATI.*Mobility.*HD *62.* 3 1
+ATI Mobility Radeon HD 6300 .*ATI.*Mobility.*HD *63.* 3 1
+ATI Mobility Radeon HD 6400M .*ATI.*Mobility.*HD *64.* 3 1
+ATI Mobility Radeon HD 6500M .*ATI.*Mobility.*HD *65.* 3 1
+ATI Mobility Radeon HD 6600M .*ATI.*Mobility.*HD *66.* 3 1
+ATI Mobility Radeon HD 6700M .*ATI.*Mobility.*HD *67.* 3 1
+ATI Mobility Radeon HD 6800M .*ATI.*Mobility.*HD *68.* 3 1
+ATI Mobility Radeon HD 6900M .*ATI.*Mobility.*HD *69.* 3 1
+ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 2 1
+ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 2 1
+ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1
+ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1
+ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1
+ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1
+ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1
+ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 2 1
+ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 2 1
+ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1
+ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1
+ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1
+ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1
+ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1
+ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1
+ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1
+ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 1
+ATI Radeon HD 4500 .*ATI.*Radeon HD *45.. 3 1
+ATI Radeon HD 4600 .*ATI.*Radeon HD *46.. 3 1
+ATI Radeon HD 4700 .*ATI.*Radeon HD *47.. 3 1
+ATI Radeon HD 4800 .*ATI.*Radeon HD *48.. 3 1
+ATI Radeon HD 5400 .*ATI.*Radeon HD *54.. 3 1
+ATI Radeon HD 5500 .*ATI.*Radeon HD *55.. 3 1
+ATI Radeon HD 5600 .*ATI.*Radeon HD *56.. 3 1
+ATI Radeon HD 5700 .*ATI.*Radeon HD *57.. 3 1
+ATI Radeon HD 5800 .*ATI.*Radeon HD *58.. 3 1
+ATI Radeon HD 5900 .*ATI.*Radeon HD *59.. 3 1
+ATI Radeon HD 6200 .*ATI.*Radeon HD *62.. 3 1
+ATI Radeon HD 6300 .*ATI.*Radeon HD *63.. 3 1
+ATI Radeon HD 6400 .*ATI.*Radeon HD *64.. 3 1
+ATI Radeon HD 6500 .*ATI.*Radeon HD *65.. 3 1
+ATI Radeon HD 6600 .*ATI.*Radeon HD *66.. 3 1
+ATI Radeon HD 6700 .*ATI.*Radeon HD *67.. 3 1
+ATI Radeon HD 6800 .*ATI.*Radeon HD *68.. 3 1
+ATI Radeon HD 6900 .*ATI.*Radeon HD *69.. 3 1
+ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0
+ATI Radeon 2100 .*ATI.*Radeon 21.. 0 1
+ATI Radeon 3000 .*ATI.*Radeon 30.. 0 1
+ATI Radeon 3100 .*ATI.*Radeon 31.. 1 1
+ATI Radeon 5xxx .*ATI.*Radeon 5... 3 1
+ATI Radeon 7xxx .*ATI.*Radeon 7... 0 1
+ATI Radeon 8xxx .*ATI.*Radeon 8... 0 1
+ATI Radeon 9000 .*ATI.*Radeon 90.. 0 1
+ATI Radeon 9100 .*ATI.*Radeon 91.. 0 1
+ATI Radeon 9200 .*ATI.*Radeon 92.. 0 1
+ATI Radeon 9500 .*ATI.*Radeon 95.. 0 1
+ATI Radeon 9600 .*ATI.*Radeon 96.. 0 1
+ATI Radeon 9700 .*ATI.*Radeon 97.. 1 1
+ATI Radeon 9800 .*ATI.*Radeon 98.. 1 1
ATI Radeon RV250 .*ATI.*RV250.* 0 1
ATI Radeon RV600 .*ATI.*RV6.* 1 1
ATI Radeon RX700 .*ATI.*RX70.* 1 1
-ATI Radeon RX800 .*ATI.*(Radeon|RADEON) *RX80.* 2 1
+ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1
ATI RS880M .*ATI.*RS880M 1 1
ATI Radeon RX9550 .*ATI.*RX9550.* 1 1
-ATI Radeon VE .*ATI.*(Radeon|RADEON).*VE.* 0 0
-ATI Radeon X1000 .*ATI.*(Radeon|RADEON) *X10.* 0 1
-ATI Radeon X1200 .*ATI.*(Radeon|RADEON) *X12.* 0 1
-ATI Radeon X1300 .*ATI.*(Radeon|RADEON) *X13.* 1 1
-ATI Radeon X1400 .*ATI.*(Radeon|RADEON) *X14.* 1 1
-ATI Radeon X1500 .*ATI.*(Radeon|RADEON) *X15.* 1 1
-ATI Radeon X1600 .*ATI.*(Radeon|RADEON) *X16.* 1 1
-ATI Radeon X1700 .*ATI.*(Radeon|RADEON) *X17.* 1 1
-ATI Radeon X1800 .*ATI.*(Radeon|RADEON) *X18.* 3 1
-ATI Radeon X1900 .*ATI.*(Radeon|RADEON) *X19.* 3 1
-ATI Radeon X300 .*ATI.*(Radeon|RADEON) *X3.* 0 1
-ATI Radeon X400 .*ATI.*(Radeon|RADEON) X4.* 0 1
-ATI Radeon X500 .*ATI.*(Radeon|RADEON) X5.* 0 1
-ATI Radeon X600 .*ATI.*(Radeon|RADEON) X6.* 1 1
-ATI Radeon X700 .*ATI.*(Radeon|RADEON) X7.* 1 1
-ATI Radeon X800 .*ATI.*(Radeon|RADEON) X8.* 2 1
-ATI Radeon X900 .*ATI.*(Radeon|RADEON) X9.* 2 1
-ATI Radeon Xpress .*ATI.*(Radeon|RADEON) (Xpress|XPRESS).* 0 1
+ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0
+ATI Radeon X300 .*ATI.*Radeon *X3.* 0 1
+ATI Radeon X400 .*ATI.*Radeon ?X4.* 0 1
+ATI Radeon X500 .*ATI.*Radeon ?X5.* 0 1
+ATI Radeon X600 .*ATI.*Radeon ?X6.* 1 1
+ATI Radeon X700 .*ATI.*Radeon ?X7.* 1 1
+ATI Radeon X800 .*ATI.*Radeon ?X8.* 2 1
+ATI Radeon X900 .*ATI.*Radeon ?X9.* 2 1
+ATI Radeon Xpress .*ATI.*Radeon Xpress.* 0 1
ATI Rage 128 .*ATI.*Rage 128.* 0 1
-ATI R350 (9800) .*(ATI)?.*R350.* 1 1
-ATI R580 (X1900) .*(ATI)?.*R580.* 3 1
-ATI RC410 (Xpress 200) .*(ATI)?.*RC410.* 0 0
-ATI RS48x (Xpress 200x) .*(ATI)?.*RS48.* 0 0
-ATI RS600 (Xpress 3200) .*(ATI)?.*RS600.* 0 0
-ATI RV350 (9600) .*(ATI)?.*RV350.* 0 1
-ATI RV370 (X300) .*(ATI)?.*RV370.* 0 1
-ATI RV410 (X700) .*(ATI)?.*RV410.* 1 1
-ATI RV515 .*(ATI)?.*RV515.* 1 1
-ATI RV570 (X1900 GT/PRO) .*(ATI)?.*RV570.* 3 1
-ATI RV380 .*(ATI)?.*RV380.* 0 1
-ATI RV530 .*(ATI)?.*RV530.* 1 1
-ATI RX480 (Xpress 200P) .*(ATI)?.*RX480.* 0 1
-ATI RX700 .*(ATI)?.*RX700.* 1 1
-AMD ANTILLES (HD 6990) .*(AMD|ATI).*(Antilles|ANTILLES).* 3 1
-AMD BARTS (HD 6800) .*(AMD|ATI).*(Barts|BARTS).* 3 1
-AMD CAICOS (HD 6400) .*(AMD|ATI).*(Caicos|CAICOS).* 3 1
+ATI R350 (9800) .*R350.* 1 1
+ATI R580 (X1900) .*R580.* 3 1
+ATI RC410 (Xpress 200) .*RC410.* 0 0
+ATI RS48x (Xpress 200x) .*RS48.* 0 0
+ATI RS600 (Xpress 3200) .*RS600.* 0 0
+ATI RV350 (9600) .*RV350.* 0 1
+ATI RV370 (X300) .*RV370.* 0 1
+ATI RV410 (X700) .*RV410.* 1 1
+ATI RV515 .*RV515.* 1 1
+ATI RV570 (X1900 GT/PRO) .*RV570.* 3 1
+ATI RV380 .*RV380.* 0 1
+ATI RV530 .*RV530.* 1 1
+ATI RX480 (Xpress 200P) .*RX480.* 0 1
+ATI RX700 .*RX700.* 1 1
+AMD ANTILLES (HD 6990) .*(AMD|ATI).*Antilles.* 3 1
+AMD BARTS (HD 6800) .*(AMD|ATI).*Barts.* 3 1
+AMD CAICOS (HD 6400) .*(AMD|ATI).*Caicos.* 3 1
AMD CAYMAN (HD 6900) .*(AMD|ATI).*(Cayman|CAYMAM).* 3 1
-AMD CEDAR (HD 5450) .*(AMD|ATI).*(Cedar|CEDAR).* 2 1
-AMD CYPRESS (HD 5800) .*(AMD|ATI).*(Cypress|CYPRESS).* 3 1
-AMD HEMLOCK (HD 5970) .*(AMD|ATI).*(Hemlock|HEMLOCK).* 3 1
-AMD JUNIPER (HD 5700) .*(AMD|ATI).*(Juniper|JUNIPER).* 3 1
-AMD PARK .*(AMD|ATI).*(Park|PARK).* 3 1
-AMD REDWOOD (HD 5500/5600) .*(AMD|ATI).*(Redwood|REDWOOD).* 3 1
-AMD TURKS (HD 6500/6600) .*(AMD|ATI).*(Turks|TURKS).* 3 1
-AMD RS780 (HD 3200) .*(AMD|ATI)?.*RS780.* 0 1
-AMD RS880 (HD 4200) .*(AMD|ATI)?.*RS880.* 1 1
-AMD RV610 (HD 2400) .*(AMD|ATI)?.*RV610.* 1 1
-AMD RV620 (HD 3400) .*(AMD|ATI)?.*RV620.* 1 1
-AMD RV630 (HD 2600) .*(AMD|ATI)?.*RV630.* 2 1
-AMD RV635 (HD 3600) .*(AMD|ATI)?.*RV635.* 3 1
-AMD RV670 (HD 3800) .*(AMD|ATI)?.*RV670.* 3 1
-AMD R680 (HD 3870 X2) .*(AMD|ATI)?.*R680.* 3 1
-AMD R700 (HD 4800 X2) .*(AMD|ATI)?.*R700.* 3 1
-AMD RV710 (HD 4300) .*(AMD|ATI)?.*RV710.* 1 1
-AMD RV730 (HD 4600) .*(AMD|ATI)?.*RV730.* 3 1
-AMD RV740 (HD 4700) .*(AMD|ATI)?.*RV740.* 3 1
-AMD RV770 (HD 4800) .*(AMD|ATI)?.*RV770.* 3 1
-AMD RV790 (HD 4800) .*(AMD|ATI)?.*RV790.* 3 1
+AMD CEDAR (HD 5450) .*(AMD|ATI).*Cedar.* 2 1
+AMD CYPRESS (HD 5800) .*(AMD|ATI).*Cypress.* 3 1
+AMD HEMLOCK (HD 5970) .*(AMD|ATI).*Hemlock.* 3 1
+AMD JUNIPER (HD 5700) .*(AMD|ATI).*Juniper.* 3 1
+AMD PARK .*(AMD|ATI).*Park.* 3 1
+AMD REDWOOD (HD 5500/5600) .*(AMD|ATI).*Redwood.* 3 1
+AMD TURKS (HD 6500/6600) .*(AMD|ATI).*Turks.* 3 1
+AMD RS780 (HD 3200) .*RS780.* 0 1
+AMD RS880 (HD 4200) .*RS880.* 1 1
+AMD RV610 (HD 2400) .*RV610.* 1 1
+AMD RV620 (HD 3400) .*RV620.* 1 1
+AMD RV630 (HD 2600) .*RV630.* 2 1
+AMD RV635 (HD 3600) .*RV635.* 3 1
+AMD RV670 (HD 3800) .*RV670.* 3 1
+AMD R680 (HD 3870 X2) .*R680.* 3 1
+AMD R700 (HD 4800 X2) .*R700.* 3 1
+AMD RV710 (HD 4300) .*RV710.* 1 1
+AMD RV730 (HD 4600) .*RV730.* 3 1
+AMD RV740 (HD 4700) .*RV740.* 3 1
+AMD RV770 (HD 4800) .*RV770.* 3 1
+AMD RV790 (HD 4800) .*RV790.* 3 1
ATI 760G/Radeon 3000 .*ATI.*AMD 760G.* 1 1
ATI 780L/Radeon 3000 .*ATI.*AMD 780L.* 1 1
-ATI Radeon DDR .*ATI.*(Radeon|RADEON) ?DDR.* 0 1
+ATI Radeon DDR .*ATI.*Radeon ?DDR.* 0 1
ATI FirePro 2000 .*ATI.*FirePro 2.* 1 1
ATI FirePro 3000 .*ATI.*FirePro V3.* 1 1
ATI FirePro 4000 .*ATI.*FirePro V4.* 2 1
@@ -255,8 +255,8 @@ ATI FirePro 7000 .*ATI.*FirePro V7.* 3 1
ATI FirePro M .*ATI.*FirePro M.* 3 1
ATI Technologies .*ATI *Technologies.* 0 1
// This entry is last to work around the "R300" driver problem.
-ATI R300 (9700) .*(ATI)?.*R300.* 1 1
-ATI Radeon .*ATI.*Radeon.* 0 1
+ATI R300 (9700) .*R300.* 1 1
+ATI Radeon .*ATI.*(Diamond|Radeon).* 0 1
Intel X3100 .*Intel.*X3100.* 0 1
Intel 830M .*Intel.*830M 0 0
Intel 845G .*Intel.*845G 0 0
@@ -273,13 +273,13 @@ Intel G33 .*Intel.*G33.* 0 0
Intel G41 .*Intel.*G41.* 0 1
Intel G45 .*Intel.*G45.* 0 1
Intel Bear Lake .*Intel.*Bear Lake.* 0 0
-Intel Broadwater .*Intel.*Broadwater.* 0 0
+Intel Broadwater .*Intel.*Broadwater.* 0 0
Intel Brookdale .*Intel.*Brookdale.* 0 0
Intel Cantiga .*Intel.*Cantiga.* 0 0
Intel Eaglelake .*Intel.*Eaglelake.* 0 1
Intel Graphics Media HD .*Intel.*Graphics Media.*HD.* 0 1
Intel HD Graphics .*Intel.*HD Graphics.* 2 1
-Intel Mobile 4 Series .*Intel.*Mobile *4 Series.* 0 1
+Intel Mobile 4 Series .*Intel.*Mobile.* 4 Series.* 0 1
Intel Media Graphics HD .*Intel.*Media Graphics HD.* 0 1
Intel Montara .*Intel.*Montara.* 0 0
Intel Pineview .*Intel.*Pineview.* 0 1
@@ -288,204 +288,219 @@ Intel HD Graphics 2000 .*Intel.*HD2000.* 1 1
Intel HD Graphics 3000 .*Intel.*HD3000.* 2 1
Matrox .*Matrox.* 0 0
Mesa .*Mesa.* 0 0
-NVIDIA 205 .*NVIDIA.*GeForce 205.* 2 1
-NVIDIA 210 .*NVIDIA.*GeForce 210.* 2 1
-NVIDIA 310M .*NVIDIA.*GeForce 310M.* 1 1
-NVIDIA 310 .*NVIDIA.*GeForce 310.* 3 1
-NVIDIA 315M .*NVIDIA.*GeForce 315M.* 2 1
-NVIDIA 315 .*NVIDIA.*GeForce 315.* 3 1
-NVIDIA 320M .*NVIDIA.*GeForce 320M.* 2 1
-NVIDIA G100M .*NVIDIA *(GeForce)? *(G)? ?100M.* 0 1
-NVIDIA G100 .*NVIDIA *(GeForce)? *(G)? ?100.* 0 1
-NVIDIA G102M .*NVIDIA *(GeForce)? *(G)? ?102M.* 0 1
-NVIDIA G103M .*NVIDIA *(GeForce)? *(G)? ?103M.* 0 1
-NVIDIA G105M .*NVIDIA *(GeForce)? *(G)? ?105M.* 0 1
-NVIDIA G 110M .*NVIDIA *(GeForce)? *(G)? ?110M.* 0 1
-NVIDIA G 120M .*NVIDIA *(GeForce)? *(G)? ?120M.* 1 1
-NVIDIA G 200 .*NVIDIA *(GeForce)? *(G)? ?200(M)?.* 0 1
-NVIDIA G 205M .*NVIDIA *(GeForce)? *(G)? ?205(M)?.* 0 1
-NVIDIA G 210 .*NVIDIA *(GeForce)? *(G)? ?210(M)?.* 1 1
-NVIDIA 305M .*NVIDIA *(GeForce)? *(G)? ?305(M)?.* 1 1
-NVIDIA G 310M .*NVIDIA *(GeForce)? *(G)? ?310(M)?.* 2 1
-NVIDIA G 315 .*NVIDIA *(GeForce)? *(G)? ?315(M)?.* 2 1
-NVIDIA G 320M .*NVIDIA *(GeForce)? *(G)? ?320(M)?.* 2 1
-NVIDIA G 405 .*NVIDIA *(GeForce)? *(G)? ?405(M)?.* 1 1
-NVIDIA G 410M .*NVIDIA *(GeForce)? *(G)? ?410(M)?.* 1 1
-NVIDIA GT 120M .*NVIDIA.*(GeForce)? *GT *120(M)?.* 2 1
-NVIDIA GT 120 .*NVIDIA.*GT.*120 2 1
-NVIDIA GT 130M .*NVIDIA.*(GeForce)? *GT *130(M)?.* 2 1
-NVIDIA GT 140M .*NVIDIA.*(GeForce)? *GT *140(M)?.* 2 1
-NVIDIA GT 150M .*NVIDIA.*(GeForce)? *GT(S)? *150(M)?.* 2 1
-NVIDIA GT 160M .*NVIDIA.*(GeForce)? *GT *160(M)?.* 2 1
-NVIDIA GT 220M .*NVIDIA.*(GeForce)? *GT *220(M)?.* 2 1
-NVIDIA GT 230M .*NVIDIA.*(GeForce)? *GT *230(M)?.* 2 1
-NVIDIA GT 240M .*NVIDIA.*(GeForce)? *GT *240(M)?.* 2 1
-NVIDIA GT 250M .*NVIDIA.*(GeForce)? *GT *250(M)?.* 2 1
-NVIDIA GT 260M .*NVIDIA.*(GeForce)? *GT *260(M)?.* 2 1
-NVIDIA GT 320M .*NVIDIA.*(GeForce)? *GT *320(M)?.* 2 1
-NVIDIA GT 325M .*NVIDIA.*(GeForce)? *GT *325(M)?.* 0 1
-NVIDIA GT 330M .*NVIDIA.*(GeForce)? *GT *330(M)?.* 3 1
-NVIDIA GT 335M .*NVIDIA.*(GeForce)? *GT *335(M)?.* 1 1
-NVIDIA GT 340M .*NVIDIA.*(GeForce)? *GT *340(M)?.* 2 1
-NVIDIA GT 415M .*NVIDIA.*(GeForce)? *GT *415(M)?.* 2 1
-NVIDIA GT 420M .*NVIDIA.*(GeForce)? *GT *420(M)?.* 2 1
-NVIDIA GT 425M .*NVIDIA.*(GeForce)? *GT *425(M)?.* 3 1
-NVIDIA GT 430M .*NVIDIA.*(GeForce)? *GT *430(M)?.* 3 1
-NVIDIA GT 435M .*NVIDIA.*(GeForce)? *GT *435(M)?.* 3 1
-NVIDIA GT 440M .*NVIDIA.*(GeForce)? *GT *440(M)?.* 3 1
-NVIDIA GT 445M .*NVIDIA.*(GeForce)? *GT *445(M)?.* 3 1
-NVIDIA GT 450M .*NVIDIA.*(GeForce)? *GT *450(M)?.* 3 1
-NVIDIA GT 520M .*NVIDIA.*(GeForce)? *GT *520(M)?.* 3 1
-NVIDIA GT 525M .*NVIDIA.*(GeForce)? *GT *525(M)?.* 3 1
-NVIDIA GT 540M .*NVIDIA.*(GeForce)? *GT *540(M)?.* 3 1
-NVIDIA GT 550M .*NVIDIA.*(GeForce)? *GT *550(M)?.* 3 1
-NVIDIA GT 555M .*NVIDIA.*(GeForce)? *GT *555(M)?.* 3 1
-NVIDIA GTS 160M .*NVIDIA.*(GeForce)? *GT(S)? *160(M)?.* 2 1
-NVIDIA GTS 240 .*NVIDIA.*(GeForce)? *GTS *24.* 3 1
-NVIDIA GTS 250 .*NVIDIA.*(GeForce)? *GTS *25.* 3 1
-NVIDIA GTS 350M .*NVIDIA.*(GeForce)? *GTS *350M.* 3 1
-NVIDIA GTS 360M .*NVIDIA.*(GeForce)? *GTS *360M.* 3 1
-NVIDIA GTS 360 .*NVIDIA.*(GeForce)? *GTS *360.* 3 1
-NVIDIA GTS 450 .*NVIDIA.*(GeForce)? *GTS *45.* 3 1
-NVIDIA GTX 260 .*NVIDIA.*(GeForce)? *GTX *26.* 3 1
-NVIDIA GTX 275 .*NVIDIA.*(GeForce)? *GTX *275.* 3 1
-NVIDIA GTX 270 .*NVIDIA.*(GeForce)? *GTX *27.* 3 1
-NVIDIA GTX 285 .*NVIDIA.*(GeForce)? *GTX *285.* 3 1
-NVIDIA GTX 280 .*NVIDIA.*(GeForce)? *GTX *280.* 3 1
-NVIDIA GTX 290 .*NVIDIA.*(GeForce)? *GTX *290.* 3 1
-NVIDIA GTX 295 .*NVIDIA.*(GeForce)? *GTX *295.* 3 1
-NVIDIA GTX 460M .*NVIDIA.*(GeForce)? *GTX *460M.* 3 1
-NVIDIA GTX 465 .*NVIDIA.*(GeForce)? *GTX *465.* 3 1
-NVIDIA GTX 460 .*NVIDIA.*(GeForce)? *GTX *46.* 3 1
-NVIDIA GTX 470M .*NVIDIA.*(GeForce)? *GTX *470M.* 3 1
-NVIDIA GTX 470 .*NVIDIA.*(GeForce)? *GTX *47.* 3 1
-NVIDIA GTX 480M .*NVIDIA.*(GeForce)? *GTX *480M.* 3 1
-NVIDIA GTX 485M .*NVIDIA.*(GeForce)? *GTX *485M.* 3 1
-NVIDIA GTX 480 .*NVIDIA.*(GeForce)? *GTX *48.* 3 1
-NVIDIA GTX 530 .*NVIDIA.*(GeForce)? *GTX *53.* 3 1
-NVIDIA GTX 550 .*NVIDIA.*(GeForce)? *GTX *55.* 3 1
-NVIDIA GTX 560 .*NVIDIA.*(GeForce)? *GTX *56.* 3 1
-NVIDIA GTX 570 .*NVIDIA.*(GeForce)? *GTX *57.* 3 1
-NVIDIA GTX 580M .*NVIDIA.*(GeForce)? *GTX *580M.* 3 1
-NVIDIA GTX 580 .*NVIDIA.*(GeForce)? *GTX *58.* 3 1
-NVIDIA GTX 590 .*NVIDIA.*(GeForce)? *GTX *59.* 3 1
-NVIDIA C51 .*NVIDIA.*(GeForce)? *C51.* 0 1
-NVIDIA G72 .*NVIDIA.*(GeForce)? *G72.* 1 1
-NVIDIA G73 .*NVIDIA.*(GeForce)? *G73.* 1 1
-NVIDIA G84 .*NVIDIA.*(GeForce)? *G84.* 2 1
-NVIDIA G86 .*NVIDIA.*(GeForce)? *G86.* 3 1
-NVIDIA G92 .*NVIDIA.*(GeForce)? *G92.* 3 1
+NVIDIA 205 .*NVIDIA .*GeForce 205.* 2 1
+NVIDIA 210 .*NVIDIA .*GeForce 210.* 2 1
+NVIDIA 310M .*NVIDIA .*GeForce 310M.* 1 1
+NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1
+NVIDIA 315M .*NVIDIA .*GeForce 315M.* 2 1
+NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1
+NVIDIA 320M .*NVIDIA .*GeForce 320M.* 2 1
+NVIDIA G100M .*NVIDIA .*100M.* 0 1
+NVIDIA G100 .*NVIDIA .*100.* 0 1
+NVIDIA G102M .*NVIDIA .*102M.* 0 1
+NVIDIA G103M .*NVIDIA .*103M.* 0 1
+NVIDIA G105M .*NVIDIA .*105M.* 0 1
+NVIDIA G 110M .*NVIDIA .*110M.* 0 1
+NVIDIA G 120M .*NVIDIA .*120M.* 1 1
+NVIDIA G 200 .*NVIDIA .*200(M)?.* 0 1
+NVIDIA G 205M .*NVIDIA .*205(M)?.* 0 1
+NVIDIA G 210 .*NVIDIA .*210(M)?.* 1 1
+NVIDIA 305M .*NVIDIA .*305(M)?.* 1 1
+NVIDIA G 310M .*NVIDIA .*310(M)?.* 2 1
+NVIDIA G 315 .*NVIDIA .*315(M)?.* 2 1
+NVIDIA G 320M .*NVIDIA .*320(M)?.* 2 1
+NVIDIA G 405 .*NVIDIA .*405(M)?.* 1 1
+NVIDIA G 410M .*NVIDIA .*410(M)?.* 1 1
+NVIDIA GT 120M .*NVIDIA .*GT *120(M)?.* 2 1
+NVIDIA GT 120 .*NVIDIA .*GT.*120 2 1
+NVIDIA GT 130M .*NVIDIA .*GT *130(M)?.* 2 1
+NVIDIA GT 140M .*NVIDIA .*GT *140(M)?.* 2 1
+NVIDIA GT 150M .*NVIDIA .*GT(S)? *150(M)?.* 2 1
+NVIDIA GT 160M .*NVIDIA .*GT *160(M)?.* 2 1
+NVIDIA GT 220M .*NVIDIA .*GT *220(M)?.* 2 1
+NVIDIA GT 230M .*NVIDIA .*GT *230(M)?.* 2 1
+NVIDIA GT 240M .*NVIDIA .*GT *240(M)?.* 2 1
+NVIDIA GT 250M .*NVIDIA .*GT *250(M)?.* 2 1
+NVIDIA GT 260M .*NVIDIA .*GT *260(M)?.* 2 1
+NVIDIA GT 320M .*NVIDIA .*GT *320(M)?.* 2 1
+NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 0 1
+NVIDIA GT 330M .*NVIDIA .*GT *330(M)?.* 3 1
+NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 1 1
+NVIDIA GT 340M .*NVIDIA .*GT *340(M)?.* 2 1
+NVIDIA GT 415M .*NVIDIA .*GT *415(M)?.* 2 1
+NVIDIA GT 420M .*NVIDIA .*GT *420(M)?.* 2 1
+NVIDIA GT 425M .*NVIDIA .*GT *425(M)?.* 3 1
+NVIDIA GT 430M .*NVIDIA .*GT *430(M)?.* 3 1
+NVIDIA GT 435M .*NVIDIA .*GT *435(M)?.* 3 1
+NVIDIA GT 440M .*NVIDIA .*GT *440(M)?.* 3 1
+NVIDIA GT 445M .*NVIDIA .*GT *445(M)?.* 3 1
+NVIDIA GT 450M .*NVIDIA .*GT *450(M)?.* 3 1
+NVIDIA GT 520M .*NVIDIA .*GT *52.(M)?.* 3 1
+NVIDIA GT 530M .*NVIDIA .*GT *530(M)?.* 3 1
+NVIDIA GT 540M .*NVIDIA .*GT *54.(M)?.* 3 1
+NVIDIA GT 550M .*NVIDIA .*GT *550(M)?.* 3 1
+NVIDIA GT 555M .*NVIDIA .*GT *555(M)?.* 3 1
+NVIDIA GTS 160M .*NVIDIA .*GT(S)? *160(M)?.* 2 1
+NVIDIA GTS 240 .*NVIDIA .*GTS *24.* 3 1
+NVIDIA GTS 250 .*NVIDIA .*GTS *25.* 3 1
+NVIDIA GTS 350M .*NVIDIA .*GTS *350M.* 3 1
+NVIDIA GTS 360M .*NVIDIA .*GTS *360M.* 3 1
+NVIDIA GTS 360 .*NVIDIA .*GTS *360.* 3 1
+NVIDIA GTS 450 .*NVIDIA .*GTS *45.* 3 1
+NVIDIA GTX 260 .*NVIDIA .*GTX *26.* 3 1
+NVIDIA GTX 275 .*NVIDIA .*GTX *275.* 3 1
+NVIDIA GTX 270 .*NVIDIA .*GTX *27.* 3 1
+NVIDIA GTX 285 .*NVIDIA .*GTX *285.* 3 1
+NVIDIA GTX 280 .*NVIDIA .*GTX *280.* 3 1
+NVIDIA GTX 290 .*NVIDIA .*GTX *290.* 3 1
+NVIDIA GTX 295 .*NVIDIA .*GTX *295.* 3 1
+NVIDIA GTX 460M .*NVIDIA .*GTX *460M.* 3 1
+NVIDIA GTX 465 .*NVIDIA .*GTX *465.* 3 1
+NVIDIA GTX 460 .*NVIDIA .*GTX *46.* 3 1
+NVIDIA GTX 470M .*NVIDIA .*GTX *470M.* 3 1
+NVIDIA GTX 470 .*NVIDIA .*GTX *47.* 3 1
+NVIDIA GTX 480M .*NVIDIA .*GTX *480M.* 3 1
+NVIDIA GTX 485M .*NVIDIA .*GTX *485M.* 3 1
+NVIDIA GTX 480 .*NVIDIA .*GTX *48.* 3 1
+NVIDIA GTX 530 .*NVIDIA .*GTX *53.* 3 1
+NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 3 1
+NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 3 1
+NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 3 1
+NVIDIA GTX 580M .*NVIDIA .*GTX *580M.* 3 1
+NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 1
+NVIDIA GTX 590 .*NVIDIA .*GTX *59.* 3 1
+NVIDIA C51 .*NVIDIA .*C51.* 0 1
+NVIDIA G72 .*NVIDIA .*G72.* 1 1
+NVIDIA G73 .*NVIDIA .*G73.* 1 1
+NVIDIA G84 .*NVIDIA .*G84.* 2 1
+NVIDIA G86 .*NVIDIA .*G86.* 3 1
+NVIDIA G92 .*NVIDIA .*G92.* 3 1
NVIDIA GeForce .*GeForce 256.* 0 0
NVIDIA GeForce 2 .*GeForce ?2 ?.* 0 1
NVIDIA GeForce 3 .*GeForce ?3 ?.* 0 1
NVIDIA GeForce 3 Ti .*GeForce ?3 Ti.* 0 1
-NVIDIA GeForce 4 .*NVIDIA.*GeForce ?4.* 0 1
-NVIDIA GeForce 4 Go .*NVIDIA.*GeForce ?4.*Go.* 0 1
-NVIDIA GeForce 4 MX .*NVIDIA.*GeForce ?4 MX.* 0 1
-NVIDIA GeForce 4 PCX .*NVIDIA.*GeForce ?4 PCX.* 0 1
-NVIDIA GeForce 4 Ti .*NVIDIA.*GeForce ?4 Ti.* 0 1
-NVIDIA GeForce 6100 .*NVIDIA.*GeForce 61.* 0 1
-NVIDIA GeForce 6200 .*NVIDIA.*GeForce 62.* 0 1
-NVIDIA GeForce 6500 .*NVIDIA.*GeForce 65.* 0 1
-NVIDIA GeForce 6600 .*NVIDIA.*GeForce 66.* 1 1
-NVIDIA GeForce 6700 .*NVIDIA.*GeForce 67.* 2 1
-NVIDIA GeForce 6800 .*NVIDIA.*GeForce 68.* 2 1
-NVIDIA GeForce 7000 .*NVIDIA.*GeForce 70.* 0 1
-NVIDIA GeForce 7100 .*NVIDIA.*GeForce 71.* 0 1
-NVIDIA GeForce 7200 .*NVIDIA.*GeForce 72.* 1 1
-NVIDIA GeForce 7300 .*NVIDIA.*GeForce 73.* 1 1
-NVIDIA GeForce 7500 .*NVIDIA.*GeForce 75.* 1 1
-NVIDIA GeForce 7600 .*NVIDIA.*GeForce 76.* 2 1
-NVIDIA GeForce 7800 .*NVIDIA.*GeForce 78.* 2 1
-NVIDIA GeForce 7900 .*NVIDIA.*GeForce 79.* 2 1
-NVIDIA GeForce 8100 .*NVIDIA.*GeForce 81.* 1 1
-NVIDIA GeForce 8200M .*NVIDIA.*GeForce 8200M.* 1 1
-NVIDIA GeForce 8200 .*NVIDIA.*GeForce 82.* 1 1
-NVIDIA GeForce 8300 .*NVIDIA.*GeForce 83.* 1 1
-NVIDIA GeForce 8400M .*NVIDIA.*GeForce 8400M.* 1 1
-NVIDIA GeForce 8400 .*NVIDIA.*GeForce 84.* 1 1
-NVIDIA GeForce 8500 .*NVIDIA.*GeForce 85.* 3 1
-NVIDIA GeForce 8600M .*NVIDIA.*GeForce 8600M.* 1 1
-NVIDIA GeForce 8600 .*NVIDIA.*GeForce 86.* 3 1
-NVIDIA GeForce 8700M .*NVIDIA.*GeForce 8700M.* 3 1
-NVIDIA GeForce 8700 .*NVIDIA.*GeForce 87.* 3 1
-NVIDIA GeForce 8800M .*NVIDIA.*GeForce 8800M.* 3 1
-NVIDIA GeForce 8800 .*NVIDIA.*GeForce 88.* 3 1
-NVIDIA GeForce 9100M .*NVIDIA.*GeForce 9100M.* 0 1
-NVIDIA GeForce 9100 .*NVIDIA.*GeForce 91.* 0 1
-NVIDIA GeForce 9200M .*NVIDIA.*GeForce 9200M.* 1 1
-NVIDIA GeForce 9200 .*NVIDIA.*GeForce 92.* 1 1
-NVIDIA GeForce 9300M .*NVIDIA.*GeForce 9300M.* 1 1
-NVIDIA GeForce 9300 .*NVIDIA.*GeForce 93.* 1 1
-NVIDIA GeForce 9400M .*NVIDIA.*GeForce 9400M.* 1 1
-NVIDIA GeForce 9400 .*NVIDIA.*GeForce 94.* 1 1
-NVIDIA GeForce 9500M .*NVIDIA.*GeForce 9500M.* 2 1
-NVIDIA GeForce 9500 .*NVIDIA.*GeForce 95.* 2 1
-NVIDIA GeForce 9600M .*NVIDIA.*GeForce 9600M.* 3 1
-NVIDIA GeForce 9600 .*NVIDIA.*GeForce 96.* 2 1
-NVIDIA GeForce 9700M .*NVIDIA.*GeForce 9700M.* 2 1
-NVIDIA GeForce 9800M .*NVIDIA.*GeForce 9800M.* 3 1
-NVIDIA GeForce 9800 .*NVIDIA.*GeForce 98.* 3 1
-NVIDIA GeForce FX 5100 .*NVIDIA.*GeForce FX 51.* 0 1
-NVIDIA GeForce FX 5200 .*NVIDIA.*GeForce FX 52.* 0 1
-NVIDIA GeForce FX 5300 .*NVIDIA.*GeForce FX 53.* 0 1
-NVIDIA GeForce FX 5500 .*NVIDIA.*GeForce FX 55.* 0 1
-NVIDIA GeForce FX 5600 .*NVIDIA.*GeForce FX 56.* 0 1
-NVIDIA GeForce FX 5700 .*NVIDIA.*GeForce FX 57.* 1 1
-NVIDIA GeForce FX 5800 .*NVIDIA.*GeForce FX 58.* 1 1
-NVIDIA GeForce FX 5900 .*NVIDIA.*GeForce FX 59.* 1 1
-NVIDIA GeForce FX Go5100 .*NVIDIA.*GeForce FX Go51.* 0 1
-NVIDIA GeForce FX Go5200 .*NVIDIA.*GeForce FX Go52.* 0 1
-NVIDIA GeForce FX Go5300 .*NVIDIA.*GeForce FX Go53.* 0 1
-NVIDIA GeForce FX Go5500 .*NVIDIA.*GeForce FX Go55.* 0 1
-NVIDIA GeForce FX Go5600 .*NVIDIA.*GeForce FX Go56.* 0 1
-NVIDIA GeForce FX Go5700 .*NVIDIA.*GeForce FX Go57.* 1 1
-NVIDIA GeForce FX Go5800 .*NVIDIA.*GeForce FX Go58.* 1 1
-NVIDIA GeForce FX Go5900 .*NVIDIA.*GeForce FX Go59.* 1 1
-NVIDIA GeForce FX Go5xxx .*NVIDIA.*GeForce FX Go.* 0 1
-NVIDIA GeForce Go 6100 .*NVIDIA.*GeForce Go 61.* 0 1
-NVIDIA GeForce Go 6200 .*NVIDIA.*GeForce Go 62.* 0 1
-NVIDIA GeForce Go 6400 .*NVIDIA.*GeForce Go 64.* 1 1
-NVIDIA GeForce Go 6500 .*NVIDIA.*GeForce Go 65.* 1 1
-NVIDIA GeForce Go 6600 .*NVIDIA.*GeForce Go 66.* 1 1
-NVIDIA GeForce Go 6700 .*NVIDIA.*GeForce Go 67.* 1 1
-NVIDIA GeForce Go 6800 .*NVIDIA.*GeForce Go 68.* 1 1
-NVIDIA GeForce Go 7200 .*NVIDIA.*GeForce Go 72.* 1 1
-NVIDIA GeForce Go 7300 LE .*NVIDIA.*GeForce Go 73.*LE.* 0 1
-NVIDIA GeForce Go 7300 .*NVIDIA.*GeForce Go 73.* 1 1
-NVIDIA GeForce Go 7400 .*NVIDIA.*GeForce Go 74.* 1 1
-NVIDIA GeForce Go 7600 .*NVIDIA.*GeForce Go 76.* 2 1
-NVIDIA GeForce Go 7700 .*NVIDIA.*GeForce Go 77.* 2 1
-NVIDIA GeForce Go 7800 .*NVIDIA.*GeForce Go 78.* 2 1
-NVIDIA GeForce Go 7900 .*NVIDIA.*GeForce Go 79.* 2 1
-NVIDIA D9M .*NVIDIA.*D9M.* 1 1
-NVIDIA G94 .*NVIDIA.*G94.* 3 1
+NVIDIA GeForce 4 .*NVIDIA .*GeForce ?4.* 0 1
+NVIDIA GeForce 4 Go .*NVIDIA .*GeForce ?4.*Go.* 0 1
+NVIDIA GeForce 4 MX .*NVIDIA .*GeForce ?4 MX.* 0 1
+NVIDIA GeForce 4 PCX .*NVIDIA .*GeForce ?4 PCX.* 0 1
+NVIDIA GeForce 4 Ti .*NVIDIA .*GeForce ?4 Ti.* 0 1
+NVIDIA GeForce 6100 .*NVIDIA .*GeForce 61.* 0 1
+NVIDIA GeForce 6200 .*NVIDIA .*GeForce 62.* 0 1
+NVIDIA GeForce 6500 .*NVIDIA .*GeForce 65.* 0 1
+NVIDIA GeForce 6600 .*NVIDIA .*GeForce 66.* 1 1
+NVIDIA GeForce 6700 .*NVIDIA .*GeForce 67.* 2 1
+NVIDIA GeForce 6800 .*NVIDIA .*GeForce 68.* 2 1
+NVIDIA GeForce 7000 .*NVIDIA .*GeForce 70.* 0 1
+NVIDIA GeForce 7100 .*NVIDIA .*GeForce 71.* 0 1
+NVIDIA GeForce 7200 .*NVIDIA .*GeForce 72.* 1 1
+NVIDIA GeForce 7300 .*NVIDIA .*GeForce 73.* 1 1
+NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 1 1
+NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1
+NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1
+NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 2 1
+NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1
+NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1
+NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1
+NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 2 1
+NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 2 1
+NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1
+NVIDIA GeForce 8500 .*NVIDIA .*GeForce 85.* 3 1
+NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 2 1
+NVIDIA GeForce 8600 .*NVIDIA .*GeForce 86.* 3 1
+NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 3 1
+NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1
+NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 3 1
+NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1
+NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1
+NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1
+NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1
+NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1
+NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 2 1
+NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 2 1
+NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1
+NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 2 1
+NVIDIA GeForce 9500M .*NVIDIA .*GeForce 9500M.* 2 1
+NVIDIA GeForce 9500 .*NVIDIA .*GeForce 95.* 2 1
+NVIDIA GeForce 9600M .*NVIDIA .*GeForce 9600M.* 3 1
+NVIDIA GeForce 9600 .*NVIDIA .*GeForce 96.* 2 1
+NVIDIA GeForce 9700M .*NVIDIA .*GeForce 9700M.* 2 1
+NVIDIA GeForce 9800M .*NVIDIA .*GeForce 9800M.* 3 1
+NVIDIA GeForce 9800 .*NVIDIA .*GeForce 98.* 3 1
+NVIDIA GeForce FX 5100 .*NVIDIA .*GeForce FX 51.* 0 1
+NVIDIA GeForce FX 5200 .*NVIDIA .*GeForce FX 52.* 0 1
+NVIDIA GeForce FX 5300 .*NVIDIA .*GeForce FX 53.* 0 1
+NVIDIA GeForce FX 5500 .*NVIDIA .*GeForce FX 55.* 0 1
+NVIDIA GeForce FX 5600 .*NVIDIA .*GeForce FX 56.* 0 1
+NVIDIA GeForce FX 5700 .*NVIDIA .*GeForce FX 57.* 1 1
+NVIDIA GeForce FX 5800 .*NVIDIA .*GeForce FX 58.* 1 1
+NVIDIA GeForce FX 5900 .*NVIDIA .*GeForce FX 59.* 1 1
+NVIDIA GeForce FX Go5100 .*NVIDIA .*GeForce FX Go51.* 0 1
+NVIDIA GeForce FX Go5200 .*NVIDIA .*GeForce FX Go52.* 0 1
+NVIDIA GeForce FX Go5300 .*NVIDIA .*GeForce FX Go53.* 0 1
+NVIDIA GeForce FX Go5500 .*NVIDIA .*GeForce FX Go55.* 0 1
+NVIDIA GeForce FX Go5600 .*NVIDIA .*GeForce FX Go56.* 0 1
+NVIDIA GeForce FX Go5700 .*NVIDIA .*GeForce FX Go57.* 1 1
+NVIDIA GeForce FX Go5800 .*NVIDIA .*GeForce FX Go58.* 1 1
+NVIDIA GeForce FX Go5900 .*NVIDIA .*GeForce FX Go59.* 1 1
+NVIDIA GeForce FX Go5xxx .*NVIDIA .*GeForce FX Go.* 0 1
+NVIDIA GeForce Go 6100 .*NVIDIA .*GeForce Go 61.* 0 1
+NVIDIA GeForce Go 6200 .*NVIDIA .*GeForce Go 62.* 0 1
+NVIDIA GeForce Go 6400 .*NVIDIA .*GeForce Go 64.* 1 1
+NVIDIA GeForce Go 6500 .*NVIDIA .*GeForce Go 65.* 1 1
+NVIDIA GeForce Go 6600 .*NVIDIA .*GeForce Go 66.* 1 1
+NVIDIA GeForce Go 6700 .*NVIDIA .*GeForce Go 67.* 1 1
+NVIDIA GeForce Go 6800 .*NVIDIA .*GeForce Go 68.* 1 1
+NVIDIA GeForce Go 7200 .*NVIDIA .*GeForce Go 72.* 1 1
+NVIDIA GeForce Go 7300 LE .*NVIDIA .*GeForce Go 73.*LE.* 0 1
+NVIDIA GeForce Go 7300 .*NVIDIA .*GeForce Go 73.* 1 1
+NVIDIA GeForce Go 7400 .*NVIDIA .*GeForce Go 74.* 1 1
+NVIDIA GeForce Go 7600 .*NVIDIA .*GeForce Go 76.* 2 1
+NVIDIA GeForce Go 7700 .*NVIDIA .*GeForce Go 77.* 2 1
+NVIDIA GeForce Go 7800 .*NVIDIA .*GeForce Go 78.* 2 1
+NVIDIA GeForce Go 7900 .*NVIDIA .*GeForce Go 79.* 2 1
+NVIDIA D9M .*NVIDIA .*D9M.* 1 1
+NVIDIA G94 .*NVIDIA .*G94.* 3 1
NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1
-NVIDIA ION 2 .*NVIDIA ION 2.* 2 1
-NVIDIA ION .*NVIDIA ION.* 2 1
-NVIDIA NB9M .*GeForce NB9M.* 1 1
-NVIDIA NB9P .*GeForce NB9P.* 1 1
+NVIDIA ION 2 .*NVIDIA .*ION 2.* 2 1
+NVIDIA ION .*NVIDIA .*ION.* 2 1
+NVIDIA NB8M .*NVIDIA .*NB8M.* 1 1
+NVIDIA NB8P .*NVIDIA .*NB8P.* 2 1
+NVIDIA NB9E .*NVIDIA .*NB9E.* 3 1
+NVIDIA NB9M .*NVIDIA .*NB9M.* 1 1
+NVIDIA NB9P .*NVIDIA .*NB9P.* 2 1
+NVIDIA N10 .*NVIDIA .*N10.* 1 1
NVIDIA GeForce PCX .*GeForce PCX.* 0 1
-NVIDIA Generic .*NVIDIA.*Unknown.* 0 0
-NVIDIA NV17 .*GeForce NV17.* 0 1
-NVIDIA NV34 .*NVIDIA.*NV34.* 0 1
-NVIDIA NV35 .*NVIDIA.*NV35.* 0 1
-NVIDIA NV36 .*GeForce NV36.* 1 1
-NVIDIA NV43 .*NVIDIA *NV43.* 1 1
-NVIDIA NV44 .*NVIDIA *NV44.* 1 1
-NVIDIA nForce .*NVIDIA *nForce.* 0 0
-NVIDIA MCP78 .*NVIDIA *MCP78.* 1 1
+NVIDIA Generic .*NVIDIA .*Unknown.* 0 0
+NVIDIA NV17 .*NVIDIA .*NV17.* 0 1
+NVIDIA NV34 .*NVIDIA .*NV34.* 0 1
+NVIDIA NV35 .*NVIDIA .*NV35.* 0 1
+NVIDIA NV36 .*NVIDIA .*NV36.* 1 1
+NVIDIA NV41 .*NVIDIA .*NV41.* 1 1
+NVIDIA NV43 .*NVIDIA .*NV43.* 1 1
+NVIDIA NV44 .*NVIDIA .*NV44.* 1 1
+NVIDIA nForce .*NVIDIA .*nForce.* 0 0
+NVIDIA MCP51 .*NVIDIA .*MCP51.* 1 1
+NVIDIA MCP61 .*NVIDIA .*MCP61.* 1 1
+NVIDIA MCP67 .*NVIDIA .*MCP67.* 1 1
+NVIDIA MCP68 .*NVIDIA .*MCP68.* 1 1
+NVIDIA MCP73 .*NVIDIA .*MCP73.* 1 1
+NVIDIA MCP77 .*NVIDIA .*MCP77.* 1 1
+NVIDIA MCP78 .*NVIDIA .*MCP78.* 1 1
+NVIDIA MCP79 .*NVIDIA .*MCP79.* 1 1
+NVIDIA MCP7A .*NVIDIA .*MCP7A.* 1 1
NVIDIA Quadro2 .*Quadro2.* 0 1
NVIDIA Quadro 1000M .*Quadro.*1000M.* 2 1
-NVIDIA Quadro 2000 M/D .*Quadro.*2000(M|D)?.* 3 1
+NVIDIA Quadro 2000 M/D .*Quadro.*2000.* 3 1
+NVIDIA Quadro 3000M .*Quadro.*3000M.* 3 1
NVIDIA Quadro 4000M .*Quadro.*4000M.* 3 1
NVIDIA Quadro 4000 .*Quadro *4000.* 3 1
-NVIDIA Quadro 50x0 M .*Quadro.*50.0(M)?.* 3 1
+NVIDIA Quadro 50x0 M .*Quadro.*50.0.* 3 1
NVIDIA Quadro 6000 .*Quadro.*6000.* 3 1
NVIDIA Quadro 400 .*Quadro.*400.* 2 1
NVIDIA Quadro 600 .*Quadro.*600.* 2 1
NVIDIA Quadro4 .*Quadro4.* 0 1
NVIDIA Quadro DCC .*Quadro DCC.* 0 1
+NVIDIA Quadro CX .*Quadro.*CX.* 3 1
NVIDIA Quadro FX 770M .*Quadro.*FX *770M.* 2 1
NVIDIA Quadro FX 1500M .*Quadro.*FX *1500M.* 1 1
NVIDIA Quadro FX 1600M .*Quadro.*FX *1600M.* 2 1
@@ -498,16 +513,16 @@ NVIDIA Quadro FX 3700 .*Quadro.*FX *3700.* 3 1
NVIDIA Quadro FX 3800 .*Quadro.*FX *3800.* 3 1
NVIDIA Quadro FX 4500 .*Quadro.*FX *45.* 3 1
NVIDIA Quadro FX 880M .*Quadro.*FX *880M.* 3 1
-NVIDIA Quadro FX 4800 .*NVIDIA.*Quadro *FX *4800.* 3 1
+NVIDIA Quadro FX 4800 .*NVIDIA .*Quadro *FX *4800.* 3 1
NVIDIA Quadro FX .*Quadro FX.* 1 1
NVIDIA Quadro NVS 1xxM .*Quadro NVS *1.[05]M.* 0 1
-NVIDIA Quadro NVS 300M .*NVIDIA.*NVS *300M.* 2 1
-NVIDIA Quadro NVS 320M .*NVIDIA.*NVS *320M.* 2 1
-NVIDIA Quadro NVS 2100M .*NVIDIA.*NVS *2100M.* 2 1
-NVIDIA Quadro NVS 3100M .*NVIDIA.*NVS *3100M.* 2 1
-NVIDIA Quadro NVS 4200M .*NVIDIA.*NVS *4200M.* 2 1
-NVIDIA Quadro NVS 5100M .*NVIDIA.*NVS *5100M.* 2 1
-NVIDIA Quadro NVS .*NVIDIA.*NVS 0 1
+NVIDIA Quadro NVS 300M .*NVIDIA .*NVS *300M.* 2 1
+NVIDIA Quadro NVS 320M .*NVIDIA .*NVS *320M.* 2 1
+NVIDIA Quadro NVS 2100M .*NVIDIA .*NVS *2100M.* 2 1
+NVIDIA Quadro NVS 3100M .*NVIDIA .*NVS *3100M.* 2 1
+NVIDIA Quadro NVS 4200M .*NVIDIA .*NVS *4200M.* 2 1
+NVIDIA Quadro NVS 5100M .*NVIDIA .*NVS *5100M.* 2 1
+NVIDIA Quadro NVS .*NVIDIA .*NVS 0 1
NVIDIA RIVA TNT .*RIVA TNT.* 0 0
S3 .*S3 Graphics.* 0 0
SiS SiS.* 0 0
@@ -517,3 +532,4 @@ XGI XGI.* 0 0
VIA VIA.* 0 0
Apple Generic Apple.*Generic.* 0 0
Apple Software Renderer Apple.*Software Renderer.* 0 0
+Humper Humper.* 0 1
diff --git a/indra/newview/icons/beta/secondlife.icns b/indra/newview/icons/beta/secondlife.icns
new file mode 100644
index 0000000000..1fa50547bb
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife.icns
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife.ico b/indra/newview/icons/beta/secondlife.ico
new file mode 100644
index 0000000000..9bdd21b904
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife.ico
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife_128.png b/indra/newview/icons/beta/secondlife_128.png
new file mode 100644
index 0000000000..fa42aa764b
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife_128.png
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife_16.png b/indra/newview/icons/beta/secondlife_16.png
new file mode 100644
index 0000000000..ff648cf3fc
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife_16.png
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife_256.BMP b/indra/newview/icons/beta/secondlife_256.BMP
new file mode 100644
index 0000000000..97bd67d3d6
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife_256.BMP
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife_256.png b/indra/newview/icons/beta/secondlife_256.png
new file mode 100644
index 0000000000..245e2c3e9f
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife_256.png
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife_32.png b/indra/newview/icons/beta/secondlife_32.png
new file mode 100644
index 0000000000..fd7f46bf4d
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife_32.png
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife_48.png b/indra/newview/icons/beta/secondlife_48.png
new file mode 100644
index 0000000000..cc3a795e2b
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife_48.png
Binary files differ
diff --git a/indra/newview/icons/beta/secondlife_512.png b/indra/newview/icons/beta/secondlife_512.png
new file mode 100644
index 0000000000..a959bd9a9e
--- /dev/null
+++ b/indra/newview/icons/beta/secondlife_512.png
Binary files differ
diff --git a/indra/newview/icons/development/secondlife.icns b/indra/newview/icons/development/secondlife.icns
new file mode 100644
index 0000000000..44f63d384c
--- /dev/null
+++ b/indra/newview/icons/development/secondlife.icns
Binary files differ
diff --git a/indra/newview/icons/development/secondlife.ico b/indra/newview/icons/development/secondlife.ico
new file mode 100644
index 0000000000..b53f23ae58
--- /dev/null
+++ b/indra/newview/icons/development/secondlife.ico
Binary files differ
diff --git a/indra/newview/icons/development/secondlife_128.png b/indra/newview/icons/development/secondlife_128.png
new file mode 100644
index 0000000000..9b9fe656fc
--- /dev/null
+++ b/indra/newview/icons/development/secondlife_128.png
Binary files differ
diff --git a/indra/newview/icons/development/secondlife_16.png b/indra/newview/icons/development/secondlife_16.png
new file mode 100644
index 0000000000..91493a033c
--- /dev/null
+++ b/indra/newview/icons/development/secondlife_16.png
Binary files differ
diff --git a/indra/newview/icons/development/secondlife_256.BMP b/indra/newview/icons/development/secondlife_256.BMP
new file mode 100644
index 0000000000..174b22319a
--- /dev/null
+++ b/indra/newview/icons/development/secondlife_256.BMP
Binary files differ
diff --git a/indra/newview/icons/development/secondlife_256.png b/indra/newview/icons/development/secondlife_256.png
new file mode 100644
index 0000000000..29ed40abdc
--- /dev/null
+++ b/indra/newview/icons/development/secondlife_256.png
Binary files differ
diff --git a/indra/newview/icons/development/secondlife_32.png b/indra/newview/icons/development/secondlife_32.png
new file mode 100644
index 0000000000..3b84f5ec77
--- /dev/null
+++ b/indra/newview/icons/development/secondlife_32.png
Binary files differ
diff --git a/indra/newview/icons/development/secondlife_48.png b/indra/newview/icons/development/secondlife_48.png
new file mode 100644
index 0000000000..d2636d9d72
--- /dev/null
+++ b/indra/newview/icons/development/secondlife_48.png
Binary files differ
diff --git a/indra/newview/icons/development/secondlife_512.png b/indra/newview/icons/development/secondlife_512.png
new file mode 100644
index 0000000000..75f9b231f4
--- /dev/null
+++ b/indra/newview/icons/development/secondlife_512.png
Binary files differ
diff --git a/indra/newview/icons/project/secondlife.icns b/indra/newview/icons/project/secondlife.icns
new file mode 100644
index 0000000000..d6e26a8ed9
--- /dev/null
+++ b/indra/newview/icons/project/secondlife.icns
Binary files differ
diff --git a/indra/newview/icons/project/secondlife.ico b/indra/newview/icons/project/secondlife.ico
new file mode 100644
index 0000000000..ebb27e5325
--- /dev/null
+++ b/indra/newview/icons/project/secondlife.ico
Binary files differ
diff --git a/indra/newview/icons/project/secondlife_128.png b/indra/newview/icons/project/secondlife_128.png
new file mode 100644
index 0000000000..d67b8228f9
--- /dev/null
+++ b/indra/newview/icons/project/secondlife_128.png
Binary files differ
diff --git a/indra/newview/icons/project/secondlife_16.png b/indra/newview/icons/project/secondlife_16.png
new file mode 100644
index 0000000000..91493a033c
--- /dev/null
+++ b/indra/newview/icons/project/secondlife_16.png
Binary files differ
diff --git a/indra/newview/icons/project/secondlife_256.BMP b/indra/newview/icons/project/secondlife_256.BMP
new file mode 100644
index 0000000000..cd890725f8
--- /dev/null
+++ b/indra/newview/icons/project/secondlife_256.BMP
Binary files differ
diff --git a/indra/newview/icons/project/secondlife_256.png b/indra/newview/icons/project/secondlife_256.png
new file mode 100644
index 0000000000..cccfaf7cba
--- /dev/null
+++ b/indra/newview/icons/project/secondlife_256.png
Binary files differ
diff --git a/indra/newview/icons/project/secondlife_32.png b/indra/newview/icons/project/secondlife_32.png
new file mode 100644
index 0000000000..ad7b33f789
--- /dev/null
+++ b/indra/newview/icons/project/secondlife_32.png
Binary files differ
diff --git a/indra/newview/icons/project/secondlife_48.png b/indra/newview/icons/project/secondlife_48.png
new file mode 100644
index 0000000000..104a931fbc
--- /dev/null
+++ b/indra/newview/icons/project/secondlife_48.png
Binary files differ
diff --git a/indra/newview/icons/project/secondlife_512.png b/indra/newview/icons/project/secondlife_512.png
new file mode 100644
index 0000000000..74e2fa9bc6
--- /dev/null
+++ b/indra/newview/icons/project/secondlife_512.png
Binary files differ
diff --git a/indra/newview/icons/release/secondlife.icns b/indra/newview/icons/release/secondlife.icns
new file mode 100644
index 0000000000..e15e34140d
--- /dev/null
+++ b/indra/newview/icons/release/secondlife.icns
Binary files differ
diff --git a/indra/newview/icons/release/secondlife.ico b/indra/newview/icons/release/secondlife.ico
new file mode 100644
index 0000000000..28bf1e7664
--- /dev/null
+++ b/indra/newview/icons/release/secondlife.ico
Binary files differ
diff --git a/indra/newview/icons/release/secondlife_128.png b/indra/newview/icons/release/secondlife_128.png
new file mode 100644
index 0000000000..bcf94dcae8
--- /dev/null
+++ b/indra/newview/icons/release/secondlife_128.png
Binary files differ
diff --git a/indra/newview/icons/release/secondlife_16.png b/indra/newview/icons/release/secondlife_16.png
new file mode 100644
index 0000000000..90311ea8b0
--- /dev/null
+++ b/indra/newview/icons/release/secondlife_16.png
Binary files differ
diff --git a/indra/newview/icons/release/secondlife_256.BMP b/indra/newview/icons/release/secondlife_256.BMP
new file mode 100644
index 0000000000..74deedd7d3
--- /dev/null
+++ b/indra/newview/icons/release/secondlife_256.BMP
Binary files differ
diff --git a/indra/newview/icons/release/secondlife_256.png b/indra/newview/icons/release/secondlife_256.png
new file mode 100644
index 0000000000..a89fb4c74f
--- /dev/null
+++ b/indra/newview/icons/release/secondlife_256.png
Binary files differ
diff --git a/indra/newview/icons/release/secondlife_32.png b/indra/newview/icons/release/secondlife_32.png
new file mode 100644
index 0000000000..530e8fc80c
--- /dev/null
+++ b/indra/newview/icons/release/secondlife_32.png
Binary files differ
diff --git a/indra/newview/icons/release/secondlife_48.png b/indra/newview/icons/release/secondlife_48.png
new file mode 100644
index 0000000000..cb33c51f8a
--- /dev/null
+++ b/indra/newview/icons/release/secondlife_48.png
Binary files differ
diff --git a/indra/newview/icons/release/secondlife_512.png b/indra/newview/icons/release/secondlife_512.png
new file mode 100644
index 0000000000..f291e60586
--- /dev/null
+++ b/indra/newview/icons/release/secondlife_512.png
Binary files differ
diff --git a/indra/newview/icons/test/secondlife.icns b/indra/newview/icons/test/secondlife.icns
new file mode 100644
index 0000000000..eb8d16a7e7
--- /dev/null
+++ b/indra/newview/icons/test/secondlife.icns
Binary files differ
diff --git a/indra/newview/icons/test/secondlife.ico b/indra/newview/icons/test/secondlife.ico
new file mode 100644
index 0000000000..ceb8e8e6eb
--- /dev/null
+++ b/indra/newview/icons/test/secondlife.ico
Binary files differ
diff --git a/indra/newview/icons/test/secondlife_128.png b/indra/newview/icons/test/secondlife_128.png
new file mode 100644
index 0000000000..019f65db28
--- /dev/null
+++ b/indra/newview/icons/test/secondlife_128.png
Binary files differ
diff --git a/indra/newview/icons/test/secondlife_16.png b/indra/newview/icons/test/secondlife_16.png
new file mode 100644
index 0000000000..91493a033c
--- /dev/null
+++ b/indra/newview/icons/test/secondlife_16.png
Binary files differ
diff --git a/indra/newview/icons/test/secondlife_256.BMP b/indra/newview/icons/test/secondlife_256.BMP
new file mode 100644
index 0000000000..e23fcfdbe9
--- /dev/null
+++ b/indra/newview/icons/test/secondlife_256.BMP
Binary files differ
diff --git a/indra/newview/icons/test/secondlife_256.png b/indra/newview/icons/test/secondlife_256.png
new file mode 100644
index 0000000000..f402424c51
--- /dev/null
+++ b/indra/newview/icons/test/secondlife_256.png
Binary files differ
diff --git a/indra/newview/icons/test/secondlife_32.png b/indra/newview/icons/test/secondlife_32.png
new file mode 100644
index 0000000000..80d6efe13d
--- /dev/null
+++ b/indra/newview/icons/test/secondlife_32.png
Binary files differ
diff --git a/indra/newview/icons/test/secondlife_48.png b/indra/newview/icons/test/secondlife_48.png
new file mode 100644
index 0000000000..bba938feba
--- /dev/null
+++ b/indra/newview/icons/test/secondlife_48.png
Binary files differ
diff --git a/indra/newview/icons/test/secondlife_512.png b/indra/newview/icons/test/secondlife_512.png
new file mode 100644
index 0000000000..10ff65312b
--- /dev/null
+++ b/indra/newview/icons/test/secondlife_512.png
Binary files differ
diff --git a/indra/newview/installers/darwin/dmg-cleanup.applescript b/indra/newview/installers/darwin/dmg-cleanup.applescript
index f3d39aec21..8a71b392f9 100644
--- a/indra/newview/installers/darwin/dmg-cleanup.applescript
+++ b/indra/newview/installers/darwin/dmg-cleanup.applescript
@@ -19,7 +19,7 @@ tell application "Finder"
set current view of foo to icon view
set toolbar visible of foo to false
set statusbar visible of foo to false
- set the bounds of foo to {100, 100, 600, 399}
+ set the bounds of foo to {100, 100, 600, 449}
-- set the position of front window to {100, 100}
-- get {name, position} of every item of front window
diff --git a/indra/newview/installers/darwin/fix_application_icon_position.sh b/indra/newview/installers/darwin/fix_application_icon_position.sh
index c6b92589db..618e34820c 100644
--- a/indra/newview/installers/darwin/fix_application_icon_position.sh
+++ b/indra/newview/installers/darwin/fix_application_icon_position.sh
@@ -1,6 +1,6 @@
# just run this script each time after you change the installer's name to fix the icon misalignment
#!/bin/bash
-cp -r ./../../../build-darwin-i386/newview/*.dmg ~/Desktop/TempBuild.dmg
+cp -r ../../../../build-darwin-i386/newview/*.dmg ~/Desktop/TempBuild.dmg
hdid ~/Desktop/TempBuild.dmg
open -a finder /Volumes/Second\ Life\ Installer
osascript dmg-cleanup.applescript
diff --git a/indra/newview/installers/darwin/release-dmg/_DS_Store b/indra/newview/installers/darwin/release-dmg/_DS_Store
index 8f6c25c2f4..747ca961d8 100644
--- a/indra/newview/installers/darwin/release-dmg/_DS_Store
+++ b/indra/newview/installers/darwin/release-dmg/_DS_Store
Binary files differ
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 4811f1fcd5..8a6114f0d5 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -1,6 +1,22 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; secondlife setup.nsi
-;; Copyright 2004-2010, Linden Research, Inc.
+;; Copyright 2004-2011, Linden Research, Inc.
+;;
+;; This library is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU Lesser General Public
+;; License as published by the Free Software Foundation;
+;; version 2.1 of the License only.
+;;
+;; This library is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Lesser General Public License for more details.
+;;
+;; You should have received a copy of the GNU Lesser General Public
+;; License along with this library; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+;;
+;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
;;
;; NSIS Unicode 2.38.1 or higher required
;; http://www.scratchpaper.com/
@@ -99,6 +115,7 @@ Var COMMANDLINE ; command line passed to this installer, set in .onInit
Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer
Var SKIP_DIALOGS ; set from command line in .onInit. autoinstall
; GUI and the defaults.
+Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation that will be uninstalled.
;;; Function definitions should go before file includes, because calls to
;;; DLLs like LangDLL trigger an implicit file include, so if that call is at
@@ -293,19 +310,171 @@ Function CheckNetworkConnection
Return
FunctionEnd
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Delete files in Documents and Settings\<user>\SecondLife\cache
-; Delete files in Documents and Settings\All Users\SecondLife\cache
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;Function RemoveCacheFiles
+; Function CheckWillUninstallV2
;
-;; Delete files in Documents and Settings\<user>\SecondLife
+; If we are being called through auto-update, we need to uninstall any
+; existing V2 installation. Otherwise, we wind up with
+; SecondLifeViewer2 and SecondLifeViewer installations existing side
+; by side no indication which to use.
+; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function CheckWillUninstallV2
+
+ StrCpy $DO_UNINSTALL_V2 ""
+
+ StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE
+ StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE ; don't uninstall our own install dir.
+ IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE
+
+CHECKV2_FOUND:
+ StrCpy $DO_UNINSTALL_V2 "true"
+
+CHECKV2_DONE:
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Save user files to temp location
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function PreserveUserFiles
+
+Push $0
+Push $1
+Push $2
+
+ RMDir /r "$TEMP\SecondLifeSettingsBackup"
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup"
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
+ CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+ CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+Pop $0
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Restore user files from temp location
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function RestoreUserFiles
+
+Push $0
+Push $1
+Push $2
+
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ CreateDirectory "$2\Application Data\SecondLife\"
+ CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ CreateDirectory "$2\Application Data\SecondLife\"
+ CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\"
+Pop $0
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Remove temp dirs
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function RemoveTempUserFiles
+
+Push $0
+Push $1
+Push $2
+
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ RMDir /r "$TEMP\SecondLifeSettingsBackup\AllUsers\*"
+Pop $0
+
+FunctionEnd
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Clobber user files - TEST ONLY
+; This is here for testing, generally not desirable to call it.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;Function ClobberUserFilesTESTONLY
+
;Push $0
;Push $1
;Push $2
-; DetailPrint $(RemoveCacheFilesDP)
;
-; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
;
; LOOP:
; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
@@ -317,29 +486,24 @@ FunctionEnd
; ; Required since ProfileImagePath is of type REG_EXPAND_SZ
; ExpandEnvStrings $2 $2
;
-; ; When explicitly uninstalling, everything goes away
-; RMDir /r "$2\Application Data\SecondLife\cache"
+; RMDir /r "$2\Application Data\SecondLife\"
;
; CONTINUE:
; IntOp $0 $0 + 1
; Goto LOOP
; DONE:
+;
;Pop $2
;Pop $1
;Pop $0
;
-;; Delete files in Documents and Settings\All Users\SecondLife
+;; Copy files in Documents and Settings\All Users\SecondLife
;Push $0
-; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
-; StrCmp $0 "" +2
-; RMDir /r "$0\SecondLife\cache"
+; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+; StrCmp $0 "" +2
+; RMDir /r "$2\Application Data\SecondLife\"
;Pop $0
;
-;; Delete filse in C:\Windows\Application Data\SecondLife
-;; If the user is running on a pre-NT system, Application Data lives here instead of
-;; in Documents and Settings.
-;RMDir /r "$WINDIR\Application Data\SecondLife\cache"
-;
;FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -412,17 +576,15 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- ; If uninstalling a normal install remove everything
- ; Otherwise (preview/dmz etc) just remove cache
- StrCmp $INSTFLAGS "" RM_ALL RM_CACHE
- RM_ALL:
- RMDir /r "$2\Application Data\SecondLife"
- RM_CACHE:
- # Local Settings directory is the cache, there is no "cache" subdir
- RMDir /r "$2\Local Settings\Application Data\SecondLife"
- # Vista version of the same
- RMDir /r "$2\AppData\Local\SecondLife"
- Delete "$2\Application Data\SecondLife\user_settings\settings_windlight.xml"
+ ; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
+; RMDir /r "$2\Application Data\SecondLife\logs"
+ RMDir /r "$2\Application Data\SecondLife\browser_profile"
+ RMDir /r "$2\Application Data\SecondLife\user_settings"
+ Delete "$2\Application Data\SecondLife\*.xml"
+ Delete "$2\Application Data\SecondLife\*.bmp"
+ Delete "$2\Application Data\SecondLife\search_history.txt"
+ Delete "$2\Application Data\SecondLife\plugin_cookies.txt"
+ Delete "$2\Application Data\SecondLife\typed_locations.txt"
CONTINUE:
IntOp $0 $0 + 1
@@ -440,7 +602,7 @@ Push $0
RMDir /r "$0\SecondLife"
Pop $0
-; Delete filse in C:\Windows\Application Data\SecondLife
+; Delete files in C:\Windows\Application Data\SecondLife
; If the user is running on a pre-NT system, Application Data lives here instead of
; in Documents and Settings.
RMDir /r "$WINDIR\Application Data\SecondLife"
@@ -768,12 +930,16 @@ Call CheckIfAdministrator ; Make sure the user can install/uninstall
Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version
Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
+Call CheckWillUninstallV2 ; See if a V2 install exists and will be removed.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE
+ Call PreserveUserFiles
+PRESERVE_DONE:
+
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
; VFS and cache files.
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Need to clean out shader files from previous installs to fix DEV-5663
Call RemoveOldShaders
@@ -854,6 +1020,16 @@ WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" ""
; write out uninstaller
WriteUninstaller "$INSTDIR\uninst.exe"
+; Uninstall existing "Second Life Viewer 2" install if needed.
+StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE
+ ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2'
+ Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" ; with _? option above, uninst.exe will be left behind.
+ RMDir "$PROGRAMFILES\SecondLifeViewer2" ; will remove only if empty.
+
+ Call RestoreUserFiles
+ Call RemoveTempUserFiles
+REMOVE_SLV2_DONE:
+
; end of default section
SectionEnd
diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp
new file mode 100644
index 0000000000..8767955fcb
--- /dev/null
+++ b/indra/newview/llaccountingcostmanager.cpp
@@ -0,0 +1,181 @@
+/**
+ * @file LLAccountingQuotaManager.cpp
+ * @ Handles the setting and accessing for costs associated with mesh
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llaccountingcostmanager.h"
+#include "llagent.h"
+#include "llcurl.h"
+#include "llhttpclient.h"
+//===============================================================================
+LLAccountingCostManager::LLAccountingCostManager()
+{
+}
+//===============================================================================
+class LLAccountingCostResponder : public LLCurl::Responder
+{
+public:
+ LLAccountingCostResponder( const LLSD& objectIDs, const LLHandle<LLAccountingCostObserver>& observer_handle )
+ : mObjectIDs( objectIDs ),
+ mObserverHandle( observer_handle )
+ {
+ LLAccountingCostObserver* observer = mObserverHandle.get();
+ if (observer)
+ {
+ mTransactionID = observer->getTransactionID();
+ }
+ }
+
+ void clearPendingRequests ( void )
+ {
+ for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter )
+ {
+ LLAccountingCostManager::getInstance()->removePendingObject( iter->asUUID() );
+ }
+ }
+
+ void error( U32 statusNum, const std::string& reason )
+ {
+ llwarns << "Transport error "<<reason<<llendl;
+ clearPendingRequests();
+
+ LLAccountingCostObserver* observer = mObserverHandle.get();
+ if (observer && observer->getTransactionID() == mTransactionID)
+ {
+ observer->setErrorStatus(statusNum, reason);
+ }
+ }
+
+ void result( const LLSD& content )
+ {
+ //Check for error
+ if ( !content.isMap() || content.has("error") )
+ {
+ llwarns << "Error on fetched data"<< llendl;
+ }
+ else if (content.has("selected"))
+ {
+ F32 physicsCost = 0.0f;
+ F32 networkCost = 0.0f;
+ F32 simulationCost = 0.0f;
+
+ physicsCost = content["selected"]["physics"].asReal();
+ networkCost = content["selected"]["streaming"].asReal();
+ simulationCost = content["selected"]["simulation"].asReal();
+
+ SelectionCost selectionCost( /*transactionID,*/ physicsCost, networkCost, simulationCost );
+
+ LLAccountingCostObserver* observer = mObserverHandle.get();
+ if (observer && observer->getTransactionID() == mTransactionID)
+ {
+ observer->onWeightsUpdate(selectionCost);
+ }
+ }
+
+ clearPendingRequests();
+ }
+
+private:
+ //List of posted objects
+ LLSD mObjectIDs;
+
+ // Current request ID
+ LLUUID mTransactionID;
+
+ // Cost update observer handle
+ LLHandle<LLAccountingCostObserver> mObserverHandle;
+};
+//===============================================================================
+void LLAccountingCostManager::fetchCosts( eSelectionType selectionType,
+ const std::string& url,
+ const LLHandle<LLAccountingCostObserver>& observer_handle )
+{
+ // Invoking system must have already determined capability availability
+ if ( !url.empty() )
+ {
+ LLSD objectList;
+ U32 objectIndex = 0;
+
+ IDIt IDIter = mObjectList.begin();
+ IDIt IDIterEnd = mObjectList.end();
+
+ for ( ; IDIter != IDIterEnd; ++IDIter )
+ {
+ // Check to see if a request for this object has already been made.
+ if ( mPendingObjectQuota.find( *IDIter ) == mPendingObjectQuota.end() )
+ {
+ mPendingObjectQuota.insert( *IDIter );
+ objectList[objectIndex++] = *IDIter;
+ }
+ }
+
+ mObjectList.clear();
+
+ //Post results
+ if ( objectList.size() > 0 )
+ {
+ std::string keystr;
+ if ( selectionType == Roots )
+ {
+ keystr="selected_roots";
+ }
+ else
+ if ( selectionType == Prims )
+ {
+ keystr="selected_prims";
+ }
+ else
+ {
+ llinfos<<"Invalid selection type "<<llendl;
+ mObjectList.clear();
+ mPendingObjectQuota.clear();
+ return;
+ }
+
+ LLSD dataToPost = LLSD::emptyMap();
+ dataToPost[keystr.c_str()] = objectList;
+
+ LLHTTPClient::post( url, dataToPost, new LLAccountingCostResponder( objectList, observer_handle ));
+ }
+ }
+ else
+ {
+ //url was empty - warn & continue
+ llwarns<<"Supplied url is empty "<<llendl;
+ mObjectList.clear();
+ mPendingObjectQuota.clear();
+ }
+}
+//===============================================================================
+void LLAccountingCostManager::addObject( const LLUUID& objectID )
+{
+ mObjectList.insert( objectID );
+}
+//===============================================================================
+void LLAccountingCostManager::removePendingObject( const LLUUID& objectID )
+{
+ mPendingObjectQuota.erase( objectID );
+}
+//===============================================================================
diff --git a/indra/newview/llaccountingquotamanager.h b/indra/newview/llaccountingcostmanager.h
index 9251ef9351..0bca1f54ef 100644
--- a/indra/newview/llaccountingquotamanager.h
+++ b/indra/newview/llaccountingcostmanager.h
@@ -27,29 +27,49 @@
#ifndef LL_ACCOUNTINGQUOTAMANAGER_H
#define LL_ACCOUNTINGQUOTAMANAGER_H
//===============================================================================
-#include "llaccountingquota.h"
+#include "llhandle.h"
+
+#include "llaccountingcost.h"
+//===============================================================================
+// An interface class for panels which display the parcel accounting information.
+class LLAccountingCostObserver
+{
+public:
+ LLAccountingCostObserver() { mObserverHandle.bind(this); }
+ virtual ~LLAccountingCostObserver() {}
+ virtual void onWeightsUpdate(const SelectionCost& selection_cost) = 0;
+ virtual void setErrorStatus(U32 status, const std::string& reason) = 0;
+ const LLHandle<LLAccountingCostObserver>& getObserverHandle() const { return mObserverHandle; }
+ const LLUUID& getTransactionID() { return mTransactionID; }
+
+protected:
+ virtual void generateTransactionID() = 0;
+
+ LLRootHandle<LLAccountingCostObserver> mObserverHandle;
+ LLUUID mTransactionID;
+};
//===============================================================================
-class LLAccountingQuotaManager : public LLSingleton<LLAccountingQuotaManager>
+class LLAccountingCostManager : public LLSingleton<LLAccountingCostManager>
{
public:
//Ctor
- LLAccountingQuotaManager();
+ LLAccountingCostManager();
//Store an object that will be eventually fetched
- void updateObjectCost( const LLUUID& objectID );
+ void addObject( const LLUUID& objectID );
//Request quotas for object list
- void fetchQuotas( const std::string& url );
+ void fetchCosts( eSelectionType selectionType, const std::string& url,
+ const LLHandle<LLAccountingCostObserver>& observer_handle );
//Delete a specific object from the pending list
- void removePendingObjectQuota( const LLUUID& objectID );
+ void removePendingObject( const LLUUID& objectID );
private:
- //Set of objects that need to update their cost
- std::set<LLUUID> mUpdateObjectQuota;
- //During fetchQuota we move object into a the pending set to signify that
+ //Set of objects that will be used to generate a cost
+ std::set<LLUUID> mObjectList;
+ //During fetchCosts we move object into a the pending set to signify that
//a fetch has been instigated.
std::set<LLUUID> mPendingObjectQuota;
typedef std::set<LLUUID>::iterator IDIt;
};
//===============================================================================
-#endif // LLACCOUNTINGQUOTAMANAGER
-
+#endif // LLACCOUNTINGCOSTMANAGER
diff --git a/indra/newview/llaccountingquotamanager.cpp b/indra/newview/llaccountingquotamanager.cpp
deleted file mode 100644
index a4f5de5632..0000000000
--- a/indra/newview/llaccountingquotamanager.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-/**
- * @file LLAccountingQuotaManager.cpp
- * @ Handles the setting and accessing for costs associated with mesh
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2011, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-#include "llaccountingquotamanager.h"
-#include "llagent.h"
-#include "llviewerregion.h"
-#include "llviewerobject.h"
-#include "llviewerobjectlist.h"
-#include "llviewerparcelmgr.h"
-#include "llparcel.h"
-
-//===============================================================================
-LLAccountingQuotaManager::LLAccountingQuotaManager()
-{
-}
-//===============================================================================
-class LLAccountingQuotaResponder : public LLCurl::Responder
-{
-public:
- LLAccountingQuotaResponder( const LLSD& objectIDs )
- : mObjectIDs( objectIDs )
- {
- }
-
- void clearPendingRequests ( void )
- {
- for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter )
- {
- LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( iter->asUUID() );
- }
- }
-
- void error( U32 statusNum, const std::string& reason )
- {
- llwarns << "Transport error "<<reason<<llendl;
- //prep#do we really want to remove all because of one failure - verify
- clearPendingRequests();
- }
-
- void result( const LLSD& content )
- {
- if ( !content.isMap() || content.has("error") )
- {
- llwarns << "Error on fetched data"<< llendl;
- //prep#do we really want to remove all because of one failure - verify
- clearPendingRequests();
- return;
- }
-
- //Differentiate what the incoming caps could be from the data
- bool containsParcel = content.has("parcel");
- bool containsSelection = content.has("selected");
-
- //Loop over the stored object ids checking against the incoming data
- for ( LLSD::array_iterator iter = mObjectIDs.beginArray(); iter != mObjectIDs.endArray(); ++iter )
- {
- LLUUID objectID = iter->asUUID();
-
- LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( objectID );
-
- if ( containsParcel )
- {
- //Typically should be one
- S32 dataCount = content["parcel"].size();
- for(S32 i = 0; i < dataCount; i++)
- {
- //prep#todo verify that this is safe, otherwise just add a bool
- LLUUID parcelId;
- //S32 parcelOwner = 0;
- if ( content["parcel"][i].has("parcel_id") )
- {
- parcelId = content["parcel"][i]["parcel_id"].asUUID();
- }
-
- //if ( content["parcel"][i].has("parcel_owner") )
- //{
- // parcelOwner = content["parcel"][i]["parcel_owner"].asInteger();
- //}
-
- F32 ownerRenderCost = 0;
- F32 ownerPhysicsCost = 0;
- F32 ownerNetworkCost = 0;
- F32 ownerSimulationCost = 0;
-
- F32 groupRenderCost = 0;
- F32 groupPhysicsCost = 0;
- F32 groupNetworkCost = 0;
- F32 groupSimulationCost = 0;
-
- F32 otherRenderCost = 0;
- F32 otherPhysicsCost = 0;
- F32 otherNetworkCost = 0;
- F32 otherSimulationCost = 0;
-
- F32 tempRenderCost = 0;
- F32 tempPhysicsCost = 0;
- F32 tempNetworkCost = 0;
- F32 tempSimulationCost = 0;
-
- F32 selectedRenderCost = 0;
- F32 selectedPhysicsCost = 0;
- F32 selectedNetworkCost = 0;
- F32 selectedSimulationCost = 0;
-
- F32 parcelCapacity = 0;
-
- if ( content["parcel"][i].has("capacity") )
- {
- parcelCapacity = content["parcel"][i].has("capacity");
- }
-
- if ( content["parcel"][i].has("owner") )
- {
- ownerRenderCost = content["parcel"][i]["owner"]["rendering"].asReal();
- ownerPhysicsCost = content["parcel"][i]["owner"]["physics"].asReal();
- ownerNetworkCost = content["parcel"][i]["owner"]["streaming"].asReal();
- ownerSimulationCost = content["parcel"][i]["owner"]["simulation"].asReal();
- }
-
- if ( content["parcel"][i].has("group") )
- {
- groupRenderCost = content["parcel"][i]["group"]["rendering"].asReal();
- groupPhysicsCost = content["parcel"][i]["group"]["physics"].asReal();
- groupNetworkCost = content["parcel"][i]["group"]["streaming"].asReal();
- groupSimulationCost = content["parcel"][i]["group"]["simulation"].asReal();
-
- }
- if ( content["parcel"][i].has("other") )
- {
- otherRenderCost = content["parcel"][i]["other"]["rendering"].asReal();
- otherPhysicsCost = content["parcel"][i]["other"]["physics"].asReal();
- otherNetworkCost = content["parcel"][i]["other"]["streaming"].asReal();
- otherSimulationCost = content["parcel"][i]["other"]["simulation"].asReal();
- }
-
- if ( content["parcel"][i].has("temp") )
- {
- tempRenderCost = content["parcel"][i]["total"]["rendering"].asReal();
- tempPhysicsCost = content["parcel"][i]["total"]["physics"].asReal();
- tempNetworkCost = content["parcel"][i]["total"]["streaming"].asReal();
- tempSimulationCost = content["parcel"][i]["total"]["simulation"].asReal();
- }
-
- if ( content["parcel"][i].has("selected") )
- {
- selectedRenderCost = content["parcel"][i]["total"]["rendering"].asReal();
- selectedPhysicsCost = content["parcel"][i]["total"]["physics"].asReal();
- selectedNetworkCost = content["parcel"][i]["total"]["streaming"].asReal();
- selectedSimulationCost = content["parcel"][i]["total"]["simulation"].asReal();
- }
-
- ParcelQuota parcelQuota( ownerRenderCost, ownerPhysicsCost, ownerNetworkCost, ownerSimulationCost,
- groupRenderCost, groupPhysicsCost, groupNetworkCost, groupSimulationCost,
- otherRenderCost, otherPhysicsCost, otherNetworkCost, otherSimulationCost,
- tempRenderCost, tempPhysicsCost, tempNetworkCost, tempSimulationCost,
- selectedRenderCost, selectedPhysicsCost, selectedNetworkCost, selectedSimulationCost,
- parcelCapacity );
- //Update the Parcel
- LLParcel* pParcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
- if ( pParcel )
- {
- pParcel->updateQuota( objectID, parcelQuota );
- }
- }
- }
- else
- if ( containsSelection )
- {
- S32 dataCount = content["selected"].size();
- for(S32 i = 0; i < dataCount; i++)
- {
-
- F32 renderCost = 0;
- F32 physicsCost = 0;
- F32 networkCost = 0;
- F32 simulationCost = 0;
-
- LLUUID objectId;
-
- objectId = content["selected"][i]["local_id"].asUUID();
- renderCost = content["selected"][i]["rendering"].asReal();
- physicsCost = content["selected"][i]["physics"].asReal();
- networkCost = content["selected"][i]["streaming"].asReal();
- simulationCost = content["selected"][i]["simulation"].asReal();
-
- SelectionQuota selectionQuota( objectId, renderCost, physicsCost, networkCost, simulationCost );
-
- //Update the objects
- gObjectList.updateQuota( objectId, selectionQuota );
-
- }
- }
- else
- {
- //Nothing in string
- LLAccountingQuotaManager::getInstance()->removePendingObjectQuota( objectID );
- }
- }
- }
-
-private:
- //List of posted objects
- LLSD mObjectIDs;
-};
-//===============================================================================
-void LLAccountingQuotaManager::fetchQuotas( const std::string& url )
-{
- // Invoking system must have already determined capability availability
- if ( !url.empty() )
- {
- LLSD objectList;
- U32 objectIndex = 0;
- IDIt IDIter = mUpdateObjectQuota.begin();
- IDIt IDIterEnd = mUpdateObjectQuota.end();
-
- for ( ; IDIter != IDIterEnd; ++IDIter )
- {
- // Check to see if a request for this object has already been made.
- if ( mPendingObjectQuota.find( *IDIter ) == mPendingObjectQuota.end() )
- {
- mPendingObjectQuota.insert( *IDIter );
- objectList[objectIndex++] = *IDIter;
- }
- }
-
- mUpdateObjectQuota.clear();
-
- //Post results
- if ( objectList.size() > 0 )
- {
- LLSD dataToPost = LLSD::emptyMap();
- dataToPost["object_ids"] = objectList;
- LLHTTPClient::post( url, dataToPost, new LLAccountingQuotaResponder( objectList ));
- }
- }
- else
- {
- //url was empty - warn & continue
- llwarns<<"Supplied url is empty "<<llendl;
- mUpdateObjectQuota.clear();
- mPendingObjectQuota.clear();
- }
-}
-//===============================================================================
-void LLAccountingQuotaManager::updateObjectCost( const LLUUID& objectID )
-{
- mUpdateObjectQuota.insert( objectID );
-}
-//===============================================================================
-void LLAccountingQuotaManager::removePendingObjectQuota( const LLUUID& objectID )
-{
- mPendingObjectQuota.erase( objectID );
-}
-//===============================================================================
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 492cfe7c1b..54ad3cd187 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -36,10 +36,10 @@
#include "llagentwearables.h"
#include "llagentui.h"
#include "llanimationstates.h"
-#include "llbottomtray.h"
#include "llcallingcard.h"
#include "llcapabilitylistener.h"
#include "llchannelmanager.h"
+#include "llchicletbar.h"
#include "llconsole.h"
#include "llenvmanager.h"
#include "llfirstuse.h"
@@ -68,9 +68,11 @@
#include "llstatusbar.h"
#include "llteleportflags.h"
#include "lltool.h"
+#include "lltoolbarview.h"
#include "lltoolpie.h"
#include "lltoolmgr.h"
#include "lltrans.h"
+#include "lluictrl.h"
#include "llurlentry.h"
#include "llviewercontrol.h"
#include "llviewerdisplay.h"
@@ -107,7 +109,6 @@ const F64 CHAT_AGE_FAST_RATE = 3.0;
const F32 MIN_FIDGET_TIME = 8.f; // seconds
const F32 MAX_FIDGET_TIME = 20.f; // seconds
-
// The agent instance.
LLAgent gAgent;
@@ -115,6 +116,9 @@ LLAgent gAgent;
// Statics
//
+/// minimum time after setting away state before coming back based on movement
+const F32 LLAgent::MIN_AFK_TIME = 10.0f;
+
const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f;
std::map<std::string, std::string> LLAgent::sTeleportErrorMessages;
@@ -150,6 +154,68 @@ bool handleSlowMotionAnimation(const LLSD& newvalue)
return true;
}
+// static
+void LLAgent::parcelChangedCallback()
+{
+ bool can_edit = LLToolMgr::getInstance()->canEdit();
+
+ gAgent.mCanEditParcel = can_edit;
+}
+
+// static
+bool LLAgent::isActionAllowed(const LLSD& sdname)
+{
+ bool retval = false;
+
+ const std::string& param = sdname.asString();
+
+ if (param == "build")
+ {
+ retval = gAgent.canEditParcel();
+ }
+ else if (param == "speak")
+ {
+ if ( gAgent.isVoiceConnected() &&
+ LLViewerParcelMgr::getInstance()->allowAgentVoice() &&
+ ! LLVoiceClient::getInstance()->inTuningMode() )
+ {
+ retval = true;
+ }
+ else
+ {
+ retval = false;
+ }
+ }
+
+ return retval;
+}
+
+// static
+void LLAgent::pressMicrophone(const LLSD& name)
+{
+ LLFirstUse::speak(false);
+
+ LLVoiceClient::getInstance()->inputUserControlState(true);
+}
+
+// static
+void LLAgent::releaseMicrophone(const LLSD& name)
+{
+ LLVoiceClient::getInstance()->inputUserControlState(false);
+}
+
+// static
+void LLAgent::toggleMicrophone(const LLSD& name)
+{
+ LLVoiceClient::getInstance()->toggleUserPTTState();
+}
+
+// static
+bool LLAgent::isMicrophoneOn(const LLSD& sdname)
+{
+ return LLVoiceClient::getInstance()->getUserPTTState();
+}
+
// ************************************************************
// Enabled this definition to compile a 'hacked' viewer that
// locally believes the end user has godlike powers.
@@ -181,6 +247,7 @@ LLAgent::LLAgent() :
mbTeleportKeepsLookAt(false),
mAgentAccess(new LLAgentAccess(gSavedSettings)),
+ mCanEditParcel(false),
mTeleportSourceSLURL(new LLSLURL),
mTeleportState( TELEPORT_NONE ),
mRegionp(NULL),
@@ -229,6 +296,8 @@ LLAgent::LLAgent() :
mCurrentFidget(0),
mFirstLogin(FALSE),
mGenderChosen(FALSE),
+
+ mVoiceConnected(false),
mAppearanceSerialNum(0),
@@ -265,7 +334,9 @@ void LLAgent::init()
gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2));
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLAgent::handleMaturity, this, _2));
-
+
+ LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback));
+
mInitialized = TRUE;
}
@@ -1030,20 +1101,11 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
LLVector3 skyward = getReferenceUpVector();
- F32 look_down_limit;
- F32 look_up_limit = 10.f * DEG_TO_RAD;
+ const F32 look_down_limit = 179.f * DEG_TO_RAD;;
+ const F32 look_up_limit = 1.f * DEG_TO_RAD;
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
- if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
- {
- look_down_limit = 130.f * DEG_TO_RAD;
- }
- else
- {
- look_down_limit = 170.f * DEG_TO_RAD;
- }
-
// clamp pitch to limits
if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
{
@@ -1165,6 +1227,7 @@ void LLAgent::setAFK()
{
sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_START);
setControlFlags(AGENT_CONTROL_AWAY | AGENT_CONTROL_STOP);
+ LL_INFOS("AFK") << "Setting Away" << LL_ENDL;
gAwayTimer.start();
if (gAFKMenu)
{
@@ -1188,6 +1251,7 @@ void LLAgent::clearAFK()
{
sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP);
clearControlFlags(AGENT_CONTROL_AWAY);
+ LL_INFOS("AFK") << "Clearing Away" << LL_ENDL;
if (gAFKMenu)
{
gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway"));
@@ -1793,11 +1857,12 @@ void LLAgent::endAnimationUpdateUI()
// clean up UI from mode we're leaving
if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK )
{
+ gToolBarView->setToolBarsVisible(true);
// show mouse cursor
gViewerWindow->showCursor();
// show menus
gMenuBarView->setVisible(TRUE);
- LLNavigationBar::getInstance()->setVisible(TRUE);
+ LLNavigationBar::getInstance()->setVisible(TRUE && gSavedSettings.getBOOL("ShowNavbarNavigationPanel"));
gStatusBar->setVisibleForMouselook(true);
if (gSavedSettings.getBOOL("ShowMiniLocationPanel"))
@@ -1805,7 +1870,7 @@ void LLAgent::endAnimationUpdateUI()
LLPanelTopInfoBar::getInstance()->setVisible(TRUE);
}
- LLBottomTray::getInstance()->onMouselookModeOut();
+ LLChicletBar::getInstance()->setVisible(TRUE);
LLPanelStandStopFlying::getInstance()->setVisible(TRUE);
@@ -1902,14 +1967,19 @@ void LLAgent::endAnimationUpdateUI()
//---------------------------------------------------------------------
if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK)
{
- // hide menus
+ // clean up UI
+ // first show anything hidden by UI toggle
+ gViewerWindow->setUIVisibility(TRUE);
+
+ // then hide stuff we want hidden for mouselook
+ gToolBarView->setToolBarsVisible(false);
gMenuBarView->setVisible(FALSE);
LLNavigationBar::getInstance()->setVisible(FALSE);
gStatusBar->setVisibleForMouselook(false);
LLPanelTopInfoBar::getInstance()->setVisible(FALSE);
- LLBottomTray::getInstance()->onMouselookModeIn();
+ LLChicletBar::getInstance()->setVisible(FALSE);
LLPanelStandStopFlying::getInstance()->setVisible(FALSE);
@@ -3356,8 +3426,15 @@ bool LLAgent::teleportCore(bool is_local)
// hide the Region/Estate floater
LLFloaterReg::hideInstance("region_info");
- // hide the search floater (EXT-8276)
- LLFloaterReg::hideInstance("search");
+ // minimize the Search floater (STORM-1474)
+ {
+ LLFloater* instance = LLFloaterReg::getInstance("search");
+
+ if (instance && instance->getVisible())
+ {
+ instance->setMinimized(TRUE);
+ }
+ }
LLViewerParcelMgr::getInstance()->deselectLand();
LLViewerMediaFocus::getInstance()->clearFocus();
@@ -3918,14 +3995,14 @@ void LLAgent::renderAutoPilotTarget()
F32 height_meters;
LLVector3d target_global;
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
// not textured
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// lovely green
- glColor4f(0.f, 1.f, 1.f, 1.f);
+ gGL.color4f(0.f, 1.f, 1.f, 1.f);
target_global = mAutoPilotTargetGlobal;
@@ -3933,9 +4010,9 @@ void LLAgent::renderAutoPilotTarget()
height_meters = 1.f;
- glScalef(height_meters, height_meters, height_meters);
+ gGL.scalef(height_meters, height_meters, height_meters);
- gSphere.render(1500.f);
+ gSphere.render();
gGL.popMatrix();
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 67ed1923c0..740770bbdf 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -282,7 +282,23 @@ public:
static void toggleFlying();
static bool enableFlying();
BOOL canFly(); // Does this parcel allow you to fly?
-
+
+ //--------------------------------------------------------------------
+ // Voice
+ //--------------------------------------------------------------------
+public:
+ bool isVoiceConnected() const { return mVoiceConnected; }
+ void setVoiceConnected(const bool b) { mVoiceConnected = b; }
+
+ static void pressMicrophone(const LLSD& name);
+ static void releaseMicrophone(const LLSD& name);
+ static void toggleMicrophone(const LLSD& name);
+ static bool isMicrophoneOn(const LLSD& sdname);
+ static bool isActionAllowed(const LLSD& sdname);
+
+private:
+ bool mVoiceConnected;
+
//--------------------------------------------------------------------
// Chat
//--------------------------------------------------------------------
@@ -318,7 +334,8 @@ public:
void setAFK();
void clearAFK();
BOOL getAFK() const;
-
+ static const F32 MIN_AFK_TIME;
+
//--------------------------------------------------------------------
// Run
//--------------------------------------------------------------------
@@ -574,6 +591,14 @@ private:
** **
*******************************************************************************/
+ // Build
+public:
+ bool canEditParcel() const { return mCanEditParcel; }
+private:
+ bool mCanEditParcel;
+
+ static void parcelChangedCallback();
+
/********************************************************************************
** **
** ACCESS
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index c30d3b9aa3..751b73e1eb 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -393,8 +393,6 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation
LLVector3 object_extents = object->getScale();
- const LLVector4a* oe4 = object->mDrawable->getSpatialExtents();
- object_extents.set( oe4[1][0], oe4[1][1], oe4[1][2] );
// make sure they object extents are non-zero
object_extents.clamp(0.001f, F32_MAX);
@@ -2042,11 +2040,12 @@ void LLAgentCamera::resetCamera()
//-----------------------------------------------------------------------------
void LLAgentCamera::changeCameraToMouselook(BOOL animate)
{
- if (!gSavedSettings.getBOOL("EnableMouselook") || LLViewerJoystick::getInstance()->getOverrideCamera())
+ if (!gSavedSettings.getBOOL("EnableMouselook")
+ || LLViewerJoystick::getInstance()->getOverrideCamera())
{
return;
}
-
+
// visibility changes at end of animation
gViewerWindow->getWindow()->resetBusyCount();
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 36272f0c7c..13b62cb019 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -33,6 +33,7 @@
#include "llagentwearablesfetch.h"
#include "llappearancemgr.h"
#include "llcallbacklist.h"
+#include "llfloatersidepanelcontainer.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@@ -42,7 +43,6 @@
#include "llnotificationsutil.h"
#include "lloutfitobserver.h"
#include "llsidepanelappearance.h"
-#include "llsidetray.h"
#include "lltexlayer.h"
#include "lltooldraganddrop.h"
#include "llviewerregion.h"
@@ -1168,15 +1168,12 @@ private:
std::vector<LLWearable*> mWearablesAwaitingItems;
};
-void LLAgentWearables::createStandardWearables(BOOL female)
+void LLAgentWearables::createStandardWearables()
{
- llwarns << "Creating Standard " << (female ? "female" : "male")
- << " Wearables" << llendl;
+ llwarns << "Creating standard wearables" << llendl;
if (!isAgentAvatarValid()) return;
- gAgentAvatarp->setSex(female ? SEX_FEMALE : SEX_MALE);
-
const BOOL create[LLWearableType::WT_COUNT] =
{
TRUE, //LLWearableType::WT_SHAPE
@@ -1692,37 +1689,6 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty
}
}
-// static
-void LLAgentWearables::userRemoveAllClothes()
-{
- // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
- if (gAgentCamera.cameraCustomizeAvatar())
- {
- // switching to outfit editor should automagically save any currently edited wearable
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
- }
- userRemoveAllClothesStep2(TRUE);
-}
-
-// static
-void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed)
-{
- if (proceed)
- {
- gAgentWearables.removeWearable(LLWearableType::WT_SHIRT,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_PANTS,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_SHOES,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_SOCKS,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_JACKET,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_GLOVES,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_UNDERSHIRT,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_UNDERPANTS,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_SKIRT,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_ALPHA,true,0);
- gAgentWearables.removeWearable(LLWearableType::WT_TATTOO,true,0);
- }
-}
-
// Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to
// get attachments into desired state with minimal number of adds/removes.
void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array)
@@ -2046,7 +2012,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
}
const BOOL disable_camera_switch = LLWearableType::getDisableCameraSwitch(wearable->getType());
- LLPanel* panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance");
+ LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 3ef50f14da..01cae3ffd8 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -56,7 +56,7 @@ public:
LLAgentWearables();
virtual ~LLAgentWearables();
void setAvatarObject(LLVOAvatarSelf *avatar);
- void createStandardWearables(BOOL female);
+ void createStandardWearables();
void cleanup();
void dump();
@@ -165,7 +165,6 @@ private:
void removeWearableFinal(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/);
protected:
static bool onRemoveWearableDialog(const LLSD& notification, const LLSD& response);
- static void userRemoveAllClothesStep2(BOOL proceed); // userdata is NULL
//--------------------------------------------------------------------
// Server Communication
@@ -211,7 +210,6 @@ public:
public:
static void userRemoveWearable(const LLWearableType::EType &type, const U32 &index);
static void userRemoveWearablesOfType(const LLWearableType::EType &type);
- static void userRemoveAllClothes();
typedef std::vector<LLViewerObject*> llvo_vec_t;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 1388d9aee0..663257042e 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -34,6 +34,7 @@
#include "llattachmentsmgr.h"
#include "llcommandhandler.h"
#include "lleventtimer.h"
+#include "llfloatersidepanelcontainer.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@@ -43,7 +44,6 @@
#include "lloutfitslist.h"
#include "llselectmgr.h"
#include "llsidepanelappearance.h"
-#include "llsidetray.h"
#include "llviewerobjectlist.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
@@ -116,7 +116,7 @@ public:
return true;
}
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD());
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
return true;
}
};
@@ -1505,7 +1505,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
void LLAppearanceMgr::updatePanelOutfitName(const std::string& name)
{
LLSidepanelAppearance* panel_appearance =
- dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ dynamic_cast<LLSidepanelAppearance *>(LLFloaterSidePanelContainer::getPanel("appearance"));
if (panel_appearance)
{
panel_appearance->refreshCurrentOutfitName(name);
@@ -1943,7 +1943,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
if (gAgentCamera.cameraCustomizeAvatar())
{
// switching to outfit editor should automagically save any currently edited wearable
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append);
@@ -2264,6 +2264,85 @@ void LLAppearanceMgr::updateIsDirty()
}
}
+// *HACK: Must match name in Library or agent inventory
+const std::string ROOT_GESTURES_FOLDER = "Gestures";
+const std::string COMMON_GESTURES_FOLDER = "Common Gestures";
+const std::string MALE_GESTURES_FOLDER = "Male Gestures";
+const std::string FEMALE_GESTURES_FOLDER = "Female Gestures";
+const std::string SPEECH_GESTURES_FOLDER = "Speech Gestures";
+const std::string OTHER_GESTURES_FOLDER = "Other Gestures";
+
+void LLAppearanceMgr::copyLibraryGestures()
+{
+ llinfos << "Copying library gestures" << llendl;
+
+ // Copy gestures
+ LLUUID lib_gesture_cat_id =
+ gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE,false,true);
+ if (lib_gesture_cat_id.isNull())
+ {
+ llwarns << "Unable to copy gestures, source category not found" << llendl;
+ }
+ LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE);
+
+ std::vector<std::string> gesture_folders_to_copy;
+ gesture_folders_to_copy.push_back(MALE_GESTURES_FOLDER);
+ gesture_folders_to_copy.push_back(FEMALE_GESTURES_FOLDER);
+ gesture_folders_to_copy.push_back(COMMON_GESTURES_FOLDER);
+ gesture_folders_to_copy.push_back(SPEECH_GESTURES_FOLDER);
+ gesture_folders_to_copy.push_back(OTHER_GESTURES_FOLDER);
+
+ for(std::vector<std::string>::iterator it = gesture_folders_to_copy.begin();
+ it != gesture_folders_to_copy.end();
+ ++it)
+ {
+ std::string& folder_name = *it;
+
+ LLPointer<LLInventoryCallback> cb(NULL);
+
+ // After copying gestures, activate Common, Other, plus
+ // Male and/or Female, depending upon the initial outfit gender.
+ ESex gender = gAgentAvatarp->getSex();
+
+ std::string activate_male_gestures;
+ std::string activate_female_gestures;
+ switch (gender) {
+ case SEX_MALE:
+ activate_male_gestures = MALE_GESTURES_FOLDER;
+ break;
+ case SEX_FEMALE:
+ activate_female_gestures = FEMALE_GESTURES_FOLDER;
+ break;
+ case SEX_BOTH:
+ activate_male_gestures = MALE_GESTURES_FOLDER;
+ activate_female_gestures = FEMALE_GESTURES_FOLDER;
+ break;
+ }
+
+ if (folder_name == activate_male_gestures ||
+ folder_name == activate_female_gestures ||
+ folder_name == COMMON_GESTURES_FOLDER ||
+ folder_name == OTHER_GESTURES_FOLDER)
+ {
+ cb = new ActivateGestureCallback;
+ }
+
+ LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name);
+ if (cat_id.isNull())
+ {
+ llwarns << "failed to find gesture folder for " << folder_name << llendl;
+ }
+ else
+ {
+ llinfos << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << llendl;
+ callAfterCategoryFetch(cat_id,
+ boost::bind(&LLAppearanceMgr::shallowCopyCategory,
+ &LLAppearanceMgr::instance(),
+ cat_id, dst_id, cb));
+ }
+ }
+}
+
void LLAppearanceMgr::autopopulateOutfits()
{
// If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account)
@@ -2285,7 +2364,16 @@ void LLAppearanceMgr::autopopulateOutfits()
void LLAppearanceMgr::onFirstFullyVisible()
{
gAgentAvatarp->debugAvatarVisible();
- autopopulateOutfits();
+
+ // The auto-populate is failing at the point of generating outfits
+ // folders, so don't do the library copy until that is resolved.
+ // autopopulateOutfits();
+
+ // If this is the first time we've ever logged in,
+ // then copy default gestures from the library.
+ if (gAgent.isFirstLogin()) {
+ copyLibraryGestures();
+ }
}
bool LLAppearanceMgr::updateBaseOutfit()
@@ -2463,10 +2551,11 @@ public:
// add may be processed after login process is finished
if (mShowPanel)
{
- LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);
+ LLFloaterSidePanelContainer::showPanel("appearance", "panel_outfits_inventory", key);
+
}
LLOutfitsList *outfits_list =
- dynamic_cast<LLOutfitsList*>(LLSideTray::getInstance()->getPanel("outfitslist_tab"));
+ dynamic_cast<LLOutfitsList*>(LLFloaterSidePanelContainer::getPanel("appearance", "outfitslist_tab"));
if (outfits_list)
{
outfits_list->setSelectedOutfitByUUID(mFolderID);
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 4b1d95cf25..c1d561781d 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -151,6 +151,9 @@ public:
// Create initial outfits from library.
void autopopulateOutfits();
+
+ // Copy initial gestures from library.
+ void copyLibraryGestures();
void wearBaseOutfit();
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 80ac385e3b..cbaddd74c4 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -81,7 +81,6 @@
#include "llviewermenufile.h"
#include "llvoicechannel.h"
#include "llvoavatarself.h"
-#include "llsidetray.h"
#include "llurlmatch.h"
#include "lltextutil.h"
#include "lllogininstance.h"
@@ -90,6 +89,7 @@
#include "llweb.h"
#include "llsecondlifeurls.h"
#include "llupdaterservice.h"
+#include "llcallfloater.h"
// Linden library includes
#include "llavatarnamecache.h"
@@ -110,6 +110,8 @@
// Third party library includes
#include <boost/bind.hpp>
+#include <boost/foreach.hpp>
+
#if LL_WINDOWS
@@ -137,6 +139,7 @@
#include "lltoolmgr.h"
#include "llassetstorage.h"
#include "llpolymesh.h"
+#include "llproxy.h"
#include "llaudioengine.h"
#include "llstreamingaudio.h"
#include "llviewermenu.h"
@@ -246,7 +249,6 @@ extern BOOL gDebugGL;
////////////////////////////////////////////////////////////
// All from the last globals push...
-const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user flagged as Away From Keyboard
F32 gSimLastTime; // Used in LLAppViewer::init and send_stats()
F32 gSimFrames;
@@ -321,6 +323,41 @@ static std::string gLaunchFileOnQuit;
// Used on Win32 for other apps to identify our window (eg, win_setup)
const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
+//-- LLDeferredTaskList ------------------------------------------------------
+
+/**
+ * A list of deferred tasks.
+ *
+ * We sometimes need to defer execution of some code until the viewer gets idle,
+ * e.g. removing an inventory item from within notifyObservers() may not work out.
+ *
+ * Tasks added to this list will be executed in the next LLAppViewer::idle() iteration.
+ * All tasks are executed only once.
+ */
+class LLDeferredTaskList: public LLSingleton<LLDeferredTaskList>
+{
+ LOG_CLASS(LLDeferredTaskList);
+
+ friend class LLAppViewer;
+ typedef boost::signals2::signal<void()> signal_t;
+
+ void addTask(const signal_t::slot_type& cb)
+ {
+ mSignal.connect(cb);
+ }
+
+ void run()
+ {
+ if (!mSignal.empty())
+ {
+ mSignal();
+ mSignal.disconnect_all_slots();
+ }
+ }
+
+ signal_t mSignal;
+};
+
//----------------------------------------------------------------------------
// List of entries from strings.xml to always replace
@@ -394,8 +431,11 @@ static bool app_metrics_qa_mode = false;
void idle_afk_check()
{
// check idle timers
- if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getS32("AFKTimeout")))
+ F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
+ F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
+ if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
{
+ LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
gAgent.setAFK();
}
}
@@ -469,18 +509,6 @@ 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)
- {
- LLAppViewer::instance()->destroyMainloopTimeout();
- }
- 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()
@@ -494,6 +522,8 @@ static void settings_to_globals()
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
+ LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
+
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor");
LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f;
@@ -528,42 +558,6 @@ static void settings_modify()
gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline");
gAuditTexture = gSavedSettings.getBOOL("AuditTexture");
-#if LL_VECTORIZE
- if (gSysCPU.hasAltivec())
- {
- gSavedSettings.setBOOL("VectorizeEnable", TRUE );
- gSavedSettings.setU32("VectorizeProcessor", 0 );
- }
- else
- if (gSysCPU.hasSSE2())
- {
- gSavedSettings.setBOOL("VectorizeEnable", TRUE );
- gSavedSettings.setU32("VectorizeProcessor", 2 );
- }
- else
- if (gSysCPU.hasSSE())
- {
- gSavedSettings.setBOOL("VectorizeEnable", TRUE );
- gSavedSettings.setU32("VectorizeProcessor", 1 );
- }
- else
- {
- // Don't bother testing or running if CPU doesn't support it. JC
- gSavedSettings.setBOOL("VectorizePerfTest", FALSE );
- gSavedSettings.setBOOL("VectorizeEnable", FALSE );
- gSavedSettings.setU32("VectorizeProcessor", 0 );
- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
- }
-#else
- // This build target doesn't support SSE, don't test/run.
- gSavedSettings.setBOOL("VectorizePerfTest", FALSE );
- gSavedSettings.setBOOL("VectorizeEnable", FALSE );
- gSavedSettings.setU32("VectorizeProcessor", 0 );
- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
-
- // disable fullscreen mode, unsupported
- gSavedSettings.setBOOL("WindowFullScreen", FALSE);
-#endif
}
class LLFastTimerLogThread : public LLThread
@@ -612,9 +606,6 @@ bool LLAppViewer::sendURLToOtherInstance(const std::string& url)
// Static members.
// The single viewer app.
LLAppViewer* LLAppViewer::sInstance = NULL;
-
-const std::string LLAppViewer::sGlobalSettingsName = "Global";
-
LLTextureCache* LLAppViewer::sTextureCache = NULL;
LLImageDecodeThread* LLAppViewer::sImageDecodeThread = NULL;
LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
@@ -665,7 +656,7 @@ LLAppViewer::~LLAppViewer()
}
bool LLAppViewer::init()
-{
+{
//
// Start of the application
//
@@ -698,6 +689,11 @@ bool LLAppViewer::init()
LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
+ //set the max heap size.
+ initMaxHeapSize() ;
+
+ LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")) ;
+
// write Google Breakpad minidump files to our log directory
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
logdir += gDirUtilp->getDirDelimiter();
@@ -723,7 +719,7 @@ bool LLAppViewer::init()
// *NOTE:Mani - LLCurl::initClass is not thread safe.
// Called before threads are created.
- LLCurl::initClass();
+ LLCurl::initClass(gSavedSettings.getBOOL("CurlUseMultipleThreads"));
LL_INFOS("InitInfo") << "LLCurl initialized." << LL_ENDL ;
LLMachineID::init();
@@ -743,9 +739,32 @@ bool LLAppViewer::init()
LLViewerAssetStatsFF::init();
}
- initThreads();
+ initThreads();
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
+ // Initialize settings early so that the defaults for ignorable dialogs are
+ // picked up and then correctly re-saved after launching the updater (STORM-1268).
+ LLUI::settings_map_t settings_map;
+ settings_map["config"] = &gSavedSettings;
+ settings_map["ignores"] = &gWarningSettings;
+ settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
+ settings_map["account"] = &gSavedPerAccountSettings;
+
+ LLUI::initClass(settings_map,
+ LLUIImageList::getInstance(),
+ ui_audio_callback,
+ &LLUI::sGLScaleFactor);
+ LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;
+
+ // Setup paths and LLTrans after LLUI::initClass has been called.
+ LLUI::setupPaths();
+ LLTransUtil::parseStrings("strings.xml", default_trans_args);
+ LLTransUtil::parseLanguageStrings("language_settings.xml");
+
+ // Setup notifications after LLUI::setupPaths() has been called.
+ LLNotifications::instance();
+ LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
+
writeSystemInfo();
// Initialize updater service (now that we have an io pump)
@@ -772,16 +791,6 @@ bool LLAppViewer::init()
LL_INFOS("InitInfo") << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << LL_ENDL;
LL_INFOS("InitInfo") << "libcurl version is: " << LLCurl::getVersionString() << LL_ENDL;
- // Get the single value from the crash settings file, if it exists
- std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
- gCrashSettings.loadFromFile(crash_settings_filename);
- if(gSavedSettings.getBOOL("IgnoreAllNotifications"))
- {
- gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ALWAYS_SEND);
- gCrashSettings.saveToFile(crash_settings_filename, FALSE);
- }
- LL_INFOS("InitInfo") << "Crash settings done." << LL_ENDL ;
-
/////////////////////////////////////////////////
// OS-specific login dialogs
/////////////////////////////////////////////////
@@ -797,33 +806,16 @@ bool LLAppViewer::init()
{
LLError::setPrintLocation(true);
}
-
- // Widget construction depends on LLUI being initialized
- LLUI::settings_map_t settings_map;
- settings_map["config"] = &gSavedSettings;
- settings_map["ignores"] = &gWarningSettings;
- settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
- settings_map["account"] = &gSavedPerAccountSettings;
- LLUI::initClass(settings_map,
- LLUIImageList::getInstance(),
- ui_audio_callback,
- &LLUI::sGLScaleFactor);
-
- // Setup paths and LLTrans after LLUI::initClass has been called
- LLUI::setupPaths();
- LLTransUtil::parseStrings("strings.xml", default_trans_args);
- LLTransUtil::parseLanguageStrings("language_settings.xml");
-
// LLKeyboard relies on LLUI to know what some accelerator keys are called.
LLKeyboard::setStringTranslatorFunc( LLTrans::getKeyboardString );
LLWeb::initClass(); // do this after LLUI
// Provide the text fields with callbacks for opening Urls
- LLUrlAction::setOpenURLCallback(&LLWeb::loadURL);
- LLUrlAction::setOpenURLInternalCallback(&LLWeb::loadURLInternal);
- LLUrlAction::setOpenURLExternalCallback(&LLWeb::loadURLExternal);
+ LLUrlAction::setOpenURLCallback(boost::bind(&LLWeb::loadURL, _1, LLStringUtil::null, LLStringUtil::null));
+ LLUrlAction::setOpenURLInternalCallback(boost::bind(&LLWeb::loadURLInternal, _1, LLStringUtil::null, LLStringUtil::null));
+ LLUrlAction::setOpenURLExternalCallback(boost::bind(&LLWeb::loadURLExternal, _1, true, LLStringUtil::null));
LLUrlAction::setExecuteSLURLCallback(&LLURLDispatcher::dispatchFromTextEditor);
// Let code in llui access the viewer help floater
@@ -849,8 +841,6 @@ bool LLAppViewer::init()
LLAgent::parseTeleportMessages("teleport_strings.xml");
- LLViewerJointMesh::updateVectorize();
-
// load MIME type -> media impl mappings
std::string mime_types_name;
#if LL_DARWIN
@@ -1056,7 +1046,7 @@ bool LLAppViewer::init()
//EXT-7013 - On windows for some locale (Japanese) standard
//datetime formatting functions didn't support some parameters such as "weekday".
//Names for days and months localized in xml are also useful for Polish locale(STORM-107).
- std::string language = LLControlGroup::getInstance(sGlobalSettingsName)->getString("Language");
+ std::string language = gSavedSettings.getString("Language");
if(language == "ja" || language == "pl")
{
LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames"));
@@ -1071,9 +1061,59 @@ bool LLAppViewer::init()
LLAgentLanguage::init();
+ return true;
+}
+
+void LLAppViewer::initMaxHeapSize()
+{
+ //set the max heap size.
+ //here is some info regarding to the max heap size:
+ //------------------------------------------------------------------------------------------
+ // OS | setting | SL address bits | max manageable memory space | max heap size
+ // Win 32 | default | 32-bit | 2GB | < 1.7GB
+ // Win 32 | /3G | 32-bit | 3GB | < 1.7GB or 2.7GB
+ //Linux 32 | default | 32-bit | 3GB | < 2.7GB
+ //Linux 32 |HUGEMEM | 32-bit | 4GB | < 3.7GB
+ //64-bit OS |default | 32-bit | 4GB | < 3.7GB
+ //64-bit OS |default | 64-bit | N/A (> 4GB) | N/A (> 4GB)
+ //------------------------------------------------------------------------------------------
+ //currently SL is built under 32-bit setting, we set its max heap size no more than 1.6 GB.
+
+ //F32 max_heap_size_gb = llmin(1.6f, (F32)gSavedSettings.getF32("MaxHeapSize")) ;
+ F32 max_heap_size_gb = gSavedSettings.getF32("MaxHeapSize") ;
+ BOOL enable_mem_failure_prevention = (BOOL)gSavedSettings.getBOOL("MemoryFailurePreventionEnabled") ;
+
+ LLMemory::initMaxHeapSizeGB(max_heap_size_gb, enable_mem_failure_prevention) ;
+}
+
+void LLAppViewer::checkMemory()
+{
+ const static F32 MEMORY_CHECK_INTERVAL = 1.0f ; //second
+ //const static F32 MAX_QUIT_WAIT_TIME = 30.0f ; //seconds
+ //static F32 force_quit_timer = MAX_QUIT_WAIT_TIME + MEMORY_CHECK_INTERVAL ;
+ if(!gGLManager.mDebugGPU)
+ {
+ return ;
+ }
- return true;
+ if(MEMORY_CHECK_INTERVAL > mMemCheckTimer.getElapsedTimeF32())
+ {
+ return ;
+ }
+ mMemCheckTimer.reset() ;
+
+ //update the availability of memory
+ LLMemory::updateMemoryInfo() ;
+
+ bool is_low = LLMemory::isMemoryPoolLow() ;
+
+ LLPipeline::throttleNewMemoryAllocation(is_low) ;
+
+ if(is_low)
+ {
+ LLMemory::logMemoryInfo() ;
+ }
}
static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages");
@@ -1109,9 +1149,9 @@ bool LLAppViewer::mainLoop()
LLVoiceChannel::initClass();
LLVoiceClient::getInstance()->init(gServicePump);
+ LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true);
LLTimer frameTimer,idleTimer;
LLTimer debugTime;
- LLFrameTimer memCheckTimer;
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
joystick->setNeedsReset(true);
@@ -1122,7 +1162,9 @@ bool LLAppViewer::mainLoop()
// point of posting.
LLSD newFrame;
- const F32 memory_check_interval = 1.0f ; //second
+ //LLPrivateMemoryPoolTester::getInstance()->run(false) ;
+ //LLPrivateMemoryPoolTester::getInstance()->run(true) ;
+ //LLPrivateMemoryPoolTester::destroy() ;
// Handle messages
while (!LLApp::isExiting())
@@ -1133,18 +1175,8 @@ bool LLAppViewer::mainLoop()
llclearcallstacks;
//check memory availability information
- {
- if(memory_check_interval < memCheckTimer.getElapsedTimeF32())
- {
- memCheckTimer.reset() ;
-
- //update the availability of memory
- LLMemoryInfo::getAvailableMemoryKB(mAvailPhysicalMemInKB, mAvailVirtualMemInKB) ;
- }
- llcallstacks << "Available physical mem(KB): " << mAvailPhysicalMemInKB << llcallstacksendl ;
- llcallstacks << "Available virtual mem(KB): " << mAvailVirtualMemInKB << llcallstacksendl ;
- }
-
+ checkMemory() ;
+
try
{
pingMainloopTimeout("Main:MiscNativeWindowEvents");
@@ -1152,7 +1184,7 @@ bool LLAppViewer::mainLoop()
if (gViewerWindow)
{
LLFastTimer t2(FTM_MESSAGES);
- gViewerWindow->mWindow->processMiscNativeEvents();
+ gViewerWindow->getWindow()->processMiscNativeEvents();
}
pingMainloopTimeout("Main:GatherInput");
@@ -1165,7 +1197,7 @@ bool LLAppViewer::mainLoop()
llwarns << " Someone took over my signal/exception handler (post messagehandling)!" << llendl;
}
- gViewerWindow->mWindow->gatherInput();
+ gViewerWindow->getWindow()->gatherInput();
}
#if 1 && !LL_RELEASE_FOR_DOWNLOAD
@@ -1194,9 +1226,9 @@ bool LLAppViewer::mainLoop()
// Scan keyboard for movement keys. Command keys and typing
// are handled by windows callbacks. Don't do this until we're
// done initializing. JC
- if ((gHeadlessClient || gViewerWindow->mWindow->getVisible())
+ if ((gHeadlessClient || gViewerWindow->getWindow()->getVisible())
&& gViewerWindow->getActive()
- && !gViewerWindow->mWindow->getMinimized()
+ && !gViewerWindow->getWindow()->getMinimized()
&& LLStartUp::getStartupState() == STATE_STARTED
&& (gHeadlessClient || !gViewerWindow->getShowProgress())
&& !gFocusMgr.focusLocked())
@@ -1275,7 +1307,7 @@ bool LLAppViewer::mainLoop()
}
// yield cooperatively when not running as foreground window
- if ( (gViewerWindow && !gViewerWindow->mWindow->getVisible())
+ if ( (gViewerWindow && !gViewerWindow->getWindow()->getVisible())
|| !gFocusMgr.getAppHasFocus())
{
// Sleep if we're not rendering, or the window is minimized.
@@ -1308,7 +1340,7 @@ bool LLAppViewer::mainLoop()
idleTimer.reset();
bool is_slow = (frameTimer.getElapsedTimeF64() > FRAME_SLOW_THRESHOLD) ;
S32 total_work_pending = 0;
- S32 total_io_pending = 0;
+ S32 total_io_pending = 0;
while(!is_slow)//do not unpause threads if the frame rates are very low.
{
S32 work_pending = 0;
@@ -1376,15 +1408,7 @@ bool LLAppViewer::mainLoop()
}
catch(std::bad_alloc)
{
- {
- llinfos << "Availabe physical memory(KB) at the beginning of the frame: " << mAvailPhysicalMemInKB << llendl ;
- llinfos << "Availabe virtual memory(KB) at the beginning of the frame: " << mAvailVirtualMemInKB << llendl ;
-
- LLMemoryInfo::getAvailableMemoryKB(mAvailPhysicalMemInKB, mAvailVirtualMemInKB) ;
-
- llinfos << "Current availabe physical memory(KB): " << mAvailPhysicalMemInKB << llendl ;
- llinfos << "Current availabe virtual memory(KB): " << mAvailVirtualMemInKB << llendl ;
- }
+ LLMemory::logMemoryInfo(TRUE) ;
//stop memory leaking simulation
LLFloaterMemLeak* mem_leak_instance =
@@ -1709,10 +1733,6 @@ bool LLAppViewer::cleanup()
llinfos << "Saved settings" << llendflush;
}
- std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
- // save all settings, even if equals defaults
- gCrashSettings.saveToFile(crash_settings_filename, FALSE);
-
std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings"));
gWarningSettings.saveToFile(warnings_settings_filename, TRUE);
@@ -1842,7 +1862,6 @@ bool LLAppViewer::cleanup()
gSavedSettings.cleanup();
LLUIColorTable::instance().clear();
- gCrashSettings.cleanup();
LLWatchdog::getInstance()->cleanup();
@@ -1870,9 +1889,14 @@ bool LLAppViewer::cleanup()
LLWeb::loadURLExternal( gLaunchFileOnQuit, false );
llinfos << "File launched." << llendflush;
}
+ llinfos << "Cleaning up LLProxy." << llendl;
+ LLProxy::cleanupClass();
LLMainLoopRepeater::instance().stop();
+ //release all private memory pools.
+ LLPrivateMemoryPoolManager::destroyClass() ;
+
ll_close_fail_log();
MEM_TRACK_RELEASE
@@ -1910,6 +1934,8 @@ bool LLAppViewer::initThreads()
static const bool enable_threads = true;
#endif
+ LLImage::initClass();
+
LLVFSThread::initClass(enable_threads && false);
LLLFSThread::initClass(enable_threads && false);
@@ -1919,8 +1945,7 @@ bool LLAppViewer::initThreads()
LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(),
sImageDecodeThread,
enable_threads && true,
- app_metrics_qa_mode);
- LLImage::initClass();
+ app_metrics_qa_mode);
if (LLFastTimer::sLog || LLFastTimer::sMetricLog)
{
@@ -1985,44 +2010,42 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
llerrs << "Invalid settings location list" << llendl;
}
- LLControlGroup* global_settings = LLControlGroup::getInstance(sGlobalSettingsName);
- for(LLInitParam::ParamIterator<SettingsGroup>::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
{
// skip settings groups that aren't the one we requested
- if (it->name() != location_key) continue;
+ if (group.name() != location_key) continue;
- ELLPath path_index = (ELLPath)it->path_index();
+ ELLPath path_index = (ELLPath)group.path_index();
if(path_index <= LL_PATH_NONE || path_index >= LL_PATH_LAST)
{
llerrs << "Out of range path index in app_settings/settings_files.xml" << llendl;
return false;
}
- LLInitParam::ParamIterator<SettingsFile>::const_iterator file_it, end_file_it;
- for (file_it = it->files.begin(), end_file_it = it->files.end();
- file_it != end_file_it;
- ++file_it)
+ BOOST_FOREACH(const SettingsFile& file, group.files)
{
- llinfos << "Attempting to load settings for the group " << file_it->name()
+ llinfos << "Attempting to load settings for the group " << file.name()
<< " - from location " << location_key << llendl;
- LLControlGroup* settings_group = LLControlGroup::getInstance(file_it->name);
+ LLControlGroup* settings_group = LLControlGroup::getInstance(file.name);
if(!settings_group)
{
- llwarns << "No matching settings group for name " << file_it->name() << llendl;
+ llwarns << "No matching settings group for name " << file.name() << llendl;
continue;
}
std::string full_settings_path;
- if (file_it->file_name_setting.isProvided()
- && global_settings->controlExists(file_it->file_name_setting))
+ if (file.file_name_setting.isProvided()
+ && gSavedSettings.controlExists(file.file_name_setting))
{
// try to find filename stored in file_name_setting control
- full_settings_path = global_settings->getString(file_it->file_name_setting);
- if (!gDirUtilp->fileExists(full_settings_path))
+ full_settings_path = gSavedSettings.getString(file.file_name_setting);
+ if (full_settings_path.empty())
+ {
+ continue;
+ }
+ else if (!gDirUtilp->fileExists(full_settings_path))
{
// search in default path
full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, full_settings_path);
@@ -2031,16 +2054,16 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
else
{
// by default, use specified file name
- full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file_it->file_name());
+ full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file.file_name());
}
- if(settings_group->loadFromFile(full_settings_path, set_defaults, file_it->persistent))
+ if(settings_group->loadFromFile(full_settings_path, set_defaults, file.persistent))
{ // success!
llinfos << "Loaded settings file " << full_settings_path << llendl;
}
else
{ // failed to load
- if(file_it->required)
+ if(file.required)
{
llerrs << "Error: Cannot load required settings file from: " << full_settings_path << llendl;
return false;
@@ -2063,20 +2086,15 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
std::string LLAppViewer::getSettingsFilename(const std::string& location_key,
const std::string& file)
{
- for(LLInitParam::ParamIterator<SettingsGroup>::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end();
- it != end_it;
- ++it)
+ BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
{
- if (it->name() == location_key)
+ if (group.name() == location_key)
{
- LLInitParam::ParamIterator<SettingsFile>::const_iterator file_it, end_file_it;
- for (file_it = it->files.begin(), end_file_it = it->files.end();
- file_it != end_file_it;
- ++file_it)
+ BOOST_FOREACH(const SettingsFile& settings_file, group.files)
{
- if (file_it->name() == file)
+ if (settings_file.name() == file)
{
- return file_it->file_name;
+ return settings_file.file_name;
}
}
}
@@ -2168,8 +2186,6 @@ bool LLAppViewer::initConfiguration()
gSavedSettings.setS32("WatchdogEnabled", 0);
#endif
- gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _2));
-
// 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
@@ -2230,7 +2246,7 @@ bool LLAppViewer::initConfiguration()
if (gSavedSettings.getBOOL("FirstRunThisInstall"))
{
- gSavedSettings.setString("SessionSettingsFile", "settings_minimal.xml");
+ // Note that the "FirstRunThisInstall" settings is currently unused.
gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
}
@@ -2300,15 +2316,33 @@ bool LLAppViewer::initConfiguration()
{
const std::string& name = *itr;
const std::string& value = *(++itr);
- LLControlVariable* c = LLControlGroup::getInstance(sGlobalSettingsName)->getControl(name);
- if(c)
+ std::string name_part;
+ std::string group_part;
+ LLControlVariable* control = NULL;
+
+ // Name can be further split into ControlGroup.Name, with the default control group being Global
+ size_t pos = name.find('.');
+ if (pos != std::string::npos)
+ {
+ group_part = name.substr(0, pos);
+ name_part = name.substr(pos+1);
+ llinfos << "Setting " << group_part << "." << name_part << " to " << value << llendl;
+ LLControlGroup* g = LLControlGroup::getInstance(group_part);
+ if (g) control = g->getControl(name_part);
+ }
+ else
+ {
+ llinfos << "Setting Global." << name << " to " << value << llendl;
+ control = gSavedSettings.getControl(name);
+ }
+
+ if (control)
{
- c->setValue(value, false);
+ control->setValue(value, false);
}
else
{
- llwarns << "'--set' specified with unknown setting: '"
- << name << "'." << llendl;
+ llwarns << "Failed --set " << name << ": setting name unknown." << llendl;
}
}
}
@@ -2756,47 +2790,15 @@ void LLAppViewer::initUpdater()
void LLAppViewer::checkForCrash(void)
{
-
#if LL_SEND_CRASH_REPORTS
if (gLastExecEvent == LAST_EXEC_FROZE)
{
- llinfos << "Last execution froze, requesting to send crash report." << llendl;
- //
- // Pop up a freeze or crash warning dialog
- //
- S32 choice;
- if(gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) == CRASH_BEHAVIOR_ASK)
- {
- std::ostringstream msg;
- msg << LLTrans::getString("MBFrozenCrashed");
- std::string alert = LLTrans::getString("APP_NAME") + " " + LLTrans::getString("MBAlert");
- choice = OSMessageBox(msg.str(),
- alert,
- OSMB_YESNO);
- }
- else if(gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) == CRASH_BEHAVIOR_NEVER_SEND)
- {
- choice = OSBTN_NO;
- }
- else
- {
- choice = OSBTN_YES;
- }
-
- if (OSBTN_YES == choice)
- {
- llinfos << "Sending crash report." << llendl;
+ llinfos << "Last execution froze, sending a crash report." << llendl;
- bool report_freeze = true;
- handleCrashReporting(report_freeze);
- }
- else
- {
- llinfos << "Not sending crash report." << llendl;
- }
+ bool report_freeze = true;
+ handleCrashReporting(report_freeze);
}
#endif // LL_SEND_CRASH_REPORTS
-
}
//
@@ -2822,19 +2824,28 @@ bool LLAppViewer::initWindow()
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
- gViewerWindow = new LLViewerWindow(gWindowTitle,
- VIEWER_WINDOW_CLASSNAME,
- gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
- gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
- gSavedSettings.getBOOL("WindowFullScreen"), ignorePixelDepth);
+
+ LLViewerWindow::Params window_params;
+ window_params
+ .title(gWindowTitle)
+ .name(VIEWER_WINDOW_CLASSNAME)
+ .x(gSavedSettings.getS32("WindowX"))
+ .y(gSavedSettings.getS32("WindowY"))
+ .width(gSavedSettings.getU32("WindowWidth"))
+ .height(gSavedSettings.getU32("WindowHeight"))
+ .min_width(gSavedSettings.getU32("MinWindowWidth"))
+ .min_height(gSavedSettings.getU32("MinWindowHeight"))
+ .fullscreen(gSavedSettings.getBOOL("FullScreen"))
+ .ignore_pixel_depth(ignorePixelDepth);
+
+ gViewerWindow = new LLViewerWindow(window_params);
LL_INFOS("AppInit") << "gViewerwindow created." << LL_ENDL;
// Need to load feature table before cheking to start watchdog.
- const S32 NEVER_SUBMIT_REPORT = 2;
bool use_watchdog = false;
int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled");
- if(watchdog_enabled_setting == -1)
+ if (watchdog_enabled_setting == -1)
{
use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled");
}
@@ -2844,8 +2855,7 @@ bool LLAppViewer::initWindow()
use_watchdog = bool(watchdog_enabled_setting);
}
- bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT;
- if(use_watchdog && send_reports)
+ if (use_watchdog)
{
LLWatchdog::getInstance()->init(watchdog_killer_callback);
}
@@ -2855,7 +2865,7 @@ bool LLAppViewer::initWindow()
if (gSavedSettings.getBOOL("WindowMaximized"))
{
- gViewerWindow->mWindow->maximize();
+ gViewerWindow->getWindow()->maximize();
}
//
@@ -2898,7 +2908,7 @@ bool LLAppViewer::initWindow()
if (gSavedSettings.getBOOL("WindowMaximized"))
{
- gViewerWindow->mWindow->maximize();
+ gViewerWindow->getWindow()->maximize();
}
LLUI::sWindow = gViewerWindow->getWindow();
@@ -2910,7 +2920,7 @@ bool LLAppViewer::initWindow()
gViewerWindow->initBase();
// show viewer window
- //gViewerWindow->mWindow->show();
+ //gViewerWindow->getWindow()->show();
LL_INFOS("AppInit") << "Window initialization done." << LL_ENDL;
return true;
@@ -2944,12 +2954,12 @@ void LLAppViewer::cleanupSavedSettings()
// as we don't track it in callbacks
if(NULL != gViewerWindow)
{
- BOOL maximized = gViewerWindow->mWindow->getMaximized();
+ BOOL maximized = gViewerWindow->getWindow()->getMaximized();
if (!maximized)
{
LLCoordScreen window_pos;
- if (gViewerWindow->mWindow->getPosition(&window_pos))
+ if (gViewerWindow->getWindow()->getPosition(&window_pos))
{
gSavedSettings.setS32("WindowX", window_pos.mX);
gSavedSettings.setS32("WindowY", window_pos.mY);
@@ -3049,6 +3059,8 @@ void LLAppViewer::handleViewerCrash()
llinfos << "Last render pool type: " << LLPipeline::sCurRenderPoolType << llendl ;
+ LLMemory::logMemoryInfo(true) ;
+
//print out recorded call stacks if there are any.
LLError::LLCallStacks::print();
@@ -3391,8 +3403,6 @@ void LLAppViewer::requestQuit()
gFloaterView->closeAllChildren(true);
}
- LLSideTray::getInstance()->notifyChildren(LLSD().with("request","quit"));
-
send_stats();
gLogoutTimer.reset();
@@ -3411,20 +3421,6 @@ static bool finish_quit(const LLSD& notification, const LLSD& response)
}
static LLNotificationFunctorRegistration finish_quit_reg("ConfirmQuit", finish_quit);
-static bool switch_standard_skin_and_quit(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
- if (option == 0)
- {
- gSavedSettings.setString("SessionSettingsFile", "");
- LLAppViewer::instance()->requestQuit();
- }
- return false;
-}
-
-static LLNotificationFunctorRegistration standard_skin_quit_reg("SwitchToStandardSkinAndQuit", switch_standard_skin_and_quit);
-
void LLAppViewer::userQuit()
{
if (gDisconnected || gViewerWindow->getProgressView()->getVisible())
@@ -3832,6 +3828,11 @@ bool LLAppViewer::initCache()
}
}
+void LLAppViewer::addOnIdleCallback(const boost::function<void()>& cb)
+{
+ LLDeferredTaskList::instance().addTask(cb);
+}
+
void LLAppViewer::purgeCache()
{
LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL;
@@ -4015,6 +4016,8 @@ public:
static LLFastTimer::DeclareTimer FTM_AUDIO_UPDATE("Update Audio");
static LLFastTimer::DeclareTimer FTM_CLEANUP("Cleanup");
+static LLFastTimer::DeclareTimer FTM_CLEANUP_DRAWABLES("Drawables");
+static LLFastTimer::DeclareTimer FTM_CLEANUP_OBJECTS("Objects");
static LLFastTimer::DeclareTimer FTM_IDLE_CB("Idle Callbacks");
static LLFastTimer::DeclareTimer FTM_LOD_UPDATE("Update LOD");
static LLFastTimer::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist");
@@ -4070,18 +4073,6 @@ void LLAppViewer::idle()
}
}
- // debug setting to quit after N seconds of being AFK - 0 to never do this
- F32 qas_afk = gSavedSettings.getF32("QuitAfterSecondsOfAFK");
- if (qas_afk > 0.f)
- {
- // idle time is more than setting
- if ( gAwayTriggerTimer.getElapsedTimeF32() > qas_afk )
- {
- // go ahead and just quit gracefully
- LLAppViewer::instance()->requestQuit();
- }
- }
-
// Must wait until both have avatar object and mute list, so poll
// here.
request_initial_instant_messages();
@@ -4256,7 +4247,7 @@ void LLAppViewer::idle()
///////////////////////////////////////
// Agent and camera movement
//
- LLCoordGL current_mouse = gViewerWindow->getCurrentMouse();
+ LLCoordGL current_mouse = gViewerWindow->getCurrentMouse();
{
// After agent and camera moved, figure out if we need to
@@ -4291,8 +4282,14 @@ void LLAppViewer::idle()
{
LLFastTimer t(FTM_CLEANUP);
- gObjectList.cleanDeadObjects();
- LLDrawable::cleanupDeadDrawables();
+ {
+ LLFastTimer t(FTM_CLEANUP_OBJECTS);
+ gObjectList.cleanDeadObjects();
+ }
+ {
+ LLFastTimer t(FTM_CLEANUP_DRAWABLES);
+ LLDrawable::cleanupDeadDrawables();
+ }
}
//
@@ -4417,6 +4414,9 @@ void LLAppViewer::idle()
gAudiop->idle(max_audio_decode_time);
}
}
+
+ // Execute deferred tasks.
+ LLDeferredTaskList::instance().run();
// Handle shutdown process, for example,
// wait for floaters to close, send quit message,
@@ -4449,10 +4449,6 @@ void LLAppViewer::idleShutdown()
return;
}
- if (LLSideTray::getInstance()->notifyChildren(LLSD().with("request","wait_quit")))
- {
- return;
- }
@@ -4516,7 +4512,7 @@ void LLAppViewer::idleShutdown()
void LLAppViewer::sendLogoutRequest()
{
- if(!mLogoutRequestSent)
+ if(!mLogoutRequestSent && gMessageSystem)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_LogoutRequest);
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 61ee6a7cf1..71a7868191 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -164,11 +164,13 @@ public:
login_completed_signal_t mOnLoginCompleted;
boost::signals2::connection setOnLoginCompletedCallback( const login_completed_signal_t::slot_type& cb ) { return mOnLoginCompleted.connect(cb); }
+ void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
+
void purgeCache(); // Clear the local cache.
// mute/unmute the system's master audio
virtual void setMasterSystemAudioMute(bool mute);
- virtual bool getMasterSystemAudioMute();
+ virtual bool getMasterSystemAudioMute();
// Metrics policy helper statics.
static void metricsUpdateRegion(U64 region_handle);
@@ -191,11 +193,12 @@ protected:
private:
+ void initMaxHeapSize();
bool initThreads(); // Initialize viewer threads, return false on failure.
bool initConfiguration(); // Initialize settings from the command line/config file.
void initUpdater(); // Initialize the updater service.
bool initCache(); // Initialize local client cache.
-
+ void checkMemory() ;
// We have switched locations of both Mac and Windows cache, make sure
// files migrate and old cache is cleared out.
@@ -269,8 +272,7 @@ private:
std::set<struct apr_dso_handle_t*> mPlugins;
- U32 mAvailPhysicalMemInKB ;
- U32 mAvailVirtualMemInKB ;
+ LLFrameTimer mMemCheckTimer;
boost::scoped_ptr<LLUpdaterService> mUpdater;
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 714e0e6163..48d02dfeaa 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -361,46 +361,35 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
}
else
{
- 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 != cb)
- {
- // launch the actual crash logger
- const char* ask_dialog = "-dialog";
- if (CRASH_BEHAVIOR_ASK != cb)
- ask_dialog = ""; // omit '-dialog' option
- const char * cmdargv[] =
- {cmd.c_str(),
- ask_dialog,
- "-user",
- (char*)LLGridManager::getInstance()->getGridLabel().c_str(),
- "-name",
- LLAppViewer::instance()->getSecondLifeTitle().c_str(),
- NULL};
- fflush(NULL);
- pid_t pid = fork();
- if (pid == 0)
- { // child
- execv(cmd.c_str(), (char* const*) cmdargv); /* Flawfinder: ignore */
- llwarns << "execv failure when trying to start " << cmd << llendl;
- _exit(1); // avoid atexit()
+ // launch the actual crash logger
+ const char * cmdargv[] =
+ {cmd.c_str(),
+ "-user",
+ (char*)LLGridManager::getInstance()->getGridLabel().c_str(),
+ "-name",
+ LLAppViewer::instance()->getSecondLifeTitle().c_str(),
+ NULL};
+ fflush(NULL);
+ pid_t pid = fork();
+ if (pid == 0)
+ { // child
+ execv(cmd.c_str(), (char* const*) cmdargv); /* Flawfinder: ignore */
+ llwarns << "execv failure when trying to start " << cmd << llendl;
+ _exit(1); // avoid atexit()
+ }
+ else
+ {
+ if (pid > 0)
+ {
+ // DO NOT wait for child proc to die; we want
+ // the logger to outlive us while we quit to
+ // free up the screen/keyboard/etc.
+ ////int childExitStatus;
+ ////waitpid(pid, &childExitStatus, 0);
}
else
{
- if (pid > 0)
- {
- // DO NOT wait for child proc to die; we want
- // the logger to outlive us while we quit to
- // free up the screen/keyboard/etc.
- ////int childExitStatus;
- ////waitpid(pid, &childExitStatus, 0);
- }
- else
- {
- llwarns << "fork failure." << llendl;
- }
+ llwarns << "fork failure." << llendl;
}
}
// Sometimes signals don't seem to quit the viewer. Also, we may
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 445bd208ef..647ace7ee3 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -403,11 +403,9 @@ bool LLAppViewerWin32::initHardwareTest()
//
if (FALSE == gSavedSettings.getBOOL("NoHardwareProbe"))
{
- BOOL vram_only = !gSavedSettings.getBOOL("ProbeHardwareOnStartup");
-
// per DEV-11631 - disable hardware probing for everything
// but vram.
- vram_only = TRUE;
+ BOOL vram_only = TRUE;
LLSplashScreen::update(LLTrans::getString("StartupDetectingHardware"));
@@ -518,11 +516,7 @@ void LLAppViewerWin32::handleCrashReporting(bool reportFreeze)
}
else
{
- S32 cb = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING);
- if(cb != CRASH_BEHAVIOR_NEVER_SEND)
- {
- _spawnl(_P_NOWAIT, exe_path.c_str(), arg_str, NULL);
- }
+ _spawnl(_P_NOWAIT, exe_path.c_str(), arg_str, NULL);
}
}
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 5b9a449be1..65bfc990d1 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -78,6 +78,8 @@ void on_new_single_inventory_upload_complete(
const LLSD& server_response,
S32 upload_price)
{
+ bool success = false;
+
if ( upload_price > 0 )
{
// this upload costed us L$, update our balance
@@ -127,6 +129,15 @@ void on_new_single_inventory_upload_complete(
group_perms,
next_owner_perms);
+ U32 inventory_item_flags = 0;
+ if (server_response.has("inventory_flags"))
+ {
+ inventory_item_flags = (U32) server_response["inventory_flags"].asInteger();
+ if (inventory_item_flags != 0)
+ {
+ llinfos << "inventory_item_flags " << inventory_item_flags << llendl;
+ }
+ }
S32 creation_date_now = time_corrected();
LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem(
server_response["new_inventory_item"].asUUID(),
@@ -138,11 +149,12 @@ void on_new_single_inventory_upload_complete(
item_name,
item_description,
LLSaleInfo::DEFAULT,
- LLInventoryItemFlags::II_FLAGS_NONE,
+ inventory_item_flags,
creation_date_now);
gInventory.updateItem(item);
gInventory.notifyObservers();
+ success = true;
// Show the preview panel for textures and sounds to let
// user know that the image (or snapshot) arrived intact.
@@ -166,6 +178,13 @@ void on_new_single_inventory_upload_complete(
// remove the "Uploading..." message
LLUploadDialog::modalUploadFinished();
+
+ // Let the Snapshot floater know we have finished uploading a snapshot to inventory.
+ LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot");
+ if (asset_type == LLAssetType::AT_TEXTURE && floater_snapshot)
+ {
+ floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", success).with("msg", "inventory")));
+ }
}
LLAssetUploadResponder::LLAssetUploadResponder(const LLSD &post_data,
@@ -276,6 +295,11 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content)
{
// remove the "Uploading..." message
LLUploadDialog::modalUploadFinished();
+ LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot");
+ if (floater_snapshot)
+ {
+ floater_snapshot->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "inventory")));
+ }
std::string reason = content["state"];
// deal with L$ errors
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 8344b08bfb..8ca621538f 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -47,6 +47,7 @@
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llfloaterpay.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterwebcontent.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
@@ -60,7 +61,6 @@
#include "llpaneloutfitedit.h"
#include "llpanelprofile.h"
#include "llrecentpeople.h"
-#include "llsidetray.h"
#include "lltrans.h"
#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
@@ -302,6 +302,12 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids)
make_ui_sound("UISndStartIM");
}
+static const char* get_profile_floater_name(const LLUUID& avatar_id)
+{
+ // Use different floater XML for our profile to be able to save its rect.
+ return avatar_id == gAgentID ? "my_profile" : "profile";
+}
+
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
{
std::string username = av_name.mUsername;
@@ -314,9 +320,10 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
std::string url = getProfileURL(username);
// PROFILES: open in webkit window
- const bool show_chrome = false;
- static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
- LLFloaterWebContent::create(url, "", agent_id.asString(), show_chrome, profile_rect);
+ LLFloaterWebContent::Params p;
+ p.url(url).
+ id(agent_id.asString());
+ LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p);
}
// static
@@ -331,15 +338,26 @@ void LLAvatarActions::showProfile(const LLUUID& id)
//static
bool LLAvatarActions::profileVisible(const LLUUID& id)
{
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", id.asString()));
+ LLSD sd;
+ sd["id"] = id;
+ LLFloater* browser = getProfileFloater(id);
return browser && browser->isShown();
}
+//static
+LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id)
+{
+ LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*>
+ (LLFloaterReg::findInstance(get_profile_floater_name(id), LLSD().with("id", id)));
+ return browser;
+}
//static
void LLAvatarActions::hideProfile(const LLUUID& id)
{
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", id.asString()));
+ LLSD sd;
+ sd["id"] = id;
+ LLFloater* browser = getProfileFloater(id);
if (browser)
{
browser->closeFloater();
@@ -429,8 +447,7 @@ void LLAvatarActions::csr(const LLUUID& id, std::string name)
void LLAvatarActions::share(const LLUUID& id)
{
LLSD key;
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
-
+ LLFloaterSidePanelContainer::showPanel("inventory", key);
LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,id);
@@ -453,7 +470,7 @@ namespace action_give_inventory
*/
static LLInventoryPanel* get_outfit_editor_inventory_panel()
{
- LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
+ LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
if (NULL == panel_outfit_edit) return NULL;
LLInventoryPanel* inventory_panel = panel_outfit_edit->findChild<LLInventoryPanel>("folder_view");
@@ -687,13 +704,11 @@ std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
if (inventory_selected_uuids.empty())
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
- LLInventoryPanel * inbox = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
{
- inventory_selected_uuids = inbox->getRootFolder()->getSelectionList();
+ inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList();
}
-
}
return inventory_selected_uuids;
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index fbfd815f41..748b7cb3d1 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -35,7 +35,7 @@
#include <vector>
class LLInventoryPanel;
-
+class LLFloater;
/**
* Friend-related actions (add, remove, offer teleport, etc)
@@ -96,6 +96,7 @@ public:
static void showProfile(const LLUUID& id);
static void hideProfile(const LLUUID& id);
static bool profileVisible(const LLUUID& id);
+ static LLFloater* getProfileFloater(const LLUUID& id);
/**
* Show avatar on world map.
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index d0f4d19f56..42e7decec1 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -141,7 +141,6 @@ LLAvatarIconCtrl::Params::Params()
draw_tooltip("draw_tooltip", true),
default_icon_name("default_icon_name")
{
- name = "avatar_icon";
}
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
deleted file mode 100644
index 79e6c7b66b..0000000000
--- a/indra/newview/llbottomtray.cpp
+++ /dev/null
@@ -1,1988 +0,0 @@
-/**
- * @file llbottomtray.cpp
- * @brief LLBottomTray class implementation
- *
- * $LicenseInfo:firstyear=2009&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h" // must be first include
-
-#define LLBOTTOMTRAY_CPP
-#include "llbottomtray.h"
-
-// library includes
-#include "llfloaterreg.h"
-#include "llflyoutbutton.h"
-#include "lllayoutstack.h"
-#include "llnotifications.h"
-#include "llnotificationsutil.h"
-#include "lltexteditor.h"
-
-// newview includes
-#include "llagent.h"
-#include "llagentcamera.h"
-#include "llavataractions.h"
-#include "llchiclet.h"
-#include "llfloatercamera.h"
-#include "llhints.h"
-#include "llimfloater.h" // for LLIMFloater
-#include "llnearbychatbar.h"
-#include "llnearbychatbarlistener.h"
-#include "llsidetray.h"
-#include "llspeakbutton.h"
-#include "llsplitbutton.h"
-#include "llsyswellwindow.h"
-#include "lltoolmgr.h"
-#include "llviewerparcelmgr.h"
-
-#include "llviewerwindow.h"
-#include "llsdserialize.h"
-#include "llfirstuse.h"
-
-// Distance from mouse down on which drag'n'drop should be started.
-#define DRAG_START_DISTANCE 3
-
-static const std::string SORTING_DATA_FILE_NAME = "bottomtray_buttons_order.xml";
-
-LLDefaultChildRegistry::Register<LLBottomtrayButton> bottomtray_button("bottomtray_button");
-
-// LLBottomtrayButton methods
-
-// virtual
-BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask)
-{
- if (mCanDrag)
- {
- // pass hover to bottomtray
- S32 screenX, screenY;
- localPointToScreen(x, y, &screenX, &screenY);
- LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY);
-
- return TRUE;
- }
- else
- {
- return LLButton::handleHover(x, y, mask);
- }
-}
-//virtual
-BOOL LLBottomtrayButton::handleMouseUp(S32 x, S32 y, MASK mask)
-{
- if (mCanDrag)
- {
- S32 screenX, screenY;
- localPointToScreen(x, y, &screenX, &screenY);
- // pass mouse up to bottomtray
- LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY);
- }
- return LLButton::handleMouseUp(x, y, mask);
-}
-//virtual
-BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask)
-{
- if (mCanDrag)
- {
- S32 screenX, screenY;
- localPointToScreen(x, y, &screenX, &screenY);
- // pass mouse up to bottomtray
- LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY);
- }
- return LLButton::handleMouseDown(x, y, mask);
-}
-
-static void update_build_button_enable_state()
-{
- bool can_edit = LLToolMgr::getInstance()->canEdit();
-
- LLBottomTray::getInstance()->getChildView("build_btn")->setEnabled(can_edit);
-}
-
-// Build time optimization, generate extern template once in .cpp file
-template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance();
-
-namespace
-{
- const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel";
-
- S32 get_panel_min_width(LLLayoutStack* stack, LLView* panel)
- {
- S32 minimal_width = 0;
- llassert(stack);
- if ( stack && panel && panel->getVisible() )
- {
- stack->getPanelMinSize(panel->getName(), &minimal_width);
- }
- return minimal_width;
- }
-
- S32 get_panel_max_width(LLLayoutStack* stack, LLPanel* panel)
- {
- S32 max_width = 0;
- llassert(stack);
- if ( stack && panel && panel->getVisible() )
- {
- stack->getPanelMaxSize(panel->getName(), &max_width);
- }
- return max_width;
- }
-
- S32 get_curr_width(LLUICtrl* ctrl)
- {
- S32 cur_width = 0;
- if ( ctrl && ctrl->getVisible() )
- {
- cur_width = ctrl->getRect().getWidth();
- }
- return cur_width;
- }
-}
-
-class LLBottomTrayLite
- : public LLPanel
-{
-public:
- LLBottomTrayLite()
- : mNearbyChatBar(NULL),
- mChatBarContainer(NULL),
- mGesturePanel(NULL)
- {
- mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
- buildFromFile("panel_bottomtray_lite.xml");
- }
-
- BOOL postBuild()
- {
- mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar");
- mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel");
- mGesturePanel = getChild<LLPanel>("gesture_panel");
-
- // Hide "show_nearby_chat" button
- if (mNearbyChatBar)
- {
- LLLineEditor* chat_box = mNearbyChatBar->getChatBox();
- LLUICtrl* show_btn = mNearbyChatBar->getChild<LLUICtrl>("show_nearby_chat");
- S32 delta_width = show_btn->getRect().getWidth();
- show_btn->setVisible(FALSE);
- chat_box->reshape(chat_box->getRect().getWidth() + delta_width, chat_box->getRect().getHeight());
- }
- return TRUE;
- }
-
- void onFocusLost()
- {
- if (gAgentCamera.cameraMouselook())
- {
- LLBottomTray::getInstance()->setVisible(FALSE);
- }
- }
-
- LLNearbyChatBar* mNearbyChatBar;
- LLLayoutPanel* mChatBarContainer;
- LLPanel* mGesturePanel;
-};
-
-LLBottomTray::LLBottomTray(const LLSD&)
-: mChicletPanel(NULL),
- mSpeakPanel(NULL),
- mSpeakBtn(NULL),
- mNearbyChatBar(NULL),
- mChatBarContainer(NULL),
- mNearbyCharResizeHandlePanel(NULL),
- mToolbarStack(NULL),
- mMovementButton(NULL),
- mResizeState(RS_NORESIZE),
- mBottomTrayContextMenu(NULL),
- mCamButton(NULL),
- mBottomTrayLite(NULL),
- mIsInLiteMode(false),
- mDragStarted(false),
- mDraggedItem(NULL),
- mLandingTab(NULL),
- mCheckForDrag(false)
-{
- // Firstly add our self to IMSession observers, so we catch session events
- // before chiclets do that.
- LLIMMgr::getInstance()->addSessionObserver(this);
-
- mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
-
- buildFromFile("panel_bottomtray.xml");
-
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2));
-
- //this is to fix a crash that occurs because LLBottomTray is a singleton
- //and thus is deleted at the end of the viewers lifetime, but to be cleanly
- //destroyed LLBottomTray requires some subsystems that are long gone
- //LLUI::getRootView()->addChild(this);
-
- {
- mBottomTrayLite = new LLBottomTrayLite();
- mBottomTrayLite->setFollowsAll();
- mBottomTrayLite->setVisible(FALSE);
- }
-
- mImageDragIndication = LLUI::getUIImage(getString("DragIndicationImageName"));
- mDesiredNearbyChatWidth = mNearbyChatBar ? mNearbyChatBar->getRect().getWidth() : 0;
-}
-
-LLBottomTray::~LLBottomTray()
-{
- if (!LLSingleton<LLIMMgr>::destroyed())
- {
- LLIMMgr::getInstance()->removeSessionObserver(this);
- }
-
- if (mNearbyChatBar)
- {
- // store custom width of chatbar panel.
- S32 custom_width = mChatBarContainer->getRect().getWidth();
- gSavedSettings.setS32("ChatBarCustomWidth", custom_width);
- }
-
- // emulate previous floater behavior to be hidden on startup.
- // override effect of save_visibility=true.
- // this attribute is necessary to button.initial_callback=Button.SetFloaterToggle works properly:
- // i.g when floater changes its visibility - button changes its toggle state.
- getChild<LLUICtrl>("build_btn")->setControlValue(false);
- getChild<LLUICtrl>("search_btn")->setControlValue(false);
- getChild<LLUICtrl>("world_map_btn")->setControlValue(false);
-}
-
-// *TODO Vadim: why void* ?
-void* LLBottomTray::createNearbyChatBar(void* userdata)
-{
- return new LLNearbyChatBar();
-}
-
-LLNearbyChatBar* LLBottomTray::getNearbyChatBar()
-{
- return mIsInLiteMode ? mBottomTrayLite->mNearbyChatBar : mNearbyChatBar;
-}
-
-LLIMChiclet* LLBottomTray::createIMChiclet(const LLUUID& session_id)
-{
- LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(session_id);
-
- switch (im_chiclet_type)
- {
- case LLIMChiclet::TYPE_IM:
- return getChicletPanel()->createChiclet<LLIMP2PChiclet>(session_id);
- case LLIMChiclet::TYPE_GROUP:
- return getChicletPanel()->createChiclet<LLIMGroupChiclet>(session_id);
- case LLIMChiclet::TYPE_AD_HOC:
- return getChicletPanel()->createChiclet<LLAdHocChiclet>(session_id);
- case LLIMChiclet::TYPE_UNKNOWN:
- break;
- }
-
- return NULL;
-}
-
-//virtual
-void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
-{
- if (!getChicletPanel()) return;
-
- LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
- if (!session) return;
-
- // no need to spawn chiclets for participants in P2P calls called through Avaline
- if (session->isP2P() && session->isOtherParticipantAvaline()) return;
-
- if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return;
-
- LLIMChiclet* chiclet = createIMChiclet(session_id);
- if(chiclet)
- {
- chiclet->setIMSessionName(name);
- chiclet->setOtherParticipantId(other_participant_id);
-
- LLIMFloater::onIMChicletCreated(session_id);
-
- }
- else
- {
- llerrs << "Could not create chiclet" << llendl;
- }
-}
-
-//virtual
-void LLBottomTray::sessionRemoved(const LLUUID& session_id)
-{
- if(getChicletPanel())
- {
- // IM floater should be closed when session removed and associated chiclet closed
- LLIMFloater* iMfloater = LLFloaterReg::findTypedInstance<LLIMFloater>(
- "impanel", session_id);
- if (iMfloater != NULL)
- {
- iMfloater->closeFloater();
- }
-
- getChicletPanel()->removeChiclet(session_id);
- }
-}
-
-void LLBottomTray::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id)
-{
- //this is only needed in case of outgoing ad-hoc/group chat sessions
- LLChicletPanel* chiclet_panel = getChicletPanel();
- if (chiclet_panel)
- {
- //it should be ad-hoc im chiclet or group im chiclet
- LLChiclet* chiclet = chiclet_panel->findChiclet<LLChiclet>(old_session_id);
- if (chiclet) chiclet->setSessionId(new_session_id);
- }
-}
-
-S32 LLBottomTray::getTotalUnreadIMCount()
-{
- return getChicletPanel()->getTotalUnreadIMCount();
-}
-
-// virtual
-void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, bool proximal)
-{
- // Time it takes to connect to voice channel might be pretty long,
- // so don't expect user login or STATUS_VOICE_ENABLED to be followed by STATUS_JOINED.
- BOOL enable = FALSE;
-
- switch (status)
- {
- // Do not add STATUS_VOICE_ENABLED because voice chat is
- // inactive until STATUS_JOINED
- case STATUS_JOINED:
- enable = TRUE;
- break;
- default:
- enable = FALSE;
- break;
- }
-
- // We have to enable/disable right and left parts of speak button separately (EXT-4648)
- getChild<LLButton>("speak_btn")->setEnabled(enable);
-
- // skipped to avoid button blinking
- if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL)
- {
- bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
- getChild<LLButton>("speak_flyout_btn")->setEnabled(voice_status);
- gMenuBarView->getChild<LLView>("Nearby Voice")->setEnabled(voice_status);
- if (voice_status)
- {
- LLFirstUse::speak(true);
- }
- }
-}
-
-void LLBottomTray::onMouselookModeOut()
-{
- mIsInLiteMode = false;
- mBottomTrayLite->setVisible(FALSE);
- mNearbyChatBar->getChatBox()->setText(mBottomTrayLite->mNearbyChatBar->getChatBox()->getText());
- setVisible(TRUE);
-}
-
-void LLBottomTray::onMouselookModeIn()
-{
- setVisible(FALSE);
-
- // Attach the lite bottom tray
- if (getParent() && mBottomTrayLite->getParent() != getParent())
- getParent()->addChild(mBottomTrayLite);
-
- mBottomTrayLite->setShape(getLocalRect());
- mBottomTrayLite->mNearbyChatBar->getChatBox()->setText(mNearbyChatBar->getChatBox()->getText());
- mBottomTrayLite->mGesturePanel->setVisible(gSavedSettings.getBOOL("ShowGestureButton"));
-
- mIsInLiteMode = true;
-}
-
-//virtual
-// setVisible used instead of onVisibilityChange, since LLAgent calls it on entering/leaving mouselook mode.
-// If bottom tray is already visible in mouselook mode, then onVisibilityChange will not be called from setVisible(true),
-void LLBottomTray::setVisible(BOOL visible)
-{
- if (mIsInLiteMode)
- {
- mBottomTrayLite->setVisible(visible);
- }
- else
- {
- LLPanel::setVisible(visible);
- }
-}
-
-S32 LLBottomTray::notifyParent(const LLSD& info)
-{
- if(info.has("well_empty")) // implementation of EXT-3397
- {
- const std::string chiclet_name = info["well_name"];
-
- // only "im_well" or "notification_well" names are expected.
- // They are set in panel_bottomtray.xml in <chiclet_im_well> & <chiclet_notification>
- llassert("im_well" == chiclet_name || "notification_well" == chiclet_name);
-
- BOOL should_be_visible = !info["well_empty"];
- showWellButton("im_well" == chiclet_name ? RS_IM_WELL : RS_NOTIFICATION_WELL, should_be_visible);
- return 1;
- }
-
- if (info.has("action") && info["action"] == "resize")
- {
- const std::string& name = info["view_name"];
-
- // expected only resize of nearby chatbar
- if (mChatBarContainer->getName() != name) return LLPanel::notifyParent(info);
-
- const S32 new_width = info["new_width"];
-
- processChatbarCustomization(new_width);
-
- return 2;
- }
- return LLPanel::notifyParent(info);
-}
-
-void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask)
-{
- // We should show BottomTrayContextMenu in last turn
- if (mBottomTrayContextMenu && !LLMenuGL::sMenuContainer->getVisibleMenu())
- {
- //there are no other context menu (IM chiclet etc ), so we can show BottomTrayContextMenu
-
- updateContextMenu(x, y, mask);
- mBottomTrayContextMenu->buildDrawLabels();
- mBottomTrayContextMenu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(this, mBottomTrayContextMenu, x, y);
-
- }
-}
-
-void LLBottomTray::updateContextMenu(S32 x, S32 y, MASK mask)
-{
- LLUICtrl* edit_box = mNearbyChatBar->getChild<LLUICtrl>("chat_box");
-
- S32 local_x = x - mChatBarContainer->getRect().mLeft - edit_box->getRect().mLeft;
- S32 local_y = y - mChatBarContainer->getRect().mBottom - edit_box->getRect().mBottom;
-
- bool in_edit_box = edit_box->pointInView(local_x, local_y);
-
- mBottomTrayContextMenu->setItemVisible("Separator", in_edit_box);
- mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Cut", in_edit_box);
- mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Copy", in_edit_box);
- mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Paste", in_edit_box);
- mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Delete", in_edit_box);
- mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Select_All", in_edit_box);
-}
-
-void LLBottomTray::showSpeakButton(bool visible)
-{
- // Show/hide the button
- setTrayButtonVisible(RS_BUTTON_SPEAK, visible);
-
- // and adjust other panels according to the occupied/freed space.
- const S32 panel_width = mSpeakPanel->getRect().getWidth();
- if (visible)
- {
- processWidthDecreased(-panel_width);
- }
- else
- {
- processWidthIncreased(panel_width);
- }
-}
-
-void LLBottomTray::toggleMovementControls()
-{
- if (mMovementButton)
- mMovementButton->onCommit();
-}
-
-void LLBottomTray::toggleCameraControls()
-{
- if (mCamButton)
- mCamButton->onCommit();
-}
-
-BOOL LLBottomTray::postBuild()
-{
- LLHints::registerHintTarget("bottom_tray", LLView::getHandle());
- LLHints::registerHintTarget("dest_guide_btn", getChild<LLUICtrl>("destination_btn")->getHandle());
- LLHints::registerHintTarget("avatar_picker_btn", getChild<LLUICtrl>("avatar_btn")->getHandle());
-
- LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2));
- LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("NearbyChatBar.EnableMenuItem", boost::bind(&LLBottomTray::onContextMenuItemEnabled, this, _2));
-
- mBottomTrayContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_bottomtray.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- gMenuHolder->addChild(mBottomTrayContextMenu);
-
- mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar");
- LLHints::registerHintTarget("chat_bar", mNearbyChatBar->LLView::getHandle());
-
- mListener.reset(new LLNearbyChatBarListener(*mNearbyChatBar));
-
- mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel");
- mNearbyCharResizeHandlePanel = getChild<LLPanel>("chat_bar_resize_handle_panel");
-
- mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");
- mMovementButton = getChild<LLButton>("movement_btn");
- LLHints::registerHintTarget("move_btn", mMovementButton->getHandle());
- mCamButton = getChild<LLButton>("camera_btn");
- setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4));
-
- mSpeakPanel = getChild<LLPanel>("speak_panel");
- mSpeakBtn = findChild<LLSpeakButton>("talk");
- if (mSpeakBtn)
- {
- LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle());
-
- // Localization tool doesn't understand custom buttons like <talk_button>
- mSpeakBtn->setSpeakToolTip( getString("SpeakBtnToolTip") );
- mSpeakBtn->setShowToolTip( getString("VoiceControlBtnToolTip") );
- }
- else
- {
- LLTransientFloaterMgr::getInstance()->addControlView(getChild<LLButton>("speak_btn"));
- LLTransientFloaterMgr::getInstance()->addControlView(getChild<LLButton>("flyout_btn"));
- }
-
-
- // Both parts of speak button should be initially disabled because
- // it takes some time between logging in to world and connecting to voice channel.
- getChild<LLButton>("speak_btn")->setEnabled(false);
- getChild<LLButton>("speak_flyout_btn")->setEnabled(false);
- gMenuBarView->getChild<LLView>("Nearby Voice")->setEnabled(false);
-
- // Registering Chat Bar to receive Voice client status change notifications.
- LLVoiceClient::getInstance()->addObserver(this);
-
- mNearbyChatBar->getChatBox()->setContextMenu(NULL);
-
- mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
-
- initResizeStateContainers();
-
- setButtonsControlsAndListeners();
-
- initButtonsVisibility();
-
- // update wells visibility:
- showWellButton(RS_IM_WELL, !LLIMWellWindow::getInstance()->isWindowEmpty());
- showWellButton(RS_NOTIFICATION_WELL, !LLNotificationWellWindow::getInstance()->isWindowEmpty());
-
- loadButtonsOrder();
-
- LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&update_build_button_enable_state));
-
- return TRUE;
-}
-
-//Drag-n-drop
-
-void LLBottomTray::onDraggableButtonMouseDown(LLUICtrl* ctrl, S32 x, S32 y)
-{
- if (ctrl == NULL) return;
- LLView* parent_view = ctrl->getParent();
- if(parent_view != NULL)
- {
- // we actually drag'n'drop panel (not button) in code, so have to find a parent
- // of button which called this method on mouse down.
- LLPanel* parent = dynamic_cast<LLPanel*>(parent_view);
- // It may happen that we clicked not usual button, but button inside widget(speak, gesture)
- // so we'll need to get a level higher to reach layout panel as a parent.
- if(parent == NULL) parent = dynamic_cast<LLPanel*>(parent_view->getParent());
- if (parent && parent->getVisible())
- {
- mDraggedItem = parent;
- mCheckForDrag = true;
- mStartX = x;
- mStartY = y;
- }
- }
-}
-
-LLPanel* LLBottomTray::findChildPanelByLocalCoords(S32 x, S32 y)
-{
- LLPanel* ctrl = 0;
- S32 screenX, screenY;
- const child_list_t* list = mToolbarStack->getChildList();
-
- localPointToScreen(x, y, &screenX, &screenY);
-
- // look for a child panel which contains the point (screenX, screenY) in it's rectangle
- for (child_list_const_iter_t i = list->begin(); i != list->end(); ++i)
- {
- LLRect rect;
- localRectToScreen((*i)->getRect(), &rect);
-
- if (rect.pointInRect(screenX, screenY))
- {
- ctrl = dynamic_cast<LLPanel*>(*i);
- break;
- }
- }
-
- return ctrl;
-}
-
-void LLBottomTray::onDraggableButtonHover(S32 x, S32 y)
-{
- // if mouse down on draggable item was done, check whether we should start DnD
- if (mCheckForDrag)
- {
- // Start drag'n'drop if mouse cursor was dragged away frome mouse down location enough
- if(sqrt((float)((mStartX-x)*(mStartX-x)+(mStartY-y)*(mStartY-y))) > DRAG_START_DISTANCE)
- {
- mDragStarted = true;
- mCheckForDrag = false;
- }
- }
- if (mDragStarted)
- {
- // Check whether the cursor is over draggable area, find which panel it is and set is as
- // landing tab for drag'n'drop
- if(isCursorOverDraggableArea(x, y))
- {
- LLPanel* panel = findChildPanelByLocalCoords(x,y);
- if (panel && panel != mDraggedItem) mLandingTab = panel;
- gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROWDRAG);
- }
- else
- {
- gViewerWindow->getWindow()->setCursor(UI_CURSOR_NO);
- }
- }
- else
- {
- // Reset cursor in case you move your mouse from the drag handle to a button.
- getWindow()->setCursor(UI_CURSOR_ARROW);
-
- }
-}
-
-bool LLBottomTray::isCursorOverDraggableArea(S32 x, S32 y)
-{
- // Draggable area lasts from the nearby chat input resize handle
- // to the chiclet area (exlusively).
- bool result = getRect().pointInRect(x, y);
- result = result && mNearbyCharResizeHandlePanel->calcScreenRect().mRight < x;
- result = result && mChicletPanel->calcScreenRect().mRight > x;
- return result;
-}
-
-void LLBottomTray::updateButtonsOrdersAfterDnD()
-{
- // *TODO: change implementation of this method to support simplify it
- // (and according to future possible changes in the way button order is saved between sessions).
- state_object_map_t::const_iterator it = mStateProcessedObjectMap.begin();
- state_object_map_t::const_iterator it_end = mStateProcessedObjectMap.end();
- EResizeState dragged_state = RS_NORESIZE;
- EResizeState landing_state = RS_NORESIZE;
- bool landing_state_found = false;
- // Find states for dragged item and landing tab
- for (; it != it_end; ++it)
- {
- if (it->second == mDraggedItem)
- {
- dragged_state = it->first;
- }
- else if (it->second == mLandingTab)
- {
- landing_state = it->first;
- landing_state_found = true;
- }
- }
-
- if (dragged_state == RS_NORESIZE)
- {
- llwarns << "Cannot determine what button is being dragged" << llendl;
- llassert(dragged_state != RS_NORESIZE);
- return;
- }
-
- lldebugs << "Will place " << resizeStateToString(dragged_state)
- << " before " << resizeStateToString(landing_state) << llendl;
-
- // Update order of buttons according to drag'n'drop
- mButtonsOrder.erase(std::find(mButtonsOrder.begin(), mButtonsOrder.end(), dragged_state));
- if (!landing_state_found && mLandingTab == getChild<LLPanel>(PANEL_CHICLET_NAME))
- {
- mButtonsOrder.push_back(dragged_state);
- }
- else
- {
- if (!landing_state_found) landing_state = RS_BUTTON_SPEAK; // just a random fallback
- mButtonsOrder.insert(std::find(mButtonsOrder.begin(), mButtonsOrder.end(), landing_state), dragged_state);
- }
-
- // Synchronize button process order with their order
- resize_state_vec_t::const_iterator it1 = mButtonsOrder.begin();
- const resize_state_vec_t::const_iterator it_end1 = mButtonsOrder.end();
- resize_state_vec_t::iterator it2 = mButtonsProcessOrder.begin();
- for (; it1 != it_end1; ++it1)
- {
- // Skip Speak because it is not in mButtonsProcessOrder(it's the reason why mButtonsOrder was introduced).
- // If any other draggable items will be added to bottomtray later, they should also be skipped here.
- if (*it1 != RS_BUTTON_SPEAK)
- {
- *it2 = *it1;
- ++it2;
- }
- }
-
- saveButtonsOrder();
-}
-
-void LLBottomTray::saveButtonsOrder()
-{
- if (!gSavedSettings.getBOOL("AllowBottomTrayButtonReordering")) return;
-
- std::string user_dir = gDirUtilp->getLindenUserDir();
- if (user_dir.empty()) return;
-
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME);
- LLSD settings_llsd;
- int i = 0;
- const resize_state_vec_t::const_iterator it_end = mButtonsOrder.end();
- // we use numbers as keys for map which is saved in file and contains resize states as its values
- for (resize_state_vec_t::const_iterator it = mButtonsOrder.begin(); it != it_end; ++it, i++)
- {
- std::string str = llformat("%d", i);
- settings_llsd[str] = *it;
- }
- llofstream file;
- file.open(filename);
- LLSDSerialize::toPrettyXML(settings_llsd, file);
-}
-
-void LLBottomTray::loadButtonsOrder()
-{
- if (!gSavedSettings.getBOOL("AllowBottomTrayButtonReordering")) return;
-
- // load per-resident sorting information
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME);
-
- LLSD settings_llsd;
- llifstream file;
- file.open(filename);
- if (!file.is_open()) return;
-
- LLSDSerialize::fromXML(settings_llsd, file);
-
-
- mButtonsOrder.clear();
- mButtonsProcessOrder.clear();
- int i = 0;
- // getting button order from file
- for (LLSD::map_const_iterator iter = settings_llsd.beginMap();
- iter != settings_llsd.endMap(); ++iter, ++i)
- {
- std::string str = llformat("%d", i);
- EResizeState state = (EResizeState)settings_llsd[str].asInteger();
- mButtonsOrder.push_back(state);
- // RS_BUTTON_SPEAK is skipped, because it shouldn't be in mButtonsProcessOrder (it does not hide or shrink).
- if (state != RS_BUTTON_SPEAK)
- {
- mButtonsProcessOrder.push_back(state);
- }
- }
-
- // There are other panels in layout stack order of which is not saved. Also, panels order of which is saved,
- // are already in layout stack but in wrong order. The most convenient way to place them is moving them
- // to front one by one (because in this case we don't have to pass the panel before which we want to insert our
- // panel to movePanel()). So panels are moved in order from the end of mButtonsOrder vector(reverse iterator is used).
- const resize_state_vec_t::const_reverse_iterator it_end = mButtonsOrder.rend();
- // placing panels in layout stack according to button order which we loaded in previous for
- for (resize_state_vec_t::const_reverse_iterator it = mButtonsOrder.rbegin(); it != it_end; ++it, ++i)
- {
- LLPanel* panel_to_move = getButtonPanel(*it);
- mToolbarStack->movePanel(panel_to_move, NULL, true); // prepend
- }
- // Nearbychat is not stored in order settings file, but it must be the first of the panels, so moving it
- // (along with its drag handle) manually here.
- mToolbarStack->movePanel(getChild<LLLayoutPanel>("chat_bar_resize_handle_panel"), NULL, true);
- mToolbarStack->movePanel(mChatBarContainer, NULL, true);
-}
-
-void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y)
-{
- //if mouse up happened over area where drop is possible, change order of buttons
- if (mLandingTab != NULL && mDraggedItem != NULL && mDragStarted)
- {
- if(isCursorOverDraggableArea(x, y))
- {
- // change order of panels in layout stack
- mToolbarStack->movePanel(mDraggedItem, (LLPanel*)mLandingTab);
- // change order of buttons in order vectors
- updateButtonsOrdersAfterDnD();
- }
- }
- gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
- mDragStarted = false;
- mDraggedItem = NULL;
- mLandingTab = NULL;
- mCheckForDrag = false;
-}
-
-void LLBottomTray::draw()
-{
- LLPanel::draw();
- if (mLandingTab)
- {
- static S32 w = mImageDragIndication->getWidth();
- static S32 h = mImageDragIndication->getHeight();
- LLRect rect = mLandingTab->calcScreenRect();
- mImageDragIndication->draw(rect.mLeft - w/2, rect.getHeight(), w, h);
- }
- getChild<LLButton>("show_profile_btn")->setToggleState(LLAvatarActions::profileVisible(gAgent.getID()));
-
- LLPanel* panel = LLSideTray::getInstance()->getPanel("panel_people");
- if (panel && panel->isInVisibleChain())
- {
- getChild<LLButton>("show_people_button")->setToggleState(true);
- }
- else
- {
- getChild<LLButton>("show_people_button")->setToggleState(false);
- }
-
- LLFloater* help_browser = (LLFloaterReg::findInstance("help_browser"));
- bool help_floater_visible = (help_browser && help_browser->isInVisibleChain());
-
- getChild<LLButton>("show_help_btn")->setToggleState(help_floater_visible);
-
- bool openmic = LLVoiceClient::getInstance()->getUserPTTState();
- bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled();
- getChild<LLButton>("speak_btn")->setToggleState(openmic && voiceenabled);
- getChild<LLOutputMonitorCtrl>("chat_zone_indicator")->setIsMuted(!voiceenabled);
-
-}
-
-bool LLBottomTray::onContextMenuItemEnabled(const LLSD& userdata)
-{
- std::string item = userdata.asString();
- LLLineEditor* edit_box = mNearbyChatBar->findChild<LLLineEditor>("chat_box");
-
- if (item == "can_cut")
- {
- return edit_box->canCut();
- }
- else if (item == "can_copy")
- {
- return edit_box->canCopy();
- }
- else if (item == "can_paste")
- {
- return edit_box->canPaste();
- }
- else if (item == "can_delete")
- {
- return edit_box->canDoDelete();
- }
- else if (item == "can_select_all")
- {
- return edit_box->canSelectAll() && (edit_box->getLength()>0);
- }
- return true;
-}
-
-
-void LLBottomTray::onContextMenuItemClicked(const LLSD& userdata)
-{
- std::string item = userdata.asString();
- LLLineEditor* edit_box = mNearbyChatBar->findChild<LLLineEditor>("chat_box");
-
- if (item == "cut")
- {
- edit_box->cut();
- }
- else if (item == "copy")
- {
- edit_box->copy();
- }
- else if (item == "paste")
- {
- edit_box->paste();
- edit_box->setFocus(TRUE);
- }
- else if (item == "delete")
- {
- edit_box->doDelete();
- }
- else if (item == "select_all")
- {
- edit_box->selectAll();
- }
-}
-
-void LLBottomTray::log(LLView* panel, const std::string& descr)
-{
- if (NULL == panel) return;
- LLView* layout = panel->getParent();
- LL_DEBUGS("Bottom Tray Rects") << descr << ": "
- << "panel: " << panel->getName()
- << ", rect: " << panel->getRect()
-
-
- << " layout: " << layout->getName()
- << ", rect: " << layout->getRect()
- << LL_ENDL;
-}
-
-void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- static S32 debug_calling_number = 0;
- lldebugs << "**************************************** " << ++debug_calling_number << llendl;
-
- S32 current_width = getRect().getWidth();
- S32 delta_width = width - current_width;
- lldebugs << "Reshaping: "
- << ", width: " << width
- << ", cur width: " << current_width
- << ", delta_width: " << delta_width
- << ", called_from_parent: " << called_from_parent
- << llendl;
-
- if (mNearbyChatBar) log(mNearbyChatBar, "before");
- if (mChicletPanel) log(mChicletPanel, "before");
-
- // Difference between bottom tray width required to fit its children and the actual width. (see EXT-991)
- // Positive value means that bottom tray is not wide enough.
- // Negative value means that there is free space.
- static S32 extra_shrink_width = 0;
- bool should_be_reshaped = true;
-
- if (mChicletPanel && mToolbarStack && mNearbyChatBar)
- {
- // Firstly, update layout stack to ensure we deal with correct panel sizes.
- {
- BOOL saved_anim = mToolbarStack->getAnimate();
- // Set chiclet panel to be autoresized by default.
- mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE);
- // Disable animation to prevent layout updating in several frames.
- mToolbarStack->setAnimate(FALSE);
- // Force the updating of layout to reset panels collapse factor.
- mToolbarStack->updateLayout();
- // Restore animate state.
- mToolbarStack->setAnimate(saved_anim);
- }
-
- // bottom tray is narrowed
- if (delta_width < 0)
- {
- if (extra_shrink_width > 0) // not enough space
- {
- extra_shrink_width += llabs(delta_width);
- should_be_reshaped = false;
- }
- else
- {
- extra_shrink_width = processWidthDecreased(delta_width);
-
- // increase new width to extra_shrink_width value to not reshape less than bottom tray minimum
- width += extra_shrink_width;
- }
- }
- // bottom tray is widened
- else
- {
- if (extra_shrink_width > delta_width)
- {
- // Still not enough space.
- // Only subtract the delta from the required delta and don't reshape.
- extra_shrink_width -= delta_width;
- should_be_reshaped = false;
- }
- else
- {
- if (extra_shrink_width > 0)
- {
- // If we have some extra shrink width let's reduce delta_width & width
- delta_width -= extra_shrink_width;
- width -= extra_shrink_width;
- extra_shrink_width = 0;
- }
- processWidthIncreased(delta_width);
- }
- }
- }
-
- if (should_be_reshaped)
- {
- lldebugs << "Reshape all children with width: " << width << llendl;
- LLPanel::reshape(width, height, called_from_parent);
- }
-
- if (mNearbyChatBar) log(mNearbyChatBar, "after");
- if (mChicletPanel) log(mChicletPanel, "after");
-
-
- // Restore width of the chatbar on first reshape.
- // we can not to do this from postBuild because reshape is called from parent view on startup
- // creation after it and reset width according to resize logic.
- static bool needs_restore_custom_state = true;
- if (mChatBarContainer && needs_restore_custom_state)
- {
- // restore custom width of chatbar panel.
- S32 new_width = gSavedSettings.getS32("ChatBarCustomWidth");
- if (new_width > 0)
- {
- mDesiredNearbyChatWidth = new_width;
- processChatbarCustomization(new_width);
- lldebugs << "Setting nearby chat bar width to " << new_width << " px" << llendl;
- mChatBarContainer->reshape(new_width, mChatBarContainer->getRect().getHeight());
- }
- needs_restore_custom_state = false;
- }
-
-}
-
-S32 LLBottomTray::processWidthDecreased(S32 delta_width)
-{
- bool still_should_be_processed = true;
-
- const S32 chiclet_panel_shrink_headroom = getChicletPanelShrinkHeadroom();
-
- // There are four steps of processing width decrease. If in one of them required width was reached,
- // further are not needed.
- // 1. Decreasing width of chiclet panel.
- if (chiclet_panel_shrink_headroom > 0)
- {
- // we have some space to decrease chiclet panel
- S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headroom);
-
- lldebugs << "delta_width: " << delta_width
- << ", panel_delta_min: " << chiclet_panel_shrink_headroom
- << ", shrink_by: " << shrink_by
- << llendl;
-
- // is chiclet panel wide enough to process resizing?
- delta_width += chiclet_panel_shrink_headroom;
-
- still_should_be_processed = delta_width < 0;
-
- lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl;
- mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight());
- log(mChicletPanel, "after processing panel decreasing via chiclet panel");
-
- lldebugs << "RS_CHICLET_PANEL"
- << ", delta_width: " << delta_width
- << llendl;
- }
-
- S32 buttons_freed_width = 0;
- // 2. Decreasing width of buttons.
- if (still_should_be_processed)
- {
- processShrinkButtons(delta_width, buttons_freed_width);
- }
- // 3. Decreasing width of nearby chat.
- const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mChatBarContainer);
- const S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth();
- if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width)
- {
- // we have some space to decrease chatbar panel
- S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width;
-
- S32 delta_panel = llmin(-delta_width, panel_delta_min);
-
- // is chatbar panel wide enough to process resizing?
- delta_width += panel_delta_min;
-
- still_should_be_processed = delta_width < 0;
-
- // chatbar should only be shrunk here, not stretched
- if(delta_panel > 0)
- {
- lldebugs << "Shrinking nearby chat bar by " << delta_panel << " px " << llendl;
- mChatBarContainer->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mChatBarContainer->getRect().getHeight());
- }
-
- log(mNearbyChatBar, "after processing panel decreasing via nearby chatbar panel");
-
- lldebugs << "RS_CHATBAR_INPUT"
- << ", delta_panel: " << delta_panel
- << ", delta_width: " << delta_width
- << llendl;
- }
-
- S32 extra_shrink_width = 0;
- // 4. Hiding buttons if needed.
- if (still_should_be_processed)
- {
- processHideButtons(delta_width, buttons_freed_width);
-
- if (delta_width < 0)
- {
- extra_shrink_width = -delta_width;
- llwarns << "There is no enough width to reshape all children: "
- << extra_shrink_width << llendl;
- }
-
- if (buttons_freed_width > 0)
- {
- S32 nearby_needed_width = mDesiredNearbyChatWidth - mNearbyChatBar->getRect().getWidth();
- if (nearby_needed_width > 0)
- {
- S32 compensative_width = nearby_needed_width > buttons_freed_width ? buttons_freed_width : nearby_needed_width;
- log(mNearbyChatBar, "before applying compensative width");
- lldebugs << "Extending nearby chat bar by " << compensative_width << " px" << llendl;
- mChatBarContainer->reshape(mChatBarContainer->getRect().getWidth() + compensative_width, mChatBarContainer->getRect().getHeight() );
- log(mNearbyChatBar, "after applying compensative width");
- lldebugs << buttons_freed_width << llendl;
- }
- }
- }
-
- return extra_shrink_width;
-}
-
-void LLBottomTray::processWidthIncreased(S32 delta_width)
-{
- if (delta_width <= 0) return;
-
- // how much room we have to show hidden buttons
- S32 available_width = delta_width + getChicletPanelShrinkHeadroom();
-
- lldebugs << "Distributing (" << getChicletPanelShrinkHeadroom()
- << " + " << delta_width << ") = " << available_width << " px" << llendl;
-
- // 1. Try showing buttons that have been auto-hidden.
- S32 processed_width = processShowButtons(available_width);
- lldebugs << "processed_width = " << processed_width << ", delta_width = " << delta_width << llendl;
-
- lldebugs << "Available_width after showing buttons: " << available_width << llendl;
-
- // If the newly shown buttons have consumed more than delta_width pixels,
- // shrink the chiclet panel.
- if (processed_width > delta_width)
- {
- // 1. use delta width of resizing
- S32 shrink_by = processed_width - delta_width;
-
- // 2. use width available via decreasing of chiclet panel
- if (shrink_by > 0)
- {
- lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl;
- mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight());
- log(mChicletPanel, "after applying compensative width for chiclets: ");
- lldebugs << shrink_by << llendl;
- }
-
- // shown buttons take some space, rest should be processed by nearby chatbar & chiclet panels
- delta_width -= processed_width;
- }
-
- // 2. Expand the nearby chat bar if needed.
- S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth();
- lldebugs << "delta_width = " << delta_width
- << ", chatbar_panel_width = " << chatbar_panel_width
- << ", mDesiredNearbyChatWidth = " << mDesiredNearbyChatWidth << llendl;
- if (delta_width > 0 && chatbar_panel_width < mDesiredNearbyChatWidth)
- {
- S32 delta_panel_max = mDesiredNearbyChatWidth - chatbar_panel_width;
- S32 delta_panel = llmin(delta_width, delta_panel_max);
- lldebugs << "Unprocesed delta width: " << delta_width
- << ", can be applied to chatbar: " << delta_panel_max
- << ", will be applied: " << delta_panel
- << llendl;
-
- delta_width -= delta_panel_max;
- lldebugs << "Extending nearby chat bar by " << delta_panel << " px " << llendl;
- mChatBarContainer->reshape(chatbar_panel_width + delta_panel, mChatBarContainer->getRect().getHeight());
- log(mNearbyChatBar, "applied unprocessed delta width");
- }
-
- // 3. Expand buttons that have been auto-shrunk,
- // if we haven't yet consumed all the available headroom.
- if (delta_width > 0)
- {
- S32 available_width = delta_width + getChicletPanelShrinkHeadroom();
- processExtendButtons(available_width);
- }
-}
-
-S32 LLBottomTray::processShowButtons(S32& available_width)
-{
- lldebugs << "Distributing " << available_width << " px" << llendl;
- S32 original_available_width = available_width;
-
- // process buttons from left to right
- resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin();
- const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end();
-
- for (; it != it_end; ++it)
- {
- // is there available space?
- if (available_width <= 0) break;
-
- // try to show next button
- processShowButton(*it, available_width);
- }
-
- return original_available_width - available_width;
-}
-
-bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width)
-{
- // Check if the button was previously auto-hidden (due to lack of space).
- if (!isAutoHidden(shown_object_type))
- {
- return false;
- }
-
- // Ok. Try showing the button.
- return showButton(shown_object_type, available_width);
-}
-
-void LLBottomTray::processHideButtons(S32& required_width, S32& buttons_freed_width)
-{
- // process buttons from right to left
- resize_state_vec_t::const_reverse_iterator it = mButtonsProcessOrder.rbegin();
- const resize_state_vec_t::const_reverse_iterator it_end = mButtonsProcessOrder.rend();
-
- for (; it != it_end; ++it)
- {
- // is it still necessary to hide a button?
- if (required_width >= 0) break;
-
- // try to hide next button
- processHideButton(*it, required_width, buttons_freed_width);
- }
-}
-
-void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& required_width, S32& buttons_freed_width)
-{
- lldebugs << "Trying to hide object type: " << processed_object_type << llendl;
- LLPanel* panel = getButtonPanel(processed_object_type);
- if (NULL == panel)
- {
- return;
- }
-
- if (panel->getVisible())
- {
- required_width += panel->getRect().getWidth();
-
- if (required_width > 0)
- {
- buttons_freed_width += required_width;
- }
-
- setTrayButtonVisible(processed_object_type, false);
-
- setAutoHidden(processed_object_type, true);
-
- lldebugs << "processing object type: " << processed_object_type
- << ", buttons_freed_width: " << buttons_freed_width
- << llendl;
- }
-}
-
-void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_width)
-{
- // process buttons from right to left
- resize_state_vec_t::const_reverse_iterator it = mButtonsProcessOrder.rbegin();
- const resize_state_vec_t::const_reverse_iterator it_end = mButtonsProcessOrder.rend();
-
- // iterate through buttons in the mButtonsProcessOrder first
- for (; it != it_end; ++it)
- {
- // is it still necessary to hide a button?
- if (required_width >= 0) break;
-
- // try to shrink next button
- processShrinkButton(*it, required_width);
- }
-
- // then shrink Speak button
- if (required_width < 0)
- {
- S32 panel_min_width = 0;
- std::string panel_name = mSpeakPanel->getName();
- bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width);
- if (!success)
- {
- lldebugs << "Panel was not found to get its min width: " << panel_name << llendl;
- }
- else
- {
- S32 panel_width = mSpeakPanel->getRect().getWidth();
- S32 possible_shrink_width = panel_width - panel_min_width;
-
- if (possible_shrink_width > 0)
- {
- if (mSpeakBtn)
- {
- mSpeakBtn->setLabelVisible(false);
- }
-
- mSpeakPanel->reshape(panel_width - possible_shrink_width, mSpeakPanel->getRect().getHeight());
-
- required_width += possible_shrink_width;
-
- if (required_width > 0)
- {
- buttons_freed_width += required_width;
- }
-
- lldebugs << "Shrunk Speak button panel: " << panel_name
- << ", shrunk width: " << possible_shrink_width
- << ", rest width to process: " << required_width
- << llendl;
- }
- }
- }
-}
-
-void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& required_width)
-{
- LLPanel* panel = getButtonPanel(processed_object_type);
- if (NULL == panel)
- {
- return;
- }
-
- if (panel->getVisible())
- {
- S32 panel_width = panel->getRect().getWidth();
- S32 panel_min_width = 0;
- std::string panel_name = panel->getName();
- bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width);
- S32 possible_shrink_width = panel_width - panel_min_width;
-
- if (!success)
- {
- lldebugs << "Panel was not found to get its min width: " << panel_name << llendl;
- }
- // we have some space to free by shrinking the button
- else if (possible_shrink_width > 0)
- {
- // let calculate real width to shrink
-
- // 1. apply all possible width
- required_width += possible_shrink_width;
-
- // 2. it it is too much...
- if (required_width > 0)
- {
- // reduce applied shrunk width to the excessive value.
- possible_shrink_width -= required_width;
- required_width = 0;
- }
- panel->reshape(panel_width - possible_shrink_width, panel->getRect().getHeight());
-
- lldebugs << "Shrunk panel: " << panel_name
- << ", shrunk width: " << possible_shrink_width
- << ", rest width to process: " << required_width
- << llendl;
- }
- }
-}
-
-
-void LLBottomTray::processExtendButtons(S32& available_width)
-{
- // do not allow extending any buttons if we have some buttons hidden via resize
- if (isAutoHidden(RS_BUTTONS_CAN_BE_HIDDEN)) return;
-
- lldebugs << "Distributing " << available_width << " px" << llendl;
-
- // First try extending the Speak button.
- if (available_width > 0)
- {
- if (!processExtendSpeakButton(available_width))
- {
- // The Speak button needs extension but lacks some space.
- // Don't extend other buttons in this case: the Speak button
- // should consume the available headroom first.
- return;
- }
- }
-
- // Then process the other buttons from left to right.
- if (available_width > 0)
- {
- resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin();
- const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end();
-
- // iterate through buttons in the mButtonsProcessOrder first
- for (; it != it_end; ++it)
- {
- // is there available space?
- if (available_width <= 0) break;
-
- // try to extend next button
- processExtendButton(*it, available_width);
- }
- }
-}
-
-bool LLBottomTray::processExtendSpeakButton(S32& available_width)
-{
- if (available_width <= 0)
- {
- llassert(available_width > 0);
- return true;
- }
-
- const S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK];
- const S32 panel_width = mSpeakPanel->getRect().getWidth();
- const S32 required_headroom = panel_max_width - panel_width;
-
- if (panel_width < panel_max_width) // if the button isn't extended already
- {
- if (available_width < required_headroom) // not enough space
- {
- lldebugs << "Need (" << required_headroom << " - " << available_width << ") = "
- << (required_headroom - available_width) << " more px"
- << " to extend the Speak button"<< llendl;
-
- return false; // Don't extend other buttons until we extend Speak.
- }
-
- // Reshape the Speak button to its maximum width.
- if (mSpeakBtn) mSpeakBtn->setLabelVisible(true);
- mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight());
-
- available_width -= required_headroom;
- llassert(available_width >= 0);
-
- lldebugs << "Extending Speak button panel: " << mSpeakPanel->getName()
- << ", extended width: " << required_headroom
- << ", rest width to process: " << available_width
- << llendl;
- }
-
- return true;
-}
-
-void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width)
-{
- llassert(available_width >= 0);
-
- LLPanel* panel = getButtonPanel(processed_object_type);
- if (NULL == panel)
- {
- return;
- }
-
- if (!panel->getVisible()) return;
-
- // Widen the button up to its maximum width, but by not more than <available_width> px.
- S32 panel_max_width = mObjectDefaultWidthMap[processed_object_type];
- S32 panel_width = panel->getRect().getWidth();
- S32 required_headroom = panel_max_width - panel_width;
-
- S32 extend_by = llmin(available_width, required_headroom);
- if (extend_by > 0)
- {
- panel->reshape(panel_width + extend_by, panel->getRect().getHeight());
-
- // Decrease amount of headroom available for other panels.
- available_width -= extend_by;
-
- lldebugs << "Extending " << panel->getName()
- << " by " << extend_by
- << " px; remaining available width: " << available_width
- << llendl;
- }
-}
-
-bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const
-{
- // Check that all buttons (that can be hidden on resize)
- // to the left of the given one are already shown.
-
- // process buttons in direct order (from left to right)
- resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin();
- const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end();
-
- MASK buttons_before_mask = RS_NORESIZE;
- for (; it != it_end; ++it)
- {
- const EResizeState button_type = *it;
- if (button_type == processed_object_type) break;
-
- buttons_before_mask |= button_type;
- }
-
- return !isAutoHidden(buttons_before_mask);
-}
-
-void LLBottomTray::initResizeStateContainers()
-{
- // init map with objects should be processed for each type
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild<LLPanel>("speak_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLPanel>("gesture_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_DESTINATIONS, getChild<LLPanel>("destinations_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_AVATARS, getChild<LLPanel>("avatar_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild<LLPanel>("build_btn_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild<LLPanel>("mini_map_btn_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_1, getChild<LLPanel>("splitter_panel_1")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PEOPLE, getChild<LLPanel>("people_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PROFILE, getChild<LLPanel>("profile_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_2, getChild<LLPanel>("splitter_panel_2")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_HOWTO, getChild<LLPanel>("howto_panel")));
-
- // init an order of processed buttons
- mButtonsProcessOrder.push_back(RS_BUTTON_DESTINATIONS);
- mButtonsProcessOrder.push_back(RS_BUTTON_AVATARS);
- mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT);
- mButtonsProcessOrder.push_back(RS_BUTTON_BUILD);
- mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH);
- mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP);
- mButtonsProcessOrder.push_back(RS_BUTTON_MINI_MAP);
- mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_1);
- mButtonsProcessOrder.push_back(RS_BUTTON_PEOPLE);
- mButtonsProcessOrder.push_back(RS_BUTTON_PROFILE);
- mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_2);
- mButtonsProcessOrder.push_back(RS_BUTTON_HOWTO);
- mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT);
- mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA);
- mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES);
-
- mButtonsOrder.push_back(RS_BUTTON_SPEAK);
- mButtonsOrder.insert(mButtonsOrder.end(), mButtonsProcessOrder.begin(), mButtonsProcessOrder.end());
-
- // init default widths
-
- // process buttons that can be hidden on resize...
- resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin();
- const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end();
-
- for (; it != it_end; ++it)
- {
- const EResizeState button_type = *it;
- // is there an appropriate object?
- LLPanel* button_panel = getButtonPanel(button_type);
- if (!button_panel) continue;
-
- // set default width for it.
- mObjectDefaultWidthMap[button_type] = button_panel->getRect().getWidth();
- }
-
- // ... and add Speak button because it also can be shrunk.
- mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth();
-}
-
-// this method must be called before restoring of the chat entry field on startup
-// because it resets chatbar's width according to resize logic.
-void LLBottomTray::initButtonsVisibility()
-{
- setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat") || !mSpeakBtn );
- setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton"));
- setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton"));
- setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton"));
- setVisibleAndFitWidths(RS_BUTTON_SNAPSHOT, gSavedSettings.getBOOL("ShowSnapshotButton"));
- setVisibleAndFitWidths(RS_BUTTON_BUILD, gSavedSettings.getBOOL("ShowBuildButton"));
- setVisibleAndFitWidths(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton"));
- setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton"));
- setVisibleAndFitWidths(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton"));
- lldebugs << "mResizeState = " << resizeStateMaskToString(mResizeState) << llendl;
-}
-
-void LLBottomTray::setButtonsControlsAndListeners()
-{
- // always show the speak panel if using the basic skin
- if (mSpeakBtn)
- {
- gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2));
- }
-
- gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2));
- gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2));
- gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2));
- gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SNAPSHOT, _2));
- gSavedSettings.getControl("ShowBuildButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_BUILD, _2));
- gSavedSettings.getControl("ShowSearchButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SEARCH, _2));
- gSavedSettings.getControl("ShowWorldMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_WORLD_MAP, _2));
- gSavedSettings.getControl("ShowMiniMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MINI_MAP, _2));
-
-
- LLButton* build_btn = getChild<LLButton>("build_btn");
- // set control name for Build button. It is not enough to link it with Button.SetFloaterToggle in xml
- std::string vis_control_name = LLFloaterReg::declareVisibilityControl("build");
- // Set the button control value (toggle state) to the floater visibility control (Sets the value as well)
- build_btn->setControlVariable(LLFloater::getControlGroup()->getControl(vis_control_name));
-}
-
-bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, const LLSD& new_visibility)
-{
- if (LLBottomTray::instanceExists())
- {
- LLBottomTray::getInstance()->setTrayButtonVisibleIfPossible(button_type, new_visibility.asBoolean());
- }
- return true;
-}
-
-bool LLBottomTray::showButton(EResizeState button_type, S32& available_width)
-{
- LLPanel* panel = getButtonPanel(button_type);
- if (NULL == panel)
- {
- return false;
- }
-
- if (panel->getVisible())
- {
- return false;
- }
-
- // Check if none of the buttons to the left of the given one was auto-hidden.
- // (we auto-show the buttons left to right).
- if (!canButtonBeShown(button_type))
- {
- return false;
- }
-
- // Make sure we have enough room to show this button.
- const S32 required_width = panel->getRect().getWidth();
- if (available_width < required_width)
- {
- lldebugs << "Need " << (required_width - available_width) << " more px to show " << resizeStateToString(button_type) << llendl;
- return false;
- }
-
- // All good. Show the button.
- setTrayButtonVisible(button_type, true);
-
- // Let the caller know that there is now less available space.
- available_width -= required_width;
-
- lldebugs << "Showing button " << resizeStateToString(button_type)
- << ", remaining available width: " << available_width
- << llendl;
- setAutoHidden(button_type, false);
-
- return true;
-}
-
-void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible)
-{
- LLPanel* panel = getButtonPanel(shown_object_type);
- if (NULL == panel)
- {
- return;
- }
-
- panel->setVisible(visible);
-}
-
-void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification)
-{
- if (!setVisibleAndFitWidths(shown_object_type, visible) && visible && raise_notification)
- {
- LLNotificationsUtil::add("BottomTrayButtonCanNotBeShown",
- LLSD(),
- LLSD(),
- LLNotificationFunctorRegistry::instance().DONOTHING);
- }
-}
-
-bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible)
-{
- // The Speak button is treated specially: if voice is enabled,
- // the button should be displayed no matter how much space we've got.
- if (object_type == RS_BUTTON_SPEAK)
- {
- showSpeakButton(visible);
- return true;
- }
-
- LLPanel* cur_panel = getButtonPanel(object_type);
- if (NULL == cur_panel)
- {
- return false;
- }
-
- bool is_set = true;
-
- if (visible)
- {
- // Assume that only chiclet panel can be auto-resized
- const S32 available_width = getChicletPanelShrinkHeadroom();
-
- S32 preferred_width = mObjectDefaultWidthMap[object_type];
- S32 current_width = cur_panel->getRect().getWidth();
- S32 result_width = 0;
- bool decrease_width = false;
-
- if (preferred_width > 0 && available_width >= preferred_width)
- {
- result_width = preferred_width;
- }
- else if (available_width >= current_width)
- {
- result_width = current_width;
- }
- else
- {
- // Calculate the possible shrunk width as difference between current and minimal widths
- const S32 chatbar_shrunk_width =
- mChatBarContainer->getRect().getWidth() - get_panel_min_width(mToolbarStack, mChatBarContainer);
-
- S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel);
- S32 sum_of_curr_widths = get_curr_width(mSpeakPanel);
-
- resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin();
- const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end();
-
- for (; it != it_end; ++it)
- {
- LLPanel* cur_panel = getButtonPanel(*it);
- sum_of_min_widths += get_panel_min_width(mToolbarStack, cur_panel);
- sum_of_curr_widths += get_curr_width(cur_panel);
- }
-
- const S32 possible_shrunk_width =
- chatbar_shrunk_width + (sum_of_curr_widths - sum_of_min_widths);
-
- // Minimal width of current panel
- S32 minimal_width = 0;
- mToolbarStack->getPanelMinSize(cur_panel->getName(), &minimal_width);
-
- if ( (available_width + possible_shrunk_width) >= minimal_width)
- {
- // There is enough space for minimal width, but set the result_width
- // to preferred_width so buttons widths decreasing will be done in predefined order
- result_width = (preferred_width > 0) ? preferred_width : current_width;
- decrease_width = true;
- }
- else
- {
- lldebugs << "Need " << (minimal_width - available_width - possible_shrunk_width)
- << " more px to show " << resizeStateToString(object_type) << llendl;
-
- // Make the button uppear when we have more available space.
- setAutoHidden(object_type, true);
- return false;
- }
- }
-
- if (result_width != current_width)
- {
- cur_panel->reshape(result_width, cur_panel->getRect().getHeight());
- current_width = result_width;
- }
-
- is_set = showButton(object_type, current_width);
-
- // Shrink buttons if needed
- if (is_set && decrease_width)
- {
- processWidthDecreased( -result_width);
- }
- }
- else
- {
- const S32 delta_width = get_curr_width(cur_panel);
-
- setTrayButtonVisible(object_type, false);
-
- // Mark button NOT to show while future bottom tray extending
- lldebugs << "Removing " << resizeStateToString(object_type) << " from mResizeState" << llendl;
- setAutoHidden(object_type, false);
-
- // Extend other buttons if need
- if (delta_width)
- {
- processWidthIncreased(delta_width);
- }
- }
- return is_set;
-}
-
-LLPanel* LLBottomTray::getButtonPanel(EResizeState button_type)
-{
- // Don't use the operator[] because it inserts a NULL value if the key is not found.
- if (mStateProcessedObjectMap.count(button_type) == 0)
- {
- llwarns << "Cannot find a panel for " << resizeStateToString(button_type) << llendl;
- llassert(mStateProcessedObjectMap.count(button_type) == 1);
- return NULL;
- }
-
- return mStateProcessedObjectMap[button_type];
-}
-
-void LLBottomTray::showWellButton(EResizeState object_type, bool visible)
-{
- llassert( ((RS_NOTIFICATION_WELL | RS_IM_WELL) & object_type) == object_type );
-
- const std::string panel_name = RS_IM_WELL == object_type ? "im_well_panel" : "notification_well_panel";
-
- LLView * panel = getChild<LLView>(panel_name);
-
- // if necessary visibility is set nothing to do here
- if (panel->getVisible() == (BOOL)visible) return;
-
- S32 panel_width = panel->getRect().getWidth();
- panel->setVisible(visible);
-
- if (visible)
- {
- // method assumes that input param is a negative value
- processWidthDecreased(-panel_width);
- }
- else
- {
- processWidthIncreased(panel_width);
- }
-}
-
-void LLBottomTray::processChatbarCustomization(S32 new_width)
-{
- if (NULL == mNearbyChatBar) return;
-
- const S32 delta_width = mChatBarContainer->getRect().getWidth() - new_width;
-
- if (delta_width == 0) return;
-
- {
- static unsigned dbg_cnt = 0;
- lldebugs << llformat("*** (%03d) ************************************* %d", delta_width, ++dbg_cnt) << llendl;
- }
-
- mDesiredNearbyChatWidth = new_width;
-
- const S32 available_chiclet_shrink_width = getChicletPanelShrinkHeadroom();
- llassert(available_chiclet_shrink_width >= 0);
-
- if (delta_width > 0) // panel gets narrowly
- {
- S32 total_possible_width = delta_width + available_chiclet_shrink_width;
- processShowButtons(total_possible_width);
- processExtendButtons(total_possible_width);
- }
- // here (delta_width < 0) // panel gets wider
- else //if (-delta_width > available_chiclet_shrink_width)
- {
- S32 required_width = delta_width + available_chiclet_shrink_width;
- S32 buttons_freed_width = 0;
- processShrinkButtons(required_width, buttons_freed_width);
- processHideButtons(required_width, buttons_freed_width);
- }
-}
-
-S32 LLBottomTray::getChicletPanelShrinkHeadroom() const
-{
- static const S32 min_width = mChicletPanel->getMinWidth();
- const S32 cur_width = mChicletPanel->getParent()->getRect().getWidth();
-
- S32 shrink_headroom = cur_width - min_width;
- llassert(shrink_headroom >= 0); // the panel cannot get narrower than the minimum
- return shrink_headroom;
-}
-
-// static
-std::string LLBottomTray::resizeStateToString(EResizeState state)
-{
- const char *rs_string = "UNKNOWN_BUTTON";
-
- switch (state)
- {
- case RS_NORESIZE: rs_string = "RS_NORESIZE"; break;
- case RS_CHICLET_PANEL: rs_string = "RS_CHICLET_PANEL"; break;
- case RS_CHATBAR_INPUT: rs_string = "RS_CHATBAR_INPUT"; break;
- case RS_BUTTON_SNAPSHOT: rs_string = "RS_BUTTON_SNAPSHOT"; break;
- case RS_BUTTON_CAMERA: rs_string = "RS_BUTTON_CAMERA"; break;
- case RS_BUTTON_MOVEMENT: rs_string = "RS_BUTTON_MOVEMENT"; break;
- case RS_BUTTON_GESTURES: rs_string = "RS_BUTTON_GESTURES"; break;
- case RS_BUTTON_SPEAK: rs_string = "RS_BUTTON_SPEAK"; break;
- case RS_IM_WELL: rs_string = "RS_IM_WELL"; break;
- case RS_NOTIFICATION_WELL: rs_string = "RS_NOTIFICATION_WELL"; break;
- case RS_BUTTON_BUILD: rs_string = "RS_BUTTON_BUILD"; break;
- case RS_BUTTON_SEARCH: rs_string = "RS_BUTTON_SEARCH"; break;
- case RS_BUTTON_WORLD_MAP: rs_string = "RS_BUTTON_WORLD_MAP"; break;
- case RS_BUTTON_MINI_MAP: rs_string = "RS_BUTTON_MINI_MAP"; break;
- case RS_BUTTON_DESTINATIONS: rs_string = "RS_BUTTON_DESTINATIONS"; break;
- case RS_BUTTON_AVATARS: rs_string = "RS_BUTTON_AVATARS"; break;
- case RS_BUTTON_PEOPLE: rs_string = "RS_BUTTON_PEOPLE"; break;
- case RS_BUTTON_PROFILE: rs_string = "RS_BUTTON_PROFILE"; break;
- case RS_BUTTON_HOWTO: rs_string = "RS_BUTTON_HOWTO"; break;
- case RS_BUTTON_SPLITTER_1: rs_string = "RS_BUTTON_SPLITTER_1"; break;
- case RS_BUTTON_SPLITTER_2: rs_string = "RS_BUTTON_SPLITTER_2"; break;
- case RS_BUTTONS_CAN_BE_HIDDEN: rs_string = "RS_BUTTONS_CAN_BE_HIDDEN"; break;
- // No default to track additions.
- }
-
- return rs_string;
-}
-
-// static
-std::string LLBottomTray::resizeStateMaskToString(MASK mask)
-{
- std::string res;
-
- bool add_delimiter = false;
- for (U32 i = 0; i < 16; i++)
- {
- EResizeState state = (EResizeState) (1 << i);
- if (mask & state)
- {
- if (!add_delimiter)
- {
- add_delimiter = true;
- }
- else
- {
- res += ", ";
- }
-
- res += resizeStateToString(state);
- }
- }
-
- if (res.empty())
- {
- res = resizeStateToString(RS_NORESIZE);
- }
-
- res += llformat(" (0x%X)", mask);
- return res;
-}
-
-bool LLBottomTray::isAutoHidden(MASK button_types) const
-{
- return (mResizeState & button_types) != 0;
-}
-
-void LLBottomTray::setAutoHidden(MASK button_types, bool hide)
-{
- if (hide)
- {
- mResizeState |= button_types;
- }
- else
- {
- mResizeState &= ~button_types;
- }
-}
-
-//EOF
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
deleted file mode 100644
index 62718531ef..0000000000
--- a/indra/newview/llbottomtray.h
+++ /dev/null
@@ -1,564 +0,0 @@
-/**
-* @file llbottomtray.h
-* @brief LLBottomTray class header file
-*
-* $LicenseInfo:firstyear=2009&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-
-#ifndef LL_LLBOTTOMPANEL_H
-#define LL_LLBOTTOMPANEL_H
-
-#include "llpanel.h"
-#include "llimview.h"
-#include "llbutton.h"
-
-class LLChicletPanel;
-class LLLayoutStack;
-class LLSpeakButton;
-class LLNearbyChatBar;
-class LLIMChiclet;
-class LLBottomTrayLite;
-class LLLayoutPanel;
-class LLMenuGL;
-class LLNearbyChatBarListener;
-
-// Build time optimization, generate once in .cpp file
-#ifndef LLBOTTOMTRAY_CPP
-extern template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance();
-#endif
-
-/**
- * Class for buttons that should have drag'n'drop ability in bottomtray.
- * These buttons pass mouse events handling to bottomtray.
- */
-class LLBottomtrayButton : public LLButton
-{
-public:
- struct Params : public LLInitParam::Block<Params, LLButton::Params>
- {
- Optional<bool> can_drag;
- Params()
- : can_drag("can_drag", true){}
- };
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
-
-protected:
- LLBottomtrayButton(const Params& p)
- : LLButton(p),
- mCanDrag(p.can_drag)
- {
-
- }
- friend class LLUICtrlFactory;
-
- bool mCanDrag;
-};
-
-class LLBottomTray
- : public LLSingleton<LLBottomTray>
- , public LLPanel
- , public LLIMSessionObserver
- , public LLVoiceClientStatusObserver
-{
- LOG_CLASS(LLBottomTray);
- friend class LLSingleton<LLBottomTray>;
- friend class LLBottomTrayLite;
-public:
- ~LLBottomTray();
-
- BOOL postBuild();
-
- LLChicletPanel* getChicletPanel() {return mChicletPanel;}
- LLNearbyChatBar* getNearbyChatBar();
-
- void onCommitGesture(LLUICtrl* ctrl);
-
- // LLIMSessionObserver observe triggers
- virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
- virtual void sessionRemoved(const LLUUID& session_id);
- void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
-
- S32 getTotalUnreadIMCount();
-
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
-
- virtual void setVisible(BOOL visible);
-
- /*virtual*/ S32 notifyParent(const LLSD& info);
-
- // Implements LLVoiceClientStatusObserver::onChange() to enable the speak
- // button when voice is available
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
-
- void showBottomTrayContextMenu(S32 x, S32 y, MASK mask);
-
- void showSpeakButton(bool visible);
-
- void toggleMovementControls();
- void toggleCameraControls();
-
- void onMouselookModeIn();
- void onMouselookModeOut();
-
- /**
- * Creates IM Chiclet based on session type (IM chat or Group chat)
- */
- LLIMChiclet* createIMChiclet(const LLUUID& session_id);
-
- // Below are methods that were introduced or overriden in bottomtray to handle drag'n'drop
-
- virtual void draw();
-
- /**
- * These three methods handle drag'n'drop, they may be called directly from child buttons.
- * handleHover and other virtual handle* couldn't be used here, because we should call LLPanel::handle*,
- * but x and y here are often outside of bottomtray.
- */
- void onDraggableButtonHover(S32 x, S32 y);
- void onDraggableButtonMouseDown(LLUICtrl* button, S32 x, S32 y);
- void onDraggableButtonMouseUp(LLUICtrl* button, S32 x, S32 y);
-
-
-private:
- typedef enum e_resize_state
- {
- RS_NORESIZE = 0x0000,
- RS_CHICLET_PANEL = 0x0001,
- RS_CHATBAR_INPUT = 0x0002,
- RS_BUTTON_SNAPSHOT = 0x0004,
- RS_BUTTON_CAMERA = 0x0008,
- RS_BUTTON_MOVEMENT = 0x0010,
- RS_BUTTON_GESTURES = 0x0020,
- RS_BUTTON_SPEAK = 0x0040,
- RS_IM_WELL = 0x0080,
- RS_NOTIFICATION_WELL = 0x0100,
- RS_BUTTON_BUILD = 0x0200,
- RS_BUTTON_SEARCH = 0x0400,
- RS_BUTTON_WORLD_MAP = 0x0800,
- RS_BUTTON_MINI_MAP = 0x1000,
- RS_BUTTON_DESTINATIONS = 0x2000,
- RS_BUTTON_AVATARS = 0x4000,
- RS_BUTTON_PEOPLE = 0x8000,
- RS_BUTTON_PROFILE = 0x10000,
- RS_BUTTON_HOWTO = 0x20000,
- RS_BUTTON_SPLITTER_1 = 0x40000,
- RS_BUTTON_SPLITTER_2 = 0x80000,
-
- /*
- Once new button that can be hidden on resize is added don't forget to update related places:
- - RS_BUTTONS_CAN_BE_HIDDEN enum value below.
- - initResizeStateContainers(): mStateProcessedObjectMap and mButtonsProcessOrder
- */
-
- /**
- * Specifies buttons which can be hidden when bottom tray is shrunk.
- * They are: Gestures, Movement (Move), Camera (View), Snapshot
- * new: Build, Search, Map, World Map, Mini-Map, destinations, avatars
- */
- RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES
- | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP
- | RS_BUTTON_DESTINATIONS | RS_BUTTON_AVATARS
- }EResizeState;
-
- // Below are three methods that were introduced to handle drag'n'drop
-
- /**
- * finds a panel under the specified LOCAL point
- */
- LLPanel* findChildPanelByLocalCoords(S32 x, S32 y);
-
- /**
- * checks whether the cursor is over an area where the dragged button may be dropped
- */
- bool isCursorOverDraggableArea(S32 x, S32 y);
-
- /**
- * Updates process(shrink/show/hide) order of buttons and order in which they'll be stored for further save/load.
- * It is called when dragged button is dropped
- */
- void updateButtonsOrdersAfterDnD();
-
- // saves order of buttons to file on disk
- void saveButtonsOrder();
- // reads order of buttons from file on disk
- void loadButtonsOrder();
-
- /**
- * Updates child controls size and visibility when it is necessary to reduce total width.
- *
- * Process order:
- * - reduce chiclet panel to its minimal width;
- * - reduce chatbar to its minimal width;
- * - reduce visible buttons from right to left to their minimal width;
- * - hide visible buttons from right to left;
- * When button is hidden chatbar extended to fill released space if it is necessary.
- *
- * @param[in] delta_width - value by which bottom tray should be shrunk. It is a negative value.
- * @return positive value which bottom tray can not process when it reaches its minimal width.
- * Zero if there was enough space to process delta_width.
- */
- S32 processWidthDecreased(S32 delta_width);
-
- /**
- * Updates child controls size and visibility when it is necessary to extend total width.
- *
- * Process order:
- * - show invisible buttons should be shown from left to right if possible;
- * - extend visible buttons from left to right to their default width;
- * - extend chatbar to its maximal width;
- * - extend chiclet panel to all available space;
- * When chatbar & chiclet panels are wider then their minimal width they can be reduced to allow
- * a button gets visible in case if passed delta_width is not enough (chatbar first).
- *
- * @param[in] delta_width - value by which bottom tray should be extended. It is a positive value.
- */
- void processWidthIncreased(S32 delta_width);
-
- /** helper function to log debug messages */
- void log(LLView* panel, const std::string& descr);
-
- /**
- * Tries to show hidden by resize buttons using available width.
- *
- * Gets buttons visible if there is enough space. Reduces available_width in this case.
- *
- * @params[in, out] available_width - reference to available width to be used to show buttons.
- * @see processShowButton()
- * @return consumed pixels (difference in available width).
- */
- S32 processShowButtons(S32& available_width);
-
- /**
- * Tries to show panel with specified button using available width.
- *
- * Shows button specified by type if there is enough space. Reduces available_width in this case.
- *
- * @params[in] shown_object_type - type of button to be shown.
- * @params[in, out] available_width - reference to available width to be used to show button.
- *
- * @return true if button can be shown, false otherwise
- */
- bool processShowButton(EResizeState shown_object_type, S32& available_width);
-
- /**
- * Hides visible panels with all buttons that may be hidden by resize if it is necessary.
- *
- * When button gets hidden some space is released in bottom tray.
- * This space is taken into account for several consecutive calls for several buttons.
- *
- * @params[in, out] required_width - reference to required width to be released. This is a negative value.
- * Its absolute value is decreased by shown panel width.
- * @params[in, out] buttons_freed_width - reference to value released over required one.
- * If panel's width is more than required difference is added to buttons_freed_width.
- * @see processHideButton()
- */
- void processHideButtons(S32& required_width, S32& buttons_freed_width);
-
- /**
- * Hides panel with specified button if it is visible.
- *
- * When button gets hidden some space is released in bottom tray.
- * This space is taken into account for several consecutive calls for several buttons.
- *
- * @params[in] processed_object_type - type of button to be hide.
- * @params[in, out] required_width - reference to required width to be released. This is a negative value.
- * Its absolute value is decreased by panel width.
- * @params[in, out] buttons_freed_width - reference to value released over required one.
- * If panel's width is more than required difference is added to buttons_freed_width.
- */
- void processHideButton(EResizeState processed_object_type, S32& required_width, S32& buttons_freed_width);
-
- /**
- * Shrinks shown buttons to reduce total taken space.
- *
- * Shrinks buttons that may be shrunk smoothly first. Then shrinks Speak button.
- *
- * @param[in, out] required_width - reference to width value which should be released when buttons are shrunk. It is a negative value.
- * It is increased on the value processed by buttons.
- * @params[in, out] buttons_freed_width - reference to value released over required one.
- * If width of panel with Speak button is more than required that difference is added
- * to buttons_freed_width.
- * This is because Speak button shrinks discretely unlike other buttons which are changed smoothly.
- */
- void processShrinkButtons(S32& required_width, S32& buttons_freed_width);
-
- /**
- * Shrinks panel with specified button if it is visible.
- *
- * @params[in] processed_object_type - type of button to be shrunk.
- * @param[in, out] required_width - reference to width value which should be released when button is shrunk. It is a negative value.
- * It is increased on the value released by the button.
- */
- void processShrinkButton(EResizeState processed_object_type, S32& required_width);
-
- /**
- * Extends shown buttons to increase total taken space.
- *
- * Extends buttons that may be extended smoothly first. Then extends Speak button.
- *
- * @param[in, out] available_width - reference to width value which buttons can use to be extended.
- * It is a positive value. It is decreased on the value processed by buttons.
- */
- void processExtendButtons(S32& available_width);
-
- /**
- * Extends the Speak button if there is anough headroom.
- *
- * Unlike other buttons, the Speak buttons has only two possible widths:
- * the minimal one (without label) and the maximal (default) one.
- *
- * If the button is at its minimum width there is not enough headroom to
- * reshape it to the maximum width, the method does nothing.
- *
- * @param available_width Available headroom.
- * @return false if the button requires extension but there's not enough headroom, true otherwise.
- */
- bool processExtendSpeakButton(S32& available_width);
-
- /**
- * Extends shown button to increase total taken space.
- *
- * @params[in] processed_object_type - type of button to be extended.
- * @param[in, out] available_width - reference to width value which button can use to be extended.
- * It is a positive value. It is decreased on the value processed by buttons.
- */
- void processExtendButton(EResizeState processed_object_type, S32& available_width);
-
- /**
- * Determines if specified by type object can be shown. It should be hidden by shrink before.
- *
- * Processes buttons a such way to show buttons in constant order:
- * - Gestures, Move, View, Snapshot
- */
- bool canButtonBeShown(EResizeState processed_object_type) const;
-
- /**
- * Initializes all containers stored data related to children resize state.
- *
- * @see mStateProcessedObjectMap
- * @see mObjectDefaultWidthMap
- * @see mButtonsProcessOrder
- */
- void initResizeStateContainers();
-
- /**
- * Initializes buttons' visibility depend on stored Control Settings.
- */
- void initButtonsVisibility();
-
- /**
- * Initializes listeners of Control Settings to toggle appropriate buttons' visibility.
- *
- * @see toggleShowButton()
- */
- void setButtonsControlsAndListeners();
-
- /**
- * Toggles visibility of specified button depend on passed value.
- *
- * @param button_type - type of button to be toggled
- * @param new_visibility - new visibility of the button
- *
- * @see setButtonsControlsAndListeners()
- */
- static bool toggleShowButton(EResizeState button_type, const LLSD& new_visibility);
-
- /**
- * Show the button if there is enough space.
- *
- * @param[in] button_type - type of button to be shown.
- * @param[in, out] available_width amount of available space on the bottom bar.
- *
- * @return true if button was shown, false that's not possible (not enough space, etc)
- */
- bool showButton(EResizeState button_type, S32& available_width);
-
- /**
- * Sets passed visibility to object specified by resize type.
- */
- void setTrayButtonVisible(EResizeState shown_object_type, bool visible);
-
- /**
- * Sets passed visibility to object specified by resize type if it is possible.
- *
- * If it is impossible to show required button due to there is no enough room in bottom tray
- * it will no be shown. Is called via context menu commands.
- * In this case Alert Dialog will be shown to notify user about that.
- *
- * Method also stores resize state to be processed while future bottom tray extending:
- * - if hidden while resizing button should be hidden it will not be shown while extending;
- * - if hidden via context menu button should be shown but there is no enough room for now
- * it will be shown while extending.
- */
- void setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification = true);
-
- /**
- * Sets passed visibility to required button and fit widths of shown
- * buttons(notice that method can shrink widths to
- * allocate needed room in bottom tray).
- * Returns true if visibility of required button was set.
- */
- bool setVisibleAndFitWidths(EResizeState object_type, bool visible);
-
- /**
- * Get panel containing the given button.
- *
- * @see mStateProcessedObjectMap
- */
- LLPanel* getButtonPanel(EResizeState button_type);
-
- /**
- * Shows/hides panel with specified well button (IM or Notification)
- *
- * @param[in] object_type - type of well button to be processed.
- * Must be one of RS_IM_WELL or RS_NOTIFICATION_WELL.
- * @param[in] visible - flag specified whether button should be shown or hidden.
- */
- void showWellButton(EResizeState object_type, bool visible);
-
- /**
- * Handles a customization of chatbar width.
- *
- * When chatbar gets wider layout stack will reduce chiclet panel (it is auto-resizable)
- * But once chiclet panel reaches its minimal width Stack will force to reduce buttons width.
- * including Speak button. The similar behavior is when chatbar gets narrowly.
- * This methods force resize behavior to resize buttons properly in these cases.
- */
- void processChatbarCustomization(S32 new_width);
-
- /**
- * @return difference between current chiclet panel width and the minimum.
- */
- S32 getChicletPanelShrinkHeadroom() const;
-
- /// Get button name for debugging.
- static std::string resizeStateToString(EResizeState state);
-
- /// Dump a mask for debugging
- static std::string resizeStateMaskToString(MASK mask);
-
- /// @return true if any of the the passed buttons have been auto-hidden due to lack of available space.
- bool isAutoHidden(MASK button_types) const;
-
- /**
- * (Un)Mark the buttons as hidden.
- *
- * Auto-hidden buttons are those that re-appear as soon as we have enough available space.
- */
- void setAutoHidden(MASK button_types, bool hide);
-
- /// Buttons automatically hidden due to lack of space.
- MASK mResizeState;
-
- /**
- * Mapping of button types to the layout panels the buttons are wrapped in.
- *
- * Used by getButtonPanel().
- */
- typedef std::map<EResizeState, LLPanel*> state_object_map_t;
- state_object_map_t mStateProcessedObjectMap;
-
- /// Default (maximum) widths of the layout panels.
- typedef std::map<EResizeState, S32> state_object_width_map_t;
- state_object_width_map_t mObjectDefaultWidthMap;
-
- typedef std::vector<EResizeState> resize_state_vec_t;
-
- /**
- * Contains order in which child buttons should be processed in show/hide, extend/shrink methods.
- */
- resize_state_vec_t mButtonsProcessOrder;
-
- /**
- * Contains order in which child buttons are shown.
- * It traces order of all bottomtray buttons that may change place via drag'n'drop and should
- * save and load it between sessions. mButtonsProcessOrder is not enough for it because it contains only
- * buttons that may be hidden.
- */
- resize_state_vec_t mButtonsOrder;
-
-protected:
-
- LLBottomTray(const LLSD& key = LLSD());
-
- static void* createNearbyChatBar(void* userdata);
-
- void updateContextMenu(S32 x, S32 y, MASK mask);
- void onContextMenuItemClicked(const LLSD& userdata);
- bool onContextMenuItemEnabled(const LLSD& userdata);
-
- // Either default or saved after user's manual resize width of nearby chat.
- // Nearby chat will not always have it, because sometimes it can be shrunk on resize,
- // but when possible it will be restored back to this value.
- S32 mDesiredNearbyChatWidth;
- LLChicletPanel* mChicletPanel;
- LLPanel* mSpeakPanel;
- LLSpeakButton* mSpeakBtn;
- LLNearbyChatBar* mNearbyChatBar;
- LLLayoutPanel* mChatBarContainer;
- LLPanel* mNearbyCharResizeHandlePanel;
- LLLayoutStack* mToolbarStack;
- LLMenuGL* mBottomTrayContextMenu;
- LLButton* mCamButton;
- LLButton* mMovementButton;
- LLBottomTrayLite* mBottomTrayLite;
- bool mIsInLiteMode;
-
- // Drag'n'Drop
-
- /**
- * Is true if mouse down happened on draggable button.
- * Set false whether on drag start or on mouse up.
- */
- bool mCheckForDrag;
- /**
- * These two variables hold corrdinates of mouse down on draggable button.
- * They are used to compare with current coordinates of cursor and determine whether drag'n'drop should start.
- */
- S32 mStartX;
- S32 mStartY;
- /**
- * True if drag'n'drop is happening.
- */
- bool mDragStarted;
-
- /**
- * Pointer to panel which is currently dragged (though it seems to user that button is dragged,
- * we are changing place of layout panel).
- */
- LLPanel* mDraggedItem;
- /**
- * Panel before which the dragged button will be inserted.
- */
- LLPanel* mLandingTab;
- /**
- * Image used to show position where dragged button will be dropped.
- */
- LLUIImage* mImageDragIndication;
-
- // We want only one LLNearbyChatBarListener object, so it's tied to this singleton
- boost::shared_ptr<LLNearbyChatBarListener> mListener;
-};
-
-#endif // LL_LLBOTTOMPANEL_H
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 945a760d05..e3217668c5 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -37,9 +37,9 @@
#include "llavatarnamecache.h"
#include "llavatariconctrl.h"
#include "llavatarlist.h"
-#include "llbottomtray.h"
#include "lldraghandle.h"
#include "llimfloater.h"
+#include "llimview.h"
#include "llfloaterreg.h"
#include "llparticipantlist.h"
#include "llspeakers.h"
@@ -115,9 +115,6 @@ LLCallFloater::LLCallFloater(const LLSD& key)
LLVoiceClient::instance().addObserver(this);
LLTransientFloaterMgr::getInstance()->addControlView(this);
- // force docked state since this floater doesn't save it between recreations
- setDocked(true);
-
// update the agent's name if display name setting change
LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this));
LLViewerDisplayName::addNameChangedCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this));
@@ -145,7 +142,6 @@ LLCallFloater::~LLCallFloater()
// virtual
BOOL LLCallFloater::postBuild()
{
- LLTransientDockableFloater::postBuild();
mAvatarList = getChild<LLAvatarList>("speakers_list");
mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLCallFloater::onAvatarListRefreshed, this));
@@ -154,20 +150,10 @@ BOOL LLCallFloater::postBuild()
mNonAvatarCaller = findChild<LLNonAvatarCaller>("non_avatar_caller");
mNonAvatarCaller->setVisible(FALSE);
- LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_flyout_btn");
-
- setDockControl(new LLDockControl(
- anchor_panel, this,
- getDockTongue(), LLDockControl::TOP));
-
initAgentData();
connectToChannel(LLVoiceChannel::getCurrentVoiceChannel());
- setIsChrome(true);
- //chrome="true" hides floater caption
- if (mDragHandle)
- mDragHandle->setTitleVisible(TRUE);
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
updateSession();
@@ -204,13 +190,13 @@ void LLCallFloater::draw()
if (mParticipants)
mParticipants->updateRecentSpeakersOrder();
- LLTransientDockableFloater::draw();
+ LLFloater::draw();
}
// virtual
void LLCallFloater::setFocus( BOOL b )
{
- LLTransientDockableFloater::setFocus(b);
+ LLFloater::setFocus(b);
// Force using active floater transparency (STORM-730).
// We have to override setFocus() for LLCallFloater because selecting an item
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 4ab3d8dc98..987651fc80 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -58,7 +58,10 @@ LLChannelManager::~LLChannelManager()
{
for(std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
{
- delete (*it).channel;
+ LLScreenChannelBase* channel = it->channel.get();
+ if (!channel) continue;
+
+ delete channel;
}
mChannelList.clear();
@@ -68,9 +71,10 @@ LLChannelManager::~LLChannelManager()
LLScreenChannel* LLChannelManager::createNotificationChannel()
{
// creating params for a channel
- LLChannelManager::Params p;
+ LLScreenChannelBase::Params p;
p.id = LLUUID(gSavedSettings.getString("NotificationChannelUUID"));
p.channel_align = CA_RIGHT;
+ p.toast_align = NA_TOP;
// Getting a Channel for our notifications
return dynamic_cast<LLScreenChannel*> (LLChannelManager::getInstance()->getChannel(p));
@@ -84,16 +88,19 @@ void LLChannelManager::onLoginCompleted()
// calc a number of all offline notifications
for(std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
{
+ LLScreenChannelBase* channel = it->channel.get();
+ if (!channel) continue;
+
// don't calc notifications for Nearby Chat
- if((*it).channel->getChannelID() == LLUUID(gSavedSettings.getString("NearByChatChannelUUID")))
+ if(channel->getChannelID() == LLUUID(gSavedSettings.getString("NearByChatChannelUUID")))
{
continue;
}
// don't calc notifications for channels that always show their notifications
- if(!(*it).channel->getDisplayToastsAlways())
+ if(!channel->getDisplayToastsAlways())
{
- away_notifications +=(*it).channel->getNumberOfHiddenToasts();
+ away_notifications +=channel->getNumberOfHiddenToasts();
}
}
@@ -106,7 +113,7 @@ void LLChannelManager::onLoginCompleted()
else
{
// create a channel for the StartUp Toast
- LLChannelManager::Params p;
+ LLScreenChannelBase::Params p;
p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
p.channel_align = CA_RIGHT;
mStartUpChannel = createChannel(p);
@@ -157,33 +164,22 @@ LLScreenChannelBase* LLChannelManager::addChannel(LLScreenChannelBase* channel)
ChannelElem new_elem;
new_elem.id = channel->getChannelID();
- new_elem.channel = channel;
+ new_elem.channel = channel->getHandle();
mChannelList.push_back(new_elem);
return channel;
}
-LLScreenChannel* LLChannelManager::createChannel(LLChannelManager::Params& p)
+LLScreenChannel* LLChannelManager::createChannel(LLScreenChannelBase::Params& p)
{
- LLScreenChannel* new_channel = new LLScreenChannel(p.id);
-
- if(!new_channel)
- {
- llerrs << "LLChannelManager::getChannel(LLChannelManager::Params& p) - can't create a channel!" << llendl;
- }
- else
- {
- new_channel->setToastAlignment(p.toast_align);
- new_channel->setChannelAlignment(p.channel_align);
- new_channel->setDisplayToastsAlways(p.display_toasts_always);
+ LLScreenChannel* new_channel = new LLScreenChannel(p);
- addChannel(new_channel);
- }
+ addChannel(new_channel);
return new_channel;
}
-LLScreenChannelBase* LLChannelManager::getChannel(LLChannelManager::Params& p)
+LLScreenChannelBase* LLChannelManager::getChannel(LLScreenChannelBase::Params& p)
{
LLScreenChannelBase* new_channel = findChannelByID(p.id);
@@ -195,19 +191,19 @@ LLScreenChannelBase* LLChannelManager::getChannel(LLChannelManager::Params& p)
}
//--------------------------------------------------------------------------
-LLScreenChannelBase* LLChannelManager::findChannelByID(const LLUUID id)
+LLScreenChannelBase* LLChannelManager::findChannelByID(const LLUUID& id)
{
std::vector<ChannelElem>::iterator it = find(mChannelList.begin(), mChannelList.end(), id);
if(it != mChannelList.end())
{
- return (*it).channel;
+ return (*it).channel.get();
}
return NULL;
}
//--------------------------------------------------------------------------
-void LLChannelManager::removeChannelByID(const LLUUID id)
+void LLChannelManager::removeChannelByID(const LLUUID& id)
{
std::vector<ChannelElem>::iterator it = find(mChannelList.begin(), mChannelList.end(), id);
if(it != mChannelList.end())
@@ -222,7 +218,10 @@ void LLChannelManager::muteAllChannels(bool mute)
for (std::vector<ChannelElem>::iterator it = mChannelList.begin();
it != mChannelList.end(); it++)
{
- it->channel->setShowToasts(!mute);
+ if (it->channel.get())
+ {
+ it->channel.get()->setShowToasts(!mute);
+ }
}
}
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index db936b28d9..a5de8a5327 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -43,24 +43,15 @@ namespace LLNotificationsUI
*/
class LLChannelManager : public LLSingleton<LLChannelManager>
{
-public:
- struct Params
- {
- LLUUID id;
- bool display_toasts_always;
- EToastAlignment toast_align;
- EChannelAlignment channel_align;
+public:
- Params(): id(LLUUID("")), display_toasts_always(false), toast_align(NA_BOTTOM), channel_align(CA_LEFT)
- {}
- };
struct ChannelElem
{
- LLUUID id;
- LLScreenChannelBase* channel;
+ LLUUID id;
+ LLHandle<LLScreenChannelBase> channel;
- ChannelElem() : id(LLUUID("")), channel(NULL) { }
+ ChannelElem() { }
ChannelElem(const ChannelElem &elem)
{
@@ -83,18 +74,18 @@ public:
void onStartUpToastClose();
// creates a new ScreenChannel according to the given parameters or returns existing if present
- LLScreenChannelBase* getChannel(LLChannelManager::Params& p);
+ LLScreenChannelBase* getChannel(LLScreenChannelBase::Params& p);
LLScreenChannelBase* addChannel(LLScreenChannelBase* channel);
// returns a channel by its ID
- LLScreenChannelBase* findChannelByID(const LLUUID id);
+ LLScreenChannelBase* findChannelByID(const LLUUID& id);
// creator of the Notification channel, that is used in more than one handler
LLScreenChannel* createNotificationChannel();
// remove channel methods
- void removeChannelByID(const LLUUID id);
+ void removeChannelByID(const LLUUID& id);
/**
* Manages toasts showing for all channels.
@@ -116,7 +107,7 @@ public:
std::vector<ChannelElem>& getChannelList() { return mChannelList;}
private:
- LLScreenChannel* createChannel(LLChannelManager::Params& p);
+ LLScreenChannel* createChannel(LLScreenChannelBase::Params& p);
LLScreenChannel* mStartUpChannel;
std::vector<ChannelElem> mChannelList;
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index cf0374075a..d6095cce07 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -60,7 +60,6 @@
#include "llui.h"
#include "llviewermenu.h"
#include "lluictrlfactory.h"
-#include "llbottomtray.h"
//
// Globals
@@ -95,7 +94,7 @@ LLChatBar::LLChatBar()
mGestureCombo(NULL),
mObserver(NULL)
{
- setIsChrome(TRUE);
+ //setIsChrome(TRUE);
}
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index c0c9ea1451..42de47e777 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -42,6 +42,7 @@
#include "llavataractions.h"
#include "lltrans.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llmutelist.h"
#include "llstylemap.h"
#include "llslurl.h"
@@ -58,8 +59,6 @@
#include "llviewercontrol.h"
-#include "llsidetray.h"//for blocked objects panel
-
static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
const static std::string NEW_LINE(rawstr_to_utf8("\n"));
@@ -144,7 +143,7 @@ public:
{
LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT));
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId()));
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId()));
}
}
@@ -255,7 +254,7 @@ public:
mSourceType = chat.mSourceType;
//*TODO overly defensive thing, source type should be maintained out there
- if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM && chat.mFromID.isNull())
+ if((chat.mFromID.isNull() && chat.mFromName.empty()) || (chat.mFromName == SYSTEM_FROM && chat.mFromID.isNull()))
{
mSourceType = CHAT_SOURCE_SYSTEM;
}
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 8584885bc9..9a84280f25 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -35,6 +35,7 @@
#include "llfloaterreg.h"
#include "lllocalcliprect.h"
#include "lltrans.h"
+#include "llnearbychatbar.h"
#include "llviewercontrol.h"
#include "llagentdata.h"
@@ -315,12 +316,12 @@ BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask)
return TRUE;
else
{
- LLFloaterReg::showInstance("nearby_chat",LLSD());
+ LLNearbyChatBar::getInstance()->showHistory();
return FALSE;
}
}
- LLFloaterReg::showInstance("nearby_chat",LLSD());
+ LLNearbyChatBar::getInstance()->showHistory();
return LLPanel::handleMouseUp(x,y,mask);
}
diff --git a/indra/newview/llchatmsgbox.cpp b/indra/newview/llchatmsgbox.cpp
index 024ccbcd0b..aa6c9c094c 100644
--- a/indra/newview/llchatmsgbox.cpp
+++ b/indra/newview/llchatmsgbox.cpp
@@ -70,7 +70,7 @@ private:
LLChatMsgBox::Params::Params() :
block_spacing("block_spacing", 10)
{
- line_spacing.pixels = 4;
+ changeDefault(line_spacing.pixels, 4);
}
LLChatMsgBox::LLChatMsgBox(const Params& p) :
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 3000209aad..a076374903 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -29,7 +29,7 @@
#include "llagent.h"
#include "llavataractions.h"
-#include "llbottomtray.h"
+#include "llchicletbar.h"
#include "lleventtimer.h"
#include "llgroupactions.h"
#include "lliconctrl.h"
@@ -126,9 +126,9 @@ LLSysWellChiclet::Params::Params()
, unread_notifications("unread_notifications")
, max_displayed_count("max_displayed_count", 99)
{
- button.name("button");
- button.tab_stop(FALSE);
- button.label(LLStringUtil::null);
+ button.name = "button";
+ button.tab_stop = FALSE;
+ button.label = LLStringUtil::null;
}
LLSysWellChiclet::LLSysWellChiclet(const Params& p)
@@ -214,10 +214,10 @@ void LLSysWellChiclet::updateWidget(bool is_window_empty)
{
mButton->setEnabled(!is_window_empty);
- LLSD params;
- params["well_empty"] = is_window_empty;
- params["well_name"] = getName();
- notifyParent(params);
+ if (LLChicletBar::instanceExists())
+ {
+ LLChicletBar::getInstance()->showWellButton(getName(), !is_window_empty);
+ }
}
// virtual
BOOL LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
@@ -297,7 +297,7 @@ void LLIMWellChiclet::createMenu()
void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)
{
const LLUUID& session_id = session_data["session_id"];
- const S32 counter = LLBottomTray::getInstance()->getTotalUnreadIMCount();
+ const S32 counter = LLChicletBar::getInstance()->getTotalUnreadIMCount();
const bool im_not_visible = !LLFloaterReg::instanceVisible("im_container")
&& !LLFloaterReg::instanceVisible("impanel", session_id);
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index a6e12006a1..1f1069dcb4 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -107,9 +107,9 @@ public:
{
Params()
{
- draw_tooltip(FALSE);
- mouse_opaque(FALSE);
- default_icon_name("Generic_Person");
+ changeDefault(draw_tooltip, FALSE);
+ changeDefault(mouse_opaque, FALSE);
+ changeDefault(default_icon_name, "Generic_Person");
};
};
@@ -131,9 +131,8 @@ public:
Optional<std::string> default_icon;
Params()
- : default_icon("default_icon", "Generic_Group")
- {
- };
+ : default_icon("default_icon", "Generic_Group")
+ {}
};
/**
@@ -162,9 +161,9 @@ public:
Optional<std::string> default_icon;
Params()
- : default_icon("default_icon", "Generic_Object_Small")
+ : default_icon("default_icon", "Generic_Object_Small")
{
- avatar_id = LLUUID::null;
+ changeDefault(avatar_id, LLUUID::null);
};
};
@@ -314,9 +313,7 @@ public:
TYPE_AD_HOC
};
struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
- {
- Params(){}
- };
+ {};
virtual ~LLIMChiclet() {};
diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp
new file mode 100644
index 0000000000..a879651060
--- /dev/null
+++ b/indra/newview/llchicletbar.cpp
@@ -0,0 +1,374 @@
+/**
+ * @file llchicletbar.cpp
+ * @brief LLChicletBar class implementation
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h" // must be first include
+
+#include "llchicletbar.h"
+
+// library includes
+#include "llfloaterreg.h"
+#include "lllayoutstack.h"
+
+// newview includes
+#include "llchiclet.h"
+#include "llimfloater.h" // for LLIMFloater
+#include "llpaneltopinfobar.h"
+#include "llsyswellwindow.h"
+
+namespace
+{
+ const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel";
+
+ S32 get_panel_min_width(LLLayoutStack* stack, LLView* panel)
+ {
+ S32 minimal_width = 0;
+ llassert(stack);
+ if ( stack && panel && panel->getVisible() )
+ {
+ stack->getPanelMinSize(panel->getName(), &minimal_width);
+ }
+ return minimal_width;
+ }
+
+ S32 get_panel_max_width(LLLayoutStack* stack, LLPanel* panel)
+ {
+ S32 max_width = 0;
+ llassert(stack);
+ if ( stack && panel && panel->getVisible() )
+ {
+ stack->getPanelMaxSize(panel->getName(), &max_width);
+ }
+ return max_width;
+ }
+
+ S32 get_curr_width(LLUICtrl* ctrl)
+ {
+ S32 cur_width = 0;
+ if ( ctrl && ctrl->getVisible() )
+ {
+ cur_width = ctrl->getRect().getWidth();
+ }
+ return cur_width;
+ }
+}
+
+LLChicletBar::LLChicletBar(const LLSD&)
+: mChicletPanel(NULL),
+ mToolbarStack(NULL)
+{
+ // Firstly add our self to IMSession observers, so we catch session events
+ // before chiclets do that.
+ LLIMMgr::getInstance()->addSessionObserver(this);
+
+ buildFromFile("panel_chiclet_bar.xml");
+}
+
+LLChicletBar::~LLChicletBar()
+{
+ if (!LLSingleton<LLIMMgr>::destroyed())
+ {
+ LLIMMgr::getInstance()->removeSessionObserver(this);
+ }
+}
+
+LLIMChiclet* LLChicletBar::createIMChiclet(const LLUUID& session_id)
+{
+ LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(session_id);
+
+ switch (im_chiclet_type)
+ {
+ case LLIMChiclet::TYPE_IM:
+ return getChicletPanel()->createChiclet<LLIMP2PChiclet>(session_id);
+ case LLIMChiclet::TYPE_GROUP:
+ return getChicletPanel()->createChiclet<LLIMGroupChiclet>(session_id);
+ case LLIMChiclet::TYPE_AD_HOC:
+ return getChicletPanel()->createChiclet<LLAdHocChiclet>(session_id);
+ case LLIMChiclet::TYPE_UNKNOWN:
+ break;
+ }
+
+ return NULL;
+}
+
+//virtual
+void LLChicletBar::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
+{
+ if (!getChicletPanel()) return;
+
+ LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
+ if (!session) return;
+
+ // no need to spawn chiclets for participants in P2P calls called through Avaline
+ if (session->isP2P() && session->isOtherParticipantAvaline()) return;
+
+ if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return;
+
+ LLIMChiclet* chiclet = createIMChiclet(session_id);
+ if(chiclet)
+ {
+ chiclet->setIMSessionName(name);
+ chiclet->setOtherParticipantId(other_participant_id);
+
+ LLIMFloater::onIMChicletCreated(session_id);
+
+ }
+ else
+ {
+ llwarns << "Could not create chiclet" << llendl;
+ }
+}
+
+//virtual
+void LLChicletBar::sessionRemoved(const LLUUID& session_id)
+{
+ if(getChicletPanel())
+ {
+ // IM floater should be closed when session removed and associated chiclet closed
+ LLIMFloater* iMfloater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id);
+ if (iMfloater != NULL)
+ {
+ iMfloater->closeFloater();
+ }
+
+ getChicletPanel()->removeChiclet(session_id);
+ }
+}
+
+void LLChicletBar::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id)
+{
+ //this is only needed in case of outgoing ad-hoc/group chat sessions
+ LLChicletPanel* chiclet_panel = getChicletPanel();
+ if (chiclet_panel)
+ {
+ //it should be ad-hoc im chiclet or group im chiclet
+ LLChiclet* chiclet = chiclet_panel->findChiclet<LLChiclet>(old_session_id);
+ if (chiclet) chiclet->setSessionId(new_session_id);
+ }
+}
+
+S32 LLChicletBar::getTotalUnreadIMCount()
+{
+ return getChicletPanel()->getTotalUnreadIMCount();
+}
+
+BOOL LLChicletBar::postBuild()
+{
+ mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");
+ mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
+
+ showWellButton("im_well", !LLIMWellWindow::getInstance()->isWindowEmpty());
+ showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty());
+
+ LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this));
+ LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this));
+
+ return TRUE;
+}
+
+void LLChicletBar::showWellButton(const std::string& well_name, bool visible)
+{
+ LLView * panel = findChild<LLView>(well_name + "_panel");
+ if (!panel) return;
+
+ panel->setVisible(visible);
+}
+
+void LLChicletBar::log(LLView* panel, const std::string& descr)
+{
+ if (NULL == panel) return;
+ LLView* layout = panel->getParent();
+ LL_DEBUGS("Chiclet Bar Rects") << descr << ": "
+ << "panel: " << panel->getName()
+ << ", rect: " << panel->getRect()
+ << " layout: " << layout->getName()
+ << ", rect: " << layout->getRect()
+ << LL_ENDL;
+}
+
+void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ static S32 debug_calling_number = 0;
+ lldebugs << "**************************************** " << ++debug_calling_number << llendl;
+
+ S32 current_width = getRect().getWidth();
+ S32 delta_width = width - current_width;
+ lldebugs << "Reshaping: "
+ << ", width: " << width
+ << ", cur width: " << current_width
+ << ", delta_width: " << delta_width
+ << ", called_from_parent: " << called_from_parent
+ << llendl;
+
+ if (mChicletPanel) log(mChicletPanel, "before");
+
+ // Difference between chiclet bar width required to fit its children and the actual width. (see EXT-991)
+ // Positive value means that chiclet bar is not wide enough.
+ // Negative value means that there is free space.
+ static S32 extra_shrink_width = 0;
+ bool should_be_reshaped = true;
+
+ if (mChicletPanel && mToolbarStack)
+ {
+ // Firstly, update layout stack to ensure we deal with correct panel sizes.
+ {
+ BOOL saved_anim = mToolbarStack->getAnimate();
+ // Set chiclet panel to be autoresized by default.
+ mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE);
+ // Disable animation to prevent layout updating in several frames.
+ mToolbarStack->setAnimate(FALSE);
+ // Force the updating of layout to reset panels collapse factor.
+ mToolbarStack->updateLayout();
+ // Restore animate state.
+ mToolbarStack->setAnimate(saved_anim);
+ }
+
+ // chiclet bar is narrowed
+ if (delta_width < 0)
+ {
+ if (extra_shrink_width > 0) // not enough space
+ {
+ extra_shrink_width += llabs(delta_width);
+ should_be_reshaped = false;
+ }
+ else
+ {
+ extra_shrink_width = processWidthDecreased(delta_width);
+
+ // increase new width to extra_shrink_width value to not reshape less than chiclet bar minimum
+ width += extra_shrink_width;
+ }
+ }
+ // chiclet bar is widened
+ else
+ {
+ if (extra_shrink_width > delta_width)
+ {
+ // Still not enough space.
+ // Only subtract the delta from the required delta and don't reshape.
+ extra_shrink_width -= delta_width;
+ should_be_reshaped = false;
+ }
+ else if (extra_shrink_width > 0)
+ {
+ // If we have some extra shrink width let's reduce delta_width & width
+ delta_width -= extra_shrink_width;
+ width -= extra_shrink_width;
+ extra_shrink_width = 0;
+ }
+ }
+ }
+
+ if (should_be_reshaped)
+ {
+ lldebugs << "Reshape all children with width: " << width << llendl;
+ LLPanel::reshape(width, height, called_from_parent);
+ }
+
+ if (mChicletPanel) log(mChicletPanel, "after");
+}
+
+S32 LLChicletBar::processWidthDecreased(S32 delta_width)
+{
+ bool still_should_be_processed = true;
+
+ const S32 chiclet_panel_shrink_headroom = getChicletPanelShrinkHeadroom();
+
+ // Decreasing width of chiclet panel.
+ if (chiclet_panel_shrink_headroom > 0)
+ {
+ // we have some space to decrease chiclet panel
+ S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headroom);
+
+ lldebugs << "delta_width: " << delta_width
+ << ", panel_delta_min: " << chiclet_panel_shrink_headroom
+ << ", shrink_by: " << shrink_by
+ << llendl;
+
+ // is chiclet panel wide enough to process resizing?
+ delta_width += chiclet_panel_shrink_headroom;
+
+ still_should_be_processed = delta_width < 0;
+
+ lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl;
+ mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight());
+ log(mChicletPanel, "after processing panel decreasing via chiclet panel");
+
+ lldebugs << "RS_CHICLET_PANEL"
+ << ", delta_width: " << delta_width
+ << llendl;
+ }
+
+ S32 extra_shrink_width = 0;
+
+ if (still_should_be_processed)
+ {
+ extra_shrink_width = -delta_width;
+ llwarns << "There is no enough width to reshape all children: "
+ << extra_shrink_width << llendl;
+ }
+
+ return extra_shrink_width;
+}
+
+S32 LLChicletBar::getChicletPanelShrinkHeadroom() const
+{
+ static const S32 min_width = mChicletPanel->getMinWidth();
+ const S32 cur_width = mChicletPanel->getParent()->getRect().getWidth();
+
+ S32 shrink_headroom = cur_width - min_width;
+ llassert(shrink_headroom >= 0); // the panel cannot get narrower than the minimum
+ return shrink_headroom;
+}
+
+void LLChicletBar::fitWithTopInfoBar()
+{
+ LLPanelTopInfoBar& top_info_bar = LLPanelTopInfoBar::instance();
+
+ LLRect rect = getRect();
+ S32 width = rect.getWidth();
+
+ if (top_info_bar.getVisible())
+ {
+ S32 delta = top_info_bar.calcScreenRect().mRight - calcScreenRect().mLeft;
+ if (delta < 0 && rect.mLeft < llabs(delta))
+ delta = -rect.mLeft;
+ rect.setLeftTopAndSize(rect.mLeft + delta, rect.mTop, rect.getWidth(), rect.getHeight());
+ width = rect.getWidth() - delta;
+ }
+ else
+ {
+ LLView* parent = getParent();
+ if (parent)
+ {
+ LLRect parent_rect = parent->getRect();
+ rect.setLeftTopAndSize(0, rect.mTop, rect.getWidth(), rect.getHeight());
+ width = parent_rect.getWidth();
+ }
+ }
+
+ setRect(rect);
+ LLPanel::reshape(width, rect.getHeight(), false);
+}
diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h
new file mode 100644
index 0000000000..1427bf95e0
--- /dev/null
+++ b/indra/newview/llchicletbar.h
@@ -0,0 +1,105 @@
+/**
+* @file llchicletbar.h
+* @brief LLChicletBar class header file
+*
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2011, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+* $/LicenseInfo$
+*/
+
+#ifndef LL_LLCHICLETBAR_H
+#define LL_LLCHICLETBAR_H
+
+#include "llpanel.h"
+#include "llimview.h"
+
+class LLChicletPanel;
+class LLIMChiclet;
+class LLLayoutPanel;
+class LLLayoutStack;
+
+class LLChicletBar
+ : public LLSingleton<LLChicletBar>
+ , public LLPanel
+ , public LLIMSessionObserver
+{
+ LOG_CLASS(LLChicletBar);
+ friend class LLSingleton<LLChicletBar>;
+public:
+ ~LLChicletBar();
+
+ BOOL postBuild();
+
+ LLChicletPanel* getChicletPanel() { return mChicletPanel; }
+
+ // LLIMSessionObserver observe triggers
+ virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ virtual void sessionRemoved(const LLUUID& session_id);
+ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
+
+ S32 getTotalUnreadIMCount();
+
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
+
+ /**
+ * Creates IM Chiclet based on session type (IM chat or Group chat)
+ */
+ LLIMChiclet* createIMChiclet(const LLUUID& session_id);
+
+ /**
+ * Shows/hides panel with specified well button (IM or Notification)
+ *
+ * @param well_name - name of the well panel to be processed.
+ * @param visible - a flag specifying whether a button should be shown or hidden.
+ */
+ void showWellButton(const std::string& well_name, bool visible);
+
+private:
+ /**
+ * Updates child controls size and visibility when it is necessary to reduce total width.
+ *
+ * @param delta_width - value by which chiclet bar should be shrunk. It is a negative value.
+ * @returns positive value which chiclet bar can not process when it reaches its minimal width.
+ * Zero if there was enough space to process delta_width.
+ */
+ S32 processWidthDecreased(S32 delta_width);
+
+ /** helper function to log debug messages */
+ void log(LLView* panel, const std::string& descr);
+
+ /**
+ * @return difference between current chiclet panel width and the minimum.
+ */
+ S32 getChicletPanelShrinkHeadroom() const;
+
+ /**
+ * function adjusts Chiclet bar width to prevent overlapping with Mini-Location bar
+ * EXP-1463
+ */
+ void fitWithTopInfoBar();
+
+protected:
+ LLChicletBar(const LLSD& key = LLSD());
+
+ LLChicletPanel* mChicletPanel;
+ LLLayoutStack* mToolbarStack;
+};
+
+#endif // LL_LLCHICLETBAR_H
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 254c0adef1..54598f90c8 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -33,6 +33,7 @@
#include "llagentdata.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventory.h"
#include "llinventoryfunctions.h"
#include "lllistcontextmenu.h"
@@ -40,7 +41,6 @@
#include "llviewermenu.h"
#include "llwearableitemslist.h"
#include "llpaneloutfitedit.h"
-#include "llsidetray.h"
#include "lltrans.h"
static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables");
@@ -159,13 +159,8 @@ public:
protected:
static void replaceWearable(const LLUUID& item_id)
{
- // *TODO: Most probable that accessing to LLPanelOutfitEdit instance should be:
- // LLSideTray::getInstance()->getSidepanelAppearance()->getPanelOutfitEdit()
- // without casting. Getter methods provides possibility to check and construct
- // absent instance. Explicit relations between components avoids situations
- // when we tries to construct instance with unsatisfied implicit input conditions.
LLPanelOutfitEdit * panel_outfit_edit =
- dynamic_cast<LLPanelOutfitEdit*> (LLSideTray::getInstance()->getPanel(
+ dynamic_cast<LLPanelOutfitEdit*> (LLFloaterSidePanelContainer::getPanel("appearance",
"panel_outfit_edit"));
if (panel_outfit_edit != NULL)
{
@@ -235,9 +230,7 @@ protected:
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
LLUUID selected_id = mUUIDs.back();
- // *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel().
- // LLSideTray::getInstance()->getPanel() is rather slow variant
- LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
+ LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceMenuItemClicked, panel_oe, selected_id));
registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id));
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index d77ebc5367..5b942f283a 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -57,7 +57,6 @@ LLColorSwatchCtrl::Params::Params()
caption_text("caption_text"),
border("border")
{
- name = "colorswatch";
}
LLColorSwatchCtrl::LLColorSwatchCtrl(const Params& p)
diff --git a/indra/newview/llcylinder.cpp b/indra/newview/llcylinder.cpp
index 4901e29691..f353851a25 100644
--- a/indra/newview/llcylinder.cpp
+++ b/indra/newview/llcylinder.cpp
@@ -37,261 +37,39 @@
#include "llgl.h"
#include "llglheaders.h"
-LLCylinder gCylinder;
LLCone gCone;
-GLUquadricObj* gQuadObj = NULL;
-
-static const GLint SLICES[] = { 30, 20, 12, 6 }; // same as sphere slices
-static const GLint STACKS = 2;
-static const GLfloat RADIUS = 0.5f;
-
-// draws a cylinder or cone
-// returns approximate number of triangles required
-U32 draw_cylinder_side(GLint slices, GLint stacks, GLfloat base_radius, GLfloat top_radius)
-{
- U32 triangles = 0;
- GLfloat height = 1.0f;
-
- if (!gQuadObj)
- {
- gQuadObj = gluNewQuadric();
- if (!gQuadObj) llerror("draw_cylindrical_body couldn't allocated quadric", 0);
- }
-
- gluQuadricDrawStyle(gQuadObj, GLU_FILL);
- gluQuadricNormals(gQuadObj, GLU_SMOOTH);
- gluQuadricOrientation(gQuadObj, GLU_OUTSIDE);
- gluQuadricTexture(gQuadObj, GL_TRUE);
- gluCylinder(gQuadObj, base_radius, top_radius, height, slices, stacks);
- triangles += stacks * (slices * 2);
-
-
- return triangles;
-}
-
-
-// Returns number of triangles required to draw
-// Need to know if top or not to set lighting normals
-const BOOL TOP = TRUE;
-const BOOL BOTTOM = FALSE;
-U32 draw_cylinder_cap(GLint slices, GLfloat base_radius, BOOL is_top)
-{
- U32 triangles = 0;
-
- if (!gQuadObj)
- {
- gQuadObj = gluNewQuadric();
- if (!gQuadObj) llerror("draw_cylinder_base couldn't allocated quadric", 0);
- }
-
- gluQuadricDrawStyle(gQuadObj, GLU_FILL);
- gluQuadricNormals(gQuadObj, GLU_SMOOTH);
- gluQuadricOrientation(gQuadObj, GLU_OUTSIDE);
- gluQuadricTexture(gQuadObj, GL_TRUE);
-
- // no hole in the middle of the disk, and just one ring
- GLdouble inner_radius = 0.0;
- GLint rings = 1;
-
- // normals point in +z for top, -z for base
- if (is_top)
- {
- gluQuadricOrientation(gQuadObj, GLU_OUTSIDE);
- }
- else
- {
- gluQuadricOrientation(gQuadObj, GLU_INSIDE);
- }
- gluDisk(gQuadObj, inner_radius, base_radius, slices, rings);
- triangles += slices;
-
- return triangles;
-}
-
-void LLCylinder::drawSide(S32 detail)
-{
- draw_cylinder_side(SLICES[detail], STACKS, RADIUS, RADIUS);
-}
-
-void LLCylinder::drawTop(S32 detail)
-{
- draw_cylinder_cap(SLICES[detail], RADIUS, TOP);
-}
-
-void LLCylinder::drawBottom(S32 detail)
-{
- draw_cylinder_cap(SLICES[detail], RADIUS, BOTTOM);
-}
-
-void LLCylinder::prerender()
-{
-}
-
-void LLCylinder::cleanupGL()
-{
- if (gQuadObj)
- {
- gluDeleteQuadric(gQuadObj);
- gQuadObj = NULL;
- }
-}
-
-void LLCylinder::render(F32 pixel_area)
-{
- renderface(pixel_area, 0);
- renderface(pixel_area, 1);
- renderface(pixel_area, 2);
-}
-
-
-void LLCylinder::renderface(F32 pixel_area, S32 face)
-{
- if (face < 0 || face > 2)
- {
- llerror("LLCylinder::renderface() invalid face number", face);
- return;
- }
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
-
- S32 level_of_detail;
-
- if (pixel_area > 20000.f)
- {
- level_of_detail = 0;
- }
- else if (pixel_area > 1600.f)
- {
- level_of_detail = 1;
- }
- else if (pixel_area > 200.f)
- {
- level_of_detail = 2;
- }
- else
- {
- level_of_detail = 3;
- }
-
- if (level_of_detail < 0 || CYLINDER_LEVELS_OF_DETAIL <= level_of_detail)
- {
- llerror("LLCylinder::renderface() invalid level of detail", level_of_detail);
- return;
- }
-
- LLVertexBuffer::unbind();
-
- switch(face)
- {
- case 0:
- glTranslatef(0.f, 0.f, -0.5f);
- drawSide(level_of_detail);
- break;
- case 1:
- glTranslatef(0.0f, 0.f, 0.5f);
- drawTop(level_of_detail);
- break;
- case 2:
- glTranslatef(0.0f, 0.f, -0.5f);
- drawBottom(level_of_detail);
- break;
- default:
- llerror("LLCylinder::renderface() fell out of switch", 0);
- break;
- }
-
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-}
-
-
//
// Cones
//
-void LLCone::prerender()
+void LLCone::render(S32 sides)
{
-}
+ gGL.begin(LLRender::TRIANGLE_FAN);
+ gGL.vertex3f(0,0,0);
-void LLCone::cleanupGL()
-{
- if (gQuadObj)
+ for (U32 i = 0; i < sides; i++)
{
- gluDeleteQuadric(gQuadObj);
- gQuadObj = NULL;
+ F32 a = (F32) i/sides * F_PI*2.f;
+ F32 x = cosf(a)*0.5f;
+ F32 y = sinf(a)*0.5f;
+ gGL.vertex3f(x,y,-.5f);
}
-}
+ gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, -0.5f);
-void LLCone::drawSide(S32 detail)
-{
- draw_cylinder_side( SLICES[detail], STACKS, RADIUS, 0.f );
-}
-
-void LLCone::drawBottom(S32 detail)
-{
- draw_cylinder_cap( SLICES[detail], RADIUS, BOTTOM );
-}
-
-void LLCone::render(S32 level_of_detail)
-{
- GLfloat height = 1.0f;
+ gGL.end();
- if (level_of_detail < 0 || CONE_LEVELS_OF_DETAIL <= level_of_detail)
+ gGL.begin(LLRender::TRIANGLE_FAN);
+ gGL.vertex3f(0.f, 0.f, 0.5f);
+ for (U32 i = 0; i < sides; i++)
{
- llerror("LLCone::render() invalid level of detail", level_of_detail);
- return;
+ F32 a = (F32) i/sides * F_PI*2.f;
+ F32 x = cosf(a)*0.5f;
+ F32 y = sinf(a)*0.5f;
+ gGL.vertex3f(x,y,-0.5f);
}
+ gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, -0.5f);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
-
- // center object at 0
- glTranslatef(0.f, 0.f, - height / 2.0f);
-
- drawSide(level_of_detail);
- drawBottom(level_of_detail);
-
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.end();
}
-
-void LLCone::renderface(S32 level_of_detail, S32 face)
-{
- if (face < 0 || face > 1)
- {
- llerror("LLCone::renderface() invalid face number", face);
- return;
- }
-
- if (level_of_detail < 0 || CONE_LEVELS_OF_DETAIL <= level_of_detail)
- {
- llerror("LLCone::renderface() invalid level of detail", level_of_detail);
- return;
- }
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
-
- LLVertexBuffer::unbind();
-
- switch(face)
- {
- case 0:
- glTranslatef(0.f, 0.f, -0.5f);
- drawSide(level_of_detail);
- break;
- case 1:
- glTranslatef(0.f, 0.f, -0.5f);
- drawBottom(level_of_detail);
- break;
- default:
- llerror("LLCylinder::renderface() fell out of switch", 0);
- break;
- }
-
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-}
diff --git a/indra/newview/llcylinder.h b/indra/newview/llcylinder.h
index 40a669ceb6..4369f06659 100644
--- a/indra/newview/llcylinder.h
+++ b/indra/newview/llcylinder.h
@@ -30,45 +30,18 @@
//#include "stdtypes.h"
//#include "llgl.h"
-//
-// Cylinders
-//
-const S32 CYLINDER_LEVELS_OF_DETAIL = 4;
-const S32 CYLINDER_FACES = 3;
-
-class LLCylinder
-{
-public:
- void prerender();
- void drawTop(S32 detail);
- void drawSide(S32 detail);
- void drawBottom(S32 detail);
- void cleanupGL();
-
- void render(F32 pixel_area);
- void renderface(F32 pixel_area, S32 face);
-};
-
+#include "llvertexbuffer.h"
//
// Cones
//
-const S32 CONE_LOD_HIGHEST = 0;
-const S32 CONE_LEVELS_OF_DETAIL = 4;
-const S32 CONE_FACES = 2;
-
class LLCone
{
public:
- void prerender();
- void cleanupGL();
- void drawSide(S32 detail);
- void drawBottom(S32 detail);
- void render(S32 level_of_detail);
- void renderface(S32 level_of_detail, S32 face);
+ void render(S32 sides = 12);
};
-extern LLCylinder gCylinder;
+
extern LLCone gCone;
#endif
diff --git a/indra/newview/lldateutil.cpp b/indra/newview/lldateutil.cpp
index 18ae6107e7..c7fc45f61e 100644
--- a/indra/newview/lldateutil.cpp
+++ b/indra/newview/lldateutil.cpp
@@ -27,10 +27,16 @@
#include "lldateutil.h"
+#include <boost/date_time/gregorian/gregorian.hpp>
+#include <boost/date_time/posix_time/ptime.hpp>
+
// Linden libraries
#include "lltrans.h"
#include "llui.h"
+using namespace boost::gregorian;
+using namespace boost::posix_time;
+
static S32 DAYS_PER_MONTH_NOLEAP[] =
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static S32 DAYS_PER_MONTH_LEAP[] =
@@ -186,3 +192,24 @@ std::string LLDateUtil::ageFromDate(const std::string& date_string)
//{
// return ageFromDateISO(date_string, LLDate::now());
//}
+
+S32 LLDateUtil::secondsSinceEpochFromString(const std::string& format, const std::string& str)
+{
+ date_input_facet *facet = new date_input_facet(format);
+
+ std::stringstream ss;
+ ss << str;
+ ss.imbue(std::locale(ss.getloc(), facet));
+
+ date d;
+ ss >> d;
+
+ ptime time_t_date(d);
+ ptime time_t_epoch(date(1970,1,1));
+
+ // We assume that the date defined by str is in UTC, so the difference
+ // is calculated with no time zone corrections.
+ time_duration diff = time_t_date - time_t_epoch;
+
+ return diff.total_seconds();
+}
diff --git a/indra/newview/lldateutil.h b/indra/newview/lldateutil.h
index 2843a357c9..f027d360f7 100644
--- a/indra/newview/lldateutil.h
+++ b/indra/newview/lldateutil.h
@@ -69,6 +69,20 @@ namespace LLDateUtil
//std::string ageFromDateISO(const std::string& date_string);
//std::string ageFromDate(S32 born_year, S32 born_month, S32 born_day, const LLDate& now);
+
+ /**
+ * Convert a string of a specified date format into seconds since the Epoch.
+ *
+ * Many of the format flags are those used by strftime(...), but not all.
+ * For the full list of supported time format specifiers
+ * see http://www.boost.org/doc/libs/1_47_0/doc/html/date_time/date_time_io.html#date_time.format_flags
+ *
+ * @param format Format characters string. Example: "%A %b %d, %Y"
+ * @param str Date string containing the time in specified format.
+ *
+ * @return Number of seconds since 01/01/1970 UTC.
+ */
+ S32 secondsSinceEpochFromString(const std::string& format, const std::string& str);
}
#endif
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 216cc66ef8..ba511a3693 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -41,6 +41,7 @@
#include "llmemoryview.h"
#include "llsceneview.h"
#include "llviewertexture.h"
+#include "llfloaterreg.h"
//
// Globals
@@ -79,12 +80,7 @@ void LLDebugView::init()
r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
(S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
- mFastTimerView = new LLFastTimerView(r);
- mFastTimerView->setFollowsTop();
- mFastTimerView->setFollowsLeft();
- mFastTimerView->setVisible(FALSE); // start invisible
- addChild(mFastTimerView);
- mFastTimerView->setRect(rect);
+ mFastTimerView = dynamic_cast<LLFastTimerView*>(LLFloaterReg::getInstance("fast_timers"));
gSceneView = new LLSceneView(r);
gSceneView->setFollowsTop();
@@ -151,3 +147,12 @@ LLDebugView::~LLDebugView()
gTextureCategoryView = NULL;
}
+void LLDebugView::draw()
+{
+ LLView* floater_snap_region = getRootView()->getChildView("floater_snap_region");
+ LLRect debug_rect;
+ floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &debug_rect, getParent());
+
+ setShape(debug_rect);
+ LLView::draw();
+}
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index 5245f163c0..907a42c981 100644
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -48,13 +48,14 @@ public:
{
Params()
{
- mouse_opaque = false;
+ changeDefault(mouse_opaque, false);
}
};
LLDebugView(const Params&);
~LLDebugView();
void init();
+ void draw();
void setStatsVisible(BOOL visible);
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index dd243397a1..1e03582a29 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -217,12 +217,12 @@ OSStatus LLDirPicker::doNavChooseDialog()
error = NavCreateChooseFolderDialog(&mNavOptions, &doNavCallbackEvent, NULL, NULL, &navRef);
- gViewerWindow->mWindow->beforeDialog();
+ gViewerWindow->getWindow()->beforeDialog();
if (error == noErr)
error = NavDialogRun(navRef);
- gViewerWindow->mWindow->afterDialog();
+ gViewerWindow->getWindow()->afterDialog();
if (error == noErr)
error = NavDialogGetReply(navRef, &navReply);
diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp
index 8a38c8a643..7c9dda6b1d 100644
--- a/indra/newview/lldndbutton.cpp
+++ b/indra/newview/lldndbutton.cpp
@@ -31,16 +31,9 @@
static LLDefaultChildRegistry::Register<LLDragAndDropButton> r("dnd_button");
-LLDragAndDropButton::Params::Params()
-{
-
-}
-
LLDragAndDropButton::LLDragAndDropButton(const Params& params)
: LLButton(params)
-{
-
-}
+{}
BOOL LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
{
diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h
index 0642cbb7b9..53ea2f5ea7 100644
--- a/indra/newview/lldndbutton.h
+++ b/indra/newview/lldndbutton.h
@@ -43,10 +43,7 @@
class LLDragAndDropButton : public LLButton
{
public:
- struct Params : public LLInitParam::Block<Params, LLButton::Params>
- {
- Params();
- };
+ struct Params : public LLInitParam::Block<Params, LLButton::Params> {};
LLDragAndDropButton(const Params& params);
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index fa7d6e2a40..35f8a85796 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -190,15 +190,16 @@ void LLDrawPool::renderPostDeferred(S32 pass)
//virtual
void LLDrawPool::endRenderPass( S32 pass )
{
- for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++)
+ /*for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++)
{ //dummy cleanup of any currently bound textures
if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE)
{
gGL.getTexUnit(i)->unbind(gGL.getTexUnit(i)->getCurrType());
gGL.getTexUnit(i)->disable();
}
- }
+ }*/
+ //make sure channel 0 is active channel
gGL.getTexUnit(0)->activate();
}
@@ -383,7 +384,7 @@ BOOL LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = FALSE;
void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4& color)
{
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
}
void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4U& color)
@@ -393,7 +394,7 @@ void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4U& color)
void LLFacePool::LLOverrideFaceColor::setColor(F32 r, F32 g, F32 b, F32 a)
{
- glColor4f(r,g,b,a);
+ gGL.diffuseColor4f(r,g,b,a);
}
@@ -456,10 +457,10 @@ void LLRenderPass::applyModelMatrix(LLDrawInfo& params)
if (params.mModelMatrix != gGLLastMatrix)
{
gGLLastMatrix = params.mModelMatrix;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
if (params.mModelMatrix)
{
- glMultMatrixf((GLfloat*) params.mModelMatrix->mMatrix);
+ gGL.multMatrix((GLfloat*) params.mModelMatrix->mMatrix);
}
gPipeline.mMatrixOpCount++;
}
@@ -493,8 +494,8 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba
{
tex_setup = true;
gGL.getTexUnit(0)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
}
}
@@ -518,8 +519,8 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba
if (tex_setup)
{
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index ad7e3ad593..ddb7d3ceeb 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -54,7 +54,7 @@ static BOOL deferred_render = FALSE;
LLDrawPoolAlpha::LLDrawPoolAlpha(U32 type) :
LLRenderPass(type), current_shader(NULL), target_shader(NULL),
- simple_shader(NULL), fullbright_shader(NULL),
+ simple_shader(NULL), fullbright_shader(NULL), emissive_shader(NULL),
mColorSFactor(LLRender::BF_UNDEF), mColorDFactor(LLRender::BF_UNDEF),
mAlphaSFactor(LLRender::BF_UNDEF), mAlphaDFactor(LLRender::BF_UNDEF)
{
@@ -88,16 +88,13 @@ void LLDrawPoolAlpha::endDeferredPass(S32 pass)
void LLDrawPoolAlpha::renderDeferred(S32 pass)
{
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
- {
- LLFastTimer t(FTM_RENDER_GRASS);
- gDeferredTreeProgram.bind();
- LLGLEnable test(GL_ALPHA_TEST);
- //render alpha masked objects
- LLRenderPass::renderTexture(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask());
- gDeferredTreeProgram.unbind();
- }
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ LLFastTimer t(FTM_RENDER_GRASS);
+ gDeferredDiffuseAlphaMaskProgram.bind();
+ gDeferredDiffuseAlphaMaskProgram.setMinimumAlpha(0.33f);
+
+ //render alpha masked objects
+ LLRenderPass::pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+ gDeferredDiffuseAlphaMaskProgram.unbind();
}
@@ -124,7 +121,7 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
if (pass == 0)
{
simple_shader = &gDeferredAlphaProgram;
- fullbright_shader = &gObjectFullbrightProgram;
+ fullbright_shader = &gObjectFullbrightAlphaMaskProgram;
//prime simple shader (loads shadow relevant uniforms)
gPipeline.bindDeferredShader(*simple_shader);
@@ -138,6 +135,8 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
gPipeline.mDeferredDepth.bindTarget();
simple_shader = NULL;
fullbright_shader = NULL;
+ gObjectFullbrightAlphaMaskProgram.bind();
+ gObjectFullbrightAlphaMaskProgram.setMinimumAlpha(0.33f);
}
deferred_render = TRUE;
@@ -156,6 +155,7 @@ void LLDrawPoolAlpha::endPostDeferredPass(S32 pass)
{
gPipeline.mDeferredDepth.flush();
gPipeline.mScreen.bindTarget();
+ gObjectFullbrightAlphaMaskProgram.unbind();
}
deferred_render = FALSE;
@@ -173,13 +173,15 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass)
if (LLPipeline::sUnderWaterRender)
{
- simple_shader = &gObjectSimpleWaterProgram;
- fullbright_shader = &gObjectFullbrightWaterProgram;
+ simple_shader = &gObjectSimpleWaterAlphaMaskProgram;
+ fullbright_shader = &gObjectFullbrightWaterAlphaMaskProgram;
+ emissive_shader = &gObjectEmissiveWaterProgram;
}
else
{
- simple_shader = &gObjectSimpleProgram;
- fullbright_shader = &gObjectFullbrightProgram;
+ simple_shader = &gObjectSimpleAlphaMaskProgram;
+ fullbright_shader = &gObjectFullbrightAlphaMaskProgram;
+ emissive_shader = &gObjectEmissiveProgram;
}
if (mVertexShaderLevel > 0)
@@ -225,29 +227,32 @@ void LLDrawPoolAlpha::render(S32 pass)
mAlphaDFactor = LLRender::BF_ZERO; // block (zero-out) glow where the alpha test succeeds
gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.33f);
if (mVertexShaderLevel > 0)
{
- if (!LLPipeline::sRenderDeferred)
+ if (!LLPipeline::sRenderDeferred || !deferred_render)
{
simple_shader->bind();
+ simple_shader->setMinimumAlpha(0.33f);
+
pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
if (fullbright_shader)
{
fullbright_shader->bind();
+ fullbright_shader->setMinimumAlpha(0.33f);
}
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
- LLGLSLShader::bindNoShader();
+ //LLGLSLShader::bindNoShader();
}
else
{
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.33f); //OK
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask());
gPipeline.enableLightsDynamic();
pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask());
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); //OK
}
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
LLGLDepthTest depth(GL_TRUE, LLDrawPoolWater::sSkipScreenCopy ||
@@ -255,7 +260,6 @@ void LLDrawPoolAlpha::render(S32 pass)
if (deferred_render && pass == 1)
{
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.33f);
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
}
else
@@ -266,13 +270,33 @@ void LLDrawPoolAlpha::render(S32 pass)
mAlphaDFactor = LLRender::BF_ONE_MINUS_SOURCE_ALPHA; // }
gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
- if (LLPipeline::sImpostorRender)
+ if (mVertexShaderLevel > 0)
{
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
+ if (LLPipeline::sImpostorRender)
+ {
+ fullbright_shader->bind();
+ fullbright_shader->setMinimumAlpha(0.5f);
+ simple_shader->bind();
+ simple_shader->setMinimumAlpha(0.5f);
+ }
+ else
+ {
+ fullbright_shader->bind();
+ fullbright_shader->setMinimumAlpha(0.f);
+ simple_shader->bind();
+ simple_shader->setMinimumAlpha(0.f);
+ }
}
else
{
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ if (LLPipeline::sImpostorRender)
+ {
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); //OK
+ }
+ else
+ {
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); //OK
+ }
}
}
@@ -289,7 +313,6 @@ void LLDrawPoolAlpha::render(S32 pass)
if (deferred_render && pass == 1)
{
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
@@ -298,20 +321,26 @@ void LLDrawPoolAlpha::render(S32 pass)
BOOL shaders = gPipeline.canUseVertexShaders();
if(shaders)
{
- gObjectFullbrightNonIndexedProgram.bind();
+ gHighlightProgram.bind();
}
else
{
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
}
- glColor4f(1,0,0,1);
+
+ gGL.diffuseColor4f(1,0,0,1);
+
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ;
renderAlphaHighlight(LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0);
+
+ pushBatches(LLRenderPass::PASS_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
+ pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
+
if(shaders)
{
- gObjectFullbrightNonIndexedProgram.unbind();
+ gHighlightProgram.unbind();
}
}
}
@@ -451,8 +480,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
{
tex_setup = true;
gGL.getTexUnit(0)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
}
}
@@ -467,30 +496,34 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls could be expensive, but glow must be drawn Z-sorted with alpha.
- if (draw_glow_for_this_partition &&
- params.mGlowColor.mV[3] > 0)
+ if (current_shader &&
+ draw_glow_for_this_partition &&
+ params.mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_EMISSIVE))
{
// install glow-accumulating blend mode
gGL.blendFunc(LLRender::BF_ZERO, LLRender::BF_ONE, // don't touch color
LLRender::BF_ONE, LLRender::BF_ONE); // add to alpha (glow)
+ emissive_shader->bind();
+
// glow doesn't use vertex colors from the mesh data
- params.mVertexBuffer->setBuffer(mask & ~LLVertexBuffer::MAP_COLOR);
- glColor4ubv(params.mGlowColor.mV);
-
+ params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
+
// do the actual drawing, again
params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
// restore our alpha blend mode
gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
+
+ current_shader->bind();
}
if (tex_setup)
{
gGL.getTexUnit(0)->activate();
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
}
}
diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h
index 12a7ae92b1..a4245e561d 100644
--- a/indra/newview/lldrawpoolalpha.h
+++ b/indra/newview/lldrawpoolalpha.h
@@ -78,6 +78,7 @@ private:
LLGLSLShader* target_shader;
LLGLSLShader* simple_shader;
LLGLSLShader* fullbright_shader;
+ LLGLSLShader* emissive_shader;
// our 'normal' alpha blend function for this pass
LLRender::eBlendFactor mColorSFactor;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 9f790d03fe..55b314fbb1 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -258,13 +258,11 @@ void LLDrawPoolAvatar::beginPostDeferredAlpha()
sSkipOpaque = TRUE;
sShaderLevel = mVertexShaderLevel;
sVertexProgram = &gDeferredAvatarAlphaProgram;
-
sRenderingSkinned = TRUE;
gPipeline.bindDeferredShader(*sVertexProgram);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
}
void LLDrawPoolAvatar::beginDeferredRiggedAlpha()
@@ -272,7 +270,6 @@ void LLDrawPoolAvatar::beginDeferredRiggedAlpha()
sVertexProgram = &gDeferredSkinnedAlphaProgram;
gPipeline.bindDeferredShader(*sVertexProgram);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
gPipeline.enableLightsDynamic();
}
@@ -281,7 +278,6 @@ void LLDrawPoolAvatar::endDeferredRiggedAlpha()
LLVertexBuffer::unbind();
gPipeline.unbindDeferredShader(*sVertexProgram);
sDiffuseChannel = 0;
- LLVertexBuffer::sWeight4Loc = -1;
sVertexProgram = NULL;
}
@@ -315,8 +311,7 @@ void LLDrawPoolAvatar::endPostDeferredAlpha()
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
sRenderingSkinned = FALSE;
sSkipOpaque = FALSE;
- disable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
-
+
gPipeline.unbindDeferredShader(*sVertexProgram);
sDiffuseChannel = 0;
sShaderLevel = mVertexShaderLevel;
@@ -357,27 +352,22 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
if (pass == 0)
{
sVertexProgram = &gDeferredAvatarShadowProgram;
- if (sShaderLevel > 0)
- {
- gAvatarMatrixParam = sVertexProgram->mUniform[LLViewerShaderMgr::AVATAR_MATRIX];
- }
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.2f);
- glColor4f(1,1,1,1);
+ //gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.2f);
if ((sShaderLevel > 0)) // for hardware blending
{
sRenderingSkinned = TRUE;
sVertexProgram->bind();
- enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
}
+
+ gGL.diffuseColor4f(1,1,1,1);
}
else
{
sVertexProgram = &gDeferredAttachmentShadowProgram;
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->bind();
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
}
}
@@ -390,14 +380,12 @@ void LLDrawPoolAvatar::endShadowPass(S32 pass)
{
sRenderingSkinned = FALSE;
sVertexProgram->unbind();
- disable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
}
}
else
{
LLVertexBuffer::unbind();
sVertexProgram->unbind();
- LLVertexBuffer::sWeight4Loc = -1;
sVertexProgram = NULL;
}
}
@@ -431,11 +419,6 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
if (pass == 0)
{
- if (sShaderLevel > 0)
- {
- gAvatarMatrixParam = sVertexProgram->mUniform[LLViewerShaderMgr::AVATAR_MATRIX];
- }
-
avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE);
}
else
@@ -493,11 +476,6 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)
//reset vertex buffer mappings
LLVertexBuffer::unbind();
- if (pass == 0)
- { //make sure no stale colors are left over from a previous render
- glColor4f(1,1,1,1);
- }
-
if (LLPipeline::sImpostorRender)
{ //impostor render does not have impostors or rigid rendering
pass += 2;
@@ -536,6 +514,11 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)
beginRiggedGlow();
break;
}
+
+ if (pass == 0)
+ { //make sure no stale colors are left over from a previous render
+ gGL.diffuseColor4f(1,1,1,1);
+ }
}
void LLDrawPoolAvatar::endRenderPass(S32 pass)
@@ -590,12 +573,22 @@ void LLDrawPoolAvatar::beginImpostor()
LLVOAvatar::sNumVisibleAvatars = 0;
}
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gImpostorProgram.bind();
+ gImpostorProgram.setMinimumAlpha(0.01f);
+ }
+
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
sDiffuseChannel = 0;
}
void LLDrawPoolAvatar::endImpostor()
{
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gImpostorProgram.unbind();
+ }
gPipeline.enableLightsDynamic();
}
@@ -605,16 +598,17 @@ void LLDrawPoolAvatar::beginRigid()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
+ sVertexProgram = &gObjectAlphaMaskNoColorWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleNonIndexedProgram;
+ sVertexProgram = &gObjectAlphaMaskNoColorProgram;
}
if (sVertexProgram != NULL)
{ //eyeballs render with the specular shader
sVertexProgram->bind();
+ sVertexProgram->setMinimumAlpha(0.2f);
}
}
else
@@ -647,6 +641,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->bind();
+ sVertexProgram->setMinimumAlpha(0.01f);
}
void LLDrawPoolAvatar::endDeferredImpostor()
@@ -661,14 +656,16 @@ void LLDrawPoolAvatar::endDeferredImpostor()
void LLDrawPoolAvatar::beginDeferredRigid()
{
- sVertexProgram = &gDeferredNonIndexedDiffuseProgram;
-
+ sVertexProgram = &gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
+ sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->bind();
+ sVertexProgram->setMinimumAlpha(0.2f);
}
void LLDrawPoolAvatar::endDeferredRigid()
{
sShaderLevel = mVertexShaderLevel;
+ sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->unbind();
gGL.getTexUnit(0)->activate();
}
@@ -692,11 +689,11 @@ void LLDrawPoolAvatar::beginSkinned()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
+ sVertexProgram = &gObjectAlphaMaskNoColorWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleNonIndexedProgram;
+ sVertexProgram = &gObjectAlphaMaskNoColorProgram;
}
}
@@ -705,17 +702,6 @@ void LLDrawPoolAvatar::beginSkinned()
sRenderingSkinned = TRUE;
sVertexProgram->bind();
- if (sShaderLevel >= SHADER_LEVEL_CLOTH)
- {
- enable_cloth_weights(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_CLOTHING]);
- }
- enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
-
- if (sShaderLevel >= SHADER_LEVEL_BUMP)
- {
- enable_binormals(sVertexProgram->mAttribute[LLViewerShaderMgr::BINORMAL]);
- }
-
sVertexProgram->enableTexture(LLViewerShaderMgr::BUMP_MAP);
gGL.getTexUnit(0)->activate();
}
@@ -728,6 +714,11 @@ void LLDrawPoolAvatar::beginSkinned()
sVertexProgram->bind();
}
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ sVertexProgram->setMinimumAlpha(0.2f);
+ }
}
void LLDrawPoolAvatar::endSkinned()
@@ -738,16 +729,6 @@ void LLDrawPoolAvatar::endSkinned()
sRenderingSkinned = FALSE;
sVertexProgram->disableTexture(LLViewerShaderMgr::BUMP_MAP);
gGL.getTexUnit(0)->activate();
- disable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
- if (sShaderLevel >= SHADER_LEVEL_BUMP)
- {
- disable_binormals(sVertexProgram->mAttribute[LLViewerShaderMgr::BINORMAL]);
- }
- if ((sShaderLevel >= SHADER_LEVEL_CLOTH))
- {
- disable_cloth_weights(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_CLOTHING]);
- }
-
sVertexProgram->unbind();
sShaderLevel = mVertexShaderLevel;
}
@@ -793,7 +774,6 @@ void LLDrawPoolAvatar::beginRiggedSimple()
{
sDiffuseChannel = 0;
sVertexProgram->bind();
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
}
}
@@ -804,7 +784,6 @@ void LLDrawPoolAvatar::endRiggedSimple()
{
sVertexProgram->unbind();
sVertexProgram = NULL;
- LLVertexBuffer::sWeight4Loc = -1;
}
}
@@ -831,7 +810,34 @@ void LLDrawPoolAvatar::endRiggedFullbrightAlpha()
void LLDrawPoolAvatar::beginRiggedGlow()
{
- beginRiggedFullbright();
+ if (sShaderLevel > 0)
+ {
+ if (LLPipeline::sUnderWaterRender)
+ {
+ sVertexProgram = &gSkinnedObjectEmissiveWaterProgram;
+ }
+ else
+ {
+ sVertexProgram = &gSkinnedObjectEmissiveProgram;
+ }
+ }
+ else
+ {
+ if (LLPipeline::sUnderWaterRender)
+ {
+ sVertexProgram = &gObjectEmissiveNonIndexedWaterProgram;
+ }
+ else
+ {
+ sVertexProgram = &gObjectEmissiveNonIndexedProgram;
+ }
+ }
+
+ if (sShaderLevel > 0 || gPipeline.canUseVertexShaders())
+ {
+ sDiffuseChannel = 0;
+ sVertexProgram->bind();
+ }
}
void LLDrawPoolAvatar::endRiggedGlow()
@@ -868,7 +874,6 @@ void LLDrawPoolAvatar::beginRiggedFullbright()
{
sDiffuseChannel = 0;
sVertexProgram->bind();
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
}
}
@@ -879,7 +884,6 @@ void LLDrawPoolAvatar::endRiggedFullbright()
{
sVertexProgram->unbind();
sVertexProgram = NULL;
- LLVertexBuffer::sWeight4Loc = -1;
}
}
@@ -912,7 +916,6 @@ void LLDrawPoolAvatar::beginRiggedShinySimple()
{
sVertexProgram->bind();
LLDrawPoolBump::bindCubeMap(sVertexProgram, 2, sDiffuseChannel, cube_channel, false);
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
}
}
@@ -924,7 +927,6 @@ void LLDrawPoolAvatar::endRiggedShinySimple()
LLDrawPoolBump::unbindCubeMap(sVertexProgram, 2, sDiffuseChannel, cube_channel, false);
sVertexProgram->unbind();
sVertexProgram = NULL;
- LLVertexBuffer::sWeight4Loc = -1;
}
}
@@ -958,7 +960,6 @@ void LLDrawPoolAvatar::beginRiggedFullbrightShiny()
{
sVertexProgram->bind();
LLDrawPoolBump::bindCubeMap(sVertexProgram, 2, sDiffuseChannel, cube_channel, false);
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
}
}
@@ -970,7 +971,6 @@ void LLDrawPoolAvatar::endRiggedFullbrightShiny()
LLDrawPoolBump::unbindCubeMap(sVertexProgram, 2, sDiffuseChannel, cube_channel, false);
sVertexProgram->unbind();
sVertexProgram = NULL;
- LLVertexBuffer::sWeight4Loc = -1;
}
}
@@ -980,14 +980,12 @@ void LLDrawPoolAvatar::beginDeferredRiggedSimple()
sVertexProgram = &gDeferredSkinnedDiffuseProgram;
sDiffuseChannel = 0;
sVertexProgram->bind();
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
}
void LLDrawPoolAvatar::endDeferredRiggedSimple()
{
LLVertexBuffer::unbind();
sVertexProgram->unbind();
- LLVertexBuffer::sWeight4Loc = -1;
sVertexProgram = NULL;
}
@@ -997,7 +995,6 @@ void LLDrawPoolAvatar::beginDeferredRiggedBump()
sVertexProgram->bind();
normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::BUMP_MAP);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
}
void LLDrawPoolAvatar::endDeferredRiggedBump()
@@ -1006,7 +1003,6 @@ void LLDrawPoolAvatar::endDeferredRiggedBump()
sVertexProgram->disableTexture(LLViewerShaderMgr::BUMP_MAP);
sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->unbind();
- LLVertexBuffer::sWeight4Loc = -1;
normal_channel = -1;
sDiffuseChannel = 0;
sVertexProgram = NULL;
@@ -1016,14 +1012,12 @@ void LLDrawPoolAvatar::beginDeferredSkinned()
{
sShaderLevel = mVertexShaderLevel;
sVertexProgram = &gDeferredAvatarProgram;
-
sRenderingSkinned = TRUE;
sVertexProgram->bind();
+ sVertexProgram->setMinimumAlpha(0.2f);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
-
gGL.getTexUnit(0)->activate();
}
@@ -1031,7 +1025,6 @@ void LLDrawPoolAvatar::endDeferredSkinned()
{
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
sRenderingSkinned = FALSE;
- disable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
sVertexProgram->unbind();
sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@@ -1145,10 +1138,10 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- if (single_avatar && avatarp->mSpecialRenderMode >= 1) // 1=anim preview, 2=image preview, 3=morph view
+ /*if (single_avatar && avatarp->mSpecialRenderMode >= 1) // 1=anim preview, 2=image preview, 3=morph view
{
gPipeline.enableLightsAvatarEdit(LLColor4(.5f, .5f, .5f, 1.f));
- }
+ }*/
if (pass == 1)
{
@@ -1239,11 +1232,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- if (sShaderLevel > 0)
- {
- gAvatarMatrixParam = sVertexProgram->mUniform[LLViewerShaderMgr::AVATAR_MATRIX];
- }
-
if ((sShaderLevel >= SHADER_LEVEL_CLOTH))
{
LLMatrix4 rot_mat;
@@ -1257,16 +1245,16 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
wind = wind * rot_mat;
wind.mV[VW] = avatarp->mWindVec.mV[VW];
- sVertexProgram->vertexAttrib4fv(LLViewerShaderMgr::AVATAR_WIND, wind.mV);
+ sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_WIND, 1, wind.mV);
F32 phase = -1.f * (avatarp->mRipplePhase);
F32 freq = 7.f + (noise1(avatarp->mRipplePhase) * 2.f);
LLVector4 sin_params(freq, freq, freq, phase);
- sVertexProgram->vertexAttrib4fv(LLViewerShaderMgr::AVATAR_SINWAVE, sin_params.mV);
+ sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_SINWAVE, 1, sin_params.mV);
LLVector4 gravity(0.f, 0.f, -CLOTHING_GRAVITY_EFFECT, 0.f);
gravity = gravity * rot_mat;
- sVertexProgram->vertexAttrib4fv(LLViewerShaderMgr::AVATAR_GRAVITY, gravity.mV);
+ sVertexProgram->uniform4fv(LLViewerShaderMgr::AVATAR_GRAVITY, 1, gravity.mV);
}
if( !single_avatar || (avatarp == single_avatar) )
@@ -1283,30 +1271,38 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
return;
}
- LLVertexBuffer* buffer = face->getVertexBuffer();
+ LLPointer<LLVertexBuffer> buffer = face->getVertexBuffer();
+ LLDrawable* drawable = face->getDrawable();
U32 data_mask = face->getRiggedVertexBufferDataMask();
- if (!buffer ||
+ if (buffer.isNull() ||
buffer->getTypeMask() != data_mask ||
- buffer->getRequestedVerts() != vol_face.mNumVertices)
+ buffer->getNumVerts() != vol_face.mNumVertices ||
+ buffer->getNumIndices() != vol_face.mNumIndices ||
+ (drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
face->setGeomIndex(0);
face->setIndicesIndex(0);
- face->setSize(vol_face.mNumVertices, vol_face.mNumIndices, true);
-
-
- if (sShaderLevel > 0)
- {
- buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB);
+
+ if (buffer.isNull() || buffer->getTypeMask() != data_mask)
+ { //make a new buffer
+ if (sShaderLevel > 0)
+ {
+ buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB);
+ }
+ else
+ {
+ buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB);
+ }
+ buffer->allocateBuffer(vol_face.mNumVertices, vol_face.mNumIndices, true);
}
else
- {
- buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB);
+ { //resize existing buffer
+ buffer->resizeBuffer(vol_face.mNumVertices, vol_face.mNumIndices);
}
- buffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), true);
-
+ face->setSize(vol_face.mNumVertices, vol_face.mNumIndices);
face->setVertexBuffer(buffer);
U16 offset = 0;
@@ -1322,7 +1318,19 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix3 mat_normal(mat3);
+ //let getGeometryVolume know if alpha should override shiny
+ if (face->getFaceColor().mV[3] < 1.f)
+ {
+ face->setPoolType(LLDrawPool::POOL_ALPHA);
+ }
+ else
+ {
+ face->setPoolType(LLDrawPool::POOL_AVATAR);
+ }
+
face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
+
+ buffer->flush();
}
if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime())
@@ -1359,7 +1367,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix4a bind_shape_matrix;
bind_shape_matrix.loadu(skin->mBindShapeMatrix);
- for (U32 j = 0; j < buffer->getRequestedVerts(); ++j)
+ for (U32 j = 0; j < buffer->getNumVerts(); ++j)
{
LLMatrix4a final_mat;
final_mat.clear();
@@ -1407,6 +1415,11 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
}
}
}
+
+ if (drawable && (face->getTEOffset() == drawable->getNumFaces()-1))
+ {
+ drawable->clearState(LLDrawable::REBUILD_ALL);
+ }
}
void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
@@ -1437,7 +1450,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
LLVolume* volume = vobj->getVolume();
S32 te = face->getTEOffset();
- if (!volume || volume->getNumVolumeFaces() <= te)
+ if (!volume || volume->getNumVolumeFaces() <= te || !volume->isMeshAssetLoaded())
{
continue;
}
@@ -1454,12 +1467,12 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
continue;
}
- stop_glerror();
+ //stop_glerror();
- const LLVolumeFace& vol_face = volume->getVolumeFace(te);
- updateRiggedFaceVertexBuffer(avatar, face, skin, volume, vol_face);
+ //const LLVolumeFace& vol_face = volume->getVolumeFace(te);
+ //updateRiggedFaceVertexBuffer(avatar, face, skin, volume, vol_face);
- stop_glerror();
+ //stop_glerror();
U32 data_mask = LLFace::getRiggedDataMask(type);
@@ -1495,17 +1508,15 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
data_mask &= ~LLVertexBuffer::MAP_WEIGHT4;
}
- buff->setBuffer(data_mask);
-
U16 start = face->getGeomStart();
U16 end = start + face->getGeomCount()-1;
S32 offset = face->getIndicesStart();
U32 count = face->getIndicesCount();
- if (glow)
+ /*if (glow)
{
- glColor4f(0,0,0,face->getTextureEntry()->getGlow());
- }
+ gGL.diffuseColor4f(0,0,0,face->getTextureEntry()->getGlow());
+ }*/
gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture());
if (normal_channel > -1)
@@ -1515,14 +1526,16 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
if (face->mTextureMatrix)
{
- glMatrixMode(GL_TEXTURE);
- glLoadMatrixf((F32*) face->mTextureMatrix->mMatrix);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix);
+ buff->setBuffer(data_mask);
buff->drawRange(LLRender::TRIANGLES, start, end, count, offset);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
else
{
+ buff->setBuffer(data_mask);
buff->drawRange(LLRender::TRIANGLES, start, end, count, offset);
}
}
@@ -1531,6 +1544,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
void LLDrawPoolAvatar::renderDeferredRiggedSimple(LLVOAvatar* avatar)
{
+ updateRiggedVertexBuffers(avatar);
renderRigged(avatar, RIGGED_DEFERRED_SIMPLE);
}
@@ -1539,8 +1553,58 @@ void LLDrawPoolAvatar::renderDeferredRiggedBump(LLVOAvatar* avatar)
renderRigged(avatar, RIGGED_DEFERRED_BUMP);
}
+void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
+{
+ //update rigged vertex buffers
+ for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type)
+ {
+ for (U32 i = 0; i < mRiggedFace[type].size(); ++i)
+ {
+ LLFace* face = mRiggedFace[type][i];
+ LLDrawable* drawable = face->getDrawable();
+ if (!drawable)
+ {
+ continue;
+ }
+
+ LLVOVolume* vobj = drawable->getVOVolume();
+
+ if (!vobj)
+ {
+ continue;
+ }
+
+ LLVolume* volume = vobj->getVolume();
+ S32 te = face->getTEOffset();
+
+ if (!volume || volume->getNumVolumeFaces() <= te)
+ {
+ continue;
+ }
+
+ LLUUID mesh_id = volume->getParams().getSculptID();
+ if (mesh_id.isNull())
+ {
+ continue;
+ }
+
+ const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, vobj);
+ if (!skin)
+ {
+ continue;
+ }
+
+ stop_glerror();
+
+ const LLVolumeFace& vol_face = volume->getVolumeFace(te);
+ updateRiggedFaceVertexBuffer(avatar, face, skin, volume, vol_face);
+ }
+ }
+}
+
void LLDrawPoolAvatar::renderRiggedSimple(LLVOAvatar* avatar)
{
+ updateRiggedVertexBuffers(avatar);
renderRigged(avatar, RIGGED_SIMPLE);
}
@@ -1655,34 +1719,3 @@ LLVertexBufferAvatar::LLVertexBufferAvatar()
}
-void LLVertexBufferAvatar::setupVertexBuffer(U32 data_mask) const
-{
- if (sRenderingSkinned)
- {
- U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;
-
- glVertexPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_VERTEX], (void*)(base + 0));
- glNormalPointer(GL_FLOAT, LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_NORMAL], (void*)(base + mOffsets[TYPE_NORMAL]));
- glTexCoordPointer(2,GL_FLOAT, LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_TEXCOORD0], (void*)(base + mOffsets[TYPE_TEXCOORD0]));
-
- set_vertex_weights(LLDrawPoolAvatar::sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT],
- LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_WEIGHT], (F32*)(base + mOffsets[TYPE_WEIGHT]));
-
- if (sShaderLevel >= LLDrawPoolAvatar::SHADER_LEVEL_BUMP)
- {
- set_binormals(LLDrawPoolAvatar::sVertexProgram->mAttribute[LLViewerShaderMgr::BINORMAL],
- LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_BINORMAL], (LLVector3*)(base + mOffsets[TYPE_BINORMAL]));
- }
-
- if (sShaderLevel >= LLDrawPoolAvatar::SHADER_LEVEL_CLOTH)
- {
- set_vertex_clothing_weights(LLDrawPoolAvatar::sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_CLOTHING],
- LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_CLOTHWEIGHT], (LLVector4*)(base + mOffsets[TYPE_CLOTHWEIGHT]));
- }
- }
- else
- {
- LLVertexBuffer::setupVertexBuffer(data_mask);
- }
-}
-
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index fcd8294af5..69e3068858 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -134,6 +134,7 @@ public:
const LLMeshSkinInfo* skin,
LLVolume* volume,
const LLVolumeFace& vol_face);
+ void updateRiggedVertexBuffers(LLVOAvatar* avatar);
void renderRigged(LLVOAvatar* avatar, U32 type, bool glow = false);
void renderRiggedSimple(LLVOAvatar* avatar);
@@ -176,6 +177,7 @@ public:
RIGGED_FULLBRIGHT_SHINY_MASK = RIGGED_SIMPLE_MASK,
RIGGED_GLOW_MASK = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_EMISSIVE |
LLVertexBuffer::MAP_WEIGHT4,
RIGGED_ALPHA_MASK = RIGGED_SIMPLE_MASK,
RIGGED_FULLBRIGHT_ALPHA_MASK = RIGGED_FULLBRIGHT_MASK,
@@ -214,7 +216,6 @@ class LLVertexBufferAvatar : public LLVertexBuffer
{
public:
LLVertexBufferAvatar();
- virtual void setupVertexBuffer(U32 data_mask) const;
};
extern S32 AVATAR_OFFSET_POS;
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 813b3820ee..b696b90d84 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -155,6 +155,7 @@ void LLStandardBumpmap::addstandard()
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL );
+ gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0) ;
LLStandardBumpmap::sStandardBumpmapCount++;
}
@@ -464,11 +465,15 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
}
}
}
- gGL.getTexUnit(diffuse_channel)->disable();
- gGL.getTexUnit(cube_channel)->disable();
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.getTexUnit(diffuse_channel)->disable();
+ gGL.getTexUnit(cube_channel)->disable();
+
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ }
}
void LLDrawPoolBump::endShiny(bool invisible)
@@ -583,19 +588,19 @@ void LLDrawPoolBump::endFullbrightShiny()
cube_map->disable();
cube_map->restoreMatrix();
- if (diffuse_channel != 0)
+ /*if (diffuse_channel != 0)
{
shader->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
}
gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);*/
shader->unbind();
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ //gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
diffuse_channel = -1;
cube_channel = 0;
@@ -706,36 +711,44 @@ void LLDrawPoolBump::beginBump(U32 pass)
// Optional second pass: emboss bump map
stop_glerror();
- // TEXTURE UNIT 0
- // Output.rgb = texture at texture coord 0
- gGL.getTexUnit(0)->activate();
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gObjectBumpProgram.bind();
+ }
+ else
+ {
+ // TEXTURE UNIT 0
+ // Output.rgb = texture at texture coord 0
+ gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
- gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_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
- gGL.getTexUnit(1)->activate();
+ // TEXTURE UNIT 1
+ gGL.getTexUnit(1)->activate();
- gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE);
+
+ 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
+ // = (1 + bump0 - bump1) / 2
- 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
- // = (1 + bump0 - bump1) / 2
+ // Blend: src * dst + dst * src
+ // = 2 * src * dst
+ // = 2 * ((1 + bump0 - bump1) / 2) * dst [0 - 2 * dst]
+ // = (1 + bump0 - bump1) * dst.rgb
+ // = dst.rgb + dst.rgb * (bump0 - bump1)
+ gGL.getTexUnit(0)->activate();
+ gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
+ }
- // Blend: src * dst + dst * src
- // = 2 * src * dst
- // = 2 * ((1 + bump0 - bump1) / 2) * dst [0 - 2 * dst]
- // = (1 + bump0 - bump1) * dst.rgb
- // = dst.rgb + dst.rgb * (bump0 - bump1)
gGL.setSceneBlendType(LLRender::BT_MULT_X2);
- gGL.getTexUnit(0)->activate();
stop_glerror();
-
- gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
}
//static
@@ -750,7 +763,7 @@ void LLDrawPoolBump::renderBump(U32 pass)
LLGLDisable fog(GL_FOG);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
LLGLEnable blend(GL_BLEND);
- glColor4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
/// Get rid of z-fighting with non-bump pass.
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
@@ -765,14 +778,21 @@ void LLDrawPoolBump::endBump(U32 pass)
return;
}
- // Disable texture unit 1
- gGL.getTexUnit(1)->activate();
- gGL.getTexUnit(1)->disable();
- gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gObjectBumpProgram.unbind();
+ }
+ else
+ {
+ // Disable texture blending on unit 1
+ gGL.getTexUnit(1)->activate();
+ gGL.getTexUnit(1)->disable();
+ gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT);
- // Disable texture unit 0
- gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ // Disable texture blending on unit 0
+ gGL.getTexUnit(0)->activate();
+ gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ }
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
@@ -1054,11 +1074,12 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
if (!src_image->hasCallbacks())
{ //if image has no callbacks but resolutions don't match, trigger raw image loaded callback again
if (src_image->getWidth() != bump->getWidth() ||
- src_image->getHeight() != bump->getHeight() ||
- (LLPipeline::sRenderDeferred && bump->getComponents() != 4))
+ src_image->getHeight() != bump->getHeight())// ||
+ //(LLPipeline::sRenderDeferred && bump->getComponents() != 4))
{
src_image->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL );
+ src_image->forceToSaveRawImage(0) ;
}
}
}
@@ -1067,6 +1088,8 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
}
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback");
+
// static
void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
@@ -1089,14 +1112,24 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu
}
}
+static LLFastTimer::DeclareTimer FTM_BUMP_GEN_NORMAL("Generate Normal Map");
+static LLFastTimer::DeclareTimer FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map");
+
void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
if (success && LLPipeline::sRenderDeferred)
{
+ LLFastTimer t(FTM_BUMP_SOURCE_STANDARD_LOADED);
LLPointer<LLImageRaw> nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4);
- generateNormalMapFromAlpha(src, nrm_image);
+ {
+ LLFastTimer t(FTM_BUMP_GEN_NORMAL);
+ generateNormalMapFromAlpha(src, nrm_image);
+ }
src_vi->setExplicitFormat(GL_RGBA, GL_RGBA);
- src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
+ {
+ LLFastTimer t(FTM_BUMP_CREATE_TEXTURE);
+ src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
+ }
}
}
@@ -1155,24 +1188,39 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
}
}
+
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_LOADED("Bump Source Loaded");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Create");
+
// static
void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
{
if( success )
{
+ LLFastTimer t(FTM_BUMP_SOURCE_LOADED);
+
+
bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
- if (iter == entries_list.end() ||
- iter->second.isNull() ||
- iter->second->getWidth() != src->getWidth() ||
- iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
- { //make sure an entry exists for this image
- LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,1);
- raw->clear(0x77, 0x77, 0xFF, 0xFF);
-
- entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture( raw.get(), TRUE);
- iter = entries_list.find(src_vi->getID());
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_ENTRIES_UPDATE);
+ if (iter == entries_list.end() ||
+ iter->second.isNull() ||
+ iter->second->getWidth() != src->getWidth() ||
+ iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
+ { //make sure an entry exists for this image
+ LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,1);
+ raw->clear(0x77, 0x77, 0xFF, 0xFF);
+
+ entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture( raw.get(), TRUE);
+ iter = entries_list.find(src_vi->getID());
+ }
}
//if (iter->second->getWidth() != src->getWidth() ||
@@ -1203,50 +1251,56 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
{
case 1:
case 2:
- if( src_data_size == dst_data_size * src_components )
{
- for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
+ LLFastTimer t(FTM_BUMP_SOURCE_MIN_MAX);
+ if( src_data_size == dst_data_size * src_components )
{
- dst_data[i] = src_data[j];
- if( dst_data[i] < minimum )
- {
- minimum = dst_data[i];
- }
- if( dst_data[i] > maximum )
+ for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
{
- maximum = dst_data[i];
+ dst_data[i] = src_data[j];
+ if( dst_data[i] < minimum )
+ {
+ minimum = dst_data[i];
+ }
+ if( dst_data[i] > maximum )
+ {
+ maximum = dst_data[i];
+ }
}
}
- }
- else
- {
- llassert(0);
- dst_image->clear();
+ else
+ {
+ llassert(0);
+ dst_image->clear();
+ }
}
break;
case 3:
case 4:
- if( src_data_size == dst_data_size * src_components )
{
- for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
+ LLFastTimer t(FTM_BUMP_SOURCE_RGB2LUM);
+ if( src_data_size == dst_data_size * src_components )
{
- // RGB to luminance
- dst_data[i] = (R_WEIGHT * src_data[j] + G_WEIGHT * src_data[j+1] + B_WEIGHT * src_data[j+2]) >> FIXED_PT;
- //llassert( dst_data[i] <= 255 );true because it's 8bit
- if( dst_data[i] < minimum )
+ for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
{
- minimum = dst_data[i];
- }
- if( dst_data[i] > maximum )
- {
- maximum = dst_data[i];
+ // RGB to luminance
+ dst_data[i] = (R_WEIGHT * src_data[j] + G_WEIGHT * src_data[j+1] + B_WEIGHT * src_data[j+2]) >> FIXED_PT;
+ //llassert( dst_data[i] <= 255 );true because it's 8bit
+ if( dst_data[i] < minimum )
+ {
+ minimum = dst_data[i];
+ }
+ if( dst_data[i] > maximum )
+ {
+ maximum = dst_data[i];
+ }
}
}
- }
- else
- {
- llassert(0);
- dst_image->clear();
+ else
+ {
+ llassert(0);
+ dst_image->clear();
+ }
}
break;
default:
@@ -1257,6 +1311,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
if( maximum > minimum )
{
+ LLFastTimer t(FTM_BUMP_SOURCE_RESCALE);
U8 bias_and_scale_lut[256];
F32 twice_one_over_range = 2.f / (maximum - minimum);
S32 i;
@@ -1290,17 +1345,99 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
// accidentally releases it.
LLPointer<LLViewerTexture> bump = LLViewerTextureManager::getLocalTexture( TRUE );
+
if (!LLPipeline::sRenderDeferred)
{
+ LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
bump->createGLTexture(0, dst_image);
}
- else
- {
- LLPointer<LLImageRaw> nrm_image = new LLImageRaw(dst_image->getWidth(), dst_image->getHeight(), 4);
- generateNormalMapFromAlpha(dst_image, nrm_image);
- bump->setExplicitFormat(GL_RGBA, GL_RGBA);
- bump->createGLTexture(0, nrm_image);
+ else
+ { //convert to normal map
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
+ bump->setExplicitFormat(GL_RGBA8, GL_ALPHA);
+ bump->createGLTexture(0, dst_image);
+ }
+
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_GEN_NORMAL);
+ gPipeline.mScreen.bindTarget();
+
+ LLGLDepthTest depth(GL_FALSE);
+ LLGLDisable cull(GL_CULL_FACE);
+ LLGLDisable blend(GL_BLEND);
+ gGL.setColorMask(TRUE, TRUE);
+ gNormalMapGenProgram.bind();
+ gNormalMapGenProgram.uniform1f("norm_scale", gSavedSettings.getF32("RenderNormalMapScale"));
+ gNormalMapGenProgram.uniform1f("stepX", 1.f/bump->getWidth());
+ gNormalMapGenProgram.uniform1f("stepY", 1.f/bump->getHeight());
+
+ LLVector2 v((F32) bump->getWidth()/gPipeline.mScreen.getWidth(),
+ (F32) bump->getHeight()/gPipeline.mScreen.getHeight());
+
+ gGL.getTexUnit(0)->bind(bump);
+
+ S32 width = bump->getWidth();
+ S32 height = bump->getHeight();
+
+ S32 screen_width = gPipeline.mScreen.getWidth();
+ S32 screen_height = gPipeline.mScreen.getHeight();
+
+ glViewport(0, 0, screen_width, screen_height);
+
+ for (S32 left = 0; left < width; left += screen_width)
+ {
+ S32 right = left + screen_width;
+ right = llmin(right, width);
+
+ F32 left_tc = (F32) left/ width;
+ F32 right_tc = (F32) right/width;
+
+ for (S32 bottom = 0; bottom < height; bottom += screen_height)
+ {
+ S32 top = bottom+screen_height;
+ top = llmin(top, height);
+
+ F32 bottom_tc = (F32) bottom/height;
+ F32 top_tc = (F32)(bottom+screen_height)/height;
+ top_tc = llmin(top_tc, 1.f);
+
+ F32 screen_right = (F32) (right-left)/screen_width;
+ F32 screen_top = (F32) (top-bottom)/screen_height;
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(left_tc, bottom_tc);
+ gGL.vertex2f(0, 0);
+
+ gGL.texCoord2f(left_tc, top_tc);
+ gGL.vertex2f(0, screen_top);
+
+ gGL.texCoord2f(right_tc, bottom_tc);
+ gGL.vertex2f(screen_right, 0);
+
+ gGL.texCoord2f(right_tc, top_tc);
+ gGL.vertex2f(screen_right, screen_top);
+
+ gGL.end();
+
+ gGL.flush();
+
+ S32 w = right-left;
+ S32 h = top-bottom;
+
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, left, bottom, 0, 0, w, h);
+ }
+ }
+
+ glGenerateMipmap(GL_TEXTURE_2D);
+
+ gPipeline.mScreen.flush();
+
+ gNormalMapGenProgram.unbind();
+
+ //generateNormalMapFromAlpha(dst_image, nrm_image);
+ }
}
iter->second = bump; // derefs (and deletes) old image
@@ -1348,18 +1485,24 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
if (mShiny)
{
gGL.getTexUnit(0)->activate();
- glMatrixMode(GL_TEXTURE);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
}
else
{
- gGL.getTexUnit(1)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
- gPipeline.mTextureMatrixOps++;
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.getTexUnit(1)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
+ }
+
gGL.getTexUnit(0)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
+ gPipeline.mTextureMatrixOps++;
}
- glLoadMatrixf((GLfloat*) params.mTextureMatrix->mMatrix);
+ gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
tex_setup = true;
@@ -1369,7 +1512,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
{
if (params.mTexture.notNull())
{
- gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ;
+ gGL.getTexUnit(diffuse_channel)->bind(params.mTexture);
params.mTexture->addTextureStats(params.mVSize);
}
else
@@ -1394,12 +1537,17 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
- gGL.getTexUnit(1)->activate();
- glLoadIdentity();
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.getTexUnit(1)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ }
gGL.getTexUnit(0)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
}
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
}
@@ -1407,6 +1555,11 @@ void LLDrawPoolInvisible::render(S32 pass)
{ //render invisiprims
LLFastTimer t(FTM_RENDER_INVISIBLE);
+ if (gPipeline.canUseVertexShaders())
+ {
+ gOcclusionProgram.bind();
+ }
+
U32 invisi_mask = LLVertexBuffer::MAP_VERTEX;
glStencilMask(0);
gGL.setColorMask(false, false);
@@ -1414,6 +1567,11 @@ void LLDrawPoolInvisible::render(S32 pass)
gGL.setColorMask(true, false);
glStencilMask(0xFFFFFFFF);
+ if (gPipeline.canUseVertexShaders())
+ {
+ gOcclusionProgram.unbind();
+ }
+
if (gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))
{
beginShiny(true);
@@ -1434,6 +1592,7 @@ void LLDrawPoolInvisible::endDeferredPass( S32 pass )
void LLDrawPoolInvisible::renderDeferred( S32 pass )
{ //render invisiprims; this doesn't work becaue it also blocks all the post-deferred stuff
+#if 0
LLFastTimer t(FTM_RENDER_INVISIBLE);
U32 invisi_mask = LLVertexBuffer::MAP_VERTEX;
@@ -1451,4 +1610,5 @@ void LLDrawPoolInvisible::renderDeferred( S32 pass )
renderShiny(true);
endShiny(true);
}
+#endif
}
diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp
index ce07e62122..59c3fbf7a1 100644
--- a/indra/newview/lldrawpoolground.cpp
+++ b/indra/newview/lldrawpoolground.cpp
@@ -71,9 +71,9 @@ void LLDrawPoolGround::render(S32 pass)
LLGLSquashToFarClip far_clip(glh_get_current_projection());
F32 water_height = gAgent.getRegion()->getWaterHeight();
- glPushMatrix();
+ gGL.pushMatrix();
LLVector3 origin = LLViewerCamera::getInstance()->getOrigin();
- glTranslatef(origin.mV[0], origin.mV[1], llmax(origin.mV[2], water_height));
+ gGL.translatef(origin.mV[0], origin.mV[1], llmax(origin.mV[2], water_height));
LLFace *facep = mDrawFace[0];
@@ -82,6 +82,6 @@ void LLDrawPoolGround::render(S32 pass)
LLOverrideFaceColor col(this, gSky.mVOSkyp->getGLFogColor());
facep->renderIndexed();
- glPopMatrix();
+ gGL.popMatrix();
}
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 5dbb27cabb..6e0ea78af2 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -46,9 +46,11 @@ static LLFastTimer::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass");
void LLDrawPoolGlow::beginPostDeferredPass(S32 pass)
{
- gDeferredFullbrightProgram.bind();
+ gDeferredEmissiveProgram.bind();
}
+static LLFastTimer::DeclareTimer FTM_RENDER_GLOW_PUSH("Glow Push");
+
void LLDrawPoolGlow::renderPostDeferred(S32 pass)
{
LLFastTimer t(FTM_RENDER_GLOW);
@@ -62,7 +64,11 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass)
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
gGL.setColorMask(false, true);
- pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+
+ {
+ LLFastTimer t(FTM_RENDER_GLOW_PUSH);
+ pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+ }
gGL.setColorMask(true, false);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -70,10 +76,22 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass)
void LLDrawPoolGlow::endPostDeferredPass(S32 pass)
{
- gDeferredFullbrightProgram.unbind();
+ gDeferredEmissiveProgram.unbind();
LLRenderPass::endRenderPass(pass);
}
+S32 LLDrawPoolGlow::getNumPasses()
+{
+ if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
void LLDrawPoolGlow::render(S32 pass)
{
LLFastTimer t(FTM_RENDER_GLOW);
@@ -87,39 +105,29 @@ void LLDrawPoolGlow::render(S32 pass)
U32 shader_level = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
- if (shader_level > 0 && fullbright_shader)
- {
- fullbright_shader->bind();
- }
- else
- {
- gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
- }
+ //should never get here without basic shaders enabled
+ llassert(shader_level > 0);
+
+ LLGLSLShader* shader = LLPipeline::sUnderWaterRender ? &gObjectEmissiveWaterProgram : &gObjectEmissiveProgram;
+ shader->bind();
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
gGL.setColorMask(false, true);
- if (shader_level > 1)
- {
- pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
- }
- else
- {
- renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask());
- }
+ pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
gGL.setColorMask(true, false);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
if (shader_level > 0 && fullbright_shader)
{
- fullbright_shader->unbind();
+ shader->unbind();
}
}
void LLDrawPoolGlow::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures)
{
- glColor4ubv(params.mGlowColor.mV);
+ //gGL.diffuseColor4ubv(params.mGlowColor.mV);
LLRenderPass::pushBatch(params, mask, texture, batch_textures);
}
@@ -176,7 +184,6 @@ void LLDrawPoolSimple::endRenderPass(S32 pass)
void LLDrawPoolSimple::render(S32 pass)
{
LLGLDisable blend(GL_BLEND);
- LLGLDisable alpha_test(GL_ALPHA_TEST);
{ //render simple
LLFastTimer t(FTM_RENDER_SIMPLE);
@@ -196,6 +203,7 @@ void LLDrawPoolSimple::render(S32 pass)
}
else
{
+ LLGLDisable alpha_test(GL_ALPHA_TEST);
renderTexture(LLRenderPass::PASS_SIMPLE, getVertexDataMask());
}
@@ -247,22 +255,25 @@ void LLDrawPoolGrass::prerender()
void LLDrawPoolGrass::beginRenderPass(S32 pass)
{
LLFastTimer t(FTM_RENDER_GRASS);
+ stop_glerror();
if (LLPipeline::sUnderWaterRender)
{
- simple_shader = &gObjectSimpleNonIndexedWaterProgram;
+ simple_shader = &gObjectAlphaMaskNonIndexedWaterProgram;
}
else
{
- simple_shader = &gObjectSimpleNonIndexedProgram;
+ simple_shader = &gObjectAlphaMaskNonIndexedProgram;
}
if (mVertexShaderLevel > 0)
{
simple_shader->bind();
+ simple_shader->setMinimumAlpha(0.5f);
}
else
{
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
// don't use shaders!
if (gGLManager.mHasShaderObjects)
{
@@ -280,22 +291,23 @@ void LLDrawPoolGrass::endRenderPass(S32 pass)
{
simple_shader->unbind();
}
+ else
+ {
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ }
}
void LLDrawPoolGrass::render(S32 pass)
{
LLGLDisable blend(GL_BLEND);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
-
+
{
LLFastTimer t(FTM_RENDER_GRASS);
LLGLEnable test(GL_ALPHA_TEST);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
//render grass
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
- }
-
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ }
}
void LLDrawPoolGrass::beginDeferredPass(S32 pass)
@@ -310,17 +322,13 @@ void LLDrawPoolGrass::endDeferredPass(S32 pass)
void LLDrawPoolGrass::renderDeferred(S32 pass)
{
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
-
{
LLFastTimer t(FTM_RENDER_GRASS_DEFERRED);
- gDeferredTreeProgram.bind();
- LLGLEnable test(GL_ALPHA_TEST);
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.setMinimumAlpha(0.5f);
//render grass
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
}
-
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
@@ -374,10 +382,14 @@ void LLDrawPoolFullbright::endRenderPass(S32 pass)
LLFastTimer t(FTM_RENDER_FULLBRIGHT);
LLRenderPass::endRenderPass(pass);
+ stop_glerror();
+
if (mVertexShaderLevel > 0)
{
fullbright_shader->unbind();
}
+
+ stop_glerror();
}
void LLDrawPoolFullbright::render(S32 pass)
@@ -385,6 +397,8 @@ void LLDrawPoolFullbright::render(S32 pass)
LLFastTimer t(FTM_RENDER_FULLBRIGHT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
+ stop_glerror();
+
if (mVertexShaderLevel > 0)
{
fullbright_shader->bind();
@@ -398,6 +412,8 @@ void LLDrawPoolFullbright::render(S32 pass)
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR;
renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask);
}
+
+ stop_glerror();
}
S32 LLDrawPoolFullbright::getNumPasses()
diff --git a/indra/newview/lldrawpoolsimple.h b/indra/newview/lldrawpoolsimple.h
index 3811b3d398..bd62bc7502 100644
--- a/indra/newview/lldrawpoolsimple.h
+++ b/indra/newview/lldrawpoolsimple.h
@@ -118,7 +118,8 @@ public:
enum
{
VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
- LLVertexBuffer::MAP_TEXCOORD0
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_EMISSIVE
};
virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; }
@@ -130,6 +131,8 @@ public:
/*virtual*/ void endPostDeferredPass(S32 pass);
/*virtual*/ void renderPostDeferred(S32 pass);
+ /*virtual*/ S32 getNumPasses();
+
void render(S32 pass = 0);
void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE);
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index 030d6e1110..7f7d9f65c6 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -76,11 +76,16 @@ void LLDrawPoolSky::render(S32 pass)
return;
}
- // use a shader only underwater
+ // don't render sky under water (background just gets cleared to fog color)
if(mVertexShaderLevel > 0 && LLPipeline::sUnderWaterRender)
{
- mShader = &gObjectFullbrightWaterProgram;
- mShader->bind();
+ return;
+ }
+
+
+ if (LLGLSLShader::sNoFixedFunction)
+ { //just use the UI shader (generic single texture no lighting)
+ gOneTextureNoColorProgram.bind();
}
else
{
@@ -107,21 +112,21 @@ void LLDrawPoolSky::render(S32 pass)
LLGLDisable clip(GL_CLIP_PLANE0);
- glPushMatrix();
+ gGL.pushMatrix();
LLVector3 origin = LLViewerCamera::getInstance()->getOrigin();
- glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]);
+ gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
S32 face_count = (S32)mDrawFace.size();
LLVertexBuffer::unbind();
- glColor4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
for (S32 i = 0; i < llmin(6, face_count); ++i)
{
renderSkyCubeFace(i);
}
- glPopMatrix();
+ gGL.popMatrix();
}
void LLDrawPoolSky::renderSkyCubeFace(U8 side)
@@ -139,9 +144,10 @@ void LLDrawPoolSky::renderSkyCubeFace(U8 side)
if (LLSkyTex::doInterpolate())
{
+
LLGLEnable blend(GL_BLEND);
mSkyTex[side].bindTexture(FALSE);
- glColor4f(1, 1, 1, LLSkyTex::getInterpVal()); // lighting is disabled
+ gGL.diffuseColor4f(1, 1, 1, LLSkyTex::getInterpVal()); // lighting is disabled
face.renderIndexed();
}
}
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 3daa0f8261..b95d8296fa 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -62,13 +62,16 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
LLFacePool(POOL_TERRAIN),
mTexturep(texturep)
{
+ U32 format = GL_ALPHA8;
+ U32 int_format = GL_ALPHA;
+
// Hack!
sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale");
sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
mAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga",
TRUE, LLViewerTexture::BOOST_UI,
LLViewerTexture::FETCHED_TEXTURE,
- GL_ALPHA8, GL_ALPHA,
+ format, int_format,
LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb"));
//gGL.getTexUnit(0)->bind(mAlphaRampImagep.get());
@@ -77,7 +80,7 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c",
TRUE, LLViewerTexture::BOOST_UI,
LLViewerTexture::FETCHED_TEXTURE,
- GL_ALPHA8, GL_ALPHA,
+ format, int_format,
LLUUID("38b86f85-2575-52a9-a531-23108d8da837"));
//gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
@@ -106,6 +109,10 @@ U32 LLDrawPoolTerrain::getVertexDataMask()
{
return LLVertexBuffer::MAP_VERTEX;
}
+ else if (LLGLSLShader::sCurBoundShaderPtr)
+ {
+ return VERTEX_DATA_MASK & ~(LLVertexBuffer::MAP_TEXCOORD2 | LLVertexBuffer::MAP_TEXCOORD3);
+ }
else
{
return VERTEX_DATA_MASK;
@@ -115,14 +122,7 @@ U32 LLDrawPoolTerrain::getVertexDataMask()
void LLDrawPoolTerrain::prerender()
{
mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT);
- if (mVertexShaderLevel > 0)
- {
- sDetailMode = 1;
- }
- else
- {
- sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
- }
+ sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
}
void LLDrawPoolTerrain::beginRenderPass( S32 pass )
@@ -132,7 +132,7 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass )
sShader = LLPipeline::sUnderWaterRender ?
&gTerrainWaterProgram :
- &gTerrainProgram;
+ &gTerrainProgram;
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0)
{
@@ -174,6 +174,8 @@ void LLDrawPoolTerrain::render(S32 pass)
compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
}
+ LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f);
+
if (!gGLManager.mHasMultitexture)
{
// No multitexture, render simple land.
@@ -188,22 +190,27 @@ void LLDrawPoolTerrain::render(S32 pass)
}
LLGLSPipeline gls;
- LLOverrideFaceColor override(this, 1.f, 1.f, 1.f, 1.f);
-
+
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0)
{
gPipeline.enableLightsDynamic();
+
renderFullShader();
}
else
{
gPipeline.enableLightsStatic();
- if (sDetailMode == 0){
+ if (sDetailMode == 0)
+ {
renderSimple();
- } else if (gGLManager.mNumTextureUnits < 4){
+ }
+ else if (gGLManager.mNumTextureUnits < 4)
+ {
renderFull2TU();
- } else {
+ }
+ else
+ {
renderFull4TU();
}
}
@@ -215,8 +222,9 @@ void LLDrawPoolTerrain::render(S32 pass)
{ //use fullbright shader for highlighting
LLGLSLShader* old_shader = sShader;
sShader->unbind();
- sShader = &gObjectFullbrightNonIndexedProgram;
+ sShader = &gHighlightProgram;
sShader->bind();
+ gGL.diffuseColor4f(1,1,1,1);
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
@@ -312,16 +320,15 @@ void LLDrawPoolTerrain::renderFullShader()
gGL.getTexUnit(detail0)->bind(detail_texture0p);
gGL.getTexUnit(0)->activate();
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ llassert(shader);
+
+ shader->uniform4fv("object_plane_s", 1, tp0.mV);
+ shader->uniform4fv("object_plane_t", 1, tp1.mV);
- glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
//
// detail texture 1
@@ -331,9 +338,9 @@ void LLDrawPoolTerrain::renderFullShader()
/// ALPHA TEXTURE COORDS 0:
gGL.getTexUnit(1)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// detail texture 2
//
@@ -343,10 +350,10 @@ void LLDrawPoolTerrain::renderFullShader()
gGL.getTexUnit(2)->activate();
/// ALPHA TEXTURE COORDS 1:
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(-2.f, 0.f, 0.f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.translatef(-2.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
//
// detail texture 3
@@ -356,10 +363,10 @@ void LLDrawPoolTerrain::renderFullShader()
/// ALPHA TEXTURE COORDS 2:
gGL.getTexUnit(3)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(-1.f, 0.f, 0.f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.translatef(-1.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
//
// Alpha Ramp
@@ -380,38 +387,30 @@ void LLDrawPoolTerrain::renderFullShader()
gGL.getTexUnit(alpha_ramp)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(4)->disable();
gGL.getTexUnit(4)->activate();
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
-
+
gGL.getTexUnit(detail3)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(3)->disable();
gGL.getTexUnit(3)->activate();
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(detail2)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(2)->disable();
gGL.getTexUnit(2)->activate();
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(detail1)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(1)->disable();
gGL.getTexUnit(1)->activate();
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
//----------------------------------------------------------------------------
// Restore Texture Unit 0 defaults
@@ -419,11 +418,9 @@ void LLDrawPoolTerrain::renderFullShader()
gGL.getTexUnit(detail0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->activate();
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
void LLDrawPoolTerrain::renderFull4TU()
@@ -534,9 +531,9 @@ void LLDrawPoolTerrain::renderFull4TU()
gGL.getTexUnit(1)->activate();
// Set the texture matrix
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(-2.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.translatef(-2.f, 0.f, 0.f);
// Care about alpha only
gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
@@ -566,9 +563,9 @@ void LLDrawPoolTerrain::renderFull4TU()
gGL.getTexUnit(3)->activate();
// Set the texture matrix
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(-1.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.translatef(-1.f, 0.f, 0.f);
// Set alpha texture and do lighting modulation
gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR);
@@ -586,9 +583,9 @@ void LLDrawPoolTerrain::renderFull4TU()
gGL.getTexUnit(3)->disable();
gGL.getTexUnit(3)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(2)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(2)->disable();
@@ -596,17 +593,17 @@ void LLDrawPoolTerrain::renderFull4TU()
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(1)->disable();
gGL.getTexUnit(1)->activate();
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// Restore blend state
gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -620,9 +617,9 @@ void LLDrawPoolTerrain::renderFull4TU()
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
@@ -714,9 +711,9 @@ void LLDrawPoolTerrain::renderFull2TU()
gGL.getTexUnit(0)->bind(m2DAlphaRampImagep);
// Set the texture matrix
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(-1.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.translatef(-1.f, 0.f, 0.f);
// Care about alpha only
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
@@ -753,9 +750,9 @@ void LLDrawPoolTerrain::renderFull2TU()
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->bind(m2DAlphaRampImagep);
// Set the texture matrix
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glTranslatef(-2.f, 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.translatef(-2.f, 0.f, 0.f);
// Care about alpha only
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
@@ -793,9 +790,9 @@ void LLDrawPoolTerrain::renderFull2TU()
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
//----------------------------------------------------------------------------
// Restore Texture Unit 0 defaults
@@ -805,9 +802,9 @@ void LLDrawPoolTerrain::renderFull2TU()
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
@@ -831,13 +828,21 @@ void LLDrawPoolTerrain::renderSimple()
tp0.setVec(tscale, 0.f, 0.0f, -1.f*(origin_agent.mV[0]/256.f));
tp1.setVec(0.f, tscale, 0.0f, -1.f*(origin_agent.mV[1]/256.f));
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV);
-
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ sShader->uniform4fv("object_plane_s", 1, tp0.mV);
+ sShader->uniform4fv("object_plane_t", 1, tp1.mV);
+ }
+ else
+ {
+ glEnable(GL_TEXTURE_GEN_S);
+ glEnable(GL_TEXTURE_GEN_T);
+ glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV);
+ glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV);
+ }
+
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR);
drawLoop();
@@ -847,11 +852,14 @@ void LLDrawPoolTerrain::renderSimple()
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glDisable(GL_TEXTURE_GEN_S);
+ glDisable(GL_TEXTURE_GEN_T);
+ }
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
@@ -882,11 +890,11 @@ void LLDrawPoolTerrain::renderOwnership()
// texture coordinates for pixel 256x256 is not 1,1. This makes the
// ownership map not line up with the selection. We address this with
// a texture matrix multiply.
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.pushMatrix();
const F32 TEXTURE_FUDGE = 257.f / 256.f;
- glScalef( TEXTURE_FUDGE, TEXTURE_FUDGE, 1.f );
+ gGL.scalef( TEXTURE_FUDGE, TEXTURE_FUDGE, 1.f );
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
{
@@ -895,9 +903,9 @@ void LLDrawPoolTerrain::renderOwnership()
LLVertexBuffer::MAP_TEXCOORD0);
}
- glMatrixMode(GL_TEXTURE);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index 3056da44d5..283ed87f1a 100644
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -40,8 +40,7 @@ public:
LLVertexBuffer::MAP_TEXCOORD0 |
LLVertexBuffer::MAP_TEXCOORD1 |
LLVertexBuffer::MAP_TEXCOORD2 |
- LLVertexBuffer::MAP_TEXCOORD3 |
- LLVertexBuffer::MAP_COLOR
+ LLVertexBuffer::MAP_TEXCOORD3
};
virtual U32 getVertexDataMask();
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 81c796b146..d198e28c14 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -62,24 +62,26 @@ void LLDrawPoolTree::prerender()
void LLDrawPoolTree::beginRenderPass(S32 pass)
{
LLFastTimer t(FTM_RENDER_TREES);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
-
+
if (LLPipeline::sUnderWaterRender)
{
- shader = &gObjectSimpleNonIndexedWaterProgram;
+ shader = &gTreeWaterProgram;
}
else
{
- shader = &gObjectSimpleNonIndexedProgram;
+ shader = &gTreeProgram;
}
- if (gPipeline.canUseWindLightShadersOnObjects())
+ if (gPipeline.canUseVertexShaders())
{
shader->bind();
+ shader->setMinimumAlpha(0.5f);
+ gGL.diffuseColor4f(1,1,1,1);
}
else
{
gPipeline.enableLightsDynamic();
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
}
}
@@ -92,7 +94,7 @@ void LLDrawPoolTree::render(S32 pass)
return;
}
- LLGLEnable test(GL_ALPHA_TEST);
+ LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1);
LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f);
if (gSavedSettings.getBOOL("RenderAnimateTrees"))
@@ -111,8 +113,8 @@ void LLDrawPoolTree::render(S32 pass)
if(buff)
{
buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- buff->drawRange(LLRender::TRIANGLES, 0, buff->getRequestedVerts()-1, buff->getRequestedIndices(), 0);
- gPipeline.addTrianglesDrawn(buff->getRequestedIndices());
+ buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
+ gPipeline.addTrianglesDrawn(buff->getNumIndices());
}
}
}
@@ -121,12 +123,16 @@ void LLDrawPoolTree::render(S32 pass)
void LLDrawPoolTree::endRenderPass(S32 pass)
{
LLFastTimer t(FTM_RENDER_TREES);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
-
+
if (gPipeline.canUseWindLightShadersOnObjects())
{
shader->unbind();
}
+
+ if (mVertexShaderLevel <= 0)
+ {
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ }
}
//============================================
@@ -135,10 +141,10 @@ void LLDrawPoolTree::endRenderPass(S32 pass)
void LLDrawPoolTree::beginDeferredPass(S32 pass)
{
LLFastTimer t(FTM_RENDER_TREES);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
shader = &gDeferredTreeProgram;
shader->bind();
+ shader->setMinimumAlpha(0.5f);
}
void LLDrawPoolTree::renderDeferred(S32 pass)
@@ -149,8 +155,7 @@ void LLDrawPoolTree::renderDeferred(S32 pass)
void LLDrawPoolTree::endDeferredPass(S32 pass)
{
LLFastTimer t(FTM_RENDER_TREES);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
-
+
shader->unbind();
}
@@ -160,11 +165,12 @@ void LLDrawPoolTree::endDeferredPass(S32 pass)
void LLDrawPoolTree::beginShadowPass(S32 pass)
{
LLFastTimer t(FTM_SHADOW_TREE);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
+
glPolygonOffset(gSavedSettings.getF32("RenderDeferredTreeShadowOffset"),
gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
- gDeferredShadowProgram.bind();
+ gDeferredTreeShadowProgram.bind();
+ gDeferredTreeShadowProgram.setMinimumAlpha(0.5f);
}
void LLDrawPoolTree::renderShadow(S32 pass)
@@ -175,12 +181,10 @@ void LLDrawPoolTree::renderShadow(S32 pass)
void LLDrawPoolTree::endShadowPass(S32 pass)
{
LLFastTimer t(FTM_SHADOW_TREE);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
-
+
glPolygonOffset(gSavedSettings.getF32("RenderDeferredSpotShadowOffset"),
gSavedSettings.getF32("RenderDeferredSpotShadowBias"));
-
- //gDeferredShadowProgram.unbind();
+ gDeferredTreeShadowProgram.unbind();
}
@@ -193,7 +197,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
U32 indices_drawn = 0;
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
@@ -224,8 +228,8 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
}
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
- //glPushMatrix();
+ gGL.loadMatrix(gGLModelView);
+ //gGL.pushMatrix();
F32 mat[16];
for (U32 i = 0; i < 16; i++)
mat[i] = (F32) gGLModelView[i];
@@ -234,7 +238,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
// Translate to tree base HACK - adjustment in Z plants tree underground
const LLVector3 &pos_agent = treep->getPositionAgent();
- //glTranslatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
+ //gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
LLMatrix4 trans_mat;
trans_mat.setTranslation(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
trans_mat *= matrix;
@@ -305,7 +309,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
indices_drawn += treep->drawBranchPipeline(scale_mat, indicesp, trunk_LOD, stop_depth, treep->mDepth, treep->mTrunkDepth, 1.0, treep->mTwist, droop, treep->mBranches, alpha);
}
- //glPopMatrix();
+ //gGL.popMatrix();
}
}
}
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 31c14361b5..4f6eaa5a5b 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -59,6 +59,8 @@ BOOL LLDrawPoolWater::sSkipScreenCopy = FALSE;
BOOL LLDrawPoolWater::sNeedsReflectionUpdate = TRUE;
BOOL LLDrawPoolWater::sNeedsDistortionUpdate = TRUE;
LLColor4 LLDrawPoolWater::sWaterFogColor = LLColor4(0.2f, 0.5f, 0.5f, 0.f);
+F32 LLDrawPoolWater::sWaterFogEnd = 0.f;
+
LLVector3 LLDrawPoolWater::sLightDir;
LLDrawPoolWater::LLDrawPoolWater() :
@@ -219,7 +221,7 @@ void LLDrawPoolWater::render(S32 pass)
water_color.setVec(1.f, 1.f, 1.f, 0.5f*(1.f + up_dot));
}
- glColor4fv(water_color.mV);
+ gGL.diffuseColor4fv(water_color.mV);
// Automatically generate texture coords for detail map
glEnable(GL_TEXTURE_GEN_S); //texture unit 1
@@ -275,15 +277,15 @@ void LLDrawPoolWater::render(S32 pass)
gSky.mVOSkyp->getCubeMap()->enable(0);
gSky.mVOSkyp->getCubeMap()->bind();
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
LLMatrix4 camera_mat = LLViewerCamera::getInstance()->getModelview();
LLMatrix4 camera_rot(camera_mat.getMat3());
camera_rot.invert();
- glLoadMatrixf((F32 *)camera_rot.mMatrix);
+ gGL.loadMatrix((F32 *)camera_rot.mMatrix);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
LLOverrideFaceColor overrid(this, 1.f, 1.f, 1.f, 0.5f*up_dot);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
@@ -310,9 +312,9 @@ void LLDrawPoolWater::render(S32 pass)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
@@ -332,6 +334,21 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
{
LLVOSky *voskyp = gSky.mVOSkyp;
+ LLGLSLShader* shader = NULL;
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ if (LLPipeline::sUnderWaterRender)
+ {
+ shader = &gObjectSimpleNonIndexedTexGenWaterProgram;
+ }
+ else
+ {
+ shader = &gObjectSimpleNonIndexedTexGenProgram;
+ }
+
+ shader->bind();
+ }
+
stop_glerror();
// Depth sorting and write to depth buffer
@@ -354,10 +371,13 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
gGL.getTexUnit(0)->bind(mOpaqueWaterImagep);
// Automatically generate texture coords for water texture
- glEnable(GL_TEXTURE_GEN_S); //texture unit 0
- glEnable(GL_TEXTURE_GEN_T); //texture unit 0
- glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ if (!shader)
+ {
+ glEnable(GL_TEXTURE_GEN_S); //texture unit 0
+ glEnable(GL_TEXTURE_GEN_T); //texture unit 0
+ glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ }
// Use the fact that we know all water faces are the same size
// to save some computation
@@ -380,10 +400,18 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
F32 tp0[4] = { 16.f / 256.f, 0.0f, 0.0f, offset };
F32 tp1[4] = { 0.0f, 16.f / 256.f, 0.0f, offset };
- glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1);
+ if (!shader)
+ {
+ glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0);
+ glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1);
+ }
+ else
+ {
+ shader->uniform4fv("object_plane_s", 1, tp0);
+ shader->uniform4fv("object_plane_t", 1, tp1);
+ }
- glColor3f(1.f, 1.f, 1.f);
+ gGL.diffuseColor3f(1.f, 1.f, 1.f);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
@@ -399,9 +427,12 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
stop_glerror();
- // Reset the settings back to expected values
- glDisable(GL_TEXTURE_GEN_S); //texture unit 0
- glDisable(GL_TEXTURE_GEN_T); //texture unit 0
+ if (!shader)
+ {
+ // Reset the settings back to expected values
+ glDisable(GL_TEXTURE_GEN_S); //texture unit 0
+ glDisable(GL_TEXTURE_GEN_T); //texture unit 0
+ }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
@@ -623,8 +654,6 @@ void LLDrawPoolWater::shade()
water_color.mV[3] = 0.9f;
}
- glColor4fv(water_color.mV);
-
{
LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0);
LLGLDisable cullface(GL_CULL_FACE);
diff --git a/indra/newview/lldrawpoolwater.h b/indra/newview/lldrawpoolwater.h
index 99b541ca5a..aeeba179d6 100644
--- a/indra/newview/lldrawpoolwater.h
+++ b/indra/newview/lldrawpoolwater.h
@@ -49,6 +49,7 @@ public:
static LLVector3 sLightDir;
static LLColor4 sWaterFogColor;
+ static F32 sWaterFogEnd;
enum
{
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index bf79c2100c..caf15fe1cb 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -62,13 +62,24 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
llerrs << "Error: Failed to load cloud noise image " << cloudNoiseFilename << llendl;
}
- cloudNoiseFile->load(cloudNoiseFilename);
-
- sCloudNoiseRawImage = new LLImageRaw();
+ if(cloudNoiseFile->load(cloudNoiseFilename))
+ {
+ sCloudNoiseRawImage = new LLImageRaw();
- cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f);
+ if(cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f))
+ {
+ //debug use
+ lldebugs << "cloud noise raw image width: " << sCloudNoiseRawImage->getWidth() << " : height: " << sCloudNoiseRawImage->getHeight() << " : components: " <<
+ (S32)sCloudNoiseRawImage->getComponents() << " : data size: " << sCloudNoiseRawImage->getDataSize() << llendl ;
+ llassert_always(sCloudNoiseRawImage->getData()) ;
- sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
+ sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
+ }
+ else
+ {
+ sCloudNoiseRawImage = NULL ;
+ }
+ }
LLWLParamManager::getInstance()->propagateParameters();
}
@@ -89,12 +100,12 @@ void LLDrawPoolWLSky::beginRenderPass( S32 pass )
{
sky_shader =
LLPipeline::sUnderWaterRender ?
- &gObjectSimpleWaterProgram :
+ &gObjectFullbrightNoColorWaterProgram :
&gWLSkyProgram;
cloud_shader =
LLPipeline::sUnderWaterRender ?
- &gObjectSimpleWaterProgram :
+ &gObjectFullbrightNoColorWaterProgram :
&gWLCloudProgram;
}
@@ -119,33 +130,33 @@ void LLDrawPoolWLSky::renderDome(F32 camHeightLocal, LLGLSLShader * shader) cons
llassert_always(NULL != shader);
- glPushMatrix();
+ gGL.pushMatrix();
//chop off translation
if (LLPipeline::sReflectionRender && origin.mV[2] > 256.f)
{
- glTranslatef(origin.mV[0], origin.mV[1], 256.f-origin.mV[2]*0.5f);
+ gGL.translatef(origin.mV[0], origin.mV[1], 256.f-origin.mV[2]*0.5f);
}
else
{
- glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]);
+ gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
}
// the windlight sky dome works most conveniently in a coordinate system
// where Y is up, so permute our basis vectors accordingly.
- glRotatef(120.f, 1.f / F_SQRT3, 1.f / F_SQRT3, 1.f / F_SQRT3);
+ gGL.rotatef(120.f, 1.f / F_SQRT3, 1.f / F_SQRT3, 1.f / F_SQRT3);
- glScalef(0.333f, 0.333f, 0.333f);
+ gGL.scalef(0.333f, 0.333f, 0.333f);
- glTranslatef(0.f,-camHeightLocal, 0.f);
+ gGL.translatef(0.f,-camHeightLocal, 0.f);
// Draw WL Sky
shader->uniform3f("camPosLocal", 0.f, camHeightLocal, 0.f);
gSky.mVOWLSkyp->drawDome();
- glPopMatrix();
+ gGL.popMatrix();
}
void LLDrawPoolWLSky::renderSkyHaze(F32 camHeightLocal) const
@@ -186,29 +197,43 @@ void LLDrawPoolWLSky::renderStars(void) const
gGL.getTexUnit(0)->bind(gSky.mVOSkyp->getBloomTex());
gGL.pushMatrix();
- glRotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f);
+ gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f);
// gl_FragColor.rgb = gl_Color.rgb;
// gl_FragColor.a = gl_Color.a * star_alpha.a;
- gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR);
- gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_CONST_ALPHA, LLTexUnit::TBS_TEX_ALPHA);
- glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, star_alpha.mV);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gCustomAlphaProgram.bind();
+ gCustomAlphaProgram.uniform1f("custom_alpha", star_alpha.mV[3]);
+ }
+ else
+ {
+ gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR);
+ gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_CONST_ALPHA, LLTexUnit::TBS_TEX_ALPHA);
+ glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, star_alpha.mV);
+ }
gSky.mVOWLSkyp->drawStars();
gGL.popMatrix();
-
- // and disable the combiner states
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gCustomAlphaProgram.unbind();
+ }
+ else
+ {
+ // and disable the combiner states
+ gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ }
}
void LLDrawPoolWLSky::renderSkyClouds(F32 camHeightLocal) const
{
- if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS))
+ if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && sCloudNoiseTexture.notNull())
{
LLGLEnable blend(GL_BLEND);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
-
+
gGL.getTexUnit(0)->bind(sCloudNoiseTexture);
cloud_shader->bind();
@@ -255,8 +280,19 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
color.mV[3] = llclamp(a, 0.f, 1.f);
+ if (gPipeline.canUseVertexShaders())
+ {
+ gHighlightProgram.bind();
+ }
+
LLFacePool::LLOverrideFaceColor color_override(this, color);
+
face->renderIndexed();
+
+ if (gPipeline.canUseVertexShaders())
+ {
+ gHighlightProgram.unbind();
+ }
}
}
@@ -281,10 +317,10 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
renderSkyHaze(camHeightLocal);
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
- glPushMatrix();
+ gGL.pushMatrix();
- glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]);
+ gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
gDeferredStarProgram.bind();
// *NOTE: have to bind a texture here since register combiners blending in
@@ -298,7 +334,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
gDeferredStarProgram.unbind();
- glPopMatrix();
+ gGL.popMatrix();
renderSkyClouds(camHeightLocal);
@@ -326,9 +362,9 @@ void LLDrawPoolWLSky::render(S32 pass)
renderSkyHaze(camHeightLocal);
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
- glPushMatrix();
+ gGL.pushMatrix();
- glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]);
+ gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
// *NOTE: have to bind a texture here since register combiners blending in
// renderStars() requires something to be bound and we might as well only
@@ -340,7 +376,7 @@ void LLDrawPoolWLSky::render(S32 pass)
renderStars();
- glPopMatrix();
+ gGL.popMatrix();
renderSkyClouds(camHeightLocal);
@@ -375,5 +411,8 @@ void LLDrawPoolWLSky::cleanupGL()
//static
void LLDrawPoolWLSky::restoreGL()
{
- sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
+ if(sCloudNoiseRawImage.notNull())
+ {
+ sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
+ }
}
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index f781d5f3ff..5d6081a35c 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -40,6 +40,8 @@
#include "llvertexbuffer.h"
#include "llviewerdisplay.h"
#include "llrender.h"
+#include "pipeline.h"
+#include "llglslshader.h"
// static
LLViewerDynamicTexture::instance_list_t LLViewerDynamicTexture::sInstances[ LLViewerDynamicTexture::ORDER_COUNT ];
@@ -201,11 +203,14 @@ void LLViewerDynamicTexture::postRender(BOOL success)
BOOL LLViewerDynamicTexture::updateAllInstances()
{
sNumRenders = 0;
- if (gGLManager.mIsDisabled)
+ if (gGLManager.mIsDisabled || LLPipeline::sMemAllocationThrottled)
{
return TRUE;
}
+ LLGLSLShader::bindNoShader();
+ LLVertexBuffer::unbind();
+
BOOL result = FALSE;
BOOL ret = FALSE ;
for( S32 order = 0; order < ORDER_COUNT; order++ )
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index c2720eaf28..86fe6754dc 100644
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -2,31 +2,25 @@
* @file llenvmanager.cpp
* @brief Implementation of classes managing WindLight and water settings.
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
* 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://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * 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://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * 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.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h
index 96af102c1a..ad56761bc7 100644
--- a/indra/newview/llenvmanager.h
+++ b/indra/newview/llenvmanager.h
@@ -2,31 +2,25 @@
* @file llenvmanager.h
* @brief Declaration of classes managing WindLight and water settings.
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
* 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://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * 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://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * 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.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp
new file mode 100644
index 0000000000..7ed22d68f6
--- /dev/null
+++ b/indra/newview/llestateinfomodel.cpp
@@ -0,0 +1,230 @@
+/**
+ * @file llestateinfomodel.cpp
+ * @brief Estate info model
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llestateinfomodel.h"
+
+// libs
+#include "llhttpclient.h"
+#include "llregionflags.h"
+#include "message.h"
+
+// viewer
+#include "llagent.h"
+#include "llfloaterregioninfo.h" // for invoice id
+#include "llviewerregion.h"
+
+LLEstateInfoModel::LLEstateInfoModel()
+: mID(0)
+, mFlags(0)
+, mSunHour(0)
+{
+}
+
+boost::signals2::connection LLEstateInfoModel::setUpdateCallback(const update_signal_t::slot_type& cb)
+{
+ return mUpdateSignal.connect(cb);
+}
+
+boost::signals2::connection LLEstateInfoModel::setCommitCallback(const update_signal_t::slot_type& cb)
+{
+ return mCommitSignal.connect(cb);
+}
+
+void LLEstateInfoModel::sendEstateInfo()
+{
+ if (!commitEstateInfoCaps())
+ {
+ // the caps method failed, try the old way
+ LLFloaterRegionInfo::nextInvoice();
+ commitEstateInfoDataserver();
+ }
+}
+
+bool LLEstateInfoModel::getUseFixedSun() const { return mFlags & REGION_FLAGS_SUN_FIXED; }
+bool LLEstateInfoModel::getIsExternallyVisible() const { return mFlags & REGION_FLAGS_EXTERNALLY_VISIBLE; }
+bool LLEstateInfoModel::getAllowDirectTeleport() const { return mFlags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT; }
+bool LLEstateInfoModel::getDenyAnonymous() const { return mFlags & REGION_FLAGS_DENY_ANONYMOUS; }
+bool LLEstateInfoModel::getDenyAgeUnverified() const { return mFlags & REGION_FLAGS_DENY_AGEUNVERIFIED; }
+bool LLEstateInfoModel::getAllowVoiceChat() const { return mFlags & REGION_FLAGS_ALLOW_VOICE; }
+
+void LLEstateInfoModel::setUseFixedSun(bool val) { setFlag(REGION_FLAGS_SUN_FIXED, val); }
+void LLEstateInfoModel::setIsExternallyVisible(bool val) { setFlag(REGION_FLAGS_EXTERNALLY_VISIBLE, val); }
+void LLEstateInfoModel::setAllowDirectTeleport(bool val) { setFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, val); }
+void LLEstateInfoModel::setDenyAnonymous(bool val) { setFlag(REGION_FLAGS_DENY_ANONYMOUS, val); }
+void LLEstateInfoModel::setDenyAgeUnverified(bool val) { setFlag(REGION_FLAGS_DENY_AGEUNVERIFIED, val); }
+void LLEstateInfoModel::setAllowVoiceChat(bool val) { setFlag(REGION_FLAGS_ALLOW_VOICE, val); }
+
+void LLEstateInfoModel::update(const strings_t& strings)
+{
+ // NOTE: LLDispatcher extracts strings with an extra \0 at the
+ // end. If we pass the std::string direct to the UI/renderer
+ // it draws with a weird character at the end of the string.
+ mName = strings[0].c_str();
+ mOwnerID = LLUUID(strings[1].c_str());
+ mID = strtoul(strings[2].c_str(), NULL, 10);
+ mFlags = strtoul(strings[3].c_str(), NULL, 10);
+ mSunHour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f;
+
+ LL_DEBUGS("Windlight Sync") << "Received estate info: "
+ << "is_sun_fixed = " << getUseFixedSun()
+ << ", sun_hour = " << getSunHour() << LL_ENDL;
+ lldebugs << getInfoDump() << llendl;
+
+ // Update region owner.
+ LLViewerRegion* regionp = gAgent.getRegion();
+ regionp->setOwner(mOwnerID);
+
+ // Let interested parties know that estate info has been updated.
+ mUpdateSignal();
+}
+
+void LLEstateInfoModel::notifyCommit()
+{
+ mCommitSignal();
+}
+
+//== PRIVATE STUFF ============================================================
+
+class LLEstateChangeInfoResponder : public LLHTTPClient::Responder
+{
+public:
+
+ // if we get a normal response, handle it here
+ virtual void result(const LLSD& content)
+ {
+ llinfos << "Committed estate info" << llendl;
+ LLEstateInfoModel::instance().notifyCommit();
+ }
+
+ // if we get an error response
+ virtual void error(U32 status, const std::string& reason)
+ {
+ llwarns << "Failed to commit estate info (" << status << "): " << reason << llendl;
+ }
+};
+
+// tries to send estate info using a cap; returns true if it succeeded
+bool LLEstateInfoModel::commitEstateInfoCaps()
+{
+ std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo");
+
+ if (url.empty())
+ {
+ // whoops, couldn't find the cap, so bail out
+ return false;
+ }
+
+ LLSD body;
+ body["estate_name" ] = getName();
+ body["sun_hour" ] = getSunHour();
+
+ body["is_sun_fixed" ] = getUseFixedSun();
+ body["is_externally_visible"] = getIsExternallyVisible();
+ body["allow_direct_teleport"] = getAllowDirectTeleport();
+ body["deny_anonymous" ] = getDenyAnonymous();
+ body["deny_age_unverified" ] = getDenyAgeUnverified();
+ body["allow_voice_chat" ] = getAllowVoiceChat();
+
+ body["invoice" ] = LLFloaterRegionInfo::getLastInvoice();
+
+ LL_DEBUGS("Windlight Sync") << "Sending estate caps: "
+ << "is_sun_fixed = " << getUseFixedSun()
+ << ", sun_hour = " << getSunHour() << LL_ENDL;
+ lldebugs << body << LL_ENDL;
+
+ // we use a responder so that we can re-get the data after committing to the database
+ LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder);
+ return true;
+}
+
+/* This is the old way of doing things, is deprecated, and should be
+ deleted when the dataserver model can be removed */
+// key = "estatechangeinfo"
+// strings[0] = str(estate_id) (added by simulator before relay - not here)
+// strings[1] = estate_name
+// strings[2] = str(estate_flags)
+// strings[3] = str((S32)(sun_hour * 1024.f))
+void LLEstateInfoModel::commitEstateInfoDataserver()
+{
+ LL_DEBUGS("Windlight Sync") << "Sending estate info: "
+ << "is_sun_fixed = " << getUseFixedSun()
+ << ", sun_hour = " << getSunHour() << LL_ENDL;
+ lldebugs << getInfoDump() << LL_ENDL;
+
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessage("EstateOwnerMessage");
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
+
+ msg->nextBlock("MethodData");
+ msg->addString("Method", "estatechangeinfo");
+ msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
+
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", getName());
+
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", llformat("%u", getFlags()));
+
+ msg->nextBlock("ParamList");
+ msg->addString("Parameter", llformat("%d", (S32) (getSunHour() * 1024.0f)));
+
+ gAgent.sendMessage();
+}
+
+void LLEstateInfoModel::setFlag(U32 flag, bool val)
+{
+ if (val)
+ {
+ mFlags |= flag;
+ }
+ else
+ {
+ mFlags &= ~flag;
+ }
+}
+
+std::string LLEstateInfoModel::getInfoDump()
+{
+ LLSD dump;
+ dump["estate_name" ] = getName();
+ dump["sun_hour" ] = getSunHour();
+
+ dump["is_sun_fixed" ] = getUseFixedSun();
+ dump["is_externally_visible"] = getIsExternallyVisible();
+ dump["allow_direct_teleport"] = getAllowDirectTeleport();
+ dump["deny_anonymous" ] = getDenyAnonymous();
+ dump["deny_age_unverified" ] = getDenyAgeUnverified();
+ dump["allow_voice_chat" ] = getAllowVoiceChat();
+
+ std::stringstream dump_str;
+ dump_str << dump;
+ return dump_str.str();
+}
diff --git a/indra/newview/llestateinfomodel.h b/indra/newview/llestateinfomodel.h
new file mode 100644
index 0000000000..56391eda91
--- /dev/null
+++ b/indra/newview/llestateinfomodel.h
@@ -0,0 +1,103 @@
+/**
+ * @file llestateinfomodel.h
+ * @brief Estate info model
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLESTATEINFOMODEL_H
+#define LL_LLESTATEINFOMODEL_H
+
+class LLMessageSystem;
+
+#include "llsingleton.h"
+
+/**
+ * Contains estate info, notifies interested parties of its changes.
+ */
+class LLEstateInfoModel : public LLSingleton<LLEstateInfoModel>
+{
+ LOG_CLASS(LLEstateInfoModel);
+
+public:
+ typedef boost::signals2::signal<void()> update_signal_t;
+ boost::signals2::connection setUpdateCallback(const update_signal_t::slot_type& cb); /// the model has been externally updated
+ boost::signals2::connection setCommitCallback(const update_signal_t::slot_type& cb); /// our changes have been applied
+
+ void sendEstateInfo(); /// send estate info to the simulator
+
+ // getters
+ bool getUseFixedSun() const;
+ bool getIsExternallyVisible() const;
+ bool getAllowDirectTeleport() const;
+ bool getDenyAnonymous() const;
+ bool getDenyAgeUnverified() const;
+ bool getAllowVoiceChat() const;
+
+ const std::string& getName() const { return mName; }
+ const LLUUID& getOwnerID() const { return mOwnerID; }
+ U32 getID() const { return mID; }
+ F32 getSunHour() const { return getUseFixedSun() ? mSunHour : 0.f; }
+
+ // setters
+ void setUseFixedSun(bool val);
+ void setIsExternallyVisible(bool val);
+ void setAllowDirectTeleport(bool val);
+ void setDenyAnonymous(bool val);
+ void setDenyAgeUnverified(bool val);
+ void setAllowVoiceChat(bool val);
+
+ void setSunHour(F32 sun_hour) { mSunHour = sun_hour; }
+
+protected:
+ typedef std::vector<std::string> strings_t;
+
+ friend class LLSingleton<LLEstateInfoModel>;
+ friend class LLDispatchEstateUpdateInfo;
+ friend class LLEstateChangeInfoResponder;
+
+ LLEstateInfoModel();
+
+ /// refresh model with data from the incoming server message
+ void update(const strings_t& strings);
+
+ void notifyCommit();
+
+private:
+ bool commitEstateInfoCaps();
+ void commitEstateInfoDataserver();
+ U32 getFlags() const { return mFlags; }
+ void setFlag(U32 flag, bool val);
+ std::string getInfoDump();
+
+ // estate info
+ std::string mName; /// estate name
+ LLUUID mOwnerID; /// estate owner id
+ U32 mID; /// estate id
+ U32 mFlags; /// estate flags
+ F32 mSunHour; /// estate sun hour
+
+ update_signal_t mUpdateSignal; /// emitted when we receive update from sim
+ update_signal_t mCommitSignal; /// emitted when our update gets applied to sim
+};
+
+#endif // LL_LLESTATEINFOMODEL_H
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 5501b8c2ac..2abfbf37ca 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -415,6 +415,15 @@ void LLExpandableTextBox::onTopLost()
LLUICtrl::onTopLost();
}
+void LLExpandableTextBox::updateTextShape()
+{
+ // I guess this should be done on every reshape(),
+ // but adding this code to reshape() currently triggers bug VWR-26455,
+ // which makes the text virtually unreadable.
+ llassert(!mExpanded);
+ updateTextBoxRect();
+}
+
void LLExpandableTextBox::setValue(const LLSD& value)
{
collapseTextBox();
diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h
index f75ef954ff..399e48bea2 100644
--- a/indra/newview/llexpandabletextbox.h
+++ b/indra/newview/llexpandabletextbox.h
@@ -143,6 +143,10 @@ public:
*/
/*virtual*/ void onTopLost();
+ /**
+ * *HACK: Update the inner textbox shape.
+ */
+ void updateTextShape();
/**
* Draws text box, collapses text box if its expanded and its parent's position changed
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index b6566fcbd0..6dbeae6677 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -496,14 +496,14 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
gGL.pushMatrix();
if (mDrawablep->isActive())
{
- glMultMatrixf((GLfloat*)mDrawablep->getRenderMatrix().mMatrix);
+ gGL.multMatrix((GLfloat*)mDrawablep->getRenderMatrix().mMatrix);
}
else
{
- glMultMatrixf((GLfloat*)mDrawablep->getRegion()->mRenderMatrix.mMatrix);
+ gGL.multMatrix((GLfloat*)mDrawablep->getRegion()->mRenderMatrix.mMatrix);
}
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
if (mDrawablep->isState(LLDrawable::RIGGED))
{
@@ -515,7 +515,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
{
LLGLEnable offset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.f, -1.f);
- glMultMatrixf((F32*) volume->getRelativeXform().mMatrix);
+ gGL.multMatrix((F32*) volume->getRelativeXform().mMatrix);
const LLVolumeFace& vol_face = rigged->getVolumeFace(getTEOffset());
LLVertexBuffer::unbind();
glVertexPointer(3, GL_FLOAT, 16, vol_face.mPositions);
@@ -524,6 +524,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, 8, vol_face.mTexCoords);
}
+ gGL.syncMatrices();
glDrawElements(GL_TRIANGLES, vol_face.mNumIndices, GL_UNSIGNED_SHORT, vol_face.mIndices);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
@@ -557,17 +558,17 @@ void LLFace::renderSelectedUV()
// add green dither pattern on top of red/blue gradient
gGL.blendFunc(LLRender::BF_ONE, LLRender::BF_ONE);
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.pushMatrix();
// make green pattern repeat once per texel in red/blue texture
- glScalef(256.f, 256.f, 1.f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.scalef(256.f, 256.f, 1.f);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
renderSelected(green_imagep, LLColor4::white);
- glMatrixMode(GL_TEXTURE);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
}
*/
@@ -1051,6 +1052,14 @@ bool LLFace::canRenderAsMask()
static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_POSITION("Position");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_NORMAL("Normal");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_TEXTURE("Texture");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_COLOR("Color");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_EMISSIVE("Emissive");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_WEIGHTS("Weights");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_BINORMAL("Binormal");
+static LLFastTimer::DeclareTimer FTM_FACE_GEOM_INDEX("Index");
BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const S32 &f,
@@ -1064,6 +1073,13 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
S32 num_vertices = (S32)vf.mNumVertices;
S32 num_indices = (S32) vf.mNumIndices;
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCTREE))
+ {
+ updateRebuildFlags();
+ }
+
+ bool map_range = gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange;
+
if (mVertexBuffer.notNull())
{
if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices())
@@ -1115,6 +1131,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
bool rebuild_pos = full_rebuild || mDrawablep->isState(LLDrawable::REBUILD_POSITION);
bool rebuild_color = full_rebuild || mDrawablep->isState(LLDrawable::REBUILD_COLOR);
+ bool rebuild_emissive = rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_EMISSIVE);
bool rebuild_tcoord = full_rebuild || mDrawablep->isState(LLDrawable::REBUILD_TCOORD);
bool rebuild_normal = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_NORMAL);
bool rebuild_binormal = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_BINORMAL);
@@ -1182,7 +1199,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
// INDICES
if (full_rebuild)
{
- mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount, true);
+ LLFastTimer t(FTM_FACE_GEOM_INDEX);
+ mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex, mIndicesCount, map_range);
__m128i* dst = (__m128i*) indicesp.get();
__m128i* src = (__m128i*) vf.mIndices;
@@ -1201,7 +1219,10 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
indicesp[i] = vf.mIndices[i]+index_offset;
}
- mVertexBuffer->setBuffer(0);
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
LLMatrix4a mat_normal;
@@ -1215,6 +1236,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
+ LLFastTimer t(FTM_FACE_GEOM_TEXTURE);
bool do_xform;
if (tep)
@@ -1422,11 +1444,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
}
- mVertexBuffer->setBuffer(0);
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
else
{ //either bump mapped or in atlas, just do the whole expensive loop
- mVertexBuffer->getTexCoord0Strider(tex_coords, mGeomIndex, mGeomCount, true);
+ mVertexBuffer->getTexCoord0Strider(tex_coords, mGeomIndex, mGeomCount, map_range);
std::vector<LLVector2> bump_tc;
@@ -1566,12 +1591,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
}
- mVertexBuffer->setBuffer(0);
-
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
if (do_bump)
{
- mVertexBuffer->getTexCoord1Strider(tex_coords2, mGeomIndex, mGeomCount, true);
+ mVertexBuffer->getTexCoord1Strider(tex_coords2, mGeomIndex, mGeomCount, map_range);
for (S32 i = 0; i < num_vertices; i++)
{
@@ -1601,14 +1628,20 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
*tex_coords2++ = tc;
}
- mVertexBuffer->setBuffer(0);
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
}
}
if (rebuild_pos)
{
- mVertexBuffer->getVertexStrider(vert, mGeomIndex, mGeomCount, true);
+ LLFastTimer t(FTM_FACE_GEOM_POSITION);
+ llassert(num_vertices > 0);
+
+ mVertexBuffer->getVertexStrider(vert, mGeomIndex, mGeomCount, map_range);
vertices = (LLVector4a*) vert.get();
LLMatrix4a mat_vert;
@@ -1625,6 +1658,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
while(dst < end);
F32 index = (F32) (mTextureIndex < 255 ? mTextureIndex : 0);
+
+ llassert(index <= LLGLSLShader::sIndexedTextureChannels-1);
F32 *index_dst = (F32*) vertices;
F32 *index_end = (F32*) end;
@@ -1636,13 +1671,25 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
index_dst += 4;
}
while (index_dst < index_end);
-
- mVertexBuffer->setBuffer(0);
+
+ S32 aligned_pad_vertices = mGeomCount - num_vertices;
+ LLVector4a* last_vec = end - 1;
+ while (aligned_pad_vertices > 0)
+ {
+ --aligned_pad_vertices;
+ *dst++ = *last_vec;
+ }
+
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
if (rebuild_normal)
{
- mVertexBuffer->getNormalStrider(norm, mGeomIndex, mGeomCount, true);
+ LLFastTimer t(FTM_FACE_GEOM_NORMAL);
+ mVertexBuffer->getNormalStrider(norm, mGeomIndex, mGeomCount, map_range);
normals = (LLVector4a*) norm.get();
for (S32 i = 0; i < num_vertices; i++)
@@ -1653,12 +1700,16 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
normals[i] = normal;
}
- mVertexBuffer->setBuffer(0);
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
if (rebuild_binormal)
{
- mVertexBuffer->getBinormalStrider(binorm, mGeomIndex, mGeomCount, true);
+ LLFastTimer t(FTM_FACE_GEOM_BINORMAL);
+ mVertexBuffer->getBinormalStrider(binorm, mGeomIndex, mGeomCount, map_range);
binormals = (LLVector4a*) binorm.get();
for (S32 i = 0; i < num_vertices; i++)
@@ -1669,20 +1720,28 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
binormals[i] = binormal;
}
- mVertexBuffer->setBuffer(0);
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
if (rebuild_weights && vf.mWeights)
{
- mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, true);
+ LLFastTimer t(FTM_FACE_GEOM_WEIGHTS);
+ mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, map_range);
weights = (LLVector4a*) wght.get();
LLVector4a::memcpyNonAliased16((F32*) weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32));
- mVertexBuffer->setBuffer(0);
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
if (rebuild_color)
{
- mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, true);
+ LLFastTimer t(FTM_FACE_GEOM_COLOR);
+ mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range);
LLVector4a src;
@@ -1703,9 +1762,50 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
dst[i] = src;
}
- mVertexBuffer->setBuffer(0);
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
}
+ if (rebuild_emissive)
+ {
+ LLFastTimer t(FTM_FACE_GEOM_EMISSIVE);
+ LLStrider<LLColor4U> emissive;
+ mVertexBuffer->getEmissiveStrider(emissive, mGeomIndex, mGeomCount, map_range);
+
+ U8 glow = (U8) llclamp((S32) (getTextureEntry()->getGlow()*255), 0, 255);
+
+ LLVector4a src;
+
+
+ U32 glow32 = glow |
+ (glow << 8) |
+ (glow << 16) |
+ (glow << 24);
+
+ U32 vec[4];
+ vec[0] = vec[1] = vec[2] = vec[3] = glow32;
+
+ src.loadua((F32*) vec);
+
+ LLVector4a* dst = (LLVector4a*) emissive.get();
+ S32 num_vecs = num_vertices/4;
+ if (num_vertices%4 > 0)
+ {
+ ++num_vecs;
+ }
+
+ for (S32 i = 0; i < num_vecs; i++)
+ {
+ dst[i] = src;
+ }
+
+ if (map_range)
+ {
+ mVertexBuffer->flush();
+ }
+ }
if (rebuild_tcoord)
{
mTexExtents[0].setVec(0,0);
@@ -1962,7 +2062,7 @@ BOOL LLFace::verify(const U32* indices_array) const
}
// First, check whether the face data fits within the pool's range.
- if ((mGeomIndex + mGeomCount) > mVertexBuffer->getRequestedVerts())
+ if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts())
{
ok = FALSE;
llinfos << "Face references invalid vertices!" << llendl;
@@ -1981,7 +2081,7 @@ BOOL LLFace::verify(const U32* indices_array) const
llinfos << "Face has bogus indices count" << llendl;
}
- if (mIndicesIndex + mIndicesCount > mVertexBuffer->getRequestedIndices())
+ if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices())
{
ok = FALSE;
llinfos << "Face references invalid indices!" << llendl;
@@ -2043,7 +2143,7 @@ void LLFace::renderSetColor() const
{
const LLColor4* color = &(getRenderColor());
- glColor4fv(color->mV);
+ gGL.diffuseColor4fv(color->mV);
}
}
@@ -2078,10 +2178,10 @@ S32 LLFace::renderElements(const U16 *index_array) const
}
else
{
- glPushMatrix();
- glMultMatrixf((float*)getRenderMatrix().mMatrix);
+ gGL.pushMatrix();
+ gGL.multMatrix((float*)getRenderMatrix().mMatrix);
ret = pushVertices(index_array);
- glPopMatrix();
+ gGL.popMatrix();
}
return ret;
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index b5eaeecd60..82e4ab61b7 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -329,13 +329,9 @@ public:
{
return lhs->getTexture() < rhs->getTexture();
}
- else if (lte->getBumpShinyFullbright() != rte->getBumpShinyFullbright())
- {
- return lte->getBumpShinyFullbright() < rte->getBumpShinyFullbright();
- }
else
{
- return lte->getGlow() < rte->getGlow();
+ return lte->getBumpShinyFullbright() < rte->getBumpShinyFullbright();
}
}
};
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 35712163eb..233038daba 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -80,12 +80,10 @@ static timer_tree_iterator_t end_timer_tree()
return timer_tree_iterator_t();
}
-LLFastTimerView::LLFastTimerView(const LLRect& rect)
-: LLFloater(LLSD()),
+LLFastTimerView::LLFastTimerView(const LLSD& key)
+: LLFloater(key),
mHoverTimer(NULL)
{
- setRect(rect);
- setVisible(FALSE);
mDisplayMode = 0;
mAvgCountTotal = 0;
mMaxCountTotal = 0;
@@ -98,10 +96,31 @@ LLFastTimerView::LLFastTimerView(const LLRect& rect)
FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount();
mPrintStats = -1;
mAverageCyclesPerTimer = 0;
- setCanMinimize(false);
- setCanClose(true);
}
+void LLFastTimerView::onPause()
+{
+ LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
+ // reset scroll to bottom when unpausing
+ if (!LLFastTimer::sPauseHistory)
+ {
+ mScrollIndex = 0;
+ LLFastTimer::sResetHistory = true;
+ getChild<LLButton>("pause_btn")->setLabel(getString("pause"));
+ }
+ else
+ {
+ getChild<LLButton>("pause_btn")->setLabel(getString("run"));
+ }
+}
+
+BOOL LLFastTimerView::postBuild()
+{
+ LLButton& pause_btn = getChildRef<LLButton>("pause_btn");
+
+ pause_btn.setCommitCallback(boost::bind(&LLFastTimerView::onPause, this));
+ return TRUE;
+}
BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
@@ -116,14 +135,16 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
mHoverTimer->getParent()->setCollapsed(true);
}
+ return TRUE;
}
else if (mBarRect.pointInRect(x, y))
{
S32 bar_idx = MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight());
bar_idx = llclamp(bar_idx, 0, MAX_VISIBLE_HISTORY);
mPrintStats = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - bar_idx;
+ return TRUE;
}
- return FALSE;
+ return LLFloater::handleRightMouseDown(x, y, mask);
}
LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y)
@@ -151,18 +172,6 @@ BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask)
BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
-
- {
- S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft;
- S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom;
- if(mButtons[BUTTON_CLOSE]->getVisible()
- && mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y) )
- {
- return LLFloater::handleMouseDown(x, y, mask);;
- }
- }
-
-
if (x < mBarRect.mLeft)
{
LLFastTimer::NamedTimer* idp = getLegendID(y);
@@ -196,36 +205,42 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
mDisplayCenter = (ChildAlignment)((mDisplayCenter + 1) % ALIGN_COUNT);
}
- else
+ else if (mGraphRect.pointInRect(x, y))
{
- // pause/unpause
- LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
- // reset scroll to bottom when unpausing
- if (!LLFastTimer::sPauseHistory)
- {
- mScrollIndex = 0;
- }
+ gFocusMgr.setMouseCapture(this);
+ return TRUE;
}
- // SJB: Don't pass mouse clicks through the display
- return TRUE;
+ //else
+ //{
+ // // pause/unpause
+ // LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
+ // // reset scroll to bottom when unpausing
+ // if (!LLFastTimer::sPauseHistory)
+ // {
+ // mScrollIndex = 0;
+ // }
+ //}
+ return LLFloater::handleMouseDown(x, y, mask);
}
BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask)
{
+ if (hasMouseCapture())
{
- S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft;
- S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom;
- if(mButtons[BUTTON_CLOSE]->getVisible()
- && mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y) )
- {
- return LLFloater::handleMouseUp(x, y, mask);;
- }
+ gFocusMgr.setMouseCapture(NULL);
}
- return FALSE;
+ return LLFloater::handleMouseUp(x, y, mask);;
}
BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
{
+ if (hasMouseCapture())
+ {
+ F32 lerp = llclamp(1.f - (F32) (x - mGraphRect.mLeft) / (F32) mGraphRect.getWidth(), 0.f, 1.f);
+ mScrollIndex = llround( lerp * (F32)(LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
+ mScrollIndex = llclamp( mScrollIndex, 0, LLFastTimer::getLastFrameIndex());
+ return TRUE;
+ }
mHoverTimer = NULL;
mHoverID = NULL;
@@ -252,7 +267,15 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
x < mBarEnd[mHoverBarIndex][i])
{
mHoverID = (*it);
- mHoverTimer = (*it);
+ if (mHoverTimer != *it)
+ {
+ // could be that existing tooltip is for a parent and is thus
+ // covering region for this new timer, go ahead and unblock
+ // so we can create a new tooltip
+ LLToolTipMgr::instance().unblockToolTips();
+ mHoverTimer = (*it);
+ }
+
mToolTipRect.set(mBarStart[mHoverBarIndex][i],
mBarRect.mBottom + llround(((F32)(MAX_VISIBLE_HISTORY - mHoverBarIndex + 1)) * ((F32)mBarRect.getHeight() / ((F32)MAX_VISIBLE_HISTORY + 2.f))),
mBarEnd[mHoverBarIndex][i],
@@ -274,7 +297,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
}
}
- return FALSE;
+ return LLFloater::handleHover(x, y, mask);
}
@@ -310,15 +333,15 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
}
}
}
-
- return FALSE;
+
+ return LLFloater::handleToolTip(x, y, mask);
}
BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
LLFastTimer::sPauseHistory = TRUE;
- mScrollIndex = llclamp(mScrollIndex - clicks,
- 0,
+ mScrollIndex = llclamp( mScrollIndex + clicks,
+ 0,
llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
return TRUE;
}
@@ -337,8 +360,8 @@ void LLFastTimerView::draw()
F64 iclock_freq = 1000.0 / clock_freq;
S32 margin = 10;
- S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f);
- S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f);
+ S32 height = getRect().getHeight();
+ S32 width = getRect().getWidth();
LLRect new_rect;
new_rect.setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height);
@@ -569,6 +592,7 @@ void LLFastTimerView::draw()
{
mAvgCountTotal = ticks;
mMaxCountTotal = ticks;
+ LLFastTimer::sResetHistory = false;
}
}
@@ -622,7 +646,6 @@ void LLFastTimerView::draw()
LLFontGL::LEFT, LLFontGL::TOP);
}
- LLRect graph_rect;
// Draw borders
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -655,9 +678,9 @@ void LLFastTimerView::draw()
by = LINE_GRAPH_HEIGHT-barh-dy-7;
//line graph
- graph_rect = LLRect(xleft-5, by, getRect().getWidth()-5, 5);
+ mGraphRect = LLRect(xleft-5, by, getRect().getWidth()-5, 5);
- gl_rect_2d(graph_rect, FALSE);
+ gl_rect_2d(mGraphRect, FALSE);
}
mBarStart.clear();
@@ -805,7 +828,7 @@ void LLFastTimerView::draw()
//draw line graph history
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- LLLocalClipRect clip(graph_rect);
+ LLLocalClipRect clip(mGraphRect);
//normalize based on last frame's maximum
static U64 last_max = 0;
@@ -822,8 +845,8 @@ void LLFastTimerView::draw()
else
tdesc = llformat("%4.2f ms", ms);
- x = graph_rect.mRight - LLFontGL::getFontMonospace()->getWidth(tdesc)-5;
- y = graph_rect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight());
+ x = mGraphRect.mRight - LLFontGL::getFontMonospace()->getWidth(tdesc)-5;
+ y = mGraphRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight());
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white,
LLFontGL::LEFT, LLFontGL::TOP);
@@ -833,24 +856,24 @@ void LLFastTimerView::draw()
S32 first_frame = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex;
S32 last_frame = first_frame - MAX_VISIBLE_HISTORY;
- F32 frame_delta = ((F32) (graph_rect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1);
+ F32 frame_delta = ((F32) (mGraphRect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1);
- F32 right = (F32) graph_rect.mLeft + frame_delta*first_frame;
- F32 left = (F32) graph_rect.mLeft + frame_delta*last_frame;
+ F32 right = (F32) mGraphRect.mLeft + frame_delta*first_frame;
+ F32 left = (F32) mGraphRect.mLeft + frame_delta*last_frame;
gGL.color4f(0.5f,0.5f,0.5f,0.3f);
- gl_rect_2d((S32) left, graph_rect.mTop, (S32) right, graph_rect.mBottom);
+ gl_rect_2d((S32) left, mGraphRect.mTop, (S32) right, mGraphRect.mBottom);
if (mHoverBarIndex >= 0)
{
S32 bar_frame = first_frame - mHoverBarIndex;
- F32 bar = (F32) graph_rect.mLeft + frame_delta*bar_frame;
+ F32 bar = (F32) mGraphRect.mLeft + frame_delta*bar_frame;
gGL.color4f(0.5f,0.5f,0.5f,1);
gGL.begin(LLRender::LINES);
- gGL.vertex2i((S32)bar, graph_rect.mBottom);
- gGL.vertex2i((S32)bar, graph_rect.mTop);
+ gGL.vertex2i((S32)bar, mGraphRect.mBottom);
+ gGL.vertex2i((S32)bar, mGraphRect.mTop);
gGL.end();
}
}
@@ -875,7 +898,7 @@ void LLFastTimerView::draw()
if (mHoverID != NULL &&
idp != mHoverID)
- { //fade out non-hihglighted timers
+ { //fade out non-highlighted timers
if (idp->getParent() != mHoverID)
{
alpha = alpha_interp;
@@ -883,8 +906,10 @@ void LLFastTimerView::draw()
}
gGL.color4f(col[0], col[1], col[2], alpha);
- gGL.begin(LLRender::LINE_STRIP);
- for (U32 j = 0; j < LLFastTimer::NamedTimer::HISTORY_NUM; j++)
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ for (U32 j = llmax(0, LLFastTimer::NamedTimer::HISTORY_NUM - LLFastTimer::getLastFrameIndex());
+ j < LLFastTimer::NamedTimer::HISTORY_NUM;
+ j++)
{
U64 ticks = idp->getHistoricalCount(j);
@@ -904,9 +929,10 @@ void LLFastTimerView::draw()
//normalize to highlighted timer
cur_max = llmax(cur_max, ticks);
}
- F32 x = graph_rect.mLeft + ((F32) (graph_rect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1)*j;
- F32 y = graph_rect.mBottom + (F32) graph_rect.getHeight()/max_ticks*ticks;
+ F32 x = mGraphRect.mLeft + ((F32) (mGraphRect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1)*j;
+ F32 y = mGraphRect.mBottom + (F32) mGraphRect.getHeight()/max_ticks*ticks;
gGL.vertex2f(x,y);
+ gGL.vertex2f(x,mGraphRect.mBottom);
}
gGL.end();
@@ -924,18 +950,20 @@ void LLFastTimerView::draw()
}
//interpolate towards new maximum
- F32 dt = gFrameIntervalSeconds*3.f;
- last_max = (U64) ((F32) last_max + ((F32) cur_max- (F32) last_max) * dt);
+ last_max = (U64) lerp((F32)last_max, (F32) cur_max, LLCriticalDamp::getInterpolant(0.1f));
+ if (last_max - cur_max <= 1 || cur_max - last_max <= 1)
+ {
+ last_max = cur_max;
+ }
F32 alpha_target = last_max > cur_max ?
llmin((F32) last_max/ (F32) cur_max - 1.f,1.f) :
llmin((F32) cur_max/ (F32) last_max - 1.f,1.f);
-
- alpha_interp = alpha_interp + (alpha_target-alpha_interp) * dt;
+ alpha_interp = lerp(alpha_interp, alpha_target, LLCriticalDamp::getInterpolant(0.1f));
if (mHoverID != NULL)
{
- x = (graph_rect.mRight + graph_rect.mLeft)/2;
- y = graph_rect.mBottom + 8;
+ x = (mGraphRect.mRight + mGraphRect.mLeft)/2;
+ y = mGraphRect.mBottom + 8;
LLFontGL::getFontMonospace()->renderUTF8(
mHoverID->getName(),
@@ -1099,10 +1127,10 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
LLPointer<LLImageRaw> scratch = new LLImageRaw(1024, 512, 3);
gGL.pushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-0.05, 1.05, -0.05, 1.05, -1.0, 1.0);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.loadIdentity();
+ gGL.ortho(-0.05f, 1.05f, -0.05f, 1.05f, -1.0f, 1.0f);
//render charts
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -1341,7 +1369,7 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
buffer.flush();
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
}
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index ea8251191b..a349e7ad4c 100644
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -33,8 +33,9 @@
class LLFastTimerView : public LLFloater
{
public:
- LLFastTimerView(const LLRect& rect);
-
+ LLFastTimerView(const LLSD&);
+ BOOL postBuild();
+
static BOOL sAnalyzePerformance;
static void outputAllMetrics();
@@ -44,6 +45,7 @@ private:
static void doAnalysisDefault(std::string baseline, std::string target, std::string output) ;
static LLSD analyzePerformanceLogDefault(std::istream& is) ;
static void exportCharts(const std::string& base, const std::string& target);
+ void onPause();
public:
@@ -89,6 +91,7 @@ private:
LLFrameTimer mHighlightTimer;
S32 mPrintStats;
S32 mAverageCyclesPerTimer;
+ LLRect mGraphRect;
};
#endif
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 0b17d64eb0..4f2fd47488 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -31,6 +31,7 @@
#include "llfocusmgr.h"
#include "llinventory.h"
#include "lllandmarkactions.h"
+#include "lltoolbarview.h"
#include "lltrans.h"
#include "lluictrlfactory.h"
#include "llmenugl.h"
@@ -41,10 +42,10 @@
#include "llinventoryclipboard.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "lllandmarkactions.h"
#include "llnotificationsutil.h"
-#include "llsidetray.h"
#include "lltoggleablemenu.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
@@ -54,6 +55,7 @@
static LLDefaultChildRegistry::Register<LLFavoritesBarCtrl> r("favorites_bar");
const S32 DROP_DOWN_MENU_WIDTH = 250;
+const S32 DROP_DOWN_MENU_TOP_PAD = 13;
/**
* Helper for LLFavoriteLandmarkButton and LLFavoriteLandmarkMenuItem.
@@ -360,7 +362,7 @@ struct LLFavoritesSort
LLFavoritesBarCtrl::Params::Params()
: image_drag_indication("image_drag_indication"),
- chevron_button("chevron_button"),
+ more_button("more_button"),
label("label")
{
}
@@ -389,10 +391,10 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
gInventory.addObserver(this);
//make chevron button
- LLButton::Params chevron_button_params(p.chevron_button);
- chevron_button_params.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
- mChevronButton = LLUICtrlFactory::create<LLButton> (chevron_button_params);
- addChild(mChevronButton);
+ LLTextBox::Params more_button_params(p.more_button);
+ mMoreTextBox = LLUICtrlFactory::create<LLTextBox> (more_button_params);
+ mMoreTextBox->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
+ addChild(mMoreTextBox);
LLTextBox::Params label_param(p.label);
mBarLabel = LLUICtrlFactory::create<LLTextBox> (label_param);
@@ -403,8 +405,8 @@ LLFavoritesBarCtrl::~LLFavoritesBarCtrl()
{
gInventory.removeObserver(this);
- LLView::deleteViewByHandle(mOverflowMenuHandle);
- LLView::deleteViewByHandle(mContextMenuHandle);
+ delete mOverflowMenuHandle.get();
+ delete mContextMenuHandle.get();
}
BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
@@ -441,17 +443,17 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
setLandingTab(dest);
}
- /*
- * the condition dest == NULL can be satisfied not only in the case
- * of dragging to the right from the last tab of the favbar. there is a
- * small gap between each tab. if the user drags something exactly there
- * then mLandingTab will be set to NULL and the dragged item will be pushed
- * to the end of the favorites bar. this is incorrect behavior. that's why
- * we need an additional check which excludes the case described previously
- * making sure that the mouse pointer is beyond the last tab.
- */
- else if (mLastTab && x >= mLastTab->getRect().mRight)
+ else if (mLastTab && (x >= mLastTab->getRect().mRight))
{
+ /*
+ * the condition dest == NULL can be satisfied not only in the case
+ * of dragging to the right from the last tab of the favbar. there is a
+ * small gap between each tab. if the user drags something exactly there
+ * then mLandingTab will be set to NULL and the dragged item will be pushed
+ * to the end of the favorites bar. this is incorrect behavior. that's why
+ * we need an additional check which excludes the case described previously
+ * making sure that the mouse pointer is beyond the last tab.
+ */
setLandingTab(NULL);
}
@@ -465,7 +467,6 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
if (drop)
{
handleExistingFavoriteDragAndDrop(x, y);
- showDragMarker(FALSE);
}
}
else
@@ -488,7 +489,6 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
setLandingTab(NULL);
}
handleNewFavoriteDragAndDrop(item, favorites_id, x, y);
- showDragMarker(FALSE);
}
}
}
@@ -502,20 +502,29 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
{
+ // Identify the button hovered and the side to drop
LLFavoriteLandmarkButton* dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
+ bool insert_before = true;
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLastTab);
+ }
- // there is no need to handle if an item was dragged onto itself
+ // There is no need to handle if an item was dragged onto itself
if (dest && dest->getLandmarkId() == mDragItemId)
{
return;
}
+ // Insert the dragged item in the right place
if (dest)
{
- LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId());
+ LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId(), insert_before);
}
else
{
+ // This can happen when the item list is empty
mItems.push_back(gInventory.getItem(mDragItemId));
}
@@ -532,22 +541,35 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y)
{
- LLFavoriteLandmarkButton* dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
-
- // there is no need to handle if an item was dragged onto itself
+ // Identify the button hovered and the side to drop
+ LLFavoriteLandmarkButton* dest = NULL;
+ bool insert_before = true;
+ if (!mItems.empty())
+ {
+ dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLastTab);
+ }
+ }
+
+ // There is no need to handle if an item was dragged onto itself
if (dest && dest->getLandmarkId() == mDragItemId)
{
return;
}
-
+
LLPointer<LLViewerInventoryItem> viewer_item = new LLViewerInventoryItem(item);
+ // Insert the dragged item in the right place
if (dest)
{
- insertBeforeItem(mItems, dest->getLandmarkId(), viewer_item);
+ insertItem(mItems, dest->getLandmarkId(), viewer_item, insert_before);
}
else
{
+ // This can happen when the item list is empty
mItems.push_back(viewer_item);
}
@@ -577,7 +599,11 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con
if (tool_dad->getSource() == LLToolDragAndDrop::SOURCE_NOTECARD)
{
viewer_item->setType(LLAssetType::AT_LANDMARK);
- copy_inventory_from_notecard(tool_dad->getObjectID(), tool_dad->getSourceID(), viewer_item.get(), gInventoryCallbacks.registerCB(cb));
+ copy_inventory_from_notecard(favorites_id,
+ tool_dad->getObjectID(),
+ tool_dad->getSourceID(),
+ viewer_item.get(),
+ gInventoryCallbacks.registerCB(cb));
}
else
{
@@ -640,7 +666,7 @@ void LLFavoritesBarCtrl::draw()
{
// mouse pointer hovers over an existing tab
LLRect rect = mLandingTab->getRect();
- mImageDragIndication->draw(rect.mLeft - w/2, rect.getHeight(), w, h);
+ mImageDragIndication->draw(rect.mLeft, rect.getHeight(), w, h);
}
else if (mLastTab)
{
@@ -648,6 +674,8 @@ void LLFavoritesBarCtrl::draw()
LLRect rect = mLastTab->getRect();
mImageDragIndication->draw(rect.mRight, rect.getHeight(), w, h);
}
+ // Once drawn, mark this false so we won't draw it again (unless we hit the favorite bar again)
+ mShowDragMarker = FALSE;
}
}
@@ -692,7 +720,7 @@ void LLFavoritesBarCtrl::updateButtons()
const child_list_t* childs = getChildList();
child_list_const_iter_t child_it = childs->begin();
int first_changed_item_index = 0;
- int rightest_point = getRect().mRight - mChevronButton->getRect().getWidth();
+ int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth();
//lets find first changed button
while (child_it != childs->end() && first_changed_item_index < mItems.count())
{
@@ -719,7 +747,7 @@ void LLFavoritesBarCtrl::updateButtons()
if (first_changed_item_index <= mItems.count())
{
// Rebuild the buttons only
- // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator
+ // child_list_t is a linked list, so safe to erase from the middle if we pre-increment the iterator
while (child_it != childs->end())
{
@@ -735,9 +763,9 @@ void LLFavoritesBarCtrl::updateButtons()
}
// we have to remove ChevronButton to make sure that the last item will be LandmarkButton to get the right aligning
// keep in mind that we are cutting all buttons in space between the last visible child of favbar and ChevronButton
- if (mChevronButton->getParent() == this)
+ if (mMoreTextBox->getParent() == this)
{
- removeChild(mChevronButton);
+ removeChild(mMoreTextBox);
}
int last_right_edge = 0;
//calculate new buttons offset
@@ -777,13 +805,13 @@ void LLFavoritesBarCtrl::updateButtons()
S32 buttonHGap = button_params.rect.left; // default value
LLRect rect;
// Chevron button should stay right aligned
- rect.setOriginAndSize(getRect().mRight - mChevronButton->getRect().getWidth() - buttonHGap, 0,
- mChevronButton->getRect().getWidth(),
- mChevronButton->getRect().getHeight());
+ rect.setOriginAndSize(getRect().mRight - mMoreTextBox->getRect().getWidth() - buttonHGap, 0,
+ mMoreTextBox->getRect().getWidth(),
+ mMoreTextBox->getRect().getHeight());
- addChild(mChevronButton);
- mChevronButton->setRect(rect);
- mChevronButton->setVisible(TRUE);
+ addChild(mMoreTextBox);
+ mMoreTextBox->setRect(rect);
+ mMoreTextBox->setVisible(TRUE);
}
// Update overflow menu
LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mOverflowMenuHandle.get());
@@ -808,16 +836,16 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
/**
* WORKAROUND:
- * there are some problem with displaying of fonts in buttons.
- * Empty space (or ...) is displaying instead of last symbols, even though the width of the button is enough.
- * Problem will gone, if we stretch out the button. For that reason I have to put additional 20 pixels.
+ * There are some problem with displaying of fonts in buttons.
+ * Empty space or ellipsis might be displayed instead of last symbols, even though the width of the button is enough.
+ * The problem disappears if we pad the button with 20 pixels.
*/
int required_width = mFont->getWidth(item->getName()) + 20;
int width = required_width > def_button_width? def_button_width : required_width;
LLFavoriteLandmarkButton* fav_btn = NULL;
- // do we have a place for next button + double buttonHGap + mChevronButton ?
- if(curr_x + width + 2*button_x_delta + mChevronButton->getRect().getWidth() > getRect().mRight )
+ // do we have a place for next button + double buttonHGap + mMoreTextBox ?
+ if(curr_x + width + 2*button_x_delta + mMoreTextBox->getRect().getWidth() > getRect().mRight )
{
return NULL;
}
@@ -838,7 +866,6 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
fav_btn->setRect(butt_rect);
// change only left and save bottom
fav_btn->setFont(mFont);
- fav_btn->setName(item->getName());
fav_btn->setLabel(item->getName());
fav_btn->setToolTip(item->getName());
fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
@@ -893,84 +920,157 @@ void LLFavoritesBarCtrl::showDropDownMenu()
{
if (mOverflowMenuHandle.isDead())
{
- LLToggleableMenu::Params menu_p;
- menu_p.name("favorites menu");
- menu_p.can_tear_off(false);
- menu_p.visible(false);
- menu_p.scrollable(true);
- menu_p.max_scrollable_items = 10;
- menu_p.preferred_width = DROP_DOWN_MENU_WIDTH;
-
- LLToggleableMenu* menu = LLUICtrlFactory::create<LLFavoriteLandmarkToggleableMenu>(menu_p);
- mOverflowMenuHandle = menu->getHandle();
+ createOverflowMenu();
}
LLToggleableMenu* menu = (LLToggleableMenu*)mOverflowMenuHandle.get();
+ if (menu && menu->toggleVisibility())
+ {
+ if (mUpdateDropDownItems)
+ {
+ updateMenuItems(menu);
+ }
- if (menu)
+ menu->buildDrawLabels();
+ menu->updateParent(LLMenuGL::sMenuContainer);
+ menu->setButtonRect(mMoreTextBox->getRect(), this);
+ positionAndShowMenu(menu);
+ }
+}
+
+void LLFavoritesBarCtrl::createOverflowMenu()
+{
+ LLToggleableMenu::Params menu_p;
+ menu_p.name("favorites menu");
+ menu_p.can_tear_off(false);
+ menu_p.visible(false);
+ menu_p.scrollable(true);
+ menu_p.max_scrollable_items = 10;
+ menu_p.preferred_width = DROP_DOWN_MENU_WIDTH;
+
+ LLToggleableMenu* menu = LLUICtrlFactory::create<LLFavoriteLandmarkToggleableMenu>(menu_p);
+ mOverflowMenuHandle = menu->getHandle();
+}
+
+void LLFavoritesBarCtrl::updateMenuItems(LLToggleableMenu* menu)
+{
+ menu->empty();
+
+ U32 widest_item = 0;
+
+ for (S32 i = mFirstDropDownItem; i < mItems.count(); i++)
{
- if (!menu->toggleVisibility())
- return;
+ LLViewerInventoryItem* item = mItems.get(i);
+ const std::string& item_name = item->getName();
- U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth());
- if (mUpdateDropDownItems)
+ LLFavoriteLandmarkMenuItem::Params item_params;
+ item_params.name(item_name);
+ item_params.label(item_name);
+ item_params.on_click.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
+
+ LLFavoriteLandmarkMenuItem *menu_item = LLUICtrlFactory::create<LLFavoriteLandmarkMenuItem>(item_params);
+ menu_item->initFavoritesBarPointer(this);
+ menu_item->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3, _4));
+ menu_item->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4));
+ menu_item->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4));
+ menu_item->setLandmarkID(item->getUUID());
+
+ fitLabelWidth(menu_item);
+
+ widest_item = llmax(widest_item, menu_item->getNominalWidth());
+
+ menu->addChild(menu_item);
+ }
+
+ addOpenLandmarksMenuItem(menu);
+ mUpdateDropDownItems = false;
+}
+
+void LLFavoritesBarCtrl::fitLabelWidth(LLMenuItemCallGL* menu_item)
+{
+ U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth());
+ std::string item_name = menu_item->getName();
+
+ // Check whether item name wider than menu
+ if (menu_item->getNominalWidth() > max_width)
+ {
+ S32 chars_total = item_name.length();
+ S32 chars_fitted = 1;
+ menu_item->setLabel(LLStringExplicit(""));
+ S32 label_space = max_width - menu_item->getFont()->getWidth("...") -
+ menu_item->getNominalWidth();// This returns width of menu item with empty label (pad pixels)
+
+ while (chars_fitted < chars_total
+ && menu_item->getFont()->getWidth(item_name, 0, chars_fitted) < label_space)
{
- menu->empty();
+ chars_fitted++;
+ }
+ chars_fitted--; // Rolling back one char, that doesn't fit
- U32 widest_item = 0;
+ menu_item->setLabel(item_name.substr(0, chars_fitted) + "...");
+ }
+}
- for (S32 i = mFirstDropDownItem; i < mItems.count(); i++)
- {
- LLViewerInventoryItem* item = mItems.get(i);
- const std::string& item_name = item->getName();
-
- LLFavoriteLandmarkMenuItem::Params item_params;
- item_params.name(item_name);
- item_params.label(item_name);
-
- item_params.on_click.function(boost::bind(
- &LLFavoritesBarCtrl::onButtonClick, this,
- item->getUUID()));
- LLFavoriteLandmarkMenuItem *menu_item = LLUICtrlFactory::create<LLFavoriteLandmarkMenuItem>(item_params);
- menu_item->initFavoritesBarPointer(this);
- menu_item->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3, _4));
- menu_item->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4));
- menu_item->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4));
- menu_item->setLandmarkID(item->getUUID());
-
- // Check whether item name wider than menu
- if (menu_item->getNominalWidth() > max_width)
- {
- S32 chars_total = item_name.length();
- S32 chars_fitted = 1;
- menu_item->setLabel(LLStringExplicit(""));
- S32 label_space = max_width - menu_item->getFont()->getWidth("...") -
- menu_item->getNominalWidth();// This returns width of menu item with empty label (pad pixels)
-
- while (chars_fitted < chars_total
- && menu_item->getFont()->getWidth(item_name, 0, chars_fitted) < label_space)
- {
- chars_fitted++;
- }
- chars_fitted--; // Rolling back one char, that doesn't fit
+void LLFavoritesBarCtrl::addOpenLandmarksMenuItem(LLToggleableMenu* menu)
+{
+ std::string label_untrans = "Open landmarks";
+ std::string label_transl;
+ bool translated = LLTrans::findString(label_transl, label_untrans);
+
+ LLMenuItemCallGL::Params item_params;
+ item_params.name("open_my_landmarks");
+ item_params.label(translated ? label_transl: label_untrans);
+ LLSD key;
+ key["type"] = "open_landmark_tab";
+ item_params.on_click.function(boost::bind(&LLFloaterSidePanelContainer::showPanel, "places", key));
+ LLMenuItemCallGL* menu_item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
+
+ fitLabelWidth(menu_item);
+
+ LLMenuItemSeparatorGL::Params sep_params;
+ sep_params.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor");
+ sep_params.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor");
+ sep_params.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor");
+ sep_params.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor");
+ LLMenuItemSeparatorGL* separator = LLUICtrlFactory::create<LLMenuItemSeparatorGL>(sep_params);
+
+ menu->addChild(separator);
+ menu->addChild(menu_item);
+}
- menu_item->setLabel(item_name.substr(0, chars_fitted)
- + "...");
- }
- widest_item = llmax(widest_item, menu_item->getNominalWidth());
+void LLFavoritesBarCtrl::positionAndShowMenu(LLToggleableMenu* menu)
+{
+ U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth());
- menu->addChild(menu_item);
- }
- mUpdateDropDownItems = false;
+ S32 menu_x = getRect().getWidth() - max_width;
+ S32 menu_y = getParent()->getRect().mBottom - DROP_DOWN_MENU_TOP_PAD;
+
+ // the menu should be offset of the right edge of the window
+ // so it's no covered by buttons in the right-side toolbar.
+ LLToolBar* right_toolbar = gToolBarView->getChild<LLToolBar>("toolbar_right");
+ if (right_toolbar && right_toolbar->hasButtons())
+ {
+ S32 toolbar_top = 0;
+
+ if (LLView* top_border_panel = right_toolbar->getChild<LLView>("button_panel"))
+ {
+ toolbar_top = top_border_panel->calcScreenRect().mTop;
}
- menu->buildDrawLabels();
- menu->updateParent(LLMenuGL::sMenuContainer);
+ // Calculating the bottom (in screen coord) of the drop down menu
+ S32 menu_top = getParent()->getRect().mBottom - DROP_DOWN_MENU_TOP_PAD;
+ S32 menu_bottom = menu_top - menu->getRect().getHeight();
+ S32 menu_bottom_screen = 0;
- menu->setButtonRect(mChevronButton->getRect(), this);
+ localPointToScreen(0, menu_bottom, &menu_top, &menu_bottom_screen);
- LLMenuGL::showPopup(this, menu, getRect().getWidth() - max_width, 0);
+ if (menu_bottom_screen < toolbar_top)
+ {
+ menu_x -= right_toolbar->getRect().getWidth();
+ }
}
+
+ LLMenuGL::showPopup(this, menu, menu_x, menu_y);
}
void LLFavoritesBarCtrl::onButtonClick(LLUUID item_id)
@@ -1057,7 +1157,7 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
key["type"] = "landmark";
key["id"] = mSelectedItemID;
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
}
else if (action == "copy_slurl")
{
@@ -1103,7 +1203,9 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
if (mRestoreOverflowMenu && menu && !menu->getVisible())
{
+ menu->resetScrollPositionOnShow(false);
showDropDownMenu();
+ menu->resetScrollPositionOnShow(true);
}
}
@@ -1225,25 +1327,24 @@ BOOL LLFavoritesBarCtrl::handleHover(S32 x, S32 y, MASK mask)
LLUICtrl* LLFavoritesBarCtrl::findChildByLocalCoords(S32 x, S32 y)
{
- LLUICtrl* ctrl = 0;
- S32 screenX, screenY;
+ LLUICtrl* ctrl = NULL;
const child_list_t* list = getChildList();
- localPointToScreen(x, y, &screenX, &screenY);
-
- // look for a child which contains the point (screenX, screenY) in it's rectangle
for (child_list_const_iter_t i = list->begin(); i != list->end(); ++i)
{
- LLRect rect;
- localRectToScreen((*i)->getRect(), &rect);
-
- if (rect.pointInRect(screenX, screenY))
+ // Look only for children that are favorite buttons
+ if ((*i)->getName() == "favorites_bar_btn")
{
- ctrl = dynamic_cast<LLUICtrl*>(*i);
- break;
+ LLRect rect = (*i)->getRect();
+ // We consider a button hit if the cursor is left of the right side
+ // This makes the hit a bit less finicky than hitting directly on the button itself
+ if (x <= rect.mRight)
+ {
+ ctrl = dynamic_cast<LLUICtrl*>(*i);
+ break;
+ }
}
}
-
return ctrl;
}
@@ -1264,29 +1365,28 @@ BOOL LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array
return result;
}
-LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
+void LLFavoritesBarCtrl::insertItem(LLInventoryModel::item_array_t& items, const LLUUID& dest_item_id, LLViewerInventoryItem* insertedItem, bool insert_before)
{
- LLInventoryModel::item_array_t::iterator result = items.end();
+ // Get the iterator to the destination item
+ LLInventoryModel::item_array_t::iterator it_dest = LLInventoryModel::findItemIterByUUID(items, dest_item_id);
+ if (it_dest == items.end())
+ return;
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
+ // Go to the next element if one wishes to insert after the dest element
+ if (!insert_before)
{
- if ((*i)->getUUID() == id)
- {
- result = i;
- break;
- }
+ ++it_dest;
}
-
- return result;
-}
-
-void LLFavoritesBarCtrl::insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem)
-{
- LLViewerInventoryItem* beforeItem = gInventory.getItem(beforeItemId);
- llassert(beforeItem);
- if (beforeItem)
+
+ // Insert the source item in the right place
+ if (it_dest != items.end())
+ {
+ items.insert(it_dest, insertedItem);
+ }
+ else
{
- items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem);
+ // Append to the list if it_dest reached the end
+ items.push_back(insertedItem);
}
}
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 1a28731c4f..2f75b3bb0e 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -34,13 +34,16 @@
#include "llinventoryobserver.h"
#include "llinventorymodel.h"
+class LLMenuItemCallGL;
+class LLToggleableMenu;
+
class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver
{
public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
Optional<LLUIImage*> image_drag_indication;
- Optional<LLButton::Params> chevron_button;
+ Optional<LLTextBox::Params> more_button;
Optional<LLTextBox::Params> label;
Params();
};
@@ -127,15 +130,26 @@ private:
* inserts an item identified by insertedItemId BEFORE an item identified by beforeItemId.
* this function assumes that an item identified by insertedItemId doesn't exist in items array.
*/
- void insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem);
+ void insertItem(LLInventoryModel::item_array_t& items, const LLUUID& dest_item_id, LLViewerInventoryItem* insertedItem, bool insert_before);
// finds an item by it's UUID in the items array
LLInventoryModel::item_array_t::iterator findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id);
+ void createOverflowMenu();
+
+ void updateMenuItems(LLToggleableMenu* menu);
+
+ // Fits menu item label width with favorites menu width
+ void fitLabelWidth(LLMenuItemCallGL* menu_item);
+
+ void addOpenLandmarksMenuItem(LLToggleableMenu* menu);
+
+ void positionAndShowMenu(LLToggleableMenu* menu);
+
BOOL mShowDragMarker;
LLUICtrl* mLandingTab;
LLUICtrl* mLastTab;
- LLButton* mChevronButton;
+ LLTextBox* mMoreTextBox;
LLTextBox* mBarLabel;
LLUUID mDragItemId;
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 83844048d1..08f9d26705 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -51,6 +51,7 @@
#include "llcontrol.h"
#include "llboost.h"
#include "llweb.h"
+#include "llviewershadermgr.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -106,7 +107,7 @@ BOOL LLFeatureList::isFeatureAvailable(const std::string& name)
return mFeatures[name].mAvailable;
}
- LL_WARNS("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL;
+ LL_WARNS_ONCE("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL;
// changing this to TRUE so you have to explicitly disable
// something for it to be disabled
@@ -120,7 +121,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name)
return mFeatures[name].mRecommendedLevel;
}
- LL_WARNS("RenderInit") << "Feature " << name << " not on feature list or not available!" << LL_ENDL;
+ LL_WARNS_ONCE("RenderInit") << "Feature " << name << " not on feature list or not available!" << LL_ENDL;
return 0;
}
@@ -662,8 +663,10 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
{
- applyBaseMasks();
+ LLViewerShaderMgr::sSkipReload = true;
+ applyBaseMasks();
+
switch (level)
{
case 0:
@@ -684,6 +687,9 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
}
applyFeatures(skipFeatures);
+
+ LLViewerShaderMgr::sSkipReload = false;
+ LLViewerShaderMgr::instance()->setShaders();
}
void LLFeatureManager::applyBaseMasks()
@@ -725,7 +731,7 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("NoPixelShaders");
}
- if (!gGLManager.mHasVertexShader)
+ if (!gGLManager.mHasVertexShader || !mGPUSupported)
{
maskFeatures("NoVertexShaders");
}
@@ -769,6 +775,10 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("TexUnit8orLess");
}
+ if (gGLManager.mHasMapBufferRange)
+ {
+ maskFeatures("MapBufferRange");
+ }
// now mask by gpu string
// Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 8c0ed29855..4897cf1885 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -653,12 +653,12 @@ OSStatus LLFilePicker::doNavChooseDialog(ELoadFilter filter)
// (It is destroyed by NavDialogDispose() below.)
error = NavCreateChooseFileDialog(&mNavOptions, NULL, NULL, NULL, navOpenFilterProc, (void*)(&filter), &navRef);
- gViewerWindow->mWindow->beforeDialog();
+ gViewerWindow->getWindow()->beforeDialog();
if (error == noErr)
error = NavDialogRun(navRef);
- gViewerWindow->mWindow->afterDialog();
+ gViewerWindow->getWindow()->afterDialog();
if (error == noErr)
error = NavDialogGetReply(navRef, &navReply);
@@ -808,13 +808,13 @@ OSStatus LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& fi
}
}
- gViewerWindow->mWindow->beforeDialog();
+ gViewerWindow->getWindow()->beforeDialog();
// Run the dialog
if (error == noErr)
error = NavDialogRun(navRef);
- gViewerWindow->mWindow->afterDialog();
+ gViewerWindow->getWindow()->afterDialog();
if (error == noErr)
error = NavDialogGetReply(navRef, &navReply);
@@ -1204,7 +1204,7 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
return FALSE;
}
- gViewerWindow->mWindow->beforeDialog();
+ gViewerWindow->getWindow()->beforeDialog();
reset();
@@ -1284,7 +1284,7 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
rtn = (getFileCount() == 1);
}
- gViewerWindow->mWindow->afterDialog();
+ gViewerWindow->getWindow()->afterDialog();
return rtn;
}
@@ -1299,7 +1299,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
return FALSE;
}
- gViewerWindow->mWindow->beforeDialog();
+ gViewerWindow->getWindow()->beforeDialog();
reset();
@@ -1337,7 +1337,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
rtn = (getFileCount() == 1);
}
- gViewerWindow->mWindow->afterDialog();
+ gViewerWindow->getWindow()->afterDialog();
return rtn;
}
@@ -1352,7 +1352,7 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
return FALSE;
}
- gViewerWindow->mWindow->beforeDialog();
+ gViewerWindow->getWindow()->beforeDialog();
reset();
@@ -1370,7 +1370,7 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
rtn = !mFiles.empty();
}
- gViewerWindow->mWindow->afterDialog();
+ gViewerWindow->getWindow()->afterDialog();
return rtn;
}
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 2873bc0059..83fb887d81 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -26,6 +26,8 @@
*/
#include "llviewerprecompiledheaders.h"
+#include <iostream>
+#include <fstream>
#include "llfloaterabout.h"
@@ -68,6 +70,22 @@ extern U32 gPacketsIn;
static std::string get_viewer_release_notes_url();
+///----------------------------------------------------------------------------
+/// Class LLServerReleaseNotesURLFetcher
+///----------------------------------------------------------------------------
+class LLServerReleaseNotesURLFetcher : public LLHTTPClient::Responder
+{
+ LOG_CLASS(LLServerReleaseNotesURLFetcher);
+public:
+
+ static void startFetch();
+ /*virtual*/ void completedHeader(U32 status, const std::string& reason, const LLSD& content);
+ /*virtual*/ void completedRaw(
+ U32 status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer);
+};
///----------------------------------------------------------------------------
/// Class LLFloaterAbout
@@ -87,6 +105,11 @@ public:
/// separated so that we can programmatically access the same info.
static LLSD getInfo();
void onClickCopyToClipboard();
+
+ void updateServerReleaseNotesURL(const std::string& url);
+
+private:
+ void setSupportText(const std::string& server_release_notes_url);
};
@@ -108,90 +131,88 @@ BOOL LLFloaterAbout::postBuild()
LLViewerTextEditor *support_widget =
getChild<LLViewerTextEditor>("support_editor", true);
- LLViewerTextEditor *credits_widget =
- getChild<LLViewerTextEditor>("credits_editor", true);
+ LLViewerTextEditor *linden_names_widget =
+ getChild<LLViewerTextEditor>("linden_names", true);
+
+ LLViewerTextEditor *contrib_names_widget =
+ getChild<LLViewerTextEditor>("contrib_names", true);
+
+ LLViewerTextEditor *trans_names_widget =
+ getChild<LLViewerTextEditor>("trans_names", true);
getChild<LLUICtrl>("copy_btn")->setCommitCallback(
boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this));
-#if LL_WINDOWS
- getWindow()->incBusyCount();
- getWindow()->setCursor(UI_CURSOR_ARROW);
-#endif
- LLSD info(getInfo());
-#if LL_WINDOWS
- getWindow()->decBusyCount();
- getWindow()->setCursor(UI_CURSOR_ARROW);
-#endif
-
- std::ostringstream support;
+ if (gAgent.getRegion())
+ {
+ // start fetching server release notes URL
+ setSupportText(LLTrans::getString("RetrievingData"));
+ LLServerReleaseNotesURLFetcher::startFetch();
+ }
+ else // not logged in
+ {
+ setSupportText(LLStringUtil::null);
+ }
- // Render the LLSD from getInfo() as a format_map_t
- LLStringUtil::format_map_t args;
+ support_widget->blockUndo();
- // allow the "Release Notes" URL label to be localized
- args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes");
+ // Fix views
+ support_widget->setEnabled(FALSE);
+ support_widget->startOfDoc();
- for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap());
- ii != iend; ++ii)
+ // Get the names of Lindens, added by viewer_manifest.py at build time
+ std::string lindens_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"lindens.txt");
+ llifstream linden_file;
+ std::string lindens;
+ linden_file.open(lindens_path); /* Flawfinder: ignore */
+ if (linden_file.is_open())
{
- if (! ii->second.isArray())
- {
- // Scalar value
- if (ii->second.isUndefined())
- {
- args[ii->first] = getString("none");
- }
- else
- {
- // don't forget to render value asString()
- args[ii->first] = ii->second.asString();
- }
- }
- else
- {
- // array value: build KEY_0, KEY_1 etc. entries
- for (LLSD::Integer n(0), size(ii->second.size()); n < size; ++n)
- {
- args[STRINGIZE(ii->first << '_' << n)] = ii->second[n].asString();
- }
- }
+ std::getline(linden_file, lindens); // all names are on a single line
+ linden_file.close();
+ linden_names_widget->setText(lindens);
}
-
- // Now build the various pieces
- support << getString("AboutHeader", args);
- if (info.has("REGION"))
+ else
{
- support << "\n\n" << getString("AboutPosition", args);
+ LL_INFOS("AboutInit") << "Could not read lindens file at " << lindens_path << LL_ENDL;
}
- support << "\n\n" << getString("AboutSystem", args);
- support << "\n";
- if (info.has("GRAPHICS_DRIVER_VERSION"))
+ linden_names_widget->setEnabled(FALSE);
+ linden_names_widget->startOfDoc();
+
+ // Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time
+ std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt");
+ llifstream contrib_file;
+ std::string contributors;
+ contrib_file.open(contributors_path); /* Flawfinder: ignore */
+ if (contrib_file.is_open())
{
- support << "\n" << getString("AboutDriver", args);
+ std::getline(contrib_file, contributors); // all names are on a single line
+ contrib_file.close();
}
- support << "\n" << getString("AboutLibs", args);
- if (info.has("COMPILER"))
+ else
{
- support << "\n" << getString("AboutCompiler", args);
+ LL_WARNS("AboutInit") << "Could not read contributors file at " << contributors_path << LL_ENDL;
}
- if (info.has("PACKETS_IN"))
+ contrib_names_widget->setText(contributors);
+ contrib_names_widget->setEnabled(FALSE);
+ contrib_names_widget->startOfDoc();
+
+ // Get the names of translators, extracted from .../doc/tranlations.txt by viewer_manifest.py at build time
+ std::string translators_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"translators.txt");
+ llifstream trans_file;
+ std::string translators;
+ trans_file.open(translators_path); /* Flawfinder: ignore */
+ if (trans_file.is_open())
{
- support << '\n' << getString("AboutTraffic", args);
+ std::getline(trans_file, translators); // all names are on a single line
+ trans_file.close();
}
-
- support_widget->appendText(support.str(),
- FALSE,
- LLStyle::Params()
- .color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor")));
- support_widget->blockUndo();
-
- // Fix views
- support_widget->setEnabled(FALSE);
- support_widget->startOfDoc();
-
- credits_widget->setEnabled(FALSE);
- credits_widget->startOfDoc();
+ else
+ {
+ LL_WARNS("AboutInit") << "Could not read translators file at " << translators_path << LL_ENDL;
+ }
+ trans_names_widget->setText(translators);
+ trans_names_widget->setEnabled(FALSE);
+ trans_names_widget->startOfDoc();
return TRUE;
}
@@ -235,7 +256,6 @@ LLSD LLFloaterAbout::getInfo()
info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
info["SERVER_VERSION"] = gLastVersionChannel;
- info["SERVER_RELEASE_NOTES_URL"] = LLWeb::escapeURL(region->getCapability("ServerReleaseNotes"));
}
// CPU
@@ -330,6 +350,98 @@ void LLFloaterAbout::onClickCopyToClipboard()
support_widget->deselect();
}
+void LLFloaterAbout::updateServerReleaseNotesURL(const std::string& url)
+{
+ setSupportText(url);
+}
+
+void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url)
+{
+#if LL_WINDOWS
+ getWindow()->incBusyCount();
+ getWindow()->setCursor(UI_CURSOR_ARROW);
+#endif
+ LLSD info(getInfo());
+#if LL_WINDOWS
+ getWindow()->decBusyCount();
+ getWindow()->setCursor(UI_CURSOR_ARROW);
+#endif
+
+ if (LLStringUtil::startsWith(server_release_notes_url, "http")) // it's an URL
+ {
+ info["SERVER_RELEASE_NOTES_URL"] = "[" + LLWeb::escapeURL(server_release_notes_url) + " " + LLTrans::getString("ReleaseNotes") + "]";
+ }
+ else
+ {
+ info["SERVER_RELEASE_NOTES_URL"] = server_release_notes_url;
+ }
+
+ LLViewerTextEditor *support_widget =
+ getChild<LLViewerTextEditor>("support_editor", true);
+
+ std::ostringstream support;
+
+ // Render the LLSD from getInfo() as a format_map_t
+ LLStringUtil::format_map_t args;
+
+ // allow the "Release Notes" URL label to be localized
+ args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes");
+
+ for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap());
+ ii != iend; ++ii)
+ {
+ if (! ii->second.isArray())
+ {
+ // Scalar value
+ if (ii->second.isUndefined())
+ {
+ args[ii->first] = getString("none");
+ }
+ else
+ {
+ // don't forget to render value asString()
+ args[ii->first] = ii->second.asString();
+ }
+ }
+ else
+ {
+ // array value: build KEY_0, KEY_1 etc. entries
+ for (LLSD::Integer n(0), size(ii->second.size()); n < size; ++n)
+ {
+ args[STRINGIZE(ii->first << '_' << n)] = ii->second[n].asString();
+ }
+ }
+ }
+
+ // Now build the various pieces
+ support << getString("AboutHeader", args);
+ if (info.has("REGION"))
+ {
+ support << "\n\n" << getString("AboutPosition", args);
+ }
+ support << "\n\n" << getString("AboutSystem", args);
+ support << "\n";
+ if (info.has("GRAPHICS_DRIVER_VERSION"))
+ {
+ support << "\n" << getString("AboutDriver", args);
+ }
+ support << "\n" << getString("AboutLibs", args);
+ if (info.has("COMPILER"))
+ {
+ support << "\n" << getString("AboutCompiler", args);
+ }
+ if (info.has("PACKETS_IN"))
+ {
+ support << '\n' << getString("AboutTraffic", args);
+ }
+
+ support_widget->clear();
+ support_widget->appendText(support.str(),
+ FALSE,
+ LLStyle::Params()
+ .color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor")));
+}
+
///----------------------------------------------------------------------------
/// LLFloaterAboutUtil
///----------------------------------------------------------------------------
@@ -339,3 +451,52 @@ void LLFloaterAboutUtil::registerFloater()
&LLFloaterReg::build<LLFloaterAbout>);
}
+
+///----------------------------------------------------------------------------
+/// Class LLServerReleaseNotesURLFetcher implementation
+///----------------------------------------------------------------------------
+// static
+void LLServerReleaseNotesURLFetcher::startFetch()
+{
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region) return;
+
+ // We cannot display the URL returned by the ServerReleaseNotes capability
+ // because opening it in an external browser will trigger a warning about untrusted
+ // SSL certificate.
+ // So we query the URL ourselves, expecting to find
+ // an URL suitable for external browsers in the "Location:" HTTP header.
+ std::string cap_url = region->getCapability("ServerReleaseNotes");
+ LLHTTPClient::get(cap_url, new LLServerReleaseNotesURLFetcher);
+}
+
+// virtual
+void LLServerReleaseNotesURLFetcher::completedHeader(U32 status, const std::string& reason, const LLSD& content)
+{
+ lldebugs << "Status: " << status << llendl;
+ lldebugs << "Reason: " << reason << llendl;
+ lldebugs << "Headers: " << content << llendl;
+
+ LLFloaterAbout* floater_about = LLFloaterReg::getTypedInstance<LLFloaterAbout>("sl_about");
+ if (floater_about)
+ {
+ std::string location = content["location"].asString();
+ if (location.empty())
+ {
+ location = floater_about->getString("ErrorFetchingServerReleaseNotesURL");
+ }
+ floater_about->updateServerReleaseNotesURL(location);
+ }
+}
+
+// virtual
+void LLServerReleaseNotesURLFetcher::completedRaw(
+ U32 status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+{
+ // Do nothing.
+ // We're overriding just because the base implementation tries to
+ // deserialize LLSD which triggers warnings.
+}
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp
index 1f334815d6..2a3512e21a 100644
--- a/indra/newview/llfloateranimpreview.cpp
+++ b/indra/newview/llfloateranimpreview.cpp
@@ -1063,14 +1063,19 @@ BOOL LLPreviewAnimation::render()
mNeedsUpdate = FALSE;
LLVOAvatar* avatarp = mDummyAvatar;
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
- glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+ gGL.loadIdentity();
+ gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
LLGLSUIDefault def;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -1078,10 +1083,10 @@ BOOL LLPreviewAnimation::render()
gl_rect_2d_simple( mFullWidth, mFullHeight );
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
gGL.flush();
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index c6743ca13b..2939d31087 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -27,7 +27,6 @@
#include "llviewerprecompiledheaders.h"
#include "llfloaterauction.h"
-#include "llfloaterregioninfo.h"
#include "llgl.h"
#include "llimagej2c.h"
@@ -40,6 +39,7 @@
#include "llagent.h"
#include "llcombobox.h"
+#include "llestateinfomodel.h"
#include "llmimetypes.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
@@ -114,16 +114,9 @@ void LLFloaterAuction::initialize()
getChildView("reset_parcel_btn")->setEnabled(TRUE);
getChildView("start_auction_btn")->setEnabled(TRUE);
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- if (panel)
- { // Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet
- U32 estate_id = panel->getEstateID();
- getChildView("sell_to_anyone_btn")->setEnabled((estate_id == ESTATE_TEEN || estate_id == 0));
- }
- else
- { // Don't have the panel up, so don't know if we're on the teen grid or not. Default to enabling it
- getChildView("sell_to_anyone_btn")->setEnabled(TRUE);
- }
+ U32 estate_id = LLEstateInfoModel::instance().getID();
+ // Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet
+ getChildView("sell_to_anyone_btn")->setEnabled(estate_id == ESTATE_TEEN || estate_id == 0);
}
else
{
diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp
new file mode 100644
index 0000000000..bdc5b581a9
--- /dev/null
+++ b/indra/newview/llfloateravatar.cpp
@@ -0,0 +1,54 @@
+/**
+ * @file llfloateravatar.h
+ * @author Leyla Farazha
+ * @brief floater for the avatar changer
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+/**
+ * Floater that appears when buying an object, giving a preview
+ * of its contents and their permissions.
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloateravatar.h"
+#include "lluictrlfactory.h"
+
+
+LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
+ : LLFloater(key)
+{
+}
+
+LLFloaterAvatar::~LLFloaterAvatar()
+{
+}
+
+BOOL LLFloaterAvatar::postBuild()
+{
+ enableResizeCtrls(true, true, false);
+ return TRUE;
+}
+
+
diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h
new file mode 100644
index 0000000000..cadc5e4028
--- /dev/null
+++ b/indra/newview/llfloateravatar.h
@@ -0,0 +1,43 @@
+/**
+ * @file llfloateravatar.h
+ * @author Leyla Farazha
+ * @brief floater for the avatar changer
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_FLOATER_AVATAR_H
+#define LL_FLOATER_AVATAR_H
+
+#include "llfloater.h"
+
+class LLFloaterAvatar:
+ public LLFloater
+{
+ friend class LLFloaterReg;
+private:
+ LLFloaterAvatar(const LLSD& key);
+ /*virtual*/ ~LLFloaterAvatar();
+ /*virtual*/ BOOL postBuild();
+};
+
+#endif
diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp
index 4b6fe4a115..86c1bf0534 100644
--- a/indra/newview/llfloaterbuildoptions.cpp
+++ b/indra/newview/llfloaterbuildoptions.cpp
@@ -34,15 +34,81 @@
#include "llfloaterbuildoptions.h"
#include "lluictrlfactory.h"
+#include "llcombobox.h"
+#include "llselectmgr.h"
+
//
// Methods
//
+
+void commit_grid_mode(LLUICtrl *);
+
LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
- : LLFloater(key)
+ : LLFloater(key),
+ mComboGridMode(NULL)
{
+ mCommitCallbackRegistrar.add("GridOptions.gridMode", boost::bind(&commit_grid_mode,_1));
}
LLFloaterBuildOptions::~LLFloaterBuildOptions()
+{}
+
+BOOL LLFloaterBuildOptions::postBuild()
+{
+ mComboGridMode = getChild<LLComboBox>("combobox grid mode");
+
+ return TRUE;
+}
+
+void LLFloaterBuildOptions::setGridMode(EGridMode mode)
+{
+ mComboGridMode->setCurrentByIndex((S32)mode);
+}
+
+void LLFloaterBuildOptions::updateGridMode()
{
+ if (mComboGridMode)
+ {
+ S32 index = mComboGridMode->getCurrentIndex();
+ mComboGridMode->removeall();
+
+ switch (mObjectSelection->getSelectType())
+ {
+ case SELECT_TYPE_HUD:
+ mComboGridMode->add(getString("grid_screen_text"));
+ mComboGridMode->add(getString("grid_local_text"));
+ break;
+ case SELECT_TYPE_WORLD:
+ mComboGridMode->add(getString("grid_world_text"));
+ mComboGridMode->add(getString("grid_local_text"));
+ mComboGridMode->add(getString("grid_reference_text"));
+ break;
+ case SELECT_TYPE_ATTACHMENT:
+ mComboGridMode->add(getString("grid_attachment_text"));
+ mComboGridMode->add(getString("grid_local_text"));
+ mComboGridMode->add(getString("grid_reference_text"));
+ break;
+ }
+
+ mComboGridMode->setCurrentByIndex(index);
+ }
+}
+
+// virtual
+void LLFloaterBuildOptions::onOpen(const LLSD& key)
+{
+ mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
}
+// virtual
+void LLFloaterBuildOptions::onClose(bool app_quitting)
+{
+ mObjectSelection = NULL;
+}
+
+void commit_grid_mode(LLUICtrl *ctrl)
+{
+ LLComboBox* combo = (LLComboBox*)ctrl;
+
+ LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
+}
diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h
index 164944d7bc..7f3811bf1c 100644
--- a/indra/newview/llfloaterbuildoptions.h
+++ b/indra/newview/llfloaterbuildoptions.h
@@ -33,15 +33,34 @@
#define LL_LLFLOATERBUILDOPTIONS_H
#include "llfloater.h"
+#include "llselectmgr.h"
+class LLComboBox;
+class LLObjectSelection;
+
+typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle;
class LLFloaterBuildOptions
: public LLFloater
{
- friend class LLFloaterReg;
+public:
+
+ virtual BOOL postBuild();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
+
+ void setGridMode(EGridMode mode);
+ void updateGridMode();
+
private:
+
+ friend class LLFloaterReg;
+
LLFloaterBuildOptions(const LLSD& key);
~LLFloaterBuildOptions();
-};
+ LLComboBox* mComboGridMode;
+ LLObjectSelectionHandle mObjectSelection;
+};
#endif
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 610142b5a9..8223e89b64 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -508,7 +508,9 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
LLIconCtrl* rating_icon = getChild<LLIconCtrl>("rating_icon");
LLRect rect = rating_icon->getRect();
- S32 icon_left_pad = region_name->getRect().mLeft + region_name->getTextBoundingRect().getWidth() + ICON_PAD;
+ S32 region_name_width = llmin(region_name->getRect().getWidth(), region_name->getTextBoundingRect().getWidth());
+ S32 icon_left_pad = region_name->getRect().mLeft + region_name_width + ICON_PAD;
+ region_name->setToolTip(region_name->getText());
rating_icon->setRect(rect.setOriginAndSize(icon_left_pad, rect.mBottom, rect.getWidth(), rect.getHeight()));
switch(sim_access)
@@ -529,7 +531,8 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
LLTextBox* region_type = getChild<LLTextBox>("region_type_text");
if (region_type)
{
- region_type->setText(region->getSimProductName());
+ region_type->setText(region->getLocalizedSimProductName());
+ region_type->setToolTip(region->getLocalizedSimProductName());
}
LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
@@ -619,7 +622,8 @@ void LLFloaterBuyLandUI::updateFloaterCovenantText(const std::string &string, co
void LLFloaterBuyLandUI::updateFloaterEstateName(const std::string& name)
{
LLTextBox* box = getChild<LLTextBox>("estate_name_text");
- if (box) box->setText(name);
+ box->setText(name);
+ box->setToolTip(name);
}
void LLFloaterBuyLandUI::updateFloaterLastModified(const std::string& text)
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 1dfa904a19..21b58d3e3d 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -36,7 +36,6 @@
#include "lljoystickbutton.h"
#include "llviewercontrol.h"
#include "llviewercamera.h"
-#include "llbottomtray.h"
#include "lltoolmgr.h"
#include "lltoolfocus.h"
#include "llslider.h"
@@ -314,12 +313,6 @@ void LLFloaterCamera::onOpen(const LLSD& key)
{
LLFirstUse::viewPopup();
- LLButton *anchor_panel = LLBottomTray::getInstance()->getChild<LLButton>("camera_btn");
-
- setDockControl(new LLDockControl(
- anchor_panel, this,
- getDockTongue(), LLDockControl::TOP));
-
mZoom->onOpen(key);
// Returns to previous mode, see EXT-2727(View tool should remember state).
@@ -343,27 +336,23 @@ void LLFloaterCamera::onClose(bool app_quitting)
if (mCurrMode == CAMERA_CTRL_MODE_PAN)
mPrevMode = CAMERA_CTRL_MODE_PAN;
- // HACK: Should always close as docked to prevent toggleInstance without calling onOpen.
- if ( !isDocked() )
- setDocked(true);
switchMode(CAMERA_CTRL_MODE_PAN);
mClosed = TRUE;
}
LLFloaterCamera::LLFloaterCamera(const LLSD& val)
-: LLTransientDockableFloater(NULL, true, val),
+: LLFloater(val),
mClosed(FALSE),
mCurrMode(CAMERA_CTRL_MODE_PAN),
mPrevMode(CAMERA_CTRL_MODE_PAN)
{
- LLHints::registerHintTarget("view_popup", LLView::getHandle());
+ LLHints::registerHintTarget("view_popup", getHandle());
+ mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2));
}
// virtual
BOOL LLFloaterCamera::postBuild()
{
- setIsChrome(TRUE);
- setTitleVisible(TRUE); // restore title visibility after chrome applying
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
@@ -379,7 +368,7 @@ BOOL LLFloaterCamera::postBuild()
// ensure that appearance mode is handled while building. See EXT-7796.
handleAvatarEditingAppearance(sAppearanceEditing);
- return LLDockableFloater::postBuild();
+ return LLFloater::postBuild();
}
void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel)
@@ -444,26 +433,6 @@ void LLFloaterCamera::setMode(ECameraControlMode mode)
updateState();
}
-void LLFloaterCamera::setModeTitle(const ECameraControlMode mode)
-{
- std::string title;
- switch(mode)
- {
- case CAMERA_CTRL_MODE_MODES:
- title = getString("camera_modes_title");
- break;
- case CAMERA_CTRL_MODE_PAN:
- title = getString("pan_mode_title");
- break;
- case CAMERA_CTRL_MODE_PRESETS:
- title = getString("presets_mode_title");
- break;
- default:
- break;
- }
- setTitle(title);
-}
-
void LLFloaterCamera::switchMode(ECameraControlMode mode)
{
setMode(mode);
@@ -543,7 +512,6 @@ void LLFloaterCamera::updateState()
{
iter->second->setToggleState(iter->first == mCurrMode);
}
- setModeTitle(mCurrMode);
}
void LLFloaterCamera::updateItemsSelection()
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 424191ef26..4d6d03f22d 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -27,7 +27,7 @@
#ifndef LLFLOATERCAMERA_H
#define LLFLOATERCAMERA_H
-#include "lltransientdockablefloater.h"
+#include "llfloater.h"
#include "lliconctrl.h"
#include "lltextbox.h"
#include "llflatlistview.h"
@@ -45,8 +45,7 @@ enum ECameraControlMode
CAMERA_CTRL_MODE_PRESETS
};
-class LLFloaterCamera
- : public LLTransientDockableFloater
+class LLFloaterCamera : public LLFloater
{
friend class LLFloaterReg;
@@ -103,9 +102,6 @@ private:
/* sets a new mode preserving previous one and updates ui*/
void setMode(ECameraControlMode mode);
- /** set title appropriate to passed mode */
- void setModeTitle(const ECameraControlMode mode);
-
/* updates the state (UI) according to the current mode */
void updateState();
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
deleted file mode 100644
index 2679dbb78b..0000000000
--- a/indra/newview/llfloaterchat.cpp
+++ /dev/null
@@ -1,485 +0,0 @@
-/**
- * @file llfloaterchat.cpp
- * @brief LLFloaterChat class implementation
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-/**
- * Actually the "Chat History" floater.
- * Should be llfloaterchathistory, not llfloaterchat.
- */
-
-#include "llviewerprecompiledheaders.h"
-
-// project include
-#include "llagent.h"
-#include "llappviewer.h"
-#include "llbutton.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
-#include "llconsole.h"
-#include "llfloateractivespeakers.h"
-#include "llfloaterchatterbox.h"
-#include "llfloaterreg.h"
-#include "llfloaterscriptdebug.h"
-#include "llkeyboard.h"
-//#include "lllineeditor.h"
-#include "llmutelist.h"
-//#include "llresizehandle.h"
-#include "llchatbar.h"
-#include "llrecentpeople.h"
-#include "llpanelblockedlist.h"
-#include "llslurl.h"
-#include "llstatusbar.h"
-#include "llviewertexteditor.h"
-#include "llviewergesture.h" // for triggering gestures
-#include "llviewermessage.h"
-#include "llviewerwindow.h"
-#include "llviewercontrol.h"
-#include "lluictrlfactory.h"
-#include "lllogchat.h"
-#include "lltexteditor.h"
-#include "lltextparser.h"
-#include "llweb.h"
-#include "llstylemap.h"
-
-// linden library includes
-#include "llaudioengine.h"
-#include "llchat.h"
-#include "llfontgl.h"
-#include "llrect.h"
-#include "llerror.h"
-#include "llstring.h"
-#include "llwindow.h"
-#include "message.h"
-
-//
-// Constants
-//
-const F32 INSTANT_MSG_SIZE = 8.0f;
-const F32 CHAT_MSG_SIZE = 8.0f;
-
-
-//
-// Global statics
-//
-LLColor4 get_text_color(const LLChat& chat);
-
-//
-// Member Functions
-//
-LLFloaterChat::LLFloaterChat(const LLSD& seed)
- : LLFloater(seed),
- mPanel(NULL)
-{
- mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL);
- mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL);
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml");
-
-}
-
-LLFloaterChat::~LLFloaterChat()
-{
- // Children all cleaned up by default view destructor.
-}
-
-void LLFloaterChat::draw()
-{
- // enable say and shout only when text available
-
- childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel"));
-
- LLChatBar* chat_barp = findChild<LLChatBar>("chat_panel", TRUE);
- if (chat_barp)
- {
- chat_barp->refresh();
- }
-
- mPanel->refreshSpeakers();
- LLFloater::draw();
-}
-
-BOOL LLFloaterChat::postBuild()
-{
- // Hide the chat overlay when our history is visible.
- setVisibleCallback(boost::bind(&LLFloaterChat::updateConsoleVisibility, this));
-
- mPanel = (LLPanelActiveSpeakers*)getChild<LLPanel>("active_speakers_panel");
-
- childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
- childSetVisible("Chat History Editor with mute",FALSE);
- childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
-
- return TRUE;
-}
-
-void LLFloaterChat::updateConsoleVisibility()
-{
- if(gDisconnected)
- {
- return;
- }
- // determine whether we should show console due to not being visible
- gConsole->setVisible( !isInVisibleChain() // are we not in part of UI being drawn?
- || isMinimized() // are we minimized?
- || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater?
-}
-
-void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& color)
-{
- std::string line = chat.mText;
- bool prepend_newline = true;
- if (gSavedSettings.getBOOL("ChatShowTimestamps"))
- {
- edit->appendTime(prepend_newline);
- prepend_newline = false;
- }
-
- // If the msg is from an agent (not yourself though),
- // extract out the sender name and replace it with the hotlinked name.
- if (chat.mSourceType == CHAT_SOURCE_AGENT &&
- chat.mFromID != LLUUID::null)
- {
- chat.mURL = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString();
- }
-
- // If the chat line has an associated url, link it up to the name.
- if (!chat.mURL.empty()
- && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0))
- {
- std::string start_line = line.substr(0, chat.mFromName.length() + 1);
- line = line.substr(chat.mFromName.length() + 1);
- edit->appendText(start_line, prepend_newline, LLStyleMap::instance().lookup(chat.mFromID,chat.mURL));
- edit->blockUndo();
- prepend_newline = false;
- }
- edit->appendText(line, prepend_newline, LLStyle::Params().color(color));
- edit->blockUndo();
-}
-
-// static
-void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
-{
- if (log_to_file && (gSavedPerAccountSettings.getBOOL("LogChat")))
- {
- if (chat.mChatType != CHAT_TYPE_WHISPER && chat.mChatType != CHAT_TYPE_SHOUT)
- {
- LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText);
- }
- else
- {
- LLLogChat::saveHistory("chat", "", chat.mFromID, chat.mFromName + " " + chat.mText);
- }
- }
-
- LLColor4 color = get_text_color(chat);
-
- if (!log_to_file) color = LLColor4::grey; //Recap from log file.
-
- if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
- {
- if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
- return;
- if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)
- {
- LLFloaterScriptDebug::addScriptLine(chat.mText,
- chat.mFromName,
- color,
- chat.mFromID);
- return;
- }
- }
-
- // could flash the chat button in the status bar here. JC
- LLFloaterChat* chat_floater = LLFloaterChat::getInstance();
- LLViewerTextEditor* history_editor = chat_floater->getChild<LLViewerTextEditor>("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = chat_floater->getChild<LLViewerTextEditor>("Chat History Editor with mute");
-
- if (!chat.mMuted)
- {
- add_timestamped_line(history_editor, chat, color);
- add_timestamped_line(history_editor_with_mute, chat, color);
- }
- else
- {
- // desaturate muted chat
- LLColor4 muted_color = lerp(color, LLColor4::grey, 0.5f);
- add_timestamped_line(history_editor_with_mute, chat, color);
- }
-
- // add objects as transient speakers that can be muted
- if (chat.mSourceType == CHAT_SOURCE_OBJECT)
- {
- chat_floater->mPanel->setSpeaker(chat.mFromID, chat.mFromName, LLSpeaker::STATUS_NOT_IN_CHANNEL, LLSpeaker::SPEAKER_OBJECT);
- }
-
- // start tab flashing on incoming text from other users (ignoring system text, etc)
- if (!chat_floater->isInVisibleChain() && chat.mSourceType == CHAT_SOURCE_AGENT)
- {
- LLFloaterChatterBox::getInstance()->setFloaterFlashing(chat_floater, TRUE);
- }
-}
-
-// static
-void LLFloaterChat::setHistoryCursorAndScrollToEnd()
-{
- LLViewerTextEditor* history_editor = LLFloaterChat::getInstance()->getChild<LLViewerTextEditor>("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = LLFloaterChat::getInstance()->getChild<LLViewerTextEditor>("Chat History Editor with mute");
-
- if (history_editor)
- {
- history_editor->setCursorAndScrollToEnd();
- }
- if (history_editor_with_mute)
- {
- history_editor_with_mute->setCursorAndScrollToEnd();
- }
-}
-
-
-//static
-void LLFloaterChat::onClickMute(void *data)
-{
- LLFloaterChat* self = (LLFloaterChat*)data;
-
- LLComboBox* chatter_combo = self->getChild<LLComboBox>("chatter combobox");
-
- const std::string& name = chatter_combo->getSimple();
- LLUUID id = chatter_combo->getCurrentID();
-
- if (name.empty()) return;
-
- LLMute mute(id);
- mute.setFromDisplayName(name);
- LLMuteList::getInstance()->add(mute);
- LLPanelBlockedList::showPanelAndSelect(mute.mID);
-}
-
-//static
-void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data)
-{
- LLFloaterChat* floater = (LLFloaterChat*)data;
-
-
- //LLCheckBoxCtrl*
- BOOL show_mute = floater->getChild<LLCheckBoxCtrl>("show mutes")->get();
- LLViewerTextEditor* history_editor = floater->getChild<LLViewerTextEditor>("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = floater->getChild<LLViewerTextEditor>("Chat History Editor with mute");
-
- if (!history_editor || !history_editor_with_mute)
- return;
-
- //BOOL show_mute = floater->mShowMuteCheckBox->get();
- if (show_mute)
- {
- history_editor->setVisible(FALSE);
- history_editor_with_mute->setVisible(TRUE);
- history_editor_with_mute->setCursorAndScrollToEnd();
- }
- else
- {
- history_editor->setVisible(TRUE);
- history_editor_with_mute->setVisible(FALSE);
- history_editor->setCursorAndScrollToEnd();
- }
-}
-
-// Put a line of chat in all the right places
-void LLFloaterChat::addChat(const LLChat& chat, BOOL local_agent)
-{
- triggerAlerts(chat.mText);
-
- // Add the sender to the list of people with which we've recently interacted.
- // this is not the best place to add _all_ messages to recent list
- // comment this for now, may remove later on code cleanup
- //if(chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID.notNull())
- // LLRecentPeople::instance().add(chat.mFromID);
-
- addChatHistory(chat, true);
-}
-
-// Moved from lltextparser.cpp to break llui/llaudio library dependency.
-//static
-void LLFloaterChat::triggerAlerts(const std::string& text)
-{
- LLTextParser* parser = LLTextParser::getInstance();
-// bool spoken=FALSE;
- for (S32 i=0;i<parser->mHighlights.size();i++)
- {
- LLSD& highlight = parser->mHighlights[i];
- if (parser->findPattern(text,highlight) >= 0 )
- {
- if(gAudiop)
- {
- if ((std::string)highlight["sound_lluuid"] != LLUUID::null.asString())
- {
- gAudiop->triggerSound(highlight["sound_lluuid"].asUUID(),
- gAgent.getID(),
- 1.f,
- LLAudioEngine::AUDIO_TYPE_UI,
- gAgent.getPositionGlobal() );
- }
-/*
- if (!spoken)
- {
- LLTextToSpeech* text_to_speech = NULL;
- text_to_speech = LLTextToSpeech::getInstance();
- spoken = text_to_speech->speak((LLString)highlight["voice"],text);
- }
- */
- }
- if (highlight["flash"])
- {
- LLWindow* viewer_window = gViewerWindow->getWindow();
- if (viewer_window && viewer_window->getMinimized())
- {
- viewer_window->flashIcon(5.f);
- }
- }
- }
- }
-}
-
-LLColor4 get_text_color(const LLChat& chat)
-{
- LLColor4 text_color;
-
- if(chat.mMuted)
- {
- text_color.setVec(0.8f, 0.8f, 0.8f, 1.f);
- }
- else
- {
- switch(chat.mSourceType)
- {
- case CHAT_SOURCE_SYSTEM:
- text_color = LLUIColorTable::instance().getColor("SystemChatColor");
- break;
- case CHAT_SOURCE_AGENT:
- if (chat.mFromID.isNull())
- {
- text_color = LLUIColorTable::instance().getColor("SystemChatColor");
- }
- else
- {
- if(gAgent.getID() == chat.mFromID)
- {
- text_color = LLUIColorTable::instance().getColor("UserChatColor");
- }
- else
- {
- text_color = LLUIColorTable::instance().getColor("AgentChatColor");
- }
- }
- break;
- case CHAT_SOURCE_OBJECT:
- if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
- {
- text_color = LLUIColorTable::instance().getColor("ScriptErrorColor");
- }
- else if ( chat.mChatType == CHAT_TYPE_OWNER )
- {
- text_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor");
- }
- else
- {
- text_color = LLUIColorTable::instance().getColor("ObjectChatColor");
- }
- break;
- default:
- text_color.setToWhite();
- }
-
- if (!chat.mPosAgent.isExactlyZero())
- {
- LLVector3 pos_agent = gAgent.getPositionAgent();
- F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent);
- F32 dist_near_chat = gAgent.getNearChatRadius();
- if (distance_squared > dist_near_chat * dist_near_chat)
- {
- // diminish far-off chat
- text_color.mV[VALPHA] = 0.8f;
- }
- }
- }
-
- return text_color;
-}
-
-//static
-void LLFloaterChat::loadHistory()
-{
- LLLogChat::loadHistory(std::string("chat"), &chatFromLogFile, (void *)LLFloaterChat::getInstance());
-}
-
-//static
-void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , const LLSD& line, void* userdata)
-{
- switch (type)
- {
- case LLLogChat::LOG_EMPTY:
- case LLLogChat::LOG_END:
- // *TODO: nice message from XML file here
- break;
- case LLLogChat::LOG_LINE:
- case LLLogChat::LOG_LLSD:
- {
- LLChat chat;
- chat.mText = line["message"].asString();
- get_text_color(chat);
- addChatHistory(chat, FALSE);
- }
- break;
- default:
- // nothing
- break;
- }
-}
-
-//static
-void* LLFloaterChat::createSpeakersPanel(void* data)
-{
- return new LLPanelActiveSpeakers(LLLocalSpeakerMgr::getInstance(), TRUE);
-}
-
-//static
-void* LLFloaterChat::createChatPanel(void* data)
-{
- LLChatBar* chatp = new LLChatBar();
- return chatp;
-}
-
-// static
-void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
-{
- LLFloaterChat* self = (LLFloaterChat*)userdata;
-
- self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
-}
-
-//static
- LLFloaterChat* LLFloaterChat::getInstance()
- {
- return LLFloaterReg::getTypedInstance<LLFloaterChat>("chat", LLSD()) ;
-
- }
diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h
deleted file mode 100644
index fb2aabbfdf..0000000000
--- a/indra/newview/llfloaterchat.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file llfloaterchat.h
- * @brief LLFloaterChat class definition
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-/*
- * Actually the "Chat History" floater.
- * Should be llfloaterchathistory, not llfloaterchat.
- */
-
-#ifndef LL_LLFLOATERCHAT_H
-#define LL_LLFLOATERCHAT_H
-
-#include "llfloater.h"
-#include "lllogchat.h"
-
-class LLChat;
-class LLPanelActiveSpeakers;
-class LLLogChat;
-
-class LLFloaterChat : public LLFloater
-{
-public:
- LLFloaterChat(const LLSD& seed);
- ~LLFloaterChat();
-
- virtual void draw();
- virtual BOOL postBuild();
-
- void updateConsoleVisibility();
-
- static void setHistoryCursorAndScrollToEnd();
-
- // *TODO:Skinning - move these to LLChat (or LLViewerChat?)
- // Add chat to console and history list.
- // Color based on source, type, distance.
- static void addChat(const LLChat& chat, BOOL local_agent = FALSE);
- // Add chat to history alone.
- static void addChatHistory(const LLChat& chat, bool log_to_file = true);
-
- static void triggerAlerts(const std::string& text);
-
- static void onClickMute(void *data);
- static void onClickToggleShowMute(LLUICtrl* caller, void *data);
- static void onClickToggleActiveSpeakers(void* userdata);
- static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& line, void* userdata);
- static void loadHistory();
- static void* createSpeakersPanel(void* data);
- static void* createChatPanel(void* data);
-
- static LLFloaterChat* getInstance(); // *TODO:Skinning Deprecate
-
- LLPanelActiveSpeakers* mPanel;
- BOOL mScrolledToEnd;
-};
-
-#endif
diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp
deleted file mode 100644
index dc33e45dd4..0000000000
--- a/indra/newview/llfloaterchatterbox.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/**
- * @file llfloaterchatterbox.cpp
- * @author Richard
- * @date 2007-05-08
- * @brief Implementation of the chatterbox integrated conversation ui
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterreg.h"
-#include "llfloaterchatterbox.h"
-#include "lluictrlfactory.h"
-#include "llfloaterfriends.h"
-#include "llfloatergroups.h"
-#include "llviewercontrol.h"
-#include "llvoicechannel.h"
-#include "llimpanel.h"
-#include "llimview.h"
-
-//
-// LLFloaterMyFriends
-//
-
-LLFloaterMyFriends::LLFloaterMyFriends(const LLSD& seed)
- : LLFloater(seed)
-{
- mFactoryMap["friends_panel"] = LLCallbackMap(LLFloaterMyFriends::createFriendsPanel, NULL);
- mFactoryMap["groups_panel"] = LLCallbackMap(LLFloaterMyFriends::createGroupsPanel, NULL);
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_my_friends.xml");
-}
-
-LLFloaterMyFriends::~LLFloaterMyFriends()
-{
-}
-
-BOOL LLFloaterMyFriends::postBuild()
-{
- return TRUE;
-}
-
-void LLFloaterMyFriends::onOpen(const LLSD& key)
-{
- if (key.asString() == "friends")
- {
- childShowTab("friends_and_groups", "friends_panel");
- }
- else if (key.asString() == "groups")
- {
- childShowTab("friends_and_groups", "groups_panel");
- }
-}
-
-//static
-void* LLFloaterMyFriends::createFriendsPanel(void* data)
-{
- return new LLPanelFriends();
-}
-
-//static
-void* LLFloaterMyFriends::createGroupsPanel(void* data)
-{
- return new LLPanelGroups();
-}
-
-//static
-LLFloaterMyFriends* LLFloaterMyFriends::getInstance()
-{
- return LLFloaterReg::getTypedInstance<LLFloaterMyFriends>("contacts", "friends") ;
-}
-
-//
-// LLFloaterChatterBox
-//
-LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed)
-: LLMultiFloater(seed),
- mActiveVoiceFloater(NULL)
-{
- mAutoResize = FALSE;
-
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox.xml", FALSE);
-}
-
-LLFloaterChatterBox::~LLFloaterChatterBox()
-{
-}
-
-BOOL LLFloaterChatterBox::postBuild()
-{
- setVisibleCallback(boost::bind(&LLFloaterChatterBox::onVisibilityChange, this, _2));
-
- if (gSavedSettings.getBOOL("ContactsTornOff"))
- {
- LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance();
- if(floater_contacts)
- {
- // add then remove to set up relationship for re-attach
- addFloater(floater_contacts, FALSE);
- removeFloater(floater_contacts);
- // reparent to floater view
- gFloaterView->addChild(floater_contacts);
- }
- }
- else
- {
- addFloater(LLFloaterMyFriends::getInstance(), TRUE);
- }
-
- mTabContainer->lockTabs();
- return TRUE;
-}
-
-BOOL LLFloaterChatterBox::handleKeyHere(KEY key, MASK mask)
-{
- if (key == 'W' && mask == MASK_CONTROL)
- {
- LLFloater* floater = getActiveFloater();
- // is user closeable and is system closeable
- if (floater && floater->canClose())
- {
- if (floater->isCloseable())
- {
- floater->closeFloater();
- }
- else
- {
- // close chatterbox window if frontmost tab is reserved, non-closeable tab
- // such as contacts or near me
- closeFloater();
- }
- }
- return TRUE;
- }
-
- return LLMultiFloater::handleKeyHere(key, mask);
-}
-
-void LLFloaterChatterBox::draw()
-{
- // clear new im notifications when chatterbox is visible
- if (!isMinimized())
- {
- gIMMgr->clearNewIMNotification();
- }
- LLFloater* current_active_floater = getCurrentVoiceFloater();
- // set icon on tab for floater currently associated with active voice channel
- if(mActiveVoiceFloater != current_active_floater)
- {
- // remove image from old floater's tab
- if (mActiveVoiceFloater)
- {
- mTabContainer->setTabImage(mActiveVoiceFloater, "");
- }
- }
-
- // update image on current active tab
- if (current_active_floater)
- {
- LLColor4 icon_color = LLColor4::white;
- LLVoiceChannel* channelp = LLVoiceChannel::getCurrentVoiceChannel();
- if (channelp)
- {
- if (channelp->isActive())
- {
- icon_color = LLColor4::green;
- }
- else if (channelp->getState() == LLVoiceChannel::STATE_ERROR)
- {
- icon_color = LLColor4::red;
- }
- else // active, but not connected
- {
- icon_color = LLColor4::yellow;
- }
- }
- mTabContainer->setTabImage(current_active_floater, "active_voice_tab.tga", icon_color);
- }
-
- mActiveVoiceFloater = current_active_floater;
-
- LLMultiFloater::draw();
-}
-
-void LLFloaterChatterBox::onOpen(const LLSD& key)
-{
- //*TODO:Skinning show the session id associated with key
- if (key.asString() == "local")
- {
- }
- else if (key.isDefined())
- {
- /*LLFloaterIMPanel* impanel = gIMMgr->findFloaterBySession(key.asUUID());
- if (impanel)
- {
- impanel->openFloater();
- }*/
- }
-}
-
-void LLFloaterChatterBox::onVisibilityChange ( const LLSD& new_visibility )
-{
-}
-
-void LLFloaterChatterBox::removeFloater(LLFloater* floaterp)
-{
- if(!floaterp) return;
-
- if (floaterp->getName() == "chat floater")
- {
- // only my friends floater now locked
- mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1);
- gSavedSettings.setBOOL("ChatHistoryTornOff", TRUE);
- floaterp->setCanClose(TRUE);
- }
- else if (floaterp->getName() == "floater_my_friends")
- {
- // only chat floater now locked
- mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1);
- gSavedSettings.setBOOL("ContactsTornOff", TRUE);
- floaterp->setCanClose(TRUE);
- }
- LLMultiFloater::removeFloater(floaterp);
-}
-
-void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
- BOOL select_added_floater,
- LLTabContainer::eInsertionPoint insertion_point)
-{
- if(!floaterp) return;
-
- S32 num_locked_tabs = mTabContainer->getNumLockedTabs();
-
- // already here
- if (floaterp->getHost() == this)
- {
- openFloater(floaterp->getKey());
- return;
- }
-
- // make sure my friends and chat history both locked when re-attaching chat history
- if (floaterp->getName() == "chat floater")
- {
- mTabContainer->unlockTabs();
- // add chat history as second tab if contact window is present, first tab otherwise
- if (getChildView("floater_my_friends"))
- {
- // assuming contacts window is first tab, select it
- mTabContainer->selectFirstTab();
- // and add ourselves after
- LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT);
- }
- else
- {
- LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START);
- }
-
- // make sure first two tabs are now locked
- mTabContainer->lockTabs(num_locked_tabs + 1);
- gSavedSettings.setBOOL("ChatHistoryTornOff", FALSE);
- floaterp->setCanClose(FALSE);
- }
- else if (floaterp->getName() == "floater_my_friends")
- {
- mTabContainer->unlockTabs();
- // add contacts window as first tab
- LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START);
- // make sure first two tabs are now locked
- mTabContainer->lockTabs(num_locked_tabs + 1);
- gSavedSettings.setBOOL("ContactsTornOff", FALSE);
- floaterp->setCanClose(FALSE);
- }
- else
- {
- LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point);
- // openFloater(floaterp->getKey());
- }
-
- // make sure active voice icon shows up for new tab
- if (floaterp == mActiveVoiceFloater)
- {
- mTabContainer->setTabImage(floaterp, "active_voice_tab.tga");
- }
-}
-
-//static
-LLFloaterChatterBox* LLFloaterChatterBox::getInstance()
-{
- return LLFloaterReg::getTypedInstance<LLFloaterChatterBox>("communicate", LLSD()) ;
-}
-
-//static
-LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
-{
- if (!LLVoiceClient::getInstance()->voiceEnabled())
- {
- return NULL;
- }
- if (LLVoiceChannelProximal::getInstance() == LLVoiceChannel::getCurrentVoiceChannel())
- {
- return NULL;
- }
- else
- {
- LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance();
- if(!floater) return NULL;
- // iterator over all IM tabs (skip friends and near me)
- for (S32 i = 0; i < floater->getFloaterCount(); i++)
- {
- LLPanel* panelp = floater->mTabContainer->getPanelByIndex(i);
- if (panelp->getName() == "im_floater")
- {
- // only LLFloaterIMPanels are called "im_floater"
- LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)panelp;
- LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(im_floaterp->getSessionID());
- if (voice_channel == LLVoiceChannel::getCurrentVoiceChannel())
- {
- return im_floaterp;
- }
- }
- }
- }
- return NULL;
-}
diff --git a/indra/newview/llfloaterchatterbox.h b/indra/newview/llfloaterchatterbox.h
deleted file mode 100644
index 3a8bfe2fa4..0000000000
--- a/indra/newview/llfloaterchatterbox.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @file llfloaterchatterbox.h
- * @author Richard
- * @date 2007-05-04
- * @brief Integrated friends and group management/communication tool
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATERCHATTERBOX_H
-#define LL_LLFLOATERCHATTERBOX_H
-
-#include "llfloater.h"
-#include "llmultifloater.h"
-#include "llstring.h"
-#include "llimpanel.h"
-
-class LLTabContainer;
-
-class LLFloaterChatterBox : public LLMultiFloater
-{
-public:
- LLFloaterChatterBox(const LLSD& seed);
- virtual ~LLFloaterChatterBox();
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
- /*virtual*/ void draw();
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ void removeFloater(LLFloater* floaterp);
- /*virtual*/ void addFloater(LLFloater* floaterp,
- BOOL select_added_floater,
- LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
-
- static LLFloaterChatterBox* getInstance(); // *TODO:Skinning Deprecate
- static LLFloater* getCurrentVoiceFloater();
-
-protected:
- void onVisibilityChange ( const LLSD& new_visibility );
-
- LLFloater* mActiveVoiceFloater;
-};
-
-
-class LLFloaterMyFriends : public LLFloater
-{
-public:
- LLFloaterMyFriends(const LLSD& seed);
- virtual ~LLFloaterMyFriends();
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
-
- static LLFloaterMyFriends* getInstance(); // *TODO:Skinning Deprecate
-
- static void* createFriendsPanel(void* data);
- static void* createGroupsPanel(void* data);
-};
-
-#endif // LL_LLFLOATERCHATTERBOX_H
diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp
new file mode 100644
index 0000000000..af21cb593f
--- /dev/null
+++ b/indra/newview/llfloaterdestinations.cpp
@@ -0,0 +1,54 @@
+/**
+ * @file llfloaterdestinations.h
+ * @author Leyla Farazha
+ * @brief floater for the destinations guide
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+/**
+ * Floater that appears when buying an object, giving a preview
+ * of its contents and their permissions.
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterdestinations.h"
+#include "lluictrlfactory.h"
+
+
+LLFloaterDestinations::LLFloaterDestinations(const LLSD& key)
+ : LLFloater(key)
+{
+}
+
+LLFloaterDestinations::~LLFloaterDestinations()
+{
+}
+
+BOOL LLFloaterDestinations::postBuild()
+{
+ enableResizeCtrls(true, true, false);
+ return TRUE;
+}
+
+
diff --git a/indra/newview/llfloaterdestinations.h b/indra/newview/llfloaterdestinations.h
new file mode 100644
index 0000000000..85d9b3391e
--- /dev/null
+++ b/indra/newview/llfloaterdestinations.h
@@ -0,0 +1,43 @@
+/**
+ * @file llfloaterdestinations.h
+ * @author Leyla Farazha
+ * @brief floater for the destinations guide
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_FLOATER_DESTINATIONS_H
+#define LL_FLOATER_DESTINATIONS_H
+
+#include "llfloater.h"
+
+class LLFloaterDestinations:
+ public LLFloater
+{
+ friend class LLFloaterReg;
+private:
+ LLFloaterDestinations(const LLSD& key);
+ /*virtual*/ ~LLFloaterDestinations();
+ /*virtual*/ BOOL postBuild();
+};
+
+#endif
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
deleted file mode 100644
index f93568d617..0000000000
--- a/indra/newview/llfloaterfriends.cpp
+++ /dev/null
@@ -1,807 +0,0 @@
-/**
- * @file llfloaterfriends.cpp
- * @author Phoenix
- * @date 2005-01-13
- * @brief Implementation of the friends floater
- *
- * $LicenseInfo:firstyear=2005&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterfriends.h"
-
-#include <sstream>
-
-#include "lldir.h"
-
-#include "llagent.h"
-#include "llappviewer.h" // for gLastVersionChannel
-#include "llfloateravatarpicker.h"
-#include "llviewerwindow.h"
-#include "llbutton.h"
-#include "llavataractions.h"
-#include "llinventorymodel.h"
-#include "llnamelistctrl.h"
-#include "llnotificationsutil.h"
-#include "llresmgr.h"
-#include "llscrolllistctrl.h"
-#include "llscrolllistitem.h"
-#include "llscrolllistcell.h"
-#include "lluictrlfactory.h"
-#include "llmenucommands.h"
-#include "llviewercontrol.h"
-#include "llviewermessage.h"
-#include "lleventtimer.h"
-#include "lltextbox.h"
-#include "llvoiceclient.h"
-
-// *TODO: Move more common stuff to LLAvatarActions?
-
-//Maximum number of people you can select to do an operation on at once.
-#define MAX_FRIEND_SELECT 20
-#define DEFAULT_PERIOD 5.0
-#define RIGHTS_CHANGE_TIMEOUT 5.0
-#define OBSERVER_TIMEOUT 0.5
-
-#define ONLINE_SIP_ICON_NAME "slim_icon_16_viewer.tga"
-
-// simple class to observe the calling cards.
-class LLLocalFriendsObserver : public LLFriendObserver, public LLEventTimer
-{
-public:
- LLLocalFriendsObserver(LLPanelFriends* floater) : mFloater(floater), LLEventTimer(OBSERVER_TIMEOUT)
- {
- mEventTimer.stop();
- }
- virtual ~LLLocalFriendsObserver()
- {
- mFloater = NULL;
- }
- virtual void changed(U32 mask)
- {
- // events can arrive quickly in bulk - we need not process EVERY one of them -
- // so we wait a short while to let others pile-in, and process them in aggregate.
- mEventTimer.start();
-
- // save-up all the mask-bits which have come-in
- mMask |= mask;
- }
- virtual BOOL tick()
- {
- mFloater->updateFriends(mMask);
-
- mEventTimer.stop();
- mMask = 0;
-
- return FALSE;
- }
-
-protected:
- LLPanelFriends* mFloater;
- U32 mMask;
-};
-
-LLPanelFriends::LLPanelFriends() :
- LLPanel(),
- LLEventTimer(DEFAULT_PERIOD),
- mObserver(NULL),
- mShowMaxSelectWarning(TRUE),
- mAllowRightsChange(TRUE),
- mNumRightsChanged(0)
-{
- mEventTimer.stop();
- mObserver = new LLLocalFriendsObserver(this);
- LLAvatarTracker::instance().addObserver(mObserver);
- // For notification when SIP online status changes.
- LLVoiceClient::getInstance()->addObserver(mObserver);
-}
-
-LLPanelFriends::~LLPanelFriends()
-{
- // For notification when SIP online status changes.
- LLVoiceClient::getInstance()->removeObserver(mObserver);
- LLAvatarTracker::instance().removeObserver(mObserver);
- delete mObserver;
-}
-
-BOOL LLPanelFriends::tick()
-{
- mEventTimer.stop();
- mPeriod = DEFAULT_PERIOD;
- mAllowRightsChange = TRUE;
- updateFriends(LLFriendObserver::ADD);
- return FALSE;
-}
-
-void LLPanelFriends::updateFriends(U32 changed_mask)
-{
- LLUUID selected_id;
- LLCtrlListInterface *friends_list = childGetListInterface("friend_list");
- if (!friends_list) return;
- LLCtrlScrollInterface *friends_scroll = childGetScrollInterface("friend_list");
- if (!friends_scroll) return;
-
- // We kill the selection warning, otherwise we'll spam with warning popups
- // if the maximum amount of friends are selected
- mShowMaxSelectWarning = false;
-
- std::vector<LLUUID> selected_friends = getSelectedIDs();
- if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
- {
- refreshNames(changed_mask);
- }
- else if(changed_mask & LLFriendObserver::POWERS)
- {
- --mNumRightsChanged;
- if(mNumRightsChanged > 0)
- {
- mPeriod = RIGHTS_CHANGE_TIMEOUT;
- mEventTimer.start();
- mAllowRightsChange = FALSE;
- }
- else
- {
- tick();
- }
- }
- if(selected_friends.size() > 0)
- {
- // only non-null if friends was already found. This may fail,
- // but we don't really care here, because refreshUI() will
- // clean up the interface.
- friends_list->setCurrentByID(selected_id);
- for(std::vector<LLUUID>::iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
- {
- friends_list->setSelectedByValue(*itr, true);
- }
- }
-
- refreshUI();
- mShowMaxSelectWarning = true;
-}
-
-// virtual
-BOOL LLPanelFriends::postBuild()
-{
- mFriendsList = getChild<LLScrollListCtrl>("friend_list");
- mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT);
- mFriendsList->setMaximumSelectCallback(boost::bind(&LLPanelFriends::onMaximumSelect));
- mFriendsList->setCommitOnSelectionChange(TRUE);
- mFriendsList->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
- childSetCommitCallback("friend_list", onSelectName, this);
- getChild<LLScrollListCtrl>("friend_list")->setDoubleClickCallback(onClickIM, this);
-
- U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE;
- refreshNames(changed_mask);
-
- childSetAction("im_btn", onClickIM, this);
- childSetAction("profile_btn", onClickProfile, this);
- childSetAction("offer_teleport_btn", onClickOfferTeleport, this);
- childSetAction("pay_btn", onClickPay, this);
- childSetAction("add_btn", onClickAddFriend, this);
- childSetAction("remove_btn", onClickRemove, this);
-
- setDefaultBtn("im_btn");
-
- updateFriends(LLFriendObserver::ADD);
- refreshUI();
-
- // primary sort = online status, secondary sort = name
- mFriendsList->sortByColumn(std::string("friend_name"), TRUE);
- mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE);
-
- return TRUE;
-}
-
-BOOL LLPanelFriends::addFriend(const LLUUID& agent_id)
-{
- LLAvatarTracker& at = LLAvatarTracker::instance();
- const LLRelationship* relationInfo = at.getBuddyInfo(agent_id);
- if(!relationInfo) return FALSE;
-
- bool isOnlineSIP = LLVoiceClient::getInstance()->isOnlineSIP(agent_id);
- bool isOnline = relationInfo->isOnline();
-
- std::string fullname;
- BOOL have_name = gCacheName->getFullName(agent_id, fullname);
-
- LLSD element;
- element["id"] = agent_id;
- LLSD& friend_column = element["columns"][LIST_FRIEND_NAME];
- friend_column["column"] = "friend_name";
- friend_column["value"] = fullname;
- friend_column["font"]["name"] = "SANSSERIF";
- friend_column["font"]["style"] = "NORMAL";
-
- LLSD& online_status_column = element["columns"][LIST_ONLINE_STATUS];
- online_status_column["column"] = "icon_online_status";
- online_status_column["type"] = "icon";
-
- if (isOnline)
- {
- friend_column["font"]["style"] = "BOLD";
- online_status_column["value"] = "icon_avatar_online.tga";
- }
- else if(isOnlineSIP)
- {
- friend_column["font"]["style"] = "BOLD";
- online_status_column["value"] = ONLINE_SIP_ICON_NAME;
- }
-
- LLSD& online_column = element["columns"][LIST_VISIBLE_ONLINE];
- online_column["column"] = "icon_visible_online";
- online_column["type"] = "checkbox";
- online_column["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS);
-
- LLSD& visible_map_column = element["columns"][LIST_VISIBLE_MAP];
- visible_map_column["column"] = "icon_visible_map";
- visible_map_column["type"] = "checkbox";
- visible_map_column["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION);
-
- LLSD& edit_my_object_column = element["columns"][LIST_EDIT_MINE];
- edit_my_object_column["column"] = "icon_edit_mine";
- edit_my_object_column["type"] = "checkbox";
- edit_my_object_column["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS);
-
- LLSD& edit_their_object_column = element["columns"][LIST_EDIT_THEIRS];
- edit_their_object_column["column"] = "icon_edit_theirs";
- edit_their_object_column["type"] = "checkbox";
- edit_their_object_column["enabled"] = "";
- edit_their_object_column["value"] = relationInfo->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS);
-
- LLSD& update_gen_column = element["columns"][LIST_FRIEND_UPDATE_GEN];
- update_gen_column["column"] = "friend_last_update_generation";
- update_gen_column["value"] = have_name ? relationInfo->getChangeSerialNum() : -1;
-
- mFriendsList->addElement(element, ADD_BOTTOM);
- return have_name;
-}
-
-// propagate actual relationship to UI.
-// Does not resort the UI list because it can be called frequently. JC
-BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationship* info)
-{
- if (!info) return FALSE;
- LLScrollListItem* itemp = mFriendsList->getItem(agent_id);
- if (!itemp) return FALSE;
-
- bool isOnlineSIP = LLVoiceClient::getInstance()->isOnlineSIP(itemp->getUUID());
- bool isOnline = info->isOnline();
-
- std::string fullname;
- BOOL have_name = gCacheName->getFullName(agent_id, fullname);
-
- // Name of the status icon to use
- std::string statusIcon;
-
- if(isOnline)
- {
- statusIcon = "icon_avatar_online.tga";
- }
- else if(isOnlineSIP)
- {
- statusIcon = ONLINE_SIP_ICON_NAME;
- }
-
- itemp->getColumn(LIST_ONLINE_STATUS)->setValue(statusIcon);
-
- itemp->getColumn(LIST_FRIEND_NAME)->setValue(fullname);
- // render name of online friends in bold text
- ((LLScrollListText*)itemp->getColumn(LIST_FRIEND_NAME))->setFontStyle((isOnline || isOnlineSIP) ? LLFontGL::BOLD : LLFontGL::NORMAL);
- itemp->getColumn(LIST_VISIBLE_ONLINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS));
- itemp->getColumn(LIST_VISIBLE_MAP)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION));
- itemp->getColumn(LIST_EDIT_MINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS));
- S32 change_generation = have_name ? info->getChangeSerialNum() : -1;
- itemp->getColumn(LIST_FRIEND_UPDATE_GEN)->setValue(change_generation);
-
- // enable this item, in case it was disabled after user input
- itemp->setEnabled(TRUE);
-
- // Do not resort, this function can be called frequently.
- return have_name;
-}
-
-void LLPanelFriends::refreshRightsChangeList()
-{
- std::vector<LLUUID> friends = getSelectedIDs();
- S32 num_selected = friends.size();
-
- bool can_offer_teleport = num_selected >= 1;
- bool selected_friends_online = true;
-
- const LLRelationship* friend_status = NULL;
- for(std::vector<LLUUID>::iterator itr = friends.begin(); itr != friends.end(); ++itr)
- {
- friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr);
- if (friend_status)
- {
- if(!friend_status->isOnline())
- {
- can_offer_teleport = false;
- selected_friends_online = false;
- }
- }
- else // missing buddy info, don't allow any operations
- {
- can_offer_teleport = false;
- }
- }
-
- if (num_selected == 0) // nothing selected
- {
- childSetEnabled("im_btn", FALSE);
- childSetEnabled("offer_teleport_btn", FALSE);
- }
- else // we have at least one friend selected...
- {
- // only allow IMs to groups when everyone in the group is online
- // to be consistent with context menus in inventory and because otherwise
- // offline friends would be silently dropped from the session
- childSetEnabled("im_btn", selected_friends_online || num_selected == 1);
- childSetEnabled("offer_teleport_btn", can_offer_teleport);
- }
-}
-
-struct SortFriendsByID
-{
- bool operator() (const LLScrollListItem* const a, const LLScrollListItem* const b) const
- {
- return a->getValue().asUUID() < b->getValue().asUUID();
- }
-};
-
-void LLPanelFriends::refreshNames(U32 changed_mask)
-{
- std::vector<LLUUID> selected_ids = getSelectedIDs();
- S32 pos = mFriendsList->getScrollPos();
-
- // get all buddies we know about
- LLAvatarTracker::buddy_map_t all_buddies;
- LLAvatarTracker::instance().copyBuddyList(all_buddies);
-
- BOOL have_names = TRUE;
-
- if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE))
- {
- have_names &= refreshNamesSync(all_buddies);
- }
-
- if(changed_mask & LLFriendObserver::ONLINE)
- {
- have_names &= refreshNamesPresence(all_buddies);
- }
-
- if (!have_names)
- {
- mEventTimer.start();
- }
- // Changed item in place, need to request sort and update columns
- // because we might have changed data in a column on which the user
- // has already sorted. JC
- mFriendsList->updateSort();
-
- // re-select items
- mFriendsList->selectMultiple(selected_ids);
- mFriendsList->setScrollPos(pos);
-}
-
-BOOL LLPanelFriends::refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies)
-{
- mFriendsList->deleteAllItems();
-
- BOOL have_names = TRUE;
- LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
-
- for(; buddy_it != all_buddies.end(); ++buddy_it)
- {
- have_names &= addFriend(buddy_it->first);
- }
-
- return have_names;
-}
-
-BOOL LLPanelFriends::refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies)
-{
- std::vector<LLScrollListItem*> items = mFriendsList->getAllData();
- std::sort(items.begin(), items.end(), SortFriendsByID());
-
- LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
- std::vector<LLScrollListItem*>::const_iterator item_it = items.begin();
- BOOL have_names = TRUE;
-
- while(true)
- {
- if(item_it == items.end() || buddy_it == all_buddies.end())
- {
- break;
- }
-
- const LLUUID & buddy_uuid = buddy_it->first;
- const LLUUID & item_uuid = (*item_it)->getValue().asUUID();
- if(item_uuid == buddy_uuid)
- {
- const LLRelationship* info = buddy_it->second;
- if (!info)
- {
- ++item_it;
- continue;
- }
-
- S32 last_change_generation = (*item_it)->getColumn(LIST_FRIEND_UPDATE_GEN)->getValue().asInteger();
- if (last_change_generation < info->getChangeSerialNum())
- {
- // update existing item in UI
- have_names &= updateFriendItem(buddy_it->first, info);
- }
-
- ++buddy_it;
- ++item_it;
- }
- else if(item_uuid < buddy_uuid)
- {
- ++item_it;
- }
- else //if(item_uuid > buddy_uuid)
- {
- ++buddy_it;
- }
- }
-
- return have_names;
-}
-
-void LLPanelFriends::refreshUI()
-{
- BOOL single_selected = FALSE;
- BOOL multiple_selected = FALSE;
- int num_selected = mFriendsList->getAllSelected().size();
- if(num_selected > 0)
- {
- single_selected = TRUE;
- if(num_selected > 1)
- {
- multiple_selected = TRUE;
- }
- }
-
-
- //Options that can only be performed with one friend selected
- childSetEnabled("profile_btn", single_selected && !multiple_selected);
- childSetEnabled("pay_btn", single_selected && !multiple_selected);
-
- //Options that can be performed with up to MAX_FRIEND_SELECT friends selected
- //(single_selected will always be true in this situations)
- childSetEnabled("remove_btn", single_selected);
- childSetEnabled("im_btn", single_selected);
-// childSetEnabled("friend_rights", single_selected);
-
- refreshRightsChangeList();
-}
-
-std::vector<LLUUID> LLPanelFriends::getSelectedIDs()
-{
- LLUUID selected_id;
- std::vector<LLUUID> friend_ids;
- std::vector<LLScrollListItem*> selected = mFriendsList->getAllSelected();
- for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
- {
- friend_ids.push_back((*itr)->getUUID());
- }
- return friend_ids;
-}
-
-// static
-void LLPanelFriends::onSelectName(LLUICtrl* ctrl, void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- if(panelp)
- {
- panelp->refreshUI();
- // check to see if rights have changed
- panelp->applyRightsToFriends();
- }
-}
-
-//static
-void LLPanelFriends::onMaximumSelect()
-{
- LLSD args;
- args["MAX_SELECT"] = llformat("%d", MAX_FRIEND_SELECT);
- LLNotificationsUtil::add("MaxListSelectMessage", args);
-};
-
-// static
-void LLPanelFriends::onClickProfile(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- std::vector<LLUUID> ids = panelp->getSelectedIDs();
- if(ids.size() > 0)
- {
- LLUUID agent_id = ids[0];
- LLAvatarActions::showProfile(agent_id);
- }
-}
-
-// static
-void LLPanelFriends::onClickIM(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- std::vector<LLUUID> ids = panelp->getSelectedIDs();
- if(ids.size() > 0)
- {
- if(ids.size() == 1)
- {
- LLAvatarActions::startIM(ids[0]);
- }
- else
- {
- LLAvatarActions::startConference(ids);
- }
- }
-}
-
-// static
-void LLPanelFriends::onPickAvatar(const std::vector<std::string>& names,
- const std::vector<LLUUID>& ids)
-{
- if (names.empty()) return;
- if (ids.empty()) return;
- LLAvatarActions::requestFriendshipDialog(ids[0], names[0]);
-}
-
-// static
-void LLPanelFriends::onClickAddFriend(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLFloater* root_floater = gFloaterView->getParentFloater(panelp);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelFriends::onPickAvatar, _1,_2), FALSE, TRUE);
- if (root_floater)
- {
- root_floater->addDependentFloater(picker);
- }
-}
-
-// static
-void LLPanelFriends::onClickRemove(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLAvatarActions::removeFriendsDialog(panelp->getSelectedIDs());
-}
-
-// static
-void LLPanelFriends::onClickOfferTeleport(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLAvatarActions::offerTeleport(panelp->getSelectedIDs());
-}
-
-// static
-void LLPanelFriends::onClickPay(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- std::vector<LLUUID> ids = panelp->getSelectedIDs();
- if(ids.size() == 1)
- {
- LLAvatarActions::pay(ids[0]);
- }
-}
-
-void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command)
-{
- if (ids.empty()) return;
-
- LLSD args;
- if(ids.size() > 0)
- {
- rights_map_t* rights = new rights_map_t(ids);
-
- // for single friend, show their name
- if(ids.size() == 1)
- {
- LLUUID agent_id = ids.begin()->first;
- std::string first, last;
- if(gCacheName->getName(agent_id, first, last))
- {
- args["FIRST_NAME"] = first;
- args["LAST_NAME"] = last;
- }
- if (command == GRANT)
- {
- LLNotificationsUtil::add("GrantModifyRights",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- else
- {
- LLNotificationsUtil::add("RevokeModifyRights",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- }
- else
- {
- if (command == GRANT)
- {
- LLNotificationsUtil::add("GrantModifyRightsMultiple",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- else
- {
- LLNotificationsUtil::add("RevokeModifyRightsMultiple",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- }
- }
-}
-
-bool LLPanelFriends::modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if(0 == option)
- {
- sendRightsGrant(*rights);
- }
- else
- {
- // need to resync view with model, since user cancelled operation
- rights_map_t::iterator rights_it;
- for (rights_it = rights->begin(); rights_it != rights->end(); ++rights_it)
- {
- const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(rights_it->first);
- updateFriendItem(rights_it->first, info);
- }
- }
- refreshUI();
-
- delete rights;
- return false;
-}
-
-void LLPanelFriends::applyRightsToFriends()
-{
- BOOL rights_changed = FALSE;
-
- // store modify rights separately for confirmation
- rights_map_t rights_updates;
-
- BOOL need_confirmation = FALSE;
- EGrantRevoke confirmation_type = GRANT;
-
- // this assumes that changes only happened to selected items
- std::vector<LLScrollListItem*> selected = mFriendsList->getAllSelected();
- for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
- {
- LLUUID id = (*itr)->getValue();
- const LLRelationship* buddy_relationship = LLAvatarTracker::instance().getBuddyInfo(id);
- if (buddy_relationship == NULL) continue;
-
- bool show_online_staus = (*itr)->getColumn(LIST_VISIBLE_ONLINE)->getValue().asBoolean();
- bool show_map_location = (*itr)->getColumn(LIST_VISIBLE_MAP)->getValue().asBoolean();
- bool allow_modify_objects = (*itr)->getColumn(LIST_EDIT_MINE)->getValue().asBoolean();
-
- S32 rights = buddy_relationship->getRightsGrantedTo();
- if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS) != show_online_staus)
- {
- rights_changed = TRUE;
- if(show_online_staus)
- {
- rights |= LLRelationship::GRANT_ONLINE_STATUS;
- }
- else
- {
- // ONLINE_STATUS necessary for MAP_LOCATION
- rights &= ~LLRelationship::GRANT_ONLINE_STATUS;
- rights &= ~LLRelationship::GRANT_MAP_LOCATION;
- // propagate rights constraint to UI
- (*itr)->getColumn(LIST_VISIBLE_MAP)->setValue(FALSE);
- }
- }
- if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION) != show_map_location)
- {
- rights_changed = TRUE;
- if(show_map_location)
- {
- // ONLINE_STATUS necessary for MAP_LOCATION
- rights |= LLRelationship::GRANT_MAP_LOCATION;
- rights |= LLRelationship::GRANT_ONLINE_STATUS;
- (*itr)->getColumn(LIST_VISIBLE_ONLINE)->setValue(TRUE);
- }
- else
- {
- rights &= ~LLRelationship::GRANT_MAP_LOCATION;
- }
- }
-
- // now check for change in modify object rights, which requires confirmation
- if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects)
- {
- rights_changed = TRUE;
- need_confirmation = TRUE;
-
- if(allow_modify_objects)
- {
- rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
- confirmation_type = GRANT;
- }
- else
- {
- rights &= ~LLRelationship::GRANT_MODIFY_OBJECTS;
- confirmation_type = REVOKE;
- }
- }
-
- if (rights_changed)
- {
- rights_updates.insert(std::make_pair(id, rights));
- // disable these ui elements until response from server
- // to avoid race conditions
- (*itr)->setEnabled(FALSE);
- }
- }
-
- // separately confirm grant and revoke of modify rights
- if (need_confirmation)
- {
- confirmModifyRights(rights_updates, confirmation_type);
- }
- else
- {
- sendRightsGrant(rights_updates);
- }
-}
-
-void LLPanelFriends::sendRightsGrant(rights_map_t& ids)
-{
- if (ids.empty()) return;
-
- LLMessageSystem* msg = gMessageSystem;
-
- // setup message header
- msg->newMessageFast(_PREHASH_GrantUserRights);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
-
- rights_map_t::iterator id_it;
- rights_map_t::iterator end_it = ids.end();
- for(id_it = ids.begin(); id_it != end_it; ++id_it)
- {
- msg->nextBlockFast(_PREHASH_Rights);
- msg->addUUID(_PREHASH_AgentRelated, id_it->first);
- msg->addS32(_PREHASH_RelatedRights, id_it->second);
- }
-
- mNumRightsChanged = ids.size();
- gAgent.sendReliableMessage();
-}
diff --git a/indra/newview/llfloaterfriends.h b/indra/newview/llfloaterfriends.h
deleted file mode 100644
index a303477c95..0000000000
--- a/indra/newview/llfloaterfriends.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * @file llfloaterfriends.h
- * @author Phoenix
- * @date 2005-01-13
- * @brief Declaration of class for displaying the local agent's friends.
- *
- * $LicenseInfo:firstyear=2005&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATERFRIENDS_H
-#define LL_LLFLOATERFRIENDS_H
-
-#include "llpanel.h"
-#include "llstring.h"
-#include "lluuid.h"
-#include "lltimer.h"
-#include "llcallingcard.h"
-
-class LLFriendObserver;
-class LLRelationship;
-class LLScrollListItem;
-class LLScrollListCtrl;
-
-/**
- * @class LLPanelFriends
- * @brief An instance of this class is used for displaying your friends
- * and gives you quick access to all agents which a user relationship.
- *
- * @sa LLFloater
- */
-class LLPanelFriends : public LLPanel, public LLEventTimer
-{
-public:
- LLPanelFriends();
- virtual ~LLPanelFriends();
-
- /**
- * @brief This method either creates or brings to the front the
- * current instantiation of this floater. There is only once since
- * you can currently only look at your local friends.
- */
- virtual BOOL tick();
-
- /**
- * @brief This method is called in response to the LLAvatarTracker
- * sending out a changed() message.
- */
- void updateFriends(U32 changed_mask);
-
- virtual BOOL postBuild();
-
- // *HACK Made public to remove friends from LLAvatarIconCtrl context menu
- static bool handleRemove(const LLSD& notification, const LLSD& response);
-
-private:
-
- enum FRIENDS_COLUMN_ORDER
- {
- LIST_ONLINE_STATUS,
- LIST_FRIEND_NAME,
- LIST_VISIBLE_ONLINE,
- LIST_VISIBLE_MAP,
- LIST_EDIT_MINE,
- LIST_EDIT_THEIRS,
- LIST_FRIEND_UPDATE_GEN
- };
-
- // protected members
- typedef std::map<LLUUID, S32> rights_map_t;
- void refreshNames(U32 changed_mask);
- BOOL refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies);
- BOOL refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies);
- void refreshUI();
- void refreshRightsChangeList();
- void applyRightsToFriends();
- BOOL addFriend(const LLUUID& agent_id);
- BOOL updateFriendItem(const LLUUID& agent_id, const LLRelationship* relationship);
-
- typedef enum
- {
- GRANT,
- REVOKE
- } EGrantRevoke;
- void confirmModifyRights(rights_map_t& ids, EGrantRevoke command);
- void sendRightsGrant(rights_map_t& ids);
-
- // return empty vector if nothing is selected
- std::vector<LLUUID> getSelectedIDs();
-
- // callback methods
- static void onSelectName(LLUICtrl* ctrl, void* user_data);
- static bool callbackAddFriend(const LLSD& notification, const LLSD& response);
- static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
- static void onPickAvatar(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
- static void onMaximumSelect();
-
- static void onClickIM(void* user_data);
- static void onClickProfile(void* user_data);
- static void onClickAddFriend(void* user_data);
- static void onClickRemove(void* user_data);
-
- static void onClickOfferTeleport(void* user_data);
- static void onClickPay(void* user_data);
-
- static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
-
- bool modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights);
-
-private:
- // member data
- LLFriendObserver* mObserver;
- LLUUID mAddFriendID;
- std::string mAddFriendName;
- LLScrollListCtrl* mFriendsList;
- BOOL mShowMaxSelectWarning;
- BOOL mAllowRightsChange;
- S32 mNumRightsChanged;
-};
-
-
-#endif // LL_LLFLOATERFRIENDS_H
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index ef3c8b764e..d495f20a9a 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -365,6 +365,8 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur
element["columns"][3]["font"]["style"] = font_style;
}
+ LL_DEBUGS("Gesture") << "Added gesture [" << item_name << "]" << LL_ENDL;
+
LLScrollListItem* sl_item = list->addElement(element, ADD_BOTTOM);
if(sl_item)
{
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 42ec7d765b..f9a403cf9f 100644
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -34,7 +34,9 @@
#include "llviewercontrol.h"
#include "llviewertexturelist.h"
#include "llfeaturemanager.h"
+#include "llspinctrl.h"
#include "llstartup.h"
+#include "lltextbox.h"
#include "pipeline.h"
// Linden library includes
@@ -98,18 +100,40 @@ void LLFloaterHardwareSettings::refreshEnabledState()
}
// if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
- getChildView("gamma")->setEnabled(!gPipeline.canUseWindLightShaders());
+ LLSpinCtrl* gamma_ctrl = getChild<LLSpinCtrl>("gamma");
+ gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders());
getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders());
getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders());
- getChildView("fsaa")->setEnabled(gPipeline.canUseAntiAliasing());
- getChildView("antialiasing restart")->setVisible(!gSavedSettings.getBOOL("RenderDeferred"));
- /* Enable to reset fsaa value to disabled when feature is not available.
- if (!gPipeline.canUseAntiAliasing())
+ // anti-aliasing
{
- getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) 0);
+ LLUICtrl* fsaa_ctrl = getChild<LLUICtrl>("fsaa");
+ LLTextBox* fsaa_text = getChild<LLTextBox>("antialiasing label");
+ LLView* fsaa_restart = getChildView("antialiasing restart");
+
+ // Enable or disable the control, the "Antialiasing:" label and the restart warning
+ // based on code support for the feature on the current hardware.
+
+ if (gPipeline.canUseAntiAliasing())
+ {
+ fsaa_ctrl->setEnabled(TRUE);
+
+ // borrow the text color from the gamma control for consistency
+ fsaa_text->setColor(gamma_ctrl->getEnabledTextColor());
+
+ fsaa_restart->setVisible(!gSavedSettings.getBOOL("RenderDeferred"));
+ }
+ else
+ {
+ fsaa_ctrl->setEnabled(FALSE);
+ fsaa_ctrl->setValue((LLSD::Integer) 0);
+
+ // borrow the text color from the gamma control for consistency
+ fsaa_text->setColor(gamma_ctrl->getDisabledTextColor());
+
+ fsaa_restart->setVisible(FALSE);
+ }
}
- */
}
//============================================================================
diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp
index 3012638d44..fd9c37ae73 100644
--- a/indra/newview/llfloaterhelpbrowser.cpp
+++ b/indra/newview/llfloaterhelpbrowser.cpp
@@ -39,6 +39,7 @@
#include "llurlhistory.h"
#include "llmediactrl.h"
#include "llviewermedia.h"
+#include "llviewerhelp.h"
LLFloaterHelpBrowser::LLFloaterHelpBrowser(const LLSD& key)
@@ -74,6 +75,17 @@ void LLFloaterHelpBrowser::buildURLHistory()
void LLFloaterHelpBrowser::onOpen(const LLSD& key)
{
gSavedSettings.setBOOL("HelpFloaterOpen", TRUE);
+
+ std::string topic = key.asString();
+
+ if (topic == "__local")
+ {
+ mBrowser->navigateToLocalPage( "help-offline" , "index.html" );
+ }
+ else
+ {
+ mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic));
+ }
}
//virtual
@@ -148,8 +160,3 @@ void LLFloaterHelpBrowser::openMedia(const std::string& media_url)
mBrowser->navigateTo(media_url, "text/html");
setCurrentURL(media_url);
}
-
-void LLFloaterHelpBrowser::navigateToLocalPage( const std::string& subdir, const std::string& filename_in )
-{
- mBrowser->navigateToLocalPage(subdir, filename_in);
-}
diff --git a/indra/newview/llfloaterhelpbrowser.h b/indra/newview/llfloaterhelpbrowser.h
index afe0f4df69..bf4f544a14 100644
--- a/indra/newview/llfloaterhelpbrowser.h
+++ b/indra/newview/llfloaterhelpbrowser.h
@@ -1,5 +1,5 @@
/**
- * @file llfloatermediabrowser.h
+ * @file llfloaterhelpbrowser.h
* @brief HTML Help floater - uses embedded web browser control
*
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
@@ -48,8 +48,6 @@ class LLFloaterHelpBrowser :
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
void openMedia(const std::string& media_url);
-
- void navigateToLocalPage( const std::string& subdir, const std::string& filename_in );
private:
void buildURLHistory();
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 4181d1906e..58c76a0b85 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -54,14 +54,6 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key)
return;
}
- // Don't grab the focus as it will impede performing in-world actions
- // while using the HUD
- setIsChrome(TRUE);
-
- // Chrome doesn't show the window title by default, but here we
- // want to show it.
- setTitleVisible(true);
-
// Opaque background since we never get the focus
setBackgroundOpaque(TRUE);
}
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index e4d8e3513d..69de15d9ea 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -50,6 +50,7 @@
#include "llvoavatar.h"
#include "pipeline.h"
#include "lluictrlfactory.h"
+#include "llviewershadermgr.h"
#include "llviewertexturelist.h"
#include "llstring.h"
@@ -649,25 +650,30 @@ BOOL LLImagePreviewAvatar::render()
gGL.pushUIMatrix();
gGL.loadUIIdentity();
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
- glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+ gGL.loadIdentity();
+ gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
LLGLSUIDefault def;
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
gl_rect_2d_simple( mFullWidth, mFullHeight );
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
gGL.flush();
@@ -690,8 +696,7 @@ BOOL LLImagePreviewAvatar::render()
LLVertexBuffer::unbind();
avatarp->updateLOD();
-
-
+
if (avatarp->mDrawable.notNull())
{
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE);
@@ -699,7 +704,7 @@ BOOL LLImagePreviewAvatar::render()
LLGLDisable no_blend(GL_BLEND);
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
-
+ gPipeline.enableLightsPreview();
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
}
@@ -790,15 +795,17 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
U32 num_indices = vf.mNumIndices;
U32 num_vertices = vf.mNumVertices;
- mVertexBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL, 0);
+ mVertexBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0, 0);
mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE);
LLStrider<LLVector3> vertex_strider;
LLStrider<LLVector3> normal_strider;
+ LLStrider<LLVector2> tc_strider;
LLStrider<U16> index_strider;
mVertexBuffer->getVertexStrider(vertex_strider);
mVertexBuffer->getNormalStrider(normal_strider);
+ mVertexBuffer->getTexCoord0Strider(tc_strider);
mVertexBuffer->getIndexStrider(index_strider);
// build vertices and normals
@@ -806,7 +813,8 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
pos = (LLVector3*) vf.mPositions; pos.setStride(16);
LLStrider<LLVector3> norm;
norm = (LLVector3*) vf.mNormals; norm.setStride(16);
-
+ LLStrider<LLVector2> tc;
+ tc = (LLVector2*) vf.mTexCoords; tc.setStride(8);
for (U32 i = 0; i < num_vertices; i++)
{
@@ -814,6 +822,7 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
LLVector3 normal = *norm++;
normal.normalize();
*(normal_strider++) = normal;
+ *(tc_strider++) = *tc++;
}
// build indices
@@ -835,23 +844,28 @@ BOOL LLImagePreviewSculpted::render()
LLGLEnable cull(GL_CULL_FACE);
LLGLDepthTest depth(GL_TRUE);
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
- glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+ gGL.loadIdentity();
+ gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
- gl_rect_2d_simple( mFullWidth, mFullHeight );
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
- glMatrixMode(GL_PROJECTION);
+ gl_rect_2d_simple( mFullWidth, mFullHeight );
+
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
glClear(GL_DEPTH_BUFFER_BIT);
@@ -876,17 +890,28 @@ BOOL LLImagePreviewSculpted::render()
const LLVolumeFace &vf = mVolume->getVolumeFace(0);
U32 num_indices = vf.mNumIndices;
- mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL);
-
gPipeline.enableLightsAvatar();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gObjectPreviewProgram.bind();
+ }
gGL.pushMatrix();
const F32 SCALE = 1.25f;
gGL.scalef(SCALE, SCALE, SCALE);
const F32 BRIGHTNESS = 0.9f;
gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS);
+
+ mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
mVertexBuffer->draw(LLRender::TRIANGLES, num_indices, 0);
gGL.popMatrix();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gObjectPreviewProgram.unbind();
+ }
+
return TRUE;
}
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index a09b9ea235..cece8d299c 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -37,6 +37,7 @@
#include "llselectmgr.h"
#include "lltoolcomp.h"
#include "lltoolmgr.h"
+#include "lltrans.h"
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "lluictrlfactory.h"
@@ -166,6 +167,15 @@ LLUUID LLFloaterInspect::getSelectedUUID()
return LLUUID::null;
}
+void LLFloaterInspect::onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr)
+{
+ if (FloaterPtr)
+ {
+ LLFloaterInspect* floater = (LLFloaterInspect*)FloaterPtr;
+ floater->dirty();
+ }
+}
+
void LLFloaterInspect::refresh()
{
LLUUID creator_id;
@@ -205,11 +215,32 @@ void LLFloaterInspect::refresh()
substitution["datetime"] = (S32) timestamp;
LLStringUtil::format (timeStr, substitution);
+ const LLUUID& idOwner = obj->mPermissions->getOwner();
+ const LLUUID& idCreator = obj->mPermissions->getCreator();
LLAvatarName av_name;
- LLAvatarNameCache::get(obj->mPermissions->getOwner(), &av_name);
- owner_name = av_name.getCompleteName();
- LLAvatarNameCache::get(obj->mPermissions->getCreator(), &av_name);
- creator_name = av_name.getCompleteName();
+
+ // Only work with the names if we actually get a result
+ // from the name cache. If not, defer setting the
+ // actual name and set a placeholder.
+ if (LLAvatarNameCache::get(idOwner, &av_name))
+ {
+ owner_name = av_name.getCompleteName();
+ }
+ else
+ {
+ owner_name = LLTrans::getString("RetrievingData");
+ LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
+ }
+
+ if (LLAvatarNameCache::get(idCreator, &av_name))
+ {
+ creator_name = av_name.getCompleteName();
+ }
+ else
+ {
+ creator_name = LLTrans::getString("RetrievingData");
+ LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
+ }
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";
diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h
index d9ffdf114b..7ee83ccdb4 100644
--- a/indra/newview/llfloaterinspect.h
+++ b/indra/newview/llfloaterinspect.h
@@ -29,6 +29,7 @@
#ifndef LL_LLFLOATERINSPECT_H
#define LL_LLFLOATERINSPECT_H
+#include "llavatarname.h"
#include "llfloater.h"
//class LLTool;
@@ -53,6 +54,9 @@ public:
void onClickCreatorProfile();
void onClickOwnerProfile();
void onSelectObject();
+
+ static void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr);
+
LLScrollListCtrl* mObjectList;
protected:
// protected members
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index df769bdd88..9b9b90e521 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -98,3 +98,12 @@ void LLFloaterInventory::onOpen(const LLSD& key)
{
//LLFirstUse::useInventory();
}
+
+void LLFloaterInventory::onClose(bool app_quitting)
+{
+ LLFloater::onClose(app_quitting);
+ if (mKey.asInteger() > 1)
+ {
+ destroy();
+ }
+}
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index f59a015b07..823c4903b4 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -58,6 +58,7 @@ public:
// Inherited functionality
/*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onClose(bool app_quitting);
LLInventoryPanel* getPanel();
LLPanelMainInventory* getMainInventoryPanel() { return mPanelMainInventory;}
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 9b7593ce61..b13a9aab88 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -433,7 +433,6 @@ BOOL LLPanelLandGeneral::postBuild()
mTextDwell = getChild<LLTextBox>("DwellText");
-
mBtnBuyLand = getChild<LLButton>("Buy Land...");
mBtnBuyLand->setClickedCallback(onClickBuyLand, (void*)&BUY_PERSONAL_LAND);
@@ -566,10 +565,7 @@ void LLPanelLandGeneral::refresh()
if (regionp)
{
insert_maturity_into_textbox(mContentRating, gFloaterView->getParentFloater(this), MATURITY);
-
- std::string land_type;
- bool is_land_type_localized = LLTrans::findString(land_type, regionp->getSimProductName());
- mLandType->setText(is_land_type_localized ? land_type : regionp->getSimProductName());
+ mLandType->setText(regionp->getLocalizedSimProductName());
}
// estate owner/manager cannot edit other parts of the parcel
@@ -699,20 +695,26 @@ void LLPanelLandGeneral::refresh()
S32 area;
S32 claim_price;
S32 rent_price;
- F32 dwell;
+ F32 dwell = DWELL_NAN;
LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
&claim_price,
&rent_price,
&for_sale,
&dwell);
-
// Area
LLUIString price = getString("area_size_text");
price.setArg("[AREA]", llformat("%d",area));
mTextPriceLabel->setText(getString("area_text"));
mTextPrice->setText(price.getString());
- mTextDwell->setText(llformat("%.0f", dwell));
+ if (dwell == DWELL_NAN)
+ {
+ mTextDwell->setText(LLTrans::getString("LoadingData"));
+ }
+ else
+ {
+ mTextDwell->setText(llformat("%.0f", dwell));
+ }
if (for_sale)
{
@@ -1804,7 +1806,6 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
mCheckEditGroupObjects(NULL),
mCheckAllObjectEntry(NULL),
mCheckGroupObjectEntry(NULL),
- mCheckEditLand(NULL),
mCheckSafe(NULL),
mCheckFly(NULL),
mCheckGroupScripts(NULL),
@@ -1838,10 +1839,6 @@ BOOL LLPanelLandOptions::postBuild()
mCheckGroupObjectEntry = getChild<LLCheckBoxCtrl>( "group object entry check");
childSetCommitCallback("group object entry check", onCommitAny, this);
- mCheckEditLand = getChild<LLCheckBoxCtrl>( "edit land check");
- childSetCommitCallback("edit land check", onCommitAny, this);
-
-
mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
childSetCommitCallback("check group scripts", onCommitAny, this);
@@ -1954,9 +1951,6 @@ void LLPanelLandOptions::refresh()
mCheckGroupObjectEntry ->set(FALSE);
mCheckGroupObjectEntry ->setEnabled(FALSE);
- mCheckEditLand ->set(FALSE);
- mCheckEditLand ->setEnabled(FALSE);
-
mCheckSafe ->set(FALSE);
mCheckSafe ->setEnabled(FALSE);
@@ -2004,10 +1998,6 @@ void LLPanelLandOptions::refresh()
mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry());
mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() );
-
- BOOL can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT);
- mCheckEditLand ->set( parcel->getAllowTerraform() );
- mCheckEditLand ->setEnabled( can_change_terraform );
mCheckSafe ->set( !parcel->getAllowDamage() );
mCheckSafe ->setEnabled( can_change_options );
@@ -2233,7 +2223,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
BOOL create_group_objects = self->mCheckEditGroupObjects->get() || self->mCheckEditObjects->get();
BOOL all_object_entry = self->mCheckAllObjectEntry->get();
BOOL group_object_entry = self->mCheckGroupObjectEntry->get() || self->mCheckAllObjectEntry->get();
- BOOL allow_terraform = self->mCheckEditLand->get();
+ BOOL allow_terraform = false; // removed from UI so always off now - self->mCheckEditLand->get();
BOOL allow_damage = !self->mCheckSafe->get();
BOOL allow_fly = self->mCheckFly->get();
BOOL allow_landmark = TRUE; // cannot restrict landmark creation
@@ -2883,13 +2873,7 @@ void LLPanelLandCovenant::refresh()
}
LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
- if (region_landtype)
- {
- std::string land_type;
- bool is_land_type_localized = LLTrans::findString(land_type, region->getSimProductName());
-
- region_landtype->setText(is_land_type_localized ? land_type : region->getSimProductName());
- }
+ region_landtype->setText(region->getLocalizedSimProductName());
LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");
if (region_maturity)
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 6fceca1acd..4f1c10274a 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -330,7 +330,6 @@ private:
LLCheckBoxCtrl* mCheckEditGroupObjects;
LLCheckBoxCtrl* mCheckAllObjectEntry;
LLCheckBoxCtrl* mCheckGroupObjectEntry;
- LLCheckBoxCtrl* mCheckEditLand;
LLCheckBoxCtrl* mCheckSafe;
LLCheckBoxCtrl* mCheckFly;
LLCheckBoxCtrl* mCheckGroupScripts;
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 641e64247b..a65e9e911a 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -100,17 +100,11 @@ BOOL LLFloaterMap::postBuild()
mTextBoxSouthWest = getChild<LLTextBox> ("floater_map_southwest");
mTextBoxNorthWest = getChild<LLTextBox> ("floater_map_northwest");
- stretchMiniMap(getRect().getWidth() - MAP_PADDING_LEFT - MAP_PADDING_RIGHT
- ,getRect().getHeight() - MAP_PADDING_TOP - MAP_PADDING_BOTTOM);
-
updateMinorDirections();
// Get the drag handle all the way in back
sendChildToBack(getDragHandle());
- setIsChrome(TRUE);
- getDragHandle()->setTitleVisible(TRUE);
-
// keep onscreen
gFloaterView->adjustToFitScreen(this, FALSE);
@@ -223,40 +217,10 @@ void LLFloaterMap::draw()
LLFloater::draw();
}
-// virtual
-void LLFloaterMap::onFocusReceived()
-{
- setBackgroundOpaque(true);
- LLPanel::onFocusReceived();
-}
-
-// virtual
-void LLFloaterMap::onFocusLost()
-{
- setBackgroundOpaque(false);
- LLPanel::onFocusLost();
-}
-
-void LLFloaterMap::stretchMiniMap(S32 width,S32 height)
-{
- //fix for ext-7112
- //by default ctrl can't overlap caption area
- if(mMap)
- {
- LLRect map_rect;
- map_rect.setLeftTopAndSize( MAP_PADDING_LEFT, getRect().getHeight() - MAP_PADDING_TOP, width, height);
- mMap->reshape( width, height, 1);
- mMap->setRect(map_rect);
- }
-}
-
void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLFloater::reshape(width, height, called_from_parent);
- stretchMiniMap(width - MAP_PADDING_LEFT - MAP_PADDING_RIGHT
- ,height - MAP_PADDING_TOP - MAP_PADDING_BOTTOM);
-
updateMinorDirections();
}
@@ -285,16 +249,3 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
mMap->setScale(scale);
}
}
-
-void LLFloaterMap::setMinimized(BOOL b)
-{
- LLFloater::setMinimized(b);
- if(b)
- {
- setTitle(getString("mini_map_caption"));
- }
- else
- {
- setTitle("");
- }
-}
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index 5cf66a594b..8a1b965e62 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -45,18 +45,12 @@ public:
/*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void draw();
- /*virtual*/ void onFocusLost();
- /*virtual*/ void onFocusReceived();
- /*virtual*/ void setMinimized(BOOL b);
-
private:
void handleZoom(const LLSD& userdata);
void setDirectionPos( LLTextBox* text_box, F32 rotation );
void updateMinorDirections();
- void stretchMiniMap(S32 width,S32 height);
-
LLTextBox* mTextBoxEast;
LLTextBox* mTextBoxNorth;
LLTextBox* mTextBoxWest;
diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp
deleted file mode 100644
index 7a670dd90c..0000000000
--- a/indra/newview/llfloatermediabrowser.cpp
+++ /dev/null
@@ -1,462 +0,0 @@
-/**
- * @file llfloatermediabrowser.cpp
- * @brief media browser floater - uses embedded media browser control
- *
- * $LicenseInfo:firstyear=2006&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloatermediabrowser.h"
-
-#include "llfloaterreg.h"
-#include "llparcel.h"
-#include "llpluginclassmedia.h"
-#include "lluictrlfactory.h"
-#include "llmediactrl.h"
-#include "llviewerwindow.h"
-#include "llviewercontrol.h"
-#include "llviewerparcelmgr.h"
-#include "llweb.h"
-#include "llui.h"
-#include "roles_constants.h"
-
-#include "llurlhistory.h"
-#include "llmediactrl.h"
-#include "llviewermedia.h"
-#include "llviewerparcelmedia.h"
-#include "llcombobox.h"
-#include "llwindow.h"
-#include "lllayoutstack.h"
-#include "llcheckboxctrl.h"
-
-#include "llnotifications.h"
-
-// TEMP
-#include "llsdutil.h"
-
-LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& key)
- : LLFloater(key)
-{
-}
-
-//static
-void LLFloaterMediaBrowser::create(const std::string &url, const std::string& target, const std::string& uuid)
-{
- lldebugs << "url = " << url << ", target = " << target << ", uuid = " << uuid << llendl;
-
- std::string tag = target;
-
- if(target.empty() || target == "_blank")
- {
- if(!uuid.empty())
- {
- tag = uuid;
- }
- else
- {
- // create a unique tag for this instance
- LLUUID id;
- id.generate();
- tag = id.asString();
- }
- }
-
- S32 browser_window_limit = gSavedSettings.getS32("MediaBrowserWindowLimit");
-
- if(LLFloaterReg::findInstance("media_browser", tag) != NULL)
- {
- // There's already a media browser for this tag, so we won't be opening a new window.
- }
- else if(browser_window_limit != 0)
- {
- // showInstance will open a new window. Figure out how many media browsers are already open,
- // and close the least recently opened one if this will put us over the limit.
-
- LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList("media_browser");
- lldebugs << "total instance count is " << instances.size() << llendl;
-
- for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
- {
- lldebugs << " " << (*iter)->getKey() << llendl;
- }
-
- if(instances.size() >= (size_t)browser_window_limit)
- {
- // Destroy the least recently opened instance
- (*instances.begin())->closeFloater();
- }
- }
-
- LLFloaterMediaBrowser *browser = dynamic_cast<LLFloaterMediaBrowser*> (LLFloaterReg::showInstance("media_browser", tag));
- llassert(browser);
- if(browser)
- {
- browser->mUUID = uuid;
-
- // tell the browser instance to load the specified URL
- browser->openMedia(url, target);
- LLViewerMedia::proxyWindowOpened(target, uuid);
- }
-}
-
-//static
-void LLFloaterMediaBrowser::closeRequest(const std::string &uuid)
-{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("media_browser");
- lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
- {
- LLFloaterMediaBrowser* i = dynamic_cast<LLFloaterMediaBrowser*>(*iter);
- lldebugs << " " << i->mUUID << llendl;
- if (i && i->mUUID == uuid)
- {
- i->closeFloater(false);
- return;
- }
- }
-}
-
-//static
-void LLFloaterMediaBrowser::geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height)
-{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("media_browser");
- lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
- {
- LLFloaterMediaBrowser* i = dynamic_cast<LLFloaterMediaBrowser*>(*iter);
- lldebugs << " " << i->mUUID << llendl;
- if (i && i->mUUID == uuid)
- {
- i->geometryChanged(x, y, width, height);
- return;
- }
-}
-}
-
-void LLFloaterMediaBrowser::geometryChanged(S32 x, S32 y, S32 width, S32 height)
-{
- // Make sure the layout of the browser control is updated, so this calculation is correct.
- LLLayoutStack::updateClass();
-
- // TODO: need to adjust size and constrain position to make sure floaters aren't moved outside the window view, etc.
- LLCoordWindow window_size;
- getWindow()->getSize(&window_size);
-
- // Adjust width and height for the size of the chrome on the Media Browser window.
- width += getRect().getWidth() - mBrowser->getRect().getWidth();
- height += getRect().getHeight() - mBrowser->getRect().getHeight();
-
- LLRect geom;
- geom.setOriginAndSize(x, window_size.mY - (y + height), width, height);
-
- lldebugs << "geometry change: " << geom << llendl;
-
- handleReshape(geom,false);
-}
-
-
-void LLFloaterMediaBrowser::draw()
-{
- getChildView("go")->setEnabled(!mAddressCombo->getValue().asString().empty());
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if(parcel)
- {
- getChildView("parcel_owner_controls")->setVisible( LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA));
- getChildView("assign")->setEnabled(!mAddressCombo->getValue().asString().empty());
- }
- bool show_time_controls = false;
- bool media_playing = false;
- if(mBrowser)
- {
- LLPluginClassMedia* media_plugin = mBrowser->getMediaPlugin();
- if(media_plugin)
- {
- show_time_controls = media_plugin->pluginSupportsMediaTime();
- media_playing = media_plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING;
- }
- }
- getChildView("rewind")->setVisible( show_time_controls);
- getChildView("play")->setVisible( show_time_controls && ! media_playing);
- getChildView("pause")->setVisible( show_time_controls && media_playing);
- getChildView("stop")->setVisible( show_time_controls);
- getChildView("seek")->setVisible( show_time_controls);
-
- getChildView("play")->setEnabled(! media_playing);
- getChildView("stop")->setEnabled(media_playing);
-
- getChildView("back")->setEnabled(mBrowser->canNavigateBack());
- getChildView("forward")->setEnabled(mBrowser->canNavigateForward());
-
- LLFloater::draw();
-}
-
-BOOL LLFloaterMediaBrowser::postBuild()
-{
- mBrowser = getChild<LLMediaCtrl>("browser");
- mBrowser->addObserver(this);
-
- mAddressCombo = getChild<LLComboBox>("address");
- mAddressCombo->setCommitCallback(onEnterAddress, this);
- mAddressCombo->sortByName();
-
- childSetAction("back", onClickBack, this);
- childSetAction("forward", onClickForward, this);
- childSetAction("reload", onClickRefresh, this);
- childSetAction("rewind", onClickRewind, this);
- childSetAction("play", onClickPlay, this);
- childSetAction("stop", onClickStop, this);
- childSetAction("pause", onClickPlay, this);
- childSetAction("seek", onClickSeek, this);
- childSetAction("go", onClickGo, this);
- childSetAction("close", onClickClose, this);
- childSetAction("open_browser", onClickOpenWebBrowser, this);
- childSetAction("assign", onClickAssign, this);
-
- buildURLHistory();
-
- return TRUE;
-}
-
-void LLFloaterMediaBrowser::buildURLHistory()
-{
- LLCtrlListInterface* url_list = childGetListInterface("address");
- if (url_list)
- {
- url_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
- }
-
- // Get all of the entries in the "browser" collection
- LLSD browser_history = LLURLHistory::getURLHistory("browser");
-
- LLSD::array_iterator iter_history =
- browser_history.beginArray();
- LLSD::array_iterator end_history =
- browser_history.endArray();
- for(; iter_history != end_history; ++iter_history)
- {
- std::string url = (*iter_history).asString();
- if(! url.empty())
- url_list->addSimpleElement(url);
- }
-
- // initialize URL history in the plugin
- if(mBrowser && mBrowser->getMediaPlugin())
- {
- mBrowser->getMediaPlugin()->initializeUrlHistory(browser_history);
- }
-}
-
-std::string LLFloaterMediaBrowser::getSupportURL()
-{
- return getString("support_page_url");
-}
-
-//virtual
-void LLFloaterMediaBrowser::onClose(bool app_quitting)
-{
- LLViewerMedia::proxyWindowClosed(mUUID);
- //setVisible(FALSE);
- destroy();
-}
-
-void LLFloaterMediaBrowser::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
-{
- if(event == MEDIA_EVENT_LOCATION_CHANGED)
- {
- setCurrentURL(self->getLocation());
- }
- else if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
- {
- // This is the event these flags are sent with.
- getChildView("back")->setEnabled(self->getHistoryBackAvailable());
- getChildView("forward")->setEnabled(self->getHistoryForwardAvailable());
- }
- else if(event == MEDIA_EVENT_CLOSE_REQUEST)
- {
- // The browser instance wants its window closed.
- closeFloater();
- }
- else if(event == MEDIA_EVENT_GEOMETRY_CHANGE)
- {
- geometryChanged(self->getGeometryX(), self->getGeometryY(), self->getGeometryWidth(), self->getGeometryHeight());
- }
-}
-
-void LLFloaterMediaBrowser::setCurrentURL(const std::string& url)
-{
- mCurrentURL = url;
-
- mAddressCombo->remove(mCurrentURL);
- mAddressCombo->add(mCurrentURL);
- mAddressCombo->selectByValue(mCurrentURL);
-
- // Serialize url history
- LLURLHistory::removeURL("browser", mCurrentURL);
- LLURLHistory::addURL("browser", mCurrentURL);
-
- getChildView("back")->setEnabled(mBrowser->canNavigateBack());
- getChildView("forward")->setEnabled(mBrowser->canNavigateForward());
- getChildView("reload")->setEnabled(TRUE);
-}
-
-//static
-void LLFloaterMediaBrowser::onEnterAddress(LLUICtrl* ctrl, void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
- self->mBrowser->navigateTo(self->mAddressCombo->getValue().asString());
-}
-
-//static
-void LLFloaterMediaBrowser::onClickRefresh(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- if( self->mBrowser->getMediaPlugin() && self->mBrowser->getMediaPlugin()->pluginSupportsMediaBrowser())
- {
- bool ignore_cache = true;
- self->mBrowser->getMediaPlugin()->browse_reload( ignore_cache );
- }
- else
- {
- self->mBrowser->navigateTo(self->mCurrentURL);
- }
-}
-
-//static
-void LLFloaterMediaBrowser::onClickForward(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- self->mBrowser->navigateForward();
-}
-
-//static
-void LLFloaterMediaBrowser::onClickBack(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- self->mBrowser->navigateBack();
-}
-
-//static
-void LLFloaterMediaBrowser::onClickGo(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- self->mBrowser->navigateTo(self->mAddressCombo->getValue().asString());
-}
-
-//static
-void LLFloaterMediaBrowser::onClickClose(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- self->closeFloater();
-}
-
-//static
-void LLFloaterMediaBrowser::onClickOpenWebBrowser(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- std::string url = self->mCurrentURL.empty() ?
- self->mBrowser->getHomePageUrl() :
- self->mCurrentURL;
- LLWeb::loadURLExternal(url);
-}
-
-void LLFloaterMediaBrowser::onClickAssign(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (!parcel)
- {
- return;
- }
- std::string media_url = self->mAddressCombo->getValue().asString();
- LLStringUtil::trim(media_url);
-
- if(parcel->getMediaType() != "text/html")
- {
- parcel->setMediaURL(media_url);
- parcel->setMediaCurrentURL(media_url);
- parcel->setMediaType(std::string("text/html"));
- LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel, true );
- LLViewerParcelMedia::sendMediaNavigateMessage(media_url);
- LLViewerParcelMedia::stop();
- // LLViewerParcelMedia::update( parcel );
- }
- LLViewerParcelMedia::sendMediaNavigateMessage(media_url);
-}
-//static
-void LLFloaterMediaBrowser::onClickRewind(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- if(self->mBrowser->getMediaPlugin())
- self->mBrowser->getMediaPlugin()->start(-2.0f);
-}
-//static
-void LLFloaterMediaBrowser::onClickPlay(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- LLPluginClassMedia* plugin = self->mBrowser->getMediaPlugin();
- if(plugin)
- {
- if(plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING)
- {
- plugin->pause();
- }
- else
- {
- plugin->start();
- }
- }
-}
-//static
-void LLFloaterMediaBrowser::onClickStop(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- if(self->mBrowser->getMediaPlugin())
- self->mBrowser->getMediaPlugin()->stop();
-}
-//static
-void LLFloaterMediaBrowser::onClickSeek(void* user_data)
-{
- LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
-
- if(self->mBrowser->getMediaPlugin())
- self->mBrowser->getMediaPlugin()->start(2.0f);
-}
-void LLFloaterMediaBrowser::openMedia(const std::string& media_url, const std::string& target)
-{
- mBrowser->setHomePageUrl(media_url);
- mBrowser->setTarget(target);
- mBrowser->navigateTo(media_url);
- setCurrentURL(media_url);
-}
-
-
diff --git a/indra/newview/llfloatermediabrowser.h b/indra/newview/llfloatermediabrowser.h
deleted file mode 100644
index 152d221a01..0000000000
--- a/indra/newview/llfloatermediabrowser.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * @file llfloatermediabrowser.h
- * @brief media browser floater - uses embedded media browser control
- *
- * $LicenseInfo:firstyear=2006&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATERMEDIABROWSER_H
-#define LL_LLFLOATERMEDIABROWSER_H
-
-#include "llfloater.h"
-#include "llmediactrl.h"
-
-
-class LLComboBox;
-class LLMediaCtrl;
-class LLNotification;
-
-class LLFloaterMediaBrowser :
- public LLFloater,
- public LLViewerMediaObserver
-{
-public:
- LOG_CLASS(LLFloaterMediaBrowser);
- LLFloaterMediaBrowser(const LLSD& key);
-
- static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null);
-
- static void closeRequest(const std::string &uuid);
- static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
- void geometryChanged(S32 x, S32 y, S32 width, S32 height);
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onClose(bool app_quitting);
- /*virtual*/ void draw();
-
- // inherited from LLViewerMediaObserver
- /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
-
- void openMedia(const std::string& media_url, const std::string& target);
- void buildURLHistory();
- std::string getSupportURL();
- void setCurrentURL(const std::string& url);
-
- static void onEnterAddress(LLUICtrl* ctrl, void* user_data);
- static void onClickRefresh(void* user_data);
- static void onClickBack(void* user_data);
- static void onClickForward(void* user_data);
- static void onClickGo(void* user_data);
- static void onClickClose(void* user_data);
- static void onClickOpenWebBrowser(void* user_data);
- static void onClickAssign(void* user_data);
- static void onClickRewind(void* user_data);
- static void onClickPlay(void* user_data);
- static void onClickStop(void* user_data);
- static void onClickSeek(void* user_data);
-
-private:
- LLMediaCtrl* mBrowser;
- LLComboBox* mAddressCombo;
- std::string mCurrentURL;
- boost::shared_ptr<LLNotification> mCurNotification;
- std::string mUUID;
-};
-
-#endif // LL_LLFLOATERMEDIABROWSER_H
-
diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp
index 58931d112e..9edfe1e354 100644
--- a/indra/newview/llfloatermemleak.cpp
+++ b/indra/newview/llfloatermemleak.cpp
@@ -90,6 +90,11 @@ LLFloaterMemLeak::~LLFloaterMemLeak()
void LLFloaterMemLeak::release()
{
+ if(mLeakedMem.empty())
+ {
+ return ;
+ }
+
for(S32 i = 0 ; i < (S32)mLeakedMem.size() ; i++)
{
delete[] mLeakedMem[i] ;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index ab6753b4be..4d8d6d9a8c 100644..100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -26,6 +26,10 @@
#include "llviewerprecompiledheaders.h"
+#if LL_MSVC
+#pragma warning (disable : 4263)
+#pragma warning (disable : 4264)
+#endif
#include "dae.h"
//#include "dom.h"
#include "dom/domAsset.h"
@@ -47,6 +51,10 @@
#include "dom/domScale.h"
#include "dom/domTranslate.h"
#include "dom/domVisual_scene.h"
+#if LL_MSVC
+#pragma warning (default : 4263)
+#pragma warning (default : 4264)
+#endif
#include "llfloatermodelpreview.h"
@@ -71,6 +79,7 @@
#include "llmatrix4a.h"
#include "llmenubutton.h"
#include "llmeshrepository.h"
+#include "llnotificationsutil.h"
#include "llsdutil_math.h"
#include "lltextbox.h"
#include "lltoolmgr.h"
@@ -95,12 +104,19 @@
#include "llsliderctrl.h"
#include "llspinctrl.h"
#include "lltoggleablemenu.h"
+#include "lltrans.h"
#include "llvfile.h"
#include "llvfs.h"
#include "llcallbacklist.h"
#include "llviewerobjectlist.h"
#include "llanimationstates.h"
+#include "llviewernetwork.h"
+#include "llviewershadermgr.h"
#include "glod/glod.h"
+#include <boost/algorithm/string.hpp>
+
+
+const S32 SLM_SUPPORTED_VERSION = 3;
//static
S32 LLFloaterModelPreview::sUploadAmount = 10;
@@ -113,6 +129,19 @@ const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
const S32 PREVIEW_TEXTURE_HEIGHT = 300;
+// "Retain%" decomp parameter has values from 0.0 to 1.0 by 0.01
+// But according to the UI spec for upload model floater, this parameter
+// should be represented by Retain spinner with values from 1 to 100 by 1.
+// To achieve this, RETAIN_COEFFICIENT is used while creating spinner
+// and when value is requested from spinner.
+const double RETAIN_COEFFICIENT = 100;
+
+// "Cosine%" decomp parameter has values from 0.9 to 1 by 0.001
+// But according to the UI spec for upload model floater, this parameter
+// should be represented by Smooth combobox with only 10 values.
+// So this const is used as a size of Smooth combobox list.
+const S32 SMOOTH_VALUES_NUMBER = 10;
+
void drawBoxOutline(const LLVector3& pos, const LLVector3& size);
@@ -178,6 +207,13 @@ std::string lod_label_name[NUM_LOD+1] =
"I went off the end of the lod_label_name array. Me so smart."
};
+std::string colladaVersion[VERSIONTYPE_COUNT+1] =
+{
+ "1.4.0",
+ "1.4.1",
+ "Unsupported"
+};
+
#define LL_DEGENERACY_TOLERANCE 1e-7f
@@ -353,13 +389,16 @@ void LLMeshFilePicker::notify(const std::string& filename)
// LLFloaterModelPreview()
//-----------------------------------------------------------------------------
LLFloaterModelPreview::LLFloaterModelPreview(const LLSD& key) :
-LLFloater(key)
+LLFloaterModelUploadBase(key),
+mUploadBtn(NULL),
+mCalculateBtn(NULL)
{
sInstance = this;
mLastMouseX = 0;
mLastMouseY = 0;
mGLName = 0;
mStatusLock = new LLMutex(NULL);
+ mModelPreview = NULL;
mLODMode[LLModel::LOD_HIGH] = 0;
for (U32 i = 0; i < LLModel::LOD_HIGH; i++)
@@ -378,32 +417,35 @@ BOOL LLFloaterModelPreview::postBuild()
return FALSE;
}
- childSetAction("lod_browse", onBrowseLOD, this);
-
childSetCommitCallback("cancel_btn", onCancel, this);
childSetCommitCallback("crease_angle", onGenerateNormalsCommit, this);
- childSetCommitCallback("generate_normals", onGenerateNormalsCommit, this);
+ getChild<LLCheckBoxCtrl>("gen_normals")->setCommitCallback(boost::bind(&LLFloaterModelPreview::toggleGenarateNormals, this));
childSetCommitCallback("lod_generate", onAutoFillCommit, this);
- childSetCommitCallback("lod_mode", onLODParamCommit, this);
- childSetCommitCallback("lod_error_threshold", onLODParamCommit, this);
- childSetCommitCallback("lod_triangle_limit", onLODParamCommitTriangleLimit, this);
- childSetCommitCallback("build_operator", onLODParamCommit, this);
- childSetCommitCallback("queue_mode", onLODParamCommit, this);
- childSetCommitCallback("border_mode", onLODParamCommit, this);
- childSetCommitCallback("share_tolerance", onLODParamCommit, this);
+ for (S32 lod = 0; lod <= LLModel::LOD_HIGH; ++lod)
+ {
+ LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[lod]);
+ lod_source_combo->setCommitCallback(boost::bind(&LLFloaterModelPreview::onLoDSourceCommit, this, lod));
+ lod_source_combo->setCurrentByIndex(mLODMode[lod]);
+
+ getChild<LLButton>("lod_browse_" + lod_name[lod])->setCommitCallback(boost::bind(&LLFloaterModelPreview::onBrowseLOD, this, lod));
+ getChild<LLComboBox>("lod_mode_" + lod_name[lod])->setCommitCallback(boost::bind(&LLFloaterModelPreview::onLODParamCommit, this, lod, false));
+ getChild<LLSpinCtrl>("lod_error_threshold_" + lod_name[lod])->setCommitCallback(boost::bind(&LLFloaterModelPreview::onLODParamCommit, this, lod, false));
+ getChild<LLSpinCtrl>("lod_triangle_limit_" + lod_name[lod])->setCommitCallback(boost::bind(&LLFloaterModelPreview::onLODParamCommit, this, lod, true));
+ }
+
+ childSetCommitCallback("upload_skin", boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this), NULL);
+ childSetCommitCallback("upload_joints", boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this), NULL);
+ childSetCommitCallback("upload_textures", boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this), NULL);
childSetTextArg("status", "[STATUS]", getString("status_idle"));
- //childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount));
childSetAction("ok_btn", onUpload, this);
childDisable("ok_btn");
childSetAction("reset_btn", onReset, this);
- childSetAction("clear_materials", onClearMaterials, this);
-
childSetCommitCallback("preview_lod_combo", onPreviewLODCommit, this);
childSetCommitCallback("upload_skin", onUploadSkinCommit, this);
@@ -412,28 +454,14 @@ BOOL LLFloaterModelPreview::postBuild()
childSetCommitCallback("import_scale", onImportScaleCommit, this);
childSetCommitCallback("pelvis_offset", onPelvisOffsetCommit, this);
- childSetCommitCallback("lod_file_or_limit", refresh, this);
- childSetCommitCallback("physics_load_radio", onPhysicsLoadRadioCommit, this);
- //childSetCommitCallback("physics_optimize", refresh, this);
- //childSetCommitCallback("physics_use_hull", refresh, this);
+ getChild<LLCheckBoxCtrl>("show_edges")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
+ getChild<LLCheckBoxCtrl>("show_physics")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
+ getChild<LLCheckBoxCtrl>("show_textures")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
+ getChild<LLCheckBoxCtrl>("show_skin_weight")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
+ getChild<LLCheckBoxCtrl>("show_joint_positions")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
childDisable("upload_skin");
childDisable("upload_joints");
-
- childDisable("ok_btn");
-
- childSetCommitCallback("confirm_checkbox", refresh, this);
-
- mViewOptionMenuButton = getChild<LLMenuButton>("options_gear_btn");
-
- mCommitCallbackRegistrar.add("ModelImport.ViewOption.Action", boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _2));
- mEnableCallbackRegistrar.add("ModelImport.ViewOption.Check", boost::bind(&LLFloaterModelPreview::isViewOptionChecked, this, _2));
- mEnableCallbackRegistrar.add("ModelImport.ViewOption.Enabled", boost::bind(&LLFloaterModelPreview::isViewOptionEnabled, this, _2));
-
-
-
- mViewOptionMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_model_import_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- mViewOptionMenuButton->setMenu(mViewOptionMenu, LLMenuButton::MP_BOTTOM_LEFT);
initDecompControls();
@@ -441,9 +469,7 @@ BOOL LLFloaterModelPreview::postBuild()
mPreviewRect = preview_panel->getRect();
- mModelPreview = new LLModelPreview(512, 512, this );
- mModelPreview->setPreviewTarget(16.f);
- mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5));
+ initModelPreview();
//set callbacks for left click on line editor rows
for (U32 i = 0; i <= LLModel::LOD_HIGH; i++)
@@ -472,6 +498,30 @@ BOOL LLFloaterModelPreview::postBuild()
text->setMouseDownCallback(boost::bind(&LLModelPreview::setPreviewLOD, mModelPreview, i));
}
}
+ std::string current_grid = LLGridManager::getInstance()->getGridLabel();
+ std::transform(current_grid.begin(),current_grid.end(),current_grid.begin(),::tolower);
+ std::string validate_url;
+ if (current_grid == "agni")
+ {
+ validate_url = "http://secondlife.com/my/account/mesh.php";
+ }
+ else if (current_grid == "damballah")
+ {
+ // Staging grid has its own naming scheme.
+ validate_url = "http://secondlife-staging.com/my/account/mesh.php";
+ }
+ else
+ {
+ validate_url = llformat("http://secondlife.%s.lindenlab.com/my/account/mesh.php",current_grid.c_str());
+ }
+ getChild<LLTextBox>("warning_message")->setTextArg("[VURL]", validate_url);
+
+ mUploadBtn = getChild<LLButton>("ok_btn");
+ mCalculateBtn = getChild<LLButton>("calculate_btn");
+
+ mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
+
+ toggleCalculateButton(true);
return TRUE;
}
@@ -497,11 +547,24 @@ LLFloaterModelPreview::~LLFloaterModelPreview()
mStatusLock = NULL;
}
-void LLFloaterModelPreview::onViewOptionChecked(const LLSD& userdata)
+void LLFloaterModelPreview::initModelPreview()
+{
+ if (mModelPreview)
+ {
+ delete mModelPreview;
+ }
+
+ mModelPreview = new LLModelPreview(512, 512, this );
+ mModelPreview->setPreviewTarget(16.f);
+ mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5));
+ mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, _1));
+}
+
+void LLFloaterModelPreview::onViewOptionChecked(LLUICtrl* ctrl)
{
if (mModelPreview)
{
- mModelPreview->mViewOption[userdata.asString()] = !mModelPreview->mViewOption[userdata.asString()];
+ mModelPreview->mViewOption[ctrl->getName()] = !mModelPreview->mViewOption[ctrl->getName()];
mModelPreview->refresh();
}
@@ -519,12 +582,12 @@ bool LLFloaterModelPreview::isViewOptionChecked(const LLSD& userdata)
bool LLFloaterModelPreview::isViewOptionEnabled(const LLSD& userdata)
{
- return !mViewOptionDisabled[userdata.asString()];
+ return childIsEnabled(userdata.asString());
}
void LLFloaterModelPreview::setViewOptionEnabled(const std::string& option, bool enabled)
{
- mViewOptionDisabled[option] = !enabled;
+ childSetEnabled(option, enabled);
}
void LLFloaterModelPreview::enableViewOption(const std::string& option)
@@ -544,6 +607,30 @@ void LLFloaterModelPreview::loadModel(S32 lod)
(new LLMeshFilePicker(mModelPreview, lod))->getFile();
}
+void LLFloaterModelPreview::loadModel(S32 lod, const std::string& file_name, bool force_disable_slm)
+{
+ mModelPreview->mLoading = true;
+
+ mModelPreview->loadModel(file_name, lod, force_disable_slm);
+}
+
+void LLFloaterModelPreview::onClickCalculateBtn()
+{
+ mModelPreview->rebuildUploadData();
+
+ bool upload_skinweights = childGetValue("upload_skin").asBoolean();
+ bool upload_joint_positions = childGetValue("upload_joints").asBoolean();
+
+ mUploadModelUrl.clear();
+
+ gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
+ childGetValue("upload_textures").asBoolean(), upload_skinweights, upload_joint_positions, mUploadModelUrl, false,
+ getWholeModelFeeObserverHandle());
+
+ toggleCalculateButton(false);
+ mUploadBtn->setEnabled(false);
+}
+
//static
void LLFloaterModelPreview::onImportScaleCommit(LLUICtrl*,void* userdata)
{
@@ -554,7 +641,10 @@ void LLFloaterModelPreview::onImportScaleCommit(LLUICtrl*,void* userdata)
return;
}
- fp->mModelPreview->calcResourceCost();
+ fp->mModelPreview->mDirty = true;
+
+ fp->toggleCalculateButton(true);
+
fp->mModelPreview->refresh();
}
//static
@@ -566,31 +656,12 @@ void LLFloaterModelPreview::onPelvisOffsetCommit( LLUICtrl*, void* userdata )
{
return;
}
- fp->mModelPreview->calcResourceCost();
- fp->mModelPreview->refresh();
-}
-//static
-void LLFloaterModelPreview::onPhysicsLoadRadioCommit( LLUICtrl*, void *userdata)
-{
- LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
- if (fmp)
- {
- if (fmp->childGetValue("physics_use_lod").asBoolean())
- {
- onPhysicsUseLOD(NULL,NULL);
- }
- if (fmp->childGetValue("physics_load_from_file").asBoolean())
- {
-
- }
- LLModelPreview *model_preview = fmp->mModelPreview;
- if (model_preview)
- {
- model_preview->refresh();
- model_preview->updateStatusMessages();
- }
- }
+ fp->mModelPreview->mDirty = true;
+
+ fp->toggleCalculateButton(true);
+
+ fp->mModelPreview->refresh();
}
//static
@@ -615,8 +686,6 @@ void LLFloaterModelPreview::onUploadSkinCommit(LLUICtrl*,void* userdata)
{
return;
}
-
- fp->mModelPreview->calcResourceCost();
fp->mModelPreview->refresh();
fp->mModelPreview->resetPreviewTarget();
fp->mModelPreview->clearBuffers();
@@ -649,6 +718,12 @@ void LLFloaterModelPreview::onGenerateNormalsCommit(LLUICtrl* ctrl, void* userda
fp->mModelPreview->generateNormals();
}
+void LLFloaterModelPreview::toggleGenarateNormals()
+{
+ bool enabled = childGetValue("gen_normals").asBoolean();
+ childSetEnabled("crease_angle", enabled);
+}
+
//static
void LLFloaterModelPreview::onExplodeCommit(LLUICtrl* ctrl, void* userdata)
{
@@ -665,18 +740,9 @@ void LLFloaterModelPreview::onAutoFillCommit(LLUICtrl* ctrl, void* userdata)
fp->mModelPreview->genLODs();
}
-//static
-void LLFloaterModelPreview::onLODParamCommit(LLUICtrl* ctrl, void* userdata)
-{
- LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata;
- fp->mModelPreview->onLODParamCommit(false);
-}
-
-//static
-void LLFloaterModelPreview::onLODParamCommitTriangleLimit(LLUICtrl* ctrl, void* userdata)
+void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
{
- LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata;
- fp->mModelPreview->onLODParamCommit(true);
+ mModelPreview->onLODParamCommit(lod, enforce_tri_limit);
}
@@ -692,6 +758,11 @@ void LLFloaterModelPreview::draw()
if (!mModelPreview->mLoading)
{
+ if ( mModelPreview->getLoadState() == LLModelLoader::ERROR_MATERIALS )
+ {
+ childSetTextArg("status", "[STATUS]", getString("status_material_mismatch"));
+ }
+ else
if ( mModelPreview->getLoadState() > LLModelLoader::ERROR_PARSING )
{
childSetTextArg("status", "[STATUS]", getString(LLModel::getStatusString(mModelPreview->getLoadState() - LLModelLoader::ERROR_PARSING)));
@@ -700,6 +771,7 @@ void LLFloaterModelPreview::draw()
if ( mModelPreview->getLoadState() == LLModelLoader::ERROR_PARSING )
{
childSetTextArg("status", "[STATUS]", getString("status_parse_error"));
+ toggleCalculateButton(false);
}
else
{
@@ -710,28 +782,6 @@ void LLFloaterModelPreview::draw()
childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost));
childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size()));
- if (!mCurRequest.empty())
- {
- LLMutexLock lock(mStatusLock);
- childSetTextArg("status", "[STATUS]", mStatusMessage);
- }
- else
- {
- childSetVisible("Simplify", true);
- childSetVisible("simplify_cancel", false);
- childSetVisible("Decompose", true);
- childSetVisible("decompose_cancel", false);
- }
-
- U32 resource_cost = mModelPreview->mResourceCost*10;
-
- if (childGetValue("upload_textures").asBoolean())
- {
- resource_cost += mModelPreview->mTextureSet.size()*10;
- }
-
- childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d", resource_cost));
-
if (mModelPreview)
{
gGL.color3f(1.f, 1.f, 1.f);
@@ -864,6 +914,12 @@ BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
return TRUE;
}
+/*virtual*/
+void LLFloaterModelPreview::onOpen(const LLSD& key)
+{
+ requestAgentUploadPermissions();
+}
+
//static
void LLFloaterModelPreview::onPhysicsParamCommit(LLUICtrl* ctrl, void* data)
{
@@ -877,20 +933,32 @@ void LLFloaterModelPreview::onPhysicsParamCommit(LLUICtrl* ctrl, void* data)
{
LLCDParam* param = (LLCDParam*) data;
std::string name(param->mName);
- sInstance->mDecompParams[name] = ctrl->getValue();
+
+ LLSD value = ctrl->getValue();
+
+ if("Retain%" == name)
+ {
+ value = ctrl->getValue().asReal() / RETAIN_COEFFICIENT;
+ }
+
+ sInstance->mDecompParams[name] = value;
if (name == "Simplify Method")
{
- if (ctrl->getValue().asInteger() == 0)
- {
- sInstance->childSetVisible("Retain%", true);
- sInstance->childSetVisible("Detail Scale", false);
- }
- else
+ bool show_retain = false;
+ bool show_detail = true;
+
+ if (ctrl->getValue().asInteger() == 0)
{
- sInstance->childSetVisible("Retain%", false);
- sInstance->childSetVisible("Detail Scale", true);
+ show_retain = true;
+ show_detail = false;
}
+
+ sInstance->childSetVisible("Retain%", show_retain);
+ sInstance->childSetVisible("Retain%_label", show_retain);
+
+ sInstance->childSetVisible("Detail Scale", show_detail);
+ sInstance->childSetVisible("Detail Scale label", show_detail);
}
}
}
@@ -925,12 +993,14 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data)
sInstance->setStatusMessage(sInstance->getString("decomposing"));
sInstance->childSetVisible("Decompose", false);
sInstance->childSetVisible("decompose_cancel", true);
+ sInstance->childDisable("Simplify");
}
else if (stage == "Simplify")
{
sInstance->setStatusMessage(sInstance->getString("simplifying"));
sInstance->childSetVisible("Simplify", false);
sInstance->childSetVisible("simplify_cancel", true);
+ sInstance->childDisable("Decompose");
}
}
}
@@ -944,14 +1014,38 @@ void LLFloaterModelPreview::onPhysicsBrowse(LLUICtrl* ctrl, void* userdata)
//static
void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata)
{
+ S32 num_modes = 4;
S32 which_mode = 3;
+ static S32 previous_mode = which_mode;
+
LLCtrlSelectionInterface* iface = sInstance->childGetSelectionInterface("physics_lod_combo");
if (iface)
{
which_mode = iface->getFirstSelectedIndex();
}
- sInstance->mModelPreview->setPhysicsFromLOD(which_mode);
+ S32 file_mode = iface->getItemCount() - 1;
+ bool file_browse = which_mode == file_mode;
+ bool lod_to_file = file_browse && (previous_mode != file_mode);
+ bool file_to_lod = !file_browse && (previous_mode == file_mode);
+
+ if (!lod_to_file)
+ {
+ which_mode = num_modes - which_mode;
+ sInstance->mModelPreview->setPhysicsFromLOD(which_mode);
+ }
+
+ if (lod_to_file || file_to_lod)
+ {
+ LLModelPreview *model_preview = sInstance->mModelPreview;
+ if (model_preview)
+ {
+ model_preview->refresh();
+ model_preview->updateStatusMessages();
+ }
+ }
+
+ previous_mode = which_mode;
}
//static
@@ -976,6 +1070,11 @@ void LLFloaterModelPreview::onPhysicsStageCancel(LLUICtrl* ctrl, void*data)
}
sInstance->mCurRequest.clear();
+
+ if (sInstance->mModelPreview)
+ {
+ sInstance->mModelPreview->updateStatusMessages();
+ }
}
}
@@ -1038,8 +1137,9 @@ void LLFloaterModelPreview::initDecompControls()
mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mFloat);
//llinfos << "Type: float, Default: " << param[i].mDefault.mFloat << llendl;
- LLSliderCtrl* slider = getChild<LLSliderCtrl>(name);
- if (slider)
+
+ LLUICtrl* ctrl = getChild<LLUICtrl>(name);
+ if (LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl))
{
slider->setMinValue(param[i].mDetails.mRange.mLow.mFloat);
slider->setMaxValue(param[i].mDetails.mRange.mHigh.mFloat);
@@ -1047,14 +1147,49 @@ void LLFloaterModelPreview::initDecompControls()
slider->setValue(param[i].mDefault.mFloat);
slider->setCommitCallback(onPhysicsParamCommit, (void*) &param[i]);
}
+ else if (LLSpinCtrl* spinner = dynamic_cast<LLSpinCtrl*>(ctrl))
+ {
+ bool is_retain_ctrl = "Retain%" == name;
+ double coefficient = is_retain_ctrl ? RETAIN_COEFFICIENT : 1.f;
+
+ spinner->setMinValue(param[i].mDetails.mRange.mLow.mFloat * coefficient);
+ spinner->setMaxValue(param[i].mDetails.mRange.mHigh.mFloat * coefficient);
+ spinner->setIncrement(param[i].mDetails.mRange.mDelta.mFloat * coefficient);
+ spinner->setValue(param[i].mDefault.mFloat * coefficient);
+ spinner->setCommitCallback(onPhysicsParamCommit, (void*) &param[i]);
+ }
+ else if (LLComboBox* combo_box = dynamic_cast<LLComboBox*>(ctrl))
+ {
+ float min = param[i].mDetails.mRange.mLow.mFloat;
+ float max = param[i].mDetails.mRange.mHigh.mFloat;
+ float delta = param[i].mDetails.mRange.mDelta.mFloat;
+
+ if ("Cosine%" == name)
+ {
+ createSmoothComboBox(combo_box, min, max);
+ }
+ else
+ {
+ for(float value = min; value <= max; value += delta)
+ {
+ std::string label = llformat("%.1f", value);
+ combo_box->add(label, value, ADD_BOTTOM, true);
+ }
+ combo_box->setValue(param[i].mDefault.mFloat);
+
+ }
+
+ combo_box->setCommitCallback(onPhysicsParamCommit, (void*) &param[i]);
+ }
}
else if (param[i].mType == LLCDParam::LLCD_INTEGER)
{
mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mIntOrEnumValue);
//llinfos << "Type: integer, Default: " << param[i].mDefault.mIntOrEnumValue << llendl;
- LLSliderCtrl* slider = getChild<LLSliderCtrl>(name);
- if (slider)
+
+ LLUICtrl* ctrl = getChild<LLUICtrl>(name);
+ if (LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl))
{
slider->setMinValue(param[i].mDetails.mRange.mLow.mIntOrEnumValue);
slider->setMaxValue(param[i].mDetails.mRange.mHigh.mIntOrEnumValue);
@@ -1062,6 +1197,16 @@ void LLFloaterModelPreview::initDecompControls()
slider->setValue(param[i].mDefault.mIntOrEnumValue);
slider->setCommitCallback(onPhysicsParamCommit, (void*) &param[i]);
}
+ else if (LLComboBox* combo_box = dynamic_cast<LLComboBox*>(ctrl))
+ {
+ for(int k = param[i].mDetails.mRange.mLow.mIntOrEnumValue; k<=param[i].mDetails.mRange.mHigh.mIntOrEnumValue; k+=param[i].mDetails.mRange.mDelta.mIntOrEnumValue)
+ {
+ std::string name = llformat("%.1d", k);
+ combo_box->add(name, k, ADD_BOTTOM, true);
+ }
+ combo_box->setValue(param[i].mDefault.mIntOrEnumValue);
+ combo_box->setCommitCallback(onPhysicsParamCommit, (void*) &param[i]);
+ }
}
else if (param[i].mType == LLCDParam::LLCD_BOOLEAN)
{
@@ -1089,7 +1234,11 @@ void LLFloaterModelPreview::initDecompControls()
//llinfos << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue
// << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << llendl;
- combo_box->add(param[i].mDetails.mEnumValues.mEnumsArray[k].mName,
+ std::string name(param[i].mDetails.mEnumValues.mEnumsArray[k].mName);
+ std::string localized_name;
+ bool is_localized = LLTrans::findString(localized_name, name);
+
+ combo_box->add(is_localized ? localized_name : name,
LLSD::Integer(param[i].mDetails.mEnumValues.mEnumsArray[k].mValue));
}
combo_box->setValue(param[i].mDefault.mIntOrEnumValue);
@@ -1105,6 +1254,22 @@ void LLFloaterModelPreview::initDecompControls()
childSetCommitCallback("physics_explode", LLFloaterModelPreview::onExplodeCommit, this);
}
+void LLFloaterModelPreview::createSmoothComboBox(LLComboBox* combo_box, float min, float max)
+{
+ float delta = (max - min) / SMOOTH_VALUES_NUMBER;
+ int ilabel = 0;
+
+ combo_box->add("0 (none)", ADD_BOTTOM, true);
+
+ for(float value = min + delta; value < max; value += delta)
+ {
+ std::string label = (++ilabel == SMOOTH_VALUES_NUMBER) ? "10 (max)" : llformat("%.1d", ilabel);
+ combo_box->add(label, value, ADD_BOTTOM, true);
+ }
+
+
+}
+
//-----------------------------------------------------------------------------
// onMouseCaptureLost()
//-----------------------------------------------------------------------------
@@ -1329,9 +1494,26 @@ bool LLModelLoader::doLoadModel()
if (!dom)
{
+ llinfos<<" Error with dae - traditionally indicates a corrupt file."<<llendl;
+ setLoadState( ERROR_PARSING );
return false;
}
-
+ //Dom version
+ daeString domVersion = dae.getDomVersion();
+ std::string sldom(domVersion);
+ llinfos<<"Collada Importer Version: "<<sldom<<llendl;
+ //Dae version
+ domVersionType docVersion = dom->getVersion();
+ //0=1.4
+ //1=1.4.1
+ //2=Currently unsupported, however may work
+ if (docVersion > 1 )
+ {
+ docVersion = VERSIONTYPE_COUNT;
+ }
+ llinfos<<"Dae version "<<colladaVersion[docVersion]<<llendl;
+
+
daeDatabase* db = dae.getDatabase();
daeInt count = db->getElementCount(NULL, COLLADA_TYPE_MESH);
@@ -1480,8 +1662,7 @@ bool LLModelLoader::doLoadModel()
LLMatrix4 trans = normalized_transformation;
trans *= skin_info.mBindShapeMatrix;
- skin_info.mBindShapeMatrix = trans;
-
+ skin_info.mBindShapeMatrix = trans;
}
@@ -1554,7 +1735,7 @@ bool LLModelLoader::doLoadModel()
{
//Build a joint for the resolver to work with
char str[64]={0};
- sprintf(str,"./%s",(*jointIt).second.c_str() );
+ sprintf(str,"./%s",(*jointIt).first.c_str() );
//llwarns<<"Joint "<< str <<llendl;
//Setup the resolver
@@ -1565,15 +1746,22 @@ bool LLModelLoader::doLoadModel()
if ( pJoint )
{
//Pull out the translate id and store it in the jointTranslations map
- daeSIDResolver jointResolver( pJoint, "./translate" );
- domTranslate* pTranslate = daeSafeCast<domTranslate>( jointResolver.getElement() );
+ daeSIDResolver jointResolverA( pJoint, "./translate" );
+ domTranslate* pTranslateA = daeSafeCast<domTranslate>( jointResolverA.getElement() );
+ daeSIDResolver jointResolverB( pJoint, "./location" );
+ domTranslate* pTranslateB = daeSafeCast<domTranslate>( jointResolverB.getElement() );
LLMatrix4 workingTransform;
//Translation via SID
- if ( pTranslate )
+ if ( pTranslateA )
+ {
+ extractTranslation( pTranslateA, workingTransform );
+ }
+ else
+ if ( pTranslateB )
{
- extractTranslation( pTranslate, workingTransform );
+ extractTranslation( pTranslateB, workingTransform );
}
else
{
@@ -1585,9 +1773,15 @@ bool LLModelLoader::doLoadModel()
missingSkeletonOrScene = true;
}
else
+ if ( pTranslateElement )
{
extractTranslationViaElement( pTranslateElement, workingTransform );
}
+ else
+ {
+ extractTranslationViaSID( pJoint, workingTransform );
+ }
+
}
//Store the joint transform w/respect to it's name.
@@ -1684,7 +1878,7 @@ bool LLModelLoader::doLoadModel()
}
}
- model->mSkinInfo.mInvBindMatrix.push_back(mat);
+ model->mSkinInfo.mInvBindMatrix.push_back(mat);
}
}
}
@@ -1692,7 +1886,7 @@ bool LLModelLoader::doLoadModel()
}
//Now that we've parsed the joint array, let's determine if we have a full rig
- //(which means we have all the joints that are required for an avatar versus
+ //(which means we have all the joint sthat are required for an avatar versus
//a skinned asset attached to a node in a file that contains an entire skeleton,
//but does not use the skeleton).
buildJointToNodeMappingFromScene( root );
@@ -1883,8 +2077,11 @@ bool LLModelLoader::doLoadModel()
mesh_scale *= transformation;
transformation = mesh_scale;
- std::vector<LLImportMaterial> materials;
- materials.resize(model->getNumVolumeFaces());
+ std::map<std::string, LLImportMaterial> materials;
+ for (U32 i = 0; i < model->mMaterialList.size(); ++i)
+ {
+ materials[model->mMaterialList[i]] = LLImportMaterial();
+ }
mScene[transformation].push_back(LLModelInstance(model, model->mLabel, transformation, materials));
stretch_extents(model, transformation, mExtents[0], mExtents[1], mFirstTransform);
}
@@ -1946,6 +2143,11 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
//build model list for each LoD
model_list model[LLModel::NUM_LODS];
+ if (data["version"].asInteger() != SLM_SUPPORTED_VERSION)
+ { //unsupported version
+ return false;
+ }
+
LLSD& mesh = data["mesh"];
LLVolumeParams volume_params;
@@ -1968,10 +2170,6 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
mPreview->critiqueRigForUploadApplicability( loaded_model->mSkinInfo.mJointNames );
}
}
- else
- {
- llassert(model[lod].empty());
- }
}
}
@@ -1980,6 +2178,14 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
return false;
}
+ // Set name.
+ std::string name = data["name"];
+ if (!name.empty())
+ {
+ model[LLModel::LOD_HIGH][0]->mLabel = name;
+ }
+
+
//load instance list
model_instance_list instance_list;
@@ -2092,15 +2298,37 @@ void LLModelLoader::processJointToNodeMapping( domNode* pNode )
mJointsFromNode.push_front( pNode->getName() );
}
//2. Handle the kiddo's
- daeTArray< daeSmartRef<daeElement> > childOfChild = pNode->getChildren();
- S32 childOfChildCount = childOfChild.getCount();
- for (S32 i = 0; i < childOfChildCount; ++i)
+ processChildJoints( pNode );
+ }
+ else
+ {
+ //Determine if the're any children wrt to this failed node.
+ //This occurs when an armature is exported and ends up being what essentially amounts to
+ //as the root for the visual_scene
+ if ( pNode )
{
- domNode* pChildNode = daeSafeCast<domNode>( childOfChild[i] );
- if ( pChildNode )
- {
- processJointToNodeMapping( pChildNode );
- }
+ processChildJoints( pNode );
+ }
+ else
+ {
+ llinfos<<"Node is NULL"<<llendl;
+ }
+
+ }
+}
+//-----------------------------------------------------------------------------
+// processChildJoint()
+//-----------------------------------------------------------------------------
+void LLModelLoader::processChildJoints( domNode* pParentNode )
+{
+ daeTArray< daeSmartRef<daeElement> > childOfChild = pParentNode->getChildren();
+ S32 childOfChildCount = childOfChild.getCount();
+ for (S32 i = 0; i < childOfChildCount; ++i)
+ {
+ domNode* pChildNode = daeSafeCast<domNode>( childOfChild[i] );
+ if ( pChildNode )
+ {
+ processJointToNodeMapping( pChildNode );
}
}
}
@@ -2125,15 +2353,11 @@ void LLModelPreview::critiqueRigForUploadApplicability( const std::vector<std::s
setRigValidForJointPositionUpload( true );
}
- if ( isRigLegacyOK )
- {
+ if ( isRigLegacyOK)
+ {
setLegacyRigValid( true );
}
- if ( getRigWithSceneParity() && isJointPositionUploadOK )
- {
- setResetJointFlag( true );
- }
}
//-----------------------------------------------------------------------------
// critiqueJointToNodeMappingFromScene()
@@ -2173,12 +2397,7 @@ void LLModelPreview::critiqueJointToNodeMappingFromScene( void )
//2. Partial rig but w/o parity between the scene and joint array
if ( result )
{
- setResetJointFlag( true );
setRigWithSceneParity( true );
- }
- else
- {
- setResetJointFlag( false );
}
}
//-----------------------------------------------------------------------------
@@ -2267,14 +2486,17 @@ void LLModelLoader::loadTextures()
{
for(U32 i = 0 ; i < iter->second.size(); i++)
{
- for(U32 j = 0 ; j < iter->second[i].mMaterial.size() ; j++)
+ for(std::map<std::string, LLImportMaterial>::iterator j = iter->second[i].mMaterial.begin();
+ j != iter->second[i].mMaterial.end(); ++j)
{
- if(!iter->second[i].mMaterial[j].mDiffuseMapFilename.empty())
+ LLImportMaterial& material = j->second;
+
+ if(!material.mDiffuseMapFilename.empty())
{
- iter->second[i].mMaterial[j].mDiffuseMap =
- LLViewerTextureManager::getFetchedTextureFromUrl("file://" + iter->second[i].mMaterial[j].mDiffuseMapFilename, TRUE, LLViewerTexture::BOOST_PREVIEW);
- iter->second[i].mMaterial[j].mDiffuseMap->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, mPreview, NULL, FALSE);
- iter->second[i].mMaterial[j].mDiffuseMap->forceToSaveRawImage(0, F32_MAX);
+ material.mDiffuseMap =
+ LLViewerTextureManager::getFetchedTextureFromUrl("file://" + material.mDiffuseMapFilename, TRUE, LLViewerTexture::BOOST_PREVIEW);
+ material.mDiffuseMap->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, mPreview, NULL, FALSE);
+ material.mDiffuseMap->forceToSaveRawImage(0, F32_MAX);
mNumOfFetchingTextures++ ;
}
}
@@ -2292,8 +2514,20 @@ void LLModelLoader::loadTextures()
//-----------------------------------------------------------------------------
bool LLModelLoader::isNodeAJoint( domNode* pNode )
{
- if ( !pNode || pNode->getName() == NULL)
+ if ( !pNode )
{
+ llinfos<<"Created node is NULL"<<llendl;
+ return false;
+ }
+
+ if ( pNode->getName() == NULL )
+ {
+ llinfos<<"Parsed node has no name "<<llendl;
+ //Attempt to write the node id, if possible (aids in debugging the visual scene)
+ if ( pNode->getId() )
+ {
+ llinfos<<"Parsed node ID: "<<pNode->getId()<<llendl;
+ }
return false;
}
@@ -2403,10 +2637,43 @@ void LLModelLoader::extractTranslation( domTranslate* pTranslate, LLMatrix4& tra
//-----------------------------------------------------------------------------
void LLModelLoader::extractTranslationViaElement( daeElement* pTranslateElement, LLMatrix4& transform )
{
- domTranslate* pTranslateChild = dynamic_cast<domTranslate*>( pTranslateElement );
- domFloat3 translateChild = pTranslateChild->getValue();
- LLVector3 singleJointTranslation( translateChild[0], translateChild[1], translateChild[2] );
- transform.setTranslation( singleJointTranslation );
+ if ( pTranslateElement )
+ {
+ domTranslate* pTranslateChild = dynamic_cast<domTranslate*>( pTranslateElement );
+ domFloat3 translateChild = pTranslateChild->getValue();
+ LLVector3 singleJointTranslation( translateChild[0], translateChild[1], translateChild[2] );
+ transform.setTranslation( singleJointTranslation );
+ }
+}
+//-----------------------------------------------------------------------------
+// extractTranslationViaSID()
+//-----------------------------------------------------------------------------
+void LLModelLoader::extractTranslationViaSID( daeElement* pElement, LLMatrix4& transform )
+{
+ if ( pElement )
+ {
+ daeSIDResolver resolver( pElement, "./transform" );
+ domMatrix* pMatrix = daeSafeCast<domMatrix>( resolver.getElement() );
+ //We are only extracting out the translational component atm
+ LLMatrix4 workingTransform;
+ if ( pMatrix )
+ {
+ domFloat4x4 domArray = pMatrix->getValue();
+ for ( int i = 0; i < 4; i++ )
+ {
+ for( int j = 0; j < 4; j++ )
+ {
+ workingTransform.mMatrix[i][j] = domArray[i + j*4];
+ }
+ }
+ LLVector3 trans = workingTransform.getTranslation();
+ transform.setTranslation( trans );
+ }
+ }
+ else
+ {
+ llwarns<<"Element is nonexistent - empty/unsupported node."<<llendl;
+ }
}
//-----------------------------------------------------------------------------
// processJointNode()
@@ -2426,13 +2693,20 @@ void LLModelLoader::processJointNode( domNode* pNode, JointTransformMap& jointTr
LLMatrix4 workingTransform;
//Pull out the translate id and store it in the jointTranslations map
- daeSIDResolver jointResolver( pNode, "./translate" );
- domTranslate* pTranslate = daeSafeCast<domTranslate>( jointResolver.getElement() );
+ daeSIDResolver jointResolverA( pNode, "./translate" );
+ domTranslate* pTranslateA = daeSafeCast<domTranslate>( jointResolverA.getElement() );
+ daeSIDResolver jointResolverB( pNode, "./location" );
+ domTranslate* pTranslateB = daeSafeCast<domTranslate>( jointResolverB.getElement() );
//Translation via SID was successful
- if ( pTranslate )
+ if ( pTranslateA )
+ {
+ extractTranslation( pTranslateA, workingTransform );
+ }
+ else
+ if ( pTranslateB )
{
- extractTranslation( pTranslate, workingTransform );
+ extractTranslation( pTranslateB, workingTransform );
}
else
{
@@ -2574,7 +2848,13 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement )
{
LLMatrix4 transformation = mTransform;
- std::vector<LLImportMaterial> materials = getMaterials(model, instance_geo);
+ if (mTransform.determinant() < 0)
+ { //negative scales are not supported
+ llinfos << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << llendl;
+ badElement = true;
+ }
+
+ std::map<std::string, LLImportMaterial> materials = getMaterials(model, instance_geo);
// adjust the transformation to compensate for mesh normalization
LLVector3 mesh_scale_vector;
@@ -2618,7 +2898,8 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement )
//process children
daeTArray< daeSmartRef<daeElement> > children = element->getChildren();
- for (S32 i = 0; i < children.getCount(); i++)
+ int childCount = children.getCount();
+ for (S32 i = 0; i < childCount; i++)
{
processElement(children[i],badElement);
}
@@ -2630,9 +2911,9 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement )
}
}
-std::vector<LLImportMaterial> LLModelLoader::getMaterials(LLModel* model, domInstance_geometry* instance_geo)
+std::map<std::string, LLImportMaterial> LLModelLoader::getMaterials(LLModel* model, domInstance_geometry* instance_geo)
{
- std::vector<LLImportMaterial> materials;
+ std::map<std::string, LLImportMaterial> materials;
for (int i = 0; i < model->mMaterialList.size(); i++)
{
LLImportMaterial import_material;
@@ -2679,7 +2960,8 @@ std::vector<LLImportMaterial> LLModelLoader::getMaterials(LLModel* model, domIns
}
}
- materials.push_back(import_material);
+ import_material.mBinding = model->mMaterialList[i];
+ materials[model->mMaterialList[i]] = import_material;
}
return materials;
@@ -2917,15 +3199,6 @@ U32 LLModelPreview::calcResourceCost()
rebuildUploadData();
- if (mFMP && mModelLoader)
- {
- const BOOL confirmed_checkbox = mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->getValue().asBoolean();
- if ( getLoadState() < LLModelLoader::ERROR_PARSING && confirmed_checkbox )
- {
- mFMP->childEnable("ok_btn");
- }
- }
-
//Upload skin is selected BUT check to see if the joints coming in from the asset were malformed.
if ( mFMP && mFMP->childGetValue("upload_skin").asBoolean() )
{
@@ -2933,16 +3206,9 @@ U32 LLModelPreview::calcResourceCost()
if ( uploadingJointPositions && !isRigValidForJointPositionUpload() )
{
mFMP->childDisable("ok_btn");
- }
- else
- if ( !isLegacyRigValid() )
- {
- mFMP->childDisable("ok_btn");
- }
- //ok_btn should not have been changed unless something was wrong with joint list
+ }
}
- U32 cost = 0;
std::set<LLModel*> accounted;
U32 num_points = 0;
U32 num_hulls = 0;
@@ -2990,8 +3256,7 @@ U32 LLModelPreview::calcResourceCost()
mFMP->childGetValue("upload_skin").asBoolean(),
mFMP->childGetValue("upload_joints").asBoolean(),
TRUE);
- cost += gMeshRepo.calcResourceCost(ret);
-
+
num_hulls += decomp.mHull.size();
for (U32 i = 0; i < decomp.mHull.size(); ++i)
{
@@ -3011,7 +3276,7 @@ U32 LLModelPreview::calcResourceCost()
F32 z_length = z_transformed.normalize();
LLVector3 scale = LLVector3(x_length, y_length, z_length);
- F32 radius = scale.length()*debug_scale;
+ F32 radius = scale.length()*0.5f*debug_scale;
streaming_cost += LLMeshRepository::getStreamingCost(ret, radius);
}
@@ -3023,16 +3288,15 @@ U32 LLModelPreview::calcResourceCost()
updateStatusMessages();
- return cost;
+ return (U32) streaming_cost;
}
void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost)
{
+ assert_main_thread();
childSetTextArg("import_dimensions", "[X]", llformat("%.3f", x));
childSetTextArg("import_dimensions", "[Y]", llformat("%.3f", y));
childSetTextArg("import_dimensions", "[Z]", llformat("%.3f", z));
- childSetTextArg("streaming cost", "[COST]", llformat("%.3f", streaming_cost));
- childSetTextArg("physics cost", "[COST]", llformat("%.3f", physics_cost));
}
@@ -3047,14 +3311,10 @@ void LLModelPreview::rebuildUploadData()
std::string requested_name = mFMP->getChild<LLUICtrl>("description_form")->getValue().asString();
+ std::string metric = mFMP->getChild<LLUICtrl>("model_category_combo")->getValue().asString();
LLSpinCtrl* scale_spinner = mFMP->getChild<LLSpinCtrl>("import_scale");
- if (!scale_spinner)
- {
- llerrs << "floater_model_preview.xml MUST contain import_scale spinner." << llendl;
- }
-
F32 scale = scale_spinner->getValue().asReal();
LLMatrix4 scale_mat;
@@ -3062,10 +3322,24 @@ void LLModelPreview::rebuildUploadData()
F32 max_scale = 0.f;
- const BOOL confirmed_checkbox = mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->getValue().asBoolean();
- if ( mBaseScene.size() > 0 && confirmed_checkbox )
+ //reorder materials to match mBaseModel
+ for (U32 i = 0; i < LLModel::NUM_LODS-1; i++)
{
- mFMP->childEnable("ok_btn");
+ if (mBaseModel.size() == mModel[i].size())
+ {
+ for (U32 j = 0; j < mBaseModel.size(); ++j)
+ {
+
+ int refFaceCnt = 0;
+ int modelFaceCnt = 0;
+
+ if ( !mModel[i][j]->matchMaterialOrder(mBaseModel[j], refFaceCnt, modelFaceCnt ) )
+ {
+ setLoadState( LLModelLoader::ERROR_MATERIALS );
+ mFMP->childDisable( "calculate_btn" );
+ }
+ }
+ }
}
for (LLModelLoader::scene::iterator iter = mBaseScene.begin(); iter != mBaseScene.end(); ++iter)
@@ -3096,6 +3370,7 @@ void LLModelPreview::rebuildUploadData()
if (base_model)
{
base_model->mRequestedLabel = requested_name;
+ base_model->mMetric = metric;
}
S32 idx = 0;
@@ -3107,24 +3382,33 @@ void LLModelPreview::rebuildUploadData()
}
}
- for (U32 i = 0; i < LLModel::NUM_LODS; i++)
- { //fill LOD slots based on reference model index
- if (!mModel[i].empty())
- {
- instance.mLOD[i] = mModel[i][idx];
- }
- else
- {
- instance.mLOD[i] = NULL;
+ if(idx < mBaseModel.size())
+ {
+ for (U32 i = 0; i < LLModel::NUM_LODS; i++)
+ { //fill LOD slots based on reference model index
+ if (mModel[i].size() > idx)
+ {
+ instance.mLOD[i] = mModel[i][idx];
+ }
+ else
+ {
+ instance.mLOD[i] = NULL;
+ }
}
}
-
instance.mTransform = mat;
mUploadData.push_back(instance);
}
}
- F32 max_import_scale = DEFAULT_MAX_PRIM_SCALE/max_scale;
+ F32 max_import_scale = (DEFAULT_MAX_PRIM_SCALE-0.1f)/max_scale;
+
+ F32 max_axis = llmax(mPreviewScale.mV[0], mPreviewScale.mV[1]);
+ max_axis = llmax(max_axis, mPreviewScale.mV[2]);
+ max_axis *= 2.f;
+
+ //clamp scale so that total imported model bounding box is smaller than 240m on a side
+ max_import_scale = llmin(max_import_scale, 240.f/max_axis);
scale_spinner->setMaxValue(max_import_scale);
@@ -3164,6 +3448,12 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw
LLSD data;
+ data["version"] = SLM_SUPPORTED_VERSION;
+ if (!mBaseModel.empty())
+ {
+ data["name"] = mBaseModel[0]->getName();
+ }
+
S32 mesh_id = 0;
//build list of unique models and initialize local id
@@ -3190,7 +3480,7 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw
instance.mLOD[LLModel::LOD_LOW],
instance.mLOD[LLModel::LOD_IMPOSTOR],
decomp,
- save_skinweights, save_joint_positions);
+ save_skinweights, save_joint_positions, FALSE, TRUE);
data["mesh"][instance.mModel->mLocalID] = str.str();
@@ -3217,12 +3507,19 @@ void LLModelPreview::clearModel(S32 lod)
mScene[lod].clear();
}
-void LLModelPreview::loadModel(std::string filename, S32 lod)
+void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable_slm)
{
assert_main_thread();
LLMutexLock lock(this);
+ if (lod < LLModel::LOD_IMPOSTOR || lod > LLModel::NUM_LODS - 1)
+ {
+ llwarns << "Invalid level of detail: " << lod << llendl;
+ assert(lod >= LLModel::LOD_IMPOSTOR && lod < LLModel::NUM_LODS);
+ return;
+ }
+
// This triggers if you bring up the file picker and then hit CANCEL.
// Just use the previous model (if any) and ignore that you brought up
// the file picker.
@@ -3254,6 +3551,11 @@ void LLModelPreview::loadModel(std::string filename, S32 lod)
mModelLoader = new LLModelLoader(filename, lod, this, mJointTransformMap, mJointsFromNode );
+ if (force_disable_slm)
+ {
+ mModelLoader->mTrySLM = false;
+ }
+
mModelLoader->start();
mFMP->childSetTextArg("status", "[STATUS]", mFMP->getString("status_reading_file"));
@@ -3263,11 +3565,12 @@ void LLModelPreview::loadModel(std::string filename, S32 lod)
if ( getLoadState() >= LLModelLoader::ERROR_PARSING )
{
mFMP->childDisable("ok_btn");
+ mFMP->childDisable( "calculate_btn" );
}
if (lod == mPreviewLOD)
{
- mFMP->childSetText("lod_file", mLODFile[mPreviewLOD]);
+ mFMP->childSetText("lod_file_" + lod_name[lod], mLODFile[lod]);
}
else if (lod == LLModel::LOD_PHYSICS)
{
@@ -3296,6 +3599,12 @@ void LLModelPreview::setPhysicsFromLOD(S32 lod)
void LLModelPreview::clearIncompatible(S32 lod)
{
+ //Don't discard models if specified model is the physic rep
+ if ( lod == LLModel::LOD_PHYSICS )
+ {
+ return;
+ }
+
for (U32 i = 0; i <= LLModel::LOD_HIGH; i++)
{ //clear out any entries that aren't compatible with this model
if (i != lod)
@@ -3468,7 +3777,17 @@ void LLModelPreview::loadModelCallback(S32 lod)
mLoading = false;
if (mFMP)
+ {
mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->set(FALSE);
+ if (!mBaseModel.empty())
+ {
+ if (mFMP->getChild<LLUICtrl>("description_form")->getValue().asString().empty())
+ {
+ const std::string& model_name = mBaseModel[0]->getName();
+ mFMP->getChild<LLUICtrl>("description_form")->setValue(model_name);
+ }
+ }
+ }
refresh();
mModelLoadedSignal();
@@ -3524,45 +3843,16 @@ void LLModelPreview::generateNormals()
updateStatusMessages();
}
-void LLModelPreview::clearMaterials()
+void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_limit)
{
- for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
- { //for each transform in current scene
- for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_iter)
- { //for each instance with that transform
- LLModelInstance& source_instance = *model_iter;
- LLModel* source = source_instance.mModel;
-
- for (S32 i = 0; i < source->getNumVolumeFaces(); ++i)
- { //for each face in instance
- LLImportMaterial& source_material = source_instance.mMaterial[i];
-
- //clear material info
- source_material.mDiffuseColor = LLColor4(1,1,1,1);
- source_material.mDiffuseMap = NULL;
- source_material.mDiffuseMapFilename.clear();
- source_material.mDiffuseMapLabel.clear();
- source_material.mFullbright = false;
- }
- }
- }
-
- mVertexBuffer[mPreviewLOD].clear();
-
- if (mPreviewLOD == LLModel::LOD_HIGH)
+ // Allow LoD from -1 to LLModel::LOD_PHYSICS
+ if (which_lod < -1 || which_lod > LLModel::NUM_LODS - 1)
{
- mBaseScene = mScene[mPreviewLOD];
- mBaseModel = mModel[mPreviewLOD];
- clearGLODGroup();
- mVertexBuffer[5].clear();
+ llwarns << "Invalid level of detail: " << which_lod << llendl;
+ assert(which_lod >= -1 && which_lod < LLModel::NUM_LODS);
+ return;
}
- mResourceCost = calcResourceCost();
- refresh();
-}
-
-void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_limit)
-{
if (mBaseModel.empty())
{
return;
@@ -3570,6 +3860,15 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
LLVertexBuffer::unbind();
+ bool no_ff = LLGLSLShader::sNoFixedFunction;
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ LLGLSLShader::sNoFixedFunction = false;
+
+ if (shader)
+ {
+ shader->unbind();
+ }
+
stop_gloderror();
static U32 cur_name = 1;
@@ -3592,111 +3891,41 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
U32 lod_mode = 0;
- LLCtrlSelectionInterface* iface = mFMP->childGetSelectionInterface("lod_mode");
- if (iface)
- {
- lod_mode = iface->getFirstSelectedIndex();
- }
- mRequestedLoDMode[mPreviewLOD] = lod_mode;
-
- F32 lod_error_threshold = mFMP->childGetValue("lod_error_threshold").asReal();
+ F32 lod_error_threshold = 0;
- if (lod_mode == 0)
+ // The LoD should be in range from Lowest to High
+ if (which_lod > -1 && which_lod < NUM_LOD)
{
- lod_mode = GLOD_TRIANGLE_BUDGET;
- if (which_lod != -1)
+ LLCtrlSelectionInterface* iface = mFMP->childGetSelectionInterface("lod_mode_" + lod_name[which_lod]);
+ if (iface)
{
- limit = mFMP->childGetValue("lod_triangle_limit").asInteger();
+ lod_mode = iface->getFirstSelectedIndex();
}
- }
- else
- {
- lod_mode = GLOD_ERROR_THRESHOLD;
- }
-
- U32 build_operator = 0;
- iface = mFMP->childGetSelectionInterface("build_operator");
- if (iface)
- {
- build_operator = iface->getFirstSelectedIndex();
+ lod_error_threshold = mFMP->childGetValue("lod_error_threshold_" + lod_name[which_lod]).asReal();
}
- mRequestedBuildOperator[mPreviewLOD] = build_operator;
- if (build_operator == 0)
- {
- build_operator = GLOD_OPERATOR_EDGE_COLLAPSE;
- }
- else
- {
- build_operator = GLOD_OPERATOR_HALF_EDGE_COLLAPSE;
- }
-
- U32 queue_mode=0;
- iface = mFMP->childGetSelectionInterface("queue_mode");
- if (iface)
- {
- queue_mode = iface->getFirstSelectedIndex();
- }
- mRequestedQueueMode[mPreviewLOD] = queue_mode;
-
- if (queue_mode == 0)
- {
- queue_mode = GLOD_QUEUE_GREEDY;
- }
- else if (queue_mode == 1)
- {
- queue_mode = GLOD_QUEUE_LAZY;
- }
- else
+ if (which_lod != -1)
{
- queue_mode = GLOD_QUEUE_INDEPENDENT;
+ mRequestedLoDMode[which_lod] = lod_mode;
}
- U32 border_mode = 0;
-
- iface = mFMP->childGetSelectionInterface("border_mode");
- if (iface)
+ if (lod_mode == 0)
{
- border_mode = iface->getFirstSelectedIndex();
- }
- mRequestedBorderMode[mPreviewLOD] = border_mode;
+ lod_mode = GLOD_TRIANGLE_BUDGET;
- if (border_mode == 0)
- {
- border_mode = GLOD_BORDER_UNLOCK;
+ // The LoD should be in range from Lowest to High
+ if (which_lod > -1 && which_lod < NUM_LOD)
+ {
+ limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger();
+ }
}
else
{
- border_mode = GLOD_BORDER_LOCK;
+ lod_mode = GLOD_ERROR_THRESHOLD;
}
bool object_dirty = false;
- if (border_mode != mBuildBorderMode)
- {
- mBuildBorderMode = border_mode;
- object_dirty = true;
- }
-
- if (queue_mode != mBuildQueueMode)
- {
- mBuildQueueMode = queue_mode;
- object_dirty = true;
- }
-
- if (build_operator != mBuildOperator)
- {
- mBuildOperator = build_operator;
- object_dirty = true;
- }
-
- F32 share_tolerance = mFMP->childGetValue("share_tolerance").asReal();
- if (share_tolerance != mBuildShareTolerance)
- {
- mBuildShareTolerance = share_tolerance;
- object_dirty = true;
- }
- mRequestedShareTolerance[mPreviewLOD] = share_tolerance;
if (mGroup == 0)
{
@@ -3734,7 +3963,9 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
U32 tri_count = 0;
for (U32 i = 0; i < mVertexBuffer[5][mdl].size(); ++i)
{
- mVertexBuffer[5][mdl][i]->setBuffer(type_mask);
+ LLVertexBuffer* buff = mVertexBuffer[5][mdl][i];
+ buff->setBuffer(type_mask & buff->getTypeMask());
+
U32 num_indices = mVertexBuffer[5][mdl][i]->getNumIndices();
if (num_indices > 2)
{
@@ -3744,18 +3975,6 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
stop_gloderror();
}
- glodObjectParameteri(mObject[mdl], GLOD_BUILD_OPERATOR, build_operator);
- stop_gloderror();
-
- glodObjectParameteri(mObject[mdl], GLOD_BUILD_QUEUE_MODE, queue_mode);
- stop_gloderror();
-
- glodObjectParameteri(mObject[mdl], GLOD_BUILD_BORDER_MODE, border_mode);
- stop_gloderror();
-
- glodObjectParameterf(mObject[mdl], GLOD_BUILD_SHARE_TOLERANCE, share_tolerance);
- stop_gloderror();
-
glodBuildObject(mObject[mdl]);
stop_gloderror();
}
@@ -3856,6 +4075,8 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
for (GLint i = 0; i < patch_count; ++i)
{
+ type_mask = mVertexBuffer[5][base][i]->getTypeMask();
+
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
if (sizes[i*2+1] > 0 && sizes[i*2] > 0)
@@ -3880,8 +4101,15 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
LLStrider<U16> index;
buff->getVertexStrider(pos);
- buff->getNormalStrider(norm);
- buff->getTexCoord0Strider(tc);
+ if (type_mask & LLVertexBuffer::MAP_NORMAL)
+ {
+ buff->getNormalStrider(norm);
+ }
+ if (type_mask & LLVertexBuffer::MAP_TEXCOORD0)
+ {
+ buff->getTexCoord0Strider(tc);
+ }
+
buff->getIndexStrider(index);
target_model->setVolumeFaceData(names[i], pos, norm, tc, index, buff->getNumVerts(), buff->getNumIndices());
@@ -3939,6 +4167,13 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
mResourceCost = calcResourceCost();
+ LLVertexBuffer::unbind();
+ LLGLSLShader::sNoFixedFunction = no_ff;
+ if (shader)
+ {
+ shader->bind();
+ }
+
/*if (which_lod == -1 && mScene[LLModel::LOD_PHYSICS].empty())
{ //build physics scene
mScene[LLModel::LOD_PHYSICS] = mScene[LLModel::LOD_LOW];
@@ -4087,18 +4322,20 @@ void LLModelPreview::updateStatusMessages()
}
else if (!verts[lod].empty())
{
+ S32 sum_verts_higher_lod = 0;
+ S32 sum_verts_this_lod = 0;
for (U32 i = 0; i < verts[lod].size(); ++i)
{
- S32 max_verts = i < verts[lod+1].size() ? verts[lod+1][i] : 0;
+ sum_verts_higher_lod += ((i < verts[lod+1].size()) ? verts[lod+1][i] : 0);
+ sum_verts_this_lod += verts[lod][i];
+ }
- if (max_verts > 0)
- {
- if (verts[lod][i] > max_verts)
- { //too many vertices in this lod
- message = "mesh_status_too_many_vertices";
- upload_status[lod] = 2;
- }
- }
+ if ((sum_verts_higher_lod > 0) &&
+ (sum_verts_this_lod > sum_verts_higher_lod))
+ {
+ //too many vertices in this lod
+ message = "mesh_status_too_many_vertices";
+ upload_status[lod] = 2;
}
}
}
@@ -4119,6 +4356,8 @@ void LLModelPreview::updateStatusMessages()
icon = mFMP->getChild<LLIconCtrl>("lod_status_message_icon");
icon->setImage(img);
}
+
+ updateLodControls(lod);
}
@@ -4147,12 +4386,7 @@ void LLModelPreview::updateStatusMessages()
if ( uploadingJointPositions && !isRigValidForJointPositionUpload() )
{
skinAndRigOk = false;
- }
- else
- if ( !isLegacyRigValid() )
- {
- skinAndRigOk = false;
- }
+ }
}
if(upload_ok && mModelLoader)
@@ -4163,12 +4397,7 @@ void LLModelPreview::updateStatusMessages()
}
}
- const BOOL confirmed_checkbox = mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->getValue().asBoolean();
- if ( upload_ok && !errorStateFromLoader && skinAndRigOk && !has_degenerate && confirmed_checkbox)
- {
- mFMP->childEnable("ok_btn");
- }
- else
+ if (!upload_ok || errorStateFromLoader || !skinAndRigOk || has_degenerate)
{
mFMP->childDisable("ok_btn");
}
@@ -4235,12 +4464,14 @@ void LLModelPreview::updateStatusMessages()
{
fmp->enableViewOption("show_physics");
mViewOption["show_physics"] = true;
+ fmp->childSetValue("show_physics", true);
}
}
else
{
fmp->disableViewOption("show_physics");
mViewOption["show_physics"] = false;
+ fmp->childSetValue("show_physics", false);
}
@@ -4248,7 +4479,7 @@ void LLModelPreview::updateStatusMessages()
//fmp->childSetEnabled("physics_optimize", !use_hull);
- bool enable = phys_tris > 0 || phys_hulls > 0;
+ bool enable = (phys_tris > 0 || phys_hulls > 0) && fmp->mCurRequest.empty();
//enable = enable && !use_hull && fmp->childGetValue("physics_optimize").asBoolean();
//enable/disable "analysis" UI
@@ -4260,7 +4491,7 @@ void LLModelPreview::updateStatusMessages()
child = panel->findNextSibling(child);
}
- enable = phys_hulls > 0;
+ enable = phys_hulls > 0 && fmp->mCurRequest.empty();
//enable/disable "simplification" UI
panel = fmp->getChild<LLPanel>("physics simplification");
child = panel->getFirstChild();
@@ -4269,132 +4500,38 @@ void LLModelPreview::updateStatusMessages()
child->setEnabled(enable);
child = panel->findNextSibling(child);
}
- }
-
- const char* lod_controls[] =
- {
- "lod_mode",
- "lod_triangle_limit",
- "lod_error_tolerance",
- "build_operator_text",
- "queue_mode_text",
- "border_mode_text",
- "share_tolerance_text",
- "build_operator",
- "queue_mode",
- "border_mode",
- "share_tolerance"
- };
- const U32 num_lod_controls = sizeof(lod_controls)/sizeof(char*);
- const char* file_controls[] =
- {
- "lod_browse",
- "lod_file"
- };
- const U32 num_file_controls = sizeof(file_controls)/sizeof(char*);
-
- if (fmp)
- {
- //enable/disable controls based on radio groups
- if (mFMP->childGetValue("lod_from_file").asBoolean())
- {
- fmp->mLODMode[mPreviewLOD] = 0;
- for (U32 i = 0; i < num_file_controls; ++i)
- {
- mFMP->childEnable(file_controls[i]);
- }
-
- for (U32 i = 0; i < num_lod_controls; ++i)
- {
- mFMP->childDisable(lod_controls[i]);
- }
- }
- else if (mFMP->childGetValue("lod_none").asBoolean())
+ if (fmp->mCurRequest.empty())
{
- fmp->mLODMode[mPreviewLOD] = 2;
- for (U32 i = 0; i < num_file_controls; ++i)
- {
- mFMP->childDisable(file_controls[i]);
- }
+ fmp->childSetVisible("Simplify", true);
+ fmp->childSetVisible("simplify_cancel", false);
+ fmp->childSetVisible("Decompose", true);
+ fmp->childSetVisible("decompose_cancel", false);
- for (U32 i = 0; i < num_lod_controls; ++i)
+ if (phys_hulls > 0)
{
- mFMP->childDisable(lod_controls[i]);
+ fmp->childEnable("Simplify");
}
-
- if (!mModel[mPreviewLOD].empty())
+
+ if (phys_tris || phys_hulls > 0)
{
- mModel[mPreviewLOD].clear();
- mScene[mPreviewLOD].clear();
- mVertexBuffer[mPreviewLOD].clear();
-
- //this can cause phasing issues with the UI, so reenter this function and return
- updateStatusMessages();
- return;
+ fmp->childEnable("Decompose");
}
}
else
- { // auto generate, also the default case for wizard which has no radio selection
- fmp->mLODMode[mPreviewLOD] = 1;
-
- //don't actually regenerate lod when refreshing UI
- mLODFrozen = true;
-
- for (U32 i = 0; i < num_file_controls; ++i)
- {
- mFMP->childDisable(file_controls[i]);
- }
-
- for (U32 i = 0; i < num_lod_controls; ++i)
- {
- mFMP->childEnable(lod_controls[i]);
- }
-
- //if (threshold)
- {
- LLSpinCtrl* threshold = mFMP->getChild<LLSpinCtrl>("lod_error_threshold");
- LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit");
-
- limit->setMaxValue(mMaxTriangleLimit);
- limit->forceSetValue(mRequestedTriangleCount[mPreviewLOD]);
-
- threshold->forceSetValue(mRequestedErrorThreshold[mPreviewLOD]);
-
- mFMP->getChild<LLComboBox>("lod_mode")->selectNthItem(mRequestedLoDMode[mPreviewLOD]);
- mFMP->getChild<LLComboBox>("build_operator")->selectNthItem(mRequestedBuildOperator[mPreviewLOD]);
- mFMP->getChild<LLComboBox>("queue_mode")->selectNthItem(mRequestedQueueMode[mPreviewLOD]);
- mFMP->getChild<LLComboBox>("border_mode")->selectNthItem(mRequestedBorderMode[mPreviewLOD]);
- mFMP->getChild<LLSpinCtrl>("share_tolerance")->setValue(mRequestedShareTolerance[mPreviewLOD]);
-
- if (mRequestedLoDMode[mPreviewLOD] == 0)
- {
- limit->setVisible(true);
- threshold->setVisible(false);
-
- limit->setMaxValue(mMaxTriangleLimit);
- limit->setIncrement(mMaxTriangleLimit/32);
- }
- else
- {
- limit->setVisible(false);
- threshold->setVisible(true);
- }
- }
-
- mLODFrozen = false;
+ {
+ fmp->childEnable("simplify_cancel");
+ fmp->childEnable("decompose_cancel");
}
}
- if (mFMP->childGetValue("physics_load_from_file").asBoolean())
+ if (mFMP->childGetValue("physics_lod_combo").asString() == "From file")
{
- mFMP->childDisable("physics_lod_combo");
mFMP->childEnable("physics_file");
mFMP->childEnable("physics_browse");
}
else
{
- mFMP->childEnable("physics_lod_combo");
mFMP->childDisable("physics_file");
mFMP->childDisable("physics_browse");
}
@@ -4412,6 +4549,124 @@ void LLModelPreview::updateStatusMessages()
crease->forceSetValue(mRequestedCreaseAngle[mPreviewLOD]);
}
+ mModelUpdatedSignal(true);
+
+}
+
+void LLModelPreview::updateLodControls(S32 lod)
+{
+ if (lod < LLModel::LOD_IMPOSTOR || lod > LLModel::LOD_HIGH)
+ {
+ llwarns << "Invalid level of detail: " << lod << llendl;
+ assert(lod >= LLModel::LOD_IMPOSTOR && lod <= LLModel::LOD_HIGH);
+ return;
+ }
+
+ const char* lod_controls[] =
+ {
+ "lod_mode_",
+ "lod_triangle_limit_",
+ "lod_error_threshold_"
+ };
+ const U32 num_lod_controls = sizeof(lod_controls)/sizeof(char*);
+
+ const char* file_controls[] =
+ {
+ "lod_browse_",
+ "lod_file_",
+ };
+ const U32 num_file_controls = sizeof(file_controls)/sizeof(char*);
+
+ LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
+ if (!fmp) return;
+
+ LLComboBox* lod_combo = mFMP->findChild<LLComboBox>("lod_source_" + lod_name[lod]);
+ if (!lod_combo) return;
+
+ S32 lod_mode = lod_combo->getCurrentIndex();
+ if (lod_mode == 0) // LoD from file
+ {
+ fmp->mLODMode[lod] = 0;
+ for (U32 i = 0; i < num_file_controls; ++i)
+ {
+ mFMP->childShow(file_controls[i] + lod_name[lod]);
+ }
+
+ for (U32 i = 0; i < num_lod_controls; ++i)
+ {
+ mFMP->childHide(lod_controls[i] + lod_name[lod]);
+ }
+ }
+ else if (lod_mode == 2) // use LoD above
+ {
+ fmp->mLODMode[lod] = 2;
+ for (U32 i = 0; i < num_file_controls; ++i)
+ {
+ mFMP->childHide(file_controls[i] + lod_name[lod]);
+ }
+
+ for (U32 i = 0; i < num_lod_controls; ++i)
+ {
+ mFMP->childHide(lod_controls[i] + lod_name[lod]);
+ }
+
+ if (lod < LLModel::LOD_HIGH)
+ {
+ mModel[lod] = mModel[lod + 1];
+ mScene[lod] = mScene[lod + 1];
+ mVertexBuffer[lod].clear();
+
+ // Also update lower LoD
+ if (lod > LLModel::LOD_IMPOSTOR)
+ {
+ updateLodControls(lod - 1);
+ }
+ }
+ }
+ else // auto generate, the default case for all LoDs except High
+ {
+ fmp->mLODMode[lod] = 1;
+
+ //don't actually regenerate lod when refreshing UI
+ mLODFrozen = true;
+
+ for (U32 i = 0; i < num_file_controls; ++i)
+ {
+ mFMP->childHide(file_controls[i] + lod_name[lod]);
+ }
+
+ for (U32 i = 0; i < num_lod_controls; ++i)
+ {
+ mFMP->childShow(lod_controls[i] + lod_name[lod]);
+ }
+
+
+ LLSpinCtrl* threshold = mFMP->getChild<LLSpinCtrl>("lod_error_threshold_" + lod_name[lod]);
+ LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit_" + lod_name[lod]);
+
+ limit->setMaxValue(mMaxTriangleLimit);
+ limit->forceSetValue(mRequestedTriangleCount[lod]);
+
+ threshold->forceSetValue(mRequestedErrorThreshold[lod]);
+
+ mFMP->getChild<LLComboBox>("lod_mode_" + lod_name[lod])->selectNthItem(mRequestedLoDMode[lod]);
+
+ if (mRequestedLoDMode[lod] == 0)
+ {
+ limit->setVisible(true);
+ threshold->setVisible(false);
+
+ limit->setMaxValue(mMaxTriangleLimit);
+ limit->setIncrement(mMaxTriangleLimit/32);
+ }
+ else
+ {
+ limit->setVisible(false);
+ threshold->setVisible(true);
+ }
+
+ mLODFrozen = false;
+ }
}
void LLModelPreview::setPreviewTarget(F32 distance)
@@ -4485,7 +4740,7 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
bool skinned = include_skin_weights && !mdl->mSkinWeights.empty();
- U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
+ U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0 ;
if (skinned)
{
@@ -4503,8 +4758,6 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
LLStrider<LLVector4> weights_strider;
vb->getVertexStrider(vertex_strider);
- vb->getNormalStrider(normal_strider);
- vb->getTexCoord0Strider(tc_strider);
vb->getIndexStrider(index_strider);
if (skinned)
@@ -4513,8 +4766,18 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
}
LLVector4a::memcpyNonAliased16((F32*) vertex_strider.get(), (F32*) vf.mPositions, num_vertices*4*sizeof(F32));
- LLVector4a::memcpyNonAliased16((F32*) tc_strider.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32));
- LLVector4a::memcpyNonAliased16((F32*) normal_strider.get(), (F32*) vf.mNormals, num_vertices*4*sizeof(F32));
+
+ if (vf.mTexCoords)
+ {
+ vb->getTexCoord0Strider(tc_strider);
+ LLVector4a::memcpyNonAliased16((F32*) tc_strider.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32));
+ }
+
+ if (vf.mNormals)
+ {
+ vb->getNormalStrider(normal_strider);
+ LLVector4a::memcpyNonAliased16((F32*) normal_strider.get(), (F32*) vf.mNormals, num_vertices*4*sizeof(F32));
+ }
if (skinned)
{
@@ -4610,6 +4873,42 @@ void LLModelPreview::createPreviewAvatar( void )
}
}
+void LLModelPreview::addEmptyFace( LLModel* pTarget )
+{
+ U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
+
+ LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
+
+ buff->allocateBuffer(1, 3, true);
+ memset( buff->getMappedData(), 0, buff->getSize() );
+ memset( buff->getIndicesPointer(), 0, buff->getIndicesSize() );
+
+ buff->validateRange( 0, buff->getNumVerts()-1, buff->getNumIndices(), 0 );
+
+ LLStrider<LLVector3> pos;
+ LLStrider<LLVector3> norm;
+ LLStrider<LLVector2> tc;
+ LLStrider<U16> index;
+
+ buff->getVertexStrider(pos);
+
+ if ( type_mask & LLVertexBuffer::MAP_NORMAL )
+ {
+ buff->getNormalStrider(norm);
+ }
+ if ( type_mask & LLVertexBuffer::MAP_TEXCOORD0 )
+ {
+ buff->getTexCoord0Strider(tc);
+ }
+
+ buff->getIndexStrider(index);
+
+ //resize face array
+ int faceCnt = pTarget->getNumVolumeFaces();
+ pTarget->setNumVolumeFaces( faceCnt+1 );
+ pTarget->setVolumeFaceData( faceCnt+1, pos, norm, tc, index, buff->getNumVerts(), buff->getNumIndices() );
+
+}
//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
@@ -4620,6 +4919,8 @@ BOOL LLModelPreview::render()
LLMutexLock lock(this);
mNeedsUpdate = FALSE;
+ bool use_shaders = LLGLSLShader::sNoFixedFunction;
+
bool edges = mViewOption["show_edges"];
bool joint_positions = mViewOption["show_joint_positions"];
bool skin_weight = mViewOption["show_skin_weight"];
@@ -4636,25 +4937,33 @@ BOOL LLModelPreview::render()
LLGLDisable fog(GL_FOG);
{
+ if (use_shaders)
+ {
+ gUIProgram.bind();
+ }
//clear background to blue
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
- glOrtho(0.0f, width, 0.0f, height, -1.0f, 1.0f);
+ gGL.loadIdentity();
+ gGL.ortho(0.0f, width, 0.0f, height, -1.0f, 1.0f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
gGL.color4f(0.169f, 0.169f, 0.169f, 1.f);
gl_rect_2d_simple( width, height );
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
+ if (use_shaders)
+ {
+ gUIProgram.unbind();
+ }
}
LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
@@ -4691,12 +5000,12 @@ BOOL LLModelPreview::render()
if (has_skin_weights)
{ //model has skin weights, enable view options for skin weights and joint positions
- if (fmp)
+ if (fmp && isLegacyRigValid() )
{
fmp->enableViewOption("show_skin_weight");
fmp->setViewOptionEnabled("show_joint_positions", skin_weight);
+ mFMP->childEnable("upload_skin");
}
- mFMP->childEnable("upload_skin");
}
else
{
@@ -4721,14 +5030,29 @@ BOOL LLModelPreview::render()
mFMP->childSetValue("upload_joints", false);
upload_joints = false;
}
-
- mFMP->childSetEnabled("upload_joints", upload_skin);
+
+ //Only enable joint offsets if it passed the earlier critiquing
+ if ( isRigValidForJointPositionUpload() )
+ {
+ mFMP->childSetEnabled("upload_joints", upload_skin);
+ }
F32 explode = mFMP->childGetValue("physics_explode").asReal();
glClear(GL_DEPTH_BUFFER_BIT);
- LLRect preview_rect = mFMP->getChildView("preview_panel")->getRect();
+ LLRect preview_rect;
+
+ LLFloaterModelWizard* floater_wizard = dynamic_cast<LLFloaterModelWizard*>(mFMP);
+ if (floater_wizard)
+ {
+ preview_rect = floater_wizard->getPreviewRect();
+ }
+ else
+ {
+ preview_rect = mFMP->getChildView("preview_panel")->getRect();
+ }
+
F32 aspect = (F32) preview_rect.getWidth()/preview_rect.getHeight();
LLViewerCamera::getInstance()->setAspect(aspect);
@@ -4752,7 +5076,7 @@ BOOL LLModelPreview::render()
refresh();
}
- glLoadIdentity();
+ gGL.loadIdentity();
gPipeline.enableLightsPreview();
LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) *
@@ -4765,6 +5089,8 @@ BOOL LLModelPreview::render()
target_pos); // point of interest
+ z_near = llclamp(z_far * 0.001f, 0.001f, 0.1f);
+
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, width, height, FALSE, z_near, z_far);
stop_glerror();
@@ -4773,6 +5099,13 @@ BOOL LLModelPreview::render()
const F32 BRIGHTNESS = 0.9f;
gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS);
+ const U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
+
+ if (use_shaders)
+ {
+ gObjectPreviewProgram.bind();
+ }
+
LLGLEnable normalize(GL_NORMALIZE);
if (!mBaseModel.empty() && mVertexBuffer[5].empty())
@@ -4784,6 +5117,8 @@ BOOL LLModelPreview::render()
if (!mModel[mPreviewLOD].empty())
{
+ mFMP->childEnable("reset_btn");
+
bool regen = mVertexBuffer[mPreviewLOD].empty();
if (!regen)
{
@@ -4795,6 +5130,24 @@ BOOL LLModelPreview::render()
}
}
+ //make sure material lists all match
+ for (U32 i = 0; i < LLModel::NUM_LODS-1; i++)
+ {
+ if (mBaseModel.size() == mModel[i].size())
+ {
+ for (U32 j = 0; j < mBaseModel.size(); ++j)
+ {
+ int refFaceCnt = 0;
+ int modelFaceCnt = 0;
+
+ if ( !mModel[i][j]->matchMaterialOrder(mBaseModel[j], refFaceCnt, modelFaceCnt ) )
+ {
+ mFMP->childDisable( "calculate_btn" );
+ }
+ }
+ }
+ }
+
if (regen)
{
genBuffers(mPreviewLOD, skin_weight);
@@ -4816,34 +5169,42 @@ BOOL LLModelPreview::render()
gGL.pushMatrix();
LLMatrix4 mat = instance.mTransform;
- glMultMatrixf((GLfloat*) mat.mMatrix);
+ gGL.multMatrix((GLfloat*) mat.mMatrix);
for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i)
{
LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i];
-
- buffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
+
+ buffer->setBuffer(type_mask & buffer->getTypeMask());
if (textures)
{
- glColor4fv(instance.mMaterial[i].mDiffuseColor.mV);
- if (i < instance.mMaterial.size() && instance.mMaterial[i].mDiffuseMap.notNull())
+ int materialCnt = instance.mModel->mMaterialList.size();
+ if ( i < materialCnt )
{
- if (instance.mMaterial[i].mDiffuseMap->getDiscardLevel() > -1)
+ const std::string& binding = instance.mModel->mMaterialList[i];
+ const LLImportMaterial& material = instance.mMaterial[binding];
+
+ gGL.diffuseColor4fv(material.mDiffuseColor.mV);
+
+ if (material.mDiffuseMap.notNull())
{
- gGL.getTexUnit(0)->bind(instance.mMaterial[i].mDiffuseMap, true);
- mTextureSet.insert(instance.mMaterial[i].mDiffuseMap.get());
+ if (material.mDiffuseMap->getDiscardLevel() > -1)
+ {
+ gGL.getTexUnit(0)->bind(material.mDiffuseMap, true);
+ mTextureSet.insert(material.mDiffuseMap.get());
+ }
}
}
}
else
{
- glColor4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
}
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glColor3f(0.4f, 0.4f, 0.4f);
+ gGL.diffuseColor3f(0.4f, 0.4f, 0.4f);
if (edges)
{
@@ -4860,184 +5221,197 @@ BOOL LLModelPreview::render()
if (physics)
{
glClear(GL_DEPTH_BUFFER_BIT);
- LLGLEnable blend(GL_BLEND);
- gGL.blendFunc(LLRender::BF_ONE, LLRender::BF_ZERO);
-
- for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
+
+ for (U32 i = 0; i < 2; i++)
{
- LLModelInstance& instance = *iter;
+ if (i == 0)
+ { //depth only pass
+ gGL.setColorMask(false, false);
+ }
+ else
+ {
+ gGL.setColorMask(true, true);
+ }
- LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS];
+ //enable alpha blending on second pass but not first pass
+ LLGLState blend(GL_BLEND, i);
+
+ gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
- if (!model)
+ for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
{
- continue;
- }
+ LLModelInstance& instance = *iter;
- gGL.pushMatrix();
- LLMatrix4 mat = instance.mTransform;
+ LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS];
- glMultMatrixf((GLfloat*) mat.mMatrix);
+ if (!model)
+ {
+ continue;
+ }
+ gGL.pushMatrix();
+ LLMatrix4 mat = instance.mTransform;
- bool render_mesh = true;
+ gGL.multMatrix((GLfloat*) mat.mMatrix);
- LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread;
- if (decomp)
- {
- LLMutexLock(decomp->mMutex);
- LLModel::Decomposition& physics = model->mPhysics;
+ bool render_mesh = true;
- if (!physics.mHull.empty())
+ LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread;
+ if (decomp)
{
- render_mesh = false;
+ LLMutexLock(decomp->mMutex);
- if (physics.mMesh.empty())
- { //build vertex buffer for physics mesh
- gMeshRepo.buildPhysicsMesh(physics);
- }
+ LLModel::Decomposition& physics = model->mPhysics;
+
+ if (!physics.mHull.empty())
+ {
+ render_mesh = false;
+
+ if (physics.mMesh.empty())
+ { //build vertex buffer for physics mesh
+ gMeshRepo.buildPhysicsMesh(physics);
+ }
- if (!physics.mMesh.empty())
- { //render hull instead of mesh
- for (U32 i = 0; i < physics.mMesh.size(); ++i)
- {
- if (explode > 0.f)
+ if (!physics.mMesh.empty())
+ { //render hull instead of mesh
+ for (U32 i = 0; i < physics.mMesh.size(); ++i)
{
- gGL.pushMatrix();
+ if (explode > 0.f)
+ {
+ gGL.pushMatrix();
- LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters;
- offset *= explode;
+ LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters;
+ offset *= explode;
- gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
- }
+ gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
+ }
- static std::vector<LLColor4U> hull_colors;
+ static std::vector<LLColor4U> hull_colors;
- if (i+1 >= hull_colors.size())
- {
- hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 255));
- }
+ if (i+1 >= hull_colors.size())
+ {
+ hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128));
+ }
glColor4ubv(hull_colors[i].mV);
- LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals);
+ LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals);
- if (explode > 0.f)
- {
- gGL.popMatrix();
+ if (explode > 0.f)
+ {
+ gGL.popMatrix();
+ }
}
}
}
}
- }
- if (render_mesh)
- {
- if (mVertexBuffer[LLModel::LOD_PHYSICS].empty())
+ if (render_mesh)
{
- genBuffers(LLModel::LOD_PHYSICS, false);
- }
- for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i)
- {
- LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i];
-
- buffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
+ if (mVertexBuffer[LLModel::LOD_PHYSICS].empty())
+ {
+ genBuffers(LLModel::LOD_PHYSICS, false);
+ }
+ for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i)
+ {
+ LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i];
- buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glColor4f(0.4f, 0.4f, 0.0f, 0.4f);
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.diffuseColor4f(0.4f, 0.4f, 0.0f, 0.4f);
- buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
+ buffer->setBuffer(type_mask & buffer->getTypeMask());
+ buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
- glColor3f(1.f, 1.f, 0.f);
+ gGL.diffuseColor3f(1.f, 1.f, 0.f);
- glLineWidth(2.f);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
+ glLineWidth(2.f);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- glLineWidth(1.f);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glLineWidth(1.f);
+ }
}
- }
-
- gGL.popMatrix();
- }
-
- glLineWidth(3.f);
- glPointSize(8.f);
- gPipeline.enableLightsFullbright(LLColor4::white);
- //show degenerate triangles
- LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
- LLGLDisable cull(GL_CULL_FACE);
- glColor4f(1.f,0.f,0.f,1.f);
- const LLVector4a scale(0.5f);
- for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
- {
- LLModelInstance& instance = *iter;
+ gGL.popMatrix();
+ }
- LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS];
+ glLineWidth(3.f);
+ glPointSize(8.f);
+ gPipeline.enableLightsFullbright(LLColor4::white);
+ //show degenerate triangles
+ LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
+ LLGLDisable cull(GL_CULL_FACE);
+ gGL.diffuseColor4f(1.f,0.f,0.f,1.f);
+ const LLVector4a scale(0.5f);
- if (!model)
+ for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
{
- continue;
- }
+ LLModelInstance& instance = *iter;
- gGL.pushMatrix();
- LLMatrix4 mat = instance.mTransform;
+ LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS];
- glMultMatrixf((GLfloat*) mat.mMatrix);
+ if (!model)
+ {
+ continue;
+ }
+ gGL.pushMatrix();
+ LLMatrix4 mat = instance.mTransform;
- LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread;
- if (decomp)
- {
- LLMutexLock(decomp->mMutex);
+ gGL.multMatrix((GLfloat*) mat.mMatrix);
- LLModel::Decomposition& physics = model->mPhysics;
- if (physics.mHull.empty())
+ LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread;
+ if (decomp)
{
- if (mVertexBuffer[LLModel::LOD_PHYSICS].empty())
+ LLMutexLock(decomp->mMutex);
+
+ LLModel::Decomposition& physics = model->mPhysics;
+
+ if (physics.mHull.empty())
{
- genBuffers(LLModel::LOD_PHYSICS, false);
- }
+ if (mVertexBuffer[LLModel::LOD_PHYSICS].empty())
+ {
+ genBuffers(LLModel::LOD_PHYSICS, false);
+ }
- for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i)
- {
- LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i];
+ for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i)
+ {
+ LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i];
- buffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
+ buffer->setBuffer(type_mask & buffer->getTypeMask());
- LLStrider<LLVector3> pos_strider;
- buffer->getVertexStrider(pos_strider, 0);
- LLVector4a* pos = (LLVector4a*) pos_strider.get();
+ LLStrider<LLVector3> pos_strider;
+ buffer->getVertexStrider(pos_strider, 0);
+ LLVector4a* pos = (LLVector4a*) pos_strider.get();
- LLStrider<U16> idx;
- buffer->getIndexStrider(idx, 0);
+ LLStrider<U16> idx;
+ buffer->getIndexStrider(idx, 0);
- for (U32 i = 0; i < buffer->getNumIndices(); i += 3)
- {
- LLVector4a v1; v1.setMul(pos[*idx++], scale);
- LLVector4a v2; v2.setMul(pos[*idx++], scale);
- LLVector4a v3; v3.setMul(pos[*idx++], scale);
-
- if (ll_is_degenerate(v1,v2,v3))
+ for (U32 i = 0; i < buffer->getNumIndices(); i += 3)
{
- buffer->draw(LLRender::LINE_LOOP, 3, i);
- buffer->draw(LLRender::POINTS, 3, i);
+ LLVector4a v1; v1.setMul(pos[*idx++], scale);
+ LLVector4a v2; v2.setMul(pos[*idx++], scale);
+ LLVector4a v3; v3.setMul(pos[*idx++], scale);
+
+ if (ll_is_degenerate(v1,v2,v3))
+ {
+ buffer->draw(LLRender::LINE_LOOP, 3, i);
+ buffer->draw(LLRender::POINTS, 3, i);
+ }
}
}
}
}
- }
- gGL.popMatrix();
+ gGL.popMatrix();
+ }
+ glLineWidth(1.f);
+ glPointSize(1.f);
+ gPipeline.enableLightsPreview();
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
- glLineWidth(1.f);
- glPointSize(1.f);
- gPipeline.enableLightsPreview();
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
}
else
@@ -5051,7 +5425,16 @@ BOOL LLModelPreview::render()
if (joint_positions)
{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ if (shader)
+ {
+ gDebugProgram.bind();
+ }
getPreviewAvatar()->renderCollisionVolumes();
+ if (shader)
+ {
+ shader->bind();
+ }
}
for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
@@ -5090,7 +5473,7 @@ BOOL LLModelPreview::render()
}
}
- for (U32 j = 0; j < buffer->getRequestedVerts(); ++j)
+ for (U32 j = 0; j < buffer->getNumVerts(); ++j)
{
LLMatrix4 final_mat;
final_mat.mMatrix[0][0] = final_mat.mMatrix[1][1] = final_mat.mMatrix[2][2] = final_mat.mMatrix[3][3] = 0.f;
@@ -5132,11 +5515,14 @@ BOOL LLModelPreview::render()
position[j] = v;
}
- buffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
- glColor4fv(instance.mMaterial[i].mDiffuseColor.mV);
+ const std::string& binding = instance.mModel->mMaterialList[i];
+ const LLImportMaterial& material = instance.mMaterial[binding];
+
+ buffer->setBuffer(type_mask & buffer->getTypeMask());
+ gGL.diffuseColor4fv(material.mDiffuseColor.mV);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0);
- glColor3f(0.4f, 0.4f, 0.4f);
+ gGL.diffuseColor3f(0.4f, 0.4f, 0.4f);
if (edges)
{
@@ -5153,6 +5539,11 @@ BOOL LLModelPreview::render()
}
}
+ if (use_shaders)
+ {
+ gObjectPreviewProgram.unbind();
+ }
+
gGL.popMatrix();
return TRUE;
@@ -5202,8 +5593,7 @@ void LLModelPreview::setPreviewLOD(S32 lod)
LLComboBox* combo_box = mFMP->getChild<LLComboBox>("preview_lod_combo");
combo_box->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order
- mFMP->childSetTextArg("lod_table_footer", "[DETAIL]", mFMP->getString(lod_name[mPreviewLOD]));
- mFMP->childSetText("lod_file", mLODFile[mPreviewLOD]);
+ mFMP->childSetText("lod_file_" + lod_name[mPreviewLOD], mLODFile[mPreviewLOD]);
// the wizard has three lod drop downs
LLComboBox* combo_box2 = mFMP->getChild<LLComboBox>("preview_lod_combo2");
@@ -5224,25 +5614,16 @@ void LLModelPreview::setPreviewLOD(S32 lod)
mFMP->childSetColor(lod_triangles_name[i], color);
mFMP->childSetColor(lod_vertices_name[i], color);
}
-
- LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance;
- if (fmp)
- {
- LLRadioGroup* radio = fmp->getChild<LLRadioGroup>("lod_file_or_limit");
- radio->selectNthItem(fmp->mLODMode[mPreviewLOD]);
- }
}
refresh();
updateStatusMessages();
}
-//static
-void LLFloaterModelPreview::onBrowseLOD(void* data)
+void LLFloaterModelPreview::onBrowseLOD(S32 lod)
{
assert_main_thread();
- LLFloaterModelPreview* mp = (LLFloaterModelPreview*) data;
- mp->loadModel(mp->mModelPreview->mPreviewLOD);
+ loadModel(lod);
}
//static
@@ -5251,9 +5632,16 @@ void LLFloaterModelPreview::onReset(void* user_data)
assert_main_thread();
LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) user_data;
+ fmp->childDisable("reset_btn");
LLModelPreview* mp = fmp->mModelPreview;
std::string filename = mp->mLODFile[3];
- mp->loadModel(filename,3);
+
+ fmp->resetDisplayOptions();
+ //reset model preview
+ fmp->initModelPreview();
+
+ mp = fmp->mModelPreview;
+ mp->loadModel(filename,3,true);
}
//static
@@ -5263,6 +5651,8 @@ void LLFloaterModelPreview::onUpload(void* user_data)
LLFloaterModelPreview* mp = (LLFloaterModelPreview*) user_data;
+ mp->mUploadBtn->setEnabled(false);
+
mp->mModelPreview->rebuildUploadData();
bool upload_skinweights = mp->childGetValue("upload_skin").asBoolean();
@@ -5271,31 +5661,17 @@ void LLFloaterModelPreview::onUpload(void* user_data)
mp->mModelPreview->saveUploadData(upload_skinweights, upload_joint_positions);
gMeshRepo.uploadModel(mp->mModelPreview->mUploadData, mp->mModelPreview->mPreviewScale,
- mp->childGetValue("upload_textures").asBoolean(), upload_skinweights, upload_joint_positions);
-
- mp->closeFloater(false);
+ mp->childGetValue("upload_textures").asBoolean(), upload_skinweights, upload_joint_positions, mp->mUploadModelUrl,
+ true, LLHandle<LLWholeModelFeeObserver>(), mp->getWholeModelUploadObserverHandle());
}
-//static
-void LLFloaterModelPreview::onClearMaterials(void* user_data)
-{
- LLFloaterModelPreview* mp = (LLFloaterModelPreview*) user_data;
- mp->mModelPreview->clearMaterials();
-}
-
-//static
-void LLFloaterModelPreview::refresh(LLUICtrl* ctrl, void* user_data)
+void LLFloaterModelPreview::refresh()
{
+ sInstance->toggleCalculateButton(true);
sInstance->mModelPreview->mDirty = true;
}
-void LLFloaterModelPreview::updateResourceCost()
-{
- U32 cost = mModelPreview->mResourceCost;
- childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",cost));
-}
-
//static
void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata )
{
@@ -5311,12 +5687,11 @@ void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture
}
}
-void LLModelPreview::onLODParamCommit(bool enforce_tri_limit)
+void LLModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
{
if (!mLODFrozen)
{
- genLODs(mPreviewLOD, 3, enforce_tri_limit);
- updateStatusMessages();
+ genLODs(lod, 3, enforce_tri_limit);
refresh();
}
}
@@ -5339,6 +5714,111 @@ void LLFloaterModelPreview::setStatusMessage(const std::string& msg)
mStatusMessage = msg;
}
+void LLFloaterModelPreview::toggleCalculateButton()
+{
+ toggleCalculateButton(true);
+}
+
+void LLFloaterModelPreview::toggleCalculateButton(bool visible)
+{
+ mCalculateBtn->setVisible(visible);
+
+ bool uploadingSkin = childGetValue("upload_skin").asBoolean();
+ bool uploadingJointPositions = childGetValue("upload_joints").asBoolean();
+ if ( uploadingSkin )
+ {
+ //Disable the calculate button *if* the rig is invalid - which is determined during the critiquing process
+ if ( uploadingJointPositions && !mModelPreview->isRigValidForJointPositionUpload() )
+ {
+ mCalculateBtn->setVisible( false );
+ }
+ }
+
+ mUploadBtn->setVisible(!visible);
+ mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());
+
+ if (visible)
+ {
+ std::string tbd = getString("tbd");
+ childSetTextArg("prim_weight", "[EQ]", tbd);
+ childSetTextArg("download_weight", "[ST]", tbd);
+ childSetTextArg("server_weight", "[SIM]", tbd);
+ childSetTextArg("physics_weight", "[PH]", tbd);
+ childSetTextArg("upload_fee", "[FEE]", tbd);
+ childSetTextArg("price_breakdown", "[STREAMING]", tbd);
+ childSetTextArg("price_breakdown", "[PHYSICS]", tbd);
+ childSetTextArg("price_breakdown", "[INSTANCES]", tbd);
+ childSetTextArg("price_breakdown", "[TEXTURES]", tbd);
+ childSetTextArg("price_breakdown", "[MODEL]", tbd);
+ }
+}
+
+void LLFloaterModelPreview::onLoDSourceCommit(S32 lod)
+{
+ mModelPreview->updateLodControls(lod);
+ refresh();
+}
+
+void LLFloaterModelPreview::resetDisplayOptions()
+{
+ std::map<std::string,bool>::iterator option_it = mModelPreview->mViewOption.begin();
+
+ for(;option_it != mModelPreview->mViewOption.end(); ++option_it)
+ {
+ LLUICtrl* ctrl = getChild<LLUICtrl>(option_it->first);
+ ctrl->setValue(false);
+ }
+}
+
+void LLFloaterModelPreview::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)
+{
+ mModelPhysicsFee = result;
+ mModelPhysicsFee["url"] = upload_url;
+
+ doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::handleModelPhysicsFeeReceived,this));
+}
+
+void LLFloaterModelPreview::handleModelPhysicsFeeReceived()
+{
+ const LLSD& result = mModelPhysicsFee;
+ mUploadModelUrl = result["url"].asString();
+
+ childSetTextArg("prim_weight", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal()));
+ childSetTextArg("download_weight", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal()));
+ childSetTextArg("server_weight", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal()));
+ childSetTextArg("physics_weight", "[PH]", llformat("%0.3f", result["physics_cost"].asReal()));
+ childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger()));
+ childSetTextArg("price_breakdown", "[STREAMING]", llformat("%d", result["upload_price_breakdown"]["mesh_streaming"].asInteger()));
+ childSetTextArg("price_breakdown", "[PHYSICS]", llformat("%d", result["upload_price_breakdown"]["mesh_physics"].asInteger()));
+ childSetTextArg("price_breakdown", "[INSTANCES]", llformat("%d", result["upload_price_breakdown"]["mesh_instance"].asInteger()));
+ childSetTextArg("price_breakdown", "[TEXTURES]", llformat("%d", result["upload_price_breakdown"]["texture"].asInteger()));
+ childSetTextArg("price_breakdown", "[MODEL]", llformat("%d", result["upload_price_breakdown"]["model"].asInteger()));
+ childSetVisible("upload_fee", true);
+ childSetVisible("price_breakdown", true);
+ mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());
+}
+
+void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason)
+{
+ llwarns << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << llendl;
+ doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, true));
+}
+
+/*virtual*/
+void LLFloaterModelPreview::onModelUploadSuccess()
+{
+ assert_main_thread();
+ closeFloater(false);
+}
+
+/*virtual*/
+void LLFloaterModelPreview::onModelUploadFailure()
+{
+ assert_main_thread();
+ toggleCalculateButton(true);
+ mUploadBtn->setEnabled(true);
+}
+
S32 LLFloaterModelPreview::DecompRequest::statusCallback(const char* status, S32 p1, S32 p2)
{
if (mContinue)
@@ -5378,3 +5858,25 @@ void LLFloaterModelPreview::DecompRequest::completed()
llassert(sInstance->mCurRequest.find(this) == sInstance->mCurRequest.end());
}
}
+
+void dump_llsd_to_file(const LLSD& content, std::string filename);
+
+void LLFloaterModelPreview::onPermissionsReceived(const LLSD& result)
+{
+ dump_llsd_to_file(result,"perm_received.xml");
+ std::string upload_status = result["mesh_upload_status"].asString();
+ // BAP HACK: handle "" for case that MeshUploadFlag cap is broken.
+ mHasUploadPerm = (("" == upload_status) || ("valid" == upload_status));
+
+ //mUploadBtn->setEnabled(mHasUploadPerm);
+ mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty());
+ getChild<LLTextBox>("warning_title")->setVisible(!mHasUploadPerm);
+ getChild<LLTextBox>("warning_message")->setVisible(!mHasUploadPerm);
+}
+
+void LLFloaterModelPreview::setPermissonsErrorStatus(U32 status, const std::string& reason)
+{
+ llwarns << "LLFloaterModelPreview::setPermissonsErrorStatus(" << status << " : " << reason << ")" << llendl;
+
+ LLNotificationsUtil::add("MeshUploadPermError");
+}
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index d4f6b4d293..64324854a5 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -70,7 +70,8 @@ public:
GENERATING_VERTEX_BUFFERS,
GENERATING_LOD,
DONE,
- ERROR_PARSING //basically loading failed
+ ERROR_PARSING, //basically loading failed
+ ERROR_MATERIALS,
} eLoadState;
U32 mState;
@@ -109,7 +110,7 @@ public:
void loadTextures() ; //called in the main thread.
void processElement(daeElement* element, bool& badElement);
- std::vector<LLImportMaterial> getMaterials(LLModel* model, domInstance_geometry* instance_geo);
+ std::map<std::string, LLImportMaterial> getMaterials(LLModel* model, domInstance_geometry* instance_geo);
LLImportMaterial profileToMaterial(domProfile_COMMON* material);
std::string getElementLabel(daeElement *element);
LLColor4 getDaeColor(daeElement* element);
@@ -120,12 +121,13 @@ public:
void processJointNode( domNode* pNode, std::map<std::string,LLMatrix4>& jointTransforms );
void extractTranslation( domTranslate* pTranslate, LLMatrix4& transform );
void extractTranslationViaElement( daeElement* pTranslateElement, LLMatrix4& transform );
-
+ void extractTranslationViaSID( daeElement* pElement, LLMatrix4& transform );
+
void setLoadState(U32 state);
void buildJointToNodeMappingFromScene( daeElement* pRoot );
void processJointToNodeMapping( domNode* pNode );
-
+ void processChildJoints( domNode* pParentNode );
//map of avatar joints as named in COLLADA assets to internal joint names
std::map<std::string, std::string> mJointMap;
@@ -140,7 +142,7 @@ private:
static bool isAlive(LLModelLoader* loader) ;
};
-class LLFloaterModelPreview : public LLFloater
+class LLFloaterModelPreview : public LLFloaterModelUploadBase
{
public:
@@ -162,37 +164,52 @@ public:
virtual BOOL postBuild();
+ void initModelPreview();
+
BOOL handleMouseDown(S32 x, S32 y, MASK mask);
BOOL handleMouseUp(S32 x, S32 y, MASK mask);
BOOL handleHover(S32 x, S32 y, MASK mask);
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ /*virtual*/ void onOpen(const LLSD& key);
+
static void onMouseCaptureLostModelPreview(LLMouseHandler*);
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
void setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost);
- static void onBrowseLOD(void* data);
+ void onBrowseLOD(S32 lod);
static void onReset(void* data);
static void onUpload(void* data);
- static void onClearMaterials(void* data);
-
- static void refresh(LLUICtrl* ctrl, void* data);
-
- void updateResourceCost();
+ void refresh();
void loadModel(S32 lod);
+ void loadModel(S32 lod, const std::string& file_name, bool force_disable_slm = false);
- void onViewOptionChecked(const LLSD& userdata);
+ void onViewOptionChecked(LLUICtrl* ctrl);
bool isViewOptionChecked(const LLSD& userdata);
bool isViewOptionEnabled(const LLSD& userdata);
void setViewOptionEnabled(const std::string& option, bool enabled);
void enableViewOption(const std::string& option);
void disableViewOption(const std::string& option);
+ // shows warning message if agent has no permissions to upload model
+ /*virtual*/ void onPermissionsReceived(const LLSD& result);
+
+ // called when error occurs during permissions request
+ /*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason);
+
+ /*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
+ void handleModelPhysicsFeeReceived();
+ /*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason);
+
+ /*virtual*/ void onModelUploadSuccess();
+
+ /*virtual*/ void onModelUploadFailure();
+
protected:
friend class LLModelPreview;
friend class LLMeshFilePicker;
@@ -202,17 +219,17 @@ protected:
static void onPelvisOffsetCommit(LLUICtrl*, void*);
static void onUploadJointsCommit(LLUICtrl*,void*);
static void onUploadSkinCommit(LLUICtrl*,void*);
-
- static void onPhysicsLoadRadioCommit(LLUICtrl*,void *data);
static void onPreviewLODCommit(LLUICtrl*,void*);
static void onGenerateNormalsCommit(LLUICtrl*,void*);
+ void toggleGenarateNormals();
+
static void onAutoFillCommit(LLUICtrl*,void*);
- static void onLODParamCommit(LLUICtrl*,void*);
- static void onLODParamCommitTriangleLimit(LLUICtrl*,void*);
+ void onLODParamCommit(S32 lod, bool enforce_tri_limit);
+
static void onExplodeCommit(LLUICtrl*, void*);
static void onPhysicsParamCommit(LLUICtrl* ctrl, void* userdata);
@@ -251,13 +268,29 @@ protected:
//store which lod mode each LOD is using
// 0 - load from file
// 1 - auto generate
- // 2 - None
+ // 2 - use LoD above
S32 mLODMode[4];
- LLMenuButton* mViewOptionMenuButton;
- LLToggleableMenu* mViewOptionMenu;
LLMutex* mStatusLock;
+ LLSD mModelPhysicsFee;
+
+private:
+ void onClickCalculateBtn();
+ void toggleCalculateButton();
+
+ void onLoDSourceCommit(S32 lod);
+
+ // Toggles between "Calculate weights & fee" and "Upload" buttons.
+ void toggleCalculateButton(bool visible);
+
+ // resets display options of model preview to their defaults.
+ void resetDisplayOptions();
+
+ void createSmoothComboBox(LLComboBox* combo_box, float min, float max);
+
+ LLButton* mUploadBtn;
+ LLButton* mCalculateBtn;
};
class LLMeshFilePicker : public LLFilePickerThread
@@ -276,6 +309,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
{
typedef boost::signals2::signal<void (F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost)> details_signal_t;
typedef boost::signals2::signal<void (void)> model_loaded_signal_t;
+ typedef boost::signals2::signal<void (bool)> model_updated_signal_t;
public:
LLModelPreview(S32 width, S32 height, LLFloater* fmp);
@@ -297,20 +331,21 @@ public:
virtual BOOL needsRender() { return mNeedsUpdate; }
void setPreviewLOD(S32 lod);
void clearModel(S32 lod);
- void loadModel(std::string filename, S32 lod);
+ void loadModel(std::string filename, S32 lod, bool force_disable_slm = false);
void loadModelCallback(S32 lod);
void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
void generateNormals();
- void clearMaterials();
U32 calcResourceCost();
void rebuildUploadData();
void saveUploadData(bool save_skinweights, bool save_joint_poisitions);
void saveUploadData(const std::string& filename, bool save_skinweights, bool save_joint_poisitions);
void clearIncompatible(S32 lod);
void updateStatusMessages();
+ void updateLodControls(S32 lod);
void clearGLODGroup();
- void onLODParamCommit(bool enforce_tri_limit);
-
+ void onLODParamCommit(S32 lod, bool enforce_tri_limit);
+ void addEmptyFace( LLModel* pTarget );
+
const bool getModelPivot( void ) const { return mHasPivot; }
void setHasPivot( bool val ) { mHasPivot = val; }
void setModelPivot( const LLVector3& pivot ) { mModelPivot = pivot; }
@@ -335,12 +370,10 @@ public:
boost::signals2::connection setDetailsCallback( const details_signal_t::slot_type& cb ){ return mDetailsSignal.connect(cb); }
boost::signals2::connection setModelLoadedCallback( const model_loaded_signal_t::slot_type& cb ){ return mModelLoadedSignal.connect(cb); }
+ boost::signals2::connection setModelUpdatedCallback( const model_updated_signal_t::slot_type& cb ){ return mModelUpdatedSignal.connect(cb); }
void setLoadState( U32 state ) { mLoadState = state; }
U32 getLoadState() { return mLoadState; }
- //setRestJointFlag: If an asset comes through that changes the joints, we want the reset to persist
- void setResetJointFlag( bool state ) { if ( !mResetJoints ) mResetJoints = state; }
- const bool getResetJointFlag( void ) const { return mResetJoints; }
void setRigWithSceneParity( bool state ) { mRigParityWithScene = state; }
const bool getRigWithSceneParity( void ) const { return mRigParityWithScene; }
@@ -420,6 +453,7 @@ private:
details_signal_t mDetailsSignal;
model_loaded_signal_t mModelLoadedSignal;
+ model_updated_signal_t mModelUpdatedSignal;
LLVector3 mModelPivot;
bool mHasPivot;
diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp
new file mode 100644
index 0000000000..6d3800bfa4
--- /dev/null
+++ b/indra/newview/llfloatermodeluploadbase.cpp
@@ -0,0 +1,58 @@
+/**
+ * @file llfloatermodeluploadbase.cpp
+ * @brief LLFloaterUploadModelBase class definition
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatermodeluploadbase.h"
+#include "llagent.h"
+#include "llviewerregion.h"
+#include "llnotificationsutil.h"
+
+LLFloaterModelUploadBase::LLFloaterModelUploadBase(const LLSD& key)
+:LLFloater(key),
+ mHasUploadPerm(false)
+{
+}
+
+void LLFloaterModelUploadBase::requestAgentUploadPermissions()
+{
+ std::string capability = "MeshUploadFlag";
+ std::string url = gAgent.getRegion()->getCapability(capability);
+
+ if (!url.empty())
+ {
+ llinfos<< typeid(*this).name() <<"::requestAgentUploadPermissions() requesting for upload model permissions from: "<< url <<llendl;
+ LLHTTPClient::get(url, new LLUploadModelPremissionsResponder(getPermObserverHandle()));
+ }
+ else
+ {
+ LLSD args;
+ args["CAPABILITY"] = capability;
+ LLNotificationsUtil::add("RegionCapabilityRequestError", args);
+ // BAP HACK avoid being blocked by broken server side stuff
+ mHasUploadPerm = true;
+ }
+}
diff --git a/indra/newview/llfloatermodeluploadbase.h b/indra/newview/llfloatermodeluploadbase.h
new file mode 100644
index 0000000000..a52bc28687
--- /dev/null
+++ b/indra/newview/llfloatermodeluploadbase.h
@@ -0,0 +1,61 @@
+/**
+ * @file llfloatermodeluploadbase.h
+ * @brief LLFloaterUploadModelBase class declaration
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERMODELUPLOADBASE_H
+#define LL_LLFLOATERMODELUPLOADBASE_H
+
+#include "lluploadfloaterobservers.h"
+
+class LLFloaterModelUploadBase : public LLFloater, public LLUploadPermissionsObserver, public LLWholeModelFeeObserver, public LLWholeModelUploadObserver
+{
+public:
+
+ LLFloaterModelUploadBase(const LLSD& key);
+
+ virtual ~LLFloaterModelUploadBase(){};
+
+ virtual void setPermissonsErrorStatus(U32 status, const std::string& reason) = 0;
+
+ virtual void onPermissionsReceived(const LLSD& result) = 0;
+
+ virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;
+
+ virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) = 0;
+
+ virtual void onModelUploadSuccess() {};
+
+ virtual void onModelUploadFailure() {};
+
+protected:
+
+ // requests agent's permissions to upload model
+ void requestAgentUploadPermissions();
+
+ std::string mUploadModelUrl;
+ bool mHasUploadPerm;
+};
+
+#endif /* LL_LLFLOATERMODELUPLOADBASE_H */
diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp
index 707c8288df..b517b78e5a 100644
--- a/indra/newview/llfloatermodelwizard.cpp
+++ b/indra/newview/llfloatermodelwizard.cpp
@@ -46,12 +46,21 @@ static const std::string stateNames[]={
"choose_file",
"optimize",
"physics",
- "physics2",
"review",
"upload"};
+static void swap_controls(LLUICtrl* first_ctrl, LLUICtrl* second_ctrl, bool first_ctr_visible);
+
LLFloaterModelWizard::LLFloaterModelWizard(const LLSD& key)
- : LLFloater(key)
+ : LLFloaterModelUploadBase(key)
+ ,mRecalculateGeometryBtn(NULL)
+ ,mRecalculatePhysicsBtn(NULL)
+ ,mRecalculatingPhysicsBtn(NULL)
+ ,mCalculateWeightsBtn(NULL)
+ ,mCalculatingWeightsBtn(NULL)
+ ,mChooseFilePreviewPanel(NULL)
+ ,mOptimizePreviewPanel(NULL)
+ ,mPhysicsPreviewPanel(NULL)
{
mLastEnabledState = CHOOSE_FILE;
sInstance = this;
@@ -59,7 +68,6 @@ LLFloaterModelWizard::LLFloaterModelWizard(const LLSD& key)
mCommitCallbackRegistrar.add("Wizard.Choose", boost::bind(&LLFloaterModelWizard::setState, this, CHOOSE_FILE));
mCommitCallbackRegistrar.add("Wizard.Optimize", boost::bind(&LLFloaterModelWizard::setState, this, OPTIMIZE));
mCommitCallbackRegistrar.add("Wizard.Physics", boost::bind(&LLFloaterModelWizard::setState, this, PHYSICS));
- mCommitCallbackRegistrar.add("Wizard.Physics2", boost::bind(&LLFloaterModelWizard::setState, this, PHYSICS2));
mCommitCallbackRegistrar.add("Wizard.Review", boost::bind(&LLFloaterModelWizard::setState, this, REVIEW));
mCommitCallbackRegistrar.add("Wizard.Upload", boost::bind(&LLFloaterModelWizard::setState, this, UPLOAD));
}
@@ -81,16 +89,22 @@ void LLFloaterModelWizard::setState(int state)
}
}
+ LLView* current_preview_panel = NULL;
+
if (state == CHOOSE_FILE)
{
mModelPreview->mViewOption["show_physics"] = false;
+ current_preview_panel = mChooseFilePreviewPanel;
+
getChildView("close")->setVisible(false);
getChildView("back")->setVisible(true);
getChildView("back")->setEnabled(false);
getChildView("next")->setVisible(true);
getChildView("upload")->setVisible(false);
getChildView("cancel")->setVisible(true);
+ mCalculateWeightsBtn->setVisible(false);
+ mCalculatingWeightsBtn->setVisible(false);
}
if (state == OPTIMIZE)
@@ -102,12 +116,16 @@ void LLFloaterModelWizard::setState(int state)
mModelPreview->mViewOption["show_physics"] = false;
+ current_preview_panel = mOptimizePreviewPanel;
+
getChildView("back")->setVisible(true);
getChildView("back")->setEnabled(true);
getChildView("close")->setVisible(false);
getChildView("next")->setVisible(true);
getChildView("upload")->setVisible(false);
getChildView("cancel")->setVisible(true);
+ mCalculateWeightsBtn->setVisible(false);
+ mCalculatingWeightsBtn->setVisible(false);
}
if (state == PHYSICS)
@@ -115,34 +133,24 @@ void LLFloaterModelWizard::setState(int state)
if (mLastEnabledState < state)
{
mModelPreview->setPhysicsFromLOD(1);
- }
- mModelPreview->mViewOption["show_physics"] = true;
-
- getChildView("next")->setVisible(true);
- getChildView("upload")->setVisible(false);
- getChildView("close")->setVisible(false);
- getChildView("back")->setVisible(true);
- getChildView("back")->setEnabled(true);
- getChildView("cancel")->setVisible(true);
- }
-
- if (state == PHYSICS2)
- {
- if (mLastEnabledState < state)
- {
- executePhysicsStage("Decompose");
+ // Trigger the recalculate physics when first entering
+ // the Physics step.
+ onClickRecalculatePhysics();
}
mModelPreview->mViewOption["show_physics"] = true;
- getChildView("next")->setVisible(true);
- getChildView("next")->setEnabled(true);
+ current_preview_panel = mPhysicsPreviewPanel;
+
+ getChildView("next")->setVisible(false);
getChildView("upload")->setVisible(false);
getChildView("close")->setVisible(false);
getChildView("back")->setVisible(true);
getChildView("back")->setEnabled(true);
getChildView("cancel")->setVisible(true);
+ mCalculateWeightsBtn->setVisible(true);
+ mCalculatingWeightsBtn->setVisible(false);
}
if (state == REVIEW)
@@ -156,6 +164,8 @@ void LLFloaterModelWizard::setState(int state)
getChildView("back")->setEnabled(true);
getChildView("upload")->setVisible(true);
getChildView("cancel")->setVisible(true);
+ mCalculateWeightsBtn->setVisible(false);
+ mCalculatingWeightsBtn->setVisible(false);
}
if (state == UPLOAD)
@@ -165,8 +175,24 @@ void LLFloaterModelWizard::setState(int state)
getChildView("back")->setVisible(false);
getChildView("upload")->setVisible(false);
getChildView("cancel")->setVisible(false);
+ mCalculateWeightsBtn->setVisible(false);
+ mCalculatingWeightsBtn->setVisible(false);
}
+ if (current_preview_panel)
+ {
+ LLRect rect;
+ current_preview_panel->localRectToOtherView(current_preview_panel->getLocalRect(), &rect, this);
+
+ // Reduce the preview rect by 1 px to fit the borders
+ rect.stretch(-1);
+
+ if (rect != mPreviewRect)
+ {
+ mPreviewRect = rect;
+ mModelPreview->refresh();
+ }
+ }
updateButtons();
}
@@ -198,18 +224,60 @@ void LLFloaterModelWizard::updateButtons()
button->setEnabled(FALSE);
}
}
+}
- LLButton *physics_button = getChild<LLButton>(stateNames[PHYSICS]+"_btn");
-
- if (mState == PHYSICS2)
+void LLFloaterModelWizard::onClickSwitchToAdvanced()
+{
+ LLFloaterModelPreview* floater_preview = LLFloaterReg::getTypedInstance<LLFloaterModelPreview>("upload_model");
+ if (!floater_preview)
{
- physics_button->setVisible(false);
+ llwarns << "FLoater model preview not found." << llendl;
+ return;
}
- else
+
+ // Open floater model preview
+ floater_preview->openFloater();
+
+ // Close the wizard
+ closeFloater();
+
+ std::string filename = getChild<LLUICtrl>("lod_file")->getValue().asString();
+ if (!filename.empty())
{
- physics_button->setVisible(true);
+ // Re-load the model to the floater model preview if it has been loaded
+ // into the wizard.
+ floater_preview->loadModel(3, filename);
}
+}
+
+void LLFloaterModelWizard::onClickRecalculateGeometry()
+{
+ S32 val = getChild<LLUICtrl>("accuracy_slider")->getValue().asInteger();
+
+ mModelPreview->genLODs(-1, NUM_LOD - val);
+
+ mModelPreview->refresh();
+}
+
+void LLFloaterModelWizard::onClickRecalculatePhysics()
+{
+ // Hide the "Recalculate physics" button and show the "Recalculating..."
+ // button instead.
+ swap_controls(mRecalculatePhysicsBtn, mRecalculatingPhysicsBtn, false);
+
+ executePhysicsStage("Decompose");
+}
+void LLFloaterModelWizard::onClickCalculateUploadFee()
+{
+ swap_controls(mCalculateWeightsBtn, mCalculatingWeightsBtn, false);
+
+ mModelPreview->rebuildUploadData();
+
+ mUploadModelUrl.clear();
+
+ gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
+ true, false, false, mUploadModelUrl, false, getWholeModelFeeObserverHandle());
}
void LLFloaterModelWizard::loadModel()
@@ -344,6 +412,7 @@ BOOL LLFloaterModelWizard::handleScrollWheel(S32 x, S32 y, S32 clicks)
return TRUE;
}
+
void LLFloaterModelWizard::initDecompControls()
{
LLSD key;
@@ -401,12 +470,83 @@ void LLFloaterModelWizard::initDecompControls()
mDecompParams["Simplify Method"] = 0; // set it to retain %
}
+/*virtual*/
+void LLFloaterModelWizard::onPermissionsReceived(const LLSD& result)
+{
+ std::string upload_status = result["mesh_upload_status"].asString();
+ // BAP HACK: handle "" for case that MeshUploadFlag cap is broken.
+ mHasUploadPerm = (("" == upload_status) || ("valid" == upload_status));
+
+ getChildView("warning_label")->setVisible(!mHasUploadPerm);
+ getChildView("warning_text")->setVisible(!mHasUploadPerm);
+}
+
+/*virtual*/
+void LLFloaterModelWizard::setPermissonsErrorStatus(U32 status, const std::string& reason)
+{
+ llwarns << "LLFloaterModelWizard::setPermissonsErrorStatus(" << status << " : " << reason << ")" << llendl;
+}
+
+/*virtual*/
+void LLFloaterModelWizard::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)
+{
+ swap_controls(mCalculateWeightsBtn, mCalculatingWeightsBtn, true);
+
+ // Enable the "Upload" buton if we have calculated the upload fee
+ // and have the permission to upload.
+ getChildView("upload")->setEnabled(mHasUploadPerm);
+
+ mUploadModelUrl = upload_url;
+
+ S32 fee = result["upload_price"].asInteger();
+ childSetTextArg("review_fee", "[FEE]", llformat("%d", fee));
+ childSetTextArg("charged_fee", "[FEE]", llformat("%d", fee));
+
+ setState(REVIEW);
+}
+
+/*virtual*/
+void LLFloaterModelWizard::setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason)
+{
+ swap_controls(mCalculateWeightsBtn, mCalculatingWeightsBtn, true);
+
+ // Disable the "Review" step if it has been previously enabled.
+ modelChangedCallback();
+
+ llwarns << "LLFloaterModelWizard::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << llendl;
+
+ setState(PHYSICS);
+}
+
+/*virtual*/
+void LLFloaterModelWizard::onModelUploadSuccess()
+{
+ // success!
+ setState(UPLOAD);
+}
+
+/*virtual*/
+void LLFloaterModelWizard::onModelUploadFailure()
+{
+ // Failure. Make the user recalculate fees
+ setState(PHYSICS);
+ // Disable the "Review" step if it has been previously enabled.
+ if (mLastEnabledState > PHYSICS)
+ {
+ mLastEnabledState = PHYSICS;
+ }
+
+ updateButtons();
+}
+
//static
void LLFloaterModelWizard::executePhysicsStage(std::string stage_name)
{
if (sInstance)
{
- F64 physics_accuracy = sInstance->getChild<LLSliderCtrl>("physics_slider")->getValue().asReal();
+ // Invert the slider value so that "performance" end is giving the least detailed physics,
+ // and the "accuracy" end is giving the most detailed physics
+ F64 physics_accuracy = 1 - sInstance->getChild<LLSliderCtrl>("physics_slider")->getValue().asReal();
sInstance->mDecompParams["Retain%"] = physics_accuracy;
@@ -471,13 +611,16 @@ void LLFloaterModelWizard::DecompRequest::completed()
{
executePhysicsStage("Simplify");
}
+ else
+ {
+ // Decomp request is complete so we can enable the "Recalculate physics" button again.
+ swap_controls(sInstance->mRecalculatePhysicsBtn, sInstance->mRecalculatingPhysicsBtn, true);
+ }
}
BOOL LLFloaterModelWizard::postBuild()
{
- LLView* preview_panel = getChildView("preview_panel");
-
childSetValue("import_scale", (F32) 0.67335826);
getChild<LLUICtrl>("browse")->setCommitCallback(boost::bind(&LLFloaterModelWizard::loadModel, this));
@@ -488,23 +631,36 @@ BOOL LLFloaterModelWizard::postBuild()
getChild<LLUICtrl>("next")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickNext, this));
getChild<LLUICtrl>("preview_lod_combo")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1));
getChild<LLUICtrl>("preview_lod_combo2")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1));
- getChild<LLUICtrl>("preview_lod_combo3")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1));
- getChild<LLUICtrl>("accuracy_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onAccuracyPerformance, this, _2));
getChild<LLUICtrl>("upload")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onUpload, this));
- getChild<LLUICtrl>("physics_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPhysicsChanged, this));
+ getChild<LLUICtrl>("switch_to_advanced")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickSwitchToAdvanced, this));
+
+ mRecalculateGeometryBtn = getChild<LLButton>("recalculate_geometry_btn");
+ mRecalculateGeometryBtn->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickRecalculateGeometry, this));
+
+ mRecalculatePhysicsBtn = getChild<LLButton>("recalculate_physics_btn");
+ mRecalculatePhysicsBtn->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickRecalculatePhysics, this));
+
+ mRecalculatingPhysicsBtn = getChild<LLButton>("recalculating_physics_btn");
+
+ mCalculateWeightsBtn = getChild<LLButton>("calculate");
+ mCalculateWeightsBtn->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickCalculateUploadFee, this));
+
+ mCalculatingWeightsBtn = getChild<LLButton>("calculating");
+
+ mChooseFilePreviewPanel = getChild<LLView>("choose_file_preview_panel");
+ mOptimizePreviewPanel = getChild<LLView>("optimize_preview_panel");
+ mPhysicsPreviewPanel = getChild<LLView>("physics_preview_panel");
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
enable_registrar.add("Next.OnEnable", boost::bind(&LLFloaterModelWizard::onEnableNext, this));
enable_registrar.add("Back.OnEnable", boost::bind(&LLFloaterModelWizard::onEnableBack, this));
-
-
- mPreviewRect = preview_panel->getRect();
mModelPreview = new LLModelPreview(512, 512, this);
mModelPreview->setPreviewTarget(16.f);
mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelWizard::setDetails, this, _1, _2, _3, _4, _5));
mModelPreview->setModelLoadedCallback(boost::bind(&LLFloaterModelWizard::modelLoadedCallback, this));
+ mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelWizard::modelChangedCallback, this));
mModelPreview->mViewOption["show_textures"] = true;
center();
@@ -517,6 +673,8 @@ BOOL LLFloaterModelWizard::postBuild()
initDecompControls();
+ requestAgentUploadPermissions();
+
return TRUE;
}
@@ -532,22 +690,29 @@ void LLFloaterModelWizard::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F
panel->childSetText("dimension_x", llformat("%.1f", x));
panel->childSetText("dimension_y", llformat("%.1f", y));
panel->childSetText("dimension_z", llformat("%.1f", z));
- panel->childSetTextArg("streaming cost", "[COST]", llformat("%.3f", streaming_cost));
- panel->childSetTextArg("physics cost", "[COST]", llformat("%.3f", physics_cost));
}
}
+
+ childSetTextArg("review_prim_equiv", "[EQUIV]", llformat("%d", mModelPreview->mResourceCost));
}
void LLFloaterModelWizard::modelLoadedCallback()
{
mLastEnabledState = CHOOSE_FILE;
- getChild<LLCheckBoxCtrl>("confirm_checkbox")->set(FALSE);
updateButtons();
}
-void LLFloaterModelWizard::onPhysicsChanged()
+void LLFloaterModelWizard::modelChangedCallback()
{
- mLastEnabledState = PHYSICS;
+ // Don't allow to proceed to the "Review" step if the model has changed
+ // but the new upload fee hasn't been calculated yet.
+ if (mLastEnabledState > PHYSICS)
+ {
+ mLastEnabledState = PHYSICS;
+ }
+
+ getChildView("upload")->setEnabled(false);
+
updateButtons();
}
@@ -556,22 +721,10 @@ void LLFloaterModelWizard::onUpload()
mModelPreview->rebuildUploadData();
gMeshRepo.uploadModel(mModelPreview->mUploadData, mModelPreview->mPreviewScale,
- true, false, false);
-
- setState(UPLOAD);
-
-}
-
-void LLFloaterModelWizard::onAccuracyPerformance(const LLSD& data)
-{
- int val = (int) data.asInteger();
-
- mModelPreview->genLODs(-1, NUM_LOD-val);
-
- mModelPreview->refresh();
+ true, false, false, mUploadModelUrl, true,
+ LLHandle<LLWholeModelFeeObserver>(), getWholeModelUploadObserverHandle());
}
-
void LLFloaterModelWizard::onPreviewLODCommit(LLUICtrl* ctrl)
{
if (!mModelPreview)
@@ -601,11 +754,6 @@ void LLFloaterModelWizard::refresh()
getChildView("next")->setEnabled(model_loaded);
}
- if (mState == REVIEW)
- {
- getChildView("upload")->setEnabled(getChild<LLCheckBoxCtrl>("confirm_checkbox")->getValue().asBoolean());
- }
-
}
void LLFloaterModelWizard::draw()
@@ -613,42 +761,35 @@ void LLFloaterModelWizard::draw()
refresh();
LLFloater::draw();
- LLRect r = getRect();
-
- mModelPreview->update();
- if (mModelPreview)
+ if (mModelPreview && mState < REVIEW)
{
+ mModelPreview->update();
+
gGL.color3f(1.f, 1.f, 1.f);
gGL.getTexUnit(0)->bind(mModelPreview);
- LLView *view = getChildView(stateNames[mState]+"_panel");
- LLView* preview_panel = view->getChildView("preview_panel");
-
- LLRect rect = preview_panel->getRect();
- if (rect != mPreviewRect)
- {
- mModelPreview->refresh();
- mPreviewRect = preview_panel->getRect();
- }
-
- LLRect item_rect;
- preview_panel->localRectToOtherView(preview_panel->getLocalRect(), &item_rect, this);
-
gGL.begin( LLRender::QUADS );
{
gGL.texCoord2f(0.f, 1.f);
- gGL.vertex2i(item_rect.mLeft, item_rect.mTop-1);
+ gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop);
gGL.texCoord2f(0.f, 0.f);
- gGL.vertex2i(item_rect.mLeft, item_rect.mBottom);
+ gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mBottom);
gGL.texCoord2f(1.f, 0.f);
- gGL.vertex2i(item_rect.mRight-1, item_rect.mBottom);
+ gGL.vertex2i(mPreviewRect.mRight, mPreviewRect.mBottom);
gGL.texCoord2f(1.f, 1.f);
- gGL.vertex2i(item_rect.mRight-1, item_rect.mTop-1);
+ gGL.vertex2i(mPreviewRect.mRight, mPreviewRect.mTop);
}
gGL.end();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
}
+
+// static
+void swap_controls(LLUICtrl* first_ctrl, LLUICtrl* second_ctrl, bool first_ctr_visible)
+{
+ first_ctrl->setVisible(first_ctr_visible);
+ second_ctrl->setVisible(!first_ctr_visible);
+}
diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h
index b166d26295..db9b605777 100644
--- a/indra/newview/llfloatermodelwizard.h
+++ b/indra/newview/llfloatermodelwizard.h
@@ -30,12 +30,13 @@
#include "llmeshrepository.h"
#include "llmodel.h"
#include "llthread.h"
+#include "llfloatermodeluploadbase.h"
class LLModelPreview;
-class LLFloaterModelWizard : public LLFloater
+class LLFloaterModelWizard : public LLFloaterModelUploadBase
{
public:
@@ -62,13 +63,29 @@ public:
BOOL handleMouseDown(S32 x, S32 y, MASK mask);
BOOL handleMouseUp(S32 x, S32 y, MASK mask);
BOOL handleHover(S32 x, S32 y, MASK mask);
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
void setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost);
void modelLoadedCallback();
- void onPhysicsChanged();
+ void modelChangedCallback();
void initDecompControls();
+ // shows warning message if agent has no permissions to upload model
+ /*virtual*/ void onPermissionsReceived(const LLSD& result);
+
+ // called when error occurs during permissions request
+ /*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason);
+
+ /*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
+
+ /*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason);
+
+ /*virtual*/ void onModelUploadSuccess();
+
+ /*virtual*/ void onModelUploadFailure();
+
+ const LLRect& getPreviewRect() const { return mPreviewRect; }
+
LLPhysicsDecomp::decomp_params mDecompParams;
std::set<LLPointer<DecompRequest> > mCurRequest;
std::string mStatusMessage;
@@ -80,13 +97,16 @@ private:
CHOOSE_FILE = 0,
OPTIMIZE,
PHYSICS,
- PHYSICS2,
REVIEW,
UPLOAD
};
void setState(int state);
void updateButtons();
+ void onClickSwitchToAdvanced();
+ void onClickRecalculateGeometry();
+ void onClickRecalculatePhysics();
+ void onClickCalculateUploadFee();
void onClickCancel();
void onClickBack();
void onClickNext();
@@ -94,7 +114,6 @@ private:
bool onEnableBack();
void loadModel();
void onPreviewLODCommit(LLUICtrl*);
- void onAccuracyPerformance(const LLSD& data);
void onUpload();
LLModelPreview* mModelPreview;
@@ -106,7 +125,15 @@ private:
U32 mLastEnabledState;
+ LLButton* mRecalculateGeometryBtn;
+ LLButton* mRecalculatePhysicsBtn;
+ LLButton* mRecalculatingPhysicsBtn;
+ LLButton* mCalculateWeightsBtn;
+ LLButton* mCalculatingWeightsBtn;
+ LLView* mChooseFilePreviewPanel;
+ LLView* mOptimizePreviewPanel;
+ LLView* mPhysicsPreviewPanel;
};
diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp
new file mode 100644
index 0000000000..0862cd2897
--- /dev/null
+++ b/indra/newview/llfloaterobjectweights.cpp
@@ -0,0 +1,266 @@
+/**
+ * @file llfloaterobjectweights.cpp
+ * @brief Object weights advanced view floater
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterobjectweights.h"
+
+#include "llparcel.h"
+
+#include "llfloaterreg.h"
+#include "lltextbox.h"
+
+#include "llagent.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
+
+// virtual
+bool LLCrossParcelFunctor::apply(LLViewerObject* obj)
+{
+ // Add the root object box.
+ mBoundingBox.addBBoxAgent(LLBBox(obj->getPositionRegion(), obj->getRotationRegion(), obj->getScale() * -0.5f, obj->getScale() * 0.5f).getAxisAligned());
+
+ // Extend the bounding box across all the children.
+ LLViewerObject::const_child_list_t children = obj->getChildren();
+ for (LLViewerObject::const_child_list_t::const_iterator iter = children.begin();
+ iter != children.end(); iter++)
+ {
+ LLViewerObject* child = *iter;
+ mBoundingBox.addBBoxAgent(LLBBox(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f).getAxisAligned());
+ }
+
+ bool result = false;
+
+ LLViewerRegion* region = obj->getRegion();
+ if (region)
+ {
+ std::vector<LLBBox> boxes;
+ boxes.push_back(mBoundingBox);
+ result = region->objectsCrossParcel(boxes);
+ }
+
+ return result;
+}
+
+LLFloaterObjectWeights::LLFloaterObjectWeights(const LLSD& key)
+: LLFloater(key),
+ mSelectedObjects(NULL),
+ mSelectedPrims(NULL),
+ mSelectedDownloadWeight(NULL),
+ mSelectedPhysicsWeight(NULL),
+ mSelectedServerWeight(NULL),
+ mSelectedDisplayWeight(NULL),
+ mSelectedOnLand(NULL),
+ mRezzedOnLand(NULL),
+ mRemainingCapacity(NULL),
+ mTotalCapacity(NULL)
+{
+}
+
+LLFloaterObjectWeights::~LLFloaterObjectWeights()
+{
+}
+
+// virtual
+BOOL LLFloaterObjectWeights::postBuild()
+{
+ mSelectedObjects = getChild<LLTextBox>("objects");
+ mSelectedPrims = getChild<LLTextBox>("prims");
+
+ mSelectedDownloadWeight = getChild<LLTextBox>("download");
+ mSelectedPhysicsWeight = getChild<LLTextBox>("physics");
+ mSelectedServerWeight = getChild<LLTextBox>("server");
+ mSelectedDisplayWeight = getChild<LLTextBox>("display");
+
+ mSelectedOnLand = getChild<LLTextBox>("selected");
+ mRezzedOnLand = getChild<LLTextBox>("rezzed_on_land");
+ mRemainingCapacity = getChild<LLTextBox>("remaining_capacity");
+ mTotalCapacity = getChild<LLTextBox>("total_capacity");
+
+ return TRUE;
+}
+
+// virtual
+void LLFloaterObjectWeights::onOpen(const LLSD& key)
+{
+ refresh();
+ updateLandImpacts(LLViewerParcelMgr::getInstance()->getFloatingParcelSelection()->getParcel());
+}
+
+// virtual
+void LLFloaterObjectWeights::onWeightsUpdate(const SelectionCost& selection_cost)
+{
+ mSelectedDownloadWeight->setText(llformat("%.1f", selection_cost.mNetworkCost));
+ mSelectedPhysicsWeight->setText(llformat("%.1f", selection_cost.mPhysicsCost));
+ mSelectedServerWeight->setText(llformat("%.1f", selection_cost.mSimulationCost));
+
+ S32 render_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectRenderCost();
+ mSelectedDisplayWeight->setText(llformat("%d", render_cost));
+
+ toggleWeightsLoadingIndicators(false);
+}
+
+//virtual
+void LLFloaterObjectWeights::setErrorStatus(U32 status, const std::string& reason)
+{
+ const std::string text = getString("nothing_selected");
+
+ mSelectedDownloadWeight->setText(text);
+ mSelectedPhysicsWeight->setText(text);
+ mSelectedServerWeight->setText(text);
+ mSelectedDisplayWeight->setText(text);
+
+ toggleWeightsLoadingIndicators(false);
+}
+
+void LLFloaterObjectWeights::updateLandImpacts(const LLParcel* parcel)
+{
+ if (!parcel || LLSelectMgr::getInstance()->getSelection()->isEmpty())
+ {
+ updateIfNothingSelected();
+ }
+ else
+ {
+ S32 rezzed_prims = parcel->getSimWidePrimCount();
+ S32 total_capacity = parcel->getSimWideMaxPrimCapacity();
+
+ mRezzedOnLand->setText(llformat("%d", rezzed_prims));
+ mRemainingCapacity->setText(llformat("%d", total_capacity - rezzed_prims));
+ mTotalCapacity->setText(llformat("%d", total_capacity));
+
+ toggleLandImpactsLoadingIndicators(false);
+ }
+}
+
+void LLFloaterObjectWeights::refresh()
+{
+ LLSelectMgr* sel_mgr = LLSelectMgr::getInstance();
+
+ if (sel_mgr->getSelection()->isEmpty())
+ {
+ updateIfNothingSelected();
+ }
+ else
+ {
+ S32 prim_count = sel_mgr->getSelection()->getObjectCount();
+ S32 link_count = sel_mgr->getSelection()->getRootObjectCount();
+ F32 prim_equiv = sel_mgr->getSelection()->getSelectedLinksetCost();
+
+ mSelectedObjects->setText(llformat("%d", link_count));
+ mSelectedPrims->setText(llformat("%d", prim_count));
+ mSelectedOnLand->setText(llformat("%.1d", (S32)prim_equiv));
+
+ LLCrossParcelFunctor func;
+ if (sel_mgr->getSelection()->applyToRootObjects(&func, true))
+ {
+ // Some of the selected objects cross parcel bounds.
+ // We don't display object weights and land impacts in this case.
+ const std::string text = getString("nothing_selected");
+
+ mRezzedOnLand->setText(text);
+ mRemainingCapacity->setText(text);
+ mTotalCapacity->setText(text);
+
+ toggleLandImpactsLoadingIndicators(false);
+ }
+
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region && region->capabilitiesReceived())
+ {
+ for (LLObjectSelection::valid_root_iterator iter = sel_mgr->getSelection()->valid_root_begin();
+ iter != sel_mgr->getSelection()->valid_root_end(); ++iter)
+ {
+ LLAccountingCostManager::getInstance()->addObject((*iter)->getObject()->getID());
+ }
+
+ std::string url = region->getCapability("ResourceCostSelected");
+ if (!url.empty())
+ {
+ // Update the transaction id before the new fetch request
+ generateTransactionID();
+
+ LLAccountingCostManager::getInstance()->fetchCosts(Roots, url, getObserverHandle());
+ toggleWeightsLoadingIndicators(true);
+ }
+ }
+ else
+ {
+ llwarns << "Failed to get region capabilities" << llendl;
+ }
+ }
+}
+
+// virtual
+void LLFloaterObjectWeights::generateTransactionID()
+{
+ mTransactionID.generate();
+}
+
+void LLFloaterObjectWeights::toggleWeightsLoadingIndicators(bool visible)
+{
+ childSetVisible("download_loading_indicator", visible);
+ childSetVisible("physics_loading_indicator", visible);
+ childSetVisible("server_loading_indicator", visible);
+ childSetVisible("display_loading_indicator", visible);
+
+ mSelectedDownloadWeight->setVisible(!visible);
+ mSelectedPhysicsWeight->setVisible(!visible);
+ mSelectedServerWeight->setVisible(!visible);
+ mSelectedDisplayWeight->setVisible(!visible);
+}
+
+void LLFloaterObjectWeights::toggleLandImpactsLoadingIndicators(bool visible)
+{
+ childSetVisible("selected_loading_indicator", visible);
+ childSetVisible("rezzed_on_land_loading_indicator", visible);
+ childSetVisible("remaining_capacity_loading_indicator", visible);
+ childSetVisible("total_capacity_loading_indicator", visible);
+
+ mSelectedOnLand->setVisible(!visible);
+ mRezzedOnLand->setVisible(!visible);
+ mRemainingCapacity->setVisible(!visible);
+ mTotalCapacity->setVisible(!visible);
+}
+
+void LLFloaterObjectWeights::updateIfNothingSelected()
+{
+ const std::string text = getString("nothing_selected");
+
+ mSelectedObjects->setText(text);
+ mSelectedPrims->setText(text);
+
+ mSelectedDownloadWeight->setText(text);
+ mSelectedPhysicsWeight->setText(text);
+ mSelectedServerWeight->setText(text);
+ mSelectedDisplayWeight->setText(text);
+
+ mSelectedOnLand->setText(text);
+ mRezzedOnLand->setText(text);
+ mRemainingCapacity->setText(text);
+ mTotalCapacity->setText(text);
+
+ toggleWeightsLoadingIndicators(false);
+ toggleLandImpactsLoadingIndicators(false);
+}
diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h
new file mode 100644
index 0000000000..9a244573be
--- /dev/null
+++ b/indra/newview/llfloaterobjectweights.h
@@ -0,0 +1,93 @@
+/**
+ * @file llfloaterobjectweights.h
+ * @brief Object weights advanced view floater
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATEROBJECTWEIGHTS_H
+#define LL_LLFLOATEROBJECTWEIGHTS_H
+
+#include "llfloater.h"
+
+#include "llaccountingcostmanager.h"
+#include "llselectmgr.h"
+
+class LLParcel;
+class LLTextBox;
+
+/**
+ * struct LLCrossParcelFunctor
+ *
+ * A functor that checks whether a bounding box for all
+ * selected objects crosses a region or parcel bounds.
+ */
+struct LLCrossParcelFunctor : public LLSelectedObjectFunctor
+{
+ /*virtual*/ bool apply(LLViewerObject* obj);
+
+private:
+ LLBBox mBoundingBox;
+};
+
+
+class LLFloaterObjectWeights : public LLFloater, LLAccountingCostObserver
+{
+public:
+ LOG_CLASS(LLFloaterObjectWeights);
+
+ LLFloaterObjectWeights(const LLSD& key);
+ ~LLFloaterObjectWeights();
+
+ /*virtual*/ BOOL postBuild();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ /*virtual*/ void onWeightsUpdate(const SelectionCost& selection_cost);
+ /*virtual*/ void setErrorStatus(U32 status, const std::string& reason);
+
+ void updateLandImpacts(const LLParcel* parcel);
+ void refresh();
+
+private:
+ /*virtual*/ void generateTransactionID();
+
+ void toggleWeightsLoadingIndicators(bool visible);
+ void toggleLandImpactsLoadingIndicators(bool visible);
+
+ void updateIfNothingSelected();
+
+ LLTextBox *mSelectedObjects;
+ LLTextBox *mSelectedPrims;
+
+ LLTextBox *mSelectedDownloadWeight;
+ LLTextBox *mSelectedPhysicsWeight;
+ LLTextBox *mSelectedServerWeight;
+ LLTextBox *mSelectedDisplayWeight;
+
+ LLTextBox *mSelectedOnLand;
+ LLTextBox *mRezzedOnLand;
+ LLTextBox *mRemainingCapacity;
+ LLTextBox *mTotalCapacity;
+};
+
+#endif //LL_LLFLOATEROBJECTWEIGHTS_H
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
deleted file mode 100644
index dd0b1d999c..0000000000
--- a/indra/newview/llfloaterpostcard.cpp
+++ /dev/null
@@ -1,384 +0,0 @@
-/**
- * @file llfloaterpostcard.cpp
- * @brief Postcard send floater, allows setting name, e-mail address, etc.
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterpostcard.h"
-
-#include "llfontgl.h"
-#include "llsys.h"
-#include "llgl.h"
-#include "v3dmath.h"
-#include "lldir.h"
-
-#include "llagent.h"
-#include "llui.h"
-#include "lllineeditor.h"
-#include "llbutton.h"
-#include "lltexteditor.h"
-#include "llfloaterreg.h"
-#include "llnotificationsutil.h"
-#include "llviewercontrol.h"
-#include "llviewernetwork.h"
-#include "lluictrlfactory.h"
-#include "lluploaddialog.h"
-#include "llviewerstats.h"
-#include "llviewerwindow.h"
-#include "llstatusbar.h"
-#include "llviewerregion.h"
-#include "lleconomy.h"
-#include "message.h"
-
-#include "llimagejpeg.h"
-#include "llimagej2c.h"
-#include "llvfile.h"
-#include "llvfs.h"
-#include "llviewertexture.h"
-#include "llassetuploadresponders.h"
-#include "llagentui.h"
-
-#include <boost/regex.hpp> //boost.regex lib
-
-///----------------------------------------------------------------------------
-/// Local function declarations, constants, enums, and typedefs
-///----------------------------------------------------------------------------
-
-///----------------------------------------------------------------------------
-/// Class LLFloaterPostcard
-///----------------------------------------------------------------------------
-
-LLFloaterPostcard::LLFloaterPostcard(const LLSD& key)
-: LLFloater(key),
- mJPEGImage(NULL),
- mViewerImage(NULL),
- mHasFirstMsgFocus(false)
-{
-}
-
-// Destroys the object
-LLFloaterPostcard::~LLFloaterPostcard()
-{
- mJPEGImage = NULL; // deletes image
-}
-
-BOOL LLFloaterPostcard::postBuild()
-{
- // pick up the user's up-to-date email address
- gAgent.sendAgentUserInfoRequest();
-
- childSetAction("cancel_btn", onClickCancel, this);
- childSetAction("send_btn", onClickSend, this);
-
- getChildView("from_form")->setEnabled(FALSE);
-
- std::string name_string;
- LLAgentUI::buildFullname(name_string);
- getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
-
- // For the first time a user focusess to .the msg box, all text will be selected.
- getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(onMsgFormFocusRecieved, _1, this));
-
- getChild<LLUICtrl>("to_form")->setFocus(TRUE);
-
- return TRUE;
-}
-
-// static
-LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2 &image_scale, const LLVector3d& pos_taken_global)
-{
- // Take the images from the caller
- // It's now our job to clean them up
- LLFloaterPostcard* instance = LLFloaterReg::showTypedInstance<LLFloaterPostcard>("postcard", LLSD(img->getID()));
-
- if (instance) // may be 0 if we're in mouselook mode
- {
- instance->mJPEGImage = jpeg;
- instance->mViewerImage = img;
- instance->mImageScale = image_scale;
- instance->mPosTakenGlobal = pos_taken_global;
- }
-
- return instance;
-}
-
-void LLFloaterPostcard::draw()
-{
- LLGLSUIDefault gls_ui;
- LLFloater::draw();
-
- if(!isMinimized() && mViewerImage.notNull() && mJPEGImage.notNull())
- {
- // Force the texture to be 100% opaque when the floater is focused.
- F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
- LLRect rect(getRect());
-
- // first set the max extents of our preview
- rect.translate(-rect.mLeft, -rect.mBottom);
- rect.mLeft += 280;
- rect.mRight -= 10;
- rect.mTop -= 20;
- rect.mBottom = rect.mTop - 130;
-
- // then fix the aspect ratio
- F32 ratio = (F32)mJPEGImage->getWidth() / (F32)mJPEGImage->getHeight();
- if ((F32)rect.getWidth() / (F32)rect.getHeight() >= ratio)
- {
- rect.mRight = LLRect::tCoordType((F32)rect.mLeft + ((F32)rect.getHeight() * ratio));
- }
- else
- {
- rect.mBottom = LLRect::tCoordType((F32)rect.mTop - ((F32)rect.getWidth() / ratio));
- }
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f) % alpha);
- rect.stretch(-1);
- }
- {
-
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
- {
- glScalef(mImageScale.mV[VX], mImageScale.mV[VY], 1.f);
- glMatrixMode(GL_MODELVIEW);
- gl_draw_scaled_image(rect.mLeft,
- rect.mBottom,
- rect.getWidth(),
- rect.getHeight(),
- mViewerImage.get(),
- LLColor4::white % alpha);
- }
- glMatrixMode(GL_TEXTURE);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- }
- }
-}
-
-// static
-void LLFloaterPostcard::onClickCancel(void* data)
-{
- if (data)
- {
- LLFloaterPostcard *self = (LLFloaterPostcard *)data;
-
- self->closeFloater(false);
- }
-}
-
-class LLSendPostcardResponder : public LLAssetUploadResponder
-{
-public:
- LLSendPostcardResponder(const LLSD &post_data,
- const LLUUID& vfile_id,
- LLAssetType::EType asset_type):
- LLAssetUploadResponder(post_data, vfile_id, asset_type)
- {
- }
- // *TODO define custom uploadFailed here so it's not such a generic message
- void uploadComplete(const LLSD& content)
- {
- // we don't care about what the server returns from this post, just clean up the UI
- LLUploadDialog::modalUploadFinished();
- }
-};
-
-// static
-void LLFloaterPostcard::onClickSend(void* data)
-{
- if (data)
- {
- LLFloaterPostcard *self = (LLFloaterPostcard *)data;
-
- std::string from(self->getChild<LLUICtrl>("from_form")->getValue().asString());
- std::string to(self->getChild<LLUICtrl>("to_form")->getValue().asString());
-
- boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
-
- if (to.empty() || !boost::regex_match(to, emailFormat))
- {
- LLNotificationsUtil::add("PromptRecipientEmail");
- return;
- }
-
- if (from.empty() || !boost::regex_match(from, emailFormat))
- {
- LLNotificationsUtil::add("PromptSelfEmail");
- return;
- }
-
- std::string subject(self->getChild<LLUICtrl>("subject_form")->getValue().asString());
- if(subject.empty() || !self->mHasFirstMsgFocus)
- {
- LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2));
- return;
- }
-
- if (self->mJPEGImage.notNull())
- {
- self->sendPostcard();
- }
- else
- {
- LLNotificationsUtil::add("ErrorProcessingSnapshot");
- }
- }
-}
-
-// static
-void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
-{
- LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
-
- LLUploadDialog::modalUploadFinished();
-
- if (result)
- {
- LLSD args;
- args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
- LLNotificationsUtil::add("ErrorUploadingPostcard", args);
- }
- else
- {
- // only create the postcard once the upload succeeds
-
- // request the postcard
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("SendPostcard");
- msg->nextBlock("AgentData");
- msg->addUUID("AgentID", gAgent.getID());
- msg->addUUID("SessionID", gAgent.getSessionID());
- msg->addUUID("AssetID", self->mAssetID);
- msg->addVector3d("PosGlobal", self->mPosTakenGlobal);
- msg->addString("To", self->getChild<LLUICtrl>("to_form")->getValue().asString());
- msg->addString("From", self->getChild<LLUICtrl>("from_form")->getValue().asString());
- msg->addString("Name", self->getChild<LLUICtrl>("name_form")->getValue().asString());
- msg->addString("Subject", self->getChild<LLUICtrl>("subject_form")->getValue().asString());
- msg->addString("Msg", self->getChild<LLUICtrl>("msg_form")->getValue().asString());
- msg->addBOOL("AllowPublish", FALSE);
- msg->addBOOL("MaturePublish", FALSE);
- gAgent.sendReliableMessage();
- }
-
- self->closeFloater();
-}
-
-// static
-void LLFloaterPostcard::updateUserInfo(const std::string& email)
-{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("postcard");
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin();
- iter != inst_list.end(); ++iter)
- {
- LLFloater* instance = *iter;
- const std::string& text = instance->getChild<LLUICtrl>("from_form")->getValue().asString();
- if (text.empty())
- {
- // there's no text in this field yet, pre-populate
- instance->getChild<LLUICtrl>("from_form")->setValue(LLSD(email));
- }
- }
-}
-
-void LLFloaterPostcard::onMsgFormFocusRecieved(LLFocusableElement* receiver, void* data)
-{
- LLFloaterPostcard* self = (LLFloaterPostcard *)data;
- if(self)
- {
- LLTextEditor* msgForm = self->getChild<LLTextEditor>("msg_form");
- if(msgForm && msgForm == receiver && msgForm->hasFocus() && !(self->mHasFirstMsgFocus))
- {
- self->mHasFirstMsgFocus = true;
- msgForm->setText(LLStringUtil::null);
- }
- }
-}
-
-bool LLFloaterPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if(0 == option)
- {
- // User clicked OK
- if((getChild<LLUICtrl>("subject_form")->getValue().asString()).empty())
- {
- // Stuff the subject back into the form.
- getChild<LLUICtrl>("subject_form")->setValue(getString("default_subject"));
- }
-
- if(!mHasFirstMsgFocus)
- {
- // The user never switched focus to the messagee window.
- // Using the default string.
- getChild<LLUICtrl>("msg_form")->setValue(getString("default_message"));
- }
-
- sendPostcard();
- }
- return false;
-}
-
-void LLFloaterPostcard::sendPostcard()
-{
- mTransactionID.generate();
- mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID());
- LLVFile::writeFile(mJPEGImage->getData(), mJPEGImage->getDataSize(), gVFS, mAssetID, LLAssetType::AT_IMAGE_JPEG);
-
- // upload the image
- std::string url = gAgent.getRegion()->getCapability("SendPostcard");
- if(!url.empty())
- {
- llinfos << "Send Postcard via capability" << llendl;
- LLSD body = LLSD::emptyMap();
- // the capability already encodes: agent ID, region ID
- body["pos-global"] = mPosTakenGlobal.getValue();
- body["to"] = getChild<LLUICtrl>("to_form")->getValue().asString();
- body["from"] = getChild<LLUICtrl>("from_form")->getValue().asString();
- body["name"] = getChild<LLUICtrl>("name_form")->getValue().asString();
- body["subject"] = getChild<LLUICtrl>("subject_form")->getValue().asString();
- body["msg"] = getChild<LLUICtrl>("msg_form")->getValue().asString();
- LLHTTPClient::post(url, body, new LLSendPostcardResponder(body, mAssetID, LLAssetType::AT_IMAGE_JPEG));
- }
- else
- {
- gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE);
- }
-
- // give user feedback of the event
- gViewerWindow->playSnapshotAnimAndSound();
- LLUploadDialog::modalUploadDialog(getString("upload_message"));
-
- // don't destroy the window until the upload is done
- // this way we keep the information in the form
- setVisible(FALSE);
-
- // also remove any dependency on another floater
- // so that we can be sure to outlive it while we
- // need to.
- LLFloater* dependee = getDependee();
- if (dependee)
- dependee->removeDependentFloater(this);
-}
diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h
deleted file mode 100644
index 472592154f..0000000000
--- a/indra/newview/llfloaterpostcard.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file llfloaterpostcard.h
- * @brief Postcard send floater, allows setting name, e-mail address, etc.
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATERPOSTCARD_H
-#define LL_LLFLOATERPOSTCARD_H
-
-#include "llfloater.h"
-#include "llcheckboxctrl.h"
-
-#include "llpointer.h"
-
-class LLTextEditor;
-class LLLineEditor;
-class LLButton;
-class LLViewerTexture;
-class LLImageJPEG;
-
-class LLFloaterPostcard
-: public LLFloater
-{
-public:
- LLFloaterPostcard(const LLSD& key);
- virtual ~LLFloaterPostcard();
-
- virtual BOOL postBuild();
- virtual void draw();
-
- static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global);
-
- static void onClickCancel(void* data);
- static void onClickSend(void* data);
-
- static void uploadCallback(const LLUUID& asset_id,
- void *user_data,
- S32 result, LLExtStat ext_status);
-
- static void updateUserInfo(const std::string& email);
-
- static void onMsgFormFocusRecieved(LLFocusableElement* receiver, void* data);
- bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response);
-
- void sendPostcard();
-
-private:
-
- LLPointer<LLImageJPEG> mJPEGImage;
- LLPointer<LLViewerTexture> mViewerImage;
- LLTransactionID mTransactionID;
- LLAssetID mAssetID;
- LLVector2 mImageScale;
- LLVector3d mPosTakenGlobal;
- bool mHasFirstMsgFocus;
-};
-
-
-#endif // LL_LLFLOATERPOSTCARD_H
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 7848484ac6..a333989e7e 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -50,6 +50,7 @@
#include "llfloaterreg.h"
#include "llfloaterabout.h"
#include "llfloaterhardwaresettings.h"
+#include "llfloatersidepanelcontainer.h"
#include "llimfloater.h"
#include "llkeyboard.h"
#include "llmodaldialog.h"
@@ -66,7 +67,6 @@
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llsliderctrl.h"
-#include "llsidetray.h"
#include "lltabcontainer.h"
#include "lltrans.h"
#include "llviewercontrol.h"
@@ -105,6 +105,7 @@
#include "llviewermedia.h"
#include "llpluginclassmedia.h"
#include "llteleporthistorystorage.h"
+#include "llproxy.h"
#include "lllogininstance.h" // to check if logged in yet
#include "llsdserialize.h"
@@ -158,7 +159,7 @@ BOOL LLVoiceSetKeyDialog::handleKeyHere(KEY key, MASK mask)
{
BOOL result = TRUE;
- if(key == 'Q' && mask == MASK_CONTROL)
+ if (key == 'Q' && mask == MASK_CONTROL)
{
result = FALSE;
}
@@ -303,7 +304,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mOriginalIMViaEmail(false),
mLanguageChanged(false),
mAvatarDataInitialized(false),
- mDoubleClickActionDirty(false)
+ mClickActionDirty(false)
{
//Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
@@ -333,21 +334,22 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this));
mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this));
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
- mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this));
- mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
- mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
- mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
- mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));
- mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
+ mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this));
+ mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
+ mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
+ mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
+ mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));
+ mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this));
mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this));
+ mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this));
+ mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this));
sSkin = gSavedSettings.getString("SkinCurrent");
- mCommitCallbackRegistrar.add("Pref.CommitDoubleClickChekbox", boost::bind(&LLFloaterPreference::onDoubleClickCheckBox, this, _1));
- mCommitCallbackRegistrar.add("Pref.CommitRadioDoubleClick", boost::bind(&LLFloaterPreference::onDoubleClickRadio, this));
+ mCommitCallbackRegistrar.add("Pref.ClickActionChange", boost::bind(&LLFloaterPreference::onClickActionChange, this));
gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
@@ -437,8 +439,6 @@ BOOL LLFloaterPreference::postBuild()
if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
tabcontainer->selectFirstTab();
- updateDoubleClickControls();
-
getChild<LLUICtrl>("cache_location")->setEnabled(FALSE); // make it read-only but selectable (STORM-227)
std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
setCacheLocation(cache_location);
@@ -457,7 +457,7 @@ BOOL LLFloaterPreference::postBuild()
void LLFloaterPreference::onBusyResponseChanged()
{
// set "BusyResponseChanged" TRUE if user edited message differs from default, FALSE otherwise
- if(LLTrans::getString("BusyModeResponseDefault") != getChild<LLUICtrl>("busy_response")->getValue().asString())
+ if (LLTrans::getString("BusyModeResponseDefault") != getChild<LLUICtrl>("busy_response")->getValue().asString())
{
gSavedPerAccountSettings.setBOOL("BusyResponseChanged", TRUE );
}
@@ -539,7 +539,7 @@ void LLFloaterPreference::apply()
LLViewerMedia::setCookiesEnabled(getChild<LLUICtrl>("cookies_enabled")->getValue());
- if(hasChild("web_proxy_enabled") &&hasChild("web_proxy_editor") && hasChild("web_proxy_port"))
+ if (hasChild("web_proxy_enabled") &&hasChild("web_proxy_editor") && hasChild("web_proxy_port"))
{
bool proxy_enable = getChild<LLUICtrl>("web_proxy_enabled")->getValue();
std::string proxy_address = getChild<LLUICtrl>("web_proxy_editor")->getValue();
@@ -552,13 +552,13 @@ void LLFloaterPreference::apply()
gSavedSettings.setBOOL("PlainTextChatHistory", getChild<LLUICtrl>("plain_text_chat_history")->getValue().asBoolean());
- if(mGotPersonalInfo)
+ if (mGotPersonalInfo)
{
// gSavedSettings.setString("BusyModeResponse2", std::string(wstring_to_utf8str(busy_response)));
bool new_im_via_email = getChild<LLUICtrl>("send_im_to_email")->getValue().asBoolean();
bool new_hide_online = getChild<LLUICtrl>("online_visibility")->getValue().asBoolean();
- if((new_im_via_email != mOriginalIMViaEmail)
+ if ((new_im_via_email != mOriginalIMViaEmail)
||(new_hide_online != mOriginalHideOnlineStatus))
{
// This hack is because we are representing several different
@@ -566,23 +566,23 @@ void LLFloaterPreference::apply()
// can only select between 2 values, we represent it as a
// checkbox. This breaks down a little bit for liaisons, but
// works out in the end.
- if(new_hide_online != mOriginalHideOnlineStatus)
- {
- if(new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN;
+ if (new_hide_online != mOriginalHideOnlineStatus)
+ {
+ if (new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN;
else mDirectoryVisibility = VISIBILITY_DEFAULT;
//Update showonline value, otherwise multiple applys won't work
mOriginalHideOnlineStatus = new_hide_online;
- }
+ }
gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility);
}
}
saveAvatarProperties();
- if (mDoubleClickActionDirty)
+ if (mClickActionDirty)
{
- updateDoubleClickSettings();
- mDoubleClickActionDirty = false;
+ updateClickActionSettings();
+ mClickActionDirty = false;
}
}
@@ -600,6 +600,9 @@ void LLFloaterPreference::cancel()
}
// hide joystick pref floater
LLFloaterReg::hideInstance("pref_joystick");
+
+ // hide translation settings floater
+ LLFloaterReg::hideInstance("prefs_translation");
// cancel hardware menu
LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance<LLFloaterHardwareSettings>("prefs_hardware_settings");
@@ -611,10 +614,16 @@ void LLFloaterPreference::cancel()
// reverts any changes to current skin
gSavedSettings.setString("SkinCurrent", sSkin);
- if (mDoubleClickActionDirty)
+ if (mClickActionDirty)
{
- updateDoubleClickControls();
- mDoubleClickActionDirty = false;
+ updateClickActionControls();
+ mClickActionDirty = false;
+ }
+
+ LLFloaterPreferenceProxy * advanced_proxy_settings = LLFloaterReg::findTypedInstance<LLFloaterPreferenceProxy>("prefs_proxy");
+ if (advanced_proxy_settings)
+ {
+ advanced_proxy_settings->cancel();
}
}
@@ -675,6 +684,9 @@ void LLFloaterPreference::onOpen(const LLSD& key)
// Display selected maturity icons.
onChangeMaturity();
+ // Load (double-)click to walk/teleport settings.
+ updateClickActionControls();
+
// Enabled/disabled popups, might have been changed by user actions
// while preferences floater was closed.
buildPopupLists();
@@ -751,10 +763,7 @@ void LLFloaterPreference::onBtnOK()
closeFloater(false);
LLUIColorTable::instance().saveUserSettings();
- gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
- std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
- // save all settings, even if equals defaults
- gCrashSettings.saveToFile(crash_settings_filename, FALSE);
+ gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
}
else
{
@@ -802,7 +811,7 @@ void LLFloaterPreference::onBtnCancel()
void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email)
{
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
- if(instance)
+ if (instance)
{
instance->setPersonalInfo(visibility, im_via_email, email);
}
@@ -812,7 +821,7 @@ void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_
void LLFloaterPreference::refreshEnabledGraphics()
{
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
- if(instance)
+ if (instance)
{
instance->refresh();
//instance->refreshEnabledState();
@@ -1099,7 +1108,7 @@ void LLFloaterPreference::disableUnavailableSettings()
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
// if vertex shaders off, disable all shader related products
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
{
ctrl_shader_enable->setEnabled(FALSE);
ctrl_shader_enable->setValue(FALSE);
@@ -1130,7 +1139,7 @@ void LLFloaterPreference::disableUnavailableSettings()
}
// disabled windlight
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
{
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
@@ -1167,28 +1176,28 @@ void LLFloaterPreference::disableUnavailableSettings()
}
// disabled deferred SSAO
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"))
{
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
}
// disabled deferred shadows
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail"))
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);
}
// disabled reflections
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail"))
{
ctrl_reflections->setEnabled(FALSE);
ctrl_reflections->setValue(FALSE);
}
// disabled av
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP"))
{
ctrl_avatar_vp->setEnabled(FALSE);
ctrl_avatar_vp->setValue(FALSE);
@@ -1211,14 +1220,14 @@ void LLFloaterPreference::disableUnavailableSettings()
}
// disabled cloth
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth"))
{
ctrl_avatar_cloth->setEnabled(FALSE);
ctrl_avatar_cloth->setValue(FALSE);
}
// disabled impostors
- if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors"))
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors"))
{
ctrl_avatar_impostors->setEnabled(FALSE);
ctrl_avatar_impostors->setValue(FALSE);
@@ -1384,12 +1393,12 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
mOriginalIMViaEmail = im_via_email;
mDirectoryVisibility = visibility;
- if(visibility == VISIBILITY_DEFAULT)
+ if (visibility == VISIBILITY_DEFAULT)
{
mOriginalHideOnlineStatus = false;
getChildView("online_visibility")->setEnabled(TRUE);
}
- else if(visibility == VISIBILITY_HIDDEN)
+ else if (visibility == VISIBILITY_HIDDEN)
{
mOriginalHideOnlineStatus = true;
getChildView("online_visibility")->setEnabled(TRUE);
@@ -1437,7 +1446,7 @@ void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name)
{
std::string ctrl_name = name.asString();
- if((ctrl_name =="" )|| !hasChild(ctrl_name, true))
+ if ((ctrl_name =="" )|| !hasChild(ctrl_name, true))
return;
LLTextBox* text_box = getChild<LLTextBox>(name.asString());
@@ -1447,7 +1456,7 @@ void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name)
void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
{
- if(text_box == NULL || ctrl== NULL)
+ if (text_box == NULL || ctrl== NULL)
return;
// get range and points when text should change
@@ -1460,7 +1469,7 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b
F32 highPoint = min + (2.0f * range / 3.0f);
// choose the right text
- if(value < midPoint)
+ if (value < midPoint)
{
text_box->setText(LLTrans::getString("GraphicsQualityLow"));
}
@@ -1492,74 +1501,42 @@ void LLFloaterPreference::onChangeMaturity()
// but the UI for this will still be enabled
void LLFloaterPreference::onClickBlockList()
{
- // don't create side tray on demand
- if (LLSideTray::instanceCreated())
- {
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray");
- }
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
}
-void LLFloaterPreference::onDoubleClickCheckBox(LLUICtrl* ctrl)
+void LLFloaterPreference::onClickProxySettings()
{
- if (!ctrl) return;
- mDoubleClickActionDirty = true;
- LLRadioGroup* radio_double_click_action = getChild<LLRadioGroup>("double_click_action");
- if (!radio_double_click_action) return;
- // select default value("teleport") in radio-group.
- radio_double_click_action->setSelectedIndex(0);
- // set radio-group enabled depending on state of checkbox
- radio_double_click_action->setEnabled(ctrl->getValue());
+ LLFloaterReg::showInstance("prefs_proxy");
}
-void LLFloaterPreference::onDoubleClickRadio()
+void LLFloaterPreference::onClickTranslationSettings()
{
- mDoubleClickActionDirty = true;
+ LLFloaterReg::showInstance("prefs_translation");
}
-void LLFloaterPreference::updateDoubleClickSettings()
+void LLFloaterPreference::onClickActionChange()
{
- LLCheckBoxCtrl* double_click_action_cb = getChild<LLCheckBoxCtrl>("double_click_chkbox");
- if (!double_click_action_cb) return;
- bool enable = double_click_action_cb->getValue().asBoolean();
+ mClickActionDirty = true;
+}
- LLRadioGroup* radio_double_click_action = getChild<LLRadioGroup>("double_click_action");
- if (!radio_double_click_action) return;
-
- // enable double click radio-group depending on state of checkbox
- radio_double_click_action->setEnabled(enable);
-
- if (!enable)
- {
- // set double click action settings values to false if checkbox was unchecked
- gSavedSettings.setBOOL("DoubleClickAutoPilot", false);
- gSavedSettings.setBOOL("DoubleClickTeleport", false);
- }
- else
- {
- std::string selected = radio_double_click_action->getValue().asString();
- bool teleport_selected = selected == "radio_teleport";
- // set double click action settings values depending on chosen radio-button
- gSavedSettings.setBOOL( "DoubleClickTeleport", teleport_selected );
- gSavedSettings.setBOOL( "DoubleClickAutoPilot", !teleport_selected );
- }
+void LLFloaterPreference::updateClickActionSettings()
+{
+ const int single_clk_action = getChild<LLComboBox>("single_click_action_combo")->getValue().asInteger();
+ const int double_clk_action = getChild<LLComboBox>("double_click_action_combo")->getValue().asInteger();
+
+ gSavedSettings.setBOOL("ClickToWalk", single_clk_action == 1);
+ gSavedSettings.setBOOL("DoubleClickAutoPilot", double_clk_action == 1);
+ gSavedSettings.setBOOL("DoubleClickTeleport", double_clk_action == 2);
}
-void LLFloaterPreference::updateDoubleClickControls()
+void LLFloaterPreference::updateClickActionControls()
{
- // check is one of double-click actions settings enabled
- bool double_click_action_enabled = gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport");
- LLCheckBoxCtrl* double_click_action_cb = getChild<LLCheckBoxCtrl>("double_click_chkbox");
- if (double_click_action_cb)
- {
- // check checkbox if one of double-click actions settings enabled, uncheck otherwise
- double_click_action_cb->setValue(double_click_action_enabled);
- }
- LLRadioGroup* double_click_action_radio = getChild<LLRadioGroup>("double_click_action");
- if (!double_click_action_radio) return;
- // set radio-group enabled if one of double-click actions settings enabled
- double_click_action_radio->setEnabled(double_click_action_enabled);
- // select button in radio-group depending on setting
- double_click_action_radio->setSelectedIndex(gSavedSettings.getBOOL("DoubleClickAutoPilot"));
+ const bool click_to_walk = gSavedSettings.getBOOL("ClickToWalk");
+ const bool dbl_click_to_walk = gSavedSettings.getBOOL("DoubleClickAutoPilot");
+ const bool dbl_click_to_teleport = gSavedSettings.getBOOL("DoubleClickTeleport");
+
+ getChild<LLComboBox>("single_click_action_combo")->setValue((int)click_to_walk);
+ getChild<LLComboBox>("double_click_action_combo")->setValue(dbl_click_to_teleport ? 2 : (int)dbl_click_to_walk);
}
void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
@@ -1640,7 +1617,7 @@ BOOL LLPanelPreference::postBuild()
{
////////////////////// PanelVoice ///////////////////
- if(hasChild("voice_unavailable"))
+ if (hasChild("voice_unavailable"))
{
BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice");
getChildView("voice_unavailable")->setVisible( voice_disabled);
@@ -1662,7 +1639,7 @@ BOOL LLPanelPreference::postBuild()
}
- if(hasChild("online_visibility") && hasChild("send_im_to_email"))
+ if (hasChild("online_visibility") && hasChild("send_im_to_email"))
{
getChild<LLUICtrl>("email_address")->setValue(getString("log_in_to_change") );
// getChild<LLUICtrl>("busy_response")->setValue(getString("log_in_to_change"));
@@ -1791,7 +1768,7 @@ void LLPanelPreference::cancel()
iter != mSavedColors.end(); ++iter)
{
LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>(iter->first);
- if(color_swatch)
+ if (color_swatch)
{
color_swatch->set(iter->second);
color_swatch->onCommit();
@@ -1835,7 +1812,7 @@ void LLPanelPreferenceGraphics::draw()
LLButton* button_apply = findChild<LLButton>("Apply");
- if(button_apply && button_apply->getVisible())
+ if (button_apply && button_apply->getVisible())
{
bool enable = hasDirtyChilds();
@@ -1855,7 +1832,7 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds()
LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview);
if (ctrl)
{
- if(ctrl->isDirty())
+ if (ctrl->isDirty())
return true;
}
// Push children onto the end of the work stack
@@ -1911,3 +1888,187 @@ void LLPanelPreferenceGraphics::setHardwareDefaults()
resetDirtyChilds();
LLPanelPreference::setHardwareDefaults();
}
+
+LLFloaterPreferenceProxy::LLFloaterPreferenceProxy(const LLSD& key)
+ : LLFloater(key),
+ mSocksSettingsDirty(false)
+{
+ mCommitCallbackRegistrar.add("Proxy.OK", boost::bind(&LLFloaterPreferenceProxy::onBtnOk, this));
+ mCommitCallbackRegistrar.add("Proxy.Cancel", boost::bind(&LLFloaterPreferenceProxy::onBtnCancel, this));
+ mCommitCallbackRegistrar.add("Proxy.Change", boost::bind(&LLFloaterPreferenceProxy::onChangeSocksSettings, this));
+}
+
+LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy()
+{
+}
+
+BOOL LLFloaterPreferenceProxy::postBuild()
+{
+ LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type");
+ if (!socksAuth)
+ {
+ return FALSE;
+ }
+ if (socksAuth->getSelectedValue().asString() == "None")
+ {
+ getChild<LLLineEditor>("socks5_username")->setEnabled(false);
+ getChild<LLLineEditor>("socks5_password")->setEnabled(false);
+ }
+ else
+ {
+ // Populate the SOCKS 5 credential fields with protected values.
+ LLPointer<LLCredential> socks_cred = gSecAPIHandler->loadCredential("SOCKS5");
+ getChild<LLLineEditor>("socks5_username")->setValue(socks_cred->getIdentifier()["username"].asString());
+ getChild<LLLineEditor>("socks5_password")->setValue(socks_cred->getAuthenticator()["creds"].asString());
+ }
+
+ return TRUE;
+}
+
+void LLFloaterPreferenceProxy::onOpen(const LLSD& key)
+{
+ saveSettings();
+}
+
+void LLFloaterPreferenceProxy::onClose(bool app_quitting)
+{
+ if (mSocksSettingsDirty)
+ {
+
+ // If the user plays with the Socks proxy settings after login, it's only fair we let them know
+ // it will not be updated until next restart.
+ if (LLStartUp::getStartupState()>STATE_LOGIN_WAIT)
+ {
+ LLNotifications::instance().add("ChangeProxySettings", LLSD(), LLSD());
+ mSocksSettingsDirty = false; // we have notified the user now be quiet again
+ }
+ }
+}
+
+void LLFloaterPreferenceProxy::saveSettings()
+{
+ // Save the value of all controls in the hierarchy
+ mSavedValues.clear();
+ std::list<LLView*> view_stack;
+ view_stack.push_back(this);
+ while(!view_stack.empty())
+ {
+ // Process view on top of the stack
+ LLView* curview = view_stack.front();
+ view_stack.pop_front();
+
+ LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview);
+ if (ctrl)
+ {
+ LLControlVariable* control = ctrl->getControlVariable();
+ if (control)
+ {
+ mSavedValues[control] = control->getValue();
+ }
+ }
+
+ // Push children onto the end of the work stack
+ for (child_list_t::const_iterator iter = curview->getChildList()->begin();
+ iter != curview->getChildList()->end(); ++iter)
+ {
+ view_stack.push_back(*iter);
+ }
+ }
+}
+
+void LLFloaterPreferenceProxy::onBtnOk()
+{
+ // commit any outstanding text entry
+ if (hasFocus())
+ {
+ LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
+ if (cur_focus && cur_focus->acceptsTextInput())
+ {
+ cur_focus->onCommit();
+ }
+ }
+
+ // Save SOCKS proxy credentials securely if password auth is enabled
+ LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type");
+ if (socksAuth->getSelectedValue().asString() == "UserPass")
+ {
+ LLSD socks_id = LLSD::emptyMap();
+ socks_id["type"] = "SOCKS5";
+ socks_id["username"] = getChild<LLLineEditor>("socks5_username")->getValue().asString();
+
+ LLSD socks_authenticator = LLSD::emptyMap();
+ socks_authenticator["type"] = "SOCKS5";
+ socks_authenticator["creds"] = getChild<LLLineEditor>("socks5_password")->getValue().asString();
+
+ // Using "SOCKS5" as the "grid" argument since the same proxy
+ // settings will be used for all grids and because there is no
+ // way to specify the type of credential.
+ LLPointer<LLCredential> socks_cred = gSecAPIHandler->createCredential("SOCKS5", socks_id, socks_authenticator);
+ gSecAPIHandler->saveCredential(socks_cred, true);
+ }
+ else
+ {
+ // Clear SOCKS5 credentials since they are no longer needed.
+ LLPointer<LLCredential> socks_cred = new LLCredential("SOCKS5");
+ gSecAPIHandler->deleteCredential(socks_cred);
+ }
+
+ closeFloater(false);
+}
+
+void LLFloaterPreferenceProxy::onBtnCancel()
+{
+ if (hasFocus())
+ {
+ LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
+ if (cur_focus && cur_focus->acceptsTextInput())
+ {
+ cur_focus->onCommit();
+ }
+ refresh();
+ }
+
+ cancel();
+}
+
+void LLFloaterPreferenceProxy::cancel()
+{
+
+ for (control_values_map_t::iterator iter = mSavedValues.begin();
+ iter != mSavedValues.end(); ++iter)
+ {
+ LLControlVariable* control = iter->first;
+ LLSD ctrl_value = iter->second;
+ control->set(ctrl_value);
+ }
+
+ closeFloater();
+}
+
+void LLFloaterPreferenceProxy::onChangeSocksSettings()
+{
+ mSocksSettingsDirty = true;
+
+ LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type");
+ if (socksAuth->getSelectedValue().asString() == "None")
+ {
+ getChild<LLLineEditor>("socks5_username")->setEnabled(false);
+ getChild<LLLineEditor>("socks5_password")->setEnabled(false);
+ }
+ else
+ {
+ getChild<LLLineEditor>("socks5_username")->setEnabled(true);
+ getChild<LLLineEditor>("socks5_password")->setEnabled(true);
+ }
+
+ // Check for invalid states for the other HTTP proxy radio
+ LLRadioGroup* otherHttpProxy = getChild<LLRadioGroup>("other_http_proxy_type");
+ if ((otherHttpProxy->getSelectedValue().asString() == "Socks" &&
+ getChild<LLCheckBoxCtrl>("socks_proxy_enabled")->get() == FALSE )||(
+ otherHttpProxy->getSelectedValue().asString() == "Web" &&
+ getChild<LLCheckBoxCtrl>("web_proxy_enabled")->get() == FALSE ) )
+ {
+ otherHttpProxy->selectFirstItem();
+ }
+
+};
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 61f2c78640..7ee3294478 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -104,14 +104,13 @@ protected:
void setHardwareDefaults();
// callback for when client turns on shaders
void onVertexShaderEnable();
- // callback for changing double click action checkbox
- void onDoubleClickCheckBox(LLUICtrl* ctrl);
- // callback for selecting double click action radio-button
- void onDoubleClickRadio();
- // updates double-click action settings depending on controls from preferences
- void updateDoubleClickSettings();
- // updates double-click action controls depending on values from settings.xml
- void updateDoubleClickControls();
+
+ // callback for commit in the "Single click on land" and "Double click on land" comboboxes.
+ void onClickActionChange();
+ // updates click/double-click action settings depending on controls values
+ void updateClickActionSettings();
+ // updates click/double-click action controls depending on values from settings.xml
+ void updateClickActionControls();
// This function squirrels away the current values of the controls so that
// cancel() can restore them.
@@ -156,6 +155,8 @@ public:
void applyResolution();
void onChangeMaturity();
void onClickBlockList();
+ void onClickProxySettings();
+ void onClickTranslationSettings();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
@@ -163,9 +164,7 @@ public:
static void refreshSkin(void* data);
private:
static std::string sSkin;
- // set true if state of double-click action checkbox or radio-group was changed by user
- // (reset back to false on apply or cancel)
- bool mDoubleClickActionDirty;
+ bool mClickActionDirty; ///< Set to true when the click/double-click options get changed by user.
bool mGotPersonalInfo;
bool mOriginalIMViaEmail;
bool mLanguageChanged;
@@ -229,4 +228,33 @@ protected:
};
+class LLFloaterPreferenceProxy : public LLFloater
+{
+public:
+ LLFloaterPreferenceProxy(const LLSD& key);
+ ~LLFloaterPreferenceProxy();
+
+ /// show off our menu
+ static void show();
+ void cancel();
+
+protected:
+ BOOL postBuild();
+ void onOpen(const LLSD& key);
+ void onClose(bool app_quitting);
+ void saveSettings();
+ void onBtnOk();
+ void onBtnCancel();
+
+ void onChangeSocksSettings();
+
+private:
+
+ bool mSocksSettingsDirty;
+ typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
+ control_values_map_t mSavedValues;
+
+};
+
+
#endif // LL_LLPREFERENCEFLOATER_H
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index dd12fa64d3..3f00ba39c7 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -887,18 +887,14 @@ void LLFloaterProperties::dirtyAll()
LLMultiProperties::LLMultiProperties()
: LLMultiFloater(LLSD())
{
- // *TODO: There should be a .xml file for this
- const LLRect& nextrect = LLFloaterReg::getFloaterRect("properties"); // place where the next properties should show up
- if (nextrect.getWidth() > 0)
- {
- setRect(nextrect);
- }
- else
- {
- // start with a small rect in the top-left corner ; will get resized
- LLRect rect;
- rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 20, 20);
- setRect(rect);
+ // start with a small rect in the top-left corner ; will get resized
+ LLRect rect;
+ rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 20, 20);
+ setRect(rect);
+ LLFloater* last_floater = LLFloaterReg::getLastFloaterInGroup("properties");
+ if (last_floater)
+ {
+ stackWith(*last_floater);
}
setTitle(LLTrans::getString("MultiPropertiesTitle"));
buildTabContainer();
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index bedc7ef704..676059779c 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -54,6 +54,7 @@
#include "llcombobox.h"
#include "lldaycyclemanager.h"
#include "llenvmanager.h"
+#include "llestateinfomodel.h"
#include "llfilepicker.h"
#include "llfloatergodtools.h" // for send_sim_wide_deletes()
#include "llfloatertopobjects.h" // added to fix SL-32336
@@ -171,30 +172,9 @@ bool estate_dispatch_initialized = false;
LLUUID LLFloaterRegionInfo::sRequestInvoice;
-void LLFloaterRegionInfo::onConsoleReplyReceived(const std::string& output)
-{
- llwarns << "here is what they're giving us: " << output << llendl;
-
- if (output.find("FALSE") != std::string::npos)
- {
- getChild<LLUICtrl>("mesh_rez_enabled_check")->setValue(FALSE);
- }
- else
- {
- getChild<LLUICtrl>("mesh_rez_enabled_check")->setValue(TRUE);
- }
-}
-
-
LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
: LLFloater(seed)
-{
- mConsoleReplySignalConnection = LLFloaterRegionDebugConsole::setConsoleReplyCallback(
- boost::bind(
- &LLFloaterRegionInfo::onConsoleReplyReceived,
- this,
- _1));
-}
+{}
BOOL LLFloaterRegionInfo::postBuild()
{
@@ -245,9 +225,7 @@ BOOL LLFloaterRegionInfo::postBuild()
}
LLFloaterRegionInfo::~LLFloaterRegionInfo()
-{
- mConsoleReplySignalConnection.disconnect();
-}
+{}
void LLFloaterRegionInfo::onOpen(const LLSD& key)
{
@@ -335,7 +313,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
LLViewerRegion* region = gAgent.getRegion();
BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
- // *TODO: Replace parcing msg with accessing the region info model.
+ // *TODO: Replace parsing msg with accessing the region info model.
LLRegionInfoModel& region_info = LLRegionInfoModel::instance();
// extract message
@@ -367,6 +345,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
msg->getSize("RegionInfo2", "ProductName") > 0)
{
msg->getString("RegionInfo2", "ProductName", sim_type);
+ LLTrans::findString(sim_type, sim_type); // try localizing sim product name
}
// GENERAL PANEL
@@ -636,9 +615,6 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region)
getChildView("im_btn")->setEnabled(allow_modify);
getChildView("manage_telehub_btn")->setEnabled(allow_modify);
- const bool enable_mesh = gMeshRepo.meshRezEnabled();
- getChildView("mesh_rez_enabled_check")->setVisible(enable_mesh);
- getChildView("mesh_rez_enabled_check")->setEnabled(getChildView("mesh_rez_enabled_check")->getEnabled() && enable_mesh);
// Data gets filled in by processRegionInfo
return LLPanelRegionInfo::refreshFromRegion(region);
@@ -657,7 +633,6 @@ BOOL LLPanelRegionGeneralInfo::postBuild()
initCtrl("access_combo");
initCtrl("restrict_pushobject");
initCtrl("block_parcel_search_check");
- initCtrl("mesh_rez_enabled_check");
childSetAction("kick_btn", boost::bind(&LLPanelRegionGeneralInfo::onClickKick, this));
childSetAction("kick_all_btn", onClickKickAll, this);
@@ -873,27 +848,6 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
sendEstateOwnerMessage(gMessageSystem, "setregioninfo", invoice, strings);
}
- std::string sim_console_url = gAgent.getRegion()->getCapability("SimConsoleAsync");
-
- if (!sim_console_url.empty())
- {
- std::string update_str = "set mesh_rez_enabled ";
- if (getChild<LLUICtrl>("mesh_rez_enabled_check")->getValue().asBoolean())
- {
- update_str += "true";
- }
- else
- {
- update_str += "false";
- }
-
- LLHTTPClient::post(
- sim_console_url,
- LLSD(update_str),
- new ConsoleUpdateResponder);
- }
-
-
// if we changed access levels, tell user about it
LLViewerRegion* region = gAgent.getRegion();
if (region && (getChild<LLUICtrl>("access_combo")->getValue().asInteger() != region->getSimAccess()) )
@@ -1363,6 +1317,9 @@ LLPanelEstateInfo::LLPanelEstateInfo()
: LLPanelRegionInfo(),
mEstateID(0) // invalid
{
+ LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
+ estate_info.setCommitCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
+ estate_info.setUpdateCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this));
}
// static
@@ -1385,29 +1342,6 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
estate_dispatch_initialized = true;
}
-#ifndef TMP_DISABLE_WLES
-// Disables the sun-hour slider and the use fixed time check if the use global time is check
-void LLPanelEstateInfo::onChangeUseGlobalTime()
-{
- bool enabled = !getChild<LLUICtrl>("use_global_time_check")->getValue().asBoolean();
- getChildView("sun_hour_slider")->setEnabled(enabled);
- getChildView("fixed_sun_check")->setEnabled(enabled);
- getChild<LLUICtrl>("fixed_sun_check")->setValue(LLSD(FALSE));
- enableButton("apply_btn");
-}
-
-// Enables the sun-hour slider if the fixed-sun checkbox is set
-void LLPanelEstateInfo::onChangeFixedSun()
-{
- bool enabled = !getChild<LLUICtrl>("fixed_sun_check")->getValue().asBoolean();
- getChildView("use_global_time_check")->setEnabled(enabled);
- getChild<LLUICtrl>("use_global_time_check")->setValue(LLSD(FALSE));
- enableButton("apply_btn");
-}
-#endif // TMP_DISABLE_WLES
-
-
-
//---------------------------------------------------------------------------
// Add/Remove estate access button callbacks
//---------------------------------------------------------------------------
@@ -1610,10 +1544,7 @@ std::string all_estates_text()
// static
bool LLPanelEstateInfo::isLindenEstate()
{
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- if (!panel) return false;
-
- U32 estate_id = panel->getEstateID();
+ U32 estate_id = LLEstateInfoModel::instance().getID();
return (estate_id <= ESTATE_LAST_LINDEN);
}
@@ -1975,7 +1906,7 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
// Can't ban people from mainland, orientation islands, etc. because this
// creates much network traffic and server load.
// Disable their accounts in CSR tool instead.
- bool linden_estate = (getEstateID() <= ESTATE_LAST_LINDEN);
+ bool linden_estate = isLindenEstate();
bool enable_ban = (god || owner || manager) && !linden_estate;
getChildView("add_banned_avatar_btn")->setEnabled(enable_ban);
getChildView("remove_banned_avatar_btn")->setEnabled(enable_ban);
@@ -1987,6 +1918,8 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region)
getChildView("add_estate_manager_btn")->setEnabled(god || owner);
getChildView("remove_estate_manager_btn")->setEnabled(god || owner);
getChildView("estate_manager_name_list")->setEnabled(god || owner);
+
+ refresh();
}
bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region)
@@ -2093,10 +2026,13 @@ BOOL LLPanelEstateInfo::postBuild()
void LLPanelEstateInfo::refresh()
{
+ // Disable access restriction controls if they make no sense.
bool public_access = getChild<LLUICtrl>("externally_visible_check")->getValue().asBoolean();
+
getChildView("Only Allow")->setEnabled(public_access);
getChildView("limit_payment")->setEnabled(public_access);
getChildView("limit_age_verified")->setEnabled(public_access);
+
// if this is set to false, then the limit fields are meaningless and should be turned off
if (public_access == false)
{
@@ -2105,6 +2041,39 @@ void LLPanelEstateInfo::refresh()
}
}
+void LLPanelEstateInfo::refreshFromEstate()
+{
+ const LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
+
+ getChild<LLUICtrl>("estate_name")->setValue(estate_info.getName());
+ setOwnerName(LLSLURL("agent", estate_info.getOwnerID(), "inspect").getSLURLString());
+
+ getChild<LLUICtrl>("externally_visible_check")->setValue(estate_info.getIsExternallyVisible());
+ getChild<LLUICtrl>("voice_chat_check")->setValue(estate_info.getAllowVoiceChat());
+ getChild<LLUICtrl>("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport());
+ getChild<LLUICtrl>("limit_payment")->setValue(estate_info.getDenyAnonymous());
+ getChild<LLUICtrl>("limit_age_verified")->setValue(estate_info.getDenyAgeUnverified());
+
+ // If visible from mainland, disable the access allowed
+ // UI, as anyone can teleport there.
+ // However, gods need to be able to edit the access list for
+ // linden estates, regardless of visibility, to allow object
+ // and L$ transfers.
+ {
+ bool visible_from_mainland = estate_info.getIsExternallyVisible();
+ bool god = gAgent.isGodlike();
+ bool linden_estate = isLindenEstate();
+
+ bool enable_agent = (!visible_from_mainland || (god && linden_estate));
+ bool enable_group = enable_agent;
+ bool enable_ban = !linden_estate;
+
+ setAccessAllowedEnabled(enable_agent, enable_group, enable_ban);
+ }
+
+ refresh();
+}
+
BOOL LLPanelEstateInfo::sendUpdate()
{
llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl;
@@ -2112,7 +2081,7 @@ BOOL LLPanelEstateInfo::sendUpdate()
LLNotification::Params params("ChangeLindenEstate");
params.functor.function(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2));
- if (getEstateID() <= ESTATE_LAST_LINDEN)
+ if (isLindenEstate())
{
// trying to change reserved estate, warn
LLNotifications::instance().add(params);
@@ -2131,13 +2100,21 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con
switch(option)
{
case 0:
- // send the update
- if (!commitEstateInfoCaps())
{
- // the caps method failed, try the old way
- LLFloaterRegionInfo::nextInvoice();
- commitEstateInfoDataserver();
+ LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
+
+ // update model
+ estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore
+ estate_info.setIsExternallyVisible(getChild<LLUICtrl>("externally_visible_check")->getValue().asBoolean());
+ estate_info.setAllowDirectTeleport(getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean());
+ estate_info.setDenyAnonymous(getChild<LLUICtrl>("limit_payment")->getValue().asBoolean());
+ estate_info.setDenyAgeUnverified(getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean());
+ estate_info.setAllowVoiceChat(getChild<LLUICtrl>("voice_chat_check")->getValue().asBoolean());
+
+ // send the update to sim
+ estate_info.sendEstateInfo();
}
+
// we don't want to do this because we'll get it automatically from the sim
// after the spaceserver processes it
// else
@@ -2194,6 +2171,8 @@ public:
// if we get a normal response, handle it here
virtual void result(const LLSD& content)
{
+ LL_INFOS("Windlight") << "Successfully committed estate info" << llendl;
+
// refresh the panel from the database
LLPanelEstateInfo* panel = dynamic_cast<LLPanelEstateInfo*>(mpPanel.get());
if (panel)
@@ -2210,178 +2189,6 @@ private:
LLHandle<LLPanel> mpPanel;
};
-// tries to send estate info using a cap; returns true if it succeeded
-bool LLPanelEstateInfo::commitEstateInfoCaps()
-{
- std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo");
-
- if (url.empty())
- {
- // whoops, couldn't find the cap, so bail out
- return false;
- }
-
- LLSD body;
- body["estate_name"] = getEstateName();
-
- body["is_externally_visible"] = getChild<LLUICtrl>("externally_visible_check")->getValue().asBoolean();
- body["allow_direct_teleport"] = getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean();
- body["deny_anonymous" ] = getChild<LLUICtrl>("limit_payment")->getValue().asBoolean();
- body["deny_age_unverified" ] = getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean();
- body["allow_voice_chat" ] = getChild<LLUICtrl>("voice_chat_check")->getValue().asBoolean();
- body["invoice" ] = LLFloaterRegionInfo::getLastInvoice();
-
- // block fly is in estate database but not in estate UI, so we're not supporting it
- //body["block_fly" ] = getChild<LLUICtrl>("")->getValue().asBoolean();
-
- F32 sun_hour = getSunHour();
- if (getChild<LLUICtrl>("use_global_time_check")->getValue().asBoolean())
- {
- sun_hour = 0.f; // 0 = global time
- }
- body["sun_hour"] = sun_hour;
-
- // we use a responder so that we can re-get the data after committing to the database
- LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder(this));
- return true;
-}
-
-/* This is the old way of doing things, is deprecated, and should be
- deleted when the dataserver model can be removed */
-// key = "estatechangeinfo"
-// strings[0] = str(estate_id) (added by simulator before relay - not here)
-// strings[1] = estate_name
-// strings[2] = str(estate_flags)
-// strings[3] = str((S32)(sun_hour * 1024.f))
-void LLPanelEstateInfo::commitEstateInfoDataserver()
-{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("EstateOwnerMessage");
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
-
- msg->nextBlock("MethodData");
- msg->addString("Method", "estatechangeinfo");
- msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice());
-
- msg->nextBlock("ParamList");
- msg->addString("Parameter", getEstateName());
-
- std::string buffer;
- buffer = llformat("%u", computeEstateFlags());
- msg->nextBlock("ParamList");
- msg->addString("Parameter", buffer);
-
- F32 sun_hour = getSunHour();
- if (getChild<LLUICtrl>("use_global_time_check")->getValue().asBoolean())
- {
- sun_hour = 0.f; // 0 = global time
- }
-
- buffer = llformat("%d", (S32)(sun_hour*1024.0f));
- msg->nextBlock("ParamList");
- msg->addString("Parameter", buffer);
-
- gAgent.sendMessage();
-}
-
-void LLPanelEstateInfo::setEstateFlags(U32 flags)
-{
- getChild<LLUICtrl>("externally_visible_check")->setValue(LLSD(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE) );
- getChild<LLUICtrl>("voice_chat_check")->setValue(
- LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE));
- getChild<LLUICtrl>("allow_direct_teleport")->setValue(LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) );
- getChild<LLUICtrl>("limit_payment")->setValue(LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) );
- getChild<LLUICtrl>("limit_age_verified")->setValue(LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) );
-
- refresh();
-}
-
-U32 LLPanelEstateInfo::computeEstateFlags()
-{
- U32 flags = 0;
-
- if (getChild<LLUICtrl>("externally_visible_check")->getValue().asBoolean())
- {
- flags |= REGION_FLAGS_EXTERNALLY_VISIBLE;
- }
-
- if ( getChild<LLUICtrl>("voice_chat_check")->getValue().asBoolean() )
- {
- flags |= REGION_FLAGS_ALLOW_VOICE;
- }
-
- if (getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean())
- {
- flags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT;
- }
-
- if (getChild<LLUICtrl>("limit_payment")->getValue().asBoolean())
- {
- flags |= REGION_FLAGS_DENY_ANONYMOUS;
- }
-
- if (getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean())
- {
- flags |= REGION_FLAGS_DENY_AGEUNVERIFIED;
- }
-
-
- return flags;
-}
-
-BOOL LLPanelEstateInfo::getGlobalTime()
-{
- return getChild<LLUICtrl>("use_global_time_check")->getValue().asBoolean();
-}
-
-void LLPanelEstateInfo::setGlobalTime(bool b)
-{
- getChild<LLUICtrl>("use_global_time_check")->setValue(LLSD(b));
- getChildView("fixed_sun_check")->setEnabled(LLSD(!b));
- getChildView("sun_hour_slider")->setEnabled(LLSD(!b));
- if (b)
- {
- getChild<LLUICtrl>("sun_hour_slider")->setValue(LLSD(0.f));
- }
-}
-
-
-BOOL LLPanelEstateInfo::getFixedSun()
-{
- return getChild<LLUICtrl>("fixed_sun_check")->getValue().asBoolean();
-}
-
-void LLPanelEstateInfo::setSunHour(F32 sun_hour)
-{
- if(sun_hour < 6.0f)
- {
- sun_hour = 24.0f + sun_hour;
- }
- getChild<LLUICtrl>("sun_hour_slider")->setValue(LLSD(sun_hour));
-}
-
-F32 LLPanelEstateInfo::getSunHour()
-{
- if (getChildView("sun_hour_slider")->getEnabled())
- {
- return (F32)getChild<LLUICtrl>("sun_hour_slider")->getValue().asReal();
- }
- return 0.f;
-}
-
-const std::string LLPanelEstateInfo::getEstateName() const
-{
- return getChild<LLUICtrl>("estate_name")->getValue().asString();
-}
-
-void LLPanelEstateInfo::setEstateName(const std::string& name)
-{
- getChild<LLUICtrl>("estate_name")->setValue(LLSD(name));
-}
-
const std::string LLPanelEstateInfo::getOwnerName() const
{
return getChild<LLUICtrl>("estate_owner")->getValue().asString();
@@ -2555,11 +2362,7 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)
}
LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text");
- if (region_landtype)
- {
- region_landtype->setText(region->getSimProductName());
- }
-
+ region_landtype->setText(region->getLocalizedSimProductName());
// let the parent class handle the general data collection.
bool rv = LLPanelRegionInfo::refreshFromRegion(region);
@@ -2884,55 +2687,10 @@ bool LLDispatchEstateUpdateInfo::operator()(
{
lldebugs << "Received estate update" << llendl;
- LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
- if (!panel) return true;
-
- // NOTE: LLDispatcher extracts strings with an extra \0 at the
- // end. If we pass the std::string direct to the UI/renderer
- // it draws with a weird character at the end of the string.
- std::string estate_name = strings[0].c_str(); // preserve c_str() call!
- panel->setEstateName(estate_name);
-
- LLViewerRegion* regionp = gAgent.getRegion();
-
- LLUUID owner_id(strings[1]);
- regionp->setOwner(owner_id);
- // Update estate owner name in UI
- std::string owner_name = LLSLURL("agent", owner_id, "inspect").getSLURLString();
- panel->setOwnerName(owner_name);
-
- U32 estate_id = strtoul(strings[2].c_str(), NULL, 10);
- panel->setEstateID(estate_id);
-
- U32 flags = strtoul(strings[3].c_str(), NULL, 10);
- panel->setEstateFlags(flags);
-
- F32 sun_hour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f;
- if(sun_hour == 0 && (flags & REGION_FLAGS_SUN_FIXED ? FALSE : TRUE))
- {
- lldebugs << "Estate uses global time" << llendl;
- panel->setGlobalTime(TRUE);
- }
- else
- {
- lldebugs << "Estate sun hour: " << sun_hour << llendl;
- panel->setGlobalTime(FALSE);
- panel->setSunHour(sun_hour);
- }
-
- bool visible_from_mainland = (bool)(flags & REGION_FLAGS_EXTERNALLY_VISIBLE);
- bool god = gAgent.isGodlike();
- bool linden_estate = (estate_id <= ESTATE_LAST_LINDEN);
-
- // If visible from mainland, disable the access allowed
- // UI, as anyone can teleport there.
- // However, gods need to be able to edit the access list for
- // linden estates, regardless of visibility, to allow object
- // and L$ transfers.
- bool enable_agent = (!visible_from_mainland || (god && linden_estate));
- bool enable_group = enable_agent;
- bool enable_ban = !linden_estate;
- panel->setAccessAllowedEnabled(enable_agent, enable_group, enable_ban);
+ // Update estate info model.
+ // This will call LLPanelEstateInfo::refreshFromEstate().
+ // *TODO: Move estate message handling stuff to llestateinfomodel.cpp.
+ LLEstateInfoModel::instance().update(strings);
return true;
}
@@ -3275,6 +3033,20 @@ void LLPanelEnvironmentInfo::sendRegionSunUpdate()
region_info.sendRegionTerrain(LLFloaterRegionInfo::getLastInvoice());
}
+void LLPanelEnvironmentInfo::fixEstateSun()
+{
+ // We don't support fixed sun estates anymore and need to fix
+ // such estates for region day cycle to take effect.
+ // *NOTE: Assuming that current estate settings have arrived already.
+ LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
+ if (estate_info.getUseFixedSun())
+ {
+ llinfos << "Switching estate to global sun" << llendl;
+ estate_info.setUseFixedSun(false);
+ estate_info.sendEstateInfo();
+ }
+}
+
void LLPanelEnvironmentInfo::populateWaterPresetsList()
{
mWaterPresetCombo->removeall();
@@ -3668,6 +3440,9 @@ void LLPanelEnvironmentInfo::onRegionSettingsApplied(bool ok)
// That is caused by the simulator re-sending the region info, which in turn makes us
// re-request and display old region environment settings while the new ones haven't been applied yet.
sendRegionSunUpdate();
+
+ // Switch estate to not using fixed sun for the region day cycle to work properly (STORM-1506).
+ fixEstateSun();
}
else
{
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index e7917c382c..c402de66e8 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -100,10 +100,6 @@ private:
LLFloaterRegionInfo(const LLSD& seed);
~LLFloaterRegionInfo();
-
- void onConsoleReplyReceived(const std::string& output);
-
- boost::signals2::connection mConsoleReplySignalConnection;;
protected:
void onTabSelected(const LLSD& param);
@@ -304,23 +300,9 @@ public:
virtual BOOL postBuild();
virtual void updateChild(LLUICtrl* child_ctrl);
virtual void refresh();
-
- U32 computeEstateFlags();
- void setEstateFlags(U32 flags);
-
- BOOL getGlobalTime();
- void setGlobalTime(bool b);
- BOOL getFixedSun(); // *TODO: deprecated
-
- F32 getSunHour(); // *TODO: deprecated
- void setSunHour(F32 sun_hour); // *TODO: deprecated
+ void refreshFromEstate();
- const std::string getEstateName() const;
- void setEstateName(const std::string& name);
-
- U32 getEstateID() const { return mEstateID; }
- void setEstateID(U32 estate_id) { mEstateID = estate_id; }
static bool isLindenEstate();
const std::string getOwnerName() const;
@@ -334,8 +316,6 @@ protected:
// confirmation dialog callback
bool callbackChangeLindenEstate(const LLSD& notification, const LLSD& response);
- void commitEstateInfoDataserver();
- bool commitEstateInfoCaps();
void commitEstateAccess();
void commitEstateManagers();
@@ -434,6 +414,7 @@ private:
void setDirty(bool dirty);
void sendRegionSunUpdate();
+ void fixEstateSun();
void populateWaterPresetsList();
void populateSkyPresetsList();
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index d5806e375c..2a946b1edf 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -70,21 +70,24 @@ public:
}
// create the LLSD arguments for the search floater
- LLSD args;
- args["category"] = category;
- args["id"] = LLURI::unescape(search_text);
+ LLFloaterSearch::Params p;
+ p.search.category = category;
+ p.search.query = LLURI::unescape(search_text);
// open the search floater and perform the requested search
- LLFloaterReg::showInstance("search", args);
+ LLFloaterReg::showInstance("search", p);
return true;
}
};
LLSearchHandler gSearchHandler;
-LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
- LLFloater(key),
- LLViewerMediaObserver(),
- mBrowser(NULL),
+LLFloaterSearch::SearchQuery::SearchQuery()
+: category("category", ""),
+ query("query")
+{}
+
+LLFloaterSearch::LLFloaterSearch(const Params& key) :
+ LLFloaterWebContent(key),
mSearchGodLevel(0)
{
// declare a map that transforms a category name into
@@ -102,53 +105,45 @@ LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
BOOL LLFloaterSearch::postBuild()
{
- mBrowser = getChild<LLMediaCtrl>("browser");
- mBrowser->addObserver(this);
+ LLFloaterWebContent::postBuild();
+ mWebBrowser->addObserver(this);
return TRUE;
}
void LLFloaterSearch::onOpen(const LLSD& key)
{
- search(key);
+ Params p(key);
+ p.trusted_content = true;
+ p.allow_address_entry = false;
+
+ LLFloaterWebContent::onOpen(p);
+ search(p.search);
}
void LLFloaterSearch::onClose(bool app_quitting)
{
+ LLFloaterWebContent::onClose(app_quitting);
// tear down the web view so we don't show the previous search
// result when the floater is opened next time
destroy();
}
-void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event)
-{
- switch (event)
- {
- case MEDIA_EVENT_NAVIGATE_BEGIN:
- getChild<LLUICtrl>("status_text")->setValue(getString("loading_text"));
- break;
-
- case MEDIA_EVENT_NAVIGATE_COMPLETE:
- getChild<LLUICtrl>("status_text")->setValue(getString("done_text"));
- break;
-
- default:
- break;
- }
-}
-
void LLFloaterSearch::godLevelChanged(U8 godlevel)
{
// search results can change based upon god level - if the user
// changes god level, then give them a warning (we don't refresh
// the search as this might undo any page navigation or
// AJAX-driven changes since the last search).
- getChildView("refresh_search")->setVisible( (godlevel != mSearchGodLevel));
+
+ //FIXME: set status bar text
+
+ //getChildView("refresh_search")->setVisible( (godlevel != mSearchGodLevel));
}
-void LLFloaterSearch::search(const LLSD &key)
+void LLFloaterSearch::search(const SearchQuery &p)
{
- if (! mBrowser)
+ if (! mWebBrowser || !p.validateBlock())
{
return;
}
@@ -159,10 +154,9 @@ void LLFloaterSearch::search(const LLSD &key)
// work out the subdir to use based on the requested category
LLSD subs;
- std::string category = key.has("category") ? key["category"].asString() : "";
- if (mCategoryPaths.has(category))
+ if (mCategoryPaths.has(p.category))
{
- subs["CATEGORY"] = mCategoryPaths[category].asString();
+ subs["CATEGORY"] = mCategoryPaths[p.category].asString();
}
else
{
@@ -170,8 +164,7 @@ void LLFloaterSearch::search(const LLSD &key)
}
// add the search query string
- std::string search_text = key.has("id") ? key["id"].asString() : "";
- subs["QUERY"] = LLURI::escape(search_text);
+ subs["QUERY"] = LLURI::escape(p.query);
// add the permissions token that login.cgi gave us
// We use "search_token", and fallback to "auth_token" if not present.
@@ -207,5 +200,5 @@ void LLFloaterSearch::search(const LLSD &key)
url = LLWeb::expandURLSubstitutions(url, subs);
// and load the URL in the web view
- mBrowser->navigateTo(url, "text/html");
+ mWebBrowser->navigateTo(url, "text/html");
}
diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h
index ba4dc4c0fa..35b268e1b2 100644
--- a/indra/newview/llfloatersearch.h
+++ b/indra/newview/llfloatersearch.h
@@ -28,7 +28,7 @@
#ifndef LL_LLFLOATERSEARCH_H
#define LL_LLFLOATERSEARCH_H
-#include "llfloater.h"
+#include "llfloaterwebcontent.h"
#include "llviewermediaobserver.h"
#include <string>
@@ -43,11 +43,25 @@ class LLMediaCtrl;
/// so that the user can click on teleport links in search results.
///
class LLFloaterSearch :
- public LLFloater,
- public LLViewerMediaObserver
+ public LLFloaterWebContent
{
public:
- LLFloaterSearch(const LLSD& key);
+ struct SearchQuery : public LLInitParam::Block<SearchQuery>
+ {
+ Optional<std::string> category;
+ Optional<std::string> query;
+
+ SearchQuery();
+ };
+
+ struct _Params : public LLInitParam::Block<_Params, LLFloaterWebContent::Params>
+ {
+ Optional<SearchQuery> search;
+ };
+
+ typedef LLSDParamAdapter<_Params> Params;
+
+ LLFloaterSearch(const Params& key);
/// show the search floater with a new search
/// see search() for details on the key parameter.
@@ -60,7 +74,7 @@ public:
/// - "id": specifies the text phrase to search for
/// - "category": one of "all" (default), "people", "places",
/// "events", "groups", "wiki", "destinations", "classifieds"
- void search(const LLSD &key);
+ void search(const SearchQuery &query);
/// changing godmode can affect the search results that are
/// returned by the search website - use this method to tell the
@@ -70,10 +84,6 @@ public:
private:
/*virtual*/ BOOL postBuild();
- // inherited from LLViewerMediaObserver
- /*virtual*/ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event);
-
- LLMediaCtrl *mBrowser;
LLSD mCategoryPaths;
U8 mSearchGodLevel;
};
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
new file mode 100644
index 0000000000..be7a53491d
--- /dev/null
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -0,0 +1,111 @@
+/**
+ * @file llfloatersidepanelcontainer.cpp
+ * @brief LLFloaterSidePanelContainer class definition
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
+
+// newview includes
+#include "llsidetraypanelcontainer.h"
+#include "lltransientfloatermgr.h"
+
+//static
+const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
+
+LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params)
+: LLFloater(key, params)
+{
+ // Prevent transient floaters (e.g. IM windows) from hiding
+ // when this floater is clicked.
+ LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this);
+}
+
+LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
+{
+ LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this);
+}
+
+void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
+{
+ getChild<LLPanel>(sMainPanelName)->onOpen(key);
+}
+
+LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
+{
+ LLView* view = findChildView(panel_name, true);
+ if (!view) return NULL;
+
+ openFloater();
+
+ LLPanel* panel = NULL;
+
+ LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
+ if (container)
+ {
+ LLSD new_params = params;
+ new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
+ container->onOpen(new_params);
+
+ panel = container->getCurrentPanel();
+ }
+ else if ((panel = dynamic_cast<LLPanel*>(view)) != NULL)
+ {
+ panel->onOpen(params);
+ }
+
+ return panel;
+}
+
+void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const LLSD& key)
+{
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
+ if (floaterp)
+ {
+ floaterp->openChildPanel(sMainPanelName, key);
+ }
+}
+
+void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key)
+{
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
+ if (floaterp)
+ {
+ floaterp->openChildPanel(panel_name, key);
+ }
+}
+
+LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name)
+{
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
+
+ if (floaterp)
+ {
+ return floaterp->findChild<LLPanel>(panel_name, true);
+ }
+
+ return NULL;
+}
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
new file mode 100644
index 0000000000..10d85867ce
--- /dev/null
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -0,0 +1,81 @@
+/**
+ * @file llfloatersidepanelcontainer.h
+ * @brief LLFloaterSidePanelContainer class
+ *
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERSIDEPANELCONTAINER_H
+#define LL_LLFLOATERSIDEPANELCONTAINER_H
+
+#include "llfloater.h"
+
+/**
+ * Class LLFloaterSidePanelContainer
+ *
+ * Provides an interface for all former Side Tray panels.
+ *
+ * This class helps to make sure that clicking a floater containing the side panel
+ * doesn't make transient floaters (e.g. IM windows) hide, so that it's possible to
+ * drag an inventory item from My Inventory window to a docked IM window,
+ * i.e. share the item (see VWR-22891).
+ */
+class LLFloaterSidePanelContainer : public LLFloater
+{
+private:
+ static const std::string sMainPanelName;
+
+public:
+ LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams());
+ ~LLFloaterSidePanelContainer();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
+
+ static void showPanel(const std::string& floater_name, const LLSD& key);
+
+ static void showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key);
+
+ static LLPanel* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName);
+
+ /**
+ * Gets the panel of given type T (doesn't show it or do anything else with it).
+ *
+ * @param floater_name a string specifying the floater to be searched for a child panel.
+ * @param panel_name a string specifying the child panel to get.
+ * @returns a pointer to the panel of given type T.
+ */
+ template <typename T>
+ static T* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName)
+ {
+ T* panel = dynamic_cast<T*>(getPanel(floater_name, panel_name));
+ if (!panel)
+ {
+ llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl;
+ }
+ return panel;
+ }
+};
+
+#endif // LL_LLFLOATERSIDEPANELCONTAINER_H
diff --git a/indra/newview/llfloatersidetraytab.cpp b/indra/newview/llfloatersidetraytab.cpp
deleted file mode 100644
index 9f15e62d84..0000000000
--- a/indra/newview/llfloatersidetraytab.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * @file llfloatersidetraytab.cpp
- * @brief LLFloaterSideTrayTab class definition
- *
- * $LicenseInfo:firstyear=2010&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloatersidetraytab.h"
-
-// newview includes
-#include "lltransientfloatermgr.h"
-#include "llsidetray.h"
-
-LLFloaterSideTrayTab::LLFloaterSideTrayTab(const LLSD& key, const Params& params)
-: LLFloater(key, params)
-{
- // Prevent transient floaters (e.g. IM windows) from hiding
- // when this floater is clicked.
- LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this);
-}
-
-LLFloaterSideTrayTab::~LLFloaterSideTrayTab()
-{
- LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this);
-}
-
-void LLFloaterSideTrayTab::onClose(bool app_quitting)
-{
- // The floater is already being closed, so don't toggle it once more (that may crash viewer).
- LLSideTray::getInstance()->setTabDocked(getName(), /* dock = */ true, /* toggle_floater = */ false);
-}
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 00dc7b1627..cfa35fa561 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -42,6 +42,8 @@
#include "llcombobox.h"
#include "lleconomy.h"
#include "lllandmarkactions.h"
+#include "llpanelsnapshot.h"
+#include "llsidetraypanelcontainer.h"
#include "llsliderctrl.h"
#include "llspinctrl.h"
#include "llviewercontrol.h"
@@ -50,9 +52,7 @@
#include "llviewercamera.h"
#include "llviewerwindow.h"
#include "llviewermenufile.h" // upload_new_resource()
-#include "llfloaterpostcard.h"
#include "llcheckboxctrl.h"
-#include "llradiogroup.h"
#include "llslurl.h"
#include "lltoolfocus.h"
#include "lltoolmgr.h"
@@ -76,18 +76,17 @@
#include "llimagej2c.h"
#include "lllocalcliprect.h"
#include "llnotificationsutil.h"
+#include "llpostcard.h"
#include "llresmgr.h" // LLLocale
#include "llvfile.h"
#include "llvfs.h"
+#include "llwebprofile.h"
#include "llwindow.h"
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
-S32 LLFloaterSnapshot::sUIWinHeightLong = 530 ;
-S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 240 ;
-S32 LLFloaterSnapshot::sUIWinWidth = 215 ;
-
+LLUICtrl* LLFloaterSnapshot::sThumbnailPlaceholder = NULL;
LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
@@ -101,6 +100,9 @@ S32 BORDER_WIDTH = 6;
const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+static std::string lastSnapshotWidthName(S32 shot_type);
+static std::string lastSnapshotHeightName(S32 shot_type);
+
static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");
///----------------------------------------------------------------------------
@@ -108,6 +110,7 @@ static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_float
///----------------------------------------------------------------------------
class LLSnapshotLivePreview : public LLView
{
+ LOG_CLASS(LLSnapshotLivePreview);
public:
enum ESnapshotType
{
@@ -154,6 +157,7 @@ public:
F32 getAspect() ;
LLRect getImageRect();
BOOL isImageScaled();
+ const LLVector3d& getPosTakenGlobal() const { return mPosTakenGlobal; }
void setSnapshotType(ESnapshotType type) { mSnapshotType = type; }
void setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat type) { mSnapshotFormat = type; }
@@ -161,10 +165,12 @@ public:
void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; }
void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
void saveWeb();
- LLFloaterPostcard* savePostcard();
void saveTexture();
BOOL saveLocal();
+ LLPointer<LLImageFormatted> getFormattedImage() const { return mFormattedImage; }
+ LLPointer<LLImageRaw> getEncodedImage() const { return mPreviewImageEncoded; }
+
BOOL setThumbnailImageSize() ;
void generateThumbnailImage(BOOL force_update = FALSE) ;
void resetThumbnailImage() { mThumbnailImage = NULL ; }
@@ -327,7 +333,8 @@ BOOL LLSnapshotLivePreview::isImageScaled()
}
void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay)
-{
+{
+ lldebugs << "updateSnapshot: mSnapshotUpToDate = " << mSnapshotUpToDate << llendl;
if (mSnapshotUpToDate)
{
S32 old_image_index = mCurImageIndex;
@@ -367,12 +374,12 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
{
mSnapshotDelayTimer.start();
mSnapshotDelayTimer.setTimerExpirySec(delay);
+ LLFloaterSnapshot::preUpdate();
}
if(new_thumbnail)
{
mThumbnailUpToDate = FALSE ;
}
- setThumbnailImageSize();
}
void LLSnapshotLivePreview::setSnapshotQuality(S32 quality)
@@ -445,9 +452,9 @@ void LLSnapshotLivePreview::draw()
// calculate UV scale
F32 uv_width = mImageScaled[mCurImageIndex] ? 1.f : llmin((F32)mWidth[mCurImageIndex] / (F32)mViewerImage[mCurImageIndex]->getWidth(), 1.f);
F32 uv_height = mImageScaled[mCurImageIndex] ? 1.f : llmin((F32)mHeight[mCurImageIndex] / (F32)mViewerImage[mCurImageIndex]->getHeight(), 1.f);
- glPushMatrix();
+ gGL.pushMatrix();
{
- glTranslatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f);
+ gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f);
gGL.begin(LLRender::QUADS);
{
gGL.texCoord2f(uv_width, uv_height);
@@ -464,7 +471,7 @@ void LLSnapshotLivePreview::draw()
}
gGL.end();
}
- glPopMatrix();
+ gGL.popMatrix();
gGL.color4f(1.f, 1.f, 1.f, mFlashAlpha);
gl_rect_2d(getRect());
@@ -580,11 +587,11 @@ void LLSnapshotLivePreview::draw()
BOOL rescale = !mImageScaled[old_image_index] && mViewerImage[mCurImageIndex].notNull();
F32 uv_width = rescale ? llmin((F32)mWidth[old_image_index] / (F32)mViewerImage[mCurImageIndex]->getWidth(), 1.f) : 1.f;
F32 uv_height = rescale ? llmin((F32)mHeight[old_image_index] / (F32)mViewerImage[mCurImageIndex]->getHeight(), 1.f) : 1.f;
- glPushMatrix();
+ gGL.pushMatrix();
{
LLRect& rect = mImageRect[old_image_index];
- glTranslatef((F32)rect.mLeft, (F32)rect.mBottom - llround(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f);
- glRotatef(-45.f * fall_interp, 0.f, 0.f, 1.f);
+ gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - llround(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f);
+ gGL.rotatef(-45.f * fall_interp, 0.f, 0.f, 1.f);
gGL.begin(LLRender::QUADS);
{
gGL.texCoord2f(uv_width, uv_height);
@@ -601,7 +608,7 @@ void LLSnapshotLivePreview::draw()
}
gGL.end();
}
- glPopMatrix();
+ gGL.popMatrix();
}
}
}
@@ -629,8 +636,10 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
F32 window_aspect_ratio = ((F32)window_width) / ((F32)window_height);
// UI size for thumbnail
- S32 max_width = LLFloaterSnapshot::getUIWinWidth() - 20;
- S32 max_height = 90;
+ // *FIXME: the rect does not change, so maybe there's no need to recalculate max w/h.
+ const LLRect& thumbnail_rect = LLFloaterSnapshot::getThumbnailPlaceholderRect();
+ S32 max_width = thumbnail_rect.getWidth();
+ S32 max_height = thumbnail_rect.getHeight();
if (window_aspect_ratio > (F32)max_width / max_height)
{
@@ -713,25 +722,19 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
resetThumbnailImage() ;
}
- LLPointer<LLImageRaw> raw = NULL ;
- S32 w , h ;
- w = get_lower_power_two(mThumbnailWidth, 512) * 2 ;
- h = get_lower_power_two(mThumbnailHeight, 512) * 2 ;
-
+ LLPointer<LLImageRaw> raw = new LLImageRaw;
+ if(!gViewerWindow->thumbnailSnapshot(raw,
+ mThumbnailWidth, mThumbnailHeight,
+ gSavedSettings.getBOOL("RenderUIInSnapshot"),
+ FALSE,
+ mSnapshotBufferType) )
{
- raw = new LLImageRaw ;
- if(!gViewerWindow->thumbnailSnapshot(raw,
- w, h,
- gSavedSettings.getBOOL("RenderUIInSnapshot"),
- FALSE,
- mSnapshotBufferType) )
- {
- raw = NULL ;
- }
+ raw = NULL ;
}
if(raw)
{
+ raw->expandToPowerOfTwo();
mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
mThumbnailUpToDate = TRUE ;
}
@@ -746,7 +749,15 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
//static
BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
- LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
+ LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
+
+#if 1 // XXX tmp
+ if (previewp->mWidth[previewp->mCurImageIndex] == 0 || previewp->mHeight[previewp->mCurImageIndex] == 0)
+ {
+ llwarns << "Incorrect dimensions: " << previewp->mWidth[previewp->mCurImageIndex] << "x" << previewp->mHeight[previewp->mCurImageIndex] << llendl;
+ return FALSE;
+ }
+#endif
LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
@@ -773,7 +784,9 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
}
// time to produce a snapshot
+ previewp->setThumbnailImageSize();
+ lldebugs << "producing snapshot" << llendl;
if (!previewp->mPreviewImage)
{
previewp->mPreviewImage = new LLImageRaw;
@@ -809,6 +822,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
if(previewp->getSnapshotType() == SNAPSHOT_TEXTURE)
{
+ lldebugs << "Encoding new image of format J2C" << llendl;
LLPointer<LLImageJ2C> formatted = new LLImageJ2C;
LLPointer<LLImageRaw> scaled = new LLImageRaw(
previewp->mPreviewImage->getData(),
@@ -829,18 +843,8 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
// delete any existing image
previewp->mFormattedImage = NULL;
// now create the new one of the appropriate format.
- // note: postcards and web hardcoded to use jpeg always.
- LLFloaterSnapshot::ESnapshotFormat format;
-
- if (previewp->getSnapshotType() == SNAPSHOT_POSTCARD ||
- previewp->getSnapshotType() == SNAPSHOT_WEB)
- {
- format = LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG;
- }
- else
- {
- format = previewp->getSnapshotFormat();
- }
+ LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotFormat();
+ lldebugs << "Encoding new image of format " << format << llendl;
switch(format)
{
@@ -920,12 +924,15 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
previewp->generateThumbnailImage() ;
}
+ lldebugs << "done creating snapshot" << llendl;
+ LLFloaterSnapshot::postUpdate();
return TRUE;
}
void LLSnapshotLivePreview::setSize(S32 w, S32 h)
{
+ lldebugs << "setSize(" << w << ", " << h << ")" << llendl;
mWidth[mCurImageIndex] = w;
mHeight[mCurImageIndex] = h;
}
@@ -936,40 +943,9 @@ void LLSnapshotLivePreview::getSize(S32& w, S32& h) const
h = mHeight[mCurImageIndex];
}
-LLFloaterPostcard* LLSnapshotLivePreview::savePostcard()
-{
- if(mViewerImage[mCurImageIndex].isNull())
- {
- //this should never happen!!
- llwarns << "The snapshot image has not been generated!" << llendl ;
- return NULL ;
- }
-
- // calculate and pass in image scale in case image data only use portion
- // of viewerimage buffer
- LLVector2 image_scale(1.f, 1.f);
- if (!isImageScaled())
- {
- image_scale.setVec(llmin(1.f, (F32)mWidth[mCurImageIndex] / (F32)getCurrentImage()->getWidth()), llmin(1.f, (F32)mHeight[mCurImageIndex] / (F32)getCurrentImage()->getHeight()));
- }
-
- LLImageJPEG* jpg = dynamic_cast<LLImageJPEG*>(mFormattedImage.get());
- if(!jpg)
- {
- llwarns << "Formatted image not a JPEG" << llendl;
- return NULL;
- }
- LLFloaterPostcard* floater = LLFloaterPostcard::showFromSnapshot(jpg, mViewerImage[mCurImageIndex], image_scale, mPosTakenGlobal);
- // relinquish lifetime of jpeg image to postcard floater
- mFormattedImage = NULL;
- mDataSize = 0;
- updateSnapshot(FALSE, FALSE);
-
- return floater;
-}
-
void LLSnapshotLivePreview::saveTexture()
{
+ lldebugs << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << llendl;
// gen a new uuid for this asset
LLTransactionID tid;
tid.generate();
@@ -982,6 +958,7 @@ void LLSnapshotLivePreview::saveTexture()
mPreviewImage->getComponents());
scaled->biasedScaleToPowerOfTwo(512);
+ lldebugs << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << llendl;
if (formatted->encode(scaled, 0.0f))
{
@@ -1022,11 +999,6 @@ BOOL LLSnapshotLivePreview::saveLocal()
{
BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage);
- // Relinquish image memory. Save button will be disabled as a side-effect.
- mFormattedImage = NULL;
- mDataSize = 0;
- updateSnapshot(FALSE, FALSE);
-
if(success)
{
gViewerWindow->playSnapshotAnimAndSound();
@@ -1067,11 +1039,21 @@ void LLSnapshotLivePreview::regionNameCallback(LLImageJPEG* snapshot, LLSD& meta
class LLFloaterSnapshot::Impl
{
+ LOG_CLASS(LLFloaterSnapshot::Impl);
public:
+ typedef enum e_status
+ {
+ STATUS_READY,
+ STATUS_WORKING,
+ STATUS_FINISHED
+ } EStatus;
+
Impl()
: mAvatarPauseHandles(),
mLastToolset(NULL),
- mAspectRatioCheckOff(false)
+ mAspectRatioCheckOff(false),
+ mNeedRefresh(false),
+ mStatus(STATUS_READY)
{
}
~Impl()
@@ -1080,43 +1062,55 @@ public:
mAvatarPauseHandles.clear();
}
- static void onClickDiscard(void* data);
- static void onClickKeep(void* data);
- static void onCommitSave(LLUICtrl* ctrl, void* data);
static void onClickNewSnapshot(void* data);
static void onClickAutoSnap(LLUICtrl *ctrl, void* data);
//static void onClickAdvanceSnap(LLUICtrl *ctrl, void* data);
- static void onClickLess(void* data) ;
static void onClickMore(void* data) ;
static void onClickUICheck(LLUICtrl *ctrl, void* data);
static void onClickHUDCheck(LLUICtrl *ctrl, void* data);
- static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data);
+#if 0
static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data);
- static void onCommitQuality(LLUICtrl* ctrl, void* data);
- static void onCommitResolution(LLUICtrl* ctrl, void* data) { updateResolution(ctrl, data); }
+#endif
+ static void applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL checked);
static void updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update = TRUE);
static void onCommitFreezeFrame(LLUICtrl* ctrl, void* data);
static void onCommitLayerTypes(LLUICtrl* ctrl, void*data);
+ static void onImageQualityChange(LLFloaterSnapshot* view, S32 quality_val);
+ static void onImageFormatChange(LLFloaterSnapshot* view);
+#if 0
static void onCommitSnapshotType(LLUICtrl* ctrl, void* data);
- static void onCommitSnapshotFormat(LLUICtrl* ctrl, void* data);
static void onCommitCustomResolution(LLUICtrl *ctrl, void* data);
+#endif
+ static void applyCustomResolution(LLFloaterSnapshot* view, S32 w, S32 h);
+ static void onSnapshotUploadFinished(bool status);
+ static void onSendingPostcardFinished(bool status);
static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ;
static BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value);
+ static LLPanelSnapshot* getActivePanel(LLFloaterSnapshot* floater, bool ok_if_not_found = true);
+ static LLSnapshotLivePreview::ESnapshotType getActiveSnapshotType(LLFloaterSnapshot* floater);
+ static LLFloaterSnapshot::ESnapshotFormat getImageFormat(LLFloaterSnapshot* floater);
+ static LLSpinCtrl* getWidthSpinner(LLFloaterSnapshot* floater);
+ static LLSpinCtrl* getHeightSpinner(LLFloaterSnapshot* floater);
+ static void enableAspectRatioCheckbox(LLFloaterSnapshot* floater, BOOL enable);
+ static void setAspectRatioCheckboxValue(LLFloaterSnapshot* floater, BOOL checked);
+
static LLSnapshotLivePreview* getPreviewView(LLFloaterSnapshot *floater);
static void setResolution(LLFloaterSnapshot* floater, const std::string& comboname);
static void updateControls(LLFloaterSnapshot* floater);
static void updateLayout(LLFloaterSnapshot* floater);
- static void updateResolutionTextEntry(LLFloaterSnapshot* floater);
+ static void setStatus(EStatus status, bool ok = true, const std::string& msg = LLStringUtil::null);
+ EStatus getStatus() const { return mStatus; }
+ static void setNeedRefresh(LLFloaterSnapshot* floater, bool need);
private:
- static LLSnapshotLivePreview::ESnapshotType getTypeIndex(LLFloaterSnapshot* floater);
- static LLSD getTypeName(LLSnapshotLivePreview::ESnapshotType index);
- static ESnapshotFormat getFormatIndex(LLFloaterSnapshot* floater);
static LLViewerWindow::ESnapshotType getLayerType(LLFloaterSnapshot* floater);
static void comboSetCustom(LLFloaterSnapshot *floater, const std::string& comboname);
static void checkAutoSnapshot(LLSnapshotLivePreview* floater, BOOL update_thumbnail = FALSE);
static void checkAspectRatio(LLFloaterSnapshot *view, S32 index) ;
+ static void setWorking(LLFloaterSnapshot* floater, bool working);
+ static void setFinished(LLFloaterSnapshot* floater, bool finished, bool ok = true, const std::string& msg = LLStringUtil::null);
+
public:
std::vector<LLAnimPauseRequest> mAvatarPauseHandles;
@@ -1124,84 +1118,98 @@ public:
LLToolset* mLastToolset;
LLHandle<LLView> mPreviewHandle;
bool mAspectRatioCheckOff ;
+ bool mNeedRefresh;
+ EStatus mStatus;
};
// static
-LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot *floater)
+LLPanelSnapshot* LLFloaterSnapshot::Impl::getActivePanel(LLFloaterSnapshot* floater, bool ok_if_not_found)
{
- LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)floater->impl.mPreviewHandle.get();
- return previewp;
+ LLSideTrayPanelContainer* panel_container = floater->getChild<LLSideTrayPanelContainer>("panel_container");
+ LLPanelSnapshot* active_panel = dynamic_cast<LLPanelSnapshot*>(panel_container->getCurrentPanel());
+ if (!ok_if_not_found)
+ {
+ llassert_always(active_panel != NULL);
+ }
+ return active_panel;
}
// static
-LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFloaterSnapshot* floater)
+LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getActiveSnapshotType(LLFloaterSnapshot* floater)
{
- LLSnapshotLivePreview::ESnapshotType index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD;
- LLSD value = floater->getChild<LLUICtrl>("snapshot_type_radio")->getValue();
+ LLSnapshotLivePreview::ESnapshotType type = LLSnapshotLivePreview::SNAPSHOT_WEB;
+ std::string name;
+ LLPanelSnapshot* spanel = getActivePanel(floater);
- const std::string id = value.asString();
- if (id == "postcard")
+ if (spanel)
{
- index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD;
+ name = spanel->getName();
}
- else if (id == "texture")
+
+ if (name == "panel_snapshot_postcard")
{
- index = LLSnapshotLivePreview::SNAPSHOT_TEXTURE;
+ type = LLSnapshotLivePreview::SNAPSHOT_POSTCARD;
}
- else if (id == "local")
+ else if (name == "panel_snapshot_inventory")
{
- index = LLSnapshotLivePreview::SNAPSHOT_LOCAL;
+ type = LLSnapshotLivePreview::SNAPSHOT_TEXTURE;
}
- else if (id == "share_to_web")
+ else if (name == "panel_snapshot_local")
{
- index = LLSnapshotLivePreview::SNAPSHOT_WEB;
+ type = LLSnapshotLivePreview::SNAPSHOT_LOCAL;
}
- return index;
+ return type;
+}
+
+// static
+LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getImageFormat(LLFloaterSnapshot* floater)
+{
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ // FIXME: if the default is not PNG, profile uploads may fail.
+ return active_panel ? active_panel->getImageFormat() : LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG;
+}
+
+// static
+LLSpinCtrl* LLFloaterSnapshot::Impl::getWidthSpinner(LLFloaterSnapshot* floater)
+{
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ return active_panel ? active_panel->getWidthSpinner() : floater->getChild<LLSpinCtrl>("snapshot_width");
}
// static
-LLSD LLFloaterSnapshot::Impl::getTypeName(LLSnapshotLivePreview::ESnapshotType index)
+LLSpinCtrl* LLFloaterSnapshot::Impl::getHeightSpinner(LLFloaterSnapshot* floater)
{
- std::string id;
- switch (index)
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ return active_panel ? active_panel->getHeightSpinner() : floater->getChild<LLSpinCtrl>("snapshot_height");
+}
+
+// static
+void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshot* floater, BOOL enable)
+{
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ if (active_panel)
{
- case LLSnapshotLivePreview::SNAPSHOT_WEB:
- id = "share_to_web";
- break;
- case LLSnapshotLivePreview::SNAPSHOT_POSTCARD:
- id = "postcard";
- break;
- case LLSnapshotLivePreview::SNAPSHOT_TEXTURE:
- id = "texture";
- break;
- case LLSnapshotLivePreview::SNAPSHOT_LOCAL:
- default:
- id = "local";
- break;
+ active_panel->enableAspectRatioCheckbox(enable);
}
- return LLSD(id);
}
// static
-LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getFormatIndex(LLFloaterSnapshot* floater)
+void LLFloaterSnapshot::Impl::setAspectRatioCheckboxValue(LLFloaterSnapshot* floater, BOOL checked)
{
- ESnapshotFormat index = SNAPSHOT_FORMAT_PNG;
- if(floater->hasChild("local_format_combo"))
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ if (active_panel)
{
- LLComboBox* local_format_combo = floater->findChild<LLComboBox>("local_format_combo");
- const std::string id = local_format_combo->getSelectedItemLabel();
- if (id == "PNG")
- index = SNAPSHOT_FORMAT_PNG;
- else if (id == "JPEG")
- index = SNAPSHOT_FORMAT_JPEG;
- else if (id == "BMP")
- index = SNAPSHOT_FORMAT_BMP;
+ active_panel->getChild<LLUICtrl>(active_panel->getAspectRatioCBName())->setValue(checked);
}
- return index;
}
-
+// static
+LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot *floater)
+{
+ LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)floater->impl.mPreviewHandle.get();
+ return previewp;
+}
// static
LLViewerWindow::ESnapshotType LLFloaterSnapshot::Impl::getLayerType(LLFloaterSnapshot* floater)
@@ -1229,12 +1237,27 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
{
LLSnapshotLivePreview* previewp = getPreviewView(floaterp);
- S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ;
+ BOOL advanced = gSavedSettings.getBOOL("AdvanceSnapshot");
+
+ // Show/hide advanced options.
+ LLPanel* advanced_options_panel = floaterp->getChild<LLPanel>("advanced_options_panel");
+ floaterp->getChild<LLButton>("advanced_options_btn")->setImageOverlay(advanced ? "TabIcon_Open_Off" : "TabIcon_Close_Off");
+ if (advanced != advanced_options_panel->getVisible())
+ {
+ S32 panel_width = advanced_options_panel->getRect().getWidth();
+ floaterp->getChild<LLPanel>("advanced_options_panel")->setVisible(advanced);
+ S32 floater_width = floaterp->getRect().getWidth();
+ floater_width += (advanced ? panel_width : -panel_width);
+ floaterp->reshape(floater_width, floaterp->getRect().getHeight());
+ }
- if(!gSavedSettings.getBOOL("AdvanceSnapshot")) //set to original window resolution
+ if(!advanced) //set to original window resolution
{
previewp->mKeepAspectRatio = TRUE;
+ floaterp->getChild<LLComboBox>("profile_size_combo")->setCurrentByIndex(0);
+ gSavedSettings.setS32("SnapshotProfileLastResolution", 0);
+
floaterp->getChild<LLComboBox>("postcard_size_combo")->setCurrentByIndex(0);
gSavedSettings.setS32("SnapshotPostcardLastResolution", 0);
@@ -1256,7 +1279,8 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
floaterp->getParent()->setMouseOpaque(TRUE);
// shrink to smaller layout
- floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height);
+ // *TODO: unneeded?
+ floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getRect().getHeight());
// can see and interact with fullscreen preview now
if (previewp)
@@ -1286,7 +1310,8 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
else // turning off freeze frame mode
{
floaterp->getParent()->setMouseOpaque(FALSE);
- floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height);
+ // *TODO: unneeded?
+ floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getRect().getHeight());
if (previewp)
{
previewp->setVisible(FALSE);
@@ -1312,86 +1337,78 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
// No other methods should be changing any of the controls directly except for helpers called by this method.
// The basic pattern for programmatically changing the GUI settings is to first set the
// appropriate saved settings and then call this method to sync the GUI with them.
+// FIXME: The above comment seems obsolete now.
// static
void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
{
- LLRadioGroup* snapshot_type_radio = floater->getChild<LLRadioGroup>("snapshot_type_radio");
- LLSnapshotLivePreview::ESnapshotType shot_type = (LLSnapshotLivePreview::ESnapshotType)gSavedSettings.getS32("LastSnapshotType");
- snapshot_type_radio->setSelectedByValue(getTypeName(shot_type), true);
-
+ LLSnapshotLivePreview::ESnapshotType shot_type = getActiveSnapshotType(floater);
ESnapshotFormat shot_format = (ESnapshotFormat)gSavedSettings.getS32("SnapshotFormat");
LLViewerWindow::ESnapshotType layer_type = getLayerType(floater);
+#if 0
floater->getChildView("share_to_web")->setVisible( gSavedSettings.getBOOL("SnapshotSharingEnabled"));
+#endif
+#if 0
floater->getChildView("postcard_size_combo")->setVisible( FALSE);
floater->getChildView("texture_size_combo")->setVisible( FALSE);
floater->getChildView("local_size_combo")->setVisible( FALSE);
+#endif
+ floater->getChild<LLComboBox>("profile_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotProfileLastResolution"));
floater->getChild<LLComboBox>("postcard_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotPostcardLastResolution"));
floater->getChild<LLComboBox>("texture_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotTextureLastResolution"));
floater->getChild<LLComboBox>("local_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotLocalLastResolution"));
floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
// *TODO: Separate settings for Web images from postcards
- floater->getChildView("send_btn")->setVisible( shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD ||
- shot_type == LLSnapshotLivePreview::SNAPSHOT_WEB);
- floater->getChildView("upload_btn")->setVisible(shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE);
- floater->getChildView("save_btn")->setVisible( shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
- floater->getChildView("keep_aspect_check")->setEnabled(shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !floater->impl.mAspectRatioCheckOff);
+ enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
+ setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
- BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot");
- BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL;
- BOOL show_slider = (shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD ||
- shot_type == LLSnapshotLivePreview::SNAPSHOT_WEB ||
- (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG));
-
- floater->getChildView("more_btn")->setVisible( !is_advance); // the only item hidden in advanced mode
- floater->getChildView("less_btn")->setVisible( is_advance);
- floater->getChildView("type_label2")->setVisible( is_advance);
- floater->getChildView("format_label")->setVisible( is_advance && is_local);
- floater->getChildView("local_format_combo")->setVisible( is_advance && is_local);
- floater->getChildView("layer_types")->setVisible( is_advance);
- floater->getChildView("layer_type_label")->setVisible( is_advance);
- floater->getChildView("snapshot_width")->setVisible( is_advance);
- floater->getChildView("snapshot_height")->setVisible( is_advance);
- floater->getChildView("keep_aspect_check")->setVisible( is_advance);
- floater->getChildView("ui_check")->setVisible( is_advance);
- floater->getChildView("hud_check")->setVisible( is_advance);
- floater->getChildView("keep_open_check")->setVisible( is_advance);
- floater->getChildView("freeze_frame_check")->setVisible( is_advance);
- floater->getChildView("auto_snapshot_check")->setVisible( is_advance);
- floater->getChildView("image_quality_slider")->setVisible( is_advance && show_slider);
-
- if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot"))
- { //clamp snapshot resolution to window size when showing UI or HUD in snapshot
-
- LLSpinCtrl* width_ctrl = floater->getChild<LLSpinCtrl>("snapshot_width");
- LLSpinCtrl* height_ctrl = floater->getChild<LLSpinCtrl>("snapshot_height");
-
- S32 width = gViewerWindow->getWindowWidthRaw();
- S32 height = gViewerWindow->getWindowHeightRaw();
-
- width_ctrl->setMaxValue(width);
-
- height_ctrl->setMaxValue(height);
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ if (active_panel)
+ {
+ LLSpinCtrl* width_ctrl = getWidthSpinner(floater);
+ LLSpinCtrl* height_ctrl = getHeightSpinner(floater);
- if (width_ctrl->getValue().asInteger() > width)
+ // Initialize spinners.
+ if (width_ctrl->getValue().asInteger() == 0)
{
- width_ctrl->forceSetValue(width);
+ S32 w = gSavedSettings.getS32(lastSnapshotWidthName(shot_type));
+ lldebugs << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << llendl;
+ width_ctrl->setValue(w);
}
- if (height_ctrl->getValue().asInteger() > height)
+ if (height_ctrl->getValue().asInteger() == 0)
{
- height_ctrl->forceSetValue(height);
+ S32 h = gSavedSettings.getS32(lastSnapshotHeightName(shot_type));
+ lldebugs << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << llendl;
+ height_ctrl->setValue(h);
+ }
+
+ if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot"))
+ { //clamp snapshot resolution to window size when showing UI or HUD in snapshot
+ S32 width = gViewerWindow->getWindowWidthRaw();
+ S32 height = gViewerWindow->getWindowHeightRaw();
+
+ width_ctrl->setMaxValue(width);
+
+ height_ctrl->setMaxValue(height);
+
+ if (width_ctrl->getValue().asInteger() > width)
+ {
+ width_ctrl->forceSetValue(width);
+ }
+ if (height_ctrl->getValue().asInteger() > height)
+ {
+ height_ctrl->forceSetValue(height);
+ }
+ }
+ else
+ {
+ width_ctrl->setMaxValue(6016);
+ height_ctrl->setMaxValue(6016);
}
- }
- else
- {
- LLSpinCtrl* width = floater->getChild<LLSpinCtrl>("snapshot_width");
- width->setMaxValue(6016);
- LLSpinCtrl* height = floater->getChild<LLSpinCtrl>("snapshot_height");
- height->setMaxValue(6016);
}
LLSnapshotLivePreview* previewp = getPreviewView(floater);
@@ -1399,11 +1416,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
// *TODO: Separate maximum size for Web images from postcards
- floater->getChildView("send_btn")->setEnabled((shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD ||
- shot_type == LLSnapshotLivePreview::SNAPSHOT_WEB) &&
- got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE);
- floater->getChildView("upload_btn")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap);
- floater->getChildView("save_btn")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap);
+ //lldebugs << "Is snapshot up-to-date? " << got_snap << llendl;
LLLocale locale(LLLocale::USER_LOCALE);
std::string bytes_string;
@@ -1411,9 +1424,17 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
{
LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 );
}
- S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
- floater->getChild<LLUICtrl>("texture")->setLabelArg("[AMOUNT]", llformat("%d",upload_cost));
- floater->getChild<LLUICtrl>("upload_btn")->setLabelArg("[AMOUNT]", llformat("%d",upload_cost));
+
+ // Update displayed image resolution.
+ LLTextBox* image_res_tb = floater->getChild<LLTextBox>("image_res_text");
+ image_res_tb->setVisible(got_snap);
+ if (got_snap)
+ {
+ LLPointer<LLImageRaw> img = previewp->getEncodedImage();
+ image_res_tb->setTextArg("[WIDTH]", llformat("%d", img->getWidth()));
+ image_res_tb->setTextArg("[HEIGHT]", llformat("%d", img->getHeight()));
+ }
+
floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
floater->getChild<LLUICtrl>("file_size_label")->setColor(
shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
@@ -1422,144 +1443,84 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
switch(shot_type)
{
- // *TODO: Separate settings for Web images from postcards
case LLSnapshotLivePreview::SNAPSHOT_WEB:
+ layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
+ floater->getChild<LLUICtrl>("layer_types")->setValue("colors");
+ setResolution(floater, "profile_size_combo");
+ break;
case LLSnapshotLivePreview::SNAPSHOT_POSTCARD:
layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
floater->getChild<LLUICtrl>("layer_types")->setValue("colors");
- if(is_advance)
- {
- setResolution(floater, "postcard_size_combo");
- }
+ setResolution(floater, "postcard_size_combo");
break;
case LLSnapshotLivePreview::SNAPSHOT_TEXTURE:
layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
floater->getChild<LLUICtrl>("layer_types")->setValue("colors");
- if(is_advance)
- {
- setResolution(floater, "texture_size_combo");
- }
+ setResolution(floater, "texture_size_combo");
break;
case LLSnapshotLivePreview::SNAPSHOT_LOCAL:
- if(is_advance)
- {
- setResolution(floater, "local_size_combo");
- }
+ setResolution(floater, "local_size_combo");
break;
default:
break;
}
- updateResolutionTextEntry(floater);
-
if (previewp)
{
+ lldebugs << "Setting snapshot type (" << shot_type << "), format (" << shot_format << ")" << llendl;
previewp->setSnapshotType(shot_type);
previewp->setSnapshotFormat(shot_format);
previewp->setSnapshotBufferType(layer_type);
}
-}
-// static
-void LLFloaterSnapshot::Impl::updateResolutionTextEntry(LLFloaterSnapshot* floater)
-{
- LLSpinCtrl* width_spinner = floater->getChild<LLSpinCtrl>("snapshot_width");
- LLSpinCtrl* height_spinner = floater->getChild<LLSpinCtrl>("snapshot_height");
-
- if(getTypeIndex(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
- {
- width_spinner->setAllowEdit(FALSE);
- height_spinner->setAllowEdit(FALSE);
- }
- else
+ LLPanelSnapshot* current_panel = Impl::getActivePanel(floater);
+ if (current_panel)
{
- width_spinner->setAllowEdit(TRUE);
- height_spinner->setAllowEdit(TRUE);
+ LLSD info;
+ info["have-snapshot"] = got_snap;
+ current_panel->updateControls(info);
}
}
// static
-void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, BOOL update_thumbnail)
+void LLFloaterSnapshot::Impl::setStatus(EStatus status, bool ok, const std::string& msg)
{
- if (previewp)
+ LLFloaterSnapshot* floater = LLFloaterSnapshot::getInstance();
+ switch (status)
{
- BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
- previewp->updateSnapshot(autosnap, update_thumbnail, autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f);
+ case STATUS_READY:
+ setWorking(floater, false);
+ setFinished(floater, false);
+ break;
+ case STATUS_WORKING:
+ setWorking(floater, true);
+ setFinished(floater, false);
+ break;
+ case STATUS_FINISHED:
+ setWorking(floater, false);
+ setFinished(floater, true, ok, msg);
+ break;
}
-}
-// static
-void LLFloaterSnapshot::Impl::onClickDiscard(void* data)
-{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
-
- if (view)
- {
- view->closeFloater();
- }
+ floater->impl.mStatus = status;
}
-
// static
-void LLFloaterSnapshot::Impl::onCommitSave(LLUICtrl* ctrl, void* data)
+void LLFloaterSnapshot::Impl::setNeedRefresh(LLFloaterSnapshot* floater, bool need)
{
- if (ctrl->getValue().asString() == "save as")
- {
- gViewerWindow->resetSnapshotLoc();
- }
- onClickKeep(data);
+ if (!floater) return;
+
+ floater->mRefreshLabel->setVisible(need);
+ floater->impl.mNeedRefresh = need;
}
// static
-void LLFloaterSnapshot::Impl::onClickKeep(void* data)
+void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, BOOL update_thumbnail)
{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
- LLSnapshotLivePreview* previewp = getPreviewView(view);
-
if (previewp)
{
- switch (previewp->getSnapshotType())
- {
- case LLSnapshotLivePreview::SNAPSHOT_WEB:
- previewp->saveWeb();
- break;
-
- case LLSnapshotLivePreview::SNAPSHOT_POSTCARD:
- {
- LLFloaterPostcard* floater = previewp->savePostcard();
- // if still in snapshot mode, put postcard floater in snapshot floaterview
- // and link it to snapshot floater
- if (floater && !gSavedSettings.getBOOL("CloseSnapshotOnKeep"))
- {
- gFloaterView->removeChild(floater);
- gSnapshotFloaterView->addChild(floater);
- view->addDependentFloater(floater, FALSE);
- }
- }
- break;
-
- case LLSnapshotLivePreview::SNAPSHOT_TEXTURE:
- previewp->saveTexture();
- break;
-
- case LLSnapshotLivePreview::SNAPSHOT_LOCAL:
- previewp->saveLocal();
- break;
-
- default:
- break;
- }
-
- if (gSavedSettings.getBOOL("CloseSnapshotOnKeep"))
- {
- view->closeFloater();
- }
- else
- {
- checkAutoSnapshot(previewp);
- }
-
- updateControls(view);
+ BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
+ previewp->updateSnapshot(autosnap, update_thumbnail, autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f);
}
}
@@ -1570,6 +1531,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
if (previewp && view)
{
+ view->impl.setStatus(Impl::STATUS_READY);
previewp->updateSnapshot(TRUE);
}
}
@@ -1590,32 +1552,20 @@ void LLFloaterSnapshot::Impl::onClickAutoSnap(LLUICtrl *ctrl, void* data)
void LLFloaterSnapshot::Impl::onClickMore(void* data)
{
- gSavedSettings.setBOOL( "AdvanceSnapshot", TRUE );
+ BOOL visible = gSavedSettings.getBOOL("AdvanceSnapshot");
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
if (view)
{
+ view->impl.setStatus(Impl::STATUS_READY);
+ gSavedSettings.setBOOL("AdvanceSnapshot", !visible);
+#if 0
view->translate( 0, view->getUIWinHeightShort() - view->getUIWinHeightLong() );
view->reshape(view->getRect().getWidth(), view->getUIWinHeightLong());
+#endif
updateControls(view) ;
updateLayout(view) ;
- if(getPreviewView(view))
- {
- getPreviewView(view)->setThumbnailImageSize() ;
- }
- }
-}
-void LLFloaterSnapshot::Impl::onClickLess(void* data)
-{
- gSavedSettings.setBOOL( "AdvanceSnapshot", FALSE );
-
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
- if (view)
- {
- view->translate( 0, view->getUIWinHeightLong() - view->getUIWinHeightShort() );
- view->reshape(view->getRect().getWidth(), view->getUIWinHeightShort());
- updateControls(view) ;
- updateLayout(view) ;
+ // *TODO: redundant?
if(getPreviewView(view))
{
getPreviewView(view)->setThumbnailImageSize() ;
@@ -1651,21 +1601,21 @@ void LLFloaterSnapshot::Impl::onClickHUDCheck(LLUICtrl *ctrl, void* data)
}
}
+#if 0
// static
-void LLFloaterSnapshot::Impl::onClickKeepOpenCheck(LLUICtrl* ctrl, void* data)
+void LLFloaterSnapshot::Impl::onClickKeepAspectCheck(LLUICtrl* ctrl, void* data)
{
LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
-
- gSavedSettings.setBOOL( "CloseSnapshotOnKeep", !check->get() );
+ LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ applyKeepAspectCheck(view, check->get());
}
+#endif
// static
-void LLFloaterSnapshot::Impl::onClickKeepAspectCheck(LLUICtrl* ctrl, void* data)
+void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL checked)
{
- LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
- gSavedSettings.setBOOL( "KeepAspectForSnapshot", check->get() );
-
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ gSavedSettings.setBOOL("KeepAspectForSnapshot", checked);
+
if (view)
{
LLSnapshotLivePreview* previewp = getPreviewView(view) ;
@@ -1688,20 +1638,6 @@ void LLFloaterSnapshot::Impl::onClickKeepAspectCheck(LLUICtrl* ctrl, void* data)
}
// static
-void LLFloaterSnapshot::Impl::onCommitQuality(LLUICtrl* ctrl, void* data)
-{
- LLSliderCtrl* slider = (LLSliderCtrl*)ctrl;
- S32 quality_val = llfloor((F32)slider->getValue().asReal());
-
- LLSnapshotLivePreview* previewp = getPreviewView((LLFloaterSnapshot *)data);
- if (previewp)
- {
- previewp->setSnapshotQuality(quality_val);
- }
- checkAutoSnapshot(previewp, TRUE);
-}
-
-// static
void LLFloaterSnapshot::Impl::onCommitFreezeFrame(LLUICtrl* ctrl, void* data)
{
LLCheckBoxCtrl* check_box = (LLCheckBoxCtrl*)ctrl;
@@ -1723,18 +1659,16 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
LLSnapshotLivePreview *previewp = getPreviewView(view) ;
// Don't round texture sizes; textures are commonly stretched in world, profiles, etc and need to be "squashed" during upload, not cropped here
-#if 0
- if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE == getTypeIndex(view))
+ if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE == getActiveSnapshotType(view))
{
previewp->mKeepAspectRatio = FALSE ;
return ;
}
-#endif
if(0 == index) //current window size
{
view->impl.mAspectRatioCheckOff = true ;
- view->getChildView("keep_aspect_check")->setEnabled(FALSE) ;
+ enableAspectRatioCheckbox(view, FALSE);
if(previewp)
{
@@ -1744,20 +1678,17 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
else if(-1 == index) //custom
{
view->impl.mAspectRatioCheckOff = false ;
- //if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE != gSavedSettings.getS32("LastSnapshotType"))
- {
- view->getChildView("keep_aspect_check")->setEnabled(TRUE) ;
+ enableAspectRatioCheckbox(view, TRUE);
- if(previewp)
- {
- previewp->mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ;
- }
+ if(previewp)
+ {
+ previewp->mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ;
}
}
else
{
view->impl.mAspectRatioCheckOff = true ;
- view->getChildView("keep_aspect_check")->setEnabled(FALSE) ;
+ enableAspectRatioCheckbox(view, FALSE);
if(previewp)
{
@@ -1768,23 +1699,65 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
return ;
}
-static std::string lastSnapshotWidthName()
+// Show/hide upload progress indicators.
+// static
+void LLFloaterSnapshot::Impl::setWorking(LLFloaterSnapshot* floater, bool working)
+{
+ LLUICtrl* working_lbl = floater->getChild<LLUICtrl>("working_lbl");
+ working_lbl->setVisible(working);
+ floater->getChild<LLUICtrl>("working_indicator")->setVisible(working);
+
+ if (working)
+ {
+ const std::string panel_name = getActivePanel(floater, false)->getName();
+ const std::string prefix = panel_name.substr(std::string("panel_snapshot_").size());
+ std::string progress_text = floater->getString(prefix + "_" + "progress_str");
+ working_lbl->setValue(progress_text);
+ }
+
+ // All controls should be disabled while posting.
+ floater->setCtrlsEnabled(!working);
+ LLPanelSnapshot* active_panel = getActivePanel(floater);
+ if (active_panel)
+ {
+ active_panel->enableControls(!working);
+ }
+}
+
+// Show/hide upload status message.
+// static
+void LLFloaterSnapshot::Impl::setFinished(LLFloaterSnapshot* floater, bool finished, bool ok, const std::string& msg)
{
- switch(gSavedSettings.getS32("LastSnapshotType"))
+ floater->mSucceessLblPanel->setVisible(finished && ok);
+ floater->mFailureLblPanel->setVisible(finished && !ok);
+
+ if (finished)
{
- // *TODO: Separate settings for Web snapshots and postcards
- case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToEmailWidth";
+ LLUICtrl* finished_lbl = floater->getChild<LLUICtrl>(ok ? "succeeded_lbl" : "failed_lbl");
+ std::string result_text = floater->getString(msg + "_" + (ok ? "succeeded_str" : "failed_str"));
+ finished_lbl->setValue(result_text);
+
+ LLSideTrayPanelContainer* panel_container = floater->getChild<LLSideTrayPanelContainer>("panel_container");
+ panel_container->openPreviousPanel();
+ panel_container->getCurrentPanel()->onOpen(LLSD());
+ }
+}
+
+static std::string lastSnapshotWidthName(S32 shot_type)
+{
+ switch (shot_type)
+ {
+ case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToProfileWidth";
case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: return "LastSnapshotToEmailWidth";
case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: return "LastSnapshotToInventoryWidth";
default: return "LastSnapshotToDiskWidth";
}
}
-static std::string lastSnapshotHeightName()
+static std::string lastSnapshotHeightName(S32 shot_type)
{
- switch(gSavedSettings.getS32("LastSnapshotType"))
+ switch (shot_type)
{
- // *TODO: Separate settings for Web snapshots and postcards
- case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToEmailHeight";
+ case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToProfileHeight";
case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: return "LastSnapshotToEmailHeight";
case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: return "LastSnapshotToInventoryHeight";
default: return "LastSnapshotToDiskHeight";
@@ -1799,10 +1772,12 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
if (!view || !combobox)
{
+ llassert(view && combobox);
return;
}
// save off all selected resolution values
+ gSavedSettings.setS32("SnapshotProfileLastResolution", view->getChild<LLComboBox>("profile_size_combo")->getCurrentIndex());
gSavedSettings.setS32("SnapshotPostcardLastResolution", view->getChild<LLComboBox>("postcard_size_combo")->getCurrentIndex());
gSavedSettings.setS32("SnapshotTextureLastResolution", view->getChild<LLComboBox>("texture_size_combo")->getCurrentIndex());
gSavedSettings.setS32("SnapshotLocalLastResolution", view->getChild<LLComboBox>("local_size_combo")->getCurrentIndex());
@@ -1824,16 +1799,45 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
if (width == 0 || height == 0)
{
// take resolution from current window size
+ lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl;
previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
}
else if (width == -1 || height == -1)
{
// load last custom value
- previewp->setSize(gSavedSettings.getS32(lastSnapshotWidthName()), gSavedSettings.getS32(lastSnapshotHeightName()));
+#if 1
+ S32 new_width = 0, new_height = 0;
+ LLPanelSnapshot* spanel = getActivePanel(view);
+ if (spanel)
+ {
+ lldebugs << "Loading typed res from panel " << spanel->getName() << llendl;
+ new_width = spanel->getTypedPreviewWidth();
+ new_height = spanel->getTypedPreviewHeight();
+ }
+ else
+ {
+ const S32 shot_type = getActiveSnapshotType(view);
+ lldebugs << "Loading saved res for shot_type " << shot_type << llendl;
+ new_width = gSavedSettings.getS32(lastSnapshotWidthName(shot_type));
+ new_height = gSavedSettings.getS32(lastSnapshotHeightName(shot_type));
+ }
+
+ llassert(new_width > 0 && new_height > 0);
+ previewp->setSize(new_width, new_height);
+#else
+ LLPanelSnapshot* spanel = getActivePanel(view);
+ if (spanel)
+ {
+ lldebugs << "Setting custom preview res : " << spanel->getTypedPreviewWidth() << "x" << spanel->getTypedPreviewHeight() << llendl;
+ previewp->setSize(spanel->getTypedPreviewWidth(), spanel->getTypedPreviewHeight());
+ }
+ //previewp->setSize(gSavedSettings.getS32(lastSnapshotWidthName()), gSavedSettings.getS32(lastSnapshotHeightName()));
+#endif
}
else
{
// use the resolution from the selected pre-canned drop-down choice
+ lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl;
previewp->setSize(width, height);
}
@@ -1853,10 +1857,10 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
resetSnapshotSizeOnUI(view, width, height) ;
}
- if(view->getChild<LLUICtrl>("snapshot_width")->getValue().asInteger() != width || view->getChild<LLUICtrl>("snapshot_height")->getValue().asInteger() != height)
+ if(getWidthSpinner(view)->getValue().asInteger() != width || getHeightSpinner(view)->getValue().asInteger() != height)
{
- view->getChild<LLUICtrl>("snapshot_width")->setValue(width);
- view->getChild<LLUICtrl>("snapshot_height")->setValue(height);
+ getWidthSpinner(view)->setValue(width);
+ getHeightSpinner(view)->setValue(height);
}
if(original_width != width || original_height != height)
@@ -1869,6 +1873,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
if(do_update)
{
updateControls(view);
+ setNeedRefresh(view, true);
}
}
}
@@ -1892,32 +1897,42 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data)
}
}
-//static
-void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data)
+// static
+void LLFloaterSnapshot::Impl::onImageQualityChange(LLFloaterSnapshot* view, S32 quality_val)
+{
+ LLSnapshotLivePreview* previewp = getPreviewView(view);
+ if (previewp)
+ {
+ previewp->setSnapshotQuality(quality_val);
+ }
+ checkAutoSnapshot(previewp, TRUE);
+}
+
+// static
+void LLFloaterSnapshot::Impl::onImageFormatChange(LLFloaterSnapshot* view)
{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
if (view)
{
- gSavedSettings.setS32("LastSnapshotType", getTypeIndex(view));
+ gSavedSettings.setS32("SnapshotFormat", getImageFormat(view));
getPreviewView(view)->updateSnapshot(TRUE);
updateControls(view);
+ setNeedRefresh(view, false); // we're refreshing
}
}
-
+#if 0
//static
-void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data)
+void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data)
{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
if (view)
{
- gSavedSettings.setS32("SnapshotFormat", getFormatIndex(view));
+ gSavedSettings.setS32("LastSnapshotType", getTypeIndex(view));
getPreviewView(view)->updateSnapshot(TRUE);
updateControls(view);
}
}
-
-
+#endif
// Sets the named size combo to "custom" mode.
// static
@@ -1931,6 +1946,10 @@ void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const s
{
gSavedSettings.setS32("SnapshotPostcardLastResolution", combo->getCurrentIndex());
}
+ else if(comboname == "profile_size_combo")
+ {
+ gSavedSettings.setS32("SnapshotProfileLastResolution", combo->getCurrentIndex());
+ }
else if(comboname == "texture_size_combo")
{
gSavedSettings.setS32("SnapshotTextureLastResolution", combo->getCurrentIndex());
@@ -2027,21 +2046,31 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3
//static
void LLFloaterSnapshot::Impl::resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height)
{
- view->getChild<LLSpinCtrl>("snapshot_width")->forceSetValue(width);
- view->getChild<LLSpinCtrl>("snapshot_height")->forceSetValue(height);
- gSavedSettings.setS32(lastSnapshotWidthName(), width);
- gSavedSettings.setS32(lastSnapshotHeightName(), height);
+ getWidthSpinner(view)->forceSetValue(width);
+ getHeightSpinner(view)->forceSetValue(height);
+ gSavedSettings.setS32(lastSnapshotWidthName(getActiveSnapshotType(view)), width);
+ gSavedSettings.setS32(lastSnapshotHeightName(getActiveSnapshotType(view)), height);
}
+#if 0
//static
void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* data)
{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
+ S32 w = llfloor((F32)getWidthSpinner(view)->getValue().asReal());
+ S32 h = llfloor((F32)getHeightSpinner(view)->getValue().asReal());
+ applyCustomResolution(view, w, h);
+}
+#endif
+
+// static
+void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32 w, S32 h)
+{
+ bool need_refresh = false;
+
+ lldebugs << "applyCustomResolution(" << w << ", " << h << ")" << llendl;
if (view)
{
- S32 w = llfloor((F32)view->getChild<LLUICtrl>("snapshot_width")->getValue().asReal());
- S32 h = llfloor((F32)view->getChild<LLUICtrl>("snapshot_height")->getValue().asReal());
-
LLSnapshotLivePreview* previewp = getPreviewView(view);
if (previewp)
{
@@ -2073,7 +2102,7 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
}
}
#endif
- previewp->setMaxImageSize((S32)((LLSpinCtrl *)ctrl)->getMaxValue()) ;
+ previewp->setMaxImageSize((S32) getWidthSpinner(view)->getMaxValue()) ;
// Check image size changes the value of height and width
if(checkImageSize(previewp, w, h, w != curw, previewp->getMaxImageSize())
@@ -2085,19 +2114,38 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
previewp->setSize(w,h);
checkAutoSnapshot(previewp, FALSE);
previewp->updateSnapshot(FALSE, TRUE);
+ comboSetCustom(view, "profile_size_combo");
comboSetCustom(view, "postcard_size_combo");
comboSetCustom(view, "texture_size_combo");
comboSetCustom(view, "local_size_combo");
+ need_refresh = true;
}
}
- gSavedSettings.setS32(lastSnapshotWidthName(), w);
- gSavedSettings.setS32(lastSnapshotHeightName(), h);
+ gSavedSettings.setS32(lastSnapshotWidthName(getActiveSnapshotType(view)), w);
+ gSavedSettings.setS32(lastSnapshotHeightName(getActiveSnapshotType(view)), h);
updateControls(view);
+ if (need_refresh)
+ {
+ setNeedRefresh(view, true); // need to do this after updateControls()
+ }
}
}
+// static
+void LLFloaterSnapshot::Impl::onSnapshotUploadFinished(bool status)
+{
+ setStatus(STATUS_FINISHED, status, "profile");
+}
+
+
+// static
+void LLFloaterSnapshot::Impl::onSendingPostcardFinished(bool status)
+{
+ setStatus(STATUS_FINISHED, status, "postcard");
+}
+
///----------------------------------------------------------------------------
/// Class LLFloaterSnapshot
///----------------------------------------------------------------------------
@@ -2105,6 +2153,10 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
// Default constructor
LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key)
: LLFloater(key),
+ mRefreshBtn(NULL),
+ mRefreshLabel(NULL),
+ mSucceessLblPanel(NULL),
+ mFailureLblPanel(NULL),
impl (*(new Impl))
{
}
@@ -2112,7 +2164,7 @@ LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key)
// Destroys the object
LLFloaterSnapshot::~LLFloaterSnapshot()
{
- LLView::deleteViewByHandle(impl.mPreviewHandle);
+ delete impl.mPreviewHandle.get();
//unfreeze everything else
gSavedSettings.setBOOL("FreezeTime", FALSE);
@@ -2134,24 +2186,22 @@ BOOL LLFloaterSnapshot::postBuild()
LLWebSharing::instance().init();
}
+#if 0
childSetCommitCallback("snapshot_type_radio", Impl::onCommitSnapshotType, this);
- childSetCommitCallback("local_format_combo", Impl::onCommitSnapshotFormat, this);
+#endif
+ mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this);
+ mRefreshLabel = getChild<LLUICtrl>("refresh_lbl");
+ mSucceessLblPanel = getChild<LLUICtrl>("succeeded_panel");
+ mFailureLblPanel = getChild<LLUICtrl>("failed_panel");
- childSetAction("more_btn", Impl::onClickMore, this);
- childSetAction("less_btn", Impl::onClickLess, this);
-
- childSetAction("upload_btn", Impl::onClickKeep, this);
- childSetAction("send_btn", Impl::onClickKeep, this);
- childSetCommitCallback("save_btn", Impl::onCommitSave, this);
- childSetAction("discard_btn", Impl::onClickDiscard, this);
-
- childSetCommitCallback("image_quality_slider", Impl::onCommitQuality, this);
- getChild<LLUICtrl>("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality"));
+ childSetAction("advanced_options_btn", Impl::onClickMore, this);
+#if 0
childSetCommitCallback("snapshot_width", Impl::onCommitCustomResolution, this);
childSetCommitCallback("snapshot_height", Impl::onCommitCustomResolution, this);
+#endif
childSetCommitCallback("ui_check", Impl::onClickUICheck, this);
getChild<LLUICtrl>("ui_check")->setValue(gSavedSettings.getBOOL("RenderUIInSnapshot"));
@@ -2159,18 +2209,19 @@ BOOL LLFloaterSnapshot::postBuild()
childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this);
getChild<LLUICtrl>("hud_check")->setValue(gSavedSettings.getBOOL("RenderHUDInSnapshot"));
- childSetCommitCallback("keep_open_check", Impl::onClickKeepOpenCheck, this);
- getChild<LLUICtrl>("keep_open_check")->setValue(!gSavedSettings.getBOOL("CloseSnapshotOnKeep"));
-
+#if 0
childSetCommitCallback("keep_aspect_check", Impl::onClickKeepAspectCheck, this);
- getChild<LLUICtrl>("keep_aspect_check")->setValue(gSavedSettings.getBOOL("KeepAspectForSnapshot"));
+#endif
+ impl.setAspectRatioCheckboxValue(this, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this);
getChild<LLUICtrl>("layer_types")->setValue("colors");
getChildView("layer_types")->setEnabled(FALSE);
- getChild<LLUICtrl>("snapshot_width")->setValue(gSavedSettings.getS32(lastSnapshotWidthName()));
- getChild<LLUICtrl>("snapshot_height")->setValue(gSavedSettings.getS32(lastSnapshotHeightName()));
+#if 0 // leads to crash later if one of the settings values is 0
+ impl.getWidthSpinner(this)->setValue(gSavedSettings.getS32(lastSnapshotWidthName()));
+ impl.getHeightSpinner(this)->setValue(gSavedSettings.getS32(lastSnapshotHeightName()));
+#endif
getChild<LLUICtrl>("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
childSetCommitCallback("freeze_frame_check", Impl::onCommitFreezeFrame, this);
@@ -2178,9 +2229,10 @@ BOOL LLFloaterSnapshot::postBuild()
getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this);
- childSetCommitCallback("postcard_size_combo", Impl::onCommitResolution, this);
- childSetCommitCallback("texture_size_combo", Impl::onCommitResolution, this);
- childSetCommitCallback("local_size_combo", Impl::onCommitResolution, this);
+ LLWebProfile::setImageUploadResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSnapshotUploadFinished, _1));
+ LLPostCard::setPostResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSendingPostcardFinished, _1));
+
+ sThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder");
// create preview window
LLRect full_screen_rect = getRootView()->getRect();
@@ -2217,23 +2269,69 @@ void LLFloaterSnapshot::draw()
LLFloater::draw();
- if (previewp)
+ if (previewp && !isMinimized())
{
if(previewp->getThumbnailImage())
{
- LLRect thumbnail_rect = getChild<LLUICtrl>("thumbnail_placeholder")->getRect();
+ bool working = impl.getStatus() == Impl::STATUS_WORKING;
+ const LLRect& thumbnail_rect = getThumbnailPlaceholderRect();
+ const S32 thumbnail_w = previewp->getThumbnailWidth();
+ const S32 thumbnail_h = previewp->getThumbnailHeight();
- S32 offset_x = (getRect().getWidth() - previewp->getThumbnailWidth()) / 2 ;
- S32 offset_y = thumbnail_rect.mBottom + (thumbnail_rect.getHeight() - previewp->getThumbnailHeight()) / 2 ;
+ // calc preview offset within the preview rect
+ const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ;
+ const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ; // preview y pos within the preview rect
- glMatrixMode(GL_MODELVIEW);
+ // calc preview offset within the floater rect
+ S32 offset_x = thumbnail_rect.mLeft + local_offset_x;
+ S32 offset_y = thumbnail_rect.mBottom + local_offset_y;
+
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// Apply floater transparency to the texture unless the floater is focused.
F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
+ LLColor4 color = working ? LLColor4::grey4 : LLColor4::white;
gl_draw_scaled_image(offset_x, offset_y,
- previewp->getThumbnailWidth(), previewp->getThumbnailHeight(),
- previewp->getThumbnailImage(), LLColor4::white % alpha);
+ thumbnail_w, thumbnail_h,
+ previewp->getThumbnailImage(), color % alpha);
previewp->drawPreviewRect(offset_x, offset_y) ;
+
+ // Draw some controls on top of the preview thumbnail.
+ static const S32 PADDING = 5;
+ static const S32 REFRESH_LBL_BG_HEIGHT = 32;
+
+ // Reshape and position the posting result message panels at the top of the thumbnail.
+ // Do this regardless of current posting status (finished or not) to avoid flicker
+ // when the result message is displayed for the first time.
+ // if (impl.getStatus() == Impl::STATUS_FINISHED)
+ {
+ LLRect result_lbl_rect = mSucceessLblPanel->getRect();
+ const S32 result_lbl_h = result_lbl_rect.getHeight();
+ result_lbl_rect.setLeftTopAndSize(local_offset_x, local_offset_y + thumbnail_h, thumbnail_w - 1, result_lbl_h);
+ mSucceessLblPanel->reshape(result_lbl_rect.getWidth(), result_lbl_h);
+ mSucceessLblPanel->setRect(result_lbl_rect);
+ mFailureLblPanel->reshape(result_lbl_rect.getWidth(), result_lbl_h);
+ mFailureLblPanel->setRect(result_lbl_rect);
+ }
+
+ // Position the refresh button in the bottom left corner of the thumbnail.
+ mRefreshBtn->setOrigin(local_offset_x + PADDING, local_offset_y + PADDING);
+
+ if (impl.mNeedRefresh)
+ {
+ // Place the refresh hint text to the right of the refresh button.
+ const LLRect& refresh_btn_rect = mRefreshBtn->getRect();
+ mRefreshLabel->setOrigin(refresh_btn_rect.mLeft + refresh_btn_rect.getWidth() + PADDING, refresh_btn_rect.mBottom);
+
+ // Draw the refresh hint background.
+ LLRect refresh_label_bg_rect(offset_x, offset_y + REFRESH_LBL_BG_HEIGHT, offset_x + thumbnail_w - 1, offset_y);
+ gl_rect_2d(refresh_label_bg_rect, LLColor4::white % 0.9f, TRUE);
+ }
+
+ gGL.pushUIMatrix();
+ LLUI::translate((F32) thumbnail_rect.mLeft, (F32) thumbnail_rect.mBottom);
+ sThumbnailPlaceholder->draw();
+ gGL.popUIMatrix();
}
}
}
@@ -2249,6 +2347,9 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
gSnapshotFloaterView->setEnabled(TRUE);
gSnapshotFloaterView->setVisible(TRUE);
gSnapshotFloaterView->adjustToFitScreen(this, FALSE);
+
+ // Initialize default tab.
+ getChild<LLSideTrayPanelContainer>("panel_container")->getCurrentPanel()->onOpen(LLSD());
}
void LLFloaterSnapshot::onClose(bool app_quitting)
@@ -2256,6 +2357,62 @@ void LLFloaterSnapshot::onClose(bool app_quitting)
getParent()->setMouseOpaque(FALSE);
}
+// virtual
+S32 LLFloaterSnapshot::notify(const LLSD& info)
+{
+ // A child panel wants to change snapshot resolution.
+ if (info.has("combo-res-change"))
+ {
+ std::string combo_name = info["combo-res-change"]["control-name"].asString();
+ impl.updateResolution(getChild<LLUICtrl>(combo_name), this);
+ return 1;
+ }
+
+ if (info.has("custom-res-change"))
+ {
+ LLSD res = info["custom-res-change"];
+ impl.applyCustomResolution(this, res["w"].asInteger(), res["h"].asInteger());
+ return 1;
+ }
+
+ if (info.has("keep-aspect-change"))
+ {
+ impl.applyKeepAspectCheck(this, info["keep-aspect-change"].asBoolean());
+ return 1;
+ }
+
+ if (info.has("image-quality-change"))
+ {
+ impl.onImageQualityChange(this, info["image-quality-change"].asInteger());
+ return 1;
+ }
+
+ if (info.has("image-format-change"))
+ {
+ impl.onImageFormatChange(this);
+ return 1;
+ }
+
+ if (info.has("set-ready"))
+ {
+ impl.setStatus(Impl::STATUS_READY);
+ return 1;
+ }
+
+ if (info.has("set-working"))
+ {
+ impl.setStatus(Impl::STATUS_WORKING);
+ return 1;
+ }
+
+ if (info.has("set-finished"))
+ {
+ LLSD data = info["set-finished"];
+ impl.setStatus(Impl::STATUS_FINISHED, data["ok"].asBoolean(), data["msg"].asString());
+ return 1;
+ }
+ return 0;
+}
//static
void LLFloaterSnapshot::update()
@@ -2276,6 +2433,176 @@ void LLFloaterSnapshot::update()
}
}
+// static
+LLFloaterSnapshot* LLFloaterSnapshot::getInstance()
+{
+ return LLFloaterReg::getTypedInstance<LLFloaterSnapshot>("snapshot");
+}
+
+// static
+void LLFloaterSnapshot::saveTexture()
+{
+ lldebugs << "saveTexture" << llendl;
+
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return;
+ }
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return;
+ }
+
+ previewp->saveTexture();
+}
+
+// static
+BOOL LLFloaterSnapshot::saveLocal()
+{
+ lldebugs << "saveLocal" << llendl;
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return FALSE;
+ }
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return FALSE;
+ }
+
+ return previewp->saveLocal();
+}
+
+// static
+void LLFloaterSnapshot::preUpdate()
+{
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (instance)
+ {
+ // Disable the send/post/save buttons until snapshot is ready.
+ Impl::updateControls(instance);
+
+ // Force hiding the "Refresh to save" hint because we know we've just started refresh.
+ Impl::setNeedRefresh(instance, false);
+ }
+}
+
+// static
+void LLFloaterSnapshot::postUpdate()
+{
+ // FIXME: duplicated code
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (instance)
+ {
+ // Enable the send/post/save buttons.
+ Impl::updateControls(instance);
+
+ // We've just done refresh.
+ Impl::setNeedRefresh(instance, false);
+
+ // The refresh button is initially hidden. We show it after the first update,
+ // i.e. when preview appears.
+ if (!instance->mRefreshBtn->getVisible())
+ {
+ instance->mRefreshBtn->setVisible(true);
+ }
+ }
+}
+
+// static
+void LLFloaterSnapshot::postSave()
+{
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return;
+ }
+
+ instance->impl.updateControls(instance);
+ instance->impl.setStatus(Impl::STATUS_WORKING);
+}
+
+// static
+void LLFloaterSnapshot::postPanelSwitch()
+{
+ LLFloaterSnapshot* instance = getInstance();
+ instance->impl.updateControls(instance);
+
+ // Remove the success/failure indicator whenever user presses a snapshot option button.
+ instance->impl.setStatus(Impl::STATUS_READY);
+}
+
+// static
+LLPointer<LLImageFormatted> LLFloaterSnapshot::getImageData()
+{
+ // FIXME: May not work for textures.
+
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return NULL;
+ }
+
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return NULL;
+ }
+
+ LLPointer<LLImageFormatted> img = previewp->getFormattedImage();
+ if (!img.get())
+ {
+ llwarns << "Empty snapshot image data" << llendl;
+ llassert(img.get() != NULL);
+ }
+
+ return img;
+}
+
+// static
+const LLVector3d& LLFloaterSnapshot::getPosTakenGlobal()
+{
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (!instance)
+ {
+ llassert(instance != NULL);
+ return LLVector3d::zero;
+ }
+
+ LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
+ if (!previewp)
+ {
+ llassert(previewp != NULL);
+ return LLVector3d::zero;
+ }
+
+ return previewp->getPosTakenGlobal();
+}
+
+// static
+void LLFloaterSnapshot::setAgentEmail(const std::string& email)
+{
+ LLFloaterSnapshot* instance = LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot");
+ if (instance)
+ {
+ LLSideTrayPanelContainer* panel_container = instance->getChild<LLSideTrayPanelContainer>("panel_container");
+ LLPanel* postcard_panel = panel_container->getPanelByName("panel_snapshot_postcard");
+ postcard_panel->notify(LLSD().with("agent-email", email));
+ }
+}
///----------------------------------------------------------------------------
/// Class LLSnapshotFloaterView
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index c92d9efde5..afe135fa40 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -27,11 +27,15 @@
#ifndef LL_LLFLOATERSNAPSHOT_H
#define LL_LLFLOATERSNAPSHOT_H
+#include "llimage.h"
#include "llfloater.h"
+class LLSpinCtrl;
class LLFloaterSnapshot : public LLFloater
{
+ LOG_CLASS(LLFloaterSnapshot);
+
public:
typedef enum e_snapshot_format
{
@@ -47,20 +51,31 @@ public:
/*virtual*/ void draw();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
+ /*virtual*/ S32 notify(const LLSD& info);
static void update();
-
- static S32 getUIWinHeightLong() {return sUIWinHeightLong ;}
- static S32 getUIWinHeightShort() {return sUIWinHeightShort ;}
- static S32 getUIWinWidth() {return sUIWinWidth ;}
+
+ // TODO: create a snapshot model instead
+ static LLFloaterSnapshot* getInstance();
+ static void saveTexture();
+ static BOOL saveLocal();
+ static void preUpdate();
+ static void postUpdate();
+ static void postSave();
+ static void postPanelSwitch();
+ static LLPointer<LLImageFormatted> getImageData();
+ static const LLVector3d& getPosTakenGlobal();
+ static void setAgentEmail(const std::string& email);
+
+ static const LLRect& getThumbnailPlaceholderRect() { return sThumbnailPlaceholder->getRect(); }
private:
+ static LLUICtrl* sThumbnailPlaceholder;
+ LLUICtrl *mRefreshBtn, *mRefreshLabel;
+ LLUICtrl *mSucceessLblPanel, *mFailureLblPanel;
+
class Impl;
Impl& impl;
-
- static S32 sUIWinHeightLong ;
- static S32 sUIWinHeightShort ;
- static S32 sUIWinWidth ;
};
class LLSnapshotFloaterView : public LLFloaterView
diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp
index e692f1735a..72c077d215 100644
--- a/indra/newview/llfloatersounddevices.cpp
+++ b/indra/newview/llfloatersounddevices.cpp
@@ -28,7 +28,6 @@
#include "llfloatersounddevices.h"
-#include "llbottomtray.h"
#include "lldraghandle.h"
#include "llpanelvoicedevicesettings.h"
@@ -55,13 +54,7 @@ LLFloaterSoundDevices::~LLFloaterSoundDevices()
BOOL LLFloaterSoundDevices::postBuild()
{
LLTransientDockableFloater::postBuild();
-
- LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("flyout_btn");
- setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP));
- setIsChrome(TRUE);
- if (mDragHandle)
- mDragHandle->setTitleVisible(TRUE);
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
LLPanelVoiceDeviceSettings* panel = findChild<LLPanelVoiceDeviceSettings>("device_settings_panel");
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 33b7777d2e..1008b4a6e4 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -36,12 +36,12 @@
#include "llagentcamera.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
-#include "llcombobox.h"
#include "lldraghandle.h"
#include "llerror.h"
#include "llfloaterbuildoptions.h"
#include "llfloatermediasettings.h"
#include "llfloateropenobject.h"
+#include "llfloaterobjectweights.h"
#include "llfloaterreg.h"
#include "llfocusmgr.h"
#include "llmediaentry.h"
@@ -55,6 +55,7 @@
#include "llpanelobject.h"
#include "llpanelvolume.h"
#include "llpanelpermissions.h"
+#include "llparcel.h"
#include "llradiogroup.h"
#include "llresmgr.h"
#include "llselectmgr.h"
@@ -85,7 +86,6 @@
#include "llviewerwindow.h"
#include "llvovolume.h"
#include "lluictrlfactory.h"
-#include "llaccountingquotamanager.h"
#include "llmeshrepository.h"
// Globals
@@ -101,6 +101,7 @@ const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] =
std::string("Content"), // PANEL_CONTENTS,
};
+
// Local prototypes
void commit_select_component(void *data);
void click_show_more(void*);
@@ -116,9 +117,26 @@ void commit_radio_group_focus(LLUICtrl* ctrl);
void commit_radio_group_move(LLUICtrl* ctrl);
void commit_radio_group_edit(LLUICtrl* ctrl);
void commit_radio_group_land(LLUICtrl* ctrl);
-void commit_grid_mode(LLUICtrl *);
void commit_slider_zoom(LLUICtrl *ctrl);
+/**
+ * Class LLLandImpactsObserver
+ *
+ * An observer class to monitor parcel selection and update
+ * the land impacts data from a parcel containing the selected object.
+ */
+class LLLandImpactsObserver : public LLParcelObserver
+{
+public:
+ virtual void changed()
+ {
+ LLFloaterTools* tools_floater = LLFloaterReg::getTypedInstance<LLFloaterTools>("build");
+ if(tools_floater)
+ {
+ tools_floater->updateLandImpacts();
+ }
+ }
+};
//static
void* LLFloaterTools::createPanelPermissions(void* data)
@@ -234,7 +252,6 @@ BOOL LLFloaterTools::postBuild()
getChild<LLUICtrl>("checkbox uniform")->setValue((BOOL)gSavedSettings.getBOOL("ScaleUniform"));
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
getChild<LLUICtrl>("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
- mComboGridMode = getChild<LLComboBox>("combobox grid mode");
mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label");
//
@@ -269,6 +286,8 @@ BOOL LLFloaterTools::postBuild()
// the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here
getChild<LLUICtrl>("slider force")->setValue(log10(gSavedSettings.getF32("LandBrushForce")));
+ mCostTextBorder = getChild<LLViewBorder>("cost_text_border");
+
mTab = getChild<LLTabContainer>("Object Info Tabs");
if(mTab)
{
@@ -311,7 +330,6 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCheckSnapToGrid(NULL),
mBtnGridOptions(NULL),
mTitleMedia(NULL),
- mComboGridMode(NULL),
mCheckStretchUniform(NULL),
mCheckStretchTexture(NULL),
mCheckStretchUniformLabel(NULL),
@@ -344,7 +362,11 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mPanelFace(NULL),
mPanelLandInfo(NULL),
+ mCostTextBorder(NULL),
mTabLand(NULL),
+
+ mLandImpactsObserver(NULL),
+
mDirty(TRUE),
mNeedMediaTitle(TRUE)
{
@@ -367,7 +389,6 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCommitCallbackRegistrar.add("BuildTool.selectComponent", boost::bind(&commit_select_component, this));
mCommitCallbackRegistrar.add("BuildTool.gridOptions", boost::bind(&LLFloaterTools::onClickGridOptions,this));
mCommitCallbackRegistrar.add("BuildTool.applyToSelection", boost::bind(&click_apply_to_selection, this));
- mCommitCallbackRegistrar.add("BuildTool.gridMode", boost::bind(&commit_grid_mode,_1));
mCommitCallbackRegistrar.add("BuildTool.commitRadioLand", boost::bind(&commit_radio_group_land,_1));
mCommitCallbackRegistrar.add("BuildTool.LandBrushForce", boost::bind(&commit_slider_dozer_force,_1));
mCommitCallbackRegistrar.add("BuildTool.AddMedia", boost::bind(&LLFloaterTools::onClickBtnAddMedia,this));
@@ -377,12 +398,17 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCommitCallbackRegistrar.add("BuildTool.LinkObjects", boost::bind(&LLSelectMgr::linkObjects, LLSelectMgr::getInstance()));
mCommitCallbackRegistrar.add("BuildTool.UnlinkObjects", boost::bind(&LLSelectMgr::unlinkObjects, LLSelectMgr::getInstance()));
+ mLandImpactsObserver = new LLLandImpactsObserver();
+ LLViewerParcelMgr::getInstance()->addObserver(mLandImpactsObserver);
}
LLFloaterTools::~LLFloaterTools()
{
// children automatically deleted
gFloaterTools = NULL;
+
+ LLViewerParcelMgr::getInstance()->removeObserver(mLandImpactsObserver);
+ delete mLandImpactsObserver;
}
void LLFloaterTools::setStatusText(const std::string& text)
@@ -423,21 +449,22 @@ void LLFloaterTools::refresh()
// Refresh object and prim count labels
LLLocale locale(LLLocale::USER_LOCALE);
-
+#if 0
if (!gMeshRepo.meshRezEnabled())
{
std::string obj_count_string;
LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
- getChild<LLUICtrl>("obj_count")->setTextArg("[COUNT]", obj_count_string);
+ getChild<LLUICtrl>("selection_count")->setTextArg("[OBJ_COUNT]", obj_count_string);
std::string prim_count_string;
LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());
- getChild<LLUICtrl>("prim_count")->setTextArg("[COUNT]", prim_count_string);
+ getChild<LLUICtrl>("selection_count")->setTextArg("[PRIM_COUNT]", prim_count_string);
// calculate selection rendering cost
if (sShowObjectCost)
{
std::string prim_cost_string;
- LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost());
+ S32 render_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectRenderCost();
+ LLResMgr::getInstance()->getIntegerString(prim_cost_string, render_cost);
getChild<LLUICtrl>("RenderingCost")->setTextArg("[COUNT]", prim_cost_string);
}
@@ -448,56 +475,47 @@ void LLFloaterTools::refresh()
getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost);
}
else
+#endif
{
- // Get the number of objects selected
- std::string root_object_count_string;
- std::string object_count_string;
-
- LLResMgr::getInstance()->getIntegerString(
- root_object_count_string,
- LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
- LLResMgr::getInstance()->getIntegerString(
- object_count_string,
- LLSelectMgr::getInstance()->getSelection()->getObjectCount());
-
- F32 obj_cost =
- LLSelectMgr::getInstance()->getSelection()->getSelectedObjectCost();
- F32 link_cost =
- LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetCost();
- F32 obj_physics_cost =
- LLSelectMgr::getInstance()->getSelection()->getSelectedPhysicsCost();
- F32 link_physics_cost =
- LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetPhysicsCost();
-
- // Update the text for the counts
- childSetTextArg(
- "linked_set_count",
- "[COUNT]",
- root_object_count_string);
- childSetTextArg("object_count", "[COUNT]", object_count_string);
-
- // Update the text for the resource costs
- childSetTextArg("linked_set_cost","[COST]",llformat("%.1f", link_cost));
- childSetTextArg("object_cost", "[COST]", llformat("%.1f", obj_cost));
- childSetTextArg("linked_set_cost","[PHYSICS]",llformat("%.1f", link_physics_cost));
- childSetTextArg("object_cost", "[PHYSICS]", llformat("%.1f", obj_physics_cost));
-
- // Display rendering cost if needed
- if (sShowObjectCost)
+ F32 link_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetCost();
+ S32 link_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
+
+ LLCrossParcelFunctor func;
+ if (LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, true))
{
- std::string prim_cost_string;
- LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost());
- getChild<LLUICtrl>("RenderingCost")->setTextArg("[COUNT]", prim_cost_string);
+ // Selection crosses parcel bounds.
+ // We don't display remaining land capacity in this case.
+ const LLStringExplicit empty_str("");
+ childSetTextArg("remaining_capacity", "[CAPACITY_STRING]", empty_str);
+ }
+ else
+ {
+ LLViewerObject* selected_object = mObjectSelection->getFirstObject();
+ if (selected_object)
+ {
+ // Select a parcel at the currently selected object's position.
+ LLViewerParcelMgr::getInstance()->selectParcelAt(selected_object->getPositionGlobal());
+ }
+ else
+ {
+ llwarns << "Failed to get selected object" << llendl;
+ }
}
+ LLStringUtil::format_map_t selection_args;
+ selection_args["OBJ_COUNT"] = llformat("%.1d", link_count);
+ selection_args["LAND_IMPACT"] = llformat("%.1d", (S32)link_cost);
- // disable the object and prim counts if nothing selected
- bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty();
- childSetEnabled("linked_set_count", have_selection);
- childSetEnabled("object_count", have_selection);
- childSetEnabled("linked_set_cost", have_selection);
- childSetEnabled("object_cost", have_selection);
- getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost);
+ std::ostringstream selection_info;
+
+ selection_info << getString("status_selectcount", selection_args);
+
+ getChild<LLTextBox>("selection_count")->setText(selection_info.str());
+
+ bool have_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
+ childSetVisible("selection_count", have_selection);
+ childSetVisible("remaining_capacity", have_selection);
+ childSetVisible("selection_empty", !have_selection);
}
@@ -509,6 +527,13 @@ void LLFloaterTools::refresh()
refreshMedia();
mPanelContents->refresh();
mPanelLandInfo->refresh();
+
+ // Refresh the advanced weights floater
+ LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::getTypedInstance<LLFloaterObjectWeights>("object_weights");
+ if(object_weights_floater && object_weights_floater->getVisible())
+ {
+ object_weights_floater->refresh();
+ }
}
void LLFloaterTools::draw()
@@ -662,33 +687,6 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
mRadioGroupEdit->setValue("radio select face");
}
- if (mComboGridMode)
- {
- mComboGridMode->setVisible( edit_visible );
- S32 index = mComboGridMode->getCurrentIndex();
- mComboGridMode->removeall();
-
- switch (mObjectSelection->getSelectType())
- {
- case SELECT_TYPE_HUD:
- mComboGridMode->add(getString("grid_screen_text"));
- mComboGridMode->add(getString("grid_local_text"));
- //mComboGridMode->add(getString("grid_reference_text"));
- break;
- case SELECT_TYPE_WORLD:
- mComboGridMode->add(getString("grid_world_text"));
- mComboGridMode->add(getString("grid_local_text"));
- mComboGridMode->add(getString("grid_reference_text"));
- break;
- case SELECT_TYPE_ATTACHMENT:
- mComboGridMode->add(getString("grid_attachment_text"));
- mComboGridMode->add(getString("grid_local_text"));
- mComboGridMode->add(getString("grid_reference_text"));
- break;
- }
-
- mComboGridMode->setCurrentByIndex(index);
- }
// Snap to grid disabled for grab tool - very confusing
if (mCheckSnapToGrid) mCheckSnapToGrid->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ );
if (mBtnGridOptions) mBtnGridOptions->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ );
@@ -737,6 +735,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
// Land buttons
BOOL land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() );
+ mCostTextBorder->setVisible(!land_visible);
+
if (mBtnLand) mBtnLand ->setToggleState( land_visible );
mRadioGroupLand->setVisible( land_visible );
@@ -789,15 +789,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
getChildView("Strength:")->setVisible( land_visible);
}
- bool show_mesh_cost = gMeshRepo.meshRezEnabled();
+ bool have_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
- getChildView("obj_count")->setVisible( !land_visible && !show_mesh_cost);
- getChildView("prim_count")->setVisible( !land_visible && !show_mesh_cost);
- getChildView("linked_set_count")->setVisible( !land_visible && show_mesh_cost);
- getChildView("linked_set_cost")->setVisible( !land_visible && show_mesh_cost);
- getChildView("object_count")->setVisible( !land_visible && show_mesh_cost);
- getChildView("object_cost")->setVisible( !land_visible && show_mesh_cost);
- getChildView("RenderingCost")->setVisible( !land_visible && sShowObjectCost);
+ getChildView("selection_count")->setVisible(!land_visible && have_selection);
+ getChildView("remaining_capacity")->setVisible(!land_visible && have_selection);
+ getChildView("selection_empty")->setVisible(!land_visible && !have_selection);
mTab->setVisible(!land_visible);
mPanelLandInfo->setVisible(land_visible);
@@ -860,6 +856,9 @@ void LLFloaterTools::onClose(bool app_quitting)
//gMenuBarView->setItemVisible("BuildTools", FALSE);
LLFloaterReg::hideInstance("media_settings");
+
+ // hide the advanced object weights floater
+ LLFloaterReg::hideInstance("object_weights");
}
void click_popup_info(void*)
@@ -1030,13 +1029,6 @@ void commit_select_component(void *data)
}
}
-void commit_grid_mode(LLUICtrl *ctrl)
-{
- LLComboBox* combo = (LLComboBox*)ctrl;
-
- LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
-}
-
// static
void LLFloaterTools::setObjectType( LLPCode pcode )
{
@@ -1053,35 +1045,6 @@ void LLFloaterTools::onClickGridOptions()
//floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE);
}
-S32 LLFloaterTools::calcRenderCost()
-{
- S32 cost = 0;
- std::set<LLUUID> textures;
-
- for (LLObjectSelection::iterator selection_iter = LLSelectMgr::getInstance()->getSelection()->begin();
- selection_iter != LLSelectMgr::getInstance()->getSelection()->end();
- ++selection_iter)
- {
- LLSelectNode *select_node = *selection_iter;
- if (select_node)
- {
- LLViewerObject *vobj = select_node->getObject();
- if (vobj->getVolume())
- {
- LLVOVolume* volume = (LLVOVolume*) vobj;
-
- cost += volume->getRenderCost(textures);
- cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST;
- textures.clear();
- }
- }
- }
-
-
- return cost;
-}
-
-
// static
void LLFloaterTools::setEditTool(void* tool_pointer)
{
@@ -1157,6 +1120,37 @@ bool LLFloaterTools::selectedMediaEditable()
return selected_Media_editable;
}
+void LLFloaterTools::updateLandImpacts()
+{
+ LLParcel *parcel = mParcelSelection->getParcel();
+ if (!parcel)
+ {
+ return;
+ }
+
+ S32 rezzed_prims = parcel->getSimWidePrimCount();
+ S32 total_capacity = parcel->getSimWideMaxPrimCapacity();
+
+ std::string remaining_capacity_str = "";
+
+ bool show_mesh_cost = gMeshRepo.meshRezEnabled();
+ if (show_mesh_cost)
+ {
+ LLStringUtil::format_map_t remaining_capacity_args;
+ remaining_capacity_args["LAND_CAPACITY"] = llformat("%d", total_capacity - rezzed_prims);
+ remaining_capacity_str = getString("status_remaining_capacity", remaining_capacity_args);
+ }
+
+ childSetTextArg("remaining_capacity", "[CAPACITY_STRING]", remaining_capacity_str);
+
+ // Update land impacts info in the weights floater
+ LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::getTypedInstance<LLFloaterObjectWeights>("object_weights");
+ if(object_weights_floater)
+ {
+ object_weights_floater->updateLandImpacts(parcel);
+ }
+}
+
void LLFloaterTools::getMediaState()
{
LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection();
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index fd81a75397..63ed9dc82b 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -32,7 +32,6 @@
#include "llparcelselection.h"
class LLButton;
-class LLComboBox;
class LLCheckBoxCtrl;
class LLPanelPermissions;
class LLPanelObject;
@@ -48,6 +47,7 @@ class LLMediaCtrl;
class LLTool;
class LLParcelSelection;
class LLObjectSelection;
+class LLLandImpactsObserver;
typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle;
@@ -104,6 +104,7 @@ public:
void updateMediaTitle();
void navigateToTitleMedia( const std::string url );
bool selectedMediaEditable();
+ void updateLandImpacts();
private:
void refresh();
@@ -114,7 +115,6 @@ private:
static bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response);
static void setObjectType( LLPCode pcode );
void onClickGridOptions();
- S32 calcRenderCost();
public:
LLButton *mBtnFocus;
@@ -140,7 +140,6 @@ public:
LLCheckBoxCtrl* mCheckSnapToGrid;
LLButton* mBtnGridOptions;
- LLComboBox* mComboGridMode;
LLCheckBoxCtrl* mCheckStretchUniform;
LLCheckBoxCtrl* mCheckStretchTexture;
@@ -179,8 +178,12 @@ public:
LLPanelFace *mPanelFace;
LLPanelLandInfo *mPanelLandInfo;
+ LLViewBorder* mCostTextBorder;
+
LLTabContainer* mTabLand;
+ LLLandImpactsObserver* mLandImpactsObserver;
+
LLParcelSelectionHandle mParcelSelection;
LLObjectSelectionHandle mObjectSelection;
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
new file mode 100644
index 0000000000..324afe661f
--- /dev/null
+++ b/indra/newview/llfloatertoybox.cpp
@@ -0,0 +1,191 @@
+/**
+ * @file llfloatertoybox.cpp
+ * @brief The toybox for flexibilizing the UI.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatertoybox.h"
+
+#include "llbutton.h"
+#include "llcommandmanager.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
+#include "llpanel.h"
+#include "lltoolbar.h"
+#include "lltoolbarview.h"
+#include "lltrans.h"
+
+LLFloaterToybox::LLFloaterToybox(const LLSD& key)
+ : LLFloater(key)
+ , mToolBar(NULL)
+{
+ mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this));
+ mCommitCallbackRegistrar.add("Toybox.ClearAll", boost::bind(&LLFloaterToybox::onBtnClearAll, this));
+}
+
+LLFloaterToybox::~LLFloaterToybox()
+{
+}
+
+bool compare_localized_command_labels(LLCommand * cmd1, LLCommand * cmd2)
+{
+ std::string lab1 = LLTrans::getString(cmd1->labelRef());
+ std::string lab2 = LLTrans::getString(cmd2->labelRef());
+
+ return (lab1 < lab2);
+}
+
+BOOL LLFloaterToybox::postBuild()
+{
+ mToolBar = getChild<LLToolBar>("toybox_toolbar");
+
+ mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolBar->setButtonEnterCallback(boost::bind(&LLFloaterToybox::onToolBarButtonEnter,this,_1));
+
+ //
+ // Sort commands by localized labels so they will appear alphabetized in all languages
+ //
+
+ std::list<LLCommand *> alphabetized_commands;
+
+ LLCommandManager& cmdMgr = LLCommandManager::instance();
+ for (U32 i = 0; i < cmdMgr.commandCount(); i++)
+ {
+ LLCommand * command = cmdMgr.getCommand(i);
+
+ if (command->availableInToybox())
+ {
+ alphabetized_commands.push_back(command);
+ }
+ }
+
+ alphabetized_commands.sort(compare_localized_command_labels);
+
+ //
+ // Create Buttons
+ //
+
+ for (std::list<LLCommand *>::iterator it = alphabetized_commands.begin(); it != alphabetized_commands.end(); ++it)
+ {
+ mToolBar->addCommand((*it)->id());
+ }
+
+ return TRUE;
+}
+
+void LLFloaterToybox::draw()
+{
+ llassert(gToolBarView != NULL);
+
+ const command_id_list_t& command_list = mToolBar->getCommandsList();
+
+ for (command_id_list_t::const_iterator it = command_list.begin(); it != command_list.end(); ++it)
+ {
+ const LLCommandId& id = *it;
+
+ const bool command_not_present = (gToolBarView->hasCommand(id) == LLToolBarView::TOOLBAR_NONE);
+ mToolBar->enableCommand(id, command_not_present);
+ }
+
+ LLFloater::draw();
+}
+
+static bool finish_restore_toybox(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ if (option == 0)
+ {
+ LLToolBarView::loadDefaultToolbars();
+ }
+
+ return false;
+}
+
+static bool finish_clear_all_toybox(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ if (option == 0)
+ {
+ LLToolBarView::clearAllToolbars();
+ }
+
+ return false;
+}
+
+static LLNotificationFunctorRegistration finish_restore_toybox_reg("ConfirmRestoreToybox", finish_restore_toybox);
+static LLNotificationFunctorRegistration finish_clear_all_toybox_reg("ConfirmClearAllToybox", finish_clear_all_toybox);
+
+void LLFloaterToybox::onBtnRestoreDefaults()
+{
+ LLNotificationsUtil::add("ConfirmRestoreToybox");
+}
+
+void LLFloaterToybox::onBtnClearAll()
+{
+ LLNotificationsUtil::add("ConfirmClearAllToybox");
+}
+
+BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ S32 local_x = x - mToolBar->getRect().mLeft;
+ S32 local_y = y - mToolBar->getRect().mBottom;
+ return mToolBar->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+}
+
+void LLFloaterToybox::onToolBarButtonEnter(LLView* button)
+{
+ std::string suffix = "";
+
+ LLCommandId commandId(button->getName());
+ LLCommand* command = LLCommandManager::instance().getCommand(commandId);
+
+ if (command)
+ {
+ S32 command_loc = gToolBarView->hasCommand(commandId);
+
+ switch(command_loc)
+ {
+ case LLToolBarView::TOOLBAR_BOTTOM: suffix = LLTrans::getString("Toolbar_Bottom_Tooltip"); break;
+ case LLToolBarView::TOOLBAR_LEFT: suffix = LLTrans::getString("Toolbar_Left_Tooltip"); break;
+ case LLToolBarView::TOOLBAR_RIGHT: suffix = LLTrans::getString("Toolbar_Right_Tooltip"); break;
+
+ default:
+ break;
+ }
+ }
+
+ mToolBar->setTooltipButtonSuffix(suffix);
+}
+
+
+// eof
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
new file mode 100644
index 0000000000..10aee0e6f5
--- /dev/null
+++ b/indra/newview/llfloatertoybox.h
@@ -0,0 +1,62 @@
+/**
+ * @file llfloatertoybox.h
+ * @brief The toybox for flexibilizing the UI.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERTOYBOX_H
+#define LL_LLFLOATERTOYBOX_H
+
+#include "llfloater.h"
+
+
+class LLButton;
+class LLToolBar;
+
+
+class LLFloaterToybox : public LLFloater
+{
+public:
+ LLFloaterToybox(const LLSD& key);
+ virtual ~LLFloaterToybox();
+
+ // virtuals
+ BOOL postBuild();
+ void draw();
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+
+protected:
+ void onBtnClearAll();
+ void onBtnRestoreDefaults();
+
+ void onToolBarButtonEnter(LLView* button);
+
+public:
+ LLToolBar * mToolBar;
+};
+
+#endif // LL_LLFLOATERTOYBOX_H
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
new file mode 100644
index 0000000000..959edff713
--- /dev/null
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -0,0 +1,296 @@
+/**
+ * @file llfloatertranslationsettings.cpp
+ * @brief Machine translation settings for chat
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatertranslationsettings.h"
+
+// Viewer includes
+#include "lltranslate.h"
+#include "llviewercontrol.h" // for gSavedSettings
+
+// Linden library includes
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "llfloaterreg.h"
+#include "lllineeditor.h"
+#include "llnotificationsutil.h"
+#include "llradiogroup.h"
+
+class EnteredKeyVerifier : public LLTranslate::KeyVerificationReceiver
+{
+public:
+ EnteredKeyVerifier(LLTranslate::EService service, bool alert)
+ : LLTranslate::KeyVerificationReceiver(service)
+ , mAlert(alert)
+ {
+ }
+
+private:
+ /*virtual*/ void setVerificationStatus(bool ok)
+ {
+ LLFloaterTranslationSettings* floater =
+ LLFloaterReg::getTypedInstance<LLFloaterTranslationSettings>("prefs_translation");
+
+ if (!floater)
+ {
+ llwarns << "Cannot find translation settings floater" << llendl;
+ return;
+ }
+
+ switch (getService())
+ {
+ case LLTranslate::SERVICE_BING:
+ floater->setBingVerified(ok, mAlert);
+ break;
+ case LLTranslate::SERVICE_GOOGLE:
+ floater->setGoogleVerified(ok, mAlert);
+ break;
+ }
+ }
+
+ bool mAlert;
+};
+
+LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key)
+: LLFloater(key)
+, mMachineTranslationCB(NULL)
+, mLanguageCombo(NULL)
+, mTranslationServiceRadioGroup(NULL)
+, mBingAPIKeyEditor(NULL)
+, mGoogleAPIKeyEditor(NULL)
+, mBingVerifyBtn(NULL)
+, mGoogleVerifyBtn(NULL)
+, mOKBtn(NULL)
+, mBingKeyVerified(false)
+, mGoogleKeyVerified(false)
+{
+}
+
+// virtual
+BOOL LLFloaterTranslationSettings::postBuild()
+{
+ mMachineTranslationCB = getChild<LLCheckBoxCtrl>("translate_chat_checkbox");
+ mLanguageCombo = getChild<LLComboBox>("translate_language_combo");
+ mTranslationServiceRadioGroup = getChild<LLRadioGroup>("translation_service_rg");
+ mBingAPIKeyEditor = getChild<LLLineEditor>("bing_api_key");
+ mGoogleAPIKeyEditor = getChild<LLLineEditor>("google_api_key");
+ mBingVerifyBtn = getChild<LLButton>("verify_bing_api_key_btn");
+ mGoogleVerifyBtn = getChild<LLButton>("verify_google_api_key_btn");
+ mOKBtn = getChild<LLButton>("ok_btn");
+
+ mMachineTranslationCB->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
+ mTranslationServiceRadioGroup->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
+ mOKBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnOK, this));
+ getChild<LLButton>("cancel_btn")->setClickedCallback(boost::bind(&LLFloater::closeFloater, this, false));
+ mBingVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnBingVerify, this));
+ mGoogleVerifyBtn->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnGoogleVerify, this));
+
+ mBingAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
+ mBingAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onBingKeyEdited, this), NULL);
+ mGoogleAPIKeyEditor->setFocusReceivedCallback(boost::bind(&LLFloaterTranslationSettings::onEditorFocused, this, _1));
+ mGoogleAPIKeyEditor->setKeystrokeCallback(boost::bind(&LLFloaterTranslationSettings::onGoogleKeyEdited, this), NULL);
+
+ center();
+ return TRUE;
+}
+
+// virtual
+void LLFloaterTranslationSettings::onOpen(const LLSD& key)
+{
+ mMachineTranslationCB->setValue(gSavedSettings.getBOOL("TranslateChat"));
+ mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), TRUE);
+ mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE);
+
+ std::string bing_key = gSavedSettings.getString("BingTranslateAPIKey");
+ if (!bing_key.empty())
+ {
+ mBingAPIKeyEditor->setText(bing_key);
+ mBingAPIKeyEditor->setTentative(FALSE);
+ verifyKey(LLTranslate::SERVICE_BING, bing_key, false);
+ }
+ else
+ {
+ mBingAPIKeyEditor->setTentative(TRUE);
+ mBingKeyVerified = FALSE;
+ }
+
+ std::string google_key = gSavedSettings.getString("GoogleTranslateAPIKey");
+ if (!google_key.empty())
+ {
+ mGoogleAPIKeyEditor->setText(google_key);
+ mGoogleAPIKeyEditor->setTentative(FALSE);
+ verifyKey(LLTranslate::SERVICE_GOOGLE, google_key, false);
+ }
+ else
+ {
+ mGoogleAPIKeyEditor->setTentative(TRUE);
+ mGoogleKeyVerified = FALSE;
+ }
+
+ updateControlsEnabledState();
+}
+
+void LLFloaterTranslationSettings::setBingVerified(bool ok, bool alert)
+{
+ if (alert)
+ {
+ showAlert(ok ? "bing_api_key_verified" : "bing_api_key_not_verified");
+ }
+
+ mBingKeyVerified = ok;
+ updateControlsEnabledState();
+}
+
+void LLFloaterTranslationSettings::setGoogleVerified(bool ok, bool alert)
+{
+ if (alert)
+ {
+ showAlert(ok ? "google_api_key_verified" : "google_api_key_not_verified");
+ }
+
+ mGoogleKeyVerified = ok;
+ updateControlsEnabledState();
+}
+
+std::string LLFloaterTranslationSettings::getSelectedService() const
+{
+ return mTranslationServiceRadioGroup->getSelectedValue().asString();
+}
+
+std::string LLFloaterTranslationSettings::getEnteredBingKey() const
+{
+ return mBingAPIKeyEditor->getTentative() ? LLStringUtil::null : mBingAPIKeyEditor->getText();
+}
+
+std::string LLFloaterTranslationSettings::getEnteredGoogleKey() const
+{
+ return mGoogleAPIKeyEditor->getTentative() ? LLStringUtil::null : mGoogleAPIKeyEditor->getText();
+}
+
+void LLFloaterTranslationSettings::showAlert(const std::string& msg_name) const
+{
+ LLSD args;
+ args["MESSAGE"] = getString(msg_name);
+ LLNotificationsUtil::add("GenericAlert", args);
+}
+
+void LLFloaterTranslationSettings::updateControlsEnabledState()
+{
+ // Enable/disable controls based on the checkbox value.
+ bool on = mMachineTranslationCB->getValue().asBoolean();
+ std::string service = getSelectedService();
+ bool bing_selected = service == "bing";
+ bool google_selected = service == "google";
+
+ mTranslationServiceRadioGroup->setEnabled(on);
+ mLanguageCombo->setEnabled(on);
+
+ getChild<LLTextBox>("bing_api_key_label")->setEnabled(on);
+ mBingAPIKeyEditor->setEnabled(on);
+
+ getChild<LLTextBox>("google_api_key_label")->setEnabled(on);
+ mGoogleAPIKeyEditor->setEnabled(on);
+
+ mBingAPIKeyEditor->setEnabled(on && bing_selected);
+ mGoogleAPIKeyEditor->setEnabled(on && google_selected);
+
+ mBingVerifyBtn->setEnabled(on && bing_selected &&
+ !mBingKeyVerified && !getEnteredBingKey().empty());
+ mGoogleVerifyBtn->setEnabled(on && google_selected &&
+ !mGoogleKeyVerified && !getEnteredGoogleKey().empty());
+
+ mOKBtn->setEnabled(
+ !on || (
+ (bing_selected && mBingKeyVerified) ||
+ (google_selected && mGoogleKeyVerified)
+ ));
+}
+
+void LLFloaterTranslationSettings::verifyKey(int service, const std::string& key, bool alert)
+{
+ LLTranslate::KeyVerificationReceiverPtr receiver =
+ new EnteredKeyVerifier((LLTranslate::EService) service, alert);
+ LLTranslate::verifyKey(receiver, key);
+}
+
+void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control)
+{
+ LLLineEditor* editor = dynamic_cast<LLLineEditor*>(control);
+ if (editor && editor->hasTabStop()) // if enabled. getEnabled() doesn't work
+ {
+ if (editor->getTentative())
+ {
+ editor->setText(LLStringUtil::null);
+ editor->setTentative(FALSE);
+ }
+ }
+}
+
+void LLFloaterTranslationSettings::onBingKeyEdited()
+{
+ if (mBingAPIKeyEditor->isDirty())
+ {
+ setBingVerified(false, false);
+ }
+}
+
+void LLFloaterTranslationSettings::onGoogleKeyEdited()
+{
+ if (mGoogleAPIKeyEditor->isDirty())
+ {
+ setGoogleVerified(false, false);
+ }
+}
+
+void LLFloaterTranslationSettings::onBtnBingVerify()
+{
+ std::string key = getEnteredBingKey();
+ if (!key.empty())
+ {
+ verifyKey(LLTranslate::SERVICE_BING, key);
+ }
+}
+
+void LLFloaterTranslationSettings::onBtnGoogleVerify()
+{
+ std::string key = getEnteredGoogleKey();
+ if (!key.empty())
+ {
+ verifyKey(LLTranslate::SERVICE_GOOGLE, key);
+ }
+}
+
+void LLFloaterTranslationSettings::onBtnOK()
+{
+ gSavedSettings.setBOOL("TranslateChat", mMachineTranslationCB->getValue().asBoolean());
+ gSavedSettings.setString("TranslateLanguage", mLanguageCombo->getSelectedValue().asString());
+ gSavedSettings.setString("TranslationService", getSelectedService());
+ gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());
+ gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey());
+ closeFloater(false);
+}
diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h
new file mode 100644
index 0000000000..9b47ad72ed
--- /dev/null
+++ b/indra/newview/llfloatertranslationsettings.h
@@ -0,0 +1,76 @@
+/**
+ * @file llfloatertranslationsettings.h
+ * @brief Machine translation settings for chat
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERTRANSLATIONSETTINGS_H
+#define LL_LLFLOATERTRANSLATIONSETTINGS_H
+
+#include "llfloater.h"
+
+class LLButton;
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLLineEditor;
+class LLRadioGroup;
+
+class LLFloaterTranslationSettings : public LLFloater
+{
+public:
+ LLFloaterTranslationSettings(const LLSD& key);
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ void setBingVerified(bool ok, bool alert);
+ void setGoogleVerified(bool ok, bool alert);
+
+private:
+ std::string getSelectedService() const;
+ std::string getEnteredBingKey() const;
+ std::string getEnteredGoogleKey() const;
+ void showAlert(const std::string& msg_name) const;
+ void updateControlsEnabledState();
+ void verifyKey(int service, const std::string& key, bool alert = true);
+
+ void onEditorFocused(LLFocusableElement* control);
+ void onBingKeyEdited();
+ void onGoogleKeyEdited();
+ void onBtnBingVerify();
+ void onBtnGoogleVerify();
+ void onBtnOK();
+
+ LLCheckBoxCtrl* mMachineTranslationCB;
+ LLComboBox* mLanguageCombo;
+ LLLineEditor* mBingAPIKeyEditor;
+ LLLineEditor* mGoogleAPIKeyEditor;
+ LLRadioGroup* mTranslationServiceRadioGroup;
+ LLButton* mBingVerifyBtn;
+ LLButton* mGoogleVerifyBtn;
+ LLButton* mOKBtn;
+
+ bool mBingKeyVerified;
+ bool mGoogleKeyVerified;
+};
+
+#endif // LL_LLFLOATERTRANSLATIONSETTINGS_H
diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp
index 2a3950f9b1..030fed0575 100644
--- a/indra/newview/llfloatervoiceeffect.cpp
+++ b/indra/newview/llfloatervoiceeffect.cpp
@@ -145,7 +145,7 @@ void LLFloaterVoiceEffect::refreshEffectList()
for (voice_effect_list_t::const_iterator it = template_list.begin(); it != template_list.end(); ++it)
{
const LLUUID& effect_id = it->second;
- std::string effect_name = it->first;
+ std::string effect_name = getString("effect_" + it->first); // will throw an error if the effect is not listed in the XML
LLSD effect_properties = effect_interface->getVoiceEffectProperties(effect_id);
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 43eecbf048..f3beacea4f 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -40,8 +40,23 @@
#include "llfloaterwebcontent.h"
-LLFloaterWebContent::LLFloaterWebContent( const LLSD& key )
- : LLFloater( key )
+LLFloaterWebContent::_Params::_Params()
+: url("url"),
+ target("target"),
+ id("id"),
+ window_class("window_class", "web_content"),
+ show_chrome("show_chrome", true),
+ allow_address_entry("allow_address_entry", true),
+ preferred_media_size("preferred_media_size"),
+ trusted_content("trusted_content", false),
+ show_page_title("show_page_title", true)
+{}
+
+LLFloaterWebContent::LLFloaterWebContent( const Params& params )
+: LLFloater( params ),
+ LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
+ mUUID(params.id()),
+ mShowPageTitle(params.show_page_title)
{
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this ));
@@ -54,9 +69,9 @@ LLFloaterWebContent::LLFloaterWebContent( const LLSD& key )
BOOL LLFloaterWebContent::postBuild()
{
// these are used in a bunch of places so cache them
- mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" );
- mAddressCombo = getChild< LLComboBox >( "address" );
- mStatusBarText = getChild< LLTextBox >( "statusbartext" );
+ mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" );
+ mAddressCombo = getChild< LLComboBox >( "address" );
+ mStatusBarText = getChild< LLTextBox >( "statusbartext" );
mStatusBarProgress = getChild<LLProgressBar>("statusbarprogress" );
// observe browser events
@@ -86,10 +101,8 @@ void LLFloaterWebContent::initializeURLHistory()
// Get all of the entries in the "browser" collection
LLSD browser_history = LLURLHistory::getURLHistory("browser");
- LLSD::array_iterator iter_history =
- browser_history.beginArray();
- LLSD::array_iterator end_history =
- browser_history.endArray();
+ LLSD::array_iterator iter_history = browser_history.beginArray();
+ LLSD::array_iterator end_history = browser_history.endArray();
for(; iter_history != end_history; ++iter_history)
{
std::string url = (*iter_history).asString();
@@ -98,111 +111,44 @@ void LLFloaterWebContent::initializeURLHistory()
}
}
-//static
-void LLFloaterWebContent::create( const std::string &url, const std::string& target, const std::string& uuid, bool show_chrome, const LLRect& preferred_media_size)
+bool LLFloaterWebContent::matchesKey(const LLSD& key)
{
- lldebugs << "url = " << url << ", target = " << target << ", uuid = " << uuid << llendl;
-
- std::string tag = target;
-
- if(target.empty() || target == "_blank")
+ Params p(mKey);
+ Params other_p(key);
+ if (!other_p.target().empty() && other_p.target() != "_blank")
{
- if(!uuid.empty())
- {
- tag = uuid;
- }
- else
- {
- // create a unique tag for this instance
- LLUUID id;
- id.generate();
- tag = id.asString();
- }
+ return other_p.target() == p.target();
}
-
- S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
-
- if(LLFloaterReg::findInstance("web_content", tag) != NULL)
- {
- // There's already a web browser for this tag, so we won't be opening a new window.
- }
- else if(browser_window_limit != 0)
+ else
{
- // showInstance will open a new window. Figure out how many web browsers are already open,
- // and close the least recently opened one if this will put us over the limit.
-
- LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList("web_content");
- lldebugs << "total instance count is " << instances.size() << llendl;
-
- for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
- {
- lldebugs << " " << (*iter)->getKey() << llendl;
- }
-
- if(instances.size() >= (size_t)browser_window_limit)
- {
- // Destroy the least recently opened instance
- (*instances.begin())->closeFloater();
- }
+ return other_p.id() == p.id();
}
+}
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::showInstance("web_content", tag));
- llassert(browser);
- if(browser)
- {
- browser->mUUID = uuid;
-
- // tell the browser instance to load the specified URL
- browser->open_media(url, target);
- LLViewerMedia::proxyWindowOpened(target, uuid);
-
- browser->getChild<LLLayoutPanel>("status_bar")->setVisible(show_chrome);
- browser->getChild<LLLayoutPanel>("nav_controls")->setVisible(show_chrome);
-
- if (!show_chrome)
- {
- browser->setResizeLimits(100, 100);
- }
-
- if (!preferred_media_size.isEmpty())
- {
- //ignore x, y for now
- browser->geometryChanged(browser->getRect().mLeft, browser->getRect().mBottom, preferred_media_size.getWidth(), preferred_media_size.getHeight());
- }
- }
+//static
+LLFloater* LLFloaterWebContent::create( Params p)
+{
+ preCreate(p);
+ return new LLFloaterWebContent(p);
}
//static
void LLFloaterWebContent::closeRequest(const std::string &uuid)
{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("web_content");
- lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ LLFloaterWebContent* floaterp = instance_tracker_t::getInstance(uuid);
+ if (floaterp)
{
- LLFloaterWebContent* i = dynamic_cast<LLFloaterWebContent*>(*iter);
- lldebugs << " " << i->mUUID << llendl;
- if (i && i->mUUID == uuid)
- {
- i->closeFloater(false);
- return;
- }
- }
+ floaterp->closeFloater(false);
+ }
}
//static
void LLFloaterWebContent::geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height)
{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("web_content");
- lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ LLFloaterWebContent* floaterp = instance_tracker_t::getInstance(uuid);
+ if (floaterp)
{
- LLFloaterWebContent* i = dynamic_cast<LLFloaterWebContent*>(*iter);
- lldebugs << " " << i->mUUID << llendl;
- if (i && i->mUUID == uuid)
- {
- i->geometryChanged(x, y, width, height);
- return;
- }
+ floaterp->geometryChanged(x, y, width, height);
}
}
@@ -216,24 +162,112 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
getWindow()->getSize(&window_size);
// Adjust width and height for the size of the chrome on the web Browser window.
- width += getRect().getWidth() - mWebBrowser->getRect().getWidth();
- height += getRect().getHeight() - mWebBrowser->getRect().getHeight();
+ LLRect browser_rect;
+ mWebBrowser->localRectToOtherView(mWebBrowser->getLocalRect(), &browser_rect, this);
+ S32 requested_browser_bottom = window_size.mY - (y + height);
LLRect geom;
- geom.setOriginAndSize(x, window_size.mY - (y + height), width, height);
+ geom.setOriginAndSize(x - browser_rect.mLeft,
+ requested_browser_bottom - browser_rect.mBottom,
+ width + getRect().getWidth() - browser_rect.getWidth(),
+ height + getRect().getHeight() - browser_rect.getHeight());
lldebugs << "geometry change: " << geom << llendl;
+
+ LLRect new_rect;
+ getParent()->screenRectToLocal(geom, &new_rect);
+ setShape(new_rect);
+}
- setShape(geom);
+// static
+void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
+{
+ lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl;
+
+ if (!p.id.isProvided())
+ {
+ p.id = LLUUID::generateNewID().asString();
+ }
+
+ if(p.target().empty() || p.target() == "_blank")
+ {
+ p.target = p.id();
+ }
+
+ S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
+ if(browser_window_limit != 0)
+ {
+ // showInstance will open a new window. Figure out how many web browsers are already open,
+ // and close the least recently opened one if this will put us over the limit.
+
+ LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList(p.window_class);
+ lldebugs << "total instance count is " << instances.size() << llendl;
+
+ for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
+ {
+ lldebugs << " " << (*iter)->getKey()["target"] << llendl;
+ }
+
+ if(instances.size() >= (size_t)browser_window_limit)
+ {
+ // Destroy the least recently opened instance
+ (*instances.begin())->closeFloater();
+ }
+ }
}
-void LLFloaterWebContent::open_media(const std::string& web_url, const std::string& target)
+void LLFloaterWebContent::open_media(const Params& p)
{
// Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
- mWebBrowser->setHomePageUrl(web_url, "text/html");
- mWebBrowser->setTarget(target);
- mWebBrowser->navigateTo(web_url, "text/html");
- set_current_url(web_url);
+ LLViewerMedia::proxyWindowOpened(p.target(), p.id());
+ mWebBrowser->setHomePageUrl(p.url, "text/html");
+ mWebBrowser->setTarget(p.target);
+ mWebBrowser->navigateTo(p.url, "text/html");
+
+ set_current_url(p.url);
+
+ getChild<LLLayoutPanel>("status_bar")->setVisible(p.show_chrome);
+ getChild<LLLayoutPanel>("nav_controls")->setVisible(p.show_chrome);
+ bool address_entry_enabled = p.allow_address_entry && !p.trusted_content;
+ getChildView("address")->setEnabled(address_entry_enabled);
+ getChildView("popexternal")->setEnabled(address_entry_enabled);
+
+ if (!address_entry_enabled)
+ {
+ mWebBrowser->setFocus(TRUE);
+ }
+
+ if (!p.show_chrome)
+ {
+ setResizeLimits(100, 100);
+ }
+
+ if (!p.preferred_media_size().isEmpty())
+ {
+ LLLayoutStack::updateClass();
+ LLRect browser_rect = mWebBrowser->calcScreenRect();
+ LLCoordWindow window_size;
+ getWindow()->getSize(&window_size);
+
+ geometryChanged(browser_rect.mLeft, window_size.mY - browser_rect.mTop, p.preferred_media_size().getWidth(), p.preferred_media_size().getHeight());
+ }
+
+}
+
+void LLFloaterWebContent::onOpen(const LLSD& key)
+{
+ Params params(key);
+
+ if (!params.validateBlock())
+ {
+ closeFloater();
+ return;
+ }
+
+ mWebBrowser->setTrustedContent(params.trusted_content);
+
+ // tell the browser instance to load the specified URL
+ open_media(params);
}
//virtual
@@ -246,7 +280,7 @@ void LLFloaterWebContent::onClose(bool app_quitting)
// virtual
void LLFloaterWebContent::draw()
{
- // this is asychronous so we need to keep checking
+ // this is asynchronous so we need to keep checking
getChildView( "back" )->setEnabled( mWebBrowser->canNavigateBack() );
getChildView( "forward" )->setEnabled( mWebBrowser->canNavigateForward() );
@@ -332,10 +366,13 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
{
std::string page_title = self->getMediaName();
// simulate browser behavior - title is empty, use the current URL
- if ( page_title.length() > 0 )
- setTitle( page_title );
- else
- setTitle( mCurrentURL );
+ if (mShowPageTitle)
+ {
+ if ( page_title.length() > 0 )
+ setTitle( page_title );
+ else
+ setTitle( mCurrentURL );
+ }
}
else if(event == MEDIA_EVENT_LINK_HOVERED )
{
@@ -388,7 +425,7 @@ void LLFloaterWebContent::onClickStop()
// still should happen when we catch the navigate complete event
// but sometimes (don't know why) that event isn't sent from Qt
- // and we getto a point where the stop button stays active.
+ // and we ghetto a point where the stop button stays active.
getChildView("reload")->setVisible( true );
getChildView("stop")->setVisible( false );
}
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 56b6ef12c8..2a2a9e110b 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -29,6 +29,7 @@
#include "llfloater.h"
#include "llmediactrl.h"
+#include "llsdparam.h"
class LLMediaCtrl;
class LLComboBox;
@@ -38,24 +39,47 @@ class LLIconCtrl;
class LLFloaterWebContent :
public LLFloater,
- public LLViewerMediaObserver
+ public LLViewerMediaObserver,
+ public LLInstanceTracker<LLFloaterWebContent, std::string>
{
public:
+ typedef LLInstanceTracker<LLFloaterWebContent, std::string> instance_tracker_t;
LOG_CLASS(LLFloaterWebContent);
- LLFloaterWebContent(const LLSD& key);
+
+ struct _Params : public LLInitParam::Block<_Params>
+ {
+ Optional<std::string> url,
+ target,
+ window_class,
+ id;
+ Optional<bool> show_chrome,
+ allow_address_entry,
+ trusted_content,
+ show_page_title;
+ Optional<LLRect> preferred_media_size;
+
+ _Params();
+ };
+
+ typedef LLSDParamAdapter<_Params> Params;
+
+ LLFloaterWebContent(const Params& params);
void initializeURLHistory();
- static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null, bool show_chrome = true, const LLRect& preferred_media_size = LLRect() );
+ static LLFloater* create(Params);
static void closeRequest(const std::string &uuid);
static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
void geometryChanged(S32 x, S32 y, S32 width, S32 height);
/* virtual */ BOOL postBuild();
+ /* virtual */ void onOpen(const LLSD& key);
+ /* virtual */ bool matchesKey(const LLSD& key);
/* virtual */ void onClose(bool app_quitting);
/* virtual */ void draw();
+protected:
// inherited from LLViewerMediaObserver
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
@@ -66,17 +90,18 @@ public:
void onEnterAddress();
void onPopExternal();
-private:
- void open_media(const std::string& media_url, const std::string& target);
+ static void preCreate(Params& p);
+ void open_media(const Params& );
void set_current_url(const std::string& url);
- LLMediaCtrl* mWebBrowser;
- LLComboBox* mAddressCombo;
- LLIconCtrl *mSecureLockIcon;
- LLTextBox* mStatusBarText;
- LLProgressBar* mStatusBarProgress;
- std::string mCurrentURL;
- std::string mUUID;
+ LLMediaCtrl* mWebBrowser;
+ LLComboBox* mAddressCombo;
+ LLIconCtrl* mSecureLockIcon;
+ LLTextBox* mStatusBarText;
+ LLProgressBar* mStatusBarProgress;
+ std::string mCurrentURL;
+ std::string mUUID;
+ bool mShowPageTitle;
};
#endif // LL_LLFLOATERWEBCONTENT_H
diff --git a/indra/newview/llfloaterwebprofile.cpp b/indra/newview/llfloaterwebprofile.cpp
new file mode 100644
index 0000000000..c41f6f148f
--- /dev/null
+++ b/indra/newview/llfloaterwebprofile.cpp
@@ -0,0 +1,79 @@
+/**
+ * @file llfloaterwebprofile.cpp
+ * @brief Avatar profile floater.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterwebprofile.h"
+
+#include "llviewercontrol.h"
+
+LLFloaterWebProfile::LLFloaterWebProfile(const Params& key) :
+ LLFloaterWebContent(key)
+{
+}
+
+void LLFloaterWebProfile::onOpen(const LLSD& key)
+{
+ Params p(key);
+ p.show_chrome(false).
+ window_class("profile");
+ LLFloaterWebContent::onOpen(p);
+ applyPreferredRect();
+}
+
+// virtual
+void LLFloaterWebProfile::handleReshape(const LLRect& new_rect, bool by_user)
+{
+ lldebugs << "handleReshape: " << new_rect << llendl;
+
+ if (by_user && !isMinimized())
+ {
+ lldebugs << "Storing new rect" << llendl;
+ gSavedSettings.setRect("WebProfileFloaterRect", new_rect);
+ }
+
+ LLFloaterWebContent::handleReshape(new_rect, by_user);
+}
+
+LLFloater* LLFloaterWebProfile::create(const LLSD& key)
+{
+ LLFloaterWebContent::Params p(key);
+ preCreate(p);
+ return new LLFloaterWebProfile(p);
+}
+
+void LLFloaterWebProfile::applyPreferredRect()
+{
+ const LLRect preferred_rect = gSavedSettings.getRect("WebProfileFloaterRect");
+ lldebugs << "Applying preferred rect: " << preferred_rect << llendl;
+
+ // Don't override position that may have been set by floater stacking code.
+ LLRect new_rect = getRect();
+ new_rect.setLeftTopAndSize(
+ new_rect.mLeft, new_rect.mTop,
+ preferred_rect.getWidth(), preferred_rect.getHeight());
+ setShape(new_rect);
+}
diff --git a/indra/newview/llfloatersidetraytab.h b/indra/newview/llfloaterwebprofile.h
index 89f2444a0e..4c355e401b 100644
--- a/indra/newview/llfloatersidetraytab.h
+++ b/indra/newview/llfloaterwebprofile.h
@@ -1,8 +1,8 @@
/**
- * @file llfloatersidetraytab.h
- * @brief LLFloaterSideTrayTab class definition
+ * @file llfloaterwebprofile.h
+ * @brief Avatar profile floater.
*
- * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
@@ -24,26 +24,36 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLFLOATERSIDETRAYTAB_H
-#define LL_LLFLOATERSIDETRAYTAB_H
+#ifndef LL_LLFLOATERWEBPROFILE_H
+#define LL_LLFLOATERWEBPROFILE_H
-#include "llfloater.h"
+#include "llfloaterwebcontent.h"
+#include "llviewermediaobserver.h"
+
+#include <string>
+
+class LLMediaCtrl;
/**
- * When a side tray tab gets detached, it's wrapped in an instance of this class.
- *
- * This class helps to make sure that clicking a detached side tray tab doesn't
- * make transient floaters (e.g. IM windows) hide, so that it's possible to
- * drag an inventory item from detached My Inventory window to a docked IM window,
- * i.e. share the item (see VWR-22891).
+ * Displays avatar profile web page.
*/
-class LLFloaterSideTrayTab : public LLFloater
+class LLFloaterWebProfile
+: public LLFloaterWebContent
{
+ LOG_CLASS(LLFloaterWebProfile);
public:
- LLFloaterSideTrayTab(const LLSD& key, const Params& params = getDefaultParams());
- ~LLFloaterSideTrayTab();
+ typedef LLFloaterWebContent::Params Params;
+
+ LLFloaterWebProfile(const Params& key);
- void onClose(bool app_quitting);
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
+
+ static LLFloater* create(const LLSD& key);
+
+private:
+ void applyPreferredRect();
};
-#endif // LL_LLFLOATERSIDETRAYTAB_H
+#endif // LL_LLFLOATERWEBPROFILE_H
+
diff --git a/indra/newview/llfloaterwindowsize.cpp b/indra/newview/llfloaterwindowsize.cpp
index a70f2af11a..ec161018b8 100644
--- a/indra/newview/llfloaterwindowsize.cpp
+++ b/indra/newview/llfloaterwindowsize.cpp
@@ -58,33 +58,12 @@ bool extractWindowSizeFromString(const std::string& instr, U32 *width, U32 *heig
}
-///----------------------------------------------------------------------------
-/// Class LLFloaterWindowSize
-///----------------------------------------------------------------------------
-class LLFloaterWindowSize
-: public LLFloater
-{
- friend class LLFloaterReg;
-private:
- LLFloaterWindowSize(const LLSD& key);
- virtual ~LLFloaterWindowSize();
-
-public:
- /*virtual*/ BOOL postBuild();
- void initWindowSizeControls();
- void onClickSet();
- void onClickCancel();
-};
-
-
LLFloaterWindowSize::LLFloaterWindowSize(const LLSD& key)
: LLFloater(key)
-{
-}
+{}
LLFloaterWindowSize::~LLFloaterWindowSize()
-{
-}
+{}
BOOL LLFloaterWindowSize::postBuild()
{
@@ -145,13 +124,3 @@ void LLFloaterWindowSize::onClickCancel()
{
closeFloater();
}
-
-///----------------------------------------------------------------------------
-/// LLFloaterWindowSizeUtil
-///----------------------------------------------------------------------------
-void LLFloaterWindowSizeUtil::registerFloater()
-{
- LLFloaterReg::add("window_size", "floater_window_size.xml",
- &LLFloaterReg::build<LLFloaterWindowSize>);
-
-}
diff --git a/indra/newview/llfloaterwindowsize.h b/indra/newview/llfloaterwindowsize.h
index 40f1a25bb3..a71e5e273c 100644
--- a/indra/newview/llfloaterwindowsize.h
+++ b/indra/newview/llfloaterwindowsize.h
@@ -26,10 +26,24 @@
#ifndef LLFLOATERWINDOWSIZE_H
#define LLFLOATERWINDOWSIZE_H
-// Allow user to set the window size for filming tutorials, machinima, etc
-namespace LLFloaterWindowSizeUtil
+#include "llfloater.h"
+
+///----------------------------------------------------------------------------
+/// Class LLFloaterWindowSize
+///----------------------------------------------------------------------------
+class LLFloaterWindowSize
+ : public LLFloater
{
- void registerFloater();
-}
+ friend class LLFloaterReg;
+private:
+ LLFloaterWindowSize(const LLSD& key);
+ virtual ~LLFloaterWindowSize();
+
+public:
+ /*virtual*/ BOOL postBuild();
+ void initWindowSizeControls();
+ void onClickSet();
+ void onClickCancel();
+};
#endif
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index eb3c7ee469..137b5446cf 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -70,7 +70,7 @@
#include "llappviewer.h"
#include "llmapimagetype.h"
#include "llweb.h"
-#include "llslider.h"
+#include "llsliderctrl.h"
#include "message.h"
#include "llwindow.h" // copyTextToClipboard()
#include <algorithm>
@@ -237,16 +237,19 @@ const LLUUID LLFloaterWorldMap::sHomeID( "10000000-0000-0000-0000-000000000001"
LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
: LLFloater(key),
-mInventory(NULL),
-mInventoryObserver(NULL),
-mFriendObserver(NULL),
-mCompletingRegionName(),
-mCompletingRegionPos(),
-mWaitingForTracker(FALSE),
-mIsClosing(FALSE),
-mSetToUserPosition(TRUE),
-mTrackedLocation(0,0,0),
-mTrackedStatus(LLTracker::TRACKING_NOTHING)
+ mInventory(NULL),
+ mInventoryObserver(NULL),
+ mFriendObserver(NULL),
+ mCompletingRegionName(),
+ mCompletingRegionPos(),
+ mWaitingForTracker(FALSE),
+ mIsClosing(FALSE),
+ mSetToUserPosition(TRUE),
+ mTrackedLocation(0,0,0),
+ mTrackedStatus(LLTracker::TRACKING_NOTHING),
+ mListFriendCombo(NULL),
+ mListLandmarkCombo(NULL),
+ mListSearchResults(NULL)
{
gFloaterWorldMap = this;
@@ -281,17 +284,20 @@ BOOL LLFloaterWorldMap::postBuild()
avatar_combo->selectFirstItem();
avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
+ mListFriendCombo = dynamic_cast<LLCtrlListInterface *>(avatar_combo);
LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
+ mListSearchResults = childGetListInterface("search_results");
LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
landmark_combo->selectFirstItem();
landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
+ mListLandmarkCombo = dynamic_cast<LLCtrlListInterface *>(landmark_combo);
mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);
getChild<LLUICtrl>("zoom slider")->setValue(LLWorldMapView::sMapScale);
@@ -864,7 +870,7 @@ void LLFloaterWorldMap::friendsChanged()
// No longer really builds a list. Instead, just updates mAvatarCombo.
void LLFloaterWorldMap::buildAvatarIDList()
{
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (!list) return;
// Delete all but the "None" entry
@@ -894,7 +900,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
void LLFloaterWorldMap::buildLandmarkIDLists()
{
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (!list) return;
// Delete all but the "None" entry
@@ -955,7 +961,7 @@ F32 LLFloaterWorldMap::getDistanceToDestination(const LLVector3d &destination,
void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui)
{
- LLCtrlListInterface *list = childGetListInterface("search_results");
+ LLCtrlListInterface *list = mListSearchResults;
if (list)
{
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
@@ -969,7 +975,7 @@ void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui)
{
if (clear_ui || !childHasKeyboardFocus("landmark combo"))
{
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (list)
{
list->selectByValue( "None" );
@@ -983,7 +989,7 @@ void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui)
if (clear_ui || !childHasKeyboardFocus("friend combo"))
{
mTrackedStatus = LLTracker::TRACKING_NOTHING;
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (list)
{
list->selectByValue( "None" );
@@ -1029,7 +1035,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
F32 min_power = log(pixels_per_region/256.f)/log(2.f);
- getChild<LLSlider>("zoom slider")->setMinValue(min_power);
+ getChild<LLSliderCtrl>("zoom slider")->setMinValue(min_power);
}
@@ -1051,7 +1057,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( )
return;
}
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (!list) return;
LLUUID current_choice = list->getCurrentID();
@@ -1087,7 +1093,7 @@ void LLFloaterWorldMap::onLandmarkComboCommit()
return;
}
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (!list) return;
LLUUID asset_id;
@@ -1134,7 +1140,7 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( )
return;
}
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (!list) return;
LLUUID current_choice;
@@ -1159,7 +1165,7 @@ void LLFloaterWorldMap::onAvatarComboCommit()
return;
}
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (!list) return;
const LLUUID& new_avatar_id = list->getCurrentID();
@@ -1221,6 +1227,12 @@ void LLFloaterWorldMap::onLocationCommit()
{ // Set the value in the UI if any spaces were removed
getChild<LLUICtrl>("location")->setValue(str);
}
+
+ // Don't try completing empty name (STORM-1427).
+ if (str.empty())
+ {
+ return;
+ }
LLStringUtil::toLower(str);
mCompletingRegionName = str;
@@ -1553,7 +1565,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
void LLFloaterWorldMap::onCommitSearchResult()
{
- LLCtrlListInterface *list = childGetListInterface("search_results");
+ LLCtrlListInterface *list = mListSearchResults;
if (!list) return;
LLSD selected_value = list->getSelectedValue();
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 783d9f4819..e3b83b2579 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -39,6 +39,7 @@
#include "lltracker.h"
#include "llslurl.h"
+class LLCtrlListInterface;
class LLFriendObserver;
class LLInventoryModel;
class LLInventoryObserver;
@@ -190,6 +191,10 @@ private:
std::string mTrackedSimName;
std::string mTrackedAvatarName;
LLSLURL mSLURL;
+
+ LLCtrlListInterface * mListFriendCombo;
+ LLCtrlListInterface * mListLandmarkCombo;
+ LLCtrlListInterface * mListSearchResults;
};
extern LLFloaterWorldMap* gFloaterWorldMap;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index e90b6c1c3d..6ec2598e44 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -181,6 +181,7 @@ LLFolderView::Params::Params()
// Default constructor
LLFolderView::LLFolderView(const Params& p)
: LLFolderViewFolder(p),
+ mRunningHeight(0),
mScrollContainer( NULL ),
mPopupMenuHandle(),
mAllowMultiSelect(p.allow_multiselect),
@@ -298,7 +299,7 @@ LLFolderView::~LLFolderView( void )
mAutoOpenItems.removeAllNodes();
gIdleCallbacks.deleteFunction(idle, this);
- LLView::deleteViewByHandle(mPopupMenuHandle);
+ delete mPopupMenuHandle.get();
mAutoOpenItems.removeAllNodes();
clearSelection();
@@ -369,16 +370,6 @@ void LLFolderView::closeAllFolders()
arrangeAll();
}
-void LLFolderView::openFolder(const std::string& foldername)
-{
- LLFolderViewFolder* inv = findChild<LLFolderViewFolder>(foldername);
- if (inv)
- {
- setSelection(inv, FALSE, FALSE);
- inv->setOpen(TRUE);
- }
-}
-
void LLFolderView::openTopLevelFolders()
{
for (folders_t::iterator iter = mFolders.begin();
@@ -402,6 +393,16 @@ static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange");
// This view grows and shinks to enclose all of its children items and folders.
S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_generation )
{
+ if (getListener()->getUUID().notNull())
+ {
+ if (mNeedsSort)
+ {
+ mFolders.sort(mSortFunction);
+ mItems.sort(mSortFunction);
+ mNeedsSort = false;
+ }
+ }
+
LLFastTimer t2(FTM_ARRANGE);
filter_generation = mFilter->getMinRequiredGeneration();
@@ -479,6 +480,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
target_height = running_height;
}
+ mRunningHeight = running_height;
LLRect scroll_rect = mScrollContainer->getContentWindowRect();
reshape( llmax(scroll_rect.getWidth(), total_width), running_height );
@@ -524,9 +526,11 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
LLRect scroll_rect;
if (mScrollContainer)
{
+ LLView::reshape(width, height, called_from_parent);
scroll_rect = mScrollContainer->getContentWindowRect();
}
width = llmax(mMinWidth, scroll_rect.getWidth());
+ height = llmax(mRunningHeight, scroll_rect.getHeight());
// restrict width with scroll container's width
if (mUseEllipses)
@@ -710,8 +714,10 @@ void LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem
mSignalSelectCallback = SIGNAL_KEYBOARD_FOCUS;
}
+static LLFastTimer::DeclareTimer FTM_SANITIZE_SELECTION("Sanitize Selection");
void LLFolderView::sanitizeSelection()
{
+ LLFastTimer _(FTM_SANITIZE_SELECTION);
// store off current item in case it is automatically deselected
// and we want to preserve context
LLFolderViewItem* original_selected_item = getCurSelectedItem();
@@ -1004,6 +1010,33 @@ void LLFolderView::removeSelectedItems( void )
LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLFolderView::onItemsRemovalConfirmation, this, _1, _2));
}
+bool isDescendantOfASelectedItem(LLFolderViewItem* item, const std::vector<LLFolderViewItem*>& selectedItems)
+{
+ LLFolderViewItem* item_parent = dynamic_cast<LLFolderViewItem*>(item->getParent());
+
+ if (item_parent)
+ {
+ for(std::vector<LLFolderViewItem*>::const_iterator it = selectedItems.begin(); it != selectedItems.end(); ++it)
+ {
+ const LLFolderViewItem* const selected_item = (*it);
+
+ LLFolderViewItem* parent = item_parent;
+
+ while (parent)
+ {
+ if (selected_item == parent)
+ {
+ return true;
+ }
+
+ parent = dynamic_cast<LLFolderViewItem*>(parent->getParent());
+ }
+ }
+ }
+
+ return false;
+}
+
void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -1078,7 +1111,7 @@ void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LL
if (!new_selection)
{
new_selection = last_item->getPreviousOpenNode(FALSE);
- while (new_selection && new_selection->isSelected())
+ while (new_selection && (new_selection->isSelected() || isDescendantOfASelectedItem(new_selection, items)))
{
new_selection = new_selection->getPreviousOpenNode(FALSE);
}
@@ -1690,7 +1723,7 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char)
}
BOOL handled = FALSE;
- if (gFocusMgr.childHasKeyboardFocus(getRoot()))
+ if (mParentPanel->hasFocus())
{
// SL-51858: Key presses are not being passed to the Popup menu.
// A proper fix is non-trivial so instead just close the menu.
@@ -1903,20 +1936,25 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
std::string& tooltip_msg)
{
mDragAndDropThisFrame = TRUE;
+ // have children handle it first
BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data,
accept, tooltip_msg);
- // When there are no visible children drag and drop is handled
+ // when drop is not handled by child, it should be handled
// by the folder which is the hierarchy root.
- if (!handled && !hasVisibleChildren())
+ if (!handled)
{
- if (mFolders.empty())
- {
- handled = handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
- }
+ if (getListener()->getUUID().notNull())
+ {
+ handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ }
else
{
- handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ if (!mFolders.empty())
+ {
+ // dispatch to last folder as a hack to support "Contents" folder in object inventory
+ handled = mFolders.back()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ }
}
}
@@ -1931,7 +1969,7 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
void LLFolderView::deleteAllChildren()
{
closeRenamer();
- LLView::deleteViewByHandle(mPopupMenuHandle);
+ delete mPopupMenuHandle.get();
mPopupMenuHandle = LLHandle<LLView>();
mScrollContainer = NULL;
mRenameItem = NULL;
@@ -2038,8 +2076,10 @@ void LLFolderView::removeItemID(const LLUUID& id)
mItemMap.erase(id);
}
+LLFastTimer::DeclareTimer FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID");
LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
{
+ LLFastTimer _(FTM_GET_ITEM_BY_ID);
if (id == getListener()->getUUID())
{
return this;
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 0b92548fd0..8af01e9102 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -108,7 +108,6 @@ public:
// Close all folders in the view
void closeAllFolders();
- void openFolder(const std::string& foldername);
void openTopLevelFolders();
virtual void toggleOpen() {};
@@ -315,6 +314,7 @@ protected:
signal_t mReshapeSignal;
S32 mSignalSelectCallback;
S32 mMinWidth;
+ S32 mRunningHeight;
std::map<LLUUID, LLFolderViewItem*> mItemMap;
BOOL mDragAndDropThisFrame;
diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h
index 3bfbf36110..aee31ca033 100644
--- a/indra/newview/llfoldervieweventlistener.h
+++ b/indra/newview/llfoldervieweventlistener.h
@@ -96,7 +96,8 @@ public:
// otherwise FALSE.
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data) = 0;
+ void* cargo_data,
+ std::string& tooltip_msg) = 0;
};
#endif
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 6e4f55fb2f..f27fd035db 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -101,10 +101,7 @@ LLFolderViewItem::Params::Params()
item_height("item_height"),
item_top_pad("item_top_pad"),
creation_date()
-{
- mouse_opaque(true);
- follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT);
-}
+{}
// Default constructor
LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
@@ -132,7 +129,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mIconOpen(p.icon_open),
mIconOverlay(p.icon_overlay),
mListener(p.listener),
- mShowLoadStatus(false)
+ mShowLoadStatus(false),
+ mIsMouseOverTitle(false)
{
}
@@ -284,9 +282,9 @@ void LLFolderViewItem::refreshFromListener()
setToolTip(mLabel);
setIcon(mListener->getIcon());
time_t creation_date = mListener->getCreationDate();
- if (mCreationDate != creation_date)
+ if ((creation_date > 0) && (mCreationDate != creation_date))
{
- mCreationDate = mListener->getCreationDate();
+ setCreationDate(creation_date);
dirtyFilter();
}
if (mRoot->useLabelSuffix())
@@ -660,7 +658,7 @@ LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void)
return gInventory.getItem(getListener()->getUUID());
}
-std::string LLFolderViewItem::getName( void ) const
+const std::string& LLFolderViewItem::getName( void ) const
{
if(mListener)
{
@@ -724,6 +722,8 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
{
+ mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight));
+
if( hasMouseCapture() && isMovable() )
{
S32 screen_x;
@@ -830,6 +830,11 @@ BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask )
return TRUE;
}
+void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ mIsMouseOverTitle = false;
+}
+
BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
@@ -840,7 +845,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
BOOL handled = FALSE;
if(mListener)
{
- accepted = mListener->dragOrDrop(mask,drop,cargo_type,cargo_data);
+ accepted = mListener->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg);
handled = accepted;
if (accepted)
{
@@ -879,6 +884,7 @@ void LLFolderViewItem::draw()
static LLUIColor sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE);
static LLUIColor sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE);
static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE);
+ static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>();
const S32 TOP_PAD = default_params.item_top_pad;
@@ -960,6 +966,14 @@ void LLFolderViewItem::draw()
}
}
}
+ else if (mIsMouseOverTitle)
+ {
+ gl_rect_2d(FOCUS_LEFT,
+ focus_top,
+ getRect().getWidth() - 2,
+ focus_bottom,
+ sMouseOverColor, FALSE);
+ }
//--------------------------------------------------------------------------------//
// Draw DragNDrop highlight
@@ -1159,8 +1173,8 @@ BOOL LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderView* r
return folder->addFolder(this);
}
-// 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.
+// Finds width and height of this object and its children. Also
+// makes sure that this view and its children are the right size.
S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
{
// sort before laying out contents
@@ -2040,23 +2054,42 @@ BOOL LLFolderViewFolder::isRemovable()
BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
{
mItems.push_back(item);
+
if (item->isSelected())
{
recursiveIncrementNumDescendantsSelected(1);
}
+
item->setRect(LLRect(0, 0, getRect().getWidth(), 0));
item->setVisible(FALSE);
- addChild( item );
+
+ addChild(item);
+
item->dirtyFilter();
+
+ // Update the folder creation date if the child is newer than our current date
+ setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate()));
+
+ // Handle sorting
requestArrange();
requestSort();
+
+ // Traverse parent folders and update creation date and resort, if necessary
LLFolderViewFolder* parentp = getParentFolder();
- while (parentp && parentp->mSortFunction.isByDate())
+ while (parentp)
{
- // parent folder doesn't have a time stamp yet, so get it from us
- parentp->requestSort();
+ // Update the folder creation date if the child is newer than our current date
+ parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate()));
+
+ if (parentp->mSortFunction.isByDate())
+ {
+ // parent folder doesn't have a time stamp yet, so get it from us
+ parentp->requestSort();
+ }
+
parentp = parentp->getParentFolder();
}
+
return TRUE;
}
@@ -2162,7 +2195,7 @@ BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL accepted = mListener && mListener->dragOrDrop(mask,drop,c_type,cargo_data);
+ BOOL accepted = mListener && mListener->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg);
if (accepted)
{
mDragAndDropTarget = TRUE;
@@ -2254,7 +2287,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
if (!handled)
{
- BOOL accepted = mListener && mListener->dragOrDrop(mask, drop,cargo_type,cargo_data);
+ BOOL accepted = mListener && mListener->dragOrDrop(mask, drop,cargo_type,cargo_data, tooltip_msg);
if (accepted)
{
@@ -2299,6 +2332,8 @@ BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask )
BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask)
{
+ mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight));
+
BOOL handled = LLView::handleHover(x, y, mask);
if (!handled)
@@ -2418,41 +2453,6 @@ void LLFolderViewFolder::draw()
time_t LLFolderViewFolder::getCreationDate() const
{
- // folders have no creation date try to create one from an item somewhere in our folder hierarchy
- if (!mCreationDate)
- {
- for (items_t::const_iterator iit = mItems.begin();
- iit != mItems.end(); ++iit)
- {
- LLFolderViewItem* itemp = (*iit);
-
- const time_t item_creation_date = itemp->getCreationDate();
-
- if (item_creation_date)
- {
- mCreationDate = item_creation_date;
- break;
- }
- }
-
- if (!mCreationDate)
- {
- for (folders_t::const_iterator fit = mFolders.begin();
- fit != mFolders.end(); ++fit)
- {
- LLFolderViewFolder* folderp = (*fit);
-
- const time_t folder_creation_date = folderp->getCreationDate();
-
- if (folder_creation_date)
- {
- mCreationDate = folder_creation_date;
- break;
- }
- }
- }
- }
-
return llmax<time_t>(mCreationDate, mSubtreeCreationDate);
}
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index e2f94a2b63..3433e3f7f3 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -136,7 +136,7 @@ protected:
std::string mSearchableLabel;
S32 mLabelWidth;
bool mLabelWidthDirty;
- mutable time_t mCreationDate;
+ time_t mCreationDate;
LLFolderViewFolder* mParentFolder;
LLFolderViewEventListener* mListener;
BOOL mIsCurSelection;
@@ -159,6 +159,7 @@ protected:
BOOL mIsLoading;
LLTimer mTimeSinceRequestStart;
bool mShowLoadStatus;
+ bool mIsMouseOverTitle;
// helper function to change the selection from the root.
void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected);
@@ -173,6 +174,8 @@ protected:
static LLFontGL* getLabelFontForStyle(U8 style);
+ virtual void setCreationDate(time_t creation_date_utc) { mCreationDate = creation_date_utc; }
+
public:
BOOL postBuild();
@@ -228,7 +231,7 @@ public:
void deselectItem();
// this method is used to select this element
- void selectItem();
+ virtual void selectItem();
// gets multiple-element selection
virtual std::set<LLUUID> getSelectionList() const;
@@ -264,7 +267,7 @@ public:
// This method returns the actual name of the thing being
// viewed. This method will ask the viewed object itself.
- std::string getName( void ) const;
+ const std::string& getName( void ) const;
const std::string& getSearchableLabel( void ) const;
@@ -326,6 +329,10 @@ public:
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual void onMouseLeave(S32 x, S32 y, MASK mask);
+
+ virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return NULL; }
+
// virtual void handleDropped();
virtual void draw();
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
@@ -549,6 +556,10 @@ public:
folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); }
folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); }
folders_t::size_type getFoldersCount() const { return mFolders.size(); }
+
+ items_t::const_iterator getItemsBegin() const { return mItems.begin(); }
+ items_t::const_iterator getItemsEnd() const { return mItems.end(); }
+ items_t::size_type getItemsCount() const { return mItems.size(); }
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 842911ecc0..1208c9378e 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -115,7 +115,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
S32 center_y = (top + bottom) / 2;
// save drawing mode
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
BOOL limit_select_distance = gSavedSettings.getBOOL("LimitSelectDistance");
@@ -230,9 +230,9 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
}
// restore drawing mode
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// restore camera
LLViewerCamera::getInstance()->setFar(old_far_plane);
@@ -240,7 +240,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
gViewerWindow->setup3DRender();
}
-const F32 WIND_ALTITUDE = 180.f;
+const F32 WIND_RELATIVE_ALTITUDE = 25.f;
void LLWind::renderVectors()
{
@@ -254,13 +254,13 @@ void LLWind::renderVectors()
gGL.pushMatrix();
LLVector3 origin_agent;
origin_agent = gAgent.getPosAgentFromGlobal(mOriginGlobal);
- gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], WIND_ALTITUDE);
+ gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], gAgent.getPositionAgent().mV[VZ] + WIND_RELATIVE_ALTITUDE);
for (j = 0; j < mSize; j++)
{
for (i = 0; i < mSize; i++)
{
- x = mCloudVelX[i + j*mSize] * WIND_SCALE_HACK;
- y = mCloudVelY[i + j*mSize] * WIND_SCALE_HACK;
+ x = mVelX[i + j*mSize] * WIND_SCALE_HACK;
+ y = mVelY[i + j*mSize] * WIND_SCALE_HACK;
gGL.pushMatrix();
gGL.translatef((F32)i * region_width_meters/mSize, (F32)j * region_width_meters/mSize, 0.0);
gGL.color3f(0,1,0);
@@ -620,7 +620,7 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
F32 pos_y = pos.mV[VY];
LLGLSUIDefault gls_ui;
- LLGLDepthTest gls_depth(GL_TRUE);
+ LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
LLGLDisable cull(GL_CULL_FACE);
if (mCollisionBanned == BA_BANNED)
@@ -777,13 +777,17 @@ void LLViewerObjectList::renderObjectBeacons()
LLGLSUIDefault gls_ui;
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -792,18 +796,14 @@ void LLViewerObjectList::renderObjectBeacons()
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
- {
- gGL.end();
- }
- flush = TRUE;
gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
- gGL.begin(LLRender::LINES);
}
const LLVector3 &thisline = debug_beacon.mPositionAgent;
+
+ gGL.begin(LLRender::LINES);
gGL.color4fv(color.mV);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] - 50.f);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] + 50.f);
@@ -813,8 +813,9 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 2.f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
+
+ gGL.end();
}
- gGL.end();
}
{
@@ -824,7 +825,6 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -832,18 +832,13 @@ void LLViewerObjectList::renderObjectBeacons()
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
- {
- gGL.end();
- }
- flush = TRUE;
gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
- gGL.begin(LLRender::LINES);
}
const LLVector3 &thisline = debug_beacon.mPositionAgent;
+ gGL.begin(LLRender::LINES);
gGL.color4fv(debug_beacon.mColor.mV);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] - 0.5f);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] + 0.5f);
@@ -853,9 +848,10 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 0.5f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
+
+ gGL.end();
}
- gGL.end();
gGL.flush();
glLineWidth(1.f);
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 97fa551441..623ebb76f2 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -34,10 +34,10 @@
#include "llagent.h"
#include "llcommandhandler.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llgroupmgr.h"
#include "llimview.h" // for gIMMgr
#include "llnotificationsutil.h"
-#include "llsidetray.h"
#include "llstatusbar.h" // can_afford_transaction()
#include "llimfloater.h"
#include "groupchatlistener.h"
@@ -83,7 +83,7 @@ public:
{
LLSD params;
params["people_panel_tab_name"] = "groups_panel";
- LLSideTray::getInstance()->showPanel("panel_people", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_people", params);
return true;
}
return false;
@@ -243,7 +243,7 @@ static bool isGroupUIVisible()
{
static LLPanel* panel = 0;
if(!panel)
- panel = LLSideTray::getInstance()->getPanel("panel_group_info_sidetray");
+ panel = LLFloaterSidePanelContainer::getPanel("people", "panel_group_info_sidetray");
if(!panel)
return false;
return panel->isInVisibleChain();
@@ -265,7 +265,7 @@ void LLGroupActions::show(const LLUUID& group_id)
params["group_id"] = group_id;
params["open_tab_name"] = "panel_group_info_sidetray";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
void LLGroupActions::refresh_notices()
@@ -278,7 +278,7 @@ void LLGroupActions::refresh_notices()
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "refresh_notices";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
//static
@@ -292,7 +292,7 @@ void LLGroupActions::refresh(const LLUUID& group_id)
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "refresh";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
//static
@@ -303,7 +303,7 @@ void LLGroupActions::createGroup()
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "create";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
//static
@@ -317,7 +317,7 @@ void LLGroupActions::closeGroup(const LLUUID& group_id)
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "close";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index c3e6e1c2dc..f7ed1116cb 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -95,7 +95,7 @@ LLGroupList::LLGroupList(const Params& p)
LLGroupList::~LLGroupList()
{
gAgent.removeListener(this);
- LLView::deleteViewByHandle(mContextMenuHandle);
+ delete mContextMenuHandle.get();
}
// virtual
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index ce936a9924..efffd0f98e 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -857,7 +857,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group properties reply for another agent!" << llendl;
+ llwarns << "Got group members reply for another agent!" << llendl;
return;
}
@@ -867,10 +867,10 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
LLUUID request_id;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_RequestID, request_id);
- LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->createGroupData(group_id);
- if (group_datap->mMemberRequestID != request_id)
+ LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
+ if (!group_datap || (group_datap->mMemberRequestID != request_id))
{
- llwarns << "processGroupMembersReply: Received incorrect (stale?) request id" << llendl;
+ llwarns << "processGroupMembersReply: Received incorrect (stale?) group or request id" << llendl;
return;
}
@@ -1028,7 +1028,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group properties reply for another agent!" << llendl;
+ llwarns << "Got group role data reply for another agent!" << llendl;
return;
}
@@ -1038,14 +1038,14 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
LLUUID request_id;
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_RequestID, request_id);
- LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->createGroupData(group_id);
- if (group_data->mRoleDataRequestID != request_id)
+ LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
+ if (!group_datap || (group_datap->mRoleDataRequestID != request_id))
{
- llwarns << "processGroupRoleDataReply: Received incorrect (stale?) request id" << llendl;
+ llwarns << "processGroupPropertiesReply: Received incorrect (stale?) group or request id" << llendl;
return;
}
- msg->getS32(_PREHASH_GroupData, "RoleCount", group_data->mRoleCount );
+ msg->getS32(_PREHASH_GroupData, "RoleCount", group_datap->mRoleCount );
std::string name;
std::string title;
@@ -1086,22 +1086,22 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
lldebugs << "Adding role data: " << name << " {" << role_id << "}" << llendl;
LLGroupRoleData* rd = new LLGroupRoleData(role_id,name,title,desc,powers,member_count);
- group_data->mRoles[role_id] = rd;
+ group_datap->mRoles[role_id] = rd;
}
- if (group_data->mRoles.size() == (U32)group_data->mRoleCount)
+ if (group_datap->mRoles.size() == (U32)group_datap->mRoleCount)
{
- group_data->mRoleDataComplete = TRUE;
- group_data->mRoleDataRequestID.setNull();
+ group_datap->mRoleDataComplete = TRUE;
+ group_datap->mRoleDataRequestID.setNull();
// We don't want to make role-member data requests until we have all the role data
- if (group_data->mPendingRoleMemberRequest)
+ if (group_datap->mPendingRoleMemberRequest)
{
- group_data->mPendingRoleMemberRequest = FALSE;
- LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(group_data->mID);
+ group_datap->mPendingRoleMemberRequest = FALSE;
+ LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(group_datap->mID);
}
}
- group_data->mChanged = TRUE;
+ group_datap->mChanged = TRUE;
LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_DATA);
}
@@ -1113,7 +1113,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (gAgent.getID() != agent_id)
{
- llwarns << "Got group properties reply for another agent!" << llendl;
+ llwarns << "Got group role members reply for another agent!" << llendl;
return;
}
@@ -1126,11 +1126,10 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
U32 total_pairs;
msg->getU32(_PREHASH_AgentData, "TotalPairs", total_pairs);
- LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->createGroupData(group_id);
-
- if (group_data->mRoleMembersRequestID != request_id)
+ LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
+ if (!group_datap || (group_datap->mRoleMembersRequestID != request_id))
{
- llwarns << "processGroupRoleMembersReply: Received incorrect (stale?) role member request id" << llendl;
+ llwarns << "processGroupRoleMembersReply: Received incorrect (stale?) group or request id" << llendl;
return;
}
@@ -1155,15 +1154,15 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
if (role_id.notNull() && member_id.notNull() )
{
rd = NULL;
- ri = group_data->mRoles.find(role_id);
- if (ri != group_data->mRoles.end())
+ ri = group_datap->mRoles.find(role_id);
+ if (ri != group_datap->mRoles.end())
{
rd = ri->second;
}
md = NULL;
- mi = group_data->mMembers.find(member_id);
- if (mi != group_data->mMembers.end())
+ mi = group_datap->mMembers.find(member_id);
+ if (mi != group_datap->mMembers.end())
{
md = mi->second;
}
@@ -1182,21 +1181,21 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
}
}
- group_data->mReceivedRoleMemberPairs += num_blocks;
+ group_datap->mReceivedRoleMemberPairs += num_blocks;
}
- if (group_data->mReceivedRoleMemberPairs == total_pairs)
+ if (group_datap->mReceivedRoleMemberPairs == total_pairs)
{
// Add role data for the 'everyone' role to all members
- LLGroupRoleData* everyone = group_data->mRoles[LLUUID::null];
+ LLGroupRoleData* everyone = group_datap->mRoles[LLUUID::null];
if (!everyone)
{
llwarns << "Everyone role not found!" << llendl;
}
else
{
- for (LLGroupMgrGroupData::member_list_t::iterator mi = group_data->mMembers.begin();
- mi != group_data->mMembers.end(); ++mi)
+ for (LLGroupMgrGroupData::member_list_t::iterator mi = group_datap->mMembers.begin();
+ mi != group_datap->mMembers.end(); ++mi)
{
LLGroupMemberData* data = mi->second;
if (data)
@@ -1206,11 +1205,11 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
}
}
- group_data->mRoleMemberDataComplete = TRUE;
- group_data->mRoleMembersRequestID.setNull();
+ group_datap->mRoleMemberDataComplete = TRUE;
+ group_datap->mRoleMembersRequestID.setNull();
}
- group_data->mChanged = TRUE;
+ group_datap->mChanged = TRUE;
LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_MEMBER_DATA);
}
@@ -1228,15 +1227,13 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
LLUUID group_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
-
- LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->createGroupData(group_id);
-
LLUUID request_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_RequestID, request_id);
-
- if (group_data->mTitlesRequestID != request_id)
+
+ LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
+ if (!group_datap || (group_datap->mTitlesRequestID != request_id))
{
- llwarns << "processGroupTitlesReply: Received incorrect (stale?) title request id" << llendl;
+ llwarns << "processGroupTitlesReply: Received incorrect (stale?) group" << llendl;
return;
}
@@ -1253,11 +1250,11 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
if (!title.mTitle.empty())
{
lldebugs << "LLGroupMgr adding title: " << title.mTitle << ", " << title.mRoleID << ", " << (title.mSelected ? 'Y' : 'N') << llendl;
- group_data->mTitles.push_back(title);
+ group_datap->mTitles.push_back(title);
}
}
- group_data->mChanged = TRUE;
+ group_datap->mChanged = TRUE;
LLGroupMgr::getInstance()->notifyObservers(GC_TITLES);
}
diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp
index 37b7b2e75d..8abad3d292 100644
--- a/indra/newview/llhudeffectbeam.cpp
+++ b/indra/newview/llhudeffectbeam.cpp
@@ -295,13 +295,13 @@ void LLHUDEffectBeam::render()
F32 alpha = mFadeInterp.getCurVal()*mColor.mV[3];
alpha *= mInterpFade[i].getCurVal();
coloru.mV[3] = (U8)alpha;
- glColor4ubv(coloru.mV);
+ gGL.color4ubv(coloru.mV);
- glPushMatrix();
- glTranslatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
- glScalef(scale, scale, scale);
- gSphere.render(0);
- glPopMatrix();
+ gGL.pushMatrix();
+ gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
+ gGL.scalef(scale, scale, scale);
+ gSphere.render();
+ gGL.popMatrix();
}
}
diff --git a/indra/newview/llhudeffectblob.cpp b/indra/newview/llhudeffectblob.cpp
index d8687eed8d..c909551b51 100644
--- a/indra/newview/llhudeffectblob.cpp
+++ b/indra/newview/llhudeffectblob.cpp
@@ -44,12 +44,20 @@ LLHUDEffectBlob::~LLHUDEffectBlob()
{
}
+void LLHUDEffectBlob::markDead()
+{
+ mImage = NULL;
+
+ LLHUDEffect::markDead();
+}
+
void LLHUDEffectBlob::render()
{
F32 time = mTimer.getElapsedTimeF32();
if (mDuration < time)
{
markDead();
+ return;
}
LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(mPositionGlobal);
diff --git a/indra/newview/llhudeffectblob.h b/indra/newview/llhudeffectblob.h
index f4c1691108..ce3e8500fc 100644
--- a/indra/newview/llhudeffectblob.h
+++ b/indra/newview/llhudeffectblob.h
@@ -35,6 +35,8 @@ class LLHUDEffectBlob : public LLHUDEffect
public:
friend class LLHUDObject;
+ void markDead();
+
void setPixelSize(S32 pixels) { mPixelSize = pixels; }
protected:
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index b380b3fe20..bc3b220dc0 100644
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -498,10 +498,10 @@ void LLHUDEffectLookAt::render()
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLVector3 target = mTargetPos + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]);
- glScalef(0.3f, 0.3f, 0.3f);
+ gGL.scalef(0.3f, 0.3f, 0.3f);
gGL.begin(LLRender::LINES);
{
LLColor3 color = (*mAttentions)[mTargetType].mColor;
diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp
index 28fe8e1c01..114a633821 100644
--- a/indra/newview/llhudeffectpointat.cpp
+++ b/indra/newview/llhudeffectpointat.cpp
@@ -327,7 +327,7 @@ void LLHUDEffectPointAt::render()
LLVector3 target = mTargetPos + mSourceObject->getRenderPosition();
gGL.pushMatrix();
gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]);
- glScalef(0.3f, 0.3f, 0.3f);
+ gGL.scalef(0.3f, 0.3f, 0.3f);
gGL.begin(LLRender::LINES);
{
gGL.color3f(1.f, 0.f, 0.f);
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 82e1f2dfb5..482294c8a6 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -477,7 +477,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
// Render label
{
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
for(std::vector<LLHUDTextSegment>::iterator segment_iter = mLabelSegments.begin();
segment_iter != mLabelSegments.end(); ++segment_iter )
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 1156e764a1..122711a86d 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -107,14 +107,24 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
viewport[1] = world_view_rect.mBottom;
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
gluProject(render_pos.mV[0], render_pos.mV[1], render_pos.mV[2],
- gGLModelView, gGLProjection, (GLint*) viewport,
+ mdlv, proj, (GLint*) viewport,
&winX, &winY, &winZ);
//fonts all render orthographically, set up projection``
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
LLUI::pushMatrix();
@@ -124,7 +134,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
winX -= world_view_rect.mLeft;
winY -= world_view_rect.mBottom;
LLUI::loadIdentity();
- glLoadIdentity();
+ gGL.loadIdentity();
LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f));
F32 right_x;
@@ -133,7 +143,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
LLUI::popMatrix();
gGL.popMatrix();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 50a9c56518..f5cda52d44 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -34,9 +34,9 @@
#include "llappviewer.h"
#include "llavatarnamecache.h"
#include "llbutton.h"
-#include "llbottomtray.h"
#include "llchannelmanager.h"
#include "llchiclet.h"
+#include "llchicletbar.h"
#include "llfloaterreg.h"
#include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container
#include "llinventoryfunctions.h"
@@ -55,15 +55,9 @@
#include "llinventorymodel.h"
#include "llrootview.h"
#include "llspeakers.h"
-#include "llsidetray.h"
#include "llviewerchat.h"
-static const S32 RECT_PADDING_NOT_INIT = -1;
-static const S32 RECT_PADDING_NEED_RECALC = -2;
-
-S32 LLIMFloater::sAllowedRectRightPadding = RECT_PADDING_NOT_INIT;
-
LLIMFloater::LLIMFloater(const LLUUID& session_id)
: LLTransientDockableFloater(NULL, true, session_id),
mControlPanel(NULL),
@@ -123,14 +117,14 @@ void LLIMFloater::onFocusLost()
{
LLIMModel::getInstance()->resetActiveSessionID();
- LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, false);
+ LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, false);
}
void LLIMFloater::onFocusReceived()
{
LLIMModel::getInstance()->setActiveSessionID(mSessionID);
- LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true);
+ LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true);
if (getVisible())
{
@@ -450,7 +444,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
if (floater->getDockControl() == NULL)
{
LLChiclet* chiclet =
- LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLChiclet>(
+ LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLChiclet>(
session_id);
if (chiclet == NULL)
{
@@ -458,11 +452,11 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
}
else
{
- LLBottomTray::getInstance()->getChicletPanel()->scrollToChiclet(chiclet);
+ LLChicletBar::getInstance()->getChicletPanel()->scrollToChiclet(chiclet);
}
floater->setDockControl(new LLDockControl(chiclet, floater, floater->getDockTongue(),
- LLDockControl::TOP, boost::bind(&LLIMFloater::getAllowedRect, floater, _1)));
+ LLDockControl::BOTTOM));
}
// window is positioned, now we can show it.
@@ -472,43 +466,6 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
return floater;
}
-//static
-bool LLIMFloater::resetAllowedRectPadding()
-{
- //reset allowed rect right padding if "SidebarCameraMovement" option
- //or sidebar state changed
- sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC ;
- return true;
-}
-
-void LLIMFloater::getAllowedRect(LLRect& rect)
-{
- if (sAllowedRectRightPadding == RECT_PADDING_NOT_INIT) //wasn't initialized
- {
- gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLIMFloater::resetAllowedRectPadding));
-
- LLSideTray* side_bar = LLSideTray::getInstance();
- side_bar->setVisibleWidthChangeCallback(boost::bind(&LLIMFloater::resetAllowedRectPadding));
- sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC;
- }
-
- rect = gViewerWindow->getWorldViewRectScaled();
- if (sAllowedRectRightPadding == RECT_PADDING_NEED_RECALC) //recalc allowed rect right padding
- {
- LLPanel* side_bar_tabs =
- gViewerWindow->getRootView()->getChild<LLPanel> (
- "side_bar_tabs");
- sAllowedRectRightPadding = side_bar_tabs->getRect().getWidth();
- LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs);
-
- if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE)
- {
- sAllowedRectRightPadding += LLSideTray::getInstance()->getVisibleWidth();
- }
- }
- rect.mRight -= sAllowedRectRightPadding;
-}
-
void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
{
// update notification channel state
@@ -560,7 +517,7 @@ void LLIMFloater::setVisible(BOOL visible)
if(!visible)
{
- LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(mSessionID);
+ LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(mSessionID);
if(chiclet)
{
chiclet->setToggleState(false);
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 5158f6c1f7..f7cd35b5eb 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -145,8 +145,6 @@ private:
static void* createPanelIMControl(void* userdata);
static void* createPanelGroupControl(void* userdata);
static void* createPanelAdHocControl(void* userdata);
- // gets a rect that bounds possible positions for the LLIMFloater on a screen (EXT-1111)
- void getAllowedRect(LLRect& rect);
// Add the "User is typing..." indicator.
void addTypingIndicator(const LLIMInfo* im_info);
@@ -156,10 +154,6 @@ private:
static void closeHiddenIMToasts();
- static bool resetAllowedRectPadding();
- //need to keep this static for performance issues
- static S32 sAllowedRectRightPadding;
-
static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response);
LLPanelChatControlPanel* mControlPanel;
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 33cb3a54a7..c8e48b0d42 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -47,12 +47,13 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
LLIMFloaterContainer::~LLIMFloaterContainer()
{
+ mNewMessageConnection.disconnect();
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
}
BOOL LLIMFloaterContainer::postBuild()
{
- LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1));
+ mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1));
// Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button
// mTabContainer will be initialized in LLMultiFloater::addChild()
return TRUE;
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index 53dfcd78ff..892ecef48d 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -62,7 +62,7 @@ public:
private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
avatarID_panel_map_t mSessions;
-
+ boost::signals2::connection mNewMessageConnection;
void onNewMessageReceived(const LLSD& data);
};
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index b3b0c93b99..0250af6a0e 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -41,7 +41,6 @@
#include "llagent.h"
#include "llbutton.h"
-#include "llbottomtray.h"
#include "llcallingcard.h"
#include "llchannelmanager.h"
#include "llchat.h"
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 4de6976534..ed4bb727cd 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -46,7 +46,6 @@
#include "llagentui.h"
#include "llappviewer.h"
#include "llavatariconctrl.h"
-#include "llbottomtray.h"
#include "llcallingcard.h"
#include "llchat.h"
#include "llimfloater.h"
@@ -61,6 +60,7 @@
#include "llnearbychat.h"
#include "llspeakers.h" //for LLIMSpeakerMgr
#include "lltextbox.h"
+#include "lltoolbarview.h"
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
@@ -1675,27 +1675,48 @@ LLCallDialog::~LLCallDialog()
LLUI::removePopup(this);
}
-void LLCallDialog::getAllowedRect(LLRect& rect)
+BOOL LLCallDialog::postBuild()
{
- rect = gViewerWindow->getWorldViewRectScaled();
+ if (!LLDockableFloater::postBuild() || !gToolBarView)
+ return FALSE;
+
+ dockToToolbarButton("speak");
+
+ return TRUE;
}
-BOOL LLCallDialog::postBuild()
+void LLCallDialog::dockToToolbarButton(const std::string& toolbarButtonName)
{
- if (!LLDockableFloater::postBuild())
- return FALSE;
+ LLDockControl::DocAt dock_pos = getDockControlPos(toolbarButtonName);
+ LLView *anchor_panel = gToolBarView->findChildView(toolbarButtonName);
- // dock the dialog to the Speak Button, where other sys messages appear
- LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_panel");
+ setUseTongue(anchor_panel);
- setDockControl(new LLDockControl(
- anchor_panel, this,
- getDockTongue(), LLDockControl::TOP,
- boost::bind(&LLCallDialog::getAllowedRect, this, _1)));
+ setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(dock_pos), dock_pos));
+}
- return TRUE;
+LLDockControl::DocAt LLCallDialog::getDockControlPos(const std::string& toolbarButtonName)
+{
+ LLCommandId command_id(toolbarButtonName);
+ S32 toolbar_loc = gToolBarView->hasCommand(command_id);
+
+ LLDockControl::DocAt doc_at = LLDockControl::TOP;
+
+ switch (toolbar_loc)
+ {
+ case LLToolBarView::TOOLBAR_LEFT:
+ doc_at = LLDockControl::RIGHT;
+ break;
+
+ case LLToolBarView::TOOLBAR_RIGHT:
+ doc_at = LLDockControl::LEFT;
+ break;
+ }
+
+ return doc_at;
}
+
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLOutgoingCallDialog
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2449,8 +2470,10 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
LLChat chat(message);
chat.mSourceType = CHAT_SOURCE_SYSTEM;
+
+ LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
+ LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat");
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
if(nearby_chat)
{
nearby_chat->addMessage(chat);
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 0ee56c8070..b1be26a169 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -491,14 +491,16 @@ class LLCallDialog : public LLDockableFloater
{
public:
LLCallDialog(const LLSD& payload);
- ~LLCallDialog();
+ virtual ~LLCallDialog();
virtual BOOL postBuild();
+ void dockToToolbarButton(const std::string& toolbarButtonName);
+
// check timer state
/*virtual*/ void draw();
/*virtual*/ void onOpen(const LLSD& key);
-
+
protected:
// lifetime timer for a notification
LLTimer mLifetimeTimer;
@@ -508,8 +510,6 @@ protected:
virtual bool lifetimeHasExpired();
virtual void onLifetimeExpired();
- virtual void getAllowedRect(LLRect& rect);
-
/**
* Sets icon depend on session.
*
@@ -521,6 +521,9 @@ protected:
void setIcon(const LLSD& session_id, const LLSD& participant_id);
LLSD mPayload;
+
+private:
+ LLDockControl::DocAt getDockControlPos(const std::string& toolbarButtonName);
};
class LLIncomingCallDialog : public LLCallDialog
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index ee076f68ea..acc139c569 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -28,6 +28,7 @@
#include "llinspectobject.h"
// Viewer
+#include "llfloatersidepanelcontainer.h"
#include "llinspect.h"
#include "llmediaentry.h"
#include "llnotificationsutil.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper
@@ -45,7 +46,6 @@
#include "llmenubutton.h"
#include "llresmgr.h" // getMonetaryString
#include "llsafehandle.h"
-#include "llsidetray.h"
#include "lltextbox.h" // for description truncation
#include "lltoggleablemenu.h"
#include "lltrans.h"
@@ -640,7 +640,7 @@ void LLInspectObject::onClickMoreInfo()
{
LLSD key;
key["task"] = "task";
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+ LLFloaterSidePanelContainer::showPanel("inventory", key);
closeFloater();
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 75d4c4e80d..0c092e9a56 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -39,6 +39,7 @@
#include "llavataractions.h"
#include "llfloateropenobject.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
#include "llfriendcard.h"
@@ -59,7 +60,6 @@
#include "llpreviewtexture.h"
#include "llselectmgr.h"
#include "llsidepanelappearance.h"
-#include "llsidetray.h"
#include "lltrans.h"
#include "llviewerassettype.h"
#include "llviewerfoldertype.h"
@@ -70,6 +70,9 @@
#include "llvoavatarself.h"
#include "llwearablelist.h"
+// Marketplace outbox current disabled
+#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_PANEL
+
typedef std::pair<LLUUID, LLUUID> two_uuids_t;
typedef std::list<two_uuids_t> two_uuids_list_t;
@@ -107,6 +110,23 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
void teleport_via_landmark(const LLUUID& asset_id);
static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
+// Helper functions
+
+bool isAddAction(const std::string& action)
+{
+ return ("wear" == action || "attach" == action || "activate" == action);
+}
+
+bool isRemoveAction(const std::string& action)
+{
+ return ("take_off" == action || "detach" == action || "deactivate" == action);
+}
+
+bool isMarketplaceCopyAction(const std::string& action)
+{
+ return (("copy_to_outbox" == action) || ("move_to_outbox" == action));
+}
+
// +=================================================+
// | LLInvFVBridge |
// +=================================================+
@@ -538,10 +558,14 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
{
items.push_back(std::string("Find Links"));
}
- items.push_back(std::string("Rename"));
- if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
+
+ if (!isInboxFolder())
{
- disabled_items.push_back(std::string("Rename"));
+ items.push_back(std::string("Rename"));
+ if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
+ {
+ disabled_items.push_back(std::string("Rename"));
+ }
}
if (show_asset_id)
@@ -569,11 +593,31 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
{
disabled_items.push_back(std::string("Copy"));
}
+
+ if (canListOnMarketplace())
+ {
+ items.push_back(std::string("Marketplace Separator"));
+
+ bool copyable = true;
+ LLViewerInventoryItem* inv_item = gInventory.getItem(mUUID);
+ if (inv_item)
+ {
+ copyable = inv_item->getPermissions().allowCopyBy(gAgent.getID());
+ }
+
+ const std::string merchant_action = ((copyable == true) ? "Merchant Copy" : "Merchant Move");
+ items.push_back(merchant_action);
+
+ if (!canListOnMarketplaceNow())
+ {
+ disabled_items.push_back(merchant_action);
+ }
+ }
}
}
// Don't allow items to be pasted directly into the COF or the inbox
- if (!isCOFFolder() && !isInboxFolder())
+ if (!isCOFFolder() && !isInboxFolder() && !isOutboxFolder())
{
items.push_back(std::string("Paste"));
}
@@ -610,6 +654,10 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
addTrashContextMenuOptions(items, disabled_items);
+ }
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
}
else
{
@@ -794,6 +842,25 @@ BOOL LLInvFVBridge::isInboxFolder() const
return gInventory.isObjectDescendentOf(mUUID, inbox_id);
}
+BOOL LLInvFVBridge::isOutboxFolder() const
+{
+ const LLUUID outbox_id = getOutboxFolder();
+
+ if (outbox_id.isNull())
+ {
+ return FALSE;
+ }
+
+ return gInventory.isObjectDescendentOf(mUUID, outbox_id);
+}
+
+const LLUUID LLInvFVBridge::getOutboxFolder() const
+{
+ const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false);
+
+ return outbox_id;
+}
+
BOOL LLInvFVBridge::isItemPermissive() const
{
return FALSE;
@@ -938,9 +1005,14 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
new_listener = new LLMeshBridge(inventory, root, uuid);
break;
+ case LLAssetType::AT_IMAGE_TGA:
+ case LLAssetType::AT_IMAGE_JPEG:
+ //llwarns << LLAssetType::lookup(asset_type) << " asset type is unhandled for uuid " << uuid << llendl;
+ break;
+
default:
llinfos << "Unhandled asset type (llassetstorage.h): "
- << (S32)asset_type << llendl;
+ << (S32)asset_type << " (" << LLAssetType::lookup(asset_type) << ")" << llendl;
break;
}
@@ -989,6 +1061,65 @@ BOOL LLInvFVBridge::canShare() const
return FALSE;
}
+BOOL LLInvFVBridge::canListOnMarketplace() const
+{
+#if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU
+ LLInventoryModel * model = getInventoryModel();
+ const LLViewerInventoryCategory * cat = model->getCategory(mUUID);
+ if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
+ {
+ return FALSE;
+ }
+
+ if (!isAgentInventory())
+ {
+ return FALSE;
+ }
+
+ if (getOutboxFolder().isNull())
+ {
+ return FALSE;
+ }
+
+ if (isInboxFolder() || isOutboxFolder())
+ {
+ return FALSE;
+ }
+
+ LLViewerInventoryItem * item = model->getItem(mUUID);
+ if (item && !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+
+BOOL LLInvFVBridge::canListOnMarketplaceNow() const
+{
+#if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU
+ if (get_is_item_worn(mUUID))
+ {
+ return FALSE;
+ }
+
+ // Loop through all items worn by avatar and check to see if they are descendants
+ // of the item we are trying to list on the marketplace
+ if (get_is_parent_to_worn_item(mUUID))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+
+
// +=================================================+
// | InventoryFVBridgeBuilder |
// +=================================================+
@@ -1054,7 +1185,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
std::string buffer;
asset_id.toString(buffer);
- gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer));
+ gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(buffer));
return;
}
else if ("copy" == action)
@@ -1086,6 +1217,16 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
folder_view_itemp->getListener()->pasteLinkFromClipboard();
return;
}
+ else if (isMarketplaceCopyAction(action))
+ {
+ llinfos << "Copy item to marketplace action!" << llendl;
+
+ LLInventoryItem* itemp = model->getItem(mUUID);
+ if (!itemp) return;
+
+ const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false);
+ copy_item_to_outbox(itemp, outbox_id, LLUUID::null);
+ }
}
void LLItemBridge::selectItem()
@@ -1226,7 +1367,7 @@ std::string LLItemBridge::getLabelSuffix() const
{
// String table is loaded before login screen and inventory items are
// loaded after login, so LLTrans should be ready.
- static std::string NO_COPY =LLTrans::getString("no_copy");
+ static std::string NO_COPY = LLTrans::getString("no_copy");
static std::string NO_MOD = LLTrans::getString("no_modify");
static std::string NO_XFER = LLTrans::getString("no_transfer");
static std::string LINK = LLTrans::getString("link");
@@ -1235,16 +1376,17 @@ std::string LLItemBridge::getLabelSuffix() const
LLInventoryItem* item = getItem();
if(item)
{
- // it's a bit confusing to put nocopy/nomod/etc on calling cards.
+ // Any type can have the link suffix...
+ BOOL broken_link = LLAssetType::lookupIsLinkType(item->getType());
+ if (broken_link) return BROKEN_LINK;
+
+ BOOL link = item->getIsLinkType();
+ if (link) return LINK;
+
+ // ...but it's a bit confusing to put nocopy/nomod/etc suffixes on calling cards.
if(LLAssetType::AT_CALLINGCARD != item->getType()
&& item->getPermissions().getOwner() == gAgent.getID())
{
- BOOL broken_link = LLAssetType::lookupIsLinkType(item->getType());
- if (broken_link) return BROKEN_LINK;
-
- BOOL link = item->getIsLinkType();
- if (link) return LINK;
-
BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
if (!copy)
{
@@ -1294,6 +1436,11 @@ BOOL LLItemBridge::isItemRenameable() const
return FALSE;
}
+ if (isInboxFolder())
+ {
+ return FALSE;
+ }
+
return (item->getPermissions().allowModifyBy(gAgent.getID()));
}
return FALSE;
@@ -1457,16 +1604,6 @@ BOOL LLItemBridge::isItemPermissive() const
return FALSE;
}
-bool LLItemBridge::isAddAction(std::string action) const
-{
- return ("wear" == action || "attach" == action || "activate" == action);
-}
-
-bool LLItemBridge::isRemoveAction(std::string action) const
-{
- return ("take_off" == action || "detach" == action || "deactivate" == action);
-}
-
// +=================================================+
// | LLFolderBridge |
// +=================================================+
@@ -1648,8 +1785,77 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
}
+static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_msg)
+{
+ bool worn = get_is_item_worn(inv_item->getUUID());
+ bool allow_transfer = inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
+
+ if (!allow_transfer)
+ {
+ tooltip_msg = LLTrans::getString("TooltipOutboxNoTransfer");
+ }
+ else if(worn)
+ {
+ tooltip_msg = LLTrans::getString("TooltipOutboxWorn");
+ }
+
+ return !worn && allow_transfer;
+}
+
+
+
+void LLFolderBridge::dropFolderToOutbox(LLInventoryCategory* inv_cat)
+{
+ copy_folder_to_outbox(inv_cat, getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false), inv_cat->getUUID());
+}
+
+
+
+int get_folder_levels(LLInventoryCategory* inv_cat)
+{
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(inv_cat->getUUID(), cats, items);
+
+ int max_child_levels = 0;
+
+ for (S32 i=0; i < cats->count(); ++i)
+ {
+ LLInventoryCategory* category = cats->get(i);
+ max_child_levels = llmax(max_child_levels, get_folder_levels(category));
+ }
+
+ return 1 + max_child_levels;
+}
+
+int get_folder_path_length(const LLUUID& ancestor_id, const LLUUID& descendant_id)
+{
+ int depth = 0;
+
+ if (ancestor_id == descendant_id) return depth;
+
+ const LLInventoryCategory* category = gInventory.getCategory(descendant_id);
+
+ while(category)
+ {
+ LLUUID parent_id = category->getParentUUID();
+
+ if (parent_id.isNull()) break;
+
+ depth++;
+
+ if (parent_id == ancestor_id) return depth;
+
+ category = gInventory.getCategory(parent_id);
+ }
+
+ llwarns << "get_folder_path_length() couldn't trace a path from the descendant to the ancestor" << llendl;
+ return -1;
+}
+
BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
- BOOL drop)
+ BOOL drop,
+ std::string& tooltip_msg)
{
LLInventoryModel* model = getInventoryModel();
@@ -1674,10 +1880,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
const LLUUID &cat_id = inv_cat->getUUID();
const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false);
const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
-
+ const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
+
const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
const BOOL move_is_into_outfit = getCategory() && (getCategory()->getPreferredType() == LLFolderType::FT_OUTFIT);
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
+ const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
+ const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_cat->getUUID(), outbox_id);
//--------------------------------------------------------------------------------
// Determine if folder can be moved.
@@ -1730,6 +1939,27 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
}
}
+ if (move_is_into_outbox)
+ {
+ for (S32 i=0; i < descendent_items.count(); ++i)
+ {
+ LLInventoryItem* item = descendent_items[i];
+ if (!can_move_to_outbox(item, tooltip_msg))
+ {
+ is_movable = FALSE;
+ break;
+ }
+ }
+
+ int nested_folder_levels = get_folder_path_length(outbox_id, mUUID) + get_folder_levels(inv_cat);
+
+ if (nested_folder_levels > 4)
+ {
+ tooltip_msg = LLTrans::getString("TooltipOutboxFolderLevels");
+ is_movable = FALSE;
+ }
+
+ }
//
//--------------------------------------------------------------------------------
@@ -1797,6 +2027,10 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
#endif
}
}
+ else if (move_is_into_outbox && !move_is_from_outbox)
+ {
+ dropFolderToOutbox(inv_cat);
+ }
else
{
if (gInventory.isObjectDescendentOf(inv_cat->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false)))
@@ -2209,6 +2443,16 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
removeSystemFolder();
}
#endif
+ else if (isMarketplaceCopyAction(action))
+ {
+ llinfos << "Copy folder to marketplace action!" << llendl;
+
+ LLInventoryCategory * cat = gInventory.getCategory(mUUID);
+ if (!cat) return;
+
+ const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false);
+ copy_folder_to_outbox(cat, outbox_id, cat->getUUID());
+ }
}
void LLFolderBridge::openItem()
@@ -2483,8 +2727,6 @@ void LLFolderBridge::staticFolderOptionsMenu()
void LLFolderBridge::folderOptionsMenu()
{
- menuentry_vec_t disabled_items;
-
LLInventoryModel* model = getInventoryModel();
if(!model) return;
@@ -2495,6 +2737,7 @@ void LLFolderBridge::folderOptionsMenu()
if (trash_id == mUUID) return;
if (isItemInTrash()) return;
if (!isAgentInventory()) return;
+ if (isOutboxFolder()) return;
LLFolderType::EType type = category->getPreferredType();
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
@@ -2514,6 +2757,11 @@ void LLFolderBridge::folderOptionsMenu()
}
}
+ if (!isItemRemovable())
+ {
+ mDisabledItems.push_back(std::string("Delete"));
+ }
+
#ifndef LL_RELEASE_FOR_DOWNLOAD
if (LLFolderType::lookupIsProtectedType(type))
{
@@ -2552,18 +2800,18 @@ void LLFolderBridge::folderOptionsMenu()
mItems.push_back(std::string("Remove From Outfit"));
if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID))
{
- disabled_items.push_back(std::string("Remove From Outfit"));
+ mDisabledItems.push_back(std::string("Remove From Outfit"));
}
if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
{
- disabled_items.push_back(std::string("Replace Outfit"));
+ mDisabledItems.push_back(std::string("Replace Outfit"));
}
mItems.push_back(std::string("Outfit Separator"));
}
LLMenuGL* menup = dynamic_cast<LLMenuGL*>(mMenu.get());
if (menup)
{
- hide_context_entries(*menup, mItems, disabled_items, TRUE);
+ hide_context_entries(*menup, mItems, mDisabledItems, TRUE);
// Reposition the menu, in case we're adding items to an existing menu.
menup->needsArrange();
@@ -2625,6 +2873,10 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
mItems.clear(); // clear any items that used to exist
addTrashContextMenuOptions(mItems, mDisabledItems);
}
+ else if(isOutboxFolder())
+ {
+ mItems.push_back(std::string("Delete"));
+ }
else if(isAgentInventory()) // do not allow creating in library
{
LLViewerInventoryCategory *cat = getCategory();
@@ -2632,7 +2884,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
// Not sure what the right thing is to do here.
if (!isCOFFolder() && cat && (cat->getPreferredType() != LLFolderType::FT_OUTFIT))
{
- if (!isInboxFolder()) // don't allow creation in inbox
+ if (!isInboxFolder() && !isOutboxFolder()) // don't allow creation in inbox
{
// Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694.
if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat))
@@ -2699,10 +2951,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
mDisabledItems.push_back(std::string("Delete System Folder"));
}
- mItems.push_back(std::string("Share"));
- if (!canShare())
+ if (!isOutboxFolder())
{
- mDisabledItems.push_back(std::string("Share"));
+ mItems.push_back(std::string("Share"));
+ if (!canShare())
+ {
+ mDisabledItems.push_back(std::string("Share"));
+ }
}
hide_context_entries(menu, mItems, mDisabledItems);
@@ -2743,7 +2998,8 @@ BOOL LLFolderBridge::hasChildren() const
BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data)
+ void* cargo_data,
+ std::string& tooltip_msg)
{
LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
@@ -2763,7 +3019,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
case DAD_ANIMATION:
case DAD_GESTURE:
case DAD_MESH:
- accept = dragItemIntoFolder(inv_item, drop);
+ accept = dragItemIntoFolder(inv_item, drop, tooltip_msg);
break;
case DAD_LINK:
// DAD_LINK type might mean one of two asset types: AT_LINK or AT_LINK_FOLDER.
@@ -2774,12 +3030,12 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID());
if (linked_category)
{
- accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop);
+ accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg);
}
}
else
{
- accept = dragItemIntoFolder(inv_item, drop);
+ accept = dragItemIntoFolder(inv_item, drop, tooltip_msg);
}
break;
case DAD_CATEGORY:
@@ -2789,7 +3045,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
}
else
{
- accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop);
+ accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop, tooltip_msg);
}
break;
case DAD_ROOT_CATEGORY:
@@ -3046,7 +3302,8 @@ void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_c
// into the folder, as well as performing the actual drop, depending
// if drop == TRUE.
BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
- BOOL drop)
+ BOOL drop,
+ std::string& tooltip_msg)
{
LLInventoryModel* model = getInventoryModel();
@@ -3057,11 +3314,14 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false);
const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false);
+ const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
const BOOL move_is_into_favorites = (mUUID == favorites_id);
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
+ const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); //(mUUID == outbox_id);
+ const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_item->getUUID(), outbox_id);
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
BOOL accept = FALSE;
@@ -3127,6 +3387,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
accept = can_move_to_landmarks(inv_item);
}
+ else if (move_is_into_outbox)
+ {
+ accept = can_move_to_outbox(inv_item, tooltip_msg);
+ }
if(accept && drop)
{
@@ -3177,6 +3441,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
dropToOutfit(inv_item, move_is_into_current_outfit);
}
+ else if (move_is_into_outbox && !move_is_from_outbox)
+ {
+ copy_item_to_outbox(inv_item, outbox_id, LLUUID::null);
+ }
// NORMAL or TRASH folder
// (move the item, restamp if into trash)
else
@@ -3276,10 +3544,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// because they must contain only links to wearable items.
accept = !(move_is_into_current_outfit || move_is_into_outfit);
- if(drop)
+ if(accept && drop)
{
- copy_inventory_from_notecard(LLToolDragAndDrop::getInstance()->getObjectID(),
- LLToolDragAndDrop::getInstance()->getSourceID(), inv_item);
+ copy_inventory_from_notecard(mUUID, // Drop to the chosen destination folder
+ LLToolDragAndDrop::getInstance()->getObjectID(),
+ LLToolDragAndDrop::getInstance()->getSourceID(),
+ inv_item);
}
}
else if(LLToolDragAndDrop::SOURCE_LIBRARY == source)
@@ -3377,6 +3647,10 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
addTrashContextMenuOptions(items, disabled_items);
+ }
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
}
else
{
@@ -3453,6 +3727,10 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
addTrashContextMenuOptions(items, disabled_items);
+ }
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
}
else
{
@@ -3467,8 +3745,11 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
}
- items.push_back(std::string("Sound Separator"));
- items.push_back(std::string("Sound Play"));
+ if (!isOutboxFolder())
+ {
+ items.push_back(std::string("Sound Separator"));
+ items.push_back(std::string("Sound Play"));
+ }
hide_context_entries(menu, items, disabled_items);
}
@@ -3504,6 +3785,10 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
addTrashContextMenuOptions(items, disabled_items);
+ }
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
}
else
{
@@ -3518,8 +3803,11 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
}
- items.push_back(std::string("Landmark Separator"));
- items.push_back(std::string("About Landmark"));
+ if (!isOutboxFolder())
+ {
+ items.push_back(std::string("Landmark Separator"));
+ items.push_back(std::string("About Landmark"));
+ }
// Disable "About Landmark" menu item for
// multiple landmarks selected. Only one landmark
@@ -3566,7 +3854,7 @@ void LLLandmarkBridge::performAction(LLInventoryModel* model, std::string action
key["type"] = "landmark";
key["id"] = item->getUUID();
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
}
}
else
@@ -3733,6 +4021,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
addTrashContextMenuOptions(items, disabled_items);
+ }
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
}
else
{
@@ -3775,7 +4067,8 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data)
+ void* cargo_data,
+ std::string& tooltip_msg)
{
LLViewerInventoryItem* item = getItem();
BOOL rv = FALSE;
@@ -3990,6 +4283,10 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
addTrashContextMenuOptions(items, disabled_items);
}
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
+ }
else
{
items.push_back(std::string("Share"));
@@ -4043,6 +4340,10 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
addTrashContextMenuOptions(items, disabled_items);
+ }
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
}
else
{
@@ -4057,9 +4358,12 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
}
- items.push_back(std::string("Animation Separator"));
- items.push_back(std::string("Animation Play"));
- items.push_back(std::string("Animation Audition"));
+ if (!isOutboxFolder())
+ {
+ items.push_back(std::string("Animation Separator"));
+ items.push_back(std::string("Animation Play"));
+ items.push_back(std::string("Animation Audition"));
+ }
hide_context_entries(menu, items, disabled_items);
@@ -4316,6 +4620,10 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(isItemInTrash())
{
addTrashContextMenuOptions(items, disabled_items);
+ }
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
}
else
{
@@ -4475,7 +4783,7 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
if (gAgentCamera.cameraCustomizeAvatar())
{
// switching to outfit editor should automagically save any currently edited wearable
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() );
@@ -4649,6 +4957,10 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
addTrashContextMenuOptions(items, disabled_items);
}
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
+ }
else
{ // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere
BOOL can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM);
@@ -4922,31 +5234,22 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
// static
void LLWearableBridge::removeAllClothesFromAvatar()
{
- // Remove COF links.
- for (S32 itype = LLWearableType::WT_SHAPE; itype < LLWearableType::WT_COUNT; ++itype)
- {
- if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES)
- continue;
+ // Fetch worn clothes (i.e. the ones in COF).
+ LLInventoryModel::item_array_t clothing_items;
+ LLInventoryModel::cat_array_t dummy;
+ LLIsType is_clothing(LLAssetType::AT_CLOTHING);
+ gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(),
+ dummy,
+ clothing_items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_clothing,
+ false);
- for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index)
- {
- LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(
- gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, index));
- if (!item)
- continue;
- const LLUUID &item_id = item->getUUID();
- const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id);
- if (!wearable)
- continue;
-
- // Find and remove this item from the COF.
- LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
- }
+ // Take them off by removing from COF.
+ for (LLInventoryModel::item_array_t::const_iterator it = clothing_items.begin(); it != clothing_items.end(); ++it)
+ {
+ LLAppearanceMgr::instance().removeItemFromAvatar((*it)->getUUID());
}
- gInventory.notifyObservers();
-
- // Remove wearables from gAgentWearables
- LLAgentWearables::userRemoveAllClothes();
}
// static
@@ -5046,6 +5349,10 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Restore Item"));
}
+ else if(isOutboxFolder())
+ {
+ items.push_back(std::string("Delete"));
+ }
else
{
items.push_back(std::string("Properties"));
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 15629c0c75..2d625befb4 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -52,7 +52,7 @@ typedef std::vector<std::string> menuentry_vec_t;
//
// You'll want to call LLInvItemFVELister::createBridge() to actually create
// an instance of this class. This helps encapsulate the
-// funcationality a bit. (except for folders, you can create those
+// functionality a bit. (except for folders, you can create those
// manually...)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInvFVBridge : public LLFolderViewEventListener
@@ -70,6 +70,8 @@ public:
virtual ~LLInvFVBridge() {}
BOOL canShare() const;
+ BOOL canListOnMarketplace() const;
+ BOOL canListOnMarketplaceNow() const;
//--------------------------------------------------------------------
// LLInvFVBridge functionality
@@ -115,7 +117,8 @@ public:
virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data) { return FALSE; }
+ void* cargo_data,
+ std::string& tooltip_msg) { return FALSE; }
virtual LLInventoryType::EType getInventoryType() const { return mInvType; }
virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; }
@@ -140,6 +143,9 @@ protected:
BOOL isAgentInventory() const; // false if lost or in the inventory library
BOOL isCOFFolder() const; // true if COF or descendent of
BOOL isInboxFolder() const; // true if COF or descendent of marketplace inbox
+ BOOL isOutboxFolder() const; // true if COF or descendent of marketplace outbox
+ const LLUUID getOutboxFolder() const;
+
virtual BOOL isItemPermissive() const;
static void changeItemParent(LLInventoryModel* model,
LLViewerInventoryItem* item,
@@ -208,8 +214,7 @@ public:
/*virtual*/ void clearDisplayName() { mDisplayName.clear(); }
LLViewerInventoryItem* getItem() const;
- bool isAddAction(std::string action) const;
- bool isRemoveAction(std::string action) const;
+
protected:
BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response);
virtual BOOL isItemPermissive() const;
@@ -228,8 +233,9 @@ public:
mCallingCards(FALSE),
mWearables(FALSE)
{}
- BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop);
- BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop);
+
+ BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg);
+ BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg);
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void openItem();
@@ -255,7 +261,8 @@ public:
virtual BOOL hasChildren() const;
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data);
+ void* cargo_data,
+ std::string& tooltip_msg);
virtual BOOL isItemRemovable() const;
virtual BOOL isItemMovable() const ;
@@ -299,6 +306,8 @@ protected:
void dropToFavorites(LLInventoryItem* inv_item);
void dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
+ void dropToOutbox(LLInventoryItem* inv_item);
+ void dropFolderToOutbox(LLInventoryCategory* inv_cat);
//--------------------------------------------------------------------
// Messy hacks for handling folder options
@@ -378,7 +387,8 @@ public:
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data);
+ void* cargo_data,
+ std::string& tooltip_msg);
void refreshFolderViewItem();
protected:
LLCallingCardObserver* mObserver;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index d6278a5fda..d54bce4619 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -36,6 +36,7 @@
#include "llviewercontrol.h"
#include "llfolderview.h"
#include "llinventorybridge.h"
+#include "llviewerfoldertype.h"
// linden library includes
#include "lltrans.h"
@@ -117,7 +118,7 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder)
const LLFolderViewEventListener* listener = folder->getListener();
const LLUUID folder_id = listener->getUUID();
-
+
if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY)
{
// Can only filter categories for items in your inventory
@@ -206,6 +207,23 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con
}
}
+ ////////////////////////////////////////////////////////////////////////////////
+ // FILTERTYPE_EMPTYFOLDERS
+ // Pass if this item is a folder and is not a system folder that should be hidden
+ if (filterTypes & FILTERTYPE_EMPTYFOLDERS)
+ {
+ if (object_type == LLInventoryType::IT_CATEGORY)
+ {
+ bool is_hidden_if_empty = LLViewerFolderType::lookupIsHiddenIfEmpty(listener->getPreferredType());
+ if (is_hidden_if_empty)
+ {
+ // Force the fetching of those folders so they are hidden iff they really are empty...
+ gInventory.fetchDescendentsOf(object_id);
+ return FALSE;
+ }
+ }
+ }
+
return TRUE;
}
@@ -256,16 +274,20 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const
// has user modified default filter params?
BOOL LLInventoryFilter::isNotDefault() const
{
- return mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes
- || mFilterOps.mFilterCategoryTypes != mDefaultFilterOps.mFilterCategoryTypes
- || mFilterOps.mFilterWearableTypes != mDefaultFilterOps.mFilterWearableTypes
- || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT
- || mFilterOps.mFilterLinks != FILTERLINK_INCLUDE_LINKS
- || mFilterSubString.size()
- || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
- || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
- || mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate
- || mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo;
+ BOOL not_default = FALSE;
+
+ not_default |= (mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes);
+ not_default |= (mFilterOps.mFilterCategoryTypes != mDefaultFilterOps.mFilterCategoryTypes);
+ not_default |= (mFilterOps.mFilterWearableTypes != mDefaultFilterOps.mFilterWearableTypes);
+ not_default |= (mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes);
+ not_default |= (mFilterOps.mFilterLinks != mDefaultFilterOps.mFilterLinks);
+ not_default |= (mFilterSubString.size());
+ not_default |= (mFilterOps.mPermissions != mDefaultFilterOps.mPermissions);
+ not_default |= (mFilterOps.mMinDate != mDefaultFilterOps.mMinDate);
+ not_default |= (mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate);
+ not_default |= (mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo);
+
+ return not_default;
}
BOOL LLInventoryFilter::isActive() const
@@ -339,6 +361,11 @@ void LLInventoryFilter::setFilterWearableTypes(U64 types)
mFilterOps.mFilterTypes |= FILTERTYPE_WEARABLE;
}
+void LLInventoryFilter::setFilterEmptySystemFolders()
+{
+ mFilterOps.mFilterTypes |= FILTERTYPE_EMPTYFOLDERS;
+}
+
void LLInventoryFilter::setFilterUUID(const LLUUID& object_id)
{
if (mFilterOps.mFilterUUID == LLUUID::null)
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index f9460822f7..bba24ac652 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -57,7 +57,8 @@ public:
FILTERTYPE_CATEGORY = 0x1 << 1, // search by folder type
FILTERTYPE_UUID = 0x1 << 2, // find the object with UUID and any links to it
FILTERTYPE_DATE = 0x1 << 3, // search by date range
- FILTERTYPE_WEARABLE = 0x1 << 4 // search by wearable type
+ FILTERTYPE_WEARABLE = 0x1 << 4, // search by wearable type
+ FILTERTYPE_EMPTYFOLDERS = 0x1 << 5 // pass if folder is not a system folder to be hidden if empty
};
enum EFilterLink
@@ -88,6 +89,7 @@ public:
void setFilterCategoryTypes(U64 types);
void setFilterUUID(const LLUUID &object_id);
void setFilterWearableTypes(U64 types);
+ void setFilterEmptySystemFolders();
void updateFilterTypes(U64 types, U64& current_types);
void setFilterSubString(const std::string& string);
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index db3b968730..5fb3f15cd5 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -47,6 +47,7 @@
#include "llappviewer.h"
//#include "llfirstuse.h"
#include "llfloaterinventory.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfocusmgr.h"
#include "llfolderview.h"
#include "llgesturemgr.h"
@@ -58,6 +59,7 @@
#include "llinventorypanel.h"
#include "lllineeditor.h"
#include "llmenugl.h"
+#include "llnotificationsutil.h"
#include "llpanelmaininventory.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
@@ -69,7 +71,6 @@
#include "llscrollbar.h"
#include "llscrollcontainer.h"
#include "llselectmgr.h"
-#include "llsidetray.h"
#include "llsidepanelinventory.h"
#include "lltabcontainer.h"
#include "lltooldraganddrop.h"
@@ -210,6 +211,58 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s
model->notifyObservers();
}
+class LLInventoryCollectAllItems : public LLInventoryCollectFunctor
+{
+public:
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ return true;
+ }
+};
+
+BOOL get_is_parent_to_worn_item(const LLUUID& id)
+{
+ const LLViewerInventoryCategory* cat = gInventory.getCategory(id);
+ if (!cat)
+ {
+ return FALSE;
+ }
+
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLInventoryCollectAllItems collect_all;
+ gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), cats, items, LLInventoryModel::EXCLUDE_TRASH, collect_all);
+
+ for (LLInventoryModel::item_array_t::const_iterator it = items.begin(); it != items.end(); ++it)
+ {
+ const LLViewerInventoryItem * const item = *it;
+
+ llassert(item->getIsLinkType());
+
+ LLUUID linked_id = item->getLinkedUUID();
+ const LLViewerInventoryItem * const linked_item = gInventory.getItem(linked_id);
+
+ if (linked_item)
+ {
+ LLUUID parent_id = linked_item->getParentUUID();
+
+ while (!parent_id.isNull())
+ {
+ LLInventoryCategory * parent_cat = gInventory.getCategory(parent_id);
+
+ if (cat == parent_cat)
+ {
+ return TRUE;
+ }
+
+ parent_id = parent_cat->getParentUUID();
+ }
+ }
+ }
+
+ return FALSE;
+}
+
BOOL get_is_item_worn(const LLUUID& id)
{
const LLViewerInventoryItem* item = gInventory.getItem(id);
@@ -406,22 +459,28 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id)
{
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", item_uuid).with("object", object_id));
+ LLFloaterSidePanelContainer::showPanel("inventory", LLSD().with("id", item_uuid).with("object", object_id));
}
void show_item_profile(const LLUUID& item_uuid)
{
LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid);
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", linked_uuid));
+ LLFloaterSidePanelContainer::showPanel("inventory", LLSD().with("id", linked_uuid));
}
void show_item_original(const LLUUID& item_uuid)
{
+ LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
+ if (!floater_inventory)
+ {
+ llwarns << "Could not find My Inventory floater" << llendl;
+ return;
+ }
+
//sidetray inventory panel
- LLSidepanelInventory *sidepanel_inventory =
- dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- bool reset_inventory_filter = !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory");
+ bool reset_inventory_filter = !floater_inventory->isInVisibleChain();
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel();
if (!active_panel)
@@ -471,6 +530,133 @@ void show_item_original(const LLUUID& item_uuid)
}
}
+void move_to_outbox_cb(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0) return; // canceled
+
+ LLViewerInventoryItem * viitem = gInventory.getItem(notification["payload"]["item_id"].asUUID());
+ LLUUID dest_folder_id = notification["payload"]["dest_folder_id"].asUUID();
+
+ if (viitem)
+ {
+ // when moving item directly into outbox create folder with that name
+ if (dest_folder_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false))
+ {
+ dest_folder_id = gInventory.createNewCategory(dest_folder_id, LLFolderType::FT_NONE, viitem->getName());
+ gInventory.notifyObservers();
+ }
+
+ LLUUID parent = viitem->getParentUUID();
+
+ change_item_parent(
+ &gInventory,
+ viitem,
+ dest_folder_id,
+ false);
+
+ LLUUID top_level_folder = notification["payload"]["top_level_folder"].asUUID();
+
+ if (top_level_folder != LLUUID::null)
+ {
+ LLViewerInventoryCategory* category;
+
+ while (parent.notNull())
+ {
+ LLInventoryModel::cat_array_t* cat_array;
+ LLInventoryModel::item_array_t* item_array;
+ gInventory.getDirectDescendentsOf(parent,cat_array,item_array);
+
+ LLUUID next_parent;
+
+ category = gInventory.getCategory(parent);
+
+ if (!category) break;
+
+ next_parent = category->getParentUUID();
+
+ if (cat_array->empty() && item_array->empty())
+ {
+ remove_category(&gInventory, parent);
+ }
+
+ if (parent == top_level_folder)
+ {
+ break;
+ }
+
+ parent = next_parent;
+ }
+ }
+
+ }
+}
+
+
+void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder)
+{
+ if (inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()))
+ {
+ // when moving item directly into outbox create folder with that name
+ if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false))
+ {
+ dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName());
+ gInventory.notifyObservers();
+ }
+
+ copy_inventory_item(
+ gAgent.getID(),
+ inv_item->getPermissions().getOwner(),
+ inv_item->getUUID(),
+ dest_folder,
+ inv_item->getName(),
+ LLPointer<LLInventoryCallback>(NULL));
+ }
+ else
+ {
+ LLSD args;
+ args["ITEM_NAME"] = inv_item->getName();
+ LLSD payload;
+ payload["item_id"] = inv_item->getUUID();
+ payload["dest_folder_id"] = dest_folder;
+ payload["top_level_folder"] = top_level_folder;
+ LLNotificationsUtil::add("ConfirmNoCopyToOutbox", args, payload, boost::bind(&move_to_outbox_cb, _1, _2));
+ }
+}
+
+void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder)
+{
+ LLUUID new_folder_id = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_cat->getName());
+ gInventory.notifyObservers();
+
+ LLInventoryModel::cat_array_t* cat_array;
+ LLInventoryModel::item_array_t* item_array;
+ gInventory.getDirectDescendentsOf(inv_cat->getUUID(),cat_array,item_array);
+
+ // copy the vector because otherwise the iterator won't be happy if we delete from it
+ LLInventoryModel::item_array_t item_array_copy = *item_array;
+
+ for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++)
+ {
+ LLInventoryItem* item = *iter;
+ copy_item_to_outbox(item, new_folder_id, top_level_folder);
+ }
+
+ LLInventoryModel::cat_array_t cat_array_copy = *cat_array;
+
+ for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++)
+ {
+ LLViewerInventoryCategory* category = *iter;
+ copy_folder_to_outbox(category, new_folder_id, top_level_folder);
+ }
+
+ // delete the folder if we have emptied it
+ //if (cat_array->empty() && item_array->empty())
+ //{
+ // remove_category(inventory_model, inv_cat->getUUID());
+ //}
+}
+
///----------------------------------------------------------------------------
/// LLInventoryCollectFunctor implementations
///----------------------------------------------------------------------------
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 2016b92666..7b452537f8 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -37,6 +37,9 @@
** MISCELLANEOUS GLOBAL FUNCTIONS
**/
+// Is this a parent folder to a worn item
+BOOL get_is_parent_to_worn_item(const LLUUID& id);
+
// Is this item or its baseitem is worn, attached, etc...
BOOL get_is_item_worn(const LLUUID& id);
@@ -71,6 +74,10 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s
// Generates a string containing the path to the item specified by item_id.
void append_path(const LLUUID& id, std::string& path);
+void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder);
+
+void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder);
+
/** Miscellaneous global functions
** **
*******************************************************************************/
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 21d5de9a5b..dc25689fa3 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2168,6 +2168,9 @@ void LLInventoryModel::registerCallbacks(LLMessageSystem* msg)
msg->setHandlerFuncFast(_PREHASH_RemoveInventoryFolder,
processRemoveInventoryFolder,
NULL);
+ msg->setHandlerFuncFast(_PREHASH_RemoveInventoryObjects,
+ processRemoveInventoryObjects,
+ NULL);
//msg->setHandlerFuncFast(_PREHASH_ExchangeCallingCard,
// processExchangeCallingcard,
// NULL);
@@ -2284,26 +2287,21 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
}
// static
-void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
+void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg, const char* msg_label)
{
- lldebugs << "LLInventoryModel::processRemoveInventoryItem()" << llendl;
- LLUUID agent_id, item_id;
- msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
- if(agent_id != gAgent.getID())
- {
- llwarns << "Got a RemoveInventoryItem for the wrong agent."
- << llendl;
- return;
- }
- S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
+ LLUUID item_id;
+ S32 count = msg->getNumberOfBlocksFast(msg_label);
+ lldebugs << "Message has " << count << " item blocks" << llendl;
uuid_vec_t item_ids;
update_map_t update;
for(S32 i = 0; i < count; ++i)
{
- msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_ItemID, item_id, i);
+ msg->getUUIDFast(msg_label, _PREHASH_ItemID, item_id, i);
+ lldebugs << "Checking for item-to-be-removed " << item_id << llendl;
LLViewerInventoryItem* itemp = gInventory.getItem(item_id);
if(itemp)
{
+ lldebugs << "Item will be removed " << item_id << llendl;
// we only bother with the delete and account if we found
// the item - this is usually a back-up for permissions,
// so frequently the item will already be gone.
@@ -2314,8 +2312,24 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
gInventory.accountForUpdate(update);
for(uuid_vec_t::iterator it = item_ids.begin(); it != item_ids.end(); ++it)
{
+ lldebugs << "Calling deleteObject " << *it << llendl;
gInventory.deleteObject(*it);
}
+}
+
+// static
+void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
+{
+ lldebugs << "LLInventoryModel::processRemoveInventoryItem()" << llendl;
+ LLUUID agent_id, item_id;
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
+ if(agent_id != gAgent.getID())
+ {
+ llwarns << "Got a RemoveInventoryItem for the wrong agent."
+ << llendl;
+ return;
+ }
+ LLInventoryModel::removeInventoryItem(agent_id, msg, _PREHASH_InventoryData);
gInventory.notifyObservers();
}
@@ -2380,18 +2394,10 @@ void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg,
}
// static
-void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
- void**)
+void LLInventoryModel::removeInventoryFolder(LLUUID agent_id,
+ LLMessageSystem* msg)
{
- lldebugs << "LLInventoryModel::processRemoveInventoryFolder()" << llendl;
- LLUUID agent_id, folder_id;
- msg->getUUIDFast(_PREHASH_FolderData, _PREHASH_AgentID, agent_id);
- if(agent_id != gAgent.getID())
- {
- llwarns << "Got a RemoveInventoryFolder for the wrong agent."
- << llendl;
- return;
- }
+ LLUUID folder_id;
uuid_vec_t folder_ids;
update_map_t update;
S32 count = msg->getNumberOfBlocksFast(_PREHASH_FolderData);
@@ -2410,6 +2416,42 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
{
gInventory.deleteObject(*it);
}
+}
+
+// static
+void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
+ void**)
+{
+ lldebugs << "LLInventoryModel::processRemoveInventoryFolder()" << llendl;
+ LLUUID agent_id, session_id;
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
+ if(agent_id != gAgent.getID())
+ {
+ llwarns << "Got a RemoveInventoryFolder for the wrong agent."
+ << llendl;
+ return;
+ }
+ LLInventoryModel::removeInventoryFolder( agent_id, msg );
+ gInventory.notifyObservers();
+}
+
+// static
+void LLInventoryModel::processRemoveInventoryObjects(LLMessageSystem* msg,
+ void**)
+{
+ lldebugs << "LLInventoryModel::processRemoveInventoryObjects()" << llendl;
+ LLUUID agent_id, session_id;
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
+ if(agent_id != gAgent.getID())
+ {
+ llwarns << "Got a RemoveInventoryObjects for the wrong agent."
+ << llendl;
+ return;
+ }
+ LLInventoryModel::removeInventoryFolder( agent_id, msg );
+ LLInventoryModel::removeInventoryItem( agent_id, msg, _PREHASH_ItemData );
gInventory.notifyObservers();
}
@@ -2486,9 +2528,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer<LLViewerInventoryCategory> tfolder = new LLViewerInventoryCategory(gAgent.getID());
tfolder->unpackMessage(msg, _PREHASH_FolderData, i);
- //llinfos << "unpaked folder '" << tfolder->getName() << "' ("
- // << tfolder->getUUID() << ") in " << tfolder->getParentUUID()
- // << llendl;
+ llinfos << "unpacked folder '" << tfolder->getName() << "' ("
+ << tfolder->getUUID() << ") in " << tfolder->getParentUUID()
+ << llendl;
if(tfolder->getUUID().notNull())
{
folders.push_back(tfolder);
@@ -2528,8 +2570,8 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
{
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
titem->unpackMessage(msg, _PREHASH_ItemData, i);
- //llinfos << "unpaked item '" << titem->getName() << "' in "
- // << titem->getParentUUID() << llendl;
+ llinfos << "unpaked item '" << titem->getName() << "' in "
+ << titem->getParentUUID() << llendl;
U32 callback_id;
msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id);
if(titem->getUUID().notNull())
@@ -2837,40 +2879,62 @@ BOOL LLInventoryModel::getIsFirstTimeInViewer2()
return sFirstTimeInViewer2;
}
-static LLInventoryModel::item_array_t::iterator find_item_iter_by_uuid(LLInventoryModel::item_array_t& items, const LLUUID& id)
+LLInventoryModel::item_array_t::iterator LLInventoryModel::findItemIterByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
{
- LLInventoryModel::item_array_t::iterator result = items.end();
+ LLInventoryModel::item_array_t::iterator curr_item = items.begin();
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
+ while (curr_item != items.end())
{
- if ((*i)->getUUID() == id)
+ if ((*curr_item)->getUUID() == id)
{
- result = i;
break;
}
+ ++curr_item;
}
- return result;
+ return curr_item;
}
// static
// * @param[in, out] items - vector with items to be updated. It should be sorted in a right way
// * before calling this method.
// * @param src_item_id - LLUUID of inventory item to be moved in new position
-// * @param dest_item_id - LLUUID of inventory item before which source item should be placed.
-void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id)
+// * @param dest_item_id - LLUUID of inventory item before (or after) which source item should
+// * be placed.
+// * @param insert_before - bool indicating if src_item_id should be placed before or after
+// * dest_item_id. Default is true.
+void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id, bool insert_before)
{
- LLInventoryModel::item_array_t::iterator it_src = find_item_iter_by_uuid(items, src_item_id);
- LLInventoryModel::item_array_t::iterator it_dest = find_item_iter_by_uuid(items, dest_item_id);
+ LLInventoryModel::item_array_t::iterator it_src = findItemIterByUUID(items, src_item_id);
+ LLInventoryModel::item_array_t::iterator it_dest = findItemIterByUUID(items, dest_item_id);
- if (it_src == items.end() || it_dest == items.end()) return;
+ // If one of the passed UUID is not in the item list, bail out
+ if ((it_src == items.end()) || (it_dest == items.end()))
+ return;
+ // Erase the source element from the list, keep a copy before erasing.
LLViewerInventoryItem* src_item = *it_src;
items.erase(it_src);
- // target iterator can not be valid because the container was changed, so update it.
- it_dest = find_item_iter_by_uuid(items, dest_item_id);
- items.insert(it_dest, src_item);
+ // Note: Target iterator is not valid anymore because the container was changed, so update it.
+ it_dest = findItemIterByUUID(items, dest_item_id);
+
+ // Go to the next element if one wishes to insert after the dest element
+ if (!insert_before)
+ {
+ ++it_dest;
+ }
+
+ // Reinsert the source item in the right place
+ if (it_dest != items.end())
+ {
+ items.insert(it_dest, src_item);
+ }
+ else
+ {
+ // Append to the list if it_dest reached the end
+ items.push_back(src_item);
+ }
}
//* @param[in] items vector of items in order to be saved.
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 15da09990f..340c1b0c22 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -332,11 +332,16 @@ protected:
//--------------------------------------------------------------------
public:
// Changes items order by insertion of the item identified by src_item_id
- // before the item identified by dest_item_id. Both items must exist in items array.
- // Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id.
+ // before (or after) the item identified by dest_item_id. Both items must exist in items array.
+ // Sorting is stored after method is finished. Only src_item_id is moved before (or after) dest_item_id.
+ // The parameter "insert_before" controls on which side of dest_item_id src_item_id gets rensinserted.
static void updateItemsOrder(LLInventoryModel::item_array_t& items,
const LLUUID& src_item_id,
- const LLUUID& dest_item_id);
+ const LLUUID& dest_item_id,
+ bool insert_before = true);
+ // Gets an iterator on an item vector knowing only the item UUID.
+ // Returns end() of the vector if not found.
+ static LLInventoryModel::item_array_t::iterator findItemIterByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id);
// Saves current order of the passed items using inventory item sort field.
// Resets 'items' sort fields and saves them on server.
@@ -406,7 +411,7 @@ public:
// Return (yes/no/maybe) child status of category children.
EHasChildren categoryHasChildren(const LLUUID& cat_id) const;
- // Returns true iff category version is known and theoretical
+ // Returns true if category version is known and theoretical
// descendents == actual descendents.
bool isCategoryComplete(const LLUUID& cat_id) const;
@@ -492,9 +497,12 @@ protected:
//--------------------------------------------------------------------
public:
static void processUpdateCreateInventoryItem(LLMessageSystem* msg, void**);
+ static void removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg, const char* msg_label);
static void processRemoveInventoryItem(LLMessageSystem* msg, void**);
static void processUpdateInventoryFolder(LLMessageSystem* msg, void**);
+ static void removeInventoryFolder(LLUUID agent_id, LLMessageSystem* msg);
static void processRemoveInventoryFolder(LLMessageSystem* msg, void**);
+ static void processRemoveInventoryObjects(LLMessageSystem* msg, void**);
static void processSaveAssetIntoInventory(LLMessageSystem* msg, void**);
static void processBulkUpdateInventory(LLMessageSystem* msg, void**);
static void processInventoryDescendents(LLMessageSystem* msg, void**);
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index afaf660cb7..91fdd67806 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -105,7 +105,7 @@ BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const
void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive)
{
- if (!mAllFoldersFetched)
+ if (!mAllFoldersFetched || cat_id.notNull())
{
LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL;
@@ -211,7 +211,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
// Double timeouts on failure.
mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f);
mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f);
- llinfos << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ lldebugs << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
// fetch is no longer considered "timely" although we will wait for full time-out.
mTimelyFetchPending = FALSE;
}
@@ -280,7 +280,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
// Shrink timeouts based on success.
mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f);
mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f);
- //llinfos << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
}
mTimelyFetchPending = FALSE;
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index ceba4a0191..9db175ec2e 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -202,6 +202,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
void fetch_items_from_llsd(const LLSD& items_llsd)
{
if (!items_llsd.size() || gDisconnected) return;
+
LLSD body;
body[0]["cap_name"] = "FetchInventory2";
body[1]["cap_name"] = "FetchLib2";
@@ -212,7 +213,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
body[0]["items"].append(items_llsd[i]);
continue;
}
- if (items_llsd[i]["owner_id"].asString() == ALEXANDRIA_LINDEN_ID.asString())
+ else if (items_llsd[i]["owner_id"].asString() == ALEXANDRIA_LINDEN_ID.asString())
{
body[1]["items"].append(items_llsd[i]);
continue;
@@ -221,19 +222,23 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
for (S32 i=0; i<body.size(); i++)
{
- if(!gAgent.getRegion())
+ if (!gAgent.getRegion())
{
- llwarns<<"Agent's region is null"<<llendl;
+ llwarns << "Agent's region is null" << llendl;
break;
}
- if (0 >= body[i].size()) continue;
- std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString());
+ if (0 == body[i]["items"].size()) {
+ lldebugs << "Skipping body with no items to fetch" << llendl;
+ continue;
+ }
+
+ std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString());
if (!url.empty())
{
body[i]["agent_id"] = gAgent.getID();
LLHTTPClient::post(url, body[i], new LLInventoryModel::fetchInventoryResponder(body[i]));
- break;
+ continue;
}
LLMessageSystem* msg = gMessageSystem;
@@ -303,7 +308,7 @@ void LLInventoryFetchItemsObserver::startFetch()
// It's incomplete, so put it on the incomplete container, and
// pack this on the message.
mIncomplete.push_back(*it);
-
+
// Prepare the data to fetch
LLSD item_entry;
item_entry["owner_id"] = owner_id;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 702e8d5a1f..d06374d232 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -35,6 +35,7 @@
#include "llavataractions.h"
#include "llfloaterinventory.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llimfloater.h"
#include "llimview.h"
@@ -42,7 +43,6 @@
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llsidepanelinventory.h"
-#include "llsidetray.h"
#include "llviewerattachmenu.h"
#include "llviewerfoldertype.h"
#include "llvoavatarself.h"
@@ -129,6 +129,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mScroller(NULL),
mSortOrderSetting(p.sort_order_setting),
mInventory(p.inventory),
+ mAcceptsDragAndDrop(p.accepts_drag_and_drop),
mAllowMultiSelect(p.allow_multi_select),
mShowItemLinkOverlays(p.show_item_link_overlays),
mShowLoadStatus(p.show_load_status),
@@ -163,49 +164,6 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
{
root_id = gInventory.getLibraryRootFolderID();
}
- // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
- else if (preferred_type == LLFolderType::FT_INBOX)
- {
- LLInventoryModel::cat_array_t* cats;
- LLInventoryModel::item_array_t* items;
-
- gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
-
- if (cats)
- {
- for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
- {
- LLInventoryCategory* cat = *cat_it;
-
- if (cat->getName() == "Received Items")
- {
- root_id = cat->getUUID();
- }
- }
- }
- }
- // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
- else if (preferred_type == LLFolderType::FT_OUTBOX)
- {
- LLInventoryModel::cat_array_t* cats;
- LLInventoryModel::item_array_t* items;
-
- gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
-
- if (cats)
- {
- for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
- {
- LLInventoryCategory* cat = *cat_it;
-
- if (cat->getName() == "Merchant Outbox")
- {
- root_id = cat->getUUID();
- }
- }
- }
- }
- // leslie -- end temporary HACK
else
{
root_id = (preferred_type != LLFolderType::FT_NONE)
@@ -277,11 +235,17 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
setSortOrder(gSavedSettings.getU32(DEFAULT_SORT_ORDER));
}
- mFolderRoot->setSortOrder(getFilter()->getSortOrder());
// hide inbox
getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_INBOX));
+ getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_OUTBOX));
+ // set the filter for the empty folder if the debug setting is on
+ if (gSavedSettings.getBOOL("DebugHideEmptySystemFolders"))
+ {
+ getFilter()->setFilterEmptySystemFolders();
+ }
+
// Initialize base class params.
LLPanel::initFromParams(params);
}
@@ -389,6 +353,10 @@ U32 LLInventoryPanel::getSortOrder() const
return mFolderRoot->getSortOrder();
}
+void LLInventoryPanel::requestSort()
+{
+ mFolderRoot->requestSort();
+}
void LLInventoryPanel::setSinceLogoff(BOOL sl)
{
@@ -735,7 +703,10 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
if (new_listener)
{
LLFolderViewFolder* folderp = createFolderViewFolder(new_listener);
- folderp->setItemSortOrder(mFolderRoot->getSortOrder());
+ if (folderp)
+ {
+ folderp->setItemSortOrder(mFolderRoot->getSortOrder());
+ }
itemp = folderp;
}
}
@@ -812,9 +783,7 @@ void LLInventoryPanel::openStartFolderOrMyInventory()
&& fchild->getListener()
&& fchild->getListener()->getUUID() == gInventory.getRootFolderID())
{
- const std::string& child_name = child->getName();
- mFolderRoot->openFolder(child_name);
- mFolderRoot->clearSelection(); // No need to keep it selected though!
+ fchild->setOpen(TRUE);
break;
}
}
@@ -865,19 +834,24 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ BOOL handled = FALSE;
- // If folder view is empty the (x, y) point won't be in its rect
- // so the handler must be called explicitly.
- // but only if was not handled before. See EXT-6746.
- if (!handled && !mFolderRoot->hasVisibleChildren())
+ if (mAcceptsDragAndDrop)
{
- handled = mFolderRoot->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- }
+ handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- if (handled)
- {
- mFolderRoot->setDragAndDropThisFrame();
+ // If folder view is empty the (x, y) point won't be in its rect
+ // so the handler must be called explicitly.
+ // but only if was not handled before. See EXT-6746.
+ if (!handled && !mFolderRoot->hasVisibleChildren())
+ {
+ handled = mFolderRoot->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ }
+
+ if (handled)
+ {
+ mFolderRoot->setDragAndDropThisFrame();
+ }
}
return handled;
@@ -902,6 +876,18 @@ void LLInventoryPanel::onFocusReceived()
LLPanel::onFocusReceived();
}
+bool LLInventoryPanel::addBadge(LLBadge * badge)
+{
+ bool badge_added = false;
+
+ if (acceptsBadge())
+ {
+ badge_added = badge->addToView(mFolderRoot);
+ }
+
+ return badge_added;
+}
+
void LLInventoryPanel::openAllFolders()
{
mFolderRoot->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
@@ -1100,10 +1086,9 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data)
BOOL is_inventorysp_active()
{
- if (!LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")) return FALSE;
- LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
- if (!inventorySP) return FALSE;
- return inventorySP->isMainInventoryPanelActive();
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return FALSE;
+ return sidepanel_inventory->isMainInventoryPanelActive();
}
// static
@@ -1113,34 +1098,24 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
LLInventoryPanel* res = NULL;
LLFloater* active_inv_floaterp = NULL;
- // A. If the inventory side panel is open, use that preferably.
- if (is_inventorysp_active())
+ LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
+ if (!floater_inventory)
{
- LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
- if (inventorySP)
- {
- return inventorySP->getActivePanel();
- }
+ llwarns << "Could not find My Inventory floater" << llendl;
+ return FALSE;
}
- // or if it is in floater undocked from sidetray get it and remember z order of floater to later compare it
- // with other inventory floaters order.
- else if (!LLSideTray::getInstance()->isTabAttached("sidebar_inventory"))
+
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+
+ // A. If the inventory side panel floater is open, use that preferably.
+ if (is_inventorysp_active())
{
- LLSidepanelInventory *inventorySP =
- dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
- LLFloater* inv_floater = LLFloaterReg::findInstance("side_bar_tab", LLSD("sidebar_inventory"));
- if (inventorySP && inv_floater)
- {
- res = inventorySP->getActivePanel();
- z_min = gFloaterView->getZOrder(inv_floater);
- active_inv_floaterp = inv_floater;
- }
- else
- {
- llwarns << "Inventory tab is detached from sidetray, but either panel or floater were not found!" << llendl;
- }
+ // Get the floater's z order to compare it to other inventory floaters' order later.
+ res = sidepanel_inventory->getActivePanel();
+ z_min = gFloaterView->getZOrder(floater_inventory);
+ active_inv_floaterp = floater_inventory;
}
-
+
// B. Iterate through the inventory floaters and return whichever is on top.
LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
@@ -1162,24 +1137,78 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
{
// Make sure the floater is not minimized (STORM-438).
if (active_inv_floaterp && active_inv_floaterp->isMinimized())
+ {
active_inv_floaterp->setMinimized(FALSE);
+ }
+ }
+ else if (auto_open)
+ {
+ floater_inventory->openFloater();
- return res;
+ res = sidepanel_inventory->getActivePanel();
}
-
- // C. If no panels are open and we don't want to force open a panel, then just abort out.
- if (!auto_open) return NULL;
-
- // D. Open the inventory side panel and use that.
- LLSD key;
- LLSidepanelInventory *sidepanel_inventory =
- dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key));
- if (sidepanel_inventory)
+
+ return res;
+}
+
+//static
+void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id)
+{
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
+
+ if (active_panel)
{
- return sidepanel_inventory->getActivePanel();
- }
+ LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL;
+
+ LLViewerInventoryItem * item = gInventory.getItem(obj_id);
+ LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id);
+
+ bool in_inbox = false;
+ bool in_outbox = false;
+
+ LLViewerInventoryCategory * parent_cat = NULL;
+
+ if (item)
+ {
+ parent_cat = gInventory.getCategory(item->getParentUUID());
+ }
+ else if (cat)
+ {
+ parent_cat = gInventory.getCategory(cat->getParentUUID());
+ }
+
+ if (parent_cat)
+ {
+ in_inbox = (LLFolderType::FT_INBOX == parent_cat->getPreferredType());
+ in_outbox = (LLFolderType::FT_OUTBOX == parent_cat->getPreferredType());
+ }
+
+ if (in_inbox || in_outbox)
+ {
+ LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ LLInventoryPanel * inventory_panel = NULL;
+
+ if (in_inbox)
+ {
+ sidepanel_inventory->openInbox();
+ inventory_panel = sidepanel_inventory->getInboxPanel();
+ }
+ else
+ {
+ sidepanel_inventory->openOutbox();
+ inventory_panel = sidepanel_inventory->getOutboxPanel();
+ }
- return NULL;
+ if (inventory_panel)
+ {
+ inventory_panel->setSelection(obj_id, TAKE_FOCUS_YES);
+ }
+ }
+ else
+ {
+ active_panel->setSelection(obj_id, TAKE_FOCUS_YES);
+ }
+ }
}
void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type)
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index a4287a438e..2a24327115 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -86,6 +86,7 @@ public:
Optional<bool> use_label_suffix;
Optional<bool> show_load_status;
Optional<LLScrollContainer::Params> scroll;
+ Optional<bool> accepts_drag_and_drop;
Params()
: sort_order_setting("sort_order_setting"),
@@ -96,7 +97,8 @@ public:
start_folder("start_folder"),
use_label_suffix("use_label_suffix", true),
show_load_status("show_load_status"),
- scroll("scroll")
+ scroll("scroll"),
+ accepts_drag_and_drop("accepts_drag_and_drop")
{}
};
@@ -125,6 +127,9 @@ public:
/*virtual*/ void onFocusLost();
/*virtual*/ void onFocusReceived();
+ // LLBadgeHolder methods
+ bool addBadge(LLBadge * badge);
+
// Call this method to set the selection.
void openAllFolders();
void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);
@@ -170,6 +175,8 @@ public:
// Find whichever inventory panel is active / on top.
// "Auto_open" determines if we open an inventory panel if none are open.
static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);
+
+ static void openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id);
protected:
void openStartFolderOrMyInventory(); // open the first level of inventory
@@ -178,6 +185,7 @@ protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
LLInvPanelComplObserver* mCompletionObserver;
+ BOOL mAcceptsDragAndDrop;
BOOL mAllowMultiSelect;
BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons
BOOL mShowLoadStatus;
@@ -205,6 +213,8 @@ public:
void setSortOrder(U32 order);
U32 getSortOrder() const;
+ void requestSort();
+
private:
std::string mSortOrderSetting;
diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h
index 93e2e7128b..8d76aa9531 100644
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -57,7 +57,7 @@ public:
Params()
: quadrant("quadrant", JQ_ORIGIN)
{
- label = "";
+ changeDefault(label, "");
}
};
LLJoystick(const Params&);
@@ -137,7 +137,7 @@ public:
{
Params()
{
- held_down_delay.seconds(0.0);
+ changeDefault(held_down_delay.seconds, 0.0);
}
};
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index f2aec20611..6625a194fb 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -413,7 +413,7 @@ void LLLandmarkActions::copySLURLtoClipboard(const LLUUID& landmarkInventoryItem
void copy_slurl_to_clipboard_callback(const std::string& slurl)
{
- gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(slurl));
+ gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl));
LLSD args;
args["SLURL"] = slurl;
LLNotificationsUtil::add("CopySLURL", args);
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 1c8f6b6c98..025181ead5 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -44,11 +44,11 @@
// newview includes
#include "llagent.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventoryobserver.h"
#include "lllandmarkactions.h"
#include "lllandmarklist.h"
#include "llteleporthistory.h"
-#include "llsidetray.h"
#include "llslurl.h"
#include "llstatusbar.h" // getHealth()
#include "lltrans.h"
@@ -600,7 +600,7 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent
void LLLocationInputCtrl::onInfoButtonClicked()
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
}
void LLLocationInputCtrl::onForSaleButtonClicked()
@@ -618,11 +618,11 @@ void LLLocationInputCtrl::onAddLandmarkButtonClicked()
key["type"] = "landmark";
key["id"] = landmark->getUUID();
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
}
else
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
}
@@ -1087,12 +1087,12 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
if(!landmark)
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
else
{
- LLSideTray::getInstance()->showPanel("panel_places",
- LLSD().with("type", "landmark").with("id",landmark->getUUID()));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
+
}
}
else if (item == "cut")
diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp
index 48be251611..9b4f146332 100644
--- a/indra/newview/llloginhandler.cpp
+++ b/indra/newview/llloginhandler.cpp
@@ -30,13 +30,13 @@
// viewer includes
#include "llsecapi.h"
-#include "lllogininstance.h" // to check if logged in yet
-#include "llpanellogin.h" // save_password_to_disk()
+#include "lllogininstance.h" // to check if logged in yet
+#include "llpanellogin.h"
#include "llstartup.h" // getStartupState()
#include "llslurl.h"
#include "llviewercontrol.h" // gSavedSettings
#include "llviewernetwork.h" // EGridInfo
-#include "llviewerwindow.h" // getWindow()
+#include "llviewerwindow.h" // getWindow()
// library includes
#include "llmd5.h"
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 00de6a86e1..419641d23c 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -561,14 +561,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
//send this info to login.cgi for stats gathering
//since viewerstats isn't reliable enough
- if (gSavedSettings.getString("SessionSettingsFile").empty())
- {
- requested_options.append("advanced-mode");
- }
- else
- {
- requested_options.append("basic-mode");
- }
+ requested_options.append("advanced-mode");
#endif
requested_options.append("max-agent-groups");
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 85e0043651..6e0f360cbc 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -372,14 +372,14 @@ void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
//LLVector3 center_agent = LLSelectMgr::getInstance()->getBBoxOfSelection().getCenterAgent();
LLVector3 center_agent = getPivotPoint();
- glPushMatrix();
+ gGL.pushMatrix();
{
- glTranslatef(center_agent.mV[VX], center_agent.mV[VY], center_agent.mV[VZ]);
+ gGL.translatef(center_agent.mV[VX], center_agent.mV[VY], center_agent.mV[VZ]);
F32 angle_radians, x, y, z;
grid_rot.getAngleAxis(&angle_radians, &x, &y, &z);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
F32 region_size = LLWorld::getInstance()->getRegionWidthInMeters();
@@ -416,7 +416,7 @@ void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
}
LLUI::setLineWidth(1.0f);
}
- glPopMatrix();
+ gGL.popMatrix();
}
void LLManip::renderXYZ(const LLVector3 &vec)
@@ -466,11 +466,11 @@ void LLManip::renderXYZ(const LLVector3 &vec)
feedback_string = llformat("X: %.3f", vec.mV[VX]);
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -102.f, (F32)vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f), FALSE);
- glColor3f(0.5f, 1.f, 0.5f);
+ gGL.diffuseColor3f(0.5f, 1.f, 0.5f);
feedback_string = llformat("Y: %.3f", vec.mV[VY]);
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -27.f, (F32)vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f), FALSE);
- glColor3f(0.5f, 0.5f, 1.f);
+ gGL.diffuseColor3f(0.5f, 0.5f, 1.f);
feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 48.f, (F32)vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f), FALSE);
}
@@ -481,8 +481,8 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons
const LLFontGL* big_fontp = LLFontGL::getFontSansSerif();
BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
LLVector3 render_pos = pos;
if (hud_selection)
{
@@ -490,7 +490,7 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons
F32 inv_zoom_amt = 1.f / zoom_amt;
// scale text back up to counter-act zoom level
render_pos = pos * zoom_amt;
- glScalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
+ gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
}
// render shadow first
@@ -501,7 +501,7 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons
gViewerWindow->setup3DViewport();
hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(text), 3.f, color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
- glPopMatrix();
+ gGL.popMatrix();
}
void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string& suffix, const LLColor4 &color)
@@ -539,8 +539,8 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
}
BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD;
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
LLVector3 render_pos = pos;
if (hud_selection)
{
@@ -548,7 +548,7 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
F32 inv_zoom_amt = 1.f / zoom_amt;
// scale text back up to counter-act zoom level
render_pos = pos * zoom_amt;
- glScalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
+ gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt);
}
LLColor4 shadow_color = LLColor4::black;
@@ -573,7 +573,7 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
gViewerWindow->setup3DViewport();
hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(val_string), 3.f, color, hud_selection);
}
- glPopMatrix();
+ gGL.popMatrix();
}
LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass)
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 6ee095475f..a8da94f75e 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -53,6 +53,7 @@
#include "llviewercamera.h"
#include "llviewerobject.h"
#include "llviewerobject.h"
+#include "llviewershadermgr.h"
#include "llviewerwindow.h"
#include "llworld.h"
#include "pipeline.h"
@@ -113,7 +114,7 @@ void LLManipRotate::handleSelect()
void LLManipRotate::render()
{
LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
LLGLDepthTest gls_depth(GL_TRUE);
LLGLEnable gl_blend(GL_BLEND);
LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
@@ -130,12 +131,12 @@ void LLManipRotate::render()
return;
}
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
F32 zoom = gAgentCamera.mHUDCurZoom;
- glScalef(zoom, zoom, zoom);
+ gGL.scalef(zoom, zoom, zoom);
}
@@ -145,8 +146,9 @@ void LLManipRotate::render()
LLColor4 highlight_inside( 0.7f, 0.7f, 0.f, 0.5f );
F32 width_meters = WIDTH_PIXELS * mRadiusMeters / RADIUS_PIXELS;
- glPushMatrix();
+ gGL.pushMatrix();
{
+
// are we in the middle of a constrained drag?
if (mManipPart >= LL_ROT_X && mManipPart <= LL_ROT_Z)
{
@@ -154,13 +156,18 @@ void LLManipRotate::render()
}
else
{
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.bind();
+ }
+
LLGLEnable cull_face(GL_CULL_FACE);
LLGLDepthTest gls_depth(GL_FALSE);
- glPushMatrix();
+ gGL.pushMatrix();
{
// Draw "sphere" (intersection of sphere with tangent cone that has apex at camera)
- glTranslatef( mCenterToProfilePlane.mV[VX], mCenterToProfilePlane.mV[VY], mCenterToProfilePlane.mV[VZ] );
- glTranslatef( center.mV[VX], center.mV[VY], center.mV[VZ] );
+ gGL.translatef( mCenterToProfilePlane.mV[VX], mCenterToProfilePlane.mV[VY], mCenterToProfilePlane.mV[VZ] );
+ gGL.translatef( center.mV[VX], center.mV[VY], center.mV[VZ] );
// Inverse change of basis vectors
LLVector3 forward = mCenterToCamNorm;
@@ -177,35 +184,41 @@ void LLManipRotate::render()
LLMatrix4 mat;
mat.initRows(a, b, c, LLVector4(0.f, 0.f, 0.f, 1.f));
- glMultMatrixf( &mat.mMatrix[0][0] );
+ gGL.multMatrix( &mat.mMatrix[0][0] );
- glRotatef( -90, 0.f, 1.f, 0.f);
+ gGL.rotatef( -90, 0.f, 1.f, 0.f);
LLColor4 color;
if (mManipPart == LL_ROT_ROLL || mHighlightedPart == LL_ROT_ROLL)
{
color.setVec(0.8f, 0.8f, 0.8f, 0.8f);
- glScalef(mManipulatorScales.mV[VW], mManipulatorScales.mV[VW], mManipulatorScales.mV[VW]);
+ gGL.scalef(mManipulatorScales.mV[VW], mManipulatorScales.mV[VW], mManipulatorScales.mV[VW]);
}
else
{
color.setVec( 0.7f, 0.7f, 0.7f, 0.6f );
}
+ gGL.diffuseColor4fv(color.mV);
gl_washer_2d(mRadiusMeters + width_meters, mRadiusMeters, CIRCLE_STEPS, color, color);
if (mManipPart == LL_NO_PART)
{
gGL.color4f( 0.7f, 0.7f, 0.7f, 0.3f );
+ gGL.diffuseColor4f(0.7f, 0.7f, 0.7f, 0.3f);
gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE );
}
- GLdouble plane_eqn[] = { 0, 0, 1, 0 };
- glClipPlane( GL_CLIP_PLANE0, plane_eqn );
+ gGL.flush();
}
- glPopMatrix();
- }
+ gGL.popMatrix();
- glTranslatef( center.mV[VX], center.mV[VY], center.mV[VZ] );
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+ }
+
+ gGL.translatef( center.mV[VX], center.mV[VY], center.mV[VZ] );
LLQuaternion rot;
F32 angle_radians, x, y, z;
@@ -217,41 +230,46 @@ void LLManipRotate::render()
LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale);
grid_rotation.getAngleAxis(&angle_radians, &x, &y, &z);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.bind();
+ }
+
if (mManipPart == LL_ROT_Z)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
- glPushMatrix();
+ gGL.pushMatrix();
{
// selected part
- glScalef(mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ]);
+ gGL.scalef(mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ]);
renderActiveRing( mRadiusMeters, width_meters, LLColor4( 0.f, 0.f, 1.f, 1.f) , LLColor4( 0.f, 0.f, 1.f, 0.3f ));
}
- glPopMatrix();
+ gGL.popMatrix();
}
else if (mManipPart == LL_ROT_Y)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, SELECTED_MANIPULATOR_SCALE, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
- glPushMatrix();
+ gGL.pushMatrix();
{
- glRotatef( 90.f, 1.f, 0.f, 0.f );
- glScalef(mManipulatorScales.mV[VY], mManipulatorScales.mV[VY], mManipulatorScales.mV[VY]);
+ gGL.rotatef( 90.f, 1.f, 0.f, 0.f );
+ gGL.scalef(mManipulatorScales.mV[VY], mManipulatorScales.mV[VY], mManipulatorScales.mV[VY]);
renderActiveRing( mRadiusMeters, width_meters, LLColor4( 0.f, 1.f, 0.f, 1.f), LLColor4( 0.f, 1.f, 0.f, 0.3f));
}
- glPopMatrix();
+ gGL.popMatrix();
}
else if (mManipPart == LL_ROT_X)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(SELECTED_MANIPULATOR_SCALE, 1.f, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
- glPushMatrix();
+ gGL.pushMatrix();
{
- glRotatef( 90.f, 0.f, 1.f, 0.f );
- glScalef(mManipulatorScales.mV[VX], mManipulatorScales.mV[VX], mManipulatorScales.mV[VX]);
+ gGL.rotatef( 90.f, 0.f, 1.f, 0.f );
+ gGL.scalef(mManipulatorScales.mV[VX], mManipulatorScales.mV[VX], mManipulatorScales.mV[VX]);
renderActiveRing( mRadiusMeters, width_meters, LLColor4( 1.f, 0.f, 0.f, 1.f), LLColor4( 1.f, 0.f, 0.f, 0.3f));
}
- glPopMatrix();
+ gGL.popMatrix();
}
else if (mManipPart == LL_ROT_ROLL)
{
@@ -271,12 +289,13 @@ void LLManipRotate::render()
// First pass: centers. Second pass: sides.
for( S32 i=0; i<2; i++ )
{
- glPushMatrix();
+
+ gGL.pushMatrix();
{
if (mHighlightedPart == LL_ROT_Z)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
- glScalef(mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ]);
+ gGL.scalef(mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ], mManipulatorScales.mV[VZ]);
// hovering over part
gl_ring( mRadiusMeters, width_meters, LLColor4( 0.f, 0.f, 1.f, 1.f ), LLColor4( 0.f, 0.f, 1.f, 0.5f ), CIRCLE_STEPS, i);
}
@@ -286,15 +305,15 @@ void LLManipRotate::render()
gl_ring( mRadiusMeters, width_meters, LLColor4( 0.f, 0.f, 0.8f, 0.8f ), LLColor4( 0.f, 0.f, 0.8f, 0.4f ), CIRCLE_STEPS, i);
}
}
- glPopMatrix();
-
- glPushMatrix();
+ gGL.popMatrix();
+
+ gGL.pushMatrix();
{
- glRotatef( 90.f, 1.f, 0.f, 0.f );
+ gGL.rotatef( 90.f, 1.f, 0.f, 0.f );
if (mHighlightedPart == LL_ROT_Y)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, SELECTED_MANIPULATOR_SCALE, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
- glScalef(mManipulatorScales.mV[VY], mManipulatorScales.mV[VY], mManipulatorScales.mV[VY]);
+ gGL.scalef(mManipulatorScales.mV[VY], mManipulatorScales.mV[VY], mManipulatorScales.mV[VY]);
// hovering over part
gl_ring( mRadiusMeters, width_meters, LLColor4( 0.f, 1.f, 0.f, 1.f ), LLColor4( 0.f, 1.f, 0.f, 0.5f ), CIRCLE_STEPS, i);
}
@@ -304,15 +323,15 @@ void LLManipRotate::render()
gl_ring( mRadiusMeters, width_meters, LLColor4( 0.f, 0.8f, 0.f, 0.8f ), LLColor4( 0.f, 0.8f, 0.f, 0.4f ), CIRCLE_STEPS, i);
}
}
- glPopMatrix();
+ gGL.popMatrix();
- glPushMatrix();
+ gGL.pushMatrix();
{
- glRotatef( 90.f, 0.f, 1.f, 0.f );
+ gGL.rotatef( 90.f, 0.f, 1.f, 0.f );
if (mHighlightedPart == LL_ROT_X)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(SELECTED_MANIPULATOR_SCALE, 1.f, 1.f, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
- glScalef(mManipulatorScales.mV[VX], mManipulatorScales.mV[VX], mManipulatorScales.mV[VX]);
+ gGL.scalef(mManipulatorScales.mV[VX], mManipulatorScales.mV[VX], mManipulatorScales.mV[VX]);
// hovering over part
gl_ring( mRadiusMeters, width_meters, LLColor4( 1.f, 0.f, 0.f, 1.f ), LLColor4( 1.f, 0.f, 0.f, 0.5f ), CIRCLE_STEPS, i);
@@ -323,17 +342,26 @@ void LLManipRotate::render()
gl_ring( mRadiusMeters, width_meters, LLColor4( 0.8f, 0.f, 0.f, 0.8f ), LLColor4( 0.8f, 0.f, 0.f, 0.4f ), CIRCLE_STEPS, i);
}
}
- glPopMatrix();
+ gGL.popMatrix();
if (mHighlightedPart == LL_ROT_ROLL)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, SELECTED_MANIPULATOR_SCALE), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
}
+
}
+
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
}
- glPopMatrix();
- glPopMatrix();
+ gGL.popMatrix();
+ gGL.popMatrix();
+
LLVector3 euler_angles;
LLQuaternion object_rot = first_object->getRotationEdit();
@@ -796,14 +824,14 @@ void LLManipRotate::renderSnapGuides()
for (S32 pass = 0; pass < 3; pass++)
{
// render snap guide ring
- glPushMatrix();
+ gGL.pushMatrix();
LLQuaternion snap_guide_rot;
F32 angle_radians, x, y, z;
snap_guide_rot.shortestArc(LLVector3::z_axis, getConstraintAxis());
snap_guide_rot.getAngleAxis(&angle_radians, &x, &y, &z);
- glTranslatef(center.mV[VX], center.mV[VY], center.mV[VZ]);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.translatef(center.mV[VX], center.mV[VY], center.mV[VZ]);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
LLColor4 line_color = setupSnapGuideRenderPass(pass);
@@ -826,7 +854,7 @@ void LLManipRotate::renderSnapGuides()
{
gl_circle_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, FALSE);
}
- glPopMatrix();
+ gGL.popMatrix();
for (S32 i = 0; i < 64; i++)
{
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 4eb94dfb8e..f6df4cdfbf 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -217,12 +217,12 @@ void LLManipScale::render()
if( canAffectSelection() )
{
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
F32 zoom = gAgentCamera.mHUDCurZoom;
- glScalef(zoom, zoom, zoom);
+ gGL.scalef(zoom, zoom, zoom);
}
////////////////////////////////////////////////////////////////////////
@@ -274,14 +274,14 @@ void LLManipScale::render()
LLVector3 pos_agent = bbox.getPositionAgent();
LLQuaternion rot = bbox.getRotation();
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
{
- glTranslatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ]);
+ gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ]);
F32 angle_radians, x, y, z;
rot.getAngleAxis(&angle_radians, &x, &y, &z);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
{
@@ -303,13 +303,13 @@ void LLManipScale::render()
glPolygonOffset( 0.f, 0.f);
}
}
- glPopMatrix();
+ gGL.popMatrix();
if (mManipPart != LL_NO_PART)
{
renderSnapGuides(bbox);
}
- glPopMatrix();
+ gGL.popMatrix();
renderXYZ(bbox.getExtentLocal());
}
@@ -719,17 +719,17 @@ void LLManipScale::renderEdges( const LLBBox& bbox )
LLVector3 direction = edgeToUnitVector( part );
LLVector3 center_to_edge = unitVectorToLocalBBoxExtent( direction, bbox );
- glPushMatrix();
+ gGL.pushMatrix();
{
- glTranslatef( center_to_edge.mV[0], center_to_edge.mV[1], center_to_edge.mV[2] );
+ gGL.translatef( center_to_edge.mV[0], center_to_edge.mV[1], center_to_edge.mV[2] );
conditionalHighlight( part );
- glScalef(
+ gGL.scalef(
direction.mV[0] ? edge_width : extent.mV[VX],
direction.mV[1] ? edge_width : extent.mV[VY],
direction.mV[2] ? edge_width : extent.mV[VZ] );
gBox.render();
}
- glPopMatrix();
+ gGL.popMatrix();
}
}
@@ -766,13 +766,13 @@ void LLManipScale::renderBoxHandle( F32 x, F32 y, F32 z )
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest gls_depth(GL_FALSE);
- glPushMatrix();
+ gGL.pushMatrix();
{
- glTranslatef( x, y, z );
- glScalef( mScaledBoxHandleSize, mScaledBoxHandleSize, mScaledBoxHandleSize );
+ gGL.translatef( x, y, z );
+ gGL.scalef( mScaledBoxHandleSize, mScaledBoxHandleSize, mScaledBoxHandleSize );
gBox.render();
}
- glPopMatrix();
+ gGL.popMatrix();
}
@@ -788,16 +788,16 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en
LLVector3 delta = end - offset_start;
LLVector3 pos = offset_start + 0.5f * delta;
- glPushMatrix();
+ gGL.pushMatrix();
{
- glTranslatef( pos.mV[VX], pos.mV[VY], pos.mV[VZ] );
- glScalef(
+ gGL.translatef( pos.mV[VX], pos.mV[VY], pos.mV[VZ] );
+ gGL.scalef(
mBoxHandleSize + llabs(delta.mV[VX]),
mBoxHandleSize + llabs(delta.mV[VY]),
mBoxHandleSize + llabs(delta.mV[VZ]));
gBox.render();
}
- glPopMatrix();
+ gGL.popMatrix();
}
else
{
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index f871df0c36..3a88fbd96d 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1066,12 +1066,12 @@ BOOL LLManipTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
void LLManipTranslate::render()
{
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
F32 zoom = gAgentCamera.mHUDCurZoom;
- glScalef(zoom, zoom, zoom);
+ gGL.scalef(zoom, zoom, zoom);
}
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
@@ -1515,11 +1515,12 @@ void LLManipTranslate::renderSnapGuides()
F32 x,y,z,angle_radians;
grid_rotation.getAngleAxis(&angle_radians, &x, &y, &z);
gGL.translatef(selection_center.mV[VX], selection_center.mV[VY], selection_center.mV[VZ]);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
F32 sz = mGridSizeMeters;
F32 tiles = sz;
- glMatrixMode(GL_TEXTURE);
+
+ gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.pushMatrix();
usc = 1.0f/usc;
vsc = 1.0f/vsc;
@@ -1533,7 +1534,7 @@ void LLManipTranslate::renderSnapGuides()
vsc *= 0.5f;
}
- glScalef(usc, vsc, 1.0f);
+ gGL.scalef(usc, vsc, 1.0f);
gGL.translatef(u, v, 0);
float a = line_alpha;
@@ -1566,7 +1567,7 @@ void LLManipTranslate::renderSnapGuides()
renderGrid(u,v,tiles,1,1,1,a);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
}
@@ -1665,7 +1666,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
glStencilFunc(GL_ALWAYS, 0, stencil_mask);
gGL.setColorMask(false, false);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glColor4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
//setup clip plane
normal = normal * grid_rotation;
@@ -1723,7 +1724,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
F32 x,y,z,angle_radians;
grid_rotation.getAngleAxis(&angle_radians, &x, &y, &z);
gGL.translatef(selection_center.mV[VX], selection_center.mV[VY], selection_center.mV[VZ]);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
F32 sz = mGridSizeMeters;
F32 tiles = sz;
@@ -1852,7 +1853,7 @@ void LLManipTranslate::renderTranslationHandles()
mGridSizeMeters = gSavedSettings.getF32("GridDrawSize");
mConeSize = mArrowLengthMeters / 4.f;
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
{
gGL.translatef(selection_center.mV[VX], selection_center.mV[VY], selection_center.mV[VZ]);
@@ -1860,7 +1861,7 @@ void LLManipTranslate::renderTranslationHandles()
F32 angle_radians, x, y, z;
grid_rotation.getAngleAxis(&angle_radians, &x, &y, &z);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
LLQuaternion invRotation = grid_rotation;
invRotation.conjQuat();
@@ -1908,9 +1909,9 @@ void LLManipTranslate::renderTranslationHandles()
{
// render YZ plane manipulator
gGL.pushMatrix();
- glScalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
+ gGL.scalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
gGL.translatef(0.f, mPlaneManipOffsetMeters, mPlaneManipOffsetMeters);
- glScalef(mPlaneScales.mV[VX], mPlaneScales.mV[VX], mPlaneScales.mV[VX]);
+ gGL.scalef(mPlaneScales.mV[VX], mPlaneScales.mV[VX], mPlaneScales.mV[VX]);
if (mHighlightedPart == LL_YZ_PLANE)
{
color1.setVec(0.f, 1.f, 0.f, 1.f);
@@ -1962,9 +1963,9 @@ void LLManipTranslate::renderTranslationHandles()
{
// render XZ plane manipulator
gGL.pushMatrix();
- glScalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
+ gGL.scalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
gGL.translatef(mPlaneManipOffsetMeters, 0.f, mPlaneManipOffsetMeters);
- glScalef(mPlaneScales.mV[VY], mPlaneScales.mV[VY], mPlaneScales.mV[VY]);
+ gGL.scalef(mPlaneScales.mV[VY], mPlaneScales.mV[VY], mPlaneScales.mV[VY]);
if (mHighlightedPart == LL_XZ_PLANE)
{
color1.setVec(0.f, 0.f, 1.f, 1.f);
@@ -2018,7 +2019,7 @@ void LLManipTranslate::renderTranslationHandles()
{
// render XY plane manipulator
gGL.pushMatrix();
- glScalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
+ gGL.scalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
/* Y
^
@@ -2043,7 +2044,7 @@ void LLManipTranslate::renderTranslationHandles()
v2 = LLVector3(mPlaneManipOffsetMeters * ( PLANE_TICK_SIZE * 0.25f), mPlaneManipOffsetMeters * ( PLANE_TICK_SIZE * 0.25f), 0.f);
v3 = LLVector3(mPlaneManipOffsetMeters * (-PLANE_TICK_SIZE * 0.75f), mPlaneManipOffsetMeters * ( PLANE_TICK_SIZE * 0.25f), 0.f);
#endif
- glScalef(mPlaneScales.mV[VZ], mPlaneScales.mV[VZ], mPlaneScales.mV[VZ]);
+ gGL.scalef(mPlaneScales.mV[VZ], mPlaneScales.mV[VZ], mPlaneScales.mV[VZ]);
if (mHighlightedPart == LL_XY_PLANE)
{
color1.setVec(1.f, 0.f, 0.f, 1.f);
@@ -2215,7 +2216,7 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_
}
gGL.translatef(vec.mV[0], vec.mV[1], vec.mV[2]);
- glScalef(handle_size, handle_size, handle_size);
+ gGL.scalef(handle_size, handle_size, handle_size);
F32 rot = 0.0f;
LLVector3 axis;
@@ -2239,11 +2240,11 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_
break;
}
- glColor4fv(color.mV);
- glRotatef(rot, axis.mV[0], axis.mV[1], axis.mV[2]);
- glScalef(mArrowScales.mV[index], mArrowScales.mV[index], mArrowScales.mV[index] * 1.5f);
+ gGL.diffuseColor4fv(color.mV);
+ gGL.rotatef(rot, axis.mV[0], axis.mV[1], axis.mV[2]);
+ gGL.scalef(mArrowScales.mV[index], mArrowScales.mV[index], mArrowScales.mV[index] * 1.5f);
- gCone.render(CONE_LOD_HIGHEST);
+ gCone.render();
gGL.popMatrix();
}
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 03ccabc994..74fa5d350a 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -57,7 +57,6 @@
#include "llcheckboxctrl.h"
#include "llnotifications.h"
#include "lllineeditor.h"
-#include "llfloatermediabrowser.h"
#include "llfloaterwebcontent.h"
#include "llwindowshade.h"
@@ -68,7 +67,6 @@ static LLDefaultChildRegistry::Register<LLMediaCtrl> r("web_browser");
LLMediaCtrl::Params::Params()
: start_url("start_url"),
border_visible("border_visible", true),
- ignore_ui_scale("ignore_ui_scale", true),
decouple_texture_size("decouple_texture_size", false),
texture_width("texture_width", 1024),
texture_height("texture_height", 1024),
@@ -79,7 +77,6 @@ LLMediaCtrl::Params::Params()
trusted_content("trusted_content", false),
focus_on_click("focus_on_click", true)
{
- tab_stop(false);
}
LLMediaCtrl::LLMediaCtrl( const Params& p) :
@@ -90,7 +87,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mFrequentUpdates( true ),
mForceUpdate( false ),
mHomePageUrl( "" ),
- mIgnoreUIScale( true ),
mAlwaysRefresh( false ),
mMediaSource( 0 ),
mTakeFocusOnClick( p.focus_on_click ),
@@ -113,8 +109,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
setCaretColor( (unsigned int)color.mV[0], (unsigned int)color.mV[1], (unsigned int)color.mV[2] );
}
- setIgnoreUIScale(p.ignore_ui_scale);
-
setHomePageUrl(p.start_url, p.initial_mime_type);
setBorderVisible(p.border_visible);
@@ -125,10 +119,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
if(!getDecoupleTextureSize())
{
- S32 screen_width = mIgnoreUIScale ?
- llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]) : getRect().getWidth();
- S32 screen_height = mIgnoreUIScale ?
- llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight();
+ S32 screen_width = llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]);
+ S32 screen_height = llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]);
setTextureSize(screen_width, screen_height);
}
@@ -319,6 +311,11 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
if (mContextMenu)
{
+ // hide/show debugging options
+ bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");
+ mContextMenu->setItemVisible("open_webinspector", media_plugin_debugging_enabled );
+ mContextMenu->setItemVisible("debug_separator", media_plugin_debugging_enabled );
+
mContextMenu->show(x, y);
LLMenuGL::showPopup(this, mContextMenu, x, y);
}
@@ -385,12 +382,22 @@ void LLMediaCtrl::onFocusLost()
//
BOOL LLMediaCtrl::postBuild ()
{
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
+ registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this));
+
mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
"menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
+
return TRUE;
}
+void LLMediaCtrl::onOpenWebInspector()
+{
+ if (mMediaSource && mMediaSource->hasMedia())
+ mMediaSource->getMediaPlugin()->showWebInspector( true );
+}
+
////////////////////////////////////////////////////////////////////////////////
//
BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
@@ -457,8 +464,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
{
if(!getDecoupleTextureSize())
{
- S32 screen_width = mIgnoreUIScale ? llround((F32)width * LLUI::sGLScaleFactor.mV[VX]) : width;
- S32 screen_height = mIgnoreUIScale ? llround((F32)height * LLUI::sGLScaleFactor.mV[VY]) : height;
+ S32 screen_width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
+ S32 screen_height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
// when floater is minimized, these sizes are negative
if ( screen_height > 0 && screen_width > 0 )
@@ -675,6 +682,8 @@ bool LLMediaCtrl::ensureMediaSourceExists()
mMediaSource->addObserver( this );
mMediaSource->setBackgroundColor( getBackgroundColor() );
mMediaSource->setTrustedBrowser(mTrusted);
+ mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
+
if(mClearCache)
{
mMediaSource->clearCache();
@@ -756,15 +765,7 @@ void LLMediaCtrl::draw()
{
gGL.pushUIMatrix();
{
- if (mIgnoreUIScale)
- {
- gGL.loadUIIdentity();
- // font system stores true screen origin, need to scale this by UI scale factor
- // to get render origin for this view (with unit scale)
- gGL.translateUI(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
- floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]),
- LLFontGL::sCurOrigin.mZ);
- }
+ mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
// scale texture to fit the space using texture coords
gGL.getTexUnit(0)->bind(media_texture);
@@ -812,14 +813,6 @@ void LLMediaCtrl::draw()
x_offset = (r.getWidth() - width) / 2;
y_offset = (r.getHeight() - height) / 2;
- if(mIgnoreUIScale)
- {
- x_offset = llround((F32)x_offset * LLUI::sGLScaleFactor.mV[VX]);
- y_offset = llround((F32)y_offset * LLUI::sGLScaleFactor.mV[VY]);
- width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
- height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
- }
-
// draw the browser
gGL.begin( LLRender::QUADS );
if (! media_plugin->getTextureCoordsOpenGL())
@@ -886,14 +879,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
}
- x = mIgnoreUIScale ? llround((F32)x * LLUI::sGLScaleFactor.mV[VX]) : x;
+ x = llround((F32)x * LLUI::sGLScaleFactor.mV[VX]);
if ( ! coords_opengl )
{
- y = mIgnoreUIScale ? llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]) : y;
+ y = llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]);
}
else
{
- y = mIgnoreUIScale ? llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight() - y;
+ y = llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]);
};
}
@@ -1065,6 +1058,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
mHoverTextChanged = true;
};
break;
+
+ case MEDIA_EVENT_DEBUG_MESSAGE:
+ {
+ LL_INFOS("media") << self->getDebugMessageText() << LL_ENDL;
+ };
+ break;
};
// chain all events to any potential observers of this object.
@@ -1082,36 +1081,7 @@ void LLMediaCtrl::onPopup(const LLSD& notification, const LLSD& response)
{
if (response["open"])
{
- // name of default floater to open
- std::string floater_name = "media_browser";
-
- // look for parent floater name
- if ( gFloaterView )
- {
- if ( gFloaterView->getParentFloater(this) )
- {
- floater_name = gFloaterView->getParentFloater(this)->getInstanceName();
- }
- else
- {
- lldebugs << "No gFloaterView->getParentFloater(this) for onPopuup()" << llendl;
- };
- }
- else
- {
- lldebugs << "No gFloaterView for onPopuup()" << llendl;
- };
-
- // (for now) open web content floater if that's our parent, otherwise, open the current media floater
- // (this will change soon)
- if ( floater_name == "web_content" )
- {
- LLWeb::loadWebURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
- }
- else
- {
- LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
- }
+ LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
}
else
{
@@ -1164,3 +1134,12 @@ void LLMediaCtrl::hideNotification()
mWindowShade->hide();
}
}
+
+void LLMediaCtrl::setTrustedContent(bool trusted)
+{
+ mTrusted = trusted;
+ if (mMediaSource)
+ {
+ mMediaSource->setTrustedBrowser(trusted);
+ }
+}
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 28666e620f..7f2a5e1642 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -51,7 +51,6 @@ public:
Optional<std::string> start_url;
Optional<bool> border_visible,
- ignore_ui_scale,
hide_loading,
decouple_texture_size,
trusted_content,
@@ -125,9 +124,6 @@ public:
bool getFrequentUpdates() { return mFrequentUpdates; };
void setFrequentUpdates( bool frequentUpdatesIn ) { mFrequentUpdates = frequentUpdatesIn; };
- void setIgnoreUIScale(bool ignore) { mIgnoreUIScale = ignore; }
- bool getIgnoreUIScale() { return mIgnoreUIScale; }
-
void setAlwaysRefresh(bool refresh) { mAlwaysRefresh = refresh; }
bool getAlwaysRefresh() { return mAlwaysRefresh; }
@@ -149,6 +145,8 @@ public:
void showNotification(boost::shared_ptr<class LLNotification> notify);
void hideNotification();
+ void setTrustedContent(bool trusted);
+
// over-rides
virtual BOOL handleKeyHere( KEY key, MASK mask);
virtual void handleVisibilityChange ( BOOL new_visibility );
@@ -164,6 +162,11 @@ public:
// Incoming media event dispatcher
virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
+ // right click debugging item
+ void onOpenWebInspector();
+
+ LLUUID getTextureID() {return mMediaTextureID;}
+
protected:
void convertInputCoords(S32& x, S32& y);
@@ -174,28 +177,29 @@ public:
const S32 mTextureDepthBytes;
LLUUID mMediaTextureID;
LLViewBorder* mBorder;
- bool mFrequentUpdates;
- bool mForceUpdate;
- const bool mTrusted;
- std::string mHomePageUrl;
- std::string mHomePageMimeType;
- std::string mCurrentNavUrl;
- std::string mErrorPageURL;
- std::string mTarget;
- bool mIgnoreUIScale;
- bool mAlwaysRefresh;
+ bool mFrequentUpdates,
+ mForceUpdate,
+ mTrusted,
+ mAlwaysRefresh,
+ mTakeFocusOnClick,
+ mStretchToFill,
+ mMaintainAspectRatio,
+ mHideLoading,
+ mHidingInitialLoad,
+ mClearCache,
+ mHoverTextChanged,
+ mDecoupleTextureSize;
+
+ std::string mHomePageUrl,
+ mHomePageMimeType,
+ mCurrentNavUrl,
+ mErrorPageURL,
+ mTarget;
viewer_media_t mMediaSource;
- bool mTakeFocusOnClick;
- bool mStretchToFill;
- bool mMaintainAspectRatio;
- bool mHideLoading;
- bool mHidingInitialLoad;
- bool mDecoupleTextureSize;
- S32 mTextureWidth;
- S32 mTextureHeight;
- bool mClearCache;
+ S32 mTextureWidth,
+ mTextureHeight;
+
class LLWindowShade* mWindowShade;
- bool mHoverTextChanged;
LLContextMenu* mContextMenu;
};
diff --git a/indra/newview/llmemoryview.h b/indra/newview/llmemoryview.h
index 9bdc59ab10..dc4849a9c4 100644
--- a/indra/newview/llmemoryview.h
+++ b/indra/newview/llmemoryview.h
@@ -38,8 +38,8 @@ public:
{
Params()
{
- mouse_opaque = true;
- visible = false;
+ changeDefault(mouse_opaque, true);
+ changeDefault(visible, false);
}
};
LLMemoryView(const LLMemoryView::Params&);
diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp
deleted file mode 100644
index 4b7f9432e3..0000000000
--- a/indra/newview/llmenucommands.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @file llmenucommands.cpp
- * @brief Implementations of menu commands.
- *
- * $LicenseInfo:firstyear=2003&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llmenucommands.h"
-
-#include "imageids.h"
-#include "llfloaterreg.h"
-#include "llfontgl.h"
-#include "llrect.h"
-#include "llerror.h"
-#include "llstring.h"
-#include "message.h"
-
-#include "llagentcamera.h"
-#include "llcallingcard.h"
-#include "llviewercontrol.h"
-//#include "llfirstuse.h"
-#include "llfloaterworldmap.h"
-#include "lllineeditor.h"
-#include "llstatusbar.h"
-#include "llimview.h"
-#include "lltextbox.h"
-#include "llui.h"
-#include "llviewergesture.h" // for triggering gestures
-#include "llviewermessage.h"
-#include "llviewerparceloverlay.h"
-#include "llviewerregion.h"
-#include "llviewerstats.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "llworld.h"
-#include "llworldmap.h"
-#include "llfocusmgr.h"
-#include "llnearbychatbar.h"
-
-void handle_mouselook(void*)
-{
- gAgentCamera.changeCameraToMouselook();
-}
-
-
-void handle_chat(void*)
-{
- // give focus to chatbar if it's open but not focused
- if (gSavedSettings.getBOOL("ChatVisible") &&
- gFocusMgr.childHasKeyboardFocus(LLNearbyChatBar::getInstance()->getChatBox()))
- {
- LLNearbyChatBar::stopChat();
- }
- else
- {
- LLNearbyChatBar::startChat(NULL);
- }
-}
-
-void handle_slash_key(void*)
-{
- // LLBottomTray::startChat("/");
- //
- // Don't do this, it results in a double-slash in the input field.
- // Another "/" will be automatically typed for us, because the WM_KEYDOWN event
- // that generated the menu accelerator call (and hence puts focus in
- // the chat edtior) will be followed by a "/" WM_CHAR character message,
- // which will type the slash. Yes, it's weird. It only matters for
- // menu accelerators that put input focus into a field. And Mac works
- // the same way. JC
-
- LLNearbyChatBar::startChat(NULL);
-}
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 6e0722bcf9..a97e256c89 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -34,9 +34,9 @@
#include "llagent.h"
#include "llappviewer.h"
#include "llbufferstream.h"
+#include "llcallbacklist.h"
#include "llcurl.h"
#include "lldatapacker.h"
-#include "llfasttimer.h"
#include "llfloatermodelpreview.h"
#include "llfloaterperms.h"
#include "lleconomy.h"
@@ -49,6 +49,7 @@
#include "llthread.h"
#include "llvfile.h"
#include "llviewercontrol.h"
+#include "llviewerinventory.h"
#include "llviewermenufile.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
@@ -62,6 +63,7 @@
#include "llinventorymodel.h"
#include "llfoldertype.h"
#include "llviewerparcelmgr.h"
+#include "lluploadfloaterobservers.h"
#include "boost/lexical_cast.hpp"
@@ -71,13 +73,18 @@
#include <queue>
-LLFastTimer::DeclareTimer FTM_MESH_UPDATE("Mesh Update");
-LLFastTimer::DeclareTimer FTM_LOAD_MESH("Load Mesh");
-
LLMeshRepository gMeshRepo;
const U32 MAX_MESH_REQUESTS_PER_SECOND = 100;
+// Maximum mesh version to support. Three least significant digits are reserved for the minor version,
+// with major version changes indicating a format change that is not backwards compatible and should not
+// be parsed by viewers that don't specifically support that version. For example, if the integer "1" is
+// present, the version is 0.001. A viewer that can parse version 0.001 can also parse versions up to 0.999,
+// but not 1.0 (integer 1000).
+// See wiki at https://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format
+const S32 MAX_MESH_VERSION = 999;
+
U32 LLMeshRepository::sBytesReceived = 0;
U32 LLMeshRepository::sHTTPRequestCount = 0;
U32 LLMeshRepository::sHTTPRetryCount = 0;
@@ -190,196 +197,6 @@ S32 LLMeshRepoThread::sActiveHeaderRequests = 0;
S32 LLMeshRepoThread::sActiveLODRequests = 0;
U32 LLMeshRepoThread::sMaxConcurrentRequests = 1;
-
-class LLTextureCostResponder : public LLCurl::Responder
-{
-public:
- LLTextureUploadData mData;
- LLMeshUploadThread* mThread;
-
- LLTextureCostResponder(LLTextureUploadData data, LLMeshUploadThread* thread)
- : mData(data), mThread(thread)
- {
-
- }
-
- virtual void completed(U32 status, const std::string& reason, const LLSD& content)
- {
- mThread->mPendingConfirmations--;
- if (isGoodStatus(status))
- {
- mThread->priceResult(mData, content);
- }
- else
- {
- llwarns << status << ": " << reason << llendl;
-
- if (mData.mRetries < MAX_TEXTURE_UPLOAD_RETRIES)
- {
- llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl;
-
- if (status == 499 || status == 500)
- {
- mThread->uploadTexture(mData);
- }
- else
- {
- llerrs << "Unhandled status " << status << llendl;
- }
- }
- else
- {
- llwarns << "Giving up after " << mData.mRetries << " retries." << llendl;
- }
- }
- }
-};
-
-class LLTextureUploadResponder : public LLCurl::Responder
-{
-public:
- LLTextureUploadData mData;
- LLMeshUploadThread* mThread;
-
- LLTextureUploadResponder(LLTextureUploadData data, LLMeshUploadThread* thread)
- : mData(data), mThread(thread)
- {
- }
-
- virtual void completed(U32 status, const std::string& reason, const LLSD& content)
- {
- mThread->mPendingUploads--;
- if (isGoodStatus(status))
- {
- mData.mUUID = content["new_asset"].asUUID();
- gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mData.mPostData, content));
- mThread->onTextureUploaded(mData);
- }
- else
- {
- llwarns << status << ": " << reason << llendl;
- llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl;
-
- if (status == 404)
- {
- mThread->uploadTexture(mData);
- }
- else if (status == 499)
- {
- mThread->mConfirmedTextureQ.push(mData);
- }
- else
- {
- llerrs << "Unhandled status " << status << llendl;
- }
- }
- }
-};
-
-class LLMeshCostResponder : public LLCurl::Responder
-{
-public:
- LLMeshUploadData mData;
- LLMeshUploadThread* mThread;
-
- LLMeshCostResponder(LLMeshUploadData data, LLMeshUploadThread* thread)
- : mData(data), mThread(thread)
- {
-
- }
-
- virtual void completed(U32 status, const std::string& reason, const LLSD& content)
- {
- mThread->mPendingConfirmations--;
-
- if (isGoodStatus(status))
- {
- mThread->priceResult(mData, content);
- }
- else
- {
- llwarns << status << ": " << reason << llendl;
-
- if (status == HTTP_INTERNAL_ERROR)
- {
- llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl;
- mThread->uploadModel(mData);
- }
- else if (status == HTTP_BAD_REQUEST)
- {
- llwarns << "Status 400 received from server, giving up." << llendl;
- }
- else if (status == HTTP_NOT_FOUND)
- {
- llwarns <<"Status 404 received, server is disconnected, giving up." << llendl ;
- }
- else
- {
- llerrs << "Unhandled status " << status << llendl;
- }
- }
- }
-};
-
-class LLMeshUploadResponder : public LLCurl::Responder
-{
-public:
- LLMeshUploadData mData;
- LLMeshUploadThread* mThread;
-
- LLMeshUploadResponder(LLMeshUploadData data, LLMeshUploadThread* thread)
- : mData(data), mThread(thread)
- {
- }
-
- virtual void completed(U32 status, const std::string& reason, const LLSD& content)
- {
- mThread->mPendingUploads--;
- if (isGoodStatus(status))
- {
- mData.mUUID = content["new_asset"].asUUID();
- if (mData.mUUID.isNull())
- {
- LLSD args;
- std::string message = content["error"]["message"];
- std::string identifier = content["error"]["identifier"];
- std::string invalidity_identifier = content["error"]["invalidity_identifier"];
-
- args["MESSAGE"] = message;
- args["IDENTIFIER"] = identifier;
- args["INVALIDITY_IDENTIFIER"] = invalidity_identifier;
- args["LABEL"] = mData.mBaseModel->mLabel;
-
- gMeshRepo.uploadError(args);
- }
- else
- {
- gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mData.mPostData, content));
- mThread->onModelUploaded(mData);
- }
- }
- else
- {
- llwarns << status << ": " << reason << llendl;
- llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl;
-
- if (status == 404)
- {
- mThread->uploadModel(mData);
- }
- else if (status == 499)
- {
- mThread->mConfirmedQ.push(mData);
- }
- else if (status != 500)
- { //drop internal server errors on the floor, otherwise grab
- llerrs << "Unhandled status " << status << llendl;
- }
- }
- }
-};
-
-
class LLMeshHeaderResponder : public LLCurl::Responder
{
public:
@@ -518,38 +335,16 @@ void log_upload_error(S32 status, const LLSD& content, std::string stage, std::s
}
}
-class LLModelObjectUploadResponder: public LLCurl::Responder
-{
- LLSD mObjectAsset;
- LLMeshUploadThread* mThread;
-
-public:
- LLModelObjectUploadResponder(LLMeshUploadThread* thread, const LLSD& object_asset):
- mThread(thread),
- mObjectAsset(object_asset)
- {
- }
-
- virtual void completedRaw(U32 status, const std::string& reason,
- const LLChannelDescriptors& channels,
- const LLIOPipe::buffer_ptr_t& buffer)
- {
- assert_main_thread();
-
- llinfos << "completed" << llendl;
- mThread->mPendingUploads--;
- mThread->mFinished = true;
- }
-};
-
class LLWholeModelFeeResponder: public LLCurl::Responder
{
LLMeshUploadThread* mThread;
LLSD mModelData;
+ LLHandle<LLWholeModelFeeObserver> mObserverHandle;
public:
- LLWholeModelFeeResponder(LLMeshUploadThread* thread, LLSD& model_data):
+ LLWholeModelFeeResponder(LLMeshUploadThread* thread, LLSD& model_data, LLHandle<LLWholeModelFeeObserver> observer_handle):
mThread(thread),
- mModelData(model_data)
+ mModelData(model_data),
+ mObserverHandle(observer_handle)
{
}
virtual void completed(U32 status,
@@ -562,20 +357,32 @@ public:
cc = llsd_from_file("fake_upload_error.xml");
}
- llinfos << "completed" << llendl;
mThread->mPendingUploads--;
dump_llsd_to_file(cc,make_dump_name("whole_model_fee_response_",dump_num));
+
+ LLWholeModelFeeObserver* observer = mObserverHandle.get();
+
if (isGoodStatus(status) &&
cc["state"].asString() == "upload")
{
- llinfos << "fee request succeeded" << llendl;
- mThread->mWholeModelUploadURL = cc["uploader"].asString();
+ mThread->mWholeModelUploadURL = cc["uploader"].asString();
+
+ if (observer)
+ {
+ cc["data"]["upload_price"] = cc["upload_price"];
+ observer->onModelPhysicsFeeReceived(cc["data"], mThread->mWholeModelUploadURL);
+ }
}
else
{
llwarns << "fee request failed" << llendl;
log_upload_error(status,cc,"fee",mModelData["name"]);
mThread->mWholeModelUploadURL = "";
+
+ if (observer)
+ {
+ observer->setModelPhysicsFeeErrorStatus(status, reason);
+ }
}
}
@@ -585,11 +392,13 @@ class LLWholeModelUploadResponder: public LLCurl::Responder
{
LLMeshUploadThread* mThread;
LLSD mModelData;
+ LLHandle<LLWholeModelUploadObserver> mObserverHandle;
public:
- LLWholeModelUploadResponder(LLMeshUploadThread* thread, LLSD& model_data):
+ LLWholeModelUploadResponder(LLMeshUploadThread* thread, LLSD& model_data, LLHandle<LLWholeModelUploadObserver> observer_handle):
mThread(thread),
- mModelData(model_data)
+ mModelData(model_data),
+ mObserverHandle(observer_handle)
{
}
virtual void completed(U32 status,
@@ -602,30 +411,40 @@ public:
cc = llsd_from_file("fake_upload_error.xml");
}
- //assert_main_thread();
mThread->mPendingUploads--;
dump_llsd_to_file(cc,make_dump_name("whole_model_upload_response_",dump_num));
- llinfos << "LLWholeModelUploadResponder content: " << cc << llendl;
+
+ LLWholeModelUploadObserver* observer = mObserverHandle.get();
+
// requested "mesh" asset type isn't actually the type
// of the resultant object, fix it up here.
if (isGoodStatus(status) &&
cc["state"].asString() == "complete")
{
- llinfos << "upload succeeded" << llendl;
mModelData["asset_type"] = "object";
gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mModelData,cc));
+
+ if (observer)
+ {
+ doOnIdleOneTime(boost::bind(&LLWholeModelUploadObserver::onModelUploadSuccess, observer));
+ }
}
else
{
llwarns << "upload failed" << llendl;
std::string model_name = mModelData["name"].asString();
log_upload_error(status,cc,"upload",model_name);
+
+ if (observer)
+ {
+ doOnIdleOneTime(boost::bind(&LLWholeModelUploadObserver::onModelUploadFailure, observer));
+ }
}
}
};
LLMeshRepoThread::LLMeshRepoThread()
-: LLThread("mesh repo", NULL)
+: LLThread("mesh repo")
{
mWaiting = false;
mMutex = new LLMutex(NULL);
@@ -840,15 +659,16 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
}
U32 header_size = mMeshHeaderSize[mesh_id];
-
+
if (header_size > 0)
{
+ S32 version = mMeshHeader[mesh_id]["version"].asInteger();
S32 offset = header_size + mMeshHeader[mesh_id]["skin"]["offset"].asInteger();
S32 size = mMeshHeader[mesh_id]["skin"]["size"].asInteger();
mHeaderMutex->unlock();
- if (offset >= 0 && size > 0)
+ if (version <= MAX_MESH_VERSION && offset >= 0 && size > 0)
{
//check VFS for mesh skin info
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH);
@@ -859,7 +679,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
U8* buffer = new U8[size];
file.read(buffer, size);
- //make sure buffer isn't all 0's (reserved block but not written)
+ //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
@@ -915,12 +735,13 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
if (header_size > 0)
{
+ S32 version = mMeshHeader[mesh_id]["version"].asInteger();
S32 offset = header_size + mMeshHeader[mesh_id]["physics_convex"]["offset"].asInteger();
S32 size = mMeshHeader[mesh_id]["physics_convex"]["size"].asInteger();
mHeaderMutex->unlock();
- if (offset >= 0 && size > 0)
+ if (version <= MAX_MESH_VERSION && offset >= 0 && size > 0)
{
//check VFS for mesh skin info
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH);
@@ -931,7 +752,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
U8* buffer = new U8[size];
file.read(buffer, size);
- //make sure buffer isn't all 0's (reserved block but not written)
+ //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
@@ -987,12 +808,13 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
if (header_size > 0)
{
+ S32 version = mMeshHeader[mesh_id]["version"].asInteger();
S32 offset = header_size + mMeshHeader[mesh_id]["physics_mesh"]["offset"].asInteger();
S32 size = mMeshHeader[mesh_id]["physics_mesh"]["size"].asInteger();
mHeaderMutex->unlock();
- if (offset >= 0 && size > 0)
+ if (version <= MAX_MESH_VERSION && offset >= 0 && size > 0)
{
//check VFS for mesh physics shape info
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH);
@@ -1003,7 +825,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
U8* buffer = new U8[size];
file.read(buffer, size);
- //make sure buffer isn't all 0's (reserved block but not written)
+ //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
@@ -1060,9 +882,9 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
S32 size = file.getSize();
if (size > 0)
- {
- U8 buffer[1024];
- S32 bytes = llmin(size, 1024);
+ { //NOTE -- if the header size is ever more than 4KB, this will break
+ U8 buffer[4096];
+ S32 bytes = llmin(size, 4096);
LLMeshRepository::sCacheBytesRead += bytes;
file.read(buffer, bytes);
if (headerReceived(mesh_params, buffer, bytes))
@@ -1084,6 +906,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
retval = true;
//grab first 4KB if we're going to bother with a fetch. Cache will prevent future fetches if a full mesh fits
//within the first 4KB
+ //NOTE -- this will break of headers ever exceed 4KB
LLMeshRepository::sHTTPRequestCount++;
mCurlRequest->getByteRange(http_url, headers, 0, 4096, new LLMeshHeaderResponder(mesh_params));
}
@@ -1103,10 +926,12 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
if (header_size > 0)
{
+ S32 version = mMeshHeader[mesh_id]["version"].asInteger();
S32 offset = header_size + mMeshHeader[mesh_id][header_lod[lod]]["offset"].asInteger();
S32 size = mMeshHeader[mesh_id][header_lod[lod]]["size"].asInteger();
mHeaderMutex->unlock();
- if (offset >= 0 && size > 0)
+
+ if (version <= MAX_MESH_VERSION && offset >= 0 && size > 0)
{
//check VFS for mesh asset
@@ -1118,7 +943,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
U8* buffer = new U8[size];
file.read(buffer, size);
- //make sure buffer isn't all 0's (reserved block but not written)
+ //make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
@@ -1204,14 +1029,11 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat
}
{
- U32 cost = gMeshRepo.calcResourceCost(header);
-
LLUUID mesh_id = mesh_params.getSculptID();
mHeaderMutex->lock();
mMeshHeaderSize[mesh_id] = header_size;
mMeshHeader[mesh_id] = header;
- mMeshResourceCost[mesh_id] = cost;
mHeaderMutex->unlock();
//check for pending requests
@@ -1363,9 +1185,14 @@ bool LLMeshRepoThread::physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32
}
LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, LLVector3& scale, bool upload_textures,
- bool upload_skin, bool upload_joints)
+ bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload,
+ LLHandle<LLWholeModelFeeObserver> fee_observer, LLHandle<LLWholeModelUploadObserver> upload_observer)
: LLThread("mesh upload"),
- mDiscarded(FALSE)
+ mDiscarded(FALSE),
+ mDoUpload(do_upload),
+ mWholeModelUploadURL(upload_url),
+ mFeeObserverHandle(fee_observer),
+ mUploadObserverHandle(upload_observer)
{
mInstanceList = data;
mUploadTextures = upload_textures;
@@ -1373,9 +1200,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mUploadJoints = upload_joints;
mMutex = new LLMutex(NULL);
mCurlRequest = NULL;
- mPendingConfirmations = 0;
mPendingUploads = 0;
- mPendingCost = 0;
mFinished = false;
mOrigin = gAgent.getPositionAgent();
mHost = gAgent.getRegionHost();
@@ -1383,6 +1208,8 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory");
mOrigin += gAgent.getAtAxis() * scale.magVec();
+
+ mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut") ;
}
LLMeshUploadThread::~LLMeshUploadThread()
@@ -1441,7 +1268,14 @@ BOOL LLMeshUploadThread::isDiscarded()
void LLMeshUploadThread::run()
{
- doWholeModelUpload();
+ if (mDoUpload)
+ {
+ doWholeModelUpload();
+ }
+ else
+ {
+ requestWholeModelFee();
+ }
}
void dump_llsd_to_file(const LLSD& content, std::string filename)
@@ -1467,10 +1301,13 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
LLSD res;
result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
+ result["texture_folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE);
result["asset_type"] = "mesh";
result["inventory_type"] = "object";
- result["name"] = "mesh model";
- result["description"] = "your description here";
+ result["description"] = "(No Description)";
+ result["next_owner_mask"] = LLSD::Integer(LLFloaterPerms::getNextOwnerPerms());
+ result["group_mask"] = LLSD::Integer(LLFloaterPerms::getGroupPerms());
+ result["everyone_mask"] = LLSD::Integer(LLFloaterPerms::getEveryonePerms());
res["mesh_list"] = LLSD::emptyArray();
res["texture_list"] = LLSD::emptyArray();
@@ -1482,6 +1319,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
std::map<LLViewerTexture*,S32> texture_index;
std::map<LLModel*,S32> mesh_index;
+ std::string model_name;
+ std::string model_metric;
S32 instance_num = 0;
@@ -1498,10 +1337,14 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
if (mesh_index.find(data.mBaseModel) == mesh_index.end())
{
// Have not seen this model before - create a new mesh_list entry for it.
- std::string model_name = data.mBaseModel->getName();
- if (!model_name.empty())
+ if (model_name.empty())
+ {
+ model_name = data.mBaseModel->getName();
+ }
+
+ if (model_metric.empty())
{
- result["name"] = model_name;
+ model_metric = data.mBaseModel->getMetric();
}
std::stringstream ostr;
@@ -1556,24 +1399,15 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
instance_entry["scale"] = ll_sd_from_vector3(scale);
instance_entry["material"] = LL_MCODE_WOOD;
- LLPermissions perm;
- perm.setOwnerAndGroup(gAgent.getID(), gAgent.getID(), LLUUID::null, false);
- perm.setCreator(gAgent.getID());
-
- perm.initMasks(PERM_ITEM_UNRESTRICTED | PERM_MOVE, //base
- PERM_ITEM_UNRESTRICTED | PERM_MOVE, //owner
- LLFloaterPerms::getEveryonePerms(),
- LLFloaterPerms::getGroupPerms(),
- LLFloaterPerms::getNextOwnerPerms());
- instance_entry["permissions"] = ll_create_sd_from_permissions(perm);
instance_entry["physics_shape_type"] = (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL);
instance_entry["mesh"] = mesh_index[data.mBaseModel];
instance_entry["face_list"] = LLSD::emptyArray();
- for (S32 face_num = 0; face_num < data.mBaseModel->getNumVolumeFaces(); face_num++)
+ S32 end = llmin((S32)data.mBaseModel->mMaterialList.size(), data.mBaseModel->getNumVolumeFaces()) ;
+ for (S32 face_num = 0; face_num < end; face_num++)
{
- LLImportMaterial& material = instance.mMaterial[face_num];
+ LLImportMaterial& material = instance.mMaterial[data.mBaseModel->mMaterialList[face_num]];
LLSD face_entry = LLSD::emptyMap();
LLViewerFetchedTexture *texture = material.mDiffuseMap.get();
@@ -1624,19 +1458,20 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
}
}
+ if (model_name.empty()) model_name = "mesh model";
+ result["name"] = model_name;
+ if (model_metric.empty()) model_metric = "MUT_Unspecified";
+ res["metric"] = model_metric;
result["asset_resources"] = res;
dump_llsd_to_file(result,make_dump_name("whole_model_",dump_num));
dest = result;
}
-void LLMeshUploadThread::doWholeModelUpload()
+void LLMeshUploadThread::generateHulls()
{
- dump_num++;
-
- mCurlRequest = new LLCurlRequest();
+ bool has_valid_requests = false ;
- // Queue up models for hull generation (viewer-side)
for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter)
{
LLMeshUploadData data;
@@ -1656,6 +1491,10 @@ void LLMeshUploadThread::doWholeModelUpload()
{
physics = data.mModel[LLModel::LOD_PHYSICS];
}
+ else if (data.mModel[LLModel::LOD_LOW].notNull())
+ {
+ physics = data.mModel[LLModel::LOD_LOW];
+ }
else if (data.mModel[LLModel::LOD_MEDIUM].notNull())
{
physics = data.mModel[LLModel::LOD_MEDIUM];
@@ -1666,33 +1505,27 @@ void LLMeshUploadThread::doWholeModelUpload()
}
llassert(physics != NULL);
-
+
DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this);
if(request->isValid())
{
gMeshRepo.mDecompThread->submitRequest(request);
- }
- }
-
- while (!mPhysicsComplete)
- {
- apr_sleep(100);
+ has_valid_requests = true ;
+ }
}
-
- LLSD model_data;
- wholeModelToLLSD(model_data,false);
- dump_llsd_to_file(model_data,make_dump_name("whole_model_fee_request_",dump_num));
-
- mPendingUploads++;
- LLCurlRequest::headers_t headers;
- mCurlRequest->post(mWholeModelFeeCapability, headers, model_data,
- new LLWholeModelFeeResponder(this,model_data));
-
- do
+
+ if(has_valid_requests)
{
- mCurlRequest->process();
- } while (mCurlRequest->getQueued() > 0);
+ while (!mPhysicsComplete)
+ {
+ apr_sleep(100);
+ }
+ }
+}
+void LLMeshUploadThread::doWholeModelUpload()
+{
+ mCurlRequest = new LLCurlRequest();
if (mWholeModelUploadURL.empty())
{
@@ -1700,15 +1533,20 @@ void LLMeshUploadThread::doWholeModelUpload()
}
else
{
+ generateHulls();
+
LLSD full_model_data;
wholeModelToLLSD(full_model_data, true);
LLSD body = full_model_data["asset_resources"];
dump_llsd_to_file(body,make_dump_name("whole_model_body_",dump_num));
+ LLCurlRequest::headers_t headers;
mCurlRequest->post(mWholeModelUploadURL, headers, body,
- new LLWholeModelUploadResponder(this, model_data));
+ new LLWholeModelUploadResponder(this, full_model_data, mUploadObserverHandle), mMeshUploadTimeOut);
do
{
mCurlRequest->process();
+ //sleep for 10ms to prevent eating a whole core
+ apr_sleep(10000);
} while (mCurlRequest->getQueued() > 0);
}
@@ -1719,22 +1557,36 @@ void LLMeshUploadThread::doWholeModelUpload()
mFinished = true;
}
-void LLMeshUploadThread::uploadModel(LLMeshUploadData& data)
-{ //called from arbitrary thread
- {
- LLMutexLock lock(mMutex);
- mUploadQ.push(data);
- }
-}
+void LLMeshUploadThread::requestWholeModelFee()
+{
+ dump_num++;
-void LLMeshUploadThread::uploadTexture(LLTextureUploadData& data)
-{ //called from mesh upload thread
- mTextureQ.push(data);
-}
+ mCurlRequest = new LLCurlRequest();
+ generateHulls();
+
+ LLSD model_data;
+ wholeModelToLLSD(model_data,false);
+ dump_llsd_to_file(model_data,make_dump_name("whole_model_fee_request_",dump_num));
+
+ mPendingUploads++;
+ LLCurlRequest::headers_t headers;
+ mCurlRequest->post(mWholeModelFeeCapability, headers, model_data,
+ new LLWholeModelFeeResponder(this,model_data, mFeeObserverHandle), mMeshUploadTimeOut);
+
+ do
+ {
+ mCurlRequest->process();
+ //sleep for 10ms to prevent eating a whole core
+ apr_sleep(10000);
+ } while (mCurlRequest->getQueued() > 0);
+
+ delete mCurlRequest;
+ mCurlRequest = NULL;
-static LLFastTimer::DeclareTimer FTM_NOTIFY_MESH_LOADED("Notify Loaded");
-static LLFastTimer::DeclareTimer FTM_NOTIFY_MESH_UNAVAILABLE("Notify Unavailable");
+ // Currently a no-op.
+ mFinished = true;
+}
void LLMeshRepoThread::notifyLoadedMeshes()
{
@@ -1799,7 +1651,9 @@ S32 LLMeshRepository::getActualMeshLOD(LLSD& header, S32 lod)
{
lod = llclamp(lod, 0, 3);
- if (header.has("404"))
+ S32 version = header["version"];
+
+ if (header.has("404") || version > MAX_MESH_VERSION)
{
return -1;
}
@@ -1832,19 +1686,6 @@ S32 LLMeshRepository::getActualMeshLOD(LLSD& header, S32 lod)
return -1;
}
-U32 LLMeshRepoThread::getResourceCost(const LLUUID& mesh_id)
-{
- LLMutexLock lock(mHeaderMutex);
-
- std::map<LLUUID, U32>::iterator iter = mMeshResourceCost.find(mesh_id);
- if (iter != mMeshResourceCost.end())
- {
- return iter->second;
- }
-
- return 0;
-}
-
void LLMeshRepository::cacheOutgoingMesh(LLMeshUploadData& data, LLSD& header)
{
mThread->mMeshHeader[data.mUUID] = header;
@@ -1860,6 +1701,7 @@ void LLMeshRepository::cacheOutgoingMesh(LLMeshUploadData& data, LLSD& header)
{
LLPointer<LLVolume> volume = new LLVolume(volume_params, LLVolumeLODGroup::getVolumeScaleFromDetail(i));
volume->copyVolumeFaces(data.mModel[i]);
+ volume->setMeshAssetLoaded(TRUE);
}
}
@@ -2135,54 +1977,54 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
LLUUID mesh_id = mMeshParams.getSculptID();
LLSD header = gMeshRepo.mThread->mMeshHeader[mesh_id];
- std::stringstream str;
+ S32 version = header["version"].asInteger();
+
+ if (version <= MAX_MESH_VERSION)
+ {
+ std::stringstream str;
- S32 lod_bytes = 0;
+ S32 lod_bytes = 0;
- for (U32 i = 0; i < LLModel::LOD_PHYSICS; ++i)
- { //figure out how many bytes we'll need to reserve in the file
- std::string lod_name = header_lod[i];
- lod_bytes = llmax(lod_bytes, header[lod_name]["offset"].asInteger()+header[lod_name]["size"].asInteger());
- }
+ for (U32 i = 0; i < LLModel::LOD_PHYSICS; ++i)
+ { //figure out how many bytes we'll need to reserve in the file
+ std::string lod_name = header_lod[i];
+ lod_bytes = llmax(lod_bytes, header[lod_name]["offset"].asInteger()+header[lod_name]["size"].asInteger());
+ }
- //just in case skin info or decomposition is at the end of the file (which it shouldn't be)
- lod_bytes = llmax(lod_bytes, header["skin"]["offset"].asInteger() + header["skin"]["size"].asInteger());
- lod_bytes = llmax(lod_bytes, header["physics_convex"]["offset"].asInteger() + header["physics_convex"]["size"].asInteger());
+ //just in case skin info or decomposition is at the end of the file (which it shouldn't be)
+ lod_bytes = llmax(lod_bytes, header["skin"]["offset"].asInteger() + header["skin"]["size"].asInteger());
+ lod_bytes = llmax(lod_bytes, header["physics_convex"]["offset"].asInteger() + header["physics_convex"]["size"].asInteger());
- S32 header_bytes = (S32) gMeshRepo.mThread->mMeshHeaderSize[mesh_id];
- S32 bytes = lod_bytes + header_bytes;
+ S32 header_bytes = (S32) gMeshRepo.mThread->mMeshHeaderSize[mesh_id];
+ S32 bytes = lod_bytes + header_bytes;
- //it's possible for the remote asset to have more data than is needed for the local cache
- //only allocate as much space in the VFS as is needed for the local cache
- data_size = llmin(data_size, bytes);
+ //it's possible for the remote asset to have more data than is needed for the local cache
+ //only allocate as much space in the VFS as is needed for the local cache
+ data_size = llmin(data_size, bytes);
- LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH, LLVFile::WRITE);
- if (file.getMaxSize() >= bytes || file.setMaxSize(bytes))
- {
- LLMeshRepository::sCacheBytesWritten += data_size;
+ LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH, LLVFile::WRITE);
+ if (file.getMaxSize() >= bytes || file.setMaxSize(bytes))
+ {
+ LLMeshRepository::sCacheBytesWritten += data_size;
- file.write((const U8*) data, data_size);
+ file.write((const U8*) data, data_size);
- //zero out the rest of the file
- U8 block[4096];
- memset(block, 0, 4096);
+ //zero out the rest of the file
+ U8 block[4096];
+ memset(block, 0, 4096);
- while (bytes-file.tell() > 4096)
- {
- file.write(block, 4096);
- }
+ while (bytes-file.tell() > 4096)
+ {
+ file.write(block, 4096);
+ }
- S32 remaining = bytes-file.tell();
+ S32 remaining = bytes-file.tell();
- if (remaining < 0 || remaining > 4096)
- {
- llerrs << "Bad padding of mesh asset cache entry." << llendl;
- }
-
- if (remaining > 0)
- {
- file.write(block, remaining);
+ if (remaining > 0)
+ {
+ file.write(block, remaining);
+ }
}
}
}
@@ -2292,8 +2134,6 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
return detail;
}
- LLFastTimer t(FTM_LOAD_MESH);
-
{
LLMutexLock lock(mMeshMutex);
//add volume to list of loading meshes
@@ -2315,11 +2155,6 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
if (volume)
{
- if (volume->getNumVolumeFaces() == 0 && !volume->isTetrahedron())
- {
- volume->makeTetrahedron();
- }
-
LLVolumeParams params = volume->getParams();
LLVolumeLODGroup* group = LLPrimitive::getVolumeManager()->getGroup(params);
@@ -2330,7 +2165,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
if (last_lod >= 0)
{
LLVolume* lod = group->refLOD(last_lod);
- if (lod && !lod->isTetrahedron() && lod->getNumVolumeFaces() > 0)
+ if (lod && lod->isMeshAssetLoaded() && lod->getNumVolumeFaces() > 0)
{
group->derefLOD(lod);
return last_lod;
@@ -2342,7 +2177,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
for (S32 i = detail-1; i >= 0; --i)
{
LLVolume* lod = group->refLOD(i);
- if (lod && !lod->isTetrahedron() && lod->getNumVolumeFaces() > 0)
+ if (lod && lod->isMeshAssetLoaded() && lod->getNumVolumeFaces() > 0)
{
group->derefLOD(lod);
return i;
@@ -2355,7 +2190,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
for (S32 i = detail+1; i < 4; ++i)
{
LLVolume* lod = group->refLOD(i);
- if (lod && !lod->isTetrahedron() && lod->getNumVolumeFaces() > 0)
+ if (lod && lod->isMeshAssetLoaded() && lod->getNumVolumeFaces() > 0)
{
group->derefLOD(lod);
return i;
@@ -2369,11 +2204,6 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
return detail;
}
-static LLFastTimer::DeclareTimer FTM_START_MESH_THREAD("Start Thread");
-static LLFastTimer::DeclareTimer FTM_LOAD_MESH_LOD("Load LOD");
-static LLFastTimer::DeclareTimer FTM_MESH_LOCK1("Lock 1");
-static LLFastTimer::DeclareTimer FTM_MESH_LOCK2("Lock 2");
-
void LLMeshRepository::notifyLoadedMeshes()
{ //called from main thread
@@ -2406,6 +2236,38 @@ void LLMeshRepository::notifyLoadedMeshes()
LLAssetType::EType asset_type = LLAssetType::lookup(data.mPostData["asset_type"].asString());
LLInventoryType::EType inventory_type = LLInventoryType::lookup(data.mPostData["inventory_type"].asString());
+ // Handle addition of texture, if any.
+ if ( data.mResponse.has("new_texture_folder_id") )
+ {
+ const LLUUID& folder_id = data.mResponse["new_texture_folder_id"].asUUID();
+
+ if ( folder_id.notNull() )
+ {
+ LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE);
+
+ std::string name;
+ // Check if the server built a different name for the texture folder
+ if ( data.mResponse.has("new_texture_folder_name") )
+ {
+ name = data.mResponse["new_texture_folder_name"].asString();
+ }
+ else
+ {
+ name = data.mPostData["name"].asString();
+ }
+
+ // Add the category to the internal representation
+ LLPointer<LLViewerInventoryCategory> cat =
+ new LLViewerInventoryCategory(folder_id, parent_id,
+ LLFolderType::FT_NONE, name, gAgent.getID());
+ cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN);
+
+ LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1);
+ gInventory.accountForUpdate(update);
+ gInventory.updateCategory(cat);
+ }
+ }
+
on_new_single_inventory_upload_complete(
asset_type,
inventory_type,
@@ -2414,7 +2276,8 @@ void LLMeshRepository::notifyLoadedMeshes()
data.mPostData["name"],
data.mPostData["description"],
data.mResponse,
- 0);
+ data.mResponse["upload_price"]);
+ //}
mInventoryQ.pop();
}
@@ -2439,18 +2302,9 @@ void LLMeshRepository::notifyLoadedMeshes()
}
}
- LLFastTimer t(FTM_MESH_UPDATE);
-
- {
- LLFastTimer t(FTM_MESH_LOCK1);
- mMeshMutex->lock();
- }
-
- {
- LLFastTimer t(FTM_MESH_LOCK2);
- mThread->mMutex->lock();
- }
-
+ mMeshMutex->lock();
+ mThread->mMutex->lock();
+
//popup queued error messages from background threads
while (!mUploadErrorQ.empty())
{
@@ -2502,7 +2356,6 @@ void LLMeshRepository::notifyLoadedMeshes()
while (!mPendingRequests.empty() && push_count > 0)
{
- LLFastTimer t(FTM_LOAD_MESH_LOD);
LLMeshRepoThread::LODRequest& request = mPendingRequests.front();
mThread->loadMeshLOD(request.mMeshParams, request.mLOD);
mPendingRequests.erase(mPendingRequests.begin());
@@ -2588,7 +2441,6 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol
if (volume->getNumVolumeFaces() <= 0)
{
llwarns << "Mesh loading returned empty volume." << llendl;
- volume->makeTetrahedron();
}
{ //update system volume
@@ -2596,6 +2448,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol
if (sys_volume)
{
sys_volume->copyVolumeFaces(volume);
+ sys_volume->setMeshAssetLoaded(TRUE);
LLPrimitive::getVolumeManager()->unrefVolume(sys_volume);
}
else
@@ -2652,26 +2505,7 @@ S32 LLMeshRepository::getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lo
return mThread->getActualMeshLOD(mesh_params, lod);
}
-U32 LLMeshRepository::calcResourceCost(LLSD& header)
-{
- U32 bytes = 0;
-
- for (U32 i = 0; i < 4; i++)
- {
- bytes += header[header_lod[i]]["size"].asInteger();
- }
-
- bytes += header["skin"]["size"].asInteger();
-
- return bytes/4096 + 1;
-}
-
-U32 LLMeshRepository::getResourceCost(const LLUUID& mesh_id)
-{
- return mThread->getResourceCost(mesh_id);
-}
-
-const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOVolume* requesting_obj)
+const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, const LLVOVolume* requesting_obj)
{
if (mesh_id.notNull())
{
@@ -2809,9 +2643,11 @@ LLSD& LLMeshRepoThread::getMeshHeader(const LLUUID& mesh_id)
void LLMeshRepository::uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,
- bool upload_skin, bool upload_joints)
+ bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload,
+ LLHandle<LLWholeModelFeeObserver> fee_observer, LLHandle<LLWholeModelUploadObserver> upload_observer)
{
- LLMeshUploadThread* thread = new LLMeshUploadThread(data, scale, upload_textures, upload_skin, upload_joints);
+ LLMeshUploadThread* thread = new LLMeshUploadThread(data, scale, upload_textures, upload_skin, upload_joints, upload_url,
+ do_upload, fee_observer, upload_observer);
mUploadWaitList.push_back(thread);
}
@@ -2839,101 +2675,6 @@ S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod)
}
-
-void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data)
-{
- if(isDiscarded())
- {
- return ;
- }
-
- if (!data.mRSVP.empty())
- {
- std::stringstream ostr;
-
- LLModel::Decomposition& decomp =
- data.mModel[LLModel::LOD_PHYSICS].notNull() ?
- data.mModel[LLModel::LOD_PHYSICS]->mPhysics :
- data.mBaseModel->mPhysics;
-
- decomp.mBaseHull = mHullMap[data.mBaseModel];
-
- LLModel::writeModel(
- ostr,
- data.mModel[LLModel::LOD_PHYSICS],
- data.mModel[LLModel::LOD_HIGH],
- data.mModel[LLModel::LOD_MEDIUM],
- data.mModel[LLModel::LOD_LOW],
- data.mModel[LLModel::LOD_IMPOSTOR],
- decomp,
- mUploadSkin,
- mUploadJoints);
-
- data.mAssetData = ostr.str();
-
- LLCurlRequest::headers_t headers;
- mPendingUploads++;
-
- mCurlRequest->post(data.mRSVP, headers, data.mAssetData, new LLMeshUploadResponder(data, this));
- }
-}
-
-void LLMeshUploadThread::doUploadTexture(LLTextureUploadData& data)
-{
- if(isDiscarded())
- {
- return ;
- }
-
- if (!data.mRSVP.empty())
- {
- std::stringstream ostr;
-
- if (!data.mTexture->isRawImageValid())
- {
- data.mTexture->reloadRawImage(data.mTexture->getDiscardLevel());
- }
-
- if(data.mTexture->hasSavedRawImage())
- {
- LLPointer<LLImageJ2C> upload_file = LLViewerTextureList::convertToUploadFile(data.mTexture->getSavedRawImage());
-
- ostr.write((const char*) upload_file->getData(), upload_file->getDataSize());
- }
-
- data.mAssetData = ostr.str();
-
- LLCurlRequest::headers_t headers;
- mPendingUploads++;
-
- mCurlRequest->post(data.mRSVP, headers, data.mAssetData, new LLTextureUploadResponder(data, this));
- }
-}
-
-
-void LLMeshUploadThread::onModelUploaded(LLMeshUploadData& data)
-{
- createObjects(data);
-}
-
-void LLMeshUploadThread::onTextureUploaded(LLTextureUploadData& data)
-{
- mTextureMap[data.mTexture] = data;
-}
-
-
-void LLMeshUploadThread::createObjects(LLMeshUploadData& data)
-{
- instance_list& instances = mInstance[data.mBaseModel];
-
- for (instance_list::iterator iter = instances.begin(); iter != instances.end(); ++iter)
- { //create prims that reference given mesh
- LLModelInstance& instance = *iter;
- instance.mMeshID = data.mUUID;
- mInstanceQ.push(instance);
- }
-}
-
void LLMeshUploadThread::decomposeMeshMatrix(LLMatrix4& transformation,
LLVector3& result_pos,
LLQuaternion& result_rot,
@@ -2974,147 +2715,6 @@ void LLMeshUploadThread::decomposeMeshMatrix(LLMatrix4& transformation,
result_rot = quat_rotation;
}
-
-LLSD LLMeshUploadThread::createObject(LLModelInstance& instance)
-{
- LLMatrix4 transformation = instance.mTransform;
-
- llassert(instance.mMeshID.notNull());
-
- // check for reflection
- BOOL reflected = (transformation.determinant() < 0);
-
- // compute position
- LLVector3 position = LLVector3(0, 0, 0) * transformation;
-
- // compute scale
- LLVector3 x_transformed = LLVector3(1, 0, 0) * transformation - position;
- LLVector3 y_transformed = LLVector3(0, 1, 0) * transformation - position;
- LLVector3 z_transformed = LLVector3(0, 0, 1) * transformation - position;
- F32 x_length = x_transformed.normalize();
- F32 y_length = y_transformed.normalize();
- F32 z_length = z_transformed.normalize();
- LLVector3 scale = LLVector3(x_length, y_length, z_length);
-
- // adjust for "reflected" geometry
- LLVector3 x_transformed_reflected = x_transformed;
- if (reflected)
- {
- x_transformed_reflected *= -1.0;
- }
-
- // compute rotation
- LLMatrix3 rotation_matrix;
- rotation_matrix.setRows(x_transformed_reflected, y_transformed, z_transformed);
- LLQuaternion quat_rotation = rotation_matrix.quaternion();
- quat_rotation.normalize(); // the rotation_matrix might not have been orthoginal. make it so here.
- LLVector3 euler_rotation;
- quat_rotation.getEulerAngles(&euler_rotation.mV[VX], &euler_rotation.mV[VY], &euler_rotation.mV[VZ]);
-
- //
- // build parameter block to construct this prim
- //
-
- LLSD object_params;
-
- // create prim
-
- // set volume params
- U8 sculpt_type = LL_SCULPT_TYPE_MESH;
- if (reflected)
- {
- sculpt_type |= LL_SCULPT_FLAG_MIRROR;
- }
- LLVolumeParams volume_params;
- volume_params.setType( LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE );
- volume_params.setBeginAndEndS( 0.f, 1.f );
- volume_params.setBeginAndEndT( 0.f, 1.f );
- volume_params.setRatio ( 1, 1 );
- volume_params.setShear ( 0, 0 );
- volume_params.setSculptID(instance.mMeshID, sculpt_type);
- object_params["shape"] = volume_params.asLLSD();
-
- object_params["material"] = LL_MCODE_WOOD;
-
- object_params["group-id"] = gAgent.getGroupID();
- object_params["pos"] = ll_sd_from_vector3(position + mOrigin);
- object_params["rotation"] = ll_sd_from_quaternion(quat_rotation);
- object_params["scale"] = ll_sd_from_vector3(scale);
- object_params["name"] = instance.mLabel;
-
- // load material from dae file
- object_params["facelist"] = LLSD::emptyArray();
- for (S32 i = 0; i < instance.mMaterial.size(); i++)
- {
- LLTextureEntry te;
- LLImportMaterial& mat = instance.mMaterial[i];
-
- te.setColor(mat.mDiffuseColor);
-
- LLUUID diffuse_id = mTextureMap[mat.mDiffuseMap].mUUID;
-
- if (diffuse_id.notNull())
- {
- te.setID(diffuse_id);
- }
- else
- {
- te.setID(LLUUID("5748decc-f629-461c-9a36-a35a221fe21f")); // blank texture
- }
-
- te.setFullbright(mat.mFullbright);
-
- object_params["facelist"][i] = te.asLLSD();
- }
-
- // set extra parameters
- LLSculptParams sculpt_params;
- sculpt_params.setSculptTexture(instance.mMeshID);
- sculpt_params.setSculptType(sculpt_type);
- U8 buffer[MAX_OBJECT_PARAMS_SIZE+1];
- LLDataPackerBinaryBuffer dp(buffer, MAX_OBJECT_PARAMS_SIZE);
- sculpt_params.pack(dp);
- std::vector<U8> v(dp.getCurrentSize());
- memcpy(&v[0], buffer, dp.getCurrentSize());
- LLSD extra_parameter;
- extra_parameter["extra_parameter"] = sculpt_params.mType;
- extra_parameter["param_data"] = v;
- object_params["extra_parameters"].append(extra_parameter);
-
- LLPermissions perm;
- perm.setOwnerAndGroup(gAgent.getID(), gAgent.getID(), LLUUID::null, false);
- perm.setCreator(gAgent.getID());
-
- perm.initMasks(PERM_ITEM_UNRESTRICTED | PERM_MOVE, //base
- PERM_ITEM_UNRESTRICTED | PERM_MOVE, //owner
- LLFloaterPerms::getEveryonePerms(),
- LLFloaterPerms::getGroupPerms(),
- LLFloaterPerms::getNextOwnerPerms());
-
- object_params["permissions"] = ll_create_sd_from_permissions(perm);
-
- object_params["physics_shape_type"] = (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL);
-
- return object_params;
-}
-
-void LLMeshUploadThread::priceResult(LLMeshUploadData& data, const LLSD& content)
-{
- mPendingCost += content["upload_price"].asInteger();
- data.mRSVP = content["rsvp"].asString();
-
- mConfirmedQ.push(data);
-}
-
-void LLMeshUploadThread::priceResult(LLTextureUploadData& data, const LLSD& content)
-{
- mPendingCost += content["upload_price"].asInteger();
- data.mRSVP = content["rsvp"].asString();
-
- mConfirmedTextureQ.push(data);
-}
-
-
bool LLImportMaterial::operator<(const LLImportMaterial &rhs) const
{
if (mDiffuseMap != rhs.mDiffuseMap)
@@ -3137,6 +2737,11 @@ bool LLImportMaterial::operator<(const LLImportMaterial &rhs) const
return mDiffuseColor < rhs.mDiffuseColor;
}
+ if (mBinding != rhs.mBinding)
+ {
+ return mBinding < rhs.mBinding;
+ }
+
return mFullbright < rhs.mFullbright;
}
@@ -3156,57 +2761,68 @@ void LLMeshRepository::uploadError(LLSD& args)
}
//static
-F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32* bytes_visible, S32 lod)
+F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32* bytes_visible, S32 lod, F32 *unscaled_value)
{
- F32 dlowest = llmin(radius/0.03f, 256.f);
- F32 dlow = llmin(radius/0.06f, 256.f);
- F32 dmid = llmin(radius/0.24f, 256.f);
+ F32 max_distance = 512.f;
+
+ F32 dlowest = llmin(radius/0.03f, max_distance);
+ F32 dlow = llmin(radius/0.06f, max_distance);
+ F32 dmid = llmin(radius/0.24f, max_distance);
- F32 bytes_lowest = header["lowest_lod"]["size"].asReal()/1024.f;
- F32 bytes_low = header["low_lod"]["size"].asReal()/1024.f;
- F32 bytes_mid = header["medium_lod"]["size"].asReal()/1024.f;
- F32 bytes_high = header["high_lod"]["size"].asReal()/1024.f;
+ F32 METADATA_DISCOUNT = (F32) gSavedSettings.getU32("MeshMetaDataDiscount"); //discount 128 bytes to cover the cost of LLSD tags and compression domain overhead
+ F32 MINIMUM_SIZE = (F32) gSavedSettings.getU32("MeshMinimumByteSize"); //make sure nothing is "free"
- if (bytes)
- {
- *bytes = 0;
- *bytes += header["lowest_lod"]["size"].asInteger();
- *bytes += header["low_lod"]["size"].asInteger();
- *bytes += header["medium_lod"]["size"].asInteger();
- *bytes += header["high_lod"]["size"].asInteger();
- }
+ F32 bytes_per_triangle = (F32) gSavedSettings.getU32("MeshBytesPerTriangle");
+ S32 bytes_lowest = header["lowest_lod"]["size"].asInteger();
+ S32 bytes_low = header["low_lod"]["size"].asInteger();
+ S32 bytes_mid = header["medium_lod"]["size"].asInteger();
+ S32 bytes_high = header["high_lod"]["size"].asInteger();
- if (bytes_visible)
- {
- lod = LLMeshRepository::getActualMeshLOD(header, lod);
- if (lod >= 0 && lod <= 3)
- {
- *bytes_visible = header[header_lod[lod]]["size"].asInteger();
- }
- }
-
- if (bytes_high == 0.f)
+ if (bytes_high == 0)
{
return 0.f;
}
- if (bytes_mid == 0.f)
+ if (bytes_mid == 0)
{
bytes_mid = bytes_high;
}
- if (bytes_low == 0.f)
+ if (bytes_low == 0)
{
bytes_low = bytes_mid;
}
- if (bytes_lowest == 0.f)
+ if (bytes_lowest == 0)
{
bytes_lowest = bytes_low;
}
- F32 max_area = 65536.f;
+ F32 triangles_lowest = llmax((F32) bytes_lowest-METADATA_DISCOUNT, MINIMUM_SIZE)/bytes_per_triangle;
+ F32 triangles_low = llmax((F32) bytes_low-METADATA_DISCOUNT, MINIMUM_SIZE)/bytes_per_triangle;
+ F32 triangles_mid = llmax((F32) bytes_mid-METADATA_DISCOUNT, MINIMUM_SIZE)/bytes_per_triangle;
+ F32 triangles_high = llmax((F32) bytes_high-METADATA_DISCOUNT, MINIMUM_SIZE)/bytes_per_triangle;
+
+ if (bytes)
+ {
+ *bytes = 0;
+ *bytes += header["lowest_lod"]["size"].asInteger();
+ *bytes += header["low_lod"]["size"].asInteger();
+ *bytes += header["medium_lod"]["size"].asInteger();
+ *bytes += header["high_lod"]["size"].asInteger();
+ }
+
+ if (bytes_visible)
+ {
+ lod = LLMeshRepository::getActualMeshLOD(header, lod);
+ if (lod >= 0 && lod <= 3)
+ {
+ *bytes_visible = header[header_lod[lod]]["size"].asInteger();
+ }
+ }
+
+ F32 max_area = 102932.f; //area of circle that encompasses region
F32 min_area = 1.f;
F32 high_area = llmin(F_PI*dmid*dmid, max_area);
@@ -3229,12 +2845,17 @@ F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32
low_area /= total_area;
lowest_area /= total_area;
- F32 weighted_avg = bytes_high*high_area +
- bytes_mid*mid_area +
- bytes_low*low_area +
- bytes_lowest*lowest_area;
+ F32 weighted_avg = triangles_high*high_area +
+ triangles_mid*mid_area +
+ triangles_low*low_area +
+ triangles_lowest*lowest_area;
+
+ if (unscaled_value)
+ {
+ *unscaled_value = weighted_avg;
+ }
- return weighted_avg * gSavedSettings.getF32("MeshStreamingCostScaler");
+ return weighted_avg/gSavedSettings.getU32("MeshTriangleBudget")*15000.f;
}
@@ -3291,24 +2912,27 @@ S32 LLPhysicsDecomp::llcdCallback(const char* status, S32 p1, S32 p2)
return 1;
}
-void LLPhysicsDecomp::setMeshData(LLCDMeshData& mesh)
+void LLPhysicsDecomp::setMeshData(LLCDMeshData& mesh, bool vertex_based)
{
mesh.mVertexBase = mCurRequest->mPositions[0].mV;
mesh.mVertexStrideBytes = 12;
mesh.mNumVertices = mCurRequest->mPositions.size();
- mesh.mIndexType = LLCDMeshData::INT_16;
- mesh.mIndexBase = &(mCurRequest->mIndices[0]);
- mesh.mIndexStrideBytes = 6;
+ if(!vertex_based)
+ {
+ mesh.mIndexType = LLCDMeshData::INT_16;
+ mesh.mIndexBase = &(mCurRequest->mIndices[0]);
+ mesh.mIndexStrideBytes = 6;
- mesh.mNumTriangles = mCurRequest->mIndices.size()/3;
+ mesh.mNumTriangles = mCurRequest->mIndices.size()/3;
+ }
- if (mesh.mNumTriangles > 0 && mesh.mNumVertices > 2)
+ if ((vertex_based || mesh.mNumTriangles > 0) && mesh.mNumVertices > 2)
{
LLCDResult ret = LLCD_OK;
if (LLConvexDecomposition::getInstance() != NULL)
{
- ret = LLConvexDecomposition::getInstance()->setMeshData(&mesh);
+ ret = LLConvexDecomposition::getInstance()->setMeshData(&mesh, vertex_based);
}
if (ret)
@@ -3332,7 +2956,7 @@ void LLPhysicsDecomp::doDecomposition()
//load data intoLLCD
if (stage == 0)
{
- setMeshData(mesh);
+ setMeshData(mesh, false);
}
//build parameter map
@@ -3506,11 +3130,55 @@ void make_box(LLPhysicsDecomp::Request * request)
void LLPhysicsDecomp::doDecompositionSingleHull()
{
- LLCDMeshData mesh;
-
- setMeshData(mesh);
-
+ LLConvexDecomposition* decomp = LLConvexDecomposition::getInstance();
+
+ if (decomp == NULL)
+ {
+ //stub. do nothing.
+ return;
+ }
+ LLCDMeshData mesh;
+
+#if 1
+ setMeshData(mesh, true);
+
+ LLCDResult ret = decomp->buildSingleHull() ;
+ if(ret)
+ {
+ llwarns << "Could not execute decomposition stage when attempting to create single hull." << llendl;
+ make_box(mCurRequest);
+ }
+ else
+ {
+ mMutex->lock();
+ mCurRequest->mHull.clear();
+ mCurRequest->mHull.resize(1);
+ mCurRequest->mHullMesh.clear();
+ mMutex->unlock();
+
+ std::vector<LLVector3> p;
+ LLCDHull hull;
+
+ // if LLConvexDecomposition is a stub, num_hulls should have been set to 0 above, and we should not reach this code
+ decomp->getSingleHull(&hull);
+
+ const F32* v = hull.mVertexBase;
+
+ for (S32 j = 0; j < hull.mNumVertices; ++j)
+ {
+ LLVector3 vert(v[0], v[1], v[2]);
+ p.push_back(vert);
+ v = (F32*) (((U8*) v) + hull.mVertexStrideBytes);
+ }
+
+ mMutex->lock();
+ mCurRequest->mHull[0] = p;
+ mMutex->unlock();
+ }
+#else
+ setMeshData(mesh, false);
+
//set all parameters to default
std::map<std::string, const LLCDParam*> param_map;
@@ -3519,23 +3187,15 @@ void LLPhysicsDecomp::doDecompositionSingleHull()
if (!params)
{
- param_count = LLConvexDecomposition::getInstance()->getParameters(&params);
+ param_count = decomp->getParameters(&params);
}
- LLConvexDecomposition* decomp = LLConvexDecomposition::getInstance();
-
- if (decomp == NULL)
- {
- //stub. do nothing.
- return;
- }
-
for (S32 i = 0; i < param_count; ++i)
{
decomp->setParam(params[i].mName, params[i].mDefault.mIntOrEnumValue);
}
- const S32 STAGE_DECOMPOSE = mStageID["Decompose"];
+ const S32 STAGE_DECOMPOSE = mStageID["Decompose"];
const S32 STAGE_SIMPLIFY = mStageID["Simplify"];
const S32 DECOMP_PREVIEW = 0;
const S32 SIMPLIFY_RETAIN = 0;
@@ -3597,7 +3257,7 @@ void LLPhysicsDecomp::doDecompositionSingleHull()
}
}
}
-
+#endif
{
completeCurrent();
@@ -3760,7 +3420,8 @@ LLModelInstance::LLModelInstance(LLSD& data)
for (U32 i = 0; i < data["material"].size(); ++i)
{
- mMaterial.push_back(LLImportMaterial(data["material"][i]));
+ LLImportMaterial mat(data["material"][i]);
+ mMaterial[mat.mBinding] = mat;
}
}
@@ -3773,9 +3434,10 @@ LLSD LLModelInstance::asLLSD()
ret["label"] = mLabel;
ret["transform"] = mTransform.getValue();
- for (U32 i = 0; i < mMaterial.size(); ++i)
+ U32 i = 0;
+ for (std::map<std::string, LLImportMaterial>::iterator iter = mMaterial.begin(); iter != mMaterial.end(); ++iter)
{
- ret["material"][i] = mMaterial[i].asLLSD();
+ ret["material"][i++] = iter->second.asLLSD();
}
return ret;
@@ -3787,6 +3449,7 @@ LLImportMaterial::LLImportMaterial(LLSD& data)
mDiffuseMapLabel = data["diffuse"]["label"].asString();
mDiffuseColor.setValue(data["diffuse"]["color"]);
mFullbright = data["fullbright"].asBoolean();
+ mBinding = data["binding"].asString();
}
@@ -3798,7 +3461,8 @@ LLSD LLImportMaterial::asLLSD()
ret["diffuse"]["label"] = mDiffuseMapLabel;
ret["diffuse"]["color"] = mDiffuseColor.getValue();
ret["fullbright"] = mFullbright;
-
+ ret["binding"] = mBinding;
+
return ret;
}
@@ -3849,8 +3513,7 @@ void LLMeshRepository::buildPhysicsMesh(LLModel::Decomposition& decomp)
bool LLMeshRepository::meshUploadEnabled()
{
LLViewerRegion *region = gAgent.getRegion();
- if(gSavedSettings.getBOOL("MeshEnabled") &&
- LLViewerParcelMgr::getInstance()->allowAgentBuild() &&
+ if(gSavedSettings.getBOOL("MeshEnabled") &&
region)
{
return region->meshUploadEnabled();
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index f237c3a60e..31b84ea0d9 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -36,6 +36,7 @@
#define LLCONVEXDECOMPINTER_STATIC 1
#include "llconvexdecomposition.h"
+#include "lluploadfloaterobservers.h"
class LLVOVolume;
class LLMeshResponder;
@@ -91,6 +92,7 @@ public:
LLPointer<LLViewerFetchedTexture> mDiffuseMap;
std::string mDiffuseMapFilename;
std::string mDiffuseMapLabel;
+ std::string mBinding;
LLColor4 mDiffuseColor;
bool mFullbright;
@@ -119,9 +121,9 @@ public:
S32 mLocalMeshID;
LLMatrix4 mTransform;
- std::vector<LLImportMaterial> mMaterial;
+ std::map<std::string, LLImportMaterial> mMaterial;
- LLModelInstance(LLModel* model, const std::string& label, LLMatrix4& transform, std::vector<LLImportMaterial>& materials)
+ LLModelInstance(LLModel* model, const std::string& label, LLMatrix4& transform, std::map<std::string, LLImportMaterial>& materials)
: mModel(model), mLabel(label), mTransform(transform), mMaterial(materials)
{
mLocalMeshID = -1;
@@ -189,7 +191,7 @@ public:
static S32 llcdCallback(const char*, S32, S32);
void cancel();
- void setMeshData(LLCDMeshData& mesh);
+ void setMeshData(LLCDMeshData& mesh, bool vertex_based);
void doDecomposition();
void doDecompositionSingleHull();
@@ -229,8 +231,7 @@ public:
mesh_header_map mMeshHeader;
std::map<LLUUID, U32> mMeshHeaderSize;
- std::map<LLUUID, U32> mMeshResourceCost;
-
+
class HeaderRequest
{
public:
@@ -333,8 +334,7 @@ public:
void notifyLoadedMeshes();
S32 getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
- U32 getResourceCost(const LLUUID& mesh_params);
-
+
void loadMeshSkinInfo(const LLUUID& mesh_id);
void loadMeshDecomposition(const LLUUID& mesh_id);
void loadMeshPhysicsShape(const LLUUID& mesh_id);
@@ -356,6 +356,9 @@ public:
class LLMeshUploadThread : public LLThread
{
+private:
+ S32 mMeshUploadTimeOut ; //maximum time in seconds to execute an uploading request.
+
public:
class DecompRequest : public LLPhysicsDecomp::Request
{
@@ -385,9 +388,7 @@ public:
LLMutex* mMutex;
LLCurlRequest* mCurlRequest;
- S32 mPendingConfirmations;
S32 mPendingUploads;
- S32 mPendingCost;
LLVector3 mOrigin;
bool mFinished;
bool mUploadTextures;
@@ -399,38 +400,21 @@ public:
std::string mWholeModelFeeCapability;
std::string mWholeModelUploadURL;
- std::queue<LLMeshUploadData> mUploadQ;
- std::queue<LLMeshUploadData> mConfirmedQ;
- std::queue<LLModelInstance> mInstanceQ;
-
- std::queue<LLTextureUploadData> mTextureQ;
- std::queue<LLTextureUploadData> mConfirmedTextureQ;
-
- std::map<LLViewerFetchedTexture*, LLTextureUploadData> mTextureMap;
-
LLMeshUploadThread(instance_list& data, LLVector3& scale, bool upload_textures,
- bool upload_skin, bool upload_joints);
+ bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload = true,
+ LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()), LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>()));
~LLMeshUploadThread();
- void uploadTexture(LLTextureUploadData& data);
- void doUploadTexture(LLTextureUploadData& data);
- void priceResult(LLTextureUploadData& data, const LLSD& content);
- void onTextureUploaded(LLTextureUploadData& data);
-
- void uploadModel(LLMeshUploadData& data);
- void doUploadModel(LLMeshUploadData& data);
- void onModelUploaded(LLMeshUploadData& data);
- void createObjects(LLMeshUploadData& data);
- LLSD createObject(LLModelInstance& instance);
- void priceResult(LLMeshUploadData& data, const LLSD& content);
-
bool finished() { return mFinished; }
virtual void run();
void preStart();
void discard() ;
BOOL isDiscarded();
+ void generateHulls();
+
void doWholeModelUpload();
+ void requestWholeModelFee();
void wholeModelToLLSD(LLSD& dest, bool include_textures);
@@ -438,6 +422,15 @@ public:
LLVector3& result_pos,
LLQuaternion& result_rot,
LLVector3& result_scale);
+
+ void setFeeObserverHandle(LLHandle<LLWholeModelFeeObserver> observer_handle) { mFeeObserverHandle = observer_handle; }
+ void setUploadObserverHandle(LLHandle<LLWholeModelUploadObserver> observer_handle) { mUploadObserverHandle = observer_handle; }
+
+private:
+ LLHandle<LLWholeModelFeeObserver> mFeeObserverHandle;
+ LLHandle<LLWholeModelUploadObserver> mUploadObserverHandle;
+
+ bool mDoUpload; // if FALSE only model data will be requested, otherwise the model will be uploaded
};
class LLMeshRepository
@@ -452,7 +445,7 @@ public:
static U32 sCacheBytesWritten;
static U32 sPeakKbps;
- static F32 getStreamingCost(LLSD& header, F32 radius, S32* bytes = NULL, S32* visible_bytes = NULL, S32 detail = -1);
+ static F32 getStreamingCost(LLSD& header, F32 radius, S32* bytes = NULL, S32* visible_bytes = NULL, S32 detail = -1, F32 *unscaled_value = NULL);
LLMeshRepository();
@@ -471,9 +464,7 @@ public:
S32 getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
static S32 getActualMeshLOD(LLSD& header, S32 lod);
- U32 calcResourceCost(LLSD& header);
- U32 getResourceCost(const LLUUID& mesh_params);
- const LLMeshSkinInfo* getSkinInfo(const LLUUID& mesh_id, LLVOVolume* requesting_obj);
+ const LLMeshSkinInfo* getSkinInfo(const LLUUID& mesh_id, const LLVOVolume* requesting_obj);
LLModel::Decomposition* getDecomposition(const LLUUID& mesh_id);
void fetchPhysicsShape(const LLUUID& mesh_id);
bool hasPhysicsShape(const LLUUID& mesh_id);
@@ -488,7 +479,8 @@ public:
LLSD& getMeshHeader(const LLUUID& mesh_id);
void uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,
- bool upload_skin, bool upload_joints);
+ bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload = true,
+ LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()), LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>()));
S32 getMeshSize(const LLUUID& mesh_id, S32 lod);
diff --git a/indra/newview/llmorphview.h b/indra/newview/llmorphview.h
index 1d8ee8e944..318d49bba5 100644
--- a/indra/newview/llmorphview.h
+++ b/indra/newview/llmorphview.h
@@ -40,8 +40,8 @@ public:
{
Params()
{
- mouse_opaque(false);
- follows.flags(FOLLOWS_ALL);
+ changeDefault(mouse_opaque, false);
+ changeDefault(follows.flags, FOLLOWS_ALL);
}
};
LLMorphView(const LLMorphView::Params&);
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 142ee40cc8..c3d8b91d67 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -37,7 +37,6 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llvoavatarself.h" // to check gAgentAvatarp->isSitting()
-#include "llbottomtray.h"
#include "llbutton.h"
#include "llfirstuse.h"
#include "llfloaterreg.h"
@@ -46,7 +45,8 @@
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
-#include "llselectmgr.h"
+#include "llselectmgr.h"
+#include "lltoolbarview.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "lltooltip.h"
@@ -59,15 +59,13 @@ const F32 MOVE_BUTTON_DELAY = 0.0f;
const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed
const F32 NUDGE_TIME = 0.25f; // in seconds
-const std::string BOTTOM_TRAY_BUTTON_NAME = "movement_btn";
-
//
// Member functions
//
// protected
LLFloaterMove::LLFloaterMove(const LLSD& key)
-: LLTransientDockableFloater(NULL, true, key),
+: LLFloater(key),
mForwardButton(NULL),
mBackwardButton(NULL),
mTurnLeftButton(NULL),
@@ -92,12 +90,8 @@ LLFloaterMove::~LLFloaterMove()
// virtual
BOOL LLFloaterMove::postBuild()
{
- setIsChrome(TRUE);
- setTitleVisible(TRUE); // restore title visibility after chrome applying
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
- LLDockableFloater::postBuild();
-
// Code that implements floater buttons toggling when user moves via keyboard is located in LLAgent::propagate()
mForwardButton = getChild<LLJoystickAgentTurn>("forward btn");
@@ -155,10 +149,10 @@ BOOL LLFloaterMove::postBuild()
// virtual
void LLFloaterMove::setVisible(BOOL visible)
{
- // Do nothing with Stand/Stop Flying panel in excessive calls of this method (from LLTransientFloaterMgr?).
+ // Do nothing with Stand/Stop Flying panel in excessive calls of this method.
if (getVisible() == visible)
{
- LLTransientDockableFloater::setVisible(visible);
+ LLFloater::setVisible(visible);
return;
}
@@ -177,7 +171,7 @@ void LLFloaterMove::setVisible(BOOL visible)
LLPanelStandStopFlying::getInstance()->reparent(NULL);
}
- LLTransientDockableFloater::setVisible(visible);
+ LLFloater::setVisible(visible);
}
// static
@@ -441,30 +435,6 @@ void LLFloaterMove::setModeTitle(const EMovementMode mode)
setTitle(title);
}
-/**
- * Updates position of the floater to be center aligned with Move button.
- */
-void LLFloaterMove::updatePosition()
-{
- LLBottomTray* tray = LLBottomTray::getInstance();
- if (!tray) return;
-
- LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
-
- if (movement_btn)
- {
- //align centers of a button and a floater
- S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
-
- S32 y = 0;
- if (!mModeActionsPanel->getVisible())
- {
- y = mModeActionsPanel->getRect().getHeight();
- }
- setOrigin(x, y);
- }
-}
-
//static
void LLFloaterMove::sUpdateFlyingStatus()
{
@@ -499,8 +469,6 @@ void LLFloaterMove::enableInstance(BOOL bEnable)
void LLFloaterMove::onOpen(const LLSD& key)
{
- LLButton *anchor_panel = LLBottomTray::getInstance()->getChild<LLButton>("movement_btn");
-
if (gAgent.getFlying())
{
setFlyingMode(TRUE);
@@ -513,19 +481,9 @@ void LLFloaterMove::onOpen(const LLSD& key)
showModeButtons(FALSE);
}
- setDockControl(new LLDockControl(
- anchor_panel, this,
- getDockTongue(), LLDockControl::TOP));
-
sUpdateFlyingStatus();
}
-//virtual
-void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/)
-{
- LLTransientDockableFloater::setDocked(docked, pop_on_undock);
-}
-
void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode)
{
llassert_always(mModeControlButtonMap.end() != mModeControlButtonMap.find(mode));
@@ -736,23 +694,30 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick()
*/
void LLPanelStandStopFlying::updatePosition()
{
- LLBottomTray* tray = LLBottomTray::getInstance();
- if (!tray || mAttached) return;
+ if (mAttached) return;
- LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
+ S32 y_pos = 0;
+ S32 bottom_tb_center = 0;
+ if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom"))
+ {
+ y_pos = toolbar_bottom->getRect().getHeight();
+ bottom_tb_center = toolbar_bottom->getRect().getCenterX();
+ }
- S32 x = 0;
- if (movement_btn)
+ S32 left_tb_width = 0;
+ if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left"))
{
- // Align centers of the button and the panel.
- x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+ left_tb_width = toolbar_left->getRect().getWidth();
}
- else
+
+ if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("stand_stop_flying_container"))
{
- x = tray->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+ panel_ssf_container->setOrigin(0, y_pos);
}
- setOrigin(x, 0);
-}
+ S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width;
+
+ setOrigin( x_pos, 0);
+}
// EOF
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index 1b87864651..744dd866d4 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -28,7 +28,7 @@
#define LL_LLMOVEVIEW_H
// Library includes
-#include "lltransientdockablefloater.h"
+#include "llfloater.h"
class LLButton;
class LLJoystickAgentTurn;
@@ -38,7 +38,7 @@ class LLJoystickAgentSlide;
// Classes
//
class LLFloaterMove
-: public LLTransientDockableFloater
+: public LLFloater
{
LOG_CLASS(LLFloaterMove);
friend class LLFloaterReg;
@@ -58,7 +58,6 @@ public:
static void setSittingMode(BOOL bSitting);
static void enableInstance(BOOL bEnable);
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
static void sUpdateFlyingStatus();
@@ -87,7 +86,6 @@ private:
void initModeButtonMap();
void setModeButtonToggleState(const EMovementMode mode);
void updateButtonsWithMovementMode(const EMovementMode newMode);
- void updatePosition();
void showModeButtons(BOOL bShow);
public:
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index afceb58ccf..4e28d1f526 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -57,7 +57,6 @@ LLNameListCtrl::Params::Params()
allow_calling_card_drop("allow_calling_card_drop", false),
short_names("short_names", false)
{
- name = "name_list";
}
LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index d64fdbe6a5..ca9956dc53 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -61,7 +61,7 @@ public:
{}
};
- struct NameColumn : public LLInitParam::Choice<NameColumn>
+ struct NameColumn : public LLInitParam::ChoiceBlock<NameColumn>
{
Alternative<S32> column_index;
Alternative<std::string> column_name;
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index b8832dfd8e..2a08cb1845 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -45,7 +45,6 @@
#include "llpaneltopinfobar.h"
#include "llteleporthistory.h"
#include "llsearchcombobox.h"
-#include "llsidetray.h"
#include "llslurl.h"
#include "llurlregistry.h"
#include "llurldispatcher.h"
@@ -55,7 +54,6 @@
#include "llworldmapmessage.h"
#include "llappviewer.h"
#include "llviewercontrol.h"
-#include "llfloatermediabrowser.h"
#include "llweb.h"
#include "llhints.h"
@@ -269,7 +267,6 @@ LLNavigationBar::LLNavigationBar()
mBtnForward(NULL),
mBtnHome(NULL),
mCmbLocation(NULL),
- mSearchComboBox(NULL),
mPurgeTPHistoryItems(false),
mSaveToLocationHistory(false)
{
@@ -291,10 +288,7 @@ BOOL LLNavigationBar::postBuild()
mBtnForward = getChild<LLPullButton>("forward_btn");
mBtnHome = getChild<LLButton>("home_btn");
- mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
- mSearchComboBox = getChild<LLSearchComboBox>("search_combo_box");
-
- fillSearchComboBox();
+ mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
mBtnBack->setEnabled(FALSE);
mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this));
@@ -309,8 +303,6 @@ BOOL LLNavigationBar::postBuild()
mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this));
mCmbLocation->setCommitCallback(boost::bind(&LLNavigationBar::onLocationSelection, this));
-
- mSearchComboBox->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this));
mTeleportFinishConnection = LLViewerParcelMgr::getInstance()->
setTeleportFinishedCallback(boost::bind(&LLNavigationBar::onTeleportFinished, this, _1));
@@ -325,7 +317,7 @@ BOOL LLNavigationBar::postBuild()
LLTeleportHistory::getInstance()->setHistoryChangedCallback(
boost::bind(&LLNavigationBar::onTeleportHistoryChanged, this));
- LLHints::registerHintTarget("nav_bar", LLView::getHandle());
+ LLHints::registerHintTarget("nav_bar", getHandle());
return TRUE;
}
@@ -344,26 +336,6 @@ void LLNavigationBar::setVisible(BOOL visible)
}
}
-
-void LLNavigationBar::fillSearchComboBox()
-{
- if(!mSearchComboBox)
- {
- return;
- }
-
- LLSearchHistory::getInstance()->load();
-
- LLSearchHistory::search_history_list_t search_list =
- LLSearchHistory::getInstance()->getSearchHistoryList();
- LLSearchHistory::search_history_list_t::const_iterator it = search_list.begin();
- for( ; search_list.end() != it; ++it)
- {
- LLSearchHistory::LLSearchHistoryItem item = *it;
- mSearchComboBox->add(item.search_query);
- }
-}
-
void LLNavigationBar::draw()
{
if(mPurgeTPHistoryItems)
@@ -416,16 +388,6 @@ void LLNavigationBar::onHomeButtonClicked()
gAgent.teleportHome();
}
-void LLNavigationBar::onSearchCommit()
-{
- std::string search_query = mSearchComboBox->getSimple();
- if(!search_query.empty())
- {
- LLSearchHistory::getInstance()->addEntry(search_query);
- }
- invokeSearch(search_query);
-}
-
void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata)
{
int idx = userdata.asInteger();
@@ -716,7 +678,7 @@ void LLNavigationBar::handleLoginComplete()
void LLNavigationBar::invokeSearch(std::string search_text)
{
- LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("id", LLSD(search_text)));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("query", LLSD(search_text)));
}
void LLNavigationBar::clearHistoryCache()
@@ -736,151 +698,3 @@ int LLNavigationBar::getDefFavBarHeight()
{
return mDefaultFpRect.getHeight();
}
-
-void LLNavigationBar::showNavigationPanel(BOOL visible)
-{
- bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
-
- LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite");
- LLPanel* navPanel = getChild<LLPanel>("navigation_panel");
-
- LLRect nbRect(getRect());
- LLRect fbRect(fb->getRect());
-
- navPanel->setVisible(visible);
-
- if (visible)
- {
- if (fpVisible)
- {
- // Navigation Panel must be shown. Favorites Panel is visible.
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), mDefaultNbRect.getHeight());
- fbRect.setLeftTopAndSize(fbRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight());
-
- // this is duplicated in 'else' section because it should be called BEFORE fb->reshape
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- // propagate size to parent container
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
-
- fb->reshape(fbRect.getWidth(), fbRect.getHeight());
- fb->setRect(fbRect);
- }
- else
- {
- // Navigation Panel must be shown. Favorites Panel is hidden.
-
- S32 height = mDefaultNbRect.getHeight() - mDefaultFpRect.getHeight() - FAVBAR_TOP_PADDING;
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), height);
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
- }
- }
- else
- {
- if (fpVisible)
- {
- // Navigation Panel must be hidden. Favorites Panel is visible.
-
- S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING;
- S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight);
- fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight());
-
- // this is duplicated in 'else' section because it should be called BEFORE fb->reshape
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
-
- fb->reshape(fbRect.getWidth(), fbRect.getHeight());
- fb->setRect(fbRect);
- }
- else
- {
- // Navigation Panel must be hidden. Favorites Panel is hidden.
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0);
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
- }
- }
-
- getChildView("bg_icon")->setVisible( visible && fpVisible);
- getChildView("bg_icon_no_fav_bevel")->setVisible( visible && !fpVisible);
- getChildView("bg_icon_no_nav_bevel")->setVisible( !visible && fpVisible);
-}
-
-void LLNavigationBar::showFavoritesPanel(BOOL visible)
-{
- bool npVisible = gSavedSettings.getBOOL("ShowNavbarNavigationPanel");
-
- LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite");
-
- LLRect nbRect(getRect());
- LLRect fbRect(fb->getRect());
-
- if (visible)
- {
- if (npVisible)
- {
- // Favorites Panel must be shown. Navigation Panel is visible.
-
- S32 fbHeight = fbRect.getHeight();
- S32 newHeight = nbRect.getHeight() + fbHeight + FAVBAR_TOP_PADDING;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
- fbRect.setLeftTopAndSize(mDefaultFpRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight());
- }
- else
- {
- // Favorites Panel must be shown. Navigation Panel is hidden.
-
- S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING;
- S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight);
- fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight());
- }
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
-
- fb->reshape(fbRect.getWidth(), fbRect.getHeight());
- fb->setRect(fbRect);
- }
- else
- {
- if (npVisible)
- {
- // Favorites Panel must be hidden. Navigation Panel is visible.
-
- S32 fbHeight = fbRect.getHeight();
- S32 newHeight = nbRect.getHeight() - fbHeight - FAVBAR_TOP_PADDING;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
- }
- else
- {
- // Favorites Panel must be hidden. Navigation Panel is hidden.
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0);
- }
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
- }
-
- getChildView("bg_icon")->setVisible( npVisible && visible);
- getChildView("bg_icon_no_fav_bevel")->setVisible( npVisible && !visible);
- getChildView("bg_icon_no_nav_bevel")->setVisible( !npVisible && visible);
-
- fb->setVisible(visible);
-}
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index 3c9f8a762d..e4ce9e3998 100644
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -98,9 +98,6 @@ public:
void handleLoginComplete();
void clearHistoryCache();
- void showNavigationPanel(BOOL visible);
- void showFavoritesPanel(BOOL visible);
-
int getDefNavBarHeight();
int getDefFavBarHeight();
@@ -121,7 +118,6 @@ private:
void onHomeButtonClicked();
void onLocationSelection();
void onLocationPrearrange(const LLSD& data);
- void onSearchCommit();
void onTeleportFinished(const LLVector3d& global_agent_pos);
void onTeleportFailed();
void onRegionNameResponse(
@@ -131,8 +127,6 @@ private:
U64 region_handle, const std::string& url,
const LLUUID& snapshot_id, bool teleport);
- void fillSearchComboBox();
-
static void destroyClass()
{
if (LLNavigationBar::instanceExists())
@@ -145,7 +139,6 @@ private:
LLPullButton* mBtnBack;
LLPullButton* mBtnForward;
LLButton* mBtnHome;
- LLSearchComboBox* mSearchComboBox;
LLLocationInputCtrl* mCmbLocation;
LLRect mDefaultNbRect;
LLRect mDefaultFpRect;
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 03ebc344f1..a7303ad035 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -32,8 +32,9 @@
#include "llrootview.h"
//#include "llchatitemscontainerctrl.h"
#include "lliconctrl.h"
-#include "llsidetray.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfocusmgr.h"
+#include "lllogchat.h"
#include "llresizebar.h"
#include "llresizehandle.h"
#include "llmenugl.h"
@@ -50,21 +51,18 @@
#include "lldraghandle.h"
-#include "llbottomtray.h"
#include "llnearbychatbar.h"
#include "llfloaterreg.h"
#include "lltrans.h"
static const S32 RESIZE_BAR_THICKNESS = 3;
-LLNearbyChat::LLNearbyChat(const LLSD& key)
- : LLDockableFloater(NULL, false, false, key)
- ,mChatHistory(NULL)
-{
-
-}
-LLNearbyChat::~LLNearbyChat()
+static LLRegisterPanelClassWrapper<LLNearbyChat> t_panel_nearby_chat("panel_nearby_chat");
+
+LLNearbyChat::LLNearbyChat(const LLNearbyChat::Params& p)
+: LLPanel(p),
+ mChatHistory(NULL)
{
}
@@ -86,54 +84,12 @@ BOOL LLNearbyChat::postBuild()
mChatHistory = getChild<LLChatHistory>("chat_history");
- if(!LLDockableFloater::postBuild())
+ if(!LLPanel::postBuild())
return false;
-
- if (getDockControl() == NULL)
- {
- setDockControl(new LLDockControl(
- LLBottomTray::getInstance()->getNearbyChatBar(), this,
- getDockTongue(), LLDockControl::TOP, boost::bind(&LLNearbyChat::getAllowedRect, this, _1)));
- }
-
- //fix for EXT-4621
- //chrome="true" prevents floater from stilling capture
- setIsChrome(true);
- //chrome="true" hides floater caption
- if (mDragHandle)
- mDragHandle->setTitleVisible(TRUE);
-
+
return true;
}
-
-void LLNearbyChat::applySavedVariables()
-{
- if (mRectControl.size() > 1)
- {
- const LLRect& rect = LLFloater::getControlGroup()->getRect(mRectControl);
- if(!rect.isEmpty() && rect.isValid())
- {
- reshape(rect.getWidth(), rect.getHeight());
- setRect(rect);
- }
- }
-
-
- if(!LLFloater::getControlGroup()->controlExists(mDocStateControl))
- {
- setDocked(true);
- }
- else
- {
- if (mDocStateControl.size() > 1)
- {
- bool dockState = LLFloater::getControlGroup()->getBOOL(mDocStateControl);
- setDocked(dockState);
- }
- }
-}
-
std::string appendTime()
{
time_t utc_time;
@@ -203,7 +159,7 @@ void LLNearbyChat::onNearbySpeakers()
{
LLSD param;
param["people_panel_tab_name"] = "nearby_panel";
- LLSideTray::getInstance()->showPanel("panel_people",param);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_people", param);
}
@@ -218,30 +174,26 @@ bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
return false;
}
-void LLNearbyChat::setVisible(BOOL visible)
+void LLNearbyChat::removeScreenChat()
{
- if(visible)
+ LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
+ if(chat_channel)
{
- LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
- if(chat_channel)
- {
- chat_channel->removeToastsFromChannel();
- }
+ chat_channel->removeToastsFromChannel();
}
-
- LLDockableFloater::setVisible(visible);
}
-void LLNearbyChat::onOpen(const LLSD& key )
+void LLNearbyChat::setVisible(BOOL visible)
{
- LLDockableFloater::onOpen(key);
-}
+ if(visible)
+ {
+ removeScreenChat();
+ }
-void LLNearbyChat::setRect (const LLRect &rect)
-{
- LLDockableFloater::setRect(rect);
+ LLPanel::setVisible(visible);
}
+
void LLNearbyChat::getAllowedRect(LLRect& rect)
{
rect = gViewerWindow->getWorldViewRectScaled();
@@ -263,7 +215,8 @@ void LLNearbyChat::updateChatHistoryStyle()
//static
void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue)
{
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
+ LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat");
if(nearby_chat)
nearby_chat->updateChatHistoryStyle();
}
@@ -339,7 +292,8 @@ void LLNearbyChat::loadHistory()
//static
LLNearbyChat* LLNearbyChat::getInstance()
{
- return LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
+ return chat_bar->findChild<LLNearbyChat>("nearby_chat");
}
////////////////////////////////////////////////////////////////////////////////
@@ -367,7 +321,7 @@ BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask)
if(mChatHistory)
mChatHistory->setFocus(TRUE);
- return LLDockableFloater::handleMouseDown(x, y, mask);
+ return LLPanel::handleMouseDown(x, y, mask);
}
void LLNearbyChat::draw()
@@ -380,5 +334,5 @@ void LLNearbyChat::draw()
setTransparencyType(hasFocus() ? TT_ACTIVE : TT_INACTIVE);
}
- LLDockableFloater::draw();
+ LLPanel::draw();
}
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index 2ea79797f8..7c5975cbc5 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -1,4 +1,4 @@
-/**
+ /**
* @file llnearbychat.h
* @brief nearby chat history scrolling panel implementation
*
@@ -27,18 +27,17 @@
#ifndef LL_LLNEARBYCHAT_H_
#define LL_LLNEARBYCHAT_H_
-#include "lldockablefloater.h"
#include "llscrollbar.h"
#include "llviewerchat.h"
+#include "llfloater.h"
class LLResizeBar;
class LLChatHistory;
-class LLNearbyChat: public LLDockableFloater
+class LLNearbyChat: public LLPanel
{
public:
- LLNearbyChat(const LLSD& key);
- ~LLNearbyChat();
+ LLNearbyChat(const Params& p = LLPanel::getDefaultParams());
BOOL postBuild ();
@@ -54,12 +53,8 @@ public:
/*virtual*/ void onFocusLost();
/*virtual*/ void onFocusReceived();
- /*virtual*/ void onOpen (const LLSD& key);
-
/*virtual*/ void setVisible(BOOL visible);
-
- virtual void setRect (const LLRect &rect);
-
+
virtual void updateChatHistoryStyle();
static void processChatHistoryStyleUpdate(const LLSD& newvalue);
@@ -67,14 +62,14 @@ public:
void loadHistory();
static LLNearbyChat* getInstance();
+ void removeScreenChat();
private:
- virtual void applySavedVariables();
void getAllowedRect (LLRect& rect);
void onNearbySpeakers ();
-
+
private:
LLHandle<LLView> mPopupMenuHandle;
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4b961db5f9..114472ba56 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -34,7 +34,6 @@
#include "llfirstuse.h"
#include "llnearbychatbar.h"
-#include "llbottomtray.h"
#include "llagent.h"
#include "llgesturemgr.h"
#include "llmultigesture.h"
@@ -48,14 +47,19 @@
#include "llviewerwindow.h"
#include "llrootview.h"
#include "llviewerchat.h"
+#include "llnearbychat.h"
+
+#include "llresizehandle.h"
S32 LLNearbyChatBar::sLastSpecialChatChannel = 0;
+const S32 EXPANDED_HEIGHT = 300;
+const S32 COLLAPSED_HEIGHT = 60;
+const S32 EXPANDED_MIN_HEIGHT = 150;
+
// legacy callback glue
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
-static LLDefaultChildRegistry::Register<LLGestureComboList> r("gesture_combo_list");
-
struct LLChatTypeTrigger {
std::string name;
EChatType type;
@@ -66,355 +70,10 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
{ "/shout" , CHAT_TYPE_SHOUT}
};
-//ext-7367
-//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message.
-// introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages)
-class LLGestureScrollListCtrl: public LLScrollListCtrl
-{
-protected:
- friend class LLUICtrlFactory;
- LLGestureScrollListCtrl(const LLScrollListCtrl::Params& params)
- :LLScrollListCtrl(params)
- {
- }
-public:
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks)
- {
- LLScrollListCtrl::handleScrollWheel( x, y, clicks );
- return TRUE;
- }
- //See EXT-6598
- //Mouse hover over separator will result in not processing tooltip message
- //So eat this message
- BOOL handleToolTip(S32 x, S32 y, MASK mask)
- {
- LLScrollListCtrl::handleToolTip( x, y, mask );
- return TRUE;
- }
-};
-
-LLGestureComboList::Params::Params()
-: combo_button("combo_button"),
- combo_list("combo_list"),
- get_more("get_more", true),
- view_all("view_all", true)
-{
-}
-
-LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p)
-: LLUICtrl(p),
- mLabel(p.label),
- mViewAllItemIndex(-1),
- mGetMoreItemIndex(-1),
- mShowViewAll(p.view_all),
- mShowGetMore(p.get_more)
-{
- LLBottomtrayButton::Params button_params = p.combo_button;
- button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT);
-
- mButton = LLUICtrlFactory::create<LLBottomtrayButton>(button_params);
- mButton->reshape(getRect().getWidth(),getRect().getHeight());
- mButton->setCommitCallback(boost::bind(&LLGestureComboList::onButtonCommit, this));
-
- addChild(mButton);
-
- LLGestureScrollListCtrl::Params params(p.combo_list);
-
- params.name("GestureComboList");
- params.commit_callback.function(boost::bind(&LLGestureComboList::onItemSelected, this, _2));
- params.visible(false);
- params.commit_on_keyboard_movement(false);
-
- mList = LLUICtrlFactory::create<LLGestureScrollListCtrl>(params);
- addChild(mList);
-
- //****************************Gesture Part********************************/
-
- setCommitCallback(boost::bind(&LLGestureComboList::onCommitGesture, this));
-
- // now register us as observer since we have a place to put the results
- LLGestureMgr::instance().addObserver(this);
-
- // refresh list from current active gestures
- refreshGestures();
-
- setFocusLostCallback(boost::bind(&LLGestureComboList::hideList, this));
-}
-
-BOOL LLGestureComboList::handleKeyHere(KEY key, MASK mask)
-{
- BOOL handled = FALSE;
-
- if (key == KEY_ESCAPE && mask == MASK_NONE )
- {
- hideList();
- handled = TRUE;
- }
- else
- {
- handled = mList->handleKeyHere(key, mask);
- }
-
- return handled;
-}
-
-void LLGestureComboList::draw()
-{
- LLUICtrl::draw();
-
- if(mButton->getToggleState())
- {
- showList();
- }
-}
-
-void LLGestureComboList::showList()
-{
- LLRect rect = mList->getRect();
- LLRect button_rect = mButton->getRect();
-
- // Calculating amount of space between the navigation bar and gestures combo
- LLNavigationBar* nb = LLNavigationBar::getInstance();
-
- S32 x, nb_bottom;
- nb->localPointToOtherView(0, 0, &x, &nb_bottom, this);
-
- S32 max_height = nb_bottom - button_rect.mTop;
- mList->calcColumnWidths();
- rect.setOriginAndSize(button_rect.mLeft, button_rect.mTop, llmax(mList->getMaxContentWidth(),mButton->getRect().getWidth()), max_height);
-
- mList->setRect(rect);
- mList->fitContents( llmax(mList->getMaxContentWidth(),mButton->getRect().getWidth()), max_height);
-
- gFocusMgr.setKeyboardFocus(this);
-
- // Show the list and push the button down
- mButton->setToggleState(TRUE);
- mList->setVisible(TRUE);
- sendChildToFront(mList);
- LLUI::addPopup(mList);
-}
-
-void LLGestureComboList::onButtonCommit()
-{
- if (!mList->getVisible())
- {
- // highlight the last selected item from the original selection before potentially selecting a new item
- // as visual cue to original value of combo box
- LLScrollListItem* last_selected_item = mList->getLastSelectedItem();
- if (last_selected_item)
- {
- mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item));
- }
-
- if (mList->getItemCount() != 0)
- {
- showList();
- }
- }
- else
- {
- hideList();
- }
-}
-
-void LLGestureComboList::hideList()
-{
- if (mList->getVisible())
- {
- mButton->setToggleState(FALSE);
- mList->setVisible(FALSE);
- mList->mouseOverHighlightNthItem(-1);
- LLUI::removePopup(mList);
- gFocusMgr.setKeyboardFocus(NULL);
- }
-}
-
-S32 LLGestureComboList::getCurrentIndex() const
-{
- LLScrollListItem* item = mList->getFirstSelected();
- if( item )
- {
- return mList->getItemIndex( item );
- }
- return -1;
-}
-
-void LLGestureComboList::onItemSelected(const LLSD& data)
-{
- const std::string name = mList->getSelectedItemLabel();
-
- S32 cur_id = getCurrentIndex();
- mLastSelectedIndex = cur_id;
- if (cur_id != mList->getItemCount()-1 && cur_id != -1)
- {
- mButton->setLabel(name);
- }
-
- // hiding the list reasserts the old value stored in the text editor/dropdown button
- hideList();
-
- // commit does the reverse, asserting the value in the list
- onCommit();
-}
-
-void LLGestureComboList::sortByName(bool ascending)
-{
- mList->sortOnce(0, ascending);
-}
-
-LLSD LLGestureComboList::getValue() const
-{
- LLScrollListItem* item = mList->getFirstSelected();
- if( item )
- {
- return item->getValue();
- }
- else
- {
- return LLSD();
- }
-}
-
-void LLGestureComboList::refreshGestures()
-{
- //store current selection so we can maintain it
- LLSD cur_gesture = getValue();
-
- mList->selectFirstItem();
- mList->clearRows();
- mGestures.clear();
-
- LLGestureMgr::item_map_t::const_iterator it;
- const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures();
- LLSD::Integer idx(0);
- for (it = active_gestures.begin(); it != active_gestures.end(); ++it)
- {
- LLMultiGesture* gesture = (*it).second;
- if (gesture)
- {
- mList->addSimpleElement(gesture->mName, ADD_BOTTOM, LLSD(idx));
- mGestures.push_back(gesture);
- idx++;
- }
- }
-
- sortByName();
-
- // store indices for Get More and View All items (idx is the index followed by the last added Gesture)
- if (mShowGetMore)
- {
- mGetMoreItemIndex = idx;
- mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex));
- }
- if (mShowViewAll)
- {
- mViewAllItemIndex = idx + 1;
- mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex));
- }
-
- // Insert label after sorting, at top, with separator below it
- mList->addSeparator(ADD_TOP);
- mList->addSimpleElement(mLabel, ADD_TOP);
-
- if (cur_gesture.isDefined())
- {
- mList->selectByValue(cur_gesture);
-
- }
- else
- {
- mList->selectFirstItem();
- }
-
- LLCtrlListInterface* gestures = getListInterface();
- LLMultiGesture* gesture = NULL;
-
- if (gestures)
- {
- S32 sel_index = gestures->getFirstSelectedIndex();
- if (sel_index != 0)
- {
- S32 index = gestures->getSelectedValue().asInteger();
- if (index<0 || index >= (S32)mGestures.size())
- {
- llwarns << "out of range gesture access" << llendl;
- }
- else
- {
- gesture = mGestures.at(index);
- }
- }
- }
-
- if(gesture && LLGestureMgr::instance().isGesturePlaying(gesture))
- {
- return;
- }
-
- mButton->setLabel(mLabel);
-}
-
-void LLGestureComboList::onCommitGesture()
-{
- LLCtrlListInterface* gestures = getListInterface();
- if (gestures)
- {
- S32 sel_index = gestures->getFirstSelectedIndex();
- if (sel_index == 0)
- {
- return;
- }
-
- S32 index = gestures->getSelectedValue().asInteger();
-
- if (mViewAllItemIndex == index)
- {
- // The same behavior as Ctrl+G. EXT-823
- LLFloaterReg::toggleInstance("gestures");
- gestures->selectFirstItem();
- return;
- }
-
- if (mGetMoreItemIndex == index)
- {
- LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL"));
- return;
- }
-
- if (index<0 || index >= (S32)mGestures.size())
- {
- llwarns << "out of range gesture index" << llendl;
- }
- else
- {
- LLMultiGesture* gesture = mGestures.at(index);
- if(gesture)
- {
- LLGestureMgr::instance().playGesture(gesture);
- if(!gesture->mReplaceText.empty())
- {
- LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE);
- }
- }
- }
- }
-}
-
-LLGestureComboList::~LLGestureComboList()
-{
- LLGestureMgr::instance().removeObserver(this);
-}
-
-LLCtrlListInterface* LLGestureComboList::getListInterface()
-{
- return mList;
-}
-
-LLNearbyChatBar::LLNearbyChatBar()
-: mChatBox(NULL)
-{
- mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+LLNearbyChatBar::LLNearbyChatBar(const LLSD& key)
+ : LLFloater(key),
+ mChatBox(NULL)
+{ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
}
//virtual
@@ -436,15 +95,42 @@ BOOL LLNearbyChatBar::postBuild()
mChatBox->setEnableLineHistory(TRUE);
mChatBox->setFont(LLViewerChat::getChatFont());
+
+ LLUICtrl* show_btn = getChild<LLUICtrl>("show_nearby_chat");
+ show_btn->setCommitCallback(boost::bind(&LLNearbyChatBar::onToggleNearbyChatPanel, this));
+
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
// Register for font change notifications
LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
+ mExpandedHeight = COLLAPSED_HEIGHT + EXPANDED_HEIGHT;
+
+ enableResizeCtrls(true, true, false);
+
return TRUE;
}
+bool LLNearbyChatBar::applyRectControl()
+{
+ bool rect_controlled = LLFloater::applyRectControl();
+
+ LLView* nearby_chat = getChildView("nearby_chat");
+ if (!nearby_chat->getVisible())
+ {
+ reshape(getRect().getWidth(), getMinHeight());
+ enableResizeCtrls(true, true, false);
+ }
+ else
+ {
+ enableResizeCtrls(true);
+ setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT);
+ }
+
+ return rect_controlled;
+}
+
void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
{
// Update things with the new font whohoo
@@ -457,19 +143,23 @@ void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
//static
LLNearbyChatBar* LLNearbyChatBar::getInstance()
{
- return LLBottomTray::getInstance() ? LLBottomTray::getInstance()->getNearbyChatBar() : NULL;
+ return LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar");
}
-//static
-bool LLNearbyChatBar::instanceExists()
+void LLNearbyChatBar::showHistory()
{
- return LLBottomTray::instanceExists() && LLBottomTray::getInstance()->getNearbyChatBar() != NULL;
+ openFloater();
+
+ if (!getChildView("nearby_chat")->getVisible())
+ {
+ onToggleNearbyChatPanel();
+ }
}
void LLNearbyChatBar::draw()
{
displaySpeakingIndicator();
- LLPanel::draw();
+ LLFloater::draw();
}
std::string LLNearbyChatBar::getCurrentChat()
@@ -683,6 +373,44 @@ void LLNearbyChatBar::sendChat( EChatType type )
}
}
+
+void LLNearbyChatBar::onToggleNearbyChatPanel()
+{
+ LLView* nearby_chat = getChildView("nearby_chat");
+
+ if (nearby_chat->getVisible())
+ {
+ if (!isMinimized())
+ {
+ mExpandedHeight = getRect().getHeight();
+ }
+ setResizeLimits(getMinWidth(), COLLAPSED_HEIGHT);
+ nearby_chat->setVisible(FALSE);
+ reshape(getRect().getWidth(), COLLAPSED_HEIGHT);
+ enableResizeCtrls(true, true, false);
+ storeRectControl();
+ }
+ else
+ {
+ nearby_chat->setVisible(TRUE);
+ setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT);
+ reshape(getRect().getWidth(), mExpandedHeight);
+ enableResizeCtrls(true);
+ storeRectControl();
+ }
+}
+
+void LLNearbyChatBar::setMinimized(BOOL b)
+{
+ LLNearbyChat* nearby_chat = getChild<LLNearbyChat>("nearby_chat");
+ // when unminimizing with nearby chat visible, go ahead and kill off screen chats
+ if (!b && nearby_chat->getVisible())
+ {
+ nearby_chat->removeScreenChat();
+ }
+ LLFloater::setMinimized(b);
+}
+
void LLNearbyChatBar::onChatBoxCommit()
{
if (mChatBox->getText().length() > 0)
@@ -780,17 +508,13 @@ void LLNearbyChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type,
// static
void LLNearbyChatBar::startChat(const char* line)
{
- LLBottomTray *bt = LLBottomTray::getInstance();
-
- if (!bt)
- return;
-
- LLNearbyChatBar* cb = bt->getNearbyChatBar();
+ LLNearbyChatBar* cb = LLNearbyChatBar::getInstance();
if (!cb )
return;
- bt->setVisible(TRUE);
+ cb->setVisible(TRUE);
+ cb->setFocus(TRUE);
cb->mChatBox->setFocus(TRUE);
if (line)
@@ -806,12 +530,7 @@ void LLNearbyChatBar::startChat(const char* line)
// static
void LLNearbyChatBar::stopChat()
{
- LLBottomTray *bt = LLBottomTray::getInstance();
-
- if (!bt)
- return;
-
- LLNearbyChatBar* cb = bt->getNearbyChatBar();
+ LLNearbyChatBar* cb = LLNearbyChatBar::getInstance();
if (!cb)
return;
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index efddec942f..e9734899b3 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -27,85 +27,25 @@
#ifndef LL_LLNEARBYCHATBAR_H
#define LL_LLNEARBYCHATBAR_H
-#include "llpanel.h"
+#include "llfloater.h"
#include "llcombobox.h"
#include "llgesturemgr.h"
#include "llchat.h"
#include "llvoiceclient.h"
#include "lloutputmonitorctrl.h"
#include "llspeakers.h"
-#include "llbottomtray.h"
-
-class LLGestureComboList
- : public LLGestureManagerObserver
- , public LLUICtrl
-{
-public:
- struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
- {
- Optional<LLBottomtrayButton::Params> combo_button;
- Optional<LLScrollListCtrl::Params> combo_list;
- Optional<bool> get_more,
- view_all;
-
- Params();
- };
-
-protected:
-
- friend class LLUICtrlFactory;
- LLGestureComboList(const Params&);
- std::vector<LLMultiGesture*> mGestures;
- std::string mLabel;
- bool mShowViewAll;
- bool mShowGetMore;
- LLSD::Integer mViewAllItemIndex;
- LLSD::Integer mGetMoreItemIndex;
-
-public:
-
- ~LLGestureComboList();
-
- LLCtrlListInterface* getListInterface();
- virtual void showList();
- virtual void hideList();
- virtual BOOL handleKeyHere(KEY key, MASK mask);
-
- virtual void draw();
-
- S32 getCurrentIndex() const;
- void onItemSelected(const LLSD& data);
- void sortByName(bool ascending = true);
- void refreshGestures();
- void onCommitGesture();
- void onButtonCommit();
- virtual LLSD getValue() const;
-
- // LLGestureManagerObserver trigger
- virtual void changed() { refreshGestures(); }
-
-private:
-
- LLButton* mButton;
- LLScrollListCtrl* mList;
- S32 mLastSelectedIndex;
-};
-
-class LLNearbyChatBar
-: public LLPanel
+class LLNearbyChatBar : public LLFloater
{
public:
// constructor for inline chat-bars (e.g. hosted in chat history window)
- LLNearbyChatBar();
+ LLNearbyChatBar(const LLSD& key);
~LLNearbyChatBar() {}
virtual BOOL postBuild();
static LLNearbyChatBar* getInstance();
- static bool instanceExists();
-
LLLineEditor* getChatBox() { return mChatBox; }
virtual void draw();
@@ -119,6 +59,9 @@ public:
static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
+ void showHistory();
+ /*virtual*/void setMinimized(BOOL b);
+
protected:
static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str);
static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata);
@@ -129,6 +72,10 @@ protected:
void onChatBoxCommit();
void onChatFontChange(LLFontGL* fontp);
+ /* virtual */ bool applyRectControl();
+
+ void onToggleNearbyChatPanel();
+
static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
EChatType processChatTypeTriggers(EChatType type, std::string &str);
@@ -140,6 +87,8 @@ protected:
LLLineEditor* mChatBox;
LLOutputMonitorCtrl* mOutputMonitor;
LLLocalSpeakerMgr* mSpeakerMgr;
+
+ S32 mExpandedHeight;
};
#endif
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 957b6d5f94..9c3887377a 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -29,7 +29,6 @@
#include "llagentdata.h" // for gAgentID
#include "llnearbychathandler.h"
-#include "llbottomtray.h"
#include "llchatitemscontainerctrl.h"
#include "llfirstuse.h"
#include "llfloaterscriptdebug.h"
@@ -41,6 +40,9 @@
#include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance
#include "llviewerwindow.h"//for screen channel position
+#include "llnearbychatbar.h"
+#include "llrootview.h"
+#include "lllayoutstack.h"
//add LLNearbyChatHandler to LLNotificationsUI namespace
using namespace LLNotificationsUI;
@@ -61,7 +63,8 @@ public:
typedef std::vector<LLHandle<LLToast> > toast_vec_t;
typedef std::list<LLHandle<LLToast> > toast_list_t;
- LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id)
+ LLNearbyChatScreenChannel(const Params& p)
+ : LLScreenChannelBase(p)
{
mStopProcessing = false;
@@ -80,7 +83,6 @@ public:
void addNotification (LLSD& notification);
void arrangeToasts ();
- void showToastsBottom ();
typedef boost::function<LLToastPanelBase* (void )> create_toast_panel_callback_t;
void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;}
@@ -88,8 +90,6 @@ public:
void onToastDestroyed (LLToast* toast, bool app_quitting);
void onToastFade (LLToast* toast);
- void reshape (S32 width, S32 height, BOOL called_from_parent);
-
void redrawToasts()
{
arrangeToasts();
@@ -149,6 +149,7 @@ protected:
toast_list_t m_toast_pool;
bool mStopProcessing;
+ bool mChannelRect;
};
//-----------------------------------------------------------------------------------------------
@@ -351,27 +352,6 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
arrangeToasts();
}
-void LLNearbyChatScreenChannel::arrangeToasts()
-{
- if(!isHovering())
- {
- showToastsBottom();
- }
-
- if (m_active_toasts.empty())
- {
- LLHints::registerHintTarget("incoming_chat", LLHandle<LLView>());
- }
- else
- {
- LLToast* toast = m_active_toasts.front().get();
- if (toast)
- {
- LLHints::registerHintTarget("incoming_chat", m_active_toasts.front().get()->LLView::getHandle());
- }
- }
-}
-
static bool sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second)
{
if (!first.get() || !second.get()) return false; // STORM-1352
@@ -381,16 +361,31 @@ static bool sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> sec
return v1 > v2;
}
-void LLNearbyChatScreenChannel::showToastsBottom()
+void LLNearbyChatScreenChannel::arrangeToasts()
{
- if(mStopProcessing)
+ if(mStopProcessing || isHovering())
return;
+ LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+
+ if (!getParent())
+ {
+ // connect to floater snap region just to get resize events, we don't care about being a proper widget
+ floater_snap_region->addChild(this);
+ setFollows(FOLLOWS_ALL);
+ }
+
LLRect toast_rect;
- updateBottom();
- S32 channel_bottom = getRect().mBottom;
+ updateRect();
+
+ LLRect channel_rect;
+ floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView);
+ channel_rect.mLeft += 10;
+ channel_rect.mRight = channel_rect.mLeft + 300;
+
+ S32 channel_bottom = channel_rect.mBottom;
- S32 bottom = channel_bottom;
+ S32 bottom = channel_bottom + 80;
S32 margin = gSavedSettings.getS32("ToastGap");
//sort active toasts
@@ -409,7 +404,7 @@ void LLNearbyChatScreenChannel::showToastsBottom()
S32 toast_top = bottom + toast->getRect().getHeight() + margin;
- if(toast_top > gFloaterView->getRect().getHeight())
+ if(toast_top > channel_rect.getHeight())
{
while(it!=m_active_toasts.end())
{
@@ -420,7 +415,7 @@ void LLNearbyChatScreenChannel::showToastsBottom()
}
toast_rect = toast->getRect();
- toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight());
+ toast_rect.setLeftTopAndSize(channel_rect.mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight());
toast->setRect(toast_rect);
bottom += toast_rect.getHeight() - toast->getTopPad() + margin;
@@ -438,15 +433,10 @@ void LLNearbyChatScreenChannel::showToastsBottom()
}
}
- }
-
-void LLNearbyChatScreenChannel::reshape (S32 width, S32 height, BOOL called_from_parent)
-{
- LLScreenChannelBase::reshape(width, height, called_from_parent);
- arrangeToasts();
}
+
//-----------------------------------------------------------------------------------------------
//LLNearbyChatHandler
//-----------------------------------------------------------------------------------------------
@@ -457,7 +447,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i
mType = type;
// Getting a Channel for our notifications
- LLNearbyChatScreenChannel* channel = new LLNearbyChatScreenChannel(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
+ LLNearbyChatScreenChannel::Params p;
+ p.id = LLUUID(gSavedSettings.getString("NearByChatChannelUUID"));
+ LLNearbyChatScreenChannel* channel = new LLNearbyChatScreenChannel(p);
LLNearbyChatScreenChannel::create_toast_panel_callback_t callback = createToastPanel;
@@ -473,15 +465,13 @@ LLNearbyChatHandler::~LLNearbyChatHandler()
void LLNearbyChatHandler::initChannel()
{
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
- LLView* chat_box = LLBottomTray::getInstance()->getChildView("chat_box");
- S32 channel_right_bound = nearby_chat->getRect().mRight;
- mChannel->init(chat_box->getRect().mLeft, channel_right_bound);
+ //LLRect snap_rect = gFloaterView->getSnapRect();
+ //mChannel->init(snap_rect.mLeft, snap_rect.mLeft + 200);
}
-void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not really const, see hack below changing chat_msg.mText
+void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
const LLSD &args)
{
if(chat_msg.mMuted == TRUE)
@@ -490,24 +480,9 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
if(chat_msg.mText.empty())
return;//don't process empty messages
- // Handle irc styled messages for toast panel
- // HACK ALERT - changes mText, stripping out IRC style "/me" prefixes
- LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
- std::string original_message = tmp_chat.mText; // Save un-modified version of chat text
- if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
- {
- if(!tmp_chat.mFromName.empty())
- tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
- else
- tmp_chat.mText = tmp_chat.mText.substr(3);
- }
+ LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
- {
- //sometimes its usefull to have no name at all...
- //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null)
- // tmp_chat.mFromName = tmp_chat.mFromID.asString();
- }
+ LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat");
// Build notification data
LLSD notification;
@@ -551,7 +526,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
LLViewerChat::getChatColor(chat_msg,txt_color);
- LLFloaterScriptDebug::addScriptLine(original_message, // Send full message with "/me" style prefix
+ LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
chat_msg.mFromName,
txt_color,
chat_msg.mFromID);
@@ -576,7 +551,8 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
sChatWatcher->post(notification);
- if( nearby_chat->getVisible()
+ if( !chat_bar->isMinimized()
+ && nearby_chat->isInVisibleChain()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
|| !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
@@ -604,6 +580,21 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
if(channel)
{
+ // Handle IRC styled messages.
+ std::string toast_msg;
+ if (chat_msg.mChatStyle == CHAT_STYLE_IRC)
+ {
+ if (!chat_msg.mFromName.empty())
+ {
+ toast_msg += chat_msg.mFromName;
+ }
+ toast_msg += chat_msg.mText.substr(3);
+ }
+ else
+ {
+ toast_msg = chat_msg.mText;
+ }
+
// Add a nearby chat toast.
LLUUID id;
id.generate();
@@ -615,6 +606,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
notification["text_color"] = r_color_name;
notification["color_alpha"] = r_color_alpha;
notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
+ notification["message"] = toast_msg;
channel->addNotification(notification);
}
}
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 5fe5c9b1e8..15d5d7c162 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -172,10 +172,10 @@ void LLNetMap::draw()
LLVector3 offset = gGL.getUITranslation();
LLVector3 scale = gGL.getUIScale();
- glLoadIdentity();
+ gGL.loadIdentity();
gGL.loadUIIdentity();
- glScalef(scale.mV[0], scale.mV[1], scale.mV[2]);
+ gGL.scalef(scale.mV[0], scale.mV[1], scale.mV[2]);
gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
{
@@ -183,7 +183,7 @@ void LLNetMap::draw()
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// Draw background rectangle
LLColor4 background_color = mBackgroundColor.get();
@@ -204,7 +204,7 @@ void LLNetMap::draw()
{
// rotate subsequent draws to agent rotation
rotation = atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
- glRotatef( rotation * RAD_TO_DEG, 0.f, 0.f, 1.f);
+ gGL.rotatef( rotation * RAD_TO_DEG, 0.f, 0.f, 1.f);
}
// figure out where agent is
@@ -492,7 +492,7 @@ void LLNetMap::draw()
// If we don't rotate the map, we have to rotate the frustum.
gGL.pushMatrix();
gGL.translatef( ctr_x, ctr_y, 0 );
- glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f);
+ gGL.rotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f);
gGL.begin( LLRender::TRIANGLES );
gGL.vertex2f( 0, 0 );
gGL.vertex2f( -half_width_pixels, far_clip_pixels );
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index 9d824dcd59..cae7d02fed 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -44,7 +44,7 @@ LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsMo
{
mType = type;
- LLChannelManager::Params p;
+ LLScreenChannelBase::Params p;
p.id = LLUUID(gSavedSettings.getString("AlertChannelUUID"));
p.display_toasts_always = true;
p.toast_align = NA_CENTRE;
@@ -114,7 +114,7 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
// Show alert in middle of progress view (during teleport) (EXT-1093)
LLProgressView* progress = gViewerWindow->getProgressView();
LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled();
- mChannel->updatePositionAndSize(rc, rc);
+ mChannel->updatePositionAndSize(rc);
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
if(channel)
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index de90023f3b..1b767e80d4 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -385,7 +385,7 @@ void LLHandlerUtil::logGroupNoticeToIMGroup(
// static
void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChatSourceType type)
{
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
if(nearby_chat)
{
LLChat chat_msg(notification->getMessage());
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 02b217fc94..fb0891c4c5 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -29,6 +29,7 @@
#include "llfloaterreg.h"
#include "llnearbychat.h"
+#include "llnearbychatbar.h"
#include "llnotificationhandler.h"
#include "llnotifications.h"
#include "lltoastnotifypanel.h"
@@ -92,9 +93,9 @@ bool LLTipHandler::processNotification(const LLSD& notify)
LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
// don't show toast if Nearby Chat is opened
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<
- LLNearbyChat>("nearby_chat", LLSD());
- if (nearby_chat->getVisible())
+ LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
+ LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance();
+ if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible())
{
return false;
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 10887aa53a..1dc4d796ab 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -35,13 +35,13 @@
#include "llaccordionctrltab.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "lllistcontextmenu.h"
#include "llmenubutton.h"
#include "llnotificationsutil.h"
#include "lloutfitobserver.h"
-#include "llsidetray.h"
#include "lltoggleablemenu.h"
#include "lltransutil.h"
#include "llviewermenu.h"
@@ -327,7 +327,7 @@ protected:
static void editOutfit()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
static void renameOutfit(const LLUUID& outfit_cat_id)
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
deleted file mode 100644
index c2bbec0470..0000000000
--- a/indra/newview/lloverlaybar.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/**
- * @file lloverlaybar.cpp
- * @brief LLOverlayBar class implementation
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-// Temporary buttons that appear at the bottom of the screen when you
-// are in a mode.
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lloverlaybar.h"
-
-#include "llaudioengine.h"
-#include "llrender.h"
-#include "llagent.h"
-#include "llbutton.h"
-#include "llfocusmgr.h"
-#include "llimview.h"
-#include "llmediaremotectrl.h"
-#include "llparcel.h"
-#include "lltextbox.h"
-#include "llui.h"
-#include "llviewercontrol.h"
-#include "llviewertexturelist.h"
-#include "llviewerjoystick.h"
-#include "llviewermedia.h"
-#include "llviewermenu.h" // handle_reset_view()
-#include "llviewermedia.h"
-#include "llviewerparcelmedia.h"
-#include "llviewerparcelmgr.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "llvoiceclient.h"
-#include "llvoavatarself.h"
-#include "llvoiceremotectrl.h"
-#include "llmediactrl.h"
-#include "llselectmgr.h"
-
-//
-// Globals
-//
-
-LLOverlayBar *gOverlayBar = NULL;
-
-extern S32 MENU_BAR_HEIGHT;
-
-//
-// Functions
-//
-
-
-
-void* LLOverlayBar::createMediaRemote(void* userdata)
-{
- LLOverlayBar *self = (LLOverlayBar*)userdata;
- self->mMediaRemote = new LLMediaRemoteCtrl ();
- return self->mMediaRemote;
-}
-
-void* LLOverlayBar::createVoiceRemote(void* userdata)
-{
- LLOverlayBar *self = (LLOverlayBar*)userdata;
- self->mVoiceRemote = new LLVoiceRemoteCtrl();
- return self->mVoiceRemote;
-}
-
-LLOverlayBar::LLOverlayBar()
- : LLPanel(),
- mMediaRemote(NULL),
- mVoiceRemote(NULL),
- mMusicState(STOPPED)
-{
- setMouseOpaque(FALSE);
- setIsChrome(TRUE);
-
- mBuilt = false;
-
- mFactoryMap["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
- mFactoryMap["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
-
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml");
-}
-
-BOOL LLOverlayBar::postBuild()
-{
- childSetAction("Set Not Busy",onClickSetNotBusy,this);
- childSetAction("Mouselook",onClickMouselook,this);
- childSetAction("Stand Up",onClickStandUp,this);
- childSetAction("Flycam",onClickFlycam,this);
- childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
-
- mVoiceRemote->expandOrCollapse();
- mMediaRemote->expandOrCollapse();
-
- setFocusRoot(TRUE);
- mBuilt = true;
-
- layoutButtons();
- return TRUE;
-}
-
-LLOverlayBar::~LLOverlayBar()
-{
- // LLView destructor cleans up children
-}
-
-// virtual
-void LLOverlayBar::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- LLView::reshape(width, height, called_from_parent);
-
- if (mBuilt)
- {
- layoutButtons();
- }
-}
-
-void LLOverlayBar::layoutButtons()
-{
- LLView* state_buttons_panel = getChildView("state_buttons");
-
- if (state_buttons_panel->getVisible())
- {
- LLViewQuery query;
- LLWidgetTypeFilter<LLButton> widget_filter;
- query.addPreFilter(LLEnabledFilter::getInstance());
- query.addPreFilter(&widget_filter);
-
- child_list_t button_list = query(state_buttons_panel);
-
- const S32 MAX_BAR_WIDTH = 600;
- S32 bar_width = llclamp(state_buttons_panel->getRect().getWidth(), 0, MAX_BAR_WIDTH);
-
- // calculate button widths
- const S32 MAX_BUTTON_WIDTH = 150;
- const S32 STATUS_BAR_PAD = 10;
- S32 segment_width = llclamp(lltrunc((F32)(bar_width) / (F32)button_list.size()), 0, MAX_BUTTON_WIDTH);
- S32 btn_width = segment_width - STATUS_BAR_PAD;
-
- // Evenly space all buttons, starting from left
- S32 left = 0;
- S32 bottom = 1;
-
- for (child_list_reverse_iter_t child_iter = button_list.rbegin();
- child_iter != button_list.rend(); ++child_iter)
- {
- LLView *view = *child_iter;
- LLRect r = view->getRect();
- r.setOriginAndSize(left, bottom, btn_width, r.getHeight());
- view->setRect(r);
- left += segment_width;
- }
- }
-}
-
-// Per-frame updates of visibility
-void LLOverlayBar::refresh()
-{
- BOOL buttons_changed = FALSE;
-
- BOOL im_received = gIMMgr->getIMReceived();
- LLButton* button = getChild<LLButton>("IM Received");
- if (button && button->getVisible() != im_received)
- {
- button->setVisible(im_received);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL busy = gAgent.getBusy();
- button = getChild<LLButton>("Set Not Busy");
- if (button && button->getVisible() != busy)
- {
- button->setVisible(busy);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL flycam = LLViewerJoystick::getInstance()->getOverrideCamera();
- button = getChild<LLButton>("Flycam");
- if (button && button->getVisible() != flycam)
- {
- button->setVisible(flycam);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL mouselook_grabbed;
- mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)
- || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX);
- button = getChild<LLButton>("Mouselook");
-
- if (button && button->getVisible() != mouselook_grabbed)
- {
- button->setVisible(mouselook_grabbed);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL sitting = FALSE;
- if (gAgent.getAvatarObject())
- {
- sitting = gAgent.getAvatarObject()->isSitting();
- }
- button = getChild<LLButton>("Stand Up");
-
- if (button && button->getVisible() != sitting)
- {
- button->setVisible(sitting);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
-
- moveChildToBackOfTabGroup(mMediaRemote);
- moveChildToBackOfTabGroup(mVoiceRemote);
-
- // turn off the whole bar in mouselook
- if (gAgent.cameraMouselook())
- {
- childSetVisible("media_remote_container", FALSE);
- childSetVisible("voice_remote_container", FALSE);
- childSetVisible("state_buttons", FALSE);
- }
- else
- {
- // update "remotes"
- childSetVisible("media_remote_container", TRUE);
- childSetVisible("voice_remote_container", LLVoiceClient::getInstance()->voiceEnabled());
- childSetVisible("state_buttons", TRUE);
- }
-
- // always let user toggle into and out of chatbar
- childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
-
- if (buttons_changed)
- {
- layoutButtons();
- }
-}
-
-//-----------------------------------------------------------------------
-// Static functions
-//-----------------------------------------------------------------------
-
-// static
-void LLOverlayBar::onClickSetNotBusy(void*)
-{
- gAgent.clearBusy();
-}
-
-
-// static
-void LLOverlayBar::onClickFlycam(void*)
-{
- LLViewerJoystick::getInstance()->toggleFlycam();
-}
-
-// static
-void LLOverlayBar::onClickResetView(void* data)
-{
- handle_reset_view();
-}
-
-//static
-void LLOverlayBar::onClickMouselook(void*)
-{
- gAgent.changeCameraToMouselook();
-}
-
-//static
-void LLOverlayBar::onClickStandUp(void*)
-{
- LLSelectMgr::getInstance()->deselectAllForStandingUp();
- gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// static media helpers
-// *TODO: Move this into an audio manager abstraction
-//static
-void LLOverlayBar::mediaStop(void*)
-{
- if (!gOverlayBar)
- {
- // return;
- }
- LLViewerParcelMedia::stop();
-}
-//static
-void LLOverlayBar::toggleMediaPlay(void*)
-{
- if (!gOverlayBar)
- {
- // return;
- }
-
-
- if (LLViewerParcelMedia::getStatus() == LLViewerMediaImpl::MEDIA_PAUSED)
- {
- LLViewerParcelMedia::start();
- }
- else if(LLViewerParcelMedia::getStatus() == LLViewerMediaImpl::MEDIA_PLAYING)
- {
- LLViewerParcelMedia::pause();
- }
- else
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (parcel)
- {
- LLViewerParcelMedia::play(parcel);
- }
- }
-}
-
-//static
-void LLOverlayBar::toggleMusicPlay(void*)
-{
- if (gAudiop->isInternetStreamPlaying() != 1)
- {
- if (gAudiop)
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if ( parcel )
- {
- // this doesn't work properly when crossing parcel boundaries - even when the
- // stream is stopped, it doesn't return the right thing - commenting out for now.
- // if ( gAudiop->isInternetStreamPlaying() == 0 )
- {
- gAudiop->startInternetStream(parcel->getMusicURL());
- }
- }
- }
- }
- //else
- //{
- // gOverlayBar->mMusicState = PAUSED; // desired state
- // if (gAudiop)
- // {
- // gAudiop->pauseInternetStream(1);
- // }
- //}
- else
- {
- if (gAudiop)
- {
- gAudiop->stopInternetStream();
- }
- }
-}
-
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
deleted file mode 100644
index b36f5ebb73..0000000000
--- a/indra/newview/lloverlaybar.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * @file lloverlaybar.h
- * @brief LLOverlayBar class definition
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLOVERLAYBAR_H
-#define LL_LLOVERLAYBAR_H
-
-#include "llpanel.h"
-
-// "Constants" loaded from settings.xml at start time
-extern S32 STATUS_BAR_HEIGHT;
-
-class LLButton;
-class LLLineEditor;
-class LLMediaRemoteCtrl;
-class LLMessageSystem;
-class LLTextBox;
-class LLTextEditor;
-class LLUICtrl;
-class LLUUID;
-class LLFrameTimer;
-class LLStatGraph;
-class LLSlider;
-class LLVoiceRemoteCtrl;
-
-class LLOverlayBar
-: public LLPanel
-{
-public:
- LLOverlayBar();
- ~LLOverlayBar();
-
- /*virtual*/ void refresh();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- /*virtual*/ BOOL postBuild();
-
- void layoutButtons();
-
- // helpers for returning desired state
- BOOL musicPlaying() { return mMusicState == PLAYING; }
-
- static void onClickSetNotBusy(void* data);
- static void onClickMouselook(void* data);
- static void onClickStandUp(void* data);
- static void onClickResetView(void* data);
- static void onClickFlycam(void* data);
-
- //static media helper functions
- static void toggleMediaPlay(void*);
- static void toggleMusicPlay(void*);
- static void musicPause(void*);
- static void musicStop(void*);
- static void mediaStop(void*);
-
- static void toggleAudioVolumeFloater(void*);
-
-protected:
- static void* createMediaRemote(void* userdata);
- static void* createVoiceRemote(void* userdata);
-
- void enableMediaButtons();
-
-protected:
- LLMediaRemoteCtrl* mMediaRemote;
- LLVoiceRemoteCtrl* mVoiceRemote;
- bool mBuilt; // dialog constructed yet?
- enum { STOPPED=0, PLAYING=1, PAUSED=2 };
- S32 mMusicState;
-};
-
-extern LLOverlayBar* gOverlayBar;
-
-#endif
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index d58a1cb663..679b1bdcda 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -66,8 +66,8 @@ public:
Params()
: agent_id("agent_id")
{
- mouse_opaque(false);
- follows.flags(FOLLOWS_ALL);
+ changeDefault(mouse_opaque, false);
+ changeDefault(follows.flags, FOLLOWS_ALL);
}
};
@@ -120,269 +120,6 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
static LLDefaultChildRegistry::Register<LLDropTarget> r("drop_target");
-static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile("panel_profile");
-static LLRegisterPanelClassWrapper<LLPanelMyProfile> t_panel_my_profile("panel_my_profile");
-static LLRegisterPanelClassWrapper<LLPanelAvatarNotes> t_panel_notes("panel_notes");
-
-//-----------------------------------------------------------------------------
-// LLPanelAvatarNotes()
-//-----------------------------------------------------------------------------
-LLPanelAvatarNotes::LLPanelAvatarNotes()
-: LLPanelProfileTab()
-{
-
-}
-
-void LLPanelAvatarNotes::updateData()
-{
- LLAvatarPropertiesProcessor::getInstance()->
- sendAvatarNotesRequest(getAvatarId());
-}
-
-BOOL LLPanelAvatarNotes::postBuild()
-{
- childSetCommitCallback("status_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
- childSetCommitCallback("map_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
- childSetCommitCallback("objects_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
-
- childSetCommitCallback("add_friend", boost::bind(&LLPanelAvatarNotes::onAddFriendButtonClick, this),NULL);
- childSetCommitCallback("im", boost::bind(&LLPanelAvatarNotes::onIMButtonClick, this), NULL);
- childSetCommitCallback("call", boost::bind(&LLPanelAvatarNotes::onCallButtonClick, this), NULL);
- childSetCommitCallback("teleport", boost::bind(&LLPanelAvatarNotes::onTeleportButtonClick, this), NULL);
- childSetCommitCallback("share", boost::bind(&LLPanelAvatarNotes::onShareButtonClick, this), NULL);
- childSetCommitCallback("show_on_map_btn", (boost::bind(
- &LLPanelAvatarNotes::onMapButtonClick, this)), NULL);
-
- LLTextEditor* te = getChild<LLTextEditor>("notes_edit");
- te->setCommitCallback(boost::bind(&LLPanelAvatarNotes::onCommitNotes,this));
- te->setCommitOnFocusLost(TRUE);
-
- resetControls();
- resetData();
-
- LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this);
-
- return TRUE;
-}
-
-void LLPanelAvatarNotes::onOpen(const LLSD& key)
-{
- LLPanelProfileTab::onOpen(key);
-
- fillRightsData();
-
- //Disable "Add Friend" button for friends.
- getChildView("add_friend")->setEnabled(!LLAvatarActions::isFriend(getAvatarId()));
-}
-
-void LLPanelAvatarNotes::fillRightsData()
-{
- getChild<LLUICtrl>("status_check")->setValue(FALSE);
- getChild<LLUICtrl>("map_check")->setValue(FALSE);
- getChild<LLUICtrl>("objects_check")->setValue(FALSE);
-
- const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
- // If true - we are viewing friend's profile, enable check boxes and set values.
- if(relation)
- {
- S32 rights = relation->getRightsGrantedTo();
-
- getChild<LLUICtrl>("status_check")->setValue(LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE);
- getChild<LLUICtrl>("map_check")->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
- getChild<LLUICtrl>("objects_check")->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE);
-
- }
-
- enableCheckboxes(NULL != relation);
-}
-
-void LLPanelAvatarNotes::onCommitNotes()
-{
- std::string notes = getChild<LLUICtrl>("notes_edit")->getValue().asString();
- LLAvatarPropertiesProcessor::getInstance()-> sendNotes(getAvatarId(),notes);
-}
-
-void LLPanelAvatarNotes::rightsConfirmationCallback(const LLSD& notification,
- const LLSD& response, S32 rights)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option == 0)
- {
- LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(
- getAvatarId(), rights);
- }
- else
- {
- getChild<LLUICtrl>("objects_check")->setValue(
- getChild<LLUICtrl>("objects_check")->getValue().asBoolean() ? FALSE : TRUE);
- }
-}
-
-void LLPanelAvatarNotes::confirmModifyRights(bool grant, S32 rights)
-{
- LLSD args;
- args["NAME"] = LLSLURL("agent", getAvatarId(), "displayname").getSLURLString();
-
- if (grant)
- {
- LLNotificationsUtil::add("GrantModifyRights", args, LLSD(),
- boost::bind(&LLPanelAvatarNotes::rightsConfirmationCallback, this,
- _1, _2, rights));
- }
- else
- {
- LLNotificationsUtil::add("RevokeModifyRights", args, LLSD(),
- boost::bind(&LLPanelAvatarNotes::rightsConfirmationCallback, this,
- _1, _2, rights));
- }
-}
-
-void LLPanelAvatarNotes::onCommitRights()
-{
- const LLRelationship* buddy_relationship =
- LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
-
- if (NULL == buddy_relationship)
- {
- // Lets have a warning log message instead of having a crash. EXT-4947.
- llwarns << "Trying to modify rights for non-friend avatar. Skipped." << llendl;
- return;
- }
-
-
- S32 rights = 0;
-
- if(getChild<LLUICtrl>("status_check")->getValue().asBoolean())
- rights |= LLRelationship::GRANT_ONLINE_STATUS;
- if(getChild<LLUICtrl>("map_check")->getValue().asBoolean())
- rights |= LLRelationship::GRANT_MAP_LOCATION;
- if(getChild<LLUICtrl>("objects_check")->getValue().asBoolean())
- rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
-
- bool allow_modify_objects = getChild<LLUICtrl>("objects_check")->getValue().asBoolean();
-
- // if modify objects checkbox clicked
- if (buddy_relationship->isRightGrantedTo(
- LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects)
- {
- confirmModifyRights(allow_modify_objects, rights);
- }
- // only one checkbox can trigger commit, so store the rest of rights
- else
- {
- LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(
- getAvatarId(), rights);
- }
-}
-
-void LLPanelAvatarNotes::processProperties(void* data, EAvatarProcessorType type)
-{
- if(APT_NOTES == type)
- {
- LLAvatarNotes* avatar_notes = static_cast<LLAvatarNotes*>(data);
- if(avatar_notes && getAvatarId() == avatar_notes->target_id)
- {
- getChild<LLUICtrl>("notes_edit")->setValue(avatar_notes->notes);
- getChildView("notes edit")->setEnabled(true);
-
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
- }
-}
-
-void LLPanelAvatarNotes::resetData()
-{
- getChild<LLUICtrl>("notes_edit")->setValue(LLStringUtil::null);
- // Default value is TRUE
- getChild<LLUICtrl>("status_check")->setValue(TRUE);
-}
-
-void LLPanelAvatarNotes::resetControls()
-{
- //Disable "Add Friend" button for friends.
- getChildView("add_friend")->setEnabled(TRUE);
-
- enableCheckboxes(false);
-}
-
-void LLPanelAvatarNotes::onAddFriendButtonClick()
-{
- LLAvatarActions::requestFriendshipDialog(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onIMButtonClick()
-{
- LLAvatarActions::startIM(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onTeleportButtonClick()
-{
- LLAvatarActions::offerTeleport(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onCallButtonClick()
-{
- LLAvatarActions::startCall(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onShareButtonClick()
-{
- //*TODO not implemented.
-}
-
-void LLPanelAvatarNotes::enableCheckboxes(bool enable)
-{
- getChildView("status_check")->setEnabled(enable);
- getChildView("map_check")->setEnabled(enable);
- getChildView("objects_check")->setEnabled(enable);
-}
-
-LLPanelAvatarNotes::~LLPanelAvatarNotes()
-{
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
-
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
- }
-}
-
-// virtual, called by LLAvatarTracker
-void LLPanelAvatarNotes::changed(U32 mask)
-{
- getChildView("teleport")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(getAvatarId()));
-
- // update rights to avoid have checkboxes enabled when friendship is terminated. EXT-4947.
- fillRightsData();
-}
-
-// virtual
-void LLPanelAvatarNotes::onChange(EStatusType status, const std::string &channelURI, bool proximal)
-{
- if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL)
- {
- return;
- }
-
- getChildView("call")->setEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
-}
-
-void LLPanelAvatarNotes::setAvatarId(const LLUUID& id)
-{
- if(id.notNull())
- {
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
- LLPanelProfileTab::setAvatarId(id);
- LLAvatarTracker::instance().addParticularFriendObserver(getAvatarId(), this);
- }
-}
-
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -461,449 +198,3 @@ void LLPanelProfileTab::updateButtons()
|| gAgent.isGodlike();
getChildView("show_on_map_btn")->setEnabled(enable_map_btn);
}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-bool enable_god()
-{
- return gAgent.isGodlike();
-}
-
-LLPanelAvatarProfile::LLPanelAvatarProfile()
-: LLPanelProfileTab()
-{
-}
-
-BOOL LLPanelAvatarProfile::postBuild()
-{
- childSetCommitCallback("see_profile_btn",(boost::bind(&LLPanelAvatarProfile::onSeeProfileBtnClick,this)),NULL);
- childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL);
- childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL);
- childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL);
- childSetCommitCallback("teleport",(boost::bind(&LLPanelAvatarProfile::onTeleportButtonClick,this)),NULL);
- childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL);
- childSetCommitCallback("show_on_map_btn", (boost::bind(
- &LLPanelAvatarProfile::onMapButtonClick, this)), NULL);
-
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
- registrar.add("Profile.ShowOnMap", boost::bind(&LLPanelAvatarProfile::onMapButtonClick, this));
- registrar.add("Profile.Pay", boost::bind(&LLPanelAvatarProfile::pay, this));
- registrar.add("Profile.Share", boost::bind(&LLPanelAvatarProfile::share, this));
- registrar.add("Profile.BlockUnblock", boost::bind(&LLPanelAvatarProfile::toggleBlock, this));
- registrar.add("Profile.Kick", boost::bind(&LLPanelAvatarProfile::kick, this));
- registrar.add("Profile.Freeze", boost::bind(&LLPanelAvatarProfile::freeze, this));
- registrar.add("Profile.Unfreeze", boost::bind(&LLPanelAvatarProfile::unfreeze, this));
- registrar.add("Profile.CSR", boost::bind(&LLPanelAvatarProfile::csr, this));
-
- LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable;
- enable.add("Profile.EnableShowOnMap", boost::bind(&LLPanelAvatarProfile::enableShowOnMap, this));
- enable.add("Profile.EnableGod", boost::bind(&enable_god));
- enable.add("Profile.EnableBlock", boost::bind(&LLPanelAvatarProfile::enableBlock, this));
- enable.add("Profile.EnableUnblock", boost::bind(&LLPanelAvatarProfile::enableUnblock, this));
-
- LLToggleableMenu* profile_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- getChild<LLMenuButton>("overflow_btn")->setMenu(profile_menu, LLMenuButton::MP_TOP_RIGHT);
-
- LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this);
-
- resetControls();
- resetData();
-
- return TRUE;
-}
-
-void LLPanelAvatarProfile::onOpen(const LLSD& key)
-{
- LLPanelProfileTab::onOpen(key);
-
- mGroups.clear();
-
- //Disable "Add Friend" button for friends.
- getChildView("add_friend")->setEnabled(!LLAvatarActions::isFriend(getAvatarId()));
-}
-
-void LLPanelAvatarProfile::updateData()
-{
- if (getAvatarId().notNull())
- {
- LLAvatarPropertiesProcessor::getInstance()->
- sendAvatarPropertiesRequest(getAvatarId());
- LLAvatarPropertiesProcessor::getInstance()->
- sendAvatarGroupsRequest(getAvatarId());
- }
-}
-
-void LLPanelAvatarProfile::resetControls()
-{
- getChildView("status_panel")->setVisible( true);
- getChildView("profile_buttons_panel")->setVisible( true);
- getChildView("title_groups_text")->setVisible( true);
- getChildView("sl_groups")->setVisible( true);
- getChildView("add_friend")->setEnabled(true);
-
- getChildView("status_me_panel")->setVisible( false);
- getChildView("profile_me_buttons_panel")->setVisible( false);
- getChildView("account_actions_panel")->setVisible( false);
-}
-
-void LLPanelAvatarProfile::resetData()
-{
- mGroups.clear();
- getChild<LLUICtrl>("2nd_life_pic")->setValue(LLUUID::null);
- getChild<LLUICtrl>("real_world_pic")->setValue(LLUUID::null);
- getChild<LLUICtrl>("online_status")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("status_message")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("sl_description_edit")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("fl_description_edit")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("sl_groups")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("homepage_edit")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("register_date")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("acc_status_text")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("partner_text")->setValue(LLStringUtil::null);
-}
-
-void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType type)
-{
- if(APT_PROPERTIES == type)
- {
- const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
- if(avatar_data && getAvatarId() == avatar_data->avatar_id)
- {
- processProfileProperties(avatar_data);
- }
- }
- else if(APT_GROUPS == type)
- {
- LLAvatarGroups* avatar_groups = static_cast<LLAvatarGroups*>(data);
- if(avatar_groups && getAvatarId() == avatar_groups->avatar_id)
- {
- processGroupProperties(avatar_groups);
- }
- }
-}
-
-void LLPanelAvatarProfile::processProfileProperties(const LLAvatarData* avatar_data)
-{
- fillCommonData(avatar_data);
-
- fillPartnerData(avatar_data);
-
- fillAccountStatus(avatar_data);
-}
-
-void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_groups)
-{
- // *NOTE dzaporozhan
- // Group properties may arrive in two callbacks, we need to save them across
- // different calls. We can't do that in textbox as textbox may change the text.
-
- LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
- const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end();
-
- for(; it_end != it; ++it)
- {
- LLAvatarGroups::LLGroupData group_data = *it;
- mGroups[group_data.group_name] = group_data.group_id;
- }
-
- // Creating string, containing group list
- std::string groups = "";
- for (group_map_t::iterator it = mGroups.begin(); it != mGroups.end(); ++it)
- {
- if (it != mGroups.begin())
- groups += ", ";
-
- std::string group_name = LLURI::escape(it->first);
- std::string group_url= it->second.notNull()
- ? "[secondlife:///app/group/" + it->second.asString() + "/about " + group_name + "]"
- : getString("no_group_text");
-
- groups += group_url;
- }
-
- getChild<LLUICtrl>("sl_groups")->setValue(groups);
-}
-
-static void got_full_name_callback( LLHandle<LLPanel> profile_panel_handle, const std::string& full_name )
-{
- if (profile_panel_handle.isDead() ) return;
-
- LLPanelAvatarProfile* profile_panel = dynamic_cast<LLPanelAvatarProfile*>(profile_panel_handle.get());
- if ( ! profile_panel ) return;
-
- LLStringUtil::format_map_t args;
-
- std::string name;
- if (LLAvatarNameCache::useDisplayNames())
- {
- name = LLCacheName::buildUsername(full_name);
- }
- else
- {
- name = full_name;
- }
-
- args["[NAME]"] = name;
-
- std::string linden_name = profile_panel->getString("name_text_args", args);
- profile_panel->getChild<LLUICtrl>("name_descr_text")->setValue(linden_name);
-}
-
-void LLPanelAvatarProfile::onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
-{
- LLStringUtil::format_map_t args;
- args["[DISPLAY_NAME]"] = av_name.mDisplayName;
-
- std::string display_name = getString("display_name_text_args", args);
- getChild<LLUICtrl>("display_name_descr_text")->setValue(display_name);
-}
-
-void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data)
-{
- //remove avatar id from cache to get fresh info
- LLAvatarIconIDCache::getInstance()->remove(avatar_data->avatar_id);
-
- LLStringUtil::format_map_t args;
- {
- std::string birth_date = LLTrans::getString("AvatarBirthDateFormat");
- LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) avatar_data->born_on.secondsSinceEpoch()));
- args["[REG_DATE]"] = birth_date;
- }
-
- // ask (asynchronously) for the avatar name
- LLHandle<LLPanel> profile_panel_handle = getHandle();
- std::string full_name;
- if (gCacheName->getFullName(avatar_data->agent_id, full_name))
- {
- // name in cache, call callback directly
- got_full_name_callback( profile_panel_handle, full_name );
- }
- else
- {
- // not in cache, lookup name
- gCacheName->get(avatar_data->agent_id, false, boost::bind( got_full_name_callback, profile_panel_handle, _2 ));
- }
-
- // get display name
- LLAvatarNameCache::get(avatar_data->avatar_id,
- boost::bind(&LLPanelAvatarProfile::onNameCache, this, _1, _2));
-
- args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now());
- std::string register_date = getString("RegisterDateFormat", args);
- getChild<LLUICtrl>("register_date")->setValue(register_date );
- getChild<LLUICtrl>("sl_description_edit")->setValue(avatar_data->about_text);
- getChild<LLUICtrl>("fl_description_edit")->setValue(avatar_data->fl_about_text);
- getChild<LLUICtrl>("2nd_life_pic")->setValue(avatar_data->image_id);
- getChild<LLUICtrl>("real_world_pic")->setValue(avatar_data->fl_image_id);
- getChild<LLUICtrl>("homepage_edit")->setValue(avatar_data->profile_url);
-
- // Hide home page textbox if no page was set to fix "homepage URL appears clickable without URL - EXT-4734"
- getChildView("homepage_edit")->setVisible( !avatar_data->profile_url.empty());
-}
-
-void LLPanelAvatarProfile::fillPartnerData(const LLAvatarData* avatar_data)
-{
- LLTextBox* partner_text = getChild<LLTextBox>("partner_text");
- if (avatar_data->partner_id.notNull())
- {
- partner_text->setText(LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString());
- }
- else
- {
- partner_text->setText(getString("no_partner_text"));
- }
-}
-
-void LLPanelAvatarProfile::fillAccountStatus(const LLAvatarData* avatar_data)
-{
- LLStringUtil::format_map_t args;
- args["[ACCTTYPE]"] = LLAvatarPropertiesProcessor::accountType(avatar_data);
- args["[PAYMENTINFO]"] = LLAvatarPropertiesProcessor::paymentInfo(avatar_data);
- // *NOTE: AVATAR_AGEVERIFIED not currently getting set in
- // dataserver/lldataavatar.cpp for privacy considerations
- args["[AGEVERIFICATION]"] = "";
- std::string caption_text = getString("CaptionTextAcctInfo", args);
- getChild<LLUICtrl>("acc_status_text")->setValue(caption_text);
-}
-
-void LLPanelAvatarProfile::pay()
-{
- LLAvatarActions::pay(getAvatarId());
-}
-
-void LLPanelAvatarProfile::share()
-{
- LLAvatarActions::share(getAvatarId());
-}
-
-void LLPanelAvatarProfile::toggleBlock()
-{
- LLAvatarActions::toggleBlock(getAvatarId());
-}
-
-bool LLPanelAvatarProfile::enableShowOnMap()
-{
- bool is_buddy_online = LLAvatarTracker::instance().isBuddyOnline(getAvatarId());
-
- bool enable_map_btn = (is_buddy_online && is_agent_mappable(getAvatarId()))
- || gAgent.isGodlike();
- return enable_map_btn;
-}
-
-bool LLPanelAvatarProfile::enableBlock()
-{
- return LLAvatarActions::canBlock(getAvatarId()) && !LLAvatarActions::isBlocked(getAvatarId());
-}
-
-bool LLPanelAvatarProfile::enableUnblock()
-{
- return LLAvatarActions::isBlocked(getAvatarId());
-}
-
-void LLPanelAvatarProfile::kick()
-{
- LLAvatarActions::kick(getAvatarId());
-}
-
-void LLPanelAvatarProfile::freeze()
-{
- LLAvatarActions::freeze(getAvatarId());
-}
-
-void LLPanelAvatarProfile::unfreeze()
-{
- LLAvatarActions::unfreeze(getAvatarId());
-}
-
-void LLPanelAvatarProfile::csr()
-{
- std::string name;
- gCacheName->getFullName(getAvatarId(), name);
- LLAvatarActions::csr(getAvatarId(), name);
-}
-
-void LLPanelAvatarProfile::onAddFriendButtonClick()
-{
- LLAvatarActions::requestFriendshipDialog(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onSeeProfileBtnClick()
-{
- LLAvatarActions::showProfile(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onIMButtonClick()
-{
- LLAvatarActions::startIM(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onTeleportButtonClick()
-{
- LLAvatarActions::offerTeleport(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onCallButtonClick()
-{
- LLAvatarActions::startCall(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onShareButtonClick()
-{
- //*TODO not implemented
-}
-
-LLPanelAvatarProfile::~LLPanelAvatarProfile()
-{
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
-
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
- }
-}
-
-// virtual, called by LLAvatarTracker
-void LLPanelAvatarProfile::changed(U32 mask)
-{
- getChildView("teleport")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(getAvatarId()));
-}
-
-// virtual
-void LLPanelAvatarProfile::onChange(EStatusType status, const std::string &channelURI, bool proximal)
-{
- if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL)
- {
- return;
- }
-
- getChildView("call")->setEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
-}
-
-void LLPanelAvatarProfile::setAvatarId(const LLUUID& id)
-{
- if(id.notNull())
- {
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
- LLPanelProfileTab::setAvatarId(id);
- LLAvatarTracker::instance().addParticularFriendObserver(getAvatarId(), this);
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-LLPanelMyProfile::LLPanelMyProfile()
-: LLPanelAvatarProfile()
-{
-}
-
-BOOL LLPanelMyProfile::postBuild()
-{
- LLPanelAvatarProfile::postBuild();
-
- childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelMyProfile::onStatusMessageChanged, this), NULL);
-
- resetControls();
- resetData();
-
- return TRUE;
-}
-
-void LLPanelMyProfile::onOpen(const LLSD& key)
-{
- LLPanelProfileTab::onOpen(key);
-}
-
-void LLPanelMyProfile::processProfileProperties(const LLAvatarData* avatar_data)
-{
- fillCommonData(avatar_data);
-
- fillPartnerData(avatar_data);
-
- fillAccountStatus(avatar_data);
-}
-
-void LLPanelMyProfile::resetControls()
-{
- getChildView("status_panel")->setVisible( false);
- getChildView("profile_buttons_panel")->setVisible( false);
- getChildView("title_groups_text")->setVisible( false);
- getChildView("sl_groups")->setVisible( false);
- getChildView("status_me_panel")->setVisible( true);
- getChildView("profile_me_buttons_panel")->setVisible( true);
-}
-
-
-void LLPanelMyProfile::onStatusMessageChanged()
-{
- updateData();
-}
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index e95441cd58..e33a850cfa 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -36,14 +36,8 @@
class LLComboBox;
class LLLineEditor;
-enum EOnlineStatus
-{
- ONLINE_STATUS_NO = 0,
- ONLINE_STATUS_YES = 1
-};
-
/**
-* Base class for any Profile View or My Profile Panel.
+* Base class for any Profile View.
*/
class LLPanelProfileTab
: public LLPanel
@@ -111,187 +105,4 @@ private:
LLUUID mAvatarId;
};
-/**
-* Panel for displaying Avatar's first and second life related info.
-*/
-class LLPanelAvatarProfile
- : public LLPanelProfileTab
- , public LLFriendObserver
- , public LLVoiceClientStatusObserver
-{
-public:
- LLPanelAvatarProfile();
- /*virtual*/ ~LLPanelAvatarProfile();
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /**
- * LLFriendObserver trigger
- */
- virtual void changed(U32 mask);
-
- // Implements LLVoiceClientStatusObserver::onChange() to enable the call
- // button when voice is available
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
-
- /*virtual*/ void setAvatarId(const LLUUID& id);
-
- /**
- * Processes data received from server.
- */
- /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
-
- /*virtual*/ BOOL postBuild();
-
- /*virtual*/ void updateData();
-
- /*virtual*/ void resetControls();
-
- /*virtual*/ void resetData();
-
-protected:
-
- /**
- * Process profile related data received from server.
- */
- virtual void processProfileProperties(const LLAvatarData* avatar_data);
-
- /**
- * Processes group related data received from server.
- */
- virtual void processGroupProperties(const LLAvatarGroups* avatar_groups);
-
- /**
- * Fills common for Avatar profile and My Profile fields.
- */
- virtual void fillCommonData(const LLAvatarData* avatar_data);
-
- /**
- * Fills partner data.
- */
- virtual void fillPartnerData(const LLAvatarData* avatar_data);
-
- /**
- * Fills account status.
- */
- virtual void fillAccountStatus(const LLAvatarData* avatar_data);
-
- /**
- * Opens "Pay Resident" dialog.
- */
- void pay();
-
- /**
- * opens inventory and IM for sharing items
- */
- void share();
-
- /**
- * Add/remove resident to/from your block list.
- */
- void toggleBlock();
-
- void kick();
- void freeze();
- void unfreeze();
- void csr();
-
- bool enableShowOnMap();
- bool enableBlock();
- bool enableUnblock();
- bool enableGod();
-
- void onSeeProfileBtnClick();
- void onAddFriendButtonClick();
- void onIMButtonClick();
- void onCallButtonClick();
- void onTeleportButtonClick();
- void onShareButtonClick();
-
-private:
- void onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
-
- typedef std::map< std::string,LLUUID> group_map_t;
- group_map_t mGroups;
-};
-
-/**
- * Panel for displaying own first and second life related info.
- */
-class LLPanelMyProfile
- : public LLPanelAvatarProfile
-{
-public:
- LLPanelMyProfile();
-
- /*virtual*/ BOOL postBuild();
-
-protected:
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ void processProfileProperties(const LLAvatarData* avatar_data);
-
- /*virtual*/ void resetControls();
-
-protected:
- void onStatusMessageChanged();
-};
-
-/**
- * Panel for displaying Avatar's notes and modifying friend's rights.
- */
-class LLPanelAvatarNotes
- : public LLPanelProfileTab
- , public LLFriendObserver
- , public LLVoiceClientStatusObserver
-{
-public:
- LLPanelAvatarNotes();
- /*virtual*/ ~LLPanelAvatarNotes();
-
- virtual void setAvatarId(const LLUUID& id);
-
- /**
- * LLFriendObserver trigger
- */
- virtual void changed(U32 mask);
-
- // Implements LLVoiceClientStatusObserver::onChange() to enable the call
- // button when voice is available
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ BOOL postBuild();
-
- /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
-
- /*virtual*/ void updateData();
-
-protected:
-
- /*virtual*/ void resetControls();
-
- /*virtual*/ void resetData();
-
- /**
- * Fills rights data for friends.
- */
- void fillRightsData();
-
- void rightsConfirmationCallback(const LLSD& notification,
- const LLSD& response, S32 rights);
- void confirmModifyRights(bool grant, S32 rights);
- void onCommitRights();
- void onCommitNotes();
-
- void onAddFriendButtonClick();
- void onIMButtonClick();
- void onCallButtonClick();
- void onTeleportButtonClick();
- void onShareButtonClick();
- void enableCheckboxes(bool enable);
-};
-
#endif // LL_LLPANELAVATAR_H
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 81e199d85b..5c85ec438c 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -37,7 +37,7 @@
// project include
#include "llfloateravatarpicker.h"
-#include "llsidetray.h"
+#include "llfloatersidepanelcontainer.h"
#include "llsidetraypanelcontainer.h"
static LLRegisterPanelClassWrapper<LLPanelBlockedList> t_panel_blocked_list("panel_block_list_sidetray");
@@ -99,7 +99,7 @@ void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id)
void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect)
{
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
}
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index bf3bf38863..a64b4ec94d 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -172,7 +172,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
LLUUID::null,
LLAssetType::AT_LSL_TEXT,
LLInventoryType::IT_LSL,
- LLTrans::getString("PanelContentsNewScript"),
+ "New Script",
desc,
LLSaleInfo::DEFAULT,
LLInventoryItemFlags::II_FLAGS_NONE,
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 76b85d5bec..ae217958f0 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -29,6 +29,7 @@
// Library includes
#include "llbutton.h"
+#include "llfloatersidepanelcontainer.h"
#include "lltabcontainer.h"
#include "lltextbox.h"
#include "lluictrlfactory.h"
@@ -49,7 +50,6 @@
#include "llpanelgroupnotices.h"
#include "llpanelgroupgeneral.h"
-#include "llsidetray.h"
#include "llaccordionctrltab.h"
#include "llaccordionctrl.h"
@@ -597,7 +597,7 @@ void LLPanelGroup::showNotice(const std::string& subject,
//static
void LLPanelGroup::refreshCreatedGroup(const LLUUID& group_id)
{
- LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray");
+ LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray");
if(!panel)
return;
panel->setGroupID(group_id);
@@ -612,7 +612,7 @@ void LLPanelGroup::showNotice(const std::string& subject,
const std::string& inventory_name,
LLOfferInfo* inventory_offer)
{
- LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray");
+ LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray");
if(!panel)
return;
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 1576ccccdf..bc594b5517 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -579,6 +579,11 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
+ // After role member data was changed in Roles->Members
+ // need to update role titles. See STORM-918.
+ if (gc == GC_ROLE_MEMBER_DATA)
+ LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID);
+
// If this was just a titles update, we are done.
if (gc == GC_TITLES) return;
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 8d8d9bc1c4..e66dd5690c 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -35,6 +35,7 @@
#include "llqueryflags.h"
#include "llagent.h"
+#include "lldateutil.h"
#include "lliconctrl.h"
#include "llfloaterreg.h"
#include "lllineeditor.h"
@@ -1056,6 +1057,14 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval );
msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, start_date);
+ std::string time_str = LLTrans::getString("GroupMoneyDate");
+ LLSD substitution;
+
+ // We don't do time zone corrections of the calculated number of seconds
+ // because we don't have a full time stamp, only a date.
+ substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%A %b %d, %Y", start_date);
+ LLStringUtil::format (time_str, substitution);
+
if ( interval_days != mImplementationp->mIntervalLength ||
current_interval != mImplementationp->mCurrentInterval )
{
@@ -1064,7 +1073,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
return;
}
- std::string text = start_date;
+ std::string text = time_str;
text.append("\n\n");
S32 total_amount = 0;
@@ -1203,7 +1212,15 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
// Start with the date.
if (text == mImplementationp->mLoadingText)
{
- text = start_date + "\n\n";
+ std::string time_str = LLTrans::getString("GroupMoneyDate");
+ LLSD substitution;
+
+ // We don't do time zone corrections of the calculated number of seconds
+ // because we don't have a full time stamp, only a date.
+ substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%A %b %d, %Y", start_date);
+ LLStringUtil::format (time_str, substitution);
+
+ text = time_str + "\n\n";
}
S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData);
@@ -1408,14 +1425,29 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
}
text.append(LLTrans::getString("SummaryForTheWeek"));
- text.append(start_date);
+
+ std::string date_format_str = LLTrans::getString("GroupPlanningDate");
+ std::string time_str = date_format_str;
+ LLSD substitution;
+ // We don't do time zone corrections of the calculated number of seconds
+ // because we don't have a full time stamp, only a date.
+ substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%Y-%m-%d", start_date);
+ LLStringUtil::format (time_str, substitution);
+
+ text.append(time_str);
+ text.append(". ");
if (current_interval == 0)
{
text.append(LLTrans::getString("NextStipendDay"));
- text.append(next_stipend_date);
- text.append("\n\n");
- text.append(llformat("%-24sL$%6d\n", LLTrans::getString("GroupMoneyBalance").c_str(), balance ));
+
+ time_str = date_format_str;
+ substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%Y-%m-%d", next_stipend_date);
+ LLStringUtil::format (time_str, substitution);
+
+ text.append(time_str);
+ text.append(".\n\n");
+ text.append(llformat("%-23sL$%6d\n", LLTrans::getString("GroupMoneyBalance").c_str(), balance ));
text.append(1, '\n');
}
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index e64192c2ae..31c0e3d01a 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -82,8 +82,8 @@ public:
: panel("panel"),
group_id("group_id")
{
- mouse_opaque(false);
- follows.flags(FOLLOWS_ALL);
+ changeDefault(mouse_opaque, false);
+ changeDefault(follows.flags, FOLLOWS_ALL);
}
};
LLGroupDropTarget(const Params&);
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index e370f2f622..0295ad151f 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -40,7 +40,6 @@
#include "llparticipantlist.h"
#include "llimview.h"
#include "llvoicechannel.h"
-#include "llsidetray.h"
#include "llspeakers.h"
#include "lltrans.h"
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index a9cc247d1b..c7454e85a9 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -42,6 +42,7 @@
#include "llagentui.h"
#include "llcallbacklist.h"
#include "lldndbutton.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llfolderviewitem.h"
#include "llinventorymodelbackgroundfetch.h"
@@ -51,7 +52,6 @@
#include "llmenubutton.h"
#include "llplacesinventorybridge.h"
#include "llplacesinventorypanel.h"
-#include "llsidetray.h"
#include "lltoggleablemenu.h"
#include "llviewermenu.h"
#include "llviewerregion.h"
@@ -367,7 +367,7 @@ void LLLandmarksPanel::onSelectorButtonClicked()
key["type"] = "landmark";
key["id"] = listenerp->getUUID();
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
}
}
@@ -786,7 +786,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
}
else
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
}
else if ("category" == command_name)
@@ -1309,7 +1309,13 @@ void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark,
landmark->getGlobalPos(landmark_global_pos);
// let's toggle pick panel into panel places
- LLPanel* panel_places = LLSideTray::getInstance()->getPanel("panel_places");//-> sidebar_places
+ LLPanel* panel_places = NULL;
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("places");
+ if (floaterp)
+ {
+ panel_places = floaterp->findChild<LLPanel>("main_panel");
+ }
+
if (!panel_places)
{
llassert(NULL != panel_places);
@@ -1393,10 +1399,6 @@ static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::strin
inventory_list->restoreFolderState();
}
- // Open the immediate children of the root folder, since those
- // are invisible in the UI and thus must always be open.
- inventory_list->getRootFolder()->openTopLevelFolders();
-
if (inventory_list->getFilterSubString().empty() && string.empty())
{
// current filter and new filter empty, do nothing
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 27f341b4f6..058d1ad6bc 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -154,10 +154,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
}
updateLocationCombo(false);
- LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo");
- mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile"));
- mode_combo.setCommitCallback(boost::bind(&LLPanelLogin::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2));
-
LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo");
server_choice_combo->setCommitCallback(onSelectServer, NULL);
server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1));
@@ -287,15 +283,15 @@ LLPanelLogin::~LLPanelLogin()
// virtual
void LLPanelLogin::draw()
{
- glPushMatrix();
+ gGL.pushMatrix();
{
F32 image_aspect = 1.333333f;
F32 view_aspect = (F32)getRect().getWidth() / (F32)getRect().getHeight();
// stretch image to maintain aspect ratio
if (image_aspect > view_aspect)
{
- glTranslatef(-0.5f * (image_aspect / view_aspect - 1.f) * getRect().getWidth(), 0.f, 0.f);
- glScalef(image_aspect / view_aspect, 1.f, 1.f);
+ gGL.translatef(-0.5f * (image_aspect / view_aspect - 1.f) * getRect().getWidth(), 0.f, 0.f);
+ gGL.scalef(image_aspect / view_aspect, 1.f, 1.f);
}
S32 width = getRect().getWidth();
@@ -310,7 +306,7 @@ void LLPanelLogin::draw()
mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight());
};
}
- glPopMatrix();
+ gGL.popMatrix();
LLPanel::draw();
}
@@ -1025,32 +1021,6 @@ void LLPanelLogin::updateLoginPanelLinks()
sInstance->getChildView("forgot_password_text")->setVisible( system_grid);
}
-void LLPanelLogin::onModeChange(const LLSD& original_value, const LLSD& new_value)
-{
- if (original_value.asString() != new_value.asString())
- {
- LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLPanelLogin::onModeChangeConfirm, this, original_value, new_value, _1, _2));
- }
-}
-
-void LLPanelLogin::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- switch (option)
- {
- case 0:
- gSavedSettings.getControl("SessionSettingsFile")->set(new_value);
- LLAppViewer::instance()->forceQuit();
- break;
- case 1:
- // revert to original value
- getChild<LLUICtrl>("mode_combo")->setValue(original_value);
- break;
- default:
- break;
- }
-}
-
std::string canonicalize_username(const std::string& name)
{
std::string cname = name;
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 11273453ba..a439c4ff6b 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -97,9 +97,6 @@ private:
static void onServerComboLostFocus(LLFocusableElement*);
static void updateServerCombo();
static void updateStartSLURL();
- void onModeChange(const LLSD& original_value, const LLSD& new_value);
- void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response);
-
static void updateLoginPanelLinks();
private:
@@ -115,7 +112,4 @@ private:
static BOOL sCapslockDidNotification;
};
-std::string load_password_from_disk(void);
-void save_password_to_disk(const char* hashed_password);
-
#endif
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 1920cc2940..9944b51902 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -38,6 +38,7 @@
#include "llinventorymodelbackgroundfetch.h"
#include "llinventorypanel.h"
#include "llfiltereditor.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterreg.h"
#include "llmenubutton.h"
#include "lloutfitobserver.h"
@@ -51,7 +52,6 @@
#include "llviewermenu.h"
#include "llviewertexturelist.h"
#include "llsidepanelinventory.h"
-#include "llsidetray.h"
const std::string FILTERS_FILENAME("filters.xml");
@@ -111,7 +111,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLPanelMainInventory::doCreate, this, _2));
- mCommitCallbackRegistrar.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow, this));
+ //mCommitCallbackRegistrar.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow, this));
mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this));
mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this));
mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2));
@@ -572,28 +572,21 @@ void LLPanelMainInventory::updateItemcountText()
{
text = getString("ItemcountUnknown");
}
+
+ // *TODO: Cache the LLUICtrl* for the ItemcountText control
getChild<LLUICtrl>("ItemcountText")->setValue(text);
}
void LLPanelMainInventory::onFocusReceived()
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
-
- if (inbox_panel)
- {
- inbox_panel->clearSelection();
- }
-
- LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox");
-
- if (outbox_panel)
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (!sidepanel_inventory)
{
- outbox_panel->clearSelection();
+ llwarns << "Could not find Inventory Panel in My Inventory floater" << llendl;
+ return;
}
- sidepanel_inventory->updateVerbs();
+ sidepanel_inventory->clearSelections(false, true, true);
}
void LLPanelMainInventory::setFilterTextFromFilter()
@@ -1176,7 +1169,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "share")
{
- LLSidepanelInventory* parent = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
return parent ? parent->canShare() : FALSE;
}
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index af74f8f261..7cb4bbf891 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -1,248 +1,250 @@
-/**
- * @file llpanelmarketplaceinbox.cpp
- * @brief Panel for marketplace inbox
- *
-* $LicenseInfo:firstyear=2011&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llpanelmarketplaceinbox.h"
-
-#include "llappviewer.h"
-#include "llbutton.h"
-#include "llinventorypanel.h"
-#include "llfolderview.h"
-#include "llsidepanelinventory.h"
-
-
-#define SUPPORTING_FRESH_ITEM_COUNT 0
-
-
-static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
-
-const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams()
-{
- return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceInbox>();
-}
-
-// protected
-LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
- : LLPanel(p)
- , mInventoryPanel(NULL)
-{
-}
-
-LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
-{
-}
-
-// virtual
-BOOL LLPanelMarketplaceInbox::postBuild()
-{
- LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceInbox::handleLoginComplete, this));
-
- LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this));
-
- return TRUE;
-}
-
-void LLPanelMarketplaceInbox::onSelectionChange()
-{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->updateVerbs();
-}
-
-
-void LLPanelMarketplaceInbox::handleLoginComplete()
-{
- // Set us up as the class to drive the badge value for the sidebar_inventory button
- LLSideTray::getInstance()->setTabButtonBadgeDriver("sidebar_inventory", this);
-}
-
-void LLPanelMarketplaceInbox::setupInventoryPanel()
-{
- LLView * inbox_inventory_placeholder = getChild<LLView>("inbox_inventory_placeholder");
- LLView * inbox_inventory_parent = inbox_inventory_placeholder->getParent();
-
- mInventoryPanel =
- LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_inbox_inventory.xml",
- inbox_inventory_parent,
- LLInventoryPanel::child_registry_t::instance());
-
- // Reshape the inventory to the proper size
- LLRect inventory_placeholder_rect = inbox_inventory_placeholder->getRect();
- mInventoryPanel->setShape(inventory_placeholder_rect);
-
- // Set the sort order newest to oldest, and a selection change callback
- mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
- mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this));
-
- // Set up the note to display when the inbox is empty
- mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryInboxNoItems");
-
- // Hide the placeholder text
- inbox_inventory_placeholder->setVisible(FALSE);
-}
-
-void LLPanelMarketplaceInbox::onFocusReceived()
-{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- if (sidepanel_inventory)
- {
- LLInventoryPanel * inv_panel = sidepanel_inventory->getActivePanel();
-
- if (inv_panel)
- {
- inv_panel->clearSelection();
- }
-
- LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox");
-
- if (outbox_panel)
- {
- outbox_panel->clearSelection();
- }
-
- sidepanel_inventory->updateVerbs();
- }
-}
-
-BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
-{
- *accept = ACCEPT_NO;
- return TRUE;
-}
-
-U32 LLPanelMarketplaceInbox::getFreshItemCount() const
-{
-#if SUPPORTING_FRESH_ITEM_COUNT
-
- //
- // NOTE: When turning this on, be sure to test the no inbox/outbox case because this code probably
- // will return "2" for the Inventory and LIBRARY top-levels when that happens.
- //
-
- U32 fresh_item_count = 0;
-
- if (mInventoryPanel)
- {
- const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
-
- if (inbox_folder)
- {
- LLFolderViewFolder::folders_t::const_iterator folders_it = inbox_folder->getFoldersBegin();
- LLFolderViewFolder::folders_t::const_iterator folders_end = inbox_folder->getFoldersEnd();
-
- for (; folders_it != folders_end; ++folders_it)
- {
- const LLFolderViewFolder * folder = *folders_it;
-
- // TODO: Replace this check with new "fresh" flag
- if (folder->getCreationDate() > 1500)
- {
- fresh_item_count++;
- }
- }
- }
- }
-
- return fresh_item_count;
-#else
- return getTotalItemCount();
-#endif
-}
-
-U32 LLPanelMarketplaceInbox::getTotalItemCount() const
-{
- U32 item_count = 0;
-
- if (mInventoryPanel)
- {
- const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
-
- if (inbox_folder)
- {
- item_count += inbox_folder->getFoldersCount();
- }
- }
-
- return item_count;
-}
-
-std::string LLPanelMarketplaceInbox::getBadgeString() const
-{
- std::string item_count_str("");
-
- // If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel
- if (getParent()->getVisible() &&
- (LLSideTray::getInstance()->getCollapsed() || !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")))
- {
- U32 item_count = getFreshItemCount();
-
- if (item_count)
- {
- item_count_str = llformat("%d", item_count);
- }
- }
-
- return item_count_str;
-}
-
-void LLPanelMarketplaceInbox::draw()
-{
- U32 item_count = getTotalItemCount();
-
- LLView * fresh_new_count_view = getChildView("inbox_fresh_new_count");
-
- if (item_count > 0)
- {
- std::string item_count_str = llformat("%d", item_count);
-
- LLStringUtil::format_map_t args;
- args["[NUM]"] = item_count_str;
- getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelWithArg", args));
-
-#if SUPPORTING_FRESH_ITEM_COUNT
- // set green text to fresh item count
- U32 fresh_item_count = getFreshItemCount();
- fresh_new_count_view->setVisible((fresh_item_count > 0));
-
- if (fresh_item_count > 0)
- {
- getChild<LLUICtrl>("inbox_fresh_new_count")->setTextArg("[NUM]", llformat("%d", fresh_item_count));
- }
-#else
- fresh_new_count_view->setVisible(FALSE);
-#endif
- }
- else
- {
- getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelNoArg"));
-
- fresh_new_count_view->setVisible(FALSE);
- }
-
- LLPanel::draw();
-}
+/**
+ * @file llpanelmarketplaceinbox.cpp
+ * @brief Panel for marketplace inbox
+ *
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelmarketplaceinbox.h"
+#include "llpanelmarketplaceinboxinventory.h"
+
+#include "llappviewer.h"
+#include "llbutton.h"
+#include "llinventorypanel.h"
+#include "llfloatersidepanelcontainer.h"
+#include "llfolderview.h"
+#include "llsidepanelinventory.h"
+#include "llviewercontrol.h"
+
+
+static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
+
+const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams()
+{
+ return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceInbox>();
+}
+
+// protected
+LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
+ : LLPanel(p)
+ , mInventoryPanel(NULL)
+{
+}
+
+LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
+{
+}
+
+// virtual
+BOOL LLPanelMarketplaceInbox::postBuild()
+{
+ LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this));
+
+ return TRUE;
+}
+
+void LLPanelMarketplaceInbox::onSelectionChange()
+{
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+
+ sidepanel_inventory->updateVerbs();
+}
+
+
+LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
+{
+ LLView * inbox_inventory_placeholder = getChild<LLView>("inbox_inventory_placeholder");
+ LLView * inbox_inventory_parent = inbox_inventory_placeholder->getParent();
+
+ mInventoryPanel =
+ LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_inbox_inventory.xml",
+ inbox_inventory_parent,
+ LLInventoryPanel::child_registry_t::instance());
+
+ llassert(mInventoryPanel);
+
+ // Reshape the inventory to the proper size
+ LLRect inventory_placeholder_rect = inbox_inventory_placeholder->getRect();
+ mInventoryPanel->setShape(inventory_placeholder_rect);
+
+ // Set the sort order newest to oldest
+ mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+ mInventoryPanel->getFilter()->markDefault();
+
+ // Set selection callback for proper update of inventory status buttons
+ mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this));
+
+ // Set up the note to display when the inbox is empty
+ mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryInboxNoItems");
+
+ // Hide the placeholder text
+ inbox_inventory_placeholder->setVisible(FALSE);
+
+ return mInventoryPanel;
+}
+
+void LLPanelMarketplaceInbox::onFocusReceived()
+{
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->clearSelections(true, false, true);
+ }
+
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+}
+
+BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
+{
+ *accept = ACCEPT_NO;
+ return TRUE;
+}
+
+U32 LLPanelMarketplaceInbox::getFreshItemCount() const
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+
+ //
+ // NOTE: When turning this on, be sure to test the no inbox/outbox case because this code probably
+ // will return "2" for the Inventory and LIBRARY top-levels when that happens.
+ //
+
+ U32 fresh_item_count = 0;
+
+ if (mInventoryPanel)
+ {
+ const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
+
+ if (inbox_folder)
+ {
+ LLFolderViewFolder::folders_t::const_iterator folders_it = inbox_folder->getFoldersBegin();
+ LLFolderViewFolder::folders_t::const_iterator folders_end = inbox_folder->getFoldersEnd();
+
+ for (; folders_it != folders_end; ++folders_it)
+ {
+ const LLFolderViewFolder * folder_view = *folders_it;
+ const LLInboxFolderViewFolder * inbox_folder_view = dynamic_cast<const LLInboxFolderViewFolder*>(folder_view);
+
+ if (inbox_folder_view && inbox_folder_view->isFresh())
+ {
+ fresh_item_count++;
+ }
+ }
+
+ LLFolderViewFolder::items_t::const_iterator items_it = inbox_folder->getItemsBegin();
+ LLFolderViewFolder::items_t::const_iterator items_end = inbox_folder->getItemsEnd();
+
+ for (; items_it != items_end; ++items_it)
+ {
+ const LLFolderViewItem * item_view = *items_it;
+ const LLInboxFolderViewItem * inbox_item_view = dynamic_cast<const LLInboxFolderViewItem*>(item_view);
+
+ if (inbox_item_view && inbox_item_view->isFresh())
+ {
+ fresh_item_count++;
+ }
+ }
+ }
+ }
+
+ return fresh_item_count;
+#else
+ return getTotalItemCount();
+#endif
+}
+
+U32 LLPanelMarketplaceInbox::getTotalItemCount() const
+{
+ U32 item_count = 0;
+
+ if (mInventoryPanel)
+ {
+ const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
+
+ if (inbox_folder)
+ {
+ item_count += inbox_folder->getFoldersCount();
+ item_count += inbox_folder->getItemsCount();
+ }
+ }
+
+ return item_count;
+}
+
+std::string LLPanelMarketplaceInbox::getBadgeString() const
+{
+ std::string item_count_str("");
+
+ LLPanel *inventory_panel = LLFloaterSidePanelContainer::getPanel("inventory");
+
+ // If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel
+ if (getParent()->getVisible() && inventory_panel && !inventory_panel->isInVisibleChain())
+ {
+ U32 item_count = getFreshItemCount();
+
+ if (item_count)
+ {
+ item_count_str = llformat("%d", item_count);
+ }
+ }
+
+ return item_count_str;
+}
+
+void LLPanelMarketplaceInbox::draw()
+{
+ U32 item_count = getTotalItemCount();
+
+ LLView * fresh_new_count_view = getChildView("inbox_fresh_new_count");
+
+ if (item_count > 0)
+ {
+ std::string item_count_str = llformat("%d", item_count);
+
+ LLStringUtil::format_map_t args;
+ args["[NUM]"] = item_count_str;
+ getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelWithArg", args));
+
+#if SUPPORTING_FRESH_ITEM_COUNT
+ // set green text to fresh item count
+ U32 fresh_item_count = getFreshItemCount();
+ fresh_new_count_view->setVisible((fresh_item_count > 0));
+
+ if (fresh_item_count > 0)
+ {
+ getChild<LLUICtrl>("inbox_fresh_new_count")->setTextArg("[NUM]", llformat("%d", fresh_item_count));
+ }
+#else
+ fresh_new_count_view->setVisible(FALSE);
+#endif
+ }
+ else
+ {
+ getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelNoArg"));
+
+ fresh_new_count_view->setVisible(FALSE);
+ }
+
+ LLPanel::draw();
+}
diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h
index 4ecea29304..3531518e51 100644
--- a/indra/newview/llpanelmarketplaceinbox.h
+++ b/indra/newview/llpanelmarketplaceinbox.h
@@ -28,18 +28,15 @@
#define LL_LLPANELMARKETPLACEINBOX_H
#include "llpanel.h"
-#include "llsidetray.h"
class LLInventoryPanel;
-class LLPanelMarketplaceInbox : public LLPanel, public LLSideTrayTabBadgeDriver
+class LLPanelMarketplaceInbox : public LLPanel
{
public:
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
- {
- Params() {}
- };
+ {};
LOG_CLASS(LLPanelMarketplaceInbox);
@@ -55,7 +52,7 @@ public:
/*virtual*/ void draw();
- void setupInventoryPanel();
+ LLInventoryPanel * setupInventoryPanel();
U32 getFreshItemCount() const;
U32 getTotalItemCount() const;
@@ -63,7 +60,6 @@ public:
std::string getBadgeString() const;
private:
- void handleLoginComplete();
void onSelectionChange();
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index b644f0e5cb..678e4f2843 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -37,12 +37,15 @@
#include "llviewerfoldertype.h"
+#define DEBUGGING_FRESHNESS 0
+
//
// statics
//
static LLDefaultChildRegistry::Register<LLInboxInventoryPanel> r1("inbox_inventory_panel");
static LLDefaultChildRegistry::Register<LLInboxFolderViewFolder> r2("inbox_folder_view_folder");
+static LLDefaultChildRegistry::Register<LLInboxFolderViewItem> r3("inbox_folder_view_item");
//
@@ -66,7 +69,7 @@ void LLInboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& para
LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false);
- // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
+ // leslie -- temporary HACK to work around sim not creating inbox with proper system folder type
if (root_id.isNull())
{
std::string start_folder_name(params.start_folder());
@@ -133,6 +136,27 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge
return LLUICtrlFactory::create<LLInboxFolderViewFolder>(params);
}
+LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge)
+{
+ LLInboxFolderViewItem::Params params;
+
+ params.name = bridge->getDisplayName();
+ params.icon = bridge->getIcon();
+ params.icon_open = bridge->getOpenIcon();
+
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
+ {
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
+
+ params.creation_date = bridge->getCreationDate();
+ params.root = mFolderRoot;
+ params.listener = bridge;
+ params.rect = LLRect (0, 0, 0, 0);
+ params.tool_tip = params.name;
+
+ return LLUICtrlFactory::create<LLInboxFolderViewItem>(params);
+}
//
// LLInboxFolderViewFolder Implementation
@@ -143,25 +167,163 @@ LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p)
, LLBadgeOwner(getHandle())
, mFresh(false)
{
+#if SUPPORTING_FRESH_ITEM_COUNT
initBadgeParams(p.new_badge());
-}
-
-LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
-{
+#endif
}
// virtual
void LLInboxFolderViewFolder::draw()
{
+#if SUPPORTING_FRESH_ITEM_COUNT
if (!badgeHasParent())
{
addBadgeToParentPanel();
}
setBadgeVisibility(mFresh);
+#endif
LLFolderViewFolder::draw();
}
+void LLInboxFolderViewFolder::selectItem()
+{
+ deFreshify();
+
+ LLFolderViewFolder::selectItem();
+}
+
+void LLInboxFolderViewFolder::toggleOpen()
+{
+ deFreshify();
+
+ LLFolderViewFolder::toggleOpen();
+}
+
+void LLInboxFolderViewFolder::computeFreshness()
+{
+ const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
+
+ if (last_expansion_utc > 0)
+ {
+ mFresh = (mCreationDate > last_expansion_utc);
+
+#if DEBUGGING_FRESHNESS
+ if (mFresh)
+ {
+ llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl;
+ }
+#endif
+ }
+ else
+ {
+ mFresh = true;
+ }
+}
+
+void LLInboxFolderViewFolder::deFreshify()
+{
+ mFresh = false;
+
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+}
+
+void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc)
+{
+ mCreationDate = creation_date_utc;
+
+ if (mParentFolder == mRoot)
+ {
+ computeFreshness();
+ }
+}
+
+//
+// LLInboxFolderViewItem Implementation
+//
+
+LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p)
+ : LLFolderViewItem(p)
+ , LLBadgeOwner(getHandle())
+ , mFresh(false)
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+ initBadgeParams(p.new_badge());
+#endif
+}
+
+BOOL LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
+{
+ BOOL retval = LLFolderViewItem::addToFolder(folder, root);
+
+#if SUPPORTING_FRESH_ITEM_COUNT
+ // Compute freshness if our parent is the root folder for the inbox
+ if (mParentFolder == mRoot)
+ {
+ computeFreshness();
+ }
+#endif
+
+ return retval;
+}
+
+BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ deFreshify();
+
+ return LLFolderViewItem::handleDoubleClick(x, y, mask);
+}
+
+// virtual
+void LLInboxFolderViewItem::draw()
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+ if (!badgeHasParent())
+ {
+ addBadgeToParentPanel();
+ }
+
+ setBadgeVisibility(mFresh);
+#endif
+
+ LLFolderViewItem::draw();
+}
+
+void LLInboxFolderViewItem::selectItem()
+{
+ deFreshify();
+
+ LLFolderViewItem::selectItem();
+}
+
+void LLInboxFolderViewItem::computeFreshness()
+{
+ const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
+
+ if (last_expansion_utc > 0)
+ {
+ mFresh = (mCreationDate > last_expansion_utc);
+
+#if DEBUGGING_FRESHNESS
+ if (mFresh)
+ {
+ llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl;
+ }
+#endif
+ }
+ else
+ {
+ mFresh = true;
+ }
+}
+
+void LLInboxFolderViewItem::deFreshify()
+{
+ mFresh = false;
+
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+}
+
// eof
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h
index 8f198c41c1..d6b827ee3e 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.h
+++ b/indra/newview/llpanelmarketplaceinboxinventory.h
@@ -32,13 +32,16 @@
#include "llinventorypanel.h"
#include "llfolderviewitem.h"
+
+#define SUPPORTING_FRESH_ITEM_COUNT 1
+
+
+
class LLInboxInventoryPanel : public LLInventoryPanel
{
public:
struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params>
- {
- Params() {}
- };
+ {};
LLInboxInventoryPanel(const Params& p);
~LLInboxInventoryPanel();
@@ -47,7 +50,8 @@ public:
void buildFolderView(const LLInventoryPanel::Params& params);
// virtual
- class LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge);
+ LLFolderViewFolder * createFolderViewFolder(LLInvFVBridge * bridge);
+ LLFolderViewItem * createFolderViewItem(LLInvFVBridge * bridge);
};
@@ -65,13 +69,53 @@ public:
};
LLInboxFolderViewFolder(const Params& p);
- ~LLInboxFolderViewFolder();
void draw();
+ void selectItem();
+ void toggleOpen();
+
+ void computeFreshness();
+ void deFreshify();
+
+ bool isFresh() const { return mFresh; }
+
protected:
- bool mFresh;
+ void setCreationDate(time_t creation_date_utc);
+
+ bool mFresh;
};
+class LLInboxFolderViewItem : public LLFolderViewItem, public LLBadgeOwner
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
+ {
+ Optional<LLBadge::Params> new_badge;
+
+ Params()
+ : new_badge("new_badge")
+ {
+ }
+ };
+
+ LLInboxFolderViewItem(const Params& p);
+
+ BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
+ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
+ void draw();
+
+ void selectItem();
+
+ void computeFreshness();
+ void deFreshify();
+
+ bool isFresh() const { return mFresh; }
+
+protected:
+ bool mFresh;
+};
+
#endif //LL_INBOXINVENTORYPANEL_H
diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp
index 74d0de3b30..12960fd0d6 100644
--- a/indra/newview/llpanelmarketplaceoutbox.cpp
+++ b/indra/newview/llpanelmarketplaceoutbox.cpp
@@ -27,18 +27,25 @@
#include "llviewerprecompiledheaders.h"
#include "llpanelmarketplaceoutbox.h"
+#include "llpanelmarketplaceoutboxinventory.h"
#include "llappviewer.h"
#include "llbutton.h"
#include "llcoros.h"
#include "lleventcoro.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventorypanel.h"
#include "llloadingindicator.h"
+#include "llnotificationsutil.h"
#include "llpanelmarketplaceinbox.h"
+#include "llsdutil.h"
#include "llsidepanelinventory.h"
-#include "llsidetray.h"
#include "lltimer.h"
-
+#include "llviewernetwork.h"
+#include "llagent.h"
+#include "llviewermedia.h"
+#include "llfolderview.h"
+#include "llinventoryfunctions.h"
static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox");
@@ -82,38 +89,25 @@ void LLPanelMarketplaceOutbox::handleLoginComplete()
void LLPanelMarketplaceOutbox::onFocusReceived()
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
+ LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
if (sidepanel_inventory)
{
- LLInventoryPanel * inv_panel = sidepanel_inventory->getActivePanel();
-
- if (inv_panel)
- {
- inv_panel->clearSelection();
- }
-
- LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
-
- if (inbox_panel)
- {
- inbox_panel->clearSelection();
- }
-
- sidepanel_inventory->updateVerbs();
+ sidepanel_inventory->clearSelections(true, true, false);
}
}
void LLPanelMarketplaceOutbox::onSelectionChange()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->updateVerbs();
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->updateVerbs();
+ }
}
-void LLPanelMarketplaceOutbox::setupInventoryPanel()
+LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel()
{
- LLView * outbox_inventory_placeholder = getChild<LLView>("outbox_inventory_placeholder");
+ LLView * outbox_inventory_placeholder = getChild<LLView>("outbox_inventory_placeholder_panel");
LLView * outbox_inventory_parent = outbox_inventory_placeholder->getParent();
mInventoryPanel =
@@ -121,12 +115,17 @@ void LLPanelMarketplaceOutbox::setupInventoryPanel()
outbox_inventory_parent,
LLInventoryPanel::child_registry_t::instance());
+ llassert(mInventoryPanel);
+
// Reshape the inventory to the proper size
LLRect inventory_placeholder_rect = outbox_inventory_placeholder->getRect();
mInventoryPanel->setShape(inventory_placeholder_rect);
- // Set the sort order newest to oldest, and a selection change callback
+ // Set the sort order newest to oldest
mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+ mInventoryPanel->getFilter()->markDefault();
+
+ // Set selection callback for proper update of inventory status buttons
mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceOutbox::onSelectionChange, this));
// Set up the note to display when the outbox is empty
@@ -134,13 +133,34 @@ void LLPanelMarketplaceOutbox::setupInventoryPanel()
// Hide the placeholder text
outbox_inventory_placeholder->setVisible(FALSE);
+
+ return mInventoryPanel;
}
-bool LLPanelMarketplaceOutbox::isOutboxEmpty() const
+BOOL LLPanelMarketplaceOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
{
- // TODO: Check for contents of outbox
+ BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+
+ if (!handled && mInventoryPanel && mInventoryPanel->getRootFolder())
+ {
+ handled = mInventoryPanel->getRootFolder()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
- return false;
+ if (handled)
+ {
+ mInventoryPanel->getRootFolder()->setDragAndDropThisFrame();
+ }
+ }
+
+ return handled;
+}
+
+bool LLPanelMarketplaceOutbox::isOutboxEmpty() const
+{
+ return (getTotalItemCount() == 0);
}
bool LLPanelMarketplaceOutbox::isSyncInProgress() const
@@ -164,28 +184,119 @@ void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel)
waitForEventOn(self, "mainloop");
}
- outboxPanel->onSyncComplete();
+ outboxPanel->onSyncComplete(true, LLSD::emptyMap());
gTimeDelayDebugFunc = "";
}
-void LLPanelMarketplaceOutbox::onSyncButtonClicked()
+
+class LLInventorySyncResponder : public LLHTTPClient::Responder
{
- // TODO: Actually trigger sync to marketplace
+public:
+ LLInventorySyncResponder(LLPanelMarketplaceOutbox * outboxPanel)
+ : LLCurl::Responder()
+ , mOutboxPanel(outboxPanel)
+ {
+ }
+
+ void completed(U32 status, const std::string& reason, const LLSD& content)
+ {
+ llinfos << "inventory_import complete status: " << status << ", reason: " << reason << llendl;
+
+ if (isGoodStatus(status))
+ {
+ // Complete success
+ llinfos << "success" << llendl;
+ }
+ else
+ {
+ llwarns << "failed" << llendl;
+ }
+
+ mOutboxPanel->onSyncComplete(isGoodStatus(status), content);
+ }
+
+private:
+ LLPanelMarketplaceOutbox * mOutboxPanel;
+};
+void LLPanelMarketplaceOutbox::onSyncButtonClicked()
+{
+ // Get the sync animation going
mSyncInProgress = true;
updateSyncButtonStatus();
- // Set a timer (for testing only)
+ // Make the url for the inventory import request
+ std::string url = "https://marketplace.secondlife.com/";
- gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this));
+ if (!LLGridManager::getInstance()->isInProductionGrid())
+ {
+ std::string gridLabel = LLGridManager::getInstance()->getGridLabel();
+ url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str());
+
+ // TEMP for Jim's pdp
+ //url = "http://pdp24.lindenlab.com:3000/";
+ }
+
+ url += "api/1/users/";
+ url += gAgent.getID().getString();
+ url += "/inventory_import";
+
+ llinfos << "http get: " << url << llendl;
+ LLHTTPClient::get(url, new LLInventorySyncResponder(this), LLViewerMedia::getHeaders());
+
+ // Set a timer (for testing only)
+ //gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this));
}
-void LLPanelMarketplaceOutbox::onSyncComplete()
+void LLPanelMarketplaceOutbox::onSyncComplete(bool goodStatus, const LLSD& content)
{
mSyncInProgress = false;
-
updateSyncButtonStatus();
+
+ const LLSD& errors_list = content["errors"];
+
+ if (goodStatus && (errors_list.size() == 0))
+ {
+ LLNotificationsUtil::add("OutboxUploadComplete", LLSD::emptyMap(), LLSD::emptyMap());
+ }
+ else
+ {
+ LLNotificationsUtil::add("OutboxUploadHadErrors", LLSD::emptyMap(), LLSD::emptyMap());
+ }
+
+ llinfos << "Marketplace upload llsd:" << llendl;
+ llinfos << ll_pretty_print_sd(content) << llendl;
+ llinfos << llendl;
+
+ const LLSD& imported_list = content["imported"];
+ LLSD::array_const_iterator it = imported_list.beginArray();
+ for ( ; it != imported_list.endArray(); ++it)
+ {
+ LLUUID imported_folder = (*it).asUUID();
+ llinfos << "Successfully uploaded folder " << imported_folder.asString() << " to marketplace." << llendl;
+ }
+
+ for (it = errors_list.beginArray(); it != errors_list.endArray(); ++it)
+ {
+ const LLSD& item_error_map = (*it);
+
+ LLUUID error_folder = item_error_map["folder_id"].asUUID();
+ const std::string& error_string = item_error_map["identifier"].asString();
+ LLUUID error_item = item_error_map["item_id"].asUUID();
+ const std::string& error_item_name = item_error_map["item_name"].asString();
+ const std::string& error_message = item_error_map["message"].asString();
+
+ llinfos << "Error item " << error_folder.asString() << ", " << error_string << ", "
+ << error_item.asString() << ", " << error_item_name << ", " << error_message << llendl;
+
+ LLFolderViewFolder * item_folder = mInventoryPanel->getRootFolder()->getFolderByID(error_folder);
+ LLOutboxFolderViewFolder * outbox_item_folder = dynamic_cast<LLOutboxFolderViewFolder *>(item_folder);
+
+ llassert(outbox_item_folder);
+
+ outbox_item_folder->setErrorString(error_string);
+ }
}
void LLPanelMarketplaceOutbox::updateSyncButtonStatus()
@@ -207,3 +318,46 @@ void LLPanelMarketplaceOutbox::updateSyncButtonStatus()
mSyncButton->setEnabled(!isOutboxEmpty());
}
}
+
+U32 LLPanelMarketplaceOutbox::getTotalItemCount() const
+{
+ U32 item_count = 0;
+
+ if (mInventoryPanel)
+ {
+ const LLFolderViewFolder * outbox_folder = mInventoryPanel->getRootFolder();
+
+ if (outbox_folder)
+ {
+ item_count += outbox_folder->getFoldersCount();
+ }
+ }
+
+ return item_count;
+}
+
+void LLPanelMarketplaceOutbox::draw()
+{
+ const U32 item_count = getTotalItemCount();
+ const bool not_empty = (item_count > 0);
+
+ if (not_empty)
+ {
+ std::string item_count_str = llformat("%d", item_count);
+
+ LLStringUtil::format_map_t args;
+ args["[NUM]"] = item_count_str;
+ getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelWithArg", args));
+ }
+ else
+ {
+ getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelNoArg"));
+ }
+
+ if (!isSyncInProgress())
+ {
+ mSyncButton->setEnabled(not_empty);
+ }
+
+ LLPanel::draw();
+}
diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h
index 1b502127ef..c6b4a5abe2 100644
--- a/indra/newview/llpanelmarketplaceoutbox.h
+++ b/indra/newview/llpanelmarketplaceoutbox.h
@@ -40,9 +40,7 @@ class LLPanelMarketplaceOutbox : public LLPanel
public:
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
- {
- Params() {}
- };
+ {};
LOG_CLASS(LLPanelMarketplaceOutbox);
@@ -54,12 +52,22 @@ public:
/*virtual*/ BOOL postBuild();
- void setupInventoryPanel();
+ /*virtual*/ void draw();
+
+ LLInventoryPanel * setupInventoryPanel();
+
+ U32 getTotalItemCount() const;
bool isOutboxEmpty() const;
bool isSyncInProgress() const;
- void onSyncComplete();
+ void onSyncComplete(bool goodStatus, const LLSD& content);
+
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
protected:
void onSyncButtonClicked();
diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.cpp b/indra/newview/llpanelmarketplaceoutboxinventory.cpp
new file mode 100644
index 0000000000..ed1206aec8
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceoutboxinventory.cpp
@@ -0,0 +1,271 @@
+/**
+ * @file llpanelmarketplaceoutboxinventory.cpp
+ * @brief LLOutboxInventoryPanel class definition
+ *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelmarketplaceoutboxinventory.h"
+
+#include "llfolderview.h"
+#include "llfoldervieweventlistener.h"
+#include "llinventorybridge.h"
+#include "llinventoryfunctions.h"
+#include "llpanellandmarks.h"
+#include "llplacesinventorybridge.h"
+#include "lltrans.h"
+#include "llviewerfoldertype.h"
+
+
+//
+// statics
+//
+
+static LLDefaultChildRegistry::Register<LLOutboxInventoryPanel> r1("outbox_inventory_panel");
+static LLDefaultChildRegistry::Register<LLOutboxFolderViewFolder> r2("outbox_folder_view_folder");
+
+
+//
+// Marketplace errors
+//
+
+enum
+{
+ MKTERR_NONE = 0,
+
+ MKTERR_NOT_MERCHANT,
+ MKTERR_FOLDER_EMPTY,
+ MKTERR_UNASSOCIATED_PRODUCTS,
+ MKTERR_OBJECT_LIMIT,
+ MKTERR_FOLDER_DEPTH,
+ MKTERR_UNSELLABLE_ITEM,
+ MKTERR_INTERNAL_IMPORT,
+
+ MKTERR_COUNT
+};
+
+static const std::string MARKETPLACE_ERROR_STRINGS[MKTERR_COUNT] =
+{
+ "NO_ERROR",
+ "NOT_MERCHANT_ERROR",
+ "FOLDER_EMPTY_ERROR",
+ "UNASSOCIATED_PRODUCTS_ERROR",
+ "OBJECT_LIMIT_ERROR",
+ "FOLDER_DEPTH_ERROR",
+ "UNSELLABLE_ITEM_FOUND",
+ "INTERNAL_IMPORT_ERROR",
+};
+
+static const std::string MARKETPLACE_ERROR_NAMES[MKTERR_COUNT] =
+{
+ "Marketplace Error None",
+ "Marketplace Error Not Merchant",
+ "Marketplace Error Empty Folder",
+ "Marketplace Error Unassociated Products",
+ "Marketplace Error Object Limit",
+ "Marketplace Error Folder Depth",
+ "Marketplace Error Unsellable Item",
+ "Marketplace Error Internal Import",
+};
+
+
+//
+// LLOutboxInventoryPanel Implementation
+//
+
+LLOutboxInventoryPanel::LLOutboxInventoryPanel(const LLOutboxInventoryPanel::Params& p)
+ : LLInventoryPanel(p)
+{
+}
+
+LLOutboxInventoryPanel::~LLOutboxInventoryPanel()
+{
+}
+
+// virtual
+void LLOutboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
+{
+ // Determine the root folder in case specified, and
+ // build the views starting with that folder.
+
+ LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false);
+
+ // leslie -- temporary HACK to work around sim not creating outbox with proper system folder type
+ if (root_id.isNull())
+ {
+ std::string start_folder_name(params.start_folder());
+
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+
+ gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
+
+ if (cats)
+ {
+ for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
+ {
+ LLInventoryCategory* cat = *cat_it;
+
+ if (cat->getName() == start_folder_name)
+ {
+ root_id = cat->getUUID();
+ break;
+ }
+ }
+ }
+
+ if (root_id == LLUUID::null)
+ {
+ llwarns << "No category found that matches outbox inventory panel start_folder: " << start_folder_name << llendl;
+ }
+ }
+ // leslie -- end temporary HACK
+
+ if (root_id == LLUUID::null)
+ {
+ llwarns << "Outbox inventory panel has no root folder!" << llendl;
+ root_id = LLUUID::generateNewID();
+ }
+
+ LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY,
+ LLAssetType::AT_CATEGORY,
+ LLInventoryType::IT_CATEGORY,
+ this,
+ NULL,
+ root_id);
+
+ mFolderRoot = createFolderView(new_listener, params.use_label_suffix());
+}
+
+LLFolderViewFolder * LLOutboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge)
+{
+ LLOutboxFolderViewFolder::Params params;
+
+ params.name = bridge->getDisplayName();
+ params.icon = bridge->getIcon();
+ params.icon_open = bridge->getOpenIcon();
+
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
+ {
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
+
+ params.root = mFolderRoot;
+ params.listener = bridge;
+ params.tool_tip = params.name;
+
+ return LLUICtrlFactory::create<LLOutboxFolderViewFolder>(params);
+}
+
+LLFolderViewItem * LLOutboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge)
+{
+ LLFolderViewItem::Params params;
+
+ params.name = bridge->getDisplayName();
+ params.icon = bridge->getIcon();
+ params.icon_open = bridge->getOpenIcon();
+
+ if (mShowItemLinkOverlays) // if false, then links show up just like normal items
+ {
+ params.icon_overlay = LLUI::getUIImage("Inv_Link");
+ }
+
+ params.creation_date = bridge->getCreationDate();
+ params.root = mFolderRoot;
+ params.listener = bridge;
+ params.rect = LLRect (0, 0, 0, 0);
+ params.tool_tip = params.name;
+
+ return LLUICtrlFactory::create<LLOutboxFolderViewItem>(params);
+}
+
+//
+// LLOutboxFolderViewFolder Implementation
+//
+
+LLOutboxFolderViewFolder::LLOutboxFolderViewFolder(const Params& p)
+ : LLFolderViewFolder(p)
+ , LLBadgeOwner(getHandle())
+ , mError(0)
+{
+ initBadgeParams(p.error_badge());
+}
+
+LLOutboxFolderViewFolder::~LLOutboxFolderViewFolder()
+{
+}
+
+// virtual
+void LLOutboxFolderViewFolder::draw()
+{
+ if (!badgeHasParent())
+ {
+ addBadgeToParentPanel();
+ }
+
+ setBadgeVisibility(hasError());
+
+ LLFolderViewFolder::draw();
+}
+
+void LLOutboxFolderViewFolder::setErrorString(const std::string& errorString)
+{
+ S32 error_code = MKTERR_NONE;
+
+ for (S32 i = 1; i < MKTERR_COUNT; ++i)
+ {
+ if (MARKETPLACE_ERROR_STRINGS[i] == errorString)
+ {
+ error_code = i;
+ break;
+ }
+ }
+
+ setError(error_code);
+}
+
+void LLOutboxFolderViewFolder::setError(S32 errorCode)
+{
+ mError = errorCode;
+
+ if (hasError())
+ {
+ setToolTip(LLTrans::getString(MARKETPLACE_ERROR_NAMES[mError]));
+ }
+ else
+ {
+ setToolTip(LLStringExplicit(""));
+ }
+}
+
+//
+// LLOutboxFolderViewItem Implementation
+//
+
+BOOL LLOutboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ return TRUE;
+}
+
+// eof
diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.h b/indra/newview/llpanelmarketplaceoutboxinventory.h
new file mode 100644
index 0000000000..346680a79d
--- /dev/null
+++ b/indra/newview/llpanelmarketplaceoutboxinventory.h
@@ -0,0 +1,97 @@
+/**
+ * @file llpanelmarketplaceoutboxinventory.h
+ * @brief LLOutboxInventoryPanel class declaration
+ *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_OUTBOXINVENTORYPANEL_H
+#define LL_OUTBOXINVENTORYPANEL_H
+
+
+#include "llbadgeowner.h"
+#include "llinventorypanel.h"
+#include "llfolderviewitem.h"
+
+
+class LLOutboxInventoryPanel : public LLInventoryPanel
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params>
+ {
+ Params() {}
+ };
+
+ LLOutboxInventoryPanel(const Params& p);
+ ~LLOutboxInventoryPanel();
+
+ // virtual
+ void buildFolderView(const LLInventoryPanel::Params& params);
+
+ // virtual
+ LLFolderViewFolder * createFolderViewFolder(LLInvFVBridge * bridge);
+ LLFolderViewItem * createFolderViewItem(LLInvFVBridge * bridge);
+};
+
+
+class LLOutboxFolderViewFolder : public LLFolderViewFolder, public LLBadgeOwner
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params>
+ {
+ Optional<LLBadge::Params> error_badge;
+
+ Params()
+ : error_badge("error_badge")
+ {
+ }
+ };
+
+ LLOutboxFolderViewFolder(const Params& p);
+ ~LLOutboxFolderViewFolder();
+
+ void draw();
+
+ void setErrorString(const std::string& errorString);
+ void setError(S32 errorCode);
+
+ bool hasError() const { return (mError != 0); }
+
+protected:
+ S32 mError;
+};
+
+
+class LLOutboxFolderViewItem : public LLFolderViewItem
+{
+public:
+ LLOutboxFolderViewItem(const Params& p)
+ : LLFolderViewItem(p)
+ {
+ }
+
+ // virtual
+ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+};
+
+
+#endif //LL_OUTBOXINVENTORYPANEL_H
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 1347a02a52..a9af56f750 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -37,7 +37,6 @@
#include "llfirstuse.h"
#include "llfloaterreg.h"
#include "llhints.h"
-#include "llsidetray.h"
#include "llviewercontrol.h"
#include "llviewerdisplayname.h"
@@ -49,16 +48,10 @@
#include "lltabcontainer.h"
#include "lltexturectrl.h"
-#define PICKER_SECOND_LIFE "2nd_life_pic"
-#define PICKER_FIRST_LIFE "real_world_pic"
-#define PANEL_PROFILE "panel_profile"
-
-static LLRegisterPanelClassWrapper<LLPanelMyProfileEdit> t_panel_me_profile_edit("edit_profile_panel");
static LLRegisterPanelClassWrapper<LLPanelMe> t_panel_me_profile("panel_me");
LLPanelMe::LLPanelMe(void)
: LLPanelProfile()
- , mEditPanel(NULL)
{
setAvatarId(gAgent.getID());
}
@@ -73,342 +66,4 @@ BOOL LLPanelMe::postBuild()
void LLPanelMe::onOpen(const LLSD& key)
{
LLPanelProfile::onOpen(key);
-
- // Removed this action as per SOCIAL-431 The first time a new resident opens the profile tab
- // in the sidebar, they see the old profile editing panel
- //
- //// Force Edit My Profile if this is the first time when user is opening Me Panel (EXT-5068)
- //bool opened = gSavedSettings.getBOOL("MePanelOpened");
- //// In some cases Side Tray my call onOpen() twice, check getCollapsed() to be sure this
- //// is the last time onOpen() is called
- //if( !opened && !LLSideTray::getInstance()->getCollapsed() )
- //{
- // buildEditPanel();
- // openPanel(mEditPanel, getAvatarId());
- // gSavedSettings.setBOOL("MePanelOpened", true);
- //}
-}
-
-bool LLPanelMe::notifyChildren(const LLSD& info)
-{
- if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state")
- {
- // Implement task panel tri-state behavior.
- //
- // When the button of an active open task panel is clicked, side tray
- // calls notifyChildren() on the panel, passing task-panel-action=>handle-tri-state as an argument.
- // The task panel is supposed to handle this by reverting to the default view,
- // i.e. closing any dependent panels like "pick info" or "profile edit".
-
- bool on_default_view = true;
-
- const LLRect& task_panel_rect = getRect();
- for (LLView* child = getFirstChild(); child; child = findNextSibling(child))
- {
- LLPanel* panel = dynamic_cast<LLPanel*>(child);
- if (!panel)
- continue;
-
- // *HACK: implement panel stack instead (e.g. me->pick_info->pick_edit).
- if (panel->getRect().getWidth() == task_panel_rect.getWidth() &&
- panel->getRect().getHeight() == task_panel_rect.getHeight() &&
- panel->getVisible())
- {
- panel->setVisible(FALSE);
- on_default_view = false;
- }
- }
-
- if (on_default_view)
- LLSideTray::getInstance()->collapseSideBar();
-
- return true; // this notification is only supposed to be handled by task panels
- }
-
- return LLPanel::notifyChildren(info);
-}
-
-void LLPanelMe::buildEditPanel()
-{
- if (NULL == mEditPanel)
- {
- mEditPanel = new LLPanelMyProfileEdit();
-
- // Note: Remove support for editing profile through this method.
- // All profile editing should go through the web.
- //mEditPanel->childSetAction("save_btn", boost::bind(&LLPanelMe::onSaveChangesClicked, this), this);
-
- mEditPanel->childSetAction("cancel_btn", boost::bind(&LLPanelMe::onCancelClicked, this), this);
- }
-}
-
-
-void LLPanelMe::onEditProfileClicked()
-{
- buildEditPanel();
- togglePanel(mEditPanel, getAvatarId()); // open
-}
-
-void LLPanelMe::onCancelClicked()
-{
- togglePanel(mEditPanel); // close
-}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-LLPanelMyProfileEdit::LLPanelMyProfileEdit()
- : LLPanelMyProfile()
-{
- buildFromFile( "panel_edit_profile.xml");
-
- setAvatarId(gAgent.getID());
-
- LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLPanelMyProfileEdit::onAvatarNameChanged, this));
-}
-
-void LLPanelMyProfileEdit::onOpen(const LLSD& key)
-{
- resetData();
-
- // Disable editing until data is loaded, or edited fields will be overwritten when data
- // is loaded.
- enableEditing(false);
-
- // force new avatar name fetch so we have latest update time
- LLAvatarNameCache::fetch(gAgent.getID());
- LLPanelMyProfile::onOpen(getAvatarId());
-
- LLAvatarName av_name;
- if (LLAvatarNameCache::useDisplayNames())
- {
- if (LLAvatarNameCache::get(gAgent.getID(), &av_name) && av_name.mIsDisplayNameDefault)
- {
- LLFirstUse::setDisplayName();
- }
- else
- {
- LLFirstUse::setDisplayName(false);
- }
- }
-
- if (LLAvatarNameCache::useDisplayNames())
- {
- getChild<LLUICtrl>("user_label")->setVisible( true );
- getChild<LLUICtrl>("user_slid")->setVisible( true );
- getChild<LLUICtrl>("display_name_label")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setEnabled( true );
- getChild<LLUICtrl>("solo_user_name")->setVisible( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_label")->setVisible( false );
- getChild<LLUICtrl>("user_slid")->setVisible( false );
- getChild<LLUICtrl>("display_name_label")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setEnabled( false );
- getChild<LLUICtrl>("solo_user_name")->setVisible( true );
- getChild<LLUICtrl>("solo_username_label")->setVisible( true );
- }
-}
-
-void LLPanelMyProfileEdit::onClose(const LLSD& key)
-{
- if (LLAvatarNameCache::useDisplayNames())
- {
- LLFirstUse::setDisplayName(false);
- }
-}
-
-void LLPanelMyProfileEdit::processProperties(void* data, EAvatarProcessorType type)
-{
- if(APT_PROPERTIES == type)
- {
- const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
- if(avatar_data && getAvatarId() == avatar_data->avatar_id)
- {
- // *TODO dzaporozhan
- // Workaround for ticket EXT-1099, waiting for fix for ticket EXT-1128
- enableEditing(true);
- processProfileProperties(avatar_data);
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
- }
-}
-
-void LLPanelMyProfileEdit::processProfileProperties(const LLAvatarData* avatar_data)
-{
- fillCommonData(avatar_data);
-
- // 'Home page' was hidden in LLPanelAvatarProfile::fillCommonData() to fix EXT-4734
- // Show 'Home page' in Edit My Profile (EXT-4873)
- getChildView("homepage_edit")->setVisible( true);
-
- fillPartnerData(avatar_data);
-
- fillAccountStatus(avatar_data);
-
- getChild<LLUICtrl>("show_in_search_checkbox")->setValue((BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
-
- LLAvatarNameCache::get(avatar_data->avatar_id,
- boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2));
-}
-
-void LLPanelMyProfileEdit::onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
-{
- getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
- getChild<LLUICtrl>("user_name_small")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("solo_user_name")->setValue( av_name.mDisplayName );
-
-
- if (LLAvatarNameCache::useDisplayNames())
- {
- getChild<LLUICtrl>("user_label")->setVisible( true );
- getChild<LLUICtrl>("user_slid")->setVisible( true );
- getChild<LLUICtrl>("display_name_label")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setEnabled( true );
-
- getChild<LLUICtrl>("solo_user_name")->setVisible( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( false );
-
- // show smaller display name if too long to display in regular size
- if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth())
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( true );
- getChild<LLUICtrl>("user_name")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( false );
- getChild<LLUICtrl>("user_name")->setVisible( true );
- }
- }
- else
- {
- getChild<LLUICtrl>("user_label")->setVisible( false );
- getChild<LLUICtrl>("user_slid")->setVisible( false );
- getChild<LLUICtrl>("display_name_label")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setEnabled( false );
-
- getChild<LLUICtrl>("solo_user_name")->setVisible( true );
- getChild<LLUICtrl>("user_name_small")->setVisible( false );
- getChild<LLUICtrl>("user_name")->setVisible( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( true );
- }
-}
-
-
-void LLPanelMyProfileEdit::onAvatarNameChanged()
-{
- LLAvatarNameCache::get(getAvatarId(),
- boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2));
-}
-
-BOOL LLPanelMyProfileEdit::postBuild()
-{
- initTexturePickerMouseEvents();
-
- getChild<LLUICtrl>("partner_edit_link")->setTextArg("[URL]", getString("partner_edit_link_url"));
- getChild<LLUICtrl>("my_account_link")->setTextArg("[URL]", getString("my_account_link_url"));
-
- getChild<LLUICtrl>("set_name")->setCommitCallback(
- boost::bind(&LLPanelMyProfileEdit::onClickSetName, this));
-
- LLHints::registerHintTarget("set_display_name", getChild<LLUICtrl>("set_name")->getHandle());
- LLViewerDisplayName::addNameChangedCallback(boost::bind(&LLPanelMyProfileEdit::onAvatarNameChanged, this));
- return LLPanelAvatarProfile::postBuild();
-}
-/**
- * Inits map with texture picker and appropriate edit icon.
- * Sets callbacks of Mouse Enter and Mouse Leave signals of Texture Pickers
- */
-void LLPanelMyProfileEdit::initTexturePickerMouseEvents()
-{
- LLTextureCtrl* text_pic = getChild<LLTextureCtrl>(PICKER_SECOND_LIFE);
- LLIconCtrl* text_icon = getChild<LLIconCtrl>("2nd_life_edit_icon");
- mTextureEditIconMap[text_pic->getName()] = text_icon;
- text_pic->setMouseEnterCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseEnter, this, _1));
- text_pic->setMouseLeaveCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseLeave, this, _1));
- text_icon->setVisible(FALSE);
-
- text_pic = getChild<LLTextureCtrl>(PICKER_FIRST_LIFE);
- text_icon = getChild<LLIconCtrl>("real_world_edit_icon");
- mTextureEditIconMap[text_pic->getName()] = text_icon;
- text_pic->setMouseEnterCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseEnter, this, _1));
- text_pic->setMouseLeaveCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseLeave, this, _1));
- text_icon->setVisible(FALSE);
-}
-
-void LLPanelMyProfileEdit::resetData()
-{
- LLPanelMyProfile::resetData();
-
- //childSetTextArg("name_text", "[FIRST]", LLStringUtil::null);
- //childSetTextArg("name_text", "[LAST]", LLStringUtil::null);
- getChild<LLUICtrl>("user_name")->setValue( LLSD() );
- getChild<LLUICtrl>("user_slid")->setValue( LLSD() );
- getChild<LLUICtrl>("solo_user_name")->setValue( LLSD() );
- getChild<LLUICtrl>("user_name_small")->setValue( LLSD() );
-}
-
-void LLPanelMyProfileEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl)
-{
- mTextureEditIconMap[ctrl->getName()]->setVisible(TRUE);
-}
-void LLPanelMyProfileEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl)
-{
- mTextureEditIconMap[ctrl->getName()]->setVisible(FALSE);
-}
-
-void LLPanelMyProfileEdit::onClickSetName()
-{
- LLAvatarNameCache::get(getAvatarId(),
- boost::bind(&LLPanelMyProfileEdit::onAvatarNameCache,
- this, _1, _2));
-
- LLFirstUse::setDisplayName(false);
-}
-
-void LLPanelMyProfileEdit::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
-{
- if (av_name.mDisplayName.empty())
- {
- // something is wrong, tell user to try again later
- LLNotificationsUtil::add("SetDisplayNameFailedGeneric");
- return;
- }
-
- llinfos << "name-change now " << LLDate::now() << " next_update "
- << LLDate(av_name.mNextUpdate) << llendl;
- F64 now_secs = LLDate::now().secondsSinceEpoch();
-
- if (now_secs < av_name.mNextUpdate)
- {
- // if the update time is more than a year in the future, it means updates have been blocked
- // show a more general message
- const int YEAR = 60*60*24*365;
- if (now_secs + YEAR < av_name.mNextUpdate)
- {
- LLNotificationsUtil::add("SetDisplayNameBlocked");
- return;
- }
- }
-
- LLFloaterReg::showInstance("display_name");
-}
-
-void LLPanelMyProfileEdit::enableEditing(bool enable)
-{
- getChildView("2nd_life_pic")->setEnabled(enable);
- getChildView("real_world_pic")->setEnabled(enable);
- getChildView("sl_description_edit")->setEnabled(enable);
- getChildView("fl_description_edit")->setEnabled(enable);
- getChildView("homepage_edit")->setEnabled(enable);
- getChildView("show_in_search_checkbox")->setEnabled(enable);
}
diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h
index f27f5a268e..60e9d4317d 100644
--- a/indra/newview/llpanelme.h
+++ b/indra/newview/llpanelme.h
@@ -30,15 +30,9 @@
#include "llpanel.h"
#include "llpanelprofile.h"
-class LLAvatarName;
-class LLPanelMyProfileEdit;
-class LLPanelProfile;
-class LLIconCtrl;
-
/**
-* Panel for displaying Agent's profile, it consists of two sub panels - Profile
-* and Picks.
-* LLPanelMe allows user to edit his profile and picks.
+* Panel for displaying Agent's Picks and Classifieds panel.
+* LLPanelMe allows user to edit his picks and classifieds.
*/
class LLPanelMe : public LLPanelProfile
{
@@ -49,64 +43,8 @@ public:
LLPanelMe();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ bool notifyChildren(const LLSD& info);
/*virtual*/ BOOL postBuild();
-
-private:
-
- void buildEditPanel();
-
- void onEditProfileClicked();
- void onCancelClicked();
-
- LLPanelMyProfileEdit * mEditPanel;
-
-};
-
-class LLPanelMyProfileEdit : public LLPanelMyProfile
-{
- LOG_CLASS(LLPanelMyProfileEdit);
-
-public:
-
- LLPanelMyProfileEdit();
-
- /*virtual*/void processProperties(void* data, EAvatarProcessorType type);
-
- /*virtual*/BOOL postBuild();
-
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(const LLSD& key);
-
- void onAvatarNameChanged();
-
-protected:
-
- /*virtual*/void resetData();
-
- void processProfileProperties(const LLAvatarData* avatar_data);
- void onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
-
-private:
- void initTexturePickerMouseEvents();
- void onTexturePickerMouseEnter(LLUICtrl* ctrl);
- void onTexturePickerMouseLeave(LLUICtrl* ctrl);
- void onClickSetName();
- void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
-
- /**
- * Enabled/disables controls to prevent overwriting edited data upon receiving
- * current data from server.
- */
- void enableEditing(bool enable);
-
-
-
-private:
- // map TexturePicker name => Edit Icon pointer should be visible while hovering Texture Picker
- typedef std::map<std::string, LLIconCtrl*> texture_edit_icon_map_t;
- texture_edit_icon_map_t mTextureEditIconMap;
};
#endif // LL_LLPANELMEPROFILE_H
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 2bbd15ae11..c01adc3c35 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -52,6 +52,7 @@
#include "llvovolume.h"
#include "llstatusbar.h"
#include "llsdutil.h"
+#include "llvieweraudio.h"
#include "llfloaterreg.h"
#include "llfloaterpreference.h" // for the gear icon
@@ -807,14 +808,26 @@ bool LLPanelNearByMedia::setDisabled(const LLUUID &row_id, bool disabled)
{
if (row_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
- if (disabled) onClickParcelAudioStop();
- else onClickParcelAudioStart();
+ if (disabled)
+ {
+ onClickParcelAudioStop();
+ }
+ else
+ {
+ onClickParcelAudioPlay();
+ }
return true;
}
else if (row_id == PARCEL_MEDIA_LIST_ITEM_UUID)
{
- if (disabled) onClickDisableParcelMedia();
- else onClickEnableParcelMedia();
+ if (disabled)
+ {
+ onClickDisableParcelMedia();
+ }
+ else
+ {
+ onClickEnableParcelMedia();
+ }
return true;
}
else {
@@ -857,24 +870,11 @@ void LLPanelNearByMedia::onClickParcelMediaPause()
LLViewerParcelMedia::pause();
}
-void LLPanelNearByMedia::onClickParcelAudioStart()
-{
- // User *explicitly* started the internet stream, so keep the stream
- // playing and updated as they cross to other parcels etc.
- mParcelAudioAutoStart = true;
-
- if (!gAudiop)
- return;
-
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
-}
-
void LLPanelNearByMedia::onClickParcelAudioPlay()
{
// User *explicitly* started the internet stream, so keep the stream
// playing and updated as they cross to other parcels etc.
mParcelAudioAutoStart = true;
-
if (!gAudiop)
return;
@@ -883,8 +883,9 @@ void LLPanelNearByMedia::onClickParcelAudioPlay()
// 'false' means unpause
gAudiop->pauseInternetStream(false);
}
- else {
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
}
}
@@ -894,11 +895,10 @@ void LLPanelNearByMedia::onClickParcelAudioStop()
// re-start audio when i.e. they move to another parcel, until
// they explicitly start it again.
mParcelAudioAutoStart = false;
-
if (!gAudiop)
return;
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
void LLPanelNearByMedia::onClickParcelAudioPause()
diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h
index be4d313743..c3634de9b4 100644
--- a/indra/newview/llpanelnearbymedia.h
+++ b/indra/newview/llpanelnearbymedia.h
@@ -115,7 +115,6 @@ private:
void onClickParcelMediaPause();
void onClickParcelAudioPlay();
void onClickParcelAudioStop();
- void onClickParcelAudioStart();
void onClickParcelAudioPause();
void onCheckAutoPlay();
void onAdvancedButtonClick();
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index c222bbb191..1f77e7a602 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -1112,7 +1112,16 @@ void LLPanelObject::getState( )
if (mCtrlSculptType)
{
- mCtrlSculptType->setCurrentByIndex(sculpt_stitching);
+ if (sculpt_stitching == LL_SCULPT_TYPE_NONE)
+ {
+ // since 'None' is no longer an option in the combo box
+ // use 'Plane' as an equivalent sculpt type
+ mCtrlSculptType->setSelectedByValue(LLSD(LL_SCULPT_TYPE_PLANE), true);
+ }
+ else
+ {
+ mCtrlSculptType->setSelectedByValue(LLSD(sculpt_stitching), true);
+ }
mCtrlSculptType->setEnabled(editable && !isMesh);
}
@@ -1749,7 +1758,7 @@ void LLPanelObject::sendSculpt()
U8 sculpt_type = 0;
if (mCtrlSculptType)
- sculpt_type |= mCtrlSculptType->getCurrentIndex();
+ sculpt_type |= mCtrlSculptType->getValue().asInteger();
bool enabled = sculpt_type != LL_SCULPT_TYPE_MESH;
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index e3b61f695a..98ea680504 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -57,7 +57,6 @@
#include "llpreviewtexture.h"
#include "llscrollcontainer.h"
#include "llselectmgr.h"
-#include "llsidetray.h"
#include "llstatusbar.h"
#include "lltooldraganddrop.h"
#include "lltrans.h"
@@ -83,6 +82,7 @@ protected:
LLAssetType::EType mAssetType;
LLInventoryType::EType mInventoryType;
+ LLInventoryObject* findInvObject() const;
LLInventoryItem* findItem() const;
public:
@@ -139,7 +139,8 @@ public:
virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data);
+ void* cargo_data,
+ std::string& tooltip_msg);
};
LLTaskInvFVBridge::LLTaskInvFVBridge(
@@ -162,16 +163,22 @@ LLTaskInvFVBridge::LLTaskInvFVBridge(
}
}
-LLInventoryItem* LLTaskInvFVBridge::findItem() const
+LLInventoryObject* LLTaskInvFVBridge::findInvObject() const
{
LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
- if(object)
+ if (object)
{
- return dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID));
+ return object->getInventoryObject(mUUID);
}
return NULL;
}
+
+LLInventoryItem* LLTaskInvFVBridge::findItem() const
+{
+ return dynamic_cast<LLInventoryItem*>(findInvObject());
+}
+
void LLTaskInvFVBridge::showProperties()
{
show_task_item_profile(mUUID, mPanel->getTaskUUID());
@@ -295,21 +302,15 @@ const std::string& LLTaskInvFVBridge::getDisplayName() const
if(item)
{
- if(item->getParentUUID().isNull())
- {
- if(item->getName() == "Contents")
- {
- mDisplayName.assign(LLTrans::getString("ViewerObjectContents"));
- }
- else
- {
- mDisplayName.assign(item->getName());
- }
- }
- else
+ mDisplayName.assign(item->getName());
+
+ // Localize "New Script", "New Script 1", "New Script 2", etc.
+ if (item->getType() == LLAssetType::AT_LSL_TEXT &&
+ LLStringUtil::startsWith(item->getName(), "New Script"))
{
- mDisplayName.assign(item->getName());
+ LLStringUtil::replaceString(mDisplayName, "New Script", LLTrans::getString("PanelContentsNewScript"));
}
+
const LLPermissions& perm(item->getPermissions());
BOOL copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
BOOL mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE);
@@ -580,7 +581,8 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data)
+ void* cargo_data,
+ std::string& tooltip_msg)
{
//llinfos << "LLTaskInvFVBridge::dragOrDrop()" << llendl;
return FALSE;
@@ -700,7 +702,7 @@ public:
const std::string& name);
virtual LLUIImagePtr getIcon() const;
- virtual const std::string& getDisplayName() const { return getName(); }
+ virtual const std::string& getDisplayName() const;
virtual BOOL isItemRenameable() const;
// virtual BOOL isItemCopyable() const { return FALSE; }
virtual BOOL renameItem(const std::string& new_name);
@@ -710,7 +712,8 @@ public:
virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data);
+ void* cargo_data,
+ std::string& tooltip_msg);
virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
};
@@ -728,6 +731,27 @@ LLUIImagePtr LLTaskCategoryBridge::getIcon() const
return LLUI::getUIImage("Inv_FolderClosed");
}
+// virtual
+const std::string& LLTaskCategoryBridge::getDisplayName() const
+{
+ LLInventoryObject* cat = findInvObject();
+
+ if (cat)
+ {
+ // Localize "Contents" folder.
+ if (cat->getParentUUID().isNull() && cat->getName() == "Contents")
+ {
+ mDisplayName.assign(LLTrans::getString("ViewerObjectContents"));
+ }
+ else
+ {
+ mDisplayName.assign(cat->getName());
+ }
+ }
+
+ return mDisplayName;
+}
+
BOOL LLTaskCategoryBridge::isItemRenameable() const
{
return FALSE;
@@ -783,7 +807,8 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
- void* cargo_data)
+ void* cargo_data,
+ std::string& tooltip_msg)
{
//llinfos << "LLTaskCategoryBridge::dragOrDrop()" << llendl;
BOOL accept = FALSE;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index a90f864ae2..f90236f6f2 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -31,6 +31,7 @@
#include "llnotificationsutil.h"
#include "lltabcontainer.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llagentwearables.h"
@@ -40,7 +41,6 @@
#include "llpanelwearing.h"
#include "llsaveoutfitcombobtn.h"
#include "llsidepanelappearance.h"
-#include "llsidetray.h"
#include "llviewerfoldertype.h"
static const std::string OUTFITS_TAB_NAME = "outfitslist_tab";
@@ -222,7 +222,7 @@ void LLPanelOutfitsInventory::onSave()
//static
LLPanelOutfitsInventory* LLPanelOutfitsInventory::findInstance()
{
- return dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
+ return dynamic_cast<LLPanelOutfitsInventory*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfits_inventory"));
}
//////////////////////////////////////////////////////////////////////////////////
@@ -319,8 +319,7 @@ void LLPanelOutfitsInventory::onWearablesLoading()
// static
LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP()
{
- static LLSidepanelAppearance* panel_appearance =
- dynamic_cast<LLSidepanelAppearance*>
- (LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance* panel_appearance =
+ dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
return panel_appearance;
}
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index e3a7b749ea..d5e289e6e6 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -29,6 +29,7 @@
// libs
#include "llavatarname.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llmenubutton.h"
#include "llmenugl.h"
#include "llnotificationsutil.h"
@@ -56,7 +57,6 @@
#include "llinventoryobserver.h"
#include "llnetmap.h"
#include "llpanelpeoplemenus.h"
-#include "llsidetray.h"
#include "llsidetraypanelcontainer.h"
#include "llrecentpeople.h"
#include "llviewercontrol.h" // for gSavedSettings
@@ -526,11 +526,11 @@ LLPanelPeople::~LLPanelPeople()
LLVoiceClient::getInstance()->removeObserver(this);
}
- LLView::deleteViewByHandle(mGroupPlusMenuHandle);
- LLView::deleteViewByHandle(mNearbyViewSortMenuHandle);
- LLView::deleteViewByHandle(mFriendsViewSortMenuHandle);
- LLView::deleteViewByHandle(mGroupsViewSortMenuHandle);
- LLView::deleteViewByHandle(mRecentViewSortMenuHandle);
+ delete mGroupPlusMenuHandle.get();
+ delete mNearbyViewSortMenuHandle.get();
+ delete mFriendsViewSortMenuHandle.get();
+ delete mGroupsViewSortMenuHandle.get();
+ delete mRecentViewSortMenuHandle.get();
}
@@ -1283,6 +1283,10 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata)
mAllFriendList->showPermissions(show_permissions);
mOnlineFriendList->showPermissions(show_permissions);
}
+ else if (chosen_item == "panel_block_list_sidetray")
+ {
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
+ }
}
void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata)
@@ -1315,6 +1319,10 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata)
{
setSortOrder(mNearbyList, E_SORT_BY_DISTANCE);
}
+ else if (chosen_item == "panel_block_list_sidetray")
+ {
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
+ }
}
bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata)
@@ -1348,6 +1356,10 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata)
{
mRecentList->toggleIcons();
}
+ else if (chosen_item == "panel_block_list_sidetray")
+ {
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
+ }
}
bool LLPanelPeople::onFriendsViewSortMenuItemCheck(const LLSD& userdata)
@@ -1439,7 +1451,7 @@ bool LLPanelPeople::notifyChildren(const LLSD& info)
container->onOpen(LLSD().with(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName()));
}
else
- LLSideTray::getInstance()->collapseSideBar();
+ LLFloaterReg::hideInstance("people");
return true; // this notification is only supposed to be handled by task panels
}
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index ddce83c616..cfbc8f1a94 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -35,6 +35,7 @@
#include "lldispatcher.h"
#include "llflatlistview.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llnotificationsutil.h"
#include "lltexturectrl.h"
@@ -48,11 +49,11 @@
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llavatarpropertiesprocessor.h"
+#include "llfloatersidepanelcontainer.h"
#include "llpanelavatar.h"
#include "llpanelprofile.h"
#include "llpanelpick.h"
#include "llpanelclassified.h"
-#include "llsidetray.h"
static const std::string XML_BTN_NEW = "new_btn";
static const std::string XML_BTN_DELETE = "trash_btn";
@@ -129,11 +130,14 @@ public:
void createPick()
{
- LLSD params;
- params["id"] = gAgent.getID();
- params["open_tab_name"] = "panel_picks";
- params["show_tab_panel"] = "create_pick";
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ // open the new pick panel on the Picks floater
+ LLFloater* picks_floater = LLFloaterReg::showInstance("picks");
+
+ LLPanelPicks* picks = picks_floater->findChild<LLPanelPicks>("panel_picks");
+ if (picks)
+ {
+ picks->createNewPick();
+ }
}
void editPick(LLPickData* pick_info)
@@ -146,8 +150,7 @@ public:
params["snapshot_id"] = pick_info->snapshot_id;
params["pick_name"] = pick_info->name;
params["pick_desc"] = pick_info->desc;
-
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ LLFloaterSidePanelContainer::showPanel("picks", params);
}
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type)
@@ -247,12 +250,14 @@ public:
void createClassified()
{
- // open the new classified panel on the Me > Picks sidetray
- LLSD params;
- params["id"] = gAgent.getID();
- params["open_tab_name"] = "panel_picks";
- params["show_tab_panel"] = "create_classified";
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ // open the new classified panel on the Picks floater
+ LLFloater* picks_floater = LLFloaterReg::showInstance("picks");
+
+ LLPanelPicks* picks = picks_floater->findChild<LLPanelPicks>("panel_picks");
+ if (picks)
+ {
+ picks->createNewClassified();
+ }
}
void openClassified(LLAvatarClassifiedInfo* c_info)
@@ -270,7 +275,7 @@ public:
params["classified_name"] = c_info->name;
params["classified_desc"] = c_info->description;
params["from_search"] = true;
- LLSideTray::getInstance()->showPanel("panel_profile_view", params);
+ LLFloaterSidePanelContainer::showPanel("picks", params);
}
else if (mRequestVerb == "edit")
{
@@ -283,7 +288,7 @@ public:
params["open_tab_name"] = "panel_picks";
params["show_tab_panel"] = "edit_classified";
params["classified_id"] = c_info->classified_id;
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ LLFloaterSidePanelContainer::showPanel("my_profile", params);
}
else
{
@@ -1043,13 +1048,10 @@ void LLPanelPicks::createPickInfoPanel()
void LLPanelPicks::createClassifiedInfoPanel()
{
- if(!mPanelClassifiedInfo)
- {
- mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
- mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
- mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
- mPanelClassifiedInfo->setVisible(FALSE);
- }
+ mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
+ mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
+ mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
+ mPanelClassifiedInfo->setVisible(FALSE);
}
void LLPanelPicks::createClassifiedEditPanel(LLPanelClassifiedEdit** panel)
@@ -1067,14 +1069,11 @@ void LLPanelPicks::createClassifiedEditPanel(LLPanelClassifiedEdit** panel)
void LLPanelPicks::createPickEditPanel()
{
- if(!mPanelPickEdit)
- {
- mPanelPickEdit = LLPanelPickEdit::create();
- mPanelPickEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
- mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickSave, this, mPanelPickEdit));
- mPanelPickEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
- mPanelPickEdit->setVisible(FALSE);
- }
+ mPanelPickEdit = LLPanelPickEdit::create();
+ mPanelPickEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
+ mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickSave, this, mPanelPickEdit));
+ mPanelPickEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
+ mPanelPickEdit->setVisible(FALSE);
}
// void LLPanelPicks::openPickEditPanel(LLPickItem* pick)
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 29db110523..3bb7413ac3 100755
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -82,6 +82,9 @@ public:
// parent panels failed to work (picks related code was in my profile panel)
void setProfilePanel(LLPanelProfile* profile_panel);
+ void createNewPick();
+ void createNewClassified();
+
protected:
/*virtual*/void updateButtons();
@@ -115,9 +118,6 @@ private:
bool onEnableMenuItem(const LLSD& user_data);
- void createNewPick();
- void createNewClassified();
-
void openPickInfo();
void openClassifiedInfo();
void openClassifiedInfo(const LLSD& params);
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 1e9ce58237..ce8057eead 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -32,6 +32,7 @@
#include "llparcel.h"
#include "message.h"
+#include "llexpandabletextbox.h"
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "lltextbox.h"
@@ -227,6 +228,34 @@ void LLPanelPlaceProfile::setInfoType(EInfoType type)
getChild<LLAccordionCtrl>("advanced_info_accordion")->setVisible(is_info_type_agent);
+ // If we came from search we want larger description area, approx. 10 lines (see STORM-1311).
+ // Don't use the maximum available space because that leads to nasty artifacts
+ // in text editor and expandable text box.
+ {
+ const S32 SEARCH_DESC_HEIGHT = 150;
+
+ // Remember original geometry (once).
+ static const S32 sOrigDescVPad = getChildView("parcel_title")->getRect().mBottom - mDescEditor->getRect().mTop;
+ static const S32 sOrigDescHeight = mDescEditor->getRect().getHeight();
+ static const S32 sOrigMRIconVPad = mDescEditor->getRect().mBottom - mMaturityRatingIcon->getRect().mTop;
+ static const S32 sOrigMRTextVPad = mDescEditor->getRect().mBottom - mMaturityRatingText->getRect().mTop;
+
+ // Resize the description.
+ const S32 desc_height = is_info_type_agent ? sOrigDescHeight : SEARCH_DESC_HEIGHT;
+ const S32 desc_top = getChildView("parcel_title")->getRect().mBottom - sOrigDescVPad;
+ LLRect desc_rect = mDescEditor->getRect();
+ desc_rect.setOriginAndSize(desc_rect.mLeft, desc_top - desc_height, desc_rect.getWidth(), desc_height);
+ mDescEditor->reshape(desc_rect.getWidth(), desc_rect.getHeight());
+ mDescEditor->setRect(desc_rect);
+ mDescEditor->updateTextShape();
+
+ // Move the maturity rating icon/text accordingly.
+ const S32 mr_icon_bottom = mDescEditor->getRect().mBottom - sOrigMRIconVPad - mMaturityRatingIcon->getRect().getHeight();
+ const S32 mr_text_bottom = mDescEditor->getRect().mBottom - sOrigMRTextVPad - mMaturityRatingText->getRect().getHeight();
+ mMaturityRatingIcon->setOrigin(mMaturityRatingIcon->getRect().mLeft, mr_icon_bottom);
+ mMaturityRatingText->setOrigin(mMaturityRatingText->getRect().mLeft, mr_text_bottom);
+ }
+
switch(type)
{
case AGENT:
@@ -434,7 +463,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
}
mRegionNameText->setText(region->getName());
- mRegionTypeText->setText(region->getSimProductName());
+ mRegionTypeText->setText(region->getLocalizedSimProductName());
// Determine parcel owner
if (parcel->isPublic())
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 1e510a2d7b..6d321d4716 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -39,6 +39,7 @@
#include "llfiltereditor.h"
#include "llfirstuse.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llmenubutton.h"
#include "llnotificationsutil.h"
#include "lltabcontainer.h"
@@ -64,7 +65,6 @@
#include "llpanelplaceprofile.h"
#include "llpanelteleporthistory.h"
#include "llremoteparcelrequest.h"
-#include "llsidetray.h"
#include "llteleporthistorystorage.h"
#include "lltoggleablemenu.h"
#include "llviewerinventory.h"
@@ -82,6 +82,7 @@ static const std::string CREATE_LANDMARK_INFO_TYPE = "create_landmark";
static const std::string LANDMARK_INFO_TYPE = "landmark";
static const std::string REMOTE_PLACE_INFO_TYPE = "remote_place";
static const std::string TELEPORT_HISTORY_INFO_TYPE = "teleport_history";
+static const std::string LANDMARK_TAB_INFO_TYPE = "open_landmark_tab";
// Support for secondlife:///app/parcel/{UUID}/about SLapps
class LLParcelHandler : public LLCommandHandler
@@ -115,7 +116,7 @@ public:
LLSD key;
key["type"] = "remote_place";
key["id"] = parcel_id;
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
return true;
}
}
@@ -151,18 +152,16 @@ class LLPlacesInventoryObserver : public LLInventoryAddedObserver
{
public:
LLPlacesInventoryObserver(LLPanelPlaces* places_panel) :
- mPlaces(places_panel),
- mTabsCreated(false)
+ mPlaces(places_panel)
{}
/*virtual*/ void changed(U32 mask)
{
LLInventoryAddedObserver::changed(mask);
- if (!mTabsCreated && mPlaces)
+ if (mPlaces && !mPlaces->tabsCreated())
{
mPlaces->createTabs();
- mTabsCreated = true;
}
}
@@ -175,7 +174,6 @@ protected:
private:
LLPanelPlaces* mPlaces;
- bool mTabsCreated;
};
class LLPlacesRemoteParcelInfoObserver : public LLRemoteParcelInfoObserver
@@ -244,7 +242,8 @@ LLPanelPlaces::LLPanelPlaces()
mPlaceMenu(NULL),
mLandmarkMenu(NULL),
mPosGlobal(),
- isLandmarkEditModeOn(false)
+ isLandmarkEditModeOn(false),
+ mTabsCreated(false)
{
mParcelObserver = new LLPlacesParcelObserver(this);
mInventoryObserver = new LLPlacesInventoryObserver(this);
@@ -252,7 +251,7 @@ LLPanelPlaces::LLPanelPlaces()
gInventory.addObserver(mInventoryObserver);
- LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
+ mAgentParcelChangedConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
boost::bind(&LLPanelPlaces::updateVerbs, this));
//buildFromFile( "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
@@ -268,6 +267,11 @@ LLPanelPlaces::~LLPanelPlaces()
delete mInventoryObserver;
delete mParcelObserver;
delete mRemoteParcelObserver;
+
+ if (mAgentParcelChangedConnection.connected())
+ {
+ mAgentParcelChangedConnection.disconnect();
+ }
}
BOOL LLPanelPlaces::postBuild()
@@ -349,6 +353,9 @@ BOOL LLPanelPlaces::postBuild()
LLComboBox* folder_combo = mLandmarkInfo->getChild<LLComboBox>("folder_combo");
folder_combo->setCommitCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this));
+ createTabs();
+ updateVerbs();
+
return TRUE;
}
@@ -359,83 +366,104 @@ void LLPanelPlaces::onOpen(const LLSD& key)
if (key.size() != 0)
{
- mFilterEditor->clear();
- onFilterEdit("", false);
-
- mPlaceInfoType = key["type"].asString();
- mPosGlobal.setZero();
- mItem = NULL;
- isLandmarkEditModeOn = false;
- togglePlaceInfoPanel(TRUE);
-
- if (mPlaceInfoType == AGENT_INFO_TYPE)
+ std::string key_type = key["type"].asString();
+ if (key_type == LANDMARK_TAB_INFO_TYPE)
{
- mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT);
+ // Small hack: We need to toggle twice. The first toggle moves from the Landmark
+ // or Teleport History info panel to the Landmark or Teleport History list panel.
+ // For this first toggle, the mPlaceInfoType should be the one previously used so
+ // that the state can be corretly set.
+ // The second toggle forces the list to be set to Landmark.
+ // This avoids extracting and duplicating all the state logic from togglePlaceInfoPanel()
+ // here or some specific private method
+ togglePlaceInfoPanel(FALSE);
+ mPlaceInfoType = key_type;
+ togglePlaceInfoPanel(FALSE);
+ // Update the active tab
+ onTabSelected();
+ // Update the buttons at the bottom of the panel
+ updateVerbs();
}
- else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
+ else
{
- mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
+ mFilterEditor->clear();
+ onFilterEdit("", false);
- if (key.has("x") && key.has("y") && key.has("z"))
+ mPlaceInfoType = key_type;
+ mPosGlobal.setZero();
+ mItem = NULL;
+ isLandmarkEditModeOn = false;
+ togglePlaceInfoPanel(TRUE);
+
+ if (mPlaceInfoType == AGENT_INFO_TYPE)
{
- mPosGlobal = LLVector3d(key["x"].asReal(),
- key["y"].asReal(),
- key["z"].asReal());
+ mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT);
}
- else
+ else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
{
- mPosGlobal = gAgent.getPositionGlobal();
+ mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
+
+ if (key.has("x") && key.has("y") && key.has("z"))
+ {
+ mPosGlobal = LLVector3d(key["x"].asReal(),
+ key["y"].asReal(),
+ key["z"].asReal());
+ }
+ else
+ {
+ mPosGlobal = gAgent.getPositionGlobal();
+ }
+
+ mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+
+ mSaveBtn->setEnabled(FALSE);
}
-
- mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
-
- mSaveBtn->setEnabled(FALSE);
- }
- else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
- {
- mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
-
- LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
- if (!item)
- return;
-
- setItem(item);
- }
- else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
- {
- if (key.has("id"))
+ else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
- LLUUID parcel_id = key["id"].asUUID();
- mPlaceProfile->setParcelID(parcel_id);
+ mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
- // query the server to get the global 3D position of this
- // parcel - we need this for teleport/mapping functions.
- mRemoteParcelObserver->setParcelID(parcel_id);
+ LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
+ if (!item)
+ return;
+
+ setItem(item);
}
- else
+ else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
{
- mPosGlobal = LLVector3d(key["x"].asReal(),
- key["y"].asReal(),
- key["z"].asReal());
- mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
+ if (key.has("id"))
+ {
+ LLUUID parcel_id = key["id"].asUUID();
+ mPlaceProfile->setParcelID(parcel_id);
+
+ // query the server to get the global 3D position of this
+ // parcel - we need this for teleport/mapping functions.
+ mRemoteParcelObserver->setParcelID(parcel_id);
+ }
+ else
+ {
+ mPosGlobal = LLVector3d(key["x"].asReal(),
+ key["y"].asReal(),
+ key["z"].asReal());
+ mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
+ }
+
+ mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE);
}
+ else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE)
+ {
+ S32 index = key["id"].asInteger();
- mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE);
- }
- else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE)
- {
- S32 index = key["id"].asInteger();
+ const LLTeleportHistoryStorage::slurl_list_t& hist_items =
+ LLTeleportHistoryStorage::getInstance()->getItems();
- const LLTeleportHistoryStorage::slurl_list_t& hist_items =
- LLTeleportHistoryStorage::getInstance()->getItems();
+ mPosGlobal = hist_items[index].mGlobalPos;
- mPosGlobal = hist_items[index].mGlobalPos;
+ mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
+ mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
+ }
- mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
- mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
+ updateVerbs();
}
-
- updateVerbs();
}
LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance();
@@ -936,7 +964,8 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
}
}
else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE ||
- mPlaceInfoType == LANDMARK_INFO_TYPE)
+ mPlaceInfoType == LANDMARK_INFO_TYPE ||
+ mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
{
mLandmarkInfo->setVisible(visible);
@@ -954,13 +983,15 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
{
LLLandmarksPanel* landmarks_panel =
dynamic_cast<LLLandmarksPanel*>(mTabContainer->getPanelByName("Landmarks"));
- if (landmarks_panel && mItem.notNull())
+ if (landmarks_panel)
{
// If a landmark info is being closed we open the landmarks tab
// and set this landmark selected.
mTabContainer->selectTabPanel(landmarks_panel);
-
- landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
+ if (mItem.notNull())
+ {
+ landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
+ }
}
}
}
@@ -1025,7 +1056,7 @@ void LLPanelPlaces::changedParcelSelection()
void LLPanelPlaces::createTabs()
{
- if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance()))
+ if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance() && !mTabsCreated))
return;
LLLandmarksPanel* landmarks_panel = new LLLandmarksPanel();
@@ -1059,6 +1090,8 @@ void LLPanelPlaces::createTabs()
// Filter applied to show all items.
if (mActivePanel)
mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
+
+ mTabsCreated = true;
}
void LLPanelPlaces::changedGlobalPos(const LLVector3d &global_pos)
@@ -1155,7 +1188,8 @@ LLPanelPlaceInfo* LLPanelPlaces::getCurrentInfoPanel()
return mPlaceProfile;
}
else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE ||
- mPlaceInfoType == LANDMARK_INFO_TYPE)
+ mPlaceInfoType == LANDMARK_INFO_TYPE ||
+ mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
{
return mLandmarkInfo;
}
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index b335f88a48..85bdc2c4e1 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -77,6 +77,8 @@ public:
std::string getPlaceInfoType() { return mPlaceInfoType; }
+ bool tabsCreated() { return mTabsCreated;}
+
/*virtual*/ S32 notifyParent(const LLSD& info);
private:
@@ -146,7 +148,12 @@ private:
bool isLandmarkEditModeOn;
+ // Holds info whether "My Landmarks" and "Teleport History" tabs have been created.
+ bool mTabsCreated;
+
LLSafeHandle<LLParcelSelection> mParcel;
+
+ boost::signals2::connection mAgentParcelChangedConnection;
};
#endif //LL_LLPANELPLACES_H
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index fd5c3362bb..b1eeabb028 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -38,7 +38,6 @@
#include "llviewernetwork.h"
static const std::string PANEL_PICKS = "panel_picks";
-static const std::string PANEL_PROFILE = "panel_profile";
std::string getProfileURL(const std::string& agent_name)
{
@@ -72,7 +71,7 @@ public:
std::string agent_name = params[0];
llinfos << "Profile, agent_name " << agent_name << llendl;
std::string url = getProfileURL(agent_name);
- LLWeb::loadWebURLInternal(url);
+ LLWeb::loadURLInternal(url);
return true;
}
@@ -168,6 +167,23 @@ LLPanelProfile::ChildStack::ChildStack()
{
}
+LLPanelProfile::ChildStack::~ChildStack()
+{
+ while (mStack.size() != 0)
+ {
+ view_list_t& top = mStack.back();
+ for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
+ {
+ LLView* viewp = *it;
+ if (viewp)
+ {
+ delete viewp;
+ }
+ }
+ mStack.pop_back();
+ }
+}
+
void LLPanelProfile::ChildStack::setParent(LLPanel* parent)
{
llassert_always(parent != NULL);
@@ -261,7 +277,6 @@ void LLPanelProfile::ChildStack::dump()
LLPanelProfile::LLPanelProfile()
: LLPanel()
- , mTabCtrl(NULL)
, mAvatarId(LLUUID::null)
{
mChildStack.setParent(this);
@@ -269,15 +284,10 @@ LLPanelProfile::LLPanelProfile()
BOOL LLPanelProfile::postBuild()
{
- mTabCtrl = getChild<LLTabContainer>("tabs");
-
- getTabCtrl()->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2));
-
LLPanelPicks* panel_picks = findChild<LLPanelPicks>(PANEL_PICKS);
panel_picks->setProfilePanel(this);
getTabContainer()[PANEL_PICKS] = panel_picks;
- getTabContainer()[PANEL_PROFILE] = findChild<LLPanelAvatarProfile>(PANEL_PROFILE);
return TRUE;
}
@@ -293,18 +303,7 @@ void LLPanelProfile::reshape(S32 width, S32 height, BOOL called_from_parent)
void LLPanelProfile::onOpen(const LLSD& key)
{
- // open the desired panel
- if (key.has("open_tab_name"))
- {
- getTabContainer()[PANEL_PICKS]->onClosePanel();
-
- // onOpen from selected panel will be called from onTabSelected callback
- getTabCtrl()->selectTabByName(key["open_tab_name"]);
- }
- else
- {
- getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
- }
+ getTabContainer()[PANEL_PICKS]->onOpen(getAvatarId());
// support commands to open further pieces of UI
if (key.has("show_tab_panel"))
@@ -362,23 +361,6 @@ void LLPanelProfile::onOpen(const LLSD& key)
}
}
-void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key)
-{
- // TRUE - we need to open/expand "panel"
- bool expand = getChildList()->front() != panel; // mTabCtrl->getVisible();
-
- if (expand)
- {
- openPanel(panel, key);
- }
- else
- {
- closePanel(panel);
-
- getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
- }
-}
-
void LLPanelProfile::onTabSelected(const LLSD& param)
{
std::string tab_name = param.asString();
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index fca359f51e..d97f60ed22 100755
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -46,8 +46,6 @@ public:
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void onOpen(const LLSD& key);
- virtual void togglePanel(LLPanel*, const LLSD& key = LLSD());
-
virtual void openPanel(LLPanel* panel, const LLSD& params);
virtual void closePanel(LLPanel* panel);
@@ -60,8 +58,6 @@ protected:
virtual void onTabSelected(const LLSD& param);
- LLTabContainer* getTabCtrl() { return mTabCtrl; }
-
const LLUUID& getAvatarId() { return mAvatarId; }
void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
@@ -78,6 +74,7 @@ private:
LOG_CLASS(LLPanelProfile::ChildStack);
public:
ChildStack();
+ ~ChildStack();
void setParent(LLPanel* parent);
bool push();
@@ -97,7 +94,6 @@ private:
};
//-- ChildStack ends ------------------------------------------------------
- LLTabContainer* mTabCtrl;
profile_tabs_t mTabContainer;
ChildStack mChildStack;
LLUUID mAvatarId;
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
deleted file mode 100644
index 7635aedf58..0000000000
--- a/indra/newview/llpanelprofileview.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
-* @file llpanelprofileview.cpp
-* @brief Side tray "Profile View" panel
-*
-* $LicenseInfo:firstyear=2009&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llpanelprofileview.h"
-
-#include "llavatarconstants.h"
-#include "llavatarnamecache.h" // IDEVO
-#include "llclipboard.h"
-#include "lluserrelations.h"
-
-#include "llavatarpropertiesprocessor.h"
-#include "llcallingcard.h"
-#include "llpanelavatar.h"
-#include "llpanelpicks.h"
-#include "llpanelprofile.h"
-#include "llsidetraypanelcontainer.h"
-
-static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("panel_profile_view");
-
-static std::string PANEL_NOTES = "panel_notes";
-static const std::string PANEL_PROFILE = "panel_profile";
-static const std::string PANEL_PICKS = "panel_picks";
-
-
-class AvatarStatusObserver : public LLAvatarPropertiesObserver
-{
-public:
- AvatarStatusObserver(LLPanelProfileView* profile_view)
- {
- mProfileView = profile_view;
- }
-
- void processProperties(void* data, EAvatarProcessorType type)
- {
- if(APT_PROPERTIES != type) return;
- const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
- if(avatar_data && mProfileView->getAvatarId() == avatar_data->avatar_id)
- {
- mProfileView->processOnlineStatus(avatar_data->flags & AVATAR_ONLINE);
- LLAvatarPropertiesProcessor::instance().removeObserver(mProfileView->getAvatarId(), this);
- }
- }
-
- void subscribe()
- {
- LLAvatarPropertiesProcessor::instance().addObserver(mProfileView->getAvatarId(), this);
- }
-
-private:
- LLPanelProfileView* mProfileView;
-};
-
-LLPanelProfileView::LLPanelProfileView()
-: LLPanelProfile()
-, mStatusText(NULL)
-, mAvatarStatusObserver(NULL)
-{
- mAvatarStatusObserver = new AvatarStatusObserver(this);
-}
-
-LLPanelProfileView::~LLPanelProfileView(void)
-{
- delete mAvatarStatusObserver;
-}
-
-/*virtual*/
-void LLPanelProfileView::onOpen(const LLSD& key)
-{
- LLUUID id;
- if(key.has("id"))
- {
- id = key["id"];
- }
-
- if(id.notNull() && getAvatarId() != id)
- {
- setAvatarId(id);
-
- // clear name fields, which might have old data
- getChild<LLUICtrl>("user_name")->setValue( LLSD() );
- getChild<LLUICtrl>("user_slid")->setValue( LLSD() );
- }
-
- // Update the avatar name.
- LLAvatarNameCache::get(getAvatarId(),
- boost::bind(&LLPanelProfileView::onAvatarNameCache, this, _1, _2));
-
- updateOnlineStatus();
-
-
- LLPanelProfile::onOpen(key);
-}
-
-BOOL LLPanelProfileView::postBuild()
-{
- LLPanelProfile::postBuild();
-
- getTabContainer()[PANEL_NOTES] = findChild<LLPanelAvatarNotes>(PANEL_NOTES);
-
- //*TODO remove this, according to style guide we don't use status combobox
- getTabContainer()[PANEL_PROFILE]->getChildView("online_me_status_text")->setVisible( FALSE);
- getTabContainer()[PANEL_PROFILE]->getChildView("status_combo")->setVisible( FALSE);
-
- mStatusText = getChild<LLTextBox>("status");
- mStatusText->setVisible(false);
-
- childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
- childSetCommitCallback("copy_to_clipboard",boost::bind(&LLPanelProfileView::onCopyToClipboard,this),NULL);
-
- return TRUE;
-}
-
-
-//private
-
-void LLPanelProfileView::onBackBtnClick()
-{
- // Set dummy value to make picks panel dirty,
- // This will make Picks reload on next open.
- getTabContainer()[PANEL_PICKS]->setValue(LLSD());
-
- LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
- if(parent)
- {
- parent->openPreviousPanel();
- }
-}
-
-void LLPanelProfileView::onCopyToClipboard()
-{
- std::string name = getChild<LLUICtrl>("user_name")->getValue().asString() + " (" + getChild<LLUICtrl>("user_slid")->getValue().asString() + ")";
- gClipboard.copyFromString(utf8str_to_wstring(name));
-}
-
-bool LLPanelProfileView::isGrantedToSeeOnlineStatus()
-{
- const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
- if (NULL == relationship)
- return false;
-
- // *NOTE: GRANT_ONLINE_STATUS is always set to false while changing any other status.
- // When avatar disallow me to see her online status processOfflineNotification Message is received by the viewer
- // see comments for ChangeUserRights template message. EXT-453.
- // If GRANT_ONLINE_STATUS flag is changed it will be applied when viewer restarts. EXT-3880
- return relationship->isRightGrantedFrom(LLRelationship::GRANT_ONLINE_STATUS);
-}
-
-// method was disabled according to EXT-2022. Re-enabled & improved according to EXT-3880
-void LLPanelProfileView::updateOnlineStatus()
-{
- // set text box visible to show online status for non-friends who has not set in Preferences
- // "Only Friends & Groups can see when I am online"
- mStatusText->setVisible(TRUE);
-
- const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
- if (NULL == relationship)
- {
- // this is non-friend avatar. Status will be updated from LLAvatarPropertiesProcessor.
- // in LLPanelProfileView::processOnlineStatus()
-
- // subscribe observer to get online status. Request will be sent by LLPanelAvatarProfile itself.
- // do not subscribe for friend avatar because online status can be wrong overridden
- // via LLAvatarData::flags if Preferences: "Only Friends & Groups can see when I am online" is set.
- mAvatarStatusObserver->subscribe();
- return;
- }
- // For friend let check if he allowed me to see his status
-
- // status should only show if viewer has permission to view online/offline. EXT-453, EXT-3880
- mStatusText->setVisible(isGrantedToSeeOnlineStatus());
-
- bool online = relationship->isOnline();
- processOnlineStatus(online);
-}
-
-void LLPanelProfileView::processOnlineStatus(bool online)
-{
- std::string status = getString(online ? "status_online" : "status_offline");
-
- mStatusText->setValue(status);
-}
-
-void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
- const LLAvatarName& av_name)
-{
- getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_name_small")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
-
- // show smaller display name if too long to display in regular size
- if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth())
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( true );
- getChild<LLUICtrl>("user_name")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( false );
- getChild<LLUICtrl>("user_name")->setVisible( true );
- }
-
- if (LLAvatarNameCache::useDisplayNames())
- {
- getChild<LLUICtrl>("user_label")->setVisible( true );
- getChild<LLUICtrl>("user_slid")->setVisible( true );
- getChild<LLUICtrl>("display_name_label")->setVisible( true );
- getChild<LLUICtrl>("copy_to_clipboard")->setVisible( true );
- getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( true );
- getChild<LLUICtrl>("solo_username_label")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_label")->setVisible( false );
- getChild<LLUICtrl>("user_slid")->setVisible( false );
- getChild<LLUICtrl>("display_name_label")->setVisible( false );
- getChild<LLUICtrl>("copy_to_clipboard")->setVisible( false );
- getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( true );
- }
-}
-
-// EOF
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
deleted file mode 100644
index c6d921fdc4..0000000000
--- a/indra/newview/llpanelprofileview.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
-* @file llpanelprofileview.h
-* @brief Side tray "Profile View" panel
-*
-* $LicenseInfo:firstyear=2009&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-
-#ifndef LL_LLPANELPROFILEVIEW_H
-#define LL_LLPANELPROFILEVIEW_H
-
-#include "llpanel.h"
-#include "llpanelprofile.h"
-#include "llavatarpropertiesprocessor.h"
-#include "llagent.h"
-#include "lltooldraganddrop.h"
-
-class LLAvatarName;
-class LLPanelProfile;
-class LLPanelProfileTab;
-class LLTextBox;
-class AvatarStatusObserver;
-
-/**
-* Panel for displaying Avatar's profile. It consists of three sub panels - Profile,
-* Picks and Notes.
-*/
-class LLPanelProfileView : public LLPanelProfile
-{
- LOG_CLASS(LLPanelProfileView);
- friend class LLUICtrlFactory;
- friend class AvatarStatusObserver;
-
-public:
-
- LLPanelProfileView();
-
- /*virtual*/ ~LLPanelProfileView();
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ BOOL postBuild();
-
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type,
- void *cargo_data, EAcceptance *accept,
- std::string& tooltip_msg)
- {
- LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), gAgent.getSessionID(), drop,
- cargo_type, cargo_data, accept);
-
- return TRUE;
- }
-
-
-protected:
-
- void onBackBtnClick();
- void onCopyToClipboard();
- bool isGrantedToSeeOnlineStatus();
-
- /**
- * Displays avatar's online status if possible.
- *
- * Requirements from EXT-3880:
- * For friends:
- * - Online when online and privacy settings allow to show
- * - Offline when offline and privacy settings allow to show
- * - Else: nothing
- * For other avatars:
- * - Online when online and was not set in Preferences/"Only Friends & Groups can see when I am online"
- * - Else: Offline
- */
- void updateOnlineStatus();
- void processOnlineStatus(bool online);
-
-private:
- // LLCacheName will call this function when avatar name is loaded from server.
- // This is required to display names that have not been cached yet.
-// void onNameCache(
-// const LLUUID& id,
-// const std::string& full_name,
-// bool is_group);
- void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
-
- LLTextBox* mStatusText;
- AvatarStatusObserver* mAvatarStatusObserver;
-};
-
-#endif //LL_LLPANELPROFILEVIEW_H
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
new file mode 100644
index 0000000000..2f29e758c6
--- /dev/null
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -0,0 +1,201 @@
+/**
+ * @file llpanelsnapshot.cpp
+ * @brief Snapshot panel base class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llpanelsnapshot.h"
+
+// libs
+#include "llcombobox.h"
+#include "llsliderctrl.h"
+#include "llspinctrl.h"
+#include "lltrans.h"
+
+// newview
+#include "llsidetraypanelcontainer.h"
+#include "llviewercontrol.h" // gSavedSettings
+
+// virtual
+BOOL LLPanelSnapshot::postBuild()
+{
+ getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
+ getChild<LLUICtrl>(getWidthSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onCustomResolutionCommit, this));
+ getChild<LLUICtrl>(getHeightSpinnerName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onCustomResolutionCommit, this));
+ getChild<LLUICtrl>(getAspectRatioCBName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onKeepAspectRatioCommit, this, _1));
+
+ updateControls(LLSD());
+ return TRUE;
+}
+
+// virtual
+void LLPanelSnapshot::onOpen(const LLSD& key)
+{
+ S32 old_format = gSavedSettings.getS32("SnapshotFormat");
+ S32 new_format = (S32) getImageFormat();
+
+ gSavedSettings.setS32("SnapshotFormat", new_format);
+ setCtrlsEnabled(true);
+
+ // Switching panels will likely change image format.
+ // Not updating preview right away may lead to errors,
+ // e.g. attempt to send a large BMP image by email.
+ if (old_format != new_format)
+ {
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true));
+ }
+
+ updateCustomResControls();
+}
+
+LLFloaterSnapshot::ESnapshotFormat LLPanelSnapshot::getImageFormat() const
+{
+ return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG;
+}
+
+void LLPanelSnapshot::enableControls(BOOL enable)
+{
+ setCtrlsEnabled(enable);
+ if (enable)
+ {
+ // Make sure only relevant controls are enabled/shown.
+ updateCustomResControls();
+ }
+}
+
+LLSpinCtrl* LLPanelSnapshot::getWidthSpinner()
+{
+ return getChild<LLSpinCtrl>(getWidthSpinnerName());
+}
+
+LLSpinCtrl* LLPanelSnapshot::getHeightSpinner()
+{
+ return getChild<LLSpinCtrl>(getHeightSpinnerName());
+}
+
+S32 LLPanelSnapshot::getTypedPreviewWidth() const
+{
+ return getChild<LLUICtrl>(getWidthSpinnerName())->getValue().asInteger();
+}
+
+S32 LLPanelSnapshot::getTypedPreviewHeight() const
+{
+ return getChild<LLUICtrl>(getHeightSpinnerName())->getValue().asInteger();
+}
+
+void LLPanelSnapshot::enableAspectRatioCheckbox(BOOL enable)
+{
+ getChild<LLUICtrl>(getAspectRatioCBName())->setEnabled(enable);
+}
+
+LLSideTrayPanelContainer* LLPanelSnapshot::getParentContainer()
+{
+ LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return NULL;
+ }
+
+ return parent;
+}
+
+// virtual
+void LLPanelSnapshot::updateCustomResControls()
+{
+ // Only show width/height spinners and the aspect ratio checkbox
+ // when a custom resolution is chosen.
+ LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName());
+ const bool show = combo->getFirstSelectedIndex() == (combo->getItemCount() - 1);
+ getChild<LLUICtrl>(getImageSizePanelName())->setVisible(show);
+}
+
+void LLPanelSnapshot::updateImageQualityLevel()
+{
+ LLSliderCtrl* quality_slider = getChild<LLSliderCtrl>("image_quality_slider");
+ S32 quality_val = llfloor((F32) quality_slider->getValue().asReal());
+
+ std::string quality_lvl;
+
+ if (quality_val < 20)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_very_low");
+ }
+ else if (quality_val < 40)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_low");
+ }
+ else if (quality_val < 60)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_medium");
+ }
+ else if (quality_val < 80)
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_high");
+ }
+ else
+ {
+ quality_lvl = LLTrans::getString("snapshot_quality_very_high");
+ }
+
+ getChild<LLTextBox>("image_quality_level")->setTextArg("[QLVL]", quality_lvl);
+}
+
+void LLPanelSnapshot::goBack()
+{
+ LLSideTrayPanelContainer* parent = getParentContainer();
+ if (parent)
+ {
+ parent->openPreviousPanel();
+ parent->getCurrentPanel()->onOpen(LLSD());
+ }
+}
+
+void LLPanelSnapshot::cancel()
+{
+ goBack();
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("set-ready", true));
+}
+
+void LLPanelSnapshot::onCustomResolutionCommit()
+{
+ LLSD info;
+ info["w"] = getChild<LLUICtrl>(getWidthSpinnerName())->getValue().asInteger();
+ info["h"] = getChild<LLUICtrl>(getHeightSpinnerName())->getValue().asInteger();
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info));
+}
+
+void LLPanelSnapshot::onResolutionComboCommit(LLUICtrl* ctrl)
+{
+ updateCustomResControls();
+
+ LLSD info;
+ info["combo-res-change"]["control-name"] = ctrl->getName();
+ LLFloaterSnapshot::getInstance()->notify(info);
+}
+
+void LLPanelSnapshot::onKeepAspectRatioCommit(LLUICtrl* ctrl)
+{
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("keep-aspect-change", ctrl->getValue().asBoolean()));
+}
diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h
new file mode 100644
index 0000000000..f3274cf594
--- /dev/null
+++ b/indra/newview/llpanelsnapshot.h
@@ -0,0 +1,71 @@
+/**
+ * @file llpanelsnapshot.h
+ * @brief Snapshot panel base class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELSNAPSHOT_H
+#define LL_LLPANELSNAPSHOT_H
+
+#include "llfloatersnapshot.h"
+
+class LLSideTrayPanelContainer;
+
+/**
+ * Snapshot panel base class.
+ */
+class LLPanelSnapshot: public LLPanel
+{
+public:
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ virtual std::string getWidthSpinnerName() const = 0;
+ virtual std::string getHeightSpinnerName() const = 0;
+ virtual std::string getAspectRatioCBName() const = 0;
+ virtual std::string getImageSizeComboName() const = 0;
+ virtual std::string getImageSizePanelName() const = 0;
+
+ virtual S32 getTypedPreviewWidth() const;
+ virtual S32 getTypedPreviewHeight() const;
+ virtual LLSpinCtrl* getWidthSpinner();
+ virtual LLSpinCtrl* getHeightSpinner();
+ virtual void enableAspectRatioCheckbox(BOOL enable);
+ virtual LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
+ virtual void updateControls(const LLSD& info) = 0; ///< Update controls from saved settings
+ void enableControls(BOOL enable);
+
+protected:
+ LLSideTrayPanelContainer* getParentContainer();
+ virtual void updateCustomResControls();
+ void updateImageQualityLevel();
+ void goBack(); ///< Switch to the default (Snapshot Options) panel
+ void cancel();
+
+ // common UI callbacks
+ void onCustomResolutionCommit();
+ void onResolutionComboCommit(LLUICtrl* ctrl);
+ void onKeepAspectRatioCommit(LLUICtrl* ctrl);
+};
+
+#endif // LL_LLPANELSNAPSHOT_H
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
new file mode 100644
index 0000000000..381c11348d
--- /dev/null
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -0,0 +1,109 @@
+/**
+ * @file llpanelsnapshotinventory.cpp
+ * @brief The panel provides UI for saving snapshot as an inventory texture.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcombobox.h"
+#include "lleconomy.h"
+#include "llsidetraypanelcontainer.h"
+#include "llspinctrl.h"
+
+#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model
+#include "llpanelsnapshot.h"
+#include "llviewercontrol.h" // gSavedSettings
+
+/**
+ * The panel provides UI for saving snapshot as an inventory texture.
+ */
+class LLPanelSnapshotInventory
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotInventory);
+
+public:
+ LLPanelSnapshotInventory();
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ /*virtual*/ void updateCustomResControls(); ///< Show/hide custom resolution controls (spinners and checkbox)
+ /*virtual*/ std::string getWidthSpinnerName() const { return "inventory_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "inventory_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return LLStringUtil::null; }
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ void onSend();
+};
+
+static LLRegisterPanelClassWrapper<LLPanelSnapshotInventory> panel_class("llpanelsnapshotinventory");
+
+LLPanelSnapshotInventory::LLPanelSnapshotInventory()
+{
+ mCommitCallbackRegistrar.add("Inventory.Save", boost::bind(&LLPanelSnapshotInventory::onSend, this));
+ mCommitCallbackRegistrar.add("Inventory.Cancel", boost::bind(&LLPanelSnapshotInventory::cancel, this));
+}
+
+// virtual
+BOOL LLPanelSnapshotInventory::postBuild()
+{
+ getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE);
+ getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE);
+ getChild<LLUICtrl>(getAspectRatioCBName())->setVisible(FALSE); // we don't keep aspect ratio for inventory textures
+ return LLPanelSnapshot::postBuild();
+}
+
+// virtual
+void LLPanelSnapshotInventory::onOpen(const LLSD& key)
+{
+ getChild<LLUICtrl>("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()));
+ LLPanelSnapshot::onOpen(key);
+}
+
+// virtual
+void LLPanelSnapshotInventory::updateCustomResControls()
+{
+ LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName());
+ S32 selected_idx = combo->getFirstSelectedIndex();
+ const bool show = selected_idx == (combo->getItemCount() - 1); // Custom selected
+
+ getChild<LLUICtrl>(getWidthSpinnerName())->setVisible(show);
+ getChild<LLUICtrl>(getHeightSpinnerName())->setVisible(show);
+}
+
+// virtual
+void LLPanelSnapshotInventory::updateControls(const LLSD& info)
+{
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild<LLUICtrl>("save_btn")->setEnabled(have_snapshot);
+}
+
+void LLPanelSnapshotInventory::onSend()
+{
+ LLFloaterSnapshot::saveTexture();
+ LLFloaterSnapshot::postSave();
+}
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
new file mode 100644
index 0000000000..d153ff598d
--- /dev/null
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -0,0 +1,168 @@
+/**
+ * @file llpanelsnapshotlocal.cpp
+ * @brief The panel provides UI for saving snapshot to a local folder.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcombobox.h"
+#include "llsidetraypanelcontainer.h"
+#include "llsliderctrl.h"
+#include "llspinctrl.h"
+
+#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model
+#include "llpanelsnapshot.h"
+#include "llviewercontrol.h" // gSavedSettings
+#include "llviewerwindow.h"
+
+/**
+ * The panel provides UI for saving snapshot to a local folder.
+ */
+class LLPanelSnapshotLocal
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotLocal);
+
+public:
+ LLPanelSnapshotLocal();
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ /*virtual*/ std::string getWidthSpinnerName() const { return "local_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "local_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "local_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "local_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return "local_image_size_lp"; }
+ /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ void onFormatComboCommit(LLUICtrl* ctrl);
+ void onQualitySliderCommit(LLUICtrl* ctrl);
+ void onSaveFlyoutCommit(LLUICtrl* ctrl);
+};
+
+static LLRegisterPanelClassWrapper<LLPanelSnapshotLocal> panel_class("llpanelsnapshotlocal");
+
+LLPanelSnapshotLocal::LLPanelSnapshotLocal()
+{
+ mCommitCallbackRegistrar.add("Local.Cancel", boost::bind(&LLPanelSnapshotLocal::cancel, this));
+}
+
+// virtual
+BOOL LLPanelSnapshotLocal::postBuild()
+{
+ getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onQualitySliderCommit, this, _1));
+ getChild<LLUICtrl>("local_format_combo")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onFormatComboCommit, this, _1));
+ getChild<LLUICtrl>("save_btn")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onSaveFlyoutCommit, this, _1));
+
+ return LLPanelSnapshot::postBuild();
+}
+
+// virtual
+void LLPanelSnapshotLocal::onOpen(const LLSD& key)
+{
+ LLPanelSnapshot::onOpen(key);
+}
+
+// virtual
+LLFloaterSnapshot::ESnapshotFormat LLPanelSnapshotLocal::getImageFormat() const
+{
+ LLFloaterSnapshot::ESnapshotFormat fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG;
+
+ LLComboBox* local_format_combo = getChild<LLComboBox>("local_format_combo");
+ const std::string id = local_format_combo->getValue().asString();
+ if (id == "PNG")
+ {
+ fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG;
+ }
+ else if (id == "JPEG")
+ {
+ fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG;
+ }
+ else if (id == "BMP")
+ {
+ fmt = LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP;
+ }
+
+ return fmt;
+}
+
+// virtual
+void LLPanelSnapshotLocal::updateControls(const LLSD& info)
+{
+ LLFloaterSnapshot::ESnapshotFormat fmt =
+ (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat");
+ getChild<LLComboBox>("local_format_combo")->selectNthItem((S32) fmt);
+
+ const bool show_quality_ctrls = (fmt == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
+ getChild<LLUICtrl>("image_quality_slider")->setVisible(show_quality_ctrls);
+ getChild<LLUICtrl>("image_quality_level")->setVisible(show_quality_ctrls);
+
+ getChild<LLUICtrl>("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality"));
+ updateImageQualityLevel();
+
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild<LLUICtrl>("save_btn")->setEnabled(have_snapshot);
+}
+
+void LLPanelSnapshotLocal::onFormatComboCommit(LLUICtrl* ctrl)
+{
+ // will call updateControls()
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true));
+}
+
+void LLPanelSnapshotLocal::onQualitySliderCommit(LLUICtrl* ctrl)
+{
+ updateImageQualityLevel();
+
+ LLSliderCtrl* slider = (LLSliderCtrl*)ctrl;
+ S32 quality_val = llfloor((F32)slider->getValue().asReal());
+ LLSD info;
+ info["image-quality-change"] = quality_val;
+ LLFloaterSnapshot::getInstance()->notify(info);
+}
+
+void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl)
+{
+ if (ctrl->getValue().asString() == "save as")
+ {
+ gViewerWindow->resetSnapshotLoc();
+ }
+
+ LLFloaterSnapshot* floater = LLFloaterSnapshot::getInstance();
+
+ floater->notify(LLSD().with("set-working", true));
+ BOOL saved = LLFloaterSnapshot::saveLocal();
+ if (saved)
+ {
+ LLFloaterSnapshot::postSave();
+ goBack();
+ floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
+ }
+ else
+ {
+ cancel();
+ }
+}
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
new file mode 100644
index 0000000000..554fabe5b3
--- /dev/null
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -0,0 +1,120 @@
+/**
+ * @file llpanelsnapshotoptions.cpp
+ * @brief Snapshot posting options panel.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lleconomy.h"
+#include "llpanel.h"
+#include "llsidetraypanelcontainer.h"
+
+#include "llfloatersnapshot.h" // FIXME: create a snapshot model
+
+/**
+ * Provides several ways to save a snapshot.
+ */
+class LLPanelSnapshotOptions
+: public LLPanel
+, public LLEconomyObserver
+{
+ LOG_CLASS(LLPanelSnapshotOptions);
+
+public:
+ LLPanelSnapshotOptions();
+ ~LLPanelSnapshotOptions();
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void onEconomyDataChange() { updateUploadCost(); }
+
+private:
+ void updateUploadCost();
+ void openPanel(const std::string& panel_name);
+ void onSaveToProfile();
+ void onSaveToEmail();
+ void onSaveToInventory();
+ void onSaveToComputer();
+};
+
+static LLRegisterPanelClassWrapper<LLPanelSnapshotOptions> panel_class("llpanelsnapshotoptions");
+
+LLPanelSnapshotOptions::LLPanelSnapshotOptions()
+{
+ mCommitCallbackRegistrar.add("Snapshot.SaveToProfile", boost::bind(&LLPanelSnapshotOptions::onSaveToProfile, this));
+ mCommitCallbackRegistrar.add("Snapshot.SaveToEmail", boost::bind(&LLPanelSnapshotOptions::onSaveToEmail, this));
+ mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this));
+ mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this));
+
+ LLGlobalEconomy::Singleton::getInstance()->addObserver(this);
+}
+
+LLPanelSnapshotOptions::~LLPanelSnapshotOptions()
+{
+ LLGlobalEconomy::Singleton::getInstance()->removeObserver(this);
+}
+
+// virtual
+void LLPanelSnapshotOptions::onOpen(const LLSD& key)
+{
+ updateUploadCost();
+}
+
+void LLPanelSnapshotOptions::updateUploadCost()
+{
+ S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost));
+}
+
+void LLPanelSnapshotOptions::openPanel(const std::string& panel_name)
+{
+ LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
+ if (!parent)
+ {
+ llwarns << "Cannot find panel container" << llendl;
+ return;
+ }
+
+ parent->openPanel(panel_name);
+ parent->getCurrentPanel()->onOpen(LLSD());
+ LLFloaterSnapshot::postPanelSwitch();
+}
+
+void LLPanelSnapshotOptions::onSaveToProfile()
+{
+ openPanel("panel_snapshot_profile");
+}
+
+void LLPanelSnapshotOptions::onSaveToEmail()
+{
+ openPanel("panel_snapshot_postcard");
+}
+
+void LLPanelSnapshotOptions::onSaveToInventory()
+{
+ openPanel("panel_snapshot_inventory");
+}
+
+void LLPanelSnapshotOptions::onSaveToComputer()
+{
+ openPanel("panel_snapshot_local");
+}
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
new file mode 100644
index 0000000000..f2bb8f530b
--- /dev/null
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -0,0 +1,270 @@
+/**
+ * @file llpanelsnapshotpostcard.cpp
+ * @brief Postcard sending panel.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcombobox.h"
+#include "llnotificationsutil.h"
+#include "llsidetraypanelcontainer.h"
+#include "llsliderctrl.h"
+#include "llspinctrl.h"
+#include "lltexteditor.h"
+
+#include "llagent.h"
+#include "llagentui.h"
+#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model
+#include "llpanelsnapshot.h"
+#include "llpostcard.h"
+#include "llviewercontrol.h" // gSavedSettings
+#include "llviewerwindow.h"
+
+#include <boost/regex.hpp>
+
+/**
+ * Sends postcard via email.
+ */
+class LLPanelSnapshotPostcard
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotPostcard);
+
+public:
+ LLPanelSnapshotPostcard();
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ S32 notify(const LLSD& info);
+
+private:
+ /*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "postcard_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; }
+ /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; }
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response);
+ void sendPostcard();
+
+ void onMsgFormFocusRecieved();
+ void onFormatComboCommit(LLUICtrl* ctrl);
+ void onQualitySliderCommit(LLUICtrl* ctrl);
+ void onTabButtonPress(S32 btn_idx);
+ void onSend();
+
+ bool mHasFirstMsgFocus;
+ std::string mAgentEmail;
+};
+
+static LLRegisterPanelClassWrapper<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard");
+
+LLPanelSnapshotPostcard::LLPanelSnapshotPostcard()
+: mHasFirstMsgFocus(false)
+{
+ mCommitCallbackRegistrar.add("Postcard.Send", boost::bind(&LLPanelSnapshotPostcard::onSend, this));
+ mCommitCallbackRegistrar.add("Postcard.Cancel", boost::bind(&LLPanelSnapshotPostcard::cancel, this));
+ mCommitCallbackRegistrar.add("Postcard.Message", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 0));
+ mCommitCallbackRegistrar.add("Postcard.Settings", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 1));
+
+}
+
+// virtual
+BOOL LLPanelSnapshotPostcard::postBuild()
+{
+ // pick up the user's up-to-date email address
+ gAgent.sendAgentUserInfoRequest();
+
+ std::string name_string;
+ LLAgentUI::buildFullname(name_string);
+ getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
+
+ // For the first time a user focuses to .the msg box, all text will be selected.
+ getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this));
+
+ getChild<LLUICtrl>("to_form")->setFocus(TRUE);
+
+ getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1));
+
+ getChild<LLButton>("message_btn")->setToggleState(TRUE);
+
+ return LLPanelSnapshot::postBuild();
+}
+
+// virtual
+void LLPanelSnapshotPostcard::onOpen(const LLSD& key)
+{
+ LLPanelSnapshot::onOpen(key);
+}
+
+// virtual
+S32 LLPanelSnapshotPostcard::notify(const LLSD& info)
+{
+ if (!info.has("agent-email"))
+ {
+ llassert(info.has("agent-email"));
+ return 0;
+ }
+
+ if (mAgentEmail.empty())
+ {
+ mAgentEmail = info["agent-email"].asString();
+ }
+
+ return 1;
+}
+
+// virtual
+void LLPanelSnapshotPostcard::updateControls(const LLSD& info)
+{
+ getChild<LLUICtrl>("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality"));
+ updateImageQualityLevel();
+
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild<LLUICtrl>("send_btn")->setEnabled(have_snapshot);
+}
+
+bool LLPanelSnapshotPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if(0 == option)
+ {
+ // User clicked OK
+ if((getChild<LLUICtrl>("subject_form")->getValue().asString()).empty())
+ {
+ // Stuff the subject back into the form.
+ getChild<LLUICtrl>("subject_form")->setValue(getString("default_subject"));
+ }
+
+ if (!mHasFirstMsgFocus)
+ {
+ // The user never switched focus to the message window.
+ // Using the default string.
+ getChild<LLUICtrl>("msg_form")->setValue(getString("default_message"));
+ }
+
+ sendPostcard();
+ }
+ return false;
+}
+
+
+void LLPanelSnapshotPostcard::sendPostcard()
+{
+ std::string to(getChild<LLUICtrl>("to_form")->getValue().asString());
+ std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString());
+
+ LLSD postcard = LLSD::emptyMap();
+ postcard["pos-global"] = LLFloaterSnapshot::getPosTakenGlobal().getValue();
+ postcard["to"] = to;
+ postcard["from"] = mAgentEmail;
+ postcard["name"] = getChild<LLUICtrl>("name_form")->getValue().asString();
+ postcard["subject"] = subject;
+ postcard["msg"] = getChild<LLUICtrl>("msg_form")->getValue().asString();
+ LLPostCard::send(LLFloaterSnapshot::getImageData(), postcard);
+
+ // Give user feedback of the event.
+ gViewerWindow->playSnapshotAnimAndSound();
+
+ LLFloaterSnapshot::postSave();
+}
+
+void LLPanelSnapshotPostcard::onMsgFormFocusRecieved()
+{
+ LLTextEditor* msg_form = getChild<LLTextEditor>("msg_form");
+ if (msg_form->hasFocus() && !mHasFirstMsgFocus)
+ {
+ mHasFirstMsgFocus = true;
+ msg_form->setText(LLStringUtil::null);
+ }
+}
+
+void LLPanelSnapshotPostcard::onFormatComboCommit(LLUICtrl* ctrl)
+{
+ // will call updateControls()
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("image-format-change", true));
+}
+
+void LLPanelSnapshotPostcard::onQualitySliderCommit(LLUICtrl* ctrl)
+{
+ updateImageQualityLevel();
+
+ LLSliderCtrl* slider = (LLSliderCtrl*)ctrl;
+ S32 quality_val = llfloor((F32)slider->getValue().asReal());
+ LLSD info;
+ info["image-quality-change"] = quality_val;
+ LLFloaterSnapshot::getInstance()->notify(info); // updates the "SnapshotQuality" setting
+}
+
+void LLPanelSnapshotPostcard::onTabButtonPress(S32 btn_idx)
+{
+ LLButton* buttons[2] = {
+ getChild<LLButton>("message_btn"),
+ getChild<LLButton>("settings_btn"),
+ };
+
+ // Switch between Message and Settings tabs.
+ LLButton* clicked_btn = buttons[btn_idx];
+ LLButton* other_btn = buttons[!btn_idx];
+ LLSideTrayPanelContainer* container =
+ getChild<LLSideTrayPanelContainer>("postcard_panel_container");
+
+ container->selectTab(clicked_btn->getToggleState() ? btn_idx : !btn_idx);
+ //clicked_btn->setEnabled(FALSE);
+ other_btn->toggleState();
+ //other_btn->setEnabled(TRUE);
+
+ lldebugs << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << llendl;
+}
+
+void LLPanelSnapshotPostcard::onSend()
+{
+ // Validate input.
+ std::string to(getChild<LLUICtrl>("to_form")->getValue().asString());
+
+ boost::regex email_format("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
+
+ if (to.empty() || !boost::regex_match(to, email_format))
+ {
+ LLNotificationsUtil::add("PromptRecipientEmail");
+ return;
+ }
+
+ if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format))
+ {
+ LLNotificationsUtil::add("PromptSelfEmail");
+ return;
+ }
+
+ std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString());
+ if(subject.empty() || !mHasFirstMsgFocus)
+ {
+ LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLPanelSnapshotPostcard::missingSubjMsgAlertCallback, this, _1, _2));
+ return;
+ }
+
+ // Send postcard.
+ sendPostcard();
+}
diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp
new file mode 100644
index 0000000000..a706318369
--- /dev/null
+++ b/indra/newview/llpanelsnapshotprofile.cpp
@@ -0,0 +1,101 @@
+/**
+ * @file llpanelsnapshotprofile.cpp
+ * @brief Posts a snapshot to My Profile feed.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+// libs
+#include "llcombobox.h"
+#include "llfloaterreg.h"
+#include "llpanel.h"
+#include "llspinctrl.h"
+
+// newview
+#include "llfloatersnapshot.h"
+#include "llpanelsnapshot.h"
+#include "llsidetraypanelcontainer.h"
+#include "llwebprofile.h"
+
+/**
+ * Posts a snapshot to My Profile feed.
+ */
+class LLPanelSnapshotProfile
+: public LLPanelSnapshot
+{
+ LOG_CLASS(LLPanelSnapshotProfile);
+
+public:
+ LLPanelSnapshotProfile();
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ /*virtual*/ std::string getWidthSpinnerName() const { return "profile_snapshot_width"; }
+ /*virtual*/ std::string getHeightSpinnerName() const { return "profile_snapshot_height"; }
+ /*virtual*/ std::string getAspectRatioCBName() const { return "profile_keep_aspect_check"; }
+ /*virtual*/ std::string getImageSizeComboName() const { return "profile_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return "profile_image_size_lp"; }
+ /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG; }
+ /*virtual*/ void updateControls(const LLSD& info);
+
+ void onSend();
+};
+
+static LLRegisterPanelClassWrapper<LLPanelSnapshotProfile> panel_class("llpanelsnapshotprofile");
+
+LLPanelSnapshotProfile::LLPanelSnapshotProfile()
+{
+ mCommitCallbackRegistrar.add("PostToProfile.Send", boost::bind(&LLPanelSnapshotProfile::onSend, this));
+ mCommitCallbackRegistrar.add("PostToProfile.Cancel", boost::bind(&LLPanelSnapshotProfile::cancel, this));
+}
+
+// virtual
+BOOL LLPanelSnapshotProfile::postBuild()
+{
+ return LLPanelSnapshot::postBuild();
+}
+
+// virtual
+void LLPanelSnapshotProfile::onOpen(const LLSD& key)
+{
+ LLPanelSnapshot::onOpen(key);
+}
+
+// virtual
+void LLPanelSnapshotProfile::updateControls(const LLSD& info)
+{
+ const bool have_snapshot = info.has("have-snapshot") ? info["have-snapshot"].asBoolean() : true;
+ getChild<LLUICtrl>("post_btn")->setEnabled(have_snapshot);
+}
+
+void LLPanelSnapshotProfile::onSend()
+{
+ std::string caption = getChild<LLUICtrl>("caption")->getValue().asString();
+ bool add_location = getChild<LLUICtrl>("add_location_cb")->getValue().asBoolean();
+
+ LLWebProfile::uploadImage(LLFloaterSnapshot::getImageData(), caption, add_location);
+ LLFloaterSnapshot::postSave();
+}
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 9b35e78134..d3543daff0 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -31,7 +31,6 @@
#include "llfloaterworldmap.h"
#include "llpanelteleporthistory.h"
-#include "llsidetray.h"
#include "llworldmap.h"
#include "llteleporthistorystorage.h"
#include "lltextutil.h"
@@ -39,6 +38,7 @@
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llflatlistview.h"
+#include "llfloatersidepanelcontainer.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "lltoggleablemenu.h"
@@ -221,7 +221,7 @@ void LLTeleportHistoryFlatItem::showPlaceInfoPanel(S32 index)
params["id"] = index;
params["type"] = "teleport_history";
- LLSideTray::getInstance()->showPanel("panel_places", params);
+ LLFloaterSidePanelContainer::showPanel("places", params);
}
void LLTeleportHistoryFlatItem::onProfileBtnClick()
@@ -388,7 +388,8 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel()
LLTeleportHistoryPanel::~LLTeleportHistoryPanel()
{
LLTeleportHistoryFlatItemStorage::instance().purge();
- LLView::deleteViewByHandle(mGearMenuHandle);
+ delete mGearMenuHandle.get();
+ mTeleportHistoryChangedConnection.disconnect();
}
BOOL LLTeleportHistoryPanel::postBuild()
@@ -396,7 +397,7 @@ BOOL LLTeleportHistoryPanel::postBuild()
mTeleportHistory = LLTeleportHistoryStorage::getInstance();
if (mTeleportHistory)
{
- mTeleportHistory->setHistoryChangedCallback(boost::bind(&LLTeleportHistoryPanel::onTeleportHistoryChange, this, _1));
+ mTeleportHistoryChangedConnection = mTeleportHistory->setHistoryChangedCallback(boost::bind(&LLTeleportHistoryPanel::onTeleportHistoryChange, this, _1));
}
mHistoryAccordion = getChild<LLAccordionCtrl>("history_accordion");
@@ -679,29 +680,32 @@ void LLTeleportHistoryPanel::refresh()
// tab_boundary_date would be earliest possible date for this tab
S32 tab_idx = 0;
getNextTab(date, tab_idx, tab_boundary_date);
-
- LLAccordionCtrlTab* tab = mItemContainers.get(mItemContainers.size() - 1 - tab_idx);
- tab->setVisible(true);
-
- // Expand all accordion tabs when filtering
- if(!sFilterSubString.empty())
+ tab_idx = mItemContainers.size() - 1 - tab_idx;
+ if (tab_idx >= 0)
{
- //store accordion tab state when filter is not empty
- tab->notifyChildren(LLSD().with("action","store_state"));
-
- tab->setDisplayChildren(true);
- }
- // Restore each tab's expand state when not filtering
- else
- {
- bool collapsed = isAccordionCollapsedByUser(tab);
- tab->setDisplayChildren(!collapsed);
+ LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx);
+ tab->setVisible(true);
+
+ // Expand all accordion tabs when filtering
+ if(!sFilterSubString.empty())
+ {
+ //store accordion tab state when filter is not empty
+ tab->notifyChildren(LLSD().with("action","store_state"));
- //restore accordion state after all those accodrion tabmanipulations
- tab->notifyChildren(LLSD().with("action","restore_state"));
- }
+ tab->setDisplayChildren(true);
+ }
+ // Restore each tab's expand state when not filtering
+ else
+ {
+ bool collapsed = isAccordionCollapsedByUser(tab);
+ tab->setDisplayChildren(!collapsed);
+
+ //restore accordion state after all those accodrion tabmanipulations
+ tab->notifyChildren(LLSD().with("action","restore_state"));
+ }
- curr_flat_view = getFlatListViewFromTab(tab);
+ curr_flat_view = getFlatListViewFromTab(tab);
+ }
}
if (curr_flat_view)
@@ -760,7 +764,12 @@ void LLTeleportHistoryPanel::onTeleportHistoryChange(S32 removed_index)
void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
{
// Flat list for 'Today' (mItemContainers keeps accordion tabs in reverse order)
- LLFlatListView* fv = getFlatListViewFromTab(mItemContainers[mItemContainers.size() - 1]);
+ LLFlatListView* fv = NULL;
+
+ if (mItemContainers.size() > 0)
+ {
+ fv = getFlatListViewFromTab(mItemContainers[mItemContainers.size() - 1]);
+ }
// Empty flat list for 'Today' means that other flat lists are empty as well,
// so all items from teleport history should be added.
@@ -828,19 +837,27 @@ void LLTeleportHistoryPanel::showTeleportHistory()
// Starting to add items from last one, in reverse order,
// since TeleportHistory keeps most recent item at the end
+ if (!mTeleportHistory)
+ {
+ mTeleportHistory = LLTeleportHistoryStorage::getInstance();
+ }
+
mCurrentItem = mTeleportHistory->getItems().size() - 1;
for (S32 n = mItemContainers.size() - 1; n >= 0; --n)
{
LLAccordionCtrlTab* tab = mItemContainers.get(n);
- tab->setVisible(false);
-
- LLFlatListView* fv = getFlatListViewFromTab(tab);
- if (fv)
+ if (tab)
{
- // Detached panels are managed by LLTeleportHistoryFlatItemStorage
- std::vector<LLPanel*> detached_items;
- fv->detachItems(detached_items);
+ tab->setVisible(false);
+
+ LLFlatListView* fv = getFlatListViewFromTab(tab);
+ if (fv)
+ {
+ // Detached panels are managed by LLTeleportHistoryFlatItemStorage
+ std::vector<LLPanel*> detached_items;
+ fv->detachItems(detached_items);
+ }
}
}
}
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index 3d29454d15..47b607a2f4 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -119,6 +119,8 @@ private:
LLContextMenu* mAccordionTabMenu;
LLHandle<LLView> mGearMenuHandle;
LLMenuButton* mMenuGearButton;
+
+ boost::signals2::connection mTeleportHistoryChangedConnection;
};
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 7087541fc8..eb4c7572d4 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -31,11 +31,11 @@
#include "llagent.h"
#include "llagentui.h"
#include "llclipboard.h"
+#include "llfloatersidepanelcontainer.h"
#include "lllandmarkactions.h"
#include "lllocationinputctrl.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
-#include "llsidetray.h"
#include "llslurl.h"
#include "llstatusbar.h"
#include "lltrans.h"
@@ -203,6 +203,11 @@ void LLPanelTopInfoBar::onVisibilityChange(const LLSD& show)
gFloaterView->setMinimizePositionVerticalOffset(minimize_pos_offset);
}
+boost::signals2::connection LLPanelTopInfoBar::setResizeCallback( const resize_signal_t::slot_type& cb )
+{
+ return mResizeSignal.connect(cb);
+}
+
void LLPanelTopInfoBar::draw()
{
updateParcelInfoText();
@@ -224,6 +229,7 @@ void LLPanelTopInfoBar::buildLocationString(std::string& loc_str, bool show_coor
void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text)
{
+ LLRect old_rect = getRect();
const LLFontGL* font = mParcelInfoText->getDefaultFont();
S32 new_text_width = font->getWidth(new_text);
@@ -235,6 +241,11 @@ void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text)
mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE);
mParcelInfoText->setRect(rect);
layoutParcelIcons();
+
+ if (old_rect != getRect())
+ {
+ mResizeSignal();
+ }
}
void LLPanelTopInfoBar::update()
@@ -342,6 +353,8 @@ void LLPanelTopInfoBar::updateHealth()
void LLPanelTopInfoBar::layoutParcelIcons()
{
+ LLRect old_rect = getRect();
+
// TODO: remove hard-coded values and read them as xml parameters
static const int FIRST_ICON_HPAD = 32;
static const int LAST_ICON_HPAD = 11;
@@ -358,6 +371,11 @@ void LLPanelTopInfoBar::layoutParcelIcons()
LLRect rect = getRect();
rect.set(rect.mLeft, rect.mTop, left + LAST_ICON_HPAD, rect.mBottom);
setRect(rect);
+
+ if (old_rect != getRect())
+ {
+ mResizeSignal();
+ }
}
S32 LLPanelTopInfoBar::layoutWidget(LLUICtrl* ctrl, S32 left)
@@ -436,12 +454,11 @@ void LLPanelTopInfoBar::onContextMenuItemClicked(const LLSD::String& item)
if(landmark == NULL)
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
else
{
- LLSideTray::getInstance()->showPanel("panel_places",
- LLSD().with("type", "landmark").with("id",landmark->getUUID()));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
}
else if (item == "copy")
@@ -456,5 +473,5 @@ void LLPanelTopInfoBar::onContextMenuItemClicked(const LLSD::String& item)
void LLPanelTopInfoBar::onInfoButtonClicked()
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
}
diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h
index 583e91d15e..d58d95be90 100644
--- a/indra/newview/llpaneltopinfobar.h
+++ b/indra/newview/llpaneltopinfobar.h
@@ -41,6 +41,8 @@ class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar>,
friend class LLDestroyClass<LLPanelTopInfoBar>;
public:
+ typedef boost::signals2::signal<void ()> resize_signal_t;
+
LLPanelTopInfoBar();
~LLPanelTopInfoBar();
@@ -57,6 +59,8 @@ public:
*/
void onVisibilityChange(const LLSD& show);
+ boost::signals2::connection setResizeCallback( const resize_signal_t::slot_type& cb );
+
private:
class LLParcelChangeObserver;
@@ -148,7 +152,7 @@ private:
void setParcelInfoText(const std::string& new_text);
/**
- * Implementation of LLDestroyClass<LLSideTray>
+ * Implementation of LLDestroyClass<T>
*/
static void destroyClass()
{
@@ -167,6 +171,8 @@ private:
boost::signals2::connection mParcelPropsCtrlConnection;
boost::signals2::connection mShowCoordsCtrlConnection;
boost::signals2::connection mParcelMgrConnection;
+
+ resize_signal_t mResizeSignal;
};
#endif /* LLPANELTOPINFOBAR_H_ */
diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp
index 4a80bbbe5e..6be2ea6481 100644
--- a/indra/newview/llpanelvoicedevicesettings.cpp
+++ b/indra/newview/llpanelvoicedevicesettings.cpp
@@ -41,6 +41,7 @@
static LLRegisterPanelClassWrapper<LLPanelVoiceDeviceSettings> t_panel_group_general("panel_voice_device_settings");
+static const std::string DEFAULT_DEVICE("Default");
LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings()
@@ -68,10 +69,17 @@ BOOL LLPanelVoiceDeviceSettings::postBuild()
// set mic volume tuning slider based on last mic volume setting
volume_slider->setValue(mMicVolume);
- getChild<LLComboBox>("voice_input_device")->setCommitCallback(
+ mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
+ mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
+
+ mCtrlInputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitInputDevice, this));
- getChild<LLComboBox>("voice_output_device")->setCommitCallback(
+ mCtrlOutputDevices->setCommitCallback(
boost::bind(&LLPanelVoiceDeviceSettings::onCommitOutputDevice, this));
+
+ mLocalizedDeviceNames[DEFAULT_DEVICE] = getString("default_text");
+ mLocalizedDeviceNames["No Device"] = getString("name_no_device");
+ mLocalizedDeviceNames["Default System Device"] = getString("name_default_system_device");
return TRUE;
}
@@ -138,14 +146,14 @@ void LLPanelVoiceDeviceSettings::apply()
std::string s;
if(mCtrlInputDevices)
{
- s = mCtrlInputDevices->getSimple();
+ s = mCtrlInputDevices->getValue().asString();
gSavedSettings.setString("VoiceInputAudioDevice", s);
mInputDevice = s;
}
if(mCtrlOutputDevices)
{
- s = mCtrlOutputDevices->getSimple();
+ s = mCtrlOutputDevices->getValue().asString();
gSavedSettings.setString("VoiceOutputAudioDevice", s);
mOutputDevice = s;
}
@@ -166,10 +174,10 @@ void LLPanelVoiceDeviceSettings::cancel()
gSavedSettings.setString("VoiceOutputAudioDevice", mOutputDevice);
if(mCtrlInputDevices)
- mCtrlInputDevices->setSimple(mInputDevice);
+ mCtrlInputDevices->setValue(mInputDevice);
if(mCtrlOutputDevices)
- mCtrlOutputDevices->setSimple(mOutputDevice);
+ mCtrlOutputDevices->setValue(mOutputDevice);
gSavedSettings.setF32("AudioLevelMic", mMicVolume);
LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider");
@@ -188,9 +196,6 @@ void LLPanelVoiceDeviceSettings::refresh()
LLVoiceClient::getInstance()->tuningSetMicVolume(current_volume);
// Fill in popup menus
- mCtrlInputDevices = getChild<LLComboBox>("voice_input_device");
- mCtrlOutputDevices = getChild<LLComboBox>("voice_output_device");
-
bool device_settings_available = LLVoiceClient::getInstance()->deviceSettingsAvailable();
if (mCtrlInputDevices)
@@ -212,14 +217,14 @@ void LLPanelVoiceDeviceSettings::refresh()
if(mCtrlInputDevices)
{
mCtrlInputDevices->removeall();
- mCtrlInputDevices->add( mInputDevice, ADD_BOTTOM );
- mCtrlInputDevices->setSimple(mInputDevice);
+ mCtrlInputDevices->add(getLocalizedDeviceName(mInputDevice), mInputDevice, ADD_BOTTOM);
+ mCtrlInputDevices->setValue(mInputDevice);
}
if(mCtrlOutputDevices)
{
mCtrlOutputDevices->removeall();
- mCtrlOutputDevices->add( mOutputDevice, ADD_BOTTOM );
- mCtrlOutputDevices->setSimple(mOutputDevice);
+ mCtrlOutputDevices->add(getLocalizedDeviceName(mOutputDevice), mOutputDevice, ADD_BOTTOM);
+ mCtrlOutputDevices->setValue(mOutputDevice);
}
mDevicesUpdated = FALSE;
}
@@ -230,35 +235,41 @@ void LLPanelVoiceDeviceSettings::refresh()
if(mCtrlInputDevices)
{
mCtrlInputDevices->removeall();
- mCtrlInputDevices->add( getString("default_text"), ADD_BOTTOM );
+ mCtrlInputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
for(iter=LLVoiceClient::getInstance()->getCaptureDevices().begin();
iter != LLVoiceClient::getInstance()->getCaptureDevices().end();
iter++)
{
- mCtrlInputDevices->add( *iter, ADD_BOTTOM );
+ mCtrlInputDevices->add(getLocalizedDeviceName(*iter), *iter, ADD_BOTTOM);
}
- if(!mCtrlInputDevices->setSimple(mInputDevice))
+ // Fix invalid input audio device preference.
+ if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, TRUE))
{
- mCtrlInputDevices->setSimple(getString("default_text"));
+ mCtrlInputDevices->setValue(DEFAULT_DEVICE);
+ gSavedSettings.setString("VoiceInputAudioDevice", DEFAULT_DEVICE);
+ mInputDevice = DEFAULT_DEVICE;
}
}
if(mCtrlOutputDevices)
{
mCtrlOutputDevices->removeall();
- mCtrlOutputDevices->add( getString("default_text"), ADD_BOTTOM );
+ mCtrlOutputDevices->add(getLocalizedDeviceName(DEFAULT_DEVICE), DEFAULT_DEVICE, ADD_BOTTOM);
for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin();
iter != LLVoiceClient::getInstance()->getRenderDevices().end(); iter++)
{
- mCtrlOutputDevices->add( *iter, ADD_BOTTOM );
+ mCtrlOutputDevices->add(getLocalizedDeviceName(*iter), *iter, ADD_BOTTOM);
}
- if(!mCtrlOutputDevices->setSimple(mOutputDevice))
+ // Fix invalid output audio device preference.
+ if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, TRUE))
{
- mCtrlOutputDevices->setSimple(getString("default_text"));
+ mCtrlOutputDevices->setValue(DEFAULT_DEVICE);
+ gSavedSettings.setString("VoiceOutputAudioDevice", DEFAULT_DEVICE);
+ mOutputDevice = DEFAULT_DEVICE;
}
}
mDevicesUpdated = TRUE;
@@ -292,12 +303,19 @@ void LLPanelVoiceDeviceSettings::cleanup()
}
}
+// returns English name if no translation found
+std::string LLPanelVoiceDeviceSettings::getLocalizedDeviceName(const std::string& en_dev_name)
+{
+ std::map<std::string, std::string>::const_iterator it = mLocalizedDeviceNames.find(en_dev_name);
+ return it != mLocalizedDeviceNames.end() ? it->second : en_dev_name;
+}
+
void LLPanelVoiceDeviceSettings::onCommitInputDevice()
{
if(LLVoiceClient::getInstance())
{
LLVoiceClient::getInstance()->setCaptureDevice(
- getChild<LLComboBox>("voice_input_device")->getValue().asString());
+ mCtrlInputDevices->getValue().asString());
}
}
@@ -306,6 +324,6 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice()
if(LLVoiceClient::getInstance())
{
LLVoiceClient::getInstance()->setRenderDevice(
- getChild<LLComboBox>("voice_output_device")->getValue().asString());
+ mCtrlInputDevices->getValue().asString());
}
}
diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h
index d09476d469..ba3bcad0dc 100644
--- a/indra/newview/llpanelvoicedevicesettings.h
+++ b/indra/newview/llpanelvoicedevicesettings.h
@@ -49,6 +49,8 @@ public:
void setUseTuningMode(bool use) { mUseTuningMode = use; };
protected:
+ std::string getLocalizedDeviceName(const std::string& en_dev_name);
+
void onCommitInputDevice();
void onCommitOutputDevice();
@@ -59,6 +61,7 @@ protected:
class LLComboBox *mCtrlOutputDevices;
BOOL mDevicesUpdated;
bool mUseTuningMode;
+ std::map<std::string, std::string> mLocalizedDeviceNames;
};
#endif // LL_LLPANELVOICEDEVICESETTINGS_H
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index bb87601d20..12eea7844d 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -351,7 +351,7 @@ void LLPanelVolume::getState( )
getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(is_flexible);
if (is_flexible || (volobjp && volobjp->canBeFlexible()))
{
- getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp);
+ getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh());
}
else
{
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index f19b54c1d4..e2801c09bd 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -31,11 +31,11 @@
#include "lltoggleablemenu.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "llmenubutton.h"
-#include "llsidetray.h"
#include "llviewermenu.h"
#include "llwearableitemslist.h"
#include "llsdserialize.h"
@@ -44,7 +44,7 @@
// Context menu and Gear menu helper.
static void edit_outfit()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
//////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 54053cf89f..5c95e805ce 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -468,7 +468,7 @@ void LLParticipantList::setValidateSpeakerCallback(validate_speaker_callback_t c
void LLParticipantList::updateRecentSpeakersOrder()
{
- if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder())
+ if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder() && !isHovered())
{
// Need to update speakers to sort list correctly
mSpeakerMgr->update(true);
@@ -477,6 +477,13 @@ void LLParticipantList::updateRecentSpeakersOrder()
}
}
+bool LLParticipantList::isHovered()
+{
+ S32 x, y;
+ LLUI::getMousePositionScreen(&x, &y);
+ return mAvatarList->calcScreenRect().pointInRect(x, y);
+}
+
bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
{
LLUUID uu_id = event->getValue().asUUID();
@@ -798,11 +805,19 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd
bool LLParticipantList::LLParticipantListMenu::isGroupModerator()
{
- // Agent is in Group Call
+ if (!mParent.mSpeakerMgr)
+ {
+ llwarns << "Speaker manager is missing" << llendl;
+ return false;
+ }
+
+ // Is session a group call/chat?
if(gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID()))
{
- // Agent is Moderator
- return mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator;
+ LLSpeaker* speaker = mParent.mSpeakerMgr->findSpeaker(gAgentID).get();
+
+ // Is agent a moderator?
+ return speaker && speaker->mIsModerator;
}
return false;
}
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index e0b3d42c25..a001d29b67 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -251,6 +251,8 @@ private:
*/
void adjustParticipant(const LLUUID& speaker_id);
+ bool isHovered();
+
LLSpeakerMgr* mSpeakerMgr;
LLAvatarList* mAvatarList;
diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp
new file mode 100644
index 0000000000..4f2d6da7e5
--- /dev/null
+++ b/indra/newview/llpostcard.cpp
@@ -0,0 +1,155 @@
+/**
+ * @file llpostcard.cpp
+ * @brief Sending postcards.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpostcard.h"
+
+#include "llvfile.h"
+#include "llvfs.h"
+#include "llviewerregion.h"
+
+#include "message.h"
+
+#include "llagent.h"
+#include "llassetuploadresponders.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// misc
+
+static void postcard_upload_callback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status)
+{
+ LLSD* postcard_data = (LLSD*)user_data;
+
+ if (result)
+ {
+ // TODO: display the error messages in UI
+ llwarns << "Failed to send postcard: " << LLAssetStorage::getErrorString(result) << llendl;
+ LLPostCard::reportPostResult(false);
+ }
+ else
+ {
+ // only create the postcard once the upload succeeds
+
+ // request the postcard
+ const LLSD& data = *postcard_data;
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessage("SendPostcard");
+ msg->nextBlock("AgentData");
+ msg->addUUID("AgentID", gAgent.getID());
+ msg->addUUID("SessionID", gAgent.getSessionID());
+ msg->addUUID("AssetID", data["asset-id"].asUUID());
+ msg->addVector3d("PosGlobal", LLVector3d(data["pos-global"]));
+ msg->addString("To", data["to"]);
+ msg->addString("From", data["from"]);
+ msg->addString("Name", data["name"]);
+ msg->addString("Subject", data["subject"]);
+ msg->addString("Msg", data["msg"]);
+ msg->addBOOL("AllowPublish", FALSE);
+ msg->addBOOL("MaturePublish", FALSE);
+ gAgent.sendReliableMessage();
+
+ LLPostCard::reportPostResult(true);
+ }
+
+ delete postcard_data;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// LLPostcardSendResponder
+
+class LLPostcardSendResponder : public LLAssetUploadResponder
+{
+ LOG_CLASS(LLPostcardSendResponder);
+
+public:
+ LLPostcardSendResponder(const LLSD &post_data,
+ const LLUUID& vfile_id,
+ LLAssetType::EType asset_type):
+ LLAssetUploadResponder(post_data, vfile_id, asset_type)
+ {
+ }
+
+ /*virtual*/ void uploadComplete(const LLSD& content)
+ {
+ llinfos << "Postcard sent" << llendl;
+ LL_DEBUGS("Snapshots") << "content: " << content << llendl;
+ LLPostCard::reportPostResult(true);
+ }
+
+ /*virtual*/ void uploadFailure(const LLSD& content)
+ {
+ llwarns << "Sending postcard failed: " << content << llendl;
+ LLPostCard::reportPostResult(false);
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// LLPostCard
+
+LLPostCard::result_callback_t LLPostCard::mResultCallback;
+
+// static
+void LLPostCard::send(LLPointer<LLImageFormatted> image, const LLSD& postcard_data)
+{
+ LLTransactionID transaction_id;
+ LLAssetID asset_id;
+
+ transaction_id.generate();
+ asset_id = transaction_id.makeAssetID(gAgent.getSecureSessionID());
+ LLVFile::writeFile(image->getData(), image->getDataSize(), gVFS, asset_id, LLAssetType::AT_IMAGE_JPEG);
+
+ // upload the image
+ std::string url = gAgent.getRegion()->getCapability("SendPostcard");
+ if (!url.empty())
+ {
+ llinfos << "Sending postcard via capability" << llendl;
+ // the capability already encodes: agent ID, region ID
+ LL_DEBUGS("Snapshots") << "url: " << url << llendl;
+ LL_DEBUGS("Snapshots") << "body: " << postcard_data << llendl;
+ LL_DEBUGS("Snapshots") << "data size: " << image->getDataSize() << llendl;
+ LLHTTPClient::post(url, postcard_data,
+ new LLPostcardSendResponder(postcard_data, asset_id, LLAssetType::AT_IMAGE_JPEG));
+ }
+ else
+ {
+ llinfos << "Sending postcard" << llendl;
+ LLSD* data = new LLSD(postcard_data);
+ (*data)["asset-id"] = asset_id;
+ gAssetStorage->storeAssetData(transaction_id, LLAssetType::AT_IMAGE_JPEG,
+ &postcard_upload_callback, (void *)data, FALSE);
+ }
+}
+
+// static
+void LLPostCard::reportPostResult(bool ok)
+{
+ if (mResultCallback)
+ {
+ mResultCallback(ok);
+ }
+}
diff --git a/indra/newview/llsidetraylistener.h b/indra/newview/llpostcard.h
index 51e2137762..0eb118b906 100644
--- a/indra/newview/llsidetraylistener.h
+++ b/indra/newview/llpostcard.h
@@ -1,9 +1,7 @@
-/**
- * @file llsidetraylistener.h
- * @author Nat Goodspeed
- * @date 2011-02-15
- * @brief
- *
+/**
+ * @file llpostcard.h
+ * @brief Sending postcards.
+ *
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2011, Linden Research, Inc.
@@ -26,28 +24,25 @@
* $/LicenseInfo$
*/
-#if ! defined(LL_LLSIDETRAYLISTENER_H)
-#define LL_LLSIDETRAYLISTENER_H
-
-#include "lleventapi.h"
-#include <boost/function.hpp>
+#ifndef LL_LLPOSTCARD_H
+#define LL_LLPOSTCARD_H
-class LLSideTray;
-class LLSD;
+#include "llimage.h"
+#include "lluuid.h"
-class LLSideTrayListener: public LLEventAPI
+class LLPostCard
{
- typedef boost::function<LLSideTray*()> Getter;
+ LOG_CLASS(LLPostCard);
public:
- LLSideTrayListener(const Getter& getter);
+ typedef boost::function<void(bool ok)> result_callback_t;
-private:
- void getCollapsed(const LLSD& event) const;
- void getTabs(const LLSD& event) const;
- void getPanels(const LLSD& event) const;
+ static void send(LLPointer<LLImageFormatted> image, const LLSD& postcard_data);
+ static void setPostResultCallback(result_callback_t cb) { mResultCallback = cb; }
+ static void reportPostResult(bool ok);
- Getter mGetter;
+private:
+ static result_callback_t mResultCallback;
};
-#endif /* ! defined(LL_LLSIDETRAYLISTENER_H) */
+#endif // LL_LLPOSTCARD_H
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index a90f23d637..18626e3273 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -363,8 +363,10 @@ void LLPreview::onBtnCopyToInv(void* userdata)
// Copy to inventory
if (self->mNotecardInventoryID.notNull())
{
- copy_inventory_from_notecard(self->mNotecardObjectID,
- self->mNotecardInventoryID, item);
+ copy_inventory_from_notecard(LLUUID::null,
+ self->mNotecardObjectID,
+ self->mNotecardInventoryID,
+ item);
}
else
{
@@ -444,18 +446,15 @@ void LLPreview::handleReshape(const LLRect& new_rect, bool by_user)
LLMultiPreview::LLMultiPreview()
: LLMultiFloater(LLSD())
{
- // *TODO: There should be a .xml file for this
- const LLRect& nextrect = LLFloaterReg::getFloaterRect("preview"); // place where the next preview should show up
- if (nextrect.getWidth() > 0)
- {
- setRect(nextrect);
- }
- else
+ // start with a rect in the top-left corner ; will get resized
+ LLRect rect;
+ rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 400);
+ setRect(rect);
+
+ LLFloater* last_floater = LLFloaterReg::getLastFloaterInGroup("preview");
+ if (last_floater)
{
- // start with a rect in the top-left corner ; will get resized
- LLRect rect;
- rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 400);
- setRect(rect);
+ stackWith(*last_floater);
}
setTitle(LLTrans::getString("MultiPreviewTitle"));
buildTabContainer();
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 18d6731fcb..3ff5a05d81 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -169,7 +169,7 @@ void LLPreviewTexture::draw()
saveAs();
}
// Draw the texture
- glColor3f( 1.f, 1.f, 1.f );
+ gGL.diffuseColor3f( 1.f, 1.f, 1.f );
gl_draw_scaled_image(interior.mLeft,
interior.mBottom,
interior.getWidth(),
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 028891a90e..5d7a5b1c59 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -50,6 +50,7 @@
#include "llappviewer.h"
#include "llweb.h"
#include "lluictrlfactory.h"
+#include "llpanellogin.h"
LLProgressView* LLProgressView::sInstance = NULL;
@@ -66,7 +67,9 @@ LLProgressView::LLProgressView()
mMediaCtrl( NULL ),
mMouseDownInActiveArea( false ),
mUpdateEvents("LLProgressView"),
- mFadeToWorldTimer()
+ mFadeToWorldTimer(),
+ mFadeFromLoginTimer(),
+ mStartupComplete(false)
{
mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1));
}
@@ -79,10 +82,13 @@ BOOL LLProgressView::postBuild()
mMediaCtrl = getChild<LLMediaCtrl>("login_media_panel");
mMediaCtrl->setVisible( false ); // hidden initially
mMediaCtrl->addObserver( this ); // watch events
+
+ LLViewerMedia::setOnlyAudibleMediaTextureID(mMediaCtrl->getTextureID());
mCancelBtn = getChild<LLButton>("cancel_btn");
mCancelBtn->setClickedCallback( LLProgressView::onCancelButtonClicked, NULL );
mFadeToWorldTimer.stop();
+ mFadeFromLoginTimer.stop();
getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle()));
@@ -130,18 +136,34 @@ void LLProgressView::revealIntroPanel()
// if user hasn't yet seen intro video
std::string intro_url = gSavedSettings.getString("PostFirstLoginIntroURL");
if ( intro_url.length() > 0 &&
+ gSavedSettings.getBOOL("BrowserJavascriptEnabled") &&
gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == FALSE )
{
+ // hide the progress bar
+ getChild<LLView>("stack1")->setVisible(false);
+
// navigate to intro URL and reveal widget
mMediaCtrl->navigateTo( intro_url );
mMediaCtrl->setVisible( TRUE );
+
// flag as having seen the new user post login intro
gSavedSettings.setBOOL("PostFirstLoginIntroViewed", TRUE );
+
+ mMediaCtrl->setFocus(TRUE);
}
- else
+
+ mFadeFromLoginTimer.start();
+}
+
+void LLProgressView::setStartupComplete()
+{
+ mStartupComplete = true;
+
+ // if we are not showing a video, fade into world
+ if (!mMediaCtrl->getVisible())
{
- // start the timer that will control the fade through to the world view
+ mFadeFromLoginTimer.stop();
mFadeToWorldTimer.start();
}
}
@@ -162,17 +184,15 @@ void LLProgressView::setVisible(BOOL visible)
}
}
-void LLProgressView::draw()
-{
- static LLTimer timer;
- // Paint bitmap if we've got one
- glPushMatrix();
+void LLProgressView::drawStartTexture(F32 alpha)
+{
+ gGL.pushMatrix();
if (gStartTexture)
{
LLGLSUIDefault gls_ui;
gGL.getTexUnit(0)->bind(gStartTexture.get());
- gGL.color4f(1.f, 1.f, 1.f, 1.f);
+ gGL.color4f(1.f, 1.f, 1.f, alpha);
F32 image_aspect = (F32)gStartImageWidth / (F32)gStartImageHeight;
S32 width = getRect().getWidth();
S32 height = getRect().getHeight();
@@ -180,13 +200,13 @@ void LLProgressView::draw()
// stretch image to maintain aspect ratio
if (image_aspect > view_aspect)
{
- glTranslatef(-0.5f * (image_aspect / view_aspect - 1.f) * width, 0.f, 0.f);
- glScalef(image_aspect / view_aspect, 1.f, 1.f);
+ gGL.translatef(-0.5f * (image_aspect / view_aspect - 1.f) * width, 0.f, 0.f);
+ gGL.scalef(image_aspect / view_aspect, 1.f, 1.f);
}
else
{
- glTranslatef(0.f, -0.5f * (view_aspect / image_aspect - 1.f) * height, 0.f);
- glScalef(1.f, view_aspect / image_aspect, 1.f);
+ gGL.translatef(0.f, -0.5f * (view_aspect / image_aspect - 1.f) * height, 0.f);
+ gGL.scalef(1.f, view_aspect / image_aspect, 1.f);
}
gl_rect_2d_simple_tex( getRect().getWidth(), getRect().getHeight() );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -197,7 +217,34 @@ void LLProgressView::draw()
gGL.color4f(0.f, 0.f, 0.f, 1.f);
gl_rect_2d(getRect());
}
- glPopMatrix();
+ gGL.popMatrix();
+}
+
+
+void LLProgressView::draw()
+{
+ static LLTimer timer;
+
+ if (mFadeFromLoginTimer.getStarted())
+ {
+ F32 alpha = clamp_rescale(mFadeFromLoginTimer.getElapsedTimeF32(), 0.f, FADE_TO_WORLD_TIME, 0.f, 1.f);
+ LLViewDrawContext context(alpha);
+
+ if (!mMediaCtrl->getVisible())
+ {
+ drawStartTexture(alpha);
+ }
+
+ LLPanel::draw();
+
+ if (mFadeFromLoginTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME )
+ {
+ mFadeFromLoginTimer.stop();
+ LLPanelLogin::closePanel();
+ }
+
+ return;
+ }
// handle fade out to world view when we're asked to
if (mFadeToWorldTimer.getStarted())
@@ -205,6 +252,8 @@ void LLProgressView::draw()
// draw fading panel
F32 alpha = clamp_rescale(mFadeToWorldTimer.getElapsedTimeF32(), 0.f, FADE_TO_WORLD_TIME, 1.f, 0.f);
LLViewDrawContext context(alpha);
+
+ drawStartTexture(alpha);
LLPanel::draw();
// faded out completely - remove panel and reveal world
@@ -212,6 +261,8 @@ void LLProgressView::draw()
{
mFadeToWorldTimer.stop();
+ LLViewerMedia::setOnlyAudibleMediaTextureID(LLUUID::null);
+
// Fade is complete, release focus
gFocusMgr.releaseFocusIfNeeded( this );
@@ -235,6 +286,7 @@ void LLProgressView::draw()
return;
}
+ drawStartTexture(1.0f);
// draw children
LLPanel::draw();
}
@@ -349,9 +401,26 @@ bool LLProgressView::onAlertModal(const LLSD& notify)
void LLProgressView::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
{
+ // the intro web content calls javascript::window.close() when it's done
if( event == MEDIA_EVENT_CLOSE_REQUEST )
{
- // the intro web content calls javascript::window.close() when it's done
- mFadeToWorldTimer.start();
+ if (mStartupComplete)
+ {
+ //make sure other timer has stopped
+ mFadeFromLoginTimer.stop();
+ mFadeToWorldTimer.start();
+ }
+ else
+ {
+ // hide the media ctrl and wait for startup to be completed before fading to world
+ mMediaCtrl->setVisible(false);
+ if (mMediaCtrl->getMediaPlugin())
+ {
+ mMediaCtrl->getMediaPlugin()->stop();
+ }
+
+ // show the progress bar
+ getChild<LLView>("stack1")->setVisible(true);
+ }
}
}
diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h
index 73dd478e98..fac00ad04d 100644
--- a/indra/newview/llprogressview.h
+++ b/indra/newview/llprogressview.h
@@ -48,6 +48,7 @@ public:
BOOL postBuild();
/*virtual*/ void draw();
+ void drawStartTexture(F32 alpha);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
@@ -65,6 +66,8 @@ public:
// turns on (under certain circumstances) the into video after login
void revealIntroPanel();
+ void setStartupComplete();
+
void setCancelButtonVisible(BOOL b, const std::string& label);
static void onCancelButtonClicked( void* );
@@ -82,8 +85,10 @@ protected:
std::string mMessage;
LLButton* mCancelBtn;
LLFrameTimer mFadeToWorldTimer;
+ LLFrameTimer mFadeFromLoginTimer;
LLRect mOutlineRect;
bool mMouseDownInActiveArea;
+ bool mStartupComplete;
// The LLEventStream mUpdateEvents depends upon this class being a singleton
// to avoid pump name conflicts.
diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp
index 8e8fc9dd25..09e799e4f7 100644
--- a/indra/newview/llsceneview.cpp
+++ b/indra/newview/llsceneview.cpp
@@ -83,6 +83,9 @@ void LLSceneView::draw()
S32 total_visible_triangles[] = {0, 0};
S32 total_triangles[] = {0, 0};
+ S32 total_visible_bytes[] = {0, 0};
+ S32 total_bytes[] = {0, 0};
+
//streaming cost
std::vector<F32> streaming_cost[2];
F32 total_streaming[] = { 0.f, 0.f };
@@ -122,13 +125,19 @@ void LLSceneView::draw()
visible_triangles[idx].push_back(visible);
triangles[idx].push_back(high_triangles);
- F32 streaming = object->getStreamingCost();
+ S32 bytes = 0;
+ S32 visible_bytes = 0;
+
+ F32 streaming = object->getStreamingCost(&bytes, &visible_bytes);
total_streaming[idx] += streaming;
streaming_cost[idx].push_back(streaming);
F32 physics = object->getPhysicsCost();
total_physics[idx] += physics;
physics_cost[idx].push_back(physics);
+
+ total_bytes[idx] += bytes;
+ total_visible_bytes[idx] += visible_bytes;
}
}
}
@@ -279,8 +288,8 @@ void LLSceneView::draw()
total_visible += tri_count;
}
- std::string label = llformat("%s Object Triangle Counts (Ktris) -- [%.2f, %.2f] Mean: %.2f Median: %.2f Visible: %.2f/%.2f",
- category[idx], tri_domain[0]/1024.f, tri_domain[1]/1024.f, (total/count)/1024.f, triangles[idx][count/2]/1024.f, total_visible_triangles[idx]/1024.f, total_triangles[idx]/1024.f);
+ std::string label = llformat("%s Object Triangle Counts (Ktris) -- Visible: %.2f/%.2f (%.2f KB Visible)",
+ category[idx], total_visible_triangles[idx]/1024.f, total_triangles[idx]/1024.f, total_visible_bytes[idx]/1024.f);
LLFontGL::getFontMonospace()->renderUTF8(label,
0 , tri_rect.mLeft, tri_rect.mTop+margin, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index e3bc67a414..15ba5195d9 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -41,7 +41,7 @@
#include "llsyswellwindow.h"
#include "llimfloater.h"
#include "llscriptfloater.h"
-#include "llsidetray.h"
+#include "llrootview.h"
#include <algorithm>
@@ -49,28 +49,49 @@ using namespace LLNotificationsUI;
bool LLScreenChannel::mWasStartUpToastShown = false;
+LLFastTimer::DeclareTimer FTM_GET_CHANNEL_RECT("Calculate Notification Channel Region");
+LLRect LLScreenChannelBase::getChannelRect()
+{
+ LLFastTimer _(FTM_GET_CHANNEL_RECT);
+ LLRect channel_rect;
+ LLRect chiclet_rect;
+ LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ floater_snap_region->localRectToScreen(floater_snap_region->getLocalRect(), &channel_rect);
+
+ LLView* chiclet_region = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ chiclet_region->localRectToScreen(chiclet_region->getLocalRect(), &chiclet_rect);
+
+ channel_rect.mTop = chiclet_rect.mBottom;
+ return channel_rect;
+}
+
+
//--------------------------------------------------------------------------
//////////////////////
// LLScreenChannelBase
//////////////////////
-LLScreenChannelBase::LLScreenChannelBase(const LLUUID& id) :
- mToastAlignment(NA_BOTTOM)
- ,mCanStoreToasts(true)
- ,mHiddenToastsNum(0)
- ,mHoveredToast(NULL)
- ,mControlHovering(false)
- ,mShowToasts(true)
+LLScreenChannelBase::LLScreenChannelBase(const Params& p)
+: LLUICtrl(p),
+ mToastAlignment(p.toast_align),
+ mCanStoreToasts(true),
+ mHiddenToastsNum(0),
+ mHoveredToast(NULL),
+ mControlHovering(false),
+ mShowToasts(true),
+ mID(p.id),
+ mDisplayToastsAlways(p.display_toasts_always),
+ mChannelAlignment(p.channel_align)
{
- mID = id;
- mWorldViewRectConnection = gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLScreenChannelBase::updatePositionAndSize, this, _1, _2));
+ mID = p.id;
setMouseOpaque( false );
setVisible(FALSE);
}
-LLScreenChannelBase::~LLScreenChannelBase()
+
+void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent)
{
- mWorldViewRectConnection.disconnect();
+ redrawToasts();
}
bool LLScreenChannelBase::isHovering()
@@ -83,38 +104,20 @@ bool LLScreenChannelBase::isHovering()
return mHoveredToast->isHovered();
}
-void LLScreenChannelBase::resetPositionAndSize()
-{
- LLRect rc = gViewerWindow->getWorldViewRectScaled();
- updatePositionAndSize(rc, rc);
-}
-
-void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
+void LLScreenChannelBase::updatePositionAndSize(LLRect rect)
{
- /*
- take sidetray into account - screenchannel should not overlap sidetray
- */
- S32 world_rect_padding = 0;
- if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE
- && LLSideTray::instanceCreated ())
- {
- world_rect_padding += LLSideTray::getInstance()->getVisibleWidth();
- }
-
-
- S32 top_delta = old_world_rect.mTop - new_world_rect.mTop;
LLRect this_rect = getRect();
- this_rect.mTop -= top_delta;
+ this_rect.mTop = rect.mTop;
switch(mChannelAlignment)
{
case CA_LEFT :
break;
case CA_CENTRE :
- this_rect.setCenterAndSize( (new_world_rect.getWidth() - world_rect_padding) / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight());
+ this_rect.setCenterAndSize( (rect.getWidth()) / 2, rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight());
break;
case CA_RIGHT :
- this_rect.setLeftTopAndSize(new_world_rect.mRight - world_rect_padding - this_rect.getWidth(),
+ this_rect.setLeftTopAndSize(rect.mRight - this_rect.getWidth(),
this_rect.mTop,
this_rect.getWidth(),
this_rect.getHeight());
@@ -126,45 +129,38 @@ void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect ne
void LLScreenChannelBase::init(S32 channel_left, S32 channel_right)
{
- if(LLSideTray::instanceCreated())
- {
- LLSideTray* side_bar = LLSideTray::getInstance();
- side_bar->setVisibleWidthChangeCallback(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this));
- }
-
- // top and bottom set by updateBottom()
+ // top and bottom set by updateRect()
setRect(LLRect(channel_left, 0, channel_right, 0));
- updateBottom();
+ updateRect();
setVisible(TRUE);
}
-void LLScreenChannelBase::updateBottom()
+void LLScreenChannelBase::updateRect()
{
- S32 channel_top = gViewerWindow->getWorldViewRectScaled().getHeight();
- S32 channel_bottom = gSavedSettings.getS32("ChannelBottomPanelMargin");
+ S32 channel_top = getChannelRect().mTop;
+ S32 channel_bottom = getChannelRect().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");
S32 channel_left = getRect().mLeft;
S32 channel_right = getRect().mRight;
setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
}
-
//--------------------------------------------------------------------------
//////////////////////
// LLScreenChannel
//////////////////////
//--------------------------------------------------------------------------
-LLScreenChannel::LLScreenChannel(LLUUID& id):
-LLScreenChannelBase(id)
-,mStartUpToastPanel(NULL)
-{
+LLScreenChannel::LLScreenChannel(const Params& p)
+: LLScreenChannelBase(p),
+ mStartUpToastPanel(NULL)
+{
}
//--------------------------------------------------------------------------
void LLScreenChannel::init(S32 channel_left, S32 channel_right)
{
LLScreenChannelBase::init(channel_left, channel_right);
- LLRect world_rect = gViewerWindow->getWorldViewRectScaled();
- updatePositionAndSize(world_rect, world_rect);
+ LLRect channel_rect = getChannelRect();
+ updatePositionAndSize(channel_rect);
}
//--------------------------------------------------------------------------
@@ -201,19 +197,8 @@ std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher)
}
//--------------------------------------------------------------------------
-void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
+void LLScreenChannel::updatePositionAndSize(LLRect new_world_rect)
{
- /*
- take sidetray into account - screenchannel should not overlap sidetray
- */
- S32 world_rect_padding = 0;
- if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE
- && LLSideTray::instanceCreated ())
- {
- world_rect_padding += LLSideTray::getInstance()->getVisibleWidth();
- }
-
-
LLRect this_rect = getRect();
switch(mChannelAlignment)
@@ -222,11 +207,11 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo
this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
break;
case CA_CENTRE :
- LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect);
+ LLScreenChannelBase::updatePositionAndSize(new_world_rect);
return;
case CA_RIGHT :
this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
- this_rect.setLeftTopAndSize(new_world_rect.mRight - world_rect_padding - this_rect.getWidth(),
+ this_rect.setLeftTopAndSize(new_world_rect.mRight - this_rect.getWidth(),
this_rect.mTop,
this_rect.getWidth(),
this_rect.getHeight());
@@ -488,6 +473,15 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
//--------------------------------------------------------------------------
void LLScreenChannel::redrawToasts()
{
+ LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+
+ if (!getParent())
+ {
+ // connect to floater snap region just to get resize events, we don't care about being a proper widget
+ floater_snap_region->addChild(this);
+ setFollows(FOLLOWS_ALL);
+ }
+
if(mToastList.size() == 0)
return;
@@ -514,7 +508,7 @@ void LLScreenChannel::showToastsBottom()
S32 toast_margin = 0;
std::vector<ToastElem>::reverse_iterator it;
- updateBottom();
+ updateRect();
LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get());
@@ -546,9 +540,9 @@ void LLScreenChannel::showToastsBottom()
(*it).toast->translate(0, shift);
}
- LLRect world_rect = gViewerWindow->getWorldViewRectScaled();
+ LLRect channel_rect = getChannelRect();
// don't show toasts if there is not enough space
- if(toast_rect.mTop > world_rect.mTop)
+ if(toast_rect.mTop > channel_rect.mTop)
{
break;
}
@@ -619,11 +613,103 @@ void LLScreenChannel::showToastsCentre()
//--------------------------------------------------------------------------
void LLScreenChannel::showToastsTop()
{
+ LLRect channel_rect = getChannelRect();
+
+ LLRect toast_rect;
+ S32 top = channel_rect.mTop;
+ S32 toast_margin = 0;
+ std::vector<ToastElem>::reverse_iterator it;
+
+ updateRect();
+
+ LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get());
+
+ for(it = mToastList.rbegin(); it != mToastList.rend(); ++it)
+ {
+ if(it != mToastList.rbegin())
+ {
+ LLToast* toast = (*(it-1)).toast;
+ top = toast->getRect().mBottom - toast->getTopPad();
+ toast_margin = gSavedSettings.getS32("ToastGap");
+ }
+
+ toast_rect = (*it).toast->getRect();
+ toast_rect.setLeftTopAndSize(channel_rect.mRight - toast_rect.getWidth(),
+ top, toast_rect.getWidth(),
+ toast_rect.getHeight());
+ (*it).toast->setRect(toast_rect);
+
+ if(floater && floater->overlapsScreenChannel())
+ {
+ if(it == mToastList.rbegin())
+ {
+ // move first toast above docked floater
+ S32 shift = -floater->getRect().getHeight();
+ if(floater->getDockControl())
+ {
+ shift -= floater->getDockControl()->getTongueHeight();
+ }
+ (*it).toast->translate(0, shift);
+ }
+
+ LLRect channel_rect = getChannelRect();
+ // don't show toasts if there is not enough space
+ if(toast_rect.mBottom < channel_rect.mBottom)
+ {
+ break;
+ }
+ }
+
+ bool stop_showing_toasts = (*it).toast->getRect().mBottom < channel_rect.mBottom;
+
+ if(!stop_showing_toasts)
+ {
+ if( it != mToastList.rend()-1)
+ {
+ S32 toast_bottom = (*it).toast->getRect().mBottom - gSavedSettings.getS32("ToastGap");
+ stop_showing_toasts = toast_bottom < channel_rect.mBottom;
+ }
+ }
+
+ // at least one toast should be visible
+ if(it == mToastList.rbegin())
+ {
+ stop_showing_toasts = false;
+ }
+
+ if(stop_showing_toasts)
+ break;
+
+ if( !(*it).toast->getVisible() )
+ {
+ // HACK
+ // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
+ (*it).toast->setVisible(TRUE);
+ }
+ if(!(*it).toast->hasFocus())
+ {
+ // Fixing Z-order of toasts (EXT-4862)
+ // Next toast will be positioned under this one.
+ gFloaterView->sendChildToBack((*it).toast);
+ }
+ }
+
+ // Dismiss toasts we don't have space for (STORM-391).
+ if(it != mToastList.rend())
+ {
+ mHiddenToastsNum = 0;
+ for(; it != mToastList.rend(); it++)
+ {
+ (*it).toast->hide();
+ }
+ }
}
//--------------------------------------------------------------------------
void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
{
+ LLScreenChannelBase::updateRect();
+
LLRect toast_rect;
LLToast::Params p;
p.lifetime_secs = timer;
@@ -646,13 +732,10 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
text_box->setValue(text);
text_box->setVisible(TRUE);
- S32 old_height = text_box->getRect().getHeight();
text_box->reshapeToFitText();
text_box->setOrigin(text_box->getRect().mLeft, (wrapper_panel->getRect().getHeight() - text_box->getRect().getHeight())/2);
- S32 new_height = text_box->getRect().getHeight();
- S32 height_delta = new_height - old_height;
- toast_rect.setLeftTopAndSize(0, toast_rect.getHeight() + height_delta +gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
+ toast_rect.setLeftTopAndSize(0, getRect().getHeight() - gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
mStartUpToastPanel->setRect(toast_rect);
addChild(mStartUpToastPanel);
@@ -848,7 +931,7 @@ void LLScreenChannel::updateShowToastsState()
return;
}
- updateBottom();
+ updateRect();
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index d207d13981..2f23552828 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -53,22 +53,32 @@ class LLScreenChannelBase : public LLUICtrl
{
friend class LLChannelManager;
public:
- LLScreenChannelBase(const LLUUID& id);
- ~LLScreenChannelBase();
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Mandatory<LLUUID> id;
+ Optional<bool> display_toasts_always;
+ Optional<EToastAlignment> toast_align;
+ Optional<EChannelAlignment> channel_align;
+
+ Params()
+ : id("id", LLUUID("")),
+ display_toasts_always("display_toasts_always", false),
+ toast_align("toast_align", NA_BOTTOM),
+ channel_align("channel_align", CA_LEFT)
+ {}
+ };
+
+ LLScreenChannelBase(const Params&);
+
+ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
// Channel's outfit-functions
// update channel's size and position in the World View
- virtual void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect);
- void resetPositionAndSize();
+ virtual void updatePositionAndSize(LLRect rect);
// initialization of channel's shape and position
virtual void init(S32 channel_left, S32 channel_right);
-
- virtual void setToastAlignment(EToastAlignment align) {mToastAlignment = align;}
-
- virtual void setChannelAlignment(EChannelAlignment align) {mChannelAlignment = align;}
-
// kill or modify a toast by its ID
virtual void killToastByNotificationID(LLUUID id) {};
virtual void modifyToastNotificationByID(LLUUID id, LLSD data) {};
@@ -91,7 +101,6 @@ public:
void setCanStoreToasts(bool store) { mCanStoreToasts = store; }
- void setDisplayToastsAlways(bool display_toasts) { mDisplayToastsAlways = display_toasts; }
bool getDisplayToastsAlways() { return mDisplayToastsAlways; }
// get number of hidden notifications from a channel
@@ -106,9 +115,11 @@ public:
// get ID of a channel
LLUUID getChannelID() { return mID; }
+ LLHandle<LLScreenChannelBase> getHandle() { mRootHandle.bind(this); return mRootHandle; }
protected:
- void updateBottom();
+ void updateRect();
+ LLRect getChannelRect();
// Channel's flags
bool mControlHovering;
@@ -117,6 +128,7 @@ protected:
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
bool mShowToasts;
+ LLRootHandle<LLScreenChannelBase> mRootHandle;
//
EToastAlignment mToastAlignment;
EChannelAlignment mChannelAlignment;
@@ -125,9 +137,6 @@ protected:
// channel's ID
LLUUID mID;
-
- // store a connection to prevent futher crash that is caused by sending a signal to a destroyed channel
- boost::signals2::connection mWorldViewRectConnection;
};
@@ -138,7 +147,7 @@ class LLScreenChannel : public LLScreenChannelBase
{
friend class LLChannelManager;
public:
- LLScreenChannel(LLUUID& id);
+ LLScreenChannel(const Params&);
virtual ~LLScreenChannel();
class Matcher
@@ -153,7 +162,7 @@ public:
// Channel's outfit-functions
// update channel's size and position in the World View
- void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect);
+ void updatePositionAndSize(LLRect new_rect);
// initialization of channel's shape and position
void init(S32 channel_left, S32 channel_right);
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 170e23e4c5..85a7e75271 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -28,9 +28,9 @@
#include "llscriptfloater.h"
#include "llagentcamera.h"
-#include "llbottomtray.h"
#include "llchannelmanager.h"
#include "llchiclet.h"
+#include "llchicletbar.h"
#include "llfloaterreg.h"
#include "lllslconstants.h"
#include "llnotifications.h"
@@ -95,7 +95,7 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id)
show(notification_id);
}
- LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(notification_id, true);
+ LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(notification_id, true);
return true;
}
@@ -131,11 +131,6 @@ void LLScriptFloater::setNotificationId(const LLUUID& id)
mObjectId = notification_id_to_object_id(id);
}
-void LLScriptFloater::getAllowedRect(LLRect& rect)
-{
- rect = gViewerWindow->getWorldViewRectScaled();
-}
-
void LLScriptFloater::createForm(const LLUUID& notification_id)
{
// delete old form
@@ -211,7 +206,7 @@ void LLScriptFloater::setVisible(BOOL visible)
if(!visible)
{
- LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getNotificationId());
+ LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getNotificationId());
if(chiclet)
{
chiclet->setToggleState(false);
@@ -224,7 +219,7 @@ void LLScriptFloater::onMouseDown()
if(getNotificationId().notNull())
{
// Remove new message icon
- LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getNotificationId());
+ LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(getNotificationId());
if (chiclet == NULL)
{
llerror("Dock chiclet for LLScriptFloater doesn't exist", 0);
@@ -267,7 +262,7 @@ void LLScriptFloater::onFocusLost()
{
if(getNotificationId().notNull())
{
- LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(getNotificationId(), false);
+ LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(getNotificationId(), false);
}
}
@@ -276,7 +271,7 @@ void LLScriptFloater::onFocusReceived()
// first focus will be received before setObjectId() call - don't toggle chiclet
if(getNotificationId().notNull())
{
- LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(getNotificationId(), true);
+ LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(getNotificationId(), true);
}
}
@@ -284,7 +279,7 @@ void LLScriptFloater::dockToChiclet(bool dock)
{
if (getDockControl() == NULL)
{
- LLChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLChiclet>(getNotificationId());
+ LLChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLChiclet>(getNotificationId());
if (chiclet == NULL)
{
llwarns << "Dock chiclet for LLScriptFloater doesn't exist" << llendl;
@@ -292,7 +287,7 @@ void LLScriptFloater::dockToChiclet(bool dock)
}
else
{
- LLBottomTray::getInstance()->getChicletPanel()->scrollToChiclet(chiclet);
+ LLChicletBar::getInstance()->getChicletPanel()->scrollToChiclet(chiclet);
}
// Stop saving position while we dock floater
@@ -300,7 +295,7 @@ void LLScriptFloater::dockToChiclet(bool dock)
setSavePosition(false);
setDockControl(new LLDockControl(chiclet, this, getDockTongue(),
- LLDockControl::TOP, boost::bind(&LLScriptFloater::getAllowedRect, this, _1)));
+ LLDockControl::BOTTOM));
setDocked(dock);
@@ -352,7 +347,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
script_notification_map_t::const_iterator it = findUsingObjectId(object_id);
if(it != mNotifications.end())
{
- LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(it->first);
+ LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(it->first);
if(chiclet)
{
// Pass the new_message icon state further.
@@ -375,11 +370,11 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
// Create inventory offer chiclet for offer type notifications
if( OBJ_GIVE_INVENTORY == obj_type )
{
- LLBottomTray::instance().getChicletPanel()->createChiclet<LLInvOfferChiclet>(notification_id);
+ LLChicletBar::instance().getChicletPanel()->createChiclet<LLInvOfferChiclet>(notification_id);
}
else
{
- LLBottomTray::getInstance()->getChicletPanel()->createChiclet<LLScriptChiclet>(notification_id);
+ LLChicletBar::getInstance()->getChicletPanel()->createChiclet<LLScriptChiclet>(notification_id);
}
LLIMWellWindow::getInstance()->addObjectRow(notification_id, set_new_message);
@@ -413,7 +408,7 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
}
// remove related chiclet
- LLBottomTray::getInstance()->getChicletPanel()->removeChiclet(notification_id);
+ LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id);
LLIMWellWindow::getInstance()->removeObjectRow(notification_id);
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index 8e959a3d0e..70451194b3 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -185,8 +185,6 @@ protected:
*/
void createForm(const LLUUID& object_id);
- /*virtual*/ void getAllowedRect(LLRect& rect);
-
/**
* Hide all notification toasts.
*/
diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index 6558c9a7fa..2824c70582 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -52,10 +52,9 @@ protected:
};
LLSearchComboBox::Params::Params()
-: search_button("search_button")
-, dropdown_button_visible("dropdown_button_visible", false)
-{
-}
+: search_button("search_button"),
+ dropdown_button_visible("dropdown_button_visible", false)
+{}
LLSearchComboBox::LLSearchComboBox(const Params&p)
: LLComboBox(p)
diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h
index b65cf37e7f..db57848320 100644
--- a/indra/newview/llsecapi.h
+++ b/indra/newview/llsecapi.h
@@ -132,7 +132,7 @@ protected:
// LLCertificates are considered unmodifiable
// Certificates are pulled out of stores, or created via
// factory calls
-class LLCertificate : public LLRefCount
+class LLCertificate : public LLThreadSafeRefCount
{
LOG_CLASS(LLCertificate);
public:
@@ -160,7 +160,7 @@ public:
// base class for a list of certificates.
-class LLCertificateVector : public LLRefCount
+class LLCertificateVector : public LLThreadSafeRefCount
{
public:
@@ -170,7 +170,7 @@ public:
// base iterator implementation class, providing
// the functionality needed for the iterator class.
- class iterator_impl : public LLRefCount
+ class iterator_impl : public LLThreadSafeRefCount
{
public:
iterator_impl() {};
@@ -286,10 +286,10 @@ bool operator!=(const LLCertificateVector::iterator& _lhs, const LLCertificateVe
#define CRED_AUTHENTICATOR_TYPE_HASH "hash"
//
// LLCredential - interface for credentials providing the following functionality:
-// * persistance of credential information based on grid (for saving username/password)
-// * serialization to an OGP identifier/authenticator pair
+// * Persistence of credential information based on grid (for saving username/password)
+// * Serialization to an OGP identifier/authenticator pair
//
-class LLCredential : public LLRefCount
+class LLCredential : public LLThreadSafeRefCount
{
public:
@@ -424,7 +424,7 @@ protected:
// LLSecAPIHandler Class
// Interface handler class for the various security storage handlers.
-class LLSecAPIHandler : public LLRefCount
+class LLSecAPIHandler : public LLThreadSafeRefCount
{
public:
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 90e8ff0aae..8d64c8c04f 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1005,6 +1005,8 @@ void LLBasicCertificateStore::validate(int validation_policy,
LLPointer<LLCertificateChain> cert_chain,
const LLSD& validation_params)
{
+ // If --no-verify-ssl-cert was passed on the command line, stop right now.
+ if (gSavedSettings.getBOOL("NoVerifySSLCert")) return;
if(cert_chain->size() < 1)
{
@@ -1209,12 +1211,12 @@ void LLSecAPIBasicHandler::init()
// with the product
std::string ca_file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
llinfos << "app path " << ca_file_path << llendl;
- LLBasicCertificateStore app_ca_store = LLBasicCertificateStore(ca_file_path);
+ LLPointer<LLBasicCertificateStore> app_ca_store = new LLBasicCertificateStore(ca_file_path);
// push the applicate CA files into the store, therefore adding any new CA certs that
// updated
- for(LLCertificateVector::iterator i = app_ca_store.begin();
- i != app_ca_store.end();
+ for(LLCertificateVector::iterator i = app_ca_store->begin();
+ i != app_ca_store->end();
i++)
{
mStore->add(*i);
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 8fa4065fa6..5d0d1ef9a3 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -89,6 +89,7 @@
#include "llvoavatarself.h"
#include "llvovolume.h"
#include "pipeline.h"
+#include "llviewershadermgr.h"
#include "llglheaders.h"
@@ -4837,7 +4838,7 @@ void LLSelectMgr::processForceObjectSelect(LLMessageSystem* msg, void**)
LLSelectMgr::getInstance()->highlightObjectAndFamily(objects);
}
-extern LLGLdouble gGLModelView[16];
+extern F32 gGLModelView[16];
void LLSelectMgr::updateSilhouettes()
{
@@ -5123,7 +5124,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
gGL.getTexUnit(0)->bind(mSilhouetteImagep);
LLGLSPipelineSelection gls_select;
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
LLGLEnable blend(GL_BLEND);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
@@ -5134,20 +5134,20 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
F32 cur_zoom = gAgentCamera.mHUDCurZoom;
// set up transform to encompass bounding box of HUD
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
F32 depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
- glOrtho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, depth);
+ gGL.ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, depth);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
gGL.pushUIMatrix();
gGL.loadUIIdentity();
- glLoadIdentity();
- glLoadMatrixf(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame
- glTranslatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f);
- glScalef(cur_zoom, cur_zoom, cur_zoom);
+ gGL.loadIdentity();
+ gGL.loadMatrix(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame
+ gGL.translatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f);
+ gGL.scalef(cur_zoom, cur_zoom, cur_zoom);
}
if (mSelectedObjects->getNumNodes())
{
@@ -5240,17 +5240,16 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
if (isAgentAvatarValid() && for_hud)
{
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
gGL.popUIMatrix();
stop_glerror();
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
void LLSelectMgr::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point)
@@ -5568,12 +5567,11 @@ void pushWireframe(LLDrawable* drawable)
{
LLVertexBuffer::unbind();
gGL.pushMatrix();
- glMultMatrixf((F32*) vobj->getRelativeXform().mMatrix);
+ gGL.multMatrix((F32*) vobj->getRelativeXform().mMatrix);
for (S32 i = 0; i < rigged_volume->getNumVolumeFaces(); ++i)
{
const LLVolumeFace& face = rigged_volume->getVolumeFace(i);
- glVertexPointer(3, GL_FLOAT, 16, face.mPositions);
- glDrawElements(GL_TRIANGLES, face.mNumIndices, GL_UNSIGNED_SHORT, face.mIndices);
+ LLVertexBuffer::drawElements(LLRender::TRIANGLES, face.mPositions, face.mTexCoords, face.mNumIndices, face.mIndices);
}
gGL.popMatrix();
}
@@ -5586,7 +5584,7 @@ void pushWireframe(LLDrawable* drawable)
LLFace* face = drawable->getFace(i);
if (face->verify())
{
- pushVerts(face, LLVertexBuffer::MAP_VERTEX);
+ pushVerts(face, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0);
}
}
}
@@ -5606,22 +5604,29 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
return;
}
- glMatrixMode(GL_MODELVIEW);
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+
+ if (shader)
+ {
+ gHighlightProgram.bind();
+ }
+
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
BOOL is_hud_object = objectp->isHUDAttachment();
if (drawable->isActive())
{
- glLoadMatrixd(gGLModelView);
- glMultMatrixf((F32*) objectp->getRenderMatrix().mMatrix);
+ gGL.loadMatrix(gGLModelView);
+ gGL.multMatrix((F32*) objectp->getRenderMatrix().mMatrix);
}
else if (!is_hud_object)
{
- glLoadIdentity();
- glMultMatrixd(gGLModelView);
+ gGL.loadIdentity();
+ gGL.multMatrix(gGLModelView);
LLVector3 trans = objectp->getRegion()->getOriginAgent();
- glTranslatef(trans.mV[0], trans.mV[1], trans.mV[2]);
+ gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
}
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
@@ -5629,26 +5634,35 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible())
{
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();
- LLColor4 fogCol = color * (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal()-gAgentCamera.getCameraPositionGlobal()).magVec()/(LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec()*4), 0.0, 1.0);
- glFogf(GL_FOG_START, d);
- glFogf(GL_FOG_END, d*(1 + (LLViewerCamera::getInstance()->getView() / LLViewerCamera::getInstance()->getDefaultFOV())));
- glFogfv(GL_FOG_COLOR, fogCol.mV);
-
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ if (shader)
{
- glColor4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f);
+ gGL.diffuseColor4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f);
pushWireframe(drawable);
}
+ else
+ {
+ LLGLEnable fog(GL_FOG);
+ glFogi(GL_FOG_MODE, GL_LINEAR);
+ float d = (LLViewerCamera::getInstance()->getPointOfInterest()-LLViewerCamera::getInstance()->getOrigin()).magVec();
+ LLColor4 fogCol = color * (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal()-gAgentCamera.getCameraPositionGlobal()).magVec()/(LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec()*4), 0.0, 1.0);
+ glFogf(GL_FOG_START, d);
+ glFogf(GL_FOG_END, d*(1 + (LLViewerCamera::getInstance()->getView() / LLViewerCamera::getInstance()->getDefaultFOV())));
+ glFogfv(GL_FOG_COLOR, fogCol.mV);
+
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ {
+ gGL.diffuseColor4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f);
+ pushWireframe(drawable);
+ }
+ }
}
gGL.flush();
gGL.setSceneBlendType(LLRender::BT_ALPHA);
- glColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
+ gGL.diffuseColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
+
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
glPolygonOffset(3.f, 3.f);
glLineWidth(3.f);
@@ -5656,6 +5670,11 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
glLineWidth(1.f);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
gGL.popMatrix();
+
+ if (shader)
+ {
+ shader->bind();
+ }
}
//-----------------------------------------------------------------------------
@@ -5694,21 +5713,29 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
return;
}
- glMatrixMode(GL_MODELVIEW);
+
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+
+ if (shader)
+ { //switch to "solid color" program for SH-2690 -- works around driver bug causing bad triangles when rendering silhouettes
+ gSolidColorProgram.bind();
+ }
+
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
gGL.pushUIMatrix();
gGL.loadUIIdentity();
if (!is_hud_object)
{
- glLoadIdentity();
- glMultMatrixd(gGLModelView);
+ gGL.loadIdentity();
+ gGL.multMatrix(gGLModelView);
}
if (drawable->isActive())
{
- glMultMatrixf((F32*) objectp->getRenderMatrix().mMatrix);
+ gGL.multMatrix((F32*) objectp->getRenderMatrix().mMatrix);
}
LLVolume *volume = objectp->getVolume();
@@ -5816,6 +5843,11 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
}
gGL.popMatrix();
gGL.popUIMatrix();
+
+ if (shader)
+ {
+ shader->bind();
+ }
}
//
@@ -6505,7 +6537,7 @@ F32 LLObjectSelection::getSelectedObjectStreamingCost(S32* total_bytes, S32* vis
return cost;
}
-U32 LLObjectSelection::getSelectedObjectTriangleCount()
+U32 LLObjectSelection::getSelectedObjectTriangleCount(S32* vcount)
{
U32 count = 0;
for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
@@ -6515,39 +6547,82 @@ U32 LLObjectSelection::getSelectedObjectTriangleCount()
if (object)
{
- count += object->getTriangleCount();
+ count += object->getTriangleCount(vcount);
}
}
return count;
}
-/*S32 LLObjectSelection::getSelectedObjectRenderCost()
+S32 LLObjectSelection::getSelectedObjectRenderCost()
{
S32 cost = 0;
LLVOVolume::texture_cost_t textures;
+ typedef std::set<LLUUID> uuid_list_t;
+ uuid_list_t computed_objects;
+
+ typedef std::list<LLPointer<LLViewerObject> > child_list_t;
+ typedef const child_list_t const_child_list_t;
+
+ // add render cost of complete linksets first, to get accurate texture counts
for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
{
LLSelectNode* node = *iter;
+
LLVOVolume* object = (LLVOVolume*)node->getObject();
- if (object)
- {
- cost += object->getRenderCost(textures);
- }
-
- for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ if (object && object->isRootEdit())
{
- // add the cost of each individual texture in the linkset
- cost += iter->second;
+ cost += object->getRenderCost(textures);
+ computed_objects.insert(object->getID());
+
+ const_child_list_t children = object->getChildren();
+ for (const_child_list_t::const_iterator child_iter = children.begin();
+ child_iter != children.end();
+ ++child_iter)
+ {
+ LLViewerObject* child_obj = *child_iter;
+ LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
+ if (child)
+ {
+ cost += child->getRenderCost(textures);
+ computed_objects.insert(child->getID());
+ }
+ }
+
+ for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ {
+ // add the cost of each individual texture in the linkset
+ cost += iter->second;
+ }
+
+ textures.clear();
}
- textures.clear();
}
+
+ // add any partial linkset objects, texture cost may be slightly misleading
+ for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
+ {
+ LLSelectNode* node = *iter;
+ LLVOVolume* object = (LLVOVolume*)node->getObject();
+ if (object && computed_objects.find(object->getID()) == computed_objects.end() )
+ {
+ cost += object->getRenderCost(textures);
+ computed_objects.insert(object->getID());
+ }
- return cost;
-}*/
+ for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ {
+ // add the cost of each individual texture in the linkset
+ cost += iter->second;
+ }
+
+ textures.clear();
+ }
+ return cost;
+}
//-----------------------------------------------------------------------------
// getTECount()
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 166616e13e..87ada5ac6b 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -286,7 +286,7 @@ public:
S32 getSelectedObjectRenderCost();
F32 getSelectedObjectStreamingCost(S32* total_bytes = NULL, S32* visible_bytes = NULL);
- U32 getSelectedObjectTriangleCount();
+ U32 getSelectedObjectTriangleCount(S32* vcount = NULL);
S32 getTECount();
S32 getRootObjectCount();
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 28ec11d1c7..853656905c 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -32,6 +32,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llinventorypanel.h"
#include "llfiltereditor.h"
@@ -41,7 +42,6 @@
#include "lloutfitobserver.h"
#include "llpaneleditwearable.h"
#include "llpaneloutfitsinventory.h"
-#include "llsidetray.h"
#include "lltextbox.h"
#include "lluictrlfactory.h"
#include "llviewercontrol.h"
@@ -163,7 +163,6 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
else
{
// Switch to the requested panel.
- // *TODO: replace this crap with LLSideTrayPanelContainer
std::string type = key["type"].asString();
if (type == "my_outfits")
{
@@ -456,7 +455,7 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
//static
void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data, BOOL disable_camera_switch)
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance");
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data);
if (panel)
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 65655f82cd..9d069c3996 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -34,6 +34,7 @@
#include "llbutton.h"
#include "lldate.h"
#include "llfirstuse.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfoldertype.h"
#include "llhttpclient.h"
#include "llinventorybridge.h"
@@ -52,7 +53,10 @@
#include "llsidepaneltaskinfo.h"
#include "llstring.h"
#include "lltabcontainer.h"
+#include "lltextbox.h"
+#include "lltrans.h"
#include "llviewermedia.h"
+#include "llviewernetwork.h"
#include "llweb.h"
static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_inventory");
@@ -61,18 +65,25 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_
// Constants
//
-static const char * const INBOX_EXPAND_TIME_SETTING = "LastInventoryInboxExpand";
+// No longer want the inbox panel to auto-expand since it creates issues with the "new" tag time stamp
+#define AUTO_EXPAND_INBOX 0
+
+// Temporarily disabling the outbox until we straighten out the API
+#define ENABLE_MERCHANT_OUTBOX_PANEL 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU
static const char * const INBOX_BUTTON_NAME = "inbox_btn";
static const char * const OUTBOX_BUTTON_NAME = "outbox_btn";
static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel";
static const char * const OUTBOX_LAYOUT_PANEL_NAME = "outbox_layout_panel";
+
+static const char * const INBOX_OUTBOX_LAYOUT_PANEL_NAME = "inbox_outbox_layout_panel";
static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel";
static const char * const INBOX_INVENTORY_PANEL = "inventory_inbox";
static const char * const OUTBOX_INVENTORY_PANEL = "inventory_outbox";
+static const char * const INBOX_OUTBOX_LAYOUT_STACK_NAME = "inbox_outbox_layout_stack";
static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack";
static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox";
@@ -102,21 +113,13 @@ public:
switch (added_category_type)
{
case LLFolderType::FT_INBOX:
+ mSidepanelInventory->enableInbox(true);
mSidepanelInventory->observeInboxModifications(added_category->getUUID());
break;
case LLFolderType::FT_OUTBOX:
+ mSidepanelInventory->enableOutbox(true);
mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
break;
- case LLFolderType::FT_NONE:
- // HACK until sim update to properly create folder with system type
- if (added_category->getName() == "Received Items")
- {
- mSidepanelInventory->observeInboxModifications(added_category->getUUID());
- }
- else if (added_category->getName() == "Merchant Outbox")
- {
- mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
- }
default:
break;
}
@@ -134,6 +137,8 @@ private:
LLSidepanelInventory::LLSidepanelInventory()
: LLPanel()
, mItemPanel(NULL)
+ , mInventoryPanelInbox(NULL)
+ , mInventoryPanelOutbox(NULL)
, mPanelMainInventory(NULL)
, mInboxEnabled(false)
, mOutboxEnabled(false)
@@ -160,16 +165,20 @@ LLSidepanelInventory::~LLSidepanelInventory()
void handleInventoryDisplayInboxChanged()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
+ }
}
void handleInventoryDisplayOutboxChanged()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox"));
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox"));
+ }
}
BOOL LLSidepanelInventory::postBuild()
@@ -235,16 +244,20 @@ BOOL LLSidepanelInventory::postBuild()
// Marketplace inbox/outbox setup
{
- LLLayoutStack* stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
+ LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
// Disable user_resize on main inventory panel by default
- stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false);
- stack->setPanelUserResize(INBOX_LAYOUT_PANEL_NAME, false);
- stack->setPanelUserResize(OUTBOX_LAYOUT_PANEL_NAME, false);
+ inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false);
+ inv_stack->setPanelUserResize(INBOX_OUTBOX_LAYOUT_PANEL_NAME, false);
+
+ // Collapse marketplace panel by default
+ inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME), true);
+
+ LLLayoutStack* inout_stack = getChild<LLLayoutStack>(INBOX_OUTBOX_LAYOUT_STACK_NAME);
// Collapse both inbox and outbox panels
- stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true);
- stack->collapsePanel(getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME), true);
+ inout_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true);
+ inout_stack->collapsePanel(getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME), true);
// Set up button states and callbacks
LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME);
@@ -261,16 +274,19 @@ BOOL LLSidepanelInventory::postBuild()
enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox"));
// Trigger callback for after login so we can setup to track inbox and outbox changes after initial inventory load
- LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::handleLoginComplete, this));
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInboxOutbox, this));
}
gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged));
+ // Update the verbs buttons state.
+ updateVerbs();
+
return TRUE;
}
-void LLSidepanelInventory::handleLoginComplete()
+void LLSidepanelInventory::updateInboxOutbox()
{
//
// Track inbox and outbox folder changes
@@ -291,21 +307,22 @@ void LLSidepanelInventory::handleLoginComplete()
// Set up observer for inbox changes, if we have an inbox already
if (!inbox_id.isNull())
{
- observeInboxModifications(inbox_id);
-
// Enable the display of the inbox if it exists
enableInbox(true);
+
+ observeInboxModifications(inbox_id);
}
+#if ENABLE_MERCHANT_OUTBOX_PANEL
// Set up observer for outbox changes, if we have an outbox already
if (!outbox_id.isNull())
{
- observeOutboxModifications(outbox_id);
-
// Enable the display of the outbox if it exists
- //enableOutbox(true);
- // leslie NOTE: Disabling outbox until we support it officially.
+ enableOutbox(true);
+
+ observeOutboxModifications(outbox_id);
}
+#endif
}
void LLSidepanelInventory::observeInboxOutboxCreation()
@@ -353,7 +370,7 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
//
LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
- inbox->setupInventoryPanel();
+ mInventoryPanelInbox = inbox->setupInventoryPanel();
}
@@ -382,106 +399,183 @@ void LLSidepanelInventory::observeOutboxModifications(const LLUUID& outboxID)
//
LLPanelMarketplaceOutbox * outbox = getChild<LLPanelMarketplaceOutbox>(MARKETPLACE_OUTBOX_PANEL);
- outbox->setupInventoryPanel();
+ mInventoryPanelOutbox = outbox->setupInventoryPanel();
}
void LLSidepanelInventory::enableInbox(bool enabled)
{
mInboxEnabled = enabled;
- getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME)->setVisible(enabled);
+
+ LLLayoutPanel * inbox_layout_panel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+ inbox_layout_panel->setVisible(enabled);
+
+ if (mInboxEnabled)
+ {
+ LLLayoutPanel * inout_layout_panel = getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME);
+
+ inout_layout_panel->setVisible(TRUE);
+
+ if (mOutboxEnabled)
+ {
+ S32 inbox_min_dim = inbox_layout_panel->getMinDim();
+ S32 outbox_min_dim = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME)->getMinDim();
+
+ inout_layout_panel->setMinDim(inbox_min_dim + outbox_min_dim);
+ }
+ }
}
void LLSidepanelInventory::enableOutbox(bool enabled)
{
mOutboxEnabled = enabled;
- getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME)->setVisible(enabled);
+
+ LLLayoutPanel * outbox_layout_panel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
+ outbox_layout_panel->setVisible(enabled);
+
+ if (mOutboxEnabled)
+ {
+ LLLayoutPanel * inout_layout_panel = getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME);
+
+ inout_layout_panel->setVisible(TRUE);
+
+ if (mInboxEnabled)
+ {
+ S32 inbox_min_dim = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME)->getMinDim();
+ S32 outbox_min_dim = outbox_layout_panel->getMinDim();
+
+ inout_layout_panel->setMinDim(inbox_min_dim + outbox_min_dim);
+ }
+
+ updateOutboxUserStatus();
+ }
+}
+
+void LLSidepanelInventory::openInbox()
+{
+ if (mInboxEnabled)
+ {
+ getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true);
+ onToggleInboxBtn();
+ }
+}
+
+void LLSidepanelInventory::openOutbox()
+{
+ if (mOutboxEnabled)
+ {
+ getChild<LLButton>(OUTBOX_BUTTON_NAME)->setToggleState(true);
+ onToggleOutboxBtn();
+ }
}
void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id)
{
// Trigger a load of the entire inbox so we always know the contents and their creation dates for sorting
LLInventoryModelBackgroundFetch::instance().start(inbox_id);
-
- // Expand the inbox since we have fresh items
- LLPanelMarketplaceInbox * inbox = findChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
- if (inbox && (inbox->getFreshItemCount() > 0))
+
+#if AUTO_EXPAND_INBOX
+ // If the outbox is expanded, don't auto-expand the inbox
+ if (mOutboxEnabled)
+ {
+ if (getChild<LLButton>(OUTBOX_BUTTON_NAME)->getToggleState())
+ {
+ return;
+ }
+ }
+
+ // Expand the inbox since we have fresh items and the outbox is not expanded
+ if (mInboxEnabled)
{
getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true);
onToggleInboxBtn();
- }
+ }
+#endif
}
void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id)
{
- // Perhaps use this to track outbox changes?
+ // Expand the outbox since we have new items in it
+ if (mOutboxEnabled)
+ {
+ getChild<LLButton>(OUTBOX_BUTTON_NAME)->setToggleState(true);
+ onToggleOutboxBtn();
+ }
}
-bool manageInboxOutboxPanels(LLLayoutStack * stack,
- LLButton * pressedButton, LLLayoutPanel * pressedPanel,
+bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel,
LLButton * otherButton, LLLayoutPanel * otherPanel)
{
bool expand = pressedButton->getToggleState();
bool otherExpanded = otherButton->getToggleState();
- //
- // NOTE: Ideally we could have two panel sizes stored for a collapsed and expanded minimum size.
- // For now, leave this code disabled because it creates some bad artifacts when expanding
- // and collapsing the inbox/outbox.
- //
- //S32 smallMinSize = (expand ? pressedPanel->getMinDim() : otherPanel->getMinDim());
- //S32 pressedMinSize = (expand ? 2 * smallMinSize : smallMinSize);
- //otherPanel->setMinDim(smallMinSize);
- //pressedPanel->setMinDim(pressedMinSize);
+ LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
+ LLLayoutStack* inout_stack = getChild<LLLayoutStack>(INBOX_OUTBOX_LAYOUT_STACK_NAME);
+ LLLayoutPanel* inout_panel = getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME);
+
+ // Enable user_resize on main inventory panel only when a marketplace box is expanded
+ inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, expand);
+ inv_stack->collapsePanel(inout_panel, !expand);
+ // Collapse other marketplace panel if it is expanded
if (expand && otherExpanded)
{
// Reshape pressedPanel to the otherPanel's height so we preserve the marketplace panel size
pressedPanel->reshape(pressedPanel->getRect().getWidth(), otherPanel->getRect().getHeight());
- stack->collapsePanel(otherPanel, true);
+ inout_stack->collapsePanel(otherPanel, true);
otherButton->setToggleState(false);
}
+ else
+ {
+ // NOTE: This is an attempt to reshape the inventory panel to the proper size but it doesn't seem to propagate
+ // properly to the child panels.
- stack->collapsePanel(pressedPanel, !expand);
+ S32 new_height = inout_panel->getRect().getHeight();
- // Enable user_resize on main inventory panel only when a marketplace box is expanded
- stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, expand);
+ if (otherPanel->getVisible())
+ {
+ new_height -= otherPanel->getMinDim();
+ }
+
+ pressedPanel->reshape(pressedPanel->getRect().getWidth(), new_height);
+ }
+
+ // Expand/collapse the indicated panel
+ inout_stack->collapsePanel(pressedPanel, !expand);
return expand;
}
void LLSidepanelInventory::onToggleInboxBtn()
{
- LLLayoutStack* stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
- LLButton* pressedButton = getChild<LLButton>(INBOX_BUTTON_NAME);
- LLLayoutPanel* pressedPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
- LLButton* otherButton = getChild<LLButton>(OUTBOX_BUTTON_NAME);
- LLLayoutPanel* otherPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
+ LLButton* inboxButton = getChild<LLButton>(INBOX_BUTTON_NAME);
+ LLLayoutPanel* inboxPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+ LLButton* outboxButton = getChild<LLButton>(OUTBOX_BUTTON_NAME);
+ LLLayoutPanel* outboxPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
- bool inboxExpanded = manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel);
+ const bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel);
- if (inboxExpanded)
+ if (inbox_expanded && inboxPanel->isInVisibleChain())
{
- // Save current time as a setting for future new-ness tests
- gSavedSettings.setString(INBOX_EXPAND_TIME_SETTING, LLDate::now().asString());
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
}
void LLSidepanelInventory::onToggleOutboxBtn()
{
- LLLayoutStack* stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
- LLButton* pressedButton = getChild<LLButton>(OUTBOX_BUTTON_NAME);
- LLLayoutPanel* pressedPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
- LLButton* otherButton = getChild<LLButton>(INBOX_BUTTON_NAME);
- LLLayoutPanel* otherPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+ LLButton* inboxButton = getChild<LLButton>(INBOX_BUTTON_NAME);
+ LLLayoutPanel* inboxPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+ LLButton* outboxButton = getChild<LLButton>(OUTBOX_BUTTON_NAME);
+ LLLayoutPanel* outboxPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
- manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel);
+ manageInboxOutboxPanels(outboxButton, outboxPanel, inboxButton, inboxPanel);
}
void LLSidepanelInventory::onOpen(const LLSD& key)
{
LLFirstUse::newInventory(false);
+#if AUTO_EXPAND_INBOX
// Expand the inbox if we have fresh items
LLPanelMarketplaceInbox * inbox = findChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
if (inbox && (inbox->getFreshItemCount() > 0))
@@ -489,6 +583,12 @@ void LLSidepanelInventory::onOpen(const LLSD& key)
getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true);
onToggleInboxBtn();
}
+#else
+ if (mInboxEnabled && getChild<LLButton>(INBOX_BUTTON_NAME)->getToggleState())
+ {
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+ }
+#endif
if(key.size() == 0)
return;
@@ -535,14 +635,12 @@ void LLSidepanelInventory::onShopButtonClicked()
void LLSidepanelInventory::performActionOnSelection(const std::string &action)
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
- LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
+ LLFolderViewItem* current_item = mPanelMainInventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
if (!current_item)
{
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
+ if (mInventoryPanelInbox)
{
- current_item = inbox->getRootFolder()->getCurSelectedItem();
+ current_item = mInventoryPanelInbox->getRootFolder()->getCurSelectedItem();
}
if (!current_item)
@@ -551,7 +649,7 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action)
}
}
- current_item->getListener()->performAction(panel_main_inventory->getActivePanel()->getModel(), action);
+ current_item->getListener()->performAction(mPanelMainInventory->getActivePanel()->getModel(), action);
}
void LLSidepanelInventory::onWearButtonClicked()
@@ -642,6 +740,77 @@ void LLSidepanelInventory::showInventoryPanel()
updateVerbs();
}
+void LLSidepanelInventory::updateOutboxUserStatus()
+{
+ const bool isMerchant = (gSavedSettings.getString("InventoryMarketplaceUserStatus") == "merchant");
+ const bool hasOutbox = !gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false).isNull();
+
+ LLView * outbox_placeholder = getChild<LLView>("outbox_inventory_placeholder_panel");
+ LLView * outbox_placeholder_parent = outbox_placeholder->getParent();
+
+ LLTextBox * outbox_title_box = outbox_placeholder->getChild<LLTextBox>("outbox_inventory_placeholder_title");
+ LLTextBox * outbox_text_box = outbox_placeholder->getChild<LLTextBox>("outbox_inventory_placeholder_text");
+
+ std::string outbox_text;
+ std::string outbox_title;
+ std::string outbox_tooltip;
+
+ if (isMerchant)
+ {
+ if (hasOutbox)
+ {
+ outbox_text = LLTrans::getString("InventoryOutboxNoItems");
+ outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle");
+ outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip");
+ }
+ else
+ {
+ outbox_text = LLTrans::getString("InventoryOutboxCreationError");
+ outbox_title = LLTrans::getString("InventoryOutboxCreationErrorTitle");
+ outbox_tooltip = LLTrans::getString("InventoryOutboxCreationErrorTooltip");
+ }
+ }
+ else
+ {
+ //
+ // The string to become a merchant contains 3 URL's which need the domain name patched in.
+ //
+
+ std::string domain = "secondlife.com";
+
+ if (!LLGridManager::getInstance()->isInProductionGrid())
+ {
+ std::string gridLabel = LLGridManager::getInstance()->getGridLabel();
+ domain = llformat("%s.lindenlab.com", utf8str_tolower(gridLabel).c_str());
+ }
+
+ LLStringUtil::format_map_t domain_arg;
+ domain_arg["[DOMAIN_NAME]"] = domain;
+
+ std::string marketplace_url = LLTrans::getString("MarketplaceURL", domain_arg);
+ std::string marketplace_url_create = LLTrans::getString("MarketplaceURL_CreateStore", domain_arg);
+ std::string marketplace_url_info = LLTrans::getString("MarketplaceURL_LearnMore", domain_arg);
+
+ LLStringUtil::format_map_t args1, args2, args3;
+ args1["[MARKETPLACE_URL]"] = marketplace_url;
+ args2["[LEARN_MORE_URL]"] = marketplace_url_info;
+ args3["[CREATE_STORE_URL]"] = marketplace_url_create;
+
+ // NOTE: This is dumb, ridiculous and very finicky. The order of these is very important
+ // to have these three string substitutions work properly.
+ outbox_text = LLTrans::getString("InventoryOutboxNotMerchant", args1);
+ LLStringUtil::format(outbox_text, args2);
+ LLStringUtil::format(outbox_text, args3);
+
+ outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle");
+ outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip");
+ }
+
+ outbox_text_box->setValue(outbox_text);
+ outbox_title_box->setValue(outbox_title);
+ outbox_placeholder_parent->setToolTip(outbox_tooltip);
+}
+
void LLSidepanelInventory::updateVerbs()
{
mInfoBtn->setEnabled(FALSE);
@@ -693,19 +862,16 @@ void LLSidepanelInventory::updateVerbs()
bool LLSidepanelInventory::canShare()
{
- LLPanelMainInventory* panel_main_inventory =
- mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
-
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
+ LLInventoryPanel* inbox = mInventoryPanelInbox;
// Avoid flicker in the Recent tab while inventory is being loaded.
if ( (!inbox || inbox->getRootFolder()->getSelectionList().empty())
- && (panel_main_inventory && !panel_main_inventory->getActivePanel()->getRootFolder()->hasVisibleChildren()) )
+ && (mPanelMainInventory && !mPanelMainInventory->getActivePanel()->getRootFolder()->hasVisibleChildren()) )
{
return false;
}
- return ( (panel_main_inventory ? LLAvatarActions::canShareSelectedItems(panel_main_inventory->getActivePanel()) : false)
+ return ( (mPanelMainInventory ? LLAvatarActions::canShareSelectedItems(mPanelMainInventory->getActivePanel()) : false)
|| (inbox ? LLAvatarActions::canShareSelectedItems(inbox) : false) );
}
@@ -730,14 +896,13 @@ bool LLSidepanelInventory::canWearSelected()
LLInventoryItem *LLSidepanelInventory::getSelectedItem()
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
- LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
+ LLFolderViewItem* current_item = mPanelMainInventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
+
if (!current_item)
{
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
+ if (mInventoryPanelInbox)
{
- current_item = inbox->getRootFolder()->getCurSelectedItem();
+ current_item = mInventoryPanelInbox->getRootFolder()->getCurSelectedItem();
}
if (!current_item)
@@ -754,14 +919,20 @@ U32 LLSidepanelInventory::getSelectedCount()
{
int count = 0;
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
- std::set<LLUUID> selection_list = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList();
+ std::set<LLUUID> selection_list = mPanelMainInventory->getActivePanel()->getRootFolder()->getSelectionList();
count += selection_list.size();
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
+ if ((count == 0) && mInboxEnabled && (mInventoryPanelInbox != NULL))
{
- selection_list = inbox->getRootFolder()->getSelectionList();
+ selection_list = mInventoryPanelInbox->getRootFolder()->getSelectionList();
+
+ count += selection_list.size();
+ }
+
+ if ((count == 0) && mOutboxEnabled && (mInventoryPanelOutbox != NULL))
+ {
+ selection_list = mInventoryPanelOutbox->getRootFolder()->getSelectionList();
+
count += selection_list.size();
}
@@ -785,3 +956,45 @@ BOOL LLSidepanelInventory::isMainInventoryPanelActive() const
{
return mInventoryPanel->getVisible();
}
+
+void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox, bool clearOutbox)
+{
+ if (clearMain)
+ {
+ LLInventoryPanel * inv_panel = getActivePanel();
+
+ if (inv_panel)
+ {
+ inv_panel->clearSelection();
+ }
+ }
+
+ if (clearInbox && mInboxEnabled && (mInventoryPanelInbox != NULL))
+ {
+ mInventoryPanelInbox->clearSelection();
+ }
+
+ if (clearOutbox && mOutboxEnabled && (mInventoryPanelOutbox != NULL))
+ {
+ mInventoryPanelOutbox->clearSelection();
+ }
+
+ updateVerbs();
+}
+
+std::set<LLUUID> LLSidepanelInventory::getInboxOrOutboxSelectionList()
+{
+ std::set<LLUUID> inventory_selected_uuids;
+
+ if (mInboxEnabled && (mInventoryPanelInbox != NULL))
+ {
+ inventory_selected_uuids = mInventoryPanelInbox->getRootFolder()->getSelectionList();
+ }
+
+ if (inventory_selected_uuids.empty() && mOutboxEnabled && (mInventoryPanelOutbox != NULL))
+ {
+ inventory_selected_uuids = mInventoryPanelOutbox->getRootFolder()->getSelectionList();
+ }
+
+ return inventory_selected_uuids;
+}
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h
index 9117e3bf27..2c6f807013 100644
--- a/indra/newview/llsidepanelinventory.h
+++ b/indra/newview/llsidepanelinventory.h
@@ -29,11 +29,13 @@
#include "llpanel.h"
+class LLButton;
class LLFolderViewItem;
class LLInboxOutboxAddedObserver;
class LLInventoryCategoriesObserver;
class LLInventoryItem;
class LLInventoryPanel;
+class LLLayoutPanel;
class LLPanelMainInventory;
class LLSidepanelItemInfo;
class LLSidepanelTaskInfo;
@@ -45,7 +47,7 @@ public:
virtual ~LLSidepanelInventory();
private:
- void handleLoginComplete();
+ void updateInboxOutbox();
public:
void observeInboxOutboxCreation();
@@ -56,9 +58,15 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any.
+ LLInventoryPanel* getInboxPanel() const { return mInventoryPanelInbox; }
+ LLInventoryPanel* getOutboxPanel() const { return mInventoryPanelOutbox; }
+
LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; }
BOOL isMainInventoryPanelActive() const;
+ void clearSelections(bool clearMain, bool clearInbox, bool clearOutbox);
+ std::set<LLUUID> getInboxOrOutboxSelectionList();
+
void showItemInfoPanel();
void showTaskInfoPanel();
void showInventoryPanel();
@@ -71,10 +79,14 @@ public:
void enableInbox(bool enabled);
void enableOutbox(bool enabled);
-
+
+ void openInbox();
+ void openOutbox();
+
bool isInboxEnabled() const { return mInboxEnabled; }
bool isOutboxEnabled() const { return mOutboxEnabled; }
+ void updateOutboxUserStatus();
void updateVerbs();
protected:
@@ -90,11 +102,15 @@ protected:
void onInboxChanged(const LLUUID& inbox_id);
void onOutboxChanged(const LLUUID& outbox_id);
+ bool manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel, LLButton * otherButton, LLLayoutPanel * otherPanel);
+
//
// UI Elements
//
private:
LLPanel* mInventoryPanel; // Main inventory view
+ LLInventoryPanel* mInventoryPanelInbox;
+ LLInventoryPanel* mInventoryPanelOutbox;
LLSidepanelItemInfo* mItemPanel; // Individual item view
LLSidepanelTaskInfo* mTaskPanel; // Individual in-world object view
LLPanelMainInventory* mPanelMainInventory;
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
deleted file mode 100644
index 651897a217..0000000000
--- a/indra/newview/llsidetray.cpp
+++ /dev/null
@@ -1,1459 +0,0 @@
-/**
- * @file llsidetray.cpp
- * @brief SideBar implementation
- *
- * $LicenseInfo:firstyear=2009&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lltextbox.h"
-
-#include "llagentcamera.h"
-#include "llappviewer.h"
-#include "llbadge.h"
-#include "llbottomtray.h"
-#include "llfloaterreg.h"
-#include "llfirstuse.h"
-#include "llhints.h"
-#include "llsidetray.h"
-#include "llviewerwindow.h"
-#include "llaccordionctrl.h"
-#include "llfocusmgr.h"
-#include "llrootview.h"
-#include "llnavigationbar.h"
-#include "llpanelmarketplaceinbox.h"
-
-#include "llaccordionctrltab.h"
-
-#include "llfloater.h" //for gFloaterView
-#include "lliconctrl.h"//for OpenClose tab icon
-#include "llsidetraypanelcontainer.h"
-#include "llscreenchannel.h"
-#include "llchannelmanager.h"
-#include "llwindow.h"//for SetCursor
-#include "lltransientfloatermgr.h"
-
-#include "llsidepanelappearance.h"
-
-#include "llsidetraylistener.h"
-
-//#include "llscrollcontainer.h"
-
-using namespace std;
-using namespace LLNotificationsUI;
-
-static LLRootViewRegistry::Register<LLSideTray> t1("side_tray");
-static LLDefaultChildRegistry::Register<LLSideTrayTab> t2("sidetray_tab");
-
-static const S32 BOTTOM_BAR_PAD = 5;
-
-static const std::string COLLAPSED_NAME = "<<";
-static const std::string EXPANDED_NAME = ">>";
-
-static const std::string TAB_PANEL_CAPTION_NAME = "sidetray_tab_panel";
-static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title";
-
-LLSideTray* LLSideTray::sInstance = 0;
-
-static LLSideTrayListener sSideTrayListener(LLSideTray::getInstance);
-
-// static
-LLSideTray* LLSideTray::getInstance()
-{
- if (!sInstance)
- {
- sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",NULL, LLRootView::child_registry_t::instance());
- sInstance->setXMLFilename("panel_side_tray.xml");
- }
-
- return sInstance;
-}
-
-// static
-bool LLSideTray::instanceCreated ()
-{
- return sInstance!=0;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// LLSideTrayTab
-// Represents a single tab in the side tray, only used by LLSideTray
-//////////////////////////////////////////////////////////////////////////////
-
-class LLSideTrayTab: public LLPanel
-{
- LOG_CLASS(LLSideTrayTab);
- friend class LLUICtrlFactory;
- friend class LLSideTray;
-public:
-
- struct Params
- : public LLInitParam::Block<Params, LLPanel::Params>
- {
- // image name
- Optional<std::string> image;
- Optional<std::string> image_selected;
- Optional<std::string> tab_title;
- Optional<std::string> description;
- Optional<LLBadge::Params> badge;
-
- Params()
- : image("image"),
- image_selected("image_selected"),
- tab_title("tab_title","no title"),
- description("description","no description"),
- badge("badge")
- {};
- };
-protected:
- LLSideTrayTab(const Params& params);
-
- void dock(LLFloater* floater_tab);
- void undock(LLFloater* floater_tab);
-
- LLSideTray* getSideTray();
-
-public:
- virtual ~LLSideTrayTab();
-
- /*virtual*/ BOOL postBuild ();
- /*virtual*/ bool addChild (LLView* view, S32 tab_group);
-
-
- void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- static LLSideTrayTab* createInstance ();
-
- const std::string& getDescription () const { return mDescription;}
-
- void onOpen (const LLSD& key);
-
- void toggleTabDocked(bool toggle_floater = true);
- void setDocked(bool dock);
- bool isDocked() const;
-
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
-
- LLPanel* getPanel();
-
- LLButton* createButton(bool allowTearOff, LLUICtrl::commit_callback_t callback);
-
-private:
- std::string mTabTitle;
- std::string mImage;
- std::string mImageSelected;
- std::string mDescription;
-
- LLView* mMainPanel;
-
- bool mHasBadge;
- LLBadge::Params mBadgeParams;
-};
-
-LLSideTrayTab::LLSideTrayTab(const Params& p)
-: LLPanel(),
- mTabTitle(p.tab_title),
- mImage(p.image),
- mImageSelected(p.image_selected),
- mDescription(p.description),
- mMainPanel(NULL),
- mBadgeParams(p.badge)
-{
- mHasBadge = p.badge.isProvided();
-}
-
-LLSideTrayTab::~LLSideTrayTab()
-{
-}
-
-bool LLSideTrayTab::addChild(LLView* view, S32 tab_group)
-{
- if(mMainPanel == 0 && TAB_PANEL_CAPTION_NAME != view->getName())//skip our caption panel
- mMainPanel = view;
- return LLPanel::addChild(view,tab_group);
- //return res;
-}
-
-//virtual
-BOOL LLSideTrayTab::postBuild()
-{
- LLPanel* title_panel = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>("panel_side_tray_tab_caption.xml",this, child_registry_t::instance());
- string name = title_panel->getName();
- LLPanel::addChild(title_panel);
-
- title_panel->getChild<LLTextBox>(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle);
-
- getChild<LLButton>("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, false));
- getChild<LLButton>("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, true));
-
- return LLPanel::postBuild();
-}
-
-static const S32 splitter_margin = 1;
-
-void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent )
-{
- LLPanel::reshape(width, height, called_from_parent);
- LLView* title_panel = findChildView(TAB_PANEL_CAPTION_NAME, true);
- if (!title_panel)
- {
- // not fully constructed yet
- return;
- }
-
- S32 title_height = title_panel->getRect().getHeight();
- title_panel->setOrigin( 0, height - title_height );
- title_panel->reshape(width,title_height);
-
- LLRect sRect;
- sRect.setLeftTopAndSize( splitter_margin, height - title_height - splitter_margin,
- width - 2*splitter_margin, height - title_height - 2*splitter_margin);
- mMainPanel->setShape(sRect);
-}
-
-void LLSideTrayTab::onOpen (const LLSD& key)
-{
- LLPanel *panel = getPanel();
- if(panel)
- panel->onOpen(key);
-}
-
-// Attempts to get the existing side tray instance.
-// Needed to avoid recursive calls of LLSideTray::getInstance().
-LLSideTray* LLSideTrayTab::getSideTray()
-{
- // First, check if the side tray is our parent (i.e. we're attached).
- LLSideTray* side_tray = dynamic_cast<LLSideTray*>(getParent());
- if (!side_tray)
- {
- // Detached? Ok, check if the instance exists at all/
- if (LLSideTray::instanceCreated())
- {
- side_tray = LLSideTray::getInstance();
- }
- else
- {
- llerrs << "No safe way to get the side tray instance" << llendl;
- }
- }
-
- return side_tray;
-}
-
-void LLSideTrayTab::toggleTabDocked(bool toggle_floater /* = true */)
-{
- // *FIX: Calling this method twice per frame would crash the viewer.
-
- std::string tab_name = getName();
-
- LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name);
- if (!floater_tab) return;
-
- bool docking = !isDocked();
-
- // Hide the "Tear Off" button when a tab gets undocked
- // and show "Dock" button instead.
- getChild<LLButton>("undock")->setVisible(docking);
- getChild<LLButton>("dock")->setVisible(!docking);
-
- if (docking)
- {
- dock(floater_tab);
- }
- else
- {
- undock(floater_tab);
- }
-
- // Open/close the floater *after* we reparent the tab panel,
- // so that it doesn't receive redundant visibility change notifications.
- if (toggle_floater)
- {
- LLFloaterReg::toggleInstance("side_bar_tab", tab_name);
- }
-}
-
-// Same as toggleTabDocked() apart from making sure that we do exactly what we want.
-void LLSideTrayTab::setDocked(bool dock)
-{
- if (isDocked() == dock)
- {
- llwarns << "Tab " << getName() << " is already " << (dock ? "docked" : "undocked") << llendl;
- return;
- }
-
- toggleTabDocked();
-}
-
-bool LLSideTrayTab::isDocked() const
-{
- return dynamic_cast<LLSideTray*>(getParent()) != NULL;
-}
-
-BOOL LLSideTrayTab::handleScrollWheel(S32 x, S32 y, S32 clicks)
-{
- // Let children handle the event
- LLUICtrl::handleScrollWheel(x, y, clicks);
-
- // and then eat it to prevent in-world scrolling (STORM-351).
- return TRUE;
-}
-
-void LLSideTrayTab::dock(LLFloater* floater_tab)
-{
- LLSideTray* side_tray = getSideTray();
- if (!side_tray) return;
-
- // Before docking the tab, reset its (and its children's) transparency to default (STORM-688).
- floater_tab->updateTransparency(TT_DEFAULT);
-
- if (!side_tray->addTab(this))
- {
- llwarns << "Failed to add tab " << getName() << " to side tray" << llendl;
- return;
- }
-
- setRect(side_tray->getLocalRect());
- reshape(getRect().getWidth(), getRect().getHeight());
-
- // Select the re-docked tab.
- side_tray->selectTabByName(getName());
-
- if (side_tray->getCollapsed())
- {
- side_tray->expandSideBar(false);
- }
-}
-
-static void on_minimize(LLSidepanelAppearance* panel, LLSD minimized)
-{
- if (!panel) return;
- bool visible = !minimized.asBoolean();
- LLSD visibility;
- visibility["visible"] = visible;
- // Do not reset accordion state on minimize (STORM-375)
- visibility["reset_accordion"] = false;
- panel->updateToVisibility(visibility);
-}
-
-void LLSideTrayTab::undock(LLFloater* floater_tab)
-{
- LLSideTray* side_tray = getSideTray();
- if (!side_tray) return;
-
- // Remember whether the tab have been active before detaching
- // because removeTab() will change active tab.
- bool was_active = side_tray->getActiveTab() == this;
-
- // Remove the tab from Side Tray's tabs list.
- // We have to do it despite removing the tab from Side Tray's child view tree
- // by addChild(). Otherwise the tab could be accessed by the pointer in LLSideTray::mTabs.
- if (!side_tray->removeTab(this))
- {
- llwarns << "Failed to remove tab " << getName() << " from side tray" << llendl;
- return;
- }
-
- // If we're undocking while side tray is collapsed we need to explicitly show the panel.
- if (!getVisible())
- {
- setVisible(true);
- }
-
- floater_tab->addChild(this);
- floater_tab->setTitle(mTabTitle);
- floater_tab->setName(getName());
-
- // Resize handles get obscured by added panel so move them to front.
- floater_tab->moveResizeHandlesToFront();
-
- // Reshape the floater if needed.
- LLRect floater_rect;
- if (floater_tab->hasSavedRect())
- {
- // We've got saved rect for the floater, hence no need to reshape it.
- floater_rect = floater_tab->getLocalRect();
- }
- else
- {
- // Detaching for the first time. Reshape the floater.
- floater_rect = side_tray->getLocalRect();
-
- // Reduce detached floater height by small BOTTOM_BAR_PAD not to make it flush with the bottom bar.
- floater_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight() + BOTTOM_BAR_PAD;
- floater_rect.makeValid();
- floater_tab->reshape(floater_rect.getWidth(), floater_rect.getHeight());
- }
-
- // Reshape the panel.
- {
- LLRect panel_rect = floater_tab->getLocalRect();
- panel_rect.mTop -= floater_tab->getHeaderHeight();
- panel_rect.makeValid();
- setRect(panel_rect);
- reshape(panel_rect.getWidth(), panel_rect.getHeight());
- }
-
- // Set FOLLOWS_ALL flag for the tab to follow floater dimensions upon resizing.
- setFollowsAll();
-
- // Camera view may need to be changed for appearance panel(STORM-301) on minimize of floater,
- // so setting callback here.
- if (getName() == "sidebar_appearance")
- {
- LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel());
- if(panel_appearance)
- {
- floater_tab->setMinimizeCallback(boost::bind(&on_minimize, panel_appearance, _2));
- }
- }
-
- if (!side_tray->getCollapsed())
- {
- side_tray->collapseSideBar();
- }
-
- if (!was_active)
- {
- // When a tab other then current active tab is detached from Side Tray
- // onOpen() should be called as tab visibility is changed.
- onOpen(LLSD());
- }
-}
-
-LLPanel* LLSideTrayTab::getPanel()
-{
- LLPanel* panel = dynamic_cast<LLPanel*>(mMainPanel);
- return panel;
-}
-
-LLSideTrayTab* LLSideTrayTab::createInstance ()
-{
- LLSideTrayTab::Params tab_params;
- tab_params.tab_title("openclose");
-
- LLSideTrayTab* tab = LLUICtrlFactory::create<LLSideTrayTab>(tab_params);
- return tab;
-}
-
-// Now that we know the definition of LLSideTrayTab, we can implement
-// tab_cast.
-template <>
-LLPanel* tab_cast<LLPanel*>(LLSideTrayTab* tab) { return tab; }
-
-//////////////////////////////////////////////////////////////////////////////
-// LLSideTrayButton
-// Side Tray tab button with "tear off" handling.
-//////////////////////////////////////////////////////////////////////////////
-
-class LLSideTrayButton : public LLButton
-{
-public:
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask)
- {
- // Route future Mouse messages here preemptively. (Release on mouse up.)
- // No handler needed for focus lost since this class has no state that depends on it.
- gFocusMgr.setMouseCapture(this);
-
- localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY);
-
- // Note: don't pass on to children
- return TRUE;
- }
-
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask)
- {
- // We only handle the click if the click both started and ended within us
- if( !hasMouseCapture() ) return FALSE;
-
- S32 screen_x;
- S32 screen_y;
- localPointToScreen(x, y, &screen_x, &screen_y);
-
- S32 delta_x = screen_x - mDragLastScreenX;
- S32 delta_y = screen_y - mDragLastScreenY;
-
- LLSideTray* side_tray = LLSideTray::getInstance();
-
- // Check if the tab we are dragging is docked.
- if (!side_tray->isTabAttached(getName())) return FALSE;
-
- // Same value is hardcoded in LLDragHandle::handleHover().
- const S32 undock_threshold = 12;
-
- // Detach a tab if it has been pulled further than undock_threshold.
- if (delta_x <= -undock_threshold || delta_x >= undock_threshold ||
- delta_y <= -undock_threshold || delta_y >= undock_threshold)
- {
- LLSideTrayTab* tab = side_tray->getTab(getName());
- if (!tab) return FALSE;
-
- tab->setDocked(false);
-
- LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab->getName());
- if (!floater_tab) return FALSE;
-
- LLRect original_rect = floater_tab->getRect();
- S32 header_snap_y = floater_tab->getHeaderHeight() / 2;
- S32 snap_x = screen_x - original_rect.mLeft - original_rect.getWidth() / 2;
- S32 snap_y = screen_y - original_rect.mTop + header_snap_y;
-
- // Move the floater to appear "under" the mouse pointer.
- floater_tab->setRect(original_rect.translate(snap_x, snap_y));
-
- // Snap the mouse pointer to the center of the floater header
- // and call 'mouse down' event handler to begin dragging.
- floater_tab->handleMouseDown(original_rect.getWidth() / 2,
- original_rect.getHeight() - header_snap_y,
- mask);
-
- return TRUE;
- }
-
- return FALSE;
- }
-
- void setBadgeDriver(LLSideTrayTabBadgeDriver* driver)
- {
- mBadgeDriver = driver;
- }
-
-protected:
- LLSideTrayButton(const LLButton::Params& p)
- : LLButton(p)
- , mDragLastScreenX(0)
- , mDragLastScreenY(0)
- , mBadgeDriver(NULL)
- {}
-
- friend class LLUICtrlFactory;
-
- void draw()
- {
- if (mBadgeDriver)
- {
- setBadgeLabel(mBadgeDriver->getBadgeString());
- }
-
- LLButton::draw();
- }
-
-private:
- S32 mDragLastScreenX;
- S32 mDragLastScreenY;
-
- LLSideTrayTabBadgeDriver* mBadgeDriver;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-// LLSideTray
-//////////////////////////////////////////////////////////////////////////////
-
-LLSideTray::Params::Params()
-: collapsed("collapsed",false),
- tab_btn_image_normal("tab_btn_image",LLUI::getUIImage("taskpanel/TaskPanel_Tab_Off.png")),
- tab_btn_image_selected("tab_btn_image_selected",LLUI::getUIImage("taskpanel/TaskPanel_Tab_Selected.png")),
- default_button_width("tab_btn_width",32),
- default_button_height("tab_btn_height",32),
- default_button_margin("tab_btn_margin",0)
-{}
-
-//virtual
-LLSideTray::LLSideTray(const Params& params)
- : LLPanel(params)
- ,mActiveTab(0)
- ,mCollapsed(false)
- ,mCollapseButton(0)
-{
- mCollapsed=params.collapsed;
-
- LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar();
-
- // register handler function to process data from the xml.
- // panel_name should be specified via "parameter" attribute.
- commit.add("SideTray.ShowPanel", boost::bind(&LLSideTray::showPanel, this, _2, LLUUID::null));
- commit.add("SideTray.Toggle", boost::bind(&LLSideTray::onToggleCollapse, this));
- commit.add("SideTray.Collapse", boost::bind(&LLSideTray::collapseSideBar, this));
- LLTransientFloaterMgr::getInstance()->addControlView(this);
- LLView* side_bar_tabs = gViewerWindow->getRootView()->getChildView("side_bar_tabs");
- if (side_bar_tabs != NULL)
- {
- LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs);
- }
-
- LLPanel::Params p;
- p.name = "buttons_panel";
- p.mouse_opaque = false;
- mButtonsPanel = LLUICtrlFactory::create<LLPanel>(p);
-}
-
-
-BOOL LLSideTray::postBuild()
-{
- createButtons();
-
- arrange();
- selectTabByName("sidebar_home");
-
- if(mCollapsed)
- collapseSideBar();
-
- setMouseOpaque(false);
-
- LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this));
-
- // Remember original tabs order, so that we can restore it if user detaches and then re-attaches a tab.
- for (child_vector_const_iter_t it = mTabs.begin(); it != mTabs.end(); ++it)
- {
- std::string tab_name = (*it)->getName();
- mOriginalTabOrder.push_back(tab_name);
- }
-
- //EXT-8045
- //connect all already created channels to reflect sidetray collapse/expand
- std::vector<LLChannelManager::ChannelElem>& channels = LLChannelManager::getInstance()->getChannelList();
- for(std::vector<LLChannelManager::ChannelElem>::iterator it = channels.begin();it!=channels.end();++it)
- {
- if ((*it).channel)
- {
- setVisibleWidthChangeCallback(boost::bind(&LLScreenChannelBase::resetPositionAndSize, (*it).channel));
- }
- }
-
- return true;
-}
-
-void LLSideTray::setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver)
-{
- mTabButtonBadgeDrivers[tabName] = driver;
-}
-
-void LLSideTray::handleLoginComplete()
-{
- //reset tab to "home" tab if it was changesd during login process
- selectTabByName("sidebar_home");
-
- for (badge_map_t::iterator it = mTabButtonBadgeDrivers.begin(); it != mTabButtonBadgeDrivers.end(); ++it)
- {
- LLButton* button = mTabButtons[it->first];
- LLSideTrayButton* side_button = dynamic_cast<LLSideTrayButton*>(button);
-
- if (side_button)
- {
- side_button->setBadgeDriver(it->second);
- }
- else
- {
- llwarns << "Unable to find button " << it->first << " to set the badge driver. " << llendl;
- }
- }
-
- detachTabs();
-}
-
-LLSideTrayTab* LLSideTray::getTab(const std::string& name)
-{
- return findChild<LLSideTrayTab>(name,false);
-}
-
-bool LLSideTray::isTabAttached(const std::string& name)
-{
- LLSideTrayTab* tab = getTab(name);
- if (!tab) return false;
-
- return std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end();
-}
-
-bool LLSideTray::hasTabs()
-{
- // The open/close tab doesn't count.
- return mTabs.size() > 1;
-}
-
-void LLSideTray::toggleTabButton(LLSideTrayTab* tab)
-{
- if(tab == NULL)
- return;
- std::string name = tab->getName();
- std::map<std::string,LLButton*>::iterator it = mTabButtons.find(name);
- if(it != mTabButtons.end())
- {
- LLButton* btn = it->second;
- bool new_state = !btn->getToggleState();
- btn->setToggleState(new_state);
- // Only highlight the tab if side tray is expanded (STORM-157).
- btn->setImageOverlay( new_state && !getCollapsed() ? tab->mImageSelected : tab->mImage );
- }
-}
-
-LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel_name, const LLSD& params)
-{
- LLView* view = tab->findChildView(panel_name, true);
- if (!view) return NULL;
-
- std::string tab_name = tab->getName();
-
- bool tab_attached = isTabAttached(tab_name);
-
- if (tab_attached && LLUI::sSettingGroups["config"]->getBOOL("OpenSidePanelsInFloaters"))
- {
- tab->setDocked(false);
- tab_attached = false;
- }
-
- // Select tab and expand Side Tray only when a tab is attached.
- if (tab_attached)
- {
- selectTabByName(tab_name);
- if (mCollapsed)
- expandSideBar();
- }
- else
- {
- LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name);
- if (!floater_tab) return NULL;
-
- floater_tab->openFloater(tab_name);
- }
-
- LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
- if (container)
- {
- LLSD new_params = params;
- new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
- container->onOpen(new_params);
-
- return container->getCurrentPanel();
- }
-
- LLPanel* panel = dynamic_cast<LLPanel*>(view);
- if (panel)
- {
- panel->onOpen(params);
- }
-
- return panel;
-}
-
-bool LLSideTray::selectTabByIndex(size_t index)
-{
- if(index>=mTabs.size())
- return false;
-
- LLSideTrayTab* sidebar_tab = mTabs[index];
- return selectTabByName(sidebar_tab->getName());
-}
-
-bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible)
-{
- LLSideTrayTab* tab_to_keep_visible = NULL;
- LLSideTrayTab* new_tab = getTab(name);
- if (!new_tab) return false;
-
- // Bail out if already selected.
- if (new_tab == mActiveTab)
- return false;
-
- //deselect old tab
- if (mActiveTab)
- {
- // Keep previously active tab visible if requested.
- if (keep_prev_visible) tab_to_keep_visible = mActiveTab;
- toggleTabButton(mActiveTab);
- }
-
- //select new tab
- mActiveTab = new_tab;
-
- if (mActiveTab)
- {
- toggleTabButton(mActiveTab);
- LLSD key;//empty
- mActiveTab->onOpen(key);
- }
-
- //arrange();
-
- //hide all tabs - show active tab
- child_vector_const_iter_t child_it;
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = *child_it;
-
- bool vis = sidebar_tab == mActiveTab;
-
- // Force keeping the tab visible if requested.
- vis |= sidebar_tab == tab_to_keep_visible;
-
- // When the last tab gets detached, for a short moment the "Toggle Sidebar" pseudo-tab
- // is shown. So, to avoid the flicker we make sure it never gets visible.
- vis &= (*child_it)->getName() != "sidebar_openclose";
-
- sidebar_tab->setVisible(vis);
- }
- return true;
-}
-
-bool LLSideTray::addChild(LLView* view, S32 tab_group)
-{
- LLSideTrayTab* tab_panel = dynamic_cast<LLSideTrayTab*>(view);
-
- if (tab_panel)
- {
- mTabs.push_back(tab_panel);
- }
-
- return LLUICtrl::addChild(view, tab_group);
-}
-
-bool LLSideTray::removeTab(LLSideTrayTab* tab)
-{
- if (!tab) return false;
- std::string tab_name = tab->getName();
-
- // Look up the tab in the list of known tabs.
- child_vector_iter_t tab_it = std::find(mTabs.begin(), mTabs.end(), tab);
- if (tab_it == mTabs.end())
- {
- llwarns << "Cannot find tab named " << tab_name << llendl;
- return false;
- }
-
- // Find the button corresponding to the tab.
- button_map_t::iterator btn_it = mTabButtons.find(tab_name);
- if (btn_it == mTabButtons.end())
- {
- llwarns << "Cannot find button for tab named " << tab_name << llendl;
- return false;
- }
- LLButton* btn = btn_it->second;
-
- // Deselect the tab.
- if (mActiveTab == tab)
- {
- // Select the next tab (or first one, if we're removing the last tab),
- // skipping the fake open/close tab (STORM-155).
- child_vector_iter_t next_tab_it = tab_it;
- do
- {
- next_tab_it = (next_tab_it < (mTabs.end() - 1)) ? next_tab_it + 1 : mTabs.begin();
- }
- while ((*next_tab_it)->getName() == "sidebar_openclose");
-
- selectTabByName((*next_tab_it)->getName(), true); // Don't hide the tab being removed.
- }
-
- // Remove the tab.
- removeChild(tab);
- mTabs.erase(tab_it);
-
- // Add the tab to detached tabs list.
- mDetachedTabs.push_back(tab);
-
- // Remove the button from the buttons panel so that it isn't drawn anymore.
- mButtonsPanel->removeChild(btn);
-
- // Re-arrange remaining tabs.
- arrange();
-
- return true;
-}
-
-bool LLSideTray::addTab(LLSideTrayTab* tab)
-{
- if (tab == NULL) return false;
-
- std::string tab_name = tab->getName();
-
- // Make sure the tab isn't already in the list.
- if (std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end())
- {
- llwarns << "Attempt to re-add existing tab " << tab_name << llendl;
- return false;
- }
-
- // Look up the corresponding button.
- button_map_t::const_iterator btn_it = mTabButtons.find(tab_name);
- if (btn_it == mTabButtons.end())
- {
- llwarns << "Tab " << tab_name << " has no associated button" << llendl;
- return false;
- }
- LLButton* btn = btn_it->second;
-
- // Insert the tab at its original position.
- LLUICtrl::addChild(tab);
- {
- tab_order_vector_const_iter_t new_tab_orig_pos =
- std::find(mOriginalTabOrder.begin(), mOriginalTabOrder.end(), tab_name);
- llassert(new_tab_orig_pos != mOriginalTabOrder.end());
- child_vector_iter_t insert_pos = mTabs.end();
-
- for (child_vector_iter_t tab_it = mTabs.begin(); tab_it != mTabs.end(); ++tab_it)
- {
- tab_order_vector_const_iter_t cur_tab_orig_pos =
- std::find(mOriginalTabOrder.begin(), mOriginalTabOrder.end(), (*tab_it)->getName());
- llassert(cur_tab_orig_pos != mOriginalTabOrder.end());
-
- if (new_tab_orig_pos < cur_tab_orig_pos)
- {
- insert_pos = tab_it;
- break;
- }
- }
-
- mTabs.insert(insert_pos, tab);
- }
-
- // Add the button to the buttons panel so that it's drawn again.
- mButtonsPanel->addChildInBack(btn);
-
- // Arrange tabs after inserting a new one.
- arrange();
-
- // Remove the tab from the list of detached tabs.
- child_vector_iter_t tab_it = std::find(mDetachedTabs.begin(), mDetachedTabs.end(), tab);
- if (tab_it != mDetachedTabs.end())
- {
- mDetachedTabs.erase(tab_it);
- }
-
- return true;
-}
-
-LLButton* LLSideTrayTab::createButton(bool allowTearOff, LLUICtrl::commit_callback_t callback)
-{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
-
- LLRect rect;
- rect.setOriginAndSize(0, 0, sidetray_params.default_button_width, sidetray_params.default_button_height);
-
- LLButton::Params bparams;
-
- // Append "_button" to the side tray tab name
- std::string button_name = getName() + "_button";
- bparams.name(button_name);
- bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_TOP);
- bparams.rect (rect);
- bparams.tab_stop(false);
- bparams.image_unselected(sidetray_params.tab_btn_image_normal);
- bparams.image_selected(sidetray_params.tab_btn_image_selected);
- bparams.image_disabled(sidetray_params.tab_btn_image_normal);
- bparams.image_disabled_selected(sidetray_params.tab_btn_image_selected);
-
- if (mHasBadge)
- {
- bparams.badge = mBadgeParams;
- }
-
- LLButton* button;
- if (allowTearOff)
- {
- button = LLUICtrlFactory::create<LLSideTrayButton>(bparams);
- }
- else
- {
- // "Open/Close" button shouldn't allow "tear off"
- // hence it is created as LLButton instance.
- button = LLUICtrlFactory::create<LLButton>(bparams);
- }
-
- button->setClickedCallback(callback);
-
- button->setToolTip(mTabTitle);
-
- if(mImage.length())
- {
- button->setImageOverlay(mImage);
- }
-
- return button;
-}
-
-void LLSideTray::createButtons()
-{
- //create buttons for tabs
- child_vector_const_iter_t child_it = mTabs.begin();
- for ( ; child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = *child_it;
-
- std::string name = sidebar_tab->getName();
-
- // The "OpenClose" button will open/close the whole panel
- if (name == "sidebar_openclose")
- {
- mCollapseButton = sidebar_tab->createButton(false, boost::bind(&LLSideTray::onToggleCollapse, this));
-
- mButtonsPanel->addChildInBack(mCollapseButton);
-
- LLHints::registerHintTarget("side_panel_btn", mCollapseButton->getHandle());
- }
- else
- {
- LLButton* button = sidebar_tab->createButton(true, boost::bind(&LLSideTray::onTabButtonClick, this, name));
-
- mButtonsPanel->addChildInBack(button);
-
- mTabButtons[name] = button;
- }
- }
-
- LLHints::registerHintTarget("inventory_btn", mTabButtons["sidebar_inventory"]->getHandle());
-}
-
-void LLSideTray::processTriState ()
-{
- if(mCollapsed)
- expandSideBar();
- else
- {
-#if 0 // *TODO: EXT-2092
-
- // Tell the active task panel to switch to its default view
- // or collapse side tray if already on the default view.
- LLSD info;
- info["task-panel-action"] = "handle-tri-state";
- mActiveTab->notifyChildren(info);
-#else
- collapseSideBar();
-#endif
- }
-}
-
-void LLSideTray::onTabButtonClick(string name)
-{
- LLSideTrayTab* tab = getTab(name);
- if (!tab) return;
-
- if(tab == mActiveTab)
- {
- processTriState ();
- return;
- }
- selectTabByName (name);
- if(mCollapsed)
- expandSideBar();
-}
-
-void LLSideTray::onToggleCollapse()
-{
- LLFirstUse::notUsingSidePanel(false);
- if(mCollapsed)
- {
- expandSideBar();
- //selectTabByName("sidebar_openclose");
- }
- else
- collapseSideBar();
-}
-
-
-void LLSideTray::reflectCollapseChange()
-{
- updateSidetrayVisibility();
-
- setFocus(!mCollapsed);
-
- gFloaterView->refresh();
-}
-
-void LLSideTray::arrange()
-{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
-
- updateSidetrayVisibility();
-
- LLRect ctrl_rect;
- ctrl_rect.setLeftTopAndSize(0,
- mButtonsPanel->getRect().getHeight() - sidetray_params.default_button_width,
- sidetray_params.default_button_width,
- sidetray_params.default_button_height);
-
- mCollapseButton->setRect(ctrl_rect);
-
- //arrange tab buttons
- //arrange tab buttons
- child_vector_const_iter_t child_it;
- int offset = (sidetray_params.default_button_height+sidetray_params.default_button_margin)*2;
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = *child_it;
-
- ctrl_rect.setLeftTopAndSize(0,
- mButtonsPanel->getRect().getHeight()-offset,
- sidetray_params.default_button_width,
- sidetray_params.default_button_height);
-
- if(mTabButtons.find(sidebar_tab->getName()) == mTabButtons.end())
- continue;
-
- LLButton* btn = mTabButtons[sidebar_tab->getName()];
-
- btn->setRect(ctrl_rect);
- offset+=sidetray_params.default_button_height;
- offset+=sidetray_params.default_button_margin;
-
- btn->setVisible(ctrl_rect.mBottom > 0);
- }
-
- //arrange tabs
- for ( child_vector_t::iterator child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = *child_it;
- sidebar_tab->setShape(getLocalRect());
- }
-
- // The tab buttons should be shown only if there is at least one non-detached tab.
- // Also hide them in mouse-look mode.
- mButtonsPanel->setVisible(hasTabs() && !gAgentCamera.cameraMouselook());
-}
-
-// Detach those tabs that were detached when the viewer exited last time.
-void LLSideTray::detachTabs()
-{
- // copy mTabs because LLSideTray::toggleTabDocked() modifies it.
- child_vector_t tabs = mTabs;
-
- for (child_vector_const_iter_t it = tabs.begin(); it != tabs.end(); ++it)
- {
- LLSideTrayTab* tab = *it;
-
- std::string floater_ctrl_name = LLFloater::getControlName("side_bar_tab", LLSD(tab->getName()));
- std::string vis_ctrl_name = LLFloaterReg::getVisibilityControlName(floater_ctrl_name);
- if (!LLFloater::getControlGroup()->controlExists(vis_ctrl_name)) continue;
-
- bool is_visible = LLFloater::getControlGroup()->getBOOL(vis_ctrl_name);
- if (!is_visible) continue;
-
- llassert(isTabAttached(tab->getName()));
- tab->setDocked(false);
- }
-}
-
-void LLSideTray::collapseSideBar()
-{
- mCollapsed = true;
- // Reset all overlay images, because there is no "selected" tab when the
- // whole side tray is hidden.
- child_vector_const_iter_t it = mTabs.begin();
- for ( ; it != mTabs.end(); ++it )
- {
- LLSideTrayTab* tab = *it;
- std::string name = tab->getName();
- std::map<std::string,LLButton*>::const_iterator btn_it =
- mTabButtons.find(name);
- if (btn_it != mTabButtons.end())
- {
- LLButton* btn = btn_it->second;
- btn->setImageOverlay( tab->mImage );
- }
- }
-
- // OpenClose tab doesn't put its button in mTabButtons
- LLSideTrayTab* openclose_tab = getTab("sidebar_openclose");
- if (openclose_tab)
- {
- mCollapseButton->setImageOverlay( openclose_tab->mImage );
- }
- //mActiveTab->setVisible(FALSE);
- reflectCollapseChange();
- setFocus( FALSE );
-}
-
-void LLSideTray::expandSideBar(bool open_active)
-{
- mCollapsed = false;
- LLSideTrayTab* openclose_tab = getTab("sidebar_openclose");
- if (openclose_tab)
- {
- mCollapseButton->setImageOverlay( openclose_tab->mImageSelected );
- }
-
- if (open_active)
- {
- mActiveTab->onOpen(LLSD());
- }
-
- reflectCollapseChange();
-
-
- std::string name = mActiveTab->getName();
- std::map<std::string,LLButton*>::const_iterator btn_it =
- mTabButtons.find(name);
- if (btn_it != mTabButtons.end())
- {
- LLButton* btn = btn_it->second;
- btn->setImageOverlay( mActiveTab->mImageSelected );
- }
-}
-
-void LLSideTray::highlightFocused()
-{
- /* uncomment in case something change
- if(!mActiveTab)
- return;
- BOOL dependent_has_focus = gFocusMgr.childHasKeyboardFocus(this);
- setBackgroundOpaque( dependent_has_focus );
- mActiveTab->setBackgroundOpaque( dependent_has_focus );
- */
-}
-
-//virtual
-BOOL LLSideTray::handleMouseDown (S32 x, S32 y, MASK mask)
-{
- BOOL ret = LLPanel::handleMouseDown(x,y,mask);
- if(ret)
- setFocus(true);
- return ret;
-}
-
-void LLSideTray::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- LLPanel::reshape(width, height, called_from_parent);
- if(!mActiveTab)
- return;
-
- arrange();
-}
-
-// This is just LLView::findChildView specialized to restrict the search to LLPanels.
-// Optimization for EXT-4068 to avoid searching down to the individual item level
-// when inventories are large.
-LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse)
-{
- for (LLView::child_list_const_iter_t child_it = panel->beginChild();
- child_it != panel->endChild(); ++child_it)
- {
- LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it);
- if (!child_panel)
- continue;
- if (child_panel->getName() == name)
- return child_panel;
- }
- if (recurse)
- {
- for (LLView::child_list_const_iter_t child_it = panel->beginChild();
- child_it != panel->endChild(); ++child_it)
- {
- LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it);
- if (!child_panel)
- continue;
- LLPanel *found_panel = findChildPanel(child_panel,name,recurse);
- if (found_panel)
- {
- return found_panel;
- }
- }
- }
- return NULL;
-}
-
-/**
- * Activate tab with "panel_name" panel
- * if no such tab - return false, otherwise true.
- * TODO* In some cases a pointer to a panel of
- * a specific class may be needed so this method
- * would need to use templates.
- */
-LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& params)
-{
- LLPanel* new_panel = NULL;
-
- // Look up the tab in the list of detached tabs.
- child_vector_const_iter_t child_it;
- for ( child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it)
- {
- new_panel = openChildPanel(*child_it, panel_name, params);
- if (new_panel) break;
- }
-
- // Look up the tab in the list of attached tabs.
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- new_panel = openChildPanel(*child_it, panel_name, params);
- if (new_panel) break;
- }
-
- return new_panel;
-}
-
-bool LLSideTray::hidePanel(const std::string& panel_name)
-{
- bool panelHidden = false;
-
- LLPanel* panelp = getPanel(panel_name);
-
- if (panelp)
- {
- LLView* parentp = panelp->getParent();
-
- // Collapse the side bar if the panel or the panel's parent is an attached tab
- if (isTabAttached(panel_name) || (parentp && isTabAttached(parentp->getName())))
- {
- collapseSideBar();
- panelHidden = true;
- }
- else
- {
- panelHidden = LLFloaterReg::hideInstance("side_bar_tab", panel_name);
-
- if (!panelHidden)
- {
- // Look up the panel in the list of detached tabs.
- for (child_vector_const_iter_t child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it)
- {
- LLPanel *detached_panel = dynamic_cast<LLPanel*>(*child_it);
-
- if (detached_panel)
- {
- // Hide this detached panel if it is a parent of our panel
- if (findChildPanel(detached_panel, panel_name, true) != NULL)
- {
- panelHidden = LLFloaterReg::hideInstance("side_bar_tab", detached_panel->getName());
- break;
- }
- }
- }
- }
- }
- }
-
- return panelHidden;
-}
-
-void LLSideTray::togglePanel(LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params)
-{
- if(!sub_panel)
- return;
-
- // If a panel is visible and attached to Side Tray (has LLSideTray among its ancestors)
- // it should be toggled off by collapsing Side Tray.
- if (sub_panel->isInVisibleChain() && sub_panel->hasAncestor(this))
- {
- LLSideTray::getInstance()->collapseSideBar();
- }
- else
- {
- LLSideTray::getInstance()->showPanel(panel_name, params);
- }
-}
-
-LLPanel* LLSideTray::getPanel(const std::string& panel_name)
-{
- // Look up the panel in the list of detached tabs.
- for ( child_vector_const_iter_t child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it)
- {
- LLPanel *panel = findChildPanel(*child_it,panel_name,true);
- if(panel)
- {
- return panel;
- }
- }
-
- // Look up the panel in the list of attached tabs.
- for ( child_vector_const_iter_t child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLPanel *panel = findChildPanel(*child_it,panel_name,true);
- if(panel)
- {
- return panel;
- }
- }
- return NULL;
-}
-
-LLPanel* LLSideTray::getActivePanel()
-{
- if (mActiveTab && !mCollapsed)
- {
- return mActiveTab->getPanel();
- }
- return NULL;
-}
-
-bool LLSideTray::isPanelActive(const std::string& panel_name)
-{
- LLPanel *panel = getActivePanel();
- if (!panel) return false;
- return (panel->getName() == panel_name);
-}
-
-void LLSideTray::setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater /* = true*/)
-{
- // Lookup tab by name.
- LLSideTrayTab* tab = getTab(tab_name);
- if (!tab)
- { // not a docked tab, look through detached tabs
- for(child_vector_iter_t tab_it = mDetachedTabs.begin(), tab_end_it = mDetachedTabs.end();
- tab_it != tab_end_it;
- ++tab_it)
- {
- if ((*tab_it)->getName() == tab_name)
- {
- tab = *tab_it;
- break;
- }
- }
-
- }
-
- llassert(tab != NULL);
-
- // Toggle its dock state.
- if (tab && tab->isDocked() != dock)
- {
- tab->toggleTabDocked(toggle_floater);
- }
-}
-
-
-void LLSideTray::updateSidetrayVisibility()
-{
- // set visibility of parent container based on collapsed state
- LLView* parent = getParent();
- if (parent)
- {
- bool old_visibility = parent->getVisible();
- bool new_visibility = !mCollapsed && !gAgentCamera.cameraMouselook();
-
- if (old_visibility != new_visibility)
- {
- parent->setVisible(new_visibility);
-
- // Signal change of visible width.
- llinfos << "Visible: " << new_visibility << llendl;
- mVisibleWidthChangeSignal(this, new_visibility);
- }
- }
-}
-
-S32 LLSideTray::getVisibleWidth()
-{
- return (isInVisibleChain() && !mCollapsed) ? getRect().getWidth() : 0;
-}
-
-void LLSideTray::setVisibleWidthChangeCallback(const commit_signal_t::slot_type& cb)
-{
- mVisibleWidthChangeSignal.connect(cb);
-}
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
deleted file mode 100644
index 17158329dc..0000000000
--- a/indra/newview/llsidetray.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/**
- * @file LLSideTray.h
- * @brief SideBar header file
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLSIDETRAY_H_
-#define LL_LLSIDETRAY_H_
-
-#include "llpanel.h"
-#include "string"
-
-class LLAccordionCtrl;
-class LLSideTrayTab;
-
-// Define an interface for side tab button badge values
-class LLSideTrayTabBadgeDriver
-{
-public:
- virtual std::string getBadgeString() const = 0;
-};
-
-// Deal with LLSideTrayTab being opaque. Generic do-nothing cast...
-template <class T>
-T tab_cast(LLSideTrayTab* tab) { return tab; }
-// specialized for implementation in presence of LLSideTrayTab definition
-template <>
-LLPanel* tab_cast<LLPanel*>(LLSideTrayTab* tab);
-
-// added inheritance from LLDestroyClass<LLSideTray> to enable Side Tray perform necessary actions
-// while disconnecting viewer in LLAppViewer::disconnectViewer().
-// LLDestroyClassList::instance().fireCallbacks() calls destroyClass method. See EXT-245.
-class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
-{
- friend class LLUICtrlFactory;
- friend class LLDestroyClass<LLSideTray>;
- friend class LLSideTrayTab;
- friend class LLSideTrayButton;
-public:
-
- LOG_CLASS(LLSideTray);
-
- struct Params
- : public LLInitParam::Block<Params, LLPanel::Params>
- {
- // initial state
- Optional<bool> collapsed;
- Optional<LLUIImage*> tab_btn_image_normal,
- tab_btn_image_selected;
-
- Optional<S32> default_button_width,
- default_button_height,
- default_button_margin;
-
- Params();
- };
-
- static LLSideTray* getInstance ();
- static bool instanceCreated ();
-protected:
- LLSideTray(const Params& params);
- typedef std::vector<LLSideTrayTab*> child_vector_t;
- typedef child_vector_t::iterator child_vector_iter_t;
- typedef child_vector_t::const_iterator child_vector_const_iter_t;
- typedef child_vector_t::reverse_iterator child_vector_reverse_iter_t;
- typedef child_vector_t::const_reverse_iterator child_vector_const_reverse_iter_t;
- typedef std::vector<std::string> tab_order_vector_t;
- typedef tab_order_vector_t::const_iterator tab_order_vector_const_iter_t;
-
-public:
-
- // interface functions
-
- /**
- * Select tab with specific name and set it active
- *
- * @param name Tab to switch to.
- * @param keep_prev_visible Whether to keep the previously selected tab visible.
- */
- bool selectTabByName (const std::string& name, bool keep_prev_visible = false);
-
- /**
- * Select tab with specific index and set it active
- */
- bool selectTabByIndex(size_t index);
-
- /**
- * Activate tab with "panel_name" panel
- * if no such tab - return NULL, otherwise a pointer to the panel
- * Pass params as array, or they may be overwritten(example - params["name"]="nearby")
- */
- LLPanel* showPanel (const std::string& panel_name, const LLSD& params = LLSD());
-
- bool hidePanel (const std::string& panel_name);
-
- /**
- * Toggling Side Tray tab which contains "sub_panel" child of "panel_name" panel.
- * If "sub_panel" is not visible Side Tray is opened to display it,
- * otherwise Side Tray is collapsed.
- * params are passed to "panel_name" panel onOpen().
- */
- void togglePanel (LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params = LLSD());
-
- /*
- * get the panel (don't show it or do anything else with it)
- */
- LLPanel* getPanel (const std::string& panel_name);
- LLPanel* getActivePanel ();
- bool isPanelActive (const std::string& panel_name);
-
- void setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater = true);
-
- /*
- * get the panel of given type T (don't show it or do anything else with it)
- */
- template <typename T>
- T* getPanel(const std::string& panel_name)
- {
- T* panel = dynamic_cast<T*>(getPanel(panel_name));
- if (!panel)
- {
- llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl;
- return NULL;
- }
- return panel;
- }
-
- /*
- * collapse SideBar, hiding visible tab and moving tab buttons
- * to the right corner of the screen
- */
- void collapseSideBar ();
-
- /*
- * expand SideBar
- *
- * @param open_active Whether to call onOpen() for the active tab.
- */
- void expandSideBar(bool open_active = true);
-
-
- /**
- *hightlight if focused. manly copypaste from highlightFocusedFloater
- */
- void highlightFocused();
-
- void setVisible(BOOL visible)
- {
- if (getParent()) getParent()->setVisible(visible);
- }
-
- LLPanel* getButtonsPanel() { return mButtonsPanel; }
-
- bool getCollapsed() { return mCollapsed; }
-
- void setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver);
-
-public:
- virtual ~LLSideTray(){};
-
- virtual BOOL postBuild();
-
- BOOL handleMouseDown (S32 x, S32 y, MASK mask);
-
- void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
-
-
- /**
- * @return side tray width if it's visible and expanded, 0 otherwise.
- *
- * Not that width of the tab buttons is not included.
- *
- * @see setVisibleWidthChangeCallback()
- */
- S32 getVisibleWidth();
-
- void setVisibleWidthChangeCallback(const commit_signal_t::slot_type& cb);
-
- void updateSidetrayVisibility();
-
- void handleLoginComplete();
-
- bool isTabAttached (const std::string& name);
-
-protected:
- bool addChild (LLView* view, S32 tab_group);
- bool removeTab (LLSideTrayTab* tab); // Used to detach tabs temporarily
- bool addTab (LLSideTrayTab* tab); // Used to re-attach tabs
- bool hasTabs ();
-
- const LLSideTrayTab* getActiveTab() const { return mActiveTab; }
- LLSideTrayTab* getTab(const std::string& name);
-
- void createButtons ();
-
- void arrange ();
- void detachTabs ();
- void reflectCollapseChange();
- void processTriState ();
-
- void toggleTabButton (LLSideTrayTab* tab);
-
- LLPanel* openChildPanel (LLSideTrayTab* tab, const std::string& panel_name, const LLSD& params);
-
- void onTabButtonClick(std::string name);
- void onToggleCollapse();
-
-private:
- // Implementation of LLDestroyClass<LLSideTray>
- static void destroyClass()
- {
- // Disable SideTray to avoid crashes. EXT-245
- if (LLSideTray::instanceCreated())
- LLSideTray::getInstance()->setEnabled(FALSE);
- }
-
-private:
- // Since we provide no public way to query mTabs and mDetachedTabs, give
- // LLSideTrayListener friend access.
- friend class LLSideTrayListener;
- LLPanel* mButtonsPanel;
- typedef std::map<std::string,LLButton*> button_map_t;
- button_map_t mTabButtons;
- typedef std::map<std::string,LLSideTrayTabBadgeDriver*> badge_map_t;
- badge_map_t mTabButtonBadgeDrivers;
- child_vector_t mTabs;
- child_vector_t mDetachedTabs;
- tab_order_vector_t mOriginalTabOrder;
- LLSideTrayTab* mActiveTab;
-
- commit_signal_t mVisibleWidthChangeSignal;
-
- LLButton* mCollapseButton;
- bool mCollapsed;
-
- static LLSideTray* sInstance;
-};
-
-#endif
-
diff --git a/indra/newview/llsidetraylistener.cpp b/indra/newview/llsidetraylistener.cpp
deleted file mode 100644
index cd6fa28948..0000000000
--- a/indra/newview/llsidetraylistener.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * @file llsidetraylistener.cpp
- * @author Nat Goodspeed
- * @date 2011-02-15
- * @brief Implementation for llsidetraylistener.
- *
- * $LicenseInfo:firstyear=2011&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2011, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-// Precompiled header
-#include "llviewerprecompiledheaders.h"
-// associated header
-#include "llsidetraylistener.h"
-// STL headers
-// std headers
-// external library headers
-// other Linden headers
-#include "llsidetray.h"
-#include "llsdutil.h"
-
-LLSideTrayListener::LLSideTrayListener(const Getter& getter):
- LLEventAPI("LLSideTray",
- "Operations on side tray (e.g. query state, query tabs)"),
- mGetter(getter)
-{
- add("getCollapsed", "Send on [\"reply\"] an [\"open\"] Boolean",
- &LLSideTrayListener::getCollapsed, LLSDMap("reply", LLSD()));
- add("getTabs",
- "Send on [\"reply\"] a map of tab names and info about them",
- &LLSideTrayListener::getTabs, LLSDMap("reply", LLSD()));
- add("getPanels",
- "Send on [\"reply\"] data about panels available with SideTray.ShowPanel",
- &LLSideTrayListener::getPanels, LLSDMap("reply", LLSD()));
-}
-
-void LLSideTrayListener::getCollapsed(const LLSD& event) const
-{
- sendReply(LLSDMap("open", ! mGetter()->getCollapsed()), event);
-}
-
-void LLSideTrayListener::getTabs(const LLSD& event) const
-{
- LLSD reply;
-
- LLSideTray* tray = mGetter();
- LLSD::Integer ord(0);
- for (LLSideTray::child_list_const_iter_t chi(tray->beginChild()), chend(tray->endChild());
- chi != chend; ++chi, ++ord)
- {
- LLView* child = *chi;
- // How much info is important? Toss in as much as seems reasonable for
- // each tab. But to me, at least for the moment, the most important
- // item is the tab name.
- LLSD info;
- // I like the idea of returning a map keyed by tab name. But as
- // compared to an array of maps, that loses sequence information.
- // Address that by indicating the original order in each map entry.
- info["ord"] = ord;
- info["visible"] = bool(child->getVisible());
- info["enabled"] = bool(child->getEnabled());
- info["available"] = child->isAvailable();
- reply[child->getName()] = info;
- }
-
- sendReply(reply, event);
-}
-
-static LLSD getTabInfo(LLPanel* tab)
-{
- LLSD panels;
- for (LLPanel::tree_iterator_t ti(tab->beginTreeDFS()), tend(tab->endTreeDFS());
- ti != tend; ++ti)
- {
- // *ti is actually an LLView*, which had better not be NULL
- LLView* view(*ti);
- if (! view)
- {
- LL_ERRS("LLSideTrayListener") << "LLSideTrayTab '" << tab->getName()
- << "' has a NULL child LLView*" << LL_ENDL;
- }
-
- // The logic we use to decide what "panel" names to return is heavily
- // based on LLSideTray::showPanel(): the function that actually
- // implements the "SideTray.ShowPanel" operation. showPanel(), in
- // turn, depends on LLSideTray::openChildPanel(): when
- // openChildPanel() returns non-NULL, showPanel() stops searching
- // attached and detached LLSideTrayTab tabs.
-
- // For each LLSideTrayTab, openChildPanel() first calls
- // findChildView(panel_name, true). In other words, panel_name need
- // not be a direct LLSideTrayTab child, it's sought recursively.
- // That's why we use (begin|end)TreeDFS() in this loop.
-
- // But this tree_iterator_t loop will actually traverse every widget
- // in every panel. Returning all those names will not help our caller:
- // passing most such names to openChildPanel() would not do what we
- // want. Even though the code suggests that passing ANY valid
- // side-panel widget name to openChildPanel() will open the tab
- // containing that widget, results could get confusing since followup
- // (onOpen()) logic wouldn't be invoked, and showPanel() wouldn't stop
- // searching because openChildPanel() would return NULL.
-
- // We must filter these LLView items, using logic that (sigh!) mirrors
- // openChildPanel()'s own.
-
- // openChildPanel() returns a non-NULL LLPanel* when either:
- // - the LLView is a direct child of an LLSideTrayPanelContainer
- // - the LLView is itself an LLPanel.
- // But as LLSideTrayPanelContainer can directly contain LLView items
- // that are NOT themselves LLPanels (e.g. "sidebar_me" contains an
- // LLButton called "Jump Right Arrow"), we'd better focus only on
- // LLSideTrayPanelContainer children that are themselves LLPanel
- // items. Which means that the second test completely subsumes the
- // first.
- LLPanel* panel(dynamic_cast<LLPanel*>(view));
- if (panel)
- {
- // Maybe it's overkill to construct an LLSD::Map for each panel, but
- // the possibility remains that we might want to deliver more info
- // about each panel than just its name.
- panels.append(LLSDMap("name", panel->getName()));
- }
- }
-
- return LLSDMap("panels", panels);
-}
-
-void LLSideTrayListener::getPanels(const LLSD& event) const
-{
- LLSD reply;
-
- LLSideTray* tray = mGetter();
- // Iterate through the attached tabs.
- LLSD::Integer ord(0);
- for (LLSideTray::child_vector_t::const_iterator
- ati(tray->mTabs.begin()), atend(tray->mTabs.end());
- ati != atend; ++ati)
- {
- // We don't have access to LLSideTrayTab: the class definition is
- // hidden in llsidetray.cpp. But as LLSideTrayTab isa LLPanel, use the
- // LLPanel API. Unfortunately, without the LLSideTrayTab definition,
- // the compiler doesn't even know this LLSideTrayTab* is an LLPanel*.
- // Persuade it.
- LLPanel* tab(tab_cast<LLPanel*>(*ati));
- reply[tab->getName()] = getTabInfo(tab).with("attached", true).with("ord", ord);
- }
-
- // Now iterate over the detached tabs. These can also be opened via
- // SideTray.ShowPanel.
- ord = 0;
- for (LLSideTray::child_vector_t::const_iterator
- dti(tray->mDetachedTabs.begin()), dtend(tray->mDetachedTabs.end());
- dti != dtend; ++dti)
- {
- LLPanel* tab(tab_cast<LLPanel*>(*dti));
- reply[tab->getName()] = getTabInfo(tab).with("attached", false).with("ord", ord);
- }
-
- sendReply(reply, event);
-}
diff --git a/indra/newview/llsidetraypanelcontainer.cpp b/indra/newview/llsidetraypanelcontainer.cpp
index 214f595772..e340333c2c 100644
--- a/indra/newview/llsidetraypanelcontainer.cpp
+++ b/indra/newview/llsidetraypanelcontainer.cpp
@@ -32,10 +32,10 @@ static LLDefaultChildRegistry::Register<LLSideTrayPanelContainer> r2("panel_cont
std::string LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME = "sub_panel_name";
LLSideTrayPanelContainer::Params::Params()
- : default_panel_name("default_panel_name")
+: default_panel_name("default_panel_name")
{
// Always hide tabs.
- hide_tabs(true);
+ changeDefault(hide_tabs, true);
}
LLSideTrayPanelContainer::LLSideTrayPanelContainer(const Params& p)
@@ -62,6 +62,13 @@ void LLSideTrayPanelContainer::onOpen(const LLSD& key)
getCurrentPanel()->onOpen(key);
}
+void LLSideTrayPanelContainer::openPanel(const std::string& panel_name, const LLSD& key)
+{
+ LLSD combined_key = key;
+ combined_key[PARAM_SUB_PANEL_NAME] = panel_name;
+ onOpen(combined_key);
+}
+
void LLSideTrayPanelContainer::openPreviousPanel()
{
if(!mDefaultPanelName.empty())
diff --git a/indra/newview/llsidetraypanelcontainer.h b/indra/newview/llsidetraypanelcontainer.h
index 14269b002b..93a85ed374 100644
--- a/indra/newview/llsidetraypanelcontainer.h
+++ b/indra/newview/llsidetraypanelcontainer.h
@@ -57,6 +57,11 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
/**
+ * Opens given subpanel.
+ */
+ void openPanel(const std::string& panel_name, const LLSD& key = LLSD::emptyMap());
+
+ /**
* Opens previous panel from panel navigation history.
*/
void openPreviousPanel();
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index 4cf1df1655..a853726dea 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -273,11 +273,11 @@ LLSLURL::LLSLURL(const std::string& slurl)
mRegion = LLURI::unescape(path_array[0].asString());
path_array.erase(0);
- // parse the x, y, z
- if(path_array.size() >= 3)
+ // parse the x, y, and optionally z
+ if(path_array.size() >= 2)
{
- mPosition = LLVector3(path_array);
+ mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
if((F32(mPosition[VX]) < 0.f) ||
(mPosition[VX] > REGION_WIDTH_METERS) ||
(F32(mPosition[VY]) < 0.f) ||
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index f99afa923b..3e16ccf3da 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -47,6 +47,8 @@
#include "llvoavatar.h"
#include "llvolumemgr.h"
#include "lltextureatlas.h"
+#include "llglslshader.h"
+#include "llviewershadermgr.h"
static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling");
static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
@@ -213,7 +215,7 @@ typedef enum
//contact Runitai Linden for a copy of the SL object used to write this table
//basically, you give the table a bitmask of the look-at vector to a node and it
//gives you a triangle fan index array
-static U8 sOcclusionIndices[] =
+static U16 sOcclusionIndices[] =
{
//000
b111, b110, b010, b011, b001, b101, b100, b110,
@@ -250,7 +252,7 @@ U8* get_box_fan_indices_ptr(LLCamera* camera, const LLVector4a& center)
S32 cypher = center.greaterThan(origin).getGatheredBits() & 0x7;
- return sOcclusionIndices+cypher*8;
+ return (U8*) (sOcclusionIndices+cypher*8);
}
@@ -260,7 +262,6 @@ void LLSpatialGroup::buildOcclusion()
{
if (mOcclusionVerts.isNull())
{
-
mOcclusionVerts = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX,
LLVertexBuffer::sUseStreamDraw ? mBufferUsage : 0); //if GL has a hard time with VBOs, don't use them for occlusion culling.
mOcclusionVerts->allocateBuffer(8, 64, true);
@@ -320,7 +321,8 @@ void LLSpatialGroup::buildOcclusion()
}
{
- mOcclusionVerts->setBuffer(0);
+ mOcclusionVerts->flush();
+ LLVertexBuffer::unbind();
}
clearState(LLSpatialGroup::OCCLUSION_DIRTY);
@@ -522,6 +524,11 @@ void LLSpatialGroup::clearDrawMap()
mDrawMap.clear();
}
+BOOL LLSpatialGroup::isHUDGroup()
+{
+ return mSpatialPartition && mSpatialPartition->isHUDPartition() ;
+}
+
BOOL LLSpatialGroup::isRecentlyVisible() const
{
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < LLDrawable::getMinVisFrameRange() ;
@@ -1608,6 +1615,15 @@ void LLSpatialGroup::checkOcclusion()
static LLFastTimer::DeclareTimer FTM_PUSH_OCCLUSION_VERTS("Push Occlusion");
static LLFastTimer::DeclareTimer FTM_SET_OCCLUSION_STATE("Occlusion State");
static LLFastTimer::DeclareTimer FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_ALLOCATE("Allocate");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_BUILD("Build");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_BEGIN_QUERY("Begin Query");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_END_QUERY("End Query");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_SET_BUFFER("Set Buffer");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW_WATER("Draw Water");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW("Draw");
+
+
void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
@@ -1631,11 +1647,13 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
if (!mOcclusionQuery[LLViewerCamera::sCurCameraID])
{
+ LLFastTimer t(FTM_OCCLUSION_ALLOCATE);
mOcclusionQuery[LLViewerCamera::sCurCameraID] = sQueryPool.allocate();
}
if (mOcclusionVerts.isNull() || isState(LLSpatialGroup::OCCLUSION_DIRTY))
{
+ LLFastTimer t(FTM_OCCLUSION_BUILD);
buildOcclusion();
}
@@ -1660,12 +1678,21 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
LLFastTimer t(FTM_PUSH_OCCLUSION_VERTS);
- glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+
+ {
+ LLFastTimer t(FTM_OCCLUSION_BEGIN_QUERY);
+ glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+ }
- mOcclusionVerts->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ {
+ LLFastTimer t(FTM_OCCLUSION_SET_BUFFER);
+ mOcclusionVerts->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ }
if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER)
{
+ LLFastTimer t(FTM_OCCLUSION_DRAW_WATER);
+
LLGLSquashToFarClip squash(glh_get_current_projection(), 1);
if (camera->getOrigin().isExactlyZero())
{ //origin is invalid, draw entire box
@@ -1679,6 +1706,7 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
}
else
{
+ LLFastTimer t(FTM_OCCLUSION_DRAW);
if (camera->getOrigin().isExactlyZero())
{ //origin is invalid, draw entire box
mOcclusionVerts->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0);
@@ -1690,7 +1718,11 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
}
}
- glEndQueryARB(mode);
+
+ {
+ LLFastTimer t(FTM_OCCLUSION_END_QUERY);
+ glEndQueryARB(mode);
+ }
}
}
@@ -2410,7 +2442,7 @@ void pushVerts(LLFace* face, U32 mask)
LLVertexBuffer* buffer = face->getVertexBuffer();
- if (buffer)
+ if (buffer && (face->getGeomCount() >= 3))
{
buffer->setBuffer(mask);
U16 start = face->getGeomStart();
@@ -2435,8 +2467,7 @@ void pushVerts(LLVolume* volume)
for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
{
const LLVolumeFace& face = volume->getVolumeFace(i);
- glVertexPointer(3, GL_FLOAT, 16, face.mPositions);
- glDrawElements(GL_TRIANGLES, face.mNumIndices, GL_UNSIGNED_SHORT, face.mIndices);
+ LLVertexBuffer::drawElements(LLRender::TRIANGLES, face.mPositions, NULL, face.mNumIndices, face.mIndices);
}
}
@@ -2445,7 +2476,7 @@ void pushBufferVerts(LLVertexBuffer* buffer, U32 mask)
if (buffer)
{
buffer->setBuffer(mask);
- buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getRequestedVerts()-1, buffer->getRequestedIndices(), 0);
+ buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
}
}
@@ -2502,7 +2533,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
{
params = *j;
LLRenderPass::applyModelMatrix(*params);
- glColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f);
+ gGL.diffuseColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f);
params->mVertexBuffer->setBuffer(mask);
params->mVertexBuffer->drawRange(params->mParticle ? LLRender::POINTS : LLRender::TRIANGLES,
params->mStart, params->mEnd, params->mCount, params->mOffset);
@@ -2517,7 +2548,7 @@ void renderOctree(LLSpatialGroup* group)
//coded by buffer usage and activity
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
LLVector4 col;
- /*if (group->mBuilt > 0.f)
+ if (group->mBuilt > 0.f)
{
group->mBuilt -= 2.f * gFrameIntervalSeconds;
if (group->mBufferUsage == GL_STATIC_DRAW_ARB)
@@ -2535,7 +2566,7 @@ void renderOctree(LLSpatialGroup* group)
LLGLDepthTest gl_depth(FALSE, FALSE);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- gGL.color4f(1,0,0,group->mBuilt);
+ gGL.diffuseColor4f(1,0,0,group->mBuilt);
gGL.flush();
glLineWidth(5.f);
drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
@@ -2547,9 +2578,9 @@ void renderOctree(LLSpatialGroup* group)
LLDrawable* drawable = *i;
if (!group->mSpatialPartition->isBridge())
{
- glPushMatrix();
+ gGL.pushMatrix();
LLVector3 trans = drawable->getRegion()->getOriginAgent();
- glTranslatef(trans.mV[0], trans.mV[1], trans.mV[2]);
+ gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
}
for (S32 j = 0; j < drawable->getNumFaces(); j++)
@@ -2559,11 +2590,11 @@ void renderOctree(LLSpatialGroup* group)
{
if (gFrameTimeSeconds - face->mLastUpdateTime < 0.5f)
{
- glColor4f(0, 1, 0, group->mBuilt);
+ gGL.diffuseColor4f(0, 1, 0, group->mBuilt);
}
else if (gFrameTimeSeconds - face->mLastMoveTime < 0.5f)
{
- glColor4f(1, 0, 0, group->mBuilt);
+ gGL.diffuseColor4f(1, 0, 0, group->mBuilt);
}
else
{
@@ -2579,14 +2610,14 @@ void renderOctree(LLSpatialGroup* group)
if (!group->mSpatialPartition->isBridge())
{
- glPopMatrix();
+ gGL.popMatrix();
}
}
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
}
}
- else*/
+ else
{
if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->getData().empty()
&& group->mSpatialPartition->mRenderByGroup)
@@ -2599,7 +2630,7 @@ void renderOctree(LLSpatialGroup* group)
}
}
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
LLVector4a fudge;
fudge.splat(0.001f);
LLVector4a size = group->mObjectBounds[1];
@@ -2616,16 +2647,16 @@ void renderOctree(LLSpatialGroup* group)
//if (group->mBuilt <= 0.f)
{
//draw opaque outline
- //gGL.color4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
+ //gGL.diffuseColor4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
//drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
drawBoxOutline(group->mBounds[0],group->mBounds[1]);
//draw bounding box for draw info
/*if (group->mSpatialPartition->mRenderByGroup)
{
- gGL.color4f(1.0f, 0.75f, 0.25f, 0.6f);
+ gGL.diffuseColor4f(1.0f, 0.75f, 0.25f, 0.6f);
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
@@ -2644,7 +2675,7 @@ void renderOctree(LLSpatialGroup* group)
}
// LLSpatialGroup::OctreeNode* node = group->mOctreeNode;
-// gGL.color4f(0,1,0,1);
+// gGL.diffuseColor4f(0,1,0,1);
// drawBoxOutline(LLVector3(node->getCenter()), LLVector3(node->getSize()));
}
@@ -2657,11 +2688,12 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
BOOL render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() &&
!group->getData().empty();
+
if (render_objects)
{
LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER);
- glColor4f(0, 0.5f, 0, 0.5f);
- gGL.color4f(0, 0.5f, 0, 0.5f);
+ gGL.diffuseColor4f(0, 0.5f, 0, 0.5f);
+ gGL.diffuseColor4f(0, 0.5f, 0, 0.5f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
@@ -2670,8 +2702,8 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
if (render_objects)
{
- glColor4f(0.f, 0.5f, 0.f,1.f);
- gGL.color4f(0.f, 0.5f, 0.f, 1.f);
+ gGL.diffuseColor4f(0.f, 0.5f, 0.f,1.f);
+ gGL.diffuseColor4f(0.f, 0.5f, 0.f, 1.f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
@@ -2679,8 +2711,8 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
if (render_objects)
{
- glColor4f(0.f, 0.75f, 0.f,0.5f);
- gGL.color4f(0.f, 0.75f, 0.f, 0.5f);
+ gGL.diffuseColor4f(0.f, 0.75f, 0.f,0.5f);
+ gGL.diffuseColor4f(0.f, 0.75f, 0.f, 0.5f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
/*else if (camera && group->mOcclusionVerts.notNull())
@@ -2688,11 +2720,11 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
LLVertexBuffer::unbind();
group->mOcclusionVerts->setBuffer(LLVertexBuffer::MAP_VERTEX);
- glColor4f(1.0f, 0.f, 0.f, 0.5f);
+ gGL.diffuseColor4f(1.0f, 0.f, 0.f, 0.5f);
group->mOcclusionVerts->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, group->mBounds[0]));
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glColor4f(1.0f, 1.f, 1.f, 1.0f);
+ gGL.diffuseColor4f(1.0f, 1.f, 1.f, 1.0f);
group->mOcclusionVerts->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, get_box_fan_indices(camera, group->mBounds[0]));
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}*/
@@ -2701,7 +2733,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
void renderCrossHairs(LLVector3 position, F32 size, LLColor4 color)
{
- gGL.color4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
gGL.begin(LLRender::LINES);
{
gGL.vertex3fv((position - LLVector3(size, 0.f, 0.f)).mV);
@@ -2725,23 +2757,23 @@ void renderUpdateType(LLDrawable* drawablep)
switch (vobj->getLastUpdateType())
{
case OUT_FULL:
- glColor4f(0,1,0,0.5f);
+ gGL.diffuseColor4f(0,1,0,0.5f);
break;
case OUT_TERSE_IMPROVED:
- glColor4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
break;
case OUT_FULL_COMPRESSED:
if (vobj->getLastUpdateCached())
{
- glColor4f(1,0,0,0.5f);
+ gGL.diffuseColor4f(1,0,0,0.5f);
}
else
{
- glColor4f(1,1,0,0.5f);
+ gGL.diffuseColor4f(1,1,0,0.5f);
}
break;
case OUT_FULL_CACHED:
- glColor4f(0,0,1,0.5f);
+ gGL.diffuseColor4f(0,0,1,0.5f);
break;
default:
llwarns << "Unknown update_type " << vobj->getLastUpdateType() << llendl;
@@ -2757,6 +2789,115 @@ void renderUpdateType(LLDrawable* drawablep)
}
}
+void renderComplexityDisplay(LLDrawable* drawablep)
+{
+ LLViewerObject* vobj = drawablep->getVObj();
+ if (!vobj)
+ {
+ return;
+ }
+
+ LLVOVolume *voVol = dynamic_cast<LLVOVolume*>(vobj);
+
+ if (!voVol)
+ {
+ return;
+ }
+
+ if (!voVol->isRoot())
+ {
+ return;
+ }
+
+ LLVOVolume::texture_cost_t textures;
+ F32 cost = (F32) voVol->getRenderCost(textures);
+
+ // add any child volumes
+ LLViewerObject::const_child_list_t children = voVol->getChildren();
+ for (LLViewerObject::const_child_list_t::const_iterator iter = children.begin(); iter != children.end(); ++iter)
+ {
+ const LLViewerObject *child = *iter;
+ const LLVOVolume *child_volume = dynamic_cast<const LLVOVolume*>(child);
+ if (child_volume)
+ {
+ cost += child_volume->getRenderCost(textures);
+ }
+ }
+
+ // add texture cost
+ for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ {
+ // add the cost of each individual texture in the linkset
+ cost += iter->second;
+ }
+
+ F32 cost_max = (F32) LLVOVolume::getRenderComplexityMax();
+
+
+
+ // allow user to set a static color scale
+ if (gSavedSettings.getS32("RenderComplexityStaticMax") > 0)
+ {
+ cost_max = gSavedSettings.getS32("RenderComplexityStaticMax");
+ }
+
+ F32 cost_ratio = cost / cost_max;
+
+ // cap cost ratio at 1.0f in case cost_max is at a low threshold
+ cost_ratio = cost_ratio > 1.0f ? 1.0f : cost_ratio;
+
+ LLGLEnable blend(GL_BLEND);
+
+ LLColor4 color;
+ const LLColor4 color_min = gSavedSettings.getColor4("RenderComplexityColorMin");
+ const LLColor4 color_mid = gSavedSettings.getColor4("RenderComplexityColorMid");
+ const LLColor4 color_max = gSavedSettings.getColor4("RenderComplexityColorMax");
+
+ if (cost_ratio < 0.5f)
+ {
+ color = color_min * (1 - cost_ratio * 2) + color_mid * (cost_ratio * 2);
+ }
+ else
+ {
+ color = color_mid * (1 - (cost_ratio - 0.5) * 2) + color_max * ((cost_ratio - 0.5) * 2);
+ }
+
+ LLSD color_val = color.getValue();
+
+ // don't highlight objects below the threshold
+ if (cost > gSavedSettings.getS32("RenderComplexityThreshold"))
+ {
+ glColor4f(color[0],color[1],color[2],0.5f);
+
+
+ S32 num_faces = drawablep->getNumFaces();
+ if (num_faces)
+ {
+ for (S32 i = 0; i < num_faces; ++i)
+ {
+ pushVerts(drawablep->getFace(i), LLVertexBuffer::MAP_VERTEX);
+ }
+ }
+ LLViewerObject::const_child_list_t children = voVol->getChildren();
+ for (LLViewerObject::const_child_list_t::const_iterator iter = children.begin(); iter != children.end(); ++iter)
+ {
+ const LLViewerObject *child = *iter;
+ if (child)
+ {
+ num_faces = child->getNumFaces();
+ if (num_faces)
+ {
+ for (S32 i = 0; i < num_faces; ++i)
+ {
+ pushVerts(child->mDrawable->getFace(i), LLVertexBuffer::MAP_VERTEX);
+ }
+ }
+ }
+ }
+ }
+
+ voVol->setDebugText(llformat("%4.0f", cost));
+}
void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
{
@@ -2764,17 +2905,17 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
{
if (drawable->isSpatialBridge())
{
- gGL.color4f(1,0.5f,0,1);
+ gGL.diffuseColor4f(1,0.5f,0,1);
}
else if (drawable->getVOVolume())
{
if (drawable->isRoot())
{
- gGL.color4f(1,1,0,1);
+ gGL.diffuseColor4f(1,1,0,1);
}
else
{
- gGL.color4f(0,1,0,1);
+ gGL.diffuseColor4f(0,1,0,1);
}
}
else if (drawable->getVObj())
@@ -2782,30 +2923,30 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
switch (drawable->getVObj()->getPCode())
{
case LLViewerObject::LL_VO_SURFACE_PATCH:
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
break;
case LLViewerObject::LL_VO_CLOUDS:
// no longer used
break;
case LLViewerObject::LL_VO_PART_GROUP:
case LLViewerObject::LL_VO_HUD_PART_GROUP:
- gGL.color4f(0,0,1,1);
+ gGL.diffuseColor4f(0,0,1,1);
break;
case LLViewerObject::LL_VO_VOID_WATER:
case LLViewerObject::LL_VO_WATER:
- gGL.color4f(0,0.5f,1,1);
+ gGL.diffuseColor4f(0,0.5f,1,1);
break;
case LL_PCODE_LEGACY_TREE:
- gGL.color4f(0,0.5f,0,1);
+ gGL.diffuseColor4f(0,0.5f,0,1);
break;
default:
- gGL.color4f(1,0,1,1);
+ gGL.diffuseColor4f(1,0,1,1);
break;
}
}
else
{
- gGL.color4f(1,0,0,1);
+ gGL.diffuseColor4f(1,0,0,1);
}
}
@@ -2861,7 +3002,7 @@ void renderNormals(LLDrawable* drawablep)
{
LLVolume* volume = vol->getVolume();
gGL.pushMatrix();
- glMultMatrixf((F32*) vol->getRelativeXform().mMatrix);
+ gGL.multMatrix((F32*) vol->getRelativeXform().mMatrix);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -2871,16 +3012,15 @@ void renderNormals(LLDrawable* drawablep)
{
const LLVolumeFace& face = volume->getVolumeFace(i);
- gGL.begin(LLRender::LINES);
-
for (S32 j = 0; j < face.mNumVertices; ++j)
{
+ gGL.begin(LLRender::LINES);
LLVector4a n,p;
n.setMul(face.mNormals[j], scale);
p.setAdd(face.mPositions[j], n);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
gGL.vertex3fv(face.mPositions[j].getF32ptr());
gGL.vertex3fv(p.getF32ptr());
@@ -2889,13 +3029,12 @@ void renderNormals(LLDrawable* drawablep)
n.setMul(face.mBinormals[j], scale);
p.setAdd(face.mPositions[j], n);
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
gGL.vertex3fv(face.mPositions[j].getF32ptr());
gGL.vertex3fv(p.getF32ptr());
}
+ gGL.end();
}
-
- gGL.end();
}
gGL.popMatrix();
@@ -2935,33 +3074,33 @@ void renderMeshBaseHull(LLVOVolume* volume, U32 data_mask, LLColor4& color, LLCo
{
if (!decomp->mBaseHullMesh.empty())
{
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mBaseHullMesh.mPositions, decomp->mBaseHullMesh.mNormals);
}
else
{
gMeshRepo.buildPhysicsMesh(*decomp);
- gGL.color3f(0,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
drawBoxOutline(center, size);
}
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor3f(1,0,1);
drawBoxOutline(center, size);
}
}
void render_hull(LLModel::PhysicsMesh& mesh, const LLColor4& color, const LLColor4& line_color)
{
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, mesh.mPositions, mesh.mNormals);
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glPolygonOffset(3.f, 3.f);
glLineWidth(3.f);
- glColor4fv(line_color.mV);
+ gGL.diffuseColor4fv(line_color.mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, mesh.mPositions, mesh.mNormals);
glLineWidth(1.f);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
@@ -3015,7 +3154,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
LLVector3 size(0.25f,0.25f,0.25f);
gGL.pushMatrix();
- glMultMatrixf((F32*) volume->getRelativeXform().mMatrix);
+ gGL.multMatrix((F32*) volume->getRelativeXform().mMatrix);
if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::USER_MESH)
{
@@ -3043,11 +3182,11 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
else if (!decomp->mPhysicsShapeMesh.empty())
{
//decomp has physics mesh, render that mesh
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glColor4fv(line_color.mV);
+ gGL.diffuseColor4fv(line_color.mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, decomp->mPhysicsShapeMesh.mPositions, decomp->mPhysicsShapeMesh.mNormals);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
@@ -3064,7 +3203,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else
{
- gGL.color3f(1,1,0);
+ gGL.diffuseColor3f(1,1,0);
drawBoxOutline(center, size);
}
}
@@ -3075,7 +3214,6 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
{
renderMeshBaseHull(volume, data_mask, color, line_color);
}
-#if LL_WINDOWS
else
{
LLVolumeParams volume_params = volume->getVolume()->getParams();
@@ -3173,25 +3311,26 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glColor4fv(line_color.mV);
+ gGL.diffuseColor4fv(line_color.mV);
LLVertexBuffer::unbind();
- glVertexPointer(3, GL_FLOAT, 16, phys_volume->mHullPoints);
- glDrawElements(GL_TRIANGLES, phys_volume->mNumHullIndices, GL_UNSIGNED_SHORT, phys_volume->mHullIndices);
+ llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShader != 0);
+
+ LLVertexBuffer::drawElements(LLRender::TRIANGLES, phys_volume->mHullPoints, NULL, phys_volume->mNumHullIndices, phys_volume->mHullIndices);
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- glDrawElements(GL_TRIANGLES, phys_volume->mNumHullIndices, GL_UNSIGNED_SHORT, phys_volume->mHullIndices);
+ LLVertexBuffer::drawElements(LLRender::TRIANGLES, phys_volume->mHullPoints, NULL, phys_volume->mNumHullIndices, phys_volume->mHullIndices);
+
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor4f(1,0,1,1);
drawBoxOutline(center, size);
}
LLPrimitive::sVolumeManager->unrefVolume(phys_volume);
}
-#endif //LL_WINDOWS
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::BOX)
{
@@ -3200,12 +3339,12 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
LLVector3 vscale = volume->getScale()*2.f;
scale.set(scale[0]/vscale[0], scale[1]/vscale[1], scale[2]/vscale[2]);
- gGL.color4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
drawBox(center, scale);
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::SPHERE)
{
- LLVolumeParams volume_params;
+ /*LLVolumeParams volume_params;
volume_params.setType( LL_PCODE_PROFILE_CIRCLE_HALF, LL_PCODE_PATH_CIRCLE );
volume_params.setBeginAndEndS( 0.f, 1.f );
volume_params.setBeginAndEndT( 0.f, 1.f );
@@ -3213,9 +3352,9 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
volume_params.setShear ( 0, 0 );
LLVolume* sphere = LLPrimitive::sVolumeManager->refVolume(volume_params, 3);
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
pushVerts(sphere);
- LLPrimitive::sVolumeManager->unrefVolume(sphere);
+ LLPrimitive::sVolumeManager->unrefVolume(sphere);*/
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::CYLINDER)
{
@@ -3227,7 +3366,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
volume_params.setShear ( 0, 0 );
LLVolume* cylinder = LLPrimitive::sVolumeManager->refVolume(volume_params, 3);
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
pushVerts(cylinder);
LLPrimitive::sVolumeManager->unrefVolume(cylinder);
}
@@ -3239,10 +3378,10 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
LLVolume* phys_volume = LLPrimitive::sVolumeManager->refVolume(volume_params, detail);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glColor4fv(line_color.mV);
+ gGL.diffuseColor4fv(line_color.mV);
pushVerts(phys_volume);
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
pushVerts(phys_volume);
LLPrimitive::sVolumeManager->unrefVolume(phys_volume);
@@ -3257,19 +3396,20 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
if (phys_volume->mHullPoints && phys_volume->mHullIndices)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-
+ llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShader != 0);
LLVertexBuffer::unbind();
glVertexPointer(3, GL_FLOAT, 16, phys_volume->mHullPoints);
- glColor4fv(line_color.mV);
+ gGL.diffuseColor4fv(line_color.mV);
+ gGL.syncMatrices();
glDrawElements(GL_TRIANGLES, phys_volume->mNumHullIndices, GL_UNSIGNED_SHORT, phys_volume->mHullIndices);
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glDrawElements(GL_TRIANGLES, phys_volume->mNumHullIndices, GL_UNSIGNED_SHORT, phys_volume->mHullIndices);
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor3f(1,0,1);
drawBoxOutline(center, size);
gMeshRepo.buildHull(volume_params, detail);
}
@@ -3285,15 +3425,6 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
gGL.popMatrix();
-
- /*{ //analytical shape, just push visual rep.
- glColor3fv(color.mV);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- pushVerts(drawable, data_mask);
- glColor4fv(color.mV);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- pushVerts(drawable, data_mask);
- }*/
}
void renderPhysicsShapes(LLSpatialGroup* group)
@@ -3308,7 +3439,7 @@ void renderPhysicsShapes(LLSpatialGroup* group)
{
gGL.pushMatrix();
LLVector3 trans = drawable->getRegion()->getOriginAgent();
- glTranslatef(trans.mV[0], trans.mV[1], trans.mV[2]);
+ gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
renderPhysicsShape(drawable, volume);
gGL.popMatrix();
}
@@ -3332,12 +3463,12 @@ void renderPhysicsShapes(LLSpatialGroup* group)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
- glColor3f(0.2f, 0.5f, 0.3f);
- buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0);
+ gGL.diffuseColor3f(0.2f, 0.5f, 0.3f);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
- glColor3f(0.2f, 1.f, 0.3f);
+ gGL.diffuseColor3f(0.2f, 1.f, 0.3f);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
}
}
}
@@ -3374,11 +3505,11 @@ void renderTexturePriority(LLDrawable* drawable)
F32 t = vsize/sLastMaxTexPriority;
LLVector4 col = lerp(cold, hot, t);
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
}
//else
//{
- // gGL.color4f(1,0,1,1);
+ // gGL.diffuseColor4f(1,0,1,1);
//}
LLVector4a center;
@@ -3397,7 +3528,7 @@ void renderTexturePriority(LLDrawable* drawable)
LLVector4 col = lerp(boost_cold, boost_hot, t);
LLGLEnable blend_on(GL_BLEND);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE);
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
drawBox(center, size);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}*/
@@ -3410,7 +3541,7 @@ void renderPoints(LLDrawable* drawablep)
if (drawablep->getNumFaces())
{
gGL.begin(LLRender::POINTS);
- gGL.color3f(1,1,1);
+ gGL.diffuseColor3f(1,1,1);
for (S32 i = 0; i < drawablep->getNumFaces(); i++)
{
gGL.vertex3fv(drawablep->getFace(i)->mCenterLocal.mV);
@@ -3427,7 +3558,7 @@ void renderTextureAnim(LLDrawInfo* params)
}
LLGLEnable blend(GL_BLEND);
- glColor4f(1,1,0,0.5f);
+ gGL.diffuseColor4f(1,1,0,0.5f);
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
@@ -3435,7 +3566,7 @@ void renderBatchSize(LLDrawInfo* params)
{
LLGLEnable offset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.f, 1.f);
- glColor3ubv((GLubyte*) &(params->mDebugColor));
+ gGL.diffuseColor4ubv((GLubyte*) &(params->mDebugColor));
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
@@ -3453,22 +3584,22 @@ void renderShadowFrusta(LLDrawInfo* params)
if (gPipeline.mShadowCamera[4].AABBInFrustum(center, size))
{
- glColor3f(1,0,0);
+ gGL.diffuseColor3f(1,0,0);
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
if (gPipeline.mShadowCamera[5].AABBInFrustum(center, size))
{
- glColor3f(0,1,0);
+ gGL.diffuseColor3f(0,1,0);
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
if (gPipeline.mShadowCamera[6].AABBInFrustum(center, size))
{
- glColor3f(0,0,1);
+ gGL.diffuseColor3f(0,0,1);
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
if (gPipeline.mShadowCamera[7].AABBInFrustum(center, size))
{
- glColor3f(1,0,1);
+ gGL.diffuseColor3f(1,0,1);
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
@@ -3486,7 +3617,7 @@ void renderLights(LLDrawable* drawablep)
if (drawablep->getNumFaces())
{
LLGLEnable blend(GL_BLEND);
- glColor4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
for (S32 i = 0; i < drawablep->getNumFaces(); i++)
{
@@ -3504,11 +3635,11 @@ void renderLights(LLDrawable* drawablep)
{
LLGLDepthTest depth(GL_FALSE, GL_TRUE);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
drawBoxOutline(pos, size);
}
- gGL.color4f(1,1,0,1);
+ gGL.diffuseColor4f(1,1,0,1);
F32 rad = drawablep->getVOVolume()->getLightRadius();
drawBoxOutline(pos, LLVector4a(rad));
}
@@ -3533,13 +3664,13 @@ public:
if (branch->getData().empty())
{
- gGL.color3f(1.f,0.2f,0.f);
+ gGL.diffuseColor3f(1.f,0.2f,0.f);
center.set(branch->getCenter().getF32ptr());
size.set(branch->getSize().getF32ptr());
}
else
{
- gGL.color3f(0.75f, 1.f, 0.f);
+ gGL.diffuseColor3f(0.75f, 1.f, 0.f);
center.set(vl->mBounds[0].getF32ptr());
size.set(vl->mBounds[1].getF32ptr());
}
@@ -3552,11 +3683,11 @@ public:
if (i == 1)
{
- gGL.color4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
}
else
{
- gGL.color4f(0,0.5f,0.5f, 0.25f);
+ gGL.diffuseColor4f(0,0.5f,0.5f, 0.25f);
drawBoxOutline(center, size);
}
@@ -3593,7 +3724,7 @@ void renderRaycast(LLDrawable* drawablep)
if (drawablep->getNumFaces())
{
LLGLEnable blend(GL_BLEND);
- gGL.color4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
if (drawablep->getVOVolume())
{
@@ -3624,8 +3755,8 @@ void renderRaycast(LLDrawable* drawablep)
}
gGL.pushMatrix();
- glTranslatef(trans.mV[0], trans.mV[1], trans.mV[2]);
- glMultMatrixf((F32*) vobj->getRelativeXform().mMatrix);
+ gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
+ gGL.multMatrix((F32*) vobj->getRelativeXform().mMatrix);
LLVector3 start, end;
if (transform)
@@ -3654,8 +3785,9 @@ void renderRaycast(LLDrawable* drawablep)
{
//render face positions
LLVertexBuffer::unbind();
- glColor4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
glVertexPointer(3, GL_FLOAT, sizeof(LLVector4a), face.mPositions);
+ gGL.syncMatrices();
glDrawElements(GL_TRIANGLES, face.mNumIndices, GL_UNSIGNED_SHORT, face.mIndices);
}
@@ -3678,23 +3810,23 @@ void renderRaycast(LLDrawable* drawablep)
if (drawablep->getVObj() == gDebugRaycastObject)
{
// draw intersection point
- glPushMatrix();
- glLoadMatrixd(gGLModelView);
+ gGL.pushMatrix();
+ gGL.loadMatrix(gGLModelView);
LLVector3 translate = gDebugRaycastIntersection;
- glTranslatef(translate.mV[0], translate.mV[1], translate.mV[2]);
+ gGL.translatef(translate.mV[0], translate.mV[1], translate.mV[2]);
LLCoordFrame orient;
orient.lookDir(gDebugRaycastNormal, gDebugRaycastBinormal);
LLMatrix4 rotation;
orient.getRotMatrixToParent(rotation);
- glMultMatrixf((float*)rotation.mMatrix);
+ gGL.multMatrix((float*)rotation.mMatrix);
- gGL.color4f(1,0,0,0.5f);
+ gGL.diffuseColor4f(1,0,0,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.1f, 0.022f, 0.022f));
- gGL.color4f(0,1,0,0.5f);
+ gGL.diffuseColor4f(0,1,0,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.021f, 0.1f, 0.021f));
- gGL.color4f(0,0,1,0.5f);
+ gGL.diffuseColor4f(0,0,1,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.02f, 0.02f, 0.1f));
- glPopMatrix();
+ gGL.popMatrix();
// draw bounding box of prim
const LLVector4a* ext = drawablep->getSpatialExtents();
@@ -3707,7 +3839,7 @@ void renderRaycast(LLDrawable* drawablep)
size.mul(0.5f);
LLGLDepthTest depth(GL_FALSE, GL_TRUE);
- gGL.color4f(0,0.5f,0.5f,1);
+ gGL.diffuseColor4f(0,0.5f,0.5f,1);
drawBoxOutline(pos, size);
}
}
@@ -3769,14 +3901,14 @@ public:
group->rebuildMesh();
gGL.flush();
- glPushMatrix();
+ gGL.pushMatrix();
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
renderVisibility(group, mCamera);
stop_glerror();
gGLLastMatrix = NULL;
- glPopMatrix();
- gGL.color4f(1,1,1,1);
+ gGL.popMatrix();
+ gGL.diffuseColor4f(1,1,1,1);
}
}
}
@@ -3800,7 +3932,7 @@ public:
{
if (!group->getData().empty())
{
- gGL.color3f(0,0,1);
+ gGL.diffuseColor3f(0,0,1);
drawBoxOutline(group->mObjectBounds[0],
group->mObjectBounds[1]);
}
@@ -3809,7 +3941,7 @@ public:
for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i)
{
LLDrawable* drawable = *i;
-
+
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES))
{
renderBoundingBox(drawable);
@@ -3824,7 +3956,7 @@ public:
{
if (drawable->isState(LLDrawable::IN_REBUILD_Q2))
{
- gGL.color4f(0.6f, 0.6f, 0.1f, 1.f);
+ gGL.diffuseColor4f(0.6f, 0.6f, 0.1f, 1.f);
const LLVector4a* ext = drawable->getSpatialExtents();
LLVector4a center;
center.setAdd(ext[0], ext[1]);
@@ -3859,6 +3991,10 @@ public:
{
renderUpdateType(drawable);
}
+ if(gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RENDER_COMPLEXITY))
+ {
+ renderComplexityDisplay(drawable);
+ }
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(drawable->getVObj().get());
@@ -4107,11 +4243,17 @@ void LLSpatialPartition::renderDebug()
LLPipeline::RENDER_DEBUG_AVATAR_VOLUME |
LLPipeline::RENDER_DEBUG_AGENT_TARGET |
//LLPipeline::RENDER_DEBUG_BUILD_QUEUE |
- LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
+ LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA |
+ LLPipeline::RENDER_DEBUG_RENDER_COMPLEXITY))
{
return;
}
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.bind();
+ }
+
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
{
//sLastMaxTexPriority = lerp(sLastMaxTexPriority, sCurMaxTexPriority, gFrameIntervalSeconds);
@@ -4140,11 +4282,16 @@ void LLSpatialPartition::renderDebug()
LLOctreeRenderNonOccluded render_debug(camera);
render_debug.traverse(mOctree);
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.unbind();
+ }
}
void LLSpatialGroup::drawObjectBox(LLColor4 col)
{
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
LLVector4a size;
size = mObjectBounds[1];
size.mul(1.01f);
@@ -4152,6 +4299,10 @@ void LLSpatialGroup::drawObjectBox(LLColor4 col)
drawBox(mObjectBounds[0], size);
}
+bool LLSpatialPartition::isHUDPartition()
+{
+ return mPartitionType == LLViewerRegion::PARTITION_HUD ;
+}
BOOL LLSpatialPartition::isVisible(const LLVector3& v)
{
@@ -4245,7 +4396,7 @@ public:
LLVector3 local_start = mStart;
LLVector3 local_end = mEnd;
- if (!gPipeline.hasRenderType(drawable->getRenderType()) || !drawable->isVisible())
+ if (!drawable || !gPipeline.hasRenderType(drawable->getRenderType()) || !drawable->isVisible())
{
return false;
}
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 54d5d36f6e..f0c8a372ee 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -93,7 +93,6 @@ public:
LLPointer<LLViewerTexture> mTexture;
std::vector<LLPointer<LLViewerTexture> > mTextureList;
- LLColor4U mGlowColor;
S32 mDebugColor;
const LLMatrix4* mTextureMatrix;
const LLMatrix4* mModelMatrix;
@@ -282,6 +281,7 @@ public:
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
+ BOOL isHUDGroup() ;
BOOL isDead() { return isState(DEAD); }
BOOL isState(U32 state) const;
BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; }
@@ -470,6 +470,7 @@ public:
S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results = NULL, BOOL for_select = FALSE); // Cull on arbitrary frustum
BOOL isVisible(const LLVector3& v);
+ bool isHUDPartition() ;
virtual LLSpatialBridge* asBridge() { return NULL; }
virtual BOOL isBridge() { return asBridge() != NULL; }
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
deleted file mode 100644
index d3e96f8dfb..0000000000
--- a/indra/newview/llspeakbutton.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
-* @file llspeakbutton.cpp
-* @brief LLSpeakButton class implementation
-*
-* $LicenseInfo:firstyear=2002&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-
-#include "llviewerprecompiledheaders.h" // must be first include
-
-#include "llbutton.h"
-#include "llfloaterreg.h"
-
-#include "llagent.h"
-#include "llbottomtray.h"
-#include "llcallfloater.h"
-#include "lloutputmonitorctrl.h"
-#include "lltransientfloatermgr.h"
-
-#include "llspeakbutton.h"
-
-#include "llbottomtray.h"
-#include "llfirstuse.h"
-
-static LLDefaultChildRegistry::Register<LLSpeakButton> t1("talk_button");
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-LLSpeakButton::Params::Params()
- : speak_button("speak_button")
- , show_button("show_button")
- , monitor("monitor")
-{
- // See widgets/talk_button.xml
-}
-
-LLSpeakButton::LLSpeakButton(const Params& p)
-: LLUICtrl(p)
-, mOutputMonitor(NULL)
-, mSpeakBtn(NULL)
-, mShowBtn(NULL)
-{
- LLRect rect = p.rect();
- LLRect speak_rect(0, rect.getHeight(), rect.getWidth(), 0);
- LLRect show_rect = p.show_button.rect();
- show_rect.set(0, rect.getHeight(), show_rect.getWidth(), 0);
-
- speak_rect.mRight -= show_rect.getWidth();
- show_rect.mLeft = speak_rect.getWidth();
- show_rect.mRight = rect.getWidth();
-
- LLButton::Params speak_params = p.speak_button;
- speak_params.rect(speak_rect);
- mSpeakBtn = LLUICtrlFactory::create<LLButton>(speak_params);
- addChild(mSpeakBtn);
- LLTransientFloaterMgr::getInstance()->addControlView(mSpeakBtn);
-
- mSpeakBtn->setMouseDownCallback(boost::bind(&LLSpeakButton::onMouseDown_SpeakBtn, this));
- mSpeakBtn->setMouseUpCallback(boost::bind(&LLSpeakButton::onMouseUp_SpeakBtn, this));
- mSpeakBtn->setToggleState(FALSE);
-
- LLBottomtrayButton::Params show_params = p.show_button;
- show_params.rect(show_rect);
- mShowBtn = LLUICtrlFactory::create<LLBottomtrayButton>(show_params);
- addChild(mShowBtn);
- LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn);
-
-// mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this));
-// mShowBtn->setToggleState(FALSE);
-
- static const S32 MONITOR_RIGHT_PAD = 2;
-
- LLRect monitor_rect = p.monitor.rect();
- S32 monitor_height = monitor_rect.getHeight();
- monitor_rect.mLeft = speak_rect.getWidth() - monitor_rect.getWidth() - MONITOR_RIGHT_PAD;
- monitor_rect.mRight = speak_rect.getWidth() - MONITOR_RIGHT_PAD;
- monitor_rect.mBottom = (rect.getHeight() / 2) - (monitor_height / 2);
- monitor_rect.mTop = monitor_rect.mBottom + monitor_height;
-
- LLOutputMonitorCtrl::Params monitor_params = p.monitor;
- monitor_params.draw_border(false);
- monitor_params.rect(monitor_rect);
- monitor_params.auto_update(true);
- monitor_params.speaker_id(gAgentID);
- mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_params);
- mSpeakBtn->addChild(mOutputMonitor);
-
- // never show "muted" because you can't mute yourself
- mOutputMonitor->setIsMuted(false);
- mOutputMonitor->setIsAgentControl(true);
-
- //*TODO find a better place to do that
- LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true);
-}
-
-LLSpeakButton::~LLSpeakButton()
-{
- if(LLTransientFloaterMgr::instanceExists())
- {
- LLTransientFloaterMgr::getInstance()->removeControlView(mSpeakBtn);
- LLTransientFloaterMgr::getInstance()->removeControlView(mShowBtn);
- }
-}
-
-void LLSpeakButton::setSpeakToolTip(const std::string& msg)
-{
- mSpeakBtn->setToolTip(msg);
-}
-
-void LLSpeakButton::setShowToolTip(const std::string& msg)
-{
- mShowBtn->setToolTip(msg);
-}
-
-void LLSpeakButton::setLabelVisible(bool visible)
-{
- static std::string label_selected = mSpeakBtn->getLabelSelected();
- static std::string label_unselected = mSpeakBtn->getLabelUnselected();
-
- if (visible)
- {
- mSpeakBtn->setLabelSelected(label_selected);
- mSpeakBtn->setLabelUnselected(label_unselected);
- }
- else
- {
- static LLStringExplicit empty_string("");
- mSpeakBtn->setLabelSelected(empty_string);
- mSpeakBtn->setLabelUnselected(empty_string);
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-/// PROTECTED SECTION
-//////////////////////////////////////////////////////////////////////////
-void LLSpeakButton::onMouseDown_SpeakBtn()
-{
- bool down = true;
- LLVoiceClient::getInstance()->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk
- LLFirstUse::speak(false);
-}
-void LLSpeakButton::onMouseUp_SpeakBtn()
-{
- bool down = false;
- LLVoiceClient::getInstance()->inputUserControlState(down);
-}
-
diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h
deleted file mode 100644
index 7db01112ef..0000000000
--- a/indra/newview/llspeakbutton.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
-* @file llspeakbutton.h
-* @brief LLSpeakButton class header file
-*
-* $LicenseInfo:firstyear=2002&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2010, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-
-#ifndef LL_LLSPEAKBUTTON_H
-#define LL_LLSPEAKBUTTON_H
-
-#include "llinitparam.h"
-#include "lluictrl.h"
-
-class LLCallFloater;
-class LLButton;
-class LLOutputMonitorCtrl;
-class LLBottomtrayButton;
-
-/*
- * Button displaying voice chat status. Displays voice chat options when
- * clicked.
-*/
-class LLSpeakButton : public LLUICtrl
-{
-public:
-
- struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
- {
- Optional<LLButton::Params> speak_button;
- Optional<LLBottomtrayButton::Params> show_button;
- Optional<LLOutputMonitorCtrl::Params> monitor;
-
- Params();
- };
-
- /*virtual*/ ~LLSpeakButton();
-
- // *HACK: Need to put tooltips in a translatable location,
- // the panel that contains this button.
- void setSpeakToolTip(const std::string& msg);
- void setShowToolTip(const std::string& msg);
-
- /**
- * Sets visibility of speak button's label according to passed parameter.
- *
- * It removes label/selected label if "visible" is false and restores otherwise.
- *
- * @param visible if true - show label and selected label.
- *
- * @see mSpeakBtn
- * @see LLBottomTray::processShrinkButtons()
- */
- void setLabelVisible(bool visible);
-
-protected:
- friend class LLUICtrlFactory;
- LLSpeakButton(const Params& p);
-
- void onMouseDown_SpeakBtn();
- void onMouseUp_SpeakBtn();
-
-private:
- LLButton* mSpeakBtn;
- LLBottomtrayButton* mShowBtn;
- LLHandle<LLFloater> mPrivateCallPanel;
- LLOutputMonitorCtrl* mOutputMonitor;
-};
-
-#endif // LL_LLSPEAKBUTTON_H
diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp
index 4bde2dfcab..c3eb70f850 100644
--- a/indra/newview/llsprite.cpp
+++ b/indra/newview/llsprite.cpp
@@ -243,7 +243,7 @@ void LLSprite::updateFace(LLFace &face)
*indicesp++ = 3 + index_offset;
}
- face.getVertexBuffer()->setBuffer(0);
+ face.getVertexBuffer()->flush();
face.mCenterAgent = mPosition;
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 4dfcb85295..36d6ff3ef2 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -126,11 +126,11 @@
#include "llpanelgroupnotices.h"
#include "llpreview.h"
#include "llpreviewscript.h"
+#include "llproxy.h"
#include "llproductinforequest.h"
#include "llsecondlifeurls.h"
#include "llselectmgr.h"
#include "llsky.h"
-#include "llsidetray.h"
#include "llstatview.h"
#include "llstatusbar.h" // sendMoneyBalanceRequest(), owns L$ balance
#include "llsurface.h"
@@ -190,6 +190,7 @@
#include "lllogin.h"
#include "llevents.h"
#include "llstartuplistener.h"
+#include "lltoolbarview.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -366,7 +367,9 @@ bool idle_startup()
//
// Initialize stuff that doesn't need data from simulators
//
-
+ std::string lastGPU = gSavedSettings.getString("LastGPUString");
+ std::string thisGPU = LLFeatureManager::getInstance()->getGPUString();
+
if (LLFeatureManager::getInstance()->isSafe())
{
LLNotificationsUtil::add("DisplaySetToSafe");
@@ -374,20 +377,30 @@ bool idle_startup()
else if ((gSavedSettings.getS32("LastFeatureVersion") < LLFeatureManager::getInstance()->getVersion()) &&
(gSavedSettings.getS32("LastFeatureVersion") != 0))
{
- LLNotificationsUtil::add("DisplaySetToRecommended");
+ LLNotificationsUtil::add("DisplaySetToRecommendedFeatureChange");
}
- else if ((gSavedSettings.getS32("LastGPUClass") != LLFeatureManager::getInstance()->getGPUClass()) &&
- (gSavedSettings.getS32("LastGPUClass") != -1))
+ else if ( ! lastGPU.empty() && (lastGPU != thisGPU))
{
- LLNotificationsUtil::add("DisplaySetToRecommended");
+ LLSD subs;
+ subs["LAST_GPU"] = lastGPU;
+ subs["THIS_GPU"] = thisGPU;
+ LLNotificationsUtil::add("DisplaySetToRecommendedGPUChange", subs);
}
else if (!gViewerWindow->getInitAlert().empty())
{
LLNotificationsUtil::add(gViewerWindow->getInitAlert());
}
+ //-------------------------------------------------
+ // Init the SOCKS 5 proxy if the user has configured
+ // one. We need to do this early in case the user
+ // is using SOCKS for HTTP so we get the login
+ // screen and HTTP tables via SOCKS.
+ //-------------------------------------------------
+ LLStartUp::startLLProxy();
+
gSavedSettings.setS32("LastFeatureVersion", LLFeatureManager::getInstance()->getVersion());
- gSavedSettings.setS32("LastGPUClass", LLFeatureManager::getInstance()->getGPUClass());
+ gSavedSettings.setString("LastGPUString", thisGPU);
// load dynamic GPU/feature tables from website (S3)
LLFeatureManager::getInstance()->fetchHTTPTables();
@@ -591,7 +604,7 @@ bool idle_startup()
}
LL_INFOS("AppInit") << "Message System Initialized." << LL_ENDL;
-
+
//-------------------------------------------------
// Init audio, which may be needed for prefs dialog
// or audio cues in connection UI.
@@ -720,7 +733,16 @@ bool idle_startup()
timeout_count = 0;
- initialize_edit_menu();
+ // Login screen needs menus for preferences, but we can enter
+ // this startup phase more than once.
+ if (gLoginMenuBarView == NULL)
+ {
+ display_startup();
+ initialize_edit_menu();
+ display_startup();
+ init_menus();
+ display_startup();
+ }
if (show_connect_box)
{
@@ -728,23 +750,28 @@ bool idle_startup()
// NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't
// show the login view until login_show() is called below.
if (gUserCredential.isNull())
- {
+ {
+ display_startup();
gUserCredential = gLoginHandler.initializeLoginInfo();
+ display_startup();
}
if (gHeadlessClient)
{
LL_WARNS("AppInit") << "Waiting at connection box in headless client. Did you mean to add autologin params?" << LL_ENDL;
}
// Make sure the process dialog doesn't hide things
+ display_startup();
gViewerWindow->setShowProgress(FALSE);
-
+ display_startup();
// Show the login dialog
login_show();
+ display_startup();
// connect dialog is already shown, so fill in the names
if (gUserCredential.notNull())
{
LLPanelLogin::setFields( gUserCredential, gRememberPassword);
}
+ display_startup();
LLPanelLogin::giveFocus();
LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input
@@ -755,27 +782,19 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
- // *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance().
-
- // *NOTE: This is where gHUDManager used to bet allocated before becoming LLHUDManager::getInstance().
-
- // *NOTE: This is where gMuteList used to get allocated before becoming LLMuteList::getInstance().
-
- // Login screen needs menus for preferences, but we can enter
- // this startup phase more than once.
- if (gLoginMenuBarView == NULL)
- {
- init_menus();
- }
-
+ display_startup();
gViewerWindow->setNormalControlsVisible( FALSE );
+ display_startup();
gLoginMenuBarView->setVisible( TRUE );
+ display_startup();
gLoginMenuBarView->setEnabled( TRUE );
+ display_startup();
show_debug_menus();
+ display_startup();
// Hide the splash screen
LLSplashScreen::hide();
-
+ display_startup();
// Push our window frontmost
gViewerWindow->getWindow()->show();
display_startup();
@@ -784,7 +803,10 @@ bool idle_startup()
// first made visible.
#ifdef _WIN32
MSG msg;
- while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) );
+ while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) )
+ {
+ display_startup();
+ }
#endif
timeout.reset();
return FALSE;
@@ -799,7 +821,7 @@ bool idle_startup()
// Don't do anything. Wait for the login view to call the login_callback,
// which will push us to the next state.
-
+ display_startup();
// Sleep so we don't spin the CPU
ms_sleep(1);
return FALSE;
@@ -807,7 +829,21 @@ bool idle_startup()
if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
{
- //reset the values that could have come in from a slurl
+ // Post login screen, we should see if any settings have changed that may
+ // require us to either start/stop or change the socks proxy. As various communications
+ // past this point may require the proxy to be up.
+ if (!LLStartUp::startLLProxy())
+ {
+ // Proxy start up failed, we should now bail the state machine
+ // startLLProxy() will have reported an error to the user
+ // already, so we just go back to the login screen. The user
+ // could then change the preferences to fix the issue.
+
+ LLStartUp::setStartupState(STATE_LOGIN_SHOW);
+ return FALSE;
+ }
+
+ // reset the values that could have come in from a slurl
// DEV-42215: Make sure they're not empty -- gUserCredential
// might already have been set from gSavedSettings, and it's too bad
// to overwrite valid values with empty strings.
@@ -897,7 +933,7 @@ bool idle_startup()
if (show_connect_box)
{
LLSLURL slurl;
- LLPanelLogin::closePanel();
+ //LLPanelLogin::closePanel();
}
@@ -944,6 +980,8 @@ bool idle_startup()
gViewerWindow->setShowProgress(TRUE);
gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Quit"));
+ gViewerWindow->revealIntroPanel();
+
// Poke the VFS, which could potentially block for a while if
// Windows XP is acting up
set_startup_status(0.07f, LLTrans::getString("LoginVerifyingCache"), LLStringUtil::null);
@@ -1151,37 +1189,51 @@ bool idle_startup()
// Finish agent initialization. (Requires gSavedSettings, builds camera)
gAgent.init();
+ display_startup();
gAgentCamera.init();
+ display_startup();
set_underclothes_menu_options();
+ display_startup();
// Since we connected, save off the settings so the user doesn't have to
// type the name/password again if we crash.
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
LLUIColorTable::instance().saveUserSettings();
+ display_startup();
+
//
// Initialize classes w/graphics stuff.
//
gTextureList.doPrefetchImages();
+ display_startup();
+
LLSurface::initClasses();
+ display_startup();
+
LLFace::initClass();
+ display_startup();
LLDrawable::initClass();
+ display_startup();
// init the shader managers
LLPostProcess::initClass();
+ display_startup();
LLViewerObject::initVOClasses();
+ display_startup();
// Initialize all our tools. Must be done after saved settings loaded.
// NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton.
LLToolMgr::getInstance()->initTools();
+ display_startup();
// Pre-load floaters, like the world map, that are slow to spawn
// due to XML complexity.
gViewerWindow->initWorldUI();
-
+
display_startup();
// This is where we used to initialize gWorldp. Original comment said:
@@ -1189,24 +1241,26 @@ bool idle_startup()
// User might have overridden far clip
LLWorld::getInstance()->setLandFarClip(gAgentCamera.mDrawDistance);
-
+ display_startup();
// Before we create the first region, we need to set the agent's mOriginGlobal
// This is necessary because creating objects before this is set will result in a
// bad mPositionAgent cache.
gAgent.initOriginGlobal(from_region_handle(gFirstSimHandle));
+ display_startup();
LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim);
+ display_startup();
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(gFirstSimHandle);
LL_INFOS("AppInit") << "Adding initial simulator " << regionp->getOriginGlobal() << LL_ENDL;
regionp->setSeedCapability(gFirstSimSeedCap);
LL_DEBUGS("AppInit") << "Waiting for seed grant ...." << LL_ENDL;
-
+ display_startup();
// Set agent's initial region to be the one we just created.
gAgent.setRegion(regionp);
-
+ display_startup();
// Set agent's initial position, which will be read by LLVOAvatar when the avatar
// object is created. I think this must be done after setting the region. JC
gAgent.setPositionAgent(agent_start_position_region);
@@ -1226,6 +1280,7 @@ bool idle_startup()
{
LLStartUp::multimediaInit();
LLStartUp::setStartupState( STATE_FONT_INIT );
+ display_startup();
return FALSE;
}
@@ -1234,6 +1289,7 @@ bool idle_startup()
{
LLStartUp::fontInit();
LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
+ display_startup();
return FALSE;
}
@@ -1242,6 +1298,26 @@ bool idle_startup()
//---------------------------------------------------------------------
if(STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
+ LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(gFirstSimHandle);
+ if (regionp->capabilitiesReceived())
+ {
+ LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
+ }
+ else
+ {
+ U32 num_retries = regionp->getNumSeedCapRetries();
+ if (num_retries > 0)
+ {
+ LLStringUtil::format_map_t args;
+ args["[NUMBER]"] = llformat("%d", num_retries + 1);
+ set_startup_status(0.4f, LLTrans::getString("LoginRetrySeedCapGrant", args), gAgent.mMOTD);
+ }
+ else
+ {
+ set_startup_status(0.4f, LLTrans::getString("LoginRequestSeedCapGrant"), gAgent.mMOTD);
+ }
+ }
+ display_startup();
return FALSE;
}
@@ -1252,7 +1328,9 @@ bool idle_startup()
//---------------------------------------------------------------------
if (STATE_SEED_CAP_GRANTED == LLStartUp::getStartupState())
{
+ display_startup();
update_texture_fetch();
+ display_startup();
if ( gViewerWindow != NULL)
{ // This isn't the first logon attempt, so show the UI
@@ -1260,12 +1338,15 @@ bool idle_startup()
}
gLoginMenuBarView->setVisible( FALSE );
gLoginMenuBarView->setEnabled( FALSE );
+ display_startup();
// direct logging to the debug console's line buffer
LLError::logToFixedBuffer(gDebugView->mDebugConsolep);
+ display_startup();
// set initial visibility of debug console
gDebugView->mDebugConsolep->setVisible(gSavedSettings.getBOOL("ShowDebugConsole"));
+ display_startup();
//
// Set message handlers
@@ -1274,22 +1355,28 @@ bool idle_startup()
// register callbacks for messages. . . do this after initial handshake to make sure that we don't catch any unwanted
register_viewer_callbacks(gMessageSystem);
+ display_startup();
// Debugging info parameters
gMessageSystem->setMaxMessageTime( 0.5f ); // Spam if decoding all msgs takes more than 500 ms
+ display_startup();
#ifndef LL_RELEASE_FOR_DOWNLOAD
gMessageSystem->setTimeDecodes( TRUE ); // Time the decode of each msg
gMessageSystem->setTimeDecodesSpamThreshold( 0.05f ); // Spam if a single msg takes over 50ms to decode
#endif
+ display_startup();
gXferManager->registerCallbacks(gMessageSystem);
+ display_startup();
LLStartUp::initNameCache();
+ display_startup();
// update the voice settings *after* gCacheName initialization
// so that we can construct voice UI that relies on the name cache
LLVoiceClient::getInstance()->updateSettings();
+ display_startup();
//gCacheName is required for nearby chat history loading
//so I just moved nearby history loading a few states further
@@ -1298,12 +1385,14 @@ bool idle_startup()
LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
if (nearby_chat) nearby_chat->loadHistory();
}
+ display_startup();
// *Note: this is where gWorldMap used to be initialized.
// register null callbacks for audio until the audio system is initialized
gMessageSystem->setHandlerFuncFast(_PREHASH_SoundTrigger, null_message_callback, NULL);
gMessageSystem->setHandlerFuncFast(_PREHASH_AttachedSound, null_message_callback, NULL);
+ display_startup();
//reset statistics
LLViewerStats::getInstance()->resetStats();
@@ -1333,6 +1422,7 @@ bool idle_startup()
LLViewerCamera::getInstance()->setAspect(gViewerWindow->getWorldViewAspectRatio());
// Initialize FOV
LLViewerCamera::getInstance()->setDefaultFOV(gSavedSettings.getF32("CameraAngle"));
+ display_startup();
// Move agent to starting location. The position handed to us by
// the space server is in global coordinates, but the agent frame
@@ -1343,6 +1433,7 @@ bool idle_startup()
gAgent.resetAxes(gAgentStartLookAt);
gAgentCamera.stopCameraAnimation();
gAgentCamera.resetCamera();
+ display_startup();
// Initialize global class data needed for surfaces (i.e. textures)
LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL;
@@ -1355,6 +1446,8 @@ bool idle_startup()
LLGLState::checkStates();
LLGLState::checkTextureChannels();
+ display_startup();
+
LL_DEBUGS("AppInit") << "Decoding images..." << LL_ENDL;
// For all images pre-loaded into viewer cache, decode them.
// Need to do this AFTER we init the sky
@@ -1368,6 +1461,8 @@ bool idle_startup()
}
LLStartUp::setStartupState( STATE_WORLD_WAIT );
+ display_startup();
+
// JC - Do this as late as possible to increase likelihood Purify
// will run.
LLMessageSystem* msg = gMessageSystem;
@@ -1395,6 +1490,7 @@ bool idle_startup()
NULL);
timeout.reset();
+ display_startup();
return FALSE;
}
@@ -1413,8 +1509,10 @@ bool idle_startup()
LLMessageSystem* msg = gMessageSystem;
while (msg->checkAllMessages(gFrameCount, gServicePump))
{
+ display_startup();
}
msg->processAcks();
+ display_startup();
return FALSE;
}
@@ -1425,6 +1523,7 @@ bool idle_startup()
{
LL_DEBUGS("AppInit") << "Connecting to region..." << LL_ENDL;
set_startup_status(0.60f, LLTrans::getString("LoginConnectingToRegion"), gAgent.mMOTD);
+ display_startup();
// register with the message system so it knows we're
// expecting this message
LLMessageSystem* msg = gMessageSystem;
@@ -1440,6 +1539,7 @@ bool idle_startup()
msg->newMessageFast(_PREHASH_EconomyDataRequest);
gAgent.sendReliableMessage();
}
+ display_startup();
// Create login effect
// But not on first login, because you can't see your avatar then
@@ -1454,6 +1554,7 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT
timeout.reset();
+ display_startup();
return FALSE;
}
@@ -1478,14 +1579,17 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Awaiting AvatarInitComplete, got "
<< msg->getMessageName() << LL_ENDL;
}
+ display_startup();
}
msg->processAcks();
+ display_startup();
+
if (gAgentMovementCompleted)
{
LLStartUp::setStartupState( STATE_INVENTORY_SEND );
}
-
+ display_startup();
return FALSE;
}
@@ -1494,9 +1598,10 @@ bool idle_startup()
//---------------------------------------------------------------------
if (STATE_INVENTORY_SEND == LLStartUp::getStartupState())
{
+ display_startup();
// Inform simulator of our language preference
LLAgentLanguage::update();
-
+ display_startup();
// unpack thin inventory
LLSD response = LLLoginInstance::getInstance()->getResponse();
//bool dump_buffer = false;
@@ -1511,6 +1616,7 @@ bool idle_startup()
gInventory.setLibraryRootFolderID(id.asUUID());
}
}
+ display_startup();
LLSD inv_lib_owner = response["inventory-lib-owner"];
if(inv_lib_owner.isDefined())
@@ -1522,6 +1628,7 @@ bool idle_startup()
gInventory.setLibraryOwnerID( LLUUID(id.asUUID()));
}
}
+ display_startup();
LLSD inv_skel_lib = response["inventory-skel-lib"];
if(inv_skel_lib.isDefined() && gInventory.getLibraryOwnerID().notNull())
@@ -1531,6 +1638,7 @@ bool idle_startup()
LL_WARNS("AppInit") << "Problem loading inventory-skel-lib" << LL_ENDL;
}
}
+ display_startup();
LLSD inv_skeleton = response["inventory-skeleton"];
if(inv_skeleton.isDefined())
@@ -1540,6 +1648,13 @@ bool idle_startup()
LL_WARNS("AppInit") << "Problem loading inventory-skel-targets" << LL_ENDL;
}
}
+ display_startup();
+
+ LLSD inv_basic = response["inventory-basic"];
+ if(inv_basic.isDefined())
+ {
+ llinfos << "Basic inventory root folder id is " << inv_basic["folder_id"] << llendl;
+ }
LLSD buddy_list = response["buddy-list"];
if(buddy_list.isDefined())
@@ -1571,6 +1686,7 @@ bool idle_startup()
list[agent_id] = new LLRelationship(given_rights, has_rights, false);
}
LLAvatarTracker::instance().addBuddyList(list);
+ display_startup();
}
bool show_hud = false;
@@ -1598,6 +1714,8 @@ bool idle_startup()
//}
}
}
+ display_startup();
+
// Either we want to show tutorial because this is the first login
// to a Linden Help Island or the user quit with the tutorial
// visible. JC
@@ -1605,22 +1723,26 @@ bool idle_startup()
{
LLFloaterReg::showInstance("hud", LLSD(), FALSE);
}
+ display_startup();
LLSD event_notifications = response["event_notifications"];
if(event_notifications.isDefined())
{
gEventNotifier.load(event_notifications);
}
+ display_startup();
LLSD classified_categories = response["classified_categories"];
if(classified_categories.isDefined())
{
LLClassifiedInfo::loadCategories(classified_categories);
}
+ display_startup();
// This method MUST be called before gInventory.findCategoryUUIDForType because of
// gInventory.mIsAgentInvUsable is set to true in the gInventory.buildParentChildMap.
gInventory.buildParentChildMap();
+ display_startup();
//all categories loaded. lets create "My Favorites" category
gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE,true);
@@ -1634,24 +1756,26 @@ bool idle_startup()
LLAvatarTracker::instance().registerCallbacks(msg);
llinfos << " Landmark" << llendl;
LLLandmark::registerCallbacks(msg);
+ display_startup();
// request mute list
llinfos << "Requesting Mute List" << llendl;
LLMuteList::getInstance()->requestFromServer(gAgent.getID());
-
+ display_startup();
// Get L$ and ownership credit information
llinfos << "Requesting Money Balance" << llendl;
LLStatusBar::sendMoneyBalanceRequest();
-
+ display_startup();
// request all group information
llinfos << "Requesting Agent Data" << llendl;
gAgent.sendAgentDataUpdateRequest();
-
+ display_startup();
// Create the inventory views
llinfos << "Creating Inventory Views" << llendl;
LLFloaterReg::getInstance("inventory");
-
+ display_startup();
LLStartUp::setStartupState( STATE_MISC );
+ display_startup();
return FALSE;
}
@@ -1700,17 +1824,23 @@ bool idle_startup()
gSavedSettings.setBOOL("ShowStartLocation", TRUE);
}
+ display_startup();
+
if (gSavedSettings.getBOOL("HelpFloaterOpen"))
{
// show default topic
LLViewerHelp::instance().showTopic("");
}
+ display_startup();
+
// We're successfully logged in.
gSavedSettings.setBOOL("FirstLoginThisInstall", FALSE);
LLFloaterReg::showInitialVisibleInstances();
+ display_startup();
+
// based on the comments, we've successfully logged in so we can delete the 'forced'
// URL that the updater set in settings.ini (in a mostly paranoid fashion)
std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
@@ -1724,8 +1854,10 @@ bool idle_startup()
LLUIColorTable::instance().saveUserSettings();
};
+ display_startup();
// JC: Initializing audio requests many sounds for download.
init_audio();
+ display_startup();
// JC: Initialize "active" gestures. This may also trigger
// many gesture downloads, if this is the user's first
@@ -1763,6 +1895,7 @@ bool idle_startup()
LLGestureMgr::instance().startFetch();
}
gDisplaySwapBuffers = TRUE;
+ display_startup();
LLMessageSystem* msg = gMessageSystem;
msg->setHandlerFuncFast(_PREHASH_SoundTrigger, process_sound_trigger);
@@ -1837,8 +1970,10 @@ bool idle_startup()
}
}
+ display_startup();
//DEV-17797. get null folder. Any items found here moved to Lost and Found
LLInventoryModelBackgroundFetch::instance().findLostItems();
+ display_startup();
LLStartUp::setStartupState( STATE_PRECACHE );
timeout.reset();
@@ -1847,6 +1982,7 @@ bool idle_startup()
if (STATE_PRECACHE == LLStartUp::getStartupState())
{
+ display_startup();
F32 timeout_frac = timeout.getElapsedTimeF32()/PRECACHING_DELAY;
// We now have an inventory skeleton, so if this is a user's first
@@ -1863,6 +1999,8 @@ bool idle_startup()
LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender );
}
+ display_startup();
+
// wait precache-delay and for agent's avatar or a lot longer.
if(((timeout_frac > 1.f) && isAgentAvatarValid())
|| (timeout_frac > 3.f))
@@ -1876,11 +2014,6 @@ bool idle_startup()
LLTrans::getString("LoginPrecaching"),
gAgent.mMOTD);
display_startup();
- if (!LLViewerShaderMgr::sInitialized)
- {
- LLViewerShaderMgr::sInitialized = TRUE;
- LLViewerShaderMgr::instance()->setShaders();
- }
}
return TRUE;
@@ -1909,6 +2042,8 @@ bool idle_startup()
return TRUE;
}
+ display_startup();
+
if (wearables_time > MAX_WEARABLES_TIME)
{
LLNotificationsUtil::add("ClothingLoading");
@@ -1940,16 +2075,20 @@ bool idle_startup()
}
}
+ display_startup();
update_texture_fetch();
+ display_startup();
set_startup_status(0.9f + 0.1f * wearables_time / MAX_WEARABLES_TIME,
LLTrans::getString("LoginDownloadingClothing").c_str(),
gAgent.mMOTD.c_str());
+ display_startup();
return TRUE;
}
if (STATE_CLEANUP == LLStartUp::getStartupState())
{
set_startup_status(1.0, "", "");
+ display_startup();
// Let the map know about the inventory.
LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance();
@@ -1962,9 +2101,10 @@ bool idle_startup()
gViewerWindow->getWindow()->resetBusyCount();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
- gViewerWindow->revealIntroPanel();
- //gViewerWindow->setShowProgress(FALSE); // reveal intro video now handles this
+ //gViewerWindow->revealIntroPanel();
+ gViewerWindow->setStartupComplete();
gViewerWindow->setProgressCancelButtonVisible(FALSE);
+ display_startup();
// We're not away from keyboard, even though login might have taken
// a while. JC
@@ -1987,7 +2127,7 @@ bool idle_startup()
show_debug_menus(); // Debug menu visiblity and First Use trigger
// If we've got a startup URL, dispatch it
- LLStartUp::dispatchURL();
+ //LLStartUp::dispatchURL();
// Retrieve information about the land data
// (just accessing this the first time will fetch it,
@@ -2000,6 +2140,7 @@ bool idle_startup()
// LLUserAuth::getInstance()->reset();
LLStartUp::setStartupState( STATE_STARTED );
+ display_startup();
// Unmute audio if desired and setup volumes.
// Unmute audio if desired and setup volumes.
@@ -2024,6 +2165,7 @@ bool idle_startup()
LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
LLIMFloater::initIMFloater();
+ display_startup();
return TRUE;
}
@@ -2045,7 +2187,12 @@ void login_show()
#else
BOOL bUseDebugLogin = TRUE;
#endif
-
+ // Hide the toolbars: may happen to come back here if login fails after login agent but before login in region
+ if (gToolBarView)
+ {
+ gToolBarView->setVisible(FALSE);
+ }
+
LLPanelLogin::show( gViewerWindow->getWindowRectScaled(),
bUseDebugLogin || gSavedSettings.getBOOL("SecondLifeEnterprise"),
login_callback, NULL );
@@ -2344,13 +2491,6 @@ void asset_callback_nothing(LLVFS*, const LLUUID&, LLAssetType::EType, void*, S3
// nothing
}
-// *HACK: Must match name in Library or agent inventory
-const std::string ROOT_GESTURES_FOLDER = "Gestures";
-const std::string COMMON_GESTURES_FOLDER = "Common Gestures";
-const std::string MALE_GESTURES_FOLDER = "Male Gestures";
-const std::string FEMALE_GESTURES_FOLDER = "Female Gestures";
-const std::string SPEECH_GESTURES_FOLDER = "Speech Gestures";
-const std::string OTHER_GESTURES_FOLDER = "Other Gestures";
const S32 OPT_CLOSED_WINDOW = -1;
const S32 OPT_MALE = 0;
const S32 OPT_FEMALE = 1;
@@ -2379,84 +2519,30 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response)
return false;
}
-void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures)
-{
- llinfos << "Copying library gestures" << llendl;
-
- // Copy gestures
- LLUUID lib_gesture_cat_id =
- gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE,false,true);
- if (lib_gesture_cat_id.isNull())
- {
- llwarns << "Unable to copy gestures, source category not found" << llendl;
- }
- LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE);
-
- std::vector<std::string> gesture_folders_to_copy;
- gesture_folders_to_copy.push_back(MALE_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(FEMALE_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(COMMON_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(SPEECH_GESTURES_FOLDER);
- gesture_folders_to_copy.push_back(OTHER_GESTURES_FOLDER);
-
- for(std::vector<std::string>::iterator it = gesture_folders_to_copy.begin();
- it != gesture_folders_to_copy.end();
- ++it)
- {
- std::string& folder_name = *it;
-
- LLPointer<LLInventoryCallback> cb(NULL);
-
- if (folder_name == same_gender_gestures ||
- folder_name == COMMON_GESTURES_FOLDER ||
- folder_name == OTHER_GESTURES_FOLDER)
- {
- cb = new ActivateGestureCallback;
- }
-
-
- LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name);
- if (cat_id.isNull())
- {
- llwarns << "failed to find gesture folder for " << folder_name << llendl;
- }
- else
- {
- llinfos << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << llendl;
- LLAppearanceMgr* app_mgr = LLAppearanceMgr::getInstance();
- callAfterCategoryFetch(cat_id,
- boost::bind(&LLAppearanceMgr::shallowCopyCategory,
- app_mgr,
- cat_id,
- dst_id,
- cb));
- }
- }
-}
-
void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
const std::string& gender_name )
{
- llinfos << "starting" << llendl;
+ lldebugs << "starting" << llendl;
// Not going through the processAgentInitialWearables path, so need to set this here.
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
// Initiate creation of COF, since we're also bypassing that.
gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
- S32 gender = 0;
- std::string same_gender_gestures;
+ ESex gender;
if (gender_name == "male")
{
- gender = OPT_MALE;
- same_gender_gestures = MALE_GESTURES_FOLDER;
+ lldebugs << "male" << llendl;
+ gender = SEX_MALE;
}
else
{
- gender = OPT_FEMALE;
- same_gender_gestures = FEMALE_GESTURES_FOLDER;
+ lldebugs << "female" << llendl;
+ gender = SEX_FEMALE;
}
+ gAgentAvatarp->setSex(gender);
+
// try to find the outfit - if not there, create some default
// wearables.
LLUUID cat_id = findDescendentCategoryIDByName(
@@ -2464,7 +2550,8 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
outfit_folder_name);
if (cat_id.isNull())
{
- gAgentWearables.createStandardWearables(gender);
+ lldebugs << "standard wearables" << llendl;
+ gAgentWearables.createStandardWearables();
}
else
{
@@ -2474,26 +2561,28 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append);
+ lldebugs << "initial outfit category id: " << cat_id << llendl;
}
- // Copy gestures
- copyLibraryGestures(same_gender_gestures);
-
// This is really misnamed -- it means we have started loading
// an outfit/shape that will give the avatar a gender eventually. JC
gAgent.setGenderChosen(TRUE);
-
}
//static
void LLStartUp::saveInitialOutfit()
{
- if (sInitialOutfit.empty()) return;
+ if (sInitialOutfit.empty()) {
+ lldebugs << "sInitialOutfit is empty" << llendl;
+ return;
+ }
if (sWearablesLoadedCon.connected())
{
+ lldebugs << "sWearablesLoadedCon is connected, disconnecting" << llendl;
sWearablesLoadedCon.disconnect();
}
+ lldebugs << "calling makeNewOutfitLinks( \"" << sInitialOutfit << "\" )" << llendl;
LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);
}
@@ -2536,22 +2625,32 @@ void init_start_screen(S32 location_id)
else if(!start_image_bmp->load(temp_str) )
{
LL_WARNS("AppInit") << "Bitmap load failed" << LL_ENDL;
- return;
+ gStartTexture = NULL;
}
+ else
+ {
+ gStartImageWidth = start_image_bmp->getWidth();
+ gStartImageHeight = start_image_bmp->getHeight();
- gStartImageWidth = start_image_bmp->getWidth();
- gStartImageHeight = start_image_bmp->getHeight();
+ LLPointer<LLImageRaw> raw = new LLImageRaw;
+ if (!start_image_bmp->decode(raw, 0.0f))
+ {
+ LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL;
+ gStartTexture = NULL;
+ }
+ else
+ {
+ raw->expandToPowerOfTwo();
+ gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE) ;
+ }
+ }
- LLPointer<LLImageRaw> raw = new LLImageRaw;
- if (!start_image_bmp->decode(raw, 0.0f))
+ if(gStartTexture.isNull())
{
- LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL;
- gStartTexture = NULL;
- return;
+ gStartTexture = LLViewerTexture::sBlackImagep ;
+ gStartImageWidth = gStartTexture->getWidth() ;
+ gStartImageHeight = gStartTexture->getHeight() ;
}
-
- raw->expandToPowerOfTwo();
- gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE) ;
}
@@ -2690,12 +2789,12 @@ void LLStartUp::cleanupNameCache()
bool LLStartUp::dispatchURL()
{
// ok, if we've gotten this far and have a startup URL
- if (!getStartSLURL().isValid())
+ if (!getStartSLURL().isValid())
{
return false;
}
- if(getStartSLURL().getType() != LLSLURL::APP)
- {
+ if(getStartSLURL().getType() != LLSLURL::APP)
+ {
// If we started with a location, but we're already
// at that location, don't pop dialogs open.
@@ -2738,6 +2837,171 @@ void LLStartUp::setStartSLURL(const LLSLURL& slurl)
}
}
+/**
+ * Read all proxy configuration settings and set up both the HTTP proxy and
+ * SOCKS proxy as needed.
+ *
+ * Any errors that are encountered will result in showing the user a notification.
+ * When an error is encountered,
+ *
+ * @return Returns true if setup was successful, false if an error was encountered.
+ */
+bool LLStartUp::startLLProxy()
+{
+ bool proxy_ok = true;
+ std::string httpProxyType = gSavedSettings.getString("HttpProxyType");
+
+ // Set up SOCKS proxy (if needed)
+ if (gSavedSettings.getBOOL("Socks5ProxyEnabled"))
+ {
+ // Determine and update LLProxy with the saved authentication system
+ std::string auth_type = gSavedSettings.getString("Socks5AuthType");
+
+ if (auth_type.compare("UserPass") == 0)
+ {
+ LLPointer<LLCredential> socks_cred = gSecAPIHandler->loadCredential("SOCKS5");
+ std::string socks_user = socks_cred->getIdentifier()["username"].asString();
+ std::string socks_password = socks_cred->getAuthenticator()["creds"].asString();
+
+ bool ok = LLProxy::getInstance()->setAuthPassword(socks_user, socks_password);
+
+ if (!ok)
+ {
+ LLNotificationsUtil::add("SOCKS_BAD_CREDS");
+ proxy_ok = false;
+ }
+ }
+ else if (auth_type.compare("None") == 0)
+ {
+ LLProxy::getInstance()->setAuthNone();
+ }
+ else
+ {
+ LL_WARNS("Proxy") << "Invalid SOCKS 5 authentication type."<< LL_ENDL;
+
+ // Unknown or missing setting.
+ gSavedSettings.setString("Socks5AuthType", "None");
+
+ // Clear the SOCKS credentials.
+ LLPointer<LLCredential> socks_cred = new LLCredential("SOCKS5");
+ gSecAPIHandler->deleteCredential(socks_cred);
+
+ LLProxy::getInstance()->setAuthNone();
+ }
+
+ if (proxy_ok)
+ {
+ // Start the proxy and check for errors
+ // If status != SOCKS_OK, stopSOCKSProxy() will already have been called when startSOCKSProxy() returns.
+ LLHost socks_host;
+ socks_host.setHostByName(gSavedSettings.getString("Socks5ProxyHost"));
+ socks_host.setPort(gSavedSettings.getU32("Socks5ProxyPort"));
+ int status = LLProxy::getInstance()->startSOCKSProxy(socks_host);
+
+ if (status != SOCKS_OK)
+ {
+ LLSD subs;
+ subs["HOST"] = gSavedSettings.getString("Socks5ProxyHost");
+ subs["PORT"] = (S32)gSavedSettings.getU32("Socks5ProxyPort");
+
+ std::string error_string;
+
+ switch(status)
+ {
+ case SOCKS_CONNECT_ERROR: // TCP Fail
+ error_string = "SOCKS_CONNECT_ERROR";
+ break;
+
+ case SOCKS_NOT_PERMITTED: // SOCKS 5 server rule set refused connection
+ error_string = "SOCKS_NOT_PERMITTED";
+ break;
+
+ case SOCKS_NOT_ACCEPTABLE: // Selected authentication is not acceptable to server
+ error_string = "SOCKS_NOT_ACCEPTABLE";
+ break;
+
+ case SOCKS_AUTH_FAIL: // Authentication failed
+ error_string = "SOCKS_AUTH_FAIL";
+ break;
+
+ case SOCKS_UDP_FWD_NOT_GRANTED: // UDP forward request failed
+ error_string = "SOCKS_UDP_FWD_NOT_GRANTED";
+ break;
+
+ case SOCKS_HOST_CONNECT_FAILED: // Failed to open a TCP channel to the socks server
+ error_string = "SOCKS_HOST_CONNECT_FAILED";
+ break;
+
+ case SOCKS_INVALID_HOST: // Improperly formatted host address or port.
+ error_string = "SOCKS_INVALID_HOST";
+ break;
+
+ default:
+ error_string = "SOCKS_UNKNOWN_STATUS"; // Something strange happened,
+ LL_WARNS("Proxy") << "Unknown return from LLProxy::startProxy(): " << status << LL_ENDL;
+ break;
+ }
+
+ LLNotificationsUtil::add(error_string, subs);
+ proxy_ok = false;
+ }
+ }
+ }
+ else
+ {
+ LLProxy::getInstance()->stopSOCKSProxy(); // ensure no UDP proxy is running and it's all cleaned up
+ }
+
+ if (proxy_ok)
+ {
+ // Determine the HTTP proxy type (if any)
+ if ((httpProxyType.compare("Web") == 0) && gSavedSettings.getBOOL("BrowserProxyEnabled"))
+ {
+ LLHost http_host;
+ http_host.setHostByName(gSavedSettings.getString("BrowserProxyAddress"));
+ http_host.setPort(gSavedSettings.getS32("BrowserProxyPort"));
+ if (!LLProxy::getInstance()->enableHTTPProxy(http_host, LLPROXY_HTTP))
+ {
+ LLSD subs;
+ subs["HOST"] = http_host.getIPString();
+ subs["PORT"] = (S32)http_host.getPort();
+ LLNotificationsUtil::add("PROXY_INVALID_HTTP_HOST", subs);
+ proxy_ok = false;
+ }
+ }
+ else if ((httpProxyType.compare("Socks") == 0) && gSavedSettings.getBOOL("Socks5ProxyEnabled"))
+ {
+ LLHost socks_host;
+ socks_host.setHostByName(gSavedSettings.getString("Socks5ProxyHost"));
+ socks_host.setPort(gSavedSettings.getU32("Socks5ProxyPort"));
+ if (!LLProxy::getInstance()->enableHTTPProxy(socks_host, LLPROXY_SOCKS))
+ {
+ LLSD subs;
+ subs["HOST"] = socks_host.getIPString();
+ subs["PORT"] = (S32)socks_host.getPort();
+ LLNotificationsUtil::add("PROXY_INVALID_SOCKS_HOST", subs);
+ proxy_ok = false;
+ }
+ }
+ else if (httpProxyType.compare("None") == 0)
+ {
+ LLProxy::getInstance()->disableHTTPProxy();
+ }
+ else
+ {
+ LL_WARNS("Proxy") << "Invalid other HTTP proxy configuration."<< LL_ENDL;
+
+ // Set the missing or wrong configuration back to something valid.
+ gSavedSettings.setString("HttpProxyType", "None");
+ LLProxy::getInstance()->disableHTTPProxy();
+
+ // Leave proxy_ok alone, since this isn't necessarily fatal.
+ }
+ }
+
+ return proxy_ok;
+}
+
bool login_alert_done(const LLSD& notification, const LLSD& response)
{
LLPanelLogin::giveFocus();
@@ -3122,8 +3386,6 @@ bool process_login_success_response()
}
// Initial outfit for the user.
- // QUESTION: Why can't we simply simply set the users outfit directly
- // from a web page into the user info on the server? - Roxie
LLSD initial_outfit = response["initial-outfit"][0];
if(initial_outfit.size())
{
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index b3d9ef1dcc..0a18ef1b2d 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -90,8 +90,6 @@ public:
static void initNameCache();
- static void copyLibraryGestures(const std::string& same_gender_gestures);
-
static void cleanupNameCache();
// outfit_folder_name can be a folder anywhere in your inventory,
@@ -113,6 +111,8 @@ public:
static void setStartSLURL(const LLSLURL& slurl);
static LLSLURL& getStartSLURL() { return sStartSLURL; }
+ static bool startLLProxy(); // Initialize the SOCKS 5 proxy
+
private:
static LLSLURL sStartSLURL;
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 1b8be7a5b2..75db269bde 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -169,6 +169,8 @@ BOOL LLStatusBar::postBuild()
getChild<LLUICtrl>("buyL")->setCommitCallback(
boost::bind(&LLStatusBar::onClickBuyCurrency, this));
+ getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
+
mBoxBalance = getChild<LLTextBox>("balance");
mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
@@ -345,9 +347,10 @@ void LLStatusBar::setBalance(S32 balance)
const S32 HPAD = 24;
LLRect balance_rect = mBoxBalance->getTextBoundingRect();
LLRect buy_rect = getChildView("buyL")->getRect();
+ LLRect shop_rect = getChildView("goShop")->getRect();
LLView* balance_bg_view = getChildView("balance_bg");
LLRect balance_bg_rect = balance_bg_view->getRect();
- balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + balance_rect.getWidth() + HPAD);
+ balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + shop_rect.getWidth() + balance_rect.getWidth() + HPAD);
balance_bg_view->setShape(balance_bg_rect);
}
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index bccabe21a8..66df7dae3e 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -334,6 +334,17 @@ void LLSurface::setOriginGlobal(const LLVector3d &origin_global)
}
}
+void LLSurface::getNeighboringRegions( std::vector<LLViewerRegion*>& uniqueRegions )
+{
+ S32 i;
+ for (i = 0; i < 8; i++)
+ {
+ if ( mNeighbors[i] != NULL )
+ {
+ uniqueRegions.push_back( mNeighbors[i]->getRegion() );
+ }
+ }
+}
void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
{
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 673ee83fe3..a4ef4fe2de 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -140,6 +140,9 @@ public:
friend class LLSurfacePatch;
friend std::ostream& operator<<(std::ostream &s, const LLSurface &S);
+
+ void getNeighboringRegions( std::vector<LLViewerRegion*>& uniqueRegions );
+
public:
// Number of grid points on one side of a region, including +1 buffer for
// north and east edge.
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index cb49976e5f..3aa6a3b7e5 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -35,16 +35,17 @@
#include "llfloaterreg.h"
#include "llnotifications.h"
-#include "llbottomtray.h"
#include "llscriptfloater.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llchiclet.h"
+#include "llchicletbar.h"
#include "lltoastpanel.h"
#include "llnotificationmanager.h"
#include "llnotificationsutil.h"
#include "llspeakers.h"
+#include "lltoolbarview.h"
//---------------------------------------------------------------------------------
LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(NULL, true, key),
@@ -140,15 +141,6 @@ void LLSysWellWindow::initChannel()
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::getAllowedRect(LLRect& rect)
-{
- rect = gViewerWindow->getWorldViewRectScaled();
-}
-
-//---------------------------------------------------------------------------------
-
-
-//---------------------------------------------------------------------------------
void LLSysWellWindow::setVisible(BOOL visible)
{
if (visible)
@@ -156,8 +148,8 @@ void LLSysWellWindow::setVisible(BOOL visible)
if (NULL == getDockControl() && getDockTongue().notNull())
{
setDockControl(new LLDockControl(
- LLBottomTray::getInstance()->getChild<LLView>(getAnchorViewName()), this,
- getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1)));
+ LLChicletBar::getInstance()->getChild<LLView>(getAnchorViewName()), this,
+ getDockTongue(), LLDockControl::BOTTOM));
}
}
@@ -211,10 +203,9 @@ void LLSysWellWindow::reshapeWindow()
{
new_window_height = MAX_WINDOW_HEIGHT;
}
- S32 newY = curRect.mTop + new_window_height - curRect.getHeight();
- S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH
- : curRect.getWidth();
- curRect.setLeftTopAndSize(curRect.mLeft, newY, newWidth, new_window_height);
+ S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth();
+
+ curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height);
reshape(curRect.getWidth(), curRect.getHeight(), TRUE);
setRect(curRect);
}
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index 9f8ab01810..52e5370505 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -76,11 +76,6 @@ public:
static const S32 MIN_WINDOW_WIDTH = 318;
protected:
-
- // gets a rect that bounds possible positions for the SysWellWindow on a screen (EXT-1111)
- void getAllowedRect(LLRect& rect);
-
-
// init Window's channel
virtual void initChannel();
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index 0d8b45db1f..50a088b799 100644
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -56,7 +56,8 @@ const std::string& LLTeleportHistoryItem::getTitle() const
LLTeleportHistory::LLTeleportHistory():
mCurrentItem(-1),
mRequestedItem(-1),
- mGotInitialUpdate(false)
+ mGotInitialUpdate(false),
+ mTeleportHistoryStorage(NULL)
{
mTeleportFinishedConn = LLViewerParcelMgr::getInstance()->
setTeleportFinishedCallback(boost::bind(&LLTeleportHistory::updateCurrentLocation, this, _1));
@@ -115,6 +116,10 @@ void LLTeleportHistory::handleLoginComplete()
void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
{
+ if (!mTeleportHistoryStorage)
+ {
+ mTeleportHistoryStorage = LLTeleportHistoryStorage::getInstance();
+ }
if (mRequestedItem != -1) // teleport within the history in progress?
{
mCurrentItem = mRequestedItem;
@@ -152,7 +157,7 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
if (mCurrentItem < 0 || mCurrentItem >= (int) mItems.size()) // sanity check
{
llwarns << "Invalid current item. (this should not happen)" << llendl;
- llassert(!"Invalid current teleport histiry item");
+ llassert(!"Invalid current teleport history item");
return;
}
LLVector3 new_pos_local = gAgent.getPosAgentFromGlobal(new_pos);
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index e45dc28f9b..e9c29c39bf 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -33,6 +33,7 @@
#include <string>
#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include "llteleporthistorystorage.h"
/**
@@ -210,6 +211,8 @@ private:
*/
bool mGotInitialUpdate;
+ LLTeleportHistoryStorage* mTeleportHistoryStorage;
+
/**
* Signal emitted when the history gets changed.
*
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index 0ba455e7d5..af5a047da4 100644
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -66,6 +66,7 @@ struct LLSortItemsByDate
LLTeleportHistoryStorage::LLTeleportHistoryStorage() :
mFilename("teleport_history.txt")
{
+ mItems.clear();
LLTeleportHistory *th = LLTeleportHistory::getInstance();
if (th)
th->setHistoryChangedCallback(boost::bind(&LLTeleportHistoryStorage::onTeleportHistoryChange, this));
diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h
index 6cae0a3454..cf4c85a991 100644
--- a/indra/newview/llteleporthistorystorage.h
+++ b/indra/newview/llteleporthistorystorage.h
@@ -93,9 +93,6 @@ public:
void removeItem(S32 idx);
void save();
- void load();
-
- void dump() const;
/**
* Set a callback to be called upon history changes.
@@ -113,6 +110,9 @@ public:
private:
+ void load();
+ void dump() const;
+
void onTeleportHistoryChange();
bool compareByTitleAndGlobalPos(const LLTeleportHistoryPersistentItem& a, const LLTeleportHistoryPersistentItem& b);
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index bd41aa64f0..6f6d5dbf12 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -45,6 +45,7 @@
#include "llagentwearables.h"
#include "llwearable.h"
#include "llviewercontrol.h"
+#include "llviewershadermgr.h"
#include "llviewervisualparam.h"
//#include "../tools/imdebug/imdebug.h"
@@ -215,22 +216,22 @@ void LLTexLayerSetBuffer::cancelUpload()
void LLTexLayerSetBuffer::pushProjection() const
{
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
- glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+ gGL.loadIdentity();
+ gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
}
void LLTexLayerSetBuffer::popProjection() const
{
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
}
@@ -293,6 +294,16 @@ BOOL LLTexLayerSetBuffer::render()
const BOOL update_now = mNeedsUpdate && isReadyToUpdate();
BOOL success = TRUE;
+
+ bool use_shaders = LLGLSLShader::sNoFixedFunction;
+
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.bind();
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
+
+ LLVertexBuffer::unbind();
// Composite the color data
LLGLSUIDefault gls_ui;
@@ -328,6 +339,13 @@ BOOL LLTexLayerSetBuffer::render()
doUpdate();
}
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.unbind();
+ }
+
+ LLVertexBuffer::unbind();
+
// reset GL state
gGL.setColorMask(true, true);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -917,6 +935,8 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
}
}
+ bool use_shaders = LLGLSLShader::sNoFixedFunction;
+
LLGLSUIDefault gls_ui;
LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE);
gGL.setColorMask(true, true);
@@ -925,12 +945,20 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
{
gGL.flush();
LLGLDisable no_alpha(GL_ALPHA_TEST);
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.0f);
+ }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
gl_rect_2d_simple( width, height );
gGL.flush();
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
}
if (mIsVisible)
@@ -957,6 +985,11 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
gGL.setSceneBlendType(LLRender::BT_REPLACE);
LLGLDisable no_alpha(GL_ALPHA_TEST);
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
+ }
+
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 0.f );
@@ -964,7 +997,10 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
gGL.setSceneBlendType(LLRender::BT_ALPHA);
gGL.flush();
-
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
}
return success;
@@ -1071,13 +1107,14 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
{
const LLTexLayerSetInfo *info = getInfo();
+ bool use_shaders = LLGLSLShader::sNoFixedFunction;
+
gGL.setColorMask(false, true);
gGL.setSceneBlendType(LLRender::BT_REPLACE);
// (Optionally) replace alpha with a single component image from a tga file.
if (!info->mStaticAlphaFileName.empty())
{
- LLGLSNoAlphaTest gls_no_alpha_test;
gGL.flush();
{
LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, TRUE);
@@ -1096,12 +1133,20 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
// Set the alpha channel to one (clean up after previous blending)
gGL.flush();
LLGLDisable no_alpha(GL_ALPHA_TEST);
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
+ }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
gl_rect_2d_simple( width, height );
gGL.flush();
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
}
// (Optional) Mask out part of the baked texture with alpha masks
@@ -1586,6 +1631,8 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
LLGLEnable color_mat(GL_COLOR_MATERIAL);
gPipeline.disableLights();
+ bool use_shaders = LLGLSLShader::sNoFixedFunction;
+
LLColor4 net_color;
BOOL color_specified = findNetColor(&net_color);
@@ -1666,8 +1713,13 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
{
if( tex )
{
- LLGLDisable alpha_test(getInfo()->mWriteAllChannels ? GL_ALPHA_TEST : 0);
-
+ bool no_alpha_test = getInfo()->mWriteAllChannels;
+ LLGLDisable alpha_test(no_alpha_test ? GL_ALPHA_TEST : 0);
+ if (use_shaders && no_alpha_test)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
+ }
+
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
gGL.getTexUnit(0)->bind(tex, TRUE);
@@ -1677,6 +1729,11 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
gGL.getTexUnit(0)->setTextureAddressMode(old_mode);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ if (use_shaders && no_alpha_test)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
+
}
}
// else
@@ -1709,9 +1766,17 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
color_specified )
{
LLGLDisable no_alpha(GL_ALPHA_TEST);
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
+ }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4fv( net_color.mV );
gl_rect_2d_simple( width, height );
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
}
if( alpha_mask_specified || getInfo()->mWriteAllChannels )
@@ -1799,15 +1864,25 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
gGL.flush();
+ bool use_shaders = LLGLSLShader::sNoFixedFunction;
+
if( !getInfo()->mStaticImageFileName.empty() )
{
LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture( getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask );
if( tex )
{
LLGLSNoAlphaTest gls_no_alpha_test;
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
+ }
gGL.getTexUnit(0)->bind(tex, TRUE);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
}
else
{
@@ -1822,10 +1897,18 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
if (tex)
{
LLGLSNoAlphaTest gls_no_alpha_test;
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
+ }
gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
success = TRUE;
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
}
}
}
@@ -1844,6 +1927,13 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
llassert( !mParamAlphaList.empty() );
+ bool use_shaders = LLGLSLShader::sNoFixedFunction;
+
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
+ }
+
gGL.setColorMask(false, true);
LLTexLayerParamAlpha* first_param = *mParamAlphaList.begin();
@@ -1881,7 +1971,6 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
if( tex && (tex->getComponents() == 4) )
{
LLGLSNoAlphaTest gls_no_alpha_test;
-
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
gGL.getTexUnit(0)->bind(tex, TRUE);
@@ -1920,6 +2009,10 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
gl_rect_2d_simple( width, height );
}
+ if (use_shaders)
+ {
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
+ }
LLGLSUIDefault gls_ui;
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 9b417307fd..e7a176f4f9 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -36,6 +36,7 @@
// Included to allow LLTextureCache::purgeTextures() to pause watchdog timeout
#include "llappviewer.h"
+#include "llmemory.h"
// Cache organization:
// cache/texture.entries
@@ -113,7 +114,7 @@ public:
~LLTextureCacheWorker()
{
llassert_always(!haveWork());
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
}
// override this interface
@@ -215,7 +216,7 @@ bool LLTextureCacheLocalFileWorker::doRead()
mDataSize = 0;
return true;
}
- mReadData = new U8[mDataSize];
+ mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize);
mBytesRead = -1;
mBytesToRead = mDataSize;
setPriority(LLWorkerThread::PRIORITY_LOW | mPriority);
@@ -233,7 +234,7 @@ bool LLTextureCacheLocalFileWorker::doRead()
// << " Bytes: " << mDataSize << " Offset: " << mOffset
// << " / " << mDataSize << llendl;
mDataSize = 0; // failed
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
}
return true;
@@ -248,7 +249,7 @@ bool LLTextureCacheLocalFileWorker::doRead()
{
mDataSize = local_size;
}
- mReadData = new U8[mDataSize];
+ mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize);
S32 bytes_read = LLAPRFile::readEx(mFileName, mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool());
@@ -258,7 +259,7 @@ bool LLTextureCacheLocalFileWorker::doRead()
// << " Bytes: " << mDataSize << " Offset: " << mOffset
// << " / " << mDataSize << llendl;
mDataSize = 0;
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
}
else
@@ -377,7 +378,7 @@ bool LLTextureCacheRemoteWorker::doRead()
mDataSize = local_size;
}
// Allocate read buffer
- mReadData = new U8[mDataSize];
+ mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize);
S32 bytes_read = LLAPRFile::readEx(local_filename,
mReadData, mOffset, mDataSize, mCache->getLocalAPRFilePool());
if (bytes_read != mDataSize)
@@ -386,7 +387,7 @@ bool LLTextureCacheRemoteWorker::doRead()
<< " Bytes: " << mDataSize << " Offset: " << mOffset
<< " / " << mDataSize << llendl;
mDataSize = 0;
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
}
else
@@ -429,7 +430,7 @@ bool LLTextureCacheRemoteWorker::doRead()
S32 size = TEXTURE_CACHE_ENTRY_SIZE - mOffset;
size = llmin(size, mDataSize);
// Allocate the read buffer
- mReadData = new U8[size];
+ mReadData = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), size);
S32 bytes_read = LLAPRFile::readEx(mCache->mHeaderDataFileName,
mReadData, offset, size, mCache->getLocalAPRFilePool());
if (bytes_read != size)
@@ -437,7 +438,7 @@ bool LLTextureCacheRemoteWorker::doRead()
llwarns << "LLTextureCacheWorker: " << mID
<< " incorrect number of bytes read from header: " << bytes_read
<< " / " << size << llendl;
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
mDataSize = -1; // failed
done = true;
@@ -467,7 +468,7 @@ bool LLTextureCacheRemoteWorker::doRead()
S32 data_offset, file_size, file_offset;
// Reserve the whole data buffer first
- U8* data = new U8[mDataSize];
+ U8* data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mDataSize);
// Set the data file pointers taking the read offset into account. 2 cases:
if (mOffset < TEXTURE_CACHE_ENTRY_SIZE)
@@ -480,7 +481,7 @@ bool LLTextureCacheRemoteWorker::doRead()
// Copy the raw data we've been holding from the header cache into the new sized buffer
llassert_always(mReadData);
memcpy(data, mReadData, data_offset);
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
}
else
@@ -506,7 +507,7 @@ bool LLTextureCacheRemoteWorker::doRead()
llwarns << "LLTextureCacheWorker: " << mID
<< " incorrect number of bytes read from body: " << bytes_read
<< " / " << file_size << llendl;
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
mDataSize = -1; // failed
done = true;
@@ -598,11 +599,11 @@ bool LLTextureCacheRemoteWorker::doWrite()
{
// We need to write a full record in the header cache so, if the amount of data is smaller
// than a record, we need to transfer the data to a buffer padded with 0 and write that
- U8* padBuffer = new U8[TEXTURE_CACHE_ENTRY_SIZE];
+ U8* padBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), TEXTURE_CACHE_ENTRY_SIZE);
memset(padBuffer, 0, TEXTURE_CACHE_ENTRY_SIZE); // Init with zeros
memcpy(padBuffer, mWriteData, mDataSize); // Copy the write buffer
bytes_written = LLAPRFile::writeEx(mCache->mHeaderDataFileName, padBuffer, offset, size, mCache->getLocalAPRFilePool());
- delete [] padBuffer;
+ FREE_MEM(LLImageBase::getPrivatePool(), padBuffer);
}
else
{
@@ -698,7 +699,7 @@ void LLTextureCacheWorker::finishWork(S32 param, bool completed)
}
else
{
- delete[] mReadData;
+ FREE_MEM(LLImageBase::getPrivatePool(), mReadData);
mReadData = NULL;
}
}
@@ -1640,8 +1641,8 @@ void LLTextureCache::purgeTextures(bool validate)
{
purge_count++;
LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL;
- removeEntry(idx, entries[idx], filename) ;
cache_size -= entries[idx].mBodySize;
+ removeEntry(idx, entries[idx], filename) ;
}
}
@@ -1878,13 +1879,12 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename)
file_maybe_exists = false;
}
}
+ mTexturesSizeTotal -= entry.mBodySize;
entry.mImageSize = -1;
entry.mBodySize = 0;
mHeaderIDMap.erase(entry.mID);
- mTexturesSizeMap.erase(entry.mID);
-
- mTexturesSizeTotal -= entry.mBodySize;
+ mTexturesSizeMap.erase(entry.mID);
mFreeList.insert(idx);
}
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index fdfbee400e..b1312d641f 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -92,11 +92,7 @@ public:
multiselect_text("multiselect_text"),
caption_text("caption_text"),
border("border")
- {
- name = "texture picker";
- mouse_opaque(true);
- follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
- }
+ {}
};
protected:
LLTextureCtrl(const Params&);
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 18c3a3b87d..56dfb61c4f 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -817,7 +817,7 @@ void LLTextureFetchWorker::setImagePriority(F32 priority)
void LLTextureFetchWorker::resetFormattedData()
{
- delete[] mBuffer;
+ FREE_MEM(LLImageBase::getPrivatePool(), mBuffer);
mBuffer = NULL;
mBufferSize = 0;
if (mFormattedImage.notNull())
@@ -888,7 +888,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mSentRequest = UNSENT;
mDecoded = FALSE;
mWritten = FALSE;
- delete[] mBuffer;
+ FREE_MEM(LLImageBase::getPrivatePool(), mBuffer);
mBuffer = NULL;
mBufferSize = 0;
mHaveAllData = FALSE;
@@ -1284,7 +1284,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
llassert_always(mBufferSize == cur_size + mRequestedSize);
if(!mBufferSize)//no data received.
{
- delete[] mBuffer;
+ FREE_MEM(LLImageBase::getPrivatePool(), mBuffer);
mBuffer = NULL;
//abort.
@@ -1312,7 +1312,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFileSize = mBufferSize + 1 ; //flag the file is not fully loaded.
}
- U8* buffer = new U8[mBufferSize];
+ U8* buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), mBufferSize);
if (cur_size > 0)
{
memcpy(buffer, mFormattedImage->getData(), cur_size);
@@ -1321,7 +1321,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
// NOTE: setData releases current data and owns new data (buffer)
mFormattedImage->setData(buffer, mBufferSize);
// delete temp data
- delete[] mBuffer; // Note: not 'buffer' (assigned in setData())
+ FREE_MEM(LLImageBase::getPrivatePool(), mBuffer); // Note: not 'buffer' (assigned in setData())
mBuffer = NULL;
mBufferSize = 0;
mLoadedDiscard = mRequestedDiscard;
@@ -1618,7 +1618,7 @@ bool LLTextureFetchWorker::processSimulatorPackets()
if (buffer_size > cur_size)
{
/// We have new data
- U8* buffer = new U8[buffer_size];
+ U8* buffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), buffer_size);
S32 offset = 0;
if (cur_size > 0 && mFirstPacket > 0)
{
@@ -1670,7 +1670,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels,
if (data_size > 0)
{
// *TODO: set the formatted image data here directly to avoid the copy
- mBuffer = new U8[data_size];
+ mBuffer = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), data_size);
buffer->readAfter(channels.in(), NULL, mBuffer, data_size);
mBufferSize += data_size;
if (data_size < mRequestedSize && mRequestedDiscard == 0)
@@ -1811,7 +1811,7 @@ bool LLTextureFetchWorker::writeToCacheComplete()
// public
LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode)
- : LLWorkerThread("TextureFetch", threaded),
+ : LLWorkerThread("TextureFetch", threaded, true),
mDebugCount(0),
mDebugPause(FALSE),
mPacketCount(0),
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 0115115a23..1c89766b26 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -94,7 +94,7 @@ public:
Params()
: texture_view("texture_view")
{
- mouse_opaque(false);
+ changeDefault(mouse_opaque, false);
}
};
LLTextureBar(const Params& p)
@@ -387,7 +387,7 @@ public:
: texture_view("texture_view")
{
S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
- rect(LLRect(0,0,100,line_height * 4));
+ changeDefault(rect, LLRect(0,0,100,line_height * 4));
}
};
@@ -486,7 +486,7 @@ public:
: texture_view("texture_view")
{
S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
- rect(LLRect(0,0,100,line_height * 4));
+ changeDefault(rect, LLRect(0,0,100,line_height * 4));
}
};
@@ -527,11 +527,12 @@ void LLGLTexMemBar::draw()
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
- text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d",
+ text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d",
total_mem,
max_total_mem,
bound_mem,
max_bound_mem,
+ LLRenderTarget::sBytesAllocated/(1024*1024),
LLImageRaw::sGlobalRawMemory >> 20, discard_bias,
cache_usage, cache_max_usage, total_texture_downloaded, total_object_downloaded, total_http_requests);
//, cache_entries, cache_max_entries
@@ -571,7 +572,7 @@ void LLGLTexMemBar::draw()
color = (total_mem < llfloor(max_total_mem * texmem_lower_bound_scale)) ? LLColor4::green :
(total_mem < max_total_mem) ? LLColor4::yellow : LLColor4::red;
color[VALPHA] = .75f;
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
gl_rect_2d(left, top, right, bottom); // red/yellow/green
@@ -594,7 +595,7 @@ void LLGLTexMemBar::draw()
color = (bound_mem < llfloor(max_bound_mem * texmem_lower_bound_scale)) ? LLColor4::green :
(bound_mem < max_bound_mem) ? LLColor4::yellow : LLColor4::red;
color[VALPHA] = .75f;
- glColor4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
gl_rect_2d(left, top, right, bottom);
#else
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index e0b07ed408..c4b226b70b 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -113,7 +113,8 @@ LLToast::LLToast(const LLToast::Params& p)
mHideBtnPressed(false),
mIsTip(p.is_tip),
mWrapperPanel(NULL),
- mIsFading(false)
+ mIsFading(false),
+ mIsHovered(false)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
@@ -122,8 +123,6 @@ LLToast::LLToast(const LLToast::Params& p)
setCanDrag(FALSE);
mWrapperPanel = getChild<LLPanel>("wrapper_panel");
- mWrapperPanel->setMouseEnterCallback(boost::bind(&LLToast::onToastMouseEnter, this));
- mWrapperPanel->setMouseLeaveCallback(boost::bind(&LLToast::onToastMouseLeave, this));
setBackgroundOpaque(TRUE); // *TODO: obsolete
updateTransparency();
@@ -137,8 +136,6 @@ LLToast::LLToast(const LLToast::Params& p)
{
mHideBtn = getChild<LLButton>("hide_btn");
mHideBtn->setClickedCallback(boost::bind(&LLToast::hide,this));
- mHideBtn->setMouseEnterCallback(boost::bind(&LLToast::onToastMouseEnter, this));
- mHideBtn->setMouseLeaveCallback(boost::bind(&LLToast::onToastMouseLeave, this));
}
// init callbacks if present
@@ -331,6 +328,55 @@ void LLToast::draw()
drawChild(mHideBtn);
}
}
+
+ updateHoveredState();
+
+ LLToastLifeTimer* timer = getTimer();
+ if (!timer)
+ {
+ return;
+ }
+
+ // Started timer means the mouse had left the toast previously.
+ // If toast is hovered in the current frame we should handle
+ // a mouse enter event.
+ if(timer->getStarted() && mIsHovered)
+ {
+ mOnToastHoverSignal(this, MOUSE_ENTER);
+
+ updateTransparency();
+
+ //toasts fading is management by Screen Channel
+
+ sendChildToFront(mHideBtn);
+ if(mHideBtn && mHideBtn->getEnabled())
+ {
+ mHideBtn->setVisible(TRUE);
+ }
+ mToastMouseEnterSignal(this, getValue());
+ }
+ // Stopped timer means the mouse had entered the toast previously.
+ // If the toast is not hovered in the current frame we should handle
+ // a mouse leave event.
+ else if(!timer->getStarted() && !mIsHovered)
+ {
+ mOnToastHoverSignal(this, MOUSE_LEAVE);
+
+ updateTransparency();
+
+ //toasts fading is management by Screen Channel
+
+ if(mHideBtn && mHideBtn->getEnabled())
+ {
+ if( mHideBtnPressed )
+ {
+ mHideBtnPressed = false;
+ return;
+ }
+ mHideBtn->setVisible(FALSE);
+ }
+ mToastMouseLeaveSignal(this, getValue());
+ }
}
//--------------------------------------------------------------------------
@@ -378,37 +424,11 @@ void LLToast::setVisible(BOOL show)
}
}
-void LLToast::onToastMouseEnter()
+void LLToast::updateHoveredState()
{
- LLRect panel_rc = mWrapperPanel->calcScreenRect();
- LLRect button_rc;
- if(mHideBtn)
- {
- button_rc = mHideBtn->calcScreenRect();
- }
-
S32 x, y;
LLUI::getMousePositionScreen(&x, &y);
- if(panel_rc.pointInRect(x, y) || button_rc.pointInRect(x, y))
- {
- mOnToastHoverSignal(this, MOUSE_ENTER);
-
- updateTransparency();
-
- //toasts fading is management by Screen Channel
-
- sendChildToFront(mHideBtn);
- if(mHideBtn && mHideBtn->getEnabled())
- {
- mHideBtn->setVisible(TRUE);
- }
- mToastMouseEnterSignal(this, getValue());
- }
-}
-
-void LLToast::onToastMouseLeave()
-{
LLRect panel_rc = mWrapperPanel->calcScreenRect();
LLRect button_rc;
if(mHideBtn)
@@ -416,28 +436,32 @@ void LLToast::onToastMouseLeave()
button_rc = mHideBtn->calcScreenRect();
}
- S32 x, y;
- LLUI::getMousePositionScreen(&x, &y);
-
- if( !panel_rc.pointInRect(x, y) && !button_rc.pointInRect(x, y))
+ if (!panel_rc.pointInRect(x, y) && !button_rc.pointInRect(x, y))
{
- mOnToastHoverSignal(this, MOUSE_LEAVE);
+ // mouse is not over this toast
+ mIsHovered = false;
+ return;
+ }
- updateTransparency();
+ bool is_overlapped_by_other_floater = false;
- //toasts fading is management by Screen Channel
+ const child_list_t* child_list = gFloaterView->getChildList();
- if(mHideBtn && mHideBtn->getEnabled())
+ // find this toast in gFloaterView child list to check whether any floater
+ // with higher Z-order is visible under the mouse pointer overlapping this toast
+ child_list_const_reverse_iter_t r_iter = std::find(child_list->rbegin(), child_list->rend(), this);
+ if (r_iter != child_list->rend())
+ {
+ // skip this toast and proceed to views above in Z-order
+ for (++r_iter; r_iter != child_list->rend(); ++r_iter)
{
- if( mHideBtnPressed )
- {
- mHideBtnPressed = false;
- return;
- }
- mHideBtn->setVisible(FALSE);
+ LLView* view = *r_iter;
+ is_overlapped_by_other_floater = view->isInVisibleChain() && view->calcScreenRect().pointInRect(x, y);
+ if (is_overlapped_by_other_floater) break;
}
- mToastMouseLeaveSignal(this, getValue());
}
+
+ mIsHovered = !is_overlapped_by_other_floater;
}
void LLToast::setBackgroundOpaque(BOOL b)
@@ -495,13 +519,6 @@ void LLNotificationsUI::LLToast::startTimer()
}
}
-bool LLToast::isHovered()
-{
- S32 x, y;
- LLUI::getMousePositionScreen(&x, &y);
- return mWrapperPanel->calcScreenRect().pointInRect(x, y);
-}
-
//--------------------------------------------------------------------------
BOOL LLToast::handleMouseDown(S32 x, S32 y, MASK mask)
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 242f786bf2..77229e7beb 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -120,7 +120,7 @@ public:
/** Start lifetime/fading timer */
virtual void startTimer();
- bool isHovered();
+ bool isHovered() { return mIsHovered; }
// Operating with toasts
// insert a panel to a toast
@@ -196,16 +196,13 @@ public:
virtual S32 notifyParent(const LLSD& info);
- LLHandle<LLToast> getHandle() { mHandle.bind(this); return mHandle; }
+ LLHandle<LLToast> getHandle() const { return getDerivedHandle<LLToast>(); }
protected:
void updateTransparency();
private:
-
- void onToastMouseEnter();
-
- void onToastMouseLeave();
+ void updateHoveredState();
void expire();
@@ -215,7 +212,7 @@ private:
LLUUID mSessionID;
LLNotificationPtr mNotification;
- LLRootHandle<LLToast> mHandle;
+ //LLRootHandle<LLToast> mHandle;
LLPanel* mWrapperPanel;
@@ -236,6 +233,7 @@ private:
bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
bool mIsTip;
bool mIsFading;
+ bool mIsHovered;
commit_signal_t mToastMouseEnterSignal;
commit_signal_t mToastMouseLeaveSignal;
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index fa91f129b8..de305bf3d9 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -91,8 +91,6 @@ mCloseNotificationOnDestroy(true)
sFont = LLFontGL::getFontSansSerif();
sFontSmall = LLFontGL::getFontSansSerifSmall();
}
- // clicking on a button does not steal current focus
- setIsChrome(TRUE);
// initialize
setFocusRoot(!mIsTip);
// get a form for the notification
@@ -307,8 +305,14 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
S32 bottom_offset = mIsScriptDialog ? (BTN_HEIGHT + IGNORE_BTN_TOP_DELTA + BOTTOM_PAD) : BOTTOM_PAD;
S32 max_width = mControlPanel->getRect().getWidth();
LLButton* ignore_btn = NULL;
+ LLButton* mute_btn = NULL;
for (std::vector<index_button_pair_t>::const_iterator it = buttons.begin(); it != buttons.end(); it++)
{
+ if (-2 == it->first)
+ {
+ mute_btn = it->second;
+ continue;
+ }
if (it->first == -1)
{
ignore_btn = it->second;
@@ -328,6 +332,8 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
left = btn_rect.mLeft + btn_rect.getWidth() + h_pad;
mControlPanel->addChild(btn, -1);
}
+
+ U32 ignore_btn_width = 0;
if (mIsScriptDialog && ignore_btn != NULL)
{
LLRect ignore_btn_rect(ignore_btn->getRect());
@@ -340,8 +346,25 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
ignore_btn_rect.setOriginAndSize(ignore_btn_left, BOTTOM_PAD,// always move ignore button at the bottom
ignore_btn_rect.getWidth(), ignore_btn_rect.getHeight());
ignore_btn->setRect(ignore_btn_rect);
+ ignore_btn_width = ignore_btn_rect.getWidth();
mControlPanel->addChild(ignore_btn, -1);
}
+
+ if (mIsScriptDialog && mute_btn != NULL)
+ {
+ LLRect mute_btn_rect(mute_btn->getRect());
+ S32 buttons_per_row = max_width / BUTTON_WIDTH; //assume that h_pad far less than BUTTON_WIDTH
+ // Place mute (Block) button to the left of the ignore button.
+ S32 mute_btn_left = buttons_per_row * BUTTON_WIDTH + (buttons_per_row - 1) * h_pad - mute_btn_rect.getWidth() - ignore_btn_width - (h_pad / 2);
+ if (mute_btn_left + mute_btn_rect.getWidth() > max_width) // make sure that the mute button is in panel
+ {
+ mute_btn_left = max_width - mute_btn_rect.getWidth() - 2 * HPAD;
+ }
+ mute_btn_rect.setOriginAndSize(mute_btn_left, BOTTOM_PAD,// always move mute button at the bottom
+ mute_btn_rect.getWidth(), mute_btn_rect.getHeight());
+ mute_btn->setRect(mute_btn_rect);
+ mControlPanel->addChild(mute_btn);
+ }
}
void LLToastNotifyPanel::adjustPanelForScriptNotice(S32 button_panel_width, S32 button_panel_height)
diff --git a/indra/newview/lltool.h b/indra/newview/lltool.h
index d3edabb486..ecc435d844 100644
--- a/indra/newview/lltool.h
+++ b/indra/newview/lltool.h
@@ -68,7 +68,7 @@ public:
virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const
{ *screen_x = local_x; *screen_y = local_y; }
- virtual std::string getName() const { return mName; }
+ virtual const std::string& getName() const { return mName; }
// New virtual functions
virtual LLViewerObject* getEditingObject() { return NULL; }
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
deleted file mode 100644
index c4f599561d..0000000000
--- a/indra/newview/lltoolbar.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-/**
- * @file lltoolbar.cpp
- * @author James Cook, Richard Nelson
- * @brief Large friendly buttons at bottom of screen.
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lltoolbar.h"
-
-#include "imageids.h"
-#include "llfloaterreg.h"
-#include "llfontgl.h"
-#include "llflyoutbutton.h"
-#include "llrect.h"
-#include "llparcel.h"
-
-#include "llagent.h"
-#include "llagentwearables.h"
-#include "llbutton.h"
-#include "llfocusmgr.h"
-#include "llviewercontrol.h"
-#include "llmenucommands.h"
-#include "llimview.h"
-#include "lluiconstants.h"
-#include "llvoavatarself.h"
-#include "lltooldraganddrop.h"
-#include "llfloaterinventory.h"
-#include "llfloaterchatterbox.h"
-#include "llfloatersnapshot.h"
-#include "llinventorypanel.h"
-#include "lltoolmgr.h"
-#include "llui.h"
-#include "llviewermenu.h"
-//#include "llfirstuse.h"
-#include "llpanelblockedlist.h"
-#include "llscrolllistctrl.h"
-#include "llscrolllistitem.h"
-#include "llscrolllistcell.h"
-#include "llviewerparcelmgr.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "lltoolgrab.h"
-#include "llcombobox.h"
-#include "lllayoutstack.h"
-
-#if LL_DARWIN
-
- #include "llresizehandle.h"
-
-#endif // LL_DARWIN
-
-//
-// Globals
-//
-
-LLToolBar *gToolBar = NULL;
-
-//
-// Statics
-//
-F32 LLToolBar::sInventoryAutoOpenTime = 1.f;
-
-//
-// Functions
-//
-
-LLToolBar::LLToolBar()
- : LLPanel(),
-
- mInventoryAutoOpen(FALSE),
- mNumUnreadIMs(0)
-#if LL_DARWIN
- , mResizeHandle(NULL)
-#endif // LL_DARWIN
-{
- setIsChrome(TRUE);
- setFocusRoot(TRUE);
-
- mCommitCallbackRegistrar.add("HandleCommunicate", &LLToolBar::onClickCommunicate);
-}
-
-
-BOOL LLToolBar::postBuild()
-{
- for (child_list_const_iter_t child_iter = getChildList()->begin();
- child_iter != getChildList()->end(); ++child_iter)
- {
- LLView *view = *child_iter;
- LLButton* buttonp = dynamic_cast<LLButton*>(view);
- if(buttonp)
- {
- buttonp->setSoundFlags(LLView::SILENT);
- }
- }
-
-#if LL_DARWIN
- if(mResizeHandle == NULL)
- {
- LLRect rect(0, 0, RESIZE_HANDLE_WIDTH, RESIZE_HANDLE_HEIGHT);
- LLResizeHandle::Params p;
- p.name("");
- p.rect(rect);
- p.min_width(RESIZE_HANDLE_WIDTH);
- p.min_height(RESIZE_HANDLE_HEIGHT);
- p.enabled(false);
- mResizeHandle = LLUICtrlFactory::create<LLResizeHandle>(p);
- addChildInBack(mResizeHandle);
- LLLayoutStack* toolbar_stack = getChild<LLLayoutStack>("toolbar_stack");
- toolbar_stack->reshape(toolbar_stack->getRect().getWidth() - RESIZE_HANDLE_WIDTH, toolbar_stack->getRect().getHeight());
- }
-#endif // LL_DARWIN
-
- layoutButtons();
-
- return TRUE;
-}
-
-LLToolBar::~LLToolBar()
-{
- // LLView destructor cleans up children
-}
-
-
-BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
-{
- LLButton* inventory_btn = getChild<LLButton>("inventory_btn");
- if (!inventory_btn) return FALSE;
-
- LLRect button_screen_rect;
- inventory_btn->localRectToScreen(inventory_btn->getRect(),&button_screen_rect);
-
- const LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
- if(active_panel)
- {
- mInventoryAutoOpen = FALSE;
- }
- else if (button_screen_rect.pointInRect(x, y))
- {
- if (mInventoryAutoOpen)
- {
- if (!active_panel &&
- mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime)
- {
- LLFloaterInventory::showAgentInventory();
- }
- }
- else
- {
- mInventoryAutoOpen = TRUE;
- mInventoryAutoOpenTimer.reset();
- }
- }
-
- return LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
-}
-
-// static
-void LLToolBar::toggle(void*)
-{
- BOOL show = gSavedSettings.getBOOL("ShowToolBar");
- gSavedSettings.setBOOL("ShowToolBar", !show);
- gToolBar->setVisible(!show);
-}
-
-
-// static
-BOOL LLToolBar::visible(void*)
-{
- return gToolBar->getVisible();
-}
-
-
-void LLToolBar::layoutButtons()
-{
-#if LL_DARWIN
- const S32 FUDGE_WIDTH_OF_SCREEN = 4;
- S32 width = gViewerWindow->getWindowWidthScaled() + FUDGE_WIDTH_OF_SCREEN;
- S32 pad = 2;
-
- // this function may be called before postBuild(), in which case mResizeHandle won't have been set up yet.
- if(mResizeHandle != NULL)
- {
- // Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar.
- width -= RESIZE_HANDLE_WIDTH;
-
- LLRect r;
- r.mLeft = width - pad;
- r.mBottom = 0;
- r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH;
- r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT;
- mResizeHandle->setRect(r);
- mResizeHandle->setVisible(TRUE);
- }
-#endif // LL_DARWIN
-}
-
-
-// virtual
-void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- LLPanel::reshape(width, height, called_from_parent);
-
- layoutButtons();
-}
-
-
-// Per-frame updates of visibility
-void LLToolBar::refresh()
-{
- BOOL show = gSavedSettings.getBOOL("ShowToolBar");
- BOOL mouselook = gAgent.cameraMouselook();
- setVisible(show && !mouselook);
-
- if (isInVisibleChain())
- {
- updateCommunicateList();
- }
-}
-
-void LLToolBar::updateCommunicateList()
-{
- LLFlyoutButton* communicate_button = getChild<LLFlyoutButton>("communicate_btn");
- LLSD selected = communicate_button->getValue();
-
- communicate_button->removeall();
-
- //LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater();
- LLScrollListItem* itemp = NULL;
-
- LLSD contact_sd;
- contact_sd["value"] = "contacts";
- /*contact_sd["columns"][0]["value"] = LLFloaterMyFriends::getInstance()->getShortTitle();
- if (LLFloaterMyFriends::getInstance() == frontmost_floater)
- {
- contact_sd["columns"][0]["font"]["name"] = "SANSSERIF_SMALL";
- contact_sd["columns"][0]["font"]["style"] = "BOLD";
- // make sure current tab is selected in list
- if (selected.isUndefined())
- {
- selected = "contacts";
- }
- }*/
- itemp = communicate_button->addElement(contact_sd, ADD_TOP);
-
- communicate_button->addSeparator(ADD_TOP);
- communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP);
- communicate_button->addSeparator(ADD_TOP);
- communicate_button->add(getString("Blocked List"), LLSD("mute list"), ADD_TOP);
-
- std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it;
-
- /*if (gIMMgr->getIMFloaterHandles().size() > 0)
- {
- communicate_button->addSeparator(ADD_TOP);
- }
-
- for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
- {
- LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)floater_handle_it->get();
- if (im_floaterp)
- {
- std::string floater_title = im_floaterp->getNumUnreadMessages() > 0 ? "*" : "";
- floater_title.append(im_floaterp->getShortTitle());
- LLSD im_sd;
- im_sd["value"] = im_floaterp->getSessionID();
- im_sd["columns"][0]["value"] = floater_title;
- if (im_floaterp == frontmost_floater)
- {
- im_sd["columns"][0]["font"]["name"] = "SANSSERIF_SMALL";
- im_sd["columns"][0]["font"]["style"] = "BOLD";
- if (selected.isUndefined())
- {
- selected = im_floaterp->getSessionID();
- }
- }
- itemp = communicate_button->addElement(im_sd, ADD_TOP);
- }
- }*/
-
- communicate_button->setValue(selected);
-}
-
-
-// static
-void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data)
-{
- LLFlyoutButton* communicate_button = dynamic_cast<LLFlyoutButton*>(ctrl);
- llassert_always(communicate_button);
-
- LLSD selected_option = communicate_button->getValue();
-
- if (selected_option.asString() == "contacts")
- {
- LLFloaterReg::showInstance("contacts", "friends");
- }
- else if (selected_option.asString() == "local chat")
- {
- LLFloaterReg::showInstance("communicate", "local");
- }
- else if (selected_option.asString() == "redock")
- {
- /*LLFloaterChatterBox* chatterbox_instance = LLFloaterChatterBox::getInstance();
- if(chatterbox_instance)
- {
- chatterbox_instance->addFloater(LLFloaterMyFriends::getInstance(), FALSE);
-
- LLUUID session_to_show;
-
- std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it;
- for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
- {
- LLFloater* im_floaterp = floater_handle_it->get();
- if (im_floaterp)
- {
- if (im_floaterp->isFrontmost())
- {
- session_to_show = ((LLFloaterIMPanel*)im_floaterp)->getSessionID();
- }
- chatterbox_instance->addFloater(im_floaterp, FALSE);
- }
- }
- LLFloaterReg::showInstance("communicate", session_to_show);
- }*/
- }
- else if (selected_option.asString() == "mute list")
- {
- LLPanelBlockedList::showPanelAndSelect(LLUUID::null);
- }
- else if (selected_option.isUndefined()) // user just clicked the communicate button, treat as toggle
- {
- /*LLFloaterReg::toggleInstance("communicate");*/
- }
- else // otherwise selection_option is undifined or a specific IM session id
- {
- /*LLFloaterReg::showInstance("communicate", selected_option);*/
- }
-}
-
-
diff --git a/indra/newview/lltoolbar.h b/indra/newview/lltoolbar.h
deleted file mode 100644
index 217b3c0ac8..0000000000
--- a/indra/newview/lltoolbar.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * @file lltoolbar.h
- * @brief Large friendly buttons at bottom of screen.
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLTOOLBAR_H
-#define LL_LLTOOLBAR_H
-
-#include "llpanel.h"
-
-#include "llframetimer.h"
-
-class LLResizeHandle;
-
-class LLToolBar
-: public LLPanel
-{
-public:
- LLToolBar();
- ~LLToolBar();
-
- /*virtual*/ BOOL postBuild();
-
- /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg);
-
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- static void toggle(void*);
- static BOOL visible(void*);
-
- // Move buttons to appropriate locations based on rect.
- void layoutButtons();
-
- // Per-frame refresh call
- void refresh();
-
- // callbacks
- static void onClickCommunicate(LLUICtrl*, const LLSD&);
-
- static F32 sInventoryAutoOpenTime;
-
-private:
- void updateCommunicateList();
-
-
-private:
- BOOL mInventoryAutoOpen;
- LLFrameTimer mInventoryAutoOpenTimer;
- S32 mNumUnreadIMs;
-#if LL_DARWIN
- LLResizeHandle *mResizeHandle;
-#endif // LL_DARWIN
-};
-
-extern LLToolBar *gToolBar;
-
-#endif
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
new file mode 100644
index 0000000000..eccb2cf2f1
--- /dev/null
+++ b/indra/newview/lltoolbarview.cpp
@@ -0,0 +1,697 @@
+/**
+ * @file lltoolbarview.cpp
+ * @author Merov Linden
+ * @brief User customizable toolbar class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lltoolbarview.h"
+
+#include "llappviewer.h"
+#include "llbutton.h"
+#include "llclipboard.h"
+#include "lldir.h"
+#include "lldockablefloater.h"
+#include "lldockcontrol.h"
+#include "llimview.h"
+#include "lltransientfloatermgr.h"
+#include "lltoolbar.h"
+#include "lltooldraganddrop.h"
+#include "llxmlnode.h"
+
+#include "llagent.h" // HACK for destinations guide on startup
+#include "llfloaterreg.h" // HACK for destinations guide on startup
+#include "llviewercontrol.h" // HACK for destinations guide on startup
+
+#include <boost/foreach.hpp>
+
+LLToolBarView* gToolBarView = NULL;
+
+static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
+
+void handleLoginToolbarSetup();
+
+bool isToolDragged()
+{
+ return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER);
+}
+
+LLToolBarView::Toolbar::Toolbar()
+: button_display_mode("button_display_mode"),
+ commands("command")
+{}
+
+LLToolBarView::ToolbarSet::ToolbarSet()
+: left_toolbar("left_toolbar"),
+ right_toolbar("right_toolbar"),
+ bottom_toolbar("bottom_toolbar")
+{}
+
+
+LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
+: LLUICtrl(p),
+ mDragStarted(false),
+ mShowToolbars(true),
+ mDragToolbarButton(NULL),
+ mToolbarsLoaded(false)
+{
+ for (S32 i = 0; i < TOOLBAR_COUNT; i++)
+ {
+ mToolbars[i] = NULL;
+ }
+}
+
+void LLToolBarView::initFromParams(const LLToolBarView::Params& p)
+{
+ // Initialize the base object
+ LLUICtrl::initFromParams(p);
+}
+
+LLToolBarView::~LLToolBarView()
+{
+ saveToolbars();
+}
+
+BOOL LLToolBarView::postBuild()
+{
+ mToolbars[TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left");
+ mToolbars[TOOLBAR_RIGHT] = getChild<LLToolBar>("toolbar_right");
+ mToolbars[TOOLBAR_BOTTOM] = getChild<LLToolBar>("toolbar_bottom");
+
+ for (int i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ mToolbars[i]->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolbars[i]->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolbars[i]->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbars[i]->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded,_1));
+ mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1));
+ }
+
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
+
+ return TRUE;
+}
+
+S32 LLToolBarView::hasCommand(const LLCommandId& commandId) const
+{
+ S32 command_location = TOOLBAR_NONE;
+
+ for (S32 loc = TOOLBAR_FIRST; loc <= TOOLBAR_LAST; loc++)
+ {
+ if (mToolbars[loc]->hasCommand(commandId))
+ {
+ command_location = loc;
+ break;
+ }
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::addCommand(const LLCommandId& commandId, EToolBarLocation toolbar, int rank)
+{
+ int old_rank;
+ removeCommand(commandId, old_rank);
+
+ S32 command_location = mToolbars[toolbar]->addCommand(commandId, rank);
+
+ return command_location;
+}
+
+S32 LLToolBarView::removeCommand(const LLCommandId& commandId, int& rank)
+{
+ S32 command_location = hasCommand(commandId);
+ rank = LLToolBar::RANK_NONE;
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ rank = mToolbars[command_location]->removeCommand(commandId);
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::enableCommand(const LLCommandId& commandId, bool enabled)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ mToolbars[command_location]->enableCommand(commandId, enabled);
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::stopCommandInProgress(const LLCommandId& commandId)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ mToolbars[command_location]->stopCommandInProgress(commandId);
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::flashCommand(const LLCommandId& commandId, bool flash)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ mToolbars[command_location]->flashCommand(commandId, flash);
+ }
+
+ return command_location;
+}
+
+bool LLToolBarView::addCommandInternal(const LLCommandId& command, LLToolBar* toolbar)
+{
+ LLCommandManager& mgr = LLCommandManager::instance();
+ if (mgr.getCommand(command))
+ {
+ toolbar->addCommand(command);
+ }
+ else
+ {
+ llwarns << "Toolbars creation : the command with id " << command.uuid().asString() << " cannot be found in the command manager" << llendl;
+ return false;
+ }
+ return true;
+}
+
+bool LLToolBarView::loadToolbars(bool force_default)
+{
+ LLToolBarView::ToolbarSet toolbar_set;
+ bool err = false;
+
+ // Load the toolbars.xml file
+ std::string toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "toolbars.xml");
+ if (force_default)
+ {
+ toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "toolbars.xml");
+ }
+ else if (!gDirUtilp->fileExists(toolbar_file))
+ {
+ llwarns << "User toolbars def not found -> use default" << llendl;
+ toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "toolbars.xml");
+ }
+
+ LLXMLNodePtr root;
+ if(!LLXMLNode::parseFile(toolbar_file, root, NULL))
+ {
+ llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl;
+ err = true;
+ }
+
+ if (!err && !root->hasName("toolbars"))
+ {
+ llwarns << toolbar_file << " is not a valid toolbars definition file" << llendl;
+ err = true;
+ }
+
+ // Parse the toolbar settings
+ LLXUIParser parser;
+ if (!err)
+ {
+ parser.readXUI(root, toolbar_set, toolbar_file);
+ }
+ if (!err && !toolbar_set.validateBlock())
+ {
+ llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl;
+ err = true;
+ }
+
+ if (err)
+ {
+ if (force_default)
+ {
+ llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl;
+ return false;
+ }
+ // Try to load the default toolbars
+ return loadToolbars(true);
+ }
+
+ // Clear the toolbars now before adding the loaded commands and settings
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ if (mToolbars[i])
+ {
+ mToolbars[i]->clearCommandsList();
+ }
+ }
+
+ // Add commands to each toolbar
+ if (toolbar_set.left_toolbar.isProvided() && mToolbars[TOOLBAR_LEFT])
+ {
+ if (toolbar_set.left_toolbar.button_display_mode.isProvided())
+ {
+ LLToolBarEnums::ButtonType button_type = toolbar_set.left_toolbar.button_display_mode;
+ mToolbars[TOOLBAR_LEFT]->setButtonType(button_type);
+ }
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.left_toolbar.commands)
+ {
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_LEFT]))
+ {
+ llwarns << "Error adding command '" << command_params.name() << "' to left toolbar." << llendl;
+ }
+ }
+ }
+ if (toolbar_set.right_toolbar.isProvided() && mToolbars[TOOLBAR_RIGHT])
+ {
+ if (toolbar_set.right_toolbar.button_display_mode.isProvided())
+ {
+ LLToolBarEnums::ButtonType button_type = toolbar_set.right_toolbar.button_display_mode;
+ mToolbars[TOOLBAR_RIGHT]->setButtonType(button_type);
+ }
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.right_toolbar.commands)
+ {
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_RIGHT]))
+ {
+ llwarns << "Error adding command '" << command_params.name() << "' to right toolbar." << llendl;
+ }
+ }
+ }
+ if (toolbar_set.bottom_toolbar.isProvided() && mToolbars[TOOLBAR_BOTTOM])
+ {
+ if (toolbar_set.bottom_toolbar.button_display_mode.isProvided())
+ {
+ LLToolBarEnums::ButtonType button_type = toolbar_set.bottom_toolbar.button_display_mode;
+ mToolbars[TOOLBAR_BOTTOM]->setButtonType(button_type);
+ }
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.bottom_toolbar.commands)
+ {
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_BOTTOM]))
+ {
+ llwarns << "Error adding command '" << command_params.name() << "' to bottom toolbar." << llendl;
+ }
+ }
+ }
+ mToolbarsLoaded = true;
+ return true;
+}
+
+bool LLToolBarView::clearToolbars()
+{
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ if (mToolbars[i])
+ {
+ mToolbars[i]->clearCommandsList();
+ }
+ }
+
+ return true;
+}
+
+//static
+bool LLToolBarView::loadDefaultToolbars()
+{
+ bool retval = false;
+
+ if (gToolBarView)
+ {
+ retval = gToolBarView->loadToolbars(true);
+ if (retval)
+ {
+ gToolBarView->saveToolbars();
+ }
+ }
+
+ return retval;
+}
+
+//static
+bool LLToolBarView::clearAllToolbars()
+{
+ bool retval = false;
+
+ if (gToolBarView)
+ {
+ retval = gToolBarView->clearToolbars();
+ if (retval)
+ {
+ gToolBarView->saveToolbars();
+ }
+ }
+
+ return retval;
+}
+
+void LLToolBarView::saveToolbars() const
+{
+ if (!mToolbarsLoaded)
+ return;
+
+ // Build the parameter tree from the toolbar data
+ LLToolBarView::ToolbarSet toolbar_set;
+ if (mToolbars[TOOLBAR_LEFT])
+ {
+ toolbar_set.left_toolbar.button_display_mode = mToolbars[TOOLBAR_LEFT]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_LEFT]->getCommandsList(), toolbar_set.left_toolbar);
+ }
+ if (mToolbars[TOOLBAR_RIGHT])
+ {
+ toolbar_set.right_toolbar.button_display_mode = mToolbars[TOOLBAR_RIGHT]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_RIGHT]->getCommandsList(), toolbar_set.right_toolbar);
+ }
+ if (mToolbars[TOOLBAR_BOTTOM])
+ {
+ toolbar_set.bottom_toolbar.button_display_mode = mToolbars[TOOLBAR_BOTTOM]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_BOTTOM]->getCommandsList(), toolbar_set.bottom_toolbar);
+ }
+
+ // Serialize the parameter tree
+ LLXMLNodePtr output_node = new LLXMLNode("toolbars", false);
+ LLXUIParser parser;
+ parser.writeXUI(output_node, toolbar_set);
+
+ // Write the resulting XML to file
+ if(!output_node->isNull())
+ {
+ const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "toolbars.xml");
+ LLFILE *fp = LLFile::fopen(filename, "w");
+ if (fp != NULL)
+ {
+ LLXMLNode::writeHeaderToFile(fp);
+ output_node->writeToFile(fp);
+ fclose(fp);
+ }
+ }
+}
+
+// Enumerate the commands in command_list and add them as Params to the toolbar
+void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const
+{
+ LLCommandManager& mgr = LLCommandManager::instance();
+
+ for (command_id_list_t::const_iterator it = command_list.begin();
+ it != command_list.end();
+ ++it)
+ {
+ LLCommand* command = mgr.getCommand(*it);
+ if (command)
+ {
+ LLCommandId::Params command_name_param;
+ command_name_param.name = command->name();
+ toolbar.commands.add(command_name_param);
+ }
+ }
+}
+
+void LLToolBarView::onToolBarButtonAdded(LLView* button)
+{
+ llassert(button);
+
+ if (button->getName() == "speak")
+ {
+ // Add the "Speak" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Speak".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+
+ // Redock incoming and/or outgoing call windows, if applicable
+
+ LLFloater* incoming_floater = LLFloaterReg::getLastFloaterInGroup("incoming_call");
+ LLFloater* outgoing_floater = LLFloaterReg::getLastFloaterInGroup("outgoing_call");
+
+ if (incoming_floater && incoming_floater->isShown())
+ {
+ LLCallDialog* incoming = dynamic_cast<LLCallDialog *>(incoming_floater);
+ llassert(incoming);
+
+ LLDockControl* dock_control = incoming->getDockControl();
+ if (dock_control->getDock() == NULL)
+ {
+ incoming->dockToToolbarButton("speak");
+ }
+ }
+
+ if (outgoing_floater && outgoing_floater->isShown())
+ {
+ LLCallDialog* outgoing = dynamic_cast<LLCallDialog *>(outgoing_floater);
+ llassert(outgoing);
+
+ LLDockControl* dock_control = outgoing->getDockControl();
+ if (dock_control->getDock() == NULL)
+ {
+ outgoing->dockToToolbarButton("speak");
+ }
+ }
+ }
+ else if (button->getName() == "voice")
+ {
+ // Add the "Voice controls" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Voice controls".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+ }
+}
+
+void LLToolBarView::onToolBarButtonRemoved(LLView* button)
+{
+ llassert(button);
+
+ if (button->getName() == "speak")
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(button);
+
+ // Undock incoming and/or outgoing call windows
+
+ LLFloater* incoming_floater = LLFloaterReg::getLastFloaterInGroup("incoming_call");
+ LLFloater* outgoing_floater = LLFloaterReg::getLastFloaterInGroup("outgoing_call");
+
+ if (incoming_floater && incoming_floater->isShown())
+ {
+ LLDockableFloater* incoming = dynamic_cast<LLDockableFloater *>(incoming_floater);
+ llassert(incoming);
+
+ LLDockControl* dock_control = incoming->getDockControl();
+ dock_control->setDock(NULL);
+ }
+
+ if (outgoing_floater && outgoing_floater->isShown())
+ {
+ LLDockableFloater* outgoing = dynamic_cast<LLDockableFloater *>(outgoing_floater);
+ llassert(outgoing);
+
+ LLDockControl* dock_control = outgoing->getDockControl();
+ dock_control->setDock(NULL);
+ }
+ }
+ else if (button->getName() == "voice")
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(button);
+ }
+}
+
+void LLToolBarView::draw()
+{
+ LLRect toolbar_rects[TOOLBAR_COUNT];
+
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ if (mToolbars[i])
+ {
+ LLLayoutStack::ELayoutOrientation orientation = LLToolBarEnums::getOrientation(mToolbars[i]->getSideType());
+
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ mToolbars[i]->getParent()->reshape(mToolbars[i]->getParent()->getRect().getWidth(), mToolbars[i]->getRect().getHeight());
+ }
+ else
+ {
+ mToolbars[i]->getParent()->reshape(mToolbars[i]->getRect().getWidth(), mToolbars[i]->getParent()->getRect().getHeight());
+ }
+
+ mToolbars[i]->localRectToOtherView(mToolbars[i]->getLocalRect(), &toolbar_rects[i], this);
+ }
+ }
+
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ mToolbars[i]->getParent()->setVisible(mShowToolbars
+ && (mToolbars[i]->hasButtons()
+ || isToolDragged()));
+ }
+
+ // Draw drop zones if drop of a tool is active
+ if (isToolDragged())
+ {
+ LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
+
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ gl_rect_2d(toolbar_rects[i], drop_color, TRUE);
+ }
+ }
+
+ LLUICtrl::draw();
+}
+
+
+// ----------------------------------------
+// Drag and Drop Handling
+// ----------------------------------------
+
+
+void LLToolBarView::startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton)
+{
+ resetDragTool(toolbarButton);
+
+ // Flag the tool dragging but don't start it yet
+ LLToolDragAndDrop::getInstance()->setDragStart( x, y );
+}
+
+BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)
+{
+ if (LLToolDragAndDrop::getInstance()->isOverThreshold( x, y ))
+ {
+ if (!gToolBarView->mDragStarted)
+ {
+ // Start the tool dragging:
+
+ // First, create the global drag and drop object
+ std::vector<EDragAndDropType> types;
+ uuid_vec_t cargo_ids;
+ types.push_back(DAD_WIDGET);
+ cargo_ids.push_back(uuid);
+ gClipboard.setSourceObject(uuid,LLAssetType::AT_WIDGET);
+ LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER;
+ LLUUID srcID;
+ LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID);
+
+ // Second, stop the command if it is in progress and requires stopping!
+ LLCommandId command_id = LLCommandId(uuid);
+ gToolBarView->stopCommandInProgress(command_id);
+
+ gToolBarView->mDragStarted = true;
+ return TRUE;
+ }
+ else
+ {
+ MASK mask = 0;
+ return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask );
+ }
+ }
+ return FALSE;
+}
+
+BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar)
+{
+ BOOL handled = FALSE;
+ LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;
+
+ LLAssetType::EType type = inv_item->getType();
+ if (type == LLAssetType::AT_WIDGET)
+ {
+ handled = TRUE;
+ // Get the command from its uuid
+ LLCommandManager& mgr = LLCommandManager::instance();
+ LLCommandId command_id(inv_item->getUUID());
+ LLCommand* command = mgr.getCommand(command_id);
+ if (command)
+ {
+ // Suppress the command from the toolbars (including the one it's dropped in,
+ // this will handle move position).
+ S32 old_toolbar_loc = gToolBarView->hasCommand(command_id);
+ LLToolBar* old_toolbar = NULL;
+
+ if (old_toolbar_loc != TOOLBAR_NONE)
+ {
+ llassert(gToolBarView->mDragToolbarButton);
+ old_toolbar = gToolBarView->mDragToolbarButton->getParentByType<LLToolBar>();
+ if (old_toolbar->isReadOnly() && toolbar->isReadOnly())
+ {
+ // do nothing
+ }
+ else
+ {
+ int old_rank = LLToolBar::RANK_NONE;
+ gToolBarView->removeCommand(command_id, old_rank);
+ }
+ }
+
+ // Convert the (x,y) position in rank in toolbar
+ if (!toolbar->isReadOnly())
+ {
+ int new_rank = toolbar->getRankFromPosition(x,y);
+ toolbar->addCommand(command_id, new_rank);
+ }
+
+ // Save the new toolbars configuration
+ gToolBarView->saveToolbars();
+ }
+ else
+ {
+ llwarns << "Command couldn't be found in command manager" << llendl;
+ }
+ }
+
+ resetDragTool(NULL);
+ return handled;
+}
+
+void LLToolBarView::resetDragTool(LLToolBarButton* toolbarButton)
+{
+ // Clear the saved command, toolbar and rank
+ gToolBarView->mDragStarted = false;
+ gToolBarView->mDragToolbarButton = toolbarButton;
+}
+
+void LLToolBarView::setToolBarsVisible(bool visible)
+{
+ mShowToolbars = visible;
+}
+
+bool LLToolBarView::isModified() const
+{
+ bool modified = false;
+
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ modified |= mToolbars[i]->isModified();
+ }
+
+ return modified;
+}
+
+
+//
+// HACK to bring up destinations guide at startup
+//
+
+void handleLoginToolbarSetup()
+{
+ // Open the destinations guide by default on first login, per Rhett
+ if (gSavedPerAccountSettings.getBOOL("DisplayDestinationsOnInitialRun") || gAgent.isFirstLogin())
+ {
+ LLFloaterReg::showInstance("destinations");
+
+ gSavedPerAccountSettings.setBOOL("DisplayDestinationsOnInitialRun", FALSE);
+ }
+}
+
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
new file mode 100644
index 0000000000..be66bcae36
--- /dev/null
+++ b/indra/newview/lltoolbarview.h
@@ -0,0 +1,137 @@
+/**
+ * @file lltoolbarview.h
+ * @author Merov Linden
+ * @brief User customizable toolbar class
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLTOOLBARVIEW_H
+#define LL_LLTOOLBARVIEW_H
+
+#include "lluictrl.h"
+#include "lltoolbar.h"
+#include "llcommandmanager.h"
+
+class LLUICtrlFactory;
+
+// Parent of all LLToolBar
+
+class LLToolBarView : public LLUICtrl
+{
+public:
+ typedef enum
+ {
+ TOOLBAR_NONE = 0,
+ TOOLBAR_LEFT,
+ TOOLBAR_RIGHT,
+ TOOLBAR_BOTTOM,
+
+ TOOLBAR_COUNT,
+
+ TOOLBAR_FIRST = TOOLBAR_LEFT,
+ TOOLBAR_LAST = TOOLBAR_BOTTOM,
+ } EToolBarLocation;
+
+ // Xui structure of the toolbar panel
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> {};
+
+ // Note: valid children for LLToolBarView are stored in this registry
+ typedef LLDefaultChildRegistry child_registry_t;
+
+ // Xml structure of the toolbars.xml setting
+ // Those live in a toolbars.xml found in app_settings (for the default) and in
+ // the user folder for the user specific (saved) settings
+ struct Toolbar : public LLInitParam::Block<Toolbar>
+ {
+ Mandatory<LLToolBarEnums::ButtonType> button_display_mode;
+ Multiple<LLCommandId::Params> commands;
+
+ Toolbar();
+ };
+ struct ToolbarSet : public LLInitParam::Block<ToolbarSet>
+ {
+ Optional<Toolbar> left_toolbar,
+ right_toolbar,
+ bottom_toolbar;
+
+ ToolbarSet();
+ };
+
+ // Derived methods
+ virtual ~LLToolBarView();
+ virtual BOOL postBuild();
+ virtual void draw();
+
+ // Toolbar view interface with the rest of the world
+ // Checks if the commandId is being used somewhere in one of the toolbars, returns EToolBarLocation
+ S32 hasCommand(const LLCommandId& commandId) const;
+ S32 addCommand(const LLCommandId& commandId, EToolBarLocation toolbar, int rank = LLToolBar::RANK_NONE);
+ S32 removeCommand(const LLCommandId& commandId, int& rank); // Sets the rank the removed command was at, RANK_NONE if not found
+ S32 enableCommand(const LLCommandId& commandId, bool enabled);
+ S32 stopCommandInProgress(const LLCommandId& commandId);
+ S32 flashCommand(const LLCommandId& commandId, bool flash);
+
+ // Loads the toolbars from the existing user or default settings
+ bool loadToolbars(bool force_default = false); // return false if load fails
+
+ // Clears all buttons off the toolbars
+ bool clearToolbars();
+
+ void setToolBarsVisible(bool visible);
+
+ static bool loadDefaultToolbars();
+ static bool clearAllToolbars();
+
+ static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton);
+ static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
+ static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
+ static void resetDragTool(LLToolBarButton* toolbarButton);
+
+ bool isModified() const;
+
+protected:
+ friend class LLUICtrlFactory;
+ LLToolBarView(const Params&);
+
+ void initFromParams(const Params&);
+
+private:
+ void saveToolbars() const;
+ bool addCommandInternal(const LLCommandId& commandId, LLToolBar* toolbar);
+ void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const;
+
+ static void onToolBarButtonAdded(LLView* button);
+ static void onToolBarButtonRemoved(LLView* button);
+
+ // Pointers to the toolbars handled by the toolbar view
+ LLToolBar* mToolbars[TOOLBAR_COUNT];
+ bool mToolbarsLoaded;
+
+ bool mDragStarted;
+ LLToolBarButton* mDragToolbarButton;
+ bool mShowToolbars;
+};
+
+extern LLToolBarView* gToolBarView;
+
+#endif // LL_LLTOOLBARVIEW_H
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index 9782b90cf1..aba43a9715 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -507,12 +507,12 @@ void LLToolBrushLand::render()
void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region,
const LLVector3& pos_world)
{
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest mDepthTest(GL_TRUE);
- glPushMatrix();
+ gGL.pushMatrix();
gGL.color4fv(OVERLAY_COLOR.mV);
- glTranslatef(0.0f, 0.0f, 1.0f);
+ gGL.translatef(0.0f, 0.0f, 1.0f);
S32 i = (S32) pos_region.mV[VX];
S32 j = (S32) pos_region.mV[VY];
@@ -566,7 +566,7 @@ void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region
}
gGL.end();
- glPopMatrix();
+ gGL.popMatrix();
}
void LLToolBrushLand::determineAffectedRegions(region_list_t& regions,
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index d23d2b3abd..6910b8eced 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -57,6 +57,7 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llworld.h"
+#include "llclipboard.h"
// syntactic sugar
#define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember))
@@ -613,6 +614,7 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask)
{
if (!mToolTipMsg.empty())
{
+ LLToolTipMgr::instance().unblockToolTips();
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(mToolTipMsg)
.delay_time(gSavedSettings.getF32( "DragAndDropToolTipDelay" )));
@@ -801,7 +803,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
LLViewerObject* hit_obj = pick_info.getObject();
LLSelectMgr::getInstance()->unhighlightAll();
-
+ bool highlight_object = false;
// Treat attachments as part of the avatar they are attached to.
if (hit_obj != NULL)
{
@@ -843,16 +845,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
{
target = DT_OBJECT;
hit_face = pick_info.mObjectFace;
- // if any item being dragged will be applied to the object under our cursor
- // highlight that object
- for (S32 i = 0; i < (S32)mCargoIDs.size(); i++)
- {
- if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL))
- {
- LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj);
- break;
- }
- }
+ highlight_object = true;
}
}
else if (pick_info.mPickType == LLPickInfo::PICK_LAND)
@@ -898,6 +891,19 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
}
}
+ if (highlight_object && mLastAccept > ACCEPT_NO_LOCKED)
+ {
+ // if any item being dragged will be applied to the object under our cursor
+ // highlight that object
+ for (S32 i = 0; i < (S32)mCargoIDs.size(); i++)
+ {
+ if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL))
+ {
+ LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj);
+ break;
+ }
+ }
+ }
ECursorType cursor = acceptanceToCursor( mLastAccept );
gViewerWindow->getWindow()->setCursor( cursor );
@@ -1651,6 +1657,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
return ACCEPT_NO;
}
+ const LLUUID &outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
+ if(gInventory.isObjectDescendentOf(item->getUUID(), outbox_id))
+ {
+ return ACCEPT_NO;
+ }
+
+
if( drop )
{
if(mSource == SOURCE_LIBRARY)
@@ -2054,6 +2067,12 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
return ACCEPT_NO;
}
+ const LLUUID &outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false);
+ if(gInventory.isObjectDescendentOf(category->getUUID(), outbox_id))
+ {
+ return ACCEPT_NO;
+ }
+
if(drop)
{
BOOL append = ( (mask & MASK_SHIFT) ? TRUE : FALSE );
@@ -2481,6 +2500,10 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory(
item = (LLViewerInventoryItem*)preview->getDragItem();
}
}
+ else if(mSource == SOURCE_VIEWER)
+ {
+ item = (LLViewerInventoryItem*)gClipboard.getSourceObject();
+ }
if(item) return item;
if(cat) return cat;
return NULL;
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 7b8cce3dc7..92f007a251 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -66,7 +66,8 @@ public:
SOURCE_AGENT,
SOURCE_WORLD,
SOURCE_NOTECARD,
- SOURCE_LIBRARY
+ SOURCE_LIBRARY,
+ SOURCE_VIEWER
};
void beginDrag(EDragAndDropType type,
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index 68af3d73d2..857d105361 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -56,7 +56,7 @@ void LLToolGun::handleSelect()
{
gViewerWindow->hideCursor();
gViewerWindow->moveCursorToCenter();
- gViewerWindow->mWindow->setMouseClipping(TRUE);
+ gViewerWindow->getWindow()->setMouseClipping(TRUE);
mIsSelected = TRUE;
}
@@ -64,7 +64,7 @@ void LLToolGun::handleDeselect()
{
gViewerWindow->moveCursorToCenter();
gViewerWindow->showCursor();
- gViewerWindow->mWindow->setMouseClipping(FALSE);
+ gViewerWindow->getWindow()->setMouseClipping(FALSE);
mIsSelected = FALSE;
}
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 51c0e2eeed..6bc7c6de11 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -247,24 +247,10 @@ bool LLToolMgr::canEdit()
void LLToolMgr::toggleBuildMode()
{
- if (inBuildMode())
- {
- if (gSavedSettings.getBOOL("EditCameraMovement"))
- {
- // just reset the view, will pull us out of edit mode
- handle_reset_view();
- }
- else
- {
- // manually disable edit mode, but do not affect the camera
- gAgentCamera.resetView(false);
- LLFloaterReg::hideInstance("build");
- gViewerWindow->showCursor();
- }
- // avoid spurious avatar movements pulling out of edit mode
- LLViewerJoystick::getInstance()->setNeedsReset();
- }
- else
+ LLFloaterReg::toggleInstanceOrBringToFront("build");
+
+ bool build_visible = LLFloaterReg::instanceVisible("build");
+ if (build_visible)
{
ECameraMode camMode = gAgentCamera.getCameraMode();
if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode)
@@ -291,7 +277,7 @@ void LLToolMgr::toggleBuildMode()
}
}
-
+
setCurrentToolset(gBasicToolset);
getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );
@@ -304,6 +290,24 @@ void LLToolMgr::toggleBuildMode()
LLViewerJoystick::getInstance()->setNeedsReset();
}
+ else
+ {
+ if (gSavedSettings.getBOOL("EditCameraMovement"))
+ {
+ // just reset the view, will pull us out of edit mode
+ handle_reset_view();
+ }
+ else
+ {
+ // manually disable edit mode, but do not affect the camera
+ gAgentCamera.resetView(false);
+ LLFloaterReg::hideInstance("build");
+ gViewerWindow->showCursor();
+ }
+ // avoid spurious avatar movements pulling out of edit mode
+ LLViewerJoystick::getInstance()->setNeedsReset();
+ }
+
}
bool LLToolMgr::inBuildMode()
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 964b17d3a6..718201e381 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -169,23 +169,28 @@ BOOL LLVisualParamHint::render()
gGL.pushUIMatrix();
gGL.loadUIIdentity();
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
- glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
+ gGL.loadIdentity();
+ gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
LLGLSUIDefault gls_ui;
//LLGLState::verify(TRUE);
mBackgroundp->draw(0, 0, mFullWidth, mFullHeight);
- glMatrixMode(GL_PROJECTION);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
mNeedsUpdate = FALSE;
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index c38c8bad80..b0d9bd5d70 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -35,7 +35,6 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llavatarnamecache.h"
-#include "llviewercontrol.h"
#include "llfocusmgr.h"
#include "llfirstuse.h"
#include "llfloaterland.h"
@@ -57,6 +56,7 @@
#include "lltrans.h"
#include "llviewercamera.h"
#include "llviewerparcelmedia.h"
+#include "llviewercontrol.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerobject.h"
@@ -76,7 +76,6 @@ static void handle_click_action_play();
static void handle_click_action_open_media(LLPointer<LLViewerObject> objectp);
static ECursorType cursor_from_parcel_media(U8 click_action);
-
LLToolPie::LLToolPie()
: LLTool(std::string("Pie")),
mMouseButtonDown( false ),
@@ -479,6 +478,18 @@ void LLToolPie::resetSelection()
mClickAction = 0;
}
+void LLToolPie::walkToClickedLocation()
+{
+ if(mAutoPilotDestination) { mAutoPilotDestination->markDead(); }
+ mAutoPilotDestination = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE);
+ mAutoPilotDestination->setPositionGlobal(mPick.mPosGlobal);
+ mAutoPilotDestination->setPixelSize(5);
+ mAutoPilotDestination->setColor(LLColor4U(170, 210, 190));
+ mAutoPilotDestination->setDuration(3.f);
+
+ handle_go_to();
+}
+
// When we get object properties after left-clicking on an object
// with left-click = buy, if it's the same object, do the buy.
@@ -662,18 +673,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
mPick.mPosGlobal = gAgent.getPositionGlobal() + LLVector3d(LLViewerCamera::instance().getAtAxis()) * SELF_CLICK_WALK_DISTANCE;
}
gAgentCamera.setFocusOnAvatar(TRUE, TRUE);
- if(mAutoPilotDestination) { mAutoPilotDestination->markDead(); }
- mAutoPilotDestination = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE);
- mAutoPilotDestination->setPositionGlobal(mPick.mPosGlobal);
- mAutoPilotDestination->setPixelSize(5);
- mAutoPilotDestination->setColor(LLColor4U(170, 210, 190));
- mAutoPilotDestination->setDuration(3.f);
-
- handle_go_to();
+ walkToClickedLocation();
LLFirstUse::notMoving(false);
- mBlockClickToWalk = false;
-
return TRUE;
}
gViewerWindow->setCursor(UI_CURSOR_ARROW);
@@ -708,16 +710,10 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
{
- if (mPick.mPickType == LLPickInfo::PICK_LAND
- && !mPick.mPosGlobal.isExactlyZero())
- {
- handle_go_to();
- return TRUE;
- }
- else if (mPick.mObjectID.notNull()
- && !mPick.mPosGlobal.isExactlyZero())
+ if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
+ (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()))
{
- handle_go_to();
+ walkToClickedLocation();
return TRUE;
}
}
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index d7c79ee223..68fe8bc4a5 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -66,6 +66,7 @@ public:
LLViewerObject* getClickActionObject() { return mClickActionObject; }
LLObjectSelection* getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; }
void resetSelection();
+ void walkToClickedLocation();
void blockClickToWalk() { mBlockClickToWalk = true; }
void stopClickToWalk();
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index 983108391f..bf1f8808a7 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -53,10 +53,12 @@
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "lllandmarklist.h"
+#include "llprogressview.h"
#include "llsky.h"
#include "llui.h"
#include "llviewercamera.h"
#include "llviewerinventory.h"
+#include "llviewerwindow.h"
#include "llworld.h"
#include "llworldmapview.h"
#include "llviewercontrol.h"
@@ -111,6 +113,8 @@ void LLTracker::drawHUDArrow()
{
if (!gSavedSettings.getBOOL("RenderTrackerBeacon")) return;
+ if (gViewerWindow->getProgressView()->getVisible()) return;
+
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
/* tracking autopilot destination has been disabled
@@ -505,9 +509,10 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glTranslatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
+ {
+ gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
@@ -559,9 +564,8 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
gGL.end();
}
-
- //gCylinder.render(1000);
- glPopMatrix();
+ }
+ gGL.popMatrix();
std::string text;
text = llformat( "%.0f m", to_vec.magVec());
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index c648a6a28a..3d68c10489 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -42,9 +42,9 @@ LLTransientFloaterMgr::LLTransientFloaterMgr()
&LLTransientFloaterMgr::leftMouseClickCallback, this, _2, _3, _4));
}
- mGroupControls.insert(std::pair<ETransientGroup, std::set<LLView*> >(GLOBAL, std::set<LLView*>()));
- mGroupControls.insert(std::pair<ETransientGroup, std::set<LLView*> >(DOCKED, std::set<LLView*>()));
- mGroupControls.insert(std::pair<ETransientGroup, std::set<LLView*> >(IM, std::set<LLView*>()));
+ mGroupControls.insert(std::pair<ETransientGroup, controls_set_t >(GLOBAL, controls_set_t()));
+ mGroupControls.insert(std::pair<ETransientGroup, controls_set_t >(DOCKED, controls_set_t()));
+ mGroupControls.insert(std::pair<ETransientGroup, controls_set_t >(IM, controls_set_t()));
}
void LLTransientFloaterMgr::registerTransientFloater(LLTransientFloater* floater)
@@ -59,12 +59,16 @@ void LLTransientFloaterMgr::unregisterTransientFloater(LLTransientFloater* float
void LLTransientFloaterMgr::addControlView(ETransientGroup group, LLView* view)
{
- mGroupControls.find(group)->second.insert(view);
+ if (!view) return;
+
+ mGroupControls.find(group)->second.insert(view->getHandle());
}
void LLTransientFloaterMgr::removeControlView(ETransientGroup group, LLView* view)
{
- mGroupControls.find(group)->second.erase(view);
+ if (!view) return;
+
+ mGroupControls.find(group)->second.erase(view->getHandle());
}
void LLTransientFloaterMgr::addControlView(LLView* view)
@@ -89,7 +93,7 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
{
ETransientGroup group = floater->getGroup();
- bool hide = isControlClicked(mGroupControls.find(group)->second, x, y);
+ bool hide = isControlClicked(group, mGroupControls.find(group)->second, x, y);
if (hide)
{
floater->setTransientVisible(FALSE);
@@ -98,13 +102,25 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
}
}
-bool LLTransientFloaterMgr::isControlClicked(std::set<LLView*>& set, S32 x, S32 y)
+bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y)
{
+ std::list< LLHandle<LLView> > dead_handles;
+
bool res = true;
for (controls_set_t::iterator it = set.begin(); it
!= set.end(); it++)
{
- LLView* control_view = *it;
+ LLView* control_view = NULL;
+
+ LLHandle<LLView> handle = *it;
+ if (handle.isDead())
+ {
+ dead_handles.push_back(handle);
+ continue;
+ }
+
+ control_view = handle.get();
+
if (!control_view->getVisible())
{
continue;
@@ -118,6 +134,13 @@ bool LLTransientFloaterMgr::isControlClicked(std::set<LLView*>& set, S32 x, S32
break;
}
}
+
+ for (std::list< LLHandle<LLView> >::iterator it = dead_handles.begin(); it != dead_handles.end(); ++it)
+ {
+ LLHandle<LLView> handle = *it;
+ mGroupControls.find(group)->second.erase(handle);
+ }
+
return res;
}
@@ -130,8 +153,8 @@ void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y,
return;
}
- bool hide = isControlClicked(mGroupControls.find(DOCKED)->second, x, y)
- && isControlClicked(mGroupControls.find(GLOBAL)->second, x, y);
+ bool hide = isControlClicked(DOCKED, mGroupControls.find(DOCKED)->second, x, y)
+ && isControlClicked(GLOBAL, mGroupControls.find(GLOBAL)->second, x, y);
if (hide)
{
hideTransientFloaters(x, y);
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
index 2919244121..b4611c8c87 100644
--- a/indra/newview/lltransientfloatermgr.h
+++ b/indra/newview/lltransientfloatermgr.h
@@ -56,14 +56,15 @@ public:
void removeControlView(LLView* view);
private:
+ typedef std::set<LLHandle<LLView> > controls_set_t;
+ typedef std::map<ETransientGroup, controls_set_t > group_controls_t;
+
void hideTransientFloaters(S32 x, S32 y);
void leftMouseClickCallback(S32 x, S32 y, MASK mask);
- bool isControlClicked(std::set<LLView*>& set, S32 x, S32 y);
-private:
+ bool isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y);
+
std::set<LLTransientFloater*> mTransSet;
- typedef std::set<LLView*> controls_set_t;
- typedef std::map<ETransientGroup, std::set<LLView*> > group_controls_t;
group_controls_t mGroupControls;
};
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 2f60b6b90b..7eb54271f4 100644..100755
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -31,82 +31,294 @@
#include <curl/curl.h>
#include "llbufferstream.h"
+#include "lltrans.h"
#include "llui.h"
#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "reader.h"
-// These two are concatenated with the language specifiers to form a complete Google Translate URL
-const char* LLTranslate::m_GoogleURL = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=";
-const char* LLTranslate::m_GoogleLangSpec = "&langpair=";
-float LLTranslate::m_GoogleTimeout = 5;
+// virtual
+void LLGoogleTranslationHandler::getTranslateURL(
+ std::string &url,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &text) const
+{
+ url = std::string("https://www.googleapis.com/language/translate/v2?key=")
+ + getAPIKey() + "&q=" + LLURI::escape(text) + "&target=" + to_lang;
+ if (!from_lang.empty())
+ {
+ url += "&source=" + from_lang;
+ }
+}
-LLSD LLTranslate::m_Header;
-// These constants are for the GET header.
-const char* LLTranslate::m_AcceptHeader = "Accept";
-const char* LLTranslate::m_AcceptType = "text/plain";
-const char* LLTranslate::m_AgentHeader = "User-Agent";
+// virtual
+void LLGoogleTranslationHandler::getKeyVerificationURL(
+ std::string& url,
+ const std::string& key) const
+{
+ url = std::string("https://www.googleapis.com/language/translate/v2/languages?key=")
+ + key + "&target=en";
+}
-// These constants are in the JSON returned from Google
-const char* LLTranslate::m_GoogleData = "responseData";
-const char* LLTranslate::m_GoogleTranslation = "translatedText";
-const char* LLTranslate::m_GoogleLanguage = "detectedSourceLanguage";
+// virtual
+bool LLGoogleTranslationHandler::parseResponse(
+ int& status,
+ const std::string& body,
+ std::string& translation,
+ std::string& detected_lang,
+ std::string& err_msg) const
+{
+ Json::Value root;
+ Json::Reader reader;
-//static
-void LLTranslate::translateMessage(LLHTTPClient::ResponderPtr &result, const std::string &from_lang, const std::string &to_lang, const std::string &mesg)
+ if (!reader.parse(body, root))
+ {
+ err_msg = reader.getFormatedErrorMessages();
+ return false;
+ }
+
+ if (!root.isObject()) // empty response? should not happen
+ {
+ return false;
+ }
+
+ if (status != STATUS_OK)
+ {
+ // Request failed. Extract error message from the response.
+ parseErrorResponse(root, status, err_msg);
+ return false;
+ }
+
+ // Request succeeded, extract translation from the response.
+ return parseTranslation(root, translation, detected_lang);
+}
+
+// static
+void LLGoogleTranslationHandler::parseErrorResponse(
+ const Json::Value& root,
+ int& status,
+ std::string& err_msg)
{
- std::string url;
- getTranslateUrl(url, from_lang, to_lang, mesg);
+ const Json::Value& error = root.get("error", 0);
+ if (!error.isObject() || !error.isMember("message") || !error.isMember("code"))
+ {
+ return;
+ }
- std::string user_agent = llformat("%s %d.%d.%d (%d)",
- LLVersionInfo::getChannel().c_str(),
- LLVersionInfo::getMajor(),
- LLVersionInfo::getMinor(),
- LLVersionInfo::getPatch(),
- LLVersionInfo::getBuild());
+ err_msg = error["message"].asString();
+ status = error["code"].asInt();
+}
- if (!m_Header.size())
+// static
+bool LLGoogleTranslationHandler::parseTranslation(
+ const Json::Value& root,
+ std::string& translation,
+ std::string& detected_lang)
+{
+ // JsonCpp is prone to aborting the program on failed assertions,
+ // so be super-careful and verify the response format.
+ const Json::Value& data = root.get("data", 0);
+ if (!data.isObject() || !data.isMember("translations"))
{
- m_Header.insert(m_AcceptHeader, LLSD(m_AcceptType));
- m_Header.insert(m_AgentHeader, LLSD(user_agent));
+ return false;
+ }
+
+ const Json::Value& translations = data["translations"];
+ if (!translations.isArray() || translations.size() == 0)
+ {
+ return false;
+ }
+
+ const Json::Value& first = translations[0U];
+ if (!first.isObject() || !first.isMember("translatedText"))
+ {
+ return false;
}
- LLHTTPClient::get(url, result, m_Header, m_GoogleTimeout);
+ translation = first["translatedText"].asString();
+ detected_lang = first.get("detectedSourceLanguage", "").asString();
+ return true;
}
-//static
-void LLTranslate::getTranslateUrl(std::string &translate_url, const std::string &from_lang, const std::string &to_lang, const std::string &mesg)
+// static
+std::string LLGoogleTranslationHandler::getAPIKey()
+{
+ return gSavedSettings.getString("GoogleTranslateAPIKey");
+}
+
+// virtual
+void LLBingTranslationHandler::getTranslateURL(
+ std::string &url,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &text) const
{
- char * curl_str = curl_escape(mesg.c_str(), mesg.size());
- std::string const escaped_mesg(curl_str);
- curl_free(curl_str);
+ url = std::string("http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=")
+ + getAPIKey() + "&text=" + LLURI::escape(text) + "&to=" + to_lang;
+ if (!from_lang.empty())
+ {
+ url += "&from=" + from_lang;
+ }
+}
- translate_url = m_GoogleURL
- + escaped_mesg + m_GoogleLangSpec
- + from_lang // 'from' language; empty string for auto
- + "%7C" // |
- + to_lang; // 'to' language
+// virtual
+void LLBingTranslationHandler::getKeyVerificationURL(
+ std::string& url,
+ const std::string& key) const
+{
+ url = std::string("http://api.microsofttranslator.com/v2/Http.svc/GetLanguagesForTranslate?appId=")
+ + key;
}
-//static
-bool LLTranslate::parseGoogleTranslate(const std::string& body, std::string &translation, std::string &detected_language)
+// virtual
+bool LLBingTranslationHandler::parseResponse(
+ int& status,
+ const std::string& body,
+ std::string& translation,
+ std::string& detected_lang,
+ std::string& err_msg) const
{
- Json::Value root;
- Json::Reader reader;
-
- bool success = reader.parse(body, root);
- if (!success)
+ if (status != STATUS_OK)
{
- LL_WARNS("Translate") << "Non valid response from Google Translate API: '" << reader.getFormatedErrorMessages() << "'" << LL_ENDL;
+ static const std::string MSG_BEGIN_MARKER = "Message: ";
+ size_t begin = body.find(MSG_BEGIN_MARKER);
+ if (begin != std::string::npos)
+ {
+ begin += MSG_BEGIN_MARKER.size();
+ }
+ else
+ {
+ begin = 0;
+ err_msg.clear();
+ }
+ size_t end = body.find("</p>", begin);
+ err_msg = body.substr(begin, end-begin);
+ LLStringUtil::replaceString(err_msg, "&#xD;", ""); // strip CR
return false;
}
-
- translation = root[m_GoogleData].get(m_GoogleTranslation, "").asString();
- detected_language = root[m_GoogleData].get(m_GoogleLanguage, "").asString();
+
+ // Sample response: <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Hola</string>
+ size_t begin = body.find(">");
+ if (begin == std::string::npos || begin >= (body.size() - 1))
+ {
+ begin = 0;
+ }
+ else
+ {
+ ++begin;
+ }
+
+ size_t end = body.find("</string>", begin);
+
+ detected_lang = ""; // unsupported by this API
+ translation = body.substr(begin, end-begin);
+ LLStringUtil::replaceString(translation, "&#xD;", ""); // strip CR
return true;
}
+// static
+std::string LLBingTranslationHandler::getAPIKey()
+{
+ return gSavedSettings.getString("BingTranslateAPIKey");
+}
+
+LLTranslate::TranslationReceiver::TranslationReceiver(const std::string& from_lang, const std::string& to_lang)
+: mFromLang(from_lang)
+, mToLang(to_lang)
+, mHandler(LLTranslate::getPreferredHandler())
+{
+}
+
+// virtual
+void LLTranslate::TranslationReceiver::completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+{
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+
+ const std::string body = strstrm.str();
+ std::string translation, detected_lang, err_msg;
+ int status = http_status;
+ LL_DEBUGS("Translate") << "HTTP status: " << status << " " << reason << LL_ENDL;
+ LL_DEBUGS("Translate") << "Response body: " << body << LL_ENDL;
+ if (mHandler.parseResponse(status, body, translation, detected_lang, err_msg))
+ {
+ // Fix up the response
+ LLStringUtil::replaceString(translation, "&lt;", "<");
+ LLStringUtil::replaceString(translation, "&gt;",">");
+ LLStringUtil::replaceString(translation, "&quot;","\"");
+ LLStringUtil::replaceString(translation, "&#39;","'");
+ LLStringUtil::replaceString(translation, "&amp;","&");
+ LLStringUtil::replaceString(translation, "&apos;","'");
+
+ handleResponse(translation, detected_lang);
+ }
+ else
+ {
+ if (err_msg.empty())
+ {
+ err_msg = LLTrans::getString("TranslationResponseParseError");
+ }
+
+ llwarns << "Translation request failed: " << err_msg << llendl;
+ handleFailure(status, err_msg);
+ }
+}
+
+LLTranslate::KeyVerificationReceiver::KeyVerificationReceiver(EService service)
+: mService(service)
+{
+}
+
+LLTranslate::EService LLTranslate::KeyVerificationReceiver::getService() const
+{
+ return mService;
+}
+
+// virtual
+void LLTranslate::KeyVerificationReceiver::completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+{
+ bool ok = (http_status == 200);
+ setVerificationStatus(ok);
+}
+
+//static
+void LLTranslate::translateMessage(
+ TranslationReceiverPtr &receiver,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &mesg)
+{
+ std::string url;
+ receiver->mHandler.getTranslateURL(url, from_lang, to_lang, mesg);
+
+ LL_DEBUGS("Translate") << "Sending translation request: " << url << LL_ENDL;
+ sendRequest(url, receiver);
+}
+
+// static
+void LLTranslate::verifyKey(
+ KeyVerificationReceiverPtr& receiver,
+ const std::string& key)
+{
+ std::string url;
+ const LLTranslationAPIHandler& handler = getHandler(receiver->getService());
+ handler.getKeyVerificationURL(url, key);
+
+ LL_DEBUGS("Translate") << "Sending key verification request: " << url << LL_ENDL;
+ sendRequest(url, receiver);
+}
+
//static
std::string LLTranslate::getTranslateLanguage()
{
@@ -119,3 +331,52 @@ std::string LLTranslate::getTranslateLanguage()
return language;
}
+// static
+const LLTranslationAPIHandler& LLTranslate::getPreferredHandler()
+{
+ EService service = SERVICE_BING;
+
+ std::string service_str = gSavedSettings.getString("TranslationService");
+ if (service_str == "google")
+ {
+ service = SERVICE_GOOGLE;
+ }
+
+ return getHandler(service);
+}
+
+// static
+const LLTranslationAPIHandler& LLTranslate::getHandler(EService service)
+{
+ static LLGoogleTranslationHandler google;
+ static LLBingTranslationHandler bing;
+
+ if (service == SERVICE_GOOGLE)
+ {
+ return google;
+ }
+
+ return bing;
+}
+
+// static
+void LLTranslate::sendRequest(const std::string& url, LLHTTPClient::ResponderPtr responder)
+{
+ static const float REQUEST_TIMEOUT = 5;
+ static LLSD sHeader;
+
+ if (!sHeader.size())
+ {
+ std::string user_agent = llformat("%s %d.%d.%d (%d)",
+ LLVersionInfo::getChannel().c_str(),
+ LLVersionInfo::getMajor(),
+ LLVersionInfo::getMinor(),
+ LLVersionInfo::getPatch(),
+ LLVersionInfo::getBuild());
+
+ sHeader.insert("Accept", "text/plain");
+ sHeader.insert("User-Agent", user_agent);
+ }
+
+ LLHTTPClient::get(url, responder, sHeader, REQUEST_TIMEOUT);
+}
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index e85a42e878..c2330daa81 100644..100755
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -30,89 +30,257 @@
#include "llhttpclient.h"
#include "llbufferstream.h"
+namespace Json
+{
+ class Value;
+}
+
+/**
+ * Handler of an HTTP machine translation service.
+ *
+ * Derived classes know the service URL
+ * and how to parse the translation result.
+ */
+class LLTranslationAPIHandler
+{
+public:
+ /**
+ * Get URL for translation of the given string.
+ *
+ * Sending HTTP GET request to the URL will initiate translation.
+ *
+ * @param[out] url Place holder for the result.
+ * @param from_lang Source language. Leave empty for auto-detection.
+ * @param to_lang Target language.
+ * @param text Text to translate.
+ */
+ virtual void getTranslateURL(
+ std::string &url,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &text) const = 0;
+
+ /**
+ * Get URL to verify the given API key.
+ *
+ * Sending request to the URL verifies the key.
+ * Positive HTTP response (code 200) means that the key is valid.
+ *
+ * @param[out] url Place holder for the URL.
+ * @param[in] key Key to verify.
+ */
+ virtual void getKeyVerificationURL(
+ std::string &url,
+ const std::string &key) const = 0;
+
+ /**
+ * Parse translation response.
+ *
+ * @param[in,out] status HTTP status. May be modified while parsing.
+ * @param body Response text.
+ * @param[out] translation Translated text.
+ * @param[out] detected_lang Detected source language. May be empty.
+ * @param[out] err_msg Error message (in case of error).
+ */
+ virtual bool parseResponse(
+ int& status,
+ const std::string& body,
+ std::string& translation,
+ std::string& detected_lang,
+ std::string& err_msg) const = 0;
+
+ virtual ~LLTranslationAPIHandler() {}
+
+protected:
+ static const int STATUS_OK = 200;
+};
+
+/// Google Translate v2 API handler.
+class LLGoogleTranslationHandler : public LLTranslationAPIHandler
+{
+ LOG_CLASS(LLGoogleTranslationHandler);
+
+public:
+ /*virtual*/ void getTranslateURL(
+ std::string &url,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &text) const;
+ /*virtual*/ void getKeyVerificationURL(
+ std::string &url,
+ const std::string &key) const;
+ /*virtual*/ bool parseResponse(
+ int& status,
+ const std::string& body,
+ std::string& translation,
+ std::string& detected_lang,
+ std::string& err_msg) const;
+
+private:
+ static void parseErrorResponse(
+ const Json::Value& root,
+ int& status,
+ std::string& err_msg);
+ static bool parseTranslation(
+ const Json::Value& root,
+ std::string& translation,
+ std::string& detected_lang);
+ static std::string getAPIKey();
+};
+
+/// Microsoft Translator v2 API handler.
+class LLBingTranslationHandler : public LLTranslationAPIHandler
+{
+ LOG_CLASS(LLBingTranslationHandler);
+
+public:
+ /*virtual*/ void getTranslateURL(
+ std::string &url,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &text) const;
+ /*virtual*/ void getKeyVerificationURL(
+ std::string &url,
+ const std::string &key) const;
+ /*virtual*/ bool parseResponse(
+ int& status,
+ const std::string& body,
+ std::string& translation,
+ std::string& detected_lang,
+ std::string& err_msg) const;
+private:
+ static std::string getAPIKey();
+};
+
+/**
+ * Entry point for machine translation services.
+ *
+ * Basically, to translate a string, we need to know the URL
+ * of a translation service, have a valid API for the service
+ * and be given the target language.
+ *
+ * Callers specify the string to translate and the target language,
+ * LLTranslate takes care of the rest.
+ *
+ * API keys for translation are taken from saved settings.
+ */
class LLTranslate
{
LOG_CLASS(LLTranslate);
+
public :
+
+ typedef enum e_service {
+ SERVICE_BING,
+ SERVICE_GOOGLE,
+ } EService;
+
+ /**
+ * Subclasses are supposed to handle translation results (e.g. show them in chat)
+ */
class TranslationReceiver: public LLHTTPClient::Responder
{
+ public:
+
+ /**
+ * Using mHandler, parse incoming response.
+ *
+ * Calls either handleResponse() or handleFailure()
+ * depending on the HTTP status code and parsing success.
+ *
+ * @see handleResponse()
+ * @see handleFailure()
+ * @see mHandler
+ */
+ /*virtual*/ void completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer);
+
protected:
- TranslationReceiver(const std::string &from_lang, const std::string &to_lang)
- : m_fromLang(from_lang),
- m_toLang(to_lang)
- {
- }
+ friend class LLTranslate;
- virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) {};
- virtual void handleFailure() {};
+ /// Remember source and target languages for subclasses to be able to filter inappropriate results.
+ TranslationReceiver(const std::string& from_lang, const std::string& to_lang);
+ /// Override point to handle successful translation.
+ virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) = 0;
+
+ /// Override point to handle unsuccessful translation.
+ virtual void handleFailure(int status, const std::string& err_msg) = 0;
+
+ std::string mFromLang;
+ std::string mToLang;
+ const LLTranslationAPIHandler& mHandler;
+ };
+
+ /**
+ * Subclasses are supposed to handle API key verification result.
+ */
+ class KeyVerificationReceiver: public LLHTTPClient::Responder
+ {
public:
- ~TranslationReceiver()
- {
- }
-
- virtual void completedRaw( U32 status,
- const std::string& reason,
- const LLChannelDescriptors& channels,
- const LLIOPipe::buffer_ptr_t& buffer)
- {
- if (200 <= status && status < 300)
- {
- LLBufferStream istr(channels, buffer.get());
- std::stringstream strstrm;
- strstrm << istr.rdbuf();
-
- const std::string result = strstrm.str();
- std::string translation;
- std::string detected_language;
-
- if (!parseGoogleTranslate(result, translation, detected_language))
- {
- handleFailure();
- return;
- }
-
- // Fix up the response
- LLStringUtil::replaceString(translation, "&lt;", "<");
- LLStringUtil::replaceString(translation, "&gt;",">");
- LLStringUtil::replaceString(translation, "&quot;","\"");
- LLStringUtil::replaceString(translation, "&#39;","'");
- LLStringUtil::replaceString(translation, "&amp;","&");
- LLStringUtil::replaceString(translation, "&apos;","'");
-
- handleResponse(translation, detected_language);
- }
- else
- {
- LL_WARNS("Translate") << "HTTP request for Google Translate failed with status " << status << ", reason: " << reason << LL_ENDL;
- handleFailure();
- }
- }
+ EService getService() const;
protected:
- const std::string m_toLang;
- const std::string m_fromLang;
+ /**
+ * Save the translation service the key belongs to.
+ *
+ * Subclasses need to know it.
+ *
+ * @see getService()
+ */
+ KeyVerificationReceiver(EService service);
+
+ /**
+ * Parse verification response.
+ *
+ * Calls setVerificationStatus() with the verification status,
+ * which is true if HTTP status code is 200.
+ *
+ * @see setVerificationStatus()
+ */
+ /*virtual*/ void completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer);
+
+ /**
+ * Override point for subclasses to handle key verification status.
+ */
+ virtual void setVerificationStatus(bool ok) = 0;
+
+ EService mService;
};
- static void translateMessage(LLHTTPClient::ResponderPtr &result, const std::string &from_lang, const std::string &to_lang, const std::string &mesg);
- static float m_GoogleTimeout;
+ typedef boost::intrusive_ptr<TranslationReceiver> TranslationReceiverPtr;
+ typedef boost::intrusive_ptr<KeyVerificationReceiver> KeyVerificationReceiverPtr;
+
+ /**
+ * Translate given text.
+ *
+ * @param receiver Object to pass translation result to.
+ * @param from_lang Source language. Leave empty for auto-detection.
+ * @param to_lang Target language.
+ * @param mesg Text to translate.
+ */
+ static void translateMessage(TranslationReceiverPtr &receiver, const std::string &from_lang, const std::string &to_lang, const std::string &mesg);
+
+ /**
+ * Verify given API key of a translation service.
+ *
+ * @param receiver Object to pass verification result to.
+ * @param key Key to verify.
+ */
+ static void verifyKey(KeyVerificationReceiverPtr& receiver, const std::string& key);
static std::string getTranslateLanguage();
private:
- static void getTranslateUrl(std::string &translate_url, const std::string &from_lang, const std::string &to_lang, const std::string &text);
- static bool parseGoogleTranslate(const std::string& body, std::string &translation, std::string &detected_language);
-
- static LLSD m_Header;
- static const char* m_GoogleURL;
- static const char* m_GoogleLangSpec;
- static const char* m_AcceptHeader;
- static const char* m_AcceptType;
- static const char* m_AgentHeader;
- static const char* m_UserAgent;
-
- static const char* m_GoogleData;
- static const char* m_GoogleTranslation;
- static const char* m_GoogleLanguage;
+ static const LLTranslationAPIHandler& getPreferredHandler();
+ static const LLTranslationAPIHandler& getHandler(EService service);
+ static void sendRequest(const std::string& url, LLHTTPClient::ResponderPtr responder);
};
#endif
diff --git a/indra/newview/lluploadfloaterobservers.cpp b/indra/newview/lluploadfloaterobservers.cpp
new file mode 100644
index 0000000000..5a6a17fbca
--- /dev/null
+++ b/indra/newview/lluploadfloaterobservers.cpp
@@ -0,0 +1,56 @@
+/**
+ * @file lluploadfloaterobservers.cpp
+ * @brief LLUploadModelPremissionsResponder definition
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lluploadfloaterobservers.h"
+
+LLUploadModelPremissionsResponder::LLUploadModelPremissionsResponder(const LLHandle<LLUploadPermissionsObserver>& observer)
+:mObserverHandle(observer)
+{
+}
+
+void LLUploadModelPremissionsResponder::error(U32 status, const std::string& reason)
+{
+ llwarns << "LLUploadModelPremissionsResponder::error("<< status << ": " << reason << ")" << llendl;
+
+ LLUploadPermissionsObserver* observer = mObserverHandle.get();
+
+ if (observer)
+ {
+ observer->setPermissonsErrorStatus(status, reason);
+ }
+}
+
+void LLUploadModelPremissionsResponder::result(const LLSD& content)
+{
+ LLUploadPermissionsObserver* observer = mObserverHandle.get();
+
+ if (observer)
+ {
+ observer->onPermissionsReceived(content);
+ }
+}
diff --git a/indra/newview/lluploadfloaterobservers.h b/indra/newview/lluploadfloaterobservers.h
new file mode 100644
index 0000000000..79aad282d7
--- /dev/null
+++ b/indra/newview/lluploadfloaterobservers.h
@@ -0,0 +1,97 @@
+/**
+ * @file lluploadfloaterobservers.h
+ * @brief LLUploadModelPremissionsResponder declaration
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLUPLOADFLOATEROBSERVERS_H
+#define LL_LLUPLOADFLOATEROBSERVERS_H
+
+#include "llfloater.h"
+#include "llhttpclient.h"
+#include "llhandle.h"
+
+class LLUploadPermissionsObserver
+{
+public:
+
+ LLUploadPermissionsObserver(){mUploadPermObserverHandle.bind(this);}
+ virtual ~LLUploadPermissionsObserver() {}
+
+ virtual void onPermissionsReceived(const LLSD& result) = 0;
+ virtual void setPermissonsErrorStatus(U32 status, const std::string& reason) = 0;
+
+ LLHandle<LLUploadPermissionsObserver> getPermObserverHandle() const {return mUploadPermObserverHandle;}
+
+protected:
+ LLRootHandle<LLUploadPermissionsObserver> mUploadPermObserverHandle;
+};
+
+class LLWholeModelFeeObserver
+{
+public:
+ LLWholeModelFeeObserver() { mWholeModelFeeObserverHandle.bind(this); }
+ virtual ~LLWholeModelFeeObserver() {}
+
+ virtual void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) = 0;
+ virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) = 0;
+
+ LLHandle<LLWholeModelFeeObserver> getWholeModelFeeObserverHandle() const { return mWholeModelFeeObserverHandle; }
+
+protected:
+ LLRootHandle<LLWholeModelFeeObserver> mWholeModelFeeObserverHandle;
+};
+
+
+class LLWholeModelUploadObserver
+{
+public:
+ LLWholeModelUploadObserver() { mWholeModelUploadObserverHandle.bind(this); }
+ virtual ~LLWholeModelUploadObserver() {}
+
+ virtual void onModelUploadSuccess() = 0;
+
+ virtual void onModelUploadFailure() = 0;
+
+ LLHandle<LLWholeModelUploadObserver> getWholeModelUploadObserverHandle() const { return mWholeModelUploadObserverHandle; }
+
+protected:
+ LLRootHandle<LLWholeModelUploadObserver> mWholeModelUploadObserverHandle;
+};
+
+
+class LLUploadModelPremissionsResponder : public LLHTTPClient::Responder
+{
+public:
+
+ LLUploadModelPremissionsResponder(const LLHandle<LLUploadPermissionsObserver>& observer);
+
+ void error(U32 status, const std::string& reason);
+
+ void result(const LLSD& content);
+
+private:
+ LLHandle<LLUploadPermissionsObserver> mObserverHandle;
+};
+
+#endif /* LL_LLUPLOADFLOATEROBSERVERS_H */
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index ed4d278e90..4240a38326 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -32,10 +32,10 @@
#include "llcommandhandler.h"
#include "llfloaterhelpbrowser.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llpanellogin.h"
#include "llregionhandle.h"
-#include "llsidetray.h"
#include "llslurl.h"
#include "llstartup.h" // gStartupState
#include "llweb.h"
@@ -167,9 +167,9 @@ bool LLURLDispatcherImpl::dispatchApp(const LLSLURL& slurl,
// static
bool LLURLDispatcherImpl::dispatchRegion(const LLSLURL& slurl, const std::string& nav_type, bool right_mouse)
{
- if(slurl.getType() != LLSLURL::LOCATION)
+ if(slurl.getType() != LLSLURL::LOCATION)
{
- return false;
+ return false;
}
// Before we're logged in, need to update the startup screen
// to tell the user where they are going.
@@ -246,7 +246,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL&
key["y"] = global_pos.mdV[VY];
key["z"] = global_pos.mdV[VZ];
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
}
}
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 36c8b42a52..d042f62830 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -116,7 +116,7 @@ void LLViewerAssetStorage::storeAssetData(
F64 timeout)
{
LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
- llinfos << "LLViewerAssetStorage::storeAssetData (legacy) " << tid << ":" << LLAssetType::lookup(asset_type)
+ LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy) " << tid << ":" << LLAssetType::lookup(asset_type)
<< " ASSET_ID: " << asset_id << llendl;
if (mUpstreamHost.isOk())
@@ -248,9 +248,9 @@ void LLViewerAssetStorage::storeAssetData(
}
LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
- llinfos << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
+ LL_DEBUGS("AssetStorage") << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
- llinfos << "ASSET_ID: " << asset_id << llendl;
+ LL_DEBUGS("AssetStorage") << "ASSET_ID: " << asset_id << llendl;
S32 size = 0;
LLFILE* fp = LLFile::fopen(filename, "rb");
@@ -369,7 +369,7 @@ void LLViewerAssetStorage::_queueDataRequest(
tpvf.setAsset(uuid, atype);
tpvf.setCallback(downloadCompleteCallback, req);
- llinfos << "Starting transfer for " << uuid << llendl;
+ LL_DEBUGS("AssetStorage") << "Starting transfer for " << uuid << llendl;
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET);
ttcp->requestTransfer(spa, tpvf, 100.f + (is_priority ? 1.f : 0.f));
diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp
index b103f11597..a4b1c2155f 100644
--- a/indra/newview/llviewerassettype.cpp
+++ b/indra/newview/llviewerassettype.cpp
@@ -80,7 +80,9 @@ LLViewerAssetDictionary::LLViewerAssetDictionary()
addEntry(LLViewerAssetType::AT_LINK_FOLDER, new ViewerAssetEntry(DAD_LINK));
addEntry(LLViewerAssetType::AT_MESH, new ViewerAssetEntry(DAD_MESH));
-
+
+ addEntry(LLViewerAssetType::AT_WIDGET, new ViewerAssetEntry(DAD_WIDGET));
+
addEntry(LLViewerAssetType::AT_NONE, new ViewerAssetEntry(DAD_NONE));
};
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index b19c738ed2..2447f5dea8 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -36,9 +36,227 @@
#include "llviewerwindow.h"
#include "llvoiceclient.h"
#include "llviewermedia.h"
+#include "llprogressview.h"
+#include "llcallbacklist.h"
+#include "llstartup.h"
+#include "llviewerparcelmgr.h"
+#include "llparcel.h"
/////////////////////////////////////////////////////////
+LLViewerAudio::LLViewerAudio() :
+ mDone(true),
+ mFadeState(FADE_IDLE),
+ mFadeTime(),
+ mIdleListnerActive(false),
+ mForcedTeleportFade(false)
+{
+ mTeleportFailedConnection = LLViewerParcelMgr::getInstance()->
+ setTeleportFailedCallback(boost::bind(&LLViewerAudio::onTeleportFailed, this));
+}
+
+LLViewerAudio::~LLViewerAudio()
+{
+ mTeleportFailedConnection.disconnect();
+}
+
+void LLViewerAudio::registerIdleListener()
+{
+ if(mIdleListnerActive==false)
+ {
+ mIdleListnerActive = true;
+ doOnIdleRepeating(boost::bind(boost::bind(&LLViewerAudio::onIdleUpdate, this)));
+ }
+
+}
+
+void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI)
+{
+ // Old and new stream are identical
+ if (mNextStreamURI == streamURI)
+ {
+ return;
+ }
+
+ // Record the URI we are going to be switching to
+ mNextStreamURI = streamURI;
+
+ switch (mFadeState)
+ {
+ case FADE_IDLE:
+ // If a stream is playing fade it out first
+ if (!gAudiop->getInternetStreamURL().empty())
+ {
+ // The order of these tests is important, state FADE_OUT will be processed below
+ mFadeState = FADE_OUT;
+ }
+ // Otherwise the new stream can be faded in
+ else
+ {
+ mFadeState = FADE_IN;
+ gAudiop->startInternetStream(mNextStreamURI);
+ startFading();
+ registerIdleListener();
+ break;
+ }
+
+ case FADE_OUT:
+ startFading();
+ registerIdleListener();
+ break;
+
+ case FADE_IN:
+ registerIdleListener();
+ break;
+
+ default:
+ llwarns << "Unknown fading state: " << mFadeState << llendl;
+ break;
+ }
+}
+
+// A return of false from onIdleUpdate means it will be called again next idle update.
+// A return of true means we have finished with it and the callback will be deleted.
+bool LLViewerAudio::onIdleUpdate()
+{
+ bool fadeIsFinished = false;
+
+ // There is a delay in the login sequence between when the parcel information has
+ // arrived and the music stream is started and when the audio system is called to set
+ // initial volume levels. This code extends the fade time so you hear a full fade in.
+ if ((LLStartUp::getStartupState() < STATE_STARTED))
+ {
+ stream_fade_timer.reset();
+ stream_fade_timer.setTimerExpirySec(mFadeTime);
+ }
+
+ if (mDone)
+ {
+ // This should be a rare or never occurring state.
+ if (mFadeState == FADE_IDLE)
+ {
+ deregisterIdleListener();
+ fadeIsFinished = true; // Stop calling onIdleUpdate
+ }
+
+ // we have finished the current fade operation
+ if (mFadeState == FADE_OUT)
+ {
+ // Clear URI
+ gAudiop->startInternetStream(LLStringUtil::null);
+ gAudiop->stopInternetStream();
+
+ if (!mNextStreamURI.empty())
+ {
+ mFadeState = FADE_IN;
+ gAudiop->startInternetStream(mNextStreamURI);
+ startFading();
+ }
+ else
+ {
+ mFadeState = FADE_IDLE;
+ deregisterIdleListener();
+ fadeIsFinished = true; // Stop calling onIdleUpdate
+ }
+ }
+ else if (mFadeState == FADE_IN)
+ {
+ if (mNextStreamURI != gAudiop->getInternetStreamURL())
+ {
+ mFadeState = FADE_OUT;
+ startFading();
+ }
+ else
+ {
+ mFadeState = FADE_IDLE;
+ deregisterIdleListener();
+ fadeIsFinished = true; // Stop calling onIdleUpdate
+ }
+ }
+ }
+
+ return fadeIsFinished;
+}
+
+void LLViewerAudio::stopInternetStreamWithAutoFade()
+{
+ mFadeState = FADE_IDLE;
+ mNextStreamURI = LLStringUtil::null;
+ mDone = true;
+
+ gAudiop->startInternetStream(LLStringUtil::null);
+ gAudiop->stopInternetStream();
+}
+
+void LLViewerAudio::startFading()
+{
+ const F32 AUDIO_MUSIC_FADE_IN_TIME = 3.0f;
+ const F32 AUDIO_MUSIC_FADE_OUT_TIME = 2.0f;
+ // This minimum fade time prevents divide by zero and negative times
+ const F32 AUDIO_MUSIC_MINIMUM_FADE_TIME = 0.01f;
+
+ if(mDone)
+ {
+ // The fade state here should only be one of FADE_IN or FADE_OUT, but, in case it is not,
+ // rather than check for both states assume a fade in and check for the fade out case.
+ mFadeTime = AUDIO_MUSIC_FADE_IN_TIME;
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ mFadeTime = AUDIO_MUSIC_FADE_OUT_TIME;
+ }
+
+ // Prevent invalid fade time
+ mFadeTime = llmax(mFadeTime, AUDIO_MUSIC_MINIMUM_FADE_TIME);
+
+ stream_fade_timer.reset();
+ stream_fade_timer.setTimerExpirySec(mFadeTime);
+ mDone = false;
+ }
+}
+
+F32 LLViewerAudio::getFadeVolume()
+{
+ F32 fade_volume = 1.0f;
+
+ if (stream_fade_timer.hasExpired())
+ {
+ mDone = true;
+ // If we have been fading out set volume to 0 until the next fade state occurs to prevent
+ // an audio transient.
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ fade_volume = 0.0f;
+ }
+ }
+
+ if (!mDone)
+ {
+ // Calculate how far we are into the fade time
+ fade_volume = stream_fade_timer.getElapsedTimeF32() / mFadeTime;
+
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ // If we are not fading in then we are fading out, so invert the fade
+ // direction; start loud and move towards zero volume.
+ fade_volume = 1.0f - fade_volume;
+ }
+ }
+
+ return fade_volume;
+}
+
+void LLViewerAudio::onTeleportFailed()
+{
+ if (gAudiop)
+ {
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (parcel)
+ {
+ mNextStreamURI = parcel->getMusicURL();
+ }
+ }
+}
+
void init_audio()
{
if (!gAudiop)
@@ -101,7 +319,16 @@ void audio_update_volume(bool force_update)
{
F32 master_volume = gSavedSettings.getF32("AudioLevelMaster");
BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");
- if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized")))
+
+ LLProgressView* progress = gViewerWindow->getProgressView();
+ BOOL progress_view_visible = FALSE;
+
+ if (progress)
+ {
+ progress_view_visible = progress->getVisible();
+ }
+
+ if (!gViewerWindow->getActive() && gSavedSettings.getBOOL("MuteWhenMinimized"))
{
mute_audio = TRUE;
}
@@ -114,7 +341,7 @@ void audio_update_volume(bool force_update)
gAudiop->setDopplerFactor(gSavedSettings.getF32("AudioLevelDoppler"));
gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff"));
- gAudiop->setMuted(mute_audio);
+ gAudiop->setMuted(mute_audio || progress_view_visible);
if (force_update)
{
@@ -132,12 +359,25 @@ void audio_update_volume(bool force_update)
// Streaming Music
if (gAudiop)
- {
+ {
+ if (progress_view_visible && !LLViewerAudio::getInstance()->getForcedTeleportFade())
+ {
+ LLViewerAudio::getInstance()->setForcedTeleportFade(true);
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
+ LLViewerAudio::getInstance()->setNextStreamURI(LLStringUtil::null);
+ }
+
+ if (!progress_view_visible && LLViewerAudio::getInstance()->getForcedTeleportFade() == true)
+ {
+ LLViewerAudio::getInstance()->setForcedTeleportFade(false);
+ }
+
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
- music_volume = mute_volume * master_volume * music_volume;
- gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume );
-
+ F32 fade_volume = LLViewerAudio::getInstance()->getFadeVolume();
+
+ music_volume = mute_volume * master_volume * music_volume * fade_volume;
+ gAudiop->setInternetStreamGain (music_muted ? 0.f : music_volume);
}
// Streaming Media
diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h
index e5916285fb..a3da9fc6b8 100644
--- a/indra/newview/llvieweraudio.h
+++ b/indra/newview/llvieweraudio.h
@@ -27,6 +27,9 @@
#ifndef LL_VIEWERAUDIO_H
#define LL_VIEWERAUDIO_H
+#include "llframetimer.h"
+#include "llsingleton.h"
+
// comment out to turn off wind
#define kAUDIO_ENABLE_WIND
//#define kAUDIO_ENABLE_WATER 1 // comment out to turn off water
@@ -38,4 +41,48 @@ void audio_update_volume(bool force_update = true);
void audio_update_listener();
void audio_update_wind(bool force_update = true);
+class LLViewerAudio : public LLSingleton<LLViewerAudio>
+{
+public:
+
+ enum EFadeState
+ {
+ FADE_IDLE,
+ FADE_IN,
+ FADE_OUT,
+ };
+
+ LLViewerAudio();
+ virtual ~LLViewerAudio();
+
+ void startInternetStreamWithAutoFade(std::string streamURI);
+ void stopInternetStreamWithAutoFade();
+
+ bool onIdleUpdate();
+
+ EFadeState getFadeState() { return mFadeState; }
+ bool isDone() { return mDone; };
+ F32 getFadeVolume();
+ bool getForcedTeleportFade() { return mForcedTeleportFade; };
+ void setForcedTeleportFade(bool fade) { mForcedTeleportFade = fade;} ;
+ void setNextStreamURI(std::string stream) { mNextStreamURI = stream; } ;
+
+private:
+
+ bool mDone;
+ F32 mFadeTime;
+ std::string mNextStreamURI;
+ EFadeState mFadeState;
+ LLFrameTimer stream_fade_timer;
+ bool mIdleListnerActive;
+ bool mForcedTeleportFade;
+ boost::signals2::connection mTeleportFailedConnection;
+
+ void registerIdleListener();
+ void deregisterIdleListener() { mIdleListnerActive = false; };
+ void startFading();
+ void onTeleportFailed();
+
+};
+
#endif //LL_VIEWER_H
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index 7f7366dd3d..a437a8b3b5 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -218,8 +218,15 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const
void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zflip, BOOL no_hacks)
{
GLint* viewport = (GLint*) gGLViewport;
- GLdouble* model = gGLModelView;
- GLdouble* proj = gGLProjection;
+ F64 model[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ model[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
GLdouble objX,objY,objZ;
LLVector3 frust[8];
@@ -325,8 +332,8 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
aspect = getAspect();
// Load camera view matrix
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.loadIdentity();
glh::matrix4f proj_mat;
@@ -385,14 +392,14 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
proj_mat *= gl_perspective(fov_y,aspect,z_near,z_far);
- glLoadMatrixf(proj_mat.m);
+ gGL.loadMatrix(proj_mat.m);
for (U32 i = 0; i < 16; i++)
{
gGLProjection[i] = proj_mat.m[i];
}
- glMatrixMode( GL_MODELVIEW );
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
glh::matrix4f modelview((GLfloat*) OGL_TO_CFR_ROTATION);
@@ -402,7 +409,7 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
modelview *= glh::matrix4f(ogl_matrix);
- glLoadMatrixf(modelview.m);
+ gGL.loadMatrix(modelview.m);
if (for_selection && (width > 1 || height > 1))
{
@@ -420,7 +427,6 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
if (!for_selection && mZoomFactor == 1.f)
{
// Save GL matrices for access elsewhere in code, especially project_world_to_screen
- //glGetDoublev(GL_MODELVIEW_MATRIX, gGLModelView);
for (U32 i = 0; i < 16; i++)
{
gGLModelView[i] = modelview.m[i];
@@ -428,14 +434,6 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
}
updateFrustumPlanes(*this);
-
- /*if (gSavedSettings.getBOOL("CameraOffset"))
- {
- glMatrixMode(GL_PROJECTION);
- glTranslatef(0,0,-50);
- glRotatef(20.0,1,0,0);
- glMatrixMode(GL_MODELVIEW);
- }*/
}
@@ -443,11 +441,20 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
// screen coordinates to the agent's region.
void LLViewerCamera::projectScreenToPosAgent(const S32 screen_x, const S32 screen_y, LLVector3* pos_agent) const
{
-
GLdouble x, y, z;
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
gluUnProject(
GLdouble(screen_x), GLdouble(screen_y), 0.0,
- gGLModelView, gGLProjection, (GLint*)gGLViewport,
+ mdlv, proj, (GLint*)gGLViewport,
&x,
&y,
&z );
@@ -484,8 +491,17 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ],
- gGLModelView, gGLProjection, (GLint*)viewport,
+ mdlv, proj, (GLint*)viewport,
&x, &y, &z))
{
// convert screen coordinates to virtual UI coordinates
@@ -587,9 +603,19 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
GLdouble x, y, z; // object's window coords, GL-style
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY],
- pos_agent.mV[VZ], gGLModelView,
- gGLProjection, (GLint*)viewport,
+ pos_agent.mV[VZ], mdlv,
+ proj, (GLint*)viewport,
&x, &y, &z))
{
x /= gViewerWindow->getDisplayScale().mV[VX];
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 87ca80260f..73e4d11d7b 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -118,12 +118,6 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
gBumpImageList.destroyGL();
gBumpImageList.restoreGL();
- // Changing shader also changes the terrain detail to high, reflect that change here
- if (newvalue.asBoolean())
- {
- // shaders enabled, set terrain detail to high
- gSavedSettings.setS32("RenderTerrainDetail", 1);
- }
// else, leave terrain detail as is
LLViewerShaderMgr::instance()->setShaders();
return true;
@@ -142,7 +136,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
LLPipeline::RENDER_TYPE_WATER,
LLPipeline::RENDER_TYPE_PASS_GRASS,
LLPipeline::RENDER_TYPE_HUD,
- LLPipeline::RENDER_TYPE_PARTICLES,
LLPipeline::RENDER_TYPE_CLOUDS,
LLPipeline::RENDER_TYPE_HUD_PARTICLES,
LLPipeline::END_RENDER_TYPES);
@@ -158,7 +151,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
LLPipeline::RENDER_TYPE_WATER,
LLPipeline::RENDER_TYPE_PASS_GRASS,
LLPipeline::RENDER_TYPE_HUD,
- LLPipeline::RENDER_TYPE_PARTICLES,
LLPipeline::RENDER_TYPE_CLOUDS,
LLPipeline::RENDER_TYPE_HUD_PARTICLES,
LLPipeline::END_RENDER_TYPES);
@@ -168,33 +160,23 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
return true;
}
-bool handleRenderTransparentWaterChanged(const LLSD& newvalue)
+bool handleRenderAvatarComplexityLimitChanged(const LLSD& newvalue)
{
- LLWorld::getInstance()->updateWaterObjects();
return true;
}
-static bool handleReleaseGLBufferChanged(const LLSD& newvalue)
+bool handleRenderTransparentWaterChanged(const LLSD& newvalue)
{
- if (gPipeline.isInit())
- {
- gPipeline.releaseGLBuffers();
- gPipeline.createGLBuffers();
- }
+ LLWorld::getInstance()->updateWaterObjects();
return true;
}
-static bool handleFSAASamplesChanged(const LLSD& newvalue)
+static bool handleReleaseGLBufferChanged(const LLSD& newvalue)
{
if (gPipeline.isInit())
{
gPipeline.releaseGLBuffers();
gPipeline.createGLBuffers();
-
- if (LLPipeline::sRenderDeferred)
- {
- LLViewerShaderMgr::instance()->setShaders();
- }
}
return true;
}
@@ -400,11 +382,12 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue)
LLRenderTarget::sUseFBO = newvalue.asBoolean();
if (gPipeline.isInit())
{
+ LLPipeline::refreshCachedSettings();
gPipeline.updateRenderDeferred();
gPipeline.releaseGLBuffers();
gPipeline.createGLBuffers();
gPipeline.resetVertexBuffers();
- if (LLPipeline::sRenderDeferred && LLRenderTarget::sUseFBO)
+ if (LLPipeline::sRenderDeferred == (BOOL)LLRenderTarget::sUseFBO)
{
LLViewerShaderMgr::instance()->setShaders();
}
@@ -469,12 +452,6 @@ bool handleEffectColorChanged(const LLSD& newvalue)
return true;
}
-bool handleVectorizeChanged(const LLSD& newvalue)
-{
- LLViewerJointMesh::updateVectorize();
- return true;
-}
-
bool handleHighResSnapshotChanged(const LLSD& newvalue)
{
// High Res Snapshot active, must uncheck RenderUIInSnapshot
@@ -538,18 +515,12 @@ bool toggle_show_navigation_panel(const LLSD& newvalue)
{
bool value = newvalue.asBoolean();
- LLNavigationBar::getInstance()->showNavigationPanel(value);
+ LLNavigationBar::getInstance()->setVisible(value);
gSavedSettings.setBOOL("ShowMiniLocationPanel", !value);
return true;
}
-bool toggle_show_favorites_panel(const LLSD& newvalue)
-{
- LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean());
- return true;
-}
-
bool toggle_show_mini_location_panel(const LLSD& newvalue)
{
bool value = newvalue.asBoolean();
@@ -566,7 +537,7 @@ bool toggle_show_object_render_cost(const LLSD& newvalue)
return true;
}
-void toggle_updater_service_active(LLControlVariable* control, const LLSD& new_value)
+void toggle_updater_service_active(const LLSD& new_value)
{
if(new_value.asInteger())
{
@@ -591,26 +562,27 @@ void settings_setup_listeners()
gSavedSettings.getControl("OctreeMaxNodeCapacity")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeAlphaDistanceFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeAttachmentSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
- gSavedSettings.getControl("RenderMaxTextureIndex")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+ gSavedSettings.getControl("RenderMaxTextureIndex")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUseTriStrips")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUIBuffer")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+ gSavedSettings.getControl("RenderDepthOfField")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+ gSavedSettings.getControl("RenderFSAASamples")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularResX")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularResY")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularExponent")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
- gSavedSettings.getControl("RenderFSAASamples")->getSignal()->connect(boost::bind(&handleFSAASamplesChanged, _2));
gSavedSettings.getControl("RenderAnisotropic")->getSignal()->connect(boost::bind(&handleAnisotropicChanged, _2));
gSavedSettings.getControl("RenderShadowResolutionScale")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
- gSavedSettings.getControl("EnableRippleWater")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderGlowResolutionPow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderAvatarCloth")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _2));
+ gSavedSettings.getControl("RenderAvatarComplexityLimit")->getSignal()->connect(boost::bind(&handleRenderAvatarComplexityLimitChanged, _2));
gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2));
gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2));
gSavedSettings.getControl("RenderAvatarPhysicsLODFactor")->getSignal()->connect(boost::bind(&handleAvatarPhysicsLODChanged, _2));
@@ -635,7 +607,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2));
gSavedSettings.getControl("RenderShadowDetail")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderDeferredSSAO")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
- gSavedSettings.getControl("RenderDeferredGI")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderPerformanceTest")->getSignal()->connect(boost::bind(&handleRenderPerfTestChanged, _2));
gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _2));
gSavedSettings.getControl("AuditTexture")->getSignal()->connect(boost::bind(&handleAuditTextureChanged, _2));
@@ -660,6 +631,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2));
gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+ gSavedSettings.getControl("RenderUseVAO")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderVBOMappingDisable")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderUseStreamVBO")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderPreferStreamDraw")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
@@ -714,10 +686,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _2));
gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _2));
gSavedSettings.getControl("HighResSnapshot")->getSignal()->connect(boost::bind(handleHighResSnapshotChanged, _2));
- gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
- gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
- gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
- gSavedSettings.getControl("VectorizeSkin")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
gSavedSettings.getControl("PTTCurrentlyEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
gSavedSettings.getControl("PushToTalkButton")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
@@ -732,10 +700,9 @@ void settings_setup_listeners()
gSavedSettings.getControl("UseDebugMenus")->getSignal()->connect(boost::bind(&show_debug_menus));
gSavedSettings.getControl("AgentPause")->getSignal()->connect(boost::bind(&toggle_agent_pause, _2));
gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2));
- gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2));
gSavedSettings.getControl("ShowMiniLocationPanel")->getSignal()->connect(boost::bind(&toggle_show_mini_location_panel, _2));
gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2));
- gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(&toggle_updater_service_active);
+ gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(boost::bind(&toggle_updater_service_active, _2));
gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2));
gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2));
}
diff --git a/indra/newview/llviewercontrollistener.cpp b/indra/newview/llviewercontrollistener.cpp
index 8bc25fa281..361b96221c 100644
--- a/indra/newview/llviewercontrollistener.cpp
+++ b/indra/newview/llviewercontrollistener.cpp
@@ -31,99 +31,196 @@
#include "llviewercontrollistener.h"
#include "llviewercontrol.h"
+#include "llcontrol.h"
+#include "llerror.h"
+#include "llsdutil.h"
+#include "stringize.h"
+#include <sstream>
-LLViewerControlListener gSavedSettingsListener;
+namespace {
+
+LLViewerControlListener sSavedSettingsListener;
+
+} // unnamed namespace
LLViewerControlListener::LLViewerControlListener()
: LLEventAPI("LLViewerControl",
- "LLViewerControl listener: set, toggle or set default for various controls",
- "group")
+ "LLViewerControl listener: set, toggle or set default for various controls")
{
- add("Global",
- "Set gSavedSettings control [\"key\"] to value [\"value\"]",
- boost::bind(&LLViewerControlListener::set, &gSavedSettings, _1));
- add("PerAccount",
- "Set gSavedPerAccountSettings control [\"key\"] to value [\"value\"]",
- boost::bind(&LLViewerControlListener::set, &gSavedPerAccountSettings, _1));
- add("Warning",
- "Set gWarningSettings control [\"key\"] to value [\"value\"]",
- boost::bind(&LLViewerControlListener::set, &gWarningSettings, _1));
- add("Crash",
- "Set gCrashSettings control [\"key\"] to value [\"value\"]",
- boost::bind(&LLViewerControlListener::set, &gCrashSettings, _1));
-
-#if 0
- add(/*"toggleControl",*/ "Global", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSettings, _1));
- add(/*"toggleControl",*/ "PerAccount", boost::bind(&LLViewerControlListener::toggleControl, &gSavedPerAccountSettings, _1));
- add(/*"toggleControl",*/ "Warning", boost::bind(&LLViewerControlListener::toggleControl, &gWarningSettings, _1));
- add(/*"toggleControl",*/ "Crash", boost::bind(&LLViewerControlListener::toggleControl, &gCrashSettings, _1));
-
- add(/*"setDefault",*/ "Global", boost::bind(&LLViewerControlListener::setDefault, &gSavedSettings, _1));
- add(/*"setDefault",*/ "PerAccount", boost::bind(&LLViewerControlListener::setDefault, &gSavedPerAccountSettings, _1));
- add(/*"setDefault",*/ "Warning", boost::bind(&LLViewerControlListener::setDefault, &gWarningSettings, _1));
- add(/*"setDefault",*/ "Crash", boost::bind(&LLViewerControlListener::setDefault, &gCrashSettings, _1));
-#endif // 0
+ std::ostringstream groupnames;
+ groupnames << "[\"group\"] is one of ";
+ const char* delim = "";
+ for (LLControlGroup::key_iter cgki(LLControlGroup::beginKeys()),
+ cgkend(LLControlGroup::endKeys());
+ cgki != cgkend; ++cgki)
+ {
+ groupnames << delim << '"' << *cgki << '"';
+ delim = ", ";
+ }
+ groupnames << '\n';
+ std::string grouphelp(groupnames.str());
+ std::string replyhelp("If [\"reply\"] requested, send new [\"value\"] on specified LLEventPump\n");
+
+ add("set",
+ std::string("Set [\"group\"] control [\"key\"] to optional value [\"value\"]\n"
+ "If [\"value\"] omitted, set to control's defined default value\n") +
+ grouphelp + replyhelp,
+ &LLViewerControlListener::set,
+ LLSDMap("group", LLSD())("key", LLSD()));
+ add("toggle",
+ std::string("Toggle [\"group\"] control [\"key\"], if boolean\n") + grouphelp + replyhelp,
+ &LLViewerControlListener::toggle,
+ LLSDMap("group", LLSD())("key", LLSD()));
+ add("get",
+ std::string("Query [\"group\"] control [\"key\"], replying on LLEventPump [\"reply\"]\n") +
+ grouphelp,
+ &LLViewerControlListener::get,
+ LLSDMap("group", LLSD())("key", LLSD())("reply", LLSD()));
+ add("groups",
+ "Send on LLEventPump [\"reply\"] an array [\"groups\"] of valid group names",
+ &LLViewerControlListener::groups,
+ LLSDMap("reply", LLSD()));
+ add("vars",
+ std::string("For [\"group\"], send on LLEventPump [\"reply\"] an array [\"vars\"],\n"
+ "each of whose entries looks like:\n"
+ " [\"name\"], [\"type\"], [\"value\"], [\"comment\"]\n") + grouphelp,
+ &LLViewerControlListener::vars,
+ LLSDMap("group", LLSD())("reply", LLSD()));
}
-//static
-void LLViewerControlListener::set(LLControlGroup * controls, LLSD const & event_data)
+struct Info
{
- if(event_data.has("key"))
+ Info(const LLSD& request):
+ response(LLSD(), request),
+ groupname(request["group"]),
+ group(LLControlGroup::getInstance(groupname)),
+ key(request["key"]),
+ control(NULL)
{
- std::string key(event_data["key"]);
+ if (! group)
+ {
+ response.error(STRINGIZE("Unrecognized group '" << groupname << "'"));
+ return;
+ }
- if(controls->controlExists(key))
+ control = group->getControl(key);
+ if (! control)
{
- controls->setUntypedValue(key, event_data["value"]);
+ response.error(STRINGIZE("In group '" << groupname
+ << "', unrecognized control key '" << key << "'"));
}
- else
+ }
+
+ ~Info()
+ {
+ // If in fact the request passed to our constructor names a valid
+ // group and key, grab the final value of the indicated control and
+ // stuff it in our response. Since this outer destructor runs before
+ // the contained Response destructor, this data will go into the
+ // response we send.
+ if (control)
{
- llwarns << "requested unknown control: \"" << key << '\"' << llendl;
+ response["name"] = control->getName();
+ response["type"] = group->typeEnumToString(control->type());
+ response["value"] = control->get();
+ response["comment"] = control->getComment();
}
}
+
+ LLEventAPI::Response response;
+ std::string groupname;
+ LLControlGroup* group;
+ std::string key;
+ LLControlVariable* control;
+};
+
+//static
+void LLViewerControlListener::set(LLSD const & request)
+{
+ Info info(request);
+ if (! info.control)
+ return;
+
+ if (request.has("value"))
+ {
+ info.control->setValue(request["value"]);
+ }
+ else
+ {
+ info.control->resetToDefault();
+ }
}
//static
-void LLViewerControlListener::toggleControl(LLControlGroup * controls, LLSD const & event_data)
+void LLViewerControlListener::toggle(LLSD const & request)
{
- if(event_data.has("key"))
+ Info info(request);
+ if (! info.control)
+ return;
+
+ if (info.control->isType(TYPE_BOOLEAN))
+ {
+ info.control->set(! info.control->get().asBoolean());
+ }
+ else
{
- std::string key(event_data["key"]);
+ info.response.error(STRINGIZE("toggle of non-boolean '" << info.groupname
+ << "' control '" << info.key
+ << "', type is "
+ << info.group->typeEnumToString(info.control->type())));
+ }
+}
- if(controls->controlExists(key))
- {
- LLControlVariable * control = controls->getControl(key);
- if(control->isType(TYPE_BOOLEAN))
- {
- control->set(!control->get().asBoolean());
- }
- else
- {
- llwarns << "requested toggle of non-boolean control: \"" << key << "\", type is " << control->type() << llendl;
- }
- }
- else
- {
- llwarns << "requested unknown control: \"" << key << '\"' << llendl;
- }
+void LLViewerControlListener::get(LLSD const & request)
+{
+ // The Info constructor and destructor actually do all the work here.
+ Info info(request);
+}
+
+void LLViewerControlListener::groups(LLSD const & request)
+{
+ // No Info, we're not looking up either a group or a control name.
+ Response response(LLSD(), request);
+ for (LLControlGroup::key_iter cgki(LLControlGroup::beginKeys()),
+ cgkend(LLControlGroup::endKeys());
+ cgki != cgkend; ++cgki)
+ {
+ response["groups"].append(*cgki);
}
}
-//static
-void LLViewerControlListener::setDefault(LLControlGroup * controls, LLSD const & event_data)
+struct CollectVars: public LLControlGroup::ApplyFunctor
{
- if(event_data.has("key"))
+ CollectVars(LLControlGroup* g):
+ mGroup(g)
+ {}
+
+ virtual void apply(const std::string& name, LLControlVariable* control)
{
- std::string key(event_data["key"]);
+ vars.append(LLSDMap
+ ("name", name)
+ ("type", mGroup->typeEnumToString(control->type()))
+ ("value", control->get())
+ ("comment", control->getComment()));
+ }
- if(controls->controlExists(key))
- {
- LLControlVariable * control = controls->getControl(key);
- control->resetToDefault();
- }
- else
- {
- llwarns << "requested unknown control: \"" << key << '\"' << llendl;
- }
+ LLControlGroup* mGroup;
+ LLSD vars;
+};
+
+void LLViewerControlListener::vars(LLSD const & request)
+{
+ // This method doesn't use Info, because we're not looking up a specific
+ // control name.
+ Response response(LLSD(), request);
+ std::string groupname(request["group"]);
+ LLControlGroup* group(LLControlGroup::getInstance(groupname));
+ if (! group)
+ {
+ return response.error(STRINGIZE("Unrecognized group '" << groupname << "'"));
}
+
+ CollectVars collector(group);
+ group->applyToAll(&collector);
+ response["vars"] = collector.vars;
}
diff --git a/indra/newview/llviewercontrollistener.h b/indra/newview/llviewercontrollistener.h
index fd211b97af..2e72046924 100644
--- a/indra/newview/llviewercontrollistener.h
+++ b/indra/newview/llviewercontrollistener.h
@@ -40,11 +40,11 @@ public:
LLViewerControlListener();
private:
- static void set(LLControlGroup *controls, LLSD const & event_data);
- static void toggleControl(LLControlGroup *controls, LLSD const & event_data);
- static void setDefault(LLControlGroup *controls, LLSD const & event_data);
+ static void set(LLSD const & event_data);
+ static void toggle(LLSD const & event_data);
+ static void get(LLSD const & event_data);
+ static void groups(LLSD const & event_data);
+ static void vars(LLSD const & event_data);
};
-extern LLViewerControlListener gSavedSettingsListener;
-
#endif // LL_LLVIEWERCONTROLLISTENER_H
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 911fc8e1ed..3f0b5bf3fb 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -114,8 +114,8 @@ void render_disconnected_background();
void display_startup()
{
if ( !gViewerWindow->getActive()
- || !gViewerWindow->mWindow->getVisible()
- || gViewerWindow->mWindow->getMinimized() )
+ || !gViewerWindow->getWindow()->getVisible()
+ || gViewerWindow->getWindow()->getMinimized() )
{
return;
}
@@ -124,7 +124,8 @@ void display_startup()
// Update images?
//gImageList.updateImages(0.01f);
-
+ LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
+
LLGLSDefault gls_default;
// Required for HTML update in login screen
@@ -157,7 +158,7 @@ void display_startup()
LLGLState::checkStates();
LLGLState::checkTextureChannels();
- gViewerWindow->mWindow->swapBuffers();
+ gViewerWindow->getWindow()->swapBuffers();
glClear(GL_DEPTH_BUFFER_BIT);
}
@@ -202,6 +203,7 @@ void display_stats()
gMemoryAllocated = LLMemory::getCurrentRSS();
U32 memory = (U32)(gMemoryAllocated / (1024*1024));
llinfos << llformat("MEMORY: %d MB", memory) << llendl;
+ LLMemory::logMemoryInfo(TRUE) ;
gRecentMemoryTime.reset();
}
}
@@ -211,6 +213,10 @@ static LLFastTimer::DeclareTimer FTM_RENDER("Render", true);
static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky");
static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Bump");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
@@ -222,7 +228,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{ //skip render on frames where window has been resized
gGL.flush();
glClear(GL_COLOR_BUFFER_BIT);
- gViewerWindow->mWindow->swapBuffers();
+ gViewerWindow->getWindow()->swapBuffers();
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
gPipeline.resizeScreenTexture();
gResizeScreenTexture = FALSE;
gWindowResized = FALSE;
@@ -259,8 +267,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// In fact, must explicitly check the minimized state before drawing.
// Attempting to draw into a minimized window causes a GL error. JC
if ( !gViewerWindow->getActive()
- || !gViewerWindow->mWindow->getVisible()
- || gViewerWindow->mWindow->getMinimized() )
+ || !gViewerWindow->getWindow()->getVisible()
+ || gViewerWindow->getWindow()->getMinimized() )
{
// Clean up memory the pools may have allocated
if (rebuild)
@@ -522,10 +530,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// Note that these are not the same as GL defaults...
stop_glerror();
- F32 one[4] = {1.f, 1.f, 1.f, 1.f};
- glLightModelfv (GL_LIGHT_MODEL_AMBIENT,one);
+ gGL.setAmbientLightColor(LLColor4::white);
stop_glerror();
-
+
/////////////////////////////////////
//
// Render
@@ -610,24 +617,17 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//Increment drawable frame counter
LLDrawable::incrementVisible();
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
+
LLSpatialGroup::sNoDelete = TRUE;
- LLPipeline::sUseOcclusion =
- (!gUseWireframe
- && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
- && gSavedSettings.getBOOL("UseOcclusion")
- && gGLManager.mHasOcclusionQuery) ? 2 : 0;
+ LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
/*if (LLPipeline::sUseOcclusion && LLPipeline::sRenderDeferred)
{ //force occlusion on for all render types if doing deferred render (tighter shadow frustum)
LLPipeline::sUseOcclusion = 3;
}*/
- LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
- LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
- LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
- LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
- LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
-
S32 occlusion = LLPipeline::sUseOcclusion;
if (gDepthDirty)
{ //depth buffer is invalid, don't overwrite occlusion state
@@ -655,10 +655,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP);
- {
- LLFastTimer ftm(FTM_CLIENT_COPY);
- LLVertexBuffer::clientCopy(0.016);
- }
if (gResizeScreenTexture)
{
@@ -691,14 +687,18 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
glh::matrix4f mod = glh_get_current_modelview();
glViewport(0,0,512,512);
LLVOAvatar::updateFreezeCounter() ;
- LLVOAvatar::updateImpostors();
+
+ if(!LLPipeline::sMemAllocationThrottled)
+ {
+ LLVOAvatar::updateImpostors();
+ }
glh_set_current_projection(proj);
glh_set_current_modelview(mod);
- glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(proj.m);
- glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf(mod.m);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.loadMatrix(proj.m);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.loadMatrix(mod.m);
gViewerWindow->setup3DViewport();
LLGLState::checkStates();
@@ -709,14 +709,21 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
+ LLGLState::checkStates();
+ LLGLState::checkClientArrays();
+
//if (!for_snapshot)
{
LLMemType mt_gw(LLMemType::MTYPE_DISPLAY_GEN_REFLECTION);
LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery");
gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());
gPipeline.generateHighlight(*LLViewerCamera::getInstance());
+ gPipeline.renderPhysicsDisplay();
}
+ LLGLState::checkStates();
+ LLGLState::checkClientArrays();
+
//////////////////////////////////////
//
// Update images, using the image stats generated during object update/culling
@@ -730,19 +737,36 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE);
LLFastTimer t(FTM_IMAGE_UPDATE);
- LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
- LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_CLASS);
+ LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
+ LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ }
- gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
+
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_BUMP);
+ gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
+ }
- F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
- max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
- gTextureList.updateImages(max_image_decode_time);
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_LIST);
+ F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
+ max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
+ gTextureList.updateImages(max_image_decode_time);
+ }
- //remove dead textures from GL
- LLImageGL::deleteDeadTextures();
- stop_glerror();
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_DELETE);
+ //remove dead textures from GL
+ LLImageGL::deleteDeadTextures();
+ stop_glerror();
+ }
}
+
+ LLGLState::checkStates();
+ LLGLState::checkClientArrays();
+
///////////////////////////////////
//
// StateSort
@@ -770,6 +794,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
}
+ LLGLState::checkStates();
+ LLGLState::checkClientArrays();
+
LLPipeline::sUseOcclusion = occlusion;
{
@@ -793,13 +820,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//// assumes frontmost floater with focus is opaque
//if (frontmost_floaterp && gFocusMgr.childHasKeyboardFocus(frontmost_floaterp))
//{
- // glMatrixMode(GL_MODELVIEW);
- // glPushMatrix();
+ // gGL.matrixMode(LLRender::MM_MODELVIEW);
+ // gGL.pushMatrix();
// {
// gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE);
- // glLoadIdentity();
+ // gGL.loadIdentity();
// LLRect floater_rect = frontmost_floaterp->calcScreenRect();
// // deflate by one pixel so rounding errors don't occlude outside of floater extents
@@ -809,8 +836,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// (F32)floater_rect.mRight / (F32)gViewerWindow->getWindowWidthScaled(),
// (F32)floater_rect.mBottom / (F32)gViewerWindow->getWindowHeightScaled());
// floater_3d_rect.translate(-0.5f, -0.5f);
- // glTranslatef(0.f, 0.f, -LLViewerCamera::getInstance()->getNear());
- // glScalef(LLViewerCamera::getInstance()->getNear() * LLViewerCamera::getInstance()->getAspect() / sinf(LLViewerCamera::getInstance()->getView()), LLViewerCamera::getInstance()->getNear() / sinf(LLViewerCamera::getInstance()->getView()), 1.f);
+ // gGL.translatef(0.f, 0.f, -LLViewerCamera::getInstance()->getNear());
+ // gGL.scalef(LLViewerCamera::getInstance()->getNear() * LLViewerCamera::getInstance()->getAspect() / sinf(LLViewerCamera::getInstance()->getView()), LLViewerCamera::getInstance()->getNear() / sinf(LLViewerCamera::getInstance()->getView()), 1.f);
// gGL.color4fv(LLColor4::white.mV);
// gGL.begin(LLVertexBuffer::QUADS);
// {
@@ -822,12 +849,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// gGL.end();
// glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
// }
- // glPopMatrix();
+ // gGL.popMatrix();
//}
LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
- LLPipeline::refreshRenderDeferred();
+ LLGLState::checkStates();
+ LLGLState::checkClientArrays();
+
stop_glerror();
if (to_texture)
@@ -843,6 +872,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
else
{
gPipeline.mScreen.bindTarget();
+ if (LLPipeline::sUnderWaterRender && !gPipeline.canUseWindLightShaders())
+ {
+ const LLColor4 &col = LLDrawPoolWater::sWaterFogColor;
+ glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
+ }
gPipeline.mScreen.clear();
}
@@ -878,6 +912,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
stop_glerror();
}
+ for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++)
+ { //dummy cleanup of any currently bound textures
+ if (gGL.getTexUnit(i)->getCurrType() != LLTexUnit::TT_NONE)
+ {
+ gGL.getTexUnit(i)->unbind(gGL.getTexUnit(i)->getCurrType());
+ gGL.getTexUnit(i)->disable();
+ }
+ }
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderFlush");
if (to_texture)
@@ -948,10 +990,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
void render_hud_attachments()
{
LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS);
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
glh::matrix4f current_proj = glh_get_current_projection();
glh::matrix4f current_mod = glh_get_current_modelview();
@@ -1037,10 +1079,10 @@ void render_hud_attachments()
}
LLPipeline::sUseOcclusion = use_occlusion;
}
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
glh_set_current_projection(current_proj);
glh_set_current_modelview(current_mod);
@@ -1123,12 +1165,12 @@ BOOL setup_hud_matrices(const LLRect& screen_region)
if (!result) return result;
// set up transform to keep HUD objects in front of camera
- glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(proj.m);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.loadMatrix(proj.m);
glh_set_current_projection(proj);
- glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf(model.m);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.loadMatrix(model.m);
glh_set_current_modelview(model);
return TRUE;
}
@@ -1144,8 +1186,8 @@ void render_ui(F32 zoom_factor, int subfield)
if (!gSnapshot)
{
- glPushMatrix();
- glLoadMatrixd(gGLLastModelView);
+ gGL.pushMatrix();
+ gGL.loadMatrix(gGLLastModelView);
glh_set_current_modelview(glh_copy_matrix(gGLLastModelView));
}
@@ -1201,13 +1243,13 @@ void render_ui(F32 zoom_factor, int subfield)
if (!gSnapshot)
{
glh_set_current_modelview(saved_view);
- glPopMatrix();
+ gGL.popMatrix();
}
if (gDisplaySwapBuffers)
{
LLFastTimer t(FTM_SWAP);
- gViewerWindow->mWindow->swapBuffers();
+ gViewerWindow->getWindow()->swapBuffers();
}
gDisplaySwapBuffers = TRUE;
}
@@ -1274,10 +1316,10 @@ void draw_axes()
gGL.vertex3f(0.0f, 0.0f, 40.0f);
gGL.end();
// Some coordinate axes
- glPushMatrix();
- glTranslatef( v.mV[VX], v.mV[VY], v.mV[VZ] );
+ gGL.pushMatrix();
+ gGL.translatef( v.mV[VX], v.mV[VY], v.mV[VZ] );
renderCoordinateAxes();
- glPopMatrix();
+ gGL.popMatrix();
}
void render_ui_3d()
@@ -1299,14 +1341,19 @@ void render_ui_3d()
// Debugging stuff goes before the UI.
+ stop_glerror();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
// Coordinate axes
if (gSavedSettings.getBOOL("ShowAxes"))
{
draw_axes();
}
- stop_glerror();
-
gViewerWindow->renderSelections(FALSE, FALSE, TRUE); // Non HUD call in render_hud_elements
stop_glerror();
}
@@ -1339,7 +1386,7 @@ void render_ui_2d()
}
stop_glerror();
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ //gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
// render outline for HUD
if (isAgentAvatarValid() && gAgentCamera.mHUDCurZoom < 0.98f)
@@ -1347,10 +1394,10 @@ void render_ui_2d()
gGL.pushMatrix();
S32 half_width = (gViewerWindow->getWorldViewWidthScaled() / 2);
S32 half_height = (gViewerWindow->getWorldViewHeightScaled() / 2);
- glScalef(LLUI::sGLScaleFactor.mV[0], LLUI::sGLScaleFactor.mV[1], 1.f);
- glTranslatef((F32)half_width, (F32)half_height, 0.f);
+ gGL.scalef(LLUI::sGLScaleFactor.mV[0], LLUI::sGLScaleFactor.mV[1], 1.f);
+ gGL.translatef((F32)half_width, (F32)half_height, 0.f);
F32 zoom = gAgentCamera.mHUDCurZoom;
- glScalef(zoom,zoom,1.f);
+ gGL.scalef(zoom,zoom,1.f);
gGL.color4fv(LLColor4::white.mV);
gl_rect_2d(-half_width, half_height, half_width, -half_height, FALSE);
gGL.popMatrix();
@@ -1429,6 +1476,11 @@ void render_ui_2d()
void render_disconnected_background()
{
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
gGL.color4f(1,1,1,1);
if (!gDisconnectedImagep && gDisconnected)
{
@@ -1482,22 +1534,28 @@ void render_disconnected_background()
{
LLGLSUIDefault gls_ui;
gViewerWindow->setup2DRender();
- glPushMatrix();
+ gGL.pushMatrix();
{
// scale ui to reflect UIScaleFactor
// this can't be done in setup2DRender because it requires a
// pushMatrix/popMatrix pair
const LLVector2& display_scale = gViewerWindow->getDisplayScale();
- glScalef(display_scale.mV[VX], display_scale.mV[VY], 1.f);
+ gGL.scalef(display_scale.mV[VX], display_scale.mV[VY], 1.f);
gGL.getTexUnit(0)->bind(gDisconnectedImagep);
gGL.color4f(1.f, 1.f, 1.f, 1.f);
gl_rect_2d_simple_tex(width, height);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
- glPopMatrix();
+ gGL.popMatrix();
}
gGL.flush();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
+
}
void display_cleanup()
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 6ae8e79be4..8406f639df 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -33,9 +33,11 @@
#include "llcompilequeue.h"
#include "llcallfloater.h"
+#include "llfasttimerview.h"
#include "llfloaterabout.h"
#include "llfloateranimpreview.h"
#include "llfloaterauction.h"
+#include "llfloateravatar.h"
#include "llfloateravatarpicker.h"
#include "llfloateravatartextures.h"
#include "llfloaterbeacons.h"
@@ -55,15 +57,15 @@
#include "llfloatereditwater.h"
#include "llfloaterenvironmentsettings.h"
#include "llfloaterevent.h"
-#include "llfloatersearch.h"
+#include "llfloaterdestinations.h"
#include "llfloaterfonttest.h"
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
#include "llfloatergroups.h"
#include "llfloaterhardwaresettings.h"
#include "llfloaterhelpbrowser.h"
-#include "llfloatermediabrowser.h"
#include "llfloaterwebcontent.h"
+#include "llfloaterwebprofile.h"
#include "llfloatermediasettings.h"
#include "llfloaterhud.h"
#include "llfloaterimagepreview.h"
@@ -79,10 +81,10 @@
#include "llfloatermodelwizard.h"
#include "llfloaternamedesc.h"
#include "llfloaternotificationsconsole.h"
+#include "llfloaterobjectweights.h"
#include "llfloateropenobject.h"
#include "llfloaterpay.h"
#include "llfloaterperms.h"
-#include "llfloaterpostcard.h"
#include "llfloaterpostprocess.h"
#include "llfloaterpreference.h"
#include "llfloaterproperties.h"
@@ -91,9 +93,10 @@
#include "llfloaterreporter.h"
#include "llfloaterscriptdebug.h"
#include "llfloaterscriptlimits.h"
+#include "llfloatersearch.h"
#include "llfloatersellland.h"
#include "llfloatersettingsdebug.h"
-#include "llfloatersidetraytab.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloatersnapshot.h"
#include "llfloatersounddevices.h"
#include "llfloatertelehub.h"
@@ -102,6 +105,8 @@
#include "llfloatertools.h"
#include "llfloatertos.h"
#include "llfloatertopobjects.h"
+#include "llfloatertoybox.h"
+#include "llfloatertranslationsettings.h"
#include "llfloateruipreview.h"
#include "llfloatervoiceeffect.h"
#include "llfloaterwhitelistentry.h"
@@ -127,15 +132,16 @@
#include "llscriptfloater.h"
#include "llfloatermodelpreview.h"
#include "llcommandhandler.h"
+#include "llnearbychatbar.h"
// *NOTE: Please add files in alphabetical order to keep merges easy.
-// handle secondlife:///app/floater/{NAME} URLs
+// handle secondlife:///app/openfloater/{NAME} URLs
class LLFloaterOpenHandler : public LLCommandHandler
{
public:
// requires trusted browser to trigger
- LLFloaterOpenHandler() : LLCommandHandler("floater", UNTRUSTED_THROTTLE) { }
+ LLFloaterOpenHandler() : LLCommandHandler("openfloater", UNTRUSTED_THROTTLE) { }
bool handle(const LLSD& params, const LLSD& query_map,
LLMediaCtrl* web)
@@ -159,8 +165,11 @@ void LLViewerFloaterReg::registerFloaters()
// *NOTE: Please keep these alphabetized for easier merges
LLFloaterAboutUtil::registerFloater();
+ LLFloaterReg::add("fast_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFastTimerView>);
LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
+ LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
+ LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatar>);
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
@@ -176,10 +185,12 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
- LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
+ LLFloaterReg::add("chat_bar", "floater_chat_bar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChatBar>);
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
+ LLFloaterReg::add("destinations", "floater_destinations.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDestinations>);
+
LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>);
LLFloaterReg::add("env_settings", "floater_environment_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvironmentSettings>);
LLFloaterReg::add("env_delete_preset", "floater_delete_env_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDeleteEnvPreset>);
@@ -202,7 +213,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>);
LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>);
LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);
- LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventory>);
+ LLFloaterReg::add("inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
LLInspectAvatarUtil::registerFloater();
LLInspectGroupUtil::registerFloater();
@@ -215,7 +226,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLandHoldings>);
LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>);
- LLFloaterReg::add("media_browser", "floater_media_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaBrowser>);
LLFloaterReg::add("media_settings", "floater_media_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaSettings>);
LLFloaterReg::add("message_critical", "floater_critical.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTOS>);
LLFloaterReg::add("message_tos", "floater_tos.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTOS>);
@@ -226,14 +236,19 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>);
+ LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterObjectWeights>);
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>);
LLFloaterPayUtil::registerFloater();
- LLFloaterReg::add("postcard", "floater_postcard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostcard>);
+ LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
+ LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
+ LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreferenceProxy>);
LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHardwareSettings>);
+ LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTranslationSettings>);
LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPerms>);
+ LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>);
LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview");
LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewGesture>, "preview");
@@ -246,16 +261,13 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("publish_classified", "floater_publish_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPublishClassifiedFloater>);
LLFloaterReg::add("telehubs", "floater_telehub.xml",&LLFloaterReg::build<LLFloaterTelehub>);
- LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml",
- &LLFloaterReg::build<LLFloaterTestInspectors>);
+ LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml", &LLFloaterReg::build<LLFloaterTestInspectors>);
//LLFloaterReg::add("test_list_view", "floater_test_list_view.xml",&LLFloaterReg::build<LLFloaterTestListView>);
- LLFloaterReg::add("test_textbox", "floater_test_textbox.xml",
- &LLFloaterReg::build<LLFloater>);
- LLFloaterReg::add("test_text_editor", "floater_test_text_editor.xml",
- &LLFloaterReg::build<LLFloater>);
- LLFloaterReg::add("test_widgets", "floater_test_widgets.xml",
- &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("test_textbox", "floater_test_textbox.xml", &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("test_text_editor", "floater_test_text_editor.xml", &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", &LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("top_objects", "floater_top_objects.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTopObjects>);
+ LLFloaterReg::add("toybox", "floater_toybox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterToybox>);
LLFloaterReg::add("reporter", "floater_report_abuse.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterReporter>);
LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterResetQueue>);
@@ -268,13 +280,16 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptLimits>);
LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
- LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml", &LLFloaterReg::build<LLFloaterSideTrayTab>);
LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>);
LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
- LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
+ LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
+ LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
+ LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
+ LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
+
LLFloaterUIPreviewUtil::registerFloater();
LLFloaterReg::add("upload_anim", "floater_animation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload");
@@ -286,9 +301,9 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>);
LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>);
- LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>);
+ LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>);
- LLFloaterWindowSizeUtil::registerFloater();
+ LLFloaterReg::add("window_size", "floater_window_size.xml", &LLFloaterReg::build<LLFloaterWindowSize>);
LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
// *NOTE: Please keep these alphabetized for easier merges
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index 9101222393..a179b61cff 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -40,6 +40,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
const std::string &icon_name_open, // name of the folder icon
const std::string &icon_name_closed,
BOOL is_quiet, // folder doesn't need a UI update when changed
+ bool hide_if_empty, // folder not shown if empty
const std::string &dictionary_name = empty_string // no reverse lookup needed on non-ensembles, so in most cases just leave this blank
)
:
@@ -47,7 +48,8 @@ struct ViewerFolderEntry : public LLDictionaryEntry
mNewCategoryName(new_category_name),
mIconNameOpen(icon_name_open),
mIconNameClosed(icon_name_closed),
- mIsQuiet(is_quiet)
+ mIsQuiet(is_quiet),
+ mHideIfEmpty(hide_if_empty)
{
mAllowedNames.clear();
}
@@ -66,7 +68,8 @@ struct ViewerFolderEntry : public LLDictionaryEntry
*/
mIconNameOpen("Inv_FolderOpen"), mIconNameClosed("Inv_FolderClosed"),
mNewCategoryName(new_category_name),
- mIsQuiet(FALSE)
+ mIsQuiet(FALSE),
+ mHideIfEmpty(false)
{
const std::string delims (",");
LLStringUtilBase<char>::getTokens(allowed_names, mAllowedNames, delims);
@@ -91,6 +94,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
typedef std::vector<std::string> name_vec_t;
name_vec_t mAllowedNames;
BOOL mIsQuiet;
+ bool mHideIfEmpty;
};
class LLViewerFolderDictionary : public LLSingleton<LLViewerFolderDictionary>,
@@ -104,43 +108,43 @@ protected:
LLViewerFolderDictionary::LLViewerFolderDictionary()
{
- // NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET?
- // |-------------------------|-----------------------|----------------------|-----------|
- addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE));
- addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE));
- addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ // NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET? HIDE IF EMPTY?
+ // |-------------------------|-----------------------|----------------------|-----------|--------------|
+ addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE, false));
+ addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE, false));
+ addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE, true));
+ addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE));
- addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE));
- addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE));
- addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE, false));
+ addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE, true));
+ addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE, true));
+ addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, "default"));
+ addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default"));
#if SUPPORT_ENSEMBLES
initEnsemblesFromFile();
#else
for (U32 type = (U32)LLFolderType::FT_ENSEMBLE_START; type <= (U32)LLFolderType::FT_ENSEMBLE_END; ++type)
{
- addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE));
+ addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false));
}
#endif
}
@@ -259,6 +263,15 @@ BOOL LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type)
return FALSE;
}
+bool LLViewerFolderType::lookupIsHiddenIfEmpty(LLFolderType::EType folder_type)
+{
+ const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type);
+ if (entry)
+ {
+ return entry->mHideIfEmpty;
+ }
+ return false;
+}
const std::string &LLViewerFolderType::lookupNewCategoryName(LLFolderType::EType folder_type)
{
diff --git a/indra/newview/llviewerfoldertype.h b/indra/newview/llviewerfoldertype.h
index f5938de619..13d5a8fbbd 100644
--- a/indra/newview/llviewerfoldertype.h
+++ b/indra/newview/llviewerfoldertype.h
@@ -40,6 +40,7 @@ public:
static const std::string& lookupIconName(EType folder_type, BOOL is_open = FALSE); // folder icon name
static BOOL lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured
+ static bool lookupIsHiddenIfEmpty(EType folder_type); // folder is not displayed if empty
static const std::string& lookupNewCategoryName(EType folder_type); // default name when creating new category
static LLFolderType::EType lookupTypeFromNewCategoryName(const std::string& name); // default name when creating new category
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index 3a3d4f3881..a8a918f259 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -69,15 +69,12 @@ LLHelpHandler gHelpHandler;
//////////////////////////////
// implement LLHelp interface
-void LLViewerHelp::showTopic(const std::string &topic)
+std::string LLViewerHelp::getURL(const std::string &topic)
{
// allow overriding the help server with a local help file
if( gSavedSettings.getBOOL("HelpUseLocal") )
{
- showHelp();
- LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
- helpbrowser->navigateToLocalPage( "help-offline" , "index.html" );
- return;
+ return "__local";
}
// if the help topic is empty, use the default topic
@@ -99,11 +96,12 @@ void LLViewerHelp::showTopic(const std::string &topic)
}
}
- // work out the URL for this topic and display it
- showHelp();
-
- std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic );
- setRawURL(helpURL);
+ return LLViewerHelpUtil::buildHelpURL( help_topic );
+}
+
+void LLViewerHelp::showTopic(const std::string& topic)
+{
+ LLFloaterReg::showInstance("help_browser", topic);
}
std::string LLViewerHelp::defaultTopic()
@@ -146,23 +144,3 @@ std::string LLViewerHelp::getTopicFromFocus()
return defaultTopic();
}
-// static
-void LLViewerHelp::showHelp()
-{
- LLFloaterReg::showInstance("help_browser");
-}
-
-// static
-void LLViewerHelp::setRawURL(std::string url)
-{
- LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
- if (helpbrowser)
- {
- helpbrowser->openMedia(url);
- }
- else
- {
- llwarns << "Eep, help_browser floater not found" << llendl;
- }
-}
-
diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h
index 7612986227..a983012e2e 100644
--- a/indra/newview/llviewerhelp.h
+++ b/indra/newview/llviewerhelp.h
@@ -45,6 +45,8 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
/// display the specified help topic in the help viewer
/*virtual*/ void showTopic(const std::string &topic);
+ std::string getURL(const std::string& topic);
+
// return topic derived from viewer UI focus, else default topic
std::string getTopicFromFocus();
@@ -56,10 +58,6 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
// return topic to use for the top-level help, invoked by F1
/*virtual*/ std::string f1HelpTopic();
-
- private:
- static void showHelp(); // make sure help UI is visible & raised
- static void setRawURL(std::string url); // send URL to help UI
};
#endif // header guard
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 22666cec0d..163581ea7f 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -34,7 +34,9 @@
#include "llagent.h"
#include "llagentcamera.h"
#include "llagentwearables.h"
+#include "llfloatersidepanelcontainer.h"
#include "llviewerfoldertype.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llviewercontrol.h"
#include "llconsole.h"
@@ -43,7 +45,6 @@
#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llgesturemgr.h"
-#include "llsidetray.h"
#include "llinventorybridge.h"
#include "llinventorypanel.h"
@@ -139,7 +140,35 @@ public:
mInventoryItemsDict["Female - Shrug"] = LLTrans::getString("Female - Shrug");
mInventoryItemsDict["Female - Stick tougue out"]= LLTrans::getString("Female - Stick tougue out");
mInventoryItemsDict["Female - Wow"] = LLTrans::getString("Female - Wow");
-
+
+ //common
+ mInventoryItemsDict["/bow"] = LLTrans::getString("/bow");
+ mInventoryItemsDict["/clap"] = LLTrans::getString("/clap");
+ mInventoryItemsDict["/count"] = LLTrans::getString("/count");
+ mInventoryItemsDict["/extinguish"] = LLTrans::getString("/extinguish");
+ mInventoryItemsDict["/kmb"] = LLTrans::getString("/kmb");
+ mInventoryItemsDict["/muscle"] = LLTrans::getString("/muscle");
+ mInventoryItemsDict["/no"] = LLTrans::getString("/no");
+ mInventoryItemsDict["/no!"] = LLTrans::getString("/no!");
+ mInventoryItemsDict["/paper"] = LLTrans::getString("/paper");
+ mInventoryItemsDict["/pointme"] = LLTrans::getString("/pointme");
+ mInventoryItemsDict["/pointyou"] = LLTrans::getString("/pointyou");
+ mInventoryItemsDict["/rock"] = LLTrans::getString("/rock");
+ mInventoryItemsDict["/scissor"] = LLTrans::getString("/scissor");
+ mInventoryItemsDict["/smoke"] = LLTrans::getString("/smoke");
+ mInventoryItemsDict["/stretch"] = LLTrans::getString("/stretch");
+ mInventoryItemsDict["/whistle"] = LLTrans::getString("/whistle");
+ mInventoryItemsDict["/yes"] = LLTrans::getString("/yes");
+ mInventoryItemsDict["/yes!"] = LLTrans::getString("/yes!");
+ mInventoryItemsDict["afk"] = LLTrans::getString("afk");
+ mInventoryItemsDict["dance1"] = LLTrans::getString("dance1");
+ mInventoryItemsDict["dance2"] = LLTrans::getString("dance2");
+ mInventoryItemsDict["dance3"] = LLTrans::getString("dance3");
+ mInventoryItemsDict["dance4"] = LLTrans::getString("dance4");
+ mInventoryItemsDict["dance5"] = LLTrans::getString("dance5");
+ mInventoryItemsDict["dance6"] = LLTrans::getString("dance6");
+ mInventoryItemsDict["dance7"] = LLTrans::getString("dance7");
+ mInventoryItemsDict["dance8"] = LLTrans::getString("dance8");
}
/**
@@ -192,7 +221,7 @@ public:
// support secondlife:///app/inventory/show
if (params[0].asString() == "show")
{
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD());
+ LLFloaterSidePanelContainer::showPanel("inventory", LLSD());
return true;
}
@@ -418,6 +447,9 @@ void LLViewerInventoryItem::fetchFromServer(void) const
BOOL LLViewerInventoryItem::unpackMessage(LLSD item)
{
BOOL rv = LLInventoryItem::fromLLSD(item);
+
+ LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName);
+
mIsComplete = TRUE;
return rv;
}
@@ -945,7 +977,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item)
if( gAgentCamera.cameraCustomizeAvatar() )
{
// If we're in appearance editing mode, the current tab may need to be refreshed
- LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
if (panel)
{
panel->showDefaultSubpart();
@@ -1177,7 +1209,23 @@ void move_inventory_item(
gAgent.sendReliableMessage();
}
-void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
+const LLUUID get_folder_by_itemtype(const LLInventoryItem *src)
+{
+ LLUUID retval = LLUUID::null;
+
+ if (src)
+ {
+ retval = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(src->getType()));
+ }
+
+ return retval;
+}
+
+void copy_inventory_from_notecard(const LLUUID& destination_id,
+ const LLUUID& object_id,
+ const LLUUID& notecard_inv_id,
+ const LLInventoryItem *src,
+ U32 callback_id)
{
if (NULL == src)
{
@@ -1223,7 +1271,7 @@ void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecar
body["notecard-id"] = notecard_inv_id;
body["object-id"] = object_id;
body["item-id"] = src->getUUID();
- body["folder-id"] = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(src->getType()));
+ body["folder-id"] = destination_id;
body["callback-id"] = (LLSD::Integer)callback_id;
request["message"] = "CopyInventoryFromNotecard";
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 41542a4e0f..7822ef4da6 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -363,7 +363,10 @@ void move_inventory_item(
const std::string& new_name,
LLPointer<LLInventoryCallback> cb);
-void copy_inventory_from_notecard(const LLUUID& object_id,
+const LLUUID get_folder_by_itemtype(const LLInventoryItem *src);
+
+void copy_inventory_from_notecard(const LLUUID& destination_id,
+ const LLUUID& object_id,
const LLUUID& notecard_inv_id,
const LLInventoryItem *src,
U32 callback_id = 0);
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index baf85d6884..a907f102f8 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -126,7 +126,7 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )
// //----------------------------------------------------------------
// // push matrix stack
// //----------------------------------------------------------------
-// glPushMatrix();
+// gGL.pushMatrix();
// //----------------------------------------------------------------
// // render the bone to my parent
@@ -140,8 +140,8 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )
// // offset to joint position and
// // rotate to our orientation
// //----------------------------------------------------------------
-// glLoadIdentity();
-// glMultMatrixf( &getWorldMatrix().mMatrix[0][0] );
+// gGL.loadIdentity();
+// gGL.multMatrix( &getWorldMatrix().mMatrix[0][0] );
// //----------------------------------------------------------------
// // render joint axes
@@ -233,7 +233,7 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )
// //----------------------------------------------------------------
// // pop matrix stack
// //----------------------------------------------------------------
-// glPopMatrix();
+// gGL.popMatrix();
// }
@@ -346,7 +346,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// F32 boneSize = 0.02f;
// // rotate to point to child (bone direction)
-// glPushMatrix();
+// gGL.pushMatrix();
// LLVector3 boneX = getPosition();
// F32 length = boneX.normVec();
@@ -362,7 +362,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// rotateMat.setFwdRow( boneX );
// rotateMat.setLeftRow( boneY );
// rotateMat.setUpRow( boneZ );
-// glMultMatrixf( &rotateMat.mMatrix[0][0] );
+// gGL.multMatrix( &rotateMat.mMatrix[0][0] );
// // render the bone
// gGL.color3f( 0.5f, 0.5f, 0.0f );
@@ -388,7 +388,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// gGL.end();
// // restore matrix
-// glPopMatrix();
+// gGL.popMatrix();
// }
//--------------------------------------------------------------------
@@ -541,9 +541,9 @@ void LLViewerJointCollisionVolume::renderCollision()
updateWorldMatrix();
gGL.pushMatrix();
- glMultMatrixf( &mXform.getWorldMatrix().mMatrix[0][0] );
+ gGL.multMatrix( &mXform.getWorldMatrix().mMatrix[0][0] );
- gGL.color3f( 0.f, 0.f, 1.f );
+ gGL.diffuseColor3f( 0.f, 0.f, 1.f );
gGL.begin(LLRender::LINES);
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 77c8bb0329..76f4e18c27 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -459,7 +459,10 @@ void LLViewerJointMesh::uploadJointMatrices()
}
}
stop_glerror();
- glUniform4fvARB(gAvatarMatrixParam, 45, mat);
+ if (LLGLSLShader::sCurBoundShaderPtr)
+ {
+ LLGLSLShader::sCurBoundShaderPtr->uniform4fv(LLViewerShaderMgr::AVATAR_MATRIX, 45, mat);
+ }
stop_glerror();
}
else
@@ -512,7 +515,8 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
{
if (!mValid || !mMesh || !mFace || !mVisible ||
!mFace->getVertexBuffer() ||
- mMesh->getNumFaces() == 0)
+ mMesh->getNumFaces() == 0 ||
+ (LLGLSLShader::sNoFixedFunction && LLGLSLShader::sCurBoundShaderPtr == NULL))
{
return 0;
}
@@ -527,13 +531,13 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
// setup current color
//----------------------------------------------------------------
if (is_dummy)
- glColor4fv(LLVOAvatar::getDummyColor().mV);
+ gGL.diffuseColor4fv(LLVOAvatar::getDummyColor().mV);
else
- glColor4fv(mColor.mV);
+ gGL.diffuseColor4fv(mColor.mV);
stop_glerror();
- LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), mFace->getPool()->getVertexShaderLevel() > 0 ? 0.f : mShiny);
+ LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), (mFace->getPool()->getVertexShaderLevel() > 0 || LLGLSLShader::sNoFixedFunction) ? 0.f : mShiny);
//----------------------------------------------------------------
// setup current texture
@@ -547,11 +551,11 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
if (mIsTransparent)
{
- glColor4f(1.f, 1.f, 1.f, 1.f);
+ gGL.diffuseColor4f(1.f, 1.f, 1.f, 1.f);
}
else
{
- glColor4f(0.7f, 0.6f, 0.3f, 1.f);
+ gGL.diffuseColor4f(0.7f, 0.6f, 0.3f, 1.f);
gGL.getTexUnit(diffuse_channel)->setTextureColorBlend(LLTexUnit::TBO_LERP_TEX_ALPHA, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR);
}
}
@@ -582,13 +586,16 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
gGL.getTexUnit(diffuse_channel)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT));
}
- mFace->getVertexBuffer()->setBuffer(sRenderMask);
+
+ U32 mask = sRenderMask;
U32 start = mMesh->mFaceVertexOffset;
U32 end = start + mMesh->mFaceVertexCount - 1;
U32 count = mMesh->mFaceIndexCount;
U32 offset = mMesh->mFaceIndexOffset;
+ LLVertexBuffer* buff = mFace->getVertexBuffer();
+
if (mMesh->hasWeights())
{
if ((mFace->getPool()->getVertexShaderLevel() > 0))
@@ -597,17 +604,24 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
{
uploadJointMatrices();
}
+ mask = mask | LLVertexBuffer::MAP_WEIGHT;
+ if (mFace->getPool()->getVertexShaderLevel() > 1)
+ {
+ mask = mask | LLVertexBuffer::MAP_CLOTHWEIGHT;
+ }
}
- mFace->getVertexBuffer()->drawRange(LLRender::TRIANGLES, start, end, count, offset);
+ buff->setBuffer(mask);
+ buff->drawRange(LLRender::TRIANGLES, start, end, count, offset);
}
else
{
- glPushMatrix();
+ gGL.pushMatrix();
LLMatrix4 jointToWorld = getWorldMatrix();
- glMultMatrixf((GLfloat*)jointToWorld.mMatrix);
- mFace->getVertexBuffer()->drawRange(LLRender::TRIANGLES, start, end, count, offset);
- glPopMatrix();
+ gGL.multMatrix((GLfloat*)jointToWorld.mMatrix);
+ buff->setBuffer(mask);
+ buff->drawRange(LLRender::TRIANGLES, start, end, count, offset);
+ gGL.popMatrix();
}
gPipeline.addTrianglesDrawn(count);
@@ -692,9 +706,9 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w
if (num_verts)
{
- face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp);
face->getVertexBuffer()->getIndexStrider(indicesp);
-
+ face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp);
+
verticesp += mMesh->mFaceVertexOffset;
normalsp += mMesh->mFaceVertexOffset;
@@ -752,7 +766,7 @@ BOOL LLViewerJointMesh::updateLOD(F32 pixel_area, BOOL activate)
}
// static
-void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh)
+void LLViewerJointMesh::updateGeometry(LLFace *mFace, LLPolyMesh *mMesh)
{
LLStrider<LLVector3> o_vertices;
LLStrider<LLVector3> o_normals;
@@ -803,64 +817,7 @@ void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh)
}
}
- buffer->setBuffer(0);
-}
-
-const U32 UPDATE_GEOMETRY_CALL_MASK = 0x1FFF; // 8K samples before overflow
-const U32 UPDATE_GEOMETRY_CALL_OVERFLOW = ~UPDATE_GEOMETRY_CALL_MASK;
-static bool sUpdateGeometryCallPointer = false;
-static F64 sUpdateGeometryGlobalTime = 0.0 ;
-static F64 sUpdateGeometryElapsedTime = 0.0 ;
-static F64 sUpdateGeometryElapsedTimeOff = 0.0 ;
-static F64 sUpdateGeometryElapsedTimeOn = 0.0 ;
-static F64 sUpdateGeometryRunAvgOff[10];
-static F64 sUpdateGeometryRunAvgOn[10];
-static U32 sUpdateGeometryRunCount = 0 ;
-static U32 sUpdateGeometryCalls = 0 ;
-static U32 sUpdateGeometryLastProcessor = 0 ;
-static BOOL sVectorizePerfTest = FALSE;
-static U32 sVectorizeProcessor = 0;
-
-//static
-void (*LLViewerJointMesh::sUpdateGeometryFunc)(LLFace* face, LLPolyMesh* mesh);
-
-//static
-void LLViewerJointMesh::updateVectorize()
-{
- sVectorizePerfTest = gSavedSettings.getBOOL("VectorizePerfTest");
- sVectorizeProcessor = gSavedSettings.getU32("VectorizeProcessor");
- BOOL vectorizeEnable = gSavedSettings.getBOOL("VectorizeEnable");
- BOOL vectorizeSkin = gSavedSettings.getBOOL("VectorizeSkin");
-
- std::string vp;
- switch(sVectorizeProcessor)
- {
- case 2: vp = "SSE2"; break; // *TODO: replace the magic #s
- case 1: vp = "SSE"; break;
- default: vp = "COMPILER DEFAULT"; break;
- }
- LL_INFOS("AppInit") << "Vectorization : " << ( vectorizeEnable ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
- LL_INFOS("AppInit") << "Vector Processor : " << vp << LL_ENDL ;
- LL_INFOS("AppInit") << "Vectorized Skinning : " << ( vectorizeSkin ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
- if(vectorizeEnable && vectorizeSkin)
- {
- switch(sVectorizeProcessor)
- {
- case 2:
- sUpdateGeometryFunc = &updateGeometrySSE2;
- break;
- case 1:
- sUpdateGeometryFunc = &updateGeometrySSE;
- break;
- default:
- sUpdateGeometryFunc = &updateGeometryVectorized;
- break;
- }
- }
- else
- {
- sUpdateGeometryFunc = &updateGeometryOriginal;
- }
+ buffer->flush();
}
void LLViewerJointMesh::updateJointGeometry()
@@ -875,129 +832,8 @@ void LLViewerJointMesh::updateJointGeometry()
return;
}
- if (!sVectorizePerfTest)
- {
- // Once we've measured performance, just run the specified
- // code version.
- if(sUpdateGeometryFunc == updateGeometryOriginal)
- uploadJointMatrices();
- sUpdateGeometryFunc(mFace, mMesh);
- }
- else
- {
- // At startup, measure the amount of time in skinning and choose
- // the fastest one.
- LLTimer ug_timer ;
-
- if (sUpdateGeometryCallPointer)
- {
- if(sUpdateGeometryFunc == updateGeometryOriginal)
- uploadJointMatrices();
- // call accelerated version for this processor
- sUpdateGeometryFunc(mFace, mMesh);
- }
- else
- {
- uploadJointMatrices();
- updateGeometryOriginal(mFace, mMesh);
- }
-
- sUpdateGeometryElapsedTime += ug_timer.getElapsedTimeF64();
- ++sUpdateGeometryCalls;
- if(0 != (sUpdateGeometryCalls & UPDATE_GEOMETRY_CALL_OVERFLOW))
- {
- F64 time_since_app_start = ug_timer.getElapsedSeconds();
- if(sUpdateGeometryGlobalTime == 0.0
- || sUpdateGeometryLastProcessor != sVectorizeProcessor)
- {
- sUpdateGeometryGlobalTime = time_since_app_start;
- sUpdateGeometryElapsedTime = 0;
- sUpdateGeometryCalls = 0;
- sUpdateGeometryRunCount = 0;
- sUpdateGeometryLastProcessor = sVectorizeProcessor;
- sUpdateGeometryCallPointer = false;
- return;
- }
- F64 percent_time_in_function =
- ( sUpdateGeometryElapsedTime * 100.0 ) / ( time_since_app_start - sUpdateGeometryGlobalTime ) ;
- sUpdateGeometryGlobalTime = time_since_app_start;
- if (!sUpdateGeometryCallPointer)
- {
- // First set of run data is with vectorization off.
- sUpdateGeometryCallPointer = true;
- llinfos << "profile (avg of " << sUpdateGeometryCalls << " samples) = "
- << "vectorize off " << percent_time_in_function
- << "% of time with "
- << (sUpdateGeometryElapsedTime / (F64)sUpdateGeometryCalls)
- << " seconds per call "
- << llendl;
- sUpdateGeometryRunAvgOff[sUpdateGeometryRunCount] = percent_time_in_function;
- sUpdateGeometryElapsedTimeOff += sUpdateGeometryElapsedTime;
- sUpdateGeometryCalls = 0;
- }
- else
- {
- // Second set of run data is with vectorization on.
- sUpdateGeometryCallPointer = false;
- llinfos << "profile (avg of " << sUpdateGeometryCalls << " samples) = "
- << "VEC on " << percent_time_in_function
- << "% of time with "
- << (sUpdateGeometryElapsedTime / (F64)sUpdateGeometryCalls)
- << " seconds per call "
- << llendl;
- sUpdateGeometryRunAvgOn[sUpdateGeometryRunCount] = percent_time_in_function ;
- sUpdateGeometryElapsedTimeOn += sUpdateGeometryElapsedTime;
-
- sUpdateGeometryCalls = 0;
- sUpdateGeometryRunCount++;
- F64 a = 0.0, b = 0.0;
- for(U32 i = 0; i<sUpdateGeometryRunCount; i++)
- {
- a += sUpdateGeometryRunAvgOff[i];
- b += sUpdateGeometryRunAvgOn[i];
- }
- a /= sUpdateGeometryRunCount;
- b /= sUpdateGeometryRunCount;
- F64 perf_boost = ( sUpdateGeometryElapsedTimeOff - sUpdateGeometryElapsedTimeOn ) / sUpdateGeometryElapsedTimeOn;
- llinfos << "run averages (" << (F64)sUpdateGeometryRunCount
- << "/10) vectorize off " << a
- << "% : vectorize type " << sVectorizeProcessor
- << " " << b
- << "% : performance boost "
- << perf_boost * 100.0
- << "%"
- << llendl ;
- if(sUpdateGeometryRunCount == 10)
- {
- // In case user runs test again, force reset of data on
- // next run.
- sUpdateGeometryGlobalTime = 0.0;
-
- // We have data now on which version is faster. Switch to that
- // code and save the data for next run.
- gSavedSettings.setBOOL("VectorizePerfTest", FALSE);
-
- if (perf_boost > 0.0)
- {
- llinfos << "Vectorization improves avatar skinning performance, "
- << "keeping on for future runs."
- << llendl;
- gSavedSettings.setBOOL("VectorizeSkin", TRUE);
- }
- else
- {
- // SIMD decreases performance, fall back to original code
- llinfos << "Vectorization decreases avatar skinning performance, "
- << "switching back to original code."
- << llendl;
-
- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
- }
- }
- }
- sUpdateGeometryElapsedTime = 0.0f;
- }
- }
+ uploadJointMatrices();
+ updateGeometry(mFace, mMesh);
}
void LLViewerJointMesh::dump()
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index cab1205d61..0191f0cae8 100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -143,23 +143,10 @@ public:
/*virtual*/ BOOL isAnimatable() const { return FALSE; }
- static void updateVectorize(); // Update globals when settings variables change
-
private:
- // Avatar vertex skinning is a significant performance issue on computers
- // with avatar vertex programs turned off (for example, most Macs). We
- // therefore have custom versions that use SIMD instructions.
- //
- // These functions require compiler options for SSE2, SSE, or neither, and
- // hence are contained in separate individual .cpp files. JC
- static void updateGeometryOriginal(LLFace* face, LLPolyMesh* mesh);
- // generic vector code, used for Altivec
- static void updateGeometryVectorized(LLFace* face, LLPolyMesh* mesh);
- static void updateGeometrySSE(LLFace* face, LLPolyMesh* mesh);
- static void updateGeometrySSE2(LLFace* face, LLPolyMesh* mesh);
-
- // Use a fuction pointer to indicate which version we are running.
- static void (*sUpdateGeometryFunc)(LLFace* face, LLPolyMesh* mesh);
+
+ //copy mesh into given face's vertex buffer, applying current animation pose
+ static void updateGeometry(LLFace* face, LLPolyMesh* mesh);
private:
// Allocate skin data
diff --git a/indra/newview/llviewerjointmesh_sse.cpp b/indra/newview/llviewerjointmesh_sse.cpp
deleted file mode 100644
index 400b49d046..0000000000
--- a/indra/newview/llviewerjointmesh_sse.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * @file llviewerjointmesh_sse.cpp
- * @brief SSE vectorized joint skinning code, only used when video card does
- * not support avatar vertex programs.
- *
- * *NOTE: Disabled on Windows builds. See llv4math.h for details.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llviewerjointmesh.h"
-
-// project includes
-#include "llface.h"
-#include "llpolymesh.h"
-
-// library includes
-#include "lldarray.h"
-#include "llv4math.h" // for LL_VECTORIZE
-#include "llv4matrix3.h"
-#include "llv4matrix4.h"
-#include "v3math.h"
-
-
-#if LL_VECTORIZE
-
-inline void matrix_translate(LLV4Matrix4& m, const LLMatrix4* w, const LLVector3& j)
-{
- m.mV[VX] = _mm_loadu_ps(w->mMatrix[VX]);
- m.mV[VY] = _mm_loadu_ps(w->mMatrix[VY]);
- m.mV[VZ] = _mm_loadu_ps(w->mMatrix[VZ]);
- m.mV[VW] = _mm_loadu_ps(w->mMatrix[VW]);
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VX]), m.mV[VX])); // ( ax * vx ) + vw
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VY]), m.mV[VY]));
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VZ]), m.mV[VZ]));
-}
-
-// static
-void LLViewerJointMesh::updateGeometrySSE(LLFace *face, LLPolyMesh *mesh)
-{
- // This cannot be a file-level static because it will be initialized
- // before main() using SSE code, which will crash on non-SSE processors.
- static LLV4Matrix4 sJointMat[32];
- LLDynamicArray<LLJointRenderData*>& joint_data = mesh->getReferenceMesh()->mJointRenderData;
-
- //upload joint pivots/matrices
- for(S32 j = 0, jend = joint_data.count(); j < jend ; ++j )
- {
- matrix_translate(sJointMat[j], joint_data[j]->mWorldMatrix,
- joint_data[j]->mSkinJoint ?
- joint_data[j]->mSkinJoint->mRootToJointSkinOffset
- : joint_data[j+1]->mSkinJoint->mRootToParentJointSkinOffset);
- }
-
- F32 weight = F32_MAX;
- LLV4Matrix4 blend_mat;
-
- LLStrider<LLVector3> o_vertices;
- LLStrider<LLVector3> o_normals;
-
- LLVertexBuffer *buffer = face->getVertexBuffer();
- buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset);
- buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset);
-
- const F32* weights = mesh->getWeights();
- const LLVector3* coords = (const LLVector3*)mesh->getCoords();
- const LLVector3* normals = (const LLVector3*)mesh->getNormals();
- for (U32 index = 0, index_end = mesh->getNumVertices(); index < index_end; ++index)
- {
- if( weight != weights[index])
- {
- S32 joint = llfloor(weight = weights[index]);
- blend_mat.lerp(sJointMat[joint], sJointMat[joint+1], weight - joint);
- }
- blend_mat.multiply(coords[index], o_vertices[index]);
- ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]);
- }
-
- buffer->setBuffer(0);
-}
-
-#else
-
-void LLViewerJointMesh::updateGeometrySSE(LLFace *face, LLPolyMesh *mesh)
-{
- LLViewerJointMesh::updateGeometryVectorized(face, mesh);
-}
-
-#endif
diff --git a/indra/newview/llviewerjointmesh_sse2.cpp b/indra/newview/llviewerjointmesh_sse2.cpp
deleted file mode 100644
index c2296dd569..0000000000
--- a/indra/newview/llviewerjointmesh_sse2.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * @file llviewerjointmesh_sse2.cpp
- * @brief SSE vectorized joint skinning code, only used when video card does
- * not support avatar vertex programs.
- *
- * *NOTE: Disabled on Windows builds. See llv4math.h for details.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-// Visual Studio required settings for this file:
-// Precompiled Headers OFF
-// Code Generation: SSE2
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llviewerjointmesh.h"
-
-// project includes
-#include "llface.h"
-#include "llpolymesh.h"
-
-// library includes
-#include "lldarray.h"
-#include "llstrider.h"
-#include "llv4math.h" // for LL_VECTORIZE
-#include "llv4matrix3.h"
-#include "llv4matrix4.h"
-#include "m4math.h"
-#include "v3math.h"
-
-
-#if LL_VECTORIZE
-
-
-inline void matrix_translate(LLV4Matrix4& m, const LLMatrix4* w, const LLVector3& j)
-{
- m.mV[VX] = _mm_loadu_ps(w->mMatrix[VX]);
- m.mV[VY] = _mm_loadu_ps(w->mMatrix[VY]);
- m.mV[VZ] = _mm_loadu_ps(w->mMatrix[VZ]);
- m.mV[VW] = _mm_loadu_ps(w->mMatrix[VW]);
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VX]), m.mV[VX])); // ( ax * vx ) + vw
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VY]), m.mV[VY]));
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VZ]), m.mV[VZ]));
-}
-
-// static
-void LLViewerJointMesh::updateGeometrySSE2(LLFace *face, LLPolyMesh *mesh)
-{
- // This cannot be a file-level static because it will be initialized
- // before main() using SSE code, which will crash on non-SSE processors.
- static LLV4Matrix4 sJointMat[32];
- LLDynamicArray<LLJointRenderData*>& joint_data = mesh->getReferenceMesh()->mJointRenderData;
-
- //upload joint pivots/matrices
- for(S32 j = 0, jend = joint_data.count(); j < jend ; ++j )
- {
- matrix_translate(sJointMat[j], joint_data[j]->mWorldMatrix,
- joint_data[j]->mSkinJoint ?
- joint_data[j]->mSkinJoint->mRootToJointSkinOffset
- : joint_data[j+1]->mSkinJoint->mRootToParentJointSkinOffset);
- }
-
- F32 weight = F32_MAX;
- LLV4Matrix4 blend_mat;
-
- LLStrider<LLVector3> o_vertices;
- LLStrider<LLVector3> o_normals;
-
- LLVertexBuffer *buffer = face->getVertexBuffer();
- buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset);
- buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset);
-
- const F32* weights = mesh->getWeights();
- const LLVector3* coords = (const LLVector3*)mesh->getCoords();
- const LLVector3* normals = (const LLVector3*)mesh->getNormals();
- for (U32 index = 0, index_end = mesh->getNumVertices(); index < index_end; ++index)
- {
- if( weight != weights[index])
- {
- S32 joint = llfloor(weight = weights[index]);
- blend_mat.lerp(sJointMat[joint], sJointMat[joint+1], weight - joint);
- }
- blend_mat.multiply(coords[index], o_vertices[index]);
- ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]);
- }
-
- //setBuffer(0) called in LLVOAvatar::renderSkinned
-}
-
-#else
-
-void LLViewerJointMesh::updateGeometrySSE2(LLFace *face, LLPolyMesh *mesh)
-{
- LLViewerJointMesh::updateGeometryVectorized(face, mesh);
-}
-
-#endif
diff --git a/indra/newview/llviewerjointmesh_vec.cpp b/indra/newview/llviewerjointmesh_vec.cpp
deleted file mode 100644
index 6600d01d17..0000000000
--- a/indra/newview/llviewerjointmesh_vec.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file llviewerjointmesh_vec.cpp
- * @brief Compiler-generated vectorized joint skinning code, works well on
- * Altivec processors (PowerPC Mac)
- *
- * *NOTE: See llv4math.h for notes on SSE/Altivec vector code.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-#include "llviewerprecompiledheaders.h"
-
-#include "llviewerjointmesh.h"
-
-#include "llface.h"
-#include "llpolymesh.h"
-#include "llv4math.h"
-#include "llv4matrix3.h"
-#include "llv4matrix4.h"
-
-// Generic vectorized code, uses compiler defaults, works well for Altivec
-// on PowerPC.
-
-// static
-void LLViewerJointMesh::updateGeometryVectorized(LLFace *face, LLPolyMesh *mesh)
-{
-#if 0
- static LLV4Matrix4 sJointMat[32];
- LLDynamicArray<LLJointRenderData*>& joint_data = mesh->getReferenceMesh()->mJointRenderData;
- S32 j, joint_num, joint_end = joint_data.count();
- LLV4Vector3 pivot;
-
- //upload joint pivots/matrices
- for(j = joint_num = 0; joint_num < joint_end ; ++joint_num )
- {
- LLSkinJoint *sj;
- const LLMatrix4 * wm = joint_data[joint_num]->mWorldMatrix;
- if (NULL == (sj = joint_data[joint_num]->mSkinJoint))
- {
- sj = joint_data[++joint_num]->mSkinJoint;
- ((LLV4Matrix3)(sJointMat[j] = *wm)).multiply(sj->mRootToParentJointSkinOffset, pivot);
- sJointMat[j++].translate(pivot);
- wm = joint_data[joint_num]->mWorldMatrix;
- }
- ((LLV4Matrix3)(sJointMat[j] = *wm)).multiply(sj->mRootToJointSkinOffset, pivot);
- sJointMat[j++].translate(pivot);
- }
-
- F32 weight = F32_MAX;
- LLV4Matrix4 blend_mat;
-
- LLStrider<LLVector3> o_vertices;
- LLStrider<LLVector3> o_normals;
-
- LLVertexBuffer *buffer = face->mVertexBuffer;
- buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset);
- buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset);
-
- const F32* weights = mesh->getWeights();
- const LLVector3* coords = mesh->getCoords();
- const LLVector3* normals = mesh->getNormals();
- for (U32 index = 0, index_end = mesh->getNumVertices(); index < index_end; ++index)
- {
- if( weight != weights[index])
- {
- S32 joint = llfloor(weight = weights[index]);
- blend_mat.lerp(sJointMat[joint], sJointMat[joint+1], weight - joint);
- }
- blend_mat.multiply(coords[index], o_vertices[index]);
- ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]);
- }
-
- buffer->setBuffer(0);
-#endif
-}
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index fbf11f20db..f6e840adcd 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -51,9 +51,6 @@
#define RY_I 5
#define RZ_I 3
-// minimum time after setting away state before coming back
-const F32 MIN_AFK_TIME = 2.f;
-
F32 LLViewerJoystick::sLastDelta[] = {0,0,0,0,0,0,0};
F32 LLViewerJoystick::sDelta[] = {0,0,0,0,0,0,0};
@@ -551,7 +548,7 @@ void LLViewerJoystick::moveObjects(bool reset)
if (!is_zero)
{
// Clear AFK state if moved beyond the deadzone
- if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME)
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
}
@@ -725,7 +722,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
if (!is_zero)
{
// Clear AFK state if moved beyond the deadzone
- if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME)
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
}
@@ -941,7 +938,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
}
// Clear AFK state if moved beyond the deadzone
- if (!is_zero && gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME)
+ if (!is_zero && gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
}
@@ -1001,7 +998,7 @@ bool LLViewerJoystick::toggleFlycam()
gAgentCamera.changeCameraToDefault();
}
- if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME)
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 1be58eae45..42dabdec0d 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -50,6 +50,7 @@
#include "llvoavatar.h"
#include "llvoavatarself.h"
#include "llviewerregion.h"
+#include "llwebprofile.h"
#include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this!
#include "llfilepicker.h"
#include "llnotifications.h"
@@ -66,9 +67,8 @@
//#include "llfirstuse.h"
#include "llviewernetwork.h"
#include "llwindow.h"
+#include "llvieweraudio.h"
-
-#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows.
#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows.
#include <boost/bind.hpp> // for SkinFolder listener
@@ -319,6 +319,10 @@ public:
std::string cookie = content["set-cookie"].asString();
LLViewerMedia::getCookieStore()->setCookiesFromHost(cookie, mHost);
+
+ // Set cookie for snapshot publishing.
+ std::string auth_cookie = cookie.substr(0, cookie.find(";")); // strip path
+ LLWebProfile::setAuthCookie(auth_cookie);
}
void completedRaw(
@@ -344,6 +348,8 @@ static LLViewerMedia::impl_id_map sViewerMediaTextureIDMap;
static LLTimer sMediaCreateTimer;
static const F32 LLVIEWERMEDIA_CREATE_DELAY = 1.0f;
static F32 sGlobalVolume = 1.0f;
+static bool sForceUpdate = false;
+static LLUUID sOnlyAudibleTextureID = LLUUID::null;
static F64 sLowestLoadableImplInterest = 0.0f;
static bool sAnyMediaShowing = false;
static boost::signals2::connection sTeleportFinishConnection;
@@ -606,7 +612,7 @@ bool LLViewerMedia::textureHasMedia(const LLUUID& texture_id)
// static
void LLViewerMedia::setVolume(F32 volume)
{
- if(volume != sGlobalVolume)
+ if(volume != sGlobalVolume || sForceUpdate)
{
sGlobalVolume = volume;
impl_list::iterator iter = sViewerMediaImplList.begin();
@@ -617,6 +623,8 @@ void LLViewerMedia::setVolume(F32 volume)
LLViewerMediaImpl* pimpl = *iter;
pimpl->updateVolume();
}
+
+ sForceUpdate = false;
}
}
@@ -778,6 +786,12 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi
}
static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE("Update Media");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SPARE_IDLE("Spare Idle");
+static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE_INTEREST("Update/Interest");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SORT("Sort");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SORT2("Sort 2");
+static LLFastTimer::DeclareTimer FTM_MEDIA_MISC("Misc");
+
//////////////////////////////////////////////////////////////////////////////////////////
// static
@@ -802,21 +816,28 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
- for(; iter != end;)
{
- LLViewerMediaImpl* pimpl = *iter++;
- pimpl->update();
- pimpl->calculateInterest();
+ LLFastTimer t(FTM_MEDIA_UPDATE_INTEREST);
+ for(; iter != end;)
+ {
+ LLViewerMediaImpl* pimpl = *iter++;
+ pimpl->update();
+ pimpl->calculateInterest();
+ }
}
// Let the spare media source actually launch
if(sSpareBrowserMediaSource)
{
+ LLFastTimer t(FTM_MEDIA_SPARE_IDLE);
sSpareBrowserMediaSource->idle();
}
- // Sort the static instance list using our interest criteria
- sViewerMediaImplList.sort(priorityComparitor);
+ {
+ LLFastTimer t(FTM_MEDIA_SORT);
+ // Sort the static instance list using our interest criteria
+ sViewerMediaImplList.sort(priorityComparitor);
+ }
// Go through the list again and adjust according to priority.
iter = sViewerMediaImplList.begin();
@@ -844,147 +865,150 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
// max_instances must be set high enough to allow the various instances used in the UI (for the help browser, search, etc.) to be loaded.
// If max_normal + max_low is less than max_instances, things will tend to get unloaded instead of being set to slideshow.
- for(; iter != end; iter++)
{
- LLViewerMediaImpl* pimpl = *iter;
+ LLFastTimer t(FTM_MEDIA_MISC);
+ for(; iter != end; iter++)
+ {
+ LLViewerMediaImpl* pimpl = *iter;
- LLPluginClassMedia::EPriority new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
+ LLPluginClassMedia::EPriority new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
- if(pimpl->isForcedUnloaded() || (impl_count_total >= (int)max_instances))
- {
- // Never load muted or failed impls.
- // Hard limit on the number of instances that will be loaded at one time
- new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
- }
- else if(!pimpl->getVisible())
- {
- new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
- }
- else if(pimpl->hasFocus())
- {
- new_priority = LLPluginClassMedia::PRIORITY_HIGH;
- impl_count_interest_normal++; // count this against the count of "normal" instances for priority purposes
- }
- else if(pimpl->getUsedInUI())
- {
- new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
- impl_count_interest_normal++;
- }
- else if(pimpl->isParcelMedia())
- {
- new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
- impl_count_interest_normal++;
- }
- else
- {
- // Look at interest and CPU usage for instances that aren't in any of the above states.
-
- // Heuristic -- if the media texture's approximate screen area is less than 1/4 of the native area of the texture,
- // turn it down to low instead of normal. This may downsample for plugins that support it.
- bool media_is_small = false;
- F64 approximate_interest = pimpl->getApproximateTextureInterest();
- if(approximate_interest == 0.0f)
+ if(pimpl->isForcedUnloaded() || (impl_count_total >= (int)max_instances))
{
- // this media has no current size, which probably means it's not loaded.
- media_is_small = true;
+ // Never load muted or failed impls.
+ // Hard limit on the number of instances that will be loaded at one time
+ new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
}
- else if(pimpl->getInterest() < (approximate_interest / 4))
+ else if(!pimpl->getVisible())
{
- media_is_small = true;
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
}
-
- if(pimpl->getInterest() == 0.0f)
+ else if(pimpl->hasFocus())
{
- // This media is completely invisible, due to being outside the view frustrum or out of range.
- new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+ new_priority = LLPluginClassMedia::PRIORITY_HIGH;
+ impl_count_interest_normal++; // count this against the count of "normal" instances for priority purposes
}
- else if(check_cpu_usage && (total_cpu > max_cpu))
+ else if(pimpl->getUsedInUI())
{
- // Higher priority plugins have already used up the CPU budget. Set remaining ones to slideshow priority.
- new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
+ new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
+ impl_count_interest_normal++;
}
- else if((impl_count_interest_normal < (int)max_normal) && !media_is_small)
+ else if(pimpl->isParcelMedia())
{
- // Up to max_normal inworld get normal priority
new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
impl_count_interest_normal++;
}
- else if (impl_count_interest_low + impl_count_interest_normal < (int)max_low + (int)max_normal)
+ else
{
- // The next max_low inworld get turned down
- new_priority = LLPluginClassMedia::PRIORITY_LOW;
- impl_count_interest_low++;
-
- // Set the low priority size for downsampling to approximately the size the texture is displayed at.
+ // Look at interest and CPU usage for instances that aren't in any of the above states.
+
+ // Heuristic -- if the media texture's approximate screen area is less than 1/4 of the native area of the texture,
+ // turn it down to low instead of normal. This may downsample for plugins that support it.
+ bool media_is_small = false;
+ F64 approximate_interest = pimpl->getApproximateTextureInterest();
+ if(approximate_interest == 0.0f)
+ {
+ // this media has no current size, which probably means it's not loaded.
+ media_is_small = true;
+ }
+ else if(pimpl->getInterest() < (approximate_interest / 4))
+ {
+ media_is_small = true;
+ }
+
+ if(pimpl->getInterest() == 0.0f)
+ {
+ // This media is completely invisible, due to being outside the view frustrum or out of range.
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+ }
+ else if(check_cpu_usage && (total_cpu > max_cpu))
{
- F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest());
+ // Higher priority plugins have already used up the CPU budget. Set remaining ones to slideshow priority.
+ new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
+ }
+ else if((impl_count_interest_normal < (int)max_normal) && !media_is_small)
+ {
+ // Up to max_normal inworld get normal priority
+ new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
+ impl_count_interest_normal++;
+ }
+ else if (impl_count_interest_low + impl_count_interest_normal < (int)max_low + (int)max_normal)
+ {
+ // The next max_low inworld get turned down
+ new_priority = LLPluginClassMedia::PRIORITY_LOW;
+ impl_count_interest_low++;
+
+ // Set the low priority size for downsampling to approximately the size the texture is displayed at.
+ {
+ F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest());
- pimpl->setLowPrioritySizeLimit(llround(approximate_interest_dimension));
+ pimpl->setLowPrioritySizeLimit(llround(approximate_interest_dimension));
+ }
+ }
+ else
+ {
+ // Any additional impls (up to max_instances) get very infrequent time
+ new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
}
}
- else
- {
- // Any additional impls (up to max_instances) get very infrequent time
- new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
- }
- }
- if(!pimpl->getUsedInUI() && (new_priority != LLPluginClassMedia::PRIORITY_UNLOADED))
- {
- // This is a loadable inworld impl -- the last one in the list in this class defines the lowest loadable interest.
- lowest_interest_loadable = pimpl;
+ if(!pimpl->getUsedInUI() && (new_priority != LLPluginClassMedia::PRIORITY_UNLOADED))
+ {
+ // This is a loadable inworld impl -- the last one in the list in this class defines the lowest loadable interest.
+ lowest_interest_loadable = pimpl;
- impl_count_total++;
- }
+ impl_count_total++;
+ }
- // Overrides if the window is minimized or we lost focus (taking care
- // not to accidentally "raise" the priority either)
- if (!gViewerWindow->getActive() /* viewer window minimized? */
- && new_priority > LLPluginClassMedia::PRIORITY_HIDDEN)
- {
- new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
- }
- else if (!gFocusMgr.getAppHasFocus() /* viewer window lost focus? */
- && new_priority > LLPluginClassMedia::PRIORITY_LOW)
- {
- new_priority = LLPluginClassMedia::PRIORITY_LOW;
- }
+ // Overrides if the window is minimized or we lost focus (taking care
+ // not to accidentally "raise" the priority either)
+ if (!gViewerWindow->getActive() /* viewer window minimized? */
+ && new_priority > LLPluginClassMedia::PRIORITY_HIDDEN)
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+ }
+ else if (!gFocusMgr.getAppHasFocus() /* viewer window lost focus? */
+ && new_priority > LLPluginClassMedia::PRIORITY_LOW)
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_LOW;
+ }
- if(!inworld_media_enabled)
- {
- // If inworld media is locked out, force all inworld media to stay unloaded.
- if(!pimpl->getUsedInUI())
+ if(!inworld_media_enabled)
{
- new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
+ // If inworld media is locked out, force all inworld media to stay unloaded.
+ if(!pimpl->getUsedInUI())
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
+ }
}
- }
- // update the audio stream here as well
- if( !inworld_audio_enabled)
- {
- if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ // update the audio stream here as well
+ if( !inworld_audio_enabled)
{
- gAudiop->stopInternetStream();
+ if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ {
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
+ }
}
- }
- pimpl->setPriority(new_priority);
+ pimpl->setPriority(new_priority);
- if(pimpl->getUsedInUI())
- {
- // Any impls used in the UI should not be in the proximity list.
- pimpl->mProximity = -1;
- }
- else
- {
- proximity_order.push_back(pimpl);
- }
+ if(pimpl->getUsedInUI())
+ {
+ // Any impls used in the UI should not be in the proximity list.
+ pimpl->mProximity = -1;
+ }
+ else
+ {
+ proximity_order.push_back(pimpl);
+ }
- total_cpu += pimpl->getCPUUsage();
+ total_cpu += pimpl->getCPUUsage();
- if (!pimpl->getUsedInUI() && pimpl->hasMedia())
- {
- sAnyMediaShowing = true;
- }
+ if (!pimpl->getUsedInUI() && pimpl->hasMedia())
+ {
+ sAnyMediaShowing = true;
+ }
+ }
}
// Re-calculate this every time.
@@ -1010,6 +1034,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
}
else
{
+ LLFastTimer t(FTM_MEDIA_SORT2);
// Use a distance-based sort for proximity values.
std::stable_sort(proximity_order.begin(), proximity_order.end(), proximity_comparitor);
}
@@ -1065,13 +1090,24 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
gAudiop &&
LLViewerMedia::hasParcelAudio())
{
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ if (LLAudioEngine::AUDIO_PAUSED == gAudiop->isInternetStreamPlaying())
+ {
+ // 'false' means unpause
+ gAudiop->pauseInternetStream(false);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
+ }
}
}
else {
// This actually unloads the impl, as opposed to "stop"ping the media
LLViewerParcelMedia::stop();
- if (gAudiop) gAudiop->stopInternetStream();
+ if (gAudiop)
+ {
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
+ }
}
}
@@ -1362,6 +1398,10 @@ void LLViewerMedia::removeCookie(const std::string &name, const std::string &dom
}
+// This is defined in two files but I don't want to create a dependence between this and llsidepanelinventory
+// just to be able to temporarily disable the outbox.
+#define ENABLE_INVENTORY_DISPLAY_OUTBOX 0 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU
+
class LLInventoryUserStatusResponder : public LLHTTPClient::Responder
{
public:
@@ -1374,8 +1414,18 @@ public:
{
if (isGoodStatus(status))
{
+ std::string merchantStatus = content[gAgent.getID().getString()].asString();
+ llinfos << "Marketplace merchant status: " << merchantStatus << llendl;
+
+ // Save the merchant status before turning on the display
+ gSavedSettings.setString("InventoryMarketplaceUserStatus", merchantStatus);
+
// Complete success
gSavedSettings.setBOOL("InventoryDisplayInbox", true);
+
+#if ENABLE_INVENTORY_DISPLAY_OUTBOX
+ gSavedSettings.setBOOL("InventoryDisplayOutbox", true);
+#endif
}
else if (status == 401)
{
@@ -1390,6 +1440,39 @@ public:
}
};
+
+void doOnetimeEarlyHTTPRequests()
+{
+ std::string url = "https://marketplace.secondlife.com/";
+
+ if (!LLGridManager::getInstance()->isInProductionGrid())
+ {
+ std::string gridLabel = LLGridManager::getInstance()->getGridLabel();
+ url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str());
+
+ // TEMP for Jim's pdp
+ //url = "http://pdp24.lindenlab.com:3000/";
+ }
+
+ url += "api/1/users/";
+ url += gAgent.getID().getString();
+ url += "/user_status";
+
+ llinfos << "http get: " << url << llendl;
+ LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), LLViewerMedia::getHeaders());
+}
+
+
+LLSD LLViewerMedia::getHeaders()
+{
+ LLSD headers = LLSD::emptyMap();
+ headers["Accept"] = "*/*";
+ headers["Cookie"] = sOpenIDCookie;
+ headers["User-Agent"] = getCurrentUserAgent();
+
+ return headers;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::setOpenIDCookie()
@@ -1433,28 +1516,14 @@ void LLViewerMedia::setOpenIDCookie()
std::string profile_url = getProfileURL("");
LLURL raw_profile_url( profile_url.c_str() );
+ LL_DEBUGS("MediaAuth") << "Requesting " << profile_url << llendl;
+ LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << llendl;
LLHTTPClient::get(profile_url,
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
- std::string url = "https://marketplace.secondlife.com/";
-
- if (!LLGridManager::getInstance()->isInProductionGrid())
- {
- std::string gridLabel = LLGridManager::getInstance()->getGridLabel();
- url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str());
- }
-
- url += "api/1/users/";
- url += gAgent.getID().getString();
- url += "/user_status";
-
- headers = LLSD::emptyMap();
- headers["Accept"] = "*/*";
- headers["Cookie"] = sOpenIDCookie;
- headers["User-Agent"] = getCurrentUserAgent();
-
- LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), headers);
+ // FUI: No longer perform the user_status query
+ //doOnetimeEarlyHTTPRequests();
}
}
@@ -1626,6 +1695,15 @@ void LLViewerMedia::onTeleportFinished()
gSavedSettings.setBOOL("MediaTentativeAutoPlay", true);
}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
+void LLViewerMedia::setOnlyAudibleMediaTextureID(const LLUUID& texture_id)
+{
+ sOnlyAudibleTextureID = texture_id;
+ sForceUpdate = true;
+}
+
//////////////////////////////////////////////////////////////////////////////////////////
// LLViewerMediaImpl
//////////////////////////////////////////////////////////////////////////////////////////
@@ -1672,7 +1750,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mNavigateSuspended(false),
mNavigateSuspendedDeferred(false),
mIsUpdated(false),
- mTrustedBrowser(false)
+ mTrustedBrowser(false),
+ mZoomFactor(1.0)
{
// Set up the mute list observer if it hasn't been set up already.
@@ -1763,6 +1842,7 @@ void LLViewerMediaImpl::createMediaSource()
LL_WARNS("Media") << "Failed to initialize media for mime type " << mMimeType << LL_ENDL;
}
}
+
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -1817,7 +1897,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
if(plugin_basename.empty())
{
- LL_WARNS("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL;
+ LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL;
}
else
{
@@ -1843,11 +1923,11 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
llstat s;
if(LLFile::stat(launcher_name, &s))
{
- LL_WARNS("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL;
+ LL_WARNS_ONCE("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL;
}
else if(LLFile::stat(plugin_name, &s))
{
- LL_WARNS("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL;
+ LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL;
}
else
{
@@ -1867,7 +1947,10 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
// collect 'javascript enabled' setting from prefs and send to embedded browser
bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" );
media_source->setJavascriptEnabled( javascript_enabled );
-
+
+ bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");
+ media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled );
+
media_source->setTarget(target);
const std::string plugin_dir = gDirUtilp->getLLPluginDir();
@@ -2188,7 +2271,14 @@ void LLViewerMediaImpl::updateVolume()
}
}
- mMediaSource->setVolume(volume);
+ if (sOnlyAudibleTextureID == LLUUID::null || sOnlyAudibleTextureID == mTextureId)
+ {
+ mMediaSource->setVolume(volume);
+ }
+ else
+ {
+ mMediaSource->setVolume(0.0f);
+ }
}
}
@@ -2247,6 +2337,17 @@ void LLViewerMediaImpl::clearCache()
}
}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::setPageZoomFactor( double factor )
+{
+ if(mMediaSource && factor != mZoomFactor)
+ {
+ mZoomFactor = factor;
+ mMediaSource->set_page_zoom_factor( factor );
+ }
+}
+
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
{
@@ -2395,44 +2496,58 @@ BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask)
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::updateJavascriptObject()
{
+ static LLFrameTimer timer ;
+
if ( mMediaSource )
{
// flag to expose this information to internal browser or not.
bool enable = gSavedSettings.getBOOL("BrowserEnableJSObject");
+
+ if(!enable)
+ {
+ return ; //no need to go further.
+ }
+
+ if(timer.getElapsedTimeF32() < 1.0f)
+ {
+ return ; //do not update more than once per second.
+ }
+ timer.reset() ;
+
mMediaSource->jsEnableObject( enable );
// these values are only menaingful after login so don't set them before
bool logged_in = LLLoginInstance::getInstance()->authSuccess();
if ( logged_in )
{
- // current location within a region
- LLVector3 agent_pos = gAgent.getPositionAgent();
- double x = agent_pos.mV[ VX ];
- double y = agent_pos.mV[ VY ];
- double z = agent_pos.mV[ VZ ];
- mMediaSource->jsAgentLocationEvent( x, y, z );
-
- // current location within the grid
- LLVector3d agent_pos_global = gAgent.getLastPositionGlobal();
- double global_x = agent_pos_global.mdV[ VX ];
- double global_y = agent_pos_global.mdV[ VY ];
- double global_z = agent_pos_global.mdV[ VZ ];
- mMediaSource->jsAgentGlobalLocationEvent( global_x, global_y, global_z );
-
- // current agent orientation
- double rotation = atan2( gAgent.getAtAxis().mV[VX], gAgent.getAtAxis().mV[VY] );
- double angle = rotation * RAD_TO_DEG;
- if ( angle < 0.0f ) angle = 360.0f + angle; // TODO: has to be a better way to get orientation!
- mMediaSource->jsAgentOrientationEvent( angle );
-
- // current region agent is in
- std::string region_name("");
- LLViewerRegion* region = gAgent.getRegion();
- if ( region )
- {
- region_name = region->getName();
- };
- mMediaSource->jsAgentRegionEvent( region_name );
+ // current location within a region
+ LLVector3 agent_pos = gAgent.getPositionAgent();
+ double x = agent_pos.mV[ VX ];
+ double y = agent_pos.mV[ VY ];
+ double z = agent_pos.mV[ VZ ];
+ mMediaSource->jsAgentLocationEvent( x, y, z );
+
+ // current location within the grid
+ LLVector3d agent_pos_global = gAgent.getLastPositionGlobal();
+ double global_x = agent_pos_global.mdV[ VX ];
+ double global_y = agent_pos_global.mdV[ VY ];
+ double global_z = agent_pos_global.mdV[ VZ ];
+ mMediaSource->jsAgentGlobalLocationEvent( global_x, global_y, global_z );
+
+ // current agent orientation
+ double rotation = atan2( gAgent.getAtAxis().mV[VX], gAgent.getAtAxis().mV[VY] );
+ double angle = rotation * RAD_TO_DEG;
+ if ( angle < 0.0f ) angle = 360.0f + angle; // TODO: has to be a better way to get orientation!
+ mMediaSource->jsAgentOrientationEvent( angle );
+
+ // current region agent is in
+ std::string region_name("");
+ LLViewerRegion* region = gAgent.getRegion();
+ if ( region )
+ {
+ region_name = region->getName();
+ };
+ mMediaSource->jsAgentRegionEvent( region_name );
}
// language code the viewer is set to
@@ -2451,7 +2566,7 @@ void LLViewerMediaImpl::updateJavascriptObject()
}
//////////////////////////////////////////////////////////////////////////////////////////
-std::string LLViewerMediaImpl::getName() const
+const std::string& LLViewerMediaImpl::getName() const
{
if (mMediaSource)
{
@@ -2713,8 +2828,14 @@ bool LLViewerMediaImpl::canNavigateBack()
}
//////////////////////////////////////////////////////////////////////////////////////////
+static LLFastTimer::DeclareTimer FTM_MEDIA_DO_UPDATE("Do Update");
+static LLFastTimer::DeclareTimer FTM_MEDIA_GET_DATA("Get Data");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SET_SUBIMAGE("Set Subimage");
+
+
void LLViewerMediaImpl::update()
{
+ LLFastTimer t(FTM_MEDIA_DO_UPDATE);
if(mMediaSource == NULL)
{
if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED)
@@ -2814,20 +2935,27 @@ void LLViewerMediaImpl::update()
if(width > 0 && height > 0)
{
- U8* data = mMediaSource->getBitsData();
+ U8* data = NULL;
+ {
+ LLFastTimer t(FTM_MEDIA_GET_DATA);
+ data = mMediaSource->getBitsData();
+ }
// Offset the pixels pointer to match x_pos and y_pos
data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
data += ( y_pos * mMediaSource->getTextureDepth() );
- placeholder_image->setSubImage(
- data,
- mMediaSource->getBitsWidth(),
- mMediaSource->getBitsHeight(),
- x_pos,
- y_pos,
- width,
- height);
+ {
+ LLFastTimer t(FTM_MEDIA_SET_SUBIMAGE);
+ placeholder_image->setSubImage(
+ data,
+ mMediaSource->getBitsWidth(),
+ mMediaSource->getBitsHeight(),
+ x_pos,
+ y_pos,
+ width,
+ height);
+ }
}
@@ -3286,7 +3414,6 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
{
// This close request is directed at another instance
pass_through = false;
- LLFloaterMediaBrowser::closeRequest(uuid);
LLFloaterWebContent::closeRequest(uuid);
}
}
@@ -3306,7 +3433,6 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
{
// This request is directed at another instance
pass_through = false;
- LLFloaterMediaBrowser::geometryChanged(uuid, plugin->getGeometryX(), plugin->getGeometryY(), plugin->getGeometryWidth(), plugin->getGeometryHeight());
LLFloaterWebContent::geometryChanged(uuid, plugin->getGeometryX(), plugin->getGeometryY(), plugin->getGeometryWidth(), plugin->getGeometryHeight());
}
}
@@ -3400,8 +3526,11 @@ BOOL LLViewerMediaImpl::isUpdated()
return mIsUpdated ;
}
+static LLFastTimer::DeclareTimer FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest");
+
void LLViewerMediaImpl::calculateInterest()
{
+ LLFastTimer t(FTM_MEDIA_CALCULATE_INTEREST);
LLViewerMediaTexture* texture = LLViewerTextureManager::findMediaTexture( mTextureId );
if(texture != NULL)
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index a70c6f4887..15dcda59cf 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -160,6 +160,10 @@ public:
static void createSpareBrowserMediaSource();
static LLPluginClassMedia* getSpareBrowserMediaSource();
+
+ static void setOnlyAudibleMediaTextureID(const LLUUID& texture_id);
+
+ static LLSD getHeaders();
private:
static void setOpenIDCookie();
@@ -246,6 +250,7 @@ public:
std::string getMediaEntryURL() { return mMediaEntryURL; }
void setHomeURL(const std::string& home_url, const std::string& mime_type = LLStringUtil::null) { mHomeURL = home_url; mHomeMimeType = mime_type;};
void clearCache();
+ void setPageZoomFactor( double factor );
std::string getMimeType() { return mMimeType; }
void scaleMouse(S32 *mouse_x, S32 *mouse_y);
void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y);
@@ -313,7 +318,7 @@ public:
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; };
/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
/*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) {return FALSE; };
- /*virtual*/ std::string getName() const;
+ /*virtual*/ const std::string& getName() const;
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {};
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {};
@@ -412,6 +417,7 @@ private:
private:
// a single media url with some data and an impl.
LLPluginClassMedia* mMediaSource;
+ F64 mZoomFactor;
LLUUID mTextureId;
bool mMovieImageHasMips;
std::string mMediaURL; // The last media url set with NavigateTo
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a37f8ad0d8..3a1b8d7623 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -30,6 +30,7 @@
// linden library includes
#include "llavatarnamecache.h" // IDEVO
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llcombobox.h"
#include "llinventorypanel.h"
#include "llnotifications.h"
@@ -41,9 +42,9 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llagentpilot.h"
-#include "llbottomtray.h"
#include "llcompilequeue.h"
#include "llconsole.h"
+#include "lldaycyclemanager.h"
#include "lldebugview.h"
#include "llenvmanager.h"
#include "llfilepicker.h"
@@ -61,6 +62,7 @@
#include "llfloatersnapshot.h"
#include "llfloatertools.h"
#include "llfloaterworldmap.h"
+#include "llfloaterbuildoptions.h"
#include "llavataractions.h"
#include "lllandmarkactions.h"
#include "llgroupmgr.h"
@@ -74,13 +76,11 @@
#include "llinventoryfunctions.h"
#include "llpanellogin.h"
#include "llpanelblockedlist.h"
-#include "llmenucommands.h"
#include "llmoveview.h"
#include "llparcel.h"
#include "llrootview.h"
#include "llsceneview.h"
#include "llselectmgr.h"
-#include "llsidetray.h"
#include "llstatusbar.h"
#include "lltextureview.h"
#include "lltoolcomp.h"
@@ -100,6 +100,7 @@
#include "llworldmap.h"
#include "pipeline.h"
#include "llviewerjoystick.h"
+#include "llwaterparammanager.h"
#include "llwlanimator.h"
#include "llwlparammanager.h"
#include "llfloatercamera.h"
@@ -113,6 +114,8 @@
using namespace LLVOAvatarDefines;
+typedef LLPointer<LLViewerObject> LLViewerObjectPtr;
+
static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels;
BOOL enable_land_build(void*);
@@ -368,8 +371,6 @@ void set_underclothes_menu_options()
void init_menus()
{
- S32 top = gViewerWindow->getRootView()->getRect().getHeight();
-
// Initialize actions
initialize_menus();
@@ -441,11 +442,13 @@ void init_menus()
{
color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
}
+
+ LLView* menu_bar_holder = gViewerWindow->getRootView()->getChildView("menu_bar_holder");
+
gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_viewer.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT));
+ gMenuBarView->setRect(LLRect(0, menu_bar_holder->getRect().mTop, 0, menu_bar_holder->getRect().mTop - MENU_BAR_HEIGHT));
gMenuBarView->setBackgroundColor( color );
- LLView* menu_bar_holder = gViewerWindow->getRootView()->getChildView("menu_bar_holder");
menu_bar_holder->addChild(gMenuBarView);
gViewerWindow->setMenuBackgroundColor(false,
@@ -518,7 +521,7 @@ class LLAdvancedToggleConsole : public view_listener_t
}
else if ("fast timers" == console_type)
{
- toggle_visibility( (void*)gDebugView->mFastTimerView );
+ LLFloaterReg::toggleInstance("fast_timers");
}
else if ("scene view" == console_type)
{
@@ -558,7 +561,7 @@ class LLAdvancedCheckConsole : public view_listener_t
}
else if ("fast timers" == console_type)
{
- new_value = get_visibility( (void*)gDebugView->mFastTimerView );
+ new_value = LLFloaterReg::instanceVisible("fast_timers");
}
else if ("scene view" == console_type)
{
@@ -829,7 +832,8 @@ U32 feature_from_string(std::string feature)
};
-class LLAdvancedToggleFeature : public view_listener_t{
+class LLAdvancedToggleFeature : public view_listener_t
+{
bool handleEvent(const LLSD& userdata)
{
U32 feature = feature_from_string( userdata.asString() );
@@ -842,7 +846,8 @@ class LLAdvancedToggleFeature : public view_listener_t{
};
class LLAdvancedCheckFeature : public view_listener_t
-{bool handleEvent(const LLSD& userdata)
+{
+ bool handleEvent(const LLSD& userdata)
{
U32 feature = feature_from_string( userdata.asString() );
bool new_value = false;
@@ -856,51 +861,6 @@ class LLAdvancedCheckFeature : public view_listener_t
}
};
-void toggle_destination_and_avatar_picker(const LLSD& show)
-{
- S32 panel_idx = show.isDefined() ? show.asInteger() : -1;
- LLView* container = gViewerWindow->getRootView()->findChildView("avatar_picker_and_destination_guide_container");
- if (!container) return;
-
- LLMediaCtrl* destinations = container->findChild<LLMediaCtrl>("destination_guide_contents");
- LLMediaCtrl* avatar_picker = container->findChild<LLMediaCtrl>("avatar_picker_contents");
- if (!destinations || !avatar_picker) return;
-
- LLButton* avatar_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("avatar_btn");
- LLButton* destination_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("destination_btn");
-
- if (panel_idx == 0
- && !destinations->getVisible())
- { // opening destinations guide
- container->setVisible(true);
- destinations->setVisible(true);
- avatar_picker->setVisible(false);
- LLFirstUse::notUsingDestinationGuide(false);
- avatar_btn->setToggleState(false);
- destination_btn->setToggleState(true);
- gSavedSettings.setS32("DestinationsAndAvatarsVisibility", 0);
- }
- else if (panel_idx == 1
- && !avatar_picker->getVisible())
- { // opening avatar picker
- container->setVisible(true);
- destinations->setVisible(false);
- avatar_picker->setVisible(true);
- avatar_btn->setToggleState(true);
- destination_btn->setToggleState(false);
- gSavedSettings.setS32("DestinationsAndAvatarsVisibility", 1);
- }
- else
- { // toggling off dest guide or avatar picker
- container->setVisible(false);
- destinations->setVisible(false);
- avatar_picker->setVisible(false);
- avatar_btn->setToggleState(false);
- destination_btn->setToggleState(false);
- gSavedSettings.setS32("DestinationsAndAvatarsVisibility", -1);
- }
-};
-
//////////////////
// INFO DISPLAY //
@@ -1007,6 +967,10 @@ U32 info_display_from_string(std::string info_display)
{
return LLPipeline::RENDER_DEBUG_SCULPTED;
}
+ else if ("wind vectors" == info_display)
+ {
+ return LLPipeline::RENDER_DEBUG_WIND_VECTORS;
+ }
else
{
return 0;
@@ -1019,6 +983,8 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t
{
U32 info_display = info_display_from_string( userdata.asString() );
+ LL_INFOS("ViewerMenu") << "toggle " << userdata.asString() << LL_ENDL;
+
if ( info_display != 0 )
{
LLPipeline::toggleRenderDebug( (void*)info_display );
@@ -1036,6 +1002,8 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t
U32 info_display = info_display_from_string( userdata.asString() );
bool new_value = false;
+ LL_INFOS("ViewerMenu") << "check " << userdata.asString() << LL_ENDL;
+
if ( info_display != 0 )
{
new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display );
@@ -1069,26 +1037,6 @@ class LLAdvancedCheckRandomizeFramerate : public view_listener_t
}
};
-void run_vectorize_perf_test(void *)
-{
- gSavedSettings.setBOOL("VectorizePerfTest", TRUE);
-}
-
-
-////////////////////////////////
-// RUN Vectorized Perform Test//
-////////////////////////////////
-
-
-class LLAdvancedVectorizePerfTest : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- run_vectorize_perf_test(NULL);
- return true;
- }
-};
-
///////////////////////////
//// PERIODIC SLOW FRAME //
///////////////////////////
@@ -2626,7 +2574,7 @@ void handle_object_inspect()
{
LLSD key;
key["task"] = "task";
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+ LLFloaterSidePanelContainer::showPanel("inventory", key);
}
/*
@@ -3151,6 +3099,12 @@ void handle_avatar_eject(const LLSD& avatar_id)
}
}
+bool my_profile_visible()
+{
+ LLFloater* floaterp = LLAvatarActions::getProfileFloater(gAgentID);
+ return floaterp && floaterp->isInVisibleChain();
+}
+
bool enable_freeze_eject(const LLSD& avatar_id)
{
// Use avatar_id if available, otherwise default to right-click avatar
@@ -3385,15 +3339,6 @@ bool enable_sitdown_self()
return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
}
-// Used from the login screen to aid in UI work on side tray
-void handle_show_side_tray()
-{
- LLSideTray* side_tray = LLSideTray::getInstance();
- LLView* root = gViewerWindow->getRootView();
- // automatically removes and re-adds if there already
- root->addChild(side_tray);
-}
-
// Toggle one of "People" panel tabs in side tray.
class LLTogglePanelPeopleTab : public view_listener_t
{
@@ -3404,21 +3349,11 @@ class LLTogglePanelPeopleTab : public view_listener_t
LLSD param;
param["people_panel_tab_name"] = panel_name;
- static LLPanel* friends_panel = NULL;
- static LLPanel* groups_panel = NULL;
- static LLPanel* nearby_panel = NULL;
-
- if (panel_name == "friends_panel")
+ if ( panel_name == "friends_panel"
+ || panel_name == "groups_panel"
+ || panel_name == "nearby_panel")
{
- return togglePeoplePanel(friends_panel, panel_name, param);
- }
- else if (panel_name == "groups_panel")
- {
- return togglePeoplePanel(groups_panel, panel_name, param);
- }
- else if (panel_name == "nearby_panel")
- {
- return togglePeoplePanel(nearby_panel, panel_name, param);
+ return togglePeoplePanel(panel_name, param);
}
else
{
@@ -3426,16 +3361,20 @@ class LLTogglePanelPeopleTab : public view_listener_t
}
}
- static bool togglePeoplePanel(LLPanel* &panel, const std::string& panel_name, const LLSD& param)
+ static bool togglePeoplePanel(const std::string& panel_name, const LLSD& param)
{
+ LLPanel *panel = LLFloaterSidePanelContainer::getPanel("people", panel_name);
if(!panel)
+ return false;
+
+ if (panel->isInVisibleChain())
{
- panel = LLSideTray::getInstance()->getPanel(panel_name);
- if(!panel)
- return false;
+ LLFloaterReg::hideInstance("people");
+ }
+ else
+ {
+ LLFloaterSidePanelContainer::showPanel("people", "panel_people", param) ;
}
-
- LLSideTray::getInstance()->togglePanel(panel, "panel_people", param);
return true;
}
@@ -3750,7 +3689,7 @@ void handle_reset_view()
if (gAgentCamera.cameraCustomizeAvatar())
{
// switching to outfit selector should automagically save any currently edited wearable
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits"));
}
gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW);
@@ -3815,6 +3754,43 @@ class LLViewDefaultUISize : public view_listener_t
}
};
+class LLViewToggleUI : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLNotification::Params params("ConfirmHideUI");
+ params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2));
+ LLSD substitutions;
+#if LL_DARWIN
+ substitutions["SHORTCUT"] = "Cmd+Shift+U";
+#else
+ substitutions["SHORTCUT"] = "Ctrl+Shift+U";
+#endif
+ params.substitutions = substitutions;
+ if (gViewerWindow->getUIVisibility())
+ {
+ // hiding, so show notification
+ LLNotifications::instance().add(params);
+ }
+ else
+ {
+ LLNotifications::instance().forceResponse(params, 0);
+ }
+
+ return true;
+ }
+
+ void confirm(const LLSD& notification, const LLSD& response)
+ {
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ if (option == 0) // OK
+ {
+ gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility());
+ }
+ }
+};
+
class LLEditDuplicate : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -4005,23 +3981,21 @@ void handle_god_request_avatar_geometry(void *)
}
}
-
-void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
+static bool get_derezzable_objects(
+ EDeRezDestination dest,
+ std::string& error,
+ LLViewerRegion*& first_region,
+ LLDynamicArray<LLViewerObjectPtr>* derez_objectsp,
+ bool only_check = false)
{
- if(gAgentCamera.cameraMouselook())
- {
- gAgentCamera.changeCameraToDefault();
- }
- //gInventoryView->setPanelOpen(TRUE);
+ bool found = false;
- std::string error;
- LLDynamicArray<LLViewerObject*> derez_objects;
+ LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
// Check conditions that we can't deal with, building a list of
// everything that we'll actually be derezzing.
- LLViewerRegion* first_region = NULL;
- for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
- iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
+ for (LLObjectSelection::valid_root_iterator iter = selection->valid_root_begin();
+ iter != selection->valid_root_end(); iter++)
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
@@ -4088,10 +4062,55 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
}
if(can_derez_current)
{
- derez_objects.put(object);
+ found = true;
+
+ if (only_check)
+ // one found, no need to traverse to the end
+ break;
+
+ if (derez_objectsp)
+ derez_objectsp->put(object);
+
}
}
+ return found;
+}
+
+static bool can_derez(EDeRezDestination dest)
+{
+ LLViewerRegion* first_region = NULL;
+ std::string error;
+ return get_derezzable_objects(dest, error, first_region, NULL, true);
+}
+
+static void derez_objects(
+ EDeRezDestination dest,
+ const LLUUID& dest_id,
+ LLViewerRegion*& first_region,
+ std::string& error,
+ LLDynamicArray<LLViewerObjectPtr>* objectsp)
+{
+ LLDynamicArray<LLViewerObjectPtr> derez_objects;
+
+ if (!objectsp) // if objects to derez not specified
+ {
+ // get them from selection
+ if (!get_derezzable_objects(dest, error, first_region, &derez_objects, false))
+ {
+ llwarns << "No objects to derez" << llendl;
+ return;
+ }
+
+ objectsp = &derez_objects;
+ }
+
+
+ if(gAgentCamera.cameraMouselook())
+ {
+ gAgentCamera.changeCameraToDefault();
+ }
+
// This constant is based on (1200 - HEADER_SIZE) / 4 bytes per
// root. I lopped off a few (33) to provide a bit
// pad. HEADER_SIZE is currently 67 bytes, most of which is UUIDs.
@@ -4099,13 +4118,13 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
// satisfy anybody.
const S32 MAX_ROOTS_PER_PACKET = 250;
const S32 MAX_PACKET_COUNT = 254;
- F32 packets = ceil((F32)derez_objects.count() / (F32)MAX_ROOTS_PER_PACKET);
+ F32 packets = ceil((F32)objectsp->count() / (F32)MAX_ROOTS_PER_PACKET);
if(packets > (F32)MAX_PACKET_COUNT)
{
error = "AcquireErrorTooManyObjects";
}
- if(error.empty() && derez_objects.count() > 0)
+ if(error.empty() && objectsp->count() > 0)
{
U8 d = (U8)dest;
LLUUID tid;
@@ -4130,11 +4149,11 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
msg->addU8Fast(_PREHASH_PacketCount, packet_count);
msg->addU8Fast(_PREHASH_PacketNumber, packet_number);
objects_in_packet = 0;
- while((object_index < derez_objects.count())
+ while((object_index < objectsp->count())
&& (objects_in_packet++ < MAX_ROOTS_PER_PACKET))
{
- LLViewerObject* object = derez_objects.get(object_index++);
+ LLViewerObject* object = objectsp->get(object_index++);
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID());
// VEFFECT: DerezObject
@@ -4159,6 +4178,13 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
}
}
+static void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
+{
+ LLViewerRegion* first_region = NULL;
+ std::string error;
+ derez_objects(dest, dest_id, first_region, error, NULL);
+}
+
void handle_take_copy()
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
@@ -4170,12 +4196,19 @@ void handle_take_copy()
// You can return an object to its owner if it is on your land.
class LLObjectReturn : public view_listener_t
{
+public:
+ LLObjectReturn() : mFirstRegion(NULL) {}
+
+private:
bool handleEvent(const LLSD& userdata)
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true;
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+ // Save selected objects, so that we still know what to return after the confirmation dialog resets selection.
+ get_derezzable_objects(DRD_RETURN_TO_OWNER, mError, mFirstRegion, &mReturnableObjects);
+
LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2));
return true;
}
@@ -4186,16 +4219,23 @@ class LLObjectReturn : public view_listener_t
if (0 == option)
{
// Ignore category ID for this derez destination.
- derez_objects(DRD_RETURN_TO_OWNER, LLUUID::null);
+ derez_objects(DRD_RETURN_TO_OWNER, LLUUID::null, mFirstRegion, mError, &mReturnableObjects);
}
+ mReturnableObjects.clear();
+ mError.clear();
+ mFirstRegion = NULL;
+
// drop reference to current selection
mObjectSelection = NULL;
return false;
}
-protected:
LLObjectSelectionHandle mObjectSelection;
+
+ LLDynamicArray<LLViewerObjectPtr> mReturnableObjects;
+ std::string mError;
+ LLViewerRegion* mFirstRegion;
};
@@ -4220,29 +4260,7 @@ class LLObjectEnableReturn : public view_listener_t
}
else
{
- LLViewerRegion* region = gAgent.getRegion();
- if (region)
- {
- // Estate owners and managers can always return objects.
- if (region->canManageEstate())
- {
- new_value = true;
- }
- else
- {
- struct f : public LLSelectedObjectFunctor
- {
- virtual bool apply(LLViewerObject* obj)
- {
- return
- obj->permModify() ||
- obj->isReturnable();
- }
- } func;
- const bool firstonly = true;
- new_value = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
- }
- }
+ new_value = can_derez(DRD_RETURN_TO_OWNER);
}
#endif
return new_value;
@@ -4490,6 +4508,13 @@ bool tools_visible_take_object()
return !is_selection_buy_not_take();
}
+bool enable_how_to_visible(const LLSD& param)
+{
+ LLFloaterWebContent::Params p;
+ p.target = "__help_how_to";
+ return LLFloaterReg::instanceVisible("how_to", p);
+}
+
class LLToolsEnableBuyOrTake : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -5275,7 +5300,7 @@ class LLWorldCreateLandmark : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
return true;
}
@@ -5285,7 +5310,7 @@ class LLWorldPlaceProfile : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
return true;
}
@@ -5381,6 +5406,34 @@ class LLAvatarAddFriend : public view_listener_t
}
};
+
+class LLAvatarToggleMyProfile : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLFloater* instance = LLAvatarActions::getProfileFloater(gAgent.getID());
+ if (LLFloater::isMinimized(instance))
+ {
+ instance->setMinimized(FALSE);
+ instance->setFocus(TRUE);
+ }
+ else if (!LLFloater::isShown(instance))
+ {
+ LLAvatarActions::showProfile(gAgent.getID());
+ }
+ else if (!instance->hasFocus() && !instance->getIsChrome())
+ {
+ instance->setFocus(TRUE);
+ }
+ else
+ {
+ instance->closeFloater();
+ }
+ return true;
+ }
+};
+
+
class LLAvatarAddContact : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -5526,22 +5579,22 @@ void handle_viewer_disable_message_log(void*)
void handle_customize_avatar()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits"));
}
void handle_edit_outfit()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
void handle_edit_shape()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_shape"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_shape"));
}
void handle_edit_physics()
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_physics"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_physics"));
}
void handle_report_abuse()
@@ -5611,18 +5664,18 @@ class LLShowSidetrayPanel : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- std::string panel_name = userdata.asString();
+ std::string floater_name = userdata.asString();
- LLPanel* panel = LLSideTray::getInstance()->getPanel(panel_name);
+ LLPanel* panel = LLFloaterSidePanelContainer::getPanel(floater_name);
if (panel)
{
if (panel->isInVisibleChain())
{
- LLSideTray::getInstance()->hidePanel(panel_name);
+ LLFloaterReg::getInstance(floater_name)->closeFloater();
}
else
{
- LLSideTray::getInstance()->showPanel(panel_name);
+ LLFloaterReg::getInstance(floater_name)->openFloater();
}
}
return true;
@@ -5633,9 +5686,9 @@ class LLSidetrayPanelVisible : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- std::string panel_name = userdata.asString();
+ std::string floater_name = userdata.asString();
// Toggle the panel
- if (LLSideTray::getInstance()->isPanelActive(panel_name))
+ if (LLFloaterReg::getInstance(floater_name)->isInVisibleChain())
{
return true;
}
@@ -6821,6 +6874,22 @@ class LLToolsEnableSaveToObjectInventory : public view_listener_t
}
};
+class LLToggleHowTo : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLFloaterWebContent::Params p;
+ std::string url = gSavedSettings.getString("HowToHelpURL");
+ p.url = LLWeb::expandURLSubstitutions(url, LLSD());
+ p.show_chrome = false;
+ p.target = "__help_how_to";
+ p.show_page_title = false;
+ p.preferred_media_size = LLRect(0, 460, 335, 0);
+
+ LLFloaterReg::toggleInstanceOrBringToFront("how_to", p);
+ return true;
+ }
+};
class LLViewEnableMouselook : public view_listener_t
{
@@ -7161,9 +7230,11 @@ class LLToolsUseSelectionForGrid : public view_listener_t
} func;
LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func);
LLSelectMgr::getInstance()->setGridMode(GRID_MODE_REF_OBJECT);
- if (gFloaterTools)
+
+ LLFloaterBuildOptions* build_options_floater = LLFloaterReg::getTypedInstance<LLFloaterBuildOptions>("build_options");
+ if (build_options_floater && build_options_floater->getVisible())
{
- gFloaterTools->mComboGridMode->setCurrentByIndex((S32)GRID_MODE_REF_OBJECT);
+ build_options_floater->setGridMode(GRID_MODE_REF_OBJECT);
}
return true;
}
@@ -7238,7 +7309,7 @@ void handle_web_browser_test(const LLSD& param)
void handle_web_content_test(const LLSD& param)
{
std::string url = param.asString();
- LLWeb::loadWebURLInternal(url);
+ LLWeb::loadURLInternal(url);
}
void handle_buy_currency_test(void*)
@@ -7609,7 +7680,14 @@ class LLWorldEnvSettings : public view_listener_t
}
else
{
- LLEnvManagerNew::instance().setUseDayCycle(LLEnvManagerNew::instance().getDayCycleName());
+ LLEnvManagerNew &envmgr = LLEnvManagerNew::instance();
+ // reset all environmental settings to track the region defaults, make this reset 'sticky' like the other sun settings.
+ bool use_fixed_sky = false;
+ bool use_region_settings = true;
+ envmgr.setUserPrefs(envmgr.getWaterPresetName(),
+ envmgr.getSkyPresetName(),
+ envmgr.getDayCycleName(),
+ use_fixed_sky, use_region_settings);
}
return true;
@@ -7667,30 +7745,46 @@ class LLWorldEnvPreset : public view_listener_t
}
};
-/// Post-Process callbacks
-class LLWorldPostProcess : public view_listener_t
+class LLWorldEnableEnvPreset : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLFloaterReg::showInstance("env_post_process");
- return true;
- }
-};
+ std::string item = userdata.asString();
-class LLWorldToggleMovementControls : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLBottomTray::getInstance()->toggleMovementControls();
- return true;
+ if (item == "delete_water")
+ {
+ LLWaterParamManager::preset_name_list_t user_waters;
+ LLWaterParamManager::instance().getUserPresetNames(user_waters);
+ return !user_waters.empty();
+ }
+ else if (item == "delete_sky")
+ {
+ LLWLParamManager::preset_name_list_t user_skies;
+ LLWLParamManager::instance().getUserPresetNames(user_skies);
+ return !user_skies.empty();
+ }
+ else if (item == "delete_day_cycle")
+ {
+ LLDayCycleManager::preset_name_list_t user_days;
+ LLDayCycleManager::instance().getUserPresetNames(user_days);
+ return !user_days.empty();
+ }
+ else
+ {
+ llwarns << "Unknown item" << llendl;
+ }
+
+ return false;
}
};
-class LLWorldToggleCameraControls : public view_listener_t
+
+/// Post-Process callbacks
+class LLWorldPostProcess : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLBottomTray::getInstance()->toggleCameraControls();
+ LLFloaterReg::showInstance("env_post_process");
return true;
}
};
@@ -7844,9 +7938,17 @@ void initialize_menus()
view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts");
+
+ commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory));
+
// Agent
commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying));
+ commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2));
+ commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2));
+ commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2));
+ enable.add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2));
+ enable.add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2));
// File menu
init_menu_file();
@@ -7873,6 +7975,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLZoomer(1/1.2f), "View.ZoomIn");
view_listener_t::addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault");
view_listener_t::addMenu(new LLViewDefaultUISize(), "View.DefaultUISize");
+ view_listener_t::addMenu(new LLViewToggleUI(), "View.ToggleUI");
view_listener_t::addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");
view_listener_t::addMenu(new LLViewEnableJoystickFlycam(), "View.EnableJoystickFlycam");
@@ -7888,7 +7991,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying");
// World menu
- commit.add("World.Chat", boost::bind(&handle_chat, (void*)NULL));
view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
view_listener_t::addMenu(new LLWorldPlaceProfile(), "World.PlaceProfile");
@@ -7906,11 +8008,9 @@ void initialize_menus()
view_listener_t::addMenu(new LLWorldEnvSettings(), "World.EnvSettings");
view_listener_t::addMenu(new LLWorldEnvPreset(), "World.EnvPreset");
+ view_listener_t::addMenu(new LLWorldEnableEnvPreset(), "World.EnableEnvPreset");
view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess");
- view_listener_t::addMenu(new LLWorldToggleMovementControls(), "World.Toggle.MovementControls");
- view_listener_t::addMenu(new LLWorldToggleCameraControls(), "World.Toggle.CameraControls");
-
// Tools menu
view_listener_t::addMenu(new LLToolsSelectTool(), "Tools.SelectTool");
view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects");
@@ -7947,6 +8047,8 @@ void initialize_menus()
// Help menu
// most items use the ShowFloater method
+ view_listener_t::addMenu(new LLToggleHowTo(), "Help.ToggleHowTo");
+ enable.add("Help.HowToVisible", boost::bind(&enable_how_to_visible, _2));
// Advanced menu
view_listener_t::addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole");
@@ -7984,7 +8086,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedCheckRandomizeFramerate(), "Advanced.CheckRandomizeFramerate");
view_listener_t::addMenu(new LLAdvancedTogglePeriodicSlowFrame(), "Advanced.TogglePeriodicSlowFrame");
view_listener_t::addMenu(new LLAdvancedCheckPeriodicSlowFrame(), "Advanced.CheckPeriodicSlowFrame");
- view_listener_t::addMenu(new LLAdvancedVectorizePerfTest(), "Advanced.VectorizePerfTest");
view_listener_t::addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest");
view_listener_t::addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest");
view_listener_t::addMenu(new LLAdvancedHandleAttachedLightParticles(), "Advanced.HandleAttachedLightParticles");
@@ -8025,7 +8126,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedCheckDebugKeys(), "Advanced.CheckDebugKeys");
view_listener_t::addMenu(new LLAdvancedToggleDebugWindowProc(), "Advanced.ToggleDebugWindowProc");
view_listener_t::addMenu(new LLAdvancedCheckDebugWindowProc(), "Advanced.CheckDebugWindowProc");
- commit.add("Advanced.ShowSideTray", boost::bind(&handle_show_side_tray));
// Advanced > XUI
commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance()));
@@ -8140,6 +8240,10 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call");
enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
+ view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile");
+ enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
+
+ commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2));
@@ -8212,6 +8316,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLGoToObject(), "GoToObject");
commit.add("PayObject", boost::bind(&handle_give_money_dialog));
+ commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory));
+
enable.add("EnablePayObject", boost::bind(&enable_pay_object));
enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar));
enable.add("EnableEdit", boost::bind(&enable_object_edit));
@@ -8224,9 +8330,5 @@ void initialize_menus()
view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD");
view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected");
view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
-
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
-
- commit.add("Destination.show", boost::bind(&toggle_destination_and_avatar_picker, 0));
- commit.add("Avatar.show", boost::bind(&toggle_destination_and_avatar_picker, 1));
}
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index b4e239b0cd..87cb4efbc4 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -126,8 +126,6 @@ bool enable_pay_object();
bool enable_buy_object();
bool handle_go_to();
-void toggle_destination_and_avatar_picker(const LLSD& show);
-
// Export to XML or Collada
void handle_export_selected( void * );
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index b9293b3b31..7e830e14bf 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -528,23 +528,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
{
gViewerWindow->playSnapshotAnimAndSound();
- LLPointer<LLImageFormatted> formatted;
- switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
- {
- case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
- formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
- break;
- case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
- formatted = new LLImagePNG;
- break;
- case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP:
- formatted = new LLImageBMP;
- break;
- default:
- llwarns << "Unknown Local Snapshot format" << llendl;
- return true;
- }
-
+ LLPointer<LLImageFormatted> formatted = new LLImagePNG;
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize() ;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e934c38c22..dca5cdd06d 100644..100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -59,8 +59,9 @@
#include "llfloaterland.h"
#include "llfloaterregioninfo.h"
#include "llfloaterlandholdings.h"
-#include "llfloaterpostcard.h"
#include "llfloaterpreference.h"
+#include "llfloatersidepanelcontainer.h"
+#include "llfloatersnapshot.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
#include "llinventoryfunctions.h"
@@ -73,7 +74,6 @@
#include "llrecentpeople.h"
#include "llscriptfloater.h"
#include "llselectmgr.h"
-#include "llsidetray.h"
#include "llstartup.h"
#include "llsky.h"
#include "llslurl.h"
@@ -1049,48 +1049,26 @@ void start_new_inventory_observer()
class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver
{
LOG_CLASS(LLDiscardAgentOffer);
+
public:
LLDiscardAgentOffer(const LLUUID& folder_id, const LLUUID& object_id) :
LLInventoryFetchItemsObserver(object_id),
mFolderID(folder_id),
mObjectID(object_id) {}
- virtual ~LLDiscardAgentOffer() {}
+
virtual void done()
{
LL_DEBUGS("Messaging") << "LLDiscardAgentOffer::done()" << LL_ENDL;
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- bool notify = false;
- if(trash_id.notNull() && mObjectID.notNull())
- {
- LLInventoryModel::update_list_t update;
- LLInventoryModel::LLCategoryUpdate old_folder(mFolderID, -1);
- update.push_back(old_folder);
- LLInventoryModel::LLCategoryUpdate new_folder(trash_id, 1);
- update.push_back(new_folder);
- gInventory.accountForUpdate(update);
- gInventory.moveObject(mObjectID, trash_id);
- LLInventoryObject* obj = gInventory.getObject(mObjectID);
- if(obj)
- {
- // no need to restamp since this is already a freshly
- // stamped item.
- obj->updateParentOnServer(FALSE);
- notify = true;
- }
- }
- else
- {
- LL_WARNS("Messaging") << "DiscardAgentOffer unable to find: "
- << (trash_id.isNull() ? "trash " : "")
- << (mObjectID.isNull() ? "object" : "") << LL_ENDL;
- }
+
+ // We're invoked from LLInventoryModel::notifyObservers().
+ // If we now try to remove the inventory item, it will cause a nested
+ // notifyObservers() call, which won't work.
+ // So defer moving the item to trash until viewer gets idle (in a moment).
+ LLAppViewer::instance()->addOnIdleCallback(boost::bind(&LLInventoryModel::removeItem, &gInventory, mObjectID));
gInventory.removeObserver(this);
- if(notify)
- {
- gInventory.notifyObservers();
- }
delete this;
}
+
protected:
LLUUID mFolderID;
LLUUID mObjectID;
@@ -1214,9 +1192,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
LLInventoryCategory* parent_folder = gInventory.getCategory(item->getParentUUID());
if ("inventory_handler" == from_name)
{
- //we have to filter inventory_handler messages to avoid notification displaying
- LLSideTray::getInstance()->showPanel("panel_places",
- LLSD().with("type", "landmark").with("id", item->getUUID()));
+ LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id", item->getUUID()));
}
else if("group_offer" == from_name)
{
@@ -1225,7 +1201,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
LLSD args;
args["type"] = "landmark";
args["id"] = obj_id;
- LLSideTray::getInstance()->showPanel("panel_places", args);
+ LLFloaterSidePanelContainer::showPanel("places", args);
continue;
}
@@ -1280,14 +1256,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
const BOOL auto_open =
gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
!from_name.empty(); // don't open if it's not from anyone.
- LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
- if(active_panel)
- {
- LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL;
- LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
- active_panel->setSelection(obj_id, TAKE_FOCUS_NO);
- gFocusMgr.setKeyboardFocus(focus_ctrl);
- }
+ LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id);
}
}
@@ -1321,29 +1290,12 @@ bool highlight_offered_object(const LLUUID& obj_id)
void inventory_offer_mute_callback(const LLUUID& blocked_id,
const std::string& full_name,
- bool is_group,
- boost::shared_ptr<LLNotificationResponderInterface> offer_ptr)
+ bool is_group)
{
- LLOfferInfo* offer = dynamic_cast<LLOfferInfo*>(offer_ptr.get());
-
- std::string from_name = full_name;
- LLMute::EType type;
- if (is_group)
- {
- type = LLMute::GROUP;
- }
- else if(offer && offer->mFromObject)
- {
- //we have to block object by name because blocked_id is an id of owner
- type = LLMute::BY_NAME;
- }
- else
- {
- type = LLMute::AGENT;
- }
+ // *NOTE: blocks owner if the offer came from an object
+ LLMute::EType mute_type = is_group ? LLMute::GROUP : LLMute::AGENT;
- // id should be null for BY_NAME mute, see LLMuteList::add for details
- LLMute mute(type == LLMute::BY_NAME ? LLUUID::null : blocked_id, from_name, type);
+ LLMute mute(blocked_id, full_name, mute_type);
if (LLMuteList::getInstance()->add(mute))
{
LLPanelBlockedList::showPanelAndSelect(blocked_id);
@@ -1357,6 +1309,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
bool matches(const LLNotificationPtr notification) const
{
if(notification->getName() == "ObjectGiveItem"
+ || notification->getName() == "OwnObjectGiveItem"
|| notification->getName() == "UserGiveItem")
{
return (notification->getPayload()["from_id"].asUUID() == blocked_id);
@@ -1495,7 +1448,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
LLChat chat;
std::string log_message;
S32 button = LLNotificationsUtil::getSelectedOption(notification, response);
-
+
LLInventoryObserver* opener = NULL;
LLViewerInventoryCategory* catp = NULL;
catp = (LLViewerInventoryCategory*)gInventory.getCategory(mObjectID);
@@ -1517,7 +1470,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
llassert(notification_ptr != NULL);
if (notification_ptr != NULL)
{
- gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,notification_ptr->getResponderPtr()));
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3));
}
}
@@ -1527,7 +1480,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// TODO: when task inventory offers can also be handled the new way, migrate the code that sets these strings here:
from_string = chatHistory_string = mFromName;
- bool busy=FALSE;
+ bool busy = gAgent.getBusy();
switch(button)
{
@@ -1586,9 +1539,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
}
break;
- case IOR_BUSY:
- //Busy falls through to decline. Says to make busy message.
- busy=TRUE;
case IOR_MUTE:
// MUTE falls through to decline
case IOR_DECLINE:
@@ -1665,7 +1615,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
llassert(notification_ptr != NULL);
if (notification_ptr != NULL)
{
- gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,notification_ptr->getResponderPtr()));
+ gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback, _1, _2, _3));
}
}
@@ -1734,7 +1684,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
from_string = chatHistory_string = mFromName;
}
- bool busy=FALSE;
+ bool busy = gAgent.getBusy();
switch(button)
{
@@ -1780,9 +1730,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
} // end switch (mIM)
break;
- case IOR_BUSY:
- //Busy falls through to decline. Says to make busy message.
- busy=TRUE;
case IOR_MUTE:
// MUTE falls through to decline
case IOR_DECLINE:
@@ -1846,22 +1793,18 @@ void LLOfferInfo::initRespondFunctionMap()
if(mRespondFunctions.empty())
{
mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
+ mRespondFunctions["OwnObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2);
}
}
void inventory_offer_handler(LLOfferInfo* info)
{
- //Until throttling is implmented, busy mode should reject inventory instead of silently
- //accepting it. SEE SL-39554
- if (gAgent.getBusy())
- {
- info->forceResponse(IOR_BUSY);
- return;
- }
-
- //If muted, don't even go through the messaging stuff. Just curtail the offer here.
- if (LLMuteList::getInstance()->isMuted(info->mFromID, info->mFromName))
+ // If muted, don't even go through the messaging stuff. Just curtail the offer here.
+ // Passing in a null UUID handles the case of where you have muted one of your own objects by_name.
+ // The solution for STORM-1297 seems to handle the cases where the object is owned by someone else.
+ if (LLMuteList::getInstance()->isMuted(info->mFromID, info->mFromName) ||
+ LLMuteList::getInstance()->isMuted(LLUUID::null, info->mFromName))
{
info->forceResponse(IOR_MUTE);
return;
@@ -1941,7 +1884,7 @@ void inventory_offer_handler(LLOfferInfo* info)
std::string verb = "select?name=" + LLURI::escape(msg);
args["ITEM_SLURL"] = LLSLURL("inventory", info->mObjectID, verb.c_str()).getSLURLString();
- LLNotification::Params p("ObjectGiveItem");
+ LLNotification::Params p;
// Object -> Agent Inventory Offer
if (info->mFromObject)
@@ -1951,7 +1894,10 @@ void inventory_offer_handler(LLOfferInfo* info)
// Note: sets inventory_task_offer_callback as the callback
p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info));
info->mPersist = true;
- p.name = "ObjectGiveItem";
+
+ // Offers from your own objects need a special notification template.
+ p.name = info->mFromID == gAgentID ? "OwnObjectGiveItem" : "ObjectGiveItem";
+
// Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory.
LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == TRUE);
}
@@ -2238,7 +2184,7 @@ void god_message_name_cb(const LLAvatarName& av_name, LLChat chat, std::string m
// Treat like a system message and put in chat history.
chat.mText = av_name.getCompleteName() + ": " + message;
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
if(nearby_chat)
{
nearby_chat->addMessage(chat);
@@ -2630,8 +2576,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
info->mType = (LLAssetType::EType) bucketp->asset_type;
info->mObjectID = bucketp->object_id;
+ info->mFromObject = FALSE;
}
- else
+ else // IM_TASK_INVENTORY_OFFERED
{
if (sizeof(S8) != binary_bucket_size)
{
@@ -2641,6 +2588,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
info->mType = (LLAssetType::EType) binary_bucket[0];
info->mObjectID = LLUUID::null;
+ info->mFromObject = TRUE;
}
info->mIM = dialog;
@@ -2649,14 +2597,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
info->mTransactionID = session_id;
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));
- if (dialog == IM_TASK_INVENTORY_OFFERED)
- {
- info->mFromObject = TRUE;
- }
- else
- {
- info->mFromObject = FALSE;
- }
info->mFromName = name;
info->mDesc = message;
info->mHost = msg->getSender();
@@ -2671,6 +2611,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Same as closing window
info->forceResponse(IOR_DECLINE);
}
+ else if (is_busy && dialog != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565)
+ {
+ // Until throttling is implemented, busy mode should reject inventory instead of silently
+ // accepting it. SEE SL-39554
+ info->forceResponse(IOR_DECLINE);
+ }
else
{
inventory_offer_handler(info);
@@ -2800,7 +2746,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Note: lie to Nearby Chat, pretending that this is NOT an IM, because
// IMs from obejcts don't open IM sessions.
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
if(SYSTEM_FROM != name && nearby_chat)
{
chat.mOwnerID = from_id;
@@ -2884,8 +2830,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
else
{
LLVector3 pos, look_at;
- U64 region_handle;
- U8 region_access;
+ U64 region_handle(0);
+ U8 region_access(0);
std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size);
std::string region_access_str = LLStringUtil::null;
std::string region_access_icn = LLStringUtil::null;
@@ -3168,7 +3114,7 @@ protected:
{
// filter out non-interesting responeses
if ( !translation.empty()
- && (m_toLang != detected_language)
+ && (mToLang != detected_language)
&& (LLStringUtil::compareInsensitive(translation, m_origMesg) != 0) )
{
m_chat.mText += " (" + translation + ")";
@@ -3177,10 +3123,13 @@ protected:
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
}
- void handleFailure()
+ void handleFailure(int status, const std::string& err_msg)
{
- LLTranslate::TranslationReceiver::handleFailure();
- m_chat.mText += " (?)";
+ llwarns << "Translation failed for mesg " << m_origMesg << " toLang " << mToLang << " fromLang " << mFromLang << llendl;
+
+ std::string msg = LLTrans::getString("TranslationFailed", LLSD().with("[REASON]", err_msg));
+ LLStringUtil::replaceString(msg, "\n", " "); // we want one-line error messages
+ m_chat.mText += " (" + msg + ")";
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
}
@@ -3418,7 +3367,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
const std::string from_lang = ""; // leave empty to trigger autodetect
const std::string to_lang = LLTranslate::getTranslateLanguage();
- LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(from_lang, to_lang, mesg, chat, args);
+ LLTranslate::TranslationReceiverPtr result = ChatTranslationReceiver::build(from_lang, to_lang, mesg, chat, args);
LLTranslate::translateMessage(result, from_lang, to_lang, mesg);
}
else
@@ -6514,7 +6463,7 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
msg->getString( "UserData", "DirectoryVisibility", dir_visibility);
LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email, email);
- LLFloaterPostcard::updateUserInfo(email);
+ LLFloaterSnapshot::setAgentEmail(email);
}
@@ -6546,8 +6495,24 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response)
rtn_text = LLNotification::getSelectedOptionName(response);
}
- // Didn't click "Ignore"
- if (button_idx != -1)
+ // Button -2 = Mute
+ // Button -1 = Ignore - no processing needed for this button
+ // Buttons 0 and above = dialog choices
+
+ if (-2 == button_idx)
+ {
+ std::string object_name = notification["payload"]["object_name"].asString();
+ LLUUID object_id = notification["payload"]["object_id"].asUUID();
+ LLMute mute(object_id, object_name, LLMute::OBJECT);
+ if (LLMuteList::getInstance()->add(mute))
+ {
+ // This call opens the sidebar, displays the block list, and highlights the newly blocked
+ // object in the list so the user can see that their block click has taken effect.
+ LLPanelBlockedList::showPanelAndSelect(object_id);
+ }
+ }
+
+ if (0 <= button_idx)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ScriptDialogReply");
@@ -6590,12 +6555,12 @@ void process_script_dialog(LLMessageSystem* msg, void**)
std::string message;
std::string first_name;
std::string last_name;
- std::string title;
+ std::string object_name;
S32 chat_channel;
msg->getString("Data", "FirstName", first_name);
msg->getString("Data", "LastName", last_name);
- msg->getString("Data", "ObjectName", title);
+ msg->getString("Data", "ObjectName", object_name);
msg->getString("Data", "Message", message);
msg->getS32("Data", "ChatChannel", chat_channel);
@@ -6606,6 +6571,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
payload["sender"] = msg->getSender().getIPandPort();
payload["object_id"] = object_id;
payload["chat_channel"] = chat_channel;
+ payload["object_name"] = object_name;
// build up custom form
S32 button_count = msg->getNumberOfBlocks("Buttons");
@@ -6624,7 +6590,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
}
LLSD args;
- args["TITLE"] = title;
+ args["TITLE"] = object_name;
args["MESSAGE"] = message;
LLNotificationPtr notification;
if (!first_name.empty())
@@ -6832,7 +6798,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**)
LLPanelLandCovenant::updateEstateOwnerName(owner_name);
LLFloaterBuyLand::updateEstateOwnerName(owner_name);
- LLPanelPlaceProfile* panel = LLSideTray::getInstance()->getPanel<LLPanelPlaceProfile>("panel_place_profile");
+ LLPanelPlaceProfile* panel = LLFloaterSidePanelContainer::getPanel<LLPanelPlaceProfile>("places", "panel_place_profile");
if (panel)
{
panel->updateEstateName(estate_name);
@@ -6966,7 +6932,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
LLPanelLandCovenant::updateCovenantText(covenant_text);
LLFloaterBuyLand::updateCovenantText(covenant_text, asset_uuid);
- LLPanelPlaceProfile* panel = LLSideTray::getInstance()->getPanel<LLPanelPlaceProfile>("panel_place_profile");
+ LLPanelPlaceProfile* panel = LLFloaterSidePanelContainer::getPanel<LLPanelPlaceProfile>("places", "panel_place_profile");
if (panel)
{
panel->updateCovenantText(covenant_text);
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 9d09d9c01a..d8acd99953 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -57,7 +57,6 @@ enum InventoryOfferResponse
IOR_ACCEPT,
IOR_DECLINE,
IOR_MUTE,
- IOR_BUSY,
IOR_SHOW
};
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index a59afdc28a..ef5c65eb87 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -35,7 +35,7 @@
#include "llweb.h"
-const char* DEFAULT_LOGIN_PAGE = "http://secondlife.com/app/login/";
+const char* DEFAULT_LOGIN_PAGE = "http://viewer-login.agni.lindenlab.com/";
const char* SYSTEM_GRID_SLURL_BASE = "secondlife://%s/secondlife/";
const char* MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 972993202a..b8772971aa 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -100,7 +100,6 @@
#include "lltrans.h"
#include "llsdutil.h"
#include "llmediaentry.h"
-#include "llaccountingquota.h"
//#define DEBUG_UPDATE_TYPE
@@ -140,6 +139,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
if (!gAgentAvatarp)
{
gAgentAvatarp = new LLVOAvatarSelf(id, pcode, regionp);
+ gAgentAvatarp->initInstance();
}
else
{
@@ -149,9 +149,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco
}
else
{
- res = new LLVOAvatar(id, pcode, regionp);
+ LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp);
+ avatar->initInstance();
+ res = avatar;
}
- static_cast<LLVOAvatar*>(res)->initInstance();
break;
}
case LL_PCODE_LEGACY_GRASS:
@@ -516,7 +517,6 @@ void LLViewerObject::setNameValueList(const std::string& name_value_list)
}
}
-
// This method returns true if the object is over land owned by the
// agent.
bool LLViewerObject::isReturnable()
@@ -525,6 +525,112 @@ bool LLViewerObject::isReturnable()
{
return false;
}
+
+ std::vector<LLBBox> boxes;
+ boxes.push_back(LLBBox(getPositionRegion(), getRotationRegion(), getScale() * -0.5f, getScale() * 0.5f).getAxisAligned());
+ for (child_list_t::iterator iter = mChildList.begin();
+ iter != mChildList.end(); iter++)
+ {
+ LLViewerObject* child = *iter;
+ boxes.push_back( LLBBox(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f).getAxisAligned());
+ }
+
+ bool result = (mRegionp && mRegionp->objectIsReturnable(getPositionRegion(), boxes)) ? 1 : 0;
+
+ if ( !result )
+ {
+ //Get list of neighboring regions relative to this vo's region
+ std::vector<LLViewerRegion*> uniqueRegions;
+ mRegionp->getNeighboringRegions( uniqueRegions );
+
+ //Build aabb's - for root and all children
+ std::vector<PotentialReturnableObject> returnables;
+ typedef std::vector<LLViewerRegion*>::iterator RegionIt;
+ RegionIt regionStart = uniqueRegions.begin();
+ RegionIt regionEnd = uniqueRegions.end();
+
+ for (; regionStart != regionEnd; ++regionStart )
+ {
+ LLViewerRegion* pTargetRegion = *regionStart;
+ //Add the root vo as there may be no children and we still want
+ //to test for any edge overlap
+ buildReturnablesForChildrenVO( returnables, this, pTargetRegion );
+ //Add it's children
+ for (child_list_t::iterator iter = mChildList.begin(); iter != mChildList.end(); iter++)
+ {
+ LLViewerObject* pChild = *iter;
+ buildReturnablesForChildrenVO( returnables, pChild, pTargetRegion );
+ }
+ }
+
+ //TBD#Eventually create a region -> box list map
+ typedef std::vector<PotentialReturnableObject>::iterator ReturnablesIt;
+ ReturnablesIt retCurrentIt = returnables.begin();
+ ReturnablesIt retEndIt = returnables.end();
+
+ for ( ; retCurrentIt !=retEndIt; ++retCurrentIt )
+ {
+ boxes.clear();
+ LLViewerRegion* pRegion = (*retCurrentIt).pRegion;
+ boxes.push_back( (*retCurrentIt).box );
+ bool retResult = pRegion
+ && pRegion->childrenObjectReturnable( boxes )
+ && pRegion->canManageEstate();
+ if ( retResult )
+ {
+ result = true;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+void LLViewerObject::buildReturnablesForChildrenVO( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion )
+{
+ if ( !pChild )
+ {
+ llerrs<<"child viewerobject is NULL "<<llendl;
+ }
+
+ constructAndAddReturnable( returnables, pChild, pTargetRegion );
+
+ //We want to handle any children VO's as well
+ for (child_list_t::iterator iter = pChild->mChildList.begin(); iter != pChild->mChildList.end(); iter++)
+ {
+ LLViewerObject* pChildofChild = *iter;
+ buildReturnablesForChildrenVO( returnables, pChildofChild, pTargetRegion );
+ }
+}
+
+void LLViewerObject::constructAndAddReturnable( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion )
+{
+
+ LLVector3 targetRegionPos;
+ targetRegionPos.setVec( pChild->getPositionGlobal() );
+
+ LLBBox childBBox = LLBBox( targetRegionPos, pChild->getRotationRegion(), pChild->getScale() * -0.5f,
+ pChild->getScale() * 0.5f).getAxisAligned();
+
+ LLVector3 edgeA = targetRegionPos + childBBox.getMinLocal();
+ LLVector3 edgeB = targetRegionPos + childBBox.getMaxLocal();
+
+ LLVector3d edgeAd, edgeBd;
+ edgeAd.setVec(edgeA);
+ edgeBd.setVec(edgeB);
+
+ //Only add the box when either of the extents are in a neighboring region
+ if ( pTargetRegion->pointInRegionGlobal( edgeAd ) || pTargetRegion->pointInRegionGlobal( edgeBd ) )
+ {
+ PotentialReturnableObject returnableObj;
+ returnableObj.box = childBBox;
+ returnableObj.pRegion = pTargetRegion;
+ returnables.push_back( returnableObj );
+ }
+}
+
+bool LLViewerObject::crossesParcelBounds()
+{
std::vector<LLBBox> boxes;
boxes.push_back(LLBBox(getPositionRegion(), getRotationRegion(), getScale() * -0.5f, getScale() * 0.5f).getAxisAligned());
for (child_list_t::iterator iter = mChildList.begin();
@@ -534,8 +640,7 @@ bool LLViewerObject::isReturnable()
boxes.push_back(LLBBox(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f).getAxisAligned());
}
- return mRegionp
- && mRegionp->objectIsReturnable(getPositionRegion(), boxes);
+ return mRegionp && mRegionp->objectsCrossParcel(boxes);
}
BOOL LLViewerObject::setParent(LLViewerObject* parent)
@@ -2660,7 +2765,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
LLPointer<LLInventoryObject> obj;
obj = new LLInventoryObject(object->mID, LLUUID::null,
LLAssetType::AT_CATEGORY,
- LLTrans::getString("ViewerObjectContents").c_str());
+ "Contents");
object->mInventory->push_front(obj);
object->doInventoryCallback();
delete ft;
@@ -2727,7 +2832,7 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename)
{
LLPointer<LLInventoryObject> inv = new LLInventoryObject;
inv->importLegacyStream(ifs);
- inv->rename(LLTrans::getString("ViewerObjectContents").c_str());
+ inv->rename("Contents");
mInventory->push_front(inv);
}
else
@@ -3114,12 +3219,12 @@ F32 LLViewerObject::getLinksetPhysicsCost()
return mLinksetPhysicsCost;
}
-F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes)
+F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const
{
return 0.f;
}
-U32 LLViewerObject::getTriangleCount()
+U32 LLViewerObject::getTriangleCount(S32* vcount) const
{
return 0;
}
@@ -4787,6 +4892,10 @@ void LLViewerObject::adjustAudioGain(const F32 gain)
bool LLViewerObject::unpackParameterEntry(U16 param_type, LLDataPacker *dp)
{
+ if (LLNetworkData::PARAMS_MESH == param_type)
+ {
+ param_type = LLNetworkData::PARAMS_SCULPT;
+ }
ExtraParameter* param = getExtraParameterEntryCreate(param_type);
if (param)
{
@@ -5691,9 +5800,3 @@ public:
LLHTTPRegistration<ObjectPhysicsProperties>
gHTTPRegistrationObjectPhysicsProperties("/message/ObjectPhysicsProperties");
-
-void LLViewerObject::updateQuota( const SelectionQuota& quota )
-{
- //update quotas
- mSelectionQuota = quota;
-}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 7ebcee7b74..c8152e1539 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -1,4 +1,4 @@
-/**
+/**
* @file llviewerobject.h
* @brief Description of LLViewerObject class, which is the base class for most objects in the viewer.
*
@@ -43,12 +43,12 @@
#include "v3dmath.h"
#include "v3math.h"
#include "llvertexbuffer.h"
-#include "llaccountingquota.h"
+#include "llbbox.h"
+#include "llbbox.h"
class LLAgent; // TODO: Get rid of this.
class LLAudioSource;
class LLAudioSourceVO;
-class LLBBox;
class LLDataPacker;
class LLColor4;
class LLFrameTimer;
@@ -112,6 +112,12 @@ public:
LLColor4 mColor;
};
+struct PotentialReturnableObject
+{
+ LLBBox box;
+ LLViewerRegion* pRegion;
+};
+
//============================================================================
class LLViewerObject : public LLPrimitive, public LLRefCount, public LLGLUpdate
@@ -234,6 +240,13 @@ public:
// anti-encroachment is enabled
bool isReturnable();
+ void buildReturnablesForChildrenVO( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion );
+ void constructAndAddReturnable( std::vector<PotentialReturnableObject>& returnables, LLViewerObject* pChild, LLViewerRegion* pTargetRegion );
+
+ // This method returns true if the object crosses
+ // any parcel bounds in the region.
+ bool crossesParcelBounds();
+
/*
// This method will scan through this object, and then query the
// selection manager to see if the local agent probably has the
@@ -327,8 +340,8 @@ public:
virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
- virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL);
- virtual U32 getTriangleCount();
+ virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL, F32* unscaled_value = NULL) const;
+ virtual U32 getTriangleCount(S32* vcount = NULL) const;
virtual U32 getHighLODTriangleCount();
void setObjectCost(F32 cost);
@@ -646,9 +659,7 @@ protected:
void setParticleSource(const LLPartSysData& particle_parameters, const LLUUID& owner_id);
public:
- void updateQuota( const SelectionQuota& quota );
- const SelectionQuota& getQuota( void ) { return mSelectionQuota; }
-
+
private:
void setNameValueList(const std::string& list); // clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string
void deleteTEImages(); // correctly deletes list of images
@@ -710,8 +721,6 @@ protected:
F32 mPhysicsCost;
F32 mLinksetPhysicsCost;
- SelectionQuota mSelectionQuota;
-
bool mCostStale;
mutable bool mPhysicsShapeUnknown;
@@ -802,7 +811,7 @@ public:
virtual F32 getPartSize(S32 idx);
virtual void getGeometry(S32 idx,
- LLStrider<LLVector3>& verticesp,
+ LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 9f882ee732..6912faa9ec 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -58,6 +58,7 @@
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewerstatsrecorder.h"
+#include "llvovolume.h"
#include "llvoavatarself.h"
#include "lltoolmgr.h"
#include "lltoolpie.h"
@@ -993,6 +994,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
mNumSizeCulled = 0;
mNumVisCulled = 0;
+ // update max computed render cost
+ LLVOVolume::updateRenderComplexity();
+
// compute all sorts of time-based stats
// don't factor frames that were paused into the stats
if (! mWasPaused)
@@ -1071,10 +1075,12 @@ void LLViewerObjectList::fetchObjectCosts()
LLSD id_list;
U32 object_index = 0;
+ U32 count = 0;
+
for (
std::set<LLUUID>::iterator iter = mStaleObjectCost.begin();
iter != mStaleObjectCost.end();
- ++iter)
+ )
{
// Check to see if a request for this object
// has already been made.
@@ -1084,13 +1090,15 @@ void LLViewerObjectList::fetchObjectCosts()
mPendingObjectCost.insert(*iter);
id_list[object_index++] = *iter;
}
- }
- // id_list should now contain all
- // requests in mStaleObjectCost before, so clear
- // it now
- mStaleObjectCost.clear();
+ mStaleObjectCost.erase(iter++);
+ if (count++ >= 450)
+ {
+ break;
+ }
+ }
+
if ( id_list.size() > 0 )
{
LLSD post_data = LLSD::emptyMap();
@@ -1250,7 +1258,8 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep)
BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
{
// Don't ever kill gAgentAvatarp, just force it to the agent's region
- if (objectp == gAgentAvatarp)
+ // unless region is NULL which is assumed to mean you are logging out.
+ if ((objectp == gAgentAvatarp) && gAgent.getRegion())
{
objectp->setRegion(gAgent.getRegion());
return FALSE;
@@ -1273,6 +1282,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
return TRUE;
}
+
return FALSE;
}
@@ -1339,18 +1349,29 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer)
S32 num_removed = 0;
LLViewerObject *objectp;
- for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); )
+
+ vobj_list_t::reverse_iterator target = mObjects.rbegin();
+
+ vobj_list_t::iterator iter = mObjects.begin();
+ for ( ; iter != mObjects.end(); )
{
- // Scan for all of the dead objects and remove any "global" references to them.
+ // Scan for all of the dead objects and put them all on the end of the list with no ref count ops
objectp = *iter;
+ if (objectp == NULL)
+ { //we caught up to the dead tail
+ break;
+ }
+
if (objectp->isDead())
{
- iter = mObjects.erase(iter);
+ LLPointer<LLViewerObject>::swap(*iter, *target);
+ *target = NULL;
+ ++target;
num_removed++;
- if (num_removed == mNumDeadObjects)
+ if (num_removed == mNumDeadObjects || iter->isNull())
{
- // We've cleaned up all of the dead objects.
+ // We've cleaned up all of the dead objects or caught up to the dead tail
break;
}
}
@@ -1360,6 +1381,11 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer)
}
}
+ llassert(num_removed == mNumDeadObjects);
+
+ //erase as a block
+ mObjects.erase(mObjects.begin()+(mObjects.size()-mNumDeadObjects), mObjects.end());
+
// We've cleaned the global object list, now let's do some paranoia testing on objects
// before blowing away the dead list.
mDeadObjects.clear();
@@ -1394,6 +1420,10 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
void LLViewerObjectList::updateObjectCost(LLViewerObject* object)
{
+ if (!object->isRoot())
+ { //always fetch cost for the parent when fetching cost for children
+ mStaleObjectCost.insert(((LLViewerObject*)object->getParent())->getID());
+ }
mStaleObjectCost.insert(object->getID());
}
@@ -1417,15 +1447,6 @@ void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id)
mPendingObjectCost.erase(object_id);
}
-void LLViewerObjectList::updateQuota( const LLUUID& objectId, const SelectionQuota& quota )
-{
- LLViewerObject* pVO = findObject( objectId );
- if ( pVO )
- {
- pVO->updateQuota( quota );
- }
-}
-
void LLViewerObjectList::updatePhysicsFlags(const LLViewerObject* object)
{
mStalePhysicsFlags.insert(object->getID());
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 9d1b5cb56f..c5f2a2c1ee 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -36,7 +36,6 @@
// project includes
#include "llviewerobject.h"
-#include "llaccountingquota.h"
class LLCamera;
class LLNetMap;
@@ -102,8 +101,6 @@ public:
F32 restitution,
F32 gravity_multiplier);
- void updateQuota( const LLUUID& objectId, const SelectionQuota& costs );
-
void shiftObjects(const LLVector3 &offset);
void repartitionObjects();
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index dfa35edef4..90fbc41daa 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -485,6 +485,12 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
{
switch(event)
{
+ case MEDIA_EVENT_DEBUG_MESSAGE:
+ {
+ // LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_DEBUG_MESSAGE " << LL_ENDL;
+ };
+ break;
+
case MEDIA_EVENT_CONTENT_UPDATED:
{
// LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CONTENT_UPDATED " << LL_ENDL;
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 8db72da1ee..9db784101d 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -67,6 +67,7 @@
#include "llworld.h"
#include "roles_constants.h"
#include "llweb.h"
+#include "llvieweraudio.h"
const F32 PARCEL_COLLISION_DRAW_SECS = 1.f;
@@ -113,7 +114,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mRequestResult(0),
mWestSouth(),
mEastNorth(),
- mSelectedDwell(0.f),
+ mSelectedDwell(DWELL_NAN),
mAgentParcelSequenceID(-1),
mHoverRequestResult(0),
mHoverWestSouth(),
@@ -233,7 +234,7 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out,
S32 price = 0;
S32 rent = 0;
BOOL for_sale = FALSE;
- F32 dwell = 0.f;
+ F32 dwell = DWELL_NAN;
if (mSelected)
{
@@ -579,7 +580,7 @@ void LLViewerParcelMgr::deselectLand()
mCurrentParcel->mBanList.clear();
//mCurrentParcel->mRenterList.reset();
- mSelectedDwell = 0.f;
+ mSelectedDwell = DWELL_NAN;
// invalidate parcel selection so that existing users of this selection can clean up
mCurrentParcelSelection->setParcel(NULL);
@@ -1457,6 +1458,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
S32 other_clean_time = 0;
+ LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance();
+
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result );
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id );
@@ -1472,31 +1475,31 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (sequence_id == SELECTED_PARCEL_SEQ_ID)
{
// ...selected parcels report this sequence id
- LLViewerParcelMgr::getInstance()->mRequestResult = PARCEL_RESULT_SUCCESS;
- parcel = LLViewerParcelMgr::getInstance()->mCurrentParcel;
+ parcel_mgr.mRequestResult = PARCEL_RESULT_SUCCESS;
+ parcel = parcel_mgr.mCurrentParcel;
}
else if (sequence_id == HOVERED_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mHoverRequestResult = PARCEL_RESULT_SUCCESS;
- parcel = LLViewerParcelMgr::getInstance()->mHoverParcel;
+ parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS;
+ parcel = parcel_mgr.mHoverParcel;
}
else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID ||
sequence_id == COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID ||
sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mHoverRequestResult = PARCEL_RESULT_SUCCESS;
- parcel = LLViewerParcelMgr::getInstance()->mCollisionParcel;
+ parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS;
+ parcel = parcel_mgr.mCollisionParcel;
}
- else if (sequence_id == 0 || sequence_id > LLViewerParcelMgr::getInstance()->mAgentParcelSequenceID)
+ else if (sequence_id == 0 || sequence_id > parcel_mgr.mAgentParcelSequenceID)
{
// new agent parcel
- LLViewerParcelMgr::getInstance()->mAgentParcelSequenceID = sequence_id;
- parcel = LLViewerParcelMgr::getInstance()->mAgentParcel;
+ parcel_mgr.mAgentParcelSequenceID = sequence_id;
+ parcel = parcel_mgr.mAgentParcel;
}
else
{
llinfos << "out of order agent parcel sequence id " << sequence_id
- << " last good " << LLViewerParcelMgr::getInstance()->mAgentParcelSequenceID
+ << " last good " << parcel_mgr.mAgentParcelSequenceID
<< llendl;
return;
}
@@ -1567,15 +1570,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
parcel->setRegionDenyAgeUnverifiedOverride(region_deny_age_unverified_override);
parcel->unpackMessage(msg);
- if (parcel == LLViewerParcelMgr::getInstance()->mAgentParcel)
+ if (parcel == parcel_mgr.mAgentParcel)
{
- S32 bitmap_size = LLViewerParcelMgr::getInstance()->mParcelsPerEdge
- * LLViewerParcelMgr::getInstance()->mParcelsPerEdge
+ S32 bitmap_size = parcel_mgr.mParcelsPerEdge
+ * parcel_mgr.mParcelsPerEdge
/ 8;
U8* bitmap = new U8[ bitmap_size ];
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);
- LLViewerParcelMgr::getInstance()->writeAgentParcelFromBitmap(bitmap);
+ parcel_mgr.writeAgentParcelFromBitmap(bitmap);
delete[] bitmap;
// Let interesting parties know about agent parcel change.
@@ -1595,11 +1598,11 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (sequence_id == SELECTED_PARCEL_SEQ_ID)
{
// Update selected counts
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedSelfCount = self_count;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedOtherCount = other_count;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedPublicCount = public_count;
+ parcel_mgr.mCurrentParcelSelection->mSelectedSelfCount = self_count;
+ parcel_mgr.mCurrentParcelSelection->mSelectedOtherCount = other_count;
+ parcel_mgr.mCurrentParcelSelection->mSelectedPublicCount = public_count;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedMultipleOwners =
+ parcel_mgr.mCurrentParcelSelection->mSelectedMultipleOwners =
(request_result == PARCEL_RESULT_MULTIPLE);
// Select the whole parcel
@@ -1610,67 +1613,67 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
{
// don't muck with the westsouth and eastnorth.
// just highlight it
- LLVector3 west_south = region->getPosRegionFromGlobal(LLViewerParcelMgr::getInstance()->mWestSouth);
- LLVector3 east_north = region->getPosRegionFromGlobal(LLViewerParcelMgr::getInstance()->mEastNorth);
+ LLVector3 west_south = region->getPosRegionFromGlobal(parcel_mgr.mWestSouth);
+ LLVector3 east_north = region->getPosRegionFromGlobal(parcel_mgr.mEastNorth);
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mHighlightSegments);
- LLViewerParcelMgr::getInstance()->writeHighlightSegments(
+ parcel_mgr.resetSegments(parcel_mgr.mHighlightSegments);
+ parcel_mgr.writeHighlightSegments(
west_south.mV[VX],
west_south.mV[VY],
east_north.mV[VX],
east_north.mV[VY] );
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mWholeParcelSelected = FALSE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = FALSE;
}
else if (0 == local_id)
{
// this is public land, just highlight the selection
- LLViewerParcelMgr::getInstance()->mWestSouth = region->getPosGlobalFromRegion( aabb_min );
- LLViewerParcelMgr::getInstance()->mEastNorth = region->getPosGlobalFromRegion( aabb_max );
+ parcel_mgr.mWestSouth = region->getPosGlobalFromRegion( aabb_min );
+ parcel_mgr.mEastNorth = region->getPosGlobalFromRegion( aabb_max );
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mHighlightSegments);
- LLViewerParcelMgr::getInstance()->writeHighlightSegments(
+ parcel_mgr.resetSegments(parcel_mgr.mHighlightSegments);
+ parcel_mgr.writeHighlightSegments(
aabb_min.mV[VX],
aabb_min.mV[VY],
aabb_max.mV[VX],
aabb_max.mV[VY] );
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
}
else
{
- LLViewerParcelMgr::getInstance()->mWestSouth = region->getPosGlobalFromRegion( aabb_min );
- LLViewerParcelMgr::getInstance()->mEastNorth = region->getPosGlobalFromRegion( aabb_max );
+ parcel_mgr.mWestSouth = region->getPosGlobalFromRegion( aabb_min );
+ parcel_mgr.mEastNorth = region->getPosGlobalFromRegion( aabb_max );
// Owned land, highlight the boundaries
- S32 bitmap_size = LLViewerParcelMgr::getInstance()->mParcelsPerEdge
- * LLViewerParcelMgr::getInstance()->mParcelsPerEdge
+ S32 bitmap_size = parcel_mgr.mParcelsPerEdge
+ * parcel_mgr.mParcelsPerEdge
/ 8;
U8* bitmap = new U8[ bitmap_size ];
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mHighlightSegments);
- LLViewerParcelMgr::getInstance()->writeSegmentsFromBitmap( bitmap, LLViewerParcelMgr::getInstance()->mHighlightSegments );
+ parcel_mgr.resetSegments(parcel_mgr.mHighlightSegments);
+ parcel_mgr.writeSegmentsFromBitmap( bitmap, parcel_mgr.mHighlightSegments );
delete[] bitmap;
bitmap = NULL;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
}
// Request access list information for this land
- LLViewerParcelMgr::getInstance()->sendParcelAccessListRequest(AL_ACCESS | AL_BAN);
+ parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN);
// Request the media url filter list for this land
- LLViewerParcelMgr::getInstance()->requestParcelMediaURLFilter();
+ parcel_mgr.requestParcelMediaURLFilter();
// Request dwell for this land, if it's not public land.
- LLViewerParcelMgr::getInstance()->mSelectedDwell = 0.f;
+ parcel_mgr.mSelectedDwell = DWELL_NAN;
if (0 != local_id)
{
- LLViewerParcelMgr::getInstance()->sendParcelDwellRequest();
+ parcel_mgr.sendParcelDwellRequest();
}
- LLViewerParcelMgr::getInstance()->mSelected = TRUE;
- LLViewerParcelMgr::getInstance()->notifyObservers();
+ parcel_mgr.mSelected = TRUE;
+ parcel_mgr.notifyObservers();
}
}
else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID ||
@@ -1678,32 +1681,32 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID)
{
// We're about to collide with this parcel
- LLViewerParcelMgr::getInstance()->mRenderCollision = TRUE;
- LLViewerParcelMgr::getInstance()->mCollisionTimer.reset();
+ parcel_mgr.mRenderCollision = TRUE;
+ parcel_mgr.mCollisionTimer.reset();
// Differentiate this parcel if we are banned from it.
if (sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mCollisionBanned = BA_BANNED;
+ parcel_mgr.mCollisionBanned = BA_BANNED;
}
else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mCollisionBanned = BA_NOT_IN_GROUP;
+ parcel_mgr.mCollisionBanned = BA_NOT_IN_GROUP;
}
else
{
- LLViewerParcelMgr::getInstance()->mCollisionBanned = BA_NOT_ON_LIST;
+ parcel_mgr.mCollisionBanned = BA_NOT_ON_LIST;
}
- S32 bitmap_size = LLViewerParcelMgr::getInstance()->mParcelsPerEdge
- * LLViewerParcelMgr::getInstance()->mParcelsPerEdge
+ S32 bitmap_size = parcel_mgr.mParcelsPerEdge
+ * parcel_mgr.mParcelsPerEdge
/ 8;
U8* bitmap = new U8[ bitmap_size ];
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mCollisionSegments);
- LLViewerParcelMgr::getInstance()->writeSegmentsFromBitmap( bitmap, LLViewerParcelMgr::getInstance()->mCollisionSegments );
+ parcel_mgr.resetSegments(parcel_mgr.mCollisionSegments);
+ parcel_mgr.writeSegmentsFromBitmap( bitmap, parcel_mgr.mCollisionSegments );
delete[] bitmap;
bitmap = NULL;
@@ -1714,18 +1717,21 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
LLViewerRegion *region = LLWorld::getInstance()->getRegion( msg->getSender() );
if (region)
{
- LLViewerParcelMgr::getInstance()->mHoverWestSouth = region->getPosGlobalFromRegion( aabb_min );
- LLViewerParcelMgr::getInstance()->mHoverEastNorth = region->getPosGlobalFromRegion( aabb_max );
+ parcel_mgr.mHoverWestSouth = region->getPosGlobalFromRegion( aabb_min );
+ parcel_mgr.mHoverEastNorth = region->getPosGlobalFromRegion( aabb_max );
}
else
{
- LLViewerParcelMgr::getInstance()->mHoverWestSouth.clearVec();
- LLViewerParcelMgr::getInstance()->mHoverEastNorth.clearVec();
+ parcel_mgr.mHoverWestSouth.clearVec();
+ parcel_mgr.mHoverEastNorth.clearVec();
}
}
else
{
- // look for music.
+ // Check for video
+ LLViewerParcelMedia::update(parcel);
+
+ // Then check for music
if (gAudiop)
{
if (parcel)
@@ -1736,46 +1742,34 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
std::string music_url = music_url_raw;
LLStringUtil::trim(music_url);
- // On entering a new parcel, stop the last stream if the
- // new parcel has a different music url. (Empty URL counts
- // as different.)
- const std::string& stream_url = gAudiop->getInternetStreamURL();
-
- if (music_url.empty() || music_url != stream_url)
+ // If there is a new music URL and it's valid, play it.
+ if (music_url.size() > 12)
{
- // URL is different from one currently playing.
- gAudiop->stopInternetStream();
-
- // If there is a new music URL and it's valid, play it.
- if (music_url.size() > 12)
+ if (music_url.substr(0,7) == "http://")
{
- if (music_url.substr(0,7) == "http://")
- {
- optionally_start_music(music_url);
- }
- else
- {
- llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
- // clears the URL
- gAudiop->startInternetStream(LLStringUtil::null);
- }
+ optionally_start_music(music_url);
}
- else if (!gAudiop->getInternetStreamURL().empty())
+ else
{
- llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
- gAudiop->startInternetStream(LLStringUtil::null);
+ llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
+ // clears the URL
+ // null value causes fade out
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
}
+ else if (!gAudiop->getInternetStreamURL().empty())
+ {
+ llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
+ // null value causes fade out
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
+ }
}
else
{
// Public land has no music
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
}//if gAudiop
-
- // now check for video
- LLViewerParcelMedia::update( parcel );
};
}
@@ -1794,7 +1788,11 @@ void optionally_start_music(const std::string& music_url)
gSavedSettings.getBOOL("MediaTentativeAutoPlay")))
{
llinfos << "Starting parcel music " << music_url << llendl;
- gAudiop->startInternetStream(music_url);
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(music_url);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
}
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 68d8978ea8..cac8d8391c 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -43,6 +43,8 @@ class LLParcel;
class LLViewerTexture;
class LLViewerRegion;
+const F32 DWELL_NAN = -1.0f; // A dwell having this value will be displayed as Loading...
+
// Constants for sendLandOwner
//const U32 NO_NEIGHBOR_JOIN = 0x0;
//const U32 ALL_NEIGHBOR_JOIN = U32( NORTH_MASK
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 26765bdd01..a0cf2fc803 100644
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -173,6 +173,92 @@ bool LLViewerParcelOverlay::encroachesOwned(const std::vector<LLBBox>& boxes) co
}
return false;
}
+bool LLViewerParcelOverlay::encroachesOnUnowned(const std::vector<LLBBox>& boxes) const
+{
+ // boxes are expected to already be axis aligned
+ for (U32 i = 0; i < boxes.size(); ++i)
+ {
+ LLVector3 min = boxes[i].getMinAgent();
+ LLVector3 max = boxes[i].getMaxAgent();
+
+ S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+ S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+ S32 top = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+ S32 bottom = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+
+ for (S32 row = top; row <= bottom; row++)
+ {
+ for (S32 column = left; column <= right; column++)
+ {
+ U8 type = ownership(row, column);
+ if ((PARCEL_SELF != type))
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+bool LLViewerParcelOverlay::encroachesOnNearbyParcel(const std::vector<LLBBox>& boxes) const
+{
+ // boxes are expected to already be axis aligned
+ for (U32 i = 0; i < boxes.size(); ++i)
+ {
+ LLVector3 min = boxes[i].getMinAgent();
+ LLVector3 max = boxes[i].getMaxAgent();
+
+ // If an object crosses region borders it crosses a parcel
+ if ( min.mV[VX] < 0
+ || min.mV[VY] < 0
+ || max.mV[VX] > REGION_WIDTH_METERS
+ || max.mV[VY] > REGION_WIDTH_METERS)
+ {
+ return true;
+ }
+
+ S32 left = S32(llclamp((min.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+ S32 right = S32(llclamp((max.mV[VX] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+ S32 bottom = S32(llclamp((min.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+ S32 top = S32(llclamp((max.mV[VY] / PARCEL_GRID_STEP_METERS), 0.f, REGION_WIDTH_METERS - 1));
+
+ const S32 GRIDS_PER_EDGE = mParcelGridsPerEdge;
+
+ for (S32 row = bottom; row <= top; row++)
+ {
+ for (S32 col = left; col <= right; col++)
+ {
+ // This is not the rightmost column
+ if (col < GRIDS_PER_EDGE-1)
+ {
+ U8 east_overlay = mOwnership[row*GRIDS_PER_EDGE+col+1];
+ // If the column to the east of the current one marks
+ // the other parcel's west edge and the box extends
+ // to the west it crosses the parcel border.
+ if ((east_overlay & PARCEL_WEST_LINE) && col < right)
+ {
+ return true;
+ }
+ }
+
+ // This is not the topmost column
+ if (row < GRIDS_PER_EDGE-1)
+ {
+ U8 north_overlay = mOwnership[(row+1)*GRIDS_PER_EDGE+col];
+ // If the row to the north of the current one marks
+ // the other parcel's south edge and the box extends
+ // to the south it crosses the parcel border.
+ if ((north_overlay & PARCEL_SOUTH_LINE) && row < top)
+ {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+}
BOOL LLViewerParcelOverlay::isSoundLocal(const LLVector3& pos) const
{
@@ -798,14 +884,14 @@ S32 LLViewerParcelOverlay::renderPropertyLines ()
// Always fudge a little vertically.
pull_toward_camera.mV[VZ] += 0.01f;
- glMatrixMode( GL_MODELVIEW );
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
// Move to appropriate region coords
LLVector3 origin = mRegion->getOriginAgent();
- glTranslatef( origin.mV[VX], origin.mV[VY], origin.mV[VZ] );
+ gGL.translatef( origin.mV[VX], origin.mV[VY], origin.mV[VZ] );
- glTranslatef(pull_toward_camera.mV[VX], pull_toward_camera.mV[VY],
+ gGL.translatef(pull_toward_camera.mV[VX], pull_toward_camera.mV[VY],
pull_toward_camera.mV[VZ]);
// Include +1 because vertices are fenceposts.
@@ -904,7 +990,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines ()
}
- glPopMatrix();
+ gGL.popMatrix();
return drawn;
}
diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h
index c80baedda6..7445d5bf1d 100644
--- a/indra/newview/llviewerparceloverlay.h
+++ b/indra/newview/llviewerparceloverlay.h
@@ -60,6 +60,8 @@ public:
// might be in another parcel. for now, we simply test axis aligned
// bounding boxes which isn't perfect, but is close
bool encroachesOwned(const std::vector<LLBBox>& boxes) const;
+ bool encroachesOnUnowned(const std::vector<LLBBox>& boxes) const;
+ bool encroachesOnNearbyParcel(const std::vector<LLBBox>& boxes) const;
BOOL isSoundLocal(const LLVector3& pos) const;
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 252183b6d7..f738b84bb9 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -120,8 +120,11 @@
// Library includes from llvfs
#include "lldir.h"
-
-// Library includes from llmessage project
+
+// Library includes from llmessage project
#include "llcachename.h"
+// Library includes from llxuixml
+#include "llinitparam.h"
+
#endif
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index bb7170e0f7..ed943964f9 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -77,6 +77,13 @@
const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region
const S16 MAX_MAP_DIST = 10;
+// The server only keeps our pending agent info for 60 seconds.
+// We want to allow for seed cap retry, but its not useful after that 60 seconds.
+// Give it 3 chances, each at 18 seconds to give ourselves a few seconds to connect anyways if we give up.
+const S32 MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN = 3;
+const F32 CAP_REQUEST_TIMEOUT = 18;
+// Even though we gave up on login, keep trying for caps after we are logged in:
+const S32 MAX_CAP_REQUEST_ATTEMPTS = 30;
typedef std::map<std::string, std::string> CapabilityMap;
@@ -86,6 +93,10 @@ public:
: mHost(host),
mCompositionp(NULL),
mEventPoll(NULL),
+ mSeedCapMaxAttempts(MAX_CAP_REQUEST_ATTEMPTS),
+ mSeedCapMaxAttemptsBeforeLogin(MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN),
+ mSeedCapAttempts(0),
+ mHttpResponderID(0),
// I'd prefer to set the LLCapabilityListener name to match the region
// name -- it's disappointing that's not available at construction time.
// We could instead store an LLCapabilityListener*, making
@@ -100,6 +111,8 @@ public:
{
}
+ void buildCapabilityNames(LLSD& capabilityNames);
+
// The surfaces and other layers
LLSurface* mLandp;
@@ -132,6 +145,12 @@ public:
LLEventPoll* mEventPoll;
+ S32 mSeedCapMaxAttempts;
+ S32 mSeedCapMaxAttemptsBeforeLogin;
+ S32 mSeedCapAttempts;
+
+ S32 mHttpResponderID;
+
/// Post an event to this LLCapabilityListener to invoke a capability message on
/// this LLViewerRegion's server
/// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
@@ -139,8 +158,6 @@ public:
//spatial partitions for objects in this region
std::vector<LLSpatialPartition*> mObjectPartition;
-
- LLHTTPClient::ResponderPtr mHttpResponderPtr ;
};
// support for secondlife:///app/region/{REGION} SLapps
@@ -186,54 +203,51 @@ class BaseCapabilitiesComplete : public LLHTTPClient::Responder
{
LOG_CLASS(BaseCapabilitiesComplete);
public:
- BaseCapabilitiesComplete(LLViewerRegion* region)
- : mRegion(region)
+ BaseCapabilitiesComplete(U64 region_handle, S32 id)
+ : mRegionHandle(region_handle), mID(id)
{ }
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())
+ LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
+ if (regionp)
{
- LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
+ regionp->failedSeedCapability();
}
}
void result(const LLSD& content)
{
- if(!mRegion || LLHTTPClient::ResponderPtr(this) != mRegion->getHttpResponderPtr()) //region is removed or responder is not created.
+ LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
+ if(!regionp) //region was removed
+ {
+ LL_WARNS2("AppInit", "Capabilities") << "Received results for region that no longer exists!" << LL_ENDL;
+ return ;
+ }
+ if( mID != regionp->getHttpResponderID() ) // region is no longer referring to this responder
{
+ LL_WARNS2("AppInit", "Capabilities") << "Received results for a stale http responder!" << LL_ENDL;
return ;
}
LLSD::map_const_iterator iter;
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
{
- mRegion->setCapability(iter->first, iter->second);
+ regionp->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" && mRegion->getReleaseNotesRequested())
+ if (iter->first == "ServerReleaseNotes" && regionp->getReleaseNotesRequested())
{
- mRegion->showReleaseNotes();
+ regionp->showReleaseNotes();
}
}
- mRegion->setCapabilitiesReceived(true);
+ regionp->setCapabilitiesReceived(true);
if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
@@ -241,15 +255,15 @@ public:
}
}
- static boost::intrusive_ptr<BaseCapabilitiesComplete> build(
- LLViewerRegion* region)
+ static boost::intrusive_ptr<BaseCapabilitiesComplete> build( U64 region_handle, S32 id )
{
- return boost::intrusive_ptr<BaseCapabilitiesComplete>(
- new BaseCapabilitiesComplete(region));
+ return boost::intrusive_ptr<BaseCapabilitiesComplete>(
+ new BaseCapabilitiesComplete(region_handle, id) );
}
private:
- LLViewerRegion* mRegion;
+ U64 mRegionHandle;
+ S32 mID;
};
@@ -340,11 +354,6 @@ void LLViewerRegion::initStats()
LLViewerRegion::~LLViewerRegion()
{
- if(mImpl->mHttpResponderPtr)
- {
- (static_cast<BaseCapabilitiesComplete*>(mImpl->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...
@@ -558,6 +567,11 @@ const std::string LLViewerRegion::getSimAccessString() const
return accessToString(mSimAccess);
}
+std::string LLViewerRegion::getLocalizedSimProductName() const
+{
+ std::string localized_spn;
+ return LLTrans::findString(localized_spn, mProductName) ? localized_spn : mProductName;
+}
// static
std::string LLViewerRegion::regionFlagsToString(U32 flags)
@@ -891,14 +905,9 @@ U32 LLViewerRegion::getPacketsLost() const
}
}
-void LLViewerRegion::setHttpResponderPtrNULL()
-{
- mImpl->mHttpResponderPtr = NULL;
-}
-
-const LLHTTPClient::ResponderPtr LLViewerRegion::getHttpResponderPtr() const
+S32 LLViewerRegion::getHttpResponderID() const
{
- return mImpl->mHttpResponderPtr;
+ return mImpl->mHttpResponderID;
}
BOOL LLViewerRegion::pointInRegionGlobal(const LLVector3d &point_global) const
@@ -1184,6 +1193,7 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec
eCacheUpdateResult result = CACHE_UPDATE_ADDED;
if (mImpl->mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES)
{
+ delete mImpl->mCacheMap.begin()->second ;
mImpl->mCacheMap.erase(mImpl->mCacheMap.begin());
result = CACHE_UPDATE_REPLACED;
@@ -1477,24 +1487,8 @@ void LLViewerRegion::unpackRegionHandshake()
msg->sendReliable(host);
}
-void LLViewerRegion::setSeedCapability(const std::string& url)
+void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
{
- if (getCapability("Seed") == url)
- {
- // llwarns << "Ignoring duplicate seed capability" << llendl;
- return;
- }
-
- delete mImpl->mEventPoll;
- mImpl->mEventPoll = NULL;
-
- mImpl->mCapabilities.clear();
- setCapability("Seed", url);
-
- LLSD capabilityNames = LLSD::emptyArray();
-
- capabilityNames.append("AccountingParcel");
- capabilityNames.append("AccountingSelection");
capabilityNames.append("AttachmentResources");
capabilityNames.append("AvatarPickerSearch");
capabilityNames.append("ChatSessionRequest");
@@ -1524,6 +1518,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("LandResources");
capabilityNames.append("MapLayer");
capabilityNames.append("MapLayerGod");
+ capabilityNames.append("MeshUploadFlag");
capabilityNames.append("NewFileAgentInventory");
capabilityNames.append("ParcelPropertiesUpdate");
capabilityNames.append("ParcelMediaURLFilterList");
@@ -1533,6 +1528,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("ProvisionVoiceAccountRequest");
capabilityNames.append("RemoteParcelRequest");
capabilityNames.append("RequestTextureDownload");
+ capabilityNames.append("ResourceCostSelected");
capabilityNames.append("SearchStatRequest");
capabilityNames.append("SearchStatTracking");
capabilityNames.append("SendPostcard");
@@ -1558,53 +1554,121 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("ViewerMetrics");
capabilityNames.append("ViewerStartAuction");
capabilityNames.append("ViewerStats");
- //prep# Finalize these!!!!!!!!!
- //capabilityNames.append("AccountingVO");
- capabilityNames.append("AccountingParcel");
- capabilityNames.append("AccountingRegion");
// Please add new capabilities alphabetically to reduce
// merge conflicts.
+}
+
+void LLViewerRegion::setSeedCapability(const std::string& url)
+{
+ if (getCapability("Seed") == url)
+ {
+ // llwarns << "Ignoring duplicate seed capability" << llendl;
+ return;
+ }
+
+ delete mImpl->mEventPoll;
+ mImpl->mEventPoll = NULL;
+
+ mImpl->mCapabilities.clear();
+ setCapability("Seed", url);
+
+ LLSD capabilityNames = LLSD::emptyArray();
+ mImpl->buildCapabilityNames(capabilityNames);
llinfos << "posting to seed " << url << llendl;
- mImpl->mHttpResponderPtr = BaseCapabilitiesComplete::build(this) ;
- LLHTTPClient::post(url, capabilityNames, mImpl->mHttpResponderPtr);
+ S32 id = ++mImpl->mHttpResponderID;
+ LLHTTPClient::post(url, capabilityNames,
+ BaseCapabilitiesComplete::build(getHandle(), id),
+ LLSD(), CAP_REQUEST_TIMEOUT);
+}
+
+S32 LLViewerRegion::getNumSeedCapRetries()
+{
+ return mImpl->mSeedCapAttempts;
+}
+
+void LLViewerRegion::failedSeedCapability()
+{
+ // Should we retry asking for caps?
+ mImpl->mSeedCapAttempts++;
+ std::string url = getCapability("Seed");
+ if ( url.empty() )
+ {
+ LL_WARNS2("AppInit", "Capabilities") << "Failed to get seed capabilities, and can not determine url for retries!" << LL_ENDL;
+ return;
+ }
+ // After a few attempts, continue login. We will keep trying once in-world:
+ if ( mImpl->mSeedCapAttempts >= mImpl->mSeedCapMaxAttemptsBeforeLogin &&
+ STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState() )
+ {
+ LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
+ }
+
+ if ( mImpl->mSeedCapAttempts < mImpl->mSeedCapMaxAttempts)
+ {
+ LLSD capabilityNames = LLSD::emptyArray();
+ mImpl->buildCapabilityNames(capabilityNames);
+
+ llinfos << "posting to seed " << url << " (retry "
+ << mImpl->mSeedCapAttempts << ")" << llendl;
+
+ S32 id = ++mImpl->mHttpResponderID;
+ LLHTTPClient::post(url, capabilityNames,
+ BaseCapabilitiesComplete::build(getHandle(), id),
+ LLSD(), CAP_REQUEST_TIMEOUT);
+ }
+ else
+ {
+ // *TODO: Give a user pop-up about this error?
+ LL_WARNS2("AppInit", "Capabilities") << "Failed to get seed capabilities from '" << url << "' after " << mImpl->mSeedCapAttempts << " attempts. Giving up!" << LL_ENDL;
+ }
}
class SimulatorFeaturesReceived : public LLHTTPClient::Responder
{
LOG_CLASS(SimulatorFeaturesReceived);
public:
- SimulatorFeaturesReceived(LLViewerRegion* region)
- : mRegion(region)
+ SimulatorFeaturesReceived(const std::string& retry_url, U64 region_handle,
+ S32 attempt = 0, S32 max_attempts = MAX_CAP_REQUEST_ATTEMPTS)
+ : mRetryURL(retry_url), mRegionHandle(region_handle), mAttempt(attempt), mMaxAttempts(max_attempts)
{ }
void error(U32 statusNum, const std::string& reason)
{
LL_WARNS2("AppInit", "SimulatorFeatures") << statusNum << ": " << reason << LL_ENDL;
+ retry();
}
-
+
void result(const LLSD& content)
{
- if(!mRegion) //region is removed or responder is not created.
+ LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
+ if(!regionp) //region is removed or responder is not created.
{
+ LL_WARNS2("AppInit", "SimulatorFeatures") << "Received results for region that no longer exists!" << LL_ENDL;
return ;
}
- mRegion->setSimulatorFeatures(content);
+ regionp->setSimulatorFeatures(content);
}
-
- static boost::intrusive_ptr<SimulatorFeaturesReceived> build(
- LLViewerRegion* region)
- {
- return boost::intrusive_ptr<SimulatorFeaturesReceived>(
- new SimulatorFeaturesReceived(region));
- }
-
+
private:
- LLViewerRegion* mRegion;
+ void retry()
+ {
+ if (mAttempt < mMaxAttempts)
+ {
+ mAttempt++;
+ LL_WARNS2("AppInit", "SimulatorFeatures") << "Re-trying '" << mRetryURL << "'. Retry #" << mAttempt << LL_ENDL;
+ LLHTTPClient::get(mRetryURL, new SimulatorFeaturesReceived(*this), LLSD(), CAP_REQUEST_TIMEOUT);
+ }
+ }
+
+ std::string mRetryURL;
+ U64 mRegionHandle;
+ S32 mAttempt;
+ S32 mMaxAttempts;
};
@@ -1623,7 +1687,7 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u
else if (name == "SimulatorFeatures")
{
// kick off a request for simulator features
- LLHTTPClient::get(url, new SimulatorFeaturesReceived(this));
+ LLHTTPClient::get(url, new SimulatorFeaturesReceived(url, getHandle()), LLSD(), CAP_REQUEST_TIMEOUT);
}
else
{
@@ -1713,6 +1777,23 @@ bool LLViewerRegion::objectIsReturnable(const LLVector3& pos, const std::vector<
&& mParcelOverlay->encroachesOwned(boxes)) );
}
+bool LLViewerRegion::childrenObjectReturnable( const std::vector<LLBBox>& boxes ) const
+{
+ bool result = false;
+ result = ( mParcelOverlay && mParcelOverlay->encroachesOnUnowned( boxes ) ) ? 1 : 0;
+ return result;
+}
+
+bool LLViewerRegion::objectsCrossParcel(const std::vector<LLBBox>& boxes) const
+{
+ return mParcelOverlay && mParcelOverlay->encroachesOnNearbyParcel(boxes);
+}
+
+void LLViewerRegion::getNeighboringRegions( std::vector<LLViewerRegion*>& uniqueRegions )
+{
+ mImpl->mLandp->getNeighboringRegions( uniqueRegions );
+}
+
void LLViewerRegion::showReleaseNotes()
{
std::string url = this->getCapability("ServerReleaseNotes");
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index f68b51ea65..c483c6ef52 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -192,7 +192,7 @@ public:
S32 getSimCPURatio() const { return mCPURatio; }
const std::string& getSimColoName() const { return mColoName; }
const std::string& getSimProductSKU() const { return mProductSKU; }
- const std::string& getSimProductName() const { return mProductName; }
+ std::string getLocalizedSimProductName() const;
// Returns "Sandbox", "Expensive", etc.
static std::string regionFlagsToString(U32 flags);
@@ -226,11 +226,12 @@ public:
U32 getPacketsLost() const;
- void setHttpResponderPtrNULL();
- const LLHTTPClient::ResponderPtr getHttpResponderPtr() const;
+ S32 getHttpResponderID() const;
// Get/set named capability URLs for this region.
void setSeedCapability(const std::string& url);
+ void failedSeedCapability();
+ S32 getNumSeedCapRetries();
void setCapability(const std::string& name, const std::string& url);
// implements LLCapabilityProvider
virtual std::string getCapability(const std::string& name) const;
@@ -320,6 +321,11 @@ public:
LLSpatialPartition* getSpatialPartition(U32 type);
bool objectIsReturnable(const LLVector3& pos, const std::vector<LLBBox>& boxes) const;
+ bool childrenObjectReturnable( const std::vector<LLBBox>& boxes ) const;
+ bool objectsCrossParcel(const std::vector<LLBBox>& boxes) const;
+
+ void getNeighboringRegions( std::vector<LLViewerRegion*>& uniqueRegions );
+
public:
struct CompareDistance
{
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index e473901609..18ae83e3b6 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -32,6 +32,7 @@
#include "llfile.h"
#include "llviewerwindow.h"
+#include "llwindow.h"
#include "llviewercontrol.h"
#include "pipeline.h"
#include "llworld.h"
@@ -58,23 +59,55 @@ using std::make_pair;
using std::string;
BOOL LLViewerShaderMgr::sInitialized = FALSE;
+bool LLViewerShaderMgr::sSkipReload = false;
LLVector4 gShinyOrigin;
+//utility shaders
+LLGLSLShader gOcclusionProgram;
+LLGLSLShader gCustomAlphaProgram;
+LLGLSLShader gGlowCombineProgram;
+LLGLSLShader gSplatTextureRectProgram;
+LLGLSLShader gGlowCombineFXAAProgram;
+LLGLSLShader gTwoTextureAddProgram;
+LLGLSLShader gOneTextureNoColorProgram;
+LLGLSLShader gDebugProgram;
+LLGLSLShader gAlphaMaskProgram;
+
//object shaders
LLGLSLShader gObjectSimpleProgram;
+LLGLSLShader gObjectPreviewProgram;
LLGLSLShader gObjectSimpleWaterProgram;
+LLGLSLShader gObjectSimpleAlphaMaskProgram;
+LLGLSLShader gObjectSimpleWaterAlphaMaskProgram;
LLGLSLShader gObjectFullbrightProgram;
LLGLSLShader gObjectFullbrightWaterProgram;
+LLGLSLShader gObjectEmissiveProgram;
+LLGLSLShader gObjectEmissiveWaterProgram;
+LLGLSLShader gObjectFullbrightAlphaMaskProgram;
+LLGLSLShader gObjectFullbrightWaterAlphaMaskProgram;
LLGLSLShader gObjectFullbrightShinyProgram;
LLGLSLShader gObjectFullbrightShinyWaterProgram;
LLGLSLShader gObjectShinyProgram;
LLGLSLShader gObjectShinyWaterProgram;
+LLGLSLShader gObjectBumpProgram;
+LLGLSLShader gTreeProgram;
+LLGLSLShader gTreeWaterProgram;
+LLGLSLShader gObjectFullbrightNoColorProgram;
+LLGLSLShader gObjectFullbrightNoColorWaterProgram;
LLGLSLShader gObjectSimpleNonIndexedProgram;
+LLGLSLShader gObjectSimpleNonIndexedTexGenProgram;
+LLGLSLShader gObjectSimpleNonIndexedTexGenWaterProgram;
LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
+LLGLSLShader gObjectAlphaMaskNonIndexedProgram;
+LLGLSLShader gObjectAlphaMaskNonIndexedWaterProgram;
+LLGLSLShader gObjectAlphaMaskNoColorProgram;
+LLGLSLShader gObjectAlphaMaskNoColorWaterProgram;
LLGLSLShader gObjectFullbrightNonIndexedProgram;
LLGLSLShader gObjectFullbrightNonIndexedWaterProgram;
+LLGLSLShader gObjectEmissiveNonIndexedProgram;
+LLGLSLShader gObjectEmissiveNonIndexedWaterProgram;
LLGLSLShader gObjectFullbrightShinyNonIndexedProgram;
LLGLSLShader gObjectFullbrightShinyNonIndexedWaterProgram;
LLGLSLShader gObjectShinyNonIndexedProgram;
@@ -83,11 +116,13 @@ LLGLSLShader gObjectShinyNonIndexedWaterProgram;
//object hardware skinning shaders
LLGLSLShader gSkinnedObjectSimpleProgram;
LLGLSLShader gSkinnedObjectFullbrightProgram;
+LLGLSLShader gSkinnedObjectEmissiveProgram;
LLGLSLShader gSkinnedObjectFullbrightShinyProgram;
LLGLSLShader gSkinnedObjectShinySimpleProgram;
LLGLSLShader gSkinnedObjectSimpleWaterProgram;
LLGLSLShader gSkinnedObjectFullbrightWaterProgram;
+LLGLSLShader gSkinnedObjectEmissiveWaterProgram;
LLGLSLShader gSkinnedObjectFullbrightShinyWaterProgram;
LLGLSLShader gSkinnedObjectShinySimpleWaterProgram;
@@ -105,11 +140,13 @@ LLGLSLShader gAvatarProgram;
LLGLSLShader gAvatarWaterProgram;
LLGLSLShader gAvatarEyeballProgram;
LLGLSLShader gAvatarPickProgram;
+LLGLSLShader gImpostorProgram;
// WindLight shader handles
LLGLSLShader gWLSkyProgram;
LLGLSLShader gWLCloudProgram;
+
// Effects Shaders
LLGLSLShader gGlowProgram;
LLGLSLShader gGlowExtractProgram;
@@ -118,16 +155,19 @@ LLGLSLShader gPostNightVisionProgram;
// Deferred rendering shaders
LLGLSLShader gDeferredImpostorProgram;
-LLGLSLShader gDeferredEdgeProgram;
LLGLSLShader gDeferredWaterProgram;
LLGLSLShader gDeferredDiffuseProgram;
+LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
LLGLSLShader gDeferredNonIndexedDiffuseProgram;
+LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskProgram;
+LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
LLGLSLShader gDeferredSkinnedDiffuseProgram;
LLGLSLShader gDeferredSkinnedBumpProgram;
LLGLSLShader gDeferredSkinnedAlphaProgram;
LLGLSLShader gDeferredBumpProgram;
LLGLSLShader gDeferredTerrainProgram;
LLGLSLShader gDeferredTreeProgram;
+LLGLSLShader gDeferredTreeShadowProgram;
LLGLSLShader gDeferredAvatarProgram;
LLGLSLShader gDeferredAvatarAlphaProgram;
LLGLSLShader gDeferredLightProgram;
@@ -138,78 +178,96 @@ LLGLSLShader gDeferredSunProgram;
LLGLSLShader gDeferredBlurLightProgram;
LLGLSLShader gDeferredSoftenProgram;
LLGLSLShader gDeferredShadowProgram;
+LLGLSLShader gDeferredShadowAlphaMaskProgram;
LLGLSLShader gDeferredAvatarShadowProgram;
LLGLSLShader gDeferredAttachmentShadowProgram;
LLGLSLShader gDeferredAlphaProgram;
LLGLSLShader gDeferredAvatarEyesProgram;
LLGLSLShader gDeferredFullbrightProgram;
-LLGLSLShader gDeferredGIProgram;
-LLGLSLShader gDeferredGIFinalProgram;
-LLGLSLShader gDeferredPostGIProgram;
+LLGLSLShader gDeferredEmissiveProgram;
LLGLSLShader gDeferredPostProgram;
+LLGLSLShader gDeferredCoFProgram;
+LLGLSLShader gDeferredDoFCombineProgram;
+LLGLSLShader gFXAAProgram;
LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
LLGLSLShader gDeferredWLCloudProgram;
LLGLSLShader gDeferredStarProgram;
-LLGLSLShader gLuminanceGatherProgram;
-
-
-//current avatar shader parameter pointer
-GLint gAvatarMatrixParam;
+LLGLSLShader gNormalMapGenProgram;
LLViewerShaderMgr::LLViewerShaderMgr() :
mVertexShaderLevel(SHADER_COUNT, 0),
mMaxAvatarShaderLevel(0)
{
/// Make sure WL Sky is the first program
+ //ONLY shaders that need WL Param management should be added here
mShaderList.push_back(&gWLSkyProgram);
mShaderList.push_back(&gWLCloudProgram);
mShaderList.push_back(&gAvatarProgram);
mShaderList.push_back(&gObjectShinyProgram);
+ mShaderList.push_back(&gObjectShinyNonIndexedProgram);
mShaderList.push_back(&gWaterProgram);
mShaderList.push_back(&gAvatarEyeballProgram);
mShaderList.push_back(&gObjectSimpleProgram);
+ mShaderList.push_back(&gObjectPreviewProgram);
+ mShaderList.push_back(&gImpostorProgram);
+ mShaderList.push_back(&gObjectFullbrightNoColorProgram);
+ mShaderList.push_back(&gObjectFullbrightNoColorWaterProgram);
+ mShaderList.push_back(&gObjectSimpleAlphaMaskProgram);
+ mShaderList.push_back(&gObjectBumpProgram);
+ mShaderList.push_back(&gObjectEmissiveProgram);
+ mShaderList.push_back(&gObjectEmissiveWaterProgram);
mShaderList.push_back(&gObjectFullbrightProgram);
+ mShaderList.push_back(&gObjectFullbrightAlphaMaskProgram);
mShaderList.push_back(&gObjectFullbrightShinyProgram);
mShaderList.push_back(&gObjectFullbrightShinyWaterProgram);
mShaderList.push_back(&gObjectSimpleNonIndexedProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedTexGenProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedTexGenWaterProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedWaterProgram);
+ mShaderList.push_back(&gObjectAlphaMaskNonIndexedProgram);
+ mShaderList.push_back(&gObjectAlphaMaskNonIndexedWaterProgram);
+ mShaderList.push_back(&gObjectAlphaMaskNoColorProgram);
+ mShaderList.push_back(&gObjectAlphaMaskNoColorWaterProgram);
+ mShaderList.push_back(&gTreeProgram);
+ mShaderList.push_back(&gTreeWaterProgram);
mShaderList.push_back(&gObjectFullbrightNonIndexedProgram);
+ mShaderList.push_back(&gObjectFullbrightNonIndexedWaterProgram);
+ mShaderList.push_back(&gObjectEmissiveNonIndexedProgram);
+ mShaderList.push_back(&gObjectEmissiveNonIndexedWaterProgram);
mShaderList.push_back(&gObjectFullbrightShinyNonIndexedProgram);
mShaderList.push_back(&gObjectFullbrightShinyNonIndexedWaterProgram);
mShaderList.push_back(&gSkinnedObjectSimpleProgram);
mShaderList.push_back(&gSkinnedObjectFullbrightProgram);
+ mShaderList.push_back(&gSkinnedObjectEmissiveProgram);
mShaderList.push_back(&gSkinnedObjectFullbrightShinyProgram);
mShaderList.push_back(&gSkinnedObjectShinySimpleProgram);
mShaderList.push_back(&gSkinnedObjectSimpleWaterProgram);
mShaderList.push_back(&gSkinnedObjectFullbrightWaterProgram);
+ mShaderList.push_back(&gSkinnedObjectEmissiveWaterProgram);
mShaderList.push_back(&gSkinnedObjectFullbrightShinyWaterProgram);
mShaderList.push_back(&gSkinnedObjectShinySimpleWaterProgram);
mShaderList.push_back(&gTerrainProgram);
mShaderList.push_back(&gTerrainWaterProgram);
mShaderList.push_back(&gObjectSimpleWaterProgram);
mShaderList.push_back(&gObjectFullbrightWaterProgram);
+ mShaderList.push_back(&gObjectSimpleWaterAlphaMaskProgram);
+ mShaderList.push_back(&gObjectFullbrightWaterAlphaMaskProgram);
mShaderList.push_back(&gAvatarWaterProgram);
mShaderList.push_back(&gObjectShinyWaterProgram);
+ mShaderList.push_back(&gObjectShinyNonIndexedWaterProgram);
mShaderList.push_back(&gUnderWaterProgram);
mShaderList.push_back(&gDeferredSunProgram);
- mShaderList.push_back(&gDeferredBlurLightProgram);
mShaderList.push_back(&gDeferredSoftenProgram);
- mShaderList.push_back(&gDeferredLightProgram);
- mShaderList.push_back(&gDeferredMultiLightProgram);
mShaderList.push_back(&gDeferredAlphaProgram);
mShaderList.push_back(&gDeferredSkinnedAlphaProgram);
mShaderList.push_back(&gDeferredFullbrightProgram);
+ mShaderList.push_back(&gDeferredEmissiveProgram);
mShaderList.push_back(&gDeferredAvatarEyesProgram);
- mShaderList.push_back(&gDeferredPostGIProgram);
- mShaderList.push_back(&gDeferredEdgeProgram);
- mShaderList.push_back(&gDeferredPostProgram);
- mShaderList.push_back(&gDeferredGIProgram);
- mShaderList.push_back(&gDeferredGIFinalProgram);
mShaderList.push_back(&gDeferredWaterProgram);
mShaderList.push_back(&gDeferredAvatarAlphaProgram);
mShaderList.push_back(&gDeferredWLSkyProgram);
mShaderList.push_back(&gDeferredWLCloudProgram);
- mShaderList.push_back(&gDeferredStarProgram);
}
LLViewerShaderMgr::~LLViewerShaderMgr()
@@ -233,80 +291,13 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void)
{
if (mReservedAttribs.empty())
{
- mReservedAttribs.push_back("materialColor");
- mReservedAttribs.push_back("specularColor");
- mReservedAttribs.push_back("binormal");
- mReservedAttribs.push_back("object_weight");
-
- mAvatarAttribs.reserve(5);
- mAvatarAttribs.push_back("weight");
- mAvatarAttribs.push_back("clothing");
- mAvatarAttribs.push_back("gWindDir");
- mAvatarAttribs.push_back("gSinWaveParams");
- mAvatarAttribs.push_back("gGravity");
+ LLShaderMgr::initAttribsAndUniforms();
mAvatarUniforms.push_back("matrixPalette");
+ mAvatarUniforms.push_back("gWindDir");
+ mAvatarUniforms.push_back("gSinWaveParams");
+ mAvatarUniforms.push_back("gGravity");
- mReservedUniforms.reserve(24);
- mReservedUniforms.push_back("diffuseMap");
- mReservedUniforms.push_back("specularMap");
- mReservedUniforms.push_back("bumpMap");
- mReservedUniforms.push_back("environmentMap");
- mReservedUniforms.push_back("cloude_noise_texture");
- mReservedUniforms.push_back("fullbright");
- mReservedUniforms.push_back("lightnorm");
- mReservedUniforms.push_back("sunlight_color");
- mReservedUniforms.push_back("ambient");
- mReservedUniforms.push_back("blue_horizon");
- mReservedUniforms.push_back("blue_density");
- mReservedUniforms.push_back("haze_horizon");
- mReservedUniforms.push_back("haze_density");
- mReservedUniforms.push_back("cloud_shadow");
- mReservedUniforms.push_back("density_multiplier");
- mReservedUniforms.push_back("distance_multiplier");
- mReservedUniforms.push_back("max_y");
- mReservedUniforms.push_back("glow");
- mReservedUniforms.push_back("cloud_color");
- mReservedUniforms.push_back("cloud_pos_density1");
- mReservedUniforms.push_back("cloud_pos_density2");
- mReservedUniforms.push_back("cloud_scale");
- mReservedUniforms.push_back("gamma");
- mReservedUniforms.push_back("scene_light_strength");
-
- mReservedUniforms.push_back("depthMap");
- mReservedUniforms.push_back("shadowMap0");
- mReservedUniforms.push_back("shadowMap1");
- mReservedUniforms.push_back("shadowMap2");
- mReservedUniforms.push_back("shadowMap3");
- mReservedUniforms.push_back("shadowMap4");
- mReservedUniforms.push_back("shadowMap5");
-
- mReservedUniforms.push_back("normalMap");
- mReservedUniforms.push_back("positionMap");
- mReservedUniforms.push_back("diffuseRect");
- mReservedUniforms.push_back("specularRect");
- mReservedUniforms.push_back("noiseMap");
- mReservedUniforms.push_back("lightFunc");
- mReservedUniforms.push_back("lightMap");
- mReservedUniforms.push_back("luminanceMap");
- mReservedUniforms.push_back("giLightMap");
- mReservedUniforms.push_back("giMip");
- mReservedUniforms.push_back("edgeMap");
- mReservedUniforms.push_back("bloomMap");
- mReservedUniforms.push_back("sunLightMap");
- mReservedUniforms.push_back("localLightMap");
- mReservedUniforms.push_back("projectionMap");
- mReservedUniforms.push_back("diffuseGIMap");
- mReservedUniforms.push_back("specularGIMap");
- mReservedUniforms.push_back("normalGIMap");
- mReservedUniforms.push_back("minpGIMap");
- mReservedUniforms.push_back("maxpGIMap");
- mReservedUniforms.push_back("depthGIMap");
- mReservedUniforms.push_back("lastDiffuseGIMap");
- mReservedUniforms.push_back("lastNormalGIMap");
- mReservedUniforms.push_back("lastMinpGIMap");
- mReservedUniforms.push_back("lastMaxpGIMap");
-
mWLUniforms.push_back("camPosLocal");
mTerrainUniforms.reserve(5);
@@ -362,17 +353,29 @@ void LLViewerShaderMgr::setShaders()
//setShaders might be called redundantly by gSavedSettings, so return on reentrance
static bool reentrance = false;
- if (!gPipeline.mInitialized || !sInitialized || reentrance)
+ if (!gPipeline.mInitialized || !sInitialized || reentrance || sSkipReload)
{
return;
}
- //setup preprocessor definitions
- LLShaderMgr::instance()->mDefinitions["samples"] = llformat("%d", gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples")));
- LLShaderMgr::instance()->mDefinitions["NUM_TEX_UNITS"] = llformat("%d", gGLManager.mNumTextureImageUnits);
+ LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
+
+ //NEVER use more than 16 texture channels (work around for prevalent driver bug)
+ LLGLSLShader::sIndexedTextureChannels = llmin(LLGLSLShader::sIndexedTextureChannels, 16);
reentrance = true;
+ if (LLRender::sGLCoreProfile)
+ {
+ if (!gSavedSettings.getBOOL("VertexShaderEnable"))
+ { //vertex shaders MUST be enabled to use core profile
+ gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
+ }
+ }
+
+ //setup preprocessor definitions
+ LLShaderMgr::instance()->mDefinitions["NUM_TEX_UNITS"] = llformat("%d", gGLManager.mNumTextureImageUnits);
+
// Make sure the compiled shader map is cleared before we recompile shaders.
mShaderObjects.clear();
@@ -410,9 +413,14 @@ void LLViewerShaderMgr::setShaders()
}
mMaxAvatarShaderLevel = 0;
+ LLGLSLShader::sNoFixedFunction = false;
+ LLVertexBuffer::unbind();
if (LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")
&& gSavedSettings.getBOOL("VertexShaderEnable"))
{
+ //using shaders, disable fixed function
+ LLGLSLShader::sNoFixedFunction = true;
+
S32 light_class = 2;
S32 env_class = 2;
S32 obj_class = 2;
@@ -427,15 +435,8 @@ void LLViewerShaderMgr::setShaders()
gSavedSettings.getBOOL("WindLightUseAtmosShaders"))
{
if (gSavedSettings.getS32("RenderShadowDetail") > 0)
- {
- if (gSavedSettings.getBOOL("RenderDeferredGI"))
- { //shadows + gi
- deferred_class = 3;
- }
- else
- { //shadows
- deferred_class = 2;
- }
+ { //shadows
+ deferred_class = 2;
}
else
{ //no shadows
@@ -458,11 +459,7 @@ void LLViewerShaderMgr::setShaders()
wl_class = 1;
}
- if(!gSavedSettings.getBOOL("EnableRippleWater"))
- {
- water_class = 0;
- }
-
+
// Trigger a full rebuild of the fallback skybox / cubemap if we've toggled windlight shaders
if (mVertexShaderLevel[SHADER_WINDLIGHT] != wl_class && gSky.mVOSkyp.notNull())
{
@@ -554,6 +551,7 @@ void LLViewerShaderMgr::setShaders()
}
else
{
+ LLGLSLShader::sNoFixedFunction = false;
gPipeline.mVertexShadersEnabled = FALSE;
gPipeline.mVertexShadersLoaded = 0;
mVertexShaderLevel[SHADER_LIGHTING] = 0;
@@ -568,6 +566,7 @@ void LLViewerShaderMgr::setShaders()
}
else
{
+ LLGLSLShader::sNoFixedFunction = false;
gPipeline.mVertexShadersEnabled = FALSE;
gPipeline.mVertexShadersLoaded = 0;
mVertexShaderLevel[SHADER_LIGHTING] = 0;
@@ -591,10 +590,33 @@ void LLViewerShaderMgr::setShaders()
void LLViewerShaderMgr::unloadShaders()
{
+ gOcclusionProgram.unload();
+ gDebugProgram.unload();
+ gAlphaMaskProgram.unload();
+ gUIProgram.unload();
+ gCustomAlphaProgram.unload();
+ gGlowCombineProgram.unload();
+ gSplatTextureRectProgram.unload();
+ gGlowCombineFXAAProgram.unload();
+ gTwoTextureAddProgram.unload();
+ gOneTextureNoColorProgram.unload();
+ gSolidColorProgram.unload();
+
+ gObjectFullbrightNoColorProgram.unload();
+ gObjectFullbrightNoColorWaterProgram.unload();
gObjectSimpleProgram.unload();
+ gObjectPreviewProgram.unload();
+ gImpostorProgram.unload();
+ gObjectSimpleAlphaMaskProgram.unload();
+ gObjectBumpProgram.unload();
gObjectSimpleWaterProgram.unload();
+ gObjectSimpleWaterAlphaMaskProgram.unload();
gObjectFullbrightProgram.unload();
gObjectFullbrightWaterProgram.unload();
+ gObjectEmissiveProgram.unload();
+ gObjectEmissiveWaterProgram.unload();
+ gObjectFullbrightAlphaMaskProgram.unload();
+ gObjectFullbrightWaterAlphaMaskProgram.unload();
gObjectShinyProgram.unload();
gObjectFullbrightShinyProgram.unload();
@@ -602,9 +624,19 @@ void LLViewerShaderMgr::unloadShaders()
gObjectShinyWaterProgram.unload();
gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedTexGenProgram.unload();
+ gObjectSimpleNonIndexedTexGenWaterProgram.unload();
gObjectSimpleNonIndexedWaterProgram.unload();
+ gObjectAlphaMaskNonIndexedProgram.unload();
+ gObjectAlphaMaskNonIndexedWaterProgram.unload();
+ gObjectAlphaMaskNoColorProgram.unload();
+ gObjectAlphaMaskNoColorWaterProgram.unload();
gObjectFullbrightNonIndexedProgram.unload();
gObjectFullbrightNonIndexedWaterProgram.unload();
+ gObjectEmissiveNonIndexedProgram.unload();
+ gObjectEmissiveNonIndexedWaterProgram.unload();
+ gTreeProgram.unload();
+ gTreeWaterProgram.unload();
gObjectShinyNonIndexedProgram.unload();
gObjectFullbrightShinyNonIndexedProgram.unload();
@@ -613,11 +645,13 @@ void LLViewerShaderMgr::unloadShaders()
gSkinnedObjectSimpleProgram.unload();
gSkinnedObjectFullbrightProgram.unload();
+ gSkinnedObjectEmissiveProgram.unload();
gSkinnedObjectFullbrightShinyProgram.unload();
gSkinnedObjectShinySimpleProgram.unload();
gSkinnedObjectSimpleWaterProgram.unload();
gSkinnedObjectFullbrightWaterProgram.unload();
+ gSkinnedObjectEmissiveWaterProgram.unload();
gSkinnedObjectFullbrightShinyWaterProgram.unload();
gSkinnedObjectShinySimpleWaterProgram.unload();
@@ -641,6 +675,9 @@ void LLViewerShaderMgr::unloadShaders()
gPostNightVisionProgram.unload();
gDeferredDiffuseProgram.unload();
+ gDeferredDiffuseAlphaMaskProgram.unload();
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.unload();
+ gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.unload();
gDeferredNonIndexedDiffuseProgram.unload();
gDeferredSkinnedDiffuseProgram.unload();
gDeferredSkinnedBumpProgram.unload();
@@ -692,8 +729,8 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
// (in order of shader function call depth for reference purposes, deepest level first)
vector< pair<string, S32> > shaders;
- shaders.reserve(10);
shaders.push_back( make_pair( "windlight/atmosphericsVarsV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
+ shaders.push_back( make_pair( "windlight/atmosphericsVarsWaterV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
shaders.push_back( make_pair( "windlight/atmosphericsHelpersV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
shaders.push_back( make_pair( "lighting/lightFuncV.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
shaders.push_back( make_pair( "lighting/sumLightsV.glsl", sum_lights_class ) );
@@ -704,6 +741,8 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
shaders.push_back( make_pair( "windlight/atmosphericsV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
shaders.push_back( make_pair( "avatar/avatarSkinV.glsl", 1 ) );
shaders.push_back( make_pair( "avatar/objectSkinV.glsl", 1 ) );
+ shaders.push_back( make_pair( "objects/indexedTextureV.glsl", 1 ) );
+ shaders.push_back( make_pair( "objects/nonindexedTextureV.glsl", 1 ) );
// We no longer have to bind the shaders to global glhandles, they are automatically added to a map now.
for (U32 i = 0; i < shaders.size(); i++)
@@ -719,8 +758,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
// (in order of shader function call depth for reference purposes, deepest level first)
shaders.clear();
- shaders.reserve(13);
- S32 ch = gGLManager.mNumTextureImageUnits-1;
+ S32 ch = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
if (gGLManager.mGLVersion < 3.1f)
{ //force to 1 texture index channel for old drivers
@@ -729,22 +767,31 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
std::vector<S32> index_channels;
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsVarsF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsVarsWaterF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/gammaF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT]) );
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/transportF.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "environment/waterFogF.glsl", mVertexShaderLevel[SHADER_WATER] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightAlphaMaskNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightNonIndexedAlphaMaskF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightWaterAlphaMaskNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightShinyNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightShinyNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightShinyWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(-1); shaders.push_back( make_pair( "lighting/lightFullbrightShinyWaterNonIndexedF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightAlphaMaskF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightAlphaMaskF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightWaterAlphaMaskF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
+ index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightWaterAlphaMaskF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightShinyF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightFullbrightShinyF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
index_channels.push_back(ch); shaders.push_back( make_pair( "lighting/lightShinyWaterF.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) );
@@ -778,6 +825,8 @@ BOOL LLViewerShaderMgr::loadShadersEnvironment()
gTerrainProgram.mFeatures.calculatesLighting = true;
gTerrainProgram.mFeatures.calculatesAtmospherics = true;
gTerrainProgram.mFeatures.hasAtmospherics = true;
+ gTerrainProgram.mFeatures.mIndexedTextureChannels = 0;
+ gTerrainProgram.mFeatures.disableTextureIndex = true;
gTerrainProgram.mFeatures.hasGamma = true;
gTerrainProgram.mShaderFiles.clear();
gTerrainProgram.mShaderFiles.push_back(make_pair("environment/terrainV.glsl", GL_VERTEX_SHADER_ARB));
@@ -846,6 +895,8 @@ BOOL LLViewerShaderMgr::loadShadersWater()
gTerrainWaterProgram.mFeatures.calculatesAtmospherics = true;
gTerrainWaterProgram.mFeatures.hasAtmospherics = true;
gTerrainWaterProgram.mFeatures.hasWaterFog = true;
+ gTerrainWaterProgram.mFeatures.mIndexedTextureChannels = 0;
+ gTerrainWaterProgram.mFeatures.disableTextureIndex = true;
gTerrainWaterProgram.mShaderFiles.clear();
gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainV.glsl", GL_VERTEX_SHADER_ARB));
gTerrainWaterProgram.mShaderFiles.push_back(make_pair("environment/terrainWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -884,9 +935,6 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
{
BOOL success = TRUE;
- U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
- bool multisample = samples > 1 && LLPipeline::sRenderDeferred && gGLManager.mHasTextureMultisample;
-
if (mVertexShaderLevel[SHADER_EFFECT] == 0)
{
gGlowProgram.unload();
@@ -912,21 +960,10 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
if (success)
{
- std::string fragment;
-
- if (multisample)
- {
- fragment = "effects/glowExtractMSF.glsl";
- }
- else
- {
- fragment = "effects/glowExtractF.glsl";
- }
-
gGlowExtractProgram.mName = "Glow Extract Shader (Post)";
gGlowExtractProgram.mShaderFiles.clear();
gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractV.glsl", GL_VERTEX_SHADER_ARB));
- gGlowExtractProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gGlowExtractProgram.mShaderFiles.push_back(make_pair("effects/glowExtractF.glsl", GL_FRAGMENT_SHADER_ARB));
gGlowExtractProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
success = gGlowExtractProgram.createShader(NULL, &mGlowExtractUniforms);
if (!success)
@@ -935,51 +972,6 @@ BOOL LLViewerShaderMgr::loadShadersEffects()
}
}
-#if 0
- // disabling loading of postprocess shaders until we fix
- // ATI sampler2DRect compatibility.
-
- //load Color Filter Shader
- if (success)
- {
- vector<string> shaderUniforms;
- shaderUniforms.reserve(7);
- shaderUniforms.push_back("RenderTexture");
- shaderUniforms.push_back("gamma");
- shaderUniforms.push_back("brightness");
- shaderUniforms.push_back("contrast");
- shaderUniforms.push_back("contrastBase");
- shaderUniforms.push_back("saturation");
- shaderUniforms.push_back("lumWeights");
-
- gPostColorFilterProgram.mName = "Color Filter Shader (Post)";
- gPostColorFilterProgram.mShaderFiles.clear();
- gPostColorFilterProgram.mShaderFiles.push_back(make_pair("effects/colorFilterF.glsl", GL_FRAGMENT_SHADER_ARB));
- gPostColorFilterProgram.mShaderFiles.push_back(make_pair("effects/drawQuadV.glsl", GL_VERTEX_SHADER_ARB));
- gPostColorFilterProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
- success = gPostColorFilterProgram.createShader(NULL, &shaderUniforms);
- }
-
- //load Night Vision Shader
- if (success)
- {
- vector<string> shaderUniforms;
- shaderUniforms.reserve(5);
- shaderUniforms.push_back("RenderTexture");
- shaderUniforms.push_back("NoiseTexture");
- shaderUniforms.push_back("brightMult");
- shaderUniforms.push_back("noiseStrength");
- shaderUniforms.push_back("lumWeights");
-
- gPostNightVisionProgram.mName = "Night Vision Shader (Post)";
- gPostNightVisionProgram.mShaderFiles.clear();
- gPostNightVisionProgram.mShaderFiles.push_back(make_pair("effects/nightVisionF.glsl", GL_FRAGMENT_SHADER_ARB));
- gPostNightVisionProgram.mShaderFiles.push_back(make_pair("effects/drawQuadV.glsl", GL_VERTEX_SHADER_ARB));
- gPostNightVisionProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT];
- success = gPostNightVisionProgram.createShader(NULL, &shaderUniforms);
- }
- #endif
-
return success;
}
@@ -989,7 +981,11 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (mVertexShaderLevel[SHADER_DEFERRED] == 0)
{
gDeferredTreeProgram.unload();
+ gDeferredTreeShadowProgram.unload();
gDeferredDiffuseProgram.unload();
+ gDeferredDiffuseAlphaMaskProgram.unload();
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.unload();
+ gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.unload();
gDeferredNonIndexedDiffuseProgram.unload();
gDeferredSkinnedDiffuseProgram.unload();
gDeferredSkinnedBumpProgram.unload();
@@ -1005,46 +1001,73 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredBlurLightProgram.unload();
gDeferredSoftenProgram.unload();
gDeferredShadowProgram.unload();
+ gDeferredShadowAlphaMaskProgram.unload();
gDeferredAvatarShadowProgram.unload();
gDeferredAttachmentShadowProgram.unload();
gDeferredAvatarProgram.unload();
gDeferredAvatarAlphaProgram.unload();
gDeferredAlphaProgram.unload();
gDeferredFullbrightProgram.unload();
+ gDeferredEmissiveProgram.unload();
gDeferredAvatarEyesProgram.unload();
- gDeferredPostGIProgram.unload();
- gDeferredEdgeProgram.unload();
gDeferredPostProgram.unload();
- gLuminanceGatherProgram.unload();
- gDeferredGIProgram.unload();
- gDeferredGIFinalProgram.unload();
+ gDeferredCoFProgram.unload();
+ gDeferredDoFCombineProgram.unload();
+ gFXAAProgram.unload();
gDeferredWaterProgram.unload();
gDeferredWLSkyProgram.unload();
gDeferredWLCloudProgram.unload();
gDeferredStarProgram.unload();
+ gNormalMapGenProgram.unload();
return TRUE;
}
- mVertexShaderLevel[SHADER_AVATAR] = 1;
-
BOOL success = TRUE;
- U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
- bool multisample = samples > 1 && gGLManager.mHasTextureMultisample;
-
if (success)
{
gDeferredDiffuseProgram.mName = "Deferred Diffuse Shader";
gDeferredDiffuseProgram.mShaderFiles.clear();
gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseIndexedF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredDiffuseProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits;
+ gDeferredDiffuseProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredDiffuseProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredDiffuseProgram.createShader(NULL, NULL);
}
if (success)
{
+ gDeferredDiffuseAlphaMaskProgram.mName = "Deferred Diffuse Alpha Mask Shader";
+ gDeferredDiffuseAlphaMaskProgram.mShaderFiles.clear();
+ gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskIndexedF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredDiffuseAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
+ gDeferredDiffuseAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredDiffuseAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.mName = "Deferred Diffuse Non-Indexed Alpha Mask Shader";
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.clear();
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredNonIndexedDiffuseAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mName = "Deferred Diffuse Non-Indexed Alpha Mask Shader";
+ gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.clear();
+ gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseNoColorV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("deferred/diffuseAlphaMaskNoColorF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gDeferredNonIndexedDiffuseProgram.mName = "Non Indexed Deferred Diffuse Shader";
gDeferredNonIndexedDiffuseProgram.mShaderFiles.clear();
gDeferredNonIndexedDiffuseProgram.mShaderFiles.push_back(make_pair("deferred/diffuseV.glsl", GL_VERTEX_SHADER_ARB));
@@ -1115,6 +1138,16 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ gDeferredTreeShadowProgram.mName = "Deferred Tree Shadow Shader";
+ gDeferredTreeShadowProgram.mShaderFiles.clear();
+ gDeferredTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredTreeShadowProgram.mShaderFiles.push_back(make_pair("deferred/treeShadowF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredTreeShadowProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredTreeShadowProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gDeferredImpostorProgram.mName = "Deferred Impostor Shader";
gDeferredImpostorProgram.mShaderFiles.clear();
gDeferredImpostorProgram.mShaderFiles.push_back(make_pair("deferred/impostorV.glsl", GL_VERTEX_SHADER_ARB));
@@ -1124,84 +1157,41 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
}
if (success)
- {
- std::string fragment;
-
- if (multisample)
- {
- fragment = "deferred/pointLightMSF.glsl";
- }
- else
- {
- fragment = "deferred/pointLightF.glsl";
- }
-
+ {
gDeferredLightProgram.mName = "Deferred Light Shader";
gDeferredLightProgram.mShaderFiles.clear();
gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredLightProgram.createShader(NULL, NULL);
}
if (success)
{
- std::string fragment;
- if (multisample)
- {
- fragment = "deferred/multiPointLightMSF.glsl";
- }
- else
- {
- fragment = "deferred/multiPointLightF.glsl";
- }
-
gDeferredMultiLightProgram.mName = "Deferred MultiLight Shader";
gDeferredMultiLightProgram.mShaderFiles.clear();
gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredMultiLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredMultiLightProgram.createShader(NULL, NULL);
}
if (success)
{
- std::string fragment;
-
- if (multisample)
- {
- fragment = "deferred/spotLightMSF.glsl";
- }
- else
- {
- fragment = "deferred/multiSpotLightF.glsl";
- }
-
gDeferredSpotLightProgram.mName = "Deferred SpotLight Shader";
gDeferredSpotLightProgram.mShaderFiles.clear();
gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiSpotLightF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSpotLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredSpotLightProgram.createShader(NULL, NULL);
}
if (success)
{
- std::string fragment;
-
- if (multisample)
- {
- fragment = "deferred/multiSpotLightMSF.glsl";
- }
- else
- {
- fragment = "deferred/multiSpotLightF.glsl";
- }
-
gDeferredMultiSpotLightProgram.mName = "Deferred MultiSpotLight Shader";
gDeferredMultiSpotLightProgram.mShaderFiles.clear();
gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredMultiSpotLightProgram.mShaderFiles.push_back(make_pair("deferred/multiSpotLightF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredMultiSpotLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredMultiSpotLightProgram.createShader(NULL, NULL);
}
@@ -1212,25 +1202,11 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
{
- if (multisample)
- {
- fragment = "deferred/sunLightSSAOMSF.glsl";
- }
- else
- {
- fragment = "deferred/sunLightSSAOF.glsl";
- }
+ fragment = "deferred/sunLightSSAOF.glsl";
}
else
{
- if (multisample)
- {
- fragment = "deferred/sunLightMSF.glsl";
- }
- else
- {
- fragment = "deferred/sunLightF.glsl";
- }
+ fragment = "deferred/sunLightF.glsl";
}
gDeferredSunProgram.mName = "Deferred Sun Shader";
@@ -1243,21 +1219,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
- std::string fragment;
-
- if (multisample)
- {
- fragment = "deferred/blurLightMSF.glsl";
- }
- else
- {
- fragment = "deferred/blurLightF.glsl";
- }
-
gDeferredBlurLightProgram.mName = "Deferred Blur Light Shader";
gDeferredBlurLightProgram.mShaderFiles.clear();
gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredBlurLightProgram.mShaderFiles.push_back(make_pair("deferred/blurLightF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredBlurLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredBlurLightProgram.createShader(NULL, NULL);
}
@@ -1273,11 +1238,11 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAlphaProgram.mFeatures.disableTextureIndex = true; //hack to disable auto-setup of texture channels
if (mVertexShaderLevel[SHADER_DEFERRED] < 1)
{
- gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits;
+ gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
}
else
{ //shave off some texture units for shadow maps
- gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits - 6;
+ gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels - 6, 1);
}
gDeferredAlphaProgram.mShaderFiles.clear();
@@ -1307,7 +1272,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightProgram.mFeatures.calculatesAtmospherics = true;
gDeferredFullbrightProgram.mFeatures.hasGamma = true;
gDeferredFullbrightProgram.mFeatures.hasTransport = true;
- gDeferredFullbrightProgram.mFeatures.mIndexedTextureChannels = gGLManager.mNumTextureImageUnits;
+ gDeferredFullbrightProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredFullbrightProgram.mShaderFiles.clear();
gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredFullbrightProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
@@ -1317,6 +1282,20 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ gDeferredEmissiveProgram.mName = "Deferred Emissive Shader";
+ gDeferredEmissiveProgram.mFeatures.calculatesAtmospherics = true;
+ gDeferredEmissiveProgram.mFeatures.hasGamma = true;
+ gDeferredEmissiveProgram.mFeatures.hasTransport = true;
+ gDeferredEmissiveProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
+ gDeferredEmissiveProgram.mShaderFiles.clear();
+ gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredEmissiveProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredEmissiveProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
// load water shader
gDeferredWaterProgram.mName = "Deferred Water Shader";
gDeferredWaterProgram.mFeatures.calculatesAtmospherics = true;
@@ -1331,21 +1310,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
- std::string fragment;
-
- if (multisample)
- {
- fragment = "deferred/softenLightMSF.glsl";
- }
- else
- {
- fragment = "deferred/softenLightF.glsl";
- }
-
gDeferredSoftenProgram.mName = "Deferred Soften Shader";
gDeferredSoftenProgram.mShaderFiles.clear();
gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredSoftenProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredSoftenProgram.mShaderFiles.push_back(make_pair("deferred/softenLightF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSoftenProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
@@ -1369,13 +1337,23 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
+ gDeferredShadowAlphaMaskProgram.mName = "Deferred Shadow Alpha Mask Shader";
+ gDeferredShadowAlphaMaskProgram.mShaderFiles.clear();
+ gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredShadowAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredShadowAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gDeferredAvatarShadowProgram.mName = "Deferred Avatar Shadow Shader";
gDeferredAvatarShadowProgram.mFeatures.hasSkinning = true;
gDeferredAvatarShadowProgram.mShaderFiles.clear();
gDeferredAvatarShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarShadowV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAvatarShadowProgram.mShaderFiles.push_back(make_pair("deferred/avatarShadowF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarShadowProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredAvatarShadowProgram.createShader(&mAvatarAttribs, &mAvatarUniforms);
+ success = gDeferredAvatarShadowProgram.createShader(NULL, &mAvatarUniforms);
}
if (success)
@@ -1407,7 +1385,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredAvatarProgram.createShader(&mAvatarAttribs, &mAvatarUniforms);
+ success = gDeferredAvatarProgram.createShader(NULL, &mAvatarUniforms);
}
if (success)
@@ -1422,47 +1400,57 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.mFeatures.disableTextureIndex = true;
gDeferredAvatarAlphaProgram.mShaderFiles.clear();
gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedNoColorF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredAvatarAlphaProgram.createShader(&mAvatarAttribs, &mAvatarUniforms);
+ success = gDeferredAvatarAlphaProgram.createShader(NULL, &mAvatarUniforms);
}
if (success)
{
- std::string fragment;
- if (multisample)
- {
- fragment = "deferred/postDeferredMSF.glsl";
- }
- else
- {
- fragment = "deferred/postDeferredF.glsl";
- }
+ gFXAAProgram.mName = "FXAA Shader";
+ gFXAAProgram.mShaderFiles.clear();
+ gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
+ gFXAAProgram.mShaderFiles.push_back(make_pair("deferred/fxaaF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gFXAAProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gFXAAProgram.createShader(NULL, NULL);
+ }
+ if (success)
+ {
gDeferredPostProgram.mName = "Deferred Post Shader";
gDeferredPostProgram.mShaderFiles.clear();
gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredPostProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredPostProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredPostProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredPostProgram.createShader(NULL, NULL);
}
if (success)
{
- std::string fragment;
- if (multisample)
- {
- fragment = "deferred/postDeferredNoDoFMSF.glsl";
- }
- else
- {
- fragment = "deferred/postDeferredNoDoFF.glsl";
- }
+ gDeferredCoFProgram.mName = "Deferred CoF Shader";
+ gDeferredCoFProgram.mShaderFiles.clear();
+ gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/cofF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredCoFProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredCoFProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gDeferredDoFCombineProgram.mName = "Deferred DoFCombine Shader";
+ gDeferredDoFCombineProgram.mShaderFiles.clear();
+ gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/dofCombineF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredDoFCombineProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredDoFCombineProgram.createShader(NULL, NULL);
+ }
+ if (success)
+ {
gDeferredPostNoDoFProgram.mName = "Deferred Post Shader";
gDeferredPostNoDoFProgram.mShaderFiles.clear();
gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
+ gDeferredPostNoDoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoDoFF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredPostNoDoFProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredPostNoDoFProgram.createShader(NULL, NULL);
}
@@ -1501,70 +1489,15 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredStarProgram.createShader(NULL, &mWLUniforms);
}
- if (mVertexShaderLevel[SHADER_DEFERRED] > 1)
- {
- if (success)
- {
- std::string fragment;
- if (multisample)
- {
- fragment = "deferred/edgeMSF.glsl";
- }
- else
- {
- fragment = "deferred/edgeF.glsl";
- }
-
- gDeferredEdgeProgram.mName = "Deferred Edge Shader";
- gDeferredEdgeProgram.mShaderFiles.clear();
- gDeferredEdgeProgram.mShaderFiles.push_back(make_pair("deferred/edgeV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredEdgeProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB));
- gDeferredEdgeProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredEdgeProgram.createShader(NULL, NULL);
- }
- }
-
- if (mVertexShaderLevel[SHADER_DEFERRED] > 2)
+ if (success)
{
- if (success)
- {
- gDeferredPostGIProgram.mName = "Deferred Post GI Shader";
- gDeferredPostGIProgram.mShaderFiles.clear();
- gDeferredPostGIProgram.mShaderFiles.push_back(make_pair("deferred/postgiV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredPostGIProgram.mShaderFiles.push_back(make_pair("deferred/postgiF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredPostGIProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredPostGIProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gDeferredGIProgram.mName = "Deferred GI Shader";
- gDeferredGIProgram.mShaderFiles.clear();
- gDeferredGIProgram.mShaderFiles.push_back(make_pair("deferred/giV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredGIProgram.mShaderFiles.push_back(make_pair("deferred/giF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredGIProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredGIProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gDeferredGIFinalProgram.mName = "Deferred GI Final Shader";
- gDeferredGIFinalProgram.mShaderFiles.clear();
- gDeferredGIFinalProgram.mShaderFiles.push_back(make_pair("deferred/giFinalV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredGIFinalProgram.mShaderFiles.push_back(make_pair("deferred/giFinalF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredGIFinalProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredGIFinalProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gLuminanceGatherProgram.mName = "Luminance Gather Shader";
- gLuminanceGatherProgram.mShaderFiles.clear();
- gLuminanceGatherProgram.mShaderFiles.push_back(make_pair("deferred/luminanceV.glsl", GL_VERTEX_SHADER_ARB));
- gLuminanceGatherProgram.mShaderFiles.push_back(make_pair("deferred/luminanceF.glsl", GL_FRAGMENT_SHADER_ARB));
- gLuminanceGatherProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gLuminanceGatherProgram.createShader(NULL, NULL);
- }
+ gNormalMapGenProgram.mName = "Normal Map Generation Program";
+ gNormalMapGenProgram.mShaderFiles.clear();
+ gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenV.glsl", GL_VERTEX_SHADER_ARB));
+ gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gNormalMapGenProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ gNormalMapGenProgram.mShaderGroup = LLGLSLShader::SG_SKY;
+ success = gNormalMapGenProgram.createShader(NULL, NULL);
}
return success;
@@ -1580,26 +1513,48 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyProgram.unload();
gObjectFullbrightShinyWaterProgram.unload();
gObjectShinyWaterProgram.unload();
+ gObjectFullbrightNoColorProgram.unload();
+ gObjectFullbrightNoColorWaterProgram.unload();
gObjectSimpleProgram.unload();
+ gObjectPreviewProgram.unload();
+ gImpostorProgram.unload();
+ gObjectSimpleAlphaMaskProgram.unload();
+ gObjectBumpProgram.unload();
gObjectSimpleWaterProgram.unload();
+ gObjectSimpleWaterAlphaMaskProgram.unload();
+ gObjectEmissiveProgram.unload();
+ gObjectEmissiveWaterProgram.unload();
gObjectFullbrightProgram.unload();
+ gObjectFullbrightAlphaMaskProgram.unload();
gObjectFullbrightWaterProgram.unload();
+ gObjectFullbrightWaterAlphaMaskProgram.unload();
gObjectShinyNonIndexedProgram.unload();
gObjectFullbrightShinyNonIndexedProgram.unload();
gObjectFullbrightShinyNonIndexedWaterProgram.unload();
gObjectShinyNonIndexedWaterProgram.unload();
- gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedTexGenProgram.unload();
+ gObjectSimpleNonIndexedTexGenWaterProgram.unload();
gObjectSimpleNonIndexedWaterProgram.unload();
+ gObjectAlphaMaskNonIndexedProgram.unload();
+ gObjectAlphaMaskNonIndexedWaterProgram.unload();
+ gObjectAlphaMaskNoColorProgram.unload();
+ gObjectAlphaMaskNoColorWaterProgram.unload();
gObjectFullbrightNonIndexedProgram.unload();
gObjectFullbrightNonIndexedWaterProgram.unload();
+ gObjectEmissiveNonIndexedProgram.unload();
+ gObjectEmissiveNonIndexedWaterProgram.unload();
gSkinnedObjectSimpleProgram.unload();
gSkinnedObjectFullbrightProgram.unload();
+ gSkinnedObjectEmissiveProgram.unload();
gSkinnedObjectFullbrightShinyProgram.unload();
gSkinnedObjectShinySimpleProgram.unload();
gSkinnedObjectSimpleWaterProgram.unload();
gSkinnedObjectFullbrightWaterProgram.unload();
+ gSkinnedObjectEmissiveWaterProgram.unload();
gSkinnedObjectFullbrightShinyWaterProgram.unload();
gSkinnedObjectShinySimpleWaterProgram.unload();
+ gTreeProgram.unload();
+ gTreeWaterProgram.unload();
return TRUE;
}
@@ -1622,6 +1577,23 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gObjectSimpleNonIndexedTexGenProgram.mName = "Non indexed tex-gen Shader";
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasGamma = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectSimpleNonIndexedTexGenProgram.createShader(NULL, NULL);
+ }
+
+
+ if (success)
+ {
gObjectSimpleNonIndexedWaterProgram.mName = "Non indexed Water Shader";
gObjectSimpleNonIndexedWaterProgram.mFeatures.calculatesLighting = true;
gObjectSimpleNonIndexedWaterProgram.mFeatures.calculatesAtmospherics = true;
@@ -1639,6 +1611,128 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gObjectSimpleNonIndexedTexGenWaterProgram.mName = "Non indexed tex-gen Water Shader";
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectSimpleNonIndexedTexGenWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectAlphaMaskNonIndexedProgram.mName = "Non indexed alpha mask Shader";
+ gObjectAlphaMaskNonIndexedProgram.mFeatures.calculatesLighting = true;
+ gObjectAlphaMaskNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectAlphaMaskNonIndexedProgram.mFeatures.hasGamma = true;
+ gObjectAlphaMaskNonIndexedProgram.mFeatures.hasAtmospherics = true;
+ gObjectAlphaMaskNonIndexedProgram.mFeatures.hasLighting = true;
+ gObjectAlphaMaskNonIndexedProgram.mFeatures.disableTextureIndex = true;
+ gObjectAlphaMaskNonIndexedProgram.mFeatures.hasAlphaMask = true;
+ gObjectAlphaMaskNonIndexedProgram.mShaderFiles.clear();
+ gObjectAlphaMaskNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleNonIndexedV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectAlphaMaskNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectAlphaMaskNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectAlphaMaskNonIndexedProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectAlphaMaskNonIndexedWaterProgram.mName = "Non indexed alpha mask Water Shader";
+ gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.calculatesLighting = true;
+ gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.hasLighting = true;
+ gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectAlphaMaskNonIndexedWaterProgram.mFeatures.hasAlphaMask = true;
+ gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.clear();
+ gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleNonIndexedV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectAlphaMaskNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectAlphaMaskNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectAlphaMaskNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectAlphaMaskNonIndexedWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectAlphaMaskNoColorProgram.mName = "No color alpha mask Shader";
+ gObjectAlphaMaskNoColorProgram.mFeatures.calculatesLighting = true;
+ gObjectAlphaMaskNoColorProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectAlphaMaskNoColorProgram.mFeatures.hasGamma = true;
+ gObjectAlphaMaskNoColorProgram.mFeatures.hasAtmospherics = true;
+ gObjectAlphaMaskNoColorProgram.mFeatures.hasLighting = true;
+ gObjectAlphaMaskNoColorProgram.mFeatures.disableTextureIndex = true;
+ gObjectAlphaMaskNoColorProgram.mFeatures.hasAlphaMask = true;
+ gObjectAlphaMaskNoColorProgram.mShaderFiles.clear();
+ gObjectAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("objects/simpleNoColorV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectAlphaMaskNoColorProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectAlphaMaskNoColorProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectAlphaMaskNoColorProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectAlphaMaskNoColorWaterProgram.mName = "No color alpha mask Water Shader";
+ gObjectAlphaMaskNoColorWaterProgram.mFeatures.calculatesLighting = true;
+ gObjectAlphaMaskNoColorWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectAlphaMaskNoColorWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectAlphaMaskNoColorWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectAlphaMaskNoColorWaterProgram.mFeatures.hasLighting = true;
+ gObjectAlphaMaskNoColorWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectAlphaMaskNoColorWaterProgram.mFeatures.hasAlphaMask = true;
+ gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.clear();
+ gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleNoColorV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectAlphaMaskNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectAlphaMaskNoColorWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectAlphaMaskNoColorWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectAlphaMaskNoColorWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gTreeProgram.mName = "Tree Shader";
+ gTreeProgram.mFeatures.calculatesLighting = true;
+ gTreeProgram.mFeatures.calculatesAtmospherics = true;
+ gTreeProgram.mFeatures.hasGamma = true;
+ gTreeProgram.mFeatures.hasAtmospherics = true;
+ gTreeProgram.mFeatures.hasLighting = true;
+ gTreeProgram.mFeatures.disableTextureIndex = true;
+ gTreeProgram.mFeatures.hasAlphaMask = true;
+ gTreeProgram.mShaderFiles.clear();
+ gTreeProgram.mShaderFiles.push_back(make_pair("objects/treeV.glsl", GL_VERTEX_SHADER_ARB));
+ gTreeProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gTreeProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gTreeProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gTreeWaterProgram.mName = "Tree Water Shader";
+ gTreeWaterProgram.mFeatures.calculatesLighting = true;
+ gTreeWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gTreeWaterProgram.mFeatures.hasWaterFog = true;
+ gTreeWaterProgram.mFeatures.hasAtmospherics = true;
+ gTreeWaterProgram.mFeatures.hasLighting = true;
+ gTreeWaterProgram.mFeatures.disableTextureIndex = true;
+ gTreeWaterProgram.mFeatures.hasAlphaMask = true;
+ gTreeWaterProgram.mShaderFiles.clear();
+ gTreeWaterProgram.mShaderFiles.push_back(make_pair("objects/treeV.glsl", GL_VERTEX_SHADER_ARB));
+ gTreeWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gTreeWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gTreeWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gTreeWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gObjectFullbrightNonIndexedProgram.mName = "Non Indexed Fullbright Shader";
gObjectFullbrightNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
gObjectFullbrightNonIndexedProgram.mFeatures.hasGamma = true;
@@ -1670,6 +1764,68 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gObjectEmissiveNonIndexedProgram.mName = "Non Indexed Emissive Shader";
+ gObjectEmissiveNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectEmissiveNonIndexedProgram.mFeatures.hasGamma = true;
+ gObjectEmissiveNonIndexedProgram.mFeatures.hasTransport = true;
+ gObjectEmissiveNonIndexedProgram.mFeatures.isFullbright = true;
+ gObjectEmissiveNonIndexedProgram.mFeatures.disableTextureIndex = true;
+ gObjectEmissiveNonIndexedProgram.mShaderFiles.clear();
+ gObjectEmissiveNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectEmissiveNonIndexedProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectEmissiveNonIndexedProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectEmissiveNonIndexedProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectEmissiveNonIndexedWaterProgram.mName = "Non Indexed Emissive Water Shader";
+ gObjectEmissiveNonIndexedWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectEmissiveNonIndexedWaterProgram.mFeatures.isFullbright = true;
+ gObjectEmissiveNonIndexedWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectEmissiveNonIndexedWaterProgram.mFeatures.hasTransport = true;
+ gObjectEmissiveNonIndexedWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectEmissiveNonIndexedWaterProgram.mShaderFiles.clear();
+ gObjectEmissiveNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectEmissiveNonIndexedWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectEmissiveNonIndexedWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectEmissiveNonIndexedWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectEmissiveNonIndexedWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightNoColorProgram.mName = "Non Indexed no color Fullbright Shader";
+ gObjectFullbrightNoColorProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightNoColorProgram.mFeatures.hasGamma = true;
+ gObjectFullbrightNoColorProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightNoColorProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightNoColorProgram.mFeatures.disableTextureIndex = true;
+ gObjectFullbrightNoColorProgram.mShaderFiles.clear();
+ gObjectFullbrightNoColorProgram.mShaderFiles.push_back(make_pair("objects/fullbrightNoColorV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightNoColorProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightNoColorProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectFullbrightNoColorProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightNoColorWaterProgram.mName = "Non Indexed no color Fullbright Water Shader";
+ gObjectFullbrightNoColorWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightNoColorWaterProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightNoColorWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectFullbrightNoColorWaterProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightNoColorWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectFullbrightNoColorWaterProgram.mShaderFiles.clear();
+ gObjectFullbrightNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightNoColorV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightNoColorWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightNoColorWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectFullbrightNoColorWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectFullbrightNoColorWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gObjectShinyNonIndexedProgram.mName = "Non Indexed Shiny Shader";
gObjectShinyNonIndexedProgram.mFeatures.calculatesAtmospherics = true;
gObjectShinyNonIndexedProgram.mFeatures.calculatesLighting = true;
@@ -1737,6 +1893,34 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gImpostorProgram.mName = "Impostor Shader";
+ gImpostorProgram.mFeatures.disableTextureIndex = true;
+ gImpostorProgram.mShaderFiles.clear();
+ gImpostorProgram.mShaderFiles.push_back(make_pair("objects/impostorV.glsl", GL_VERTEX_SHADER_ARB));
+ gImpostorProgram.mShaderFiles.push_back(make_pair("objects/impostorF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gImpostorProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gImpostorProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectPreviewProgram.mName = "Simple Shader";
+ gObjectPreviewProgram.mFeatures.calculatesLighting = true;
+ gObjectPreviewProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectPreviewProgram.mFeatures.hasGamma = true;
+ gObjectPreviewProgram.mFeatures.hasAtmospherics = true;
+ gObjectPreviewProgram.mFeatures.hasLighting = true;
+ gObjectPreviewProgram.mFeatures.mIndexedTextureChannels = 0;
+ gObjectPreviewProgram.mFeatures.disableTextureIndex = true;
+ gObjectPreviewProgram.mShaderFiles.clear();
+ gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectPreviewProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectPreviewProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gObjectSimpleProgram.mName = "Simple Shader";
gObjectSimpleProgram.mFeatures.calculatesLighting = true;
gObjectSimpleProgram.mFeatures.calculatesAtmospherics = true;
@@ -1750,7 +1934,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectSimpleProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
success = gObjectSimpleProgram.createShader(NULL, NULL);
}
-
+
if (success)
{
gObjectSimpleWaterProgram.mName = "Simple Water Shader";
@@ -1770,6 +1954,66 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gObjectBumpProgram.mName = "Bump Shader";
+ /*gObjectBumpProgram.mFeatures.calculatesLighting = true;
+ gObjectBumpProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectBumpProgram.mFeatures.hasGamma = true;
+ gObjectBumpProgram.mFeatures.hasAtmospherics = true;
+ gObjectBumpProgram.mFeatures.hasLighting = true;
+ gObjectBumpProgram.mFeatures.mIndexedTextureChannels = 0;*/
+ gObjectBumpProgram.mShaderFiles.clear();
+ gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectBumpProgram.mShaderFiles.push_back(make_pair("objects/bumpF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectBumpProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectBumpProgram.createShader(NULL, NULL);
+
+ if (success)
+ { //lldrawpoolbump assumes "texture0" has channel 0 and "texture1" has channel 1
+ gObjectBumpProgram.bind();
+ gObjectBumpProgram.uniform1i("texture0", 0);
+ gObjectBumpProgram.uniform1i("texture1", 1);
+ gObjectBumpProgram.unbind();
+ }
+ }
+
+
+ if (success)
+ {
+ gObjectSimpleAlphaMaskProgram.mName = "Simple Alpha Mask Shader";
+ gObjectSimpleAlphaMaskProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleAlphaMaskProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleAlphaMaskProgram.mFeatures.hasGamma = true;
+ gObjectSimpleAlphaMaskProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleAlphaMaskProgram.mFeatures.hasLighting = true;
+ gObjectSimpleAlphaMaskProgram.mFeatures.hasAlphaMask = true;
+ gObjectSimpleAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0;
+ gObjectSimpleAlphaMaskProgram.mShaderFiles.clear();
+ gObjectSimpleAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectSimpleAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectSimpleWaterAlphaMaskProgram.mName = "Simple Water Alpha Mask Shader";
+ gObjectSimpleWaterAlphaMaskProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleWaterAlphaMaskProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleWaterAlphaMaskProgram.mFeatures.hasWaterFog = true;
+ gObjectSimpleWaterAlphaMaskProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleWaterAlphaMaskProgram.mFeatures.hasLighting = true;
+ gObjectSimpleWaterAlphaMaskProgram.mFeatures.hasAlphaMask = true;
+ gObjectSimpleWaterAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0;
+ gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.clear();
+ gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleWaterAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectSimpleWaterAlphaMaskProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectSimpleWaterAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gObjectFullbrightProgram.mName = "Fullbright Shader";
gObjectFullbrightProgram.mFeatures.calculatesAtmospherics = true;
gObjectFullbrightProgram.mFeatures.hasGamma = true;
@@ -1801,6 +2045,70 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gObjectEmissiveProgram.mName = "Emissive Shader";
+ gObjectEmissiveProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectEmissiveProgram.mFeatures.hasGamma = true;
+ gObjectEmissiveProgram.mFeatures.hasTransport = true;
+ gObjectEmissiveProgram.mFeatures.isFullbright = true;
+ gObjectEmissiveProgram.mFeatures.mIndexedTextureChannels = 0;
+ gObjectEmissiveProgram.mShaderFiles.clear();
+ gObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectEmissiveProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectEmissiveProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectEmissiveWaterProgram.mName = "Emissive Water Shader";
+ gObjectEmissiveWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectEmissiveWaterProgram.mFeatures.isFullbright = true;
+ gObjectEmissiveWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectEmissiveWaterProgram.mFeatures.hasTransport = true;
+ gObjectEmissiveWaterProgram.mFeatures.mIndexedTextureChannels = 0;
+ gObjectEmissiveWaterProgram.mShaderFiles.clear();
+ gObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/emissiveV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectEmissiveWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectEmissiveWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectEmissiveWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightAlphaMaskProgram.mName = "Fullbright Alpha Mask Shader";
+ gObjectFullbrightAlphaMaskProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightAlphaMaskProgram.mFeatures.hasGamma = true;
+ gObjectFullbrightAlphaMaskProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightAlphaMaskProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightAlphaMaskProgram.mFeatures.hasAlphaMask = true;
+ gObjectFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0;
+ gObjectFullbrightAlphaMaskProgram.mShaderFiles.clear();
+ gObjectFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectFullbrightAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gObjectFullbrightWaterAlphaMaskProgram.mName = "Fullbright Water Shader";
+ gObjectFullbrightWaterAlphaMaskProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectFullbrightWaterAlphaMaskProgram.mFeatures.isFullbright = true;
+ gObjectFullbrightWaterAlphaMaskProgram.mFeatures.hasWaterFog = true;
+ gObjectFullbrightWaterAlphaMaskProgram.mFeatures.hasTransport = true;
+ gObjectFullbrightWaterAlphaMaskProgram.mFeatures.hasAlphaMask = true;
+ gObjectFullbrightWaterAlphaMaskProgram.mFeatures.mIndexedTextureChannels = 0;
+ gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.clear();
+ gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectFullbrightWaterAlphaMaskProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectFullbrightWaterAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectFullbrightWaterAlphaMaskProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectFullbrightWaterAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gObjectShinyProgram.mName = "Shiny Shader";
gObjectShinyProgram.mFeatures.calculatesAtmospherics = true;
gObjectShinyProgram.mFeatures.calculatesLighting = true;
@@ -1903,6 +2211,39 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gSkinnedObjectEmissiveProgram.mName = "Skinned Emissive Shader";
+ gSkinnedObjectEmissiveProgram.mFeatures.calculatesAtmospherics = true;
+ gSkinnedObjectEmissiveProgram.mFeatures.hasGamma = true;
+ gSkinnedObjectEmissiveProgram.mFeatures.hasTransport = true;
+ gSkinnedObjectEmissiveProgram.mFeatures.isFullbright = true;
+ gSkinnedObjectEmissiveProgram.mFeatures.hasObjectSkinning = true;
+ gSkinnedObjectEmissiveProgram.mFeatures.disableTextureIndex = true;
+ gSkinnedObjectEmissiveProgram.mShaderFiles.clear();
+ gSkinnedObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/emissiveSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
+ gSkinnedObjectEmissiveProgram.mShaderFiles.push_back(make_pair("objects/fullbrightF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gSkinnedObjectEmissiveProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gSkinnedObjectEmissiveProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gSkinnedObjectEmissiveWaterProgram.mName = "Skinned Emissive Water Shader";
+ gSkinnedObjectEmissiveWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gSkinnedObjectEmissiveWaterProgram.mFeatures.hasGamma = true;
+ gSkinnedObjectEmissiveWaterProgram.mFeatures.hasTransport = true;
+ gSkinnedObjectEmissiveWaterProgram.mFeatures.isFullbright = true;
+ gSkinnedObjectEmissiveWaterProgram.mFeatures.hasObjectSkinning = true;
+ gSkinnedObjectEmissiveWaterProgram.mFeatures.disableTextureIndex = true;
+ gSkinnedObjectEmissiveWaterProgram.mFeatures.hasWaterFog = true;
+ gSkinnedObjectEmissiveWaterProgram.mShaderFiles.clear();
+ gSkinnedObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/emissiveSkinnedV.glsl", GL_VERTEX_SHADER_ARB));
+ gSkinnedObjectEmissiveWaterProgram.mShaderFiles.push_back(make_pair("objects/fullbrightWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gSkinnedObjectEmissiveWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gSkinnedObjectEmissiveWaterProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
gSkinnedObjectFullbrightShinyProgram.mName = "Skinned Fullbright Shiny Shader";
gSkinnedObjectFullbrightShinyProgram.mFeatures.calculatesAtmospherics = true;
gSkinnedObjectFullbrightShinyProgram.mFeatures.hasGamma = true;
@@ -2043,12 +2384,13 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarProgram.mFeatures.hasGamma = true;
gAvatarProgram.mFeatures.hasAtmospherics = true;
gAvatarProgram.mFeatures.hasLighting = true;
+ gAvatarProgram.mFeatures.hasAlphaMask = true;
gAvatarProgram.mFeatures.disableTextureIndex = true;
gAvatarProgram.mShaderFiles.clear();
gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarProgram.mShaderFiles.push_back(make_pair("avatar/avatarF.glsl", GL_FRAGMENT_SHADER_ARB));
gAvatarProgram.mShaderLevel = mVertexShaderLevel[SHADER_AVATAR];
- success = gAvatarProgram.createShader(&mAvatarAttribs, &mAvatarUniforms);
+ success = gAvatarProgram.createShader(NULL, &mAvatarUniforms);
if (success)
{
@@ -2059,6 +2401,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarWaterProgram.mFeatures.hasWaterFog = true;
gAvatarWaterProgram.mFeatures.hasAtmospherics = true;
gAvatarWaterProgram.mFeatures.hasLighting = true;
+ gAvatarWaterProgram.mFeatures.hasAlphaMask = true;
gAvatarWaterProgram.mFeatures.disableTextureIndex = true;
gAvatarWaterProgram.mShaderFiles.clear();
gAvatarWaterProgram.mShaderFiles.push_back(make_pair("avatar/avatarV.glsl", GL_VERTEX_SHADER_ARB));
@@ -2066,7 +2409,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
// Note: no cloth under water:
gAvatarWaterProgram.mShaderLevel = llmin(mVertexShaderLevel[SHADER_AVATAR], 1);
gAvatarWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
- success = gAvatarWaterProgram.createShader(&mAvatarAttribs, &mAvatarUniforms);
+ success = gAvatarWaterProgram.createShader(NULL, &mAvatarUniforms);
}
/// Keep track of avatar levels
@@ -2085,7 +2428,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarV.glsl", GL_VERTEX_SHADER_ARB));
gAvatarPickProgram.mShaderFiles.push_back(make_pair("avatar/pickAvatarF.glsl", GL_FRAGMENT_SHADER_ARB));
gAvatarPickProgram.mShaderLevel = mVertexShaderLevel[SHADER_AVATAR];
- success = gAvatarPickProgram.createShader(&mAvatarAttribs, &mAvatarUniforms);
+ success = gAvatarPickProgram.createShader(NULL, &mAvatarUniforms);
}
if (success)
@@ -2097,6 +2440,7 @@ BOOL LLViewerShaderMgr::loadShadersAvatar()
gAvatarEyeballProgram.mFeatures.hasGamma = true;
gAvatarEyeballProgram.mFeatures.hasAtmospherics = true;
gAvatarEyeballProgram.mFeatures.hasLighting = true;
+ gAvatarEyeballProgram.mFeatures.hasAlphaMask = true;
gAvatarEyeballProgram.mFeatures.disableTextureIndex = true;
gAvatarEyeballProgram.mShaderFiles.clear();
gAvatarEyeballProgram.mShaderFiles.push_back(make_pair("avatar/eyeballV.glsl", GL_VERTEX_SHADER_ARB));
@@ -2135,6 +2479,154 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
success = gHighlightProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gUIProgram.mName = "UI Shader";
+ gUIProgram.mShaderFiles.clear();
+ gUIProgram.mShaderFiles.push_back(make_pair("interface/uiV.glsl", GL_VERTEX_SHADER_ARB));
+ gUIProgram.mShaderFiles.push_back(make_pair("interface/uiF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gUIProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gUIProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gCustomAlphaProgram.mName = "Custom Alpha Shader";
+ gCustomAlphaProgram.mShaderFiles.clear();
+ gCustomAlphaProgram.mShaderFiles.push_back(make_pair("interface/customalphaV.glsl", GL_VERTEX_SHADER_ARB));
+ gCustomAlphaProgram.mShaderFiles.push_back(make_pair("interface/customalphaF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gCustomAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gCustomAlphaProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gSplatTextureRectProgram.mName = "Splat Texture Rect Shader";
+ gSplatTextureRectProgram.mShaderFiles.clear();
+ gSplatTextureRectProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectV.glsl", GL_VERTEX_SHADER_ARB));
+ gSplatTextureRectProgram.mShaderFiles.push_back(make_pair("interface/splattexturerectF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gSplatTextureRectProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gSplatTextureRectProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gSplatTextureRectProgram.bind();
+ gSplatTextureRectProgram.uniform1i("screenMap", 0);
+ gSplatTextureRectProgram.unbind();
+ }
+ }
+
+ if (success)
+ {
+ gGlowCombineProgram.mName = "Glow Combine Shader";
+ gGlowCombineProgram.mShaderFiles.clear();
+ gGlowCombineProgram.mShaderFiles.push_back(make_pair("interface/glowcombineV.glsl", GL_VERTEX_SHADER_ARB));
+ gGlowCombineProgram.mShaderFiles.push_back(make_pair("interface/glowcombineF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gGlowCombineProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gGlowCombineProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gGlowCombineProgram.bind();
+ gGlowCombineProgram.uniform1i("glowMap", 0);
+ gGlowCombineProgram.uniform1i("screenMap", 1);
+ gGlowCombineProgram.unbind();
+ }
+ }
+
+ if (success)
+ {
+ gGlowCombineFXAAProgram.mName = "Glow CombineFXAA Shader";
+ gGlowCombineFXAAProgram.mShaderFiles.clear();
+ gGlowCombineFXAAProgram.mShaderFiles.push_back(make_pair("interface/glowcombineFXAAV.glsl", GL_VERTEX_SHADER_ARB));
+ gGlowCombineFXAAProgram.mShaderFiles.push_back(make_pair("interface/glowcombineFXAAF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gGlowCombineFXAAProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gGlowCombineFXAAProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gGlowCombineFXAAProgram.bind();
+ gGlowCombineFXAAProgram.uniform1i("glowMap", 0);
+ gGlowCombineFXAAProgram.uniform1i("screenMap", 1);
+ gGlowCombineFXAAProgram.unbind();
+ }
+ }
+
+
+ if (success)
+ {
+ gTwoTextureAddProgram.mName = "Two Texture Add Shader";
+ gTwoTextureAddProgram.mShaderFiles.clear();
+ gTwoTextureAddProgram.mShaderFiles.push_back(make_pair("interface/twotextureaddV.glsl", GL_VERTEX_SHADER_ARB));
+ gTwoTextureAddProgram.mShaderFiles.push_back(make_pair("interface/twotextureaddF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gTwoTextureAddProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gTwoTextureAddProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gTwoTextureAddProgram.bind();
+ gTwoTextureAddProgram.uniform1i("tex0", 0);
+ gTwoTextureAddProgram.uniform1i("tex1", 1);
+ }
+ }
+
+ if (success)
+ {
+ gOneTextureNoColorProgram.mName = "One Texture No Color Shader";
+ gOneTextureNoColorProgram.mShaderFiles.clear();
+ gOneTextureNoColorProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorV.glsl", GL_VERTEX_SHADER_ARB));
+ gOneTextureNoColorProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gOneTextureNoColorProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gOneTextureNoColorProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gOneTextureNoColorProgram.bind();
+ gOneTextureNoColorProgram.uniform1i("tex0", 0);
+ }
+ }
+
+ if (success)
+ {
+ gSolidColorProgram.mName = "Solid Color Shader";
+ gSolidColorProgram.mShaderFiles.clear();
+ gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorV.glsl", GL_VERTEX_SHADER_ARB));
+ gSolidColorProgram.mShaderFiles.push_back(make_pair("interface/solidcolorF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gSolidColorProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gSolidColorProgram.createShader(NULL, NULL);
+ if (success)
+ {
+ gSolidColorProgram.bind();
+ gSolidColorProgram.uniform1i("tex0", 0);
+ gSolidColorProgram.unbind();
+ }
+ }
+
+ if (success)
+ {
+ gOcclusionProgram.mName = "Occlusion Shader";
+ gOcclusionProgram.mShaderFiles.clear();
+ gOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionV.glsl", GL_VERTEX_SHADER_ARB));
+ gOcclusionProgram.mShaderFiles.push_back(make_pair("interface/occlusionF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gOcclusionProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gOcclusionProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gDebugProgram.mName = "Debug Shader";
+ gDebugProgram.mShaderFiles.clear();
+ gDebugProgram.mShaderFiles.push_back(make_pair("interface/debugV.glsl", GL_VERTEX_SHADER_ARB));
+ gDebugProgram.mShaderFiles.push_back(make_pair("interface/debugF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDebugProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gDebugProgram.createShader(NULL, NULL);
+ }
+
+ if (success)
+ {
+ gAlphaMaskProgram.mName = "Alpha Mask Shader";
+ gAlphaMaskProgram.mShaderFiles.clear();
+ gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskV.glsl", GL_VERTEX_SHADER_ARB));
+ gAlphaMaskProgram.mShaderFiles.push_back(make_pair("interface/alphamaskF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gAlphaMaskProgram.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gAlphaMaskProgram.createShader(NULL, NULL);
+ }
+
if( !success )
{
mVertexShaderLevel[SHADER_INTERFACE] = 0;
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index efef9ec5b2..95eb551bf1 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -33,6 +33,7 @@ class LLViewerShaderMgr: public LLShaderMgr
{
public:
static BOOL sInitialized;
+ static bool sSkipReload;
LLViewerShaderMgr();
/* virtual */ ~LLViewerShaderMgr();
@@ -71,76 +72,6 @@ public:
SHADER_COUNT
};
- typedef enum
- {
- MATERIAL_COLOR = 0,
- SPECULAR_COLOR,
- BINORMAL,
- OBJECT_WEIGHT,
- END_RESERVED_ATTRIBS
- } eGLSLReservedAttribs;
-
- typedef enum
- {
- DIFFUSE_MAP = 0,
- SPECULAR_MAP,
- BUMP_MAP,
- ENVIRONMENT_MAP,
- CLOUD_NOISE_MAP,
- FULLBRIGHT,
- LIGHTNORM,
- SUNLIGHT_COLOR,
- AMBIENT,
- BLUE_HORIZON,
- BLUE_DENSITY,
- HAZE_HORIZON,
- HAZE_DENSITY,
- CLOUD_SHADOW,
- DENSITY_MULTIPLIER,
- DISTANCE_MULTIPLIER,
- MAX_Y,
- GLOW,
- CLOUD_COLOR,
- CLOUD_POS_DENSITY1,
- CLOUD_POS_DENSITY2,
- CLOUD_SCALE,
- GAMMA,
- SCENE_LIGHT_STRENGTH,
- DEFERRED_DEPTH,
- DEFERRED_SHADOW0,
- DEFERRED_SHADOW1,
- DEFERRED_SHADOW2,
- DEFERRED_SHADOW3,
- DEFERRED_SHADOW4,
- DEFERRED_SHADOW5,
- DEFERRED_NORMAL,
- DEFERRED_POSITION,
- DEFERRED_DIFFUSE,
- DEFERRED_SPECULAR,
- DEFERRED_NOISE,
- DEFERRED_LIGHTFUNC,
- DEFERRED_LIGHT,
- DEFERRED_LUMINANCE,
- DEFERRED_GI_LIGHT,
- DEFERRED_GI_MIP,
- DEFERRED_EDGE,
- DEFERRED_BLOOM,
- DEFERRED_SUN_LIGHT,
- DEFERRED_LOCAL_LIGHT,
- DEFERRED_PROJECTION,
- DEFERRED_GI_DIFFUSE,
- DEFERRED_GI_SPECULAR,
- DEFERRED_GI_NORMAL,
- DEFERRED_GI_MIN_POS,
- DEFERRED_GI_MAX_POS,
- DEFERRED_GI_DEPTH,
- DEFERRED_GI_LAST_DIFFUSE,
- DEFERRED_GI_LAST_NORMAL,
- DEFERRED_GI_LAST_MIN_POS,
- DEFERRED_GI_LAST_MAX_POS,
- END_RESERVED_UNIFORMS
- } eGLSLReservedUniforms;
-
typedef enum
{
SHINY_ORIGIN = END_RESERVED_UNIFORMS
@@ -186,16 +117,10 @@ public:
typedef enum
{
- AVATAR_WEIGHT = END_RESERVED_ATTRIBS,
- AVATAR_CLOTHING,
+ AVATAR_MATRIX = END_RESERVED_UNIFORMS,
AVATAR_WIND,
AVATAR_SINWAVE,
- AVATAR_GRAVITY
- } eAvatarAttribs;
-
- typedef enum
- {
- AVATAR_MATRIX = END_RESERVED_UNIFORMS
+ AVATAR_GRAVITY,
} eAvatarUniforms;
// simple model of forward iterator
@@ -265,9 +190,6 @@ private:
std::vector<std::string> mGlowExtractUniforms;
- //avatar shader parameter tables
- std::vector<std::string> mAvatarAttribs;
-
std::vector<std::string> mAvatarUniforms;
// the list of shaders we need to propagate parameters to.
@@ -287,15 +209,49 @@ inline bool operator != (LLViewerShaderMgr::shader_iter const & a, LLViewerShade
extern LLVector4 gShinyOrigin;
+//utility shaders
+extern LLGLSLShader gOcclusionProgram;
+extern LLGLSLShader gCustomAlphaProgram;
+extern LLGLSLShader gGlowCombineProgram;
+extern LLGLSLShader gSplatTextureRectProgram;
+extern LLGLSLShader gGlowCombineFXAAProgram;
+extern LLGLSLShader gDebugProgram;
+extern LLGLSLShader gAlphaMaskProgram;
+
+//output tex0[tc0] + tex1[tc1]
+extern LLGLSLShader gTwoTextureAddProgram;
+
+extern LLGLSLShader gOneTextureNoColorProgram;
+
//object shaders
extern LLGLSLShader gObjectSimpleProgram;
+extern LLGLSLShader gObjectPreviewProgram;
+extern LLGLSLShader gObjectSimpleAlphaMaskProgram;
extern LLGLSLShader gObjectSimpleWaterProgram;
+extern LLGLSLShader gObjectSimpleWaterAlphaMaskProgram;
extern LLGLSLShader gObjectSimpleNonIndexedProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedTexGenProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedTexGenWaterProgram;
extern LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
+extern LLGLSLShader gObjectAlphaMaskNonIndexedProgram;
+extern LLGLSLShader gObjectAlphaMaskNonIndexedWaterProgram;
+extern LLGLSLShader gObjectAlphaMaskNoColorProgram;
+extern LLGLSLShader gObjectAlphaMaskNoColorWaterProgram;
extern LLGLSLShader gObjectFullbrightProgram;
extern LLGLSLShader gObjectFullbrightWaterProgram;
+extern LLGLSLShader gObjectFullbrightNoColorProgram;
+extern LLGLSLShader gObjectFullbrightNoColorWaterProgram;
+extern LLGLSLShader gObjectEmissiveProgram;
+extern LLGLSLShader gObjectEmissiveWaterProgram;
+extern LLGLSLShader gObjectFullbrightAlphaMaskProgram;
+extern LLGLSLShader gObjectFullbrightWaterAlphaMaskProgram;
extern LLGLSLShader gObjectFullbrightNonIndexedProgram;
extern LLGLSLShader gObjectFullbrightNonIndexedWaterProgram;
+extern LLGLSLShader gObjectEmissiveNonIndexedProgram;
+extern LLGLSLShader gObjectEmissiveNonIndexedWaterProgram;
+extern LLGLSLShader gObjectBumpProgram;
+extern LLGLSLShader gTreeProgram;
+extern LLGLSLShader gTreeWaterProgram;
extern LLGLSLShader gObjectSimpleLODProgram;
extern LLGLSLShader gObjectFullbrightLODProgram;
@@ -312,11 +268,13 @@ extern LLGLSLShader gObjectShinyNonIndexedWaterProgram;
extern LLGLSLShader gSkinnedObjectSimpleProgram;
extern LLGLSLShader gSkinnedObjectFullbrightProgram;
+extern LLGLSLShader gSkinnedObjectEmissiveProgram;
extern LLGLSLShader gSkinnedObjectFullbrightShinyProgram;
extern LLGLSLShader gSkinnedObjectShinySimpleProgram;
extern LLGLSLShader gSkinnedObjectSimpleWaterProgram;
extern LLGLSLShader gSkinnedObjectFullbrightWaterProgram;
+extern LLGLSLShader gSkinnedObjectEmissiveWaterProgram;
extern LLGLSLShader gSkinnedObjectFullbrightShinyWaterProgram;
extern LLGLSLShader gSkinnedObjectShinySimpleWaterProgram;
@@ -336,6 +294,7 @@ extern LLGLSLShader gAvatarProgram;
extern LLGLSLShader gAvatarWaterProgram;
extern LLGLSLShader gAvatarEyeballProgram;
extern LLGLSLShader gAvatarPickProgram;
+extern LLGLSLShader gImpostorProgram;
// WindLight shader handles
extern LLGLSLShader gWLSkyProgram;
@@ -347,9 +306,11 @@ extern LLGLSLShader gPostNightVisionProgram;
// Deferred rendering shaders
extern LLGLSLShader gDeferredImpostorProgram;
-extern LLGLSLShader gDeferredEdgeProgram;
extern LLGLSLShader gDeferredWaterProgram;
extern LLGLSLShader gDeferredDiffuseProgram;
+extern LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
+extern LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskProgram;
+extern LLGLSLShader gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
extern LLGLSLShader gDeferredNonIndexedDiffuseProgram;
extern LLGLSLShader gDeferredSkinnedDiffuseProgram;
extern LLGLSLShader gDeferredSkinnedBumpProgram;
@@ -357,33 +318,32 @@ extern LLGLSLShader gDeferredSkinnedAlphaProgram;
extern LLGLSLShader gDeferredBumpProgram;
extern LLGLSLShader gDeferredTerrainProgram;
extern LLGLSLShader gDeferredTreeProgram;
+extern LLGLSLShader gDeferredTreeShadowProgram;
extern LLGLSLShader gDeferredLightProgram;
extern LLGLSLShader gDeferredMultiLightProgram;
extern LLGLSLShader gDeferredSpotLightProgram;
extern LLGLSLShader gDeferredMultiSpotLightProgram;
extern LLGLSLShader gDeferredSunProgram;
-extern LLGLSLShader gDeferredGIProgram;
-extern LLGLSLShader gDeferredGIFinalProgram;
extern LLGLSLShader gDeferredBlurLightProgram;
extern LLGLSLShader gDeferredAvatarProgram;
extern LLGLSLShader gDeferredSoftenProgram;
extern LLGLSLShader gDeferredShadowProgram;
-extern LLGLSLShader gDeferredPostGIProgram;
+extern LLGLSLShader gDeferredShadowAlphaMaskProgram;
extern LLGLSLShader gDeferredPostProgram;
+extern LLGLSLShader gDeferredCoFProgram;
+extern LLGLSLShader gDeferredDoFCombineProgram;
+extern LLGLSLShader gFXAAProgram;
extern LLGLSLShader gDeferredPostNoDoFProgram;
extern LLGLSLShader gDeferredAvatarShadowProgram;
extern LLGLSLShader gDeferredAttachmentShadowProgram;
extern LLGLSLShader gDeferredAlphaProgram;
extern LLGLSLShader gDeferredFullbrightProgram;
+extern LLGLSLShader gDeferredEmissiveProgram;
extern LLGLSLShader gDeferredAvatarEyesProgram;
extern LLGLSLShader gDeferredAvatarAlphaProgram;
extern LLGLSLShader gDeferredWLSkyProgram;
extern LLGLSLShader gDeferredWLCloudProgram;
extern LLGLSLShader gDeferredStarProgram;
-extern LLGLSLShader gLuminanceGatherProgram;
-
-//current avatar shader parameter pointer
-extern GLint gAvatarMatrixParam;
-
+extern LLGLSLShader gNormalMapGenProgram;
#endif
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 0fb94bc44b..c88122f22c 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -854,7 +854,7 @@ void send_stats()
body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames");
body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames");
- body["MinimalSkin"] = !gSavedSettings.getString("SessionSettingsFile").empty();
+ body["MinimalSkin"] = false;
LLViewerStats::getInstance()->addToMessage(body);
LLHTTPClient::post(url, body, new ViewerStatsResponder());
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 4798bb536f..b41ed00f17 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -32,6 +32,7 @@
#include "llaudioengine.h"
#include "llavataractions.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llfocusmgr.h"
#include "llinventorybridge.h"
@@ -50,7 +51,6 @@
#include "llpreviewtexture.h"
#include "llscrollbar.h"
#include "llscrollcontainer.h"
-#include "llsidetray.h"
#include "lltooldraganddrop.h"
#include "lltooltip.h"
#include "lltrans.h"
@@ -80,7 +80,7 @@ public:
LLSD key;
key["type"] = "landmark";
key["id"] = landmark_inv_id;
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
}
static void processForeignLandmark(LLLandmark* landmark,
const LLUUID& object_id, const LLUUID& notecard_inventory_id,
@@ -88,12 +88,12 @@ public:
{
LLVector3d global_pos;
landmark->getGlobalPos(global_pos);
- LLViewerInventoryItem* agent_lanmark =
+ LLViewerInventoryItem* agent_landmark =
LLLandmarkActions::findLandmarkForGlobalPos(global_pos);
- if (agent_lanmark)
+ if (agent_landmark)
{
- showInfo(agent_lanmark->getUUID());
+ showInfo(agent_landmark->getUUID());
}
else
{
@@ -104,8 +104,13 @@ public:
}
else
{
+ LLInventoryItem* item = item_ptr.get();
LLPointer<LLEmbeddedLandmarkCopied> cb = new LLEmbeddedLandmarkCopied();
- copy_inventory_from_notecard(object_id, notecard_inventory_id, item_ptr.get(), gInventoryCallbacks.registerCB(cb));
+ copy_inventory_from_notecard(get_folder_by_itemtype(item),
+ object_id,
+ notecard_inventory_id,
+ item,
+ gInventoryCallbacks.registerCB(cb));
}
}
}
@@ -1266,9 +1271,11 @@ bool LLViewerTextEditor::importStream(std::istream& str)
void LLViewerTextEditor::copyInventory(const LLInventoryItem* item, U32 callback_id)
{
- copy_inventory_from_notecard(mObjectID,
+ copy_inventory_from_notecard(LLUUID::null, // Don't specify a destination -- let the sim do that
+ mObjectID,
mNotecardInventoryID,
- item, callback_id);
+ item,
+ callback_id);
}
bool LLViewerTextEditor::hasEmbeddedInventory()
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index 0861dfcb20..fb428d0dc1 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -36,12 +36,7 @@ class LLViewerTextEditor : public LLTextEditor
{
public:
struct Params : public LLInitParam::Block<Params, LLTextEditor::Params>
- {
- Params()
- {
- name = "text_editor";
- }
- };
+ {};
protected:
LLViewerTextEditor(const Params&);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 4da0f80a00..786e2b73b1 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -66,6 +66,7 @@
// statics
LLPointer<LLViewerTexture> LLViewerTexture::sNullImagep = NULL;
+LLPointer<LLViewerTexture> LLViewerTexture::sBlackImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = NULL;
@@ -295,17 +296,23 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const
void LLViewerTextureManager::init()
{
- LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,3);
- raw->clear(0x77, 0x77, 0x77, 0xFF);
- LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE) ;
-
-#if 1
- LLPointer<LLViewerFetchedTexture> imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT);
- LLViewerFetchedTexture::sDefaultImagep = imagep;
+ {
+ LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,3);
+ raw->clear(0x77, 0x77, 0x77, 0xFF);
+ LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE) ;
+ }
const S32 dim = 128;
LLPointer<LLImageRaw> image_raw = new LLImageRaw(dim,dim,3);
U8* data = image_raw->getData();
+
+ memset(data, 0, dim * dim * 3) ;
+ LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE) ;
+
+#if 1
+ LLPointer<LLViewerFetchedTexture> imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT);
+ LLViewerFetchedTexture::sDefaultImagep = imagep;
+
for (S32 i = 0; i<dim; i++)
{
for (S32 j = 0; j<dim; j++)
@@ -359,6 +366,7 @@ void LLViewerTextureManager::cleanup()
LLImageGL::sDefaultGLTexture = NULL ;
LLViewerTexture::sNullImagep = NULL;
+ LLViewerTexture::sBlackImagep = NULL;
LLViewerFetchedTexture::sDefaultImagep = NULL;
LLViewerFetchedTexture::sSmokeImagep = NULL;
LLViewerFetchedTexture::sMissingAssetImagep = NULL;
@@ -409,6 +417,48 @@ const S32 min_non_tex_system_mem = (128<<20); // 128 MB
F32 texmem_lower_bound_scale = 0.85f;
F32 texmem_middle_bound_scale = 0.925f;
+//static
+bool LLViewerTexture::isMemoryForTextureLow()
+{
+ const static S32 MIN_FREE_TEXTURE_MEMORY = 5 ; //MB
+ const static S32 MIN_FREE_MAIN_MEMORy = 100 ; //MB
+
+ bool low_mem = false ;
+ if (gGLManager.mHasATIMemInfo)
+ {
+ S32 meminfo[4];
+ glGetIntegerv(GL_TEXTURE_FREE_MEMORY_ATI, meminfo);
+
+ if(meminfo[0] / 1024 < MIN_FREE_TEXTURE_MEMORY)
+ {
+ low_mem = true ;
+ }
+ }
+#if 0 //ignore nVidia cards
+ else if (gGLManager.mHasNVXMemInfo)
+ {
+ S32 free_memory;
+ glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &free_memory);
+
+ if(free_memory / 1024 < MIN_FREE_TEXTURE_MEMORY)
+ {
+ low_mem = true ;
+ }
+ }
+#endif
+
+ if(!low_mem) //check main memory, only works for windows.
+ {
+ LLMemory::updateMemoryInfo() ;
+ if(LLMemory::getAvailableMemKB() / 1024 < MIN_FREE_MAIN_MEMORy)
+ {
+ low_mem = true ;
+ }
+ }
+
+ return low_mem ;
+}
+
//static
void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity)
{
@@ -441,6 +491,11 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
sEvaluationTimer.reset();
}
}
+ else if(sEvaluationTimer.getElapsedTimeF32() > discard_delta_time && isMemoryForTextureLow())
+ {
+ sDesiredDiscardBias += discard_bias_delta;
+ sEvaluationTimer.reset();
+ }
else if (sDesiredDiscardBias > 0.0f &&
BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < sMaxBoundTextureMemInMegaBytes * texmem_lower_bound_scale &&
BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < sMaxTotalTextureMemInMegaBytes * texmem_lower_bound_scale)
@@ -599,7 +654,7 @@ bool LLViewerTexture::bindDefaultImage(S32 stage)
}
if (!res && LLViewerTexture::sNullImagep.notNull() && (this != LLViewerTexture::sNullImagep))
{
- res = gGL.getTexUnit(stage)->bind(LLViewerTexture::sNullImagep) ;
+ res = gGL.getTexUnit(stage)->bind(LLViewerTexture::sNullImagep);
}
if (!res)
{
@@ -3101,9 +3156,16 @@ void LLViewerLODTexture::processTextureStats()
{
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel) ;
}
+ else if(LLPipeline::sMemAllocationThrottled)//release memory of large textures by decrease their resolutions.
+ {
+ if(scaleDown())
+ {
+ mDesiredDiscardLevel = mCachedRawDiscardLevel ;
+ }
+ }
}
-void LLViewerLODTexture::scaleDown()
+bool LLViewerLODTexture::scaleDown()
{
if(hasGLTexture() && mCachedRawDiscardLevel > getDiscardLevel())
{
@@ -3114,7 +3176,10 @@ void LLViewerLODTexture::scaleDown()
{
tester->setStablizingTime() ;
}
+
+ return true ;
}
+ return false ;
}
//----------------------------------------------------------------------------------------------
//end of LLViewerLODTexture
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index c5b8c8923a..b96441127d 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -267,6 +267,7 @@ private:
/*virtual*/ LLImageGL* getGLTexture() const ;
virtual void switchToCachedImage();
+ static bool isMemoryForTextureLow() ;
protected:
LLUUID mID;
S32 mBoostLevel; // enum describing priority level
@@ -330,6 +331,7 @@ public:
static BOOL sUseTextureAtlas ;
static LLPointer<LLViewerTexture> sNullImagep; // Null texture for non-textured objects.
+ static LLPointer<LLViewerTexture> sBlackImagep; // Texture to show NOTHING (pure black)
};
@@ -596,7 +598,7 @@ public:
private:
void init(bool firstinit) ;
- void scaleDown() ;
+ bool scaleDown() ;
private:
F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index d24174adea..cddf7dcfea 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -115,7 +115,7 @@ void LLViewerTextureList::doPreloadImages()
// Set the "white" image
LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
-
+ LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
LLUIImageList* image_list = LLUIImageList::getInstance();
image_list->initFromFile();
@@ -530,9 +530,11 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
}
llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl;
}
- if(mImageList.erase(image) != 1)
+
+ S32 count = mImageList.erase(image) ;
+ if(count != 1)
{
- llerrs << "Error happens when remove image from mImageList!" << llendl ;
+ llerrs << "Error happens when remove image from mImageList: " << count << llendl ;
}
image->setInImageList(FALSE) ;
@@ -586,6 +588,11 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
////////////////////////////////////////////////////////////////////////////
static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize");
+static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks");
+static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch");
+static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create");
+static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats");
void LLViewerTextureList::updateImages(F32 max_time)
{
@@ -597,14 +604,25 @@ void LLViewerTextureList::updateImages(F32 max_time)
LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
-
- updateImagesDecodePriorities();
+
+
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES);
+ updateImagesDecodePriorities();
+ }
F32 total_max_time = max_time;
- max_time -= updateImagesFetchTextures(max_time);
+
+ {
+ LLFastTimer t(FTM_IMAGE_FETCH);
+ max_time -= updateImagesFetchTextures(max_time);
+ }
- max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
- max_time -= updateImagesCreateTextures(max_time);
+ {
+ LLFastTimer t(FTM_IMAGE_CREATE);
+ max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
+ max_time -= updateImagesCreateTextures(max_time);
+ }
if (!mDirtyTextureList.empty())
{
@@ -612,24 +630,32 @@ void LLViewerTextureList::updateImages(F32 max_time)
gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
mDirtyTextureList.clear();
}
- bool didone = false;
- for (image_list_t::iterator iter = mCallbackList.begin();
- iter != mCallbackList.end(); )
+
{
- //trigger loaded callbacks on local textures immediately
- LLViewerFetchedTexture* image = *iter++;
- if (!image->getUrl().empty())
- {
- // Do stuff to handle callbacks, update priorities, etc.
- didone = image->doLoadedCallbacks();
- }
- else if (!didone)
+ LLFastTimer t(FTM_IMAGE_CALLBACKS);
+ bool didone = false;
+ for (image_list_t::iterator iter = mCallbackList.begin();
+ iter != mCallbackList.end(); )
{
- // Do stuff to handle callbacks, update priorities, etc.
- didone = image->doLoadedCallbacks();
+ //trigger loaded callbacks on local textures immediately
+ LLViewerFetchedTexture* image = *iter++;
+ if (!image->getUrl().empty())
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
+ else if (!didone)
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
}
}
- updateImagesUpdateStats();
+
+ {
+ LLFastTimer t(FTM_IMAGE_STATS);
+ updateImagesUpdateStats();
+ }
}
void LLViewerTextureList::updateImagesDecodePriorities()
@@ -747,7 +773,6 @@ void LLViewerTextureList::updateImagesDecodePriorities()
return type_from_host;
}
*/
-static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create Images");
F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
{
@@ -757,8 +782,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
// Create GL textures for all textures that need them (images which have been
// decoded, but haven't been pushed into GL).
//
- LLFastTimer t(FTM_IMAGE_CREATE);
-
+
LLTimer create_timer;
image_list_t::iterator enditer = mCreateTextureList.begin();
for (image_list_t::iterator iter = mCreateTextureList.begin();
@@ -1053,6 +1077,13 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
// Treat any card with < 32 MB (shudder) as having 32 MB
// - it's going to be swapping constantly regardless
S32 max_vram = gGLManager.mVRAM;
+
+ if(gGLManager.mIsATI)
+ {
+ //shrink the availabe vram for ATI cards because some of them do not handel texture swapping well.
+ max_vram = (S32)(max_vram * 0.75f);
+ }
+
max_vram = llmax(max_vram, getMinVideoRamSetting());
max_texmem = max_vram;
if (!get_recommended)
@@ -1060,10 +1091,19 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
}
else
{
- if (get_recommended)
- max_texmem = 128;
- else
+ if (!get_recommended)
+ {
+ max_texmem = 512;
+ }
+ else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup
+ {
max_texmem = 512;
+ }
+ else
+ {
+ max_texmem = 128;
+ }
+
llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl;
}
@@ -1342,7 +1382,8 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority)
const BOOL use_mips = FALSE;
const LLRect scale_rect = LLRect::null;
- return loadUIImageByID(image_id, use_mips, scale_rect, (LLViewerTexture::EBoostLevel)priority);
+ const LLRect clip_rect = LLRect::null;
+ return loadUIImageByID(image_id, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority);
}
LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority)
@@ -1356,32 +1397,33 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori
const BOOL use_mips = FALSE;
const LLRect scale_rect = LLRect::null;
- return loadUIImageByName(image_name, image_name, use_mips, scale_rect, (LLViewerTexture::EBoostLevel)priority);
+ const LLRect clip_rect = LLRect::null;
+ return loadUIImageByName(image_name, image_name, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority);
}
LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename,
- BOOL use_mips, const LLRect& scale_rect, LLViewerTexture::EBoostLevel boost_priority )
+ BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority )
{
if (boost_priority == LLViewerTexture::BOOST_NONE)
{
boost_priority = LLViewerTexture::BOOST_UI;
}
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority);
- return loadUIImage(imagep, name, use_mips, scale_rect);
+ return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect);
}
LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
- BOOL use_mips, const LLRect& scale_rect, LLViewerTexture::EBoostLevel boost_priority)
+ BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority)
{
if (boost_priority == LLViewerTexture::BOOST_NONE)
{
boost_priority = LLViewerTexture::BOOST_UI;
}
LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority);
- return loadUIImage(imagep, id.asString(), use_mips, scale_rect);
+ return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect);
}
-LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect)
+LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect)
{
if (!imagep) return NULL;
@@ -1402,13 +1444,14 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
LLUIImageLoadData* datap = new LLUIImageLoadData;
datap->mImageName = name;
datap->mImageScaleRegion = scale_rect;
+ datap->mImageClipRegion = clip_rect;
imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL);
}
return new_imagep;
}
-LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect)
+LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect)
{
// look for existing image
uuid_ui_image_map_t::iterator found_it = mUIImages.find(name);
@@ -1418,7 +1461,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s
llerrs << "UI Image " << name << " already loaded." << llendl;
}
- return loadUIImageByName(name, filename, use_mips, scale_rect);
+ return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect);
}
//static
@@ -1432,6 +1475,7 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v
LLUIImageLoadData* image_datap = (LLUIImageLoadData*)user_data;
std::string ui_image_name = image_datap->mImageName;
LLRect scale_rect = image_datap->mImageScaleRegion;
+ LLRect clip_rect = image_datap->mImageClipRegion;
if (final)
{
delete image_datap;
@@ -1448,9 +1492,21 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v
// from power-of-2 gl image
if (success && imagep.notNull() && src_vi && (src_vi->getUrl().compare(0, 7, "file://")==0))
{
- F32 clip_x = (F32)src_vi->getOriginalWidth() / (F32)src_vi->getFullWidth();
- F32 clip_y = (F32)src_vi->getOriginalHeight() / (F32)src_vi->getFullHeight();
- imagep->setClipRegion(LLRectf(0.f, clip_y, clip_x, 0.f));
+ F32 full_width = (F32)src_vi->getFullWidth();
+ F32 full_height = (F32)src_vi->getFullHeight();
+ F32 clip_x = (F32)src_vi->getOriginalWidth() / full_width;
+ F32 clip_y = (F32)src_vi->getOriginalHeight() / full_height;
+ if (clip_rect != LLRect::null)
+ {
+ imagep->setClipRegion(LLRectf(llclamp((F32)clip_rect.mLeft / full_width, 0.f, 1.f),
+ llclamp((F32)clip_rect.mTop / full_height, 0.f, 1.f),
+ llclamp((F32)clip_rect.mRight / full_width, 0.f, 1.f),
+ llclamp((F32)clip_rect.mBottom / full_height, 0.f, 1.f)));
+ }
+ else
+ {
+ imagep->setClipRegion(LLRectf(0.f, clip_y, clip_x, 0.f));
+ }
if (scale_rect != LLRect::null)
{
imagep->setScaleRegion(
@@ -1471,6 +1527,7 @@ struct UIImageDeclaration : public LLInitParam::Block<UIImageDeclaration>
Optional<std::string> file_name;
Optional<bool> preload;
Optional<LLRect> scale;
+ Optional<LLRect> clip;
Optional<bool> use_mips;
UIImageDeclaration()
@@ -1478,6 +1535,7 @@ struct UIImageDeclaration : public LLInitParam::Block<UIImageDeclaration>
file_name("file_name"),
preload("preload", false),
scale("scale"),
+ clip("clip"),
use_mips("use_mips", false)
{}
};
@@ -1572,7 +1630,7 @@ bool LLUIImageList::initFromFile()
{
continue;
}
- preloadUIImage(image.name, file_name, image.use_mips, image.scale);
+ preloadUIImage(image.name, file_name, image.use_mips, image.scale, image.clip);
}
if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload"))
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 7f4dd0ae88..e0a362596d 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -220,24 +220,27 @@ public:
bool initFromFile();
- LLPointer<LLUIImage> preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect);
+ LLPointer<LLUIImage> preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect);
static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
private:
LLPointer<LLUIImage> loadUIImageByName(const std::string& name, const std::string& filename,
BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
+ const LLRect& clip_rect = LLRect::null,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI);
LLPointer<LLUIImage> loadUIImageByID(const LLUUID& id,
BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null,
+ const LLRect& clip_rect = LLRect::null,
LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI);
- LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
+ LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null);
struct LLUIImageLoadData
{
std::string mImageName;
LLRect mImageScaleRegion;
+ LLRect mImageClipRegion;
};
typedef std::map< std::string, LLPointer<LLUIImage> > uuid_ui_image_map_t;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index cff166b825..31dfa1923c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -36,6 +36,7 @@
#include <iostream>
#include <fstream>
#include <algorithm>
+#include <boost/lambda/core.hpp>
#include "llagent.h"
#include "llagentcamera.h"
@@ -84,6 +85,7 @@
// newview includes
#include "llagent.h"
#include "llbox.h"
+#include "llchicletbar.h"
#include "llconsole.h"
#include "llviewercontrol.h"
#include "llcylinder.h"
@@ -132,7 +134,6 @@
#include "llpreviewtexture.h"
#include "llprogressview.h"
#include "llresmgr.h"
-#include "llsidetray.h"
#include "llselectmgr.h"
#include "llrootview.h"
#include "llrendersphere.h"
@@ -147,6 +148,7 @@
#include "lltexturefetch.h"
#include "lltextureview.h"
#include "lltool.h"
+#include "lltoolbarview.h"
#include "lltoolcomp.h"
#include "lltooldraganddrop.h"
#include "lltoolface.h"
@@ -186,7 +188,6 @@
#include "llviewerjoystick.h"
#include "llviewernetwork.h"
#include "llpostprocess.h"
-#include "llbottomtray.h"
#include "llnearbychatbar.h"
#include "llagentui.h"
#include "llwearablelist.h"
@@ -198,6 +199,7 @@
#include "llfloaternotificationsconsole.h"
#include "llnearbychat.h"
+#include "llwindowlistener.h"
#include "llviewerwindowlistener.h"
#include "llpaneltopinfobar.h"
@@ -240,8 +242,6 @@ BOOL gDisplayBadge = FALSE;
static const U8 NO_FACE = 255;
BOOL gQuietSnapshot = FALSE;
-const F32 MIN_AFK_TIME = 2.f; // minimum time after setting away state before coming back
-
static const F32 MIN_DISPLAY_SCALE = 0.75f;
std::string LLViewerWindow::sSnapshotBaseName;
@@ -489,6 +489,7 @@ public:
{
F32 cost = 0.f;
S32 count = 0;
+ S32 vcount = 0;
S32 object_count = 0;
S32 total_bytes = 0;
S32 visible_bytes = 0;
@@ -510,7 +511,9 @@ public:
S32 bytes = 0;
S32 visible = 0;
cost += object->getStreamingCost(&bytes, &visible);
- count += object->getTriangleCount();
+ S32 vt = 0;
+ count += object->getTriangleCount(&vt);
+ vcount += vt;
total_bytes += bytes;
visible_bytes += visible;
}
@@ -521,20 +524,20 @@ public:
{
label = "Selection";
cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectStreamingCost(&total_bytes, &visible_bytes);
- count = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount();
+ count = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount(&vcount);
object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
}
addText(xpos,ypos, llformat("%s streaming cost: %.1f", label, cost));
ypos += y_inc;
- addText(xpos, ypos, llformat(" %.1f KTris, %.1f/%.1f KB, %d objects",
- count/1024.f, visible_bytes/1024.f, total_bytes/1024.f, object_count));
+ addText(xpos, ypos, llformat(" %.3f KTris, %.3f KVerts, %.1f/%.1f KB, %d objects",
+ count/1000.f, vcount/1000.f, visible_bytes/1024.f, total_bytes/1024.f, object_count));
ypos += y_inc;
}
- addText(xpos, ypos, llformat("%d MB Vertex Data", LLVertexBuffer::sAllocatedBytes/(1024*1024)));
+ addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024)));
ypos += y_inc;
addText(xpos, ypos, llformat("%d Vertex Buffers", LLVertexBuffer::sGLCount));
@@ -662,6 +665,17 @@ public:
addText(xpos, ypos, llformat("%d %d %d %d", color[0], color[1], color[2], color[3]));
ypos += y_inc;
}
+
+ if (gSavedSettings.getBOOL("DebugShowPrivateMem"))
+ {
+ LLPrivateMemoryPoolManager::getInstance()->updateStatistics() ;
+ addText(xpos, ypos, llformat("Total Reserved(KB): %d", LLPrivateMemoryPoolManager::getInstance()->mTotalReservedSize / 1024));
+ ypos += y_inc;
+
+ addText(xpos, ypos, llformat("Total Allocated(KB): %d", LLPrivateMemoryPoolManager::getInstance()->mTotalAllocatedSize / 1024));
+ ypos += y_inc;
+ }
+
// only display these messages if we are actually rendering beacons at this moment
if (LLPipeline::getRenderBeacons(NULL) && LLFloaterReg::instanceVisible("beacons"))
{
@@ -726,52 +740,6 @@ public:
}
}
- if (gSavedSettings.getBOOL("DebugShowUploadCost"))
- {
- addText(xpos, ypos, llformat(" Meshes: L$%d", gPipeline.mDebugMeshUploadCost));
- ypos += y_inc/2;
- addText(xpos, ypos, llformat(" Sculpties: L$%d", gPipeline.mDebugSculptUploadCost));
- ypos += y_inc/2;
- addText(xpos, ypos, llformat(" Textures: L$%d", gPipeline.mDebugTextureUploadCost));
- ypos += y_inc/2;
- addText(xpos, ypos, "Upload Cost: ");
-
- ypos += y_inc;
- }
-
- //temporary hack to give feedback on mesh upload progress
- if (!gMeshRepo.mUploads.empty())
- {
- for (std::vector<LLMeshUploadThread*>::iterator iter = gMeshRepo.mUploads.begin();
- iter != gMeshRepo.mUploads.end(); ++iter)
- {
- LLMeshUploadThread* thread = *iter;
-
- addText(xpos, ypos, llformat("Mesh Upload -- price quote: %d:%d | upload: %d:%d | create: %d",
- thread->mPendingConfirmations, thread->mUploadQ.size()+thread->mTextureQ.size(),
- thread->mPendingUploads, thread->mConfirmedQ.size()+thread->mConfirmedTextureQ.size(),
- thread->mInstanceQ.size()));
- ypos += y_inc;
- }
- }
-
- if (!gMeshRepo.mPendingRequests.empty() ||
- !gMeshRepo.mThread->mHeaderReqQ.empty() ||
- !gMeshRepo.mThread->mLODReqQ.empty())
- {
- LLMutexLock lock(gMeshRepo.mThread->mMutex);
- S32 pending = (S32) gMeshRepo.mPendingRequests.size();
- S32 header = (S32) gMeshRepo.mThread->mHeaderReqQ.size();
- S32 lod = (S32) gMeshRepo.mThread->mLODReqQ.size();
-
- addText(xpos, ypos, llformat ("Mesh Queue - %d pending (%d:%d header | %d:%d LOD)",
- pending,
- LLMeshRepoThread::sActiveHeaderRequests, header,
- LLMeshRepoThread::sActiveLODRequests, lod));
-
- ypos += y_inc;
- }
-
if (gSavedSettings.getBOOL("DebugShowTextureInfo"))
{
LLViewerObject* objectp = NULL ;
@@ -842,6 +810,20 @@ void LLViewerWindow::updateDebugText()
// LLViewerWindow
//
+LLViewerWindow::Params::Params()
+: title("title"),
+ name("name"),
+ x("x"),
+ y("y"),
+ width("width"),
+ height("height"),
+ min_width("min_width"),
+ min_height("min_height"),
+ fullscreen("fullscreen", false),
+ ignore_pixel_depth("ignore_pixel_depth", false)
+{}
+
+
BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
{
const char* buttonname = "";
@@ -944,6 +926,11 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
// }
//}
+ // Mark the click as handled and return if we aren't within the root view to avoid spurious bugs
+ if( !mRootView->pointInView(x, y) )
+ {
+ return TRUE;
+ }
// Give the UI views a chance to process the click
if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) )
{
@@ -1218,7 +1205,7 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
mWindow->showCursorFromMouseMove();
- if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME)
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
}
@@ -1306,7 +1293,7 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
// Let the voice chat code check for its PTT key. Note that this never affects event processing.
LLVoiceClient::getInstance()->keyDown(key, mask);
- if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME)
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
{
gAgent.clearAFK();
}
@@ -1345,7 +1332,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
{
if (activated)
{
- mActive = TRUE;
+ mActive = true;
send_agent_resume();
gAgent.clearAFK();
@@ -1354,8 +1341,9 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
}
else
{
- mActive = FALSE;
+ mActive = false;
+ // if the user has chosen to go Away automatically after some time, then go Away when minimizing
if (gSavedSettings.getS32("AFKTimeout"))
{
gAgent.setAFK();
@@ -1529,17 +1517,13 @@ std::string LLViewerWindow::translateString(const char* tag,
//
// Classes
//
-LLViewerWindow::LLViewerWindow(
- const std::string& title, const std::string& name,
- S32 x, S32 y,
- S32 width, S32 height,
- BOOL fullscreen, BOOL ignore_pixel_depth) // fullscreen is no longer used
- :
- mWindow(NULL),
- mActive(TRUE),
- mWindowRectRaw(0, height, width, 0),
- mWindowRectScaled(0, height, width, 0),
- mWorldViewRectRaw(0, height, width, 0),
+LLViewerWindow::LLViewerWindow(const Params& p)
+: mWindow(NULL),
+ mActive(true),
+ mUIVisible(true),
+ mWindowRectRaw(0, p.height, p.width, 0),
+ mWindowRectScaled(0, p.height, p.width, 0),
+ mWorldViewRectRaw(0, p.height, p.width, 0),
mLeftMouseDown(FALSE),
mMiddleMouseDown(FALSE),
mRightMouseDown(FALSE),
@@ -1552,7 +1536,12 @@ LLViewerWindow::LLViewerWindow(
mResDirty(false),
mStatesDirty(false),
mCurrResolutionIndex(0),
- mViewerWindowListener(new LLViewerWindowListener(this)),
+ // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to
+ // pass its value right now. Instead, pass it a nullary function that
+ // will, when we later need it, return the value of gKeyboard.
+ // boost::lambda::var() constructs such a functor on the fly.
+ mWindowListener(new LLWindowListener(this, boost::lambda::var(gKeyboard))),
+ mViewerWindowListener(new LLViewerWindowListener(this)),
mProgressView(NULL)
{
LLNotificationChannel::buildChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert"));
@@ -1570,31 +1559,28 @@ LLViewerWindow::LLViewerWindow(
// create window
mWindow = LLWindowManager::createWindow(this,
- title, name, x, y, width, height, 0,
- fullscreen,
+ p.title, p.name, p.x, p.y, p.width, p.height, 0,
+ p.fullscreen,
gHeadlessClient,
gSavedSettings.getBOOL("DisableVerticalSync"),
!gHeadlessClient,
- ignore_pixel_depth,
+ p.ignore_pixel_depth,
gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled
- if (!LLAppViewer::instance()->restoreErrorTrap())
- {
- LL_WARNS("Window") << " Someone took over my signal/exception handler (post createWindow)!" << LL_ENDL;
+ if (!LLViewerShaderMgr::sInitialized)
+ { //immediately initialize shaders
+ LLViewerShaderMgr::sInitialized = TRUE;
+ LLViewerShaderMgr::instance()->setShaders();
}
- LLCoordScreen scr;
- mWindow->getSize(&scr);
-
- if(fullscreen && ( scr.mX!=width || scr.mY!=height))
- {
- llwarns << "Fullscreen has forced us in to a different resolution now using "<<scr.mX<<" x "<<scr.mY<<llendl;
- gSavedSettings.setS32("FullScreenWidth",scr.mX);
- gSavedSettings.setS32("FullScreenHeight",scr.mY);
- }
-
if (NULL == mWindow)
{
+ LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate"));
+
+ LL_WARNS("Window") << "Failed to create window, to be shutting Down, be sure your graphics driver is updated." << llendl ;
+
+ ms_sleep(5000) ; //wait for 5 seconds.
+
LLSplashScreen::update(LLTrans::getString("ShuttingDown"));
#if LL_LINUX || LL_SOLARIS
llwarns << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information."
@@ -1606,6 +1592,23 @@ LLViewerWindow::LLViewerWindow(
LLAppViewer::instance()->fastQuit(1);
}
+ if (!LLAppViewer::instance()->restoreErrorTrap())
+ {
+ LL_WARNS("Window") << " Someone took over my signal/exception handler (post createWindow)!" << LL_ENDL;
+ }
+
+ const bool do_not_enforce = false;
+ mWindow->setMinSize(p.min_width, p.min_height, do_not_enforce); // root view not set
+ LLCoordScreen scr;
+ mWindow->getSize(&scr);
+
+ if(p.fullscreen && ( scr.mX!=p.width || scr.mY!=p.height))
+ {
+ llwarns << "Fullscreen has forced us in to a different resolution now using "<<scr.mX<<" x "<<scr.mY<<llendl;
+ gSavedSettings.setS32("FullScreenWidth",scr.mX);
+ gSavedSettings.setS32("FullScreenHeight",scr.mY);
+ }
+
// Get the real window rect the window was created with (since there are various OS-dependent reasons why
// the size of a window or fullscreen context may have been adjusted slightly...)
F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");
@@ -1639,10 +1642,11 @@ LLViewerWindow::LLViewerWindow(
}
LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable"));
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
+ gGL.init() ;
if (LLFeatureManager::getInstance()->isSafe()
|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())
- || (gSavedSettings.getS32("LastGPUClass") != LLFeatureManager::getInstance()->getGPUClass())
+ || (gSavedSettings.getString("LastGPUString") != LLFeatureManager::getInstance()->getGPUString())
|| (gSavedSettings.getBOOL("ProbeHardwareOnStartup")))
{
LLFeatureManager::getInstance()->applyRecommendedSettings();
@@ -1707,32 +1711,30 @@ LLViewerWindow::LLViewerWindow(
void LLViewerWindow::initGLDefaults()
{
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 };
- F32 diffuse[4] = {1.f,1.f,1.f,1.f };
- glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT,ambient);
- glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,diffuse);
-
- glPixelStorei(GL_PACK_ALIGNMENT,1);
- glPixelStorei(GL_UNPACK_ALIGNMENT,1);
+ if (!LLGLSLShader::sNoFixedFunction)
+ { //initialize fixed function state
+ glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
- gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+ glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT,LLColor4::black.mV);
+ glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,LLColor4::white.mV);
- // lights for objects
- glShadeModel( GL_SMOOTH );
+ // lights for objects
+ glShadeModel( GL_SMOOTH );
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
-
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ }
+ glPixelStorei(GL_PACK_ALIGNMENT,1);
+ glPixelStorei(GL_UNPACK_ALIGNMENT,1);
+
+ gGL.setAmbientLightColor(LLColor4::black);
+
glCullFace(GL_BACK);
// RN: Need this for translation and stretch manip.
- gCone.prerender();
gBox.prerender();
- gSphere.prerender();
- gCylinder.prerender();
}
struct MainPanel : public LLPanel
@@ -1769,12 +1771,19 @@ void LLViewerWindow::initBase()
// placeholder widget that controls where "world" is rendered
mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle();
- mNonSideTrayView = main_view->getChildView("non_side_tray_view")->getHandle();
- mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle();
mPopupView = main_view->getChild<LLPopupView>("popup_holder");
mHintHolder = main_view->getChild<LLView>("hint_holder")->getHandle();
mLoginPanelHolder = main_view->getChild<LLView>("login_panel_holder")->getHandle();
+ // Create the toolbar view
+ // Get a pointer to the toolbar view holder
+ LLPanel* panel_holder = main_view->getChild<LLPanel>("toolbar_view_holder");
+ // Load the toolbar view from file
+ gToolBarView = LLUICtrlFactory::getInstance()->createFromFile<LLToolBarView>("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance());
+ gToolBarView->setShape(panel_holder->getLocalRect());
+ // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
+ gToolBarView->setVisible(FALSE);
+
// Constrain floaters to inside the menu and status bar regions.
gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle());
@@ -1834,13 +1843,12 @@ void LLViewerWindow::initWorldUI()
//getRootView()->sendChildToFront(gFloaterView);
//getRootView()->sendChildToFront(gSnapshotFloaterView);
- // new bottom panel
- LLPanel* bottom_tray_container = getRootView()->getChild<LLPanel>("bottom_tray_container");
- LLBottomTray* bottom_tray = LLBottomTray::getInstance();
- bottom_tray->setShape(bottom_tray_container->getLocalRect());
- bottom_tray->setFollowsAll();
- bottom_tray_container->addChild(bottom_tray);
- bottom_tray_container->setVisible(TRUE);
+ LLPanel* chiclet_container = getRootView()->getChild<LLPanel>("chiclet_container");
+ LLChicletBar* chiclet_bar = LLChicletBar::getInstance();
+ chiclet_bar->setShape(chiclet_container->getLocalRect());
+ chiclet_bar->setFollowsAll();
+ chiclet_container->addChild(chiclet_bar);
+ chiclet_container->setVisible(TRUE);
LLRect morph_view_rect = full_window;
morph_view_rect.stretch( -STATUS_BAR_HEIGHT );
@@ -1868,7 +1876,7 @@ void LLViewerWindow::initWorldUI()
gStatusBar->setShape(status_bar_container->getLocalRect());
// sync bg color with menu bar
gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
- status_bar_container->addChild(gStatusBar);
+ status_bar_container->addChildInBack(gStatusBar);
status_bar_container->setVisible(TRUE);
// Navigation bar
@@ -1882,12 +1890,7 @@ void LLViewerWindow::initWorldUI()
if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
{
- navbar->showNavigationPanel(FALSE);
- }
-
- if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"))
- {
- navbar->showFavoritesPanel(FALSE);
+ navbar->setVisible(FALSE);
}
// Top Info bar
@@ -1913,8 +1916,7 @@ void LLViewerWindow::initWorldUI()
hud_rect.mTop -= gMenuBarView->getRect().getHeight();
}
gHUDView = new LLHUDView(hud_rect);
- // put behind everything else in the UI
- getRootView()->addChildInBack(gHUDView);
+ getRootView()->addChild(gHUDView);
}
LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("stand_stop_flying_container");
@@ -1922,40 +1924,30 @@ void LLViewerWindow::initWorldUI()
panel_ssf_container->addChild(panel_stand_stop_flying);
panel_ssf_container->setVisible(TRUE);
- // put sidetray in container
- LLPanel* side_tray_container = getRootView()->getChild<LLPanel>("side_tray_container");
- LLSideTray* sidetrayp = LLSideTray::getInstance();
- sidetrayp->setShape(side_tray_container->getLocalRect());
- // don't follow right edge to avoid spurious resizes, since we are using a fixed width layout
- sidetrayp->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_BOTTOM);
- side_tray_container->addChild(sidetrayp);
- side_tray_container->setVisible(FALSE);
-
- // put sidetray buttons in their own panel
- LLPanel* buttons_panel = sidetrayp->getButtonsPanel();
- LLPanel* buttons_panel_container = getRootView()->getChild<LLPanel>("side_bar_tabs");
- buttons_panel->setShape(buttons_panel_container->getLocalRect());
- buttons_panel->setFollowsAll();
- buttons_panel_container->addChild(buttons_panel);
-
- LLView* avatar_picker_destination_guide_container = gViewerWindow->getRootView()->getChild<LLView>("avatar_picker_and_destination_guide_container");
- avatar_picker_destination_guide_container->getChild<LLButton>("close")->setCommitCallback(boost::bind(toggle_destination_and_avatar_picker, LLSD()));
- LLMediaCtrl* destinations = avatar_picker_destination_guide_container->findChild<LLMediaCtrl>("destination_guide_contents");
- LLMediaCtrl* avatar_picker = avatar_picker_destination_guide_container->findChild<LLMediaCtrl>("avatar_picker_contents");
+ // Load and make the toolbars visible
+ // Note: we need to load the toolbars only *after* the user is logged in and IW
+ if (gToolBarView)
+ {
+ gToolBarView->loadToolbars();
+ gToolBarView->setVisible(TRUE);
+ }
+
+ LLMediaCtrl* destinations = LLFloaterReg::getInstance("destinations")->getChild<LLMediaCtrl>("destination_guide_contents");
if (destinations)
{
destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
- destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html");
+ std::string url = gSavedSettings.getString("DestinationGuideURL");
+ url = LLWeb::expandURLSubstitutions(url, LLSD());
+ destinations->navigateTo(url, "text/html");
}
-
+ LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild<LLMediaCtrl>("avatar_picker_contents");
if (avatar_picker)
{
avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
- avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html");
+ std::string url = gSavedSettings.getString("AvatarPickerURL");
+ url = LLWeb::expandURLSubstitutions(url, LLSD());
+ avatar_picker->navigateTo(url, "text/html");
}
-
- // show destinations by default
- toggle_destination_and_avatar_picker(gSavedSettings.getS32("DestinationsAndAvatarsVisibility"));
}
// Destroy the UI
@@ -1981,7 +1973,7 @@ void LLViewerWindow::shutdownViews()
// *TODO: Make LLNavigationBar part of gViewerWindow
if (LLNavigationBar::instanceExists())
{
- delete LLNavigationBar::getInstance();
+ delete LLNavigationBar::getInstance();
}
// destroy menus after instantiating navbar above, as it needs
@@ -1997,6 +1989,7 @@ void LLViewerWindow::shutdownViews()
gIMMgr = NULL;
gToolTipView = NULL;
+ gToolBarView = NULL;
gFloaterView = NULL;
gMorphView = NULL;
@@ -2035,15 +2028,17 @@ void LLViewerWindow::shutdownGL()
llinfos << "All textures and llimagegl images are destroyed!" << llendl ;
llinfos << "Cleaning up select manager" << llendl;
- LLSelectMgr::getInstance()->cleanup();
-
- LLVertexBuffer::cleanupClass();
+ LLSelectMgr::getInstance()->cleanup();
llinfos << "Stopping GL during shutdown" << llendl;
stopGL(FALSE);
stop_glerror();
gGL.shutdown();
+
+ LLVertexBuffer::cleanupClass();
+
+ llinfos << "LLVertexBuffer cleaned." << llendl ;
}
// shutdownViews() and shutdownGL() need to be called first
@@ -2145,16 +2140,19 @@ void LLViewerWindow::reshape(S32 width, S32 height)
sendShapeToSim();
// store new settings for the mode we are in, regardless
- // Only save size if not maximized
BOOL maximized = mWindow->getMaximized();
gSavedSettings.setBOOL("WindowMaximized", maximized);
- LLCoordScreen window_size;
- if (!maximized
- && mWindow->getSize(&window_size))
+ if (!maximized)
{
- gSavedSettings.setS32("WindowWidth", window_size.mX);
- gSavedSettings.setS32("WindowHeight", window_size.mY);
+ U32 min_window_width=gSavedSettings.getU32("MinWindowWidth");
+ U32 min_window_height=gSavedSettings.getU32("MinWindowHeight");
+ // tell the OS specific window code about min window size
+ mWindow->setMinSize(min_window_width, min_window_height);
+
+ // Only save size if not maximized
+ gSavedSettings.setU32("WindowWidth", mWindowRectRaw.getWidth());
+ gSavedSettings.setU32("WindowHeight", mWindowRectRaw.getHeight());
}
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
@@ -2166,10 +2164,10 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// Hide normal UI when a logon fails
void LLViewerWindow::setNormalControlsVisible( BOOL visible )
{
- if(LLBottomTray::instanceExists())
+ if(LLChicletBar::instanceExists())
{
- LLBottomTray::getInstance()->setVisible(visible);
- LLBottomTray::getInstance()->setEnabled(visible);
+ LLChicletBar::getInstance()->setVisible(visible);
+ LLChicletBar::getInstance()->setEnabled(visible);
}
if ( gMenuBarView )
@@ -2191,7 +2189,9 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible )
LLNavigationBar* navbarp = LLUI::getRootView()->findChild<LLNavigationBar>("navigation_bar");
if (navbarp)
{
- navbarp->setVisible( visible );
+ // when it's time to show navigation bar we need to ensure that the user wants to see it
+ // i.e. ShowNavbarNavigationPanel option is true
+ navbarp->setVisible( visible && gSavedSettings.getBOOL("ShowNavbarNavigationPanel") );
}
}
@@ -2242,6 +2242,10 @@ void LLViewerWindow::drawDebugText()
gGL.color4f(1,1,1,1);
gGL.pushMatrix();
gGL.pushUIMatrix();
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
{
// scale view by UI global scale factor and aspect ratio correction factor
gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
@@ -2251,6 +2255,10 @@ void LLViewerWindow::drawDebugText()
gGL.popMatrix();
gGL.flush();
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
}
void LLViewerWindow::draw()
@@ -2265,9 +2273,9 @@ void LLViewerWindow::draw()
LLUI::setLineWidth(1.f);
// Reset any left-over transforms
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
- glLoadIdentity();
+ gGL.loadIdentity();
//S32 screen_x, screen_y;
@@ -2282,7 +2290,7 @@ void LLViewerWindow::draw()
// draw timecode block
std::string text;
- glLoadIdentity();
+ gGL.loadIdentity();
microsecondsToTimecodeString(gFrameTime,text);
const LLFontGL* font = LLFontGL::getFontSansSerif();
@@ -2296,6 +2304,11 @@ void LLViewerWindow::draw()
// Draw all nested UI views.
// No translation needed, this view is glued to 0,0
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
gGL.pushMatrix();
LLUI::pushMatrix();
{
@@ -2313,10 +2326,10 @@ void LLViewerWindow::draw()
int pos_y = sub_region / llceil(zoom_factor);
int pos_x = sub_region - (pos_y*llceil(zoom_factor));
// offset for this tile
- glTranslatef((F32)getWindowWidthScaled() * -(F32)pos_x,
+ gGL.translatef((F32)getWindowWidthScaled() * -(F32)pos_x,
(F32)getWindowHeightScaled() * -(F32)pos_y,
0.f);
- glScalef(zoom_factor, zoom_factor, 1.f);
+ gGL.scalef(zoom_factor, zoom_factor, 1.f);
LLUI::sGLScaleFactor *= zoom_factor;
}
@@ -2345,7 +2358,7 @@ void LLViewerWindow::draw()
S32 screen_x, screen_y;
top_ctrl->localPointToScreen(0, 0, &screen_x, &screen_y);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
LLUI::pushMatrix();
LLUI::translate( (F32) screen_x, (F32) screen_y, 0.f);
top_ctrl->draw();
@@ -2370,6 +2383,11 @@ void LLViewerWindow::draw()
LLUI::popMatrix();
gGL.popMatrix();
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
+
//#if LL_DEBUG
LLView::sIsDrawing = FALSE;
//#endif
@@ -2452,7 +2470,12 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// Traverses up the hierarchy
if( keyboard_focus )
{
- LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
+ LLNearbyChatBar* nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChatBar>("chat_bar");
+
+ if (nearby_chat)
+ {
+ LLLineEditor* chat_editor = nearby_chat->getChatBox();
+
// arrow keys move avatar while chatting hack
if (chat_editor && chat_editor->hasFocus())
{
@@ -2483,7 +2506,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
}
}
-
+ }
if (keyboard_focus->handleKey(key, mask, FALSE))
{
return TRUE;
@@ -2514,11 +2537,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
!keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) )
{
- LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
+ LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar")->getChatBox();
if (chat_editor)
{
// passing NULL here, character will be added later when it is handled by character handler.
- LLBottomTray::getInstance()->getNearbyChatBar()->startChat(NULL);
+ LLNearbyChatBar::getInstance()->startChat(NULL);
return TRUE;
}
}
@@ -3145,6 +3168,12 @@ void LLViewerWindow::updateLayout()
//gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible());
}
+ LLFloaterBuildOptions* build_options_floater = LLFloaterReg::findTypedInstance<LLFloaterBuildOptions>("build_options");
+ if (build_options_floater && build_options_floater->getVisible())
+ {
+ build_options_floater->updateGridMode();
+ }
+
// Always update console
if(gConsole)
{
@@ -3283,9 +3312,6 @@ void LLViewerWindow::updateKeyboardFocus()
// make sure floater visible order is in sync with tab order
gFloaterView->syncFloaterTabOrder();
}
-
- if(LLSideTray::instanceCreated())//just getInstance will create sidetray. we don't want this
- LLSideTray::getInstance()->highlightFocused();
}
static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View");
@@ -3309,12 +3335,6 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
new_world_rect.mTop = llround((F32)new_world_rect.mTop * mDisplayScale.mV[VY]);
}
- if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE)
- {
- // use right edge of window, ignoring sidebar
- new_world_rect.mRight = mWindowRectRaw.mRight;
- }
-
if (mWorldViewRectRaw != new_world_rect)
{
mWorldViewRectRaw = new_world_rect;
@@ -3398,17 +3418,17 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
LLBBox hud_bbox = gAgentAvatarp->getHUDBBox();
// set up transform to encompass bounding box of HUD
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
F32 depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
- glOrtho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, depth);
+ gGL.ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, depth);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- glLoadMatrixf(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame
- glTranslatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+ gGL.loadMatrix(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame
+ gGL.translatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f);
}
// Render light for editing
@@ -3418,12 +3438,12 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
LLGLEnable gls_blend(GL_BLEND);
LLGLEnable gls_cull(GL_CULL_FACE);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
if (selection->getSelectType() == SELECT_TYPE_HUD)
{
F32 zoom = gAgentCamera.mHUDCurZoom;
- glScalef(zoom, zoom, zoom);
+ gGL.scalef(zoom, zoom, zoom);
}
struct f : public LLSelectedObjectFunctor
@@ -3434,33 +3454,33 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
if (drawable && drawable->isLight())
{
LLVOVolume* vovolume = drawable->getVOVolume();
- glPushMatrix();
+ gGL.pushMatrix();
LLVector3 center = drawable->getPositionAgent();
- glTranslatef(center[0], center[1], center[2]);
+ gGL.translatef(center[0], center[1], center[2]);
F32 scale = vovolume->getLightRadius();
- glScalef(scale, scale, scale);
+ gGL.scalef(scale, scale, scale);
LLColor4 color(vovolume->getLightColor(), .5f);
- glColor4fv(color.mV);
+ gGL.color4fv(color.mV);
- F32 pixel_area = 100000.f;
+ //F32 pixel_area = 100000.f;
// Render Outside
- gSphere.render(pixel_area);
+ gSphere.render();
// Render Inside
glCullFace(GL_FRONT);
- gSphere.render(pixel_area);
+ gSphere.render();
glCullFace(GL_BACK);
- glPopMatrix();
+ gGL.popMatrix();
}
return true;
}
} func;
LLSelectMgr::getInstance()->getSelection()->applyToObjects(&func);
- glPopMatrix();
+ gGL.popMatrix();
}
// NOTE: The average position for the axis arrows of the selected objects should
@@ -3523,11 +3543,11 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
}
if (selection->getSelectType() == SELECT_TYPE_HUD && selection->getObjectCount())
{
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
stop_glerror();
}
}
@@ -3994,10 +4014,11 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
}
// Saves an image to the harddrive as "SnapshotX" where X >= 1.
-BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image)
+BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker)
{
if (!image)
{
+ llwarns << "No image to save" << llendl;
return FALSE;
}
@@ -4017,7 +4038,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image)
pick_type = LLFilePicker::FFSAVE_ALL; // ???
// Get a base file location if needed.
- if ( ! isSnapshotLocSet())
+ if (force_picker || !isSnapshotLocSet())
{
std::string proposed_name( sSnapshotBaseName );
@@ -4057,6 +4078,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image)
}
while( -1 != err ); // search until the file is not found (i.e., stat() gives an error).
+ llinfos << "Saving snapshot to " << filepath << llendl;
return image->save(filepath);
}
@@ -4065,25 +4087,18 @@ void LLViewerWindow::resetSnapshotLoc()
sSnapshotDir.clear();
}
-static S32 BORDERHEIGHT = 0;
-static S32 BORDERWIDTH = 0;
-
// static
void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
{
- LLCoordScreen size;
- gViewerWindow->mWindow->getSize(&size);
- if ( (size.mX != new_width + BORDERWIDTH)
- ||(size.mY != new_height + BORDERHEIGHT))
+ LLCoordWindow size;
+ gViewerWindow->getWindow()->getSize(&size);
+ if ( size.mX != new_width
+ || size.mY != new_height)
{
- // use actual display dimensions, not virtual UI dimensions
- S32 x = gViewerWindow->getWindowWidthRaw();
- S32 y = gViewerWindow->getWindowHeightRaw();
- BORDERWIDTH = size.mX - x;
- BORDERHEIGHT = size.mY- y;
- LLCoordScreen new_size(new_width + BORDERWIDTH,
- new_height + BORDERHEIGHT);
- gViewerWindow->mWindow->setSize(new_size);
+ LLCoordWindow new_size(new_width, new_height);
+ LLCoordScreen screen_size;
+ gViewerWindow->getWindow()->convertCoords(new_size, &screen_size);
+ gViewerWindow->getWindow()->setSize(screen_size);
}
}
@@ -4141,6 +4156,19 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
{
return FALSE;
}
+ //check if there is enough memory for the snapshot image
+ if(LLPipeline::sMemAllocationThrottled)
+ {
+ return FALSE ; //snapshot taking is disabled due to memory restriction.
+ }
+ if(image_width * image_height > (1 << 22)) //if snapshot image is larger than 2K by 2K
+ {
+ if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3))
+ {
+ llwarns << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << llendl ;
+ return FALSE ; //there is no enough memory for taking this snapshot.
+ }
+ }
// PRE SNAPSHOT
gDisplaySwapBuffers = FALSE;
@@ -4531,6 +4559,14 @@ void LLViewerWindow::setShowProgress(const BOOL show)
}
}
+void LLViewerWindow::setStartupComplete()
+{
+ if (mProgressView)
+ {
+ mProgressView->setStartupComplete();
+ }
+}
+
BOOL LLViewerWindow::getShowProgress() const
{
return (mProgressView && mProgressView->getVisible());
@@ -4620,10 +4656,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
gPipeline.destroyGL();
}
- gCone.cleanupGL();
gBox.cleanupGL();
- gSphere.cleanupGL();
- gCylinder.cleanupGL();
if(gPostProcess)
{
@@ -4697,6 +4730,9 @@ void LLViewerWindow::initFonts(F32 zoom_factor)
{
LLFontGL::destroyAllGL();
// Initialize with possibly different zoom factor
+
+ LLFontManager::initClass();
+
LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"),
mDisplayScale.mV[VX] * zoom_factor,
mDisplayScale.mV[VY] * zoom_factor,
@@ -4889,8 +4925,8 @@ S32 LLViewerWindow::getChatConsoleBottomPad()
{
S32 offset = 0;
- if(LLBottomTray::instanceExists())
- offset += LLBottomTray::getInstance()->getRect().getHeight();
+ if(gToolBarView)
+ offset += gToolBarView->getChild<LLView>("bottom_toolbar_panel")->getRect().getHeight();
return offset;
}
@@ -4946,6 +4982,35 @@ bool LLViewerWindow::onAlert(const LLSD& notify)
return false;
}
+void LLViewerWindow::setUIVisibility(bool visible)
+{
+ mUIVisible = visible;
+
+ if (!visible)
+ {
+ gAgentCamera.changeCameraToThirdPerson(FALSE);
+ gFloaterView->hideAllFloaters();
+ }
+ else
+ {
+ gFloaterView->showHiddenFloaters();
+ }
+
+ if (gToolBarView)
+ {
+ gToolBarView->setToolBarsVisible(visible);
+ }
+
+ mRootView->getChildView("topinfo_bar_container")->setVisible(visible);
+ mRootView->getChildView("nav_bar_container")->setVisible(visible);
+ mRootView->getChildView("status_bar_container")->setVisible(visible);
+}
+
+bool LLViewerWindow::getUIVisibility()
+{
+ return mUIVisible;
+}
+
////////////////////////////////////////////////////////////////////////////
//
// LLPickInfo
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index ff49ed1f62..6efcaeaf18 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -44,6 +44,7 @@
#include "llstat.h"
#include "llmousehandler.h"
#include "llhandle.h"
+#include "llinitparam.h"
#include <boost/function.hpp>
#include <boost/signals2.hpp>
@@ -62,6 +63,7 @@ class LLImageFormatted;
class LLHUDIcon;
class LLWindow;
class LLRootView;
+class LLWindowListener;
class LLViewerWindowListener;
class LLPopupView;
@@ -132,7 +134,23 @@ public:
//
// CREATORS
//
- LLViewerWindow(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, BOOL fullscreen, BOOL ignore_pixel_depth);
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Mandatory<std::string> title,
+ name;
+ Mandatory<S32> x,
+ y,
+ width,
+ height,
+ min_width,
+ min_height;
+ Optional<bool> fullscreen,
+ ignore_pixel_depth;
+
+ Params();
+ };
+
+ LLViewerWindow(const Params& p);
virtual ~LLViewerWindow();
void shutdownViews();
@@ -143,6 +161,8 @@ public:
void adjustRectanglesForFirstUse(const LLRect& window);
void adjustControlRectanglesForFirstUse(const LLRect& window);
void initWorldUI();
+ void setUIVisibility(bool);
+ bool getUIVisibility();
BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down);
@@ -272,6 +292,7 @@ public:
void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null );
LLProgressView *getProgressView() const;
void revealIntroPanel();
+ void setStartupComplete();
void updateObjectUnderCursor();
@@ -281,8 +302,7 @@ public:
void updateKeyboardFocus();
void updateWorldViewRect(bool use_full_window=false);
- LLView* getNonSideTrayView() { return mNonSideTrayView.get(); }
- LLView* getFloaterViewHolder() { return mFloaterViewHolder.get(); }
+ LLView* getToolBarHolder() { return mToolBarHolder.get(); }
LLView* getHintHolder() { return mHintHolder.get(); }
LLView* getLoginPanelHolder() { return mLoginPanelHolder.get(); }
BOOL handleKey(KEY key, MASK mask);
@@ -321,7 +341,7 @@ public:
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) ;
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
void resetSnapshotLoc() const { sSnapshotDir.clear(); }
- BOOL saveImageNumbered(LLImageFormatted *image);
+ BOOL saveImageNumbered(LLImageFormatted *image, bool force_picker = false);
// Reset the directory where snapshots are saved.
// Client will open directory picker on next snapshot save.
@@ -393,11 +413,10 @@ private:
S32 getChatConsoleBottomPad(); // Vertical padding for child console rect, varied by bottom clutter
LLRect getChatConsoleRect(); // Get optimal cosole rect.
-public:
+private:
LLWindow* mWindow; // graphical window object
-
-protected:
- BOOL mActive;
+ bool mActive;
+ bool mUIVisible;
LLRect mWindowRectRaw; // whole window, including UI
LLRect mWindowRectScaled; // whole window, scaled by UI size
@@ -443,8 +462,7 @@ protected:
std::string mInitAlert; // Window / GL initialization requires an alert
LLHandle<LLView> mWorldViewPlaceholder; // widget that spans the portion of screen dedicated to rendering the 3d world
- LLHandle<LLView> mNonSideTrayView; // parent of world view + bottom bar, etc...everything but the side tray
- LLHandle<LLView> mFloaterViewHolder; // container for floater_view
+ LLHandle<LLView> mToolBarHolder; // container for toolbars
LLHandle<LLView> mHintHolder; // container for hints
LLHandle<LLView> mLoginPanelHolder; // container for login panel
LLPopupView* mPopupView; // container for transient popups
@@ -455,15 +473,14 @@ protected:
bool mStatesDirty;
U32 mCurrResolutionIndex;
- boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener;
+ boost::scoped_ptr<LLWindowListener> mWindowListener;
+ boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener;
-protected:
static std::string sSnapshotBaseName;
static std::string sSnapshotDir;
static std::string sMovieBaseName;
-private:
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
};
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3f98df9eb9..4c33716c32 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1123,14 +1123,20 @@ void LLVOAvatar::initClass()
// Process XML data
// avatar_skeleton.xml
- llassert(!sAvatarSkeletonInfo);
+ if (sAvatarSkeletonInfo)
+ { //this can happen if a login attempt failed
+ delete sAvatarSkeletonInfo;
+ }
sAvatarSkeletonInfo = new LLVOAvatarSkeletonInfo;
if (!sAvatarSkeletonInfo->parseXml(sSkeletonXMLTree.getRoot()))
{
llerrs << "Error parsing skeleton XML file: " << skeleton_path << llendl;
}
// parse avatar_lad.xml
- llassert(!sAvatarXmlInfo);
+ if (sAvatarXmlInfo)
+ { //this can happen if a login attempt failed
+ deleteAndClear(sAvatarXmlInfo);
+ }
sAvatarXmlInfo = new LLVOAvatarXmlInfo;
if (!sAvatarXmlInfo->parseXmlSkeletonNode(root))
{
@@ -2111,8 +2117,8 @@ void LLVOAvatar::updateMeshData()
}
else
{
- if (buff->getRequestedIndices() == num_indices &&
- buff->getRequestedVerts() == num_vertices)
+ if (buff->getNumIndices() == num_indices &&
+ buff->getNumVerts() == num_vertices)
{
terse_update = true;
}
@@ -2132,11 +2138,19 @@ void LLVOAvatar::updateMeshData()
for(S32 k = j ; k < part_index ; k++)
{
- mMeshLOD[k]->updateFaceData(facep, mAdjustedPixelArea, k == MESH_ID_HAIR, terse_update);
+ bool rigid = false;
+ if (k == MESH_ID_EYEBALL_LEFT ||
+ k == MESH_ID_EYEBALL_RIGHT)
+ { //eyeballs can't have terse updates since they're never rendered with
+ //the hardware skinning shader
+ rigid = true;
+ }
+
+ mMeshLOD[k]->updateFaceData(facep, mAdjustedPixelArea, k == MESH_ID_HAIR, terse_update && !rigid);
}
stop_glerror();
- buff->setBuffer(0);
+ buff->flush();
if(!f_num)
{
@@ -2797,7 +2811,10 @@ void LLVOAvatar::idleUpdateLoadingEffect()
LLPartData::LL_PART_EMISSIVE_MASK | // LLPartData::LL_PART_FOLLOW_SRC_MASK |
LLPartData::LL_PART_TARGET_POS_MASK );
- setParticleSource(particle_parameters, getID());
+ if (!isTooComplex()) // do not generate particles for overly-complex avatars
+ {
+ setParticleSource(particle_parameters, getID());
+ }
}
}
}
@@ -4126,7 +4143,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
LLVertexBuffer* vb = mDrawable->getFace(0)->getVertexBuffer();
if (vb)
{
- vb->setBuffer(0);
+ vb->flush();
}
}
}
@@ -4219,7 +4236,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
bool should_alpha_mask = shouldAlphaMask();
LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
- if (should_alpha_mask)
+ if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction)
{
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
}
@@ -4248,7 +4265,10 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
}
}
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ }
if (!LLDrawPoolAvatar::sSkipTransparent || LLPipeline::sImpostorRender)
{
@@ -4331,7 +4351,7 @@ U32 LLVOAvatar::renderRigid()
bool should_alpha_mask = shouldAlphaMask();
LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
- if (should_alpha_mask)
+ if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction)
{
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
}
@@ -4342,7 +4362,10 @@ U32 LLVOAvatar::renderRigid()
num_indices += mMeshLOD[MESH_ID_EYEBALL_RIGHT]->render(mAdjustedPixelArea, TRUE, mIsDummy);
}
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ if (should_alpha_mask && !LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ }
return num_indices;
}
@@ -6377,6 +6400,11 @@ BOOL LLVOAvatar::getIsCloud()
{
return TRUE;
}
+
+ if (isTooComplex())
+ {
+ return TRUE;
+ }
return FALSE;
}
@@ -6471,6 +6499,16 @@ BOOL LLVOAvatar::isFullyLoaded() const
return mFullyLoaded;
}
+bool LLVOAvatar::isTooComplex() const
+{
+ if (gSavedSettings.getS32("RenderAvatarComplexityLimit") > 0 && mVisualComplexity >= gSavedSettings.getS32("RenderAvatarComplexityLimit"))
+ {
+ return true;
+ }
+
+ return false;
+}
+
//-----------------------------------------------------------------------------
// findMotion()
@@ -8304,8 +8342,8 @@ void LLVOAvatar::getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& d
void LLVOAvatar::idleUpdateRenderCost()
{
- static const U32 ARC_BODY_PART_COST = 20;
- static const U32 ARC_LIMIT = 2048;
+ static const U32 ARC_BODY_PART_COST = 200;
+ static const U32 ARC_LIMIT = 20000;
static std::set<LLUUID> all_textures;
@@ -8315,7 +8353,7 @@ void LLVOAvatar::idleUpdateRenderCost()
}
U32 cost = 0;
- std::set<LLUUID> textures;
+ LLVOVolume::texture_cost_t textures;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
@@ -8330,6 +8368,7 @@ void LLVOAvatar::idleUpdateRenderCost()
}
}
+
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
@@ -8342,6 +8381,7 @@ void LLVOAvatar::idleUpdateRenderCost()
const LLViewerObject* attached_object = (*attachment_iter);
if (attached_object && !attached_object->isHUDAttachment())
{
+ textures.clear();
const LLDrawable* drawable = attached_object->mDrawable;
if (drawable)
{
@@ -8349,6 +8389,25 @@ void LLVOAvatar::idleUpdateRenderCost()
if (volume)
{
cost += volume->getRenderCost(textures);
+
+ const_child_list_t children = volume->getChildren();
+ for (const_child_list_t::const_iterator child_iter = children.begin();
+ child_iter != children.end();
+ ++child_iter)
+ {
+ LLViewerObject* child_obj = *child_iter;
+ LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
+ if (child)
+ {
+ cost += child->getRenderCost(textures);
+ }
+ }
+
+ for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ {
+ // add the cost of each individual texture in the linkset
+ cost += iter->second;
+ }
}
}
}
@@ -8356,15 +8415,17 @@ void LLVOAvatar::idleUpdateRenderCost()
}
+
+
// Diagnostic output to identify all avatar-related textures.
// Does not affect rendering cost calculation.
// Could be wrapped in a debug option if output becomes problematic.
if (isSelf())
{
// print any attachment textures we didn't already know about.
- for (std::set<LLUUID>::iterator it = textures.begin(); it != textures.end(); ++it)
+ for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it)
{
- LLUUID image_id = *it;
+ LLUUID image_id = it->first;
if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
continue;
if (all_textures.find(image_id) == all_textures.end())
@@ -8396,9 +8457,8 @@ void LLVOAvatar::idleUpdateRenderCost()
}
}
- cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST;
-
setDebugText(llformat("%d", cost));
+ mVisualComplexity = cost;
F32 green = 1.f-llclamp(((F32) cost-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f);
F32 red = llmin((F32) cost/(F32)ARC_LIMIT, 1.f);
mText->setColor(LLColor4(red,green,0,1));
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 03c0498a2a..e53b8e3f4b 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -273,6 +273,7 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
+ bool isTooComplex() const;
bool visualParamWeightsAreDefault();
protected:
virtual BOOL getIsCloud();
@@ -285,6 +286,7 @@ private:
BOOL mPreviousFullyLoaded;
BOOL mFullyLoadedInitialized;
S32 mFullyLoadedFrameCounter;
+ S32 mVisualComplexity;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
protected:
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 59883e0bb1..581912f844 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2558,7 +2558,7 @@ void LLVOAvatarSelf::deleteScratchTextures()
LLImageGL::decTextureCounter(tex_size, 1, LLViewerTexture::AVATAR_SCRATCH_TEX) ;
total_tex_size -= tex_size ;
}
- if( sScratchTexNames.checkData( GL_LUMINANCE_ALPHA ) )
+ if( sScratchTexNames.checkData( LLRender::sGLCoreProfile ? GL_RG : GL_LUMINANCE_ALPHA ) )
{
LLImageGL::decTextureCounter(tex_size, 2, LLViewerTexture::AVATAR_SCRATCH_TEX) ;
total_tex_size -= 2 * tex_size ;
@@ -2600,89 +2600,6 @@ void LLVOAvatarSelf::deleteScratchTextures()
}
}
-BOOL LLVOAvatarSelf::bindScratchTexture( LLGLenum format )
-{
- U32 texture_bytes = 0;
- S32 components = 0;
- GLuint gl_name = getScratchTexName( format, components, &texture_bytes );
- if( gl_name )
- {
- gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, gl_name);
- stop_glerror();
-
- F32* last_bind_time = sScratchTexLastBindTime.getIfThere( format );
- if( last_bind_time )
- {
- if( *last_bind_time != LLImageGL::sLastFrameTime )
- {
- *last_bind_time = LLImageGL::sLastFrameTime;
- LLImageGL::updateBoundTexMem(texture_bytes, components, LLViewerTexture::AVATAR_SCRATCH_TEX) ;
- }
- }
- else
- {
- LLImageGL::updateBoundTexMem(texture_bytes, components, LLViewerTexture::AVATAR_SCRATCH_TEX) ;
- sScratchTexLastBindTime.addData( format, new F32(LLImageGL::sLastFrameTime) );
- }
- return TRUE;
- }
- return FALSE;
-}
-
-LLGLuint LLVOAvatarSelf::getScratchTexName( LLGLenum format, S32& components, U32* texture_bytes )
-{
- GLenum internal_format;
- switch( format )
- {
- case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break;
- case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break;
- case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break;
- case GL_RGB: components = 3; internal_format = GL_RGB8; break;
- case GL_RGBA: components = 4; internal_format = GL_RGBA8; break;
- default: llassert(0); components = 4; internal_format = GL_RGBA8; break;
- }
-
- *texture_bytes = components * SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT;
-
- if( sScratchTexNames.checkData( format ) )
- {
- return *( sScratchTexNames.getData( format ) );
- }
-
- LLGLSUIDefault gls_ui;
-
- U32 name = 0;
- LLImageGL::generateTextures(1, &name );
- stop_glerror();
-
- gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, name);
- stop_glerror();
-
- LLImageGL::setManualImage(
- GL_TEXTURE_2D, 0, internal_format,
- SCRATCH_TEX_WIDTH, SCRATCH_TEX_HEIGHT,
- format, GL_UNSIGNED_BYTE, NULL );
- stop_glerror();
-
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
- stop_glerror();
-
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- stop_glerror();
-
- sScratchTexNames.addData( format, new LLGLuint( name ) );
-
- sScratchTexBytes += *texture_bytes;
- LLImageGL::sGlobalTextureMemoryInBytes += *texture_bytes;
-
- if(gAuditTexture)
- {
- LLImageGL::incTextureCounter(SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, components, LLViewerTexture::AVATAR_SCRATCH_TEX) ;
- }
- return name;
-}
-
// static
void LLVOAvatarSelf::dumpScratchTextureByteCount()
{
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 51f06dee5f..74ff47a3e4 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -249,10 +249,7 @@ public:
// Scratch textures (used for compositing)
//--------------------------------------------------------------------
public:
- BOOL bindScratchTexture(LLGLenum format);
static void deleteScratchTextures();
-protected:
- LLGLuint getScratchTexName(LLGLenum format, S32& components, U32* texture_bytes);
private:
static S32 sScratchTexBytes;
static LLMap< LLGLenum, LLGLuint*> sScratchTexNames;
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index f0b5b50feb..7db19c5c1b 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -621,16 +621,20 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
S32 num_entries;
success = check_read(&apr_file, &num_entries, sizeof(S32)) ;
- for (S32 i = 0; success && i < num_entries; i++)
+ if(success)
{
- LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
- if (!entry->getLocalID())
+ for (S32 i = 0; i < num_entries; i++)
{
- llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
- delete entry ;
- success = false ;
+ LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
+ if (!entry->getLocalID())
+ {
+ llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
+ delete entry ;
+ success = false ;
+ break ;
+ }
+ cache_entry_map[entry->getLocalID()] = entry;
}
- cache_entry_map[entry->getLocalID()] = entry;
}
}
}
@@ -747,4 +751,3 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
return ;
}
-
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 32822e1181..8a79d564d3 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -464,7 +464,7 @@ void LLVOGrass::plantBlades()
}
void LLVOGrass::getGeometry(S32 idx,
- LLStrider<LLVector3>& verticesp,
+ LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
@@ -516,21 +516,24 @@ void LLVOGrass::getGeometry(S32 idx,
position.mV[0] = mPosition.mV[VX] + x + xf;
position.mV[1] = mPosition.mV[VY] + y + yf;
position.mV[2] = mRegionp->getLand().resolveHeightRegion(position);
- *verticesp++ = v1 = position + mRegionp->getOriginAgent();
- *verticesp++ = v1;
+ v1 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v1.mV);
+ (*verticesp++).load3(v1.mV);
position.mV[0] += dzx;
position.mV[1] += dzy;
position.mV[2] += blade_height;
- *verticesp++ = v2 = position + mRegionp->getOriginAgent();
- *verticesp++ = v2;
+ v2 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v2.mV);
+ (*verticesp++).load3(v2.mV);
position.mV[0] = mPosition.mV[VX] + x - xf;
position.mV[1] = mPosition.mV[VY] + y - xf;
position.mV[2] = mRegionp->getLand().resolveHeightRegion(position);
- *verticesp++ = v3 = position + mRegionp->getOriginAgent();
- *verticesp++ = v3;
+ v3 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v3.mV);
+ (*verticesp++).load3(v3.mV);
LLVector3 normal1 = (v1-v2) % (v2-v3);
normal1.mV[VZ] = 0.75f;
@@ -541,8 +544,9 @@ void LLVOGrass::getGeometry(S32 idx,
position.mV[0] += dzx;
position.mV[1] += dzy;
position.mV[2] += blade_height;
- *verticesp++ = v1 = position + mRegionp->getOriginAgent();
- *verticesp++ = v1;
+ v1 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v1.mV);
+ (*verticesp++).load3(v1.mV);
*(normalsp++) = normal1;
*(normalsp++) = normal2;
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index c262fdcc79..00a59facf7 100644
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -59,7 +59,7 @@ public:
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
/*virtual*/ void getGeometry(S32 idx,
- LLStrider<LLVector3>& verticesp,
+ LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp
index ce256fdedf..0060f81ab5 100644
--- a/indra/newview/llvoground.cpp
+++ b/indra/newview/llvoground.cpp
@@ -162,7 +162,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable)
*(texCoordsp++) = LLVector2(0.f, 1.f);
*(texCoordsp++) = LLVector2(0.5f, 0.5f);
- face->getVertexBuffer()->setBuffer(0);
+ face->getVertexBuffer()->flush();
LLPipeline::sCompiles++;
return TRUE;
}
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index cd2bbad620..3959a021fe 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -55,13 +55,12 @@
#include "llimview.h" // for LLIMMgr
#include "llparcel.h"
#include "llviewerparcelmgr.h"
-//#include "llfirstuse.h"
+#include "llfirstuse.h"
#include "llspeakers.h"
#include "lltrans.h"
#include "llviewerwindow.h"
#include "llviewercamera.h"
-#include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel
#include "llviewernetwork.h"
#include "llnotificationsutil.h"
@@ -4498,17 +4497,25 @@ bool LLVivoxVoiceClient::parcelVoiceInfoReceived(state requesting_state)
bool LLVivoxVoiceClient::requestParcelVoiceInfo()
{
- LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
-
- // grab the cap for parcel voice info from the region.
LLViewerRegion * region = gAgent.getRegion();
- if (region == NULL)
+ if (region == NULL || !region->capabilitiesReceived())
{
+ // we don't have the cap yet, so return false so the caller can try again later.
+
+ LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest capability not yet available, deferring" << LL_ENDL;
return false;
}
+
// grab the cap.
std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest");
- if (!url.empty())
+ if (url.empty())
+ {
+ // Region dosn't have the cap. Stop probing.
+ LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest capability not available in this region" << LL_ENDL;
+ setState(stateDisableCleanup);
+ return false;
+ }
+ else
{
// if we've already retrieved the cap from the region, go ahead and make the request,
// and return true so we can go into the state that waits for the response.
@@ -4517,18 +4524,11 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()
LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
LLHTTPClient::post(
- url,
- data,
- new LLVivoxVoiceClientCapResponder(getState()));
+ url,
+ data,
+ new LLVivoxVoiceClientCapResponder(getState()));
return true;
}
- else
- {
-
- // we don't have the cap yet, so return false so the caller can try again later.
- LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest cap not yet available, deferring" << LL_ENDL;
- return false;
- }
}
void LLVivoxVoiceClient::switchChannel(
@@ -6257,6 +6257,19 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
it = mStatusObservers.upper_bound(observer);
}
+ // skipped to avoid speak button blinking
+ if ( status != LLVoiceClientStatusObserver::STATUS_JOINING
+ && status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL)
+ {
+ bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
+
+ gAgent.setVoiceConnected(voice_status);
+
+ if (voice_status)
+ {
+ LLFirstUse::speak(true);
+ }
+ }
}
void LLVivoxVoiceClient::addObserver(LLFriendObserver* observer)
@@ -7049,6 +7062,8 @@ LLVivoxProtocolParser::~LLVivoxProtocolParser()
XML_ParserFree(parser);
}
+static LLFastTimer::DeclareTimer FTM_VIVOX_PROCESS("Vivox Process");
+
// virtual
LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
const LLChannelDescriptors& channels,
@@ -7057,6 +7072,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
LLSD& context,
LLPumpIO* pump)
{
+ LLFastTimer t(FTM_VIVOX_PROCESS);
LLBufferStream istr(channels, buffer.get());
std::ostringstream ostr;
while (istr.good())
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index a4b0910c92..5c10a80b07 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -274,7 +274,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
}
void LLVOPartGroup::getGeometry(S32 idx,
- LLStrider<LLVector3>& verticesp,
+ LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
@@ -290,37 +290,54 @@ void LLVOPartGroup::getGeometry(S32 idx,
U32 vert_offset = mDrawable->getFace(idx)->getGeomIndex();
- LLVector3 part_pos_agent(part.mPosAgent);
- LLVector3 camera_agent = getCameraPosition();
- LLVector3 at = part_pos_agent - camera_agent;
- LLVector3 up;
- LLVector3 right;
-
- right = at % LLVector3(0.f, 0.f, 1.f);
- right.normalize();
- up = right % at;
- up.normalize();
+ LLVector4a part_pos_agent;
+ part_pos_agent.load3(part.mPosAgent.mV);
+ LLVector4a camera_agent;
+ camera_agent.load3(getCameraPosition().mV);
+ LLVector4a at;
+ at.setSub(part_pos_agent, camera_agent);
+ LLVector4a up(0, 0, 1);
+ LLVector4a right;
+
+ right.setCross3(at, up);
+ right.normalize3fast();
+ up.setCross3(right, at);
+ up.normalize3fast();
if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)
{
- LLVector3 normvel = part.mVelocity;
- normvel.normalize();
+ LLVector4a normvel;
+ normvel.load3(part.mVelocity.mV);
+ normvel.normalize3fast();
LLVector2 up_fracs;
- up_fracs.mV[0] = normvel*right;
- up_fracs.mV[1] = normvel*up;
+ up_fracs.mV[0] = normvel.dot3(right).getF32();
+ up_fracs.mV[1] = normvel.dot3(up).getF32();
up_fracs.normalize();
- LLVector3 new_up;
- LLVector3 new_right;
- new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
- new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
+ LLVector4a new_up;
+ LLVector4a new_right;
+
+ //new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
+ LLVector4a t = right;
+ t.mul(up_fracs.mV[0]);
+ new_up = up;
+ new_up.mul(up_fracs.mV[1]);
+ new_up.add(t);
+
+ //new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
+ t = right;
+ t.mul(up_fracs.mV[1]);
+ new_right = up;
+ new_right.mul(up_fracs.mV[0]);
+ t.sub(new_right);
+
up = new_up;
- right = new_right;
- up.normalize();
- right.normalize();
+ right = t;
+ up.normalize3fast();
+ right.normalize3fast();
}
- right *= 0.5f*part.mScale.mV[0];
- up *= 0.5f*part.mScale.mV[1];
+ right.mul(0.5f*part.mScale.mV[0]);
+ up.mul(0.5f*part.mScale.mV[1]);
LLVector3 normal = -LLViewerCamera::getInstance()->getXAxis();
@@ -329,14 +346,25 @@ void LLVOPartGroup::getGeometry(S32 idx,
// this works because there is actually a 4th float stored after the vertex position which is used as a texture index
// also, somebody please VECTORIZE THIS
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent + up - right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent - up - right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent + up + right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent - up + right;
+ LLVector4a ppapu;
+ LLVector4a ppamu;
+
+ ppapu.setAdd(part_pos_agent, up);
+ ppamu.setSub(part_pos_agent, up);
+
+ verticesp->setSub(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setSub(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+
+ //*verticesp++ = part_pos_agent + up - right;
+ //*verticesp++ = part_pos_agent - up - right;
+ //*verticesp++ = part_pos_agent + up + right;
+ //*verticesp++ = part_pos_agent - up + right;
*colorsp++ = part.mColor;
*colorsp++ = part.mColor;
@@ -453,7 +481,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLVertexBuffer* buffer = group->mVertexBuffer;
LLStrider<U16> indicesp;
- LLStrider<LLVector3> verticesp;
+ LLStrider<LLVector4a> verticesp;
LLStrider<LLVector3> normalsp;
LLStrider<LLVector2> texcoordsp;
LLStrider<LLColor4U> colorsp;
@@ -513,7 +541,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
}
}
- buffer->setBuffer(0);
+ buffer->flush();
mFaceList.clear();
}
diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h
index 4db893b4ef..e58fed86d9 100644
--- a/indra/newview/llvopartgroup.h
+++ b/indra/newview/llvopartgroup.h
@@ -60,7 +60,7 @@ public:
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
void getGeometry(S32 idx,
- LLStrider<LLVector3>& verticesp,
+ LLStrider<LLVector4a>& verticesp,
LLStrider<LLVector3>& normalsp,
LLStrider<LLVector2>& texcoordsp,
LLStrider<LLColor4U>& colorsp,
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 66ba6249d3..e9db37821b 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -755,6 +755,11 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo
// project the direction ray onto the sky dome.
F32 phi = acos(Pn[1]);
F32 sinA = sin(F_PI - phi);
+ if (fabsf(sinA) < 0.01f)
+ { //avoid division by zero
+ sinA = 0.01f;
+ }
+
F32 Plen = dome_radius * sin(F_PI + phi + asin(dome_offset_ratio * sinA)) / sinA;
Pn *= Plen;
@@ -1262,7 +1267,7 @@ void LLVOSky::updateDummyVertexBuffer()
LLStrider<LLVector3> vertices ;
mFace[FACE_DUMMY]->getVertexBuffer()->getVertexStrider(vertices, 0);
*vertices = mCameraPosAgent ;
- mFace[FACE_DUMMY]->getVertexBuffer()->setBuffer(0) ;
+ mFace[FACE_DUMMY]->getVertexBuffer()->flush();
}
//----------------------------------
//end of fake vertex buffer updating
@@ -1346,7 +1351,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable)
*indicesp++ = index_offset + 3;
*indicesp++ = index_offset + 2;
- buff->setBuffer(0);
+ buff->flush();
}
}
@@ -1511,7 +1516,7 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons
*indicesp++ = index_offset + 2;
*indicesp++ = index_offset + 3;
- facep->getVertexBuffer()->setBuffer(0);
+ facep->getVertexBuffer()->flush();
if (is_sun)
{
@@ -2025,7 +2030,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H,
}
}
- face->getVertexBuffer()->setBuffer(0);
+ face->getVertexBuffer()->flush();
}
@@ -2035,9 +2040,12 @@ void LLVOSky::updateFog(const F32 distance)
{
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG))
{
- glFogf(GL_FOG_DENSITY, 0);
- glFogfv(GL_FOG_COLOR, (F32 *) &LLColor4::white.mV);
- glFogf(GL_FOG_END, 1000000.f);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glFogf(GL_FOG_DENSITY, 0);
+ glFogfv(GL_FOG_COLOR, (F32 *) &LLColor4::white.mV);
+ glFogf(GL_FOG_END, 1000000.f);
+ }
return;
}
@@ -2107,7 +2115,10 @@ void LLVOSky::updateFog(const F32 distance)
if (camera_height > water_height)
{
LLColor4 fog(render_fog_color);
- glFogfv(GL_FOG_COLOR, fog.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glFogfv(GL_FOG_COLOR, fog.mV);
+ }
mGLFogCol = fog;
if (hide_clip_plane)
@@ -2115,13 +2126,19 @@ void LLVOSky::updateFog(const F32 distance)
// For now, set the density to extend to the cull distance.
const F32 f_log = 2.14596602628934723963618357029f; // sqrt(fabs(log(0.01f)))
fog_density = f_log/fog_distance;
- glFogi(GL_FOG_MODE, GL_EXP2);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glFogi(GL_FOG_MODE, GL_EXP2);
+ }
}
else
{
const F32 f_log = 4.6051701859880913680359829093687f; // fabs(log(0.01f))
fog_density = (f_log)/fog_distance;
- glFogi(GL_FOG_MODE, GL_EXP);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glFogi(GL_FOG_MODE, GL_EXP);
+ }
}
}
else
@@ -2141,23 +2158,29 @@ void LLVOSky::updateFog(const F32 distance)
fogCol.setAlpha(1);
// set the gl fog color
- glFogfv(GL_FOG_COLOR, (F32 *) &fogCol.mV);
mGLFogCol = fogCol;
// set the density based on what the shaders use
fog_density = water_fog_density * gSavedSettings.getF32("WaterGLFogDensityScale");
- glFogi(GL_FOG_MODE, GL_EXP2);
+
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glFogfv(GL_FOG_COLOR, (F32 *) &fogCol.mV);
+ glFogi(GL_FOG_MODE, GL_EXP2);
+ }
}
mFogColor = sky_fog_color;
mFogColor.setAlpha(1);
- LLGLSFog gls_fog;
+ LLDrawPoolWater::sWaterFogEnd = fog_distance*2.2f;
- glFogf(GL_FOG_END, fog_distance*2.2f);
-
- glFogf(GL_FOG_DENSITY, fog_density);
-
- glHint(GL_FOG_HINT, GL_NICEST);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ LLGLSFog gls_fog;
+ glFogf(GL_FOG_END, fog_distance*2.2f);
+ glFogf(GL_FOG_DENSITY, fog_density);
+ glHint(GL_FOG_HINT, GL_NICEST);
+ }
stop_glerror();
}
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index 510525259f..c3a2e6a712 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -57,8 +57,14 @@ public:
};
// virtual
- void setupVertexBuffer(U32 data_mask) const
+ void setupVertexBuffer(U32 data_mask)
{
+ if (LLGLSLShader::sNoFixedFunction)
+ { //just use default if shaders are in play
+ LLVertexBuffer::setupVertexBuffer(data_mask & ~(MAP_TEXCOORD2 | MAP_TEXCOORD3));
+ return;
+ }
+
U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;
//assume tex coords 2 and 3 are present
@@ -106,20 +112,6 @@ public:
glColorPointer(4, GL_UNSIGNED_BYTE, LLVertexBuffer::sTypeSize[TYPE_COLOR], (void*)(base + mOffsets[TYPE_COLOR]));
}
- if (data_mask & MAP_WEIGHT)
- {
- glVertexAttribPointerARB(1, 1, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT], (void*)(base + mOffsets[TYPE_WEIGHT]));
- }
-
- if (data_mask & MAP_WEIGHT4 && sWeight4Loc != -1)
- {
- glVertexAttribPointerARB(sWeight4Loc, 4, GL_FLOAT, FALSE, LLVertexBuffer::sTypeSize[TYPE_WEIGHT4], (void*)(base+mOffsets[TYPE_WEIGHT4]));
- }
-
- if (data_mask & MAP_CLOTHWEIGHT)
- {
- glVertexAttribPointerARB(4, 4, GL_FLOAT, TRUE, LLVertexBuffer::sTypeSize[TYPE_CLOTHWEIGHT], (void*)(base + mOffsets[TYPE_CLOTHWEIGHT]));
- }
if (data_mask & MAP_VERTEX)
{
glVertexPointer(3,GL_FLOAT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], (void*)(base + 0));
@@ -325,7 +317,6 @@ BOOL LLVOSurfacePatch::updateLOD()
void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp)
@@ -337,7 +328,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp,
updateMainGeometry(facep,
verticesp,
normalsp,
- colorsp,
texCoords0p,
texCoords1p,
indicesp,
@@ -345,7 +335,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp,
updateNorthGeometry(facep,
verticesp,
normalsp,
- colorsp,
texCoords0p,
texCoords1p,
indicesp,
@@ -353,7 +342,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp,
updateEastGeometry(facep,
verticesp,
normalsp,
- colorsp,
texCoords0p,
texCoords1p,
indicesp,
@@ -363,7 +351,6 @@ void LLVOSurfacePatch::getGeometry(LLStrider<LLVector3> &verticesp,
void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp,
@@ -404,7 +391,6 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
x = i * render_stride;
y = j * render_stride;
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
- *colorsp++ = LLColor4U::white;
verticesp++;
normalsp++;
texCoords0p++;
@@ -469,7 +455,6 @@ void LLVOSurfacePatch::updateMainGeometry(LLFace *facep,
void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp,
@@ -507,7 +492,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
y = 16 - render_stride;
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
- *colorsp++ = LLColor4U::white;
verticesp++;
normalsp++;
texCoords0p++;
@@ -523,7 +507,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -562,7 +545,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -577,7 +559,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -621,7 +602,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
y = 16 - render_stride;
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
- *colorsp++ = LLColor4U::white;
verticesp++;
normalsp++;
texCoords0p++;
@@ -638,7 +618,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
vertex_count++;
@@ -676,7 +655,6 @@ void LLVOSurfacePatch::updateNorthGeometry(LLFace *facep,
void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp,
@@ -710,7 +688,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -723,7 +700,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -761,7 +737,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -774,7 +749,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -818,7 +792,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -831,7 +804,6 @@ void LLVOSurfacePatch::updateEastGeometry(LLFace *facep,
mPatchp->eval(x, y, render_stride, verticesp.get(), normalsp.get(), texCoords0p.get(), texCoords1p.get());
verticesp++;
normalsp++;
- *colorsp++ = LLColor4U::white;
texCoords0p++;
texCoords1p++;
}
@@ -1063,6 +1035,8 @@ void LLVOSurfacePatch::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newM
{
LLVector3 posAgent = getPositionAgent();
LLVector3 scale = getScale();
+ //make z-axis scale at least 1 to avoid shadow artifacts on totally flat land
+ scale.mV[VZ] = llmax(scale.mV[VZ], 1.f);
newMin.load3( (posAgent-scale*0.5f).mV); // Changing to 2.f makes the culling a -little- better, but still wrong
newMax.load3( (posAgent+scale*0.5f).mV);
LLVector4a pos;
@@ -1102,14 +1076,12 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
LLStrider<LLVector3> normals;
LLStrider<LLVector2> texcoords2;
LLStrider<LLVector2> texcoords;
- LLStrider<LLColor4U> colors;
LLStrider<U16> indices;
llassert_always(buffer->getVertexStrider(vertices));
llassert_always(buffer->getNormalStrider(normals));
llassert_always(buffer->getTexCoord0Strider(texcoords));
llassert_always(buffer->getTexCoord1Strider(texcoords2));
- llassert_always(buffer->getColorStrider(colors));
llassert_always(buffer->getIndexStrider(indices));
U32 indices_index = 0;
@@ -1124,13 +1096,13 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group)
facep->setVertexBuffer(buffer);
LLVOSurfacePatch* patchp = (LLVOSurfacePatch*) facep->getViewerObject();
- patchp->getGeometry(vertices, normals, colors, texcoords, texcoords2, indices);
+ patchp->getGeometry(vertices, normals, texcoords, texcoords2, indices);
indices_index += facep->getIndicesCount();
index_offset += facep->getGeomCount();
}
- buffer->setBuffer(0);
+ buffer->flush();
mFaceList.clear();
}
diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h
index 8e75ff2e6e..a15878368e 100644
--- a/indra/newview/llvosurfacepatch.h
+++ b/indra/newview/llvosurfacepatch.h
@@ -44,8 +44,7 @@ public:
VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) |
(1 << LLVertexBuffer::TYPE_NORMAL) |
(1 << LLVertexBuffer::TYPE_TEXCOORD0) |
- (1 << LLVertexBuffer::TYPE_TEXCOORD1) |
- (1 << LLVertexBuffer::TYPE_COLOR)
+ (1 << LLVertexBuffer::TYPE_TEXCOORD1)
};
LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
@@ -64,7 +63,6 @@ public:
/*virtual*/ void updateFaceSize(S32 idx);
void getGeometry(LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp);
@@ -116,7 +114,6 @@ protected:
void updateMainGeometry(LLFace *facep,
LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp,
@@ -124,7 +121,6 @@ protected:
void updateNorthGeometry(LLFace *facep,
LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp,
@@ -132,7 +128,6 @@ protected:
void updateEastGeometry(LLFace *facep,
LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
- LLStrider<LLColor4U> &colorsp,
LLStrider<LLVector2> &texCoords0p,
LLStrider<LLVector2> &texCoords1p,
LLStrider<U16> &indicesp,
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp
deleted file mode 100644
index a92172fe23..0000000000
--- a/indra/newview/llvotextbubble.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * @file llvotextbubble.cpp
- * @brief Viewer-object text bubble.
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llvotextbubble.h"
-
-#include "imageids.h"
-#include "llviewercontrol.h"
-#include "llprimitive.h"
-#include "llrendersphere.h"
-
-#include "llbox.h"
-#include "lldrawable.h"
-#include "llface.h"
-#include "llviewertexturelist.h"
-#include "llvolume.h"
-#include "pipeline.h"
-#include "llvector4a.h"
-#include "llviewerregion.h"
-
-LLVOTextBubble::LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
-: LLAlphaObject(id, pcode, regionp)
-{
- setScale(LLVector3(1.5f, 1.5f, 0.25f));
- mbCanSelect = FALSE;
- mLOD = MIN_LOD;
- mVolumeChanged = TRUE;
- setVelocity(LLVector3(0.f, 0.f, 0.75f));
- LLVolumeParams volume_params;
- volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_LINE);
- volume_params.setBeginAndEndS(0.f, 1.f);
- volume_params.setBeginAndEndT(0.f, 1.f);
- volume_params.setRatio(0.25f, 0.25f);
- volume_params.setShear(0.f, 0.f);
- setVolume(volume_params, 0);
- mColor = LLColor4(1.0f, 0.0f, 0.0f, 1.f);
- S32 i;
- for (i = 0; i < getNumTEs(); i++)
- {
- setTEColor(i, mColor);
- setTETexture(i, LLUUID(IMG_DEFAULT));
- }
-}
-
-
-LLVOTextBubble::~LLVOTextBubble()
-{
-}
-
-
-BOOL LLVOTextBubble::isActive() const
-{
- return TRUE;
-}
-
-BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
-{
- static LLFastTimer::DeclareTimer ftm("Text Bubble");
- LLFastTimer t(ftm);
-
- F32 dt = mUpdateTimer.getElapsedTimeF32();
- // Die after a few seconds.
- if (dt > 1.5f)
- {
- return FALSE;
- }
-
- LLViewerObject::idleUpdate(agent, world, time);
-
- setScale(0.5f * (1.f+dt) * LLVector3(1.5f, 1.5f, 0.5f));
-
- F32 alpha = 0.35f*dt;
-
- LLColor4 color = mColor;
- color.mV[VALPHA] -= alpha;
- if (color.mV[VALPHA] <= 0.05f)
- {
- return FALSE;
- }
- S32 i;
- for (i = 0; i < getNumTEs(); i++)
- {
- setTEColor(i, color);
- setTEFullbright(i, TRUE);
- }
-
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
- return TRUE;
-}
-
-
-void LLVOTextBubble::updateTextures()
-{
- // Update the image levels of all textures...
-
- for (U32 i = 0; i < getNumTEs(); i++)
- {
- const LLTextureEntry *te = getTE(i);
- F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT);
- texel_area_ratio = llclamp(texel_area_ratio, .125f, 16.f);
- LLViewerTexture *imagep = getTEImage(i);
- if (imagep)
- {
- imagep->addTextureStats(mPixelArea / texel_area_ratio);
- }
- }
-}
-
-
-LLDrawable *LLVOTextBubble::createDrawable(LLPipeline *pipeline)
-{
- pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
- mDrawable->setRenderType(LLPipeline::RENDER_TYPE_VOLUME);
-
- for (U32 i = 0; i < getNumTEs(); i++)
- {
- LLViewerTexture *imagep;
- const LLTextureEntry *texture_entry = getTE(i);
- imagep = LLViewerTextureManager::getFetchedTexture(texture_entry->getID());
-
- mDrawable->addFace((LLFacePool*) NULL, imagep);
- }
-
- return mDrawable;
-}
-
-// virtual
-BOOL LLVOTextBubble::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
-{
- if (LLPrimitive::setVolume(volume_params, mLOD))
- {
- if (mDrawable)
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
- mVolumeChanged = TRUE;
- }
- return TRUE;
- }
- return FALSE;
-}
-
-
-BOOL LLVOTextBubble::updateLOD()
-{
- return FALSE;
-}
-
-BOOL LLVOTextBubble::updateGeometry(LLDrawable *drawable)
-{
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_VOLUME)))
- return TRUE;
-
- if (mVolumeChanged)
- {
- LLVolumeParams volume_params = getVolume()->getParams();
- setVolume(volume_params, 0);
-
- LLPipeline::sCompiles++;
-
- drawable->setNumFaces(getVolume()->getNumFaces(), drawable->getFace(0)->getPool(), getTEImage(0));
- }
-
- LLMatrix4 identity4;
- LLMatrix3 identity3;
- for (S32 i = 0; i < drawable->getNumFaces(); i++)
- {
- LLFace *face = drawable->getFace(i);
- face->setTEOffset(i);
- face->setTexture(LLViewerFetchedTexture::sSmokeImagep);
- face->setState(LLFace::FULLBRIGHT);
- }
-
- mVolumeChanged = FALSE;
-
- mDrawable->movePartition();
- return TRUE;
-}
-
-void LLVOTextBubble::updateFaceSize(S32 idx)
-{
- LLFace* face = mDrawable->getFace(idx);
-
- if (idx == 0 || idx == 2)
- {
- face->setSize(0,0);
- }
- else
- {
- const LLVolumeFace& vol_face = getVolume()->getVolumeFace(idx);
- face->setSize(vol_face.mNumVertices, vol_face.mNumIndices);
- }
-}
-
-void LLVOTextBubble::getGeometry(S32 idx,
- LLStrider<LLVector3>& verticesp,
- LLStrider<LLVector3>& normalsp,
- LLStrider<LLVector2>& texcoordsp,
- LLStrider<LLColor4U>& colorsp,
- LLStrider<U16>& indicesp)
-{
- if (idx == 0 || idx == 2)
- {
- return;
- }
-
- const LLVolumeFace& face = getVolume()->getVolumeFace(idx);
-
- LLVector4a pos;
- pos.load3(getPositionAgent().mV);
-
- LLVector4a scale;
- scale.load3(getScale().mV);
-
- LLColor4U color = LLColor4U(getTE(idx)->getColor());
- U32 offset = mDrawable->getFace(idx)->getGeomIndex();
-
- LLVector4a* dst_pos = (LLVector4a*) verticesp.get();
- LLVector4a* src_pos = (LLVector4a*) face.mPositions;
-
- LLVector4a* dst_norm = (LLVector4a*) normalsp.get();
- LLVector4a* src_norm = (LLVector4a*) face.mNormals;
-
- LLVector2* dst_tc = (LLVector2*) texcoordsp.get();
- LLVector2* src_tc = (LLVector2*) face.mTexCoords;
-
- LLVector4a::memcpyNonAliased16((F32*) dst_norm, (F32*) src_norm, face.mNumVertices*4*sizeof(F32));
- LLVector4a::memcpyNonAliased16((F32*) dst_tc, (F32*) src_tc, face.mNumVertices*2*sizeof(F32));
-
-
- for (U32 i = 0; i < face.mNumVertices; i++)
- {
- LLVector4a t;
- t.setMul(src_pos[i], scale);
- dst_pos[i].setAdd(t, pos);
- *colorsp++ = color;
- }
-
- for (U32 i = 0; i < face.mNumIndices; i++)
- {
- *indicesp++ = face.mIndices[i] + offset;
- }
-}
-
-U32 LLVOTextBubble::getPartitionType() const
-{
- return LLViewerRegion::PARTITION_PARTICLE;
-}
diff --git a/indra/newview/llvotextbubble.h b/indra/newview/llvotextbubble.h
deleted file mode 100644
index 9c39929711..0000000000
--- a/indra/newview/llvotextbubble.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file llvotextbubble.h
- * @brief Description of LLVORock class, which a derivation of LLViewerObject
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVOTEXTBUBBLE_H
-#define LL_LLVOTEXTBUBBLE_H
-
-#include "llviewerobject.h"
-#include "llframetimer.h"
-
-class LLVOTextBubble : public LLAlphaObject
-{
-public:
- LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
-
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
- /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
-
- /*virtual*/ void updateTextures();
- /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
- /*virtual*/ BOOL updateLOD();
- /*virtual*/ void updateFaceSize(S32 idx);
-
- /*virtual*/ void getGeometry(S32 idx,
- LLStrider<LLVector3>& verticesp,
- LLStrider<LLVector3>& normalsp,
- LLStrider<LLVector2>& texcoordsp,
- LLStrider<LLColor4U>& colorsp,
- LLStrider<U16>& indicesp);
-
- virtual U32 getPartitionType() const;
-
- LLColor4 mColor;
- S32 mLOD;
- BOOL mVolumeChanged;
-
-protected:
- ~LLVOTextBubble();
- BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false);
- LLFrameTimer mUpdateTimer;
-};
-
-#endif // LL_VO_TEXT_BUBBLE
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 3c7fe708e6..6486fd24ea 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -51,6 +51,7 @@
#include "llspatialpartition.h"
#include "llnotificationsutil.h"
#include "raytrace.h"
+#include "llglslshader.h"
extern LLPipeline gPipeline;
@@ -857,7 +858,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
slices /= 2;
}
- mReferenceBuffer->setBuffer(0);
+ mReferenceBuffer->flush();
llassert(vertex_count == max_vertices);
llassert(index_count == max_indices);
}
@@ -881,7 +882,7 @@ void LLVOTree::updateMesh()
// Translate to tree base HACK - adjustment in Z plants tree underground
const LLVector3 &pos_agent = getPositionAgent();
- //glTranslatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
+ //gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
LLMatrix4 trans_mat;
trans_mat.setTranslation(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
trans_mat *= matrix;
@@ -939,8 +940,8 @@ void LLVOTree::updateMesh()
genBranchPipeline(vertices, normals, tex_coords, indices, idx_offset, scale_mat, mTrunkLOD, stop_depth, mDepth, mTrunkDepth, 1.0, mTwist, droop, mBranches, alpha);
- mReferenceBuffer->setBuffer(0);
- buff->setBuffer(0);
+ mReferenceBuffer->flush();
+ buff->flush();
}
void LLVOTree::appendMesh(LLStrider<LLVector3>& vertices,
@@ -1157,7 +1158,8 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD
scale_mat.mMatrix[2][2] = scale*length;
scale_mat *= matrix;
- glLoadMatrixf((F32*) scale_mat.mMatrix);
+ gGL.loadMatrix((F32*) scale_mat.mMatrix);
+ gGL.syncMatrices();
glDrawElements(GL_TRIANGLES, sLODIndexCount[trunk_LOD], GL_UNSIGNED_SHORT, indicesp + sLODIndexOffset[trunk_LOD]);
gPipeline.addTrianglesDrawn(LEAF_INDICES);
stop_glerror();
@@ -1207,7 +1209,8 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD
scale_mat *= matrix;
- glLoadMatrixf((F32*) scale_mat.mMatrix);
+ gGL.loadMatrix((F32*) scale_mat.mMatrix);
+ gGL.syncMatrices();
glDrawElements(GL_TRIANGLES, LEAF_INDICES, GL_UNSIGNED_SHORT, indicesp);
gPipeline.addTrianglesDrawn(LEAF_INDICES);
stop_glerror();
@@ -1228,19 +1231,20 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD
scale_mat *= matrix;
- glMatrixMode(GL_TEXTURE);
- glTranslatef(0.0, -0.5, 0.0);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.translatef(0.0, -0.5, 0.0);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
- glLoadMatrixf((F32*) scale_mat.mMatrix);
+ gGL.loadMatrix((F32*) scale_mat.mMatrix);
+ gGL.syncMatrices();
glDrawElements(GL_TRIANGLES, LEAF_INDICES, GL_UNSIGNED_SHORT, indicesp);
gPipeline.addTrianglesDrawn(LEAF_INDICES);
stop_glerror();
ret += LEAF_INDICES;
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
return ret;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e6da8eb89d..baab191cb6 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -90,6 +90,8 @@ F32 LLVOVolume::sLODFactor = 1.f;
F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop
F32 LLVOVolume::sDistanceFactor = 1.0f;
S32 LLVOVolume::sNumLODChanges = 0;
+S32 LLVOVolume::mRenderComplexity_last = 0;
+S32 LLVOVolume::mRenderComplexity_current = 0;
LLPointer<LLObjectMediaDataClient> LLVOVolume::sObjectMediaClient = NULL;
LLPointer<LLObjectMediaNavigateClient> LLVOVolume::sObjectMediaNavigateClient = NULL;
@@ -367,6 +369,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
//
// Unpack texture entry data
//
+
S32 result = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num);
if (result & teDirtyBits)
{
@@ -704,19 +707,22 @@ BOOL LLVOVolume::isVisible() const
return FALSE ;
}
-void LLVOVolume::updateTextureVirtualSize()
+void LLVOVolume::updateTextureVirtualSize(bool forced)
{
LLFastTimer ftm(FTM_VOLUME_TEXTURES);
// Update the pixel area of all faces
- if(!isVisible())
+ if(!forced)
{
- return ;
- }
+ if(!isVisible())
+ {
+ return ;
+ }
- if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SIMPLE))
- {
- return;
+ if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SIMPLE))
+ {
+ return;
+ }
}
static LLCachedControl<bool> dont_load_textures(gSavedSettings,"TextureDisable");
@@ -966,18 +972,14 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
S32 lod = mLOD;
BOOL is404 = FALSE;
-
+
if (isSculpted())
{
// if it's a mesh
if ((volume_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
{ //meshes might not have all LODs, get the force detail to best existing LOD
-
LLUUID mesh_id = volume_params.getSculptID();
- //profile and path params don't matter for meshes
- volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
-
lod = gMeshRepo.getActualMeshLOD(volume_params, lod);
if (lod == -1)
{
@@ -1017,6 +1019,9 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
if (is404)
{
setIcon(LLViewerTextureManager::getFetchedTextureFromFile("icons/Inv_Mesh.png", TRUE, LLViewerTexture::BOOST_UI));
+ //render prim proxy when mesh loading attempts give up
+ volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_NONE);
+
}
if ((LLPrimitive::setVolume(volume_params, lod, (mVolumeImpl && mVolumeImpl->isVolumeUnique()))) || mSculptChanged)
@@ -1030,14 +1035,13 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params_in, const S32 detail, bo
updateSculptTexture();
-
if (isSculpted())
{
updateSculptTexture();
// if it's a mesh
if ((volume_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
{
- if (getVolume()->getNumVolumeFaces() == 0 || getVolume()->isTetrahedron())
+ if (!getVolume()->isMeshAssetLoaded())
{
//load request not yet issued, request pipeline load this mesh
LLUUID asset_id = volume_params.getSculptID();
@@ -1656,11 +1660,16 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
compiled = TRUE;
sNumLODChanges += new_num_faces ;
+ if((S32)getNumTEs() != getVolume()->getNumFaces())
+ {
+ setNumTEs(getVolume()->getNumFaces()); //mesh loading may change number of faces.
+ }
+
drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles()
{
LLFastTimer t(FTM_GEN_TRIANGLES);
- if (new_num_faces != old_num_faces)
+ if (new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs())
{
regenFaces();
}
@@ -2965,24 +2974,38 @@ const LLMatrix4 LLVOVolume::getRenderMatrix() const
// total cost is returned value + 5 * size of the resulting set.
// Cannot include cost of textures, as they may be re-used in linked
// children, and cost should only be increased for unique textures -Nyx
-U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
+U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
{
- // base cost of each prim should be 10 points
- static const U32 ARC_PRIM_COST = 10;
+ // Get access to params we'll need at various points.
+ // Skip if this is object doesn't have a volume (e.g. is an avatar).
+ BOOL has_volume = (getVolume() != NULL);
+ LLVolumeParams volume_params;
+ LLPathParams path_params;
+ LLProfileParams profile_params;
+
+ U32 num_triangles = 0;
+
// per-prim costs
- static const U32 ARC_INVISI_COST = 1;
- static const U32 ARC_SHINY_COST = 1;
- static const U32 ARC_GLOW_COST = 1;
- static const U32 ARC_FLEXI_COST = 8;
- static const U32 ARC_PARTICLE_COST = 16;
- static const U32 ARC_BUMP_COST = 4;
+ static const U32 ARC_PARTICLE_COST = 1; // determined experimentally
+ static const U32 ARC_PARTICLE_MAX = 2048; // default values
+ static const U32 ARC_TEXTURE_COST = 16; // multiplier for texture resolution - performance tested
+ static const U32 ARC_LIGHT_COST = 500; // static cost for light-producing prims
+ static const U32 ARC_MEDIA_FACE_COST = 1500; // static cost per media-enabled face
- // per-face costs
- static const U32 ARC_PLANAR_COST = 1;
- static const U32 ARC_ANIM_TEX_COST = 4;
- static const U32 ARC_ALPHA_COST = 4;
- U32 shame = ARC_PRIM_COST;
+ // per-prim multipliers
+ static const F32 ARC_GLOW_MULT = 1.5f; // tested based on performance
+ static const F32 ARC_BUMP_MULT = 1.25f; // tested based on performance
+ static const F32 ARC_FLEXI_MULT = 5; // tested based on performance
+ static const F32 ARC_SHINY_MULT = 1.6f; // tested based on performance
+ static const F32 ARC_INVISI_COST = 1.2f; // tested based on performance
+ static const F32 ARC_WEIGHTED_MESH = 1.2f; // tested based on performance
+
+ static const F32 ARC_PLANAR_COST = 1.0f; // tested based on performance to have negligible impact
+ static const F32 ARC_ANIM_TEX_COST = 4.f; // tested based on performance
+ static const F32 ARC_ALPHA_COST = 4.f; // 4x max - based on performance
+
+ F32 shame = 0;
U32 invisi = 0;
U32 shiny = 0;
@@ -2991,9 +3014,72 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
U32 flexi = 0;
U32 animtex = 0;
U32 particles = 0;
- U32 scale = 0;
U32 bump = 0;
U32 planar = 0;
+ U32 weighted_mesh = 0;
+ U32 produces_light = 0;
+ U32 media_faces = 0;
+
+ const LLDrawable* drawablep = mDrawable;
+ U32 num_faces = drawablep->getNumFaces();
+
+ if (has_volume)
+ {
+ volume_params = getVolume()->getParams();
+ path_params = volume_params.getPathParams();
+ profile_params = volume_params.getProfileParams();
+
+ F32 weighted_triangles = -1.0;
+ getStreamingCost(NULL, NULL, &weighted_triangles);
+
+ if (weighted_triangles > 0.0)
+ {
+ num_triangles = (U32)(weighted_triangles);
+ }
+ }
+
+ if (num_triangles == 0)
+ {
+ num_triangles = 4;
+ }
+
+ if (isSculpted())
+ {
+ if (isMesh())
+ {
+ // base cost is dependent on mesh complexity
+ // note that 3 is the highest LOD as of the time of this coding.
+ S32 size = gMeshRepo.getMeshSize(volume_params.getSculptID(),3);
+ if ( size > 0)
+ {
+ if (gMeshRepo.getSkinInfo(volume_params.getSculptID(), this))
+ {
+ // weighted attachment - 1 point for every 3 bytes
+ weighted_mesh = 1;
+ }
+
+ }
+ else
+ {
+ // something went wrong - user should know their content isn't render-free
+ return 0;
+ }
+ }
+ else
+ {
+ const LLSculptParams *sculpt_params = (LLSculptParams *) getParameterEntry(LLNetworkData::PARAMS_SCULPT);
+ LLUUID sculpt_id = sculpt_params->getSculptTexture();
+ if (textures.find(sculpt_id) == textures.end())
+ {
+ LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(sculpt_id);
+ if (texture)
+ {
+ S32 texture_cost = 256 + (S32)(ARC_TEXTURE_COST * (texture->getFullHeight() / 128.f + texture->getFullWidth() / 128.f));
+ textures.insert(texture_cost_t::value_type(sculpt_id, texture_cost));
+ }
+ }
+ }
+ }
if (isFlexible())
{
@@ -3004,19 +3090,12 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
particles = 1;
}
- const LLVector3& sc = getScale();
- scale += (U32) sc.mV[0] + (U32) sc.mV[1] + (U32) sc.mV[2];
-
- const LLDrawable* drawablep = mDrawable;
-
- if (isSculpted())
+ if (getIsLight())
{
- const LLSculptParams *sculpt_params = (LLSculptParams *) getParameterEntry(LLNetworkData::PARAMS_SCULPT);
- LLUUID sculpt_id = sculpt_params->getSculptTexture();
- textures.insert(sculpt_id);
+ produces_light = 1;
}
- for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
+ for (S32 i = 0; i < num_faces; ++i)
{
const LLFace* face = drawablep->getFace(i);
const LLTextureEntry* te = face->getTextureEntry();
@@ -3024,85 +3103,145 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
if (img)
{
- textures.insert(img->getID());
+ if (textures.find(img->getID()) == textures.end())
+ {
+ S32 texture_cost = 256 + (S32)(ARC_TEXTURE_COST * (img->getFullHeight() / 128.f + img->getFullWidth() / 128.f));
+ textures.insert(texture_cost_t::value_type(img->getID(), texture_cost));
+ }
}
if (face->getPoolType() == LLDrawPool::POOL_ALPHA)
{
- alpha++;
+ alpha = 1;
}
else if (img && img->getPrimaryFormat() == GL_ALPHA)
{
invisi = 1;
}
+ if (face->hasMedia())
+ {
+ media_faces++;
+ }
if (te)
{
if (te->getBumpmap())
{
+ // bump is a multiplier, don't add per-face
bump = 1;
}
if (te->getShiny())
{
+ // shiny is a multiplier, don't add per-face
shiny = 1;
}
if (te->getGlow() > 0.f)
{
+ // glow is a multiplier, don't add per-face
glow = 1;
}
if (face->mTextureMatrix != NULL)
{
- animtex++;
+ animtex = 1;
}
if (te->getTexGen())
{
- planar++;
+ planar = 1;
}
}
}
+ // shame currently has the "base" cost of 1 point per 15 triangles, min 2.
+ shame = num_triangles * 5.f;
+ shame = shame < 2.f ? 2.f : shame;
- shame += invisi * ARC_INVISI_COST;
- shame += shiny * ARC_SHINY_COST;
- shame += glow * ARC_GLOW_COST;
- shame += alpha * ARC_ALPHA_COST;
- shame += flexi * ARC_FLEXI_COST;
- shame += animtex * ARC_ANIM_TEX_COST;
- shame += particles * ARC_PARTICLE_COST;
- shame += bump * ARC_BUMP_COST;
- shame += planar * ARC_PLANAR_COST;
- shame += scale;
+ // multiply by per-face modifiers
+ if (planar)
+ {
+ shame *= planar * ARC_PLANAR_COST;
+ }
- LLViewerObject::const_child_list_t& child_list = getChildren();
- for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end();
- ++iter)
+ if (animtex)
{
- const LLViewerObject* child_objectp = *iter;
- const LLDrawable* child_drawablep = child_objectp->mDrawable;
- if (child_drawablep)
- {
- const LLVOVolume* child_volumep = child_drawablep->getVOVolume();
- if (child_volumep)
- {
- shame += child_volumep->getRenderCost(textures);
- }
- }
+ shame *= animtex * ARC_ANIM_TEX_COST;
+ }
+
+ if (alpha)
+ {
+ shame *= alpha * ARC_ALPHA_COST;
+ }
+
+ if(invisi)
+ {
+ shame *= invisi * ARC_INVISI_COST;
+ }
+
+ if (glow)
+ {
+ shame *= glow * ARC_GLOW_MULT;
+ }
+
+ if (bump)
+ {
+ shame *= bump * ARC_BUMP_MULT;
+ }
+
+ if (shiny)
+ {
+ shame *= shiny * ARC_SHINY_MULT;
+ }
+
+
+ // multiply shame by multipliers
+ if (weighted_mesh)
+ {
+ shame *= weighted_mesh * ARC_WEIGHTED_MESH;
+ }
+
+ if (flexi)
+ {
+ shame *= flexi * ARC_FLEXI_MULT;
+ }
+
+
+ // add additional costs
+ if (particles)
+ {
+ const LLPartSysData *part_sys_data = &(mPartSourcep->mPartSysData);
+ const LLPartData *part_data = &(part_sys_data->mPartData);
+ U32 num_particles = (U32)(part_sys_data->mBurstPartCount * llceil( part_data->mMaxAge / part_sys_data->mBurstRate));
+ num_particles = num_particles > ARC_PARTICLE_MAX ? ARC_PARTICLE_MAX : num_particles;
+ F32 part_size = (llmax(part_data->mStartScale[0], part_data->mEndScale[0]) + llmax(part_data->mStartScale[1], part_data->mEndScale[1])) / 2.f;
+ shame += num_particles * part_size * ARC_PARTICLE_COST;
+ }
+
+ if (produces_light)
+ {
+ shame += ARC_LIGHT_COST;
+ }
+
+ if (media_faces)
+ {
+ shame += media_faces * ARC_MEDIA_FACE_COST;
}
- return shame;
+ if (shame > mRenderComplexity_current)
+ {
+ mRenderComplexity_current = (S32)shame;
+ }
+ return (U32)shame;
}
-F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes)
+F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const
{
- F32 radius = getScale().length();
+ F32 radius = getScale().length()*0.5f;
if (isMesh())
{
LLSD& header = gMeshRepo.getMeshHeader(getVolume()->getParams().getSculptID());
- return LLMeshRepository::getStreamingCost(header, radius, bytes, visible_bytes, mLOD);
+ return LLMeshRepository::getStreamingCost(header, radius, bytes, visible_bytes, mLOD, unscaled_value);
}
else
{
@@ -3116,17 +3255,24 @@ F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes)
header["medium_lod"]["size"] = counts[2] * 10;
header["high_lod"]["size"] = counts[3] * 10;
- return LLMeshRepository::getStreamingCost(header, radius);
+ return LLMeshRepository::getStreamingCost(header, radius, NULL, NULL, -1, unscaled_value);
}
}
-U32 LLVOVolume::getTriangleCount()
+//static
+void LLVOVolume::updateRenderComplexity()
+{
+ mRenderComplexity_last = mRenderComplexity_current;
+ mRenderComplexity_current = 0;
+}
+
+U32 LLVOVolume::getTriangleCount(S32* vcount) const
{
U32 count = 0;
LLVolume* volume = getVolume();
if (volume)
{
- count = volume->getNumTriangles();
+ count = volume->getNumTriangles(vcount);
}
return count;
@@ -3147,7 +3293,7 @@ U32 LLVOVolume::getHighLODTriangleCount()
else if (isMesh())
{
LLVolume* ref = LLPrimitive::getVolumeManager()->refVolume(volume->getParams(), 3);
- if (ref->isTetrahedron() || ref->getNumVolumeFaces() == 0)
+ if (!ref->isMeshAssetLoaded() || ref->getNumVolumeFaces() == 0)
{
gMeshRepo.loadMesh(this, volume->getParams(), LLModel::LOD_HIGH);
}
@@ -3433,7 +3579,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
bool special_cursor = specialHoverCursor();
for (S32 i = start_face; i < end_face; ++i)
{
- if (!special_cursor && !pick_transparent && getTE(i)->getColor().mV[3] == 0.f)
+ if (!special_cursor && !pick_transparent && getTE(i) && getTE(i)->getColor().mV[3] == 0.f)
{ //don't attempt to pick completely transparent faces unless
//pick_transparent is true
continue;
@@ -3743,6 +3889,11 @@ bool can_batch_texture(LLFace* facep)
return false;
}
+ if (facep->getTexture() && facep->getTexture()->getPrimaryFormat() == GL_ALPHA)
+ { //can't batch invisiprims
+ return false;
+ }
+
if (facep->isState(LLFace::TEXTURE_ANIM) && facep->getVirtualSize() > MIN_TEX_ANIM_SIZE)
{ //texture animation breaks batches
return false;
@@ -3825,8 +3976,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
}
}
- U8 glow = (U8) (facep->getTextureEntry()->getGlow() * 255);
-
if (idx >= 0 &&
draw_vec[idx]->mVertexBuffer == facep->getVertexBuffer() &&
draw_vec[idx]->mEnd == facep->getGeomIndex()-1 &&
@@ -3835,7 +3984,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_vec[idx]->mEnd - draw_vec[idx]->mStart + facep->getGeomCount() <= (U32) gGLManager.mGLMaxVertexRange &&
draw_vec[idx]->mCount + facep->getIndicesCount() <= (U32) gGLManager.mGLMaxIndexRange &&
#endif
- draw_vec[idx]->mGlowColor.mV[3] == glow &&
draw_vec[idx]->mFullbright == fullbright &&
draw_vec[idx]->mBump == bump &&
draw_vec[idx]->mTextureMatrix == tex_mat &&
@@ -3867,7 +4015,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_vec.push_back(draw_info);
draw_info->mTextureMatrix = tex_mat;
draw_info->mModelMatrix = model_mat;
- draw_info->mGlowColor.setVec(0,0,0,glow);
if (type == LLRenderPass::PASS_ALPHA)
{ //for alpha sorting
facep->setDrawInfo(draw_info);
@@ -3967,6 +4114,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
U32 cur_total = 0;
+ bool emissive = false;
+
//get all the faces into a list
for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter)
{
@@ -3984,13 +4133,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
LLVOVolume* vobj = drawablep->getVOVolume();
- if (vobj->getVolume() && vobj->getVolume()->isTetrahedron() || (vobj->isMesh() && !gMeshRepo.meshRezEnabled()))
+ if (vobj->isMesh() &&
+ (vobj->getVolume() && !vobj->getVolume()->isMeshAssetLoaded() || !gMeshRepo.meshRezEnabled()))
{
continue;
}
llassert_always(vobj);
- vobj->updateTextureVirtualSize();
+ vobj->updateTextureVirtualSize(true);
vobj->preRebuild();
drawablep->clearState(LLDrawable::HAS_ALPHA);
@@ -4178,6 +4328,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
}
+
if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0)
{
facep->clearVertexBuffer();
@@ -4191,6 +4342,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
const LLTextureEntry* te = facep->getTextureEntry();
LLViewerTexture* tex = facep->getTexture();
+ if (te->getGlow() >= 1.f/255.f)
+ {
+ emissive = true;
+ }
+
if (facep->isState(LLFace::TEXTURE_ANIM))
{
if (!vobj->mTexAnimMode)
@@ -4307,6 +4463,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
U32 bump_mask = LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR;
U32 fullbright_mask = LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR;
+ if (emissive)
+ { //emissive faces are present, include emissive byte to preserve batching
+ simple_mask = simple_mask | LLVertexBuffer::MAP_EMISSIVE;
+ alpha_mask = alpha_mask | LLVertexBuffer::MAP_EMISSIVE;
+ bump_mask = bump_mask | LLVertexBuffer::MAP_EMISSIVE;
+ fullbright_mask = fullbright_mask | LLVertexBuffer::MAP_EMISSIVE;
+ }
+
bool batch_textures = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1;
if (batch_textures)
@@ -4361,6 +4525,8 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
group->mBuilt = 1.f;
+ std::set<LLVertexBuffer*> mapped_buffers;
+
for (LLSpatialGroup::element_iter drawable_iter = group->getData().begin(); drawable_iter != group->getData().end(); ++drawable_iter)
{
LLFastTimer t(FTM_VOLUME_GEOM_PARTIAL);
@@ -4375,41 +4541,37 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
{
LLFace* face = drawablep->getFace(i);
- if (face && face->getVertexBuffer())
+ if (face)
{
- face->getGeometryVolume(*volume, face->getTEOffset(),
- vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex());
+ LLVertexBuffer* buff = face->getVertexBuffer();
+ if (buff)
+ {
+ face->getGeometryVolume(*volume, face->getTEOffset(),
+ vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex());
+
+ if (buff->isLocked())
+ {
+ mapped_buffers.insert(buff);
+ }
+ }
}
}
-
+
drawablep->clearState(LLDrawable::REBUILD_ALL);
}
}
- //unmap all the buffers
- for (LLSpatialGroup::buffer_map_t::iterator i = group->mBufferMap.begin(); i != group->mBufferMap.end(); ++i)
+ for (std::set<LLVertexBuffer*>::iterator iter = mapped_buffers.begin(); iter != mapped_buffers.end(); ++iter)
{
- LLSpatialGroup::buffer_texture_map_t& map = i->second;
- for (LLSpatialGroup::buffer_texture_map_t::iterator j = map.begin(); j != map.end(); ++j)
- {
- LLSpatialGroup::buffer_list_t& list = j->second;
- for (LLSpatialGroup::buffer_list_t::iterator k = list.begin(); k != list.end(); ++k)
- {
- LLVertexBuffer* buffer = *k;
- if (buffer->isLocked())
- {
- buffer->setBuffer(0);
- }
- }
- }
+ (*iter)->flush();
}
-
+
// don't forget alpha
if(group != NULL &&
!group->mVertexBuffer.isNull() &&
group->mVertexBuffer->isLocked())
{
- group->mVertexBuffer->setBuffer(0);
+ group->mVertexBuffer->flush();
}
//if not all buffers are unmapped
@@ -4425,7 +4587,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
LLVertexBuffer* buff = face->getVertexBuffer();
if (face && buff && buff->isLocked())
{
- buff->setBuffer(0) ;
+ buff->flush();
}
}
}
@@ -4452,10 +4614,6 @@ struct CompareBatchBreakerModified
{
return lte->getFullbright() < rte->getFullbright();
}
- else if (lte->getGlow() != rte->getGlow())
- {
- return lte->getGlow() < rte->getGlow();
- }
else
{
return lhs->getTexture() < rhs->getTexture();
@@ -4481,6 +4639,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
std::sort(faces.begin(), faces.end(), LLFace::CompareDistanceGreater());
}
+ bool hud_group = group->isHUDGroup() ;
std::vector<LLFace*>::iterator face_iter = faces.begin();
LLSpatialGroup::buffer_map_t buffer_map;
@@ -4493,7 +4652,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
buffer_index = -1;
}
- S32 texture_index_channels = gGLManager.mNumTextureImageUnits-1; //always reserve one for shiny for now just for simplicity
+ S32 texture_index_channels = LLGLSLShader::sIndexedTextureChannels-1; //always reserve one for shiny for now just for simplicity
if (gGLManager.mGLVersion < 3.1f)
{
@@ -4507,6 +4666,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
texture_index_channels = llmin(texture_index_channels, (S32) gSavedSettings.getU32("RenderMaxTextureIndex"));
+ //NEVER use more than 16 texture index channels (workaround for prevalent driver bug)
+ texture_index_channels = llmin(texture_index_channels, 16);
while (face_iter != faces.end())
{
@@ -4713,6 +4874,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
const LLTextureEntry* te = facep->getTextureEntry();
+ tex = facep->getTexture();
BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? TRUE : FALSE;
@@ -4750,7 +4912,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
registerFace(group, facep, LLRenderPass::PASS_INVISI_SHINY);
registerFace(group, facep, LLRenderPass::PASS_INVISIBLE);
}
- else if (LLPipeline::sRenderDeferred)
+ else if (LLPipeline::sRenderDeferred && !hud_group)
{ //deferred rendering
if (te->getFullbright())
{ //register in post deferred fullbright shiny pass
@@ -4788,7 +4950,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
else if (fullbright || bake_sunlight)
{ //fullbright
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
- if (LLPipeline::sRenderDeferred && LLPipeline::sRenderBump && te->getBumpmap())
+ if (LLPipeline::sRenderDeferred && !hud_group && LLPipeline::sRenderBump && te->getBumpmap())
{ //if this is the deferred render and a bump map is present, register in post deferred bump
registerFace(group, facep, LLRenderPass::PASS_POST_BUMP);
}
@@ -4814,7 +4976,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
//not sure why this is here, and looks like it might cause bump mapped objects to get rendered redundantly -- davep 5/11/2010
- if (!is_alpha && !LLPipeline::sRenderDeferred)
+ if (!is_alpha && (hud_group || !LLPipeline::sRenderDeferred))
{
llassert((mask & LLVertexBuffer::MAP_NORMAL) || fullbright);
facep->setPoolType((fullbright) ? LLDrawPool::POOL_FULLBRIGHT : LLDrawPool::POOL_SIMPLE);
@@ -4833,7 +4995,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
++face_iter;
}
- buffer->setBuffer(0);
+ buffer->flush();
}
group->mBufferMap[mask].clear();
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index fc00f0c0d0..3cf434dc26 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -129,9 +129,12 @@ public:
const LLMatrix4& getRelativeXform() const { return mRelativeXform; }
const LLMatrix3& getRelativeXformInvTrans() const { return mRelativeXformInvTrans; }
/*virtual*/ const LLMatrix4 getRenderMatrix() const;
- U32 getRenderCost(std::set<LLUUID> &textures) const;
- /*virtual*/ F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL);
- /*virtual*/ U32 getTriangleCount();
+ typedef std::map<LLUUID, S32> texture_cost_t;
+ U32 getRenderCost(texture_cost_t &textures) const;
+ F32 getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const;
+ /*virtual*/ F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL) { return getStreamingCost(bytes, visible_bytes, NULL); }
+
+ /*virtual*/ U32 getTriangleCount(S32* vcount = NULL) const;
/*virtual*/ U32 getHighLODTriangleCount();
/*virtual*/ BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
@@ -206,7 +209,7 @@ public:
/*virtual*/ BOOL updateLOD();
void updateRadius();
/*virtual*/ void updateTextures();
- void updateTextureVirtualSize();
+ void updateTextureVirtualSize(bool forced = false);
void updateFaceFlags();
void regenFaces();
@@ -320,11 +323,19 @@ protected:
LLFace* addFace(S32 face_index);
void updateTEData();
+ // stats tracking for render complexity
+ static S32 mRenderComplexity_last;
+ static S32 mRenderComplexity_current;
+
void requestMediaDataUpdate(bool isNew);
void cleanUpMediaImpls();
void addMediaImpl(LLViewerMediaImpl* media_impl, S32 texture_index) ;
void removeMediaImpl(S32 texture_index) ;
public:
+
+ static S32 getRenderComplexityMax() {return mRenderComplexity_last;}
+ static void updateRenderComplexity();
+
LLViewerTextureAnim *mTextureAnimp;
U8 mTexAnimMode;
private:
@@ -359,8 +370,6 @@ public:
static LLPointer<LLObjectMediaDataClient> sObjectMediaClient;
static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient;
- static const U32 ARC_TEXTURE_COST = 5;
-
protected:
static S32 sNumLODChanges;
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index 69ebad61ac..7df50ec815 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -160,7 +160,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
static const unsigned int vertices_per_quad = 4;
static const unsigned int indices_per_quad = 6;
- const S32 size = gSavedSettings.getBOOL("RenderTransparentWater") ? 16 : 1;
+ const S32 size = gSavedSettings.getBOOL("RenderTransparentWater") && !LLGLSLShader::sNoFixedFunction ? 16 : 1;
const S32 num_quads = size * size;
face->setSize(vertices_per_quad * num_quads,
@@ -231,7 +231,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
}
}
- buff->setBuffer(0);
+ buff->flush();
mDrawable->movePartition();
LLPipeline::sCompiles++;
@@ -282,6 +282,11 @@ void LLVOWater::updateSpatialExtents(LLVector4a &newMin, LLVector4a& newMax)
U32 LLVOWater::getPartitionType() const
{
+ if (mIsEdgePatch)
+ {
+ return LLViewerRegion::PARTITION_VOIDWATER;
+ }
+
return LLViewerRegion::PARTITION_WATER;
}
@@ -300,6 +305,7 @@ LLWaterPartition::LLWaterPartition()
LLVoidWaterPartition::LLVoidWaterPartition()
{
+ mOcclusionEnabled = FALSE;
mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER;
mPartitionType = LLViewerRegion::PARTITION_VOIDWATER;
}
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index 7b1c725483..f1c5499d84 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -326,7 +326,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
buildFanBuffer(vertices, texCoords, indices);
- mFanVerts->setBuffer(0);
+ mFanVerts->flush();
}
{
@@ -349,6 +349,9 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
mStripsVerts.resize(strips_segments, NULL);
+ LLTimer timer;
+ timer.start();
+
for (U32 i = 0; i < strips_segments ;++i)
{
LLVertexBuffer * segment = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
@@ -388,8 +391,10 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
buildStripsBuffer(begin_stack, end_stack, vertices, texCoords, indices);
// and unlock the buffer
- segment->setBuffer(0);
+ segment->flush();
}
+
+ llinfos << "completed in " << llformat("%.2f", timer.getElapsedTimeF32()) << "seconds" << llendl;
}
#else
mStripsVerts = new LLVertexBuffer(LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB);
@@ -468,7 +473,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
}
}
- mStripsVerts->setBuffer(0);
+ mStripsVerts->flush();
#endif
updateStarColors();
@@ -485,7 +490,7 @@ void LLVOWLSky::drawStars(void)
if (mStarsVerts.notNull())
{
mStarsVerts->setBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK);
- mStarsVerts->drawArrays(LLRender::QUADS, 0, getStarsNumVerts()*4);
+ mStarsVerts->drawArrays(LLRender::TRIANGLES, 0, getStarsNumVerts()*4);
}
}
@@ -511,13 +516,14 @@ void LLVOWLSky::drawDome(void)
strips_segment->drawRange(
LLRender::TRIANGLE_STRIP,
- 0, strips_segment->getRequestedVerts()-1, strips_segment->getRequestedIndices(),
+ 0, strips_segment->getNumVerts()-1, strips_segment->getNumIndices(),
0);
- gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices(), LLRender::TRIANGLE_STRIP);
+ gPipeline.addTrianglesDrawn(strips_segment->getNumIndices(), LLRender::TRIANGLE_STRIP);
}
#else
mStripsVerts->setBuffer(data_mask);
+ gGL.syncMatrices();
glDrawRangeElements(
GL_TRIANGLES,
0, mStripsVerts->getNumVerts()-1, mStripsVerts->getNumIndices(),
@@ -771,7 +777,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
if (mStarsVerts.isNull())
{
mStarsVerts = new LLVertexBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK, GL_DYNAMIC_DRAW);
- mStarsVerts->allocateBuffer(getStarsNumVerts()*4, 0, TRUE);
+ mStarsVerts->allocateBuffer(getStarsNumVerts()*6, 0, TRUE);
}
BOOL success = mStarsVerts->getVertexStrider(verticesp)
@@ -806,19 +812,25 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable)
*(verticesp++) = mStarVertices[vtx];
*(verticesp++) = mStarVertices[vtx]+left;
*(verticesp++) = mStarVertices[vtx]+left+up;
+ *(verticesp++) = mStarVertices[vtx]+left;
+ *(verticesp++) = mStarVertices[vtx]+left+up;
*(verticesp++) = mStarVertices[vtx]+up;
*(texcoordsp++) = LLVector2(0,0);
*(texcoordsp++) = LLVector2(0,1);
*(texcoordsp++) = LLVector2(1,1);
+ *(texcoordsp++) = LLVector2(0,1);
+ *(texcoordsp++) = LLVector2(1,1);
*(texcoordsp++) = LLVector2(1,0);
*(colorsp++) = LLColor4U(mStarColors[vtx]);
*(colorsp++) = LLColor4U(mStarColors[vtx]);
*(colorsp++) = LLColor4U(mStarColors[vtx]);
*(colorsp++) = LLColor4U(mStarColors[vtx]);
+ *(colorsp++) = LLColor4U(mStarColors[vtx]);
+ *(colorsp++) = LLColor4U(mStarColors[vtx]);
}
- mStarsVerts->setBuffer(0);
+ mStarsVerts->flush();
return TRUE;
}
diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp
index 1694126802..4f582fc2db 100644
--- a/indra/newview/llwatchdog.cpp
+++ b/indra/newview/llwatchdog.cpp
@@ -126,8 +126,8 @@ 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();
ping(state);
+ mTimer.start();
LLWatchdogEntry::start();
}
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 1a98d4c6c2..20b34637b8 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -190,6 +190,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader)
shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, LLWLParamManager::getInstance()->getRotatedLightDir().mV);
shader->uniform3fv("camPosLocal", 1, LLViewerCamera::getInstance()->getOrigin().mV);
shader->uniform4fv("waterFogColor", 1, LLDrawPoolWater::sWaterFogColor.mV);
+ shader->uniform1f("waterFogEnd", LLDrawPoolWater::sWaterFogEnd);
shader->uniform4fv("waterPlane", 1, mWaterPlane.mV);
shader->uniform1f("waterFogDensity", getFogDensity());
shader->uniform1f("waterFogKS", mWaterFogKS);
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index d1c0990f90..d8aa0b7d5c 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -30,13 +30,13 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "lldictionary.h"
+#include "llfloatersidepanelcontainer.h"
#include "lllocaltextureobject.h"
#include "llnotificationsutil.h"
#include "llviewertexturelist.h"
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "llsidepanelappearance.h"
-#include "llsidetray.h"
#include "lltexlayer.h"
#include "lltexglobalcolor.h"
#include "lltrans.h"
@@ -697,7 +697,7 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake
if(gAgentCamera.cameraCustomizeAvatar())
{
- LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit"));
}
gAgentAvatarp->updateVisualParams();
@@ -967,7 +967,7 @@ void LLWearable::revertValues()
syncImages(mSavedTEMap, mTEMap);
- LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
if( panel )
{
panel->updateScrollingPanelList();
@@ -1008,7 +1008,7 @@ void LLWearable::saveValues()
syncImages(mTEMap, mSavedTEMap);
- LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance"));
if( panel )
{
panel->updateScrollingPanelList();
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index b73017a51a..d2d48dc68f 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -34,7 +34,6 @@
#include "llagent.h"
#include "llappviewer.h"
-#include "llfloatermediabrowser.h"
#include "llfloaterwebcontent.h"
#include "llfloaterreg.h"
#include "lllogininstance.h"
@@ -78,6 +77,8 @@ void LLWeb::initClass()
}
+
+
// static
void LLWeb::loadURL(const std::string& url, const std::string& target, const std::string& uuid)
{
@@ -97,44 +98,20 @@ void LLWeb::loadURL(const std::string& url, const std::string& target, const std
}
// static
-void LLWeb::loadWebURL(const std::string& url, const std::string& target, const std::string& uuid)
-{
- if(target == "_internal")
- {
- // Force load in the internal browser, as if with a blank target.
- loadWebURLInternal(url, "", uuid);
- }
- else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external"))
- {
- loadURLExternal(url);
- }
- else
- {
- loadWebURLInternal(url, target, uuid);
- }
-}
-
-// static
-void LLWeb::loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
-{
- LLFloaterMediaBrowser::create(url, target, uuid);
-}
-
-// static
// Explicitly open a Web URL using the Web content floater
-void LLWeb::loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
+void LLWeb::loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
{
- LLFloaterWebContent::create(url, target, uuid);
+ LLFloaterWebContent::Params p;
+ p.url(url).target(target).id(uuid);
+ LLFloaterReg::showInstance("web_content", p);
}
-
// static
void LLWeb::loadURLExternal(const std::string& url, const std::string& uuid)
{
loadURLExternal(url, true, uuid);
}
-
// static
void LLWeb::loadURLExternal(const std::string& url, bool async, const std::string& uuid)
{
@@ -209,6 +186,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["VERSION_BUILD"] = LLVersionInfo::getBuild();
substitution["CHANNEL"] = LLVersionInfo::getChannel();
substitution["GRID"] = LLGridManager::getInstance()->getGridLabel();
+ substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridLabel());
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
substitution["SESSION_ID"] = gAgent.getSessionID();
substitution["FIRST_LOGIN"] = gAgent.isFirstLogin();
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index dc5958e57f..0b95f664d6 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -42,25 +42,15 @@ class LLWeb
public:
static void initClass();
- /// Load the given url in the user's preferred web browser
- static void loadURL(const std::string& url, const std::string& target, const std::string& uuid = LLStringUtil::null);
- static void loadURL(const std::string& url) { loadURL(url, LLStringUtil::null); }
- /// Load the given url in the user's preferred web browser
- static void loadURL(const char* url, const std::string& target) { loadURL( ll_safe_string(url), target); }
- static void loadURL(const char* url) { loadURL( ll_safe_string(url), LLStringUtil::null ); }
- /// Load the given url in the Second Life internal web browser
- static void loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null);
- static void loadURLInternal(const std::string &url) { loadURLInternal(url, LLStringUtil::null); }
/// Load the given url in the operating system's web browser, async if we want to return immediately
/// before browser has spawned
- static void loadURLExternal(const std::string& url) { loadURLExternal(url, LLStringUtil::null); };
+ static void loadURLExternal(const std::string& url) {loadURLExternal(url, LLStringUtil::null);}
static void loadURLExternal(const std::string& url, const std::string& uuid);
static void loadURLExternal(const std::string& url, bool async, const std::string& uuid = LLStringUtil::null);
- // Explicitly open a Web URL using the Web content floater vs. the more general media browser
- static void loadWebURL(const std::string& url, const std::string& target, const std::string& uuid);
- static void loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid);
- static void loadWebURLInternal(const std::string &url) { loadWebURLInternal(url, LLStringUtil::null, LLStringUtil::null); }
+ static void loadURL(const std::string& url, const std::string& target = LLStringUtil::null, const std::string& uuid = LLStringUtil::null);
+ // load content using built-in browser
+ static void loadURLInternal(const std::string &url, const std::string& target = LLStringUtil::null, const std::string& uuid = LLStringUtil::null);
/// Returns escaped url (eg, " " to "%20") - used by all loadURL methods
static std::string escapeURL(const std::string& url);
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
new file mode 100644
index 0000000000..641f338f2c
--- /dev/null
+++ b/indra/newview/llwebprofile.cpp
@@ -0,0 +1,305 @@
+/**
+ * @file llwebprofile.cpp
+ * @brief Web profile access.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llwebprofile.h"
+
+// libs
+#include "llbufferstream.h"
+#include "llhttpclient.h"
+#include "llimagepng.h"
+#include "llplugincookiestore.h"
+
+// newview
+#include "llpanelprofile.h" // for getProfileURL(). FIXME: move the method to LLAvatarActions
+#include "llviewermedia.h" // FIXME: don't use LLViewerMedia internals
+
+// third-party
+#include "reader.h" // JSON
+
+/*
+ * Workflow:
+ * 1. LLViewerMedia::setOpenIDCookie()
+ * -> GET https://my-demo.secondlife.com/ via LLViewerMediaWebProfileResponder
+ * -> LLWebProfile::setAuthCookie()
+ * 2. LLWebProfile::uploadImage()
+ * -> GET "https://my-demo.secondlife.com/snapshots/s3_upload_config" via ConfigResponder
+ * 3. LLWebProfile::post()
+ * -> POST <config_url> via PostImageResponder
+ * -> redirect
+ * -> GET <redirect_url> via PostImageRedirectResponder
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+// LLWebProfileResponders::ConfigResponder
+
+class LLWebProfileResponders::ConfigResponder : public LLHTTPClient::Responder
+{
+ LOG_CLASS(LLWebProfileResponders::ConfigResponder);
+
+public:
+ ConfigResponder(LLPointer<LLImageFormatted> imagep)
+ : mImagep(imagep)
+ {
+ }
+
+ /*virtual*/ void completedRaw(
+ U32 status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+ {
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+ const std::string body = strstrm.str();
+
+ if (status != 200)
+ {
+ llwarns << "Failed to get upload config (" << status << ")" << llendl;
+ LLWebProfile::reportImageUploadStatus(false);
+ return;
+ }
+
+ Json::Value root;
+ Json::Reader reader;
+ if (!reader.parse(body, root))
+ {
+ llwarns << "Failed to parse upload config: " << reader.getFormatedErrorMessages() << llendl;
+ LLWebProfile::reportImageUploadStatus(false);
+ return;
+ }
+
+ // *TODO: 404 = not supported by the grid
+ // *TODO: increase timeout or handle 499 Expired
+
+ // Convert config to LLSD.
+ const Json::Value data = root["data"];
+ const std::string upload_url = root["url"].asString();
+ LLSD config;
+ config["acl"] = data["acl"].asString();
+ config["AWSAccessKeyId"] = data["AWSAccessKeyId"].asString();
+ config["Content-Type"] = data["Content-Type"].asString();
+ config["key"] = data["key"].asString();
+ config["policy"] = data["policy"].asString();
+ config["success_action_redirect"] = data["success_action_redirect"].asString();
+ config["signature"] = data["signature"].asString();
+ config["add_loc"] = data.get("add_loc", "0").asString();
+ config["caption"] = data.get("caption", "").asString();
+
+ // Do the actual image upload using the configuration.
+ LL_DEBUGS("Snapshots") << "Got upload config, POSTing image to " << upload_url << ", config=[" << config << "]" << llendl;
+ LLWebProfile::post(mImagep, config, upload_url);
+ }
+
+private:
+ LLPointer<LLImageFormatted> mImagep;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// LLWebProfilePostImageRedirectResponder
+class LLWebProfileResponders::PostImageRedirectResponder : public LLHTTPClient::Responder
+{
+ LOG_CLASS(LLWebProfileResponders::PostImageRedirectResponder);
+
+public:
+ /*virtual*/ void completedRaw(
+ U32 status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+ {
+ if (status != 200)
+ {
+ llwarns << "Failed to upload image: " << status << " " << reason << llendl;
+ LLWebProfile::reportImageUploadStatus(false);
+ return;
+ }
+
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+ const std::string body = strstrm.str();
+ llinfos << "Image uploaded." << llendl;
+ LL_DEBUGS("Snapshots") << "Uploading image succeeded. Response: [" << body << "]" << llendl;
+ LLWebProfile::reportImageUploadStatus(true);
+ }
+
+private:
+ LLPointer<LLImageFormatted> mImagep;
+};
+
+
+///////////////////////////////////////////////////////////////////////////////
+// LLWebProfileResponders::PostImageResponder
+class LLWebProfileResponders::PostImageResponder : public LLHTTPClient::Responder
+{
+ LOG_CLASS(LLWebProfileResponders::PostImageResponder);
+
+public:
+ /*virtual*/ void completedHeader(U32 status, const std::string& reason, const LLSD& content)
+ {
+ // Viewer seems to fail to follow a 303 redirect on POST request
+ // (URLRequest Error: 65, Send failed since rewinding of the data stream failed).
+ // Handle it manually.
+ if (status == 303)
+ {
+ LLSD headers = LLViewerMedia::getHeaders();
+ headers["Cookie"] = LLWebProfile::getAuthCookie();
+ const std::string& redir_url = content["location"];
+ LL_DEBUGS("Snapshots") << "Got redirection URL: " << redir_url << llendl;
+ LLHTTPClient::get(redir_url, new LLWebProfileResponders::PostImageRedirectResponder, headers);
+ }
+ else
+ {
+ llwarns << "Unexpected POST status: " << status << " " << reason << llendl;
+ LL_DEBUGS("Snapshots") << "headers: [" << content << "]" << llendl;
+ LLWebProfile::reportImageUploadStatus(false);
+ }
+ }
+
+ // Override just to suppress warnings.
+ /*virtual*/ void completedRaw(U32 status, const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
+ {
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// LLWebProfile
+
+std::string LLWebProfile::sAuthCookie;
+LLWebProfile::status_callback_t LLWebProfile::mStatusCallback;
+
+// static
+void LLWebProfile::uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location)
+{
+ // Get upload configuration data.
+ std::string config_url(getProfileURL(LLStringUtil::null) + "snapshots/s3_upload_config");
+ config_url += "?caption=" + LLURI::escape(caption);
+ config_url += "&add_loc=" + std::string(add_location ? "1" : "0");
+
+ LL_DEBUGS("Snapshots") << "Requesting " << config_url << llendl;
+ LLSD headers = LLViewerMedia::getHeaders();
+ headers["Cookie"] = getAuthCookie();
+ LLHTTPClient::get(config_url, new LLWebProfileResponders::ConfigResponder(image), headers);
+}
+
+// static
+void LLWebProfile::setAuthCookie(const std::string& cookie)
+{
+ LL_DEBUGS("Snapshots") << "Setting auth cookie: " << cookie << llendl;
+ sAuthCookie = cookie;
+}
+
+// static
+void LLWebProfile::post(LLPointer<LLImageFormatted> image, const LLSD& config, const std::string& url)
+{
+ if (dynamic_cast<LLImagePNG*>(image.get()) == 0)
+ {
+ llwarns << "Image to upload is not a PNG" << llendl;
+ llassert(dynamic_cast<LLImagePNG*>(image.get()) != 0);
+ return;
+ }
+
+ const std::string boundary = "----------------------------0123abcdefab";
+
+ LLSD headers = LLViewerMedia::getHeaders();
+ headers["Cookie"] = getAuthCookie();
+ headers["Content-Type"] = "multipart/form-data; boundary=" + boundary;
+
+ std::ostringstream body;
+
+ // *NOTE: The order seems to matter.
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"key\"\r\n\r\n"
+ << config["key"].asString() << "\r\n";
+
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"AWSAccessKeyId\"\r\n\r\n"
+ << config["AWSAccessKeyId"].asString() << "\r\n";
+
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"acl\"\r\n\r\n"
+ << config["acl"].asString() << "\r\n";
+
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"Content-Type\"\r\n\r\n"
+ << config["Content-Type"].asString() << "\r\n";
+
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"policy\"\r\n\r\n"
+ << config["policy"].asString() << "\r\n";
+
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"signature\"\r\n\r\n"
+ << config["signature"].asString() << "\r\n";
+
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"success_action_redirect\"\r\n\r\n"
+ << config["success_action_redirect"].asString() << "\r\n";
+
+ body << "--" << boundary << "\r\n"
+ << "Content-Disposition: form-data; name=\"file\"; filename=\"snapshot.png\"\r\n"
+ << "Content-Type: image/png\r\n\r\n";
+
+ // Insert the image data.
+ // *FIX: Treating this as a string will probably screw it up ...
+ U8* image_data = image->getData();
+ for (S32 i = 0; i < image->getDataSize(); ++i)
+ {
+ body << image_data[i];
+ }
+
+ body << "\r\n--" << boundary << "--\r\n";
+
+ // postRaw() takes ownership of the buffer and releases it later.
+ size_t size = body.str().size();
+ U8 *data = new U8[size];
+ memcpy(data, body.str().data(), size);
+
+ // Send request, successful upload will trigger posting metadata.
+ LLHTTPClient::postRaw(url, data, size, new LLWebProfileResponders::PostImageResponder(), headers);
+}
+
+// static
+void LLWebProfile::reportImageUploadStatus(bool ok)
+{
+ if (mStatusCallback)
+ {
+ mStatusCallback(ok);
+ }
+}
+
+// static
+std::string LLWebProfile::getAuthCookie()
+{
+ // This is needed to test image uploads on Linux viewer built with OpenSSL 1.0.0 (0.9.8 works fine).
+ const char* debug_cookie = getenv("LL_SNAPSHOT_COOKIE");
+ return debug_cookie ? debug_cookie : sAuthCookie;
+}
diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h
new file mode 100644
index 0000000000..10279bffac
--- /dev/null
+++ b/indra/newview/llwebprofile.h
@@ -0,0 +1,69 @@
+/**
+ * @file llwebprofile.h
+ * @brief Web profile access.
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLWEBPROFILE_H
+#define LL_LLWEBPROFILE_H
+
+#include "llimage.h"
+
+namespace LLWebProfileResponders
+{
+ class ConfigResponder;
+ class PostImageResponder;
+ class PostImageRedirectResponder;
+};
+
+/**
+ * @class LLWebProfile
+ *
+ * Manages interaction with, a web service allowing the upload of snapshot images
+ * taken within the viewer.
+ */
+class LLWebProfile
+{
+ LOG_CLASS(LLWebProfile);
+
+public:
+ typedef boost::function<void(bool ok)> status_callback_t;
+
+ static void uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location);
+ static void setAuthCookie(const std::string& cookie);
+ static void setImageUploadResultCallback(status_callback_t cb) { mStatusCallback = cb; }
+
+private:
+ friend class LLWebProfileResponders::ConfigResponder;
+ friend class LLWebProfileResponders::PostImageResponder;
+ friend class LLWebProfileResponders::PostImageRedirectResponder;
+
+ static void post(LLPointer<LLImageFormatted> image, const LLSD& config, const std::string& url);
+ static void reportImageUploadStatus(bool ok);
+ static std::string getAuthCookie();
+
+ static std::string sAuthCookie;
+ static status_callback_t mStatusCallback;
+};
+
+#endif // LL_LLWEBPROFILE_H
diff --git a/indra/newview/llwind.cpp b/indra/newview/llwind.cpp
index 69d3090442..4c39fb5b74 100644
--- a/indra/newview/llwind.cpp
+++ b/indra/newview/llwind.cpp
@@ -46,16 +46,12 @@
#include "llworld.h"
-const F32 CLOUD_DIVERGENCE_COEF = 0.5f;
-
-
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
LLWind::LLWind()
-: mSize(16),
- mCloudDensityp(NULL)
+: mSize(16)
{
init();
}
@@ -65,8 +61,6 @@ LLWind::~LLWind()
{
delete [] mVelX;
delete [] mVelY;
- delete [] mCloudVelX;
- delete [] mCloudVelY;
}
@@ -77,31 +71,23 @@ LLWind::~LLWind()
void LLWind::init()
{
+ LL_DEBUGS("Wind") << "initializing wind size: "<< mSize << LL_ENDL;
+
// Initialize vector data
mVelX = new F32[mSize*mSize];
mVelY = new F32[mSize*mSize];
- mCloudVelX = new F32[mSize*mSize];
- mCloudVelY = new F32[mSize*mSize];
-
S32 i;
for (i = 0; i < mSize*mSize; i++)
{
mVelX[i] = 0.5f;
mVelY[i] = 0.5f;
- mCloudVelX[i] = 0.0f;
- mCloudVelY[i] = 0.0f;
}
}
void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
{
- if (!mCloudDensityp)
- {
- return;
- }
-
LLPatchHeader patch_header;
S32 buffer[16*16];
@@ -122,22 +108,15 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
decode_patch(bitpack, buffer);
decompress_patch(mVelY, buffer, &patch_header);
-
-
S32 i, j, k;
- // HACK -- mCloudVelXY is the same as mVelXY, except we add a divergence
- // that is proportional to the gradient of the cloud density
- // ==> this helps to clump clouds together
- // NOTE ASSUMPTION: cloud density has the same dimensions as the wind field
- // This needs to be fixed... causes discrepency at region boundaries
for (j=1; j<mSize-1; j++)
{
for (i=1; i<mSize-1; i++)
{
k = i + j * mSize;
- *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 1) - *(mCloudDensityp + k - 1));
- *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + mSize) - *(mCloudDensityp + k - mSize));
+ *(mVelX + k) = *(mVelX + k);
+ *(mVelY + k) = *(mVelY + k);
}
}
@@ -145,29 +124,29 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
for (j=1; j<mSize-1; j++)
{
k = i + j * mSize;
- *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k) - *(mCloudDensityp + k - 2));
- *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + mSize) - *(mCloudDensityp + k - mSize));
+ *(mVelX + k) = *(mVelX + k);
+ *(mVelY + k) = *(mVelY + k);
}
i = 0;
for (j=1; j<mSize-1; j++)
{
k = i + j * mSize;
- *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 2) - *(mCloudDensityp + k));
- *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + mSize) - *(mCloudDensityp + k + mSize));
+ *(mVelX + k) = *(mVelX + k);
+ *(mVelY + k) = *(mVelY + k);
}
j = mSize - 1;
for (i=1; i<mSize-1; i++)
{
k = i + j * mSize;
- *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 1) - *(mCloudDensityp + k - 1));
- *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k) - *(mCloudDensityp + k - 2*mSize));
+ *(mVelX + k) = *(mVelX + k);
+ *(mVelY + k) = *(mVelY + k);
}
j = 0;
for (i=1; i<mSize-1; i++)
{
k = i + j * mSize;
- *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 1) - *(mCloudDensityp + k -1));
- *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 2*mSize) - *(mCloudDensityp + k));
+ *(mVelX + k) = *(mVelX + k);
+ *(mVelY + k) = *(mVelY + k);
}
}
@@ -280,74 +259,6 @@ LLVector3 LLWind::getVelocity(const LLVector3 &pos_region)
return r_val * WIND_SCALE_HACK;
}
-
-LLVector3 LLWind::getCloudVelocity(const LLVector3 &pos_region)
-{
- llassert(mSize == 16);
- // Resolves value of wind at a location relative to SW corner of region
- //
- // Returns wind magnitude in X,Y components of vector3
- LLVector3 r_val;
- F32 dx,dy;
- S32 k;
-
- LLVector3 pos_clamped_region(pos_region);
-
- F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters();
-
- if (pos_clamped_region.mV[VX] < 0.f)
- {
- pos_clamped_region.mV[VX] = 0.f;
- }
- else if (pos_clamped_region.mV[VX] >= region_width_meters)
- {
- pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters);
- }
-
- if (pos_clamped_region.mV[VY] < 0.f)
- {
- pos_clamped_region.mV[VY] = 0.f;
- }
- else if (pos_clamped_region.mV[VY] >= region_width_meters)
- {
- pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters);
- }
-
-
- S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters);
- S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters);
- k = i + j*mSize;
- dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i);
- dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j);
-
- if ((i < mSize-1) && (j < mSize-1))
- {
- // Interior points, no edges
- r_val.mV[VX] = mCloudVelX[k]*(1.0f - dx)*(1.0f - dy) +
- mCloudVelX[k + 1]*dx*(1.0f - dy) +
- mCloudVelX[k + mSize]*dy*(1.0f - dx) +
- mCloudVelX[k + mSize + 1]*dx*dy;
- r_val.mV[VY] = mCloudVelY[k]*(1.0f - dx)*(1.0f - dy) +
- mCloudVelY[k + 1]*dx*(1.0f - dy) +
- mCloudVelY[k + mSize]*dy*(1.0f - dx) +
- mCloudVelY[k + mSize + 1]*dx*dy;
- }
- else
- {
- r_val.mV[VX] = mCloudVelX[k];
- r_val.mV[VY] = mCloudVelY[k];
- }
-
- r_val.mV[VZ] = 0.f;
- return r_val * WIND_SCALE_HACK;
-}
-
-
-void LLWind::setCloudDensityPointer(F32 *densityp)
-{
- mCloudDensityp = densityp;
-}
-
void LLWind::setOriginGlobal(const LLVector3d &origin_global)
{
mOriginGlobal = origin_global;
diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h
index 925cb6d642..3b57f07124 100644
--- a/indra/newview/llwind.h
+++ b/indra/newview/llwind.h
@@ -27,7 +27,6 @@
#ifndef LL_LLWIND_H
#define LL_LLWIND_H
-//#include "vmath.h"
#include "llmath.h"
#include "v3math.h"
#include "v3dmath.h"
@@ -44,25 +43,21 @@ public:
~LLWind();
void renderVectors();
LLVector3 getVelocity(const LLVector3 &location); // "location" is region-local
- LLVector3 getCloudVelocity(const LLVector3 &location); // "location" is region-local
LLVector3 getVelocityNoisy(const LLVector3 &location, const F32 dim); // "location" is region-local
void decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp);
LLVector3 getAverage();
- void setCloudDensityPointer(F32 *densityp);
void setOriginGlobal(const LLVector3d &origin_global);
private:
S32 mSize;
F32 * mVelX;
F32 * mVelY;
- F32 * mCloudVelX;
- F32 * mCloudVelY;
- F32 * mCloudDensityp;
LLVector3d mOriginGlobal;
void init();
+ LOG_CLASS(LLWind);
};
#endif
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
new file mode 100644
index 0000000000..28f959eb71
--- /dev/null
+++ b/indra/newview/llwindowlistener.cpp
@@ -0,0 +1,505 @@
+/**
+ * @file llwindowlistener.cpp
+ * @brief EventAPI interface for injecting input into LLWindow
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "linden_common.h"
+
+#include "llwindowlistener.h"
+
+#include "llcoord.h"
+#include "llfocusmgr.h"
+#include "llkeyboard.h"
+#include "llwindowcallbacks.h"
+#include "llui.h"
+#include "llview.h"
+#include "llviewinject.h"
+#include "llviewerwindow.h"
+#include "llviewerkeyboard.h"
+#include "llrootview.h"
+#include "llsdutil.h"
+#include "stringize.h"
+#include <typeinfo>
+#include <map>
+#include <boost/scoped_ptr.hpp>
+#include <boost/lambda/core.hpp>
+#include <boost/lambda/bind.hpp>
+
+namespace bll = boost::lambda;
+
+LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter)
+ : LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"),
+ mWindow(window),
+ mKbGetter(kbgetter)
+{
+ std::string keySomething =
+ "Given [\"keysym\"], [\"keycode\"] or [\"char\"], inject the specified ";
+ std::string keyExplain =
+ "(integer keycode values, or keysym string from any addKeyName() call in\n"
+ "http://hg.secondlife.com/viewer-development/src/tip/indra/llwindow/llkeyboard.cpp )\n";
+ std::string mask =
+ "Specify optional [\"mask\"] as an array containing any of \"CTL\", \"ALT\",\n"
+ "\"SHIFT\" or \"MAC_CONTROL\"; the corresponding modifier bits will be combined\n"
+ "to form the mask used with the event.";
+
+ std::string given = "Given ";
+ std::string mouseParams =
+ "optional [\"path\"], optional [\"x\"] and [\"y\"], inject the requested mouse ";
+ std::string buttonParams =
+ std::string("[\"button\"], ") + mouseParams;
+ std::string buttonExplain =
+ "(button values \"LEFT\", \"MIDDLE\", \"RIGHT\")\n";
+ std::string paramsExplain =
+ "[\"path\"] is as for LLUI::resolvePath(), described in\n"
+ "http://hg.secondlife.com/viewer-development/src/tip/indra/llui/llui.h\n"
+ "If you omit [\"path\"], you must specify both [\"x\"] and [\"y\"].\n"
+ "If you specify [\"path\"] without both [\"x\"] and [\"y\"], will synthesize (x, y)\n"
+ "in the center of the LLView selected by [\"path\"].\n"
+ "You may specify [\"path\"] with both [\"x\"] and [\"y\"], will use your (x, y).\n"
+ "This may cause the LLView selected by [\"path\"] to reject the event.\n"
+ "Optional [\"reply\"] requests a reply event on the named LLEventPump.\n"
+ "reply[\"error\"] isUndefined (None) on success, else an explanatory message.\n";
+
+ add("getInfo",
+ "Get information about the ui element specified by [\"path\"]",
+ &LLWindowListener::getInfo,
+ LLSDMap("reply", LLSD()));
+ add("getPaths",
+ "Send on [\"reply\"] an event in which [\"paths\"] is an array of valid LLView\n"
+ "pathnames. Optional [\"under\"] pathname specifies the base node under which\n"
+ "to list; all nodes from root if no [\"under\"].",
+ &LLWindowListener::getPaths,
+ LLSDMap("reply", LLSD()));
+ add("keyDown",
+ keySomething + "keypress event.\n" + keyExplain + mask,
+ &LLWindowListener::keyDown);
+ add("keyUp",
+ keySomething + "key release event.\n" + keyExplain + mask,
+ &LLWindowListener::keyUp);
+ add("mouseDown",
+ given + buttonParams + "click event.\n" + buttonExplain + paramsExplain + mask,
+ &LLWindowListener::mouseDown);
+ add("mouseUp",
+ given + buttonParams + "release event.\n" + buttonExplain + paramsExplain + mask,
+ &LLWindowListener::mouseUp);
+ add("mouseMove",
+ given + mouseParams + "movement event.\n" + paramsExplain + mask,
+ &LLWindowListener::mouseMove);
+ add("mouseScroll",
+ "Given an integer number of [\"clicks\"], inject the requested mouse scroll event.\n"
+ "(positive clicks moves downward through typical content)",
+ &LLWindowListener::mouseScroll);
+}
+
+template <typename MAPPED>
+class StringLookup
+{
+private:
+ std::string mDesc;
+ typedef std::map<std::string, MAPPED> Map;
+ Map mMap;
+
+public:
+ StringLookup(const std::string& desc): mDesc(desc) {}
+
+ MAPPED lookup(const typename Map::key_type& key) const
+ {
+ typename Map::const_iterator found = mMap.find(key);
+ if (found == mMap.end())
+ {
+ LL_WARNS("LLWindowListener") << "Unknown " << mDesc << " '" << key << "'" << LL_ENDL;
+ return MAPPED();
+ }
+ return found->second;
+ }
+
+protected:
+ void add(const typename Map::key_type& key, const typename Map::mapped_type& value)
+ {
+ mMap.insert(typename Map::value_type(key, value));
+ }
+};
+
+namespace {
+
+// helper for getMask()
+MASK lookupMask_(const std::string& maskname)
+{
+ // It's unclear to me whether MASK_MAC_CONTROL is important, but it's not
+ // supported by maskFromString(). Handle that specially.
+ if (maskname == "MAC_CONTROL")
+ {
+ return MASK_MAC_CONTROL;
+ }
+ else
+ {
+ // In case of lookup failure, return MASK_NONE, which won't affect our
+ // caller's OR.
+ MASK mask(MASK_NONE);
+ LLKeyboard::maskFromString(maskname, &mask);
+ return mask;
+ }
+}
+
+MASK getMask(const LLSD& event)
+{
+ LLSD masknames(event["mask"]);
+ if (! masknames.isArray())
+ {
+ // If event["mask"] is a single string, perform normal lookup on it.
+ return lookupMask_(masknames);
+ }
+
+ // Here event["mask"] is an array of mask-name strings. OR together their
+ // corresponding bits.
+ MASK mask(MASK_NONE);
+ for (LLSD::array_const_iterator ai(masknames.beginArray()), aend(masknames.endArray());
+ ai != aend; ++ai)
+ {
+ mask |= lookupMask_(*ai);
+ }
+ return mask;
+}
+
+KEY getKEY(const LLSD& event)
+{
+ if (event.has("keysym"))
+ {
+ // Initialize to KEY_NONE; that way we can ignore the bool return from
+ // keyFromString() and, in the lookup-fail case, simply return KEY_NONE.
+ KEY key(KEY_NONE);
+ LLKeyboard::keyFromString(event["keysym"], &key);
+ return key;
+ }
+ else if (event.has("keycode"))
+ {
+ return KEY(event["keycode"].asInteger());
+ }
+ else
+ {
+ return KEY(event["char"].asString()[0]);
+ }
+}
+
+} // namespace
+
+void LLWindowListener::getInfo(LLSD const & evt)
+{
+ Response response(LLSD(), evt);
+
+ if (evt.has("path"))
+ {
+ std::string path(evt["path"]);
+ LLView * target_view = LLUI::resolvePath(LLUI::getRootView(), path);
+ if (target_view != 0)
+ {
+ response.setResponse(target_view->getInfo());
+ }
+ else
+ {
+ response.error(STRINGIZE(evt["op"].asString() << " request "
+ "specified invalid \"path\": '" << path << "'"));
+ }
+ }
+ else
+ {
+ response.error(
+ STRINGIZE(evt["op"].asString() << "request did not provide a path" ));
+ }
+}
+
+void LLWindowListener::getPaths(LLSD const & request)
+{
+ Response response(LLSD(), request);
+ LLView *root(LLUI::getRootView()), *base(NULL);
+ // Capturing request["under"] as string means we conflate the case in
+ // which there is no ["under"] key with the case in which its value is the
+ // empty string. That seems to make sense to me.
+ std::string under(request["under"]);
+
+ // Deal with optional "under" parameter
+ if (under.empty())
+ {
+ base = root;
+ }
+ else
+ {
+ base = LLUI::resolvePath(root, under);
+ if (! base)
+ {
+ return response.error(STRINGIZE(request["op"].asString() << " request "
+ "specified invalid \"under\" path: '" << under << "'"));
+ }
+ }
+
+ // Traverse the entire subtree under 'base', collecting pathnames
+ for (LLView::tree_iterator_t ti(base->beginTreeDFS()), tend(base->endTreeDFS());
+ ti != tend; ++ti)
+ {
+ response["paths"].append((*ti)->getPathname());
+ }
+}
+
+void LLWindowListener::keyDown(LLSD const & evt)
+{
+ Response response(LLSD(), evt);
+
+ if (evt.has("path"))
+ {
+ std::string path(evt["path"]);
+ LLView * target_view = LLUI::resolvePath(LLUI::getRootView(), path);
+ if (target_view == 0)
+ {
+ response.error(STRINGIZE(evt["op"].asString() << " request "
+ "specified invalid \"path\": '" << path << "'"));
+ }
+ else if(target_view->isAvailable())
+ {
+ response.setResponse(target_view->getInfo());
+
+ gFocusMgr.setKeyboardFocus(target_view);
+ KEY key = getKEY(evt);
+ MASK mask = getMask(evt);
+ gViewerKeyboard.handleKey(key, mask, false);
+ if(key < 0x80) mWindow->handleUnicodeChar(key, mask);
+ }
+ else
+ {
+ response.error(STRINGIZE(evt["op"].asString() << " request "
+ "element specified by \"path\": '" << path << "'"
+ << " is not visible"));
+ }
+ }
+ else
+ {
+ mKbGetter()->handleTranslatedKeyDown(getKEY(evt), getMask(evt));
+ }
+}
+
+void LLWindowListener::keyUp(LLSD const & evt)
+{
+ Response response(LLSD(), evt);
+
+ if (evt.has("path"))
+ {
+ std::string path(evt["path"]);
+ LLView * target_view = LLUI::resolvePath(LLUI::getRootView(), path);
+ if (target_view == 0 )
+ {
+ response.error(STRINGIZE(evt["op"].asString() << " request "
+ "specified invalid \"path\": '" << path << "'"));
+ }
+ else if (target_view->isAvailable())
+ {
+ response.setResponse(target_view->getInfo());
+
+ gFocusMgr.setKeyboardFocus(target_view);
+ mKbGetter()->handleTranslatedKeyUp(getKEY(evt), getMask(evt));
+ }
+ else
+ {
+ response.error(STRINGIZE(evt["op"].asString() << " request "
+ "element specified byt \"path\": '" << path << "'"
+ << " is not visible"));
+ }
+ }
+ else
+ {
+ mKbGetter()->handleTranslatedKeyUp(getKEY(evt), getMask(evt));
+ }
+}
+
+// for WhichButton
+typedef BOOL (LLWindowCallbacks::*MouseMethod)(LLWindow *, LLCoordGL, MASK);
+struct Actions
+{
+ Actions(const MouseMethod& d, const MouseMethod& u): down(d), up(u), valid(true) {}
+ Actions(): valid(false) {}
+ MouseMethod down, up;
+ bool valid;
+};
+
+struct WhichButton: public StringLookup<Actions>
+{
+ WhichButton(): StringLookup<Actions>("mouse button")
+ {
+ add("LEFT", Actions(&LLWindowCallbacks::handleMouseDown,
+ &LLWindowCallbacks::handleMouseUp));
+ add("RIGHT", Actions(&LLWindowCallbacks::handleRightMouseDown,
+ &LLWindowCallbacks::handleRightMouseUp));
+ add("MIDDLE", Actions(&LLWindowCallbacks::handleMiddleMouseDown,
+ &LLWindowCallbacks::handleMiddleMouseUp));
+ }
+};
+static WhichButton buttons;
+
+typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc;
+
+static void mouseEvent(const MouseFunc& func, const LLSD& request)
+{
+ // Ensure we send response
+ LLEventAPI::Response response(LLSD(), request);
+ // We haven't yet established whether the incoming request has "x" and "y",
+ // but capture this anyway, with 0 for omitted values.
+ LLCoordGL pos(request["x"].asInteger(), request["y"].asInteger());
+ bool has_pos(request.has("x") && request.has("y"));
+
+ boost::scoped_ptr<LLView::TemporaryDrilldownFunc> tempfunc;
+
+ // Documentation for mouseDown(), mouseUp() and mouseMove() claims you
+ // must either specify ["path"], or both of ["x"] and ["y"]. You MAY
+ // specify all. Let's say that passing "path" as an empty string is
+ // equivalent to not passing it at all.
+ std::string path(request["path"]);
+ if (path.empty())
+ {
+ // Without "path", you must specify both "x" and "y".
+ if (! has_pos)
+ {
+ return response.error(STRINGIZE(request["op"].asString() << " request "
+ "without \"path\" must specify both \"x\" and \"y\": "
+ << request));
+ }
+ }
+ else // ! path.empty()
+ {
+ LLView* root = LLUI::getRootView();
+ LLView* target = LLUI::resolvePath(root, path);
+ if (! target)
+ {
+ return response.error(STRINGIZE(request["op"].asString() << " request "
+ "specified invalid \"path\": '" << path << "'"));
+ }
+
+ response.setResponse(target->getInfo());
+
+ // The intent of this test is to prevent trying to drill down to a
+ // widget in a hidden floater, or on a tab that's not current, etc.
+ if (! target->isInVisibleChain())
+ {
+ return response.error(STRINGIZE(request["op"].asString() << " request "
+ "specified \"path\" not currently visible: '"
+ << path << "'"));
+ }
+
+ // This test isn't folded in with the above error case since you can
+ // (e.g.) pop up a tooltip even for a disabled widget.
+ if (! target->isInEnabledChain())
+ {
+ response.warn(STRINGIZE(request["op"].asString() << " request "
+ "specified \"path\" not currently enabled: '"
+ << path << "'"));
+ }
+
+ if (! has_pos)
+ {
+ LLRect rect(target->calcScreenRect());
+ pos.set(rect.getCenterX(), rect.getCenterY());
+ // nonstandard warning tactic: probably usual case; we want event
+ // sender to know synthesized (x, y), but maybe don't need to log?
+ response["warnings"].append(STRINGIZE("using center point ("
+ << pos.mX << ", " << pos.mY << ")"));
+ }
+
+/*==========================================================================*|
+ // NEVER MIND: the LLView tree defines priority handler layers in
+ // front of the normal widget set, so this has never yet produced
+ // anything but spam warnings. (sigh)
+
+ // recursive childFromPoint() should give us the frontmost, leafmost
+ // widget at the specified (x, y).
+ LLView* frontmost = root->childFromPoint(pos.mX, pos.mY, true);
+ if (frontmost != target)
+ {
+ response.warn(STRINGIZE(request["op"].asString() << " request "
+ "specified \"path\" = '" << path
+ << "', but frontmost LLView at (" << pos.mX << ", " << pos.mY
+ << ") is '" << LLView::getPathname(frontmost) << "'"));
+ }
+|*==========================================================================*/
+
+ // Instantiate a TemporaryDrilldownFunc to route incoming mouse events
+ // to the target LLView*. But put it on the heap since "path" is
+ // optional. Nonetheless, manage it with a boost::scoped_ptr so it
+ // will be destroyed when we leave.
+ tempfunc.reset(new LLView::TemporaryDrilldownFunc(llview::TargetEvent(target)));
+ }
+
+ // The question of whether the requested LLView actually handled the
+ // specified event is important enough, and its handling unclear enough,
+ // to warrant a separate response attribute. Instead of deciding here to
+ // make it a warning, or an error, let caller decide.
+ response["handled"] = func(pos, getMask(request));
+
+ // On exiting this scope, response will send, tempfunc will restore the
+ // normal pointInView(x, y) containment logic, etc.
+}
+
+void LLWindowListener::mouseDown(LLSD const & request)
+{
+ Actions actions(buttons.lookup(request["button"]));
+ if (actions.valid)
+ {
+ // Normally you can pass NULL to an LLWindow* without compiler
+ // complaint, but going through boost::lambda::bind() evidently
+ // bypasses that special case: it only knows you're trying to pass an
+ // int to a pointer. Explicitly cast NULL to the desired pointer type.
+ mouseEvent(bll::bind(actions.down, mWindow,
+ static_cast<LLWindow*>(NULL), bll::_1, bll::_2),
+ request);
+ }
+}
+
+void LLWindowListener::mouseUp(LLSD const & request)
+{
+ Actions actions(buttons.lookup(request["button"]));
+ if (actions.valid)
+ {
+ mouseEvent(bll::bind(actions.up, mWindow,
+ static_cast<LLWindow*>(NULL), bll::_1, bll::_2),
+ request);
+ }
+}
+
+void LLWindowListener::mouseMove(LLSD const & request)
+{
+ // We want to call the same central mouseEvent() routine for
+ // handleMouseMove() as for button clicks. But handleMouseMove() returns
+ // void, whereas mouseEvent() accepts a function returning bool -- and
+ // uses that bool return. Use (void-lambda-expression, true) to construct
+ // a callable that returns bool anyway. Pass 'true' because we expect that
+ // our caller will usually treat 'false' as a problem.
+ mouseEvent((bll::bind(&LLWindowCallbacks::handleMouseMove, mWindow,
+ static_cast<LLWindow*>(NULL), bll::_1, bll::_2),
+ true),
+ request);
+}
+
+void LLWindowListener::mouseScroll(LLSD const & request)
+{
+ S32 clicks = request["clicks"].asInteger();
+
+ mWindow->handleScrollWheel(NULL, clicks);
+}
diff --git a/indra/llwindow/llwindowlistener.h b/indra/newview/llwindowlistener.h
index 74e577ff93..7af5ab3b9f 100644
--- a/indra/llwindow/llwindowlistener.h
+++ b/indra/newview/llwindowlistener.h
@@ -31,14 +31,16 @@
#include <boost/function.hpp>
class LLKeyboard;
-class LLWindowCallbacks;
+class LLViewerWindow;
class LLWindowListener : public LLEventAPI
{
public:
typedef boost::function<LLKeyboard*()> KeyboardGetter;
- LLWindowListener(LLWindowCallbacks * window, const KeyboardGetter& kbgetter);
+ LLWindowListener(LLViewerWindow * window, const KeyboardGetter& kbgetter);
+ void getInfo(LLSD const & evt);
+ void getPaths(LLSD const & evt);
void keyDown(LLSD const & evt);
void keyUp(LLSD const & evt);
void mouseDown(LLSD const & evt);
@@ -47,7 +49,7 @@ public:
void mouseScroll(LLSD const & evt);
private:
- LLWindowCallbacks * mWindow;
+ LLViewerWindow * mWindow;
KeyboardGetter mKbGetter;
};
diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp
index b5f53232cc..2425b96678 100644
--- a/indra/newview/llwlhandlers.cpp
+++ b/indra/newview/llwlhandlers.cpp
@@ -2,31 +2,25 @@
* @file llwlhandlers.cpp
* @brief Various classes which handle Windlight-related messaging
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
* 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://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * 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://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * 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.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/llwlhandlers.h b/indra/newview/llwlhandlers.h
index 213bc7c7ce..23558876da 100644
--- a/indra/newview/llwlhandlers.h
+++ b/indra/newview/llwlhandlers.h
@@ -2,31 +2,25 @@
* @file llwlhandlers.h
* @brief Headers for classes in llwlhandlers.cpp
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
* 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://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
*
- * 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://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * 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.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 02d914a812..5bb7025031 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -69,12 +69,18 @@ LLWLParamSet::LLWLParamSet(void) :
*/
}
+static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
+
void LLWLParamSet::update(LLGLSLShader * shader) const
{
+ LLFastTimer t(FTM_WL_PARAM_UPDATE);
+
for(LLSD::map_const_iterator i = mParamValues.beginMap();
i != mParamValues.endMap();
++i)
{
+
+
const std::string& param = i->first;
if( param == "star_brightness" || param == "preset_num" || param == "sun_angle" ||
@@ -91,8 +97,9 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
val.mV[1] = F32(i->second[1].asReal()) + mCloudScrollYOffset;
val.mV[2] = (F32) i->second[2].asReal();
val.mV[3] = (F32) i->second[3].asReal();
-
- shader->uniform4fv(param, 1, val.mV);
+ stop_glerror();
+ shader->uniform4fv(param, 1, val.mV);
+ stop_glerror();
}
else // param is the uniform name
{
@@ -118,8 +125,9 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
{
val.mV[0] = i->second.asBoolean();
}
-
+ stop_glerror();
shader->uniform4fv(param, 1, val.mV);
+ stop_glerror();
}
}
}
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 4a6ec7fdbb..6f6e0d2334 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -127,6 +127,12 @@ void LLWorld::destroyClass()
LLVOCache::getInstance()->destroyClass() ;
}
LLViewerPartSim::getInstance()->destroyClass();
+
+ mDefaultWaterTexturep = NULL ;
+ for (S32 i = 0; i < 8; i++)
+ {
+ mEdgeWaterObjects[i] = NULL;
+ }
}
@@ -583,22 +589,22 @@ void LLWorld::updateVisibilities()
{
F32 cur_far_clip = LLViewerCamera::getInstance()->getFar();
- LLViewerCamera::getInstance()->setFar(mLandFarClip);
-
- F32 diagonal_squared = F_SQRT2 * F_SQRT2 * mWidth * mWidth;
- // Go through the culled list and check for visible regions
+ // Go through the culled list and check for visible regions (region is visible if land is visible)
for (region_list_t::iterator iter = mCulledRegionList.begin();
iter != mCulledRegionList.end(); )
{
region_list_t::iterator curiter = iter++;
LLViewerRegion* regionp = *curiter;
- F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
- F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
- if (!regionp->getLand().hasZData()
- || LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
+
+ LLSpatialPartition* part = regionp->getSpatialPartition(LLViewerRegion::PARTITION_TERRAIN);
+ if (part)
{
- mCulledRegionList.erase(curiter);
- mVisibleRegionList.push_back(regionp);
+ LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
+ if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ {
+ mCulledRegionList.erase(curiter);
+ mVisibleRegionList.push_back(regionp);
+ }
}
}
@@ -613,17 +619,20 @@ void LLWorld::updateVisibilities()
continue;
}
- F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
- F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
- if (LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
- {
- regionp->calculateCameraDistance();
- regionp->getLand().updatePatchVisibilities(gAgent);
- }
- else
+ LLSpatialPartition* part = regionp->getSpatialPartition(LLViewerRegion::PARTITION_TERRAIN);
+ if (part)
{
- mVisibleRegionList.erase(curiter);
- mCulledRegionList.push_back(regionp);
+ LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
+ if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ {
+ regionp->calculateCameraDistance();
+ regionp->getLand().updatePatchVisibilities(gAgent);
+ }
+ else
+ {
+ mVisibleRegionList.erase(curiter);
+ mCulledRegionList.push_back(regionp);
+ }
}
}
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index 66d0d698ba..8307d32336 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -210,15 +210,14 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
}
// Handle the SLURL callback if any
- if(LLWorldMapMessage::getInstance()->mSLURLCallback != NULL)
+ url_callback_t callback = LLWorldMapMessage::getInstance()->mSLURLCallback;
+ if(callback != NULL)
{
U64 handle = to_region_handle(x_world, y_world);
// Check if we reached the requested region
if ((LLStringUtil::compareInsensitive(LLWorldMapMessage::getInstance()->mSLURLRegionName, name)==0)
|| (LLWorldMapMessage::getInstance()->mSLURLRegionHandle == handle))
{
- url_callback_t callback = LLWorldMapMessage::getInstance()->mSLURLCallback;
-
LLWorldMapMessage::getInstance()->mSLURLCallback = NULL;
LLWorldMapMessage::getInstance()->mSLURLRegionName.clear();
LLWorldMapMessage::getInstance()->mSLURLRegionHandle = 0;
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 8cdb615686..e50851b8e7 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -314,7 +314,7 @@ void LLWorldMapView::draw()
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
// Clear the background alpha to 0
gGL.flush();
@@ -422,7 +422,7 @@ void LLWorldMapView::draw()
// Draw something whenever we have enough info
if (overlayimage->hasGLTexture())
{
- gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO);
+ gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
gGL.getTexUnit(0)->bind(overlayimage);
gGL.color4f(1.f, 1.f, 1.f, 1.f);
gGL.begin(LLRender::QUADS);
@@ -1307,7 +1307,7 @@ void LLWorldMapView::drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const
end_theta -= angle_adjust_y;
}
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
gGL.translatef((F32)x, (F32)y, 0.f);
gl_washer_segment_2d(inner_radius, outer_radius, start_theta, end_theta, 40, color, color);
@@ -1752,13 +1752,13 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
case MAP_ITEM_LAND_FOR_SALE_ADULT:
{
LLFloaterReg::hideInstance("world_map");
- LLFloaterReg::showInstance("search", LLSD().with("category", "destinations").with("id", id));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "destinations").with("query", id));
break;
}
case MAP_ITEM_CLASSIFIED:
{
LLFloaterReg::hideInstance("world_map");
- LLFloaterReg::showInstance("search", LLSD().with("category", "classifieds").with("id", id));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "classifieds").with("query", id));
break;
}
default:
diff --git a/indra/newview/llworldview.cpp b/indra/newview/llworldview.cpp
deleted file mode 100644
index f5dc2a5290..0000000000
--- a/indra/newview/llworldview.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file llworldview.cpp
- * @brief LLWorldView class implementation
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llworldview.h"
-
-#include "llviewercontrol.h"
-#include "llsidetray.h"
-/////////////////////////////////////////////////////
-// LLFloaterView
-
-static LLDefaultChildRegistry::Register<LLWorldView> r("world_view");
-
-LLWorldView::LLWorldView(const Params& p)
-: LLUICtrl (p)
-{
- gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLWorldView::toggleSidebarCameraMovement, this, _2));
-}
-
-void LLWorldView::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- //if (FALSE == gSavedSettings.getBOOL("SidebarCameraMovement") )
- //{
- // LLView* main_view = LLUI::getRootView()->findChild<LLView>("main_view");
- // if(main_view)
- // {
- // width = main_view->getRect().getWidth();
- // }
- //}
-
- LLUICtrl::reshape(width, height, called_from_parent);
-}
-void LLWorldView::toggleSidebarCameraMovement(const LLSD::Boolean& new_visibility)
-{
- reshape(getParent()->getRect().getWidth(),getRect().getHeight());
-}
-
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 257884d921..f483ba5af8 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -306,19 +306,8 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
mCurlRequest = new LLCurlEasyRequest();
}
mErrorCert = NULL;
-
- if (gSavedSettings.getBOOL("BrowserProxyEnabled"))
- {
- mProxyAddress = gSavedSettings.getString("BrowserProxyAddress");
- S32 port = gSavedSettings.getS32 ( "BrowserProxyPort" );
-
- // tell curl about the settings
- mCurlRequest->setoptString(CURLOPT_PROXY, mProxyAddress);
- mCurlRequest->setopt(CURLOPT_PROXYPORT, port);
- mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
- }
-// mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging
+// mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // useful for debugging
mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1);
mCurlRequest->setWriteCallback(&curlDownloadCallback, (void*)this);
BOOL vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert");
@@ -394,16 +383,18 @@ bool LLXMLRPCTransaction::Impl::process()
}
}
- const F32 MAX_PROCESSING_TIME = 0.05f;
- LLTimer timer;
+ //const F32 MAX_PROCESSING_TIME = 0.05f;
+ //LLTimer timer;
+
+ mCurlRequest->perform();
- while (mCurlRequest->perform() > 0)
+ /*while (mCurlRequest->perform() > 0)
{
if (timer.getElapsedTimeF32() >= MAX_PROCESSING_TIME)
{
return false;
}
- }
+ }*/
while(1)
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e74bf2a620..d8e271811a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -103,28 +103,9 @@
#include "llmutelist.h"
#include "lltoolpie.h"
#include "llcurl.h"
+#include "llnotifications.h"
-void check_stack_depth(S32 stack_depth)
-{
- if (gDebugGL || gDebugSession)
- {
- GLint depth;
- glGetIntegerv(GL_MODELVIEW_STACK_DEPTH, &depth);
- if (depth != stack_depth)
- {
- if (gDebugSession)
- {
- ll_fail("GL matrix stack corrupted.");
- }
- else
- {
- llerrs << "GL matrix stack corrupted!" << llendl;
- }
- }
- }
-}
-
#ifdef _DEBUG
// Debug indices is disabled for now for debug performance - djs 4/24/02
//#define DEBUG_INDICES
@@ -132,13 +113,88 @@ void check_stack_depth(S32 stack_depth)
//#define DEBUG_INDICES
#endif
+//cached settings
+BOOL LLPipeline::RenderAvatarVP;
+BOOL LLPipeline::VertexShaderEnable;
+BOOL LLPipeline::WindLightUseAtmosShaders;
+BOOL LLPipeline::RenderDeferred;
+F32 LLPipeline::RenderDeferredSunWash;
+U32 LLPipeline::RenderFSAASamples;
+U32 LLPipeline::RenderResolutionDivisor;
+BOOL LLPipeline::RenderUIBuffer;
+S32 LLPipeline::RenderShadowDetail;
+BOOL LLPipeline::RenderDeferredSSAO;
+F32 LLPipeline::RenderShadowResolutionScale;
+BOOL LLPipeline::RenderLocalLights;
+BOOL LLPipeline::RenderDelayCreation;
+BOOL LLPipeline::RenderAnimateRes;
+BOOL LLPipeline::FreezeTime;
+S32 LLPipeline::DebugBeaconLineWidth;
+F32 LLPipeline::RenderHighlightBrightness;
+LLColor4 LLPipeline::RenderHighlightColor;
+F32 LLPipeline::RenderHighlightThickness;
+BOOL LLPipeline::RenderSpotLightsInNondeferred;
+LLColor4 LLPipeline::PreviewAmbientColor;
+LLColor4 LLPipeline::PreviewDiffuse0;
+LLColor4 LLPipeline::PreviewSpecular0;
+LLColor4 LLPipeline::PreviewDiffuse1;
+LLColor4 LLPipeline::PreviewSpecular1;
+LLColor4 LLPipeline::PreviewDiffuse2;
+LLColor4 LLPipeline::PreviewSpecular2;
+LLVector3 LLPipeline::PreviewDirection0;
+LLVector3 LLPipeline::PreviewDirection1;
+LLVector3 LLPipeline::PreviewDirection2;
+F32 LLPipeline::RenderGlowMinLuminance;
+F32 LLPipeline::RenderGlowMaxExtractAlpha;
+F32 LLPipeline::RenderGlowWarmthAmount;
+LLVector3 LLPipeline::RenderGlowLumWeights;
+LLVector3 LLPipeline::RenderGlowWarmthWeights;
+S32 LLPipeline::RenderGlowResolutionPow;
+S32 LLPipeline::RenderGlowIterations;
+F32 LLPipeline::RenderGlowWidth;
+F32 LLPipeline::RenderGlowStrength;
+BOOL LLPipeline::RenderDepthOfField;
+F32 LLPipeline::CameraFocusTransitionTime;
+F32 LLPipeline::CameraFNumber;
+F32 LLPipeline::CameraFocalLength;
+F32 LLPipeline::CameraFieldOfView;
+F32 LLPipeline::RenderShadowNoise;
+F32 LLPipeline::RenderShadowBlurSize;
+F32 LLPipeline::RenderSSAOScale;
+U32 LLPipeline::RenderSSAOMaxScale;
+F32 LLPipeline::RenderSSAOFactor;
+LLVector3 LLPipeline::RenderSSAOEffect;
+F32 LLPipeline::RenderShadowOffsetError;
+F32 LLPipeline::RenderShadowBiasError;
+F32 LLPipeline::RenderShadowOffset;
+F32 LLPipeline::RenderShadowBias;
+F32 LLPipeline::RenderSpotShadowOffset;
+F32 LLPipeline::RenderSpotShadowBias;
+F32 LLPipeline::RenderEdgeDepthCutoff;
+F32 LLPipeline::RenderEdgeNormCutoff;
+LLVector3 LLPipeline::RenderShadowGaussian;
+F32 LLPipeline::RenderShadowBlurDistFactor;
+BOOL LLPipeline::RenderDeferredAtmospheric;
+S32 LLPipeline::RenderReflectionDetail;
+F32 LLPipeline::RenderHighlightFadeTime;
+LLVector3 LLPipeline::RenderShadowClipPlanes;
+LLVector3 LLPipeline::RenderShadowOrthoClipPlanes;
+LLVector3 LLPipeline::RenderShadowNearDist;
+F32 LLPipeline::RenderFarClip;
+LLVector3 LLPipeline::RenderShadowSplitExponent;
+F32 LLPipeline::RenderShadowErrorCutoff;
+F32 LLPipeline::RenderShadowFOVCutoff;
+BOOL LLPipeline::CameraOffset;
+F32 LLPipeline::CameraMaxCoF;
+F32 LLPipeline::CameraDoFResScale;
+
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f;
const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10;
const U32 REFLECTION_MAP_RES = 128;
-
+const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1;
// Max number of occluders to search for. JC
const S32 MAX_OCCLUDER_COUNT = 2;
@@ -210,23 +266,12 @@ std::string gPoolNames[] =
void drawBox(const LLVector3& c, const LLVector3& r);
void drawBoxOutline(const LLVector3& pos, const LLVector3& size);
+U32 nhpo2(U32 v);
-U32 nhpo2(U32 v)
-{
- U32 r = 1;
- while (r < v) {
- r *= 2;
- }
- return r;
-}
-
-glh::matrix4f glh_copy_matrix(GLdouble* src)
+glh::matrix4f glh_copy_matrix(F32* src)
{
glh::matrix4f ret;
- for (U32 i = 0; i < 16; i++)
- {
- ret.m[i] = (F32) src[i];
- }
+ ret.set_value(src);
return ret;
}
@@ -250,7 +295,7 @@ glh::matrix4f glh_get_last_projection()
return glh_copy_matrix(gGLLastProjection);
}
-void glh_copy_matrix(const glh::matrix4f& src, GLdouble* dst)
+void glh_copy_matrix(const glh::matrix4f& src, F32* dst)
{
for (U32 i = 0; i < 16; i++)
{
@@ -317,6 +362,7 @@ BOOL LLPipeline::sRenderFrameTest = FALSE;
BOOL LLPipeline::sRenderAttachedLights = TRUE;
BOOL LLPipeline::sRenderAttachedParticles = TRUE;
BOOL LLPipeline::sRenderDeferred = FALSE;
+BOOL LLPipeline::sMemAllocationThrottled = FALSE;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
@@ -336,10 +382,10 @@ static const U32 gl_cube_face[] =
void validate_framebuffer_object();
-void addDeferredAttachments(LLRenderTarget& target)
+bool addDeferredAttachments(LLRenderTarget& target)
{
- target.addColorAttachment(GL_RGBA); //specular
- target.addColorAttachment(GL_RGBA); //normal+z
+ return target.addColorAttachment(GL_RGBA) && //specular
+ target.addColorAttachment(GL_RGBA); //normal+z
}
LLPipeline::LLPipeline() :
@@ -392,11 +438,14 @@ void LLPipeline::init()
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
+ refreshCachedSettings();
+
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
+ LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw");
sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
@@ -457,6 +506,8 @@ void LLPipeline::init()
mSpotLightFade[i] = 1.f;
}
+ mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0);
+ mDeferredVB->allocateBuffer(8, 0, true);
setLightingDetail(-1);
}
@@ -535,6 +586,8 @@ void LLPipeline::cleanup()
mMovedBridge.clear();
mInitialized = FALSE;
+
+ mDeferredVB = NULL;
}
//============================================================================
@@ -561,6 +614,24 @@ void LLPipeline::destroyGL()
static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
+//static
+void LLPipeline::throttleNewMemoryAllocation(BOOL disable)
+{
+ if(sMemAllocationThrottled != disable)
+ {
+ sMemAllocationThrottled = disable ;
+
+ if(sMemAllocationThrottled)
+ {
+ //send out notification
+ LLNotification::Params params("LowMemory");
+ LLNotifications::instance().add(params);
+
+ //release some memory.
+ }
+ }
+}
+
void LLPipeline::resizeScreenTexture()
{
LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE);
@@ -586,19 +657,63 @@ void LLPipeline::allocatePhysicsBuffer()
void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{
- // remember these dimensions
- mScreenWidth = resX;
- mScreenHeight = resY;
-
- //cap samples at 4 for render targets to avoid out of memory errors
- U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
+ refreshCachedSettings();
+ U32 samples = RenderFSAASamples;
+
+ //try to allocate screen buffers at requested resolution and samples
+ // - on failure, shrink number of samples and try again
+ // - if not multisampled, shrink resolution and try again (favor X resolution over Y)
+ // Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state
+
+ if (!allocateScreenBuffer(resX, resY, samples))
+ {
+ releaseScreenBuffers();
+ //reduce number of samples
+ while (samples > 0)
+ {
+ samples /= 2;
+ if (allocateScreenBuffer(resX, resY, samples))
+ { //success
+ return;
+ }
+ releaseScreenBuffers();
+ }
- if (gGLManager.mIsATI)
- { //disable multisampling of render targets where ATI is involved
samples = 0;
+
+ //reduce resolution
+ while (resY > 0 && resX > 0)
+ {
+ resY /= 2;
+ if (allocateScreenBuffer(resX, resY, samples))
+ {
+ return;
+ }
+ releaseScreenBuffers();
+
+ resX /= 2;
+ if (allocateScreenBuffer(resX, resY, samples))
+ {
+ return;
+ }
+ releaseScreenBuffers();
+ }
+
+ llwarns << "Unable to allocate screen buffer at any resolution!" << llendl;
}
+}
- U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
+
+bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
+{
+ refreshCachedSettings();
+ refreshRenderDeferred();
+
+ // remember these dimensions
+ mScreenWidth = resX;
+ mScreenHeight = resY;
+
+ U32 res_mod = RenderResolutionDivisor;
if (res_mod > 1 && res_mod < resX && res_mod < resY)
{
@@ -606,86 +721,50 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
resY /= res_mod;
}
- if (gSavedSettings.getBOOL("RenderUIBuffer"))
+ if (RenderUIBuffer)
{
- mUIScreen.allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+ if (!mUIScreen.allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE))
+ {
+ return false;
+ }
}
if (LLPipeline::sRenderDeferred)
{
- S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
- BOOL ssao = gSavedSettings.getBOOL("RenderDeferredSSAO");
- bool gi = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED);
-
+ S32 shadow_detail = RenderShadowDetail;
+ BOOL ssao = RenderDeferredSSAO;
+
//allocate deferred rendering color buffers
- mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples);
- mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples);
- addDeferredAttachments(mDeferredScreen);
+ if (!mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
+ if (!mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
+ if (!addDeferredAttachments(mDeferredScreen)) return false;
- mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples);
-
-#if LL_DARWIN
- // As of OS X 10.6.7, Apple doesn't support multiple color formats in a single FBO
- mEdgeMap.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
-#else
- mEdgeMap.allocate(resX, resY, GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
-#endif
-
- if (shadow_detail > 0 || ssao)
- { //only need mDeferredLight[0] for shadows OR ssao
- mDeferredLight[0].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
- }
- else
+ if (!mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
+ if (samples > 0)
{
- mDeferredLight[0].release();
- }
-
- if (ssao)
- { //only need mDeferredLight[1] for ssao
- mDeferredLight[1].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false);
+ if (!mFXAABuffer.allocate(nhpo2(resX), nhpo2(resY), GL_RGBA, FALSE, FALSE, LLTexUnit::TT_TEXTURE, FALSE, samples)) return false;
}
else
{
- mDeferredLight[1].release();
+ mFXAABuffer.release();
}
-
- if (gi)
- { //only need mDeferredLight[2] and mGIMapPost for gi
- mDeferredLight[2].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false);
- for (U32 i = 0; i < 2; i++)
- {
-#if LL_DARWIN
- // As of OS X 10.6.7, Apple doesn't support multiple color formats in a single FBO
- mGIMapPost[i].allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
-#else
- mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
-#endif
- }
+
+ if (shadow_detail > 0 || ssao || RenderDepthOfField || samples > 0)
+ { //only need mDeferredLight for shadows OR ssao OR dof OR fxaa
+ if (!mDeferredLight.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
else
{
- mDeferredLight[2].release();
-
- for (U32 i = 0; i < 2; i++)
- {
- mGIMapPost[i].release();
- }
+ mDeferredLight.release();
}
- F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale");
-
-#if LL_DARWIN
- U32 shadow_fmt = 0;
-#else
- //HACK: make alpha masking work on ATI depth shadows (work around for ATI driver bug)
- U32 shadow_fmt = gGLManager.mIsATI ? GL_ALPHA : 0;
-#endif
+ F32 scale = RenderShadowResolutionScale;
if (shadow_detail > 0)
{ //allocate 4 sun shadow maps
for (U32 i = 0; i < 4; i++)
{
- mShadow[i].allocate(U32(resX*scale),U32(resY*scale), shadow_fmt, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE);
+ if (!mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
}
}
else
@@ -703,7 +782,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{ //allocate two spot shadow maps
for (U32 i = 4; i < 6; i++)
{
- mShadow[i].allocate(width, height, shadow_fmt, TRUE, FALSE);
+ if (!mShadow[i].allocate(width, height, 0, TRUE, FALSE)) return false;
}
}
else
@@ -713,32 +792,21 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
mShadow[i].release();
}
}
-
- width = nhpo2(resX)/2;
- height = nhpo2(resY)/2;
- mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE);
}
else
{
- for (U32 i = 0; i < 3; i++)
- {
- mDeferredLight[i].release();
- }
- for (U32 i = 0; i < 2; i++)
- {
- mGIMapPost[i].release();
- }
+ mDeferredLight.release();
+
for (U32 i = 0; i < 6; i++)
{
mShadow[i].release();
}
+ mFXAABuffer.release();
mScreen.release();
mDeferredScreen.release(); //make sure to release any render targets that share a depth buffer with mDeferredScreen first
mDeferredDepth.release();
- mEdgeMap.release();
- mLuminanceMap.release();
-
- mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE);
+
+ if (!mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
if (LLPipeline::sRenderDeferred)
@@ -750,17 +818,18 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
stop_glerror();
+ return true;
}
//static
void LLPipeline::updateRenderDeferred()
{
- BOOL deferred = ((gSavedSettings.getBOOL("RenderDeferred") &&
+ BOOL deferred = ((RenderDeferred &&
LLRenderTarget::sUseFBO &&
- LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- gSavedSettings.getBOOL("VertexShaderEnable") &&
- gSavedSettings.getBOOL("RenderAvatarVP") &&
- gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE) &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ VertexShaderEnable &&
+ RenderAvatarVP &&
+ WindLightUseAtmosShaders) ? TRUE : FALSE) &&
!gUseWireframe;
sRenderDeferred = deferred;
@@ -776,6 +845,96 @@ void LLPipeline::refreshRenderDeferred()
updateRenderDeferred();
}
+//static
+void LLPipeline::refreshCachedSettings()
+{
+ LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
+ LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
+ LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
+ LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
+ LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
+
+ LLPipeline::sUseOcclusion =
+ (!gUseWireframe
+ && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
+ && gSavedSettings.getBOOL("UseOcclusion")
+ && gGLManager.mHasOcclusionQuery) ? 2 : 0;
+
+ VertexShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable");
+ RenderAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP");
+ WindLightUseAtmosShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ RenderDeferred = gSavedSettings.getBOOL("RenderDeferred");
+ RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash");
+ RenderFSAASamples = gSavedSettings.getU32("RenderFSAASamples");
+ RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
+ RenderUIBuffer = gSavedSettings.getBOOL("RenderUIBuffer");
+ RenderShadowDetail = gSavedSettings.getS32("RenderShadowDetail");
+ RenderDeferredSSAO = gSavedSettings.getBOOL("RenderDeferredSSAO");
+ RenderShadowResolutionScale = gSavedSettings.getF32("RenderShadowResolutionScale");
+ RenderLocalLights = gSavedSettings.getBOOL("RenderLocalLights");
+ RenderDelayCreation = gSavedSettings.getBOOL("RenderDelayCreation");
+ RenderAnimateRes = gSavedSettings.getBOOL("RenderAnimateRes");
+ FreezeTime = gSavedSettings.getBOOL("FreezeTime");
+ DebugBeaconLineWidth = gSavedSettings.getS32("DebugBeaconLineWidth");
+ RenderHighlightBrightness = gSavedSettings.getF32("RenderHighlightBrightness");
+ RenderHighlightColor = gSavedSettings.getColor4("RenderHighlightColor");
+ RenderHighlightThickness = gSavedSettings.getF32("RenderHighlightThickness");
+ RenderSpotLightsInNondeferred = gSavedSettings.getBOOL("RenderSpotLightsInNondeferred");
+ PreviewAmbientColor = gSavedSettings.getColor4("PreviewAmbientColor");
+ PreviewDiffuse0 = gSavedSettings.getColor4("PreviewDiffuse0");
+ PreviewSpecular0 = gSavedSettings.getColor4("PreviewSpecular0");
+ PreviewDiffuse1 = gSavedSettings.getColor4("PreviewDiffuse1");
+ PreviewSpecular1 = gSavedSettings.getColor4("PreviewSpecular1");
+ PreviewDiffuse2 = gSavedSettings.getColor4("PreviewDiffuse2");
+ PreviewSpecular2 = gSavedSettings.getColor4("PreviewSpecular2");
+ PreviewDirection0 = gSavedSettings.getVector3("PreviewDirection0");
+ PreviewDirection1 = gSavedSettings.getVector3("PreviewDirection1");
+ PreviewDirection2 = gSavedSettings.getVector3("PreviewDirection2");
+ RenderGlowMinLuminance = gSavedSettings.getF32("RenderGlowMinLuminance");
+ RenderGlowMaxExtractAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
+ RenderGlowWarmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
+ RenderGlowLumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
+ RenderGlowWarmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
+ RenderGlowResolutionPow = gSavedSettings.getS32("RenderGlowResolutionPow");
+ RenderGlowIterations = gSavedSettings.getS32("RenderGlowIterations");
+ RenderGlowWidth = gSavedSettings.getF32("RenderGlowWidth");
+ RenderGlowStrength = gSavedSettings.getF32("RenderGlowStrength");
+ RenderDepthOfField = gSavedSettings.getBOOL("RenderDepthOfField");
+ CameraFocusTransitionTime = gSavedSettings.getF32("CameraFocusTransitionTime");
+ CameraFNumber = gSavedSettings.getF32("CameraFNumber");
+ CameraFocalLength = gSavedSettings.getF32("CameraFocalLength");
+ CameraFieldOfView = gSavedSettings.getF32("CameraFieldOfView");
+ RenderShadowNoise = gSavedSettings.getF32("RenderShadowNoise");
+ RenderShadowBlurSize = gSavedSettings.getF32("RenderShadowBlurSize");
+ RenderSSAOScale = gSavedSettings.getF32("RenderSSAOScale");
+ RenderSSAOMaxScale = gSavedSettings.getU32("RenderSSAOMaxScale");
+ RenderSSAOFactor = gSavedSettings.getF32("RenderSSAOFactor");
+ RenderSSAOEffect = gSavedSettings.getVector3("RenderSSAOEffect");
+ RenderShadowOffsetError = gSavedSettings.getF32("RenderShadowOffsetError");
+ RenderShadowBiasError = gSavedSettings.getF32("RenderShadowBiasError");
+ RenderShadowOffset = gSavedSettings.getF32("RenderShadowOffset");
+ RenderShadowBias = gSavedSettings.getF32("RenderShadowBias");
+ RenderSpotShadowOffset = gSavedSettings.getF32("RenderSpotShadowOffset");
+ RenderSpotShadowBias = gSavedSettings.getF32("RenderSpotShadowBias");
+ RenderEdgeDepthCutoff = gSavedSettings.getF32("RenderEdgeDepthCutoff");
+ RenderEdgeNormCutoff = gSavedSettings.getF32("RenderEdgeNormCutoff");
+ RenderShadowGaussian = gSavedSettings.getVector3("RenderShadowGaussian");
+ RenderShadowBlurDistFactor = gSavedSettings.getF32("RenderShadowBlurDistFactor");
+ RenderDeferredAtmospheric = gSavedSettings.getBOOL("RenderDeferredAtmospheric");
+ RenderReflectionDetail = gSavedSettings.getS32("RenderReflectionDetail");
+ RenderHighlightFadeTime = gSavedSettings.getF32("RenderHighlightFadeTime");
+ RenderShadowClipPlanes = gSavedSettings.getVector3("RenderShadowClipPlanes");
+ RenderShadowOrthoClipPlanes = gSavedSettings.getVector3("RenderShadowOrthoClipPlanes");
+ RenderShadowNearDist = gSavedSettings.getVector3("RenderShadowNearDist");
+ RenderFarClip = gSavedSettings.getF32("RenderFarClip");
+ RenderShadowSplitExponent = gSavedSettings.getVector3("RenderShadowSplitExponent");
+ RenderShadowErrorCutoff = gSavedSettings.getF32("RenderShadowErrorCutoff");
+ RenderShadowFOVCutoff = gSavedSettings.getF32("RenderShadowFOVCutoff");
+ CameraOffset = gSavedSettings.getBOOL("CameraOffset");
+ CameraMaxCoF = gSavedSettings.getF32("CameraMaxCoF");
+ CameraDoFResScale = gSavedSettings.getF32("CameraDoFResScale");
+}
+
void LLPipeline::releaseGLBuffers()
{
assertInitialized();
@@ -800,39 +959,40 @@ void LLPipeline::releaseGLBuffers()
mWaterRef.release();
mWaterDis.release();
- mScreen.release();
- mPhysicsDisplay.release();
- mUIScreen.release();
- mDeferredScreen.release();
- mDeferredDepth.release();
+
for (U32 i = 0; i < 3; i++)
{
- mDeferredLight[i].release();
+ mGlow[i].release();
}
- mEdgeMap.release();
- mGIMap.release();
- mGIMapPost[0].release();
- mGIMapPost[1].release();
- mHighlight.release();
- mLuminanceMap.release();
+ releaseScreenBuffers();
+
+ gBumpImageList.destroyGL();
+ LLVOAvatar::resetImpostors();
+}
+
+void LLPipeline::releaseScreenBuffers()
+{
+ mUIScreen.release();
+ mScreen.release();
+ mFXAABuffer.release();
+ mPhysicsDisplay.release();
+ mDeferredScreen.release();
+ mDeferredDepth.release();
+ mDeferredLight.release();
+ mHighlight.release();
+
for (U32 i = 0; i < 6; i++)
{
mShadow[i].release();
}
-
- for (U32 i = 0; i < 3; i++)
- {
- mGlow[i].release();
- }
-
- gBumpImageList.destroyGL();
- LLVOAvatar::resetImpostors();
}
+
void LLPipeline::createGLBuffers()
{
+ stop_glerror();
LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS);
assertInitialized();
@@ -937,18 +1097,12 @@ void LLPipeline::createGLBuffers()
LLImageGL::generateTextures(1, &mLightFunc);
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
- LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_ALPHA, lightResX, lightResY, GL_ALPHA, GL_UNSIGNED_BYTE, lg);
+ LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_R8, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, lg);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
delete [] lg;
}
-
- if (gSavedSettings.getBOOL("RenderDeferredGI"))
- {
- mGIMap.allocate(512,512,GL_RGBA, TRUE, FALSE);
- addDeferredAttachments(mGIMap);
- }
}
gBumpImageList.restoreGL();
@@ -1049,10 +1203,11 @@ S32 LLPipeline::getMaxLightingDetail() const
S32 LLPipeline::setLightingDetail(S32 level)
{
LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL);
+ refreshCachedSettings();
if (level < 0)
{
- if (gSavedSettings.getBOOL("RenderLocalLights"))
+ if (RenderLocalLights)
{
level = 1;
}
@@ -1373,7 +1528,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
{
LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
- if (gSavedSettings.getBOOL("RenderDelayCreation"))
+ if (RenderDelayCreation)
{
mCreateQ.push_back(vobj);
}
@@ -1436,7 +1591,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE);
- if (drawablep->getVOVolume() && gSavedSettings.getBOOL("RenderAnimateRes"))
+ if (drawablep->getVOVolume() && RenderAnimateRes)
{
// fun animated res
drawablep->updateXform(TRUE);
@@ -1475,7 +1630,7 @@ void LLPipeline::resetFrameStats()
//external functions for asynchronous updating
void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
{
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -1505,7 +1660,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep)
{
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -1562,7 +1717,7 @@ void LLPipeline::updateMove()
LLFastTimer t(FTM_UPDATE_MOVE);
LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE);
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -1935,13 +2090,13 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
gGL.setColorMask(false, false);
}
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadMatrixd(gGLLastProjection);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadMatrix(gGLLastProjection);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLLastModelView);
+ gGL.loadMatrix(gGLLastModelView);
LLVertexBuffer::unbind();
@@ -1983,6 +2138,14 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ bool bound_shader = false;
+ if (gPipeline.canUseVertexShaders() && LLGLSLShader::sCurBoundShader == 0)
+ { //if no shader is currently bound, use the occlusion shader instead of fixed function if we can
+ // (shadow render uses a special shader that clamps to clip planes)
+ bound_shader = true;
+ gOcclusionProgram.bind();
+ }
+
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
@@ -2010,6 +2173,11 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
}
}
+ if (bound_shader)
+ {
+ gOcclusionProgram.unbind();
+ }
+
camera.disableUserClipPlane();
if (hasRenderType(LLPipeline::RENDER_TYPE_SKY) &&
@@ -2033,10 +2201,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
}
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
if (sUseOcclusion > 1)
{
@@ -2133,7 +2301,21 @@ void LLPipeline::doOcclusion(LLCamera& camera)
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
LLGLDisable cull(GL_CULL_FACE);
+
+ bool bind_shader = LLGLSLShader::sNoFixedFunction && LLGLSLShader::sCurBoundShader == 0;
+ if (bind_shader)
+ {
+ if (LLPipeline::sShadowRender)
+ {
+ gDeferredShadowProgram.bind();
+ }
+ else
+ {
+ gOcclusionProgram.bind();
+ }
+ }
+
for (LLCullResult::sg_list_t::iterator iter = sCull->beginOcclusionGroups(); iter != sCull->endOcclusionGroups(); ++iter)
{
LLSpatialGroup* group = *iter;
@@ -2141,6 +2323,18 @@ void LLPipeline::doOcclusion(LLCamera& camera)
group->clearOcclusionState(LLSpatialGroup::ACTIVE_OCCLUSION);
}
+ if (bind_shader)
+ {
+ if (LLPipeline::sShadowRender)
+ {
+ gDeferredShadowProgram.unbind();
+ }
+ else
+ {
+ gOcclusionProgram.unbind();
+ }
+ }
+
gGL.setColorMask(true, false);
}
}
@@ -2648,6 +2842,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
{
markVisible(*i, camera);
}
+
+ if (!sDelayVBUpdate)
+ { //rebuild mesh as soon as we know it's visible
+ group->rebuildMesh();
+ }
}
}
@@ -2698,6 +2897,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
{
group->setVisible();
stateSort(group, camera);
+
+ if (!sDelayVBUpdate)
+ { //rebuild mesh as soon as we know it's visible
+ group->rebuildMesh();
+ }
}
}
@@ -2713,11 +2917,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
}
- {
- LLFastTimer ftm(FTM_CLIENT_COPY);
- LLVertexBuffer::clientCopy();
- }
-
+
postSort(camera);
}
@@ -2873,7 +3073,7 @@ void renderScriptedBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2899,7 +3099,7 @@ void renderScriptedTouchBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2924,7 +3124,7 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2960,7 +3160,7 @@ void renderMOAPBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2985,7 +3185,7 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (gPipeline.sRenderBeacons)
{
LLColor4 light_blue(0.5f, 0.5f, 1.f, 0.5f);
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3130,19 +3330,6 @@ void LLPipeline::postSort(LLCamera& camera)
if (!sShadowRender)
{
- //sort by texture or bump map
- for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; ++i)
- {
- if (i == LLRenderPass::PASS_BUMP)
- {
- std::sort(sCull->beginRenderMap(i), sCull->endRenderMap(i), LLDrawInfo::CompareBump());
- }
- else
- {
- std::sort(sCull->beginRenderMap(i), sCull->endRenderMap(i), LLDrawInfo::CompareTexturePtrMatrix());
- }
- }
-
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
}
llpushcallstacks ;
@@ -3191,7 +3378,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (gPipeline.sRenderBeacons)
{
//pos += LLVector3(0.f, 0.f, 0.2f);
- gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), DebugBeaconLineWidth);
}
}
// now deal with highlights for all those seeable sound sources
@@ -3247,9 +3434,16 @@ void render_hud_elements()
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
gGL.color4f(1,1,1,1);
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
// Draw the tracking overlays
@@ -3272,6 +3466,11 @@ void render_hud_elements()
{
LLHUDText::renderAllHUD();
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
gGL.flush();
}
@@ -3316,10 +3515,10 @@ void LLPipeline::renderHighlights()
//gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
gGL.pushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
gGL.pushMatrix();
- glLoadIdentity();
+ gGL.loadIdentity();
gGL.getTexUnit(0)->bind(&mHighlight);
@@ -3331,9 +3530,9 @@ void LLPipeline::renderHighlights()
gGL.begin(LLRender::TRIANGLES);
- F32 scale = gSavedSettings.getF32("RenderHighlightBrightness");
- LLColor4 color = gSavedSettings.getColor4("RenderHighlightColor");
- F32 thickness = gSavedSettings.getF32("RenderHighlightThickness");
+ F32 scale = RenderHighlightBrightness;
+ LLColor4 color = RenderHighlightColor;
+ F32 thickness = RenderHighlightThickness;
for (S32 pass = 0; pass < 2; ++pass)
{
@@ -3379,7 +3578,7 @@ void LLPipeline::renderHighlights()
gGL.end();
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
//gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -3388,7 +3587,7 @@ void LLPipeline::renderHighlights()
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
gHighlightProgram.bind();
- gHighlightProgram.vertexAttrib4f(LLViewerShaderMgr::MATERIAL_COLOR,1,1,1,0.5f);
+ gGL.diffuseColor4f(1,1,1,0.5f);
}
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
@@ -3418,10 +3617,7 @@ void LLPipeline::renderHighlights()
{
// Paint 'em red!
color.setVec(1.f, 0.f, 0.f, 0.5f);
- if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
- {
- gHighlightProgram.vertexAttrib4f(LLViewerShaderMgr::MATERIAL_COLOR,1,0,0,0.5f);
- }
+
int count = mHighlightFaces.size();
for (S32 i = 0; i < count; i++)
{
@@ -3450,8 +3646,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
assertInitialized();
- F64 saved_modelview[16];
- F64 saved_projection[16];
+ F32 saved_modelview[16];
+ F32 saved_projection[16];
//HACK: preserve/restore matrices around HUD render
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
@@ -3463,13 +3659,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
}
}
- S32 stack_depth = 0;
-
- if (gDebugGL)
- {
- glGetIntegerv(GL_MODELVIEW_STACK_DEPTH, &stack_depth);
- }
-
///////////////////////////////////////////
//
// Sync and verify GL state
@@ -3495,12 +3684,12 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:ForceVBO");
// Initialize lots of GL state to "safe" values
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
LLGLSPipeline gls_pipeline;
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLGLState gls_color_material(GL_COLOR_MATERIAL, mLightingDetail < 2);
@@ -3566,7 +3755,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
{
occlude = FALSE;
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
+ LLGLSLShader::bindNoShader();
doOcclusion(camera);
}
@@ -3576,7 +3766,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
LLFastTimer t(FTM_POOLRENDER);
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
for( S32 i = 0; i < poolp->getNumPasses(); i++ )
{
@@ -3596,11 +3786,10 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
LLVertexBuffer::unbind();
if (gDebugGL)
{
- check_stack_depth(stack_depth);
std::string msg = llformat("pass %d", i);
LLGLState::checkStates(msg);
- LLGLState::checkTextureChannels(msg);
- LLGLState::checkClientArrays(msg);
+ //LLGLState::checkTextureChannels(msg);
+ //LLGLState::checkClientArrays(msg);
}
}
}
@@ -3625,84 +3814,78 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
LLVertexBuffer::unbind();
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
if (occlude)
{
occlude = FALSE;
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
+ LLGLSLShader::bindNoShader();
doOcclusion(camera);
}
}
LLVertexBuffer::unbind();
LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
-
-
-
- stop_glerror();
-
- LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
-
- LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderHighlights");
- if (!sReflectionRender)
+ if (!LLPipeline::sImpostorRender)
{
- renderHighlights();
- }
+ LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderHighlights");
- // Contains a list of the faces of objects that are physical or
- // have touch-handlers.
- mHighlightFaces.clear();
+ if (!sReflectionRender)
+ {
+ renderHighlights();
+ }
- LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDebug");
+ // Contains a list of the faces of objects that are physical or
+ // have touch-handlers.
+ mHighlightFaces.clear();
+
+ LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDebug");
- renderDebug();
+ renderDebug();
- LLVertexBuffer::unbind();
+ LLVertexBuffer::unbind();
- if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred)
- {
- if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+ if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred)
{
- // Render debugging beacons.
- gObjectList.renderObjectBeacons();
- gObjectList.resetObjectBeacons();
+ if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+ {
+ // Render debugging beacons.
+ gObjectList.renderObjectBeacons();
+ gObjectList.resetObjectBeacons();
+ }
+ else
+ {
+ // Make sure particle effects disappear
+ LLHUDObject::renderAllForTimer();
+ }
}
else
{
// Make sure particle effects disappear
LLHUDObject::renderAllForTimer();
}
- }
- else
- {
- // Make sure particle effects disappear
- LLHUDObject::renderAllForTimer();
- }
- LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomEnd");
+ LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomEnd");
- //HACK: preserve/restore matrices around HUD render
- if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
- {
- for (U32 i = 0; i < 16; i++)
+ //HACK: preserve/restore matrices around HUD render
+ if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{
- gGLModelView[i] = saved_modelview[i];
- gGLProjection[i] = saved_projection[i];
+ for (U32 i = 0; i < 16; i++)
+ {
+ gGLModelView[i] = saved_modelview[i];
+ gGLProjection[i] = saved_projection[i];
+ }
}
}
LLVertexBuffer::unbind();
LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
+// LLGLState::checkTextureChannels();
+// LLGLState::checkClientArrays();
}
void LLPipeline::renderGeomDeferred(LLCamera& camera)
@@ -3731,7 +3914,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
}
}
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLVertexBuffer::unbind();
@@ -3757,7 +3940,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
LLFastTimer t(FTM_POOLRENDER);
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
for( S32 i = 0; i < poolp->getNumDeferredPasses(); i++ )
{
@@ -3778,15 +3961,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
if (gDebugGL || gDebugPipeline)
{
- GLint depth;
- glGetIntegerv(GL_MODELVIEW_STACK_DEPTH, &depth);
- if (depth > 3)
- {
- llerrs << "GL matrix stack corrupted!" << llendl;
- }
LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
}
}
}
@@ -3807,7 +3982,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
}
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
gGL.setColorMask(true, false);
}
@@ -3820,7 +3995,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
LLGLEnable cull(GL_CULL_FACE);
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
calcNearbyLights(camera);
setupHWLights(NULL);
@@ -3840,7 +4015,8 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
{
occlude = FALSE;
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
+ LLGLSLShader::bindNoShader();
doOcclusion(camera);
gGL.setColorMask(true, false);
}
@@ -3851,7 +4027,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
LLFastTimer t(FTM_POOLRENDER);
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
for( S32 i = 0; i < poolp->getNumPostDeferredPasses(); i++ )
{
@@ -3872,15 +4048,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
if (gDebugGL || gDebugPipeline)
{
- GLint depth;
- glGetIntegerv(GL_MODELVIEW_STACK_DEPTH, &depth);
- if (depth > 3)
- {
- llerrs << "GL matrix stack corrupted!" << llendl;
- }
LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
}
}
}
@@ -3901,16 +4069,17 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
}
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
if (occlude)
{
occlude = FALSE;
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
+ LLGLSLShader::bindNoShader();
doOcclusion(camera);
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
}
}
@@ -3934,8 +4103,10 @@ void LLPipeline::renderGeomShadow(LLCamera& camera)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumShadowPasses() > 0)
{
+ poolp->prerender() ;
+
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
for( S32 i = 0; i < poolp->getNumShadowPasses(); i++ )
{
@@ -3955,8 +4126,6 @@ void LLPipeline::renderGeomShadow(LLCamera& camera)
LLVertexBuffer::unbind();
LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
}
}
else
@@ -3976,7 +4145,7 @@ void LLPipeline::renderGeomShadow(LLCamera& camera)
}
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
}
@@ -4023,6 +4192,11 @@ void LLPipeline::renderPhysicsDisplay()
gGL.setColorMask(true, false);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.bind();
+ }
+
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
@@ -4045,15 +4219,20 @@ void LLPipeline::renderPhysicsDisplay()
LLSpatialBridge* bridge = *i;
if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
{
- glPushMatrix();
- glMultMatrixf((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
+ gGL.pushMatrix();
+ gGL.multMatrix((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
bridge->renderPhysicsShapes();
- glPopMatrix();
+ gGL.popMatrix();
}
}
-
gGL.flush();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.unbind();
+ }
+
mPhysicsDisplay.flush();
}
@@ -4067,13 +4246,21 @@ void LLPipeline::renderDebug()
gGL.color4f(1,1,1,1);
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
gGL.setColorMask(true, false);
bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD);
+
if (!hud_only && !mDebugBlips.empty())
{ //render debug blips
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep, true);
+
glPointSize(8.f);
LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
@@ -4127,68 +4314,16 @@ void LLPipeline::renderDebug()
LLSpatialBridge* bridge = *i;
if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
{
- glPushMatrix();
- glMultMatrixf((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
+ gGL.pushMatrix();
+ gGL.multMatrix((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
bridge->renderDebug();
- glPopMatrix();
+ gGL.popMatrix();
}
}
- if (gSavedSettings.getBOOL("DebugShowUploadCost"))
+ if (LLGLSLShader::sNoFixedFunction)
{
- std::set<LLUUID> textures;
- std::set<LLUUID> sculpts;
- std::set<LLUUID> meshes;
-
- BOOL selected = TRUE;
- if (LLSelectMgr::getInstance()->getSelection()->isEmpty())
- {
- selected = FALSE;
- }
-
- for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
- {
- LLSpatialGroup* group = *iter;
- LLSpatialGroup::OctreeNode* node = group->mOctreeNode;
- for (LLSpatialGroup::OctreeNode::element_iter elem = node->getData().begin(); elem != node->getData().end(); ++elem)
- {
- LLDrawable* drawable = *elem;
- LLVOVolume* volume = drawable->getVOVolume();
- if (volume && volume->isSelected() == selected)
- {
- for (U32 i = 0; i < volume->getNumTEs(); ++i)
- {
- LLTextureEntry* te = volume->getTE(i);
- textures.insert(te->getID());
- }
-
- if (volume->isSculpted())
- {
- LLUUID sculpt_id = volume->getVolume()->getParams().getSculptID();
- if (volume->isMesh())
- {
- meshes.insert(sculpt_id);
- }
- else
- {
- sculpts.insert(sculpt_id);
- }
- }
- }
- }
- }
-
- gPipeline.mDebugTextureUploadCost = textures.size() * 10;
- gPipeline.mDebugSculptUploadCost = sculpts.size()*10;
-
- U32 mesh_cost = 0;
-
- for (std::set<LLUUID>::iterator iter = meshes.begin(); iter != meshes.end(); ++iter)
- {
- mesh_cost += gMeshRepo.getResourceCost(*iter)*10;
- }
-
- gPipeline.mDebugMeshUploadCost = mesh_cost;
+ gUIProgram.bind();
}
if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
@@ -4324,6 +4459,11 @@ void LLPipeline::renderDebug()
}
}
+ if (mRenderDebugMask & RENDER_DEBUG_WIND_VECTORS)
+ {
+ gAgent.getRegion()->mWind.renderVectors();
+ }
+
if (mRenderDebugMask & RENDER_DEBUG_COMPOSITION)
{
// Debug composition layers
@@ -4370,7 +4510,7 @@ void LLPipeline::renderDebug()
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
gGL.pushMatrix();
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin(); iter != mGroupQ2.end(); ++iter)
@@ -4391,7 +4531,7 @@ void LLPipeline::renderDebug()
if (bridge)
{
gGL.pushMatrix();
- glMultMatrixf((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
+ gGL.multMatrix((F32*)bridge->mDrawable->getRenderMatrix().mMatrix);
}
F32 alpha = llclamp((F32) (size-count)/size, 0.f, 1.f);
@@ -4415,8 +4555,10 @@ void LLPipeline::renderDebug()
}
gGL.flush();
-
- gPipeline.renderPhysicsDisplay();
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
}
void LLPipeline::rebuildPools()
@@ -4965,10 +5107,14 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
void LLPipeline::setupHWLights(LLDrawPool* pool)
{
assertInitialized();
-
+
// Ambient
- LLColor4 ambient = gSky.getTotalAmbientColor();
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.syncMatrices();
+ LLColor4 ambient = gSky.getTotalAmbientColor();
+ gGL.setAmbientLightColor(ambient);
+ }
// Light 0 = Sun or Moon (All objects)
{
@@ -5078,8 +5224,9 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
light_state->setQuadraticAttenuation(0.f);
}
+
if (light->isLightSpotlight() // directional (spot-)light
- && (LLPipeline::sRenderDeferred || gSavedSettings.getBOOL("RenderSpotLightsInNondeferred"))) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on
+ && (LLPipeline::sRenderDeferred || RenderSpotLightsInNondeferred)) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on
{
LLVector3 spotparams = light->getSpotLightParams();
LLQuaternion quat = light->getRenderRotation();
@@ -5146,7 +5293,11 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
}
// Init GL state
- glDisable(GL_LIGHTING);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glDisable(GL_LIGHTING);
+ }
+
for (S32 i = 0; i < 8; ++i)
{
gGL.getLight(i)->disable();
@@ -5167,7 +5318,10 @@ void LLPipeline::enableLights(U32 mask)
stop_glerror();
if (!mLightMask)
{
- glEnable(GL_LIGHTING);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glEnable(GL_LIGHTING);
+ }
}
if (mask)
{
@@ -5190,13 +5344,16 @@ void LLPipeline::enableLights(U32 mask)
}
else
{
- glDisable(GL_LIGHTING);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glDisable(GL_LIGHTING);
+ }
}
- stop_glerror();
mLightMask = mask;
- LLColor4 ambient = gSky.getTotalAmbientColor();
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient.mV);
stop_glerror();
+
+ LLColor4 ambient = gSky.getTotalAmbientColor();
+ gGL.setAmbientLightColor(ambient);
}
}
@@ -5245,21 +5402,24 @@ void LLPipeline::enableLightsPreview()
{
disableLights();
- glEnable(GL_LIGHTING);
- LLColor4 ambient = gSavedSettings.getColor4("PreviewAmbientColor");
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient.mV);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glEnable(GL_LIGHTING);
+ }
+ LLColor4 ambient = PreviewAmbientColor;
+ gGL.setAmbientLightColor(ambient);
- LLColor4 diffuse0 = gSavedSettings.getColor4("PreviewDiffuse0");
- LLColor4 specular0 = gSavedSettings.getColor4("PreviewSpecular0");
- LLColor4 diffuse1 = gSavedSettings.getColor4("PreviewDiffuse1");
- LLColor4 specular1 = gSavedSettings.getColor4("PreviewSpecular1");
- LLColor4 diffuse2 = gSavedSettings.getColor4("PreviewDiffuse2");
- LLColor4 specular2 = gSavedSettings.getColor4("PreviewSpecular2");
+ LLColor4 diffuse0 = PreviewDiffuse0;
+ LLColor4 specular0 = PreviewSpecular0;
+ LLColor4 diffuse1 = PreviewDiffuse1;
+ LLColor4 specular1 = PreviewSpecular1;
+ LLColor4 diffuse2 = PreviewDiffuse2;
+ LLColor4 specular2 = PreviewSpecular2;
- LLVector3 dir0 = gSavedSettings.getVector3("PreviewDirection0");
- LLVector3 dir1 = gSavedSettings.getVector3("PreviewDirection1");
- LLVector3 dir2 = gSavedSettings.getVector3("PreviewDirection2");
+ LLVector3 dir0 = PreviewDirection0;
+ LLVector3 dir1 = PreviewDirection1;
+ LLVector3 dir2 = PreviewDirection2;
dir0.normVec();
dir1.normVec();
@@ -5306,7 +5466,7 @@ void LLPipeline::enableLightsAvatarEdit(const LLColor4& color)
setupAvatarLights(TRUE);
enableLights(mask);
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,color.mV);
+ gGL.setAmbientLightColor(color);
}
void LLPipeline::enableLightsFullbright(const LLColor4& color)
@@ -5315,7 +5475,7 @@ void LLPipeline::enableLightsFullbright(const LLColor4& color)
U32 mask = 0x1000; // Non-0 mask, set ambient
enableLights(mask);
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,color.mV);
+ gGL.setAmbientLightColor(color);
}
void LLPipeline::disableLights()
@@ -5971,11 +6131,8 @@ void LLPipeline::resetVertexBuffers()
gSky.resetVertexBuffers();
- if (LLVertexBuffer::sGLCount > 0)
- {
- LLVertexBuffer::cleanupClass();
- }
-
+ LLVertexBuffer::cleanupClass();
+
//delete all name pool caches
LLGLNamePool::cleanupPools();
@@ -5984,35 +6141,32 @@ void LLPipeline::resetVertexBuffers()
llwarns << "VBO wipe failed." << llendl;
}
- if (!LLVertexBuffer::sStreamIBOPool.mNameList.empty() ||
- !LLVertexBuffer::sStreamVBOPool.mNameList.empty() ||
- !LLVertexBuffer::sDynamicIBOPool.mNameList.empty() ||
- !LLVertexBuffer::sDynamicVBOPool.mNameList.empty())
- {
- llwarns << "VBO name pool cleanup failed." << llendl;
- }
+ llassert(LLVertexBuffer::sGLCount == 0);
LLVertexBuffer::unbind();
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
+ LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw");
LLVertexBuffer::sEnableVBOs = gSavedSettings.getBOOL("RenderVBOEnable");
LLVertexBuffer::sDisableVBOMapping = LLVertexBuffer::sEnableVBOs && gSavedSettings.getBOOL("RenderVBOMappingDisable") ;
sBakeSunlight = gSavedSettings.getBOOL("RenderBakeSunlight");
sNoAlpha = gSavedSettings.getBOOL("RenderNoAlpha");
LLPipeline::sTextureBindTest = gSavedSettings.getBOOL("RenderDebugTextureBind");
+
+ LLVertexBuffer::initClass(LLVertexBuffer::sEnableVBOs, LLVertexBuffer::sDisableVBOMapping);
}
void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture)
{
LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS);
assertInitialized();
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
mSimplePool->pushBatches(type, mask);
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
}
@@ -6021,25 +6175,25 @@ void apply_cube_face_rotation(U32 face)
switch (face)
{
case 0:
- glRotatef(90.f, 0, 1, 0);
- glRotatef(180.f, 1, 0, 0);
+ gGL.rotatef(90.f, 0, 1, 0);
+ gGL.rotatef(180.f, 1, 0, 0);
break;
case 2:
- glRotatef(-90.f, 1, 0, 0);
+ gGL.rotatef(-90.f, 1, 0, 0);
break;
case 4:
- glRotatef(180.f, 0, 1, 0);
- glRotatef(180.f, 0, 0, 1);
+ gGL.rotatef(180.f, 0, 1, 0);
+ gGL.rotatef(180.f, 0, 0, 1);
break;
case 1:
- glRotatef(-90.f, 0, 1, 0);
- glRotatef(180.f, 1, 0, 0);
+ gGL.rotatef(-90.f, 0, 1, 0);
+ gGL.rotatef(180.f, 1, 0, 0);
break;
case 3:
- glRotatef(90, 1, 0, 0);
+ gGL.rotatef(90, 1, 0, 0);
break;
case 5:
- glRotatef(180, 0, 0, 1);
+ gGL.rotatef(180, 0, 0, 1);
break;
}
}
@@ -6082,8 +6236,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM);
if (!(gPipeline.canUseVertexShaders() &&
- sRenderGlow) ||
- (!sRenderDeferred && hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)))
+ sRenderGlow))
{
return;
}
@@ -6099,11 +6252,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
- U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
+ U32 res_mod = RenderResolutionDivisor;
LLVector2 tc1(0,0);
- LLVector2 tc2((F32) gViewerWindow->getWorldViewWidthRaw()*2,
- (F32) gViewerWindow->getWorldViewHeightRaw()*2);
+ LLVector2 tc2((F32) mScreen.getWidth()*2,
+ (F32) mScreen.getHeight()*2);
if (res_mod > 1)
{
@@ -6118,12 +6271,12 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
enableLightsFullbright(LLColor4(1,1,1,1));
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
LLGLDisable test(GL_ALPHA_TEST);
@@ -6138,19 +6291,21 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
gGlowExtractProgram.bind();
- F32 minLum = llmax(gSavedSettings.getF32("RenderGlowMinLuminance"), 0.0f);
- F32 maxAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
- F32 warmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
- LLVector3 lumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
- LLVector3 warmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
- gGlowExtractProgram.uniform1f("minLuminance", minLum);
- gGlowExtractProgram.uniform1f("maxExtractAlpha", maxAlpha);
- gGlowExtractProgram.uniform3f("lumWeights", lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
- gGlowExtractProgram.uniform3f("warmthWeights", warmthWeights.mV[0], warmthWeights.mV[1], warmthWeights.mV[2]);
- gGlowExtractProgram.uniform1f("warmthAmount", warmthAmount);
+ F32 minLum = llmax((F32) RenderGlowMinLuminance, 0.0f);
+ F32 maxAlpha = RenderGlowMaxExtractAlpha;
+ F32 warmthAmount = RenderGlowWarmthAmount;
+ LLVector3 lumWeights = RenderGlowLumWeights;
+ LLVector3 warmthWeights = RenderGlowWarmthWeights;
+
+
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_MIN_LUMINANCE, minLum);
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_MAX_EXTRACT_ALPHA, maxAlpha);
+ gGlowExtractProgram.uniform3f(LLShaderMgr::GLOW_LUM_WEIGHTS, lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
+ gGlowExtractProgram.uniform3f(LLShaderMgr::GLOW_WARMTH_WEIGHTS, warmthWeights.mV[0], warmthWeights.mV[1], warmthWeights.mV[2]);
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_WARMTH_AMOUNT, warmthAmount);
LLGLEnable blend_on(GL_BLEND);
LLGLEnable test(GL_ALPHA_TEST);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
mScreen.bindTexture(0, 0);
@@ -6178,22 +6333,22 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
tc2.setVec(2,2);
// power of two between 1 and 1024
- U32 glowResPow = gSavedSettings.getS32("RenderGlowResolutionPow");
+ U32 glowResPow = RenderGlowResolutionPow;
const U32 glow_res = llmax(1,
llmin(1024, 1 << glowResPow));
- S32 kernel = gSavedSettings.getS32("RenderGlowIterations")*2;
- F32 delta = gSavedSettings.getF32("RenderGlowWidth") / glow_res;
+ S32 kernel = RenderGlowIterations*2;
+ F32 delta = RenderGlowWidth / glow_res;
// Use half the glow width if we have the res set to less than 9 so that it looks
// almost the same in either case.
if (glowResPow < 9)
{
delta *= 0.5f;
}
- F32 strength = gSavedSettings.getF32("RenderGlowStrength");
+ F32 strength = RenderGlowStrength;
gGlowProgram.bind();
- gGlowProgram.uniform1f("glowStrength", strength);
+ gGlowProgram.uniform1f(LLShaderMgr::GLOW_STRENGTH, strength);
for (S32 i = 0; i < kernel; i++)
{
@@ -6214,11 +6369,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (i%2 == 0)
{
- gGlowProgram.uniform2f("glowDelta", delta, 0);
+ gGlowProgram.uniform2f(LLShaderMgr::GLOW_DELTA, delta, 0);
}
else
{
- gGlowProgram.uniform2f("glowDelta", 0, delta);
+ gGlowProgram.uniform2f(LLShaderMgr::GLOW_DELTA, 0, delta);
}
gGL.begin(LLRender::TRIANGLE_STRIP);
@@ -6250,8 +6405,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
- tc2.setVec((F32) gViewerWindow->getWorldViewWidthRaw(),
- (F32) gViewerWindow->getWorldViewHeightRaw());
+ tc2.setVec((F32) mScreen.getWidth(),
+ (F32) mScreen.getHeight());
gGL.flush();
@@ -6259,28 +6414,22 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (LLPipeline::sRenderDeferred)
{
- bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater();
- LLGLSLShader* shader = &gDeferredPostProgram;
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- shader = &gDeferredGIFinalProgram;
- dof_enabled = false;
- }
- else if (!dof_enabled || LLToolMgr::getInstance()->inBuildMode() || !gSavedSettings.getBOOL("RenderDepthOfField"))
- { //squish focal length when in build mode (or if DoF is disabled) so DoF doesn't make editing objects difficult
- shader = &gDeferredPostNoDoFProgram;
- dof_enabled = false;
- }
-
-
- LLGLDisable blend(GL_BLEND);
- bindDeferredShader(*shader);
+ bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater() &&
+ !LLToolMgr::getInstance()->inBuildMode() &&
+ RenderDepthOfField;
+
+ bool multisample = RenderFSAASamples > 1 && mFXAABuffer.isComplete();
+
+ gViewerWindow->setup3DViewport();
+
if (dof_enabled)
{
- //depth of field focal plane calculations
+ LLGLSLShader* shader = &gDeferredPostProgram;
+ LLGLDisable blend(GL_BLEND);
+ //depth of field focal plane calculations
static F32 current_distance = 16.f;
static F32 start_distance = 16.f;
static F32 transition_time = 1.f;
@@ -6310,8 +6459,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
else if (gAgentCamera.cameraMouselook())
{ //focus on point under mouselook crosshairs
gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
- NULL,
- &focus_point);
+ NULL,
+ &focus_point);
}
else
{
@@ -6342,7 +6491,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
else if (transition_time < 1.f)
{ //currently in a transition, continue interpolating
- transition_time += 1.f/gSavedSettings.getF32("CameraFocusTransitionTime")*gFrameIntervalSeconds;
+ transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds;
transition_time = llmin(transition_time, 1.f);
F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
@@ -6355,12 +6504,12 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
//convert to mm
F32 subject_distance = current_distance*1000.f;
- F32 fnumber = gSavedSettings.getF32("CameraFNumber");
- F32 default_focal_length = gSavedSettings.getF32("CameraFocalLength");
+ F32 fnumber = CameraFNumber;
+ F32 default_focal_length = CameraFocalLength;
F32 fov = LLViewerCamera::getInstance()->getView();
- const F32 default_fov = gSavedSettings.getF32("CameraFieldOfView") * F_PI/180.f;
+ const F32 default_fov = CameraFieldOfView * F_PI/180.f;
//const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio");
//F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight();
@@ -6383,36 +6532,217 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
blur_constant /= 1000.f; //convert to meters for shader
F32 magnification = focal_length/(subject_distance-focal_length);
- shader->uniform1f("focal_distance", -subject_distance/1000.f);
- shader->uniform1f("blur_constant", blur_constant);
- shader->uniform1f("tan_pixel_angle", tanf(1.f/LLDrawable::sCurPixelAngle));
- shader->uniform1f("magnification", magnification);
- }
+ { //build diffuse+bloom+CoF
+ mDeferredLight.bindTarget();
+ shader = &gDeferredCoFProgram;
- S32 channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
- if (channel > -1)
- {
- mScreen.bindTexture(0, channel);
+ bindDeferredShader(*shader);
+
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+
+ shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
+ shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
+ shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
+ shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
+
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
+
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
+
+ gGL.end();
+
+ unbindDeferredShader(*shader);
+ mDeferredLight.flush();
+ }
+
+ { //perform DoF sampling at half-res (preserve alpha channel)
+ mScreen.bindTarget();
+ glViewport(0,0,(GLsizei) (mScreen.getWidth()*CameraDoFResScale), (GLsizei) (mScreen.getHeight()*CameraDoFResScale));
+ gGL.setColorMask(true, false);
+
+ shader = &gDeferredPostProgram;
+ bindDeferredShader(*shader);
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
+ if (channel > -1)
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
+
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
+
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
+
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
+
+ gGL.end();
+
+ unbindDeferredShader(*shader);
+ mScreen.flush();
+ gGL.setColorMask(true, true);
+ }
+
+ { //combine result based on alpha
+ if (multisample)
+ {
+ mDeferredLight.bindTarget();
+ glViewport(0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
+ }
+ else
+ {
+ gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
+ gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
+ gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth();
+ gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
+ glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
+ }
+
+ shader = &gDeferredDoFCombineProgram;
+ bindDeferredShader(*shader);
+
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
+ gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+ }
+
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
+
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
+
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
+
+ gGL.end();
+
+ unbindDeferredShader(*shader);
+
+ if (multisample)
+ {
+ mDeferredLight.flush();
+ }
+ }
}
- //channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, LLTexUnit::TT_RECT_TEXTURE);
- //if (channel > -1)
- //{
- //gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- //}
+ else
+ {
+ if (multisample)
+ {
+ mDeferredLight.bindTarget();
+ }
+ LLGLSLShader* shader = &gDeferredPostNoDoFProgram;
+
+ bindDeferredShader(*shader);
+
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
+ }
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,3);
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(3,-1);
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
- gGL.end();
+ gGL.end();
+
+ unbindDeferredShader(*shader);
+
+ if (multisample)
+ {
+ mDeferredLight.flush();
+ }
+ }
+
+ if (multisample)
+ {
+ //bake out texture2D with RGBL for FXAA shader
+ mFXAABuffer.bindTarget();
+
+ S32 width = mScreen.getWidth();
+ S32 height = mScreen.getHeight();
+ glViewport(0, 0, width, height);
+
+ LLGLSLShader* shader = &gGlowCombineFXAAProgram;
+
+ shader->bind();
+ shader->uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, width, height);
+
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
+ if (channel > -1)
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.vertex2f(-1,-1);
+ gGL.vertex2f(-1,3);
+ gGL.vertex2f(3,-1);
+ gGL.end();
+
+ gGL.flush();
+
+ shader->disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
+ shader->unbind();
+
+ mFXAABuffer.flush();
+
+ shader = &gFXAAProgram;
+ shader->bind();
+
+ channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAABuffer.getUsage());
+ if (channel > -1)
+ {
+ mFXAABuffer.bindTexture(0, channel);
+ gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+ }
+
+ F32 scale_x = (F32) width/mFXAABuffer.getWidth();
+ F32 scale_y = (F32) height/mFXAABuffer.getHeight();
+ shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f/width*scale_x, 1.f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.vertex2f(-1,-1);
+ gGL.vertex2f(-1,3);
+ gGL.vertex2f(3,-1);
+ gGL.end();
- unbindDeferredShader(*shader);
+ gGL.flush();
+ shader->unbind();
+ }
}
else
{
@@ -6445,46 +6775,54 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
v[1] = LLVector3(-1,3,0);
v[2] = LLVector3(3,-1,0);
- buff->setBuffer(0);
+ buff->flush();
LLGLDisable blend(GL_BLEND);
- //tex unit 0
- gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_COLOR);
-
- gGL.getTexUnit(0)->bind(&mGlow[1]);
- gGL.getTexUnit(1)->activate();
- gGL.getTexUnit(1)->enable(LLTexUnit::TT_RECT_TEXTURE);
-
-
- //tex unit 1
- gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_ADD, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gGlowCombineProgram.bind();
+ }
+ else
+ {
+ //tex unit 0
+ gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_COLOR);
+ //tex unit 1
+ gGL.getTexUnit(1)->setTextureColorBlend(LLTexUnit::TBO_ADD, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_PREV_COLOR);
+ }
+ gGL.getTexUnit(0)->bind(&mGlow[1]);
gGL.getTexUnit(1)->bind(&mScreen);
- gGL.getTexUnit(1)->activate();
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
buff->setBuffer(mask);
buff->drawArrays(LLRender::TRIANGLE_STRIP, 0, 3);
- gGL.getTexUnit(1)->disable();
- gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gGlowCombineProgram.unbind();
+ }
+ else
+ {
+ gGL.getTexUnit(1)->disable();
+ gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT);
- gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ gGL.getTexUnit(0)->activate();
+ gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
+ }
+
}
- if (LLRenderTarget::sUseFBO)
- { //copy depth buffer from mScreen to framebuffer
- LLRenderTarget::copyContentsToFramebuffer(mScreen, 0, 0, mScreen.getWidth(), mScreen.getHeight(),
- 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
- }
-
gGL.setSceneBlendType(LLRender::BT_ALPHA);
if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES))
{
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gSplatTextureRectProgram.bind();
+ }
+
gGL.setColorMask(true, false);
LLVector2 tc1(0,0);
@@ -6496,7 +6834,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.getTexUnit(0)->bind(&mPhysicsDisplay);
- gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.begin(LLRender::TRIANGLES);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
gGL.vertex2f(-1,-1);
@@ -6508,12 +6846,25 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.end();
gGL.flush();
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gSplatTextureRectProgram.unbind();
+ }
}
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+
+ if (LLRenderTarget::sUseFBO)
+ { //copy depth buffer from mScreen to framebuffer
+ LLRenderTarget::copyContentsToFramebuffer(mScreen, 0, 0, mScreen.getWidth(), mScreen.getHeight(),
+ 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
+ }
+
+
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
LLVertexBuffer::unbind();
@@ -6524,7 +6875,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
static LLFastTimer::DeclareTimer FTM_BIND_DEFERRED("Bind Deferred");
-void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRenderTarget* gi_source, LLRenderTarget* last_gi_post, U32 noise_map)
+void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map)
{
LLFastTimer t(FTM_BIND_DEFERRED);
@@ -6535,146 +6886,28 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
shader.bind();
S32 channel = 0;
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(0,channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(1, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(2, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- if (gi_source)
- {
- BOOL has_gi = FALSE;
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_DIFFUSE);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_SPECULAR);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_NORMAL);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(2, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_MIN_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_MAX_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(3, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_DIFFUSE);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_NORMAL);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(2, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MAX_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MIN_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(3, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_DEPTH);
- if (channel > -1)
- {
- has_gi = TRUE;
- gGL.getTexUnit(channel)->bind(gi_source, TRUE);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- stop_glerror();
-
- glTexParameteri(LLTexUnit::getInternalType(mGIMap.getUsage()), GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
- glTexParameteri(LLTexUnit::getInternalType(mGIMap.getUsage()), GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA);
-
- stop_glerror();
- }
-
- if (has_gi)
- {
- F32 range_x = llmin(mGIRange.mV[0], 1.f);
- F32 range_y = llmin(mGIRange.mV[1], 1.f);
-
- LLVector2 scale(range_x,range_y);
-
- LLVector2 kern[25];
-
- for (S32 i = 0; i < 5; ++i)
- {
- for (S32 j = 0; j < 5; ++j)
- {
- S32 idx = i*5+j;
- kern[idx].mV[0] = (i-2)*0.5f;
- kern[idx].mV[1] = (j-2)*0.5f;
- kern[idx].scaleVec(scale);
- }
- }
-
- shader.uniform2fv("gi_kern", 25, (F32*) kern);
- shader.uniformMatrix4fv("gi_mat", 1, FALSE, mGIMatrix.m);
- shader.uniformMatrix4fv("gi_mat_proj", 1, FALSE, mGIMatrixProj.m);
- shader.uniformMatrix4fv("gi_inv_proj", 1, FALSE, mGIInvProj.m);
- shader.uniformMatrix4fv("gi_norm_mat", 1, FALSE, mGINormalMatrix.m);
- }
- }
- stop_glerror();
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
if (channel > -1)
{
gGL.getTexUnit(channel)->bind(&mDeferredDepth, TRUE);
@@ -6688,21 +6921,21 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
glh::matrix4f projection = glh_get_current_projection();
glh::matrix4f inv_proj = projection.inverse();
- shader.uniformMatrix4fv("inv_proj", 1, FALSE, inv_proj.m);
- shader.uniform4f("viewport", (F32) gGLViewport[0],
+ shader.uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
+ shader.uniform4f(LLShaderMgr::VIEWPORT, (F32) gGLViewport[0],
(F32) gGLViewport[1],
(F32) gGLViewport[2],
(F32) gGLViewport[3]);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NOISE);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_NOISE);
if (channel > -1)
{
gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, noise_map);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHTFUNC);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_LIGHTFUNC);
if (channel > -1)
{
gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
@@ -6710,60 +6943,31 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[light_index].getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
if (channel > -1)
{
- mDeferredLight[light_index].bindTexture(0, channel);
+ if (light_index > 0)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+ else
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LUMINANCE);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_BLOOM);
if (channel > -1)
{
mGlow[1].bindTexture(0, channel);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- gi_source->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_EDGE, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mEdgeMap.bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mDeferredLight[1].bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mDeferredLight[2].bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
-
stop_glerror();
for (U32 i = 0; i < 4; i++)
{
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE);
stop_glerror();
if (channel > -1)
{
@@ -6781,7 +6985,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
for (U32 i = 4; i < 6; i++)
{
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i);
stop_glerror();
if (channel > -1)
{
@@ -6810,12 +7014,11 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
mat[i+80] = mSunShadowMatrix[5].m[i];
}
- shader.uniformMatrix4fv("shadow_matrix[0]", 6, FALSE, mat);
- shader.uniformMatrix4fv("shadow_matrix", 6, FALSE, mat);
+ shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, FALSE, mat);
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ channel = shader.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
if (channel > -1)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
@@ -6823,31 +7026,30 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
{
cube_map->enable(channel);
cube_map->bind();
- F64* m = gGLModelView;
+ F32* m = gGLModelView;
F32 mat[] = { m[0], m[1], m[2],
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniform3fv("env_mat[0]", 3, mat);
- shader.uniform3fv("env_mat", 3, mat);
+ shader.uniform3fv(LLShaderMgr::DEFERRED_ENV_MAT, 3, mat);
}
}
- shader.uniform4fv("shadow_clip", 1, mSunClipPlanes.mV);
- shader.uniform1f("sun_wash", gSavedSettings.getF32("RenderDeferredSunWash"));
- shader.uniform1f("shadow_noise", gSavedSettings.getF32("RenderShadowNoise"));
- shader.uniform1f("blur_size", gSavedSettings.getF32("RenderShadowBlurSize"));
+ shader.uniform4fv(LLShaderMgr::DEFERRED_SHADOW_CLIP, 1, mSunClipPlanes.mV);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SUN_WASH, RenderDeferredSunWash);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_NOISE, RenderShadowNoise);
+ shader.uniform1f(LLShaderMgr::DEFERRED_BLUR_SIZE, RenderShadowBlurSize);
- shader.uniform1f("ssao_radius", gSavedSettings.getF32("RenderSSAOScale"));
- shader.uniform1f("ssao_max_radius", gSavedSettings.getU32("RenderSSAOMaxScale"));
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, RenderSSAOMaxScale);
- F32 ssao_factor = gSavedSettings.getF32("RenderSSAOFactor");
- shader.uniform1f("ssao_factor", ssao_factor);
- shader.uniform1f("ssao_factor_inv", 1.0/ssao_factor);
+ F32 ssao_factor = RenderSSAOFactor;
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR, ssao_factor);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.0/ssao_factor);
- LLVector3 ssao_effect = gSavedSettings.getVector3("RenderSSAOEffect");
+ LLVector3 ssao_effect = RenderSSAOEffect;
F32 matrix_diag = (ssao_effect[0] + 2.0*ssao_effect[1])/3.0;
F32 matrix_nondiag = (ssao_effect[0] - ssao_effect[1])/3.0;
// This matrix scales (proj of color onto <1/rt(3),1/rt(3),1/rt(3)>) by
@@ -6855,35 +7057,23 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
F32 ssao_effect_mat[] = { matrix_diag, matrix_nondiag, matrix_nondiag,
matrix_nondiag, matrix_diag, matrix_nondiag,
matrix_nondiag, matrix_nondiag, matrix_diag};
- shader.uniformMatrix3fv("ssao_effect_mat", 1, GL_FALSE, ssao_effect_mat);
-
- F32 shadow_offset_error = 1.f + gSavedSettings.getF32("RenderShadowOffsetError") * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
- F32 shadow_bias_error = 1.f + gSavedSettings.getF32("RenderShadowBiasError") * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
-
- shader.uniform2f("screen_res", mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
- shader.uniform1f("near_clip", LLViewerCamera::getInstance()->getNear()*2.f);
- shader.uniform1f ("shadow_offset", gSavedSettings.getF32("RenderShadowOffset")*shadow_offset_error);
- shader.uniform1f("shadow_bias", gSavedSettings.getF32("RenderShadowBias")*shadow_bias_error);
- shader.uniform1f ("spot_shadow_offset", gSavedSettings.getF32("RenderSpotShadowOffset"));
- shader.uniform1f("spot_shadow_bias", gSavedSettings.getF32("RenderSpotShadowBias"));
-
- shader.uniform1f("lum_scale", gSavedSettings.getF32("RenderLuminanceScale"));
- shader.uniform1f("sun_lum_scale", gSavedSettings.getF32("RenderSunLuminanceScale"));
- shader.uniform1f("sun_lum_offset", gSavedSettings.getF32("RenderSunLuminanceOffset"));
- shader.uniform1f("lum_lod", gSavedSettings.getF32("RenderLuminanceDetail"));
- shader.uniform1f("gi_range", gSavedSettings.getF32("RenderGIRange"));
- shader.uniform1f("gi_brightness", gSavedSettings.getF32("RenderGIBrightness"));
- shader.uniform1f("gi_luminance", gSavedSettings.getF32("RenderGILuminance"));
- shader.uniform1f("gi_edge_weight", gSavedSettings.getF32("RenderGIBlurEdgeWeight"));
- shader.uniform1f("gi_blur_brightness", gSavedSettings.getF32("RenderGIBlurBrightness"));
- shader.uniform1f("gi_sample_width", mGILightRadius);
- shader.uniform1f("gi_noise", gSavedSettings.getF32("RenderGINoise"));
- shader.uniform1f("gi_attenuation", gSavedSettings.getF32("RenderGIAttenuation"));
- shader.uniform1f("gi_ambiance", gSavedSettings.getF32("RenderGIAmbiance"));
- shader.uniform2f("shadow_res", mShadow[0].getWidth(), mShadow[0].getHeight());
- shader.uniform2f("proj_shadow_res", mShadow[4].getWidth(), mShadow[4].getHeight());
- shader.uniform1f("depth_cutoff", gSavedSettings.getF32("RenderEdgeDepthCutoff"));
- shader.uniform1f("norm_cutoff", gSavedSettings.getF32("RenderEdgeNormCutoff"));
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_SSAO_EFFECT_MAT, 1, GL_FALSE, ssao_effect_mat);
+
+ F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+ F32 shadow_bias_error = 1.f + RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+
+ shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
+ shader.uniform1f(LLShaderMgr::DEFERRED_NEAR_CLIP, LLViewerCamera::getInstance()->getNear()*2.f);
+ shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset*shadow_offset_error);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias*shadow_bias_error);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_OFFSET, RenderSpotShadowOffset);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_BIAS, RenderSpotShadowBias);
+
+ shader.uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, mTransformedSunDir.mV);
+ shader.uniform2f(LLShaderMgr::DEFERRED_SHADOW_RES, mShadow[0].getWidth(), mShadow[0].getHeight());
+ shader.uniform2f(LLShaderMgr::DEFERRED_PROJ_SHADOW_RES, mShadow[4].getWidth(), mShadow[4].getHeight());
+ shader.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
+ shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
if (shader.getUniformLocation("norm_mat") >= 0)
@@ -6922,7 +7112,7 @@ void LLPipeline::renderDeferredLighting()
0, 0, mDeferredDepth.getWidth(), mDeferredDepth.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
}
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{
@@ -6944,38 +7134,40 @@ void LLPipeline::renderDeferredLighting()
glh::matrix4f mat = glh_copy_matrix(gGLModelView);
- F32 vert[] =
- {
- -1,1,
- -1,-3,
- 3,1,
- };
- glVertexPointer(2, GL_FLOAT, 0, vert);
- glColor3f(1,1,1);
+ LLStrider<LLVector3> vert;
+ mDeferredVB->getVertexStrider(vert);
+ LLStrider<LLVector2> tc0;
+ LLStrider<LLVector2> tc1;
+ mDeferredVB->getTexCoord0Strider(tc0);
+ mDeferredVB->getTexCoord1Strider(tc1);
+ vert[0].set(-1,1,0);
+ vert[1].set(-1,-3,0);
+ vert[2].set(3,1,0);
+
{
setupHWLights(NULL); //to set mSunDir;
LLVector4 dir(mSunDir, 0.f);
glh::vec4f tc(dir.mV);
mat.mult_matrix_vec(tc);
- glTexCoord4f(tc.v[0], tc.v[1], tc.v[2], 0);
+ mTransformedSunDir.set(tc.v);
}
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
- if (gSavedSettings.getBOOL("RenderDeferredSSAO") || gSavedSettings.getS32("RenderShadowDetail") > 0)
+ if (RenderDeferredSSAO || RenderShadowDetail > 0)
{
- mDeferredLight[0].bindTarget();
+ mDeferredLight.bindTarget();
{ //paint shadow/SSAO light map (direct lighting lightmap)
LLFastTimer ftm(FTM_SUN_SHADOW);
bindDeferredShader(gDeferredSunProgram, 0);
-
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glClearColor(1,1,1,1);
- mDeferredLight[0].clear(GL_COLOR_BUFFER_BIT);
+ mDeferredLight.clear(GL_COLOR_BUFFER_BIT);
glClearColor(0,0,0,0);
glh::matrix4f inv_trans = glh_get_current_modelview().inverse().transpose();
@@ -6998,141 +7190,36 @@ void LLPipeline::renderDeferredLighting()
}
gDeferredSunProgram.uniform3fv("offset", slice, offset);
- gDeferredSunProgram.uniform2f("screenRes", mDeferredLight[0].getWidth(), mDeferredLight[0].getHeight());
+ gDeferredSunProgram.uniform2f("screenRes", mDeferredLight.getWidth(), mDeferredLight.getHeight());
{
LLGLDisable blend(GL_BLEND);
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
stop_glerror();
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
+ mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
stop_glerror();
}
unbindDeferredShader(gDeferredSunProgram);
}
- mDeferredLight[0].flush();
+ mDeferredLight.flush();
}
- { //global illumination specific block (still experimental)
- if (gSavedSettings.getBOOL("RenderDeferredBlurLight") &&
- gSavedSettings.getBOOL("RenderDeferredGI"))
- {
- LLFastTimer ftm(FTM_EDGE_DETECTION);
- //generate edge map
- LLGLDisable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- {
- gDeferredEdgeProgram.bind();
- mEdgeMap.bindTarget();
- bindDeferredShader(gDeferredEdgeProgram);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
- unbindDeferredShader(gDeferredEdgeProgram);
- mEdgeMap.flush();
- }
- }
-
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- { //get luminance map from previous frame's light map
- LLGLEnable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- //static F32 fade = 1.f;
-
- {
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
- gLuminanceGatherProgram.bind();
- gLuminanceGatherProgram.uniform2f("screen_res", mDeferredLight[0].getWidth(), mDeferredLight[0].getHeight());
- mLuminanceMap.bindTarget();
- bindDeferredShader(gLuminanceGatherProgram);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
- unbindDeferredShader(gLuminanceGatherProgram);
- mLuminanceMap.flush();
- gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true);
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
- glGenerateMipmap(GL_TEXTURE_2D);
- }
- }
-
- { //paint noisy GI map (bounce lighting lightmap)
- LLFastTimer ftm(FTM_GI_TRACE);
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable test(GL_ALPHA_TEST);
-
- mGIMapPost[0].bindTarget();
-
- bindDeferredShader(gDeferredGIProgram, 0, &mGIMap, 0, mTrueNoiseMap);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
- unbindDeferredShader(gDeferredGIProgram);
- mGIMapPost[0].flush();
- }
-
- U32 pass_count = 0;
- if (gSavedSettings.getBOOL("RenderDeferredBlurLight"))
- {
- pass_count = llclamp(gSavedSettings.getU32("RenderGIBlurPasses"), (U32) 1, (U32) 128);
- }
-
- for (U32 i = 0; i < pass_count; ++i)
- { //gather/soften indirect lighting map
- LLFastTimer ftm(FTM_GI_GATHER);
- bindDeferredShader(gDeferredPostGIProgram, 0, &mGIMapPost[0], NULL, mTrueNoiseMap);
- F32 blur_size = gSavedSettings.getF32("RenderGIBlurSize")/((F32) i * gSavedSettings.getF32("RenderGIBlurIncrement")+1.f);
- gDeferredPostGIProgram.uniform2f("delta", 1.f, 0.f);
- gDeferredPostGIProgram.uniform1f("kern_scale", blur_size);
- gDeferredPostGIProgram.uniform1f("gi_blur_brightness", gSavedSettings.getF32("RenderGIBlurBrightness"));
-
- mGIMapPost[1].bindTarget();
- {
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- stop_glerror();
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
- stop_glerror();
- }
-
- mGIMapPost[1].flush();
- unbindDeferredShader(gDeferredPostGIProgram);
- bindDeferredShader(gDeferredPostGIProgram, 0, &mGIMapPost[1], NULL, mTrueNoiseMap);
- mGIMapPost[0].bindTarget();
-
- gDeferredPostGIProgram.uniform2f("delta", 0.f, 1.f);
-
- {
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- stop_glerror();
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- stop_glerror();
- }
- mGIMapPost[0].flush();
- unbindDeferredShader(gDeferredPostGIProgram);
- }
- }
- }
-
- if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
+ if (RenderDeferredSSAO)
{ //soften direct lighting lightmap
LLFastTimer ftm(FTM_SOFTEN_SHADOW);
//blur lightmap
- mDeferredLight[1].bindTarget();
-
+ mScreen.bindTarget();
glClearColor(1,1,1,1);
- mDeferredLight[1].clear(GL_COLOR_BUFFER_BIT);
+ mScreen.clear(GL_COLOR_BUFFER_BIT);
glClearColor(0,0,0,0);
bindDeferredShader(gDeferredBlurLightProgram);
-
- LLVector3 go = gSavedSettings.getVector3("RenderShadowGaussian");
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ LLVector3 go = RenderShadowGaussian;
const U32 kern_length = 4;
- F32 blur_size = gSavedSettings.getF32("RenderShadowBlurSize");
- F32 dist_factor = gSavedSettings.getF32("RenderShadowBlurDistFactor");
+ F32 blur_size = RenderShadowBlurSize;
+ F32 dist_factor = RenderShadowBlurDistFactor;
// sample symmetrically with the middle sample falling exactly on 0.0
F32 x = 0.f;
@@ -7156,15 +7243,16 @@ void LLPipeline::renderDeferredLighting()
LLGLDisable blend(GL_BLEND);
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
stop_glerror();
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
+ mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
stop_glerror();
}
- mDeferredLight[1].flush();
+ mScreen.flush();
unbindDeferredShader(gDeferredBlurLightProgram);
bindDeferredShader(gDeferredBlurLightProgram, 1);
- mDeferredLight[0].bindTarget();
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ mDeferredLight.bindTarget();
gDeferredBlurLightProgram.uniform2f("delta", 0.f, 1.f);
@@ -7172,69 +7260,59 @@ void LLPipeline::renderDeferredLighting()
LLGLDisable blend(GL_BLEND);
LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS);
stop_glerror();
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
+ mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
stop_glerror();
}
- mDeferredLight[0].flush();
+ mDeferredLight.flush();
unbindDeferredShader(gDeferredBlurLightProgram);
}
stop_glerror();
- glPopMatrix();
+ gGL.popMatrix();
stop_glerror();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
stop_glerror();
- glPopMatrix();
+ gGL.popMatrix();
stop_glerror();
//copy depth and stencil from deferred screen
//mScreen.copyContents(mDeferredScreen, 0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight(),
// 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[1].bindTarget();
- // clear color buffer here (GI) - zeroing alpha (glow) is important or it will accumulate against sky
- glClearColor(0,0,0,0);
- mScreen.clear(GL_COLOR_BUFFER_BIT);
- }
- else
- {
- mScreen.bindTarget();
- // clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
- glClearColor(0,0,0,0);
- mScreen.clear(GL_COLOR_BUFFER_BIT);
- }
-
- if (gSavedSettings.getBOOL("RenderDeferredAtmospheric"))
+ mScreen.bindTarget();
+ // clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
+ glClearColor(0,0,0,0);
+ mScreen.clear(GL_COLOR_BUFFER_BIT);
+
+ if (RenderDeferredAtmospheric)
{ //apply sunlight contribution
LLFastTimer ftm(FTM_ATMOSPHERICS);
- bindDeferredShader(gDeferredSoftenProgram, 0, &mGIMapPost[0]);
+ bindDeferredShader(gDeferredSoftenProgram);
{
LLGLDepthTest depth(GL_FALSE);
LLGLDisable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
//full screen blit
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
- glVertexPointer(2, GL_FLOAT, 0, vert);
-
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
+
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
}
unbindDeferredShader(gDeferredSoftenProgram);
}
- { //render sky
+ { //render non-deferred geometry (fullbright, alpha, etc)
LLGLDisable blend(GL_BLEND);
LLGLDisable stencil(GL_STENCIL_TEST);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -7251,15 +7329,8 @@ void LLPipeline::renderDeferredLighting()
gPipeline.popRenderTypeMask();
}
- BOOL render_local = gSavedSettings.getBOOL("RenderLocalLights");
+ BOOL render_local = RenderLocalLights;
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[1].flush();
- mDeferredLight[2].bindTarget();
- mDeferredLight[2].clear(GL_COLOR_BUFFER_BIT);
- }
-
if (render_local)
{
gGL.setSceneBlendType(LLRender::BT_ADD);
@@ -7275,12 +7346,12 @@ void LLPipeline::renderDeferredLighting()
std::list<LLVector4> light_colors;
LLVertexBuffer::unbind();
+ LLVector4a* v = (LLVector4a*) vert.get();
- F32 v[24];
- glVertexPointer(3, GL_FLOAT, 0, v);
-
{
bindDeferredShader(gDeferredLightProgram);
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
+
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
for (LLDrawable::drawable_set_t::iterator iter = mLights.begin(); iter != mLights.end(); ++iter)
{
@@ -7335,15 +7406,16 @@ void LLPipeline::renderDeferredLighting()
//correspond to their axis facing, with bit position 3,2,1 matching
//axis facing x,y,z, bit set meaning positive facing, bit clear
//meaning negative facing
- v[0] = c[0]-s; v[1] = c[1]-s; v[2] = c[2]-s; // 0 - 0000
- v[3] = c[0]-s; v[4] = c[1]-s; v[5] = c[2]+s; // 1 - 0001
- v[6] = c[0]-s; v[7] = c[1]+s; v[8] = c[2]-s; // 2 - 0010
- v[9] = c[0]-s; v[10] = c[1]+s; v[11] = c[2]+s; // 3 - 0011
+ mDeferredVB->getVertexStrider(vert);
+ v[0].set(c[0]-s,c[1]-s,c[2]-s); // 0 - 0000
+ v[1].set(c[0]-s,c[1]-s,c[2]+s); // 1 - 0001
+ v[2].set(c[0]-s,c[1]+s,c[2]-s); // 2 - 0010
+ v[3].set(c[0]-s,c[1]+s,c[2]+s); // 3 - 0011
- v[12] = c[0]+s; v[13] = c[1]-s; v[14] = c[2]-s; // 4 - 0100
- v[15] = c[0]+s; v[16] = c[1]-s; v[17] = c[2]+s; // 5 - 0101
- v[18] = c[0]+s; v[19] = c[1]+s; v[20] = c[2]-s; // 6 - 0110
- v[21] = c[0]+s; v[22] = c[1]+s; v[23] = c[2]+s; // 7 - 0111
+ v[4].set(c[0]+s,c[1]-s,c[2]-s); // 4 - 0100
+ v[5].set(c[0]+s,c[1]-s,c[2]+s); // 5 - 0101
+ v[6].set(c[0]+s,c[1]+s,c[2]-s); // 6 - 0110
+ v[7].set(c[0]+s,c[1]+s,c[2]+s); // 7 - 0111
if (camera->getOrigin().mV[0] > c[0] + s + 0.2f ||
camera->getOrigin().mV[0] < c[0] - s - 0.2f ||
@@ -7362,10 +7434,16 @@ void LLPipeline::renderDeferredLighting()
}
LLFastTimer ftm(FTM_LOCAL_LIGHTS);
- glTexCoord4f(tc.v[0], tc.v[1], tc.v[2], s*s);
- glColor4f(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f);
+ //glTexCoord4f(tc.v[0], tc.v[1], tc.v[2], s*s);
+ gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
+ //gGL.diffuseColor4f(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f);
+ gGL.syncMatrices();
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glDrawRangeElements(GL_TRIANGLE_FAN, 0, 7, 8,
- GL_UNSIGNED_BYTE, get_box_fan_indices_ptr(camera, center));
+ GL_UNSIGNED_SHORT, get_box_fan_indices_ptr(camera, center));
stop_glerror();
}
}
@@ -7390,7 +7468,9 @@ void LLPipeline::renderDeferredLighting()
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
bindDeferredShader(gDeferredSpotLightProgram);
- gDeferredSpotLightProgram.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
+
+ gDeferredSpotLightProgram.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter)
{
@@ -7418,36 +7498,49 @@ void LLPipeline::renderDeferredLighting()
//correspond to their axis facing, with bit position 3,2,1 matching
//axis facing x,y,z, bit set meaning positive facing, bit clear
//meaning negative facing
- v[0] = c[0]-s; v[1] = c[1]-s; v[2] = c[2]-s; // 0 - 0000
- v[3] = c[0]-s; v[4] = c[1]-s; v[5] = c[2]+s; // 1 - 0001
- v[6] = c[0]-s; v[7] = c[1]+s; v[8] = c[2]-s; // 2 - 0010
- v[9] = c[0]-s; v[10] = c[1]+s; v[11] = c[2]+s; // 3 - 0011
+ mDeferredVB->getVertexStrider(vert);
+ v[0].set(c[0]-s,c[1]-s,c[2]-s); // 0 - 0000
+ v[1].set(c[0]-s,c[1]-s,c[2]+s); // 1 - 0001
+ v[2].set(c[0]-s,c[1]+s,c[2]-s); // 2 - 0010
+ v[3].set(c[0]-s,c[1]+s,c[2]+s); // 3 - 0011
- v[12] = c[0]+s; v[13] = c[1]-s; v[14] = c[2]-s; // 4 - 0100
- v[15] = c[0]+s; v[16] = c[1]-s; v[17] = c[2]+s; // 5 - 0101
- v[18] = c[0]+s; v[19] = c[1]+s; v[20] = c[2]-s; // 6 - 0110
- v[21] = c[0]+s; v[22] = c[1]+s; v[23] = c[2]+s; // 7 - 0111
-
- glTexCoord4f(tc.v[0], tc.v[1], tc.v[2], s*s);
- glColor4f(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f);
+ v[4].set(c[0]+s,c[1]-s,c[2]-s); // 4 - 0100
+ v[5].set(c[0]+s,c[1]-s,c[2]+s); // 5 - 0101
+ v[6].set(c[0]+s,c[1]+s,c[2]-s); // 6 - 0110
+ v[7].set(c[0]+s,c[1]+s,c[2]+s); // 7 - 0111
+
+ gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
+ gGL.syncMatrices();
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glDrawRangeElements(GL_TRIANGLE_FAN, 0, 7, 8,
- GL_UNSIGNED_BYTE, get_box_fan_indices_ptr(camera, center));
+ GL_UNSIGNED_SHORT, get_box_fan_indices_ptr(camera, center));
}
- gDeferredSpotLightProgram.disableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredSpotLightProgram.disableTexture(LLShaderMgr::DEFERRED_PROJECTION);
unbindDeferredShader(gDeferredSpotLightProgram);
}
+ //reset mDeferredVB to fullscreen triangle
+ mDeferredVB->getVertexStrider(vert);
+ vert[0].set(-1,1,0);
+ vert[1].set(-1,-3,0);
+ vert[2].set(3,1,0);
+
{
bindDeferredShader(gDeferredMultiLightProgram);
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
+
LLGLDepthTest depth(GL_FALSE);
//full screen blit
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
U32 count = 0;
@@ -7455,7 +7548,7 @@ void LLPipeline::renderDeferredLighting()
LLVector4 light[max_count];
LLVector4 col[max_count];
- glVertexPointer(2, GL_FLOAT, 0, vert);
+// glVertexPointer(2, GL_FLOAT, 0, vert);
F32 far_z = 0.f;
@@ -7472,13 +7565,13 @@ void LLPipeline::renderDeferredLighting()
count++;
if (count == max_count || fullscreen_lights.empty())
{
- gDeferredMultiLightProgram.uniform1i("light_count", count);
- gDeferredMultiLightProgram.uniform4fv("light", count, (GLfloat*) light);
- gDeferredMultiLightProgram.uniform4fv("light_col", count, (GLfloat*) col);
- gDeferredMultiLightProgram.uniform1f("far_z", far_z);
+ gDeferredMultiLightProgram.uniform1i(LLShaderMgr::MULTI_LIGHT_COUNT, count);
+ gDeferredMultiLightProgram.uniform4fv(LLShaderMgr::MULTI_LIGHT, count, (GLfloat*) light);
+ gDeferredMultiLightProgram.uniform4fv(LLShaderMgr::MULTI_LIGHT_COL, count, (GLfloat*) col);
+ gDeferredMultiLightProgram.uniform1f(LLShaderMgr::MULTI_LIGHT_FAR_Z, far_z);
far_z = 0.f;
- count = 0;
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
+ count = 0;
+ mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
}
}
@@ -7486,7 +7579,9 @@ void LLPipeline::renderDeferredLighting()
bindDeferredShader(gDeferredMultiSpotLightProgram);
- gDeferredMultiSpotLightProgram.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredMultiSpotLightProgram.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
+
+ mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
for (LLDrawable::drawable_list_t::iterator iter = fullscreen_spot_lights.begin(); iter != fullscreen_spot_lights.end(); ++iter)
{
@@ -7509,62 +7604,23 @@ void LLPipeline::renderDeferredLighting()
LLColor3 col = volume->getLightColor();
col *= volume->getLightIntensity();
- glTexCoord4f(tc.v[0], tc.v[1], tc.v[2], s*s);
- glColor4f(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
+ gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
+ mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
}
- gDeferredMultiSpotLightProgram.disableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredMultiSpotLightProgram.disableTexture(LLShaderMgr::DEFERRED_PROJECTION);
unbindDeferredShader(gDeferredMultiSpotLightProgram);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
}
}
gGL.setColorMask(true, true);
-
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[2].flush();
-
- mScreen.bindTarget();
- mScreen.clear(GL_COLOR_BUFFER_BIT);
-
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
-
- { //mix various light maps (local, sun, gi)
- LLFastTimer ftm(FTM_POST);
- LLGLDisable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- bindDeferredShader(gDeferredPostProgram, 0, &mGIMapPost[0]);
-
- gDeferredPostProgram.bind();
-
- LLVertexBuffer::unbind();
-
- glVertexPointer(2, GL_FLOAT, 0, vert);
- glColor3f(1,1,1);
-
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
-
- glDrawArrays(GL_TRIANGLES, 0, 3);
-
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-
- unbindDeferredShader(gDeferredPostProgram);
- }
- }
}
{ //render non-deferred geometry (alpha, fullbright, glow)
@@ -7680,13 +7736,13 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 proj_range = far_clip - near_clip;
glh::matrix4f light_proj = gl_perspective(fovy, aspect, near_clip, far_clip);
screen_to_light = trans * light_proj * screen_to_light;
- shader.uniformMatrix4fv("proj_mat", 1, FALSE, screen_to_light.m);
- shader.uniform1f("proj_near", near_clip);
- shader.uniform3fv("proj_p", 1, p1.v);
- shader.uniform3fv("proj_n", 1, n.v);
- shader.uniform3fv("proj_origin", 1, screen_origin.v);
- shader.uniform1f("proj_range", proj_range);
- shader.uniform1f("proj_ambiance", params.mV[2]);
+ shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, FALSE, screen_to_light.m);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_NEAR, near_clip);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_P, 1, p1.v);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_N, 1, n.v);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_ORIGIN, 1, screen_origin.v);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_RANGE, proj_range);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_AMBIANCE, params.mV[2]);
S32 s_idx = -1;
for (U32 i = 0; i < 2; i++)
@@ -7697,15 +7753,15 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
}
}
- shader.uniform1i("proj_shadow_idx", s_idx);
+ shader.uniform1i(LLShaderMgr::PROJECTOR_SHADOW_INDEX, s_idx);
if (s_idx >= 0)
{
- shader.uniform1f("shadow_fade", 1.f-mSpotLightFade[s_idx]);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_SHADOW_FADE, 1.f-mSpotLightFade[s_idx]);
}
else
{
- shader.uniform1f("shadow_fade", 1.f);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_SHADOW_FADE, 1.f);
}
{
@@ -7739,7 +7795,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
img = LLViewerFetchedTexture::sWhiteImagep;
}
- S32 channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ S32 channel = shader.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
if (channel > -1)
{
@@ -7749,9 +7805,9 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 lod_range = logf(img->getWidth())/logf(2.f);
- shader.uniform1f("proj_focus", focus);
- shader.uniform1f("proj_lod", lod_range);
- shader.uniform1f("proj_ambient_lod", llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
+ shader.uniform1f(LLShaderMgr::PROJECTOR_FOCUS, focus);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_LOD, lod_range);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_AMBIENT_LOD, llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
}
}
@@ -7760,33 +7816,17 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
{
stop_glerror();
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[0].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_EDGE, mEdgeMap.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, mDeferredLight[1].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, mDeferredLight[2].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LUMINANCE);
- shader.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MIP);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_NORMAL);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_DIFFUSE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_SPECULAR);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_DEPTH);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MIN_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MAX_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_NORMAL);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_DIFFUSE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MIN_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MAX_POS);
+ shader.disableTexture(LLShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
+ shader.disableTexture(LLShaderMgr::DIFFUSE_MAP);
+ shader.disableTexture(LLShaderMgr::DEFERRED_BLOOM);
for (U32 i = 0; i < 4; i++)
{
- if (shader.disableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1)
+ if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1)
{
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
}
@@ -7794,16 +7834,16 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
for (U32 i = 4; i < 6; i++)
{
- if (shader.disableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i) > -1)
+ if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
}
}
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_NOISE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHTFUNC);
+ shader.disableTexture(LLShaderMgr::DEFERRED_NOISE);
+ shader.disableTexture(LLShaderMgr::DEFERRED_LIGHTFUNC);
- S32 channel = shader.disableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ S32 channel = shader.disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
if (channel > -1)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
@@ -7829,11 +7869,11 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
{
BOOL skip_avatar_update = FALSE;
- if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
skip_avatar_update = TRUE;
}
-
+
if (!skip_avatar_update)
{
gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
@@ -7898,7 +7938,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
stop_glerror();
- glPushMatrix();
+ gGL.pushMatrix();
mat.set_scale(glh::vec3f(1,1,-1));
mat.set_translate(glh::vec3f(0,0,height*2.f));
@@ -7908,7 +7948,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
mat = current * mat;
glh_set_current_modelview(mat);
- glLoadMatrixf(mat.m);
+ gGL.loadMatrix(mat.m);
LLViewerCamera::updateFrustumPlanes(camera, FALSE, TRUE);
@@ -7923,7 +7963,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
static LLCullResult ref_result;
- if (LLDrawPoolWater::sNeedsDistortionUpdate)
+ if (LLDrawPoolWater::sNeedsReflectionUpdate)
{
//initial sky pass (no user clip plane)
{ //mask out everything but the sky
@@ -7951,7 +7991,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLPipeline::RENDER_TYPE_CLOUDS,
LLPipeline::END_RENDER_TYPES);
- S32 detail = gSavedSettings.getS32("RenderReflectionDetail");
+ S32 detail = RenderReflectionDetail;
if (detail > 0)
{ //mask out selected geometry based on reflection detail
if (detail < 4)
@@ -7975,7 +8015,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
- if (gSavedSettings.getS32("RenderReflectionDetail") > 0)
+ if (RenderReflectionDetail > 0)
{
gPipeline.grabReferences(ref_result);
LLGLUserClipPlane clip_plane(plane, mat, projection);
@@ -7986,7 +8026,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gPipeline.popRenderTypeMask();
}
glCullFace(GL_BACK);
- glPopMatrix();
+ gGL.popMatrix();
mWaterRef.flush();
glh_set_current_modelview(current);
LLPipeline::sUseOcclusion = occlusion;
@@ -8063,8 +8103,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLViewerCamera::getInstance()->setUserClipPlane(npnorm);
LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- LLGLState::checkClientArrays();
if (!skip_avatar_update)
{
@@ -8169,12 +8207,12 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
stateSort(shadow_cam, result);
//generate shadow map
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadMatrixf(proj.m);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadMatrixd(gGLModelView);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadMatrix(proj.m);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
+ gGL.loadMatrix(gGLModelView);
stop_glerror();
gGLLastMatrix = NULL;
@@ -8185,26 +8223,33 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-
- glColor4f(1,1,1,1);
stop_glerror();
-
- gGL.setColorMask(false, false);
//glCullFace(GL_FRONT);
LLVertexBuffer::unbind();
{
+ if (!use_shader)
+ { //occlusion program is general purpose depth-only no-textures
+ gOcclusionProgram.bind();
+ }
+
+ gGL.diffuseColor4f(1,1,1,1);
+ gGL.setColorMask(false, false);
+
LLFastTimer ftm(FTM_SHADOW_SIMPLE);
- LLGLDisable test(GL_ALPHA_TEST);
gGL.getTexUnit(0)->disable();
for (U32 i = 0; i < sizeof(types)/sizeof(U32); ++i)
{
renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, FALSE);
}
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
+ if (!use_shader)
+ {
+ gOcclusionProgram.unbind();
+ }
}
if (use_shader)
@@ -8220,18 +8265,19 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LLFastTimer ftm(FTM_SHADOW_ALPHA);
- LLGLEnable test(GL_ALPHA_TEST);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.6f);
+ gDeferredShadowAlphaMaskProgram.bind();
+ gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
- glColor4f(1,1,1,1);
+ gDeferredTreeShadowProgram.bind();
+ gDeferredTreeShadowProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
//glCullFace(GL_BACK);
+ gDeferredShadowProgram.bind();
gGLLastMatrix = NULL;
- glLoadMatrixd(gGLModelView);
+ gGL.loadMatrix(gGLModelView);
doOcclusion(shadow_cam);
if (use_shader)
@@ -8241,10 +8287,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
gGL.setColorMask(true, true);
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
gGLLastMatrix = NULL;
LLPipeline::sUseOcclusion = occlude;
@@ -8426,184 +8472,6 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
return TRUE;
}
-void LLPipeline::generateGI(LLCamera& camera, LLVector3& lightDir, std::vector<LLVector3>& vpc)
-{
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) < 3)
- {
- return;
- }
-
- LLVector3 up;
-
- //LLGLEnable depth_clamp(GL_DEPTH_CLAMP_NV);
-
- if (lightDir.mV[2] > 0.5f)
- {
- up = LLVector3(1,0,0);
- }
- else
- {
- up = LLVector3(0, 0, 1);
- }
-
-
- F32 gi_range = gSavedSettings.getF32("RenderGIRange");
-
- U32 res = mGIMap.getWidth();
-
- F32 atten = llmax(gSavedSettings.getF32("RenderGIAttenuation"), 0.001f);
-
- //set radius to range at which distance attenuation of incoming photons is near 0
-
- F32 lrad = sqrtf(1.f/(atten*0.01f));
-
- F32 lrange = lrad+gi_range*0.5f;
-
- LLVector3 pad(lrange,lrange,lrange);
-
- glh::matrix4f view = look(LLVector3(128.f,128.f,128.f), lightDir, up);
-
- LLVector3 cp = camera.getOrigin()+camera.getAtAxis()*(gi_range*0.5f);
-
- glh::vec3f scp(cp.mV);
- view.mult_matrix_vec(scp);
- cp.setVec(scp.v);
-
- F32 pix_width = lrange/(res*0.5f);
-
- //move cp to the nearest pix_width
- for (U32 i = 0; i < 3; i++)
- {
- cp.mV[i] = llround(cp.mV[i], pix_width);
- }
-
- LLVector3 min = cp-pad;
- LLVector3 max = cp+pad;
-
- //set mGIRange to range in tc space[0,1] that covers texture block of intersecting lights around a point
- mGIRange.mV[0] = (max.mV[0]-min.mV[0])/res;
- mGIRange.mV[1] = (max.mV[1]-min.mV[1])/res;
- mGILightRadius = lrad/lrange*0.5f;
-
- glh::matrix4f proj = gl_ortho(min.mV[0], max.mV[0],
- min.mV[1], max.mV[1],
- -max.mV[2], -min.mV[2]);
-
- LLCamera sun_cam = camera;
-
- glh::matrix4f eye_view = glh_get_current_modelview();
-
- //get eye space to camera space matrix
- mGIMatrix = view*eye_view.inverse();
- mGINormalMatrix = mGIMatrix.inverse().transpose();
- mGIInvProj = proj.inverse();
- mGIMatrixProj = proj*mGIMatrix;
-
- //translate and scale to [0,1]
- glh::matrix4f trans(.5f, 0.f, 0.f, .5f,
- 0.f, 0.5f, 0.f, 0.5f,
- 0.f, 0.f, 0.5f, 0.5f,
- 0.f, 0.f, 0.f, 1.f);
-
- mGIMatrixProj = trans*mGIMatrixProj;
-
- glh_set_current_modelview(view);
- glh_set_current_projection(proj);
-
- LLViewerCamera::updateFrustumPlanes(sun_cam, TRUE, FALSE, TRUE);
-
- sun_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR);
- static LLCullResult result;
-
- pushRenderTypeMask();
-
- andRenderTypeMask(LLPipeline::RENDER_TYPE_SIMPLE,
- LLPipeline::RENDER_TYPE_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_BUMP,
- LLPipeline::RENDER_TYPE_VOLUME,
- LLPipeline::RENDER_TYPE_TREE,
- LLPipeline::RENDER_TYPE_TERRAIN,
- LLPipeline::RENDER_TYPE_WATER,
- LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
- LLPipeline::RENDER_TYPE_AVATAR,
- LLPipeline::RENDER_TYPE_PASS_SIMPLE,
- LLPipeline::RENDER_TYPE_PASS_BUMP,
- LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_PASS_SHINY,
- END_RENDER_TYPES);
-
-
-
- S32 occlude = LLPipeline::sUseOcclusion;
- //LLPipeline::sUseOcclusion = 0;
- LLPipeline::sShadowRender = TRUE;
-
- //only render large objects into GI map
- sMinRenderSize = gSavedSettings.getF32("RenderGIMinRenderSize");
-
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_GI_SOURCE;
- mGIMap.bindTarget();
-
- F64 last_modelview[16];
- F64 last_projection[16];
- for (U32 i = 0; i < 16; i++)
- {
- last_modelview[i] = gGLLastModelView[i];
- last_projection[i] = gGLLastProjection[i];
- gGLLastModelView[i] = mGIModelview.m[i];
- gGLLastProjection[i] = mGIProjection.m[i];
- }
-
- sun_cam.setOrigin(0.f, 0.f, 0.f);
- updateCull(sun_cam, result);
- stateSort(sun_cam, result);
-
- for (U32 i = 0; i < 16; i++)
- {
- gGLLastModelView[i] = last_modelview[i];
- gGLLastProjection[i] = last_projection[i];
- }
-
- mGIProjection = proj;
- mGIModelview = view;
-
- LLGLEnable cull(GL_CULL_FACE);
-
- //generate GI map
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadMatrixf(proj.m);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadMatrixf(view.m);
-
- stop_glerror();
- gGLLastMatrix = NULL;
-
- mGIMap.clear();
-
- {
- //LLGLEnable enable(GL_DEPTH_CLAMP_NV);
- renderGeomDeferred(camera);
- }
-
- mGIMap.flush();
-
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
- gGLLastMatrix = NULL;
-
- LLPipeline::sUseOcclusion = occlude;
- LLPipeline::sShadowRender = FALSE;
- sMinRenderSize = 0.f;
-
- popRenderTypeMask();
-
-}
-
void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade)
{
if (obj && obj->getVolume())
@@ -8638,7 +8506,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
if (!mHighlightSet.empty())
{
- F32 transition = gFrameIntervalSeconds/gSavedSettings.getF32("RenderHighlightFadeTime");
+ F32 transition = gFrameIntervalSeconds/RenderHighlightFadeTime;
LLGLDisable test(GL_ALPHA_TEST);
LLGLDepthTest depth(GL_FALSE);
@@ -8684,11 +8552,23 @@ void LLPipeline::generateHighlight(LLCamera& camera)
void LLPipeline::generateSunShadow(LLCamera& camera)
{
- if (!sRenderDeferred || gSavedSettings.getS32("RenderShadowDetail") <= 0)
+ if (!sRenderDeferred || RenderShadowDetail <= 0)
{
return;
}
+ BOOL skip_avatar_update = FALSE;
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
+ {
+
+ skip_avatar_update = TRUE;
+ }
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
+ }
+
F64 last_modelview[16];
F64 last_projection[16];
for (U32 i = 0; i < 16; i++)
@@ -8710,6 +8590,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
LLPipeline::RENDER_TYPE_WATER,
LLPipeline::RENDER_TYPE_VOIDWATER,
LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
+ LLPipeline::RENDER_TYPE_PASS_GRASS,
LLPipeline::RENDER_TYPE_PASS_SIMPLE,
LLPipeline::RENDER_TYPE_PASS_BUMP,
LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT,
@@ -8730,25 +8611,25 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
glh::matrix4f proj[6];
//clip contains parallel split distances for 3 splits
- LLVector3 clip = gSavedSettings.getVector3("RenderShadowClipPlanes");
+ LLVector3 clip = RenderShadowClipPlanes;
//F32 slope_threshold = gSavedSettings.getF32("RenderShadowSlopeThreshold");
//far clip on last split is minimum of camera view distance and 128
mSunClipPlanes = LLVector4(clip, clip.mV[2] * clip.mV[2]/clip.mV[1]);
- clip = gSavedSettings.getVector3("RenderShadowOrthoClipPlanes");
+ clip = RenderShadowOrthoClipPlanes;
mSunOrthoClipPlanes = LLVector4(clip, clip.mV[2]*clip.mV[2]/clip.mV[1]);
//currently used for amount to extrude frusta corners for constructing shadow frusta
- LLVector3 n = gSavedSettings.getVector3("RenderShadowNearDist");
+ LLVector3 n = RenderShadowNearDist;
//F32 nearDist[] = { n.mV[0], n.mV[1], n.mV[2], n.mV[2] };
//put together a universal "near clip" plane for shadow frusta
LLPlane shadow_near_clip;
{
LLVector3 p = gAgent.getPositionAgent();
- p += mSunDir * gSavedSettings.getF32("RenderFarClip")*2.f;
+ p += mSunDir * RenderFarClip*2.f;
shadow_near_clip.setVec(p, mSunDir);
}
@@ -8801,11 +8682,15 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mShadowFrustPoints[3].clear();
}
popRenderTypeMask();
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
+ }
+
return;
}
- generateGI(camera, lightDir, fp);
-
//get good split distances for frustum
for (U32 i = 0; i < fp.size(); ++i)
{
@@ -8831,7 +8716,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
F32 range = far_clip-near_clip;
- LLVector3 split_exp = gSavedSettings.getVector3("RenderShadowSplitExponent");
+ LLVector3 split_exp = RenderShadowSplitExponent;
F32 da = 1.f-llmax( fabsf(lightDir*up), fabsf(lightDir*camera.getLeftAxis()) );
@@ -8852,384 +8737,399 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
// convenience array of 4 near clip plane distances
F32 dist[] = { near_clip, mSunClipPlanes.mV[0], mSunClipPlanes.mV[1], mSunClipPlanes.mV[2], mSunClipPlanes.mV[3] };
- for (S32 j = 0; j < 4; j++)
- {
- if (!hasRenderDebugMask(RENDER_DEBUG_SHADOW_FRUSTA))
+
+ if (mSunDiffuse == LLColor4::black)
+ { //sun diffuse is totally black, shadows don't matter
+ LLGLDepthTest depth(GL_TRUE);
+
+ for (S32 j = 0; j < 4; j++)
{
- mShadowFrustPoints[j].clear();
+ mShadow[j].bindTarget();
+ mShadow[j].clear();
+ mShadow[j].flush();
}
+ }
+ else
+ {
+ for (S32 j = 0; j < 4; j++)
+ {
+ if (!hasRenderDebugMask(RENDER_DEBUG_SHADOW_FRUSTA))
+ {
+ mShadowFrustPoints[j].clear();
+ }
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW0+j;
+ LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_SHADOW0+j;
- //restore render matrices
- glh_set_current_modelview(saved_view);
- glh_set_current_projection(saved_proj);
+ //restore render matrices
+ glh_set_current_modelview(saved_view);
+ glh_set_current_projection(saved_proj);
- LLVector3 eye = camera.getOrigin();
+ LLVector3 eye = camera.getOrigin();
- //camera used for shadow cull/render
- LLCamera shadow_cam;
+ //camera used for shadow cull/render
+ LLCamera shadow_cam;
- //create world space camera frustum for this split
- shadow_cam = camera;
- shadow_cam.setFar(16.f);
+ //create world space camera frustum for this split
+ shadow_cam = camera;
+ shadow_cam.setFar(16.f);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
- LLVector3* frust = shadow_cam.mAgentFrustum;
+ LLVector3* frust = shadow_cam.mAgentFrustum;
- LLVector3 pn = shadow_cam.getAtAxis();
+ LLVector3 pn = shadow_cam.getAtAxis();
- LLVector3 min, max;
+ LLVector3 min, max;
- //construct 8 corners of split frustum section
- for (U32 i = 0; i < 4; i++)
- {
- LLVector3 delta = frust[i+4]-eye;
- delta += (frust[i+4]-frust[(i+2)%4+4])*0.05f;
- delta.normVec();
- F32 dp = delta*pn;
- frust[i] = eye + (delta*dist[j]*0.95f)/dp;
- frust[i+4] = eye + (delta*dist[j+1]*1.05f)/dp;
- }
+ //construct 8 corners of split frustum section
+ for (U32 i = 0; i < 4; i++)
+ {
+ LLVector3 delta = frust[i+4]-eye;
+ delta += (frust[i+4]-frust[(i+2)%4+4])*0.05f;
+ delta.normVec();
+ F32 dp = delta*pn;
+ frust[i] = eye + (delta*dist[j]*0.95f)/dp;
+ frust[i+4] = eye + (delta*dist[j+1]*1.05f)/dp;
+ }
- shadow_cam.calcAgentFrustumPlanes(frust);
- shadow_cam.mFrustumCornerDist = 0.f;
+ shadow_cam.calcAgentFrustumPlanes(frust);
+ shadow_cam.mFrustumCornerDist = 0.f;
- if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
- {
- mShadowCamera[j] = shadow_cam;
- }
-
- std::vector<LLVector3> fp;
-
- if (!gPipeline.getVisiblePointCloud(shadow_cam, min, max, fp, lightDir))
- {
- //no possible shadow receivers
if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
{
- mShadowExtents[j][0] = LLVector3();
- mShadowExtents[j][1] = LLVector3();
- mShadowCamera[j+4] = shadow_cam;
- }
-
- mShadow[j].bindTarget();
- {
- LLGLDepthTest depth(GL_TRUE);
- mShadow[j].clear();
+ mShadowCamera[j] = shadow_cam;
}
- mShadow[j].flush();
- mShadowError.mV[j] = 0.f;
- mShadowFOV.mV[j] = 0.f;
+ std::vector<LLVector3> fp;
- continue;
- }
-
- if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
- {
- mShadowExtents[j][0] = min;
- mShadowExtents[j][1] = max;
- mShadowFrustPoints[j] = fp;
- }
-
+ if (!gPipeline.getVisiblePointCloud(shadow_cam, min, max, fp, lightDir))
+ {
+ //no possible shadow receivers
+ if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
+ {
+ mShadowExtents[j][0] = LLVector3();
+ mShadowExtents[j][1] = LLVector3();
+ mShadowCamera[j+4] = shadow_cam;
+ }
- //find a good origin for shadow projection
- LLVector3 origin;
+ mShadow[j].bindTarget();
+ {
+ LLGLDepthTest depth(GL_TRUE);
+ mShadow[j].clear();
+ }
+ mShadow[j].flush();
- //get a temporary view projection
- view[j] = look(camera.getOrigin(), lightDir, -up);
+ mShadowError.mV[j] = 0.f;
+ mShadowFOV.mV[j] = 0.f;
- std::vector<LLVector3> wpf;
+ continue;
+ }
- for (U32 i = 0; i < fp.size(); i++)
- {
- glh::vec3f p = glh::vec3f(fp[i].mV);
- view[j].mult_matrix_vec(p);
- wpf.push_back(LLVector3(p.v));
- }
+ if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
+ {
+ mShadowExtents[j][0] = min;
+ mShadowExtents[j][1] = max;
+ mShadowFrustPoints[j] = fp;
+ }
+
- min = wpf[0];
- max = wpf[0];
+ //find a good origin for shadow projection
+ LLVector3 origin;
- for (U32 i = 0; i < fp.size(); ++i)
- { //get AABB in camera space
- update_min_max(min, max, wpf[i]);
- }
-
- // Construct a perspective transform with perspective along y-axis that contains
- // points in wpf
- //Known:
- // - far clip plane
- // - near clip plane
- // - points in frustum
- //Find:
- // - origin
-
- //get some "interesting" points of reference
- LLVector3 center = (min+max)*0.5f;
- LLVector3 size = (max-min)*0.5f;
- LLVector3 near_center = center;
- near_center.mV[1] += size.mV[1]*2.f;
-
-
- //put all points in wpf in quadrant 0, reletive to center of min/max
- //get the best fit line using least squares
- F32 bfm = 0.f;
- F32 bfb = 0.f;
+ //get a temporary view projection
+ view[j] = look(camera.getOrigin(), lightDir, -up);
- for (U32 i = 0; i < wpf.size(); ++i)
- {
- wpf[i] -= center;
- wpf[i].mV[0] = fabsf(wpf[i].mV[0]);
- wpf[i].mV[2] = fabsf(wpf[i].mV[2]);
- }
+ std::vector<LLVector3> wpf;
- if (!wpf.empty())
- {
- F32 sx = 0.f;
- F32 sx2 = 0.f;
- F32 sy = 0.f;
- F32 sxy = 0.f;
-
- for (U32 i = 0; i < wpf.size(); ++i)
- {
- sx += wpf[i].mV[0];
- sx2 += wpf[i].mV[0]*wpf[i].mV[0];
- sy += wpf[i].mV[1];
- sxy += wpf[i].mV[0]*wpf[i].mV[1];
+ for (U32 i = 0; i < fp.size(); i++)
+ {
+ glh::vec3f p = glh::vec3f(fp[i].mV);
+ view[j].mult_matrix_vec(p);
+ wpf.push_back(LLVector3(p.v));
}
- bfm = (sy*sx-wpf.size()*sxy)/(sx*sx-wpf.size()*sx2);
- bfb = (sx*sxy-sy*sx2)/(sx*sx-bfm*sx2);
- }
-
- {
- // best fit line is y=bfm*x+bfb
-
- //find point that is furthest to the right of line
- F32 off_x = -1.f;
- LLVector3 lp;
-
- for (U32 i = 0; i < wpf.size(); ++i)
- {
- //y = bfm*x+bfb
- //x = (y-bfb)/bfm
- F32 lx = (wpf[i].mV[1]-bfb)/bfm;
+ min = wpf[0];
+ max = wpf[0];
- lx = wpf[i].mV[0]-lx;
-
- if (off_x < lx)
- {
- off_x = lx;
- lp = wpf[i];
- }
+ for (U32 i = 0; i < fp.size(); ++i)
+ { //get AABB in camera space
+ update_min_max(min, max, wpf[i]);
}
- //get line with slope bfm through lp
- // bfb = y-bfm*x
- bfb = lp.mV[1]-bfm*lp.mV[0];
+ // Construct a perspective transform with perspective along y-axis that contains
+ // points in wpf
+ //Known:
+ // - far clip plane
+ // - near clip plane
+ // - points in frustum
+ //Find:
+ // - origin
- //calculate error
- mShadowError.mV[j] = 0.f;
+ //get some "interesting" points of reference
+ LLVector3 center = (min+max)*0.5f;
+ LLVector3 size = (max-min)*0.5f;
+ LLVector3 near_center = center;
+ near_center.mV[1] += size.mV[1]*2.f;
+
+
+ //put all points in wpf in quadrant 0, reletive to center of min/max
+ //get the best fit line using least squares
+ F32 bfm = 0.f;
+ F32 bfb = 0.f;
for (U32 i = 0; i < wpf.size(); ++i)
{
- F32 lx = (wpf[i].mV[1]-bfb)/bfm;
- mShadowError.mV[j] += fabsf(wpf[i].mV[0]-lx);
+ wpf[i] -= center;
+ wpf[i].mV[0] = fabsf(wpf[i].mV[0]);
+ wpf[i].mV[2] = fabsf(wpf[i].mV[2]);
}
- mShadowError.mV[j] /= wpf.size();
- mShadowError.mV[j] /= size.mV[0];
+ if (!wpf.empty())
+ {
+ F32 sx = 0.f;
+ F32 sx2 = 0.f;
+ F32 sy = 0.f;
+ F32 sxy = 0.f;
+
+ for (U32 i = 0; i < wpf.size(); ++i)
+ {
+ sx += wpf[i].mV[0];
+ sx2 += wpf[i].mV[0]*wpf[i].mV[0];
+ sy += wpf[i].mV[1];
+ sxy += wpf[i].mV[0]*wpf[i].mV[1];
+ }
- if (mShadowError.mV[j] > gSavedSettings.getF32("RenderShadowErrorCutoff"))
- { //just use ortho projection
- mShadowFOV.mV[j] = -1.f;
- origin.clearVec();
- proj[j] = gl_ortho(min.mV[0], max.mV[0],
- min.mV[1], max.mV[1],
- -max.mV[2], -min.mV[2]);
+ bfm = (sy*sx-wpf.size()*sxy)/(sx*sx-wpf.size()*sx2);
+ bfb = (sx*sxy-sy*sx2)/(sx*sx-bfm*sx2);
}
- else
+
{
- //origin is where line x = 0;
- origin.setVec(0,bfb,0);
-
- F32 fovz = 1.f;
- F32 fovx = 1.f;
-
- LLVector3 zp;
- LLVector3 xp;
+ // best fit line is y=bfm*x+bfb
+
+ //find point that is furthest to the right of line
+ F32 off_x = -1.f;
+ LLVector3 lp;
for (U32 i = 0; i < wpf.size(); ++i)
{
- LLVector3 atz = wpf[i]-origin;
- atz.mV[0] = 0.f;
- atz.normVec();
- if (fovz > -atz.mV[1])
- {
- zp = wpf[i];
- fovz = -atz.mV[1];
- }
-
- LLVector3 atx = wpf[i]-origin;
- atx.mV[2] = 0.f;
- atx.normVec();
- if (fovx > -atx.mV[1])
+ //y = bfm*x+bfb
+ //x = (y-bfb)/bfm
+ F32 lx = (wpf[i].mV[1]-bfb)/bfm;
+
+ lx = wpf[i].mV[0]-lx;
+
+ if (off_x < lx)
{
- fovx = -atx.mV[1];
- xp = wpf[i];
+ off_x = lx;
+ lp = wpf[i];
}
}
- fovx = acos(fovx);
- fovz = acos(fovz);
+ //get line with slope bfm through lp
+ // bfb = y-bfm*x
+ bfb = lp.mV[1]-bfm*lp.mV[0];
- F32 cutoff = llmin(gSavedSettings.getF32("RenderShadowFOVCutoff"), 1.4f);
-
- mShadowFOV.mV[j] = fovx;
-
- if (fovx < cutoff && fovz > cutoff)
+ //calculate error
+ mShadowError.mV[j] = 0.f;
+
+ for (U32 i = 0; i < wpf.size(); ++i)
{
- //x is a good fit, but z is too big, move away from zp enough so that fovz matches cutoff
- F32 d = zp.mV[2]/tan(cutoff);
- F32 ny = zp.mV[1] + fabsf(d);
+ F32 lx = (wpf[i].mV[1]-bfb)/bfm;
+ mShadowError.mV[j] += fabsf(wpf[i].mV[0]-lx);
+ }
- origin.mV[1] = ny;
+ mShadowError.mV[j] /= wpf.size();
+ mShadowError.mV[j] /= size.mV[0];
- fovz = 1.f;
- fovx = 1.f;
+ if (mShadowError.mV[j] > RenderShadowErrorCutoff)
+ { //just use ortho projection
+ mShadowFOV.mV[j] = -1.f;
+ origin.clearVec();
+ proj[j] = gl_ortho(min.mV[0], max.mV[0],
+ min.mV[1], max.mV[1],
+ -max.mV[2], -min.mV[2]);
+ }
+ else
+ {
+ //origin is where line x = 0;
+ origin.setVec(0,bfb,0);
+
+ F32 fovz = 1.f;
+ F32 fovx = 1.f;
+
+ LLVector3 zp;
+ LLVector3 xp;
for (U32 i = 0; i < wpf.size(); ++i)
{
LLVector3 atz = wpf[i]-origin;
atz.mV[0] = 0.f;
atz.normVec();
- fovz = llmin(fovz, -atz.mV[1]);
-
+ if (fovz > -atz.mV[1])
+ {
+ zp = wpf[i];
+ fovz = -atz.mV[1];
+ }
+
LLVector3 atx = wpf[i]-origin;
atx.mV[2] = 0.f;
atx.normVec();
- fovx = llmin(fovx, -atx.mV[1]);
+ if (fovx > -atx.mV[1])
+ {
+ fovx = -atx.mV[1];
+ xp = wpf[i];
+ }
}
fovx = acos(fovx);
fovz = acos(fovz);
- mShadowFOV.mV[j] = cutoff;
- }
+ F32 cutoff = llmin((F32) RenderShadowFOVCutoff, 1.4f);
+
+ mShadowFOV.mV[j] = fovx;
+
+ if (fovx < cutoff && fovz > cutoff)
+ {
+ //x is a good fit, but z is too big, move away from zp enough so that fovz matches cutoff
+ F32 d = zp.mV[2]/tan(cutoff);
+ F32 ny = zp.mV[1] + fabsf(d);
+
+ origin.mV[1] = ny;
+
+ fovz = 1.f;
+ fovx = 1.f;
+
+ for (U32 i = 0; i < wpf.size(); ++i)
+ {
+ LLVector3 atz = wpf[i]-origin;
+ atz.mV[0] = 0.f;
+ atz.normVec();
+ fovz = llmin(fovz, -atz.mV[1]);
+
+ LLVector3 atx = wpf[i]-origin;
+ atx.mV[2] = 0.f;
+ atx.normVec();
+ fovx = llmin(fovx, -atx.mV[1]);
+ }
+
+ fovx = acos(fovx);
+ fovz = acos(fovz);
+
+ mShadowFOV.mV[j] = cutoff;
+ }
- origin += center;
+ origin += center;
- F32 ynear = -(max.mV[1]-origin.mV[1]);
- F32 yfar = -(min.mV[1]-origin.mV[1]);
+ F32 ynear = -(max.mV[1]-origin.mV[1]);
+ F32 yfar = -(min.mV[1]-origin.mV[1]);
- if (ynear < 0.1f) //keep a sensible near clip plane
- {
- F32 diff = 0.1f-ynear;
- origin.mV[1] += diff;
- ynear += diff;
- yfar += diff;
- }
+ if (ynear < 0.1f) //keep a sensible near clip plane
+ {
+ F32 diff = 0.1f-ynear;
+ origin.mV[1] += diff;
+ ynear += diff;
+ yfar += diff;
+ }
- if (fovx > cutoff)
- { //just use ortho projection
- origin.clearVec();
- mShadowError.mV[j] = -1.f;
- proj[j] = gl_ortho(min.mV[0], max.mV[0],
- min.mV[1], max.mV[1],
- -max.mV[2], -min.mV[2]);
- }
- else
- {
- //get perspective projection
- view[j] = view[j].inverse();
+ if (fovx > cutoff)
+ { //just use ortho projection
+ origin.clearVec();
+ mShadowError.mV[j] = -1.f;
+ proj[j] = gl_ortho(min.mV[0], max.mV[0],
+ min.mV[1], max.mV[1],
+ -max.mV[2], -min.mV[2]);
+ }
+ else
+ {
+ //get perspective projection
+ view[j] = view[j].inverse();
- glh::vec3f origin_agent(origin.mV);
+ glh::vec3f origin_agent(origin.mV);
- //translate view to origin
- view[j].mult_matrix_vec(origin_agent);
+ //translate view to origin
+ view[j].mult_matrix_vec(origin_agent);
- eye = LLVector3(origin_agent.v);
+ eye = LLVector3(origin_agent.v);
- if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
- {
- mShadowFrustOrigin[j] = eye;
- }
+ if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
+ {
+ mShadowFrustOrigin[j] = eye;
+ }
- view[j] = look(LLVector3(origin_agent.v), lightDir, -up);
+ view[j] = look(LLVector3(origin_agent.v), lightDir, -up);
- F32 fx = 1.f/tanf(fovx);
- F32 fz = 1.f/tanf(fovz);
+ F32 fx = 1.f/tanf(fovx);
+ F32 fz = 1.f/tanf(fovz);
- proj[j] = glh::matrix4f(-fx, 0, 0, 0,
- 0, (yfar+ynear)/(ynear-yfar), 0, (2.f*yfar*ynear)/(ynear-yfar),
- 0, 0, -fz, 0,
- 0, -1.f, 0, 0);
+ proj[j] = glh::matrix4f(-fx, 0, 0, 0,
+ 0, (yfar+ynear)/(ynear-yfar), 0, (2.f*yfar*ynear)/(ynear-yfar),
+ 0, 0, -fz, 0,
+ 0, -1.f, 0, 0);
+ }
}
}
- }
- //shadow_cam.setFar(128.f);
- shadow_cam.setOriginAndLookAt(eye, up, center);
+ //shadow_cam.setFar(128.f);
+ shadow_cam.setOriginAndLookAt(eye, up, center);
- shadow_cam.setOrigin(0,0,0);
+ shadow_cam.setOrigin(0,0,0);
- glh_set_current_modelview(view[j]);
- glh_set_current_projection(proj[j]);
+ glh_set_current_modelview(view[j]);
+ glh_set_current_projection(proj[j]);
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
- //shadow_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR);
- shadow_cam.getAgentPlane(LLCamera::AGENT_PLANE_NEAR).set(shadow_near_clip);
+ //shadow_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR);
+ shadow_cam.getAgentPlane(LLCamera::AGENT_PLANE_NEAR).set(shadow_near_clip);
- //translate and scale to from [-1, 1] to [0, 1]
- glh::matrix4f trans(0.5f, 0.f, 0.f, 0.5f,
- 0.f, 0.5f, 0.f, 0.5f,
- 0.f, 0.f, 0.5f, 0.5f,
- 0.f, 0.f, 0.f, 1.f);
+ //translate and scale to from [-1, 1] to [0, 1]
+ glh::matrix4f trans(0.5f, 0.f, 0.f, 0.5f,
+ 0.f, 0.5f, 0.f, 0.5f,
+ 0.f, 0.f, 0.5f, 0.5f,
+ 0.f, 0.f, 0.f, 1.f);
- glh_set_current_modelview(view[j]);
- glh_set_current_projection(proj[j]);
+ glh_set_current_modelview(view[j]);
+ glh_set_current_projection(proj[j]);
- for (U32 i = 0; i < 16; i++)
- {
- gGLLastModelView[i] = mShadowModelview[j].m[i];
- gGLLastProjection[i] = mShadowProjection[j].m[i];
- }
+ for (U32 i = 0; i < 16; i++)
+ {
+ gGLLastModelView[i] = mShadowModelview[j].m[i];
+ gGLLastProjection[i] = mShadowProjection[j].m[i];
+ }
- mShadowModelview[j] = view[j];
- mShadowProjection[j] = proj[j];
+ mShadowModelview[j] = view[j];
+ mShadowProjection[j] = proj[j];
- mSunShadowMatrix[j] = trans*proj[j]*view[j]*inv_view;
+ mSunShadowMatrix[j] = trans*proj[j]*view[j]*inv_view;
- stop_glerror();
+ stop_glerror();
- mShadow[j].bindTarget();
- mShadow[j].getViewport(gGLViewport);
- mShadow[j].clear();
+ mShadow[j].bindTarget();
+ mShadow[j].getViewport(gGLViewport);
+ mShadow[j].clear();
- {
- static LLCullResult result[4];
+ {
+ static LLCullResult result[4];
- //LLGLEnable enable(GL_DEPTH_CLAMP_NV);
- renderShadow(view[j], proj[j], shadow_cam, result[j], TRUE);
- }
+ //LLGLEnable enable(GL_DEPTH_CLAMP_NV);
+ renderShadow(view[j], proj[j], shadow_cam, result[j], TRUE);
+ }
- mShadow[j].flush();
+ mShadow[j].flush();
- if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
- {
- LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
- mShadowCamera[j+4] = shadow_cam;
+ if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA))
+ {
+ LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE);
+ mShadowCamera[j+4] = shadow_cam;
+ }
}
}
//hack to disable projector shadows
- bool gen_shadow = gSavedSettings.getS32("RenderShadowDetail") > 1;
+ bool gen_shadow = RenderShadowDetail > 1;
if (gen_shadow)
{
@@ -9368,7 +9268,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
- if (!gSavedSettings.getBOOL("CameraOffset"))
+ if (!CameraOffset)
{
glh_set_current_modelview(saved_view);
glh_set_current_projection(saved_proj);
@@ -9377,10 +9277,10 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
{
glh_set_current_modelview(view[1]);
glh_set_current_projection(proj[1]);
- glLoadMatrixf(view[1].m);
- glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(proj[1].m);
- glMatrixMode(GL_MODELVIEW);
+ gGL.loadMatrix(view[1].m);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.loadMatrix(proj[1].m);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
gGL.setColorMask(true, false);
@@ -9391,6 +9291,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
popRenderTypeMask();
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
+ }
}
void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture)
@@ -9512,24 +9417,24 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
tdim.mV[0] = fabsf(half_height.dot3(left).getF32());
tdim.mV[1] = fabsf(half_height.dot3(up).getF32());
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
F32 distance = (pos-camera.getOrigin()).length();
F32 fov = atanf(tdim.mV[1]/distance)*2.f*RAD_TO_DEG;
F32 aspect = tdim.mV[0]/tdim.mV[1];
glh::matrix4f persp = gl_perspective(fov, aspect, 1.f, 256.f);
glh_set_current_projection(persp);
- glLoadMatrixf(persp.m);
+ gGL.loadMatrix(persp.m);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
glh::matrix4f mat;
camera.getOpenGLTransform(mat.m);
mat = glh::matrix4f((GLfloat*) OGL_TO_CFR_ROTATION) * mat;
- glLoadMatrixf(mat.m);
+ gGL.loadMatrix(mat.m);
glh_set_current_modelview(mat);
glClearColor(0.0f,0.0f,0.0f,0.0f);
@@ -9597,14 +9502,19 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
gGL.flush();
- glPushMatrix();
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
+ gGL.pushMatrix();
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.loadIdentity();
static const F32 clip_plane = 0.99999f;
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
gGL.color4ub(64,64,64,255);
gGL.begin(LLRender::QUADS);
gGL.vertex3f(-1, -1, clip_plane);
@@ -9614,9 +9524,14 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
gGL.end();
gGL.flush();
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
+
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
}
avatar->mImpostor.flush();
@@ -9630,10 +9545,10 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
sShadowRender = FALSE;
popRenderTypeMask();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.popMatrix();
avatar->mNeedsImpostorUpdate = FALSE;
avatar->cacheImpostorValues();
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index e9da25e544..8b6532ca25 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -72,7 +72,7 @@ BOOL compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn
bool LLRayAABB(const LLVector3 &center, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0);
BOOL setup_hud_matrices(); // use whole screen to render hud
BOOL setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking)
-glh::matrix4f glh_copy_matrix(GLdouble* src);
+glh::matrix4f glh_copy_matrix(F32* src);
glh::matrix4f glh_get_current_modelview();
void glh_set_current_modelview(const glh::matrix4f& mat);
glh::matrix4f glh_get_current_projection();
@@ -113,9 +113,11 @@ public:
void resetVertexBuffers();
void resizeScreenTexture();
void releaseGLBuffers();
+ void releaseScreenBuffers();
void createGLBuffers();
void allocateScreenBuffer(U32 resX, U32 resY);
+ bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples);
void allocatePhysicsBuffer();
void resetVertexBuffers(LLDrawable* drawable);
@@ -246,7 +248,7 @@ public:
void renderGeomDeferred(LLCamera& camera);
void renderGeomPostDeferred(LLCamera& camera);
void renderGeomShadow(LLCamera& camera);
- void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0, LLRenderTarget* gi_source = NULL, LLRenderTarget* last_gi_post = NULL, U32 noise_map = 0xFFFFFFFF);
+ void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0, U32 noise_map = 0xFFFFFFFF);
void setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep);
void unbindDeferredShader(LLGLSLShader& shader);
@@ -260,7 +262,6 @@ public:
void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader = TRUE, BOOL use_occlusion = TRUE);
- void generateGI(LLCamera& camera, LLVector3& lightDir, std::vector<LLVector3>& vpc);
void renderHighlights();
void renderDebug();
void renderPhysicsDisplay();
@@ -359,6 +360,9 @@ public:
static void updateRenderDeferred();
static void refreshRenderDeferred();
+ static void refreshCachedSettings();
+
+ static void throttleNewMemoryAllocation(BOOL disable);
void addDebugBlip(const LLVector3& position, const LLColor4& color);
@@ -434,7 +438,7 @@ public:
RENDER_DEBUG_VERIFY = 0x0000002,
RENDER_DEBUG_BBOXES = 0x0000004,
RENDER_DEBUG_OCTREE = 0x0000008,
- RENDER_DEBUG_PICKING = 0x0000010,
+ RENDER_DEBUG_WIND_VECTORS = 0x0000010,
RENDER_DEBUG_OCCLUSION = 0x0000020,
RENDER_DEBUG_POINTS = 0x0000040,
RENDER_DEBUG_TEXTURE_PRIORITY = 0x0000080,
@@ -457,6 +461,7 @@ public:
RENDER_DEBUG_PHYSICS_SHAPES = 0x1000000,
RENDER_DEBUG_NORMALS = 0x2000000,
RENDER_DEBUG_LOD_INFO = 0x4000000,
+ RENDER_DEBUG_RENDER_COMPLEXITY = 0x8000000
};
public:
@@ -515,8 +520,9 @@ public:
static BOOL sRenderAttachedLights;
static BOOL sRenderAttachedParticles;
static BOOL sRenderDeferred;
+ static BOOL sMemAllocationThrottled;
static S32 sVisibleLightCount;
- static F32 sMinRenderSize;
+ static F32 sMinRenderSize;
//screen texture
U32 mScreenWidth;
@@ -525,15 +531,16 @@ public:
LLRenderTarget mScreen;
LLRenderTarget mUIScreen;
LLRenderTarget mDeferredScreen;
+ LLRenderTarget mFXAABuffer;
LLRenderTarget mEdgeMap;
LLRenderTarget mDeferredDepth;
- LLRenderTarget mDeferredLight[3];
- LLRenderTarget mGIMap;
- LLRenderTarget mGIMapPost[2];
- LLRenderTarget mLuminanceMap;
+ LLRenderTarget mDeferredLight;
LLRenderTarget mHighlight;
LLRenderTarget mPhysicsDisplay;
+ //utility buffer for rendering post effects, gets abused by renderDeferredLighting
+ LLPointer<LLVertexBuffer> mDeferredVB;
+
//sun shadow map
LLRenderTarget mShadow[6];
std::vector<LLVector3> mShadowFrustPoints[4];
@@ -579,6 +586,7 @@ public:
LLColor4 mSunDiffuse;
LLVector3 mSunDir;
+ LLVector3 mTransformedSunDir;
BOOL mInitialized;
BOOL mVertexShadersEnabled;
@@ -764,6 +772,81 @@ public:
//debug use
static U32 sCurRenderPoolType ;
+
+ //cached settings
+ static BOOL WindLightUseAtmosShaders;
+ static BOOL VertexShaderEnable;
+ static BOOL RenderAvatarVP;
+ static BOOL RenderDeferred;
+ static F32 RenderDeferredSunWash;
+ static U32 RenderFSAASamples;
+ static U32 RenderResolutionDivisor;
+ static BOOL RenderUIBuffer;
+ static S32 RenderShadowDetail;
+ static BOOL RenderDeferredSSAO;
+ static F32 RenderShadowResolutionScale;
+ static BOOL RenderLocalLights;
+ static BOOL RenderDelayCreation;
+ static BOOL RenderAnimateRes;
+ static BOOL FreezeTime;
+ static S32 DebugBeaconLineWidth;
+ static F32 RenderHighlightBrightness;
+ static LLColor4 RenderHighlightColor;
+ static F32 RenderHighlightThickness;
+ static BOOL RenderSpotLightsInNondeferred;
+ static LLColor4 PreviewAmbientColor;
+ static LLColor4 PreviewDiffuse0;
+ static LLColor4 PreviewSpecular0;
+ static LLColor4 PreviewDiffuse1;
+ static LLColor4 PreviewSpecular1;
+ static LLColor4 PreviewDiffuse2;
+ static LLColor4 PreviewSpecular2;
+ static LLVector3 PreviewDirection0;
+ static LLVector3 PreviewDirection1;
+ static LLVector3 PreviewDirection2;
+ static F32 RenderGlowMinLuminance;
+ static F32 RenderGlowMaxExtractAlpha;
+ static F32 RenderGlowWarmthAmount;
+ static LLVector3 RenderGlowLumWeights;
+ static LLVector3 RenderGlowWarmthWeights;
+ static S32 RenderGlowResolutionPow;
+ static S32 RenderGlowIterations;
+ static F32 RenderGlowWidth;
+ static F32 RenderGlowStrength;
+ static BOOL RenderDepthOfField;
+ static F32 CameraFocusTransitionTime;
+ static F32 CameraFNumber;
+ static F32 CameraFocalLength;
+ static F32 CameraFieldOfView;
+ static F32 RenderShadowNoise;
+ static F32 RenderShadowBlurSize;
+ static F32 RenderSSAOScale;
+ static U32 RenderSSAOMaxScale;
+ static F32 RenderSSAOFactor;
+ static LLVector3 RenderSSAOEffect;
+ static F32 RenderShadowOffsetError;
+ static F32 RenderShadowBiasError;
+ static F32 RenderShadowOffset;
+ static F32 RenderShadowBias;
+ static F32 RenderSpotShadowOffset;
+ static F32 RenderSpotShadowBias;
+ static F32 RenderEdgeDepthCutoff;
+ static F32 RenderEdgeNormCutoff;
+ static LLVector3 RenderShadowGaussian;
+ static F32 RenderShadowBlurDistFactor;
+ static BOOL RenderDeferredAtmospheric;
+ static S32 RenderReflectionDetail;
+ static F32 RenderHighlightFadeTime;
+ static LLVector3 RenderShadowClipPlanes;
+ static LLVector3 RenderShadowOrthoClipPlanes;
+ static LLVector3 RenderShadowNearDist;
+ static F32 RenderFarClip;
+ static LLVector3 RenderShadowSplitExponent;
+ static F32 RenderShadowErrorCutoff;
+ static F32 RenderShadowFOVCutoff;
+ static BOOL CameraOffset;
+ static F32 CameraMaxCoF;
+ static F32 CameraDoFResScale;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
diff --git a/indra/newview/res-sdl/ll_icon.BMP b/indra/newview/res-sdl/ll_icon.BMP
deleted file mode 100644
index 6f9366df41..0000000000
--- a/indra/newview/res-sdl/ll_icon.BMP
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/ll_icon.BMP b/indra/newview/res/ll_icon.BMP
deleted file mode 100644
index 3a9964cd95..0000000000
--- a/indra/newview/res/ll_icon.BMP
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/ll_icon.ico b/indra/newview/res/ll_icon.ico
deleted file mode 100644
index 87985b9285..0000000000
--- a/indra/newview/res/ll_icon.ico
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/ll_icon.png b/indra/newview/res/ll_icon.png
deleted file mode 100644
index ae573b3874..0000000000
--- a/indra/newview/res/ll_icon.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index 38d04b4b5c..a53dece422 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -62,12 +62,12 @@ IDI_LCD_LL_ICON ICON "icon1.ico"
// Dialog
//
-SPLASHSCREEN DIALOG 32, 32, 144, 34
+SPLASHSCREEN DIALOG 32, 32, 264, 34
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
FONT 8, "MS Sans Serif"
BEGIN
ICON IDI_LL_ICON,IDC_STATIC,7,7,20,20
- LTEXT "Loading Second Life...",666,36,13,91,8
+ LTEXT "Loading Second Life...",666,36,13,211,8
END
@@ -82,7 +82,7 @@ BEGIN
"SPLASHSCREEN", DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 137
+ RIGHTMARGIN, 257
VERTGUIDE, 36
TOPMARGIN, 7
BOTTOMMARGIN, 27
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 76965ad14b..8baaa14595 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -30,9 +30,15 @@
name="LtGray"
value="0.75 0.75 0.75 1" />
<color
+ name="LtGray_35"
+ value="0.75 0.75 0.75 0.35" />
+ <color
name="LtGray_50"
value="0.75 0.75 0.75 0.50" />
<color
+ name="Gray"
+ value="0.5 0.5 0.5 1" />
+ <color
name="DkGray"
value="0.125 0.125 0.125 1" />
<color
@@ -84,6 +90,9 @@
name="LtYellow"
value="1 1 .79 1" />
<color
+ name="DrYellow"
+ value="1 0.86 0 1" />
+ <color
name="LtOrange"
value="1 .85 .73 1" />
<color
@@ -134,7 +143,7 @@
reference="AvatarListItemIconOfflineColor" />
<color
name="BadgeImageColor"
- value="0.44 0.69 0.56 1.0" />
+ value="1.0 0.40 0.0 1.0" />
<color
name="BadgeBorderColor"
value="0.9 0.9 0.9 1.0" />
@@ -197,7 +206,7 @@
reference="Black" />
<color
name="ColorPaletteEntry02"
- value="0.5 0.5 0.5 1" />
+ reference="Gray" />
<color
name="ColorPaletteEntry03"
value="0.5 0 0 1" />
@@ -424,11 +433,14 @@
name="InventoryItemLinkColor"
reference="LtGray_50" />
<color
+ name="InventoryMouseOverColor"
+ reference="LtGray_35" />
+ <color
name="InventorySearchStatusColor"
reference="EmphasisColor" />
<color
name="LabelDisabledColor"
- reference="White_25" />
+ reference="White_25" />
<color
name="LabelSelectedColor"
reference="White" />
@@ -508,6 +520,9 @@
name="MenuPopupBgColor"
reference="DkGray2" />
<color
+ name="ModelUploaderLabels"
+ value="1 0.6 0 1" />
+ <color
name="MultiSliderDisabledThumbColor"
reference="Black" />
<color
@@ -780,6 +795,10 @@
<color
name="DirectChatColor"
reference="LtOrange" />
+
+ <color
+ name="ToolbarDropZoneColor"
+ value=".48 .69 1 .5" />
<!-- Generic color names (legacy) -->
<color
diff --git a/indra/newview/skins/default/textures/arrow_keys.png b/indra/newview/skins/default/textures/arrow_keys.png
deleted file mode 100644
index f19af59251..0000000000
--- a/indra/newview/skins/default/textures/arrow_keys.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Pan_Over.png b/indra/newview/skins/default/textures/bottomtray/Cam_Pan_Over.png
deleted file mode 100644
index b5781718ec..0000000000
--- a/indra/newview/skins/default/textures/bottomtray/Cam_Pan_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/CameraView_Press.png b/indra/newview/skins/default/textures/bottomtray/CameraView_Press.png
deleted file mode 100644
index 5a9346fd39..0000000000
--- a/indra/newview/skins/default/textures/bottomtray/CameraView_Press.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png
deleted file mode 100644
index 20fa40e127..0000000000
--- a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Disabled.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png
deleted file mode 100644
index f1420e0002..0000000000
--- a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png b/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png
deleted file mode 100644
index 89a6269edc..0000000000
--- a/indra/newview/skins/default/textures/bottomtray/PanOrbit_Press.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1_Dark.png
new file mode 100644
index 0000000000..857fa1e047
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2_Dark.png
new file mode 100644
index 0000000000..453bb53673
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3_Dark.png
new file mode 100644
index 0000000000..135a66ca0d
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off_Dark.png
new file mode 100644
index 0000000000..a63aec5e6d
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On_Dark.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On_Dark.png
new file mode 100644
index 0000000000..1719eb3e84
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/checkerboard_transparency_bg.png b/indra/newview/skins/default/textures/checkerboard_transparency_bg.png
deleted file mode 100644
index 9a16935204..0000000000
--- a/indra/newview/skins/default/textures/checkerboard_transparency_bg.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/circle.tga b/indra/newview/skins/default/textures/circle.tga
deleted file mode 100644
index d7097e3a35..0000000000
--- a/indra/newview/skins/default/textures/circle.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png
deleted file mode 100644
index e47f913db1..0000000000
--- a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png
deleted file mode 100644
index e2c67de9c0..0000000000
--- a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png
deleted file mode 100644
index 295cd89a57..0000000000
--- a/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png
deleted file mode 100644
index 0758cbcf0d..0000000000
--- a/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png
deleted file mode 100644
index c2cbc2b1e5..0000000000
--- a/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/green_checkmark.png b/indra/newview/skins/default/textures/green_checkmark.png
new file mode 100644
index 0000000000..d2a5b348dc
--- /dev/null
+++ b/indra/newview/skins/default/textures/green_checkmark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icn_label_web.tga b/indra/newview/skins/default/textures/icn_label_web.tga
deleted file mode 100644
index 7c9131dfff..0000000000
--- a/indra/newview/skins/default/textures/icn_label_web.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icn_media.tga b/indra/newview/skins/default/textures/icn_media.tga
deleted file mode 100644
index 43dd342c9d..0000000000
--- a/indra/newview/skins/default/textures/icn_media.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icn_voice-groupfocus.tga b/indra/newview/skins/default/textures/icn_voice-groupfocus.tga
deleted file mode 100644
index 9f48d4609d..0000000000
--- a/indra/newview/skins/default/textures/icn_voice-groupfocus.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icn_voice-localchat.tga b/indra/newview/skins/default/textures/icn_voice-localchat.tga
deleted file mode 100644
index 7cf267eaf5..0000000000
--- a/indra/newview/skins/default/textures/icn_voice-localchat.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icn_voice-pvtfocus.tga b/indra/newview/skins/default/textures/icn_voice-pvtfocus.tga
deleted file mode 100644
index abadb09aaf..0000000000
--- a/indra/newview/skins/default/textures/icn_voice-pvtfocus.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_day_cycle.tga b/indra/newview/skins/default/textures/icon_day_cycle.tga
deleted file mode 100644
index 2d5dee1e94..0000000000
--- a/indra/newview/skins/default/textures/icon_day_cycle.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_event_adult.tga b/indra/newview/skins/default/textures/icon_event_adult.tga
deleted file mode 100644
index f548126e5a..0000000000
--- a/indra/newview/skins/default/textures/icon_event_adult.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_lock.tga b/indra/newview/skins/default/textures/icon_lock.tga
deleted file mode 100644
index 23521aa113..0000000000
--- a/indra/newview/skins/default/textures/icon_lock.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AddItem_Over.png b/indra/newview/skins/default/textures/icons/AddItem_Over.png
deleted file mode 100644
index cad6e8d52f..0000000000
--- a/indra/newview/skins/default/textures/icons/AddItem_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/BackArrow_Over.png b/indra/newview/skins/default/textures/icons/BackArrow_Over.png
deleted file mode 100644
index b36e03a8cf..0000000000
--- a/indra/newview/skins/default/textures/icons/BackArrow_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/DragHandle.png b/indra/newview/skins/default/textures/icons/DragHandle.png
deleted file mode 100644
index c3cbc07a33..0000000000
--- a/indra/newview/skins/default/textures/icons/DragHandle.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Generic_Object.png b/indra/newview/skins/default/textures/icons/Generic_Object.png
deleted file mode 100644
index e3a80b2aef..0000000000
--- a/indra/newview/skins/default/textures/icons/Generic_Object.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Gift.png b/indra/newview/skins/default/textures/icons/Inv_Gift.png
deleted file mode 100644
index 5afe85d72d..0000000000
--- a/indra/newview/skins/default/textures/icons/Inv_Gift.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png
deleted file mode 100644
index fcabd4c6d3..0000000000
--- a/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.png b/indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.png
deleted file mode 100644
index 0e60b417b0..0000000000
--- a/indra/newview/skins/default/textures/icons/OutboxPush_On_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Damage_Light_Alt.png b/indra/newview/skins/default/textures/icons/Parcel_Damage_Light_Alt.png
deleted file mode 100644
index d72f02f708..0000000000
--- a/indra/newview/skins/default/textures/icons/Parcel_Damage_Light_Alt.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.png b/indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.png
deleted file mode 100644
index f82354959e..0000000000
--- a/indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Over.png b/indra/newview/skins/default/textures/icons/TrashItem_Over.png
deleted file mode 100644
index 1a0eea6c67..0000000000
--- a/indra/newview/skins/default/textures/icons/TrashItem_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/parcel_color_EVRY.png b/indra/newview/skins/default/textures/icons/parcel_color_EVRY.png
deleted file mode 100644
index b5508423eb..0000000000
--- a/indra/newview/skins/default/textures/icons/parcel_color_EVRY.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/parcel_color_EXP.png b/indra/newview/skins/default/textures/icons/parcel_color_EXP.png
deleted file mode 100644
index 4813d37198..0000000000
--- a/indra/newview/skins/default/textures/icons/parcel_color_EXP.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/parcel_color_M.png b/indra/newview/skins/default/textures/icons/parcel_color_M.png
deleted file mode 100644
index 41984c43e4..0000000000
--- a/indra/newview/skins/default/textures/icons/parcel_color_M.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/image_edit_icon.tga b/indra/newview/skins/default/textures/image_edit_icon.tga
deleted file mode 100644
index 8666f0bbe6..0000000000
--- a/indra/newview/skins/default/textures/image_edit_icon.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/inv_folder_animation.tga b/indra/newview/skins/default/textures/inv_folder_animation.tga
deleted file mode 100644
index 1b4df7a2d8..0000000000
--- a/indra/newview/skins/default/textures/inv_folder_animation.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/inv_folder_inbox.tga b/indra/newview/skins/default/textures/inv_folder_inbox.tga
deleted file mode 100644
index 04539c2cc4..0000000000
--- a/indra/newview/skins/default/textures/inv_folder_inbox.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/map_avatar_above_8.tga b/indra/newview/skins/default/textures/map_avatar_above_8.tga
deleted file mode 100644
index 193428e530..0000000000
--- a/indra/newview/skins/default/textures/map_avatar_above_8.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/map_avatar_below_8.tga b/indra/newview/skins/default/textures/map_avatar_below_8.tga
deleted file mode 100644
index 9e14bfab90..0000000000
--- a/indra/newview/skins/default/textures/map_avatar_below_8.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/map_event_adult.tga b/indra/newview/skins/default/textures/map_event_adult.tga
deleted file mode 100644
index f548126e5a..0000000000
--- a/indra/newview/skins/default/textures/map_event_adult.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/map_event_mature.tga b/indra/newview/skins/default/textures/map_event_mature.tga
deleted file mode 100644
index 71067c0dfd..0000000000
--- a/indra/newview/skins/default/textures/map_event_mature.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/map_track_8.tga b/indra/newview/skins/default/textures/map_track_8.tga
deleted file mode 100644
index 53425ff45b..0000000000
--- a/indra/newview/skins/default/textures/map_track_8.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/mute_icon.tga b/indra/newview/skins/default/textures/mute_icon.tga
deleted file mode 100644
index 879b9e6188..0000000000
--- a/indra/newview/skins/default/textures/mute_icon.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png b/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png
deleted file mode 100644
index a91b74819f..0000000000
--- a/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png b/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png
deleted file mode 100644
index a2caf227a7..0000000000
--- a/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Help_Over.png b/indra/newview/skins/default/textures/navbar/Help_Over.png
deleted file mode 100644
index b9bc0d0f87..0000000000
--- a/indra/newview/skins/default/textures/navbar/Help_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Home_Over.png b/indra/newview/skins/default/textures/navbar/Home_Over.png
deleted file mode 100644
index d9c6b3842e..0000000000
--- a/indra/newview/skins/default/textures/navbar/Home_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/separator.png b/indra/newview/skins/default/textures/navbar/separator.png
new file mode 100644
index 0000000000..b93e5791a7
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/separator.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/places_rating_adult.tga b/indra/newview/skins/default/textures/places_rating_adult.tga
deleted file mode 100644
index c344fb1e78..0000000000
--- a/indra/newview/skins/default/textures/places_rating_adult.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/places_rating_mature.tga b/indra/newview/skins/default/textures/places_rating_mature.tga
deleted file mode 100644
index 61c879bc92..0000000000
--- a/indra/newview/skins/default/textures/places_rating_mature.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/places_rating_pg.tga b/indra/newview/skins/default/textures/places_rating_pg.tga
deleted file mode 100644
index 7805dbce60..0000000000
--- a/indra/newview/skins/default/textures/places_rating_pg.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/propertyline.tga b/indra/newview/skins/default/textures/propertyline.tga
deleted file mode 100644
index 0c504eea71..0000000000
--- a/indra/newview/skins/default/textures/propertyline.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/avatar_free_mode.png b/indra/newview/skins/default/textures/quick_tips/avatar_free_mode.png
deleted file mode 100644
index be7c87efb6..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/avatar_free_mode.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/camera_free_mode.png b/indra/newview/skins/default/textures/quick_tips/camera_free_mode.png
deleted file mode 100644
index 9a3f3703b2..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/camera_free_mode.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/camera_orbit_mode.png b/indra/newview/skins/default/textures/quick_tips/camera_orbit_mode.png
deleted file mode 100644
index dd72cc0162..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/camera_orbit_mode.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/camera_pan_mode.png b/indra/newview/skins/default/textures/quick_tips/camera_pan_mode.png
deleted file mode 100644
index b537dcbe46..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/camera_pan_mode.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/camera_preset_front_view.png b/indra/newview/skins/default/textures/quick_tips/camera_preset_front_view.png
deleted file mode 100644
index 7674a75ac3..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/camera_preset_front_view.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/camera_preset_group_view.png b/indra/newview/skins/default/textures/quick_tips/camera_preset_group_view.png
deleted file mode 100644
index 9c9b923a5a..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/camera_preset_group_view.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/camera_preset_rear_view.png b/indra/newview/skins/default/textures/quick_tips/camera_preset_rear_view.png
deleted file mode 100644
index 15c3053491..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/camera_preset_rear_view.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/move_fly_first.png b/indra/newview/skins/default/textures/quick_tips/move_fly_first.png
deleted file mode 100644
index b6e2ce60e4..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/move_fly_first.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/move_fly_second.png b/indra/newview/skins/default/textures/quick_tips/move_fly_second.png
deleted file mode 100644
index 84b63cc338..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/move_fly_second.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/move_run_first.png b/indra/newview/skins/default/textures/quick_tips/move_run_first.png
deleted file mode 100644
index 16093dc683..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/move_run_first.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/move_run_second.png b/indra/newview/skins/default/textures/quick_tips/move_run_second.png
deleted file mode 100644
index 19fa43ec32..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/move_run_second.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/move_walk_first.png b/indra/newview/skins/default/textures/quick_tips/move_walk_first.png
deleted file mode 100644
index 92d120d53e..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/move_walk_first.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/quick_tips/move_walk_second.png b/indra/newview/skins/default/textures/quick_tips/move_walk_second.png
deleted file mode 100644
index f8e28722be..0000000000
--- a/indra/newview/skins/default/textures/quick_tips/move_walk_second.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/red_x.png b/indra/newview/skins/default/textures/red_x.png
new file mode 100644
index 0000000000..a61202f09b
--- /dev/null
+++ b/indra/newview/skins/default/textures/red_x.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/show_btn.tga b/indra/newview/skins/default/textures/show_btn.tga
deleted file mode 100644
index 5f05f377e3..0000000000
--- a/indra/newview/skins/default/textures/show_btn.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/show_btn_selected.tga b/indra/newview/skins/default/textures/show_btn_selected.tga
deleted file mode 100644
index 00a2f34a37..0000000000
--- a/indra/newview/skins/default/textures/show_btn_selected.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/smicon_warn.tga b/indra/newview/skins/default/textures/smicon_warn.tga
deleted file mode 100644
index 90ccaa07e5..0000000000
--- a/indra/newview/skins/default/textures/smicon_warn.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/snapshot_download.png b/indra/newview/skins/default/textures/snapshot_download.png
new file mode 100644
index 0000000000..6aa1abded5
--- /dev/null
+++ b/indra/newview/skins/default/textures/snapshot_download.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/snapshot_email.png b/indra/newview/skins/default/textures/snapshot_email.png
new file mode 100644
index 0000000000..dee784a9bf
--- /dev/null
+++ b/indra/newview/skins/default/textures/snapshot_email.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/spacer35.tga b/indra/newview/skins/default/textures/spacer35.tga
deleted file mode 100644
index b88bc6680a..0000000000
--- a/indra/newview/skins/default/textures/spacer35.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/square_btn_32x128.tga b/indra/newview/skins/default/textures/square_btn_32x128.tga
deleted file mode 100644
index d7ce58dac3..0000000000
--- a/indra/newview/skins/default/textures/square_btn_32x128.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/square_btn_selected_32x128.tga b/indra/newview/skins/default/textures/square_btn_selected_32x128.tga
deleted file mode 100644
index 59ca365aa4..0000000000
--- a/indra/newview/skins/default/textures/square_btn_selected_32x128.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/startup_logo.j2c b/indra/newview/skins/default/textures/startup_logo.j2c
deleted file mode 100644
index d1b991f17f..0000000000
--- a/indra/newview/skins/default/textures/startup_logo.j2c
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/status_busy.tga b/indra/newview/skins/default/textures/status_busy.tga
deleted file mode 100644
index 7743d9c7bb..0000000000
--- a/indra/newview/skins/default/textures/status_busy.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.png
deleted file mode 100644
index 0b91abfb0d..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.png
deleted file mode 100644
index 33a47236a5..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png
deleted file mode 100644
index 421f5e1705..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png
deleted file mode 100644
index 905d4c973e..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png
deleted file mode 100644
index 909f0d0a47..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Large.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Large.png
deleted file mode 100644
index cc505c4a30..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Large.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png
deleted file mode 100644
index 8e0fb9661e..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png
deleted file mode 100644
index d4ac451c8e..0000000000
--- a/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 799cd907dc..8702ebde2a 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -39,7 +39,7 @@ with the same filename but different name
<texture name="Accordion_Over" file_name="containers/Accordion_Over.png" preload="false" />
<texture name="Accordion_Selected" file_name="containers/Accordion_Selected.png" preload="false" />
-<texture name="Activate_Checkmark" file_name="taskpanel/Activate_Checkmark.png" preload="false" />
+ <texture name="Activate_Checkmark" file_name="taskpanel/Activate_Checkmark.png" preload="false" />
<texture name="AddItem_Disabled" file_name="icons/AddItem_Disabled.png" preload="false" />
<texture name="AddItem_Off" file_name="icons/AddItem_Off.png" preload="false" />
@@ -48,9 +48,6 @@ with the same filename but different name
<texture name="Arrow_Left_Off" file_name="navbar/Arrow_Left_Off.png" preload="true" />
<texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true" />
-<!--
--->
-
<texture name="Arrow_Small_Up" file_name="widgets/Arrow_Small_Up.png" preload="true" />
<texture name="Arrow_Small_Left" file_name="widgets/Arrow_Small_Left.png" preload="true" />
<texture name="Arrow_Small_Right" file_name="widgets/Arrow_Small_Right.png" preload="true" />
@@ -72,6 +69,10 @@ with the same filename but different name
<texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" />
<texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" scale.left="22" scale.top="12" scale.right="25" scale.bottom="12" />
+ <texture name="Error_Tag_Background" file_name="widgets/Error_Tag_Background.png" preload="true" scale.left="12" scale.top="2" scale.right="36" scale.bottom="2" />
+ <texture name="New_Tag_Background" file_name="widgets/New_Tag_Background.png" preload="true" scale.left="12" scale.top="2" scale.right="36" scale.bottom="2" />
+ <texture name="New_Tag_Border" file_name="widgets/New_Tag_Border.png" preload="true" scale.left="12" scale.top="2" scale.right="36" scale.bottom="2" />
+
<texture name="Badge_Background" file_name="widgets/Badge_Background.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="Badge_Border" file_name="widgets/Badge_Border.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
@@ -119,12 +120,40 @@ with the same filename but different name
<texture name="Checkbox_On" file_name="widgets/Checkbox_On.png" preload="true" />
<texture name="Checkbox_On_Press" file_name="widgets/Checkbox_On_Press.png" preload="true" />
<texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" />
- <texture name="Check_Mark" file_name="icons/check_mark" preload="true" />
+ <texture name="Check_Mark" file_name="icons/check_mark.png" preload="true" />
+
+ <texture name="Command_AboutLand_Icon" file_name="toolbar_icons/land.png" preload="true" />
+ <texture name="Command_Appearance_Icon" file_name="toolbar_icons/appearance.png" preload="true" />
+ <texture name="Command_Avatar_Icon" file_name="toolbar_icons/avatars.png" preload="true" />
+ <texture name="Command_Build_Icon" file_name="toolbar_icons/build.png" preload="true" />
+ <texture name="Command_Chat_Icon" file_name="toolbar_icons/chat.png" preload="true" />
+ <texture name="Command_Compass_Icon" file_name="toolbar_icons/land.png" preload="true" />
+ <texture name="Command_Destinations_Icon" file_name="toolbar_icons/destinations.png" preload="true" />
+ <texture name="Command_Gestures_Icon" file_name="toolbar_icons/gestures.png" preload="true" />
+ <texture name="Command_HowTo_Icon" file_name="toolbar_icons/howto.png" preload="true" />
+ <texture name="Command_Inventory_Icon" file_name="toolbar_icons/inventory.png" preload="true" />
+ <texture name="Command_Map_Icon" file_name="toolbar_icons/map.png" preload="true" />
+ <texture name="Command_Marketplace_Icon" file_name="toolbar_icons/marketplace.png" preload="true" />
+ <texture name="Command_MiniCart_Icon" file_name="toolbar_icons/mini_cart.png" preload="true" />
+ <texture name="Command_MiniMap_Icon" file_name="toolbar_icons/mini_map.png" preload="true" />
+ <texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" />
+ <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" />
+ <texture name="Command_Picks_Icon" file_name="toolbar_icons/picks.png" preload="true" />
+ <texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" />
+ <texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" />
+ <texture name="Command_Profile_Icon" file_name="toolbar_icons/profile.png" preload="true" />
+ <texture name="Command_Search_Icon" file_name="toolbar_icons/search.png" preload="true" />
+ <texture name="Command_Snapshot_Icon" file_name="toolbar_icons/snapshot.png" preload="true" />
+ <texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" />
+ <texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" />
+ <texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" />
+ <texture name="Caret_Bottom_Icon" file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" />
+ <texture name="Caret_Right_Icon" file_name="toolbar_icons/caret_right.png" preload="true" scale.left="5" scale.top="15" scale.right="28" scale.bottom="1" />
+ <texture name="Caret_Left_Icon" file_name="toolbar_icons/caret_left.png" preload="true" scale.left="1" scale.top="15" scale.right="23" scale.bottom="1" />
<texture name="ComboButton_Disabled" file_name="widgets/ComboButton_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_UpSelected" file_name="widgets/ComboButton_UpSelected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
- <texture name="ComboButton_Up_On_Selected" file_name="widgets/ComboButton_Up_On_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_On" file_name="widgets/ComboButton_On.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
@@ -157,6 +186,10 @@ with the same filename but different name
<texture name="Flag" file_name="navbar/Flag.png" preload="false" />
+ <texture name="Flyout_Left" file_name="windows/Flyout_Left.png" preload="false" />
+ <texture name="Flyout_Pointer" file_name="windows/Flyout_Pointer.png" preload="false" />
+ <texture name="Flyout_Right" file_name="windows/Flyout_Right.png" preload="false" />
+
<texture name="Folder_Arrow" file_name="folder_arrow.tga" preload="false" />
<texture name="ForSale_Badge" file_name="icons/ForSale_Badge.png" preload="false" />
<texture name="ForwardArrow_Off" file_name="icons/ForwardArrow_Off.png" preload="false" />
@@ -279,9 +312,9 @@ with the same filename but different name
<texture name="menu_separator" file_name="navbar/FileMenu_Divider.png" scale.left="4" scale.top="166" scale.right="0" scale.bottom="0" />
- <texture name="ModelImport_Status_Good" file_name="lag_status_good.tga" preload="false"/>
+ <texture name="ModelImport_Status_Good" file_name="green_checkmark.png" preload="false"/>
<texture name="ModelImport_Status_Warning" file_name="lag_status_warning.tga" preload="false"/>
- <texture name="ModelImport_Status_Error" file_name="lag_status_critical.tga" preload="false"/>
+ <texture name="ModelImport_Status_Error" file_name="red_x.png" preload="false"/>
<texture name="MouseLook_View_Off" file_name="bottomtray/MouseLook_view_off.png" preload="false" />
<texture name="MouseLook_View_On" file_name="bottomtray/MouseLook_view_on.png" preload="false" />
@@ -428,6 +461,7 @@ with the same filename but different name
<texture name="PushButton_Off" file_name="widgets/PushButton_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="PushButton_On" file_name="widgets/PushButton_On.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="PushButton_On_Selected" file_name="widgets/PushButton_On_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+ <texture name="PushButton_Over" file_name="widgets/PushButton_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="PushButton_Press" file_name="widgets/PushButton_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="PushButton_Selected" file_name="widgets/PushButton_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="PushButton_Selected_Press" file_name="widgets/PushButton_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
@@ -445,7 +479,11 @@ with the same filename but different name
<texture name="Resize_Corner" file_name="windows/Resize_Corner.png" preload="true" />
- <texture name="Rounded_Rect" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="24" scale.right="58" scale.bottom="6" />
+ <texture name="Rounded_Rect" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="26" scale.right="58" scale.bottom="6" />
+ <texture name="Rounded_Rect_Top" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="8" scale.right="58" scale.bottom="0" clip.left="0" clip.right="64" clip.bottom="16" clip.top="32" />
+ <texture name="Rounded_Rect_Bottom" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="16" scale.right="58" scale.bottom="8" clip.left="0" clip.right="64" clip.bottom="0" clip.top="16" />
+ <texture name="Rounded_Rect_Left" file_name="Rounded_Rect.png" preload="true" scale.left="6" scale.top="26" scale.right="32" scale.bottom="6" clip.left="0" clip.right="32" clip.bottom="0" clip.top="32" />
+ <texture name="Rounded_Rect_Right" file_name="Rounded_Rect.png" preload="true" scale.left="0" scale.top="26" scale.right="26" scale.bottom="6" clip.left="32" clip.right="64" clip.bottom="0" clip.top="32" />
<texture name="Rounded_Square" file_name="rounded_square.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
<texture name="Row_Selection" file_name="navbar/Row_Selection.png" preload="false" />
@@ -509,6 +547,10 @@ with the same filename but different name
<texture name="Unknown_Icon" file_name="icons/unknown_icon.png" preload="true" />
<texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="Snapshot_Download" file_name="snapshot_download.png" preload="false" />
+ <texture name="Snapshot_Email" file_name="snapshot_email.png" preload="false" />
+ <texture name="Snapshot_Inventory" file_name="toolbar_icons/inventory.png" preload="false" />
+ <texture name="Snapshot_Profile" file_name="toolbar_icons/profile.png" preload="false" />
<texture name="startup_logo" file_name="windows/startup_logo.png" preload="true" />
@@ -530,21 +572,13 @@ with the same filename but different name
<texture name="Sync_Progress_5" file_name="icons/Sync_Progress_5.png" preload="true" />
<texture name="Sync_Progress_6" file_name="icons/Sync_Progress_6.png" preload="true" />
- <texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" />
- <texture name="TabIcon_Appearance_Selected" file_name="taskpanel/TabIcon_Appearance_Selected.png" preload="false" />
<texture name="TabIcon_Close_Off" file_name="taskpanel/TabIcon_Close_Off.png" preload="false" />
- <texture name="TabIcon_Home_Off" file_name="taskpanel/TabIcon_Home_Off.png" preload="false" />
<texture name="TabIcon_Home_Selected" file_name="taskpanel/TabIcon_Home_Selected.png" preload="false" />
<texture name="TabIcon_Me_Off" file_name="taskpanel/TabIcon_Me_Off.png" preload="false" />
- <texture name="TabIcon_Me_Selected" file_name="taskpanel/TabIcon_Me_Selected.png" preload="false" />
<texture name="TabIcon_Open_Off" file_name="taskpanel/TabIcon_Open_Off.png" preload="false" />
<texture name="TabIcon_People_Off" file_name="taskpanel/TabIcon_People_Off.png" preload="false" />
- <texture name="TabIcon_People_Selected" file_name="taskpanel/TabIcon_People_Selected.png" preload="false" />
- <texture name="TabIcon_Places_Large" file_name="taskpanel/TabIcon_Places_Large.png" preload="false" />
<texture name="TabIcon_Places_Off" file_name="taskpanel/TabIcon_Places_Off.png" preload="false" />
- <texture name="TabIcon_Places_Selected" file_name="taskpanel/TabIcon_Places_Selected.png" preload="false" />
<texture name="TabIcon_Things_Off" file_name="taskpanel/TabIcon_Things_Off.png" preload="false" />
- <texture name="TabIcon_Things_Selected" file_name="taskpanel/TabIcon_Things_Selected.png" preload="false" />
<texture name="TabTop_Right_Off" file_name="containers/TabTop_Right_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
<texture name="TabTop_Right_Selected" file_name="containers/TabTop_Right_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" />
@@ -608,6 +642,12 @@ with the same filename but different name
<texture name="VoicePTT_Lvl3" file_name="bottomtray/VoicePTT_Lvl3.png" preload="false" />
<texture name="VoicePTT_Off" file_name="bottomtray/VoicePTT_Off.png" preload="false" />
<texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" />
+
+ <texture name="VoicePTT_Lvl1_Dark" file_name="bottomtray/VoicePTT_Lvl1_Dark.png" preload="false" />
+ <texture name="VoicePTT_Lvl2_Dark" file_name="bottomtray/VoicePTT_Lvl2_Dark.png" preload="false" />
+ <texture name="VoicePTT_Lvl3_Dark" file_name="bottomtray/VoicePTT_Lvl3_Dark.png" preload="false" />
+ <texture name="VoicePTT_Off_Dark" file_name="bottomtray/VoicePTT_Off_Dark.png" preload="false" />
+ <texture name="VoicePTT_On_Dark" file_name="bottomtray/VoicePTT_On_Dark.png" preload="false" />
<texture name="Wearables_Divider" file_name="windows/Wearables_Divider.png" preload="false" />
@@ -640,9 +680,6 @@ with the same filename but different name
<!--WARNING OLD ART BELOW *do not use*-->
<texture name="icn_media_web.tga" preload="true" />
<texture name="icn_media_movie.tga" preload="true" />
- <texture name="icn_voice-localchat.tga" />
- <texture name="icn_voice-groupfocus.tga" />
- <texture name="icn_voice-pvtfocus.tga" />
<texture name="jump_left_out.tga" file_name="widgets/jump_left_out.png" />
<texture name="jump_left_in.tga" file_name="widgets/jump_left_in.png" />
@@ -676,7 +713,6 @@ with the same filename but different name
<texture name="icon_avatar_offline.tga" />
<texture name="icon_avatar_online.tga" />
- <texture name="icon_day_cycle.tga" />
<texture name="icon_diurnal.tga" />
<texture name="icon_for_sale.tga" file_name="icons/Icon_For_Sale.png" />
<texture name="icon_top_pick.tga" />
@@ -693,7 +729,6 @@ with the same filename but different name
<texture name="map_avatar_16.tga" />
<texture name="map_avatar_8.tga" />
<texture name="map_event.tga" />
- <texture name="map_event_mature.tga" />
<texture name="map_home.tga" />
<texture name="map_infohub.tga" />
<texture name="map_telehub.tga" />
@@ -733,4 +768,5 @@ with the same filename but different name
<texture name="Yellow_Gradient" file_name="windows/yellow_gradient.png"/>
<texture name="Popup_Caution" file_name="icons/pop_up_caution.png"/>
<texture name="Camera_Drag_Dot" file_name="world/CameraDragDot.png"/>
+ <texture name="NavBar Separator" file_name="navbar/separator.png"/>
</textures>
diff --git a/indra/newview/skins/default/textures/toolbar_icons/appearance.png b/indra/newview/skins/default/textures/toolbar_icons/appearance.png
new file mode 100644
index 0000000000..e6b1365388
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/appearance.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/avatars.png b/indra/newview/skins/default/textures/toolbar_icons/avatars.png
new file mode 100644
index 0000000000..8fa0600cee
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/avatars.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/build.png b/indra/newview/skins/default/textures/toolbar_icons/build.png
new file mode 100644
index 0000000000..e21ab3f0e4
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/build.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png
new file mode 100644
index 0000000000..5f6a01eaa1
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_left.png b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png
new file mode 100644
index 0000000000..0b8090314c
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_right.png b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png
new file mode 100644
index 0000000000..044751560f
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/chat.png b/indra/newview/skins/default/textures/toolbar_icons/chat.png
new file mode 100644
index 0000000000..e0dbac495f
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/chat.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/destinations.png b/indra/newview/skins/default/textures/toolbar_icons/destinations.png
new file mode 100644
index 0000000000..e2325f083a
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/destinations.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/gestures.png b/indra/newview/skins/default/textures/toolbar_icons/gestures.png
new file mode 100644
index 0000000000..2404bb4e25
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/gestures.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/howto.png b/indra/newview/skins/default/textures/toolbar_icons/howto.png
new file mode 100644
index 0000000000..8594d71113
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/howto.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/inventory.png b/indra/newview/skins/default/textures/toolbar_icons/inventory.png
new file mode 100644
index 0000000000..ab3191255e
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/inventory.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/land.png b/indra/newview/skins/default/textures/toolbar_icons/land.png
new file mode 100644
index 0000000000..89ea7604a4
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/land.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/map.png b/indra/newview/skins/default/textures/toolbar_icons/map.png
new file mode 100644
index 0000000000..ed1049b7db
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/map.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/marketplace.png b/indra/newview/skins/default/textures/toolbar_icons/marketplace.png
new file mode 100644
index 0000000000..62bad20be6
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/marketplace.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/model_wizard/divider_line.png b/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png
index 76c9e68767..9fcf46794d 100644
--- a/indra/newview/skins/default/textures/model_wizard/divider_line.png
+++ b/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/mini_map.png b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png
new file mode 100644
index 0000000000..ab0a654056
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/move.png b/indra/newview/skins/default/textures/toolbar_icons/move.png
new file mode 100644
index 0000000000..5c2ced7375
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/move.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png
new file mode 100644
index 0000000000..77a7cd5f44
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/people.png b/indra/newview/skins/default/textures/toolbar_icons/people.png
new file mode 100644
index 0000000000..7228ae8e2f
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/people.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/picks.png b/indra/newview/skins/default/textures/toolbar_icons/picks.png
new file mode 100644
index 0000000000..befda04b42
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/picks.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/places.png b/indra/newview/skins/default/textures/toolbar_icons/places.png
new file mode 100644
index 0000000000..97d9fa066c
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/places.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/preferences.png b/indra/newview/skins/default/textures/toolbar_icons/preferences.png
new file mode 100644
index 0000000000..4ccd7b8ae1
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/preferences.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/profile.png b/indra/newview/skins/default/textures/toolbar_icons/profile.png
new file mode 100644
index 0000000000..32fe2bf8ac
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/profile.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/search.png b/indra/newview/skins/default/textures/toolbar_icons/search.png
new file mode 100644
index 0000000000..bcb11e950d
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/search.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/snapshot.png b/indra/newview/skins/default/textures/toolbar_icons/snapshot.png
new file mode 100644
index 0000000000..d26da9b1d2
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/snapshot.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/speak.png b/indra/newview/skins/default/textures/toolbar_icons/speak.png
new file mode 100644
index 0000000000..10cd354c5c
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/speak.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/toolbar_icons/view.png b/indra/newview/skins/default/textures/toolbar_icons/view.png
new file mode 100644
index 0000000000..ddf0df7c26
--- /dev/null
+++ b/indra/newview/skins/default/textures/toolbar_icons/view.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png
deleted file mode 100644
index bc504d130e..0000000000
--- a/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Over.png b/indra/newview/skins/default/textures/widgets/Checkbox_Over.png
deleted file mode 100644
index 5a7162addf..0000000000
--- a/indra/newview/skins/default/textures/widgets/Checkbox_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Up_On_Selected.png b/indra/newview/skins/default/textures/widgets/ComboButton_Up_On_Selected.png
deleted file mode 100644
index fd1d11dd0b..0000000000
--- a/indra/newview/skins/default/textures/widgets/ComboButton_Up_On_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png
deleted file mode 100644
index 45bcb0464e..0000000000
--- a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png
deleted file mode 100644
index dabbd85b34..0000000000
--- a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Error_Tag_Background.png b/indra/newview/skins/default/textures/widgets/Error_Tag_Background.png
new file mode 100644
index 0000000000..c8dbc8e87a
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Error_Tag_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/New_Tag_Background.png b/indra/newview/skins/default/textures/widgets/New_Tag_Background.png
new file mode 100644
index 0000000000..cd639dd80f
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/New_Tag_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/New_Tag_Border.png b/indra/newview/skins/default/textures/widgets/New_Tag_Border.png
new file mode 100644
index 0000000000..56df0d0127
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/New_Tag_Border.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png
deleted file mode 100644
index 064a4c4f7f..0000000000
--- a/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png
deleted file mode 100644
index 064a4c4f7f..0000000000
--- a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png
deleted file mode 100644
index 3e7d803a28..0000000000
--- a/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Over.png b/indra/newview/skins/default/textures/widgets/RadioButton_Over.png
deleted file mode 100644
index a5c8cbe293..0000000000
--- a/indra/newview/skins/default/textures/widgets/RadioButton_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png
deleted file mode 100644
index 605d159eaa..0000000000
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png
deleted file mode 100644
index c79547dffd..0000000000
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png
deleted file mode 100644
index e353542ad9..0000000000
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png
deleted file mode 100644
index dd2fceb716..0000000000
--- a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png
deleted file mode 100644
index cf78ea3924..0000000000
--- a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png
deleted file mode 100644
index 53587197da..0000000000
--- a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png
deleted file mode 100644
index 7afb9c99c3..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png
deleted file mode 100644
index 77c4224539..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png
deleted file mode 100644
index 8b93dd551e..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png
deleted file mode 100644
index 3f207cbea2..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png
deleted file mode 100644
index 220df9db25..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png
deleted file mode 100644
index 5bbcdcb0b4..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png
deleted file mode 100644
index dde367f05e..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png
deleted file mode 100644
index d4f30b9adb..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png
deleted file mode 100644
index 5bbcdcb0b4..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png
deleted file mode 100644
index 467c43fc90..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png
deleted file mode 100644
index 2049736897..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png
deleted file mode 100644
index 2049736897..0000000000
--- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png
deleted file mode 100644
index b6f900d3bd..0000000000
--- a/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png
deleted file mode 100644
index 01e0a2d9f1..0000000000
--- a/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png
deleted file mode 100644
index 2ce84ea5be..0000000000
--- a/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout.png b/indra/newview/skins/default/textures/windows/Flyout.png
deleted file mode 100644
index 5596b194c9..0000000000
--- a/indra/newview/skins/default/textures/windows/Flyout.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Left.png b/indra/newview/skins/default/textures/windows/Flyout_Left.png
new file mode 100644
index 0000000000..6ac9fe2efd
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Flyout_Left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Pointer_Up.png b/indra/newview/skins/default/textures/windows/Flyout_Pointer_Up.png
deleted file mode 100644
index 361fab59e0..0000000000
--- a/indra/newview/skins/default/textures/windows/Flyout_Pointer_Up.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Right.png b/indra/newview/skins/default/textures/windows/Flyout_Right.png
new file mode 100644
index 0000000000..aa1f0625aa
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Flyout_Right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png
deleted file mode 100644
index 67bd399358..0000000000
--- a/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png b/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png
deleted file mode 100644
index 3ab8c3666a..0000000000
--- a/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/xui/da/floater_camera.xml b/indra/newview/skins/default/xui/da/floater_camera.xml
index 5b7ef6db54..b5d5e8bc08 100644
--- a/indra/newview/skins/default/xui/da/floater_camera.xml
+++ b/indra/newview/skins/default/xui/da/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Flyt kamera op og ned, til venstre og højre
</floater.string>
- <floater.string name="camera_modes_title">
- Kamera valg
- </floater.string>
- <floater.string name="pan_mode_title">
- Kredsløb zoom panorering
- </floater.string>
- <floater.string name="presets_mode_title">
- Forvalg
- </floater.string>
<floater.string name="free_mode_title">
Se objekt
</floater.string>
diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml
index 3ccdfc036a..cf6f1ccdd9 100644
--- a/indra/newview/skins/default/xui/da/notifications.xml
+++ b/indra/newview/skins/default/xui/da/notifications.xml
@@ -438,7 +438,7 @@ Tilbyd venskab til [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Ønsker du at fjerne [NAME] fra din venneliste?
+ Ønsker du at fjerne &lt;nolink&gt;[NAME]&lt;/nolink&gt; fra din venneliste?
</notification>
<notification name="ConfirmItemDeleteHasLinks">
Mindst en af genstandene har lænkede genstande der peger på den. Hvis du sletter denne genstand, vil lænkninger ikke virke mere. Det anbefales kraftigt at fjerne lænkninger først.
@@ -1023,10 +1023,10 @@ Henvis til dette fra en hjemmeside for at give andre nem adgang til denne lokati
Erstattet manglende tøj/kropsdele med standard.
</notification>
<notification name="FriendOnline">
- [NAME] er logget på
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; er logget på
</notification>
<notification name="FriendOffline">
- [NAME] er logget af
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; er logget af
</notification>
<notification name="AddSelfFriend">
Selvom du nok er meget sød, kan du ikke tilføje dig selv som ven.
@@ -1404,10 +1404,10 @@ Prøv igen om lidt.
(Som udgangspunkt, vil du være i stand til at se den andens online status)
</notification>
<notification name="FriendshipAccepted">
- [NAME] accepterede dit tilbud om venskab.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; accepterede dit tilbud om venskab.
</notification>
<notification name="FriendshipDeclined">
- [NAME] afviste dit tilbud om venskab.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; afviste dit tilbud om venskab.
</notification>
<notification name="FriendshipAcceptedByMe">
Tilbud om venskab accepteret.
diff --git a/indra/newview/skins/default/xui/da/panel_my_profile.xml b/indra/newview/skins/default/xui/da/panel_my_profile.xml
deleted file mode 100644
index 94da58389f..0000000000
--- a/indra/newview/skins/default/xui/da/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Ingen"/>
- <string name="no_group_text" value="Ingen"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Brugernavn
- </text>
- <text name="name_descr_text">
- Visningsnavn
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Se profil for denne avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_notes.xml b/indra/newview/skins/default/xui/da/panel_notes.xml
deleted file mode 100644
index 7d8097f6ff..0000000000
--- a/indra/newview/skins/default/xui/da/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Noter &amp; Privatliv" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Min private noter:"/>
- <text name="status_message2" value="Tillad denne person at:"/>
- <check_box label="Se min online status" name="status_check"/>
- <check_box label="Se mig på kortet" name="map_check"/>
- <check_box label="Editére, slette og tage mine objekter" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Tilføj ven" name="add_friend" tool_tip="Tilbyd venskab til beboer"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Ã…ben session med personlige beskeder"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Opkald" name="call" tool_tip="Opkald til denne beboer"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Kort" name="show_on_map_btn" tool_tip="Vis denne beboer på kortet"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleportér" name="teleport" tool_tip="Tilbyd teleport"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_profile.xml b/indra/newview/skins/default/xui/da/panel_profile.xml
deleted file mode 100644
index db85eb23a8..0000000000
--- a/indra/newview/skins/default/xui/da/panel_profile.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Ingen"/>
- <string name="no_group_text" value="Ingen"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Real World:"/>
- </panel>
- <text name="title_member_text" value="Beboer siden:"/>
- <text name="title_acc_status_text" value="Konto status:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(henter)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupper:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Tilføj ven" name="add_friend" tool_tip="Tilbyd venskab til beboeren"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="Personlig besked" name="im" tool_tip="Ã…ben session med personlig besked"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Opkald" name="call" tool_tip="Opkald til denne beboer"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleportér" name="teleport" tool_tip="Tilbyd teleport"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="â–¼" name="overflow_btn" tool_tip="Betal eller del beholdning med denne beboer"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Redigér profil" name="edit_profile_btn" tool_tip="Redigér din personlige information"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_profile_view.xml b/indra/newview/skins/default/xui/da/panel_profile_view.xml
deleted file mode 100644
index e6e8ca4d10..0000000000
--- a/indra/newview/skins/default/xui/da/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Online
- </string>
- <string name="status_offline">
- Offline
- </string>
- <text name="display_name_label" value="Visningsnavn:"/>
- <text name="solo_username_label" value="Brugernavn:"/>
- <text name="status" value="Online"/>
- <text name="user_name_small" value="Se på mig med dette enormt ekstremt super lange navn"/>
- <button name="copy_to_clipboard" tool_tip="Kopiér til udskriftsholder"/>
- <text name="user_label" value="Brugernavn:"/>
- <tab_container name="tabs">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="FAVORITTER" name="panel_picks"/>
- <panel label="NOTER &amp; PRIVATLIV" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/de/floater_camera.xml b/indra/newview/skins/default/xui/de/floater_camera.xml
index bbf1c8af60..7e9ebdb643 100644
--- a/indra/newview/skins/default/xui/de/floater_camera.xml
+++ b/indra/newview/skins/default/xui/de/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Kamera nach oben, unten, links und rechts bewegen
</floater.string>
- <floater.string name="camera_modes_title">
- Kameramodi
- </floater.string>
- <floater.string name="pan_mode_title">
- Kreisen - Zoomen - Schwenken
- </floater.string>
- <floater.string name="presets_mode_title">
- Ansichten
- </floater.string>
<floater.string name="free_mode_title">
Objekt ansehen
</floater.string>
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index fc38608df5..72e7ec8eb4 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -992,7 +992,7 @@ Sie sind nicht berechtigt, Land für die aktive Gruppe zu kaufen.
</form>
</notification>
<notification name="RemoveFromFriends">
- Möchten Sie [NAME] aus Ihrer Freundesliste entfernen?
+ Möchten Sie &lt;nolink&gt;[NAME]&lt;/nolink&gt; aus Ihrer Freundesliste entfernen?
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2134,10 +2134,10 @@ Hierzu wird Ihr Webbrowser geöffnet.
Betreff: [SUBJECT], Nachricht: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] ist online
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ist online
</notification>
<notification name="FriendOffline">
- [NAME] ist offline
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ist offline
</notification>
<notification name="AddSelfFriend">
Obwohl Sie ein sehr netter Mensch sind, können Sie sich nicht selbst als Freund hinzufügen.
@@ -2532,10 +2532,10 @@ Versuchen Sie es in einigen Minuten erneut.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] hat Ihr Freundschaftsangebot akzeptiert.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; hat Ihr Freundschaftsangebot akzeptiert.
</notification>
<notification name="FriendshipDeclined">
- [NAME] hat Ihr Freundschaftsangebot abgelehnt.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; hat Ihr Freundschaftsangebot abgelehnt.
</notification>
<notification name="FriendshipAcceptedByMe">
Ihr Freundschaftsangebot wurde angeommen.
diff --git a/indra/newview/skins/default/xui/de/panel_my_profile.xml b/indra/newview/skins/default/xui/de/panel_my_profile.xml
deleted file mode 100644
index 89a4dfdaba..0000000000
--- a/indra/newview/skins/default/xui/de/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=de-DE
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=de
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=de-DE"/>
- <string name="no_partner_text" value="Keiner"/>
- <string name="no_group_text" value="Keiner"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Benutzername
- </text>
- <text name="name_descr_text">
- Anzeigename
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Profil zu diesem Avatar anzeigen"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_notes.xml b/indra/newview/skins/default/xui/de/panel_notes.xml
deleted file mode 100644
index ef1961b63d..0000000000
--- a/indra/newview/skins/default/xui/de/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notizen &amp; Privatsphäre" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Meine Notizen:"/>
- <text name="status_message2" value="Diese Person kann:"/>
- <check_box label="meinen Online-Status sehen." name="status_check"/>
- <check_box label="mich auf der Karte sehen." name="map_check"/>
- <check_box label="meine Objekte bearbeiten, löschen oder nehmen." name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Freund hinzufügen" name="add_friend" tool_tip="Dem Einwohner die Freundschaft anbieten"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Instant Messenger öffnen"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Anrufen" name="call" tool_tip="Diesen Einwohner anrufen"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Karte" name="show_on_map_btn" tool_tip="Einwohner auf Karte anzeigen"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleportieren" name="teleport" tool_tip="Teleport anbieten"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_profile.xml b/indra/newview/skins/default/xui/de/panel_profile.xml
deleted file mode 100644
index b4c6e67108..0000000000
--- a/indra/newview/skins/default/xui/de/panel_profile.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=de-DE
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=de
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=de-DE"/>
- <string name="no_partner_text" value="Keiner"/>
- <string name="no_group_text" value="Keiner"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Echtes Leben:"/>
- </panel>
- <text name="title_member_text" value="Einwohner seit:"/>
- <text name="title_acc_status_text" value="Kontostatus:"/>
- <text_editor name="acc_status_text">
- Einwohner. Keine Zahlungsinfo archiviert.
- Linden.
- </text_editor>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(wird in Datenbank gesucht)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Gruppen:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Freund hinzufügen" name="add_friend" tool_tip="Dem Einwohner die Freundschaft anbieten"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Instant Messenger öffnen"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Anrufen" name="call" tool_tip="Diesen Einwohner anrufen"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleportieren" name="teleport" tool_tip="Teleport anbieten"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="â–¼" name="overflow_btn" tool_tip="Dem Einwohner Geld geben oder Inventar an den Einwohner schicken"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Profil bearbeiten" name="edit_profile_btn" tool_tip="Ihre persönlichen Informationen bearbeiten"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_profile_view.xml b/indra/newview/skins/default/xui/de/panel_profile_view.xml
deleted file mode 100644
index 7e93bd1ede..0000000000
--- a/indra/newview/skins/default/xui/de/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Online
- </string>
- <string name="status_offline">
- Offline
- </string>
- <text name="display_name_label" value="Anzeigename:"/>
- <text name="solo_username_label" value="Benutzername:"/>
- <text name="status" value="Online"/>
- <text name="user_name_small" value="Dieser Name ist ein ganz außerordentlich langer Name"/>
- <button name="copy_to_clipboard" tool_tip="In Zwischenablage kopieren"/>
- <text name="user_label" value="Benutzername:"/>
- <tab_container name="tabs" tab_min_width="60">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="AUSWAHL" name="panel_picks"/>
- <panel label="NOTIZEN &amp; PRIVATSPHÄRE" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 1c7b354221..4772f744ea 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1208,7 +1208,7 @@ Only large parcels can be listed in search.
</panel.string>
<panel.string
name="see_avs_text">
- See and chat with residents on this parcel
+ Avatars on other parcels can see
</panel.string>
<text
type="string"
@@ -1223,30 +1223,33 @@ Only large parcels can be listed in search.
width="278">
Allow other Residents to:
</text>
- <check_box
- height="16"
- label="Edit Terrain"
- layout="topleft"
- left="14"
- name="edit land check"
- tool_tip="If checked, anyone can terraform your land. It is best to leave this unchecked, as you can always edit your own land."
- top_pad="4"
- width="147i" />
- <check_box
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="allow_label0"
+ width="150">
+ Fly:
+ </text>
+
+ <check_box
height="16"
- label="Fly"
+ label="Everyone"
layout="topleft"
name="check fly"
tool_tip="If checked, Residents can fly on your land. If unchecked, they can only fly into and over your land."
- left_pad="4"
- width="150" />
+ left_pad="2"
+ width="130" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
- left="14"
+ left="20"
name="allow_label2"
width="150">
Build:
@@ -1271,7 +1274,7 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="14"
+ left="20"
name="allow_label3"
width="150">
Object Entry:
@@ -1298,7 +1301,7 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="14"
+ left="20"
name="allow_label4"
width="150">
Run Scripts:
@@ -1319,49 +1322,47 @@ Only large parcels can be listed in search.
name="check group scripts"
top_delta="0"
width="70" />
- <text
- type="string"
- text_color="white"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="land_options_label"
- width="278">
- Land Options:
- </text>
- <check_box
+ <panel
+ bevel_style="none"
+ border="true"
+ top="146"
+ bottom="146"
+ follows="left|bottom|right"
+ left="20"
+ right="-20"/>
+ <check_box
height="16"
label="Safe (no damage)"
layout="topleft"
- left="14"
+ left="18"
name="check safe"
tool_tip="If checked, sets the land to Safe, disabling damage combat. If cleared, damage combat is enabled."
- top_pad="5"
+ top="130"
width="200" />
<check_box
height="16"
label="No Pushing"
layout="topleft"
- left_pad="5"
+ left_pad="35"
name="PushRestrictCheck"
tool_tip="Prevents scripts from pushing. Checking this option may be useful for preventing disruptive behavior on your land."
- top_delta="0"
+ top="130"
width="119" />
<check_box
height="16"
label="Show Place in Search (L$30/week)"
layout="topleft"
- left="14"
+ left="18"
name="ShowDirectoryCheck"
tool_tip="Let people see this parcel in search results"
+ top="150"
width="430" />
<combo_box
enabled="false"
height="23"
layout="topleft"
- left="30"
+ left="20"
+ top="194"
name="land category with adult"
visible="false"
width="140">
@@ -1426,7 +1427,8 @@ Only large parcels can be listed in search.
enabled="false"
height="23"
layout="topleft"
- left="30"
+ left="20"
+ top="194"
name="land category"
visible="false"
width="140">
@@ -1487,11 +1489,11 @@ Only large parcels can be listed in search.
height="16"
label="Moderate Content"
layout="topleft"
- left="14"
+ left="18"
name="MatureCheck"
- top="177"
+ top="170"
label_text.valign="center"
- label_text.v_pad="-5"
+ label_text.v_pad="-1"
tool_tip=" "
width="200" />
<text
@@ -1500,18 +1502,19 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="10"
+ left="20"
name="Snapshot:"
text_color="white"
- top="220"
+ top="225"
width="200">
Snapshot:
</text>
<texture_picker
follows="left|top"
+ top_pad="0"
height="150"
layout="topleft"
- left="14"
+ left="20"
name="snapshot_ctrl"
fallback_image="default_land_picture.j2c"
tool_tip="Click to choose a picture"
@@ -1520,23 +1523,24 @@ Only large parcels can be listed in search.
type="string"
length="1"
follows="left|top"
- text_color="white"
+ text_color="LtGray"
height="16"
layout="topleft"
- left="230"
- top="174"
+ left="274"
+ top="166"
name="allow_label5"
width="278">
- Allow Residents on other parcels to:
+ and chat with avatars on this parcel
</text>
<check_box
height="16"
label="See Avatars"
follows="top"
layout="topleft"
- left="230"
+ left="253"
+ top="150"
name="SeeAvatarsCheck"
- tool_tip="Allows residents on other parcels to see and chat with residents on this parcel, and you to see and chat with them."
+ tool_tip="Allows avatars on other parcels to see and chat with avatars on this parcel, and you to see and chat with them."
width="120" />
<text
type="string"
@@ -1544,8 +1548,8 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="230"
- top="230"
+ left="255"
+ top="282"
text_color="white"
name="landing_point"
word_wrap="true"
@@ -1554,12 +1558,13 @@ Only large parcels can be listed in search.
</text>
<button
follows="right|top"
+ top_pad="0"
height="23"
label="Set"
label_selected="Set"
layout="topleft"
name="Set"
- left="230"
+ left="255"
tool_tip="Sets the landing point where visitors arrive. Sets to your avatar&apos;s location inside this parcel."
width="50" />
<button
@@ -1579,7 +1584,7 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="230"
+ left="255"
top_pad="10"
name="Teleport Routing: "
width="200">
@@ -1589,7 +1594,7 @@ Only large parcels can be listed in search.
height="23"
layout="topleft"
name="landing type"
- top_pad="3"
+ top_pad="0"
tool_tip="Teleport Routing -- select how to handle teleports onto your land"
width="120">
<combo_box.item
diff --git a/indra/newview/skins/default/xui/en/floater_activeim.xml b/indra/newview/skins/default/xui/en/floater_activeim.xml
index 670c528f08..b79c5d9a19 100644
--- a/indra/newview/skins/default/xui/en/floater_activeim.xml
+++ b/indra/newview/skins/default/xui/en/floater_activeim.xml
@@ -6,7 +6,6 @@
title="ACTIVE IM"
height="22"
width="320"
- follows="right|bottom"
background_visible="true"
can_close="true"
can_dock="true"
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index 6009821f7f..82c3403008 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -15,7 +15,7 @@
help_topic="avatar"
save_rect="true"
save_visibility="true"
- title="AVATAR PICKER"
+ title="CHOOSE AN AVATAR"
width="700">
<web_browser
top="25"
diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml
index afb7917043..35918e9705 100644
--- a/indra/newview/skins/default/xui/en/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_build_options.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- follows="right"
height="198"
layout="topleft"
name="build options floater"
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index e7f5207271..4673c6def5 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
open_positioning="specified"
- specified_left="320"
+ specified_left="458"
specified_bottom="80"
legacy_header_height="18"
can_minimize="true"
can_close="true"
- follows="bottom"
height="164"
layout="topleft"
name="camera_floater"
help_topic="camera_floater"
save_visibility="true"
single_instance="true"
- title="VIEW"
+ title="CAMERA CONTROLS"
chrome="true"
save_rect="true"
width="228">
@@ -30,18 +29,6 @@
Move Camera Up and Down, Left and Right
</floater.string>
<floater.string
- name="camera_modes_title">
- Camera modes
- </floater.string>
- <floater.string
- name="pan_mode_title">
- Orbit Zoom Pan
- </floater.string>
- <floater.string
- name="presets_mode_title">
- Preset Views
- </floater.string>
- <floater.string
name="free_mode_title">
View Object
</floater.string>
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index 87606c1a2a..8d0cecdac3 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
open_positioning="specified"
- specified_left="320"
+ specified_left="10"
specified_bottom="10"
height="60"
layout="topleft"
@@ -17,17 +17,17 @@
can_resize="true"
default_tab_group="1"
name="chat_bar"
- width="380">
+ width="300">
<panel
top="20"
class="panel_nearby_chat"
follow="all"
- width="380"
+ width="300"
height="0"
visible="false"
filename="panel_nearby_chat.xml"
name="nearby_chat" />
- <panel width="380"
+ <panel width="300"
height="31"
left="0"
bottom="-1"
@@ -48,7 +48,7 @@
text_pad_right="25"
tool_tip="Press Enter to say, Ctrl+Enter to shout"
top="2"
- width="335" />
+ width="255" />
<output_monitor
auto_update="true"
follows="right"
diff --git a/indra/newview/skins/default/xui/en/floater_color_picker.xml b/indra/newview/skins/default/xui/en/floater_color_picker.xml
index 421f3a72c6..e06d10606a 100644
--- a/indra/newview/skins/default/xui/en/floater_color_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_color_picker.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_minimize="false"
- follows="left|top"
height="380"
layout="topleft"
name="ColorPicker"
diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml
index 7ed020f832..cf61b7d24d 100644
--- a/indra/newview/skins/default/xui/en/floater_event.xml
+++ b/indra/newview/skins/default/xui/en/floater_event.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- follows="all"
height="400"
can_resize="true"
help_topic="event_details"
diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml
index a941734358..b96a94a849 100644
--- a/indra/newview/skins/default/xui/en/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_gesture.xml
@@ -9,7 +9,6 @@
help_topic="gestures"
title="GESTURES"
background_visible="true"
- follows="all"
label="Places"
layout="topleft"
min_height="350"
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index cb7d91abb8..5fe8f3c114 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -3,8 +3,8 @@
legacy_header_height="18"
background_visible="true"
default_tab_group="1"
- follows="all"
height="350"
+ help_topic="floater_im_box"
layout="topleft"
name="panel_im"
can_dock="false"
diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
index 1f192f9b28..5cd7cd196d 100644
--- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
@@ -4,7 +4,6 @@
bevel_style="none"
border_style="line"
can_resize="true"
- follows="left|top"
height="580"
layout="topleft"
min_height="271"
diff --git a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
index c9d87f158f..e9676777f4 100644
--- a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="left|top"
height="400"
layout="topleft"
min_height="271"
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index 31972d4122..3eeebcf120 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -4,7 +4,6 @@
can_minimize="true"
can_resize="true"
chrome="true"
- follows="top|right"
height="200"
layout="topleft"
min_height="128"
diff --git a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
index 28a29c42aa..fb7d09a21e 100644
--- a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_minimize="false"
- follows="left|top"
height="175"
layout="topleft"
name="MemLeak"
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index e96039a3e1..065dab0413 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
open_positioning="specified"
- specified_left="558"
+ specified_left="320"
specified_bottom="80"
legacy_header_height="18"
can_dock="false"
can_minimize="true"
can_close="true"
- follows="bottom"
height="110"
layout="topleft"
name="move_floater"
@@ -16,7 +15,7 @@
save_visibility="true"
single_instance="true"
chrome="true"
- title="MOVE"
+ title="WALK / RUN / FLY"
width="133">
<string
name="walk_forward_tooltip">
diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
index a40393aed8..1c4b25a7b0 100644
--- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
@@ -12,7 +12,7 @@
single_instance="true"
reuse_instance="true"
title="APPEARANCE"
- min_height="260"
+ min_height="440"
min_width="333"
width="333">
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_my_web_profile.xml b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
new file mode 100644
index 0000000000..df46fc198f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_my_web_profile"
+ help_topic="web_profile"
+ width="780"
+ height="775"
+ save_rect="true"
+ single_instance="true"
+ reuse_instance="false"
+ filename="floater_web_content.xml"/> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml
index 32dda1b694..d6d8431150 100644
--- a/indra/newview/skins/default/xui/en/floater_people.xml
+++ b/indra/newview/skins/default/xui/en/floater_people.xml
@@ -26,10 +26,6 @@
name="panel_people"
filename="panel_people.xml"/>
<panel
- class="panel_profile_view"
- name="panel_profile_view"
- filename="panel_profile_view.xml"/>
- <panel
class="panel_group_info_sidetray"
name="panel_group_info_sidetray"
filename="panel_group_info_sidetray.xml"
diff --git a/indra/newview/skins/default/xui/en/floater_places.xml b/indra/newview/skins/default/xui/en/floater_places.xml
index 6484b54360..ccceac0a7b 100644
--- a/indra/newview/skins/default/xui/en/floater_places.xml
+++ b/indra/newview/skins/default/xui/en/floater_places.xml
@@ -11,7 +11,7 @@
save_rect="true"
reuse_instance="true"
title="PLACES"
- min_height="230"
+ min_height="440"
min_width="333"
width="333">
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index f35628f8e5..be3b2d179d 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -3,7 +3,6 @@
legacy_header_height="18"
can_resize="true"
default_tab_group="1"
- follows="left|top"
height="361"
layout="topleft"
min_height="243"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
index 92d3a6702c..137e278ddc 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="left|top"
height="350"
layout="topleft"
min_height="200"
diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml
index 73e6d6147a..bd4edb81c8 100644
--- a/indra/newview/skins/default/xui/en/floater_script.xml
+++ b/indra/newview/skins/default/xui/en/floater_script.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
background_visible="true"
- follows="left|top|right|bottom"
height="250"
layout="topleft"
name="script_floater"
diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
index ce96ea232e..b5dd2f97b9 100644
--- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="left|top|right|bottom"
height="200"
layout="topleft"
name="script"
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index 61f2e7e72d..e71b714f25 100644
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -4,7 +4,6 @@
legacy_header_height="18"
can_minimize="true"
can_close="true"
- follows="left|top"
height="500"
layout="topleft"
name="Snapshot"
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index 406114294d..2fd932786b 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="top|right"
height="400"
layout="topleft"
name="Statistics"
diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml
index 9b96a5badc..ecedb27438 100644
--- a/indra/newview/skins/default/xui/en/floater_sys_well.xml
+++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
bevel_style="in"
- follows="right|bottom"
layout="topleft"
name="sys_well_window"
help_topic="notification_chiclet"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 1808cab2a5..f9147ea650 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2,7 +2,6 @@
<floater
open_positioning="cascading"
legacy_header_height="18"
- follows="left|top|right"
height="580"
layout="topleft"
bg_opaque_image="Window_NoTitle_Foreground"
@@ -791,6 +790,7 @@
tab_min_width="40"
tab_position="top"
tab_height="25"
+ open_tabs_on_drag_and_drop="true"
top="173"
width="295">
diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
index 2c754cd8d0..77fb21e27c 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
@@ -7,7 +7,6 @@
help_topic="voice_effects"
title="VOICE MORPHING"
background_visible="true"
- follows="all"
label="Places"
layout="topleft"
min_height="360"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 3a581e7e6e..1834be2d48 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -9,14 +9,6 @@
name="Me"
tear_off="true">
<menu_item_call
- label="Dashboard..."
- name="Manage My Account">
- <menu_item_call.on_click
- function="PromptShowURL"
- name="ManageMyAccount_url"
- parameter="WebLaunchJoinNow,http://secondlife.com/account/" />
- </menu_item_call>
- <menu_item_call
label="Profile..."
name="Profile">
<menu_item_call.on_click
@@ -31,6 +23,14 @@
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
+ <menu_item_call
+ label="Choose an avatar..."
+ name="Avatar Picker">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="avatar" />
+ </menu_item_call>
+ <menu_item_separator/>
<menu_item_check
label="Inventory..."
name="Inventory"
@@ -52,29 +52,28 @@
function="Inventory.NewWindow"
parameter="" />
</menu_item_call>
- <menu_item_check
- label="Gestures..."
- name="Gestures"
- shortcut="control|G">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="gestures" />
- <menu_item_check.on_click
- function="Floater.Toggle"
- parameter="gestures" />
- </menu_item_check>
- <menu_item_check
- label="Voice..."
- name="ShowVoice"
- visibility_control="VoiceMorphingEnabled">
- <menu_item_check.on_check
- function="Floater.Visible"
- Parameter="voice_effect" />
- <menu_item_check.on_click
- function="Floater.Toggle"
- parameter="voice_effect" />
- </menu_item_check>
-
+ <menu_item_call
+ label="Places..."
+ name="Places">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="places" />
+ </menu_item_call>
+ <menu_item_call
+ label="Picks..."
+ name="Picks">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="picks" />
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Camera Controls..."
+ name="Camera Controls">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="camera" />
+ </menu_item_call>
<menu
create_jump_keys="true"
label="Movement"
@@ -117,6 +116,13 @@
<menu_item_call.on_click
function="Tools.StopAllAnimations" />
</menu_item_call>
+ <menu_item_call
+ label="Walk / run / fly..."
+ name="Stop Animating My Avatar">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="moveview" />
+ </menu_item_call>
</menu>
<menu
@@ -163,6 +169,14 @@
<menu_item_call.on_click
function="BuyCurrency" />
</menu_item_call>
+ <menu_item_call
+ label="Account dashboard..."
+ name="Manage My Account">
+ <menu_item_call.on_click
+ function="PromptShowURL"
+ name="ManageMyAccount_url"
+ parameter="WebLaunchJoinNow,http://secondlife.com/account/" />
+ </menu_item_call>
<menu_item_separator/>
@@ -205,33 +219,8 @@
label="Communicate"
name="Communicate"
tear_off="true">
- <menu_item_call
- label="My Friends"
- name="My Friends"
- shortcut="control|shift|F">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="friends_panel" />
- </menu_item_call>
- <menu_item_call
- label="My Groups"
- name="My Groups"
- shortcut="control|shift|G">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="groups_panel" />
- </menu_item_call>
-
- <menu_item_separator/>
-
- <!--menu_item_call
- label="Chat"
- name="Chat">
- <menu_item_call.on_click
- function="World.Chat" />
- </menu_item_call-->
<menu_item_check
- label="Nearby Chat"
+ label="Chat..."
name="Nearby Chat"
shortcut="control|H"
use_mac_ctrl="true">
@@ -242,16 +231,21 @@
function="Floater.Toggle"
parameter="chat_bar" />
</menu_item_check>
- <menu_item_call
- label="Nearby People"
- name="Active Speakers"
- shortcut="control|shift|A">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="nearby_panel" />
- </menu_item_call>
<menu_item_check
- label="Nearby Voice"
+ label="Speak"
+ name="Speak">
+ <menu_item_check.on_check
+ function="Agent.IsMicrophoneOn"
+ parameter="speak" />
+ <menu_item_check.on_enable
+ function="Agent.IsActionAllowed"
+ parameter="speak" />
+ <menu_item_check.on_click
+ function="Agent.ToggleMicrophone"
+ parameter="speak" />
+ </menu_item_check>
+ <menu_item_check
+ label="Voice settings..."
name="Nearby Voice">
<menu_item_check.on_check
function="Floater.Visible"
@@ -260,12 +254,86 @@
function="Floater.Toggle"
parameter="voice_controls" />
</menu_item_check>
+ <menu_item_check
+ label="Voice morphing..."
+ name="ShowVoice"
+ visibility_control="VoiceMorphingEnabled">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="voice_effect" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="voice_effect" />
+ </menu_item_check>
+ <menu_item_check
+ label="Gestures..."
+ name="Gestures"
+ shortcut="control|G">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="gestures" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="gestures" />
+ </menu_item_check>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Friends"
+ name="My Friends"
+ shortcut="control|shift|F">
+ <menu_item_call.on_click
+ function="SideTray.PanelPeopleTab"
+ parameter="friends_panel" />
+ </menu_item_call>
+ <menu_item_call
+ label="Groups"
+ name="My Groups"
+ shortcut="control|shift|G">
+ <menu_item_call.on_click
+ function="SideTray.PanelPeopleTab"
+ parameter="groups_panel" />
+ </menu_item_call>
+ <menu_item_call
+ label="Nearby people"
+ name="Active Speakers"
+ shortcut="control|shift|A">
+ <menu_item_call.on_click
+ function="SideTray.PanelPeopleTab"
+ parameter="nearby_panel" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"
label="World"
name="World"
tear_off="true">
+ <menu_item_call
+ label="Landmark This Place"
+ name="Create Landmark Here">
+ <menu_item_call.on_click
+ function="World.CreateLandmark" />
+ <menu_item_call.on_enable
+ function="World.EnableCreateLandmark" />
+ </menu_item_call>
+ <menu_item_call
+ label="Destinations..."
+ name="Destinations">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="destinations" />
+ </menu_item_call>
+ <menu_item_check
+ label="World map"
+ name="World Map"
+ shortcut="control|M"
+ use_mac_ctrl="true">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="world_map" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="world_map" />
+ </menu_item_check>
<menu_item_check
label="Mini-map"
name="Mini-Map"
@@ -277,18 +345,6 @@
function="Floater.Toggle"
parameter="mini_map" />
</menu_item_check>
- <menu_item_check
- label="World Map"
- name="World Map"
- shortcut="control|M"
- use_mac_ctrl="true">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="world_map" />
- <menu_item_check.on_click
- function="Floater.Toggle"
- parameter="world_map" />
- </menu_item_check>
<menu_item_check
label="Search"
name="Search"
@@ -300,6 +356,25 @@
function="Floater.Toggle"
parameter="search" />
</menu_item_check>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Teleport home"
+ name="Teleport Home"
+ shortcut="control|shift|H">
+ <menu_item_call.on_click
+ function="World.TeleportHome" />
+ <menu_item_call.on_enable
+ function="World.EnableTeleportHome" />
+ </menu_item_call>
+ <menu_item_call
+ label="Set home to here"
+ name="Set Home to Here">
+ <menu_item_call.on_click
+ function="World.SetHomeLocation" />
+ <menu_item_call.on_enable
+ function="World.EnableSetHomeLocation" />
+ </menu_item_call>
+ <menu_item_separator/>
<menu_item_call
label="Snapshot"
name="Take Snapshot"
@@ -308,82 +383,51 @@
function="Floater.Show"
parameter="snapshot" />
</menu_item_call>
- <menu_item_call
- label="Landmark This Place"
- name="Create Landmark Here">
- <menu_item_call.on_click
- function="World.CreateLandmark" />
- <menu_item_call.on_enable
- function="World.EnableCreateLandmark" />
- </menu_item_call>
- <menu
- create_jump_keys="true"
- label="Place Profile"
- name="Land"
- tear_off="true">
+ <menu_item_separator/>
<menu_item_call
- label="Place Profile"
+ label="Place profile"
layout="topleft"
name="Place Profile">
<menu_item_call.on_click
function="World.PlaceProfile" />
</menu_item_call>
<menu_item_call
- label="About Land"
+ label="About land"
name="About Land">
<menu_item_call.on_click
function="Floater.Show"
parameter="about_land" />
</menu_item_call>
<menu_item_call
- label="Region/Estate"
+ label="Region / Estate"
name="Region/Estate">
<menu_item_call.on_click
function="Floater.Show"
parameter="region_info" />
</menu_item_call>
- </menu>
+ <menu_item_call
+ label="My land holdings..."
+ name="My Land">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="land_holdings" />
+ </menu_item_call>
+ <menu_item_call
+ label="Buy this land"
+ name="Buy Land">
+ <menu_item_call.on_click
+ function="Land.Buy" />
+ <menu_item_call.on_enable
+ function="World.EnableBuyLand" />
+ </menu_item_call>
<menu_item_separator/>
- <menu_item_call
- label="Buy This Land"
- name="Buy Land">
- <menu_item_call.on_click
- function="Land.Buy" />
- <menu_item_call.on_enable
- function="World.EnableBuyLand" />
- </menu_item_call>
- <menu_item_call
- label="My Land"
- name="My Land">
- <menu_item_call.on_click
- function="Floater.Show"
- parameter="land_holdings" />
- </menu_item_call>
<menu
create_jump_keys="true"
label="Show"
name="LandShow"
tear_off="true">
- <menu_item_check
- label="Move Controls"
- name="Movement Controls">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="moveview" />
- <menu_item_check.on_click
- function="World.Toggle.MovementControls" />
- </menu_item_check>
- <menu_item_check
- label="View Controls"
- name="Camera Controls">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="camera" />
- <menu_item_check.on_click
- function="World.Toggle.CameraControls" />
- </menu_item_check>
<menu_item_check
label="Ban Lines"
name="Ban Lines">
@@ -456,24 +500,6 @@
</menu>
<menu_item_separator/>
-
- <menu_item_call
- label="Teleport Home"
- name="Teleport Home"
- shortcut="control|shift|H">
- <menu_item_call.on_click
- function="World.TeleportHome" />
- <menu_item_call.on_enable
- function="World.EnableTeleportHome" />
- </menu_item_call>
- <menu_item_call
- label="Set Home to Here"
- name="Set Home to Here">
- <menu_item_call.on_click
- function="World.SetHomeLocation" />
- <menu_item_call.on_enable
- function="World.EnableSetHomeLocation" />
- </menu_item_call>
<!-- <menu_item_check
label="Show Navigation Bar"
name="ShowNavbarNavigationPanel">
@@ -496,8 +522,6 @@
</menu_item_check>
<menu_item_separator/>-->
- <menu_item_separator/>
-
<menu
create_jump_keys="true"
label="Sun"
@@ -1155,6 +1179,13 @@
name="Help"
tear_off="true">
<menu_item_call
+ label="How to..."
+ name="How To">
+ <menu_item_call.on_click
+ function="Help.ToggleHowTo"
+ parameter="" />
+ </menu_item_call>
+ <menu_item_call
label="[SECOND_LIFE] Help"
name="Second Life Help"
shortcut="F1">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 4e4eea0354..0ba4b84abe 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2369,7 +2369,7 @@ Would you be my friend?
name="RemoveFromFriends"
type="alertmodal">
<tag>friendship</tag>
-Do you want to remove [NAME] from your Friends List?
+Do you want to remove &lt;nolink&gt;[NAME]&lt;/nolink&gt; from your Friends List?
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
@@ -5161,7 +5161,7 @@ Topic: [SUBJECT], Message: [MESSAGE]
name="FriendOnline"
type="notifytip">
<tag>friendship</tag>
-[NAME] is Online
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; is Online
</notification>
<notification
@@ -5169,7 +5169,7 @@ Topic: [SUBJECT], Message: [MESSAGE]
name="FriendOffline"
type="notifytip">
<tag>friendship</tag>
-[NAME] is Offline
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; is Offline
</notification>
<notification
@@ -6171,7 +6171,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
name="FriendshipAccepted"
type="offer">
<tag>friendship</tag>
-[NAME] accepted your friendship offer.
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; accepted your friendship offer.
</notification>
<notification
@@ -6180,7 +6180,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
persist="true"
type="notify">
<tag>friendship</tag>
-[NAME] declined your friendship offer.
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; declined your friendship offer.
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml
deleted file mode 100644
index 4bd2235cda..0000000000
--- a/indra/newview/skins/default/xui/en/panel_my_profile.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- follows="all"
- height="535"
- label="Profile"
- layout="topleft"
- left="0"
- name="panel_profile"
- top="0"
- width="315">
- <string
- name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string
- name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string
- name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string
- name="my_account_link_url"
- value="http://secondlife.com/account" />
- <string
- name="no_partner_text"
- value="None" />
- <string
- name="no_group_text"
- value="None" />
- <string
- name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string
- name="name_text_args">
- [NAME]
- </string>
- <string
- name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack
- name="layout"
- orientation="vertical"
- follows="all"
- layout="topleft"
- left="0"
- top="0"
- height="510"
- width="315"
- border_size="0">
- <layout_panel
- name="profile_stack"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- height="492"
- user_resize="false"
- width="315">
- <scroll_container
- color="DkGray2"
- follows="all"
- layout="topleft"
- left="0"
- name="profile_scroll"
- opaque="true"
- height="488"
- width="315"
- top="0">
- <panel
- layout="topleft"
- follows="left|top|right"
- height="488"
- name="scroll_content_panel"
- top="0"
- left="0"
- width="297">
- <panel
- follows="left|top|right"
- height="117"
- layout="topleft"
- left="10"
- name="second_life_image_panel"
- top="0"
- width="297">
-
- <texture_picker
- allow_no_texture="true"
- default_image_name="None"
- enabled="false"
- fallback_image="Generic_Person_Large"
- follows="top|left"
- height="124"
- layout="topleft"
- left="3"
- name="2nd_life_pic"
- top="10"
- width="102" />
-
- <text
- follows="left|top|right"
- font="SansSerifLarge"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left_pad="10"
- name="display_name_descr_text"
- text_color="0.7 0.7 0.7 1.0"
- top_delta="0"
- width="280" >
- User name
- </text>
-
- <text
- follows="left|top|right"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left_delta="0"
- name="name_descr_text"
- text_color="0.4 0.4 0.4 1.0"
- top_delta="20"
- width="280">
- Display Name
- </text>
-
- <button
- follows="bottom"
- height="23"
- left_delta="0"
- top_delta="20"
- label="Profile"
- name="see_profile_btn"
- tool_tip="See profile for this avatar"
- width="120" />
-
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml
deleted file mode 100644
index 124b1cfc6b..0000000000
--- a/indra/newview/skins/default/xui/en/panel_notes.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- follows="all"
- height="515"
- label="Notes &amp; Privacy"
- layout="topleft"
- left="0"
- name="panel_notes"
- top="0"
- width="313"
->
- <layout_stack
- name="layout"
- orientation="vertical"
- follows="all"
- layout="topleft"
- left="0"
- top="0"
- height="517"
- width="313"
- border_size="0">
- <layout_panel
- name="notes_stack"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- height="450"
- width="313">
- <scroll_container
- color="DkGray2"
- follows="all"
- layout="topleft"
- left="0"
- name="profile_scroll"
- opaque="true"
- height="450"
- width="313"
- top="0">
- <panel
- height="450"
- layout="topleft"
- name="profile_scroll_panel"
- top="0"
- left="0"
- width="303">
- <text
- follows="left|top"
- font.style="BOLD"
- height="16"
- layout="topleft"
- left="11"
- name="status_message"
- text_color="white"
- top="10"
- value="My private notes:"
- width="293" />
- <text_editor
- follows="left|top"
- height="120"
- layout="topleft"
- left="12"
- max_length="1000"
- name="notes_edit"
- text_color="DkGray"
- top_pad="3"
- width="288"
- word_wrap="true" />
- <text
- follows="left|top"
- font.style="BOLD"
- height="16"
- layout="topleft"
- left="11"
- name="status_message2"
- text_color="white"
- top_pad="20"
- value="Allow this person to:"
- width="293" />
- <check_box
- enabled="false"
- height="16"
- label="See my online status"
- layout="topleft"
- left="10"
- name="status_check"
- width="293" />
- <check_box
- enabled="false"
- height="16"
- label="See me on the map"
- layout="topleft"
- left="10"
- name="map_check"
- width="293" />
- <check_box
- enabled="false"
- height="16"
- label="Edit, delete or take my objects"
- layout="topleft"
- left="10"
- name="objects_check"
- width="293" />
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel
- follows="bottom|left"
- height="30"
- layout="topleft"
- left="0"
- name="notes_buttons_panel"
- auto_resize="false"
- width="313">
-
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- name="bottom_bar_ls"
- left="2"
- orientation="horizontal"
- top_pad="5"
- width="309">
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left="0"
- name="add_friend_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="118">
- <button
- follows="bottom|left|right"
- height="23"
- label="Add Friend"
- layout="topleft"
- left="1"
- mouse_opaque="false"
- name="add_friend"
- tool_tip="Offer friendship to the Resident"
- top="0"
- width="117" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="im_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="22">
- <button
- follows="bottom|left|right"
- height="23"
- label="IM"
- layout="topleft"
- name="im"
- tool_tip="Open instant message session"
- top="0"
- left="1"
- width="21" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="call_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="52">
- <button
- follows="bottom|left|right"
- height="23"
- label="Call"
- layout="topleft"
- name="call"
- tool_tip="Call this Resident"
- left="1"
- top="0"
- use_ellipses="true"
- width="51" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="show_on_map_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="46">
- <button
- enabled="false"
- follows="bottom|left|right"
- height="23"
- label="Map"
- layout="topleft"
- name="show_on_map_btn"
- tool_tip="Show the Resident on the map"
- top="0"
- left="1"
- width="45" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="teleport_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="81">
- <button
- follows="bottom|left|right"
- height="23"
- label="Teleport"
- layout="topleft"
- name="teleport"
- tool_tip="Offer teleport"
- left="1"
- top="0"
- width="80" />
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index a7078ce2e1..4aeea8823e 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -122,7 +122,7 @@
layout="topleft"
left_delta="0"
name="external"
- value="1"
+ value="true"
top="0"
tool_tip="Use the default system web browser for help, web links, etc. Not recommended if running full screen."
width="480" />
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
deleted file mode 100644
index f5a9daa994..0000000000
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ /dev/null
@@ -1,458 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- follows="all"
- height="430"
- label="Profile"
- layout="topleft"
- left="0"
- name="panel_profile"
- top="0"
- width="317">
- <string
- name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string
- name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string
- name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string
- name="my_account_link_url"
- value="http://secondlife.com/account" />
- <string
- name="no_partner_text"
- value="None" />
- <string
- name="no_group_text"
- value="None" />
- <string
- name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string
- name="name_text_args">
- [NAME]
- </string>
- <string
- name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack
- name="layout"
- orientation="vertical"
- follows="all"
- layout="topleft"
- left="0"
- top="0"
- height="400"
- width="317"
- border_size="0">
- <layout_panel
- name="profile_stack"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- height="400"
- width="317">
- <scroll_container
- color="DkGray2"
- follows="all"
- layout="topleft"
- left="0"
- name="profile_scroll"
- opaque="true"
- height="400"
- width="317"
- top="0">
- <panel
- layout="topleft"
- follows="left|top|right"
- height="505"
- min_height="505"
- name="profile_scroll_panel"
- top="0"
- left="0"
- width="297">
- <panel
- follows="left|top|right"
- height="124"
- layout="topleft"
- left="13"
- name="second_life_image_panel"
- top="0"
- width="297">
- <texture_picker
- allow_no_texture="true"
- default_image_name="None"
- enabled="false"
- fallback_image="Generic_Person_Large"
- follows="top|left"
- height="124"
- layout="topleft"
- left="0"
- name="2nd_life_pic"
- top="10"
- width="102" />
- <text
- follows="left|top|right"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left_pad="10"
- name="title_sl_descr_text"
- text_color="white"
- top_delta="0"
- value="[SECOND_LIFE]:"
- width="180" />
- <expandable_text
- follows="left|top|right"
- height="97"
- layout="topleft"
- left="107"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- name="sl_description_edit"
- top_pad="-3"
- translate="false"
- width="180"
- expanded_bg_visible="true"
- expanded_bg_color="DkGray">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
- </expandable_text>
- </panel>
- <panel
- follows="left|top|right"
- height="124"
- layout="topleft"
- top_pad="0"
- left="13"
- name="first_life_image_panel"
- width="297">
- <texture_picker
- allow_no_texture="true"
- default_image_name="None"
- enabled="false"
- fallback_image="Generic_Person_Large"
- follows="top|left"
- height="124"
- layout="topleft"
- left="0"
- name="real_world_pic"
- width="102" />
- <text
- follows="left|top|right"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left_pad="10"
- name="title_rw_descr_text"
- text_color="white"
- top_delta="0"
- value="Real World:"
- width="180" />
- <expandable_text
- follows="left|top|right"
- height="97"
- layout="topleft"
- left="107"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- name="fl_description_edit"
- top_pad="-3"
- translate="false"
- width="180"
- expanded_bg_visible="true"
- expanded_bg_color="DkGray">
- Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
- </expandable_text>
- </panel>
- <text
- follows="left|top"
- height="15"
- font.style="BOLD"
- font="SansSerifMedium"
- layout="topleft"
- left="10"
- name="homepage_edit"
- top_pad="0"
- translate="false"
- value="http://librarianavengers.org"
- width="300"
- word_wrap="false"
- use_ellipses="true" />
- <text
- follows="left|top"
- font.style="BOLD"
- height="10"
- layout="topleft"
- left="10"
- name="title_member_text"
- text_color="white"
- top_pad="10"
- value="Resident Since:"
- width="300" />
- <text_editor
- allow_scroll="false"
- bg_visible="false"
- follows="left|top"
- h_pad="0"
- height="15"
- layout="topleft"
- left="10"
- name="register_date"
- read_only="true"
- translate="false"
- v_pad="0"
- value="05/31/2376"
- width="300"
- word_wrap="true" />
- <text
- follows="left|top"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left="10"
- name="title_acc_status_text"
- text_color="white"
- top_pad="5"
- value="Account Status:"
- width="300" />
- <!-- <text
- type="string"
- follows="left|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="10"
- name="my_account_link"
- top_delta="0"
- value="Go to Dashboard"
- width="100"/> -->
- <text_editor
- allow_scroll="false"
- bg_visible="false"
- follows="left|top"
- h_pad="0"
- height="28"
- layout="topleft"
- left="10"
- name="acc_status_text"
- read_only="true"
- top_pad="0"
- translate="false"
- v_pad="0"
- width="300"
- word_wrap="true">
- Resident. No payment info on file.
- Linden.
- </text_editor>
- <text
- follows="left|top"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left="10"
- name="title_partner_text"
- text_color="white"
- top_pad="3"
- value="Partner:"
- width="300" />
- <panel
- follows="left|top"
- height="15"
- layout="topleft"
- left="10"
- name="partner_data_panel"
- top_pad="0"
- width="300">
- <text
- follows="left|top"
- height="10"
- initial_value="(retrieving)"
- layout="topleft"
- left="0"
- parse_urls="true"
- name="partner_text"
- top="0"
- use_ellipses="true"
- width="300" />
- </panel>
- <text
- follows="left|top"
- font.style="BOLD"
- height="13"
- layout="topleft"
- left="10"
- name="title_groups_text"
- text_color="white"
- top_pad="3"
- value="Groups:"
- width="300" />
- <expandable_text
- follows="all"
- height="103"
- layout="topleft"
- left="7"
- name="sl_groups"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- top_pad="0"
- translate="false"
- width="290"
- expanded_bg_visible="true"
- expanded_bg_color="DkGray">
- Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. Aenean viverra tulip moosetop. Slan de heelish marfnik tooplod. Sum sum to whop de wompam booster copm.
- </expandable_text>
- </panel>
- </scroll_container>
- </layout_panel>
-
-</layout_stack>
-
- <layout_stack
- name="layout_verb_buttons"
- orientation="horizontal"
- follows="bottom|left|right"
- layout="topleft"
- left="2"
- top_pad="1"
- height="30"
- width="315"
- border_size="0">
- <layout_panel
- follows="bottom|left"
- height="30"
- layout="topleft"
- name="profile_buttons_panel"
- top="0"
- auto_resize="false"
- width="317">
-
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- name="bottom_bar_ls"
- left="0"
- orientation="horizontal"
- top_pad="5"
- width="317">
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left="0"
- name="add_friend_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="121">
- <button
- follows="bottom|left|right"
- height="23"
- label="Add Friend"
- layout="topleft"
- left="1"
- mouse_opaque="false"
- name="add_friend"
- tool_tip="Offer friendship to the Resident"
- top="0"
- width="120" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="im_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="22">
- <button
- follows="bottom|left|right"
- height="23"
- label="IM"
- layout="topleft"
- name="im"
- tool_tip="Open instant message session"
- top="0"
- left="1"
- width="21" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="call_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="52">
- <button
- follows="bottom|left|right"
- height="23"
- label="Call"
- layout="topleft"
- name="call"
- tool_tip="Call this Resident"
- left="1"
- top="0"
- use_ellipses="true"
- width="51" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="chat_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="93">
- <button
- follows="bottom|left|right"
- height="23"
- label="Teleport"
- layout="topleft"
- name="teleport"
- tool_tip="Offer teleport"
- left="1"
- top="0"
- use_ellipses="true"
- width="92" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="overflow_btn_lp"
- user_resize="false"
- auto_resize="false"
- width="24">
- <menu_button
- follows="bottom|left|right"
- height="23"
- label="â–¼"
- layout="topleft"
- name="overflow_btn"
- tool_tip="Pay money to or share inventory with the Resident"
- left="1"
- top="0"
- width="23" />
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
deleted file mode 100644
index 646875b52e..0000000000
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- background_visible="true"
- follows="all"
- height="570"
- layout="topleft"
- min_height="350"
- name="panel_target_profile"
- left="0"
- width="333">
- <string
- name="status_online">
- Online
- </string>
- <string
- name="status_offline">
- Offline
- </string>
- <button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- name="back"
- left="10"
- tab_stop="false"
- top="2"
- width="30"
- use_draw_context_alpha="false" />
- <text
- top="10"
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="display_name_label"
- text_color="LtGray"
- value="Display Name:"
- width="80" />
- <text
- top_delta="0"
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="solo_username_label"
- text_color="LtGray"
- value="Username:"
- visible="false"
- width="80" />
- <text
- follows="top|right"
- halign="right"
- height="13"
- layout="topleft"
- right="-15"
- name="status"
- text_color="LtGray_50"
- top_delta="0"
- value="Online"
- width="150" />
- <text
- follows="top|left|right"
- font="SansSerifBigBold"
- height="29"
- layout="topleft"
- left="45"
- name="user_name_small"
- text_color="LtGray"
- top="22"
- value="Jack oh look at me this is a super duper long name"
- use_ellipses="true"
- word_wrap="true"
- visible="false"
- width="255" />
- <text
- follows="top|left|right"
- font="SansSerifHugeBold"
- height="27"
- layout="topleft"
- left="45"
- name="user_name"
- text_color="LtGray"
- translate="false"
- top="25"
- value="TestString PleaseIgnore"
- visible="true"
- use_ellipses="true"
- width="258" />
- <button
- name="copy_to_clipboard"
- layout="topleft"
- follows="top|right"
- image_overlay="Copy"
- top_delta="0"
- right="-15"
- height="21"
- width="21"
- tab_stop="false"
- tool_tip="Copy to Clipboard"/>
- <text
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="user_label"
- text_color="LtGray"
- top_pad="10"
- value="Username:"
- width="70" />
- <text
- follows="top|left"
- height="20"
- layout="topleft"
- left_pad="0"
- name="user_slid"
- text_color="EmphasisColor"
- font="SansSerifBold"
- top_delta="-2"
- translate="false"
- use_ellipses="true"
- value="teststring.pleaseignore"
- width="195"
- wrap="true "/>
- <tab_container
- follows="all"
- height="489"
- halign="center"
- layout="topleft"
- left="5"
- min_width="333"
- name="tabs"
- tab_min_width="80"
- tab_height="30"
- tab_position="top"
- top_pad="5"
- width="317">
- <panel
- class="panel_profile"
- filename="panel_profile.xml"
- label="PROFILE"
- layout="topleft"
- help_topic="profile_profile_tab"
- name="panel_profile" />
- <panel
- class="panel_picks"
- filename="panel_picks.xml"
- label="PICKS"
- layout="topleft"
- help_topic="profile_picks_tab"
- name="panel_picks" />
- <panel
- class="panel_notes"
- filename="panel_notes.xml"
- label="NOTES &amp; PRIVACY"
- layout="topleft"
- help_topic="profile_notes_tab"
- name="panel_notes" />
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index b9e714dd30..062c403a26 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -21,7 +21,6 @@
width="310"
left="0"
top="0"
- follows="right|bottom"
background_visible="false"
bg_opaque_image="Toast_Over"
bg_alpha_image="Toast_Background"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index befcc5dd87..c25d1f57d6 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3674,7 +3674,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Map_Label">Map</string>
<string name="Command_Marketplace_Label">Marketplace</string>
<string name="Command_MiniMap_Label">Mini-map</string>
- <string name="Command_Move_Label">Move</string>
+ <string name="Command_Move_Label">Walk / run / fly</string>
<string name="Command_People_Label">People</string>
<string name="Command_Picks_Label">Picks</string>
<string name="Command_Places_Label">Places</string>
@@ -3683,7 +3683,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Search_Label">Search</string>
<string name="Command_Snapshot_Label">Snapshot</string>
<string name="Command_Speak_Label">Speak</string>
- <string name="Command_View_Label">View</string>
+ <string name="Command_View_Label">Camera controls</string>
<string name="Command_Voice_Label">Voice settings</string>
<string name="Command_AboutLand_Tooltip">Information about the land you're visiting</string>
diff --git a/indra/newview/skins/default/xui/es/floater_camera.xml b/indra/newview/skins/default/xui/es/floater_camera.xml
index cdcb9a146b..f8911f3a4a 100644
--- a/indra/newview/skins/default/xui/es/floater_camera.xml
+++ b/indra/newview/skins/default/xui/es/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Mover la cámara arriba y abajo, izquierda y derecha
</floater.string>
- <floater.string name="camera_modes_title">
- Modos de cámara
- </floater.string>
- <floater.string name="pan_mode_title">
- Orbital - Zoom - Panorámica
- </floater.string>
- <floater.string name="presets_mode_title">
- Vistas predefinidas
- </floater.string>
<floater.string name="free_mode_title">
Centrar el objeto
</floater.string>
diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml
index 3fe0072a20..9591b424fc 100644
--- a/indra/newview/skins/default/xui/es/notifications.xml
+++ b/indra/newview/skins/default/xui/es/notifications.xml
@@ -981,7 +981,7 @@ no tienes el permiso de comprar terreno para el grupo que tienes activado actual
</form>
</notification>
<notification name="RemoveFromFriends">
- ¿Quieres eliminar a [NAME] de tu lista de amigos?
+ ¿Quieres eliminar a &lt;nolink&gt;[NAME]&lt;/nolink&gt; de tu lista de amigos?
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2128,10 +2128,10 @@ Al hacerlo se iniciará el navegador web.
Asunto: [SUBJECT], Mensaje: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] está conectado
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está conectado
</notification>
<notification name="FriendOffline">
- [NAME] está desconectado
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está desconectado
</notification>
<notification name="AddSelfFriend">
Aunque eres muy agradable, no puedes añadirte como amigo a ti mismo.
@@ -2526,10 +2526,10 @@ Por favor, vuelve a intentarlo en unos momentos.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] ha aceptado tu oferta de amistad.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha aceptado tu oferta de amistad.
</notification>
<notification name="FriendshipDeclined">
- [NAME] ha rehusado tu oferta de amistad.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha rehusado tu oferta de amistad.
</notification>
<notification name="FriendshipAcceptedByMe">
Aceptado el ofrecimiento de amistad.
diff --git a/indra/newview/skins/default/xui/es/panel_my_profile.xml b/indra/newview/skins/default/xui/es/panel_my_profile.xml
deleted file mode 100644
index 29e5e6f652..0000000000
--- a/indra/newview/skins/default/xui/es/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="no_partner_text" value="Ninguno/a"/>
- <string name="no_group_text" value="Ninguno"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nombre de usuario
- </text>
- <text name="name_descr_text">
- Nombre mostrado
- </text>
- <button label="Perfil" name="see_profile_btn" tool_tip="Ver el perfil de este avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_notes.xml b/indra/newview/skins/default/xui/es/panel_notes.xml
deleted file mode 100644
index 00d4caf468..0000000000
--- a/indra/newview/skins/default/xui/es/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notas y Privacidad" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Mis notas privadas:"/>
- <text name="status_message2" value="Permitir que esta persona:"/>
- <check_box label="Vea si estoy conectado" name="status_check"/>
- <check_box label="Me vea en el mapa" name="map_check"/>
- <check_box label="Edite, borre o coja mis objetos" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Añadir como amigo" name="add_friend" tool_tip="Ofrecer amistad a este Residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir una sesión de mensajes instantáneos"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Llamar" name="call" tool_tip="Llamar a este Residente"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mapa" name="show_on_map_btn" tool_tip="Mostrar al Residente en el mapa"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleporte" name="teleport" tool_tip="Ofrecer teleporte"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_profile.xml b/indra/newview/skins/default/xui/es/panel_profile.xml
deleted file mode 100644
index 334c0541af..0000000000
--- a/indra/newview/skins/default/xui/es/panel_profile.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=es-ES
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=es
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=es-ES"/>
- <string name="no_partner_text" value="Ninguno"/>
- <string name="no_group_text" value="Ninguno"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Mundo real:"/>
- </panel>
- <text name="title_member_text" value="Residente desde:"/>
- <text name="title_acc_status_text" value="Estado de la cuenta:"/>
- <text name="title_partner_text" value="Compañero/a:"/>
- <panel name="partner_data_panel">
- <text initial_value="(obteniendo)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupos:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Añadir como amigo" name="add_friend" tool_tip="Ofrecer amistad a este Residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir una sesión de mensajes instantáneos"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Llamar" name="call" tool_tip="Llamar a este Residente"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleporte" name="teleport" tool_tip="Ofrecer teleporte"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Pagar dinero al Residente o compartir algo del inventario con él"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Editar el perfil" name="edit_profile_btn" tool_tip="Modificar tu información personal"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_profile_view.xml b/indra/newview/skins/default/xui/es/panel_profile_view.xml
deleted file mode 100644
index cb374dee52..0000000000
--- a/indra/newview/skins/default/xui/es/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Conectado/a
- </string>
- <string name="status_offline">
- Desconectado/a
- </string>
- <text name="display_name_label" value="Nombre mostrado:"/>
- <text name="solo_username_label" value="Nombre de usuario:"/>
- <text name="status" value="Conectado/a"/>
- <text name="user_name_small" value="Jack, ¿has visto esto? Es un nombre larguísimo."/>
- <button name="copy_to_clipboard" tool_tip="Copiar al portapapeles"/>
- <text name="user_label" value="Nombre de usuario:"/>
- <tab_container name="tabs">
- <panel label="PERFIL" name="panel_profile"/>
- <panel label="DESTACADOS" name="panel_picks"/>
- <panel label="NOTAS Y PRIVACIDAD" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/floater_camera.xml b/indra/newview/skins/default/xui/fr/floater_camera.xml
index 97ff246c4d..77d3c2cfe4 100644
--- a/indra/newview/skins/default/xui/fr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/fr/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Déplacer la caméra vers le haut et le bas, la gauche et la droite
</floater.string>
- <floater.string name="camera_modes_title">
- Modes
- </floater.string>
- <floater.string name="pan_mode_title">
- Rotation - Zoom - Panoramique
- </floater.string>
- <floater.string name="presets_mode_title">
- Préréglages
- </floater.string>
<floater.string name="free_mode_title">
Voir l&apos;objet
</floater.string>
diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml
index 31c29029b5..18b9063c00 100644
--- a/indra/newview/skins/default/xui/fr/notifications.xml
+++ b/indra/newview/skins/default/xui/fr/notifications.xml
@@ -980,7 +980,7 @@ Proposer à [NAME] de devenir votre ami(e) ?
</form>
</notification>
<notification name="RemoveFromFriends">
- Voulez-vous supprimer [NAME] de votre liste d&apos;amis ?
+ Voulez-vous supprimer &lt;nolink&gt;[NAME]&lt;/nolink&gt; de votre liste d&apos;amis ?
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2119,10 +2119,10 @@ Cette opération lancera votre navigateur Web.
Sujet : [SUBJECT], Message : [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] est en ligne
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; est en ligne
</notification>
<notification name="FriendOffline">
- [NAME] est hors ligne
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; est hors ligne
</notification>
<notification name="AddSelfFriend">
Même si vous êtes extrêmement sympathique, vous ne pouvez pas devenir ami avec vous-même.
@@ -2518,10 +2518,10 @@ Veuillez réessayer dans quelques minutes.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] a accepté votre amitié.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; a accepté votre amitié.
</notification>
<notification name="FriendshipDeclined">
- [NAME] a refusé votre amitié.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; a refusé votre amitié.
</notification>
<notification name="FriendshipAcceptedByMe">
Amitié acceptée.
diff --git a/indra/newview/skins/default/xui/fr/panel_my_profile.xml b/indra/newview/skins/default/xui/fr/panel_my_profile.xml
deleted file mode 100644
index 5207c5a28e..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Aucun"/>
- <string name="no_group_text" value="Aucun"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nom d&apos;utilisateur
- </text>
- <text name="name_descr_text">
- Nom d&apos;affichage
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Afficher le profil de cet avatar."/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_notes.xml b/indra/newview/skins/default/xui/fr/panel_notes.xml
deleted file mode 100644
index 1b44bc4b73..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notes/Perso" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Mes notes perso :"/>
- <text name="status_message2" value="Autoriser cette personne à :"/>
- <check_box label="Afficher mon statut en ligne" name="status_check"/>
- <check_box label="Me situer sur la carte" name="map_check"/>
- <check_box label="Modifier, supprimer ou prendre mes objets" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Devenir amis" name="add_friend" tool_tip="Proposer à ce résident de devenir votre ami"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Ouvrir une session IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Appeler" name="call" tool_tip="Appeler ce résident"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Carte" name="show_on_map_btn" tool_tip="Afficher le résident sur la carte"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_profile.xml b/indra/newview/skins/default/xui/fr/panel_profile.xml
deleted file mode 100644
index 9aa6fe97a1..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_profile.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=fr-FR
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=fr
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=fr-FR"/>
- <string name="no_partner_text" value="Aucun"/>
- <string name="no_group_text" value="Aucun"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Vie réelle :"/>
- </panel>
- <text name="title_member_text" value="Résident depuis :"/>
- <text name="title_acc_status_text" value="Statut du compte :"/>
- <text_editor name="acc_status_text">
- Résident. Aucune info de paiement enregistrée.
- Linden.
- </text_editor>
- <text name="title_partner_text" value="Partenaire :"/>
- <panel name="partner_data_panel">
- <text initial_value="(récupération en cours)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Groupes :"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Devenir amis" name="add_friend" tool_tip="Proposer à ce résident de devenir votre ami"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Ouvrir une session IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Appeler" name="call" tool_tip="Appeler ce résident"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Payer le résident ou partager l&apos;inventaire avec lui"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Modifier le profil" name="edit_profile_btn" tool_tip="Modifier vos informations personnelles"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_profile_view.xml b/indra/newview/skins/default/xui/fr/panel_profile_view.xml
deleted file mode 100644
index 76ba44e899..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- En ligne
- </string>
- <string name="status_offline">
- Hors ligne
- </string>
- <text name="display_name_label" value="Nom d&apos;affichage :"/>
- <text name="solo_username_label" value="Nom d&apos;utilisateur :"/>
- <text name="status" value="En ligne"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="Copier dans le presse-papiers"/>
- <text name="user_label" value="Nom d&apos;utilisateur :"/>
- <tab_container name="tabs">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="FAVORIS" name="panel_picks"/>
- <panel label="NOTES/PERSO" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/floater_camera.xml b/indra/newview/skins/default/xui/it/floater_camera.xml
index be4b8e210d..7e6ca4307e 100644
--- a/indra/newview/skins/default/xui/it/floater_camera.xml
+++ b/indra/newview/skins/default/xui/it/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Muovi la telecamera su e giù e a sinistra e destra
</floater.string>
- <floater.string name="camera_modes_title">
- Modalità della fotocamera
- </floater.string>
- <floater.string name="pan_mode_title">
- Ruota visuale - Ingrandisci - Panoramica
- </floater.string>
- <floater.string name="presets_mode_title">
- Visuali predefinite
- </floater.string>
<floater.string name="free_mode_title">
Vedi oggetto
</floater.string>
diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml
index e19b84912a..2db0892cd6 100644
--- a/indra/newview/skins/default/xui/it/notifications.xml
+++ b/indra/newview/skins/default/xui/it/notifications.xml
@@ -978,7 +978,7 @@ Offri l&apos;amicizia a [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Vuoi rimuovere [NAME] dalla lista dei tuoi amici?
+ Vuoi rimuovere &lt;nolink&gt;[NAME]&lt;/nolink&gt; dalla lista dei tuoi amici?
<usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2125,10 +2125,10 @@ Verrà avviato il browser Web.
Oggetto: [SUBJECT], Messaggio: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] è Online
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; è Online
</notification>
<notification name="FriendOffline">
- [NAME] è Offline
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; è Offline
</notification>
<notification name="AddSelfFriend">
Anche se sei molto simpatico, non puoi aggiungere te stesso all&apos;elenco degli amici.
@@ -2520,10 +2520,10 @@ Riprova tra qualche istante.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] ha accettato la tua offerta di amicizia.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha accettato la tua offerta di amicizia.
</notification>
<notification name="FriendshipDeclined">
- [NAME] ha rifiutato la tua offerta di amicizia.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha rifiutato la tua offerta di amicizia.
</notification>
<notification name="FriendshipAcceptedByMe">
Offerta di amicizia accettata.
diff --git a/indra/newview/skins/default/xui/it/panel_my_profile.xml b/indra/newview/skins/default/xui/it/panel_my_profile.xml
deleted file mode 100644
index 094b97962f..0000000000
--- a/indra/newview/skins/default/xui/it/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profilo" name="panel_profile">
- <string name="no_partner_text" value="Nessuno"/>
- <string name="no_group_text" value="Nessuno"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nome utente
- </text>
- <text name="name_descr_text">
- Nome visualizzato
- </text>
- <button label="Profilo" name="see_profile_btn" tool_tip="Visualizza profilo per questo avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/panel_notes.xml b/indra/newview/skins/default/xui/it/panel_notes.xml
deleted file mode 100644
index e127138277..0000000000
--- a/indra/newview/skins/default/xui/it/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Note e Privacy" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Le mie note private:"/>
- <text name="status_message2" value="Consenti a questa persona di:"/>
- <check_box label="Vedere se sono online" name="status_check"/>
- <check_box label="Vedermi sulla mappa" name="map_check"/>
- <check_box label="Modificare, eliminare o prendere i miei oggetti" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Aggiungi come amico" name="add_friend" tool_tip="Offri amicizia a questo residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Apri una sessione messaggio istantaneo"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Chiama" name="call" tool_tip="Chiama questo residente"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mappa" name="show_on_map_btn" tool_tip="Mostra il residente sulla mappa"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleport" name="teleport" tool_tip="Offri teleport"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/panel_profile.xml b/indra/newview/skins/default/xui/it/panel_profile.xml
deleted file mode 100644
index 309937c5a0..0000000000
--- a/indra/newview/skins/default/xui/it/panel_profile.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profilo" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=it-IT
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=it
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=it-IT"/>
- <string name="no_partner_text" value="Nessuno"/>
- <string name="no_group_text" value="Nessuno"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Mondo reale:"/>
- </panel>
- <text name="title_member_text" value="Residente dal:"/>
- <text name="title_acc_status_text" value="Stato account:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(recupero)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Gruppi:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Aggiungi come amico" name="add_friend" tool_tip="Offri amicizia a questo residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Apri una sessione messaggio istantaneo"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Chiama" name="call" tool_tip="Chiama questo residente"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleport" name="teleport" tool_tip="Offri teleport"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="â–¼" name="overflow_btn" tool_tip="Paga del denaro o condividi qualcosa dall&apos;inventario con il residente"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Modifica profilo" name="edit_profile_btn" tool_tip="Modifica le tue informazioni personali"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/panel_profile_view.xml b/indra/newview/skins/default/xui/it/panel_profile_view.xml
deleted file mode 100644
index 409eb5d1f4..0000000000
--- a/indra/newview/skins/default/xui/it/panel_profile_view.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Online
- </string>
- <string name="status_offline">
- Offline
- </string>
- <text name="display_name_label" value="Nome visualizzato:"/>
- <text name="solo_username_label" value="Nome utente:"/>
- <text name="status" value="Online"/>
- <text name="user_name_small" value="Jack guarda quanto è lungo questo splendido nome"/>
- <text name="user_name" value="Jack Linden"/>
- <button name="copy_to_clipboard" tool_tip="Copia negli appunti"/>
- <text name="user_label" value="Nome utente:"/>
- <text name="user_slid" value="jack.linden"/>
- <tab_container name="tabs">
- <panel label="PROFILO" name="panel_profile"/>
- <panel label="LUOGHI CONSIGLIATI" name="panel_picks"/>
- <panel label="NOTE E PRIVACY" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/floater_camera.xml b/indra/newview/skins/default/xui/ja/floater_camera.xml
index 5d3a048975..0661e17309 100644
--- a/indra/newview/skins/default/xui/ja/floater_camera.xml
+++ b/indra/newview/skins/default/xui/ja/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
カメラを上下左å³ã«ç§»å‹•
</floater.string>
- <floater.string name="camera_modes_title">
- カメラモード
- </floater.string>
- <floater.string name="pan_mode_title">
- 旋回 - ズーム - 水平・垂直移動
- </floater.string>
- <floater.string name="presets_mode_title">
- 事å‰è¨­å®šã®è¦–野
- </floater.string>
<floater.string name="free_mode_title">
オブジェクトを見る
</floater.string>
diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml
index 85f09b4500..7dfa6d2f7a 100644
--- a/indra/newview/skins/default/xui/ja/notifications.xml
+++ b/indra/newview/skins/default/xui/ja/notifications.xml
@@ -1010,7 +1010,7 @@ L$ ã¯è¿”金ã•ã‚Œã¾ã›ã‚“。
</form>
</notification>
<notification name="RemoveFromFriends">
- フレンドリストã‹ã‚‰ [NAME] を削除ã—ã¾ã™ã‹ï¼Ÿ
+ フレンドリストã‹ã‚‰ &lt;nolink&gt;[NAME]&lt;/nolink&gt; を削除ã—ã¾ã™ã‹ï¼Ÿ
<usetemplate name="okcancelbuttons" notext="å–り消ã—" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2167,10 +2167,10 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã
件å: [SUBJECT]ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ï¼š [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] ã¯ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ä¸­ã§ã™
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ã¯ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ä¸­ã§ã™
</notification>
<notification name="FriendOffline">
- [NAME] ã¯ã‚ªãƒ•ãƒ©ã‚¤ãƒ³ä¸­ã§ã™
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ã¯ã‚ªãƒ•ãƒ©ã‚¤ãƒ³ä¸­ã§ã™
</notification>
<notification name="AddSelfFriend">
残念ãªãŒã‚‰è‡ªåˆ†è‡ªèº«ã‚’フレンド登録ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。
@@ -2567,10 +2567,10 @@ Web ページã«ãƒªãƒ³ã‚¯ã™ã‚‹ã¨ã€ä»–人ãŒã“ã®å ´æ‰€ã«ç°¡å˜ã«ã‚¢ã‚¯ã‚»ã
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME]ã¯ã€ãƒ•ãƒ¬ãƒ³ãƒ‰ç™»éŒ²ã‚’å—ã‘入れã¾ã—ãŸã€‚
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt;ã¯ã€ãƒ•ãƒ¬ãƒ³ãƒ‰ç™»éŒ²ã‚’å—ã‘入れã¾ã—ãŸã€‚
</notification>
<notification name="FriendshipDeclined">
- [NAME]ã¯ã€ãƒ•ãƒ¬ãƒ³ãƒ‰ç™»éŒ²ã‚’æ–­ã‚Šã¾ã—ãŸã€‚
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt;ã¯ã€ãƒ•ãƒ¬ãƒ³ãƒ‰ç™»éŒ²ã‚’æ–­ã‚Šã¾ã—ãŸã€‚
</notification>
<notification name="FriendshipAcceptedByMe">
フレンドã®ç™»éŒ²ä¾é ¼ãŒæ‰¿èªã•ã‚Œã¾ã—ãŸã€‚
diff --git a/indra/newview/skins/default/xui/ja/panel_my_profile.xml b/indra/newview/skins/default/xui/ja/panel_my_profile.xml
deleted file mode 100644
index a0d99ba5a8..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="プロフィール" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=ja
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/billing.php?lang=ja
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="ãªã—"/>
- <string name="no_group_text" value="ãªã—"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- ユーザーå
- </text>
- <text name="name_descr_text">
- 表示å
- </text>
- <button label="プロフィール" name="see_profile_btn" tool_tip="ã“ã®ã‚¢ãƒã‚¿ãƒ¼ã®ãƒ—ロフィールを表示"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_notes.xml b/indra/newview/skins/default/xui/ja/panel_notes.xml
deleted file mode 100644
index aa6d823c59..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="メモã¨ãƒ—ライãƒã‚·ãƒ¼" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="個人的メモ:"/>
- <text name="status_message2" value="ã“ã®äººã«è¨±å¯ï¼š"/>
- <check_box label="オンライン状態ã®ç¢ºèª" name="status_check"/>
- <check_box label="地図ã§å±…場所を確èª" name="map_check"/>
- <check_box label="ç§ã®ã‚ªãƒ–ジェクトã®ç·¨é›†ãƒ»å‰Šé™¤ãƒ»å–å¾—" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="フレンド登録" name="add_friend" tool_tip="フレンド登録を申ã—出ã¾ã™"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="インスタントメッセージを開ãã¾ã™"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="コール" name="call" tool_tip="ã“ã®ä½äººã«ã‚³ãƒ¼ãƒ«ã™ã‚‹"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="地図" name="show_on_map_btn" tool_tip="ä½äººã‚’地図上ã§è¡¨ç¤ºã™ã‚‹"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="テレãƒãƒ¼ãƒˆ" name="teleport" tool_tip="テレãƒãƒ¼ãƒˆã‚’é€ã‚Šã¾ã™"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_profile.xml b/indra/newview/skins/default/xui/ja/panel_profile.xml
deleted file mode 100644
index 1acad9f81a..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_profile.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="プロフィール" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=ja-JP
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=ja
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=ja-JP"/>
- <string name="no_partner_text" value="ãªã—"/>
- <string name="no_group_text" value="ãªã—"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="ç¾å®Ÿä¸–界:"/>
- </panel>
- <text name="title_member_text" value="ä½äººç™»éŒ²ï¼š"/>
- <text name="title_acc_status_text" value="アカウントã®çŠ¶æ…‹ï¼š"/>
- <text_editor name="acc_status_text">
- ä½äººã€‚ 支払情報未登録。
- リンデン。
- </text_editor>
- <text name="title_partner_text" value="パートナー:"/>
- <panel name="partner_data_panel">
- <text initial_value="(å–得中)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="グループ:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="フレンド登録" name="add_friend" tool_tip="フレンド登録を申ã—出ã¾ã™"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="インスタントメッセージを開ãã¾ã™"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="コール" name="call" tool_tip="ã“ã®ä½äººã«ã‚³ãƒ¼ãƒ«ã™ã‚‹"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="テレãƒãƒ¼ãƒˆ" name="teleport" tool_tip="テレãƒãƒ¼ãƒˆã‚’é€ã‚Šã¾ã™"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="â–¼" name="overflow_btn" tool_tip="ä½äººã«ãŠé‡‘を渡ã™ã‹æŒã¡ç‰©ã‚’共有ã—ã¾ã™"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="プロフィールã®ç·¨é›†" name="edit_profile_btn" tool_tip="個人的ãªæƒ…報を編集ã—ã¾ã™"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_profile_view.xml b/indra/newview/skins/default/xui/ja/panel_profile_view.xml
deleted file mode 100644
index 5cb6575773..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_profile_view.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- オンライン
- </string>
- <string name="status_offline">
- オフライン
- </string>
- <text name="display_name_label" value="表示å:"/>
- <text name="solo_username_label" value="ユーザーå:"/>
- <text name="status" value="オンライン"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <text name="user_name" value="Jack Linden"/>
- <button name="copy_to_clipboard" tool_tip="クリップボードã«ã‚³ãƒ”ー"/>
- <text name="user_label" value="ユーザーå:"/>
- <text name="user_slid" value="jack.linden"/>
- <tab_container name="tabs">
- <panel label="プロフィール" name="panel_profile"/>
- <panel label="ピック" name="panel_picks"/>
- <panel label="メモã¨ãƒ—ライãƒã‚·ãƒ¼" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/floater_camera.xml b/indra/newview/skins/default/xui/pl/floater_camera.xml
index 5b9dd47616..60f3cd0fff 100644
--- a/indra/newview/skins/default/xui/pl/floater_camera.xml
+++ b/indra/newview/skins/default/xui/pl/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Poruszaj kamerą w dół/górę oraz w prawo/lewo
</floater.string>
- <floater.string name="camera_modes_title">
- Ustawienia
- </floater.string>
- <floater.string name="pan_mode_title">
- W prawo lub w lewo
- </floater.string>
- <floater.string name="presets_mode_title">
- Ustaw widok
- </floater.string>
<floater.string name="free_mode_title">
Zobacz obiekt
</floater.string>
diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml
index 7d3225ea31..e1fb6dd3f1 100644
--- a/indra/newview/skins/default/xui/pl/notifications.xml
+++ b/indra/newview/skins/default/xui/pl/notifications.xml
@@ -946,7 +946,7 @@ Zaproponować znajomość [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Czy chcesz usunąć [NAME] z listy znajomych?
+ Czy chcesz usunąć &lt;nolink&gt;[NAME]&lt;/nolink&gt; z listy znajomych?
<usetemplate name="okcancelbuttons" notext="Anuluj" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2078,10 +2078,10 @@ Zamieść go na stronie internetowej żeby umożliwić innym łatwy dostęp do t
Temat: [SUBJECT], Treść: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] jest w Second Life
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; jest w Second Life
</notification>
<notification name="FriendOffline">
- [NAME] opuszcza Second Life
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; opuszcza Second Life
</notification>
<notification name="AddSelfFriend">
Nie możesz dodać siebie do listy znajomych.
@@ -2458,10 +2458,10 @@ Spróbuj ponowanie za kilka minut.
</form>
</notification>
<notification name="FriendshipAccepted">
- Twoja propozycja znajomości została przyjęta przez [NAME].
+ Twoja propozycja znajomości została przyjęta przez &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</notification>
<notification name="FriendshipDeclined">
- Twoja propozycja znajomości została odrzucona przez [NAME].
+ Twoja propozycja znajomości została odrzucona przez &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</notification>
<notification name="FriendshipAcceptedByMe">
Propozycja znajomości została zaakceptowana.
diff --git a/indra/newview/skins/default/xui/pl/panel_my_profile.xml b/indra/newview/skins/default/xui/pl/panel_my_profile.xml
deleted file mode 100644
index cdc833241d..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Żadne"/>
- <string name="no_group_text" value="Żadne"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nazwa użytkownika
- </text>
- <text name="name_descr_text">
- Wyświetlana nazwa
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Zobacz profil tego awatara"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/panel_notes.xml b/indra/newview/skins/default/xui/pl/panel_notes.xml
deleted file mode 100644
index 571171d64c..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notatki &amp; Prywatność" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Notatki:"/>
- <text name="status_message2" value="Pozwól tej osobie na:"/>
- <check_box label="Widzenie mojego statusu" name="status_check"/>
- <check_box label="Lokalizowanie mnie na mapie" name="map_check"/>
- <check_box label="Edytowanie, kasowanie lub zabieranie moich obiektów" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Dodaj do Znajomych" name="add_friend" tool_tip="Zaoferuj znajomość Rezydentowi"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Otwórz wiadomości IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Dzwoń" name="call" tool_tip="Zadzwoń do Rezydenta"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mapa" name="show_on_map_btn" tool_tip="Pokaż Rezydenta na mapie"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleportuj" name="teleport" tool_tip="Teleportuj"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/panel_profile.xml b/indra/newview/skins/default/xui/pl/panel_profile.xml
deleted file mode 100644
index 77dd951bc4..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_profile.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Brak"/>
- <string name="no_group_text" value="Żadne"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Życie#1:"/>
- </panel>
- <text name="title_member_text" value="Urodziny:"/>
- <text name="title_acc_status_text" value="Konto:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(przetwarzanie)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupy:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Poznaj" name="add_friend" tool_tip="Zaproponuj znajomość Rezydentowi"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Otwórz wiadomości IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Dzwoń" name="call" tool_tip="Zadzwoń do tego Rezydenta"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleportuj" name="teleport" tool_tip="Teleportuj"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Zapłać lub udostępnij obiekt Rezydentowi"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Edytuj profil" name="edit_profile_btn" tool_tip="Edytuj informacje o sobie"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/panel_profile_view.xml b/indra/newview/skins/default/xui/pl/panel_profile_view.xml
deleted file mode 100644
index 1fd6bc1d10..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Obecnie w SL
- </string>
- <string name="status_offline">
- Nieaktywny
- </string>
- <text name="display_name_label" value="Wyświetlana nazwa:"/>
- <text name="solo_username_label" value="Nazwa użytkownika:"/>
- <text name="status" value="Obecnie w SL"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="Kopiuj do schowka"/>
- <text name="user_label" value="Nazwa użytkownika:"/>
- <tab_container name="tabs">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="ULUBIONE" name="panel_picks"/>
- <panel label="NOTATKI &amp; PRYWATNOŚĆ" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/floater_camera.xml b/indra/newview/skins/default/xui/pt/floater_camera.xml
index 0e4fc1b455..6b66d01781 100644
--- a/indra/newview/skins/default/xui/pt/floater_camera.xml
+++ b/indra/newview/skins/default/xui/pt/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Mover a Câmera para Cima e para Baixo, para a Esquerda e para a Direita
</floater.string>
- <floater.string name="camera_modes_title">
- Modos de câmera
- </floater.string>
- <floater.string name="pan_mode_title">
- Pan zoom orbital
- </floater.string>
- <floater.string name="presets_mode_title">
- Ângulos predefinidos
- </floater.string>
<floater.string name="free_mode_title">
Visualizar objeto
</floater.string>
diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml
index 4bd9f86e0f..d3547beeb3 100644
--- a/indra/newview/skins/default/xui/pt/notifications.xml
+++ b/indra/newview/skins/default/xui/pt/notifications.xml
@@ -973,7 +973,7 @@ Oferecer amizade para [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Remover [NAME] da sua lista de amigos?
+ Remover &lt;nolink&gt;[NAME]&lt;/nolink&gt; da sua lista de amigos?
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Remover"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2109,10 +2109,10 @@ Isso abrirá o seu navegador.
Assunto: [SUBJECT], Mensagem: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] está online
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está online
</notification>
<notification name="FriendOffline">
- [NAME] está offline
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está offline
</notification>
<notification name="AddSelfFriend">
Você é o máximo! Mesmo assim, não dá para adicionar a si mesmo(a) como amigo(a).
@@ -2501,10 +2501,10 @@ Cada um pode ver o status do outro (definição padrão).
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] aceitou seu convite de amizade.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; aceitou seu convite de amizade.
</notification>
<notification name="FriendshipDeclined">
- [NAME] recusou seu convite de amizade
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; recusou seu convite de amizade
</notification>
<notification name="FriendshipAcceptedByMe">
Oferta de amizada aceita.
diff --git a/indra/newview/skins/default/xui/pt/panel_my_profile.xml b/indra/newview/skins/default/xui/pt/panel_my_profile.xml
deleted file mode 100644
index aa15a2445d..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="no_partner_text" value="Nenhum"/>
- <string name="no_group_text" value="Nenhum"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nome de usuário
- </text>
- <text name="name_descr_text">
- Nome de tela
- </text>
- <button label="Perfil" name="see_profile_btn" tool_tip="Ver o perfil deste avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_notes.xml b/indra/newview/skins/default/xui/pt/panel_notes.xml
deleted file mode 100644
index c15e838b34..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Anotações e Privacidade" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Minhas anotações privadas:"/>
- <text name="status_message2" value="Deixar esta pessoa:"/>
- <check_box label="Ver meu status" name="status_check"/>
- <check_box label="Ver minha localização no mapa" name="map_check"/>
- <check_box label="Pegar, editar ou excluir objetos meus" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Adicionar amigo" name="add_friend" tool_tip="Oferecer amizade ao residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir sessão de mensagem instantânea"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ligar" name="call" tool_tip="Ligar para este residente"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mapa" name="show_on_map_btn" tool_tip="Exibir o residente no mapa"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teletransportar" name="teleport" tool_tip="Oferecer teletransporte"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_profile.xml b/indra/newview/skins/default/xui/pt/panel_profile.xml
deleted file mode 100644
index 075ef55dee..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_profile.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=pt-BR
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=pt
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=pt-BR"/>
- <string name="no_partner_text" value="Ninguém"/>
- <string name="no_group_text" value="Nenhum"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Mundo real:"/>
- </panel>
- <text name="title_member_text" value="Residente desde:"/>
- <text name="title_acc_status_text" value="Conta:"/>
- <text name="title_partner_text" value="Parceiro(a):"/>
- <panel name="partner_data_panel">
- <text initial_value="(pesquisando)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupos:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Adicionar amigo" name="add_friend" tool_tip="Oferecer amizade ao residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir sessão de mensagem instantânea"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ligar" name="call" tool_tip="Ligar para este residente"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teletransportar" name="teleport" tool_tip="Oferecer teletransporte"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Pagar ou compartilhar inventário com o residente"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Editar perfil" name="edit_profile_btn" tool_tip="Editar dados pessoais"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_profile_view.xml b/indra/newview/skins/default/xui/pt/panel_profile_view.xml
deleted file mode 100644
index d81ee08e6c..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Conectado
- </string>
- <string name="status_offline">
- Desconectado
- </string>
- <text name="display_name_label" value="Nome de tela:"/>
- <text name="solo_username_label" value="Nome de usuário:"/>
- <text name="status" value="Conectado"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="Copiar para área de transferência"/>
- <text name="user_label" value="Nome de usuário:"/>
- <tab_container name="tabs">
- <panel label="PERFIL" name="panel_profile"/>
- <panel label="DESTAQUES" name="panel_picks"/>
- <panel label="ANOTAÇÕES E PRIVACIDADE" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/ru/floater_camera.xml b/indra/newview/skins/default/xui/ru/floater_camera.xml
index 7a1f530668..945a63c0eb 100644
--- a/indra/newview/skins/default/xui/ru/floater_camera.xml
+++ b/indra/newview/skins/default/xui/ru/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
ПеремеÑтить камеру вверх, вниз, влево или вправо
</floater.string>
- <floater.string name="camera_modes_title">
- Режимы камеры
- </floater.string>
- <floater.string name="pan_mode_title">
- Вращение, приближение, Ñдвиг
- </floater.string>
- <floater.string name="presets_mode_title">
- Стандартные наÑтройки
- </floater.string>
<floater.string name="free_mode_title">
Смотреть на объект
</floater.string>
diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml
index d43d907164..1be14160ed 100644
--- a/indra/newview/skins/default/xui/ru/notifications.xml
+++ b/indra/newview/skins/default/xui/ru/notifications.xml
@@ -979,7 +979,7 @@
</form>
</notification>
<notification name="RemoveFromFriends">
- Удалить Ð¶Ð¸Ñ‚ÐµÐ»Ñ [NAME] из вашего ÑпиÑка друзей?
+ Удалить Ð¶Ð¸Ñ‚ÐµÐ»Ñ &lt;nolink&gt;[NAME]&lt;/nolink&gt; из вашего ÑпиÑка друзей?
<usetemplate name="okcancelbuttons" notext="Отмена" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2119,10 +2119,10 @@ http://secondlife.com/download.
Раздел: [SUBJECT], Ñообщение: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] в Ñети
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; в Ñети
</notification>
<notification name="FriendOffline">
- [NAME] не в Ñети
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; не в Ñети
</notification>
<notification name="AddSelfFriend">
Ð’Ñ‹ лучше вÑех, но Ð½ÐµÐ»ÑŒÐ·Ñ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ в Ð´Ñ€ÑƒÐ·ÑŒÑ ÑÐµÐ±Ñ Ñамого.
@@ -2518,10 +2518,10 @@ http://secondlife.com/download.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] принÑл(а) ваше предложение дружить.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; принÑл(а) ваше предложение дружить.
</notification>
<notification name="FriendshipDeclined">
- [NAME] отклонил(а) ваше предложение дружить.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; отклонил(а) ваше предложение дружить.
</notification>
<notification name="FriendshipAcceptedByMe">
Предложение дружить принÑто.
diff --git a/indra/newview/skins/default/xui/ru/panel_my_profile.xml b/indra/newview/skins/default/xui/ru/panel_my_profile.xml
deleted file mode 100644
index 9117bfec18..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Профиль" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Ðет"/>
- <string name="no_group_text" value="Ðет"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ
- </text>
- <text name="name_descr_text">
- Экранное имÑ
- </text>
- <button label="Профиль" name="see_profile_btn" tool_tip="ПоÑмотреть профиль Ñтого аватара"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ru/panel_notes.xml b/indra/newview/skins/default/xui/ru/panel_notes.xml
deleted file mode 100644
index aa74383349..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Заметки и приватноÑÑ‚ÑŒ" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Мои личные заметки:"/>
- <text name="status_message2" value="Разрешить Ñтому жителю:"/>
- <check_box label="Видеть мой ÑÑ‚Ð°Ñ‚ÑƒÑ Ð² Ñети" name="status_check"/>
- <check_box label="Видеть Ð¼ÐµÐ½Ñ Ð½Ð° карте" name="map_check"/>
- <check_box label="Редактировать, удалÑÑ‚ÑŒ или брать мои объекты" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Добавить в друзьÑ" name="add_friend" tool_tip="Предложить дружбу Ñтому жителю"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Ðачать ÑÐµÐ°Ð½Ñ IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Звонок" name="call" tool_tip="Позвонить Ñтому жителю"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Карта" name="show_on_map_btn" tool_tip="Показать Ð¶Ð¸Ñ‚ÐµÐ»Ñ Ð½Ð° карте"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="ТелепортациÑ" name="teleport" tool_tip="Предложить телепортацию"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ru/panel_profile.xml b/indra/newview/skins/default/xui/ru/panel_profile.xml
deleted file mode 100644
index fab57d678c..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_profile.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Профиль" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Ðет"/>
- <string name="no_group_text" value="Ðет"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Реальный мир:"/>
- </panel>
- <text name="title_member_text" value="Обитатель SL Ñ:"/>
- <text name="title_acc_status_text" value="Ð¡Ñ‚Ð°Ñ‚ÑƒÑ Ð°ÐºÐºÐ°ÑƒÐ½Ñ‚Ð°:"/>
- <text name="title_partner_text" value="Партнер:"/>
- <panel name="partner_data_panel">
- <text initial_value="(получение информации)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Группы:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Ð’ друзьÑ" name="add_friend" tool_tip="Предложить дружбу Ñтому жителю"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Ðачать ÑÐµÐ°Ð½Ñ IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Звонок" name="call" tool_tip="Позвонить Ñтому жителю"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="ТелепортациÑ" name="teleport" tool_tip="Предложить телепортацию"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="â–¼" name="overflow_btn" tool_tip="Заплатить жителю или поделитьÑÑ Ñ Ð½Ð¸Ð¼ вещами"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ru/panel_profile_view.xml b/indra/newview/skins/default/xui/ru/panel_profile_view.xml
deleted file mode 100644
index c97c5afc01..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Онлайн
- </string>
- <string name="status_offline">
- Оффлайн
- </string>
- <text name="display_name_label" value="Экранное имÑ:"/>
- <text name="solo_username_label" value="Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ:"/>
- <text name="status" value="Онлайн"/>
- <text name="user_name_small" value="ВзглÑни-ка, друг, какое длиннющее имÑ"/>
- <button name="copy_to_clipboard" tool_tip="Копировать в буфер обмена"/>
- <text name="user_label" value="Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ:"/>
- <tab_container name="tabs">
- <panel label="ПРОФИЛЬ" name="panel_profile"/>
- <panel label="ПОДБОРКÐ" name="panel_picks"/>
- <panel label="ЗÐМЕТКИ И ДОСТУП" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/floater_camera.xml b/indra/newview/skins/default/xui/tr/floater_camera.xml
index 4161e6ea52..c92d4e9db4 100644
--- a/indra/newview/skins/default/xui/tr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/tr/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Kamerayı Yukarı ve Aşağı, Sola ve Sağa Hareket Ettir
</floater.string>
- <floater.string name="camera_modes_title">
- Kamera modları
- </floater.string>
- <floater.string name="pan_mode_title">
- Yörünge - Yakınlş. - Kamerayı Çvr.
- </floater.string>
- <floater.string name="presets_mode_title">
- Ön Ayarlı Görünümler
- </floater.string>
<floater.string name="free_mode_title">
Nesneyi Göster
</floater.string>
diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml
index b62ff01ab9..6908f6867f 100644
--- a/indra/newview/skins/default/xui/tr/notifications.xml
+++ b/indra/newview/skins/default/xui/tr/notifications.xml
@@ -979,7 +979,7 @@ Etkin grubunuz adına arazi satın almak için gerekli izne sahip değilsiniz.
</form>
</notification>
<notification name="RemoveFromFriends">
- [NAME] adlı kişiyi Arkadaş Listenizden çıkarmak istiyor musunuz?
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; adlı kişiyi Arkadaş Listenizden çıkarmak istiyor musunuz?
<usetemplate name="okcancelbuttons" notext="Ä°ptal" yestext="Tamam"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2119,10 +2119,10 @@ Bu adımda web tarayıcınızın başlatılacağına dikkat edin.
Konu: [SUBJECT], Ä°leti: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] Çevrimiçi
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; Çevrimiçi
</notification>
<notification name="FriendOffline">
- [NAME] Çevrimdışı
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; Çevrimdışı
</notification>
<notification name="AddSelfFriend">
Çok iyi biri olduğunuza eminiz fakat kendinizi arkadaş olarak ekleyemezsiniz.
@@ -2518,10 +2518,10 @@ Lütfen biraz sonra tekrar deneyin.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] arkadaşlık teklifinizi kabul etti.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; arkadaşlık teklifinizi kabul etti.
</notification>
<notification name="FriendshipDeclined">
- [NAME] arkadaşlık teklifinizi reddetti.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; arkadaşlık teklifinizi reddetti.
</notification>
<notification name="FriendshipAcceptedByMe">
Arkadaşlık teklifi kabul edildi.
diff --git a/indra/newview/skins/default/xui/tr/panel_my_profile.xml b/indra/newview/skins/default/xui/tr/panel_my_profile.xml
deleted file mode 100644
index fc0b9b6e03..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Hiçbiri"/>
- <string name="no_group_text" value="Hiçbiri"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Kullanıcı adı
- </text>
- <text name="name_descr_text">
- Görüntü Adı
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Bu avatar profiline bak"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/panel_notes.xml b/indra/newview/skins/default/xui/tr/panel_notes.xml
deleted file mode 100644
index ff5b60996a..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notlar ve Gizlilik" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Özel notlarım:"/>
- <text name="status_message2" value="Bu kiÅŸiye ÅŸu izinler verilsin:"/>
- <check_box label="Çevrimiçi durumumu görme" name="status_check"/>
- <check_box label="Beni haritada görme" name="map_check"/>
- <check_box label="Nesnelerimi düzenleme, silme veya alma" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Arkadaş Ekle" name="add_friend" tool_tip="Sakine arkadaşlık öner"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="Aİ" name="im" tool_tip="Anlık ileti oturumu aç"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ara" name="call" tool_tip="Bu Sakini ara"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Harita" name="show_on_map_btn" tool_tip="Sakini haritada göster"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Işınla" name="teleport" tool_tip="Işınlama teklif et"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/panel_profile.xml b/indra/newview/skins/default/xui/tr/panel_profile.xml
deleted file mode 100644
index 4b7a964537..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_profile.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Hiçbiri"/>
- <string name="no_group_text" value="Hiçbiri"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Gerçek Dünya:"/>
- </panel>
- <text name="title_member_text" value="Ne Zamandan Beri SL Sakini:"/>
- <text name="title_acc_status_text" value="Hesap Durumu:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(alınıyor)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Gruplar:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Arkadaş Ekle" name="add_friend" tool_tip="Sakine arkadaşlık öner"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="Aİ" name="im" tool_tip="Anlık ileti oturumu aç"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ara" name="call" tool_tip="Bu Sakini ara"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Işınla" name="teleport" tool_tip="Işınlama teklif et"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Sakine para öde veya envanteri paylaş"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/panel_profile_view.xml b/indra/newview/skins/default/xui/tr/panel_profile_view.xml
deleted file mode 100644
index 17c5002bd7..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Çevrimiçi
- </string>
- <string name="status_offline">
- Çevrimdışı
- </string>
- <text name="display_name_label" value="Ekran Adı:"/>
- <text name="solo_username_label" value="Kullanıcı Adı:"/>
- <text name="status" value="Çevrimiçi"/>
- <text name="user_name_small" value="Bak arkadaşım bu çok uzun bir ad"/>
- <button name="copy_to_clipboard" tool_tip="Panoya Kopyala"/>
- <text name="user_label" value="Kullanıcı Adı:"/>
- <tab_container name="tabs">
- <panel label="PROFÄ°L" name="panel_profile"/>
- <panel label="SEÇMELER" name="panel_picks"/>
- <panel label="NOTLAR &amp; GÄ°ZLÄ°LÄ°K" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/floater_camera.xml b/indra/newview/skins/default/xui/zh/floater_camera.xml
index f4db20684c..b75474340c 100644
--- a/indra/newview/skins/default/xui/zh/floater_camera.xml
+++ b/indra/newview/skins/default/xui/zh/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Move Camera Up and Down, Left and Right
</floater.string>
- <floater.string name="camera_modes_title">
- æ”影機模å¼
- </floater.string>
- <floater.string name="pan_mode_title">
- 環繞縮放平移
- </floater.string>
- <floater.string name="presets_mode_title">
- é è¨­è¦–角
- </floater.string>
<floater.string name="free_mode_title">
視角物件
</floater.string>
diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml
index 2d309a2af0..17ff6288a5 100644
--- a/indra/newview/skins/default/xui/zh/notifications.xml
+++ b/indra/newview/skins/default/xui/zh/notifications.xml
@@ -966,7 +966,7 @@ Offer friendship to [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Do you want to remove [NAME] from your Friends List?
+ Do you want to remove &lt;nolink&gt;[NAME]&lt;/nolink&gt; from your Friends List?
<usetemplate name="okcancelbuttons" notext="å–消" yestext="確定"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2109,10 +2109,10 @@ Link to this from a web page to give others easy access to this location, or try
Topic: [SUBJECT], Message: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] 上線
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; 上線
</notification>
<notification name="FriendOffline">
- [NAME] 離線
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; 離線
</notification>
<notification name="AddSelfFriend">
Although you&apos;re very nice, you can&apos;t add yourself as a friend.
@@ -2491,10 +2491,10 @@ Please try again in a few moments.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] accepted your friendship offer.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; accepted your friendship offer.
</notification>
<notification name="FriendshipDeclined">
- [NAME] è¬çµ•ä½ çš„交å‹é‚€è«‹ã€‚
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; è¬çµ•ä½ çš„交å‹é‚€è«‹ã€‚
</notification>
<notification name="FriendshipAcceptedByMe">
交å‹é‚€è«‹è¢«æŽ¥å—。
diff --git a/indra/newview/skins/default/xui/zh/panel_my_profile.xml b/indra/newview/skins/default/xui/zh/panel_my_profile.xml
deleted file mode 100644
index 79817d7be9..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="檔案" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="ç„¡"/>
- <string name="no_group_text" value="ç„¡"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- User name
- </text>
- <text name="name_descr_text">
- 顯示å稱
- </text>
- <button label="檔案" name="see_profile_btn" tool_tip="察看這ä½åŒ–身的檔案"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_notes.xml b/indra/newview/skins/default/xui/zh/panel_notes.xml
deleted file mode 100644
index 875c6bb328..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notes &amp; Privacy" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="My private notes:"/>
- <text name="status_message2" value="å…許這個人å¯ä»¥ï¼š"/>
- <check_box label="看到我上線狀態" name="status_check"/>
- <check_box label="在地圖上看見我" name="map_check"/>
- <check_box label="邊輯,刪除或å–下我的物件" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="加為朋å‹" name="add_friend" tool_tip="å‘這個居民æ出交å‹é‚€è«‹"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="é–‹å•Ÿå³æ™‚訊æ¯æœƒè©±"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="通話" name="call" tool_tip="與這ä½å±…民通話"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="地圖" name="show_on_map_btn" tool_tip="在地圖上顯示這個居民"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="瞬間傳é€" name="teleport" tool_tip="發給瞬間傳é€è«‹æ±‚"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_profile.xml b/indra/newview/skins/default/xui/zh/panel_profile.xml
deleted file mode 100644
index 502449ac3a..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_profile.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="檔案" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="ç„¡"/>
- <string name="no_group_text" value="ç„¡"/>
- <string name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <string name="name_text_args">
- [NAME]
- </string>
- <string name="display_name_text_args">
- [DISPLAY_NAME]
- </string>
- <layout_stack name="layout">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="真實世界:"/>
- </panel>
- <text name="title_member_text" value="æˆç‚ºå±…民自:"/>
- <text name="title_acc_status_text" value="帳戶狀態:"/>
- <text name="title_partner_text" value="é…å¶ï¼š"/>
- <panel name="partner_data_panel">
- <text initial_value="(檢索中)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="群組:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="加為朋å‹" name="add_friend" tool_tip="發出交å‹é‚€è«‹çµ¦é€™å±…æ°‘"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="é–‹å•Ÿå³æ™‚訊æ¯æœƒè©±"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="通話" name="call" tool_tip="與這ä½å±…民通話"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="瞬間傳é€" name="teleport" tool_tip="發給瞬間傳é€è«‹æ±‚"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="â–¼" name="overflow_btn" tool_tip="支付金錢,或分享收ç´å€çµ¦å±…æ°‘"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_profile_view.xml b/indra/newview/skins/default/xui/zh/panel_profile_view.xml
deleted file mode 100644
index 2684287692..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- 上線
- </string>
- <string name="status_offline">
- 離線
- </string>
- <text name="display_name_label" value="顯示å稱:"/>
- <text name="solo_username_label" value="使用者å稱:"/>
- <text name="status" value="上線"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="覆製到剪貼簿"/>
- <text name="user_label" value="使用者å稱:"/>
- <tab_container name="tabs">
- <panel label="檔案" name="panel_profile"/>
- <panel label="ç²¾é¸åœ°é»ž" name="panel_picks"/>
- <panel label="NOTES &amp; PRIVACY" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/tests/gpus_results.txt b/indra/newview/tests/gpus_results.txt
index 7e9a064921..68e2e688cb 100644
--- a/indra/newview/tests/gpus_results.txt
+++ b/indra/newview/tests/gpus_results.txt
@@ -1,6 +1,6 @@
GPU String Supported? Class Recognizer
------------------------------------------------------------------------------------------------------ ----------- ----- ------------------------------------
-ATI UNRECOGNIZED
+ATI NO MATCH
ATI 3D-Analyze unsupported 0 ATI 3D-Analyze
ATI ASUS A9xxx supported 1 ATI ASUS A9xxx
ATI ASUS AH24xx supported 1 ATI ASUS AH24xx
@@ -25,8 +25,8 @@ ATI All-in-Wonder X1800
ATI All-in-Wonder X1900 supported 3 ATI All-in-Wonder X1900
ATI All-in-Wonder X600 supported 1 ATI All-in-Wonder X600
ATI All-in-Wonder X800 supported 2 ATI All-in-Wonder X800
-ATI Diamond X1xxx supported 0 ATI Radeon X1xxx
-ATI Display Adapter UNRECOGNIZED
+ATI Diamond X1xxx supported 1 ATI Radeon X1xxx
+ATI Display Adapter supported 0 ATI Display Adapter
ATI FireGL supported 0 ATI FireGL
ATI FireGL 5200 supported 0 ATI FireGL
ATI FireGL 5xxx supported 0 ATI FireGL
@@ -40,7 +40,7 @@ ATI M56
ATI M71 supported 1 ATI M71
ATI M72 supported 1 ATI M72
ATI M76 supported 3 ATI M76
-ATI Mobility Radeon supported 0 ATI Mobility Radeon
+ATI Mobility Radeon supported 0 ATI Radeon
ATI Mobility Radeon 7xxx supported 0 ATI Mobility Radeon 7xxx
ATI Mobility Radeon 9600 supported 0 ATI Mobility Radeon 9600
ATI Mobility Radeon 9700 supported 1 ATI Mobility Radeon 9700
@@ -57,14 +57,14 @@ ATI Mobility Radeon HD 4300
ATI Mobility Radeon HD 4500 supported 3 ATI Mobility Radeon HD 4500
ATI Mobility Radeon HD 4600 supported 3 ATI Mobility Radeon HD 4600
ATI Mobility Radeon HD 4800 supported 3 ATI Mobility Radeon HD 4800
-ATI Mobility Radeon HD 5400 supported 2 ATI Mobility Radeon HD 5400
-ATI Mobility Radeon HD 5600 supported 2 ATI Mobility Radeon HD 5600
-ATI Mobility Radeon X1xxx supported 0 ATI Radeon X1xxx
-ATI Mobility Radeon X2xxx supported 0 ATI Mobility Radeon X2xxx
-ATI Mobility Radeon X3xx supported 1 ATI Mobility Radeon X3xx
-ATI Mobility Radeon X6xx supported 1 ATI Mobility Radeon X6xx
-ATI Mobility Radeon X7xx supported 1 ATI Mobility Radeon X7xx
-ATI Mobility Radeon Xxxx supported 0 ATI Mobility Radeon Xxxx
+ATI Mobility Radeon HD 5400 supported 3 ATI Mobility Radeon HD 5400
+ATI Mobility Radeon HD 5600 supported 3 ATI Mobility Radeon HD 5600
+ATI Mobility Radeon X1xxx supported 1 ATI Radeon X1xxx
+ATI Mobility Radeon X2xxx supported 1 ATI Radeon X2xxx
+ATI Mobility Radeon X3xx supported 0 ATI Radeon X300
+ATI Mobility Radeon X6xx supported 1 ATI Radeon X600
+ATI Mobility Radeon X7xx supported 1 ATI Radeon X700
+ATI Mobility Radeon Xxxx supported 0 ATI Radeon
ATI RV380 supported 0 ATI RV380
ATI RV530 supported 1 ATI RV530
ATI Radeon 2100 supported 0 ATI Radeon 2100
@@ -86,7 +86,7 @@ ATI Radeon HD 2600
ATI Radeon HD 2900 supported 3 ATI Radeon HD 2900
ATI Radeon HD 3000 supported 0 ATI Radeon HD 3000
ATI Radeon HD 3100 supported 1 ATI Radeon HD 3100
-ATI Radeon HD 3200 supported 0 ATI Radeon HD 3200
+ATI Radeon HD 3200 supported 1 ATI Radeon HD 3200
ATI Radeon HD 3300 supported 1 ATI Radeon HD 3300
ATI Radeon HD 3400 supported 1 ATI Radeon HD 3400
ATI Radeon HD 3600 supported 3 ATI Radeon HD 3600
@@ -103,29 +103,29 @@ ATI Radeon HD 5600
ATI Radeon HD 5700 supported 3 ATI Radeon HD 5700
ATI Radeon HD 5800 supported 3 ATI Radeon HD 5800
ATI Radeon HD 5900 supported 3 ATI Radeon HD 5900
-ATI Radeon HD 6200 supported 2 ATI Radeon HD 6200
-ATI Radeon HD 6300 supported 2 ATI Radeon HD 6300
+ATI Radeon HD 6200 supported 3 ATI Radeon HD 6200
+ATI Radeon HD 6300 supported 3 ATI Radeon HD 6300
ATI Radeon HD 6500 supported 3 ATI Radeon HD 6500
ATI Radeon HD 6800 supported 3 ATI Radeon HD 6800
ATI Radeon HD 6900 supported 3 ATI Radeon HD 6900
-ATI Radeon OpenGL supported 0 ATI Radeon
+ATI Radeon OpenGL unsupported 0 ATI Radeon OpenGL
ATI Radeon RV250 supported 0 ATI Radeon RV250
ATI Radeon RV600 supported 1 ATI Radeon RV600
ATI Radeon RX9550 supported 1 ATI Radeon RX9550
ATI Radeon VE unsupported 0 ATI Radeon VE
-ATI Radeon X1000 supported 0 ATI Radeon X1xxx
-ATI Radeon X1200 supported 0 ATI Radeon X1xxx
-ATI Radeon X1300 supported 0 ATI Radeon X1xxx
-ATI Radeon X13xx supported 0 ATI Radeon X1xxx
-ATI Radeon X1400 supported 0 ATI Radeon X1xxx
-ATI Radeon X1500 supported 0 ATI Radeon X1xxx
-ATI Radeon X1600 supported 0 ATI Radeon X1xxx
-ATI Radeon X16xx supported 0 ATI Radeon X1xxx
-ATI Radeon X1700 supported 0 ATI Radeon X1xxx
-ATI Radeon X1800 supported 0 ATI Radeon X1xxx
-ATI Radeon X1900 supported 0 ATI Radeon X1xxx
-ATI Radeon X19xx supported 0 ATI Radeon X1xxx
-ATI Radeon X1xxx supported 0 ATI Radeon X1xxx
+ATI Radeon X1000 supported 1 ATI Radeon X1xxx
+ATI Radeon X1200 supported 1 ATI Radeon X1xxx
+ATI Radeon X1300 supported 1 ATI Radeon X13xx
+ATI Radeon X13xx supported 1 ATI Radeon X13xx
+ATI Radeon X1400 supported 1 ATI Radeon X1xxx
+ATI Radeon X1500 supported 2 ATI Radeon X15xx
+ATI Radeon X1600 supported 2 ATI Radeon X16xx
+ATI Radeon X16xx supported 2 ATI Radeon X16xx
+ATI Radeon X1700 supported 2 ATI Radeon X17xx
+ATI Radeon X1800 supported 3 ATI Radeon X18xx
+ATI Radeon X1900 supported 3 ATI Radeon X19xx
+ATI Radeon X19xx supported 3 ATI Radeon X19xx
+ATI Radeon X1xxx supported 1 ATI Radeon X1xxx
ATI Radeon X300 supported 0 ATI Radeon X300
ATI Radeon X500 supported 0 ATI Radeon X500
ATI Radeon X600 supported 1 ATI Radeon X600
@@ -138,56 +138,74 @@ ATI Technologies Inc.
ATI Technologies Inc. x86 supported 0 ATI Technologies
ATI Technologies Inc. x86/SSE2 supported 0 ATI Technologies
ATI Technologies Inc. (Vista) ATI Mobility Radeon HD 5730 supported 3 ATI Mobility Radeon HD 5700
-ATI Technologies Inc. 256MB ATI Radeon X1300PRO x86/SSE2 supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. 128MB ATI Radeon X1300 x86/SSE2 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. 256MB ATI Radeon X1300PRO x86/SSE2 supported 1 ATI Radeon X13xx
ATI Technologies Inc. AMD 760G supported 1 ATI 760G/Radeon 3000
ATI Technologies Inc. AMD 760G (Microsoft WDDM 1.1) supported 1 ATI 760G/Radeon 3000
ATI Technologies Inc. AMD 780L supported 1 ATI 780L/Radeon 3000
ATI Technologies Inc. AMD FirePro 2270 supported 1 ATI FirePro 2000
-ATI Technologies Inc. AMD M860G with ATI Mobility Radeon 4100 supported 0 ATI Mobility Radeon 4100
+ATI Technologies Inc. AMD M860G with ATI Mobility Radeon 4100 supported 1 ATI Mobility Radeon 4100
ATI Technologies Inc. AMD M880G with ATI Mobility Radeon HD 4200 supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. AMD M880G with ATI Mobility Radeon HD 4250 supported 2 ATI Mobility Radeon HD 4200
+ATI Technologies Inc. AMD RADEON HD 6350 supported 3 ATI Radeon HD 6300
ATI Technologies Inc. AMD RADEON HD 6450 supported 3 ATI Radeon HD 6400
-ATI Technologies Inc. AMD Radeon HD 6200 series Graphics supported 2 ATI Radeon HD 6200
-ATI Technologies Inc. AMD Radeon HD 6250 Graphics supported 2 ATI Radeon HD 6200
-ATI Technologies Inc. AMD Radeon HD 6300 series Graphics supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. AMD Radeon HD 6300M Series supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. AMD Radeon HD 6310 Graphics supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. AMD Radeon HD 6310M supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. AMD Radeon HD 6330M supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. AMD Radeon HD 6350 supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. AMD Radeon HD 6370M supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. AMD Radeon HD 6400M Series supported 3 ATI Radeon HD 6400
+ATI Technologies Inc. AMD RADEON HD 6670 supported 3 ATI Radeon HD 6600
+ATI Technologies Inc. AMD Radeon 6600M and 6700M Series supported 0 ATI Technologies
+ATI Technologies Inc. AMD Radeon HD 6200 series Graphics supported 3 ATI Radeon HD 6200
+ATI Technologies Inc. AMD Radeon HD 6250 Graphics supported 3 ATI Radeon HD 6200
+ATI Technologies Inc. AMD Radeon HD 6290 Graphics supported 3 ATI Radeon HD 6200
+ATI Technologies Inc. AMD Radeon HD 6300 series Graphics supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. AMD Radeon HD 6300M Series supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. AMD Radeon HD 6310 Graphics supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. AMD Radeon HD 6310M supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. AMD Radeon HD 6330M supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. AMD Radeon HD 6350 supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. AMD Radeon HD 6370M supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. AMD Radeon HD 6400M Series supported 3 ATI Radeon HD 64xx
ATI Technologies Inc. AMD Radeon HD 6450 supported 3 ATI Radeon HD 6400
-ATI Technologies Inc. AMD Radeon HD 6470M supported 3 ATI Radeon HD 6400
-ATI Technologies Inc. AMD Radeon HD 6490M supported 3 ATI Radeon HD 6400
-ATI Technologies Inc. AMD Radeon HD 6500M/5600/5700 Series supported 3 ATI Radeon HD 6500
-ATI Technologies Inc. AMD Radeon HD 6530M supported 3 ATI Radeon HD 6500
-ATI Technologies Inc. AMD Radeon HD 6550M supported 3 ATI Radeon HD 6500
+ATI Technologies Inc. AMD Radeon HD 6470M supported 3 ATI Radeon HD 64xx
+ATI Technologies Inc. AMD Radeon HD 6490M supported 3 ATI Radeon HD 64xx
+ATI Technologies Inc. AMD Radeon HD 6500 Series supported 3 ATI Radeon HD 6500
+ATI Technologies Inc. AMD Radeon HD 6500M Series supported 3 ATI Radeon HD 65xx
+ATI Technologies Inc. AMD Radeon HD 6500M/5600/5700 Series supported 3 ATI Radeon HD 65xx
+ATI Technologies Inc. AMD Radeon HD 6530M supported 3 ATI Radeon HD 65xx
+ATI Technologies Inc. AMD Radeon HD 6550M supported 3 ATI Radeon HD 65xx
ATI Technologies Inc. AMD Radeon HD 6570 supported 3 ATI Radeon HD 6500
-ATI Technologies Inc. AMD Radeon HD 6570M supported 3 ATI Radeon HD 6500
-ATI Technologies Inc. AMD Radeon HD 6570M/5700 Series supported 3 ATI Radeon HD 6500
+ATI Technologies Inc. AMD Radeon HD 6570M supported 3 ATI Radeon HD 65xx
+ATI Technologies Inc. AMD Radeon HD 6570M/5700 Series supported 3 ATI Radeon HD 65xx
+ATI Technologies Inc. AMD Radeon HD 6600 Series supported 3 ATI Radeon HD 6600
ATI Technologies Inc. AMD Radeon HD 6600M Series supported 3 ATI Radeon HD 66xx
+ATI Technologies Inc. AMD Radeon HD 6630M supported 3 ATI Radeon HD 66xx
ATI Technologies Inc. AMD Radeon HD 6650M supported 3 ATI Radeon HD 66xx
-ATI Technologies Inc. AMD Radeon HD 6670 supported 3 ATI Radeon HD 66xx
+ATI Technologies Inc. AMD Radeon HD 6670 supported 3 ATI Radeon HD 6600
ATI Technologies Inc. AMD Radeon HD 6700 Series supported 3 ATI Radeon HD 6700
ATI Technologies Inc. AMD Radeon HD 6750 supported 3 ATI Radeon HD 6700
ATI Technologies Inc. AMD Radeon HD 6750M supported 3 ATI Radeon HD 6700
ATI Technologies Inc. AMD Radeon HD 6770 supported 3 ATI Radeon HD 6700
+ATI Technologies Inc. AMD Radeon HD 6770M supported 3 ATI Radeon HD 6700
ATI Technologies Inc. AMD Radeon HD 6800 Series supported 3 ATI Radeon HD 6800
+ATI Technologies Inc. AMD Radeon HD 6800M Series supported 3 ATI Radeon HD 6800
+ATI Technologies Inc. AMD Radeon HD 6850 supported 3 ATI Radeon HD 6800
ATI Technologies Inc. AMD Radeon HD 6850M supported 3 ATI Radeon HD 6800
ATI Technologies Inc. AMD Radeon HD 6870 supported 3 ATI Radeon HD 6800
ATI Technologies Inc. AMD Radeon HD 6870M supported 3 ATI Radeon HD 6800
ATI Technologies Inc. AMD Radeon HD 6900 Series supported 3 ATI Radeon HD 6900
+ATI Technologies Inc. AMD Radeon HD 6900M Series supported 3 ATI Radeon HD 6900
ATI Technologies Inc. AMD Radeon HD 6970M supported 3 ATI Radeon HD 6900
ATI Technologies Inc. AMD Radeon HD 6990 supported 3 ATI Radeon HD 6900
-ATI Technologies Inc. AMD Radeon(TM) HD 6470M supported 0 ATI Technologies
+ATI Technologies Inc. AMD Radeon(TM) HD 6470M supported 3 ATI Radeon HD 64xx
+ATI Technologies Inc. AMD Radeon(TM) HD 6480G supported 3 ATI Radeon HD 64xx
+ATI Technologies Inc. AMD Radeon(TM) HD 6520G supported 3 ATI Radeon HD 65xx
+ATI Technologies Inc. AMD Radeon(TM) HD 6620G supported 3 ATI Radeon HD 66xx
+ATI Technologies Inc. AMD Radeon(TM) HD 6630M supported 3 ATI Radeon HD 66xx
ATI Technologies Inc. ASUS 5870 Eyefinity 6 supported 0 ATI Technologies
+ATI Technologies Inc. ASUS A9550 Series supported 1 ATI ASUS A9xxx
ATI Technologies Inc. ASUS AH2600 Series supported 3 ATI ASUS AH26xx
ATI Technologies Inc. ASUS AH3450 Series supported 1 ATI ASUS AH34xx
ATI Technologies Inc. ASUS AH3650 Series supported 3 ATI ASUS AH36xx
ATI Technologies Inc. ASUS AH4650 Series supported 3 ATI ASUS AH46xx
-ATI Technologies Inc. ASUS ARES supported 0 ATI Technologies
-ATI Technologies Inc. ASUS EAH2900 Series supported 0 ATI Technologies
+ATI Technologies Inc. ASUS ARES supported 3 ATI ASUS ARES
+ATI Technologies Inc. ASUS EAH2900 Series supported 3 ATI ASUS EAH29xx
ATI Technologies Inc. ASUS EAH3450 Series supported 1 ATI ASUS AH34xx
ATI Technologies Inc. ASUS EAH3650 Series supported 3 ATI ASUS AH36xx
ATI Technologies Inc. ASUS EAH4350 series supported 1 ATI ASUS EAH43xx
@@ -208,10 +226,13 @@ ATI Technologies Inc. ASUS EAH5830 Series
ATI Technologies Inc. ASUS EAH5850 Series supported 3 ATI ASUS EAH58xx
ATI Technologies Inc. ASUS EAH5870 Series supported 3 ATI ASUS EAH58xx
ATI Technologies Inc. ASUS EAH5970 Series supported 0 ATI Technologies
-ATI Technologies Inc. ASUS EAH6850 Series supported 0 ATI Technologies
-ATI Technologies Inc. ASUS EAH6870 Series supported 0 ATI Technologies
-ATI Technologies Inc. ASUS EAH6950 Series supported 0 ATI Technologies
-ATI Technologies Inc. ASUS EAH6970 Series supported 0 ATI Technologies
+ATI Technologies Inc. ASUS EAH6450 Series supported 3 ATI ASUS EAH6xxx
+ATI Technologies Inc. ASUS EAH6570 Series supported 3 ATI ASUS EAH6xxx
+ATI Technologies Inc. ASUS EAH6670 Series supported 3 ATI ASUS EAH6xxx
+ATI Technologies Inc. ASUS EAH6850 Series supported 3 ATI ASUS EAH6xxx
+ATI Technologies Inc. ASUS EAH6870 Series supported 3 ATI ASUS EAH6xxx
+ATI Technologies Inc. ASUS EAH6950 Series supported 3 ATI ASUS EAH6xxx
+ATI Technologies Inc. ASUS EAH6970 Series supported 3 ATI ASUS EAH6xxx
ATI Technologies Inc. ASUS EAHG4670 series supported 0 ATI Technologies
ATI Technologies Inc. ASUS Extreme AX600 Series supported 0 ATI Technologies
ATI Technologies Inc. ASUS Extreme AX600XT-TD supported 0 ATI Technologies
@@ -232,19 +253,23 @@ ATI Technologies Inc. ATI FirePro V4800
ATI Technologies Inc. ATI FirePro V4800 (FireGL) supported 0 ATI FireGL
ATI Technologies Inc. ATI FirePro V5800 supported 3 ATI FirePro 5000
ATI Technologies Inc. ATI FirePro V7800 supported 3 ATI FirePro 7000
-ATI Technologies Inc. ATI MOBILITY RADEON 9XXX x86/SSE2 supported 0 ATI Mobility Radeon Xxxx
+ATI Technologies Inc. ATI MOBILITY RADEON 9600/9700 Series supported 1 ATI Mobility Radeon 9700
+ATI Technologies Inc. ATI MOBILITY RADEON 9XXX x86/SSE2 supported 0 ATI Technologies
+ATI Technologies Inc. ATI MOBILITY RADEON HD 2300 supported 1 ATI Mobility Radeon HD 2300
ATI Technologies Inc. ATI MOBILITY RADEON HD 3450 supported 2 ATI Mobility Radeon HD 3400
-ATI Technologies Inc. ATI MOBILITY RADEON X1600 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI MOBILITY RADEON X2300 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI MOBILITY RADEON X2300 HD x86/SSE2 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI MOBILITY RADEON X2300 x86/MMX/3DNow!/SSE2 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI MOBILITY RADEON X2300 x86/SSE2 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI MOBILITY RADEON X300 supported 1 ATI Mobility Radeon X3xx
-ATI Technologies Inc. ATI MOBILITY RADEON X600 supported 1 ATI Mobility Radeon X6xx
-ATI Technologies Inc. ATI MOBILITY RADEON XPRESS 200 supported 0 ATI Mobility Radeon Xxxx
+ATI Technologies Inc. ATI MOBILITY RADEON HD 3650 supported 3 ATI Mobility Radeon HD 3600
+ATI Technologies Inc. ATI MOBILITY RADEON X1600 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. ATI MOBILITY RADEON X2300 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI MOBILITY RADEON X2300 HD x86/SSE2 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI MOBILITY RADEON X2300 x86/MMX/3DNow!/SSE2 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI MOBILITY RADEON X2300 x86/SSE2 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI MOBILITY RADEON X300 supported 0 ATI Radeon X300
+ATI Technologies Inc. ATI MOBILITY RADEON X600 supported 1 ATI Radeon X600
+ATI Technologies Inc. ATI MOBILITY RADEON X700 supported 1 ATI Radeon X700
+ATI Technologies Inc. ATI MOBILITY RADEON XPRESS 200 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Mobility FireGL V5700 supported 1 ATI FireGL 5xxx
-ATI Technologies Inc. ATI Mobility Radeon 4100 supported 0 ATI Mobility Radeon 4100
-ATI Technologies Inc. ATI Mobility Radeon Graphics supported 0 ATI Mobility Radeon
+ATI Technologies Inc. ATI Mobility Radeon 4100 supported 1 ATI Mobility Radeon 4100
+ATI Technologies Inc. ATI Mobility Radeon Graphics supported 0 ATI Technologies
ATI Technologies Inc. ATI Mobility Radeon HD 2300 supported 1 ATI Mobility Radeon HD 2300
ATI Technologies Inc. ATI Mobility Radeon HD 2400 supported 1 ATI Mobility Radeon HD 2400
ATI Technologies Inc. ATI Mobility Radeon HD 2400 XT supported 1 ATI Mobility Radeon HD 2400
@@ -252,17 +277,20 @@ ATI Technologies Inc. ATI Mobility Radeon HD 2600
ATI Technologies Inc. ATI Mobility Radeon HD 2600 XT supported 3 ATI Mobility Radeon HD 2600
ATI Technologies Inc. ATI Mobility Radeon HD 2700 supported 3 ATI Mobility Radeon HD 2700
ATI Technologies Inc. ATI Mobility Radeon HD 3400 Series supported 2 ATI Mobility Radeon HD 3400
+ATI Technologies Inc. ATI Mobility Radeon HD 3410 supported 2 ATI Mobility Radeon HD 3400
ATI Technologies Inc. ATI Mobility Radeon HD 3430 supported 2 ATI Mobility Radeon HD 3400
ATI Technologies Inc. ATI Mobility Radeon HD 3450 supported 2 ATI Mobility Radeon HD 3400
ATI Technologies Inc. ATI Mobility Radeon HD 3470 supported 2 ATI Mobility Radeon HD 3400
ATI Technologies Inc. ATI Mobility Radeon HD 3470 Hybrid X2 supported 2 ATI Mobility Radeon HD 3400
ATI Technologies Inc. ATI Mobility Radeon HD 3650 supported 3 ATI Mobility Radeon HD 3600
+ATI Technologies Inc. ATI Mobility Radeon HD 3670 supported 3 ATI Mobility Radeon HD 3600
ATI Technologies Inc. ATI Mobility Radeon HD 4200 supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4200 Series supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4225 supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4225 Series supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4250 supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4250 Graphics supported 2 ATI Mobility Radeon HD 4200
+ATI Technologies Inc. ATI Mobility Radeon HD 4250 Series supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4270 supported 2 ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4300 Series supported 2 ATI Mobility Radeon HD 4300
ATI Technologies Inc. ATI Mobility Radeon HD 4300/4500 Series supported 2 ATI Mobility Radeon HD 4300
@@ -283,53 +311,55 @@ ATI Technologies Inc. ATI Mobility Radeon HD 4670
ATI Technologies Inc. ATI Mobility Radeon HD 4830 Series supported 3 ATI Mobility Radeon HD 4800
ATI Technologies Inc. ATI Mobility Radeon HD 4850 supported 3 ATI Mobility Radeon HD 4800
ATI Technologies Inc. ATI Mobility Radeon HD 4870 supported 3 ATI Mobility Radeon HD 4800
-ATI Technologies Inc. ATI Mobility Radeon HD 5000 supported 0 ATI Mobility Radeon
-ATI Technologies Inc. ATI Mobility Radeon HD 5000 Series supported 0 ATI Mobility Radeon
-ATI Technologies Inc. ATI Mobility Radeon HD 5145 supported 2 ATI Mobility Radeon HD 5100
-ATI Technologies Inc. ATI Mobility Radeon HD 5165 supported 2 ATI Mobility Radeon HD 5100
+ATI Technologies Inc. ATI Mobility Radeon HD 5000 supported 0 ATI Technologies
+ATI Technologies Inc. ATI Mobility Radeon HD 5000 Series supported 0 ATI Technologies
+ATI Technologies Inc. ATI Mobility Radeon HD 5145 supported 3 ATI Mobility Radeon HD 5100
+ATI Technologies Inc. ATI Mobility Radeon HD 5165 supported 3 ATI Mobility Radeon HD 5100
ATI Technologies Inc. ATI Mobility Radeon HD 530v supported 1 ATI Mobility Radeon HD 530v
-ATI Technologies Inc. ATI Mobility Radeon HD 5400 Series supported 2 ATI Mobility Radeon HD 5400
+ATI Technologies Inc. ATI Mobility Radeon HD 5400 Series supported 3 ATI Mobility Radeon HD 5400
ATI Technologies Inc. ATI Mobility Radeon HD 540v supported 2 ATI Mobility Radeon HD 540v
-ATI Technologies Inc. ATI Mobility Radeon HD 5430 supported 2 ATI Mobility Radeon HD 5400
-ATI Technologies Inc. ATI Mobility Radeon HD 5450 supported 2 ATI Mobility Radeon HD 5400
-ATI Technologies Inc. ATI Mobility Radeon HD 5450 Series supported 2 ATI Mobility Radeon HD 5400
+ATI Technologies Inc. ATI Mobility Radeon HD 5430 supported 3 ATI Mobility Radeon HD 5400
+ATI Technologies Inc. ATI Mobility Radeon HD 5450 supported 3 ATI Mobility Radeon HD 5400
+ATI Technologies Inc. ATI Mobility Radeon HD 5450 Series supported 3 ATI Mobility Radeon HD 5400
ATI Technologies Inc. ATI Mobility Radeon HD 545v supported 2 ATI Mobility Radeon HD 545v
-ATI Technologies Inc. ATI Mobility Radeon HD 5470 supported 2 ATI Mobility Radeon HD 5400
+ATI Technologies Inc. ATI Mobility Radeon HD 5470 supported 3 ATI Mobility Radeon HD 5400
ATI Technologies Inc. ATI Mobility Radeon HD 550v supported 2 ATI Mobility Radeon HD 550v
-ATI Technologies Inc. ATI Mobility Radeon HD 5600/5700 Series supported 2 ATI Mobility Radeon HD 5600
+ATI Technologies Inc. ATI Mobility Radeon HD 5600/5700 Series supported 3 ATI Mobility Radeon HD 5600
ATI Technologies Inc. ATI Mobility Radeon HD 560v supported 2 ATI Mobility Radeon HD 560v
-ATI Technologies Inc. ATI Mobility Radeon HD 5650 supported 2 ATI Mobility Radeon HD 5600
+ATI Technologies Inc. ATI Mobility Radeon HD 5650 supported 3 ATI Mobility Radeon HD 5600
ATI Technologies Inc. ATI Mobility Radeon HD 5700 Series supported 3 ATI Mobility Radeon HD 5700
ATI Technologies Inc. ATI Mobility Radeon HD 5730 supported 3 ATI Mobility Radeon HD 5700
-ATI Technologies Inc. ATI Mobility Radeon HD 5800 Series supported 0 ATI Mobility Radeon
-ATI Technologies Inc. ATI Mobility Radeon HD 5850 supported 0 ATI Mobility Radeon
-ATI Technologies Inc. ATI Mobility Radeon HD 5870 supported 0 ATI Mobility Radeon
-ATI Technologies Inc. ATI Mobility Radeon HD 6300 series supported 2 ATI Mobility Radeon HD 6300
-ATI Technologies Inc. ATI Mobility Radeon HD 6370 supported 2 ATI Mobility Radeon HD 6300
+ATI Technologies Inc. ATI Mobility Radeon HD 5800 Series supported 3 ATI Radeon HD 5800
+ATI Technologies Inc. ATI Mobility Radeon HD 5830 Series supported 3 ATI Radeon HD 5800
+ATI Technologies Inc. ATI Mobility Radeon HD 5850 supported 3 ATI Radeon HD 5800
+ATI Technologies Inc. ATI Mobility Radeon HD 5870 supported 3 ATI Radeon HD 5800
+ATI Technologies Inc. ATI Mobility Radeon HD 6300 series supported 3 ATI Mobility Radeon HD 6300
+ATI Technologies Inc. ATI Mobility Radeon HD 6370 supported 3 ATI Mobility Radeon HD 6300
ATI Technologies Inc. ATI Mobility Radeon HD 6470M supported 3 ATI Mobility Radeon HD 6400M
ATI Technologies Inc. ATI Mobility Radeon HD 6550 supported 3 ATI Mobility Radeon HD 6500M
ATI Technologies Inc. ATI Mobility Radeon HD 6570 supported 3 ATI Mobility Radeon HD 6500M
-ATI Technologies Inc. ATI Mobility Radeon X1300 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1300 x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1300 x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1350 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1350 x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1400 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1400 x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1600 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1600 x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X1700 x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Mobility Radeon X2300 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI Mobility Radeon X2300 (Omega 3.8.442) supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI Mobility Radeon X2300 x86 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI Mobility Radeon X2300 x86/MMX/3DNow!/SSE2 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI Mobility Radeon X2300 x86/SSE2 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI Mobility Radeon X2500 supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. ATI Mobility Radeon X2500 x86/SSE2 supported 0 ATI Mobility Radeon X2xxx
+ATI Technologies Inc. ATI Mobility Radeon X1300 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. ATI Mobility Radeon X1300 x86/MMX/3DNow!/SSE2 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. ATI Mobility Radeon X1300 x86/SSE2 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. ATI Mobility Radeon X1350 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. ATI Mobility Radeon X1350 x86/SSE2 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. ATI Mobility Radeon X1400 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Mobility Radeon X1400 x86/SSE2 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Mobility Radeon X1600 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. ATI Mobility Radeon X1600 x86/SSE2 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. ATI Mobility Radeon X1700 x86/SSE2 supported 2 ATI Radeon X17xx
+ATI Technologies Inc. ATI Mobility Radeon X2300 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI Mobility Radeon X2300 (Omega 3.8.442) supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI Mobility Radeon X2300 x86 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI Mobility Radeon X2300 x86/MMX/3DNow!/SSE2 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI Mobility Radeon X2300 x86/SSE2 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI Mobility Radeon X2500 supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. ATI Mobility Radeon X2500 x86/SSE2 supported 1 ATI Radeon X2xxx
ATI Technologies Inc. ATI Mobility Radeon. HD 530v supported 1 ATI Mobility Radeon HD 530v
-ATI Technologies Inc. ATI Mobility Radeon. HD 5470 supported 2 ATI Mobility Radeon HD 5400
-ATI Technologies Inc. ATI RADEON HD 3200 T25XX by CAMILO supported 0 ATI Radeon HD 3200
+ATI Technologies Inc. ATI Mobility Radeon. HD 5470 supported 3 ATI Mobility Radeon HD 5400
+ATI Technologies Inc. ATI RADEON HD 3200 T25XX by CAMILO supported 1 ATI Radeon HD 3200
ATI Technologies Inc. ATI RADEON XPRESS 1100 supported 0 ATI Radeon Xpress
+ATI Technologies Inc. ATI RADEON XPRESS 1100 x86/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI RADEON XPRESS 200 Series supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI RADEON XPRESS 200 Series x86/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI RADEON XPRESS 200M SERIES supported 0 ATI Radeon Xpress
@@ -341,14 +371,15 @@ ATI Technologies Inc. ATI Radeon 3000
ATI Technologies Inc. ATI Radeon 3000 Graphics supported 0 ATI Radeon 3000
ATI Technologies Inc. ATI Radeon 3100 Graphics supported 1 ATI Radeon 3100
ATI Technologies Inc. ATI Radeon 5xxx series supported 3 ATI Radeon 5xxx
-ATI Technologies Inc. ATI Radeon 9550 / X1050 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon 9550 / X1050 Series x86/MMX/3DNow!/SSE supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon 9550 / X1050 Series x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon 9550 / X1050 Series(Microsoft - WDDM) supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon 9600 / X1050 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon 9600/9550/X1050 Series supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon 9550 / X1050 Series supported 0 ATI Radeon 9500
+ATI Technologies Inc. ATI Radeon 9550 / X1050 Series x86/MMX/3DNow!/SSE supported 0 ATI Radeon 9500
+ATI Technologies Inc. ATI Radeon 9550 / X1050 Series x86/SSE2 supported 0 ATI Radeon 9500
+ATI Technologies Inc. ATI Radeon 9550 / X1050 Series(Microsoft - WDDM) supported 0 ATI Radeon 9500
+ATI Technologies Inc. ATI Radeon 9600 / X1050 Series supported 0 ATI Radeon 9600
+ATI Technologies Inc. ATI Radeon 9600/9550/X1050 Series supported 0 ATI Radeon 9600
ATI Technologies Inc. ATI Radeon BA Prototype OpenGL Engine supported 0 ATI Technologies
ATI Technologies Inc. ATI Radeon BB Prototype OpenGL Engine supported 0 ATI Technologies
+ATI Technologies Inc. ATI Radeon Broadway XT Prototype OpenGL Engine supported 0 ATI Technologies
ATI Technologies Inc. ATI Radeon Cedar PRO Prototype OpenGL Engine supported 2 AMD CEDAR (HD 5450)
ATI Technologies Inc. ATI Radeon Cypress PRO Prototype OpenGL Engine supported 3 AMD CYPRESS (HD 5800)
ATI Technologies Inc. ATI Radeon Graphics Processor supported 0 ATI Technologies
@@ -370,7 +401,7 @@ ATI Technologies Inc. ATI Radeon HD 2600 Series
ATI Technologies Inc. ATI Radeon HD 2600 XT supported 2 ATI Radeon HD 2600
ATI Technologies Inc. ATI Radeon HD 2900 GT supported 3 ATI Radeon HD 2900
ATI Technologies Inc. ATI Radeon HD 2900 XT supported 3 ATI Radeon HD 2900
-ATI Technologies Inc. ATI Radeon HD 3200 Graphics supported 0 ATI Radeon HD 3200
+ATI Technologies Inc. ATI Radeon HD 3200 Graphics supported 1 ATI Radeon HD 3200
ATI Technologies Inc. ATI Radeon HD 3300 Graphics supported 1 ATI Radeon HD 3300
ATI Technologies Inc. ATI Radeon HD 3400 Series supported 1 ATI Radeon HD 3400
ATI Technologies Inc. ATI Radeon HD 3450 supported 1 ATI Radeon HD 3400
@@ -392,6 +423,7 @@ ATI Technologies Inc. ATI Radeon HD 4250
ATI Technologies Inc. ATI Radeon HD 4250 Graphics supported 1 ATI Radeon HD 4200
ATI Technologies Inc. ATI Radeon HD 4270 supported 1 ATI Radeon HD 4200
ATI Technologies Inc. ATI Radeon HD 4290 supported 1 ATI Radeon HD 4200
+ATI Technologies Inc. ATI Radeon HD 4290 (Engineering Sample) supported 1 ATI Radeon HD 4200
ATI Technologies Inc. ATI Radeon HD 4300 Series supported 1 ATI Radeon HD 4300
ATI Technologies Inc. ATI Radeon HD 4300/4500 Series supported 1 ATI Radeon HD 4300
ATI Technologies Inc. ATI Radeon HD 4350 supported 1 ATI Radeon HD 4300
@@ -418,9 +450,11 @@ ATI Technologies Inc. ATI Radeon HD 4870 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 4870 X2 supported 3 ATI Radeon HD 4800
ATI Technologies Inc. ATI Radeon HD 5400 Series supported 3 ATI Radeon HD 5400
ATI Technologies Inc. ATI Radeon HD 5450 supported 3 ATI Radeon HD 5400
+ATI Technologies Inc. ATI Radeon HD 5470 supported 3 ATI Radeon HD 5400
ATI Technologies Inc. ATI Radeon HD 5500 Series supported 3 ATI Radeon HD 5500
ATI Technologies Inc. ATI Radeon HD 5570 supported 3 ATI Radeon HD 5500
ATI Technologies Inc. ATI Radeon HD 5600 Series supported 3 ATI Radeon HD 5600
+ATI Technologies Inc. ATI Radeon HD 5600/5700 supported 3 ATI Radeon HD 5600
ATI Technologies Inc. ATI Radeon HD 5630 supported 3 ATI Radeon HD 5600
ATI Technologies Inc. ATI Radeon HD 5670 supported 3 ATI Radeon HD 5600
ATI Technologies Inc. ATI Radeon HD 5670 OpenGL Engine supported 3 ATI Radeon HD 5600
@@ -435,13 +469,14 @@ ATI Technologies Inc. ATI Radeon HD 5870
ATI Technologies Inc. ATI Radeon HD 5870 OpenGL Engine supported 3 ATI Radeon HD 5800
ATI Technologies Inc. ATI Radeon HD 5900 Series supported 3 ATI Radeon HD 5900
ATI Technologies Inc. ATI Radeon HD 5970 supported 3 ATI Radeon HD 5900
-ATI Technologies Inc. ATI Radeon HD 6230 supported 2 ATI Radeon HD 6200
-ATI Technologies Inc. ATI Radeon HD 6250 supported 2 ATI Radeon HD 6200
-ATI Technologies Inc. ATI Radeon HD 6350 supported 2 ATI Radeon HD 6300
-ATI Technologies Inc. ATI Radeon HD 6390 supported 2 ATI Radeon HD 6300
+ATI Technologies Inc. ATI Radeon HD 6230 supported 3 ATI Radeon HD 6200
+ATI Technologies Inc. ATI Radeon HD 6250 supported 3 ATI Radeon HD 6200
+ATI Technologies Inc. ATI Radeon HD 6350 supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. ATI Radeon HD 6390 supported 3 ATI Radeon HD 6300
ATI Technologies Inc. ATI Radeon HD 6490M OpenGL Engine supported 3 ATI Radeon HD 6400
ATI Technologies Inc. ATI Radeon HD 6510 supported 3 ATI Radeon HD 6500
ATI Technologies Inc. ATI Radeon HD 6570M supported 3 ATI Radeon HD 6500
+ATI Technologies Inc. ATI Radeon HD 6630M OpenGL Engine supported 3 ATI Radeon HD 6600
ATI Technologies Inc. ATI Radeon HD 6750 supported 3 ATI Radeon HD 6700
ATI Technologies Inc. ATI Radeon HD 6750M OpenGL Engine supported 3 ATI Radeon HD 6700
ATI Technologies Inc. ATI Radeon HD 6770 supported 3 ATI Radeon HD 6700
@@ -459,21 +494,21 @@ ATI Technologies Inc. ATI Radeon RV790 Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon Redwood PRO Prototype OpenGL Engine supported 3 AMD REDWOOD (HD 5500/5600)
ATI Technologies Inc. ATI Radeon Redwood XT Prototype OpenGL Engine supported 3 AMD REDWOOD (HD 5500/5600)
ATI Technologies Inc. ATI Radeon Whistler PRO/LP Prototype OpenGL Engine supported 0 ATI Technologies
-ATI Technologies Inc. ATI Radeon X1050 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1050 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1200 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1200 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1200 Series x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1250 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1250 x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1270 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1270 x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1300/X1550 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1550 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1600 OpenGL Engine supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1900 OpenGL Engine supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X1950 GT supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. ATI Radeon X300/X550/X1050 Series supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1050 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1050 Series supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1200 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1200 Series supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1200 Series x86/MMX/3DNow!/SSE2 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1250 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1250 x86/MMX/3DNow!/SSE2 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1270 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1270 x86/MMX/3DNow!/SSE2 supported 1 ATI Radeon X1xxx
+ATI Technologies Inc. ATI Radeon X1300/X1550 Series supported 1 ATI Radeon X13xx
+ATI Technologies Inc. ATI Radeon X1550 Series supported 2 ATI Radeon X15xx
+ATI Technologies Inc. ATI Radeon X1600 OpenGL Engine supported 2 ATI Radeon X16xx
+ATI Technologies Inc. ATI Radeon X1900 OpenGL Engine supported 3 ATI Radeon X19xx
+ATI Technologies Inc. ATI Radeon X1950 GT supported 3 ATI Radeon X19xx
+ATI Technologies Inc. ATI Radeon X300/X550/X1050 Series supported 0 ATI Radeon X300
ATI Technologies Inc. ATI Radeon Xpress 1100 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Radeon Xpress 1150 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Radeon Xpress 1150 x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon Xpress
@@ -482,18 +517,21 @@ ATI Technologies Inc. ATI Radeon Xpress 1200 Series
ATI Technologies Inc. ATI Radeon Xpress 1200 Series x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Radeon Xpress 1200 x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Radeon Xpress 1250 supported 0 ATI Radeon Xpress
+ATI Technologies Inc. ATI Radeon Xpress 1250 x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Radeon Xpress 1250 x86/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Radeon Xpress Series supported 0 ATI Radeon Xpress
+ATI Technologies Inc. ATI Radeon Xpress Series x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. ATI Yamaha HD 9000 supported 0 ATI Technologies
ATI Technologies Inc. ATi RS880M supported 1 ATI RS880M
ATI Technologies Inc. Carte graphique VGA standard supported 0 ATI Technologies
-ATI Technologies Inc. Diamond Radeon X1550 Series supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. Diamond Radeon X1550 Series supported 2 ATI Radeon X15xx
ATI Technologies Inc. EG JUNIPER supported 3 AMD JUNIPER (HD 5700)
ATI Technologies Inc. EG PARK supported 3 AMD PARK
ATI Technologies Inc. FireGL V3100 Pentium 4 (SSE2) supported 0 ATI FireGL
ATI Technologies Inc. FireMV 2400 PCI DDR x86 supported 0 ATI FireMV
ATI Technologies Inc. FireMV 2400 PCI DDR x86/SSE2 supported 0 ATI FireMV
-ATI Technologies Inc. GeCube Radeon X1550 supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. GeCube Radeon X1550 supported 2 ATI Radeon X15xx
+ATI Technologies Inc. GeForce 9600 GT x86/SSE2 supported 2 ATI Geforce 9600 GT
ATI Technologies Inc. Geforce 9500 GT supported 2 ATI Geforce 9500 GT
ATI Technologies Inc. Geforce 9500GT supported 2 ATI Geforce 9500 GT
ATI Technologies Inc. Geforce 9800 GT supported 2 ATI Geforce 9800 GT
@@ -502,18 +540,22 @@ ATI Technologies Inc. HIGHTECH EXCALIBUR RADEON 9550SE Series
ATI Technologies Inc. HIGHTECH EXCALIBUR X700 PRO supported 0 ATI Technologies
ATI Technologies Inc. M21 x86/MMX/3DNow!/SSE2 supported 0 ATI Technologies
ATI Technologies Inc. M76M supported 3 ATI M76
-ATI Technologies Inc. MOBILITY RADEON 7500 DDR x86/SSE2 supported 0 ATI Mobility Radeon
-ATI Technologies Inc. MOBILITY RADEON 9000 DDR x86/SSE2 supported 0 ATI Mobility Radeon
-ATI Technologies Inc. MOBILITY RADEON 9000 IGPRADEON 9100 IGP DDR x86/SSE2 supported 0 ATI Mobility Radeon
+ATI Technologies Inc. MOBILITY RADEON 7500 DDR x86/SSE2 supported 0 ATI Mobility Radeon 7xxx
+ATI Technologies Inc. MOBILITY RADEON 9000 DDR x86/SSE2 supported 0 ATI Radeon 9000
+ATI Technologies Inc. MOBILITY RADEON 9000 IGPRADEON 9100 IGP DDR x86/SSE2 supported 0 ATI Radeon 9000
+ATI Technologies Inc. MOBILITY RADEON 9100 IGP DDR x86/SSE2 supported 0 ATI Radeon 9100
ATI Technologies Inc. MOBILITY RADEON 9600 x86/SSE2 supported 0 ATI Mobility Radeon 9600
ATI Technologies Inc. MOBILITY RADEON 9700 x86/SSE2 supported 1 ATI Mobility Radeon 9700
-ATI Technologies Inc. MOBILITY RADEON X300 x86/SSE2 supported 1 ATI Mobility Radeon X3xx
-ATI Technologies Inc. MOBILITY RADEON X600 x86/SSE2 supported 1 ATI Mobility Radeon X6xx
-ATI Technologies Inc. MOBILITY RADEON X700 SE x86 supported 1 ATI Mobility Radeon X7xx
-ATI Technologies Inc. MOBILITY RADEON X700 x86/SSE2 supported 1 ATI Mobility Radeon X7xx
+ATI Technologies Inc. MOBILITY RADEON X300 x86/SSE2 supported 0 ATI Radeon X300
+ATI Technologies Inc. MOBILITY RADEON X600 x86/SSE2 supported 1 ATI Radeon X600
+ATI Technologies Inc. MOBILITY RADEON X700 SE x86 supported 1 ATI Radeon X700
+ATI Technologies Inc. MOBILITY RADEON X700 x86/SSE2 supported 1 ATI Radeon X700
+ATI Technologies Inc. MOBILITY RADEON Xpress 200 Series SW TCL x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. MSI RX9550SE supported 1 ATI Radeon RX9550
-ATI Technologies Inc. Mobility Radeon X2300 HD supported 0 ATI Mobility Radeon X2xxx
-ATI Technologies Inc. Mobility Radeon X2300 HD x86/SSE2 supported 0 ATI Mobility Radeon X2xxx
+ATI Technologies Inc. MSI Radeon X1550 Series supported 2 ATI Radeon X15xx
+ATI Technologies Inc. Mobility Radeon HD 6000 series supported 0 ATI Technologies
+ATI Technologies Inc. Mobility Radeon X2300 HD supported 1 ATI Radeon X2xxx
+ATI Technologies Inc. Mobility Radeon X2300 HD x86/SSE2 supported 1 ATI Radeon X2xxx
ATI Technologies Inc. RADEON 7000 DDR x86/MMX/3DNow!/SSE supported 0 ATI Radeon 7xxx
ATI Technologies Inc. RADEON 7000 DDR x86/SSE2 supported 0 ATI Radeon 7xxx
ATI Technologies Inc. RADEON 7500 DDR x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon 7xxx
@@ -535,6 +577,7 @@ ATI Technologies Inc. RADEON 9500
ATI Technologies Inc. RADEON 9550 x86/SSE2 supported 0 ATI Radeon 9500
ATI Technologies Inc. RADEON 9600 SERIES supported 0 ATI Radeon 9600
ATI Technologies Inc. RADEON 9600 SERIES x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon 9600
+ATI Technologies Inc. RADEON 9600 SERIES x86/SSE2 supported 0 ATI Radeon 9600
ATI Technologies Inc. RADEON 9600 TX x86/SSE2 supported 0 ATI Radeon 9600
ATI Technologies Inc. RADEON 9600 x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon 9600
ATI Technologies Inc. RADEON 9600 x86/SSE2 supported 0 ATI Radeon 9600
@@ -549,8 +592,10 @@ ATI Technologies Inc. RADEON X550 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON X550 x86/SSE2 supported 0 ATI Radeon X500
ATI Technologies Inc. RADEON X600 Series supported 1 ATI Radeon X600
ATI Technologies Inc. RADEON X600 x86/SSE2 supported 1 ATI Radeon X600
+ATI Technologies Inc. RADEON X600/X550 Series supported 1 ATI Radeon X600
ATI Technologies Inc. RADEON X700 PRO x86/SSE2 supported 1 ATI Radeon X700
ATI Technologies Inc. RADEON X800 SE x86/MMX/3DNow!/SSE2 supported 2 ATI Radeon X800
+ATI Technologies Inc. RADEON X800 XT supported 2 ATI Radeon X800
ATI Technologies Inc. RADEON X800GT supported 2 ATI Radeon X800
ATI Technologies Inc. RADEON XPRESS 200 Series SW TCL x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon Xpress
ATI Technologies Inc. RADEON XPRESS 200 Series SW TCL x86/SSE2 supported 0 ATI Radeon Xpress
@@ -569,7 +614,10 @@ ATI Technologies Inc. RV410 Pro x86/SSE2
ATI Technologies Inc. RV790 supported 3 AMD RV790 (HD 4800)
ATI Technologies Inc. Radeon (TM) HD 6470M supported 0 ATI Technologies
ATI Technologies Inc. Radeon (TM) HD 6490M supported 0 ATI Technologies
+ATI Technologies Inc. Radeon (TM) HD 6750M supported 0 ATI Technologies
ATI Technologies Inc. Radeon (TM) HD 6770M supported 0 ATI Technologies
+ATI Technologies Inc. Radeon (TM) HD 6850M supported 0 ATI Technologies
+ATI Technologies Inc. Radeon 7000 DDR x86/SSE supported 0 ATI Radeon 7xxx
ATI Technologies Inc. Radeon 7000 DDR x86/SSE2 supported 0 ATI Radeon 7xxx
ATI Technologies Inc. Radeon 7000 SDR x86/SSE2 supported 0 ATI Radeon 7xxx
ATI Technologies Inc. Radeon 7500 DDR x86/SSE2 supported 0 ATI Radeon 7xxx
@@ -577,37 +625,43 @@ ATI Technologies Inc. Radeon 9000 DDR x86/SSE2
ATI Technologies Inc. Radeon DDR x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon DDR
ATI Technologies Inc. Radeon DDR x86/SSE supported 0 ATI Radeon DDR
ATI Technologies Inc. Radeon DDR x86/SSE2 supported 0 ATI Radeon DDR
-ATI Technologies Inc. Radeon HD 6310 supported 2 ATI Radeon HD 6300
+ATI Technologies Inc. Radeon HD 6310 supported 3 ATI Radeon HD 6300
+ATI Technologies Inc. Radeon HD 6470M supported 3 ATI Radeon HD 6400
+ATI Technologies Inc. Radeon HD 6490M supported 3 ATI Radeon HD 6400
ATI Technologies Inc. Radeon HD 6800 Series supported 3 ATI Radeon HD 6800
ATI Technologies Inc. Radeon SDR x86/SSE2 supported 0 ATI Technologies
-ATI Technologies Inc. Radeon X1300 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1300 Series x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1300 Series x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1300/X1550 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1300/X1550 Series x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1550 64-bit (Microsoft - WDDM) supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1550 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1550 Series x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1600 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1600 Pro / X1300XT x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1600 Series x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1600/X1650 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1650 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1650 Series x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1650 Series x86/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1900 Series x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1950 Pro supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1950 Pro x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1950 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X1950 Series (Microsoft - WDDM) supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. Radeon X300/X550/X1050 Series supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. Radeon X1300 Series supported 1 ATI Radeon X13xx
+ATI Technologies Inc. Radeon X1300 Series x86/MMX/3DNow!/SSE2 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. Radeon X1300 Series x86/SSE2 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. Radeon X1300/X1550 Series supported 1 ATI Radeon X13xx
+ATI Technologies Inc. Radeon X1300/X1550 Series x86/SSE2 supported 1 ATI Radeon X13xx
+ATI Technologies Inc. Radeon X1550 64-bit (Microsoft - WDDM) supported 2 ATI Radeon X15xx
+ATI Technologies Inc. Radeon X1550 Series supported 2 ATI Radeon X15xx
+ATI Technologies Inc. Radeon X1550 Series x86/SSE2 supported 2 ATI Radeon X15xx
+ATI Technologies Inc. Radeon X1600 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1600 Pro / X1300XT x86/MMX/3DNow!/SSE2 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1600 Series supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1600 Series x86/SSE2 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1600/1650 Series supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1600/X1650 Series supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1650 Series supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1650 Series x86/MMX/3DNow!/SSE2 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1650 Series x86/SSE2 supported 2 ATI Radeon X16xx
+ATI Technologies Inc. Radeon X1900 Series x86/MMX/3DNow!/SSE2 supported 3 ATI Radeon X19xx
+ATI Technologies Inc. Radeon X1950 Pro supported 3 ATI Radeon X19xx
+ATI Technologies Inc. Radeon X1950 Pro x86/MMX/3DNow!/SSE2 supported 3 ATI Radeon X19xx
+ATI Technologies Inc. Radeon X1950 Series supported 3 ATI Radeon X19xx
+ATI Technologies Inc. Radeon X1950 Series (Microsoft - WDDM) supported 3 ATI Radeon X19xx
+ATI Technologies Inc. Radeon X300/X550/X1050 Series supported 0 ATI Radeon X300
ATI Technologies Inc. Radeon X550/X700 Series supported 0 ATI Radeon X500
ATI Technologies Inc. Radeon X550XTX x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X500
ATI Technologies Inc. SAPPHIRE RADEON X300SE supported 0 ATI Radeon X300
ATI Technologies Inc. SAPPHIRE RADEON X300SE x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X300
ATI Technologies Inc. SAPPHIRE RADEON X300SE x86/SSE2 supported 0 ATI Radeon X300
-ATI Technologies Inc. SAPPHIRE Radeon X1550 Series supported 0 ATI Radeon X1xxx
-ATI Technologies Inc. SAPPHIRE Radeon X1550 Series x86/MMX/3DNow!/SSE2 supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. SAPPHIRE Radeon X1550 Series supported 2 ATI Radeon X15xx
+ATI Technologies Inc. SAPPHIRE Radeon X1550 Series x86/MMX/3DNow!/SSE2 supported 2 ATI Radeon X15xx
+ATI Technologies Inc. SAPPHIRE Radeon X1550 Series x86/SSE2 supported 2 ATI Radeon X15xx
+ATI Technologies Inc. SAPPHIRE Radeon X1550 x86/SSE2 supported 2 ATI Radeon X15xx
ATI Technologies Inc. Sapphire Radeon HD 3730 supported 3 ATI Radeon HD 3700
ATI Technologies Inc. Sapphire Radeon HD 3750 supported 3 ATI Radeon HD 3700
ATI Technologies Inc. Standard VGA Graphics Adapter supported 0 ATI Technologies
@@ -616,7 +670,7 @@ ATI Technologies Inc. Tul, RADEON X600 PRO x86/SSE2
ATI Technologies Inc. Tul, RADEON X700 PRO supported 0 ATI Technologies
ATI Technologies Inc. Tul, RADEON X700 PRO x86/MMX/3DNow!/SSE2 supported 0 ATI Technologies
ATI Technologies Inc. VisionTek Radeon 4350 supported 0 ATI Technologies
-ATI Technologies Inc. VisionTek Radeon X1550 Series supported 0 ATI Radeon X1xxx
+ATI Technologies Inc. VisionTek Radeon X1550 Series supported 2 ATI Radeon X15xx
ATI Technologies Inc. WRESTLER 9802 supported 0 ATI Technologies
ATI Technologies Inc. WRESTLER 9803 supported 0 ATI Technologies
ATI Technologies Inc. XFX Radeon HD 4570 supported 3 ATI Radeon HD 4500
@@ -632,13 +686,14 @@ Advanced Micro Devices, Inc. Mesa DRI R600 (RV620 95C5) 20090101 x86/MMX+/3DNow!
Advanced Micro Devices, Inc. Mesa DRI R600 (RV620 95C5) 20090101 x86/MMX/SSE2 TCL DRI2 supported 1 AMD RV620 (HD 3400)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV635 9596) 20090101 x86/MMX+/3DNow!+/SSE TCL DRI2 supported 3 AMD RV635 (HD 3600)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV670 9505) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2 supported 3 AMD RV670 (HD 3800)
+Advanced Micro Devices, Inc. Mesa DRI R600 (RV670 9505) 20090101 x86/MMX/SSE2 TCL DRI2 supported 3 AMD RV670 (HD 3800)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV710 9552) 20090101 x86/MMX/SSE2 TCL DRI2 supported 1 AMD RV710 (HD 4300)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV730 9490) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2 supported 3 AMD RV730 (HD 4600)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV730 9490) 20090101 x86/MMX/SSE2 TCL DRI2 supported 3 AMD RV730 (HD 4600)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV730 9498) 20090101 TCL DRI2 supported 3 AMD RV730 (HD 4600)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV770 9440) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2 supported 3 AMD RV770 (HD 4800)
Advanced Micro Devices, Inc. Mesa DRI R600 (RV770 9442) 20090101 x86/MMX/SSE2 TCL DRI2 supported 3 AMD RV770 (HD 4800)
-Alex Mohr GL Hijacker! UNRECOGNIZED
+Alex Mohr GL Hijacker! NO MATCH
Apple Software Renderer unsupported 0 Apple Software Renderer
DRI R300 Project Mesa DRI R300 (RS400 5954) 20090101 x86/MMX+/3DNow!+/SSE2 NO-TCL DRI2 supported 1 ATI R300 (9700)
DRI R300 Project Mesa DRI R300 (RS400 5975) 20090101 x86/MMX+/3DNow!+/SSE2 NO-TCL DRI2 supported 1 ATI R300 (9700)
@@ -658,13 +713,15 @@ DRI R300 Project Mesa DRI R300 (RV515 7149) 20090101 x86/MMX/SSE2 TCL DRI2
DRI R300 Project Mesa DRI R300 (RV515 714A) 20090101 x86/MMX/SSE2 TCL supported 1 ATI RV515
DRI R300 Project Mesa DRI R300 (RV515 714A) 20090101 x86/MMX/SSE2 TCL DRI2 supported 1 ATI RV515
DRI R300 Project Mesa DRI R300 (RV530 71C4) 20090101 x86/MMX/SSE2 TCL DRI2 supported 1 ATI RV530
-GPU_CLASS_UNKNOWN UNRECOGNIZED
-Humper Chromium UNRECOGNIZED
-Intel UNRECOGNIZED
+GPU_CLASS_UNKNOWN NO MATCH
+Humper 3D-Analyze v2.3 - http://www.tommti-systems.com supported 0 Humper
+Humper Chromium supported 0 Humper
+Imagination Technologies PowerVR SGX545 NO MATCH
+Intel NO MATCH
Intel HD Graphics Family supported 2 Intel HD Graphics
-Intel 3D-Analyze v2.2 - http://www.tommti-systems.com UNRECOGNIZED
-Intel 3D-Analyze v2.3 - http://www.tommti-systems.com UNRECOGNIZED
-Intel 4 Series Internal Chipset UNRECOGNIZED
+Intel 3D-Analyze v2.2 - http://www.tommti-systems.com NO MATCH
+Intel 3D-Analyze v2.3 - http://www.tommti-systems.com NO MATCH
+Intel 4 Series Internal Chipset NO MATCH
Intel 830M unsupported 0 Intel 830M
Intel 845G unsupported 0 Intel 845G
Intel 855GM unsupported 0 Intel 855GM
@@ -675,13 +732,14 @@ Intel 945G
Intel 945GM supported 0 Intel 945GM
Intel 950 supported 0 Intel 950
Intel 965 supported 0 Intel 965
-Intel B43 Express Chipset UNRECOGNIZED
+Intel B43 Express Chipset NO MATCH
Intel Bear Lake unsupported 0 Intel Bear Lake
Intel Broadwater unsupported 0 Intel Broadwater
Intel Brookdale unsupported 0 Intel Brookdale
Intel Cantiga unsupported 0 Intel Cantiga
+Intel EMGD on PowerVR SGX535 NO MATCH
Intel Eaglelake supported 0 Intel Eaglelake
-Intel Familia Mobile 45 Express Chipset (Microsoft Corporation - WDDM 1.1) UNRECOGNIZED
+Intel Familia Mobile 45 Express Chipset (Microsoft Corporation - WDDM 1.1) NO MATCH
Intel G33 unsupported 0 Intel G33
Intel G41 supported 0 Intel G41
Intel G41 Express Chipset supported 0 Intel G41
@@ -710,12 +768,12 @@ Intel HD Graphics Family BR-1012-00Y8
Intel HD Graphics Family BR-1012-00YF supported 2 Intel HD Graphics
Intel HD Graphics Family BR-1012-00ZD supported 2 Intel HD Graphics
Intel HD Graphics Family BR-1102-00ML supported 2 Intel HD Graphics
-Intel Inc. Intel GMA 900 OpenGL Engine UNRECOGNIZED
+Intel Inc. Intel GMA 900 OpenGL Engine NO MATCH
Intel Inc. Intel GMA 950 OpenGL Engine supported 0 Intel 950
Intel Inc. Intel GMA X3100 OpenGL Engine supported 0 Intel X3100
Intel Inc. Intel HD Graphics 3000 OpenGL Engine supported 2 Intel HD Graphics
Intel Inc. Intel HD Graphics OpenGL Engine supported 2 Intel HD Graphics
-Intel Inc. Intel HD xxxx OpenGL Engine UNRECOGNIZED
+Intel Inc. Intel HD xxxx OpenGL Engine NO MATCH
Intel Intel 845G unsupported 0 Intel 845G
Intel Intel 855GM unsupported 0 Intel 855GM
Intel Intel 865G unsupported 0 Intel 865G
@@ -727,39 +785,42 @@ Intel Intel 965/963 Graphics Media Accelerator
Intel Intel Bear Lake B unsupported 0 Intel Bear Lake
Intel Intel Broadwater G unsupported 0 Intel Broadwater
Intel Intel Brookdale-G unsupported 0 Intel Brookdale
-Intel Intel Calistoga UNRECOGNIZED
+Intel Intel Calistoga NO MATCH
Intel Intel Cantiga unsupported 0 Intel Cantiga
Intel Intel Eaglelake supported 0 Intel Eaglelake
-Intel Intel Grantsdale-G UNRECOGNIZED
+Intel Intel Generic Renderer NO MATCH
+Intel Intel Grantsdale-G NO MATCH
Intel Intel HD Graphics 3000 supported 2 Intel HD Graphics
-Intel Intel Lakeport UNRECOGNIZED
+Intel Intel Lakeport NO MATCH
Intel Intel Montara-GM unsupported 0 Intel Montara
Intel Intel Pineview Platform supported 0 Intel Pineview
Intel Intel Springdale-G unsupported 0 Intel Springdale
-Intel Mobile - famiglia Express Chipset 45 (Microsoft Corporation - WDDM 1.1) UNRECOGNIZED
+Intel Mobile - famiglia Express Chipset 45 (Microsoft Corporation - WDDM 1.1) NO MATCH
Intel Mobile 4 Series supported 0 Intel Mobile 4 Series
Intel Mobile 4 Series Express Chipset Family supported 0 Intel Mobile 4 Series
-Intel Mobile 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1) UNRECOGNIZED
+Intel Mobile 45 Express Chipset Family NO MATCH
+Intel Mobile 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1) NO MATCH
Intel Mobile HD Graphics supported 2 Intel HD Graphics
+Intel Mobile Intel(R) 4 Series Express Chipset Family supported 0 Intel Mobile 4 Series
Intel Mobile SandyBridge HD Graphics supported 2 Intel HD Graphics
Intel Montara unsupported 0 Intel Montara
Intel Pineview supported 0 Intel Pineview
-Intel Q45/Q43 Express Chipset UNRECOGNIZED
-Intel Royal BNA Driver UNRECOGNIZED
+Intel Q45/Q43 Express Chipset NO MATCH
+Intel Royal BNA Driver NO MATCH
Intel SandyBridge HD Graphics supported 2 Intel HD Graphics
Intel SandyBridge HD Graphics BR-1006-00V8 supported 2 Intel HD Graphics
Intel Springdale unsupported 0 Intel Springdale
Intel X3100 supported 0 Intel X3100
-Intergraph wcgdrv 06.05.06.18 UNRECOGNIZED
-Intergraph wcgdrv 06.06.00.35 UNRECOGNIZED
-LegendgrafiX Mobile 945 Express C/TitaniumGL/GAC/D3D ACCELERATION/6x86/1 THREADs | http://Legendgra... UNRECOGNIZED
+Intergraph wcgdrv 06.05.06.18 NO MATCH
+Intergraph wcgdrv 06.06.00.35 NO MATCH
+LegendgrafiX Mobile 945 Express C/TitaniumGL/GAC/D3D ACCELERATION/6x86/1 THREADs | http://Legendgra... NO MATCH
LegendgrafiX NVIDIA GeForce GT 430/TitaniumGL/GAC/D3D ACCELERATION/6x86/1 THREADs | http://Legendgr... supported 3 NVIDIA GT 430M
-Linden Lab Headless UNRECOGNIZED
+Linden Lab Headless NO MATCH
Matrox unsupported 0 Matrox
Mesa unsupported 0 Mesa
Mesa Project Software Rasterizer unsupported 0 Mesa
-NVIDIA /PCI/SSE2 UNRECOGNIZED
-NVIDIA /PCI/SSE2/3DNOW! UNRECOGNIZED
+NVIDIA /PCI/SSE2 NO MATCH
+NVIDIA /PCI/SSE2/3DNOW! NO MATCH
NVIDIA 205 supported 0 NVIDIA G 205M
NVIDIA 210 supported 1 NVIDIA G 210
NVIDIA 310 supported 2 NVIDIA G 310M
@@ -768,21 +829,25 @@ NVIDIA 315
NVIDIA 315M supported 2 NVIDIA G 315
NVIDIA 320M supported 2 NVIDIA G 320M
NVIDIA C51 supported 0 NVIDIA C51
-NVIDIA D10M2-20/PCI/SSE2 UNRECOGNIZED
-NVIDIA D10P1-25/PCI/SSE2 UNRECOGNIZED
-NVIDIA D10P1-30/PCI/SSE2 UNRECOGNIZED
-NVIDIA D10P2-50/PCI/SSE2 UNRECOGNIZED
-NVIDIA D11M2-30/PCI/SSE2 UNRECOGNIZED
-NVIDIA D12-P1-35/PCI/SSE2 UNRECOGNIZED
-NVIDIA D12U-15/PCI/SSE2 UNRECOGNIZED
-NVIDIA D13M1-40/PCI/SSE2 UNRECOGNIZED
-NVIDIA D13P1-40/PCI/SSE2 UNRECOGNIZED
-NVIDIA D13U-10/PCI/SSE2 UNRECOGNIZED
-NVIDIA D13U/PCI/SSE2 UNRECOGNIZED
+NVIDIA Corporation GeForce GT 230/PCI/SSE2 supported 2 NVIDIA GT 230M
+NVIDIA Corporation GeForce GTX 285/PCI/SSE2 supported 3 NVIDIA GTX 285
+NVIDIA D10M2-20/PCI/SSE2 NO MATCH
+NVIDIA D10P1-25/PCI/SSE2 NO MATCH
+NVIDIA D10P1-25/PCI/SSE2/3DNOW! NO MATCH
+NVIDIA D10P1-30/PCI/SSE2 NO MATCH
+NVIDIA D10P2-50/PCI/SSE2 NO MATCH
+NVIDIA D11M2-30/PCI/SSE2 NO MATCH
+NVIDIA D12-P1-35/PCI/SSE2 NO MATCH
+NVIDIA D12U-15/PCI/SSE2 NO MATCH
+NVIDIA D13M1-40/PCI/SSE2 NO MATCH
+NVIDIA D13P1-40/PCI/SSE2 NO MATCH
+NVIDIA D13P1-40/PCI/SSE2/3DNOW! NO MATCH
+NVIDIA D13U-10/PCI/SSE2 NO MATCH
+NVIDIA D13U/PCI/SSE2 NO MATCH
NVIDIA D9M supported 1 NVIDIA D9M
NVIDIA D9M-20/PCI/SSE2 supported 1 NVIDIA D9M
-NVIDIA Entry Graphics/PCI/SSE2 UNRECOGNIZED
-NVIDIA Entry Graphics/PCI/SSE2/3DNOW! UNRECOGNIZED
+NVIDIA Entry Graphics/PCI/SSE2 NO MATCH
+NVIDIA Entry Graphics/PCI/SSE2/3DNOW! NO MATCH
NVIDIA G 102M supported 0 NVIDIA G102M
NVIDIA G 103M supported 0 NVIDIA G103M
NVIDIA G 105M supported 0 NVIDIA G105M
@@ -793,16 +858,17 @@ NVIDIA G103M
NVIDIA G105M supported 0 NVIDIA G105M
NVIDIA G210 supported 1 NVIDIA G 210
NVIDIA G210M supported 1 NVIDIA G 210
-NVIDIA G70/PCI/SSE2 UNRECOGNIZED
+NVIDIA G70/PCI/SSE2 NO MATCH
NVIDIA G72 supported 1 NVIDIA G72
NVIDIA G73 supported 1 NVIDIA G73
NVIDIA G84 supported 2 NVIDIA G84
NVIDIA G86 supported 3 NVIDIA G86
NVIDIA G92 supported 3 NVIDIA G92
-NVIDIA G92-200/PCI/SSE2 supported 3 NVIDIA G92
+NVIDIA G92-200/PCI/SSE2 supported 0 NVIDIA G 200
NVIDIA G94 supported 3 NVIDIA G94
-NVIDIA G96/PCI/SSE2 UNRECOGNIZED
-NVIDIA G98/PCI/SSE2 UNRECOGNIZED
+NVIDIA G96/PCI/SSE2 NO MATCH
+NVIDIA G98/PCI/SSE2 NO MATCH
+NVIDIA G98/PCI/SSE2/3DNOW! NO MATCH
NVIDIA GT 120 supported 2 NVIDIA GT 120M
NVIDIA GT 130 supported 2 NVIDIA GT 130M
NVIDIA GT 130M supported 2 NVIDIA GT 130M
@@ -818,8 +884,8 @@ NVIDIA GT 240
NVIDIA GT 240M supported 2 NVIDIA GT 240M
NVIDIA GT 250M supported 2 NVIDIA GT 250M
NVIDIA GT 260M supported 2 NVIDIA GT 260M
-NVIDIA GT 320 supported 2 NVIDIA GT 320M
-NVIDIA GT 320M supported 2 NVIDIA GT 320M
+NVIDIA GT 320 supported 2 NVIDIA G 320M
+NVIDIA GT 320M supported 2 NVIDIA G 320M
NVIDIA GT 330 supported 3 NVIDIA GT 330M
NVIDIA GT 330M supported 3 NVIDIA GT 330M
NVIDIA GT 340 supported 2 NVIDIA GT 340M
@@ -831,7 +897,7 @@ NVIDIA GT 520
NVIDIA GT 540 supported 3 NVIDIA GT 540M
NVIDIA GT 540M supported 3 NVIDIA GT 540M
NVIDIA GT-120 supported 2 NVIDIA GT 120
-NVIDIA GT200/PCI/SSE2 UNRECOGNIZED
+NVIDIA GT200/PCI/SSE2 supported 0 NVIDIA G 200
NVIDIA GTS 150 supported 2 NVIDIA GT 150M
NVIDIA GTS 240 supported 3 NVIDIA GTS 240
NVIDIA GTS 250 supported 3 NVIDIA GTS 250
@@ -858,7 +924,7 @@ NVIDIA GTX 560 Ti
NVIDIA GTX 570 supported 3 NVIDIA GTX 570
NVIDIA GTX 580 supported 3 NVIDIA GTX 580
NVIDIA GTX 590 supported 3 NVIDIA GTX 590
-NVIDIA GeForce UNRECOGNIZED
+NVIDIA GeForce NO MATCH
NVIDIA GeForce 2 supported 0 NVIDIA GeForce 2
NVIDIA GeForce 205/PCI/SSE2 supported 2 NVIDIA 205
NVIDIA GeForce 210 supported 2 NVIDIA 210
@@ -877,34 +943,35 @@ NVIDIA GeForce 4 Go
NVIDIA GeForce 4 MX supported 0 NVIDIA GeForce 4
NVIDIA GeForce 4 Ti supported 0 NVIDIA GeForce 4
NVIDIA GeForce 405/PCI/SSE2 supported 1 NVIDIA G 405
-NVIDIA GeForce 6100 supported 0 NVIDIA GeForce 6100
-NVIDIA GeForce 6100 nForce 400/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
-NVIDIA GeForce 6100 nForce 405/PCI/SSE2 supported 0 NVIDIA GeForce 6100
-NVIDIA GeForce 6100 nForce 405/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
-NVIDIA GeForce 6100 nForce 420/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
-NVIDIA GeForce 6100 nForce 430/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
-NVIDIA GeForce 6100/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
+NVIDIA GeForce 410M/PCI/SSE2 supported 1 NVIDIA G 410M
+NVIDIA GeForce 6100 supported 0 NVIDIA G100
+NVIDIA GeForce 6100 nForce 400/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
+NVIDIA GeForce 6100 nForce 405/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce 6100 nForce 405/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
+NVIDIA GeForce 6100 nForce 420/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
+NVIDIA GeForce 6100 nForce 430/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
+NVIDIA GeForce 6100/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
NVIDIA GeForce 6150 LE/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
NVIDIA GeForce 6150/PCI/SSE2 supported 0 NVIDIA GeForce 6100
NVIDIA GeForce 6150/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
NVIDIA GeForce 6150SE nForce 430/PCI/SSE2 supported 0 NVIDIA GeForce 6100
NVIDIA GeForce 6150SE nForce 430/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
NVIDIA GeForce 6150SE/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6100
-NVIDIA GeForce 6200 supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200 A-LE/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200 A-LE/AGP/SSE2 supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200 A-LE/AGP/SSE2/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200 LE/PCI/SSE2 supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200 LE/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200 TurboCache(TM)/PCI/SSE2 supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200 TurboCache(TM)/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200/AGP/SSE2 supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200/AGP/SSE2/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200/PCI/SSE/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200/PCI/SSE2 supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6200
-NVIDIA GeForce 6200SE TurboCache(TM)/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 6200
+NVIDIA GeForce 6200 supported 0 NVIDIA G 200
+NVIDIA GeForce 6200 A-LE/AGP/SSE/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200 A-LE/AGP/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 6200 A-LE/AGP/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200 LE/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 6200 LE/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200 TurboCache(TM)/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 6200 TurboCache(TM)/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200/AGP/SSE/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200/AGP/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 6200/AGP/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200/PCI/SSE/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 6200/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 6200SE TurboCache(TM)/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
NVIDIA GeForce 6500 supported 0 NVIDIA GeForce 6500
NVIDIA GeForce 6500/PCI/SSE2 supported 0 NVIDIA GeForce 6500
NVIDIA GeForce 6600 supported 1 NVIDIA GeForce 6600
@@ -921,11 +988,13 @@ NVIDIA GeForce 6600/PCI/SSE2
NVIDIA GeForce 6600/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 6600
NVIDIA GeForce 6700 supported 2 NVIDIA GeForce 6700
NVIDIA GeForce 6800 supported 2 NVIDIA GeForce 6800
+NVIDIA GeForce 6800 GS/PCI/SSE2 supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 6800 GS/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 6800 GT/AGP/SSE2 supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 6800 GT/PCI/SSE2 supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 6800 XT/AGP/SSE2 supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 6800 XT/PCI/SSE2 supported 2 NVIDIA GeForce 6800
+NVIDIA GeForce 6800 XT/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 6800/PCI/SSE2 supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 6800/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 6800
NVIDIA GeForce 7000 supported 0 NVIDIA GeForce 7000
@@ -943,12 +1012,12 @@ NVIDIA GeForce 7050 PV / NVIDIA nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7050 PV / nForce 630a/PCI/SSE2 supported 0 NVIDIA GeForce 7000
NVIDIA GeForce 7050 PV / nForce 630a/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 7000
NVIDIA GeForce 7050 SE / NVIDIA nForce 630a/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 7000
-NVIDIA GeForce 7100 supported 0 NVIDIA GeForce 7100
-NVIDIA GeForce 7100 / NVIDIA nForce 620i/PCI/SSE2 supported 0 NVIDIA GeForce 7100
-NVIDIA GeForce 7100 / NVIDIA nForce 630i/PCI/SSE2 supported 0 NVIDIA GeForce 7100
-NVIDIA GeForce 7100 / nForce 630i/PCI/SSE2 supported 0 NVIDIA GeForce 7100
-NVIDIA GeForce 7100 GS/PCI/SSE2 supported 0 NVIDIA GeForce 7100
-NVIDIA GeForce 7100 GS/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 7100
+NVIDIA GeForce 7100 supported 0 NVIDIA G100
+NVIDIA GeForce 7100 / NVIDIA nForce 620i/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce 7100 / NVIDIA nForce 630i/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce 7100 / nForce 630i/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce 7100 GS/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce 7100 GS/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
NVIDIA GeForce 7150M / nForce 630M/PCI/SSE2 supported 0 NVIDIA GeForce 7100
NVIDIA GeForce 7150M / nForce 630M/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 7100
NVIDIA GeForce 7300 supported 1 NVIDIA GeForce 7300
@@ -960,8 +1029,8 @@ NVIDIA GeForce 7300 GT/PCI/SSE2
NVIDIA GeForce 7300 GT/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 7300
NVIDIA GeForce 7300 LE/PCI/SSE2 supported 1 NVIDIA GeForce 7300
NVIDIA GeForce 7300 LE/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 7300
-NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2 supported 1 NVIDIA GeForce 7300
-NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 7300
+NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
NVIDIA GeForce 7300 SE/PCI/SSE2 supported 1 NVIDIA GeForce 7300
NVIDIA GeForce 7300 SE/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 7300
NVIDIA GeForce 7350 LE/PCI/SSE2 supported 1 NVIDIA GeForce 7300
@@ -982,24 +1051,26 @@ NVIDIA GeForce 7800
NVIDIA GeForce 7800 GS/AGP/SSE2 supported 2 NVIDIA GeForce 7800
NVIDIA GeForce 7800 GS/AGP/SSE2/3DNOW! supported 2 NVIDIA GeForce 7800
NVIDIA GeForce 7800 GT/PCI/SSE2 supported 2 NVIDIA GeForce 7800
+NVIDIA GeForce 7800 GT/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 7800
NVIDIA GeForce 7800 GTX/PCI/SSE2 supported 2 NVIDIA GeForce 7800
NVIDIA GeForce 7800 GTX/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 7800
NVIDIA GeForce 7900 supported 2 NVIDIA GeForce 7900
NVIDIA GeForce 7900 GS/PCI/SSE2 supported 2 NVIDIA GeForce 7900
NVIDIA GeForce 7900 GS/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 7900
NVIDIA GeForce 7900 GT/GTO/PCI/SSE2 supported 2 NVIDIA GeForce 7900
+NVIDIA GeForce 7900 GT/GTO/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 7900
NVIDIA GeForce 7900 GT/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 7900
NVIDIA GeForce 7900 GTX/PCI/SSE2 supported 2 NVIDIA GeForce 7900
NVIDIA GeForce 7950 GT/PCI/SSE2 supported 2 NVIDIA GeForce 7900
NVIDIA GeForce 7950 GT/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce 7900
-NVIDIA GeForce 8100 supported 1 NVIDIA GeForce 8100
-NVIDIA GeForce 8100 / nForce 720a/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 8100
-NVIDIA GeForce 8200 supported 1 NVIDIA GeForce 8200
-NVIDIA GeForce 8200/PCI/SSE2 supported 1 NVIDIA GeForce 8200
-NVIDIA GeForce 8200/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 8200
-NVIDIA GeForce 8200M supported 1 NVIDIA GeForce 8200M
-NVIDIA GeForce 8200M G/PCI/SSE2 supported 1 NVIDIA GeForce 8200M
-NVIDIA GeForce 8200M G/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 8200M
+NVIDIA GeForce 8100 supported 0 NVIDIA G100
+NVIDIA GeForce 8100 / nForce 720a/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
+NVIDIA GeForce 8200 supported 0 NVIDIA G 200
+NVIDIA GeForce 8200/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 8200/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 8200M supported 0 NVIDIA G 200
+NVIDIA GeForce 8200M G/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 8200M G/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
NVIDIA GeForce 8300 supported 1 NVIDIA GeForce 8300
NVIDIA GeForce 8300 GS/PCI/SSE2 supported 1 NVIDIA GeForce 8300
NVIDIA GeForce 8400 supported 1 NVIDIA GeForce 8400
@@ -1045,17 +1116,17 @@ NVIDIA GeForce 8800 GTX/PCI/SSE2
NVIDIA GeForce 8800 Ultra/PCI/SSE2 supported 3 NVIDIA GeForce 8800
NVIDIA GeForce 8800M GTS/PCI/SSE2 supported 3 NVIDIA GeForce 8800M
NVIDIA GeForce 8800M GTX/PCI/SSE2 supported 3 NVIDIA GeForce 8800M
-NVIDIA GeForce 9100 supported 0 NVIDIA GeForce 9100
-NVIDIA GeForce 9100/PCI/SSE2 supported 0 NVIDIA GeForce 9100
-NVIDIA GeForce 9100/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 9100
-NVIDIA GeForce 9100M supported 0 NVIDIA GeForce 9100M
-NVIDIA GeForce 9100M G/PCI/SSE2 supported 0 NVIDIA GeForce 9100M
-NVIDIA GeForce 9100M G/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 9100M
-NVIDIA GeForce 9200 supported 1 NVIDIA GeForce 9200
-NVIDIA GeForce 9200/PCI/SSE2 supported 1 NVIDIA GeForce 9200
-NVIDIA GeForce 9200/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce 9200
-NVIDIA GeForce 9200M GE/PCI/SSE2 supported 1 NVIDIA GeForce 9200M
-NVIDIA GeForce 9200M GS/PCI/SSE2 supported 1 NVIDIA GeForce 9200M
+NVIDIA GeForce 9100 supported 0 NVIDIA G100
+NVIDIA GeForce 9100/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce 9100/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
+NVIDIA GeForce 9100M supported 0 NVIDIA G100M
+NVIDIA GeForce 9100M G/PCI/SSE2 supported 0 NVIDIA G100M
+NVIDIA GeForce 9100M G/PCI/SSE2/3DNOW! supported 0 NVIDIA G100M
+NVIDIA GeForce 9200 supported 0 NVIDIA G 200
+NVIDIA GeForce 9200/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 9200/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce 9200M GE/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce 9200M GS/PCI/SSE2 supported 0 NVIDIA G 200
NVIDIA GeForce 9300 supported 1 NVIDIA GeForce 9300
NVIDIA GeForce 9300 / nForce 730i/PCI/SSE2 supported 1 NVIDIA GeForce 9300
NVIDIA GeForce 9300 GE/PCI/SSE2 supported 1 NVIDIA GeForce 9300
@@ -1108,16 +1179,16 @@ NVIDIA GeForce 9800M
NVIDIA GeForce 9800M GS/PCI/SSE2 supported 3 NVIDIA GeForce 9800M
NVIDIA GeForce 9800M GT/PCI/SSE2 supported 3 NVIDIA GeForce 9800M
NVIDIA GeForce 9800M GTS/PCI/SSE2 supported 3 NVIDIA GeForce 9800M
-NVIDIA GeForce FX 5100 supported 0 NVIDIA GeForce FX 5100
-NVIDIA GeForce FX 5100/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce FX 5100
-NVIDIA GeForce FX 5200 supported 0 NVIDIA GeForce FX 5200
-NVIDIA GeForce FX 5200/AGP/SSE supported 0 NVIDIA GeForce FX 5200
-NVIDIA GeForce FX 5200/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce FX 5200
-NVIDIA GeForce FX 5200/AGP/SSE2 supported 0 NVIDIA GeForce FX 5200
-NVIDIA GeForce FX 5200/AGP/SSE2/3DNOW! supported 0 NVIDIA GeForce FX 5200
-NVIDIA GeForce FX 5200/PCI/SSE2 supported 0 NVIDIA GeForce FX 5200
-NVIDIA GeForce FX 5200/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce FX 5200
-NVIDIA GeForce FX 5200LE/AGP/SSE2 supported 0 NVIDIA GeForce FX 5200
+NVIDIA GeForce FX 5100 supported 0 NVIDIA G100
+NVIDIA GeForce FX 5100/AGP/SSE/3DNOW! supported 0 NVIDIA G100
+NVIDIA GeForce FX 5200 supported 0 NVIDIA G 200
+NVIDIA GeForce FX 5200/AGP/SSE supported 0 NVIDIA G 200
+NVIDIA GeForce FX 5200/AGP/SSE/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce FX 5200/AGP/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce FX 5200/AGP/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce FX 5200/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce FX 5200/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
+NVIDIA GeForce FX 5200LE/AGP/SSE2 supported 0 NVIDIA G 200
NVIDIA GeForce FX 5500 supported 0 NVIDIA GeForce FX 5500
NVIDIA GeForce FX 5500/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce FX 5500
NVIDIA GeForce FX 5500/AGP/SSE2 supported 0 NVIDIA GeForce FX 5500
@@ -1136,17 +1207,19 @@ NVIDIA GeForce FX 5800
NVIDIA GeForce FX 5900 supported 1 NVIDIA GeForce FX 5900
NVIDIA GeForce FX 5900/AGP/SSE2 supported 1 NVIDIA GeForce FX 5900
NVIDIA GeForce FX 5900XT/AGP/SSE2 supported 1 NVIDIA GeForce FX 5900
-NVIDIA GeForce FX Go5100 supported 0 NVIDIA GeForce FX Go5100
-NVIDIA GeForce FX Go5100/AGP/SSE2 supported 0 NVIDIA GeForce FX Go5100
-NVIDIA GeForce FX Go5200 supported 0 NVIDIA GeForce FX Go5200
-NVIDIA GeForce FX Go5200/AGP/SSE2 supported 0 NVIDIA GeForce FX Go5200
+NVIDIA GeForce FX Go5100 supported 0 NVIDIA G100
+NVIDIA GeForce FX Go5100/AGP/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce FX Go5200 supported 0 NVIDIA G 200
+NVIDIA GeForce FX Go5200/AGP/SSE2 supported 0 NVIDIA G 200
NVIDIA GeForce FX Go5300 supported 0 NVIDIA GeForce FX Go5300
NVIDIA GeForce FX Go5600 supported 0 NVIDIA GeForce FX Go5600
NVIDIA GeForce FX Go5600/AGP/SSE2 supported 0 NVIDIA GeForce FX Go5600
NVIDIA GeForce FX Go5650/AGP/SSE2 supported 0 NVIDIA GeForce FX Go5600
NVIDIA GeForce FX Go5700 supported 1 NVIDIA GeForce FX Go5700
+NVIDIA GeForce FX Go5700/AGP/SSE2 supported 1 NVIDIA GeForce FX Go5700
NVIDIA GeForce FX Go5xxx/AGP/SSE2 supported 0 NVIDIA GeForce FX Go5xxx
NVIDIA GeForce G 103M/PCI/SSE2 supported 0 NVIDIA G103M
+NVIDIA GeForce G 103M/PCI/SSE2/3DNOW! supported 0 NVIDIA G103M
NVIDIA GeForce G 105M/PCI/SSE2 supported 0 NVIDIA G105M
NVIDIA GeForce G 110M/PCI/SSE2 supported 0 NVIDIA G 110M
NVIDIA GeForce G100/PCI/SSE2 supported 0 NVIDIA G100
@@ -1161,7 +1234,7 @@ NVIDIA GeForce G210M/PCI/SSE2
NVIDIA GeForce G310M/PCI/SSE2 supported 2 NVIDIA G 310M
NVIDIA GeForce GT 120/PCI/SSE2 supported 2 NVIDIA GT 120M
NVIDIA GeForce GT 120/PCI/SSE2/3DNOW! supported 2 NVIDIA GT 120M
-NVIDIA GeForce GT 120M/PCI/SSE2 supported 2 NVIDIA GT 120M
+NVIDIA GeForce GT 120M/PCI/SSE2 supported 1 NVIDIA G 120M
NVIDIA GeForce GT 130M/PCI/SSE2 supported 2 NVIDIA GT 130M
NVIDIA GeForce GT 140/PCI/SSE2 supported 2 NVIDIA GT 140M
NVIDIA GeForce GT 220/PCI/SSE2 supported 2 NVIDIA GT 220M
@@ -1173,8 +1246,8 @@ NVIDIA GeForce GT 240
NVIDIA GeForce GT 240/PCI/SSE2 supported 2 NVIDIA GT 240M
NVIDIA GeForce GT 240/PCI/SSE2/3DNOW! supported 2 NVIDIA GT 240M
NVIDIA GeForce GT 240M/PCI/SSE2 supported 2 NVIDIA GT 240M
-NVIDIA GeForce GT 320/PCI/SSE2 supported 2 NVIDIA GT 320M
-NVIDIA GeForce GT 320M/PCI/SSE2 supported 2 NVIDIA GT 320M
+NVIDIA GeForce GT 320/PCI/SSE2 supported 2 NVIDIA G 320M
+NVIDIA GeForce GT 320M/PCI/SSE2 supported 2 NVIDIA G 320M
NVIDIA GeForce GT 325M/PCI/SSE2 supported 0 NVIDIA GT 325M
NVIDIA GeForce GT 330/PCI/SSE2 supported 3 NVIDIA GT 330M
NVIDIA GeForce GT 330/PCI/SSE2/3DNOW! supported 3 NVIDIA GT 330M
@@ -1192,9 +1265,14 @@ NVIDIA GeForce GT 435M/PCI/SSE2
NVIDIA GeForce GT 440/PCI/SSE2 supported 3 NVIDIA GT 440M
NVIDIA GeForce GT 440/PCI/SSE2/3DNOW! supported 3 NVIDIA GT 440M
NVIDIA GeForce GT 445M/PCI/SSE2 supported 3 NVIDIA GT 445M
+NVIDIA GeForce GT 520/PCI/SSE2 supported 3 NVIDIA GT 520M
+NVIDIA GeForce GT 520/PCI/SSE2/3DNOW! supported 3 NVIDIA GT 520M
NVIDIA GeForce GT 520M/PCI/SSE2 supported 3 NVIDIA GT 520M
-NVIDIA GeForce GT 525M/PCI/SSE2 supported 3 NVIDIA GT 525M
+NVIDIA GeForce GT 525M/PCI/SSE2 supported 3 NVIDIA GT 520M
+NVIDIA GeForce GT 530/PCI/SSE2 supported 3 NVIDIA GT 530M
+NVIDIA GeForce GT 530/PCI/SSE2/3DNOW! supported 3 NVIDIA GT 530M
NVIDIA GeForce GT 540M/PCI/SSE2 supported 3 NVIDIA GT 540M
+NVIDIA GeForce GT 545/PCI/SSE2 supported 3 NVIDIA GT 540M
NVIDIA GeForce GT 550M/PCI/SSE2 supported 3 NVIDIA GT 550M
NVIDIA GeForce GT 555M/PCI/SSE2 supported 3 NVIDIA GT 555M
NVIDIA GeForce GTS 150/PCI/SSE2 supported 2 NVIDIA GT 150M
@@ -1212,9 +1290,11 @@ NVIDIA GeForce GTX 260/PCI/SSE2
NVIDIA GeForce GTX 260/PCI/SSE2/3DNOW! supported 3 NVIDIA GTX 260
NVIDIA GeForce GTX 260M/PCI/SSE2 supported 3 NVIDIA GTX 260
NVIDIA GeForce GTX 275/PCI/SSE2 supported 3 NVIDIA GTX 275
+NVIDIA GeForce GTX 275/PCI/SSE2/3DNOW! supported 3 NVIDIA GTX 275
NVIDIA GeForce GTX 280 supported 3 NVIDIA GTX 280
NVIDIA GeForce GTX 280/PCI/SSE2 supported 3 NVIDIA GTX 280
NVIDIA GeForce GTX 280M/PCI/SSE2 supported 3 NVIDIA GTX 280
+NVIDIA GeForce GTX 285 supported 3 NVIDIA GTX 285
NVIDIA GeForce GTX 285/PCI/SSE2 supported 3 NVIDIA GTX 285
NVIDIA GeForce GTX 295/PCI/SSE2 supported 3 NVIDIA GTX 295
NVIDIA GeForce GTX 460 SE/PCI/SSE2 supported 3 NVIDIA GTX 460
@@ -1232,6 +1312,8 @@ NVIDIA GeForce GTX 550 Ti/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 560 Ti/PCI/SSE2 supported 3 NVIDIA GTX 560
NVIDIA GeForce GTX 560 Ti/PCI/SSE2/3DNOW! supported 3 NVIDIA GTX 560
NVIDIA GeForce GTX 560/PCI/SSE2 supported 3 NVIDIA GTX 560
+NVIDIA GeForce GTX 560/PCI/SSE2/3DNOW! supported 3 NVIDIA GTX 560
+NVIDIA GeForce GTX 560M/PCI/SSE2 supported 3 NVIDIA GTX 560
NVIDIA GeForce GTX 570/PCI/SSE2 supported 3 NVIDIA GTX 570
NVIDIA GeForce GTX 570/PCI/SSE2/3DNOW! supported 3 NVIDIA GTX 570
NVIDIA GeForce GTX 580/PCI/SSE2 supported 3 NVIDIA GTX 580
@@ -1239,13 +1321,13 @@ NVIDIA GeForce GTX 580/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 580M/PCI/SSE2 supported 3 NVIDIA GTX 580M
NVIDIA GeForce GTX 590/PCI/SSE2 supported 3 NVIDIA GTX 590
NVIDIA GeForce Go 6 supported 1 NVIDIA GeForce Go 6
-NVIDIA GeForce Go 6100 supported 0 NVIDIA GeForce Go 6100
-NVIDIA GeForce Go 6100/PCI/SSE2 supported 0 NVIDIA GeForce Go 6100
-NVIDIA GeForce Go 6100/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce Go 6100
+NVIDIA GeForce Go 6100 supported 0 NVIDIA G100
+NVIDIA GeForce Go 6100/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA GeForce Go 6100/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
NVIDIA GeForce Go 6150/PCI/SSE2 supported 0 NVIDIA GeForce Go 6100
NVIDIA GeForce Go 6150/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce Go 6100
-NVIDIA GeForce Go 6200 supported 0 NVIDIA GeForce Go 6200
-NVIDIA GeForce Go 6200/PCI/SSE2 supported 0 NVIDIA GeForce Go 6200
+NVIDIA GeForce Go 6200 supported 0 NVIDIA G 200
+NVIDIA GeForce Go 6200/PCI/SSE2 supported 0 NVIDIA G 200
NVIDIA GeForce Go 6400 supported 1 NVIDIA GeForce Go 6400
NVIDIA GeForce Go 6400/PCI/SSE2 supported 1 NVIDIA GeForce Go 6400
NVIDIA GeForce Go 6600 supported 1 NVIDIA GeForce Go 6600
@@ -1253,9 +1335,9 @@ NVIDIA GeForce Go 6600/PCI/SSE2
NVIDIA GeForce Go 6800 supported 1 NVIDIA GeForce Go 6800
NVIDIA GeForce Go 6800 Ultra/PCI/SSE2 supported 1 NVIDIA GeForce Go 6800
NVIDIA GeForce Go 6800/PCI/SSE2 supported 1 NVIDIA GeForce Go 6800
-NVIDIA GeForce Go 7200 supported 1 NVIDIA GeForce Go 7200
-NVIDIA GeForce Go 7200/PCI/SSE2 supported 1 NVIDIA GeForce Go 7200
-NVIDIA GeForce Go 7200/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce Go 7200
+NVIDIA GeForce Go 7200 supported 0 NVIDIA G 200
+NVIDIA GeForce Go 7200/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA GeForce Go 7200/PCI/SSE2/3DNOW! supported 0 NVIDIA G 200
NVIDIA GeForce Go 7300 supported 1 NVIDIA GeForce Go 7300
NVIDIA GeForce Go 7300/PCI/SSE2 supported 1 NVIDIA GeForce Go 7300
NVIDIA GeForce Go 7300/PCI/SSE2/3DNOW! supported 1 NVIDIA GeForce Go 7300
@@ -1266,6 +1348,7 @@ NVIDIA GeForce Go 7600
NVIDIA GeForce Go 7600/PCI/SSE2 supported 2 NVIDIA GeForce Go 7600
NVIDIA GeForce Go 7600/PCI/SSE2/3DNOW! supported 2 NVIDIA GeForce Go 7600
NVIDIA GeForce Go 7700 supported 2 NVIDIA GeForce Go 7700
+NVIDIA GeForce Go 7700/PCI/SSE2 supported 2 NVIDIA GeForce Go 7700
NVIDIA GeForce Go 7800 supported 2 NVIDIA GeForce Go 7800
NVIDIA GeForce Go 7800 GTX/PCI/SSE2 supported 2 NVIDIA GeForce Go 7800
NVIDIA GeForce Go 7900 supported 2 NVIDIA GeForce Go 7900
@@ -1283,7 +1366,9 @@ NVIDIA GeForce3/AGP/SSE2
NVIDIA GeForce4 420 Go 32M/AGP/SSE2 supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 420 Go 32M/AGP/SSE2/3DNOW! supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 420 Go 32M/PCI/SSE2/3DNOW! supported 0 NVIDIA GeForce 4
+NVIDIA GeForce4 420 Go/AGP/SSE2 supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 440 Go 64M/AGP/SSE2/3DNOW! supported 0 NVIDIA GeForce 4
+NVIDIA GeForce4 440 Go/AGP/SSE2 supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 460 Go/AGP/SSE2 supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 MX 4000/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 MX 4000/AGP/SSE2 supported 0 NVIDIA GeForce 4
@@ -1297,42 +1382,47 @@ NVIDIA GeForce4 MX 440/AGP/SSE2
NVIDIA GeForce4 MX 440/AGP/SSE2/3DNOW! supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 MX 440SE with AGP8X/AGP/SSE2 supported 0 NVIDIA GeForce 4
NVIDIA GeForce4 MX Integrated GPU/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce 4
-NVIDIA GeForce4 Ti 4200 with AGP8X/AGP/SSE supported 0 NVIDIA GeForce 4
-NVIDIA GeForce4 Ti 4200/AGP/SSE/3DNOW! supported 0 NVIDIA GeForce 4
+NVIDIA GeForce4 Ti 4200 with AGP8X/AGP/SSE supported 0 NVIDIA G 200
+NVIDIA GeForce4 Ti 4200/AGP/SSE/3DNOW! supported 0 NVIDIA G 200
NVIDIA GeForce4 Ti 4400/AGP/SSE2 supported 0 NVIDIA GeForce 4
-NVIDIA Generic UNRECOGNIZED
+NVIDIA Generic NO MATCH
NVIDIA ION LE/PCI/SSE2 supported 2 NVIDIA ION
NVIDIA ION/PCI/SSE2 supported 2 NVIDIA ION
NVIDIA ION/PCI/SSE2/3DNOW! supported 2 NVIDIA ION
-NVIDIA MCP61/PCI/SSE2 UNRECOGNIZED
-NVIDIA MCP61/PCI/SSE2/3DNOW! UNRECOGNIZED
-NVIDIA MCP73/PCI/SSE2 UNRECOGNIZED
-NVIDIA MCP79MH/PCI/SSE2 UNRECOGNIZED
-NVIDIA MCP79MX/PCI/SSE2 UNRECOGNIZED
-NVIDIA MCP7A-O/PCI/SSE2 UNRECOGNIZED
-NVIDIA MCP7A-S/PCI/SSE2 UNRECOGNIZED
-NVIDIA MCP89-EPT/PCI/SSE2 UNRECOGNIZED
-NVIDIA N10M-GE1/PCI/SSE2 UNRECOGNIZED
-NVIDIA N10P-GE1/PCI/SSE2 UNRECOGNIZED
-NVIDIA N10P-GV2/PCI/SSE2 UNRECOGNIZED
-NVIDIA N11M-GE1/PCI/SSE2 UNRECOGNIZED
-NVIDIA N11M-GE2/PCI/SSE2 UNRECOGNIZED
-NVIDIA N12E-GS-A1/PCI/SSE2 UNRECOGNIZED
-NVIDIA NB9M-GE/PCI/SSE2 UNRECOGNIZED
-NVIDIA NB9M-GE1/PCI/SSE2 UNRECOGNIZED
-NVIDIA NB9M-GS/PCI/SSE2 UNRECOGNIZED
-NVIDIA NB9M-NS/PCI/SSE2 UNRECOGNIZED
-NVIDIA NB9P-GE1/PCI/SSE2 UNRECOGNIZED
-NVIDIA NB9P-GS/PCI/SSE2 UNRECOGNIZED
-NVIDIA NV17/AGP/3DNOW! UNRECOGNIZED
-NVIDIA NV17/AGP/SSE2 UNRECOGNIZED
+NVIDIA MCP61/PCI/SSE2 supported 1 NVIDIA MCP61
+NVIDIA MCP61/PCI/SSE2/3DNOW! supported 1 NVIDIA MCP61
+NVIDIA MCP73/PCI/SSE2 supported 1 NVIDIA MCP73
+NVIDIA MCP79MH/PCI/SSE2 supported 1 NVIDIA MCP79
+NVIDIA MCP79MX/PCI/SSE2 supported 1 NVIDIA MCP79
+NVIDIA MCP7A-O/PCI/SSE2 supported 1 NVIDIA MCP7A
+NVIDIA MCP7A-S/PCI/SSE2 supported 1 NVIDIA MCP7A
+NVIDIA MCP89-EPT/PCI/SSE2 NO MATCH
+NVIDIA N10M-GE1/PCI/SSE2 supported 1 NVIDIA N10
+NVIDIA N10P-GE1/PCI/SSE2 supported 1 NVIDIA N10
+NVIDIA N10P-GV2/PCI/SSE2 supported 1 NVIDIA N10
+NVIDIA N11M-GE1/PCI/SSE2 NO MATCH
+NVIDIA N11M-GE2/PCI/SSE2 NO MATCH
+NVIDIA N12E-GS-A1/PCI/SSE2 NO MATCH
+NVIDIA N12P-GVR-B-A1/PCI/SSE2 NO MATCH
+NVIDIA N13M-GE1-B-A1/PCI/SSE2 NO MATCH
+NVIDIA N13P-GL-A1/PCI/SSE2 NO MATCH
+NVIDIA NB9M-GE/PCI/SSE2 supported 1 NVIDIA NB9M
+NVIDIA NB9M-GE1/PCI/SSE2 supported 1 NVIDIA NB9M
+NVIDIA NB9M-GS/PCI/SSE2 supported 1 NVIDIA NB9M
+NVIDIA NB9M-NS/PCI/SSE2 supported 1 NVIDIA NB9M
+NVIDIA NB9P-GE1/PCI/SSE2 supported 2 NVIDIA NB9P
+NVIDIA NB9P-GS/PCI/SSE2 supported 2 NVIDIA NB9P
+NVIDIA NV17/AGP/3DNOW! supported 0 NVIDIA NV17
+NVIDIA NV17/AGP/SSE2 supported 0 NVIDIA NV17
NVIDIA NV34 supported 0 NVIDIA NV34
NVIDIA NV35 supported 0 NVIDIA NV35
-NVIDIA NV36/AGP/SSE/3DNOW! UNRECOGNIZED
-NVIDIA NV36/AGP/SSE2 UNRECOGNIZED
-NVIDIA NV41/PCI/SSE2 UNRECOGNIZED
+NVIDIA NV36/AGP/SSE/3DNOW! supported 1 NVIDIA NV36
+NVIDIA NV36/AGP/SSE2 supported 1 NVIDIA NV36
+NVIDIA NV41/PCI/SSE2 supported 1 NVIDIA NV41
NVIDIA NV43 supported 1 NVIDIA NV43
+NVIDIA NV43/PCI/SSE2 supported 1 NVIDIA NV43
NVIDIA NV44 supported 1 NVIDIA NV44
+NVIDIA NV44/AGP/SSE2 supported 1 NVIDIA NV44
NVIDIA NVIDIA GeForce 210 OpenGL Engine supported 2 NVIDIA 210
NVIDIA NVIDIA GeForce 320M OpenGL Engine supported 2 NVIDIA 320M
NVIDIA NVIDIA GeForce 7300 GT OpenGL Engine supported 1 NVIDIA GeForce 7300
@@ -1364,22 +1454,28 @@ NVIDIA NVIDIA GeForce GTX 460M OpenGL Engine
NVIDIA NVIDIA GeForce GTX 465 OpenGL Engine supported 3 NVIDIA GTX 465
NVIDIA NVIDIA GeForce GTX 470 OpenGL Engine supported 3 NVIDIA GTX 470
NVIDIA NVIDIA GeForce GTX 480 OpenGL Engine supported 3 NVIDIA GTX 480
-NVIDIA NVIDIA GeForce Pre-Release ION OpenGL Engine UNRECOGNIZED
+NVIDIA NVIDIA GeForce Pre-Release GF108 ES OpenGL Engine NO MATCH
+NVIDIA NVIDIA GeForce Pre-Release ION OpenGL Engine supported 2 NVIDIA ION
+NVIDIA NVIDIA GeForce Pre-Release MCP7A-J-DC OpenGL Engine supported 1 NVIDIA MCP7A
NVIDIA NVIDIA GeForce4 OpenGL Engine supported 0 NVIDIA GeForce 4
NVIDIA NVIDIA NV34MAP OpenGL Engine supported 0 NVIDIA NV34
NVIDIA NVIDIA Quadro 4000 OpenGL Engine supported 3 NVIDIA Quadro 4000
NVIDIA NVIDIA Quadro FX 4800 OpenGL Engine supported 3 NVIDIA Quadro FX 4800
-NVIDIA NVS 2100M/PCI/SSE2 supported 2 NVIDIA Quadro NVS 2100M
+NVIDIA NVS 2100M/PCI/SSE2 supported 0 NVIDIA G100M
NVIDIA NVS 300/PCI/SSE2 supported 0 NVIDIA Quadro NVS
-NVIDIA NVS 3100M/PCI/SSE2 supported 2 NVIDIA Quadro NVS 3100M
-NVIDIA NVS 4100/PCI/SSE2/3DNOW! supported 0 NVIDIA Quadro NVS
-NVIDIA NVS 4200M/PCI/SSE2 supported 2 NVIDIA Quadro NVS 4200M
-NVIDIA NVS 5100M/PCI/SSE2 supported 2 NVIDIA Quadro NVS 5100M
-NVIDIA PCI UNRECOGNIZED
-NVIDIA Quadro 2000/PCI/SSE2 supported 3 NVIDIA Quadro 2000 M/D
+NVIDIA NVS 3100M/PCI/SSE2 supported 0 NVIDIA G100M
+NVIDIA NVS 4100/PCI/SSE2/3DNOW! supported 0 NVIDIA G100
+NVIDIA NVS 4200M/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA NVS 5100M/PCI/SSE2 supported 0 NVIDIA G100M
+NVIDIA PCI NO MATCH
+NVIDIA Quadro 1000M/PCI/SSE2 supported 0 NVIDIA G100
+NVIDIA Quadro 2000/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA Quadro 2000M/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA Quadro 3000M/PCI/SSE2 supported 3 NVIDIA Quadro 3000M
NVIDIA Quadro 4000 supported 3 NVIDIA Quadro 4000
NVIDIA Quadro 4000 OpenGL Engine supported 3 NVIDIA Quadro 4000
NVIDIA Quadro 4000/PCI/SSE2 supported 3 NVIDIA Quadro 4000
+NVIDIA Quadro 4000M/PCI/SSE2 supported 3 NVIDIA Quadro 4000M
NVIDIA Quadro 5000/PCI/SSE2 supported 3 NVIDIA Quadro 50x0 M
NVIDIA Quadro 5000M/PCI/SSE2 supported 3 NVIDIA Quadro 50x0 M
NVIDIA Quadro 600 supported 2 NVIDIA Quadro 600
@@ -1387,12 +1483,13 @@ NVIDIA Quadro 600/PCI/SSE2
NVIDIA Quadro 600/PCI/SSE2/3DNOW! supported 2 NVIDIA Quadro 600
NVIDIA Quadro 6000 supported 3 NVIDIA Quadro 6000
NVIDIA Quadro 6000/PCI/SSE2 supported 3 NVIDIA Quadro 6000
-NVIDIA Quadro CX/PCI/SSE2 UNRECOGNIZED
+NVIDIA Quadro CX/PCI/SSE2 supported 3 NVIDIA Quadro CX
NVIDIA Quadro DCC supported 0 NVIDIA Quadro DCC
NVIDIA Quadro FX supported 1 NVIDIA Quadro FX
-NVIDIA Quadro FX 1100/AGP/SSE2 supported 1 NVIDIA Quadro FX
+NVIDIA Quadro FX 1100/AGP/SSE2 supported 0 NVIDIA G100
NVIDIA Quadro FX 1400/PCI/SSE2 supported 2 NVIDIA Quadro 400
NVIDIA Quadro FX 1500 supported 1 NVIDIA Quadro FX
+NVIDIA Quadro FX 1500/PCI/SSE2 supported 1 NVIDIA Quadro FX
NVIDIA Quadro FX 1500M/PCI/SSE2 supported 1 NVIDIA Quadro FX 1500M
NVIDIA Quadro FX 1600M/PCI/SSE2 supported 2 NVIDIA Quadro 600
NVIDIA Quadro FX 1700 supported 1 NVIDIA Quadro FX
@@ -1420,7 +1517,9 @@ NVIDIA Quadro FX 4500
NVIDIA Quadro FX 4600 supported 2 NVIDIA Quadro 600
NVIDIA Quadro FX 4800 supported 3 NVIDIA Quadro FX 4800
NVIDIA Quadro FX 4800/PCI/SSE2 supported 3 NVIDIA Quadro FX 4800
+NVIDIA Quadro FX 540/PCI/SSE2/3DNOW! supported 1 NVIDIA Quadro FX
NVIDIA Quadro FX 560 supported 1 NVIDIA Quadro FX
+NVIDIA Quadro FX 560/PCI/SSE2 supported 1 NVIDIA Quadro FX
NVIDIA Quadro FX 5600 supported 2 NVIDIA Quadro 600
NVIDIA Quadro FX 570 supported 1 NVIDIA Quadro FX
NVIDIA Quadro FX 570/PCI/SSE2 supported 1 NVIDIA Quadro FX
@@ -1431,57 +1530,73 @@ NVIDIA Quadro FX 880M
NVIDIA Quadro FX 880M/PCI/SSE2 supported 3 NVIDIA Quadro FX 880M
NVIDIA Quadro FX Go700/AGP/SSE2 supported 1 NVIDIA Quadro FX
NVIDIA Quadro NVS supported 0 NVIDIA Quadro NVS
-NVIDIA Quadro NVS 110M/PCI/SSE2 supported 0 NVIDIA Quadro NVS 1xxM
+NVIDIA Quadro NVS 110M/PCI/SSE2 supported 0 NVIDIA G 110M
NVIDIA Quadro NVS 130M/PCI/SSE2 supported 0 NVIDIA Quadro NVS 1xxM
NVIDIA Quadro NVS 135M/PCI/SSE2 supported 0 NVIDIA Quadro NVS 1xxM
NVIDIA Quadro NVS 140M/PCI/SSE2 supported 0 NVIDIA Quadro NVS 1xxM
NVIDIA Quadro NVS 150M/PCI/SSE2 supported 0 NVIDIA Quadro NVS 1xxM
NVIDIA Quadro NVS 160M/PCI/SSE2 supported 0 NVIDIA Quadro NVS 1xxM
-NVIDIA Quadro NVS 210S/PCI/SSE2/3DNOW! supported 0 NVIDIA Quadro NVS
+NVIDIA Quadro NVS 210S/PCI/SSE2/3DNOW! supported 1 NVIDIA G 210
NVIDIA Quadro NVS 285/PCI/SSE2 supported 0 NVIDIA Quadro NVS
NVIDIA Quadro NVS 290/PCI/SSE2 supported 0 NVIDIA Quadro NVS
NVIDIA Quadro NVS 295/PCI/SSE2 supported 0 NVIDIA Quadro NVS
-NVIDIA Quadro NVS 320M/PCI/SSE2 supported 2 NVIDIA Quadro NVS 320M
+NVIDIA Quadro NVS 320M/PCI/SSE2 supported 2 NVIDIA G 320M
NVIDIA Quadro NVS 55/280 PCI/PCI/SSE2 supported 0 NVIDIA Quadro NVS
NVIDIA Quadro NVS/PCI/SSE2 supported 0 NVIDIA Quadro NVS
-NVIDIA Quadro PCI-E Series/PCI/SSE2/3DNOW! UNRECOGNIZED
-NVIDIA Quadro VX 200/PCI/SSE2 UNRECOGNIZED
-NVIDIA Quadro/AGP/SSE2 UNRECOGNIZED
+NVIDIA Quadro PCI-E Series/PCI/SSE2/3DNOW! NO MATCH
+NVIDIA Quadro VX 200/PCI/SSE2 supported 0 NVIDIA G 200
+NVIDIA Quadro/AGP/SSE2 NO MATCH
NVIDIA Quadro2 supported 0 NVIDIA Quadro2
NVIDIA Quadro4 supported 0 NVIDIA Quadro4
+NVIDIA Quadro4 750 XGL/AGP/SSE2 supported 0 NVIDIA Quadro4
NVIDIA RIVA TNT unsupported 0 NVIDIA RIVA TNT
NVIDIA RIVA TNT2/AGP/SSE2 unsupported 0 NVIDIA RIVA TNT
NVIDIA RIVA TNT2/PCI/3DNOW! unsupported 0 NVIDIA RIVA TNT
+NVIDIA Tesla C2050/PCI/SSE2 supported 0 NVIDIA G 205M
NVIDIA nForce unsupported 0 NVIDIA nForce
-NVIDIA unknown board/AGP/SSE2 UNRECOGNIZED
-NVIDIA unknown board/PCI/SSE2 UNRECOGNIZED
-NVIDIA unknown board/PCI/SSE2/3DNOW! UNRECOGNIZED
+NVIDIA nForce 730a/PCI/SSE2 unsupported 0 NVIDIA nForce
+NVIDIA nForce 730a/PCI/SSE2/3DNOW! unsupported 0 NVIDIA nForce
+NVIDIA nForce 750a SLI/PCI/SSE2 unsupported 0 NVIDIA nForce
+NVIDIA nForce 750a SLI/PCI/SSE2/3DNOW! unsupported 0 NVIDIA nForce
+NVIDIA nForce 760i SLI/PCI/SSE2 unsupported 0 NVIDIA nForce
+NVIDIA nForce 780a SLI/PCI/SSE2/3DNOW! unsupported 0 NVIDIA nForce
+NVIDIA nForce 980a/780a SLI/PCI/SSE2 unsupported 0 NVIDIA nForce
+NVIDIA nForce 980a/780a SLI/PCI/SSE2/3DNOW! unsupported 0 NVIDIA nForce
+NVIDIA unknown board/AGP/SSE2 unsupported 0 NVIDIA Generic
+NVIDIA unknown board/PCI/SSE2 unsupported 0 NVIDIA Generic
+NVIDIA unknown board/PCI/SSE2/3DNOW! unsupported 0 NVIDIA Generic
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5670 OpenGL Engine supported 3 ATI Radeon HD 5600
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5750 OpenGL Engine supported 3 ATI Radeon HD 5700
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5770 OpenGL Engine supported 3 ATI Radeon HD 5700
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6490M OpenGL Engine supported 3 ATI Radeon HD 6400
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6750M OpenGL Engine supported 3 ATI Radeon HD 6700
-Parallels and Intel Inc. 3D-Analyze v2.3 - http://www.tommti-systems.com UNRECOGNIZED
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6770M OpenGL Engine supported 3 ATI Radeon HD 6700
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6970M OpenGL Engine supported 3 ATI Radeon HD 6900
+Parallels and Intel Inc. 3D-Analyze v2.3 - http://www.tommti-systems.com NO MATCH
Parallels and Intel Inc. Parallels using Intel HD Graphics 3000 OpenGL Engine supported 2 Intel HD Graphics
Parallels and NVIDIA Parallels using NVIDIA GeForce 320M OpenGL Engine supported 2 NVIDIA 320M
Parallels and NVIDIA Parallels using NVIDIA GeForce 9400 OpenGL Engine supported 1 NVIDIA GeForce 9400
Parallels and NVIDIA Parallels using NVIDIA GeForce GT 120 OpenGL Engine supported 2 NVIDIA GT 120M
Parallels and NVIDIA Parallels using NVIDIA GeForce GT 330M OpenGL Engine supported 3 NVIDIA GT 330M
Radeon RV350 on Gallium supported 0 ATI RV350 (9600)
-S3 UNRECOGNIZED
+S3 NO MATCH
+S3 Fire GL2 NO MATCH
S3 Graphics VIA/S3G UniChrome IGP/MMX/K3D unsupported 0 S3
+S3 Graphics VIA/S3G UniChrome IGP/MMX/SSE unsupported 0 S3
S3 Graphics VIA/S3G UniChrome Pro IGP/MMX/SSE unsupported 0 S3
S3 Graphics, Incorporated ProSavage/Twister unsupported 0 S3
S3 Graphics, Incorporated S3 Graphics Chrome9 HC unsupported 0 S3
S3 Graphics, Incorporated S3 Graphics DeltaChrome unsupported 0 S3
S3 Graphics, Incorporated VIA Chrome9 HC IGP unsupported 0 S3
SiS unsupported 0 SiS
+SiS 650/M650 VGA unsupported 0 SiS
SiS 661 VGA unsupported 0 SiS
SiS 662 VGA unsupported 0 SiS
SiS 741 VGA unsupported 0 SiS
SiS 760 VGA unsupported 0 SiS
SiS 761GX VGA unsupported 0 SiS
SiS Mirage Graphics3 unsupported 0 SiS
+SiS Xabre VGA unsupported 0 SiS
Trident unsupported 0 Trident
Tungsten Graphics unsupported 0 Tungsten Graphics
Tungsten Graphics, Inc Mesa DRI 865G GEM 20091221 2009Q4 x86/MMX/SSE2 unsupported 0 Mesa
@@ -1520,22 +1635,27 @@ Tungsten Graphics, Inc Mesa DRI IGD GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI IGDNG_D GEM 20091221 2009Q4 x86/MMX/SSE2 unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Ironlake Desktop GEM 20100330 DEVELOPMENT x86/MMX/SSE2 unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Ironlake Mobile GEM 20100330 DEVELOPMENT x86/MMX/SSE2 unsupported 0 Mesa
+Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset 20080716 x86/MMX/SSE2 unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20090712 2009Q2 RC3 x86/MMX... unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2 unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100328 2010Q1 unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT unsupported 0 Mesa
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MM... unsupported 0 Mesa
+Tungsten Graphics, Inc. Mesa DRI R200 (RV250 4C66) 20090101 x86/MMX/SSE2 TCL DRI2 unsupported 0 Mesa
Tungsten Graphics, Inc. Mesa DRI R200 (RV280 5964) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2 unsupported 0 Mesa
VIA unsupported 0 VIA
-VMware, Inc. Gallium 0.3 on SVGA3D; build: RELEASE; UNRECOGNIZED
-VMware, Inc. Gallium 0.4 on i915 (chipset: 945GM) UNRECOGNIZED
-VMware, Inc. Gallium 0.4 on llvmpipe UNRECOGNIZED
-VMware, Inc. Gallium 0.4 on softpipe UNRECOGNIZED
+VMware, Inc. Gallium 0.3 on SVGA3D; build: RELEASE; NO MATCH
+VMware, Inc. Gallium 0.4 on SVGA3D; build: DEBUG; mutex: MSVC Intrinsics NO MATCH
+VMware, Inc. Gallium 0.4 on SVGA3D; build: RELEASE; NO MATCH
+VMware, Inc. Gallium 0.4 on i915 (chipset: 945GM) NO MATCH
+VMware, Inc. Gallium 0.4 on llvmpipe NO MATCH
+VMware, Inc. Gallium 0.4 on softpipe NO MATCH
X.Org Gallium 0.4 on AMD BARTS supported 3 AMD BARTS (HD 6800)
X.Org Gallium 0.4 on AMD CEDAR supported 2 AMD CEDAR (HD 5450)
X.Org Gallium 0.4 on AMD HEMLOCK supported 3 AMD HEMLOCK (HD 5970)
X.Org Gallium 0.4 on AMD JUNIPER supported 3 AMD JUNIPER (HD 5700)
+X.Org Gallium 0.4 on AMD PALM NO MATCH
X.Org Gallium 0.4 on AMD REDWOOD supported 3 AMD REDWOOD (HD 5500/5600)
X.Org Gallium 0.4 on AMD RS780 supported 0 AMD RS780 (HD 3200)
X.Org Gallium 0.4 on AMD RS880 supported 1 AMD RS880 (HD 4200)
@@ -1548,16 +1668,21 @@ X.Org Gallium 0.4 on AMD RV730
X.Org Gallium 0.4 on AMD RV740 supported 3 AMD RV740 (HD 4700)
X.Org Gallium 0.4 on AMD RV770 supported 3 AMD RV770 (HD 4800)
X.Org R300 Project Gallium 0.4 on ATI R300 supported 1 ATI R300 (9700)
+X.Org R300 Project Gallium 0.4 on ATI R350 supported 1 ATI R350 (9800)
+X.Org R300 Project Gallium 0.4 on ATI R420 supported 1 ATI R300 (9700)
X.Org R300 Project Gallium 0.4 on ATI R580 supported 3 ATI R580 (X1900)
X.Org R300 Project Gallium 0.4 on ATI RC410 unsupported 0 ATI RC410 (Xpress 200)
+X.Org R300 Project Gallium 0.4 on ATI RS480 unsupported 0 ATI RS48x (Xpress 200x)
X.Org R300 Project Gallium 0.4 on ATI RS482 unsupported 0 ATI RS48x (Xpress 200x)
X.Org R300 Project Gallium 0.4 on ATI RS600 unsupported 0 ATI RS600 (Xpress 3200)
X.Org R300 Project Gallium 0.4 on ATI RS690 supported 1 ATI R300 (9700)
+X.Org R300 Project Gallium 0.4 on ATI RS740 supported 1 ATI R300 (9700)
X.Org R300 Project Gallium 0.4 on ATI RV350 supported 0 ATI RV350 (9600)
X.Org R300 Project Gallium 0.4 on ATI RV370 supported 0 ATI RV370 (X300)
X.Org R300 Project Gallium 0.4 on ATI RV410 supported 1 ATI RV410 (X700)
X.Org R300 Project Gallium 0.4 on ATI RV515 supported 1 ATI RV515
X.Org R300 Project Gallium 0.4 on ATI RV530 supported 1 ATI RV530
+X.Org R300 Project Gallium 0.4 on ATI RV560 supported 1 ATI R300 (9700)
X.Org R300 Project Gallium 0.4 on ATI RV570 supported 3 ATI RV570 (X1900 GT/PRO)
X.Org R300 Project Gallium 0.4 on R420 supported 1 ATI R300 (9700)
X.Org R300 Project Gallium 0.4 on R580 supported 3 ATI R580 (X1900)
@@ -1573,23 +1698,29 @@ X.Org R300 Project Gallium 0.4 on RV410
X.Org R300 Project Gallium 0.4 on RV515 supported 1 ATI RV515
X.Org R300 Project Gallium 0.4 on RV530 supported 1 ATI RV530
XGI unsupported 0 XGI
-nouveau Gallium 0.4 on NV34 UNRECOGNIZED
-nouveau Gallium 0.4 on NV36 UNRECOGNIZED
-nouveau Gallium 0.4 on NV46 UNRECOGNIZED
-nouveau Gallium 0.4 on NV49 UNRECOGNIZED
-nouveau Gallium 0.4 on NV4A UNRECOGNIZED
-nouveau Gallium 0.4 on NV4B UNRECOGNIZED
-nouveau Gallium 0.4 on NV4E UNRECOGNIZED
-nouveau Gallium 0.4 on NV50 UNRECOGNIZED
-nouveau Gallium 0.4 on NV84 UNRECOGNIZED
-nouveau Gallium 0.4 on NV86 UNRECOGNIZED
-nouveau Gallium 0.4 on NV92 UNRECOGNIZED
-nouveau Gallium 0.4 on NV94 UNRECOGNIZED
-nouveau Gallium 0.4 on NV96 UNRECOGNIZED
-nouveau Gallium 0.4 on NV98 UNRECOGNIZED
-nouveau Gallium 0.4 on NVA0 UNRECOGNIZED
-nouveau Gallium 0.4 on NVA3 UNRECOGNIZED
-nouveau Gallium 0.4 on NVA5 UNRECOGNIZED
-nouveau Gallium 0.4 on NVA8 UNRECOGNIZED
-nouveau Gallium 0.4 on NVAA UNRECOGNIZED
-nouveau Gallium 0.4 on NVAC UNRECOGNIZED
+nouveau Gallium 0.4 on NV31 NO MATCH
+nouveau Gallium 0.4 on NV34 NO MATCH
+nouveau Gallium 0.4 on NV36 NO MATCH
+nouveau Gallium 0.4 on NV43 NO MATCH
+nouveau Gallium 0.4 on NV44 NO MATCH
+nouveau Gallium 0.4 on NV46 NO MATCH
+nouveau Gallium 0.4 on NV49 NO MATCH
+nouveau Gallium 0.4 on NV4A NO MATCH
+nouveau Gallium 0.4 on NV4B NO MATCH
+nouveau Gallium 0.4 on NV4C NO MATCH
+nouveau Gallium 0.4 on NV4E NO MATCH
+nouveau Gallium 0.4 on NV50 NO MATCH
+nouveau Gallium 0.4 on NV63 NO MATCH
+nouveau Gallium 0.4 on NV67 NO MATCH
+nouveau Gallium 0.4 on NV84 NO MATCH
+nouveau Gallium 0.4 on NV86 NO MATCH
+nouveau Gallium 0.4 on NV92 NO MATCH
+nouveau Gallium 0.4 on NV94 NO MATCH
+nouveau Gallium 0.4 on NV96 NO MATCH
+nouveau Gallium 0.4 on NV98 NO MATCH
+nouveau Gallium 0.4 on NVA0 NO MATCH
+nouveau Gallium 0.4 on NVA3 NO MATCH
+nouveau Gallium 0.4 on NVA5 NO MATCH
+nouveau Gallium 0.4 on NVA8 NO MATCH
+nouveau Gallium 0.4 on NVAA NO MATCH
+nouveau Gallium 0.4 on NVAC NO MATCH
diff --git a/indra/newview/tests/gpus_seen.txt b/indra/newview/tests/gpus_seen.txt
index c807f22b58..570f92a9b0 100644
--- a/indra/newview/tests/gpus_seen.txt
+++ b/indra/newview/tests/gpus_seen.txt
@@ -135,94 +135,183 @@ ATI Rage 128
ATI Technologies Inc.
ATI Technologies Inc. x86
ATI Technologies Inc. x86/SSE2
+ATI Technologies Inc. x86/SSE2
ATI Technologies Inc. (Vista) ATI Mobility Radeon HD 5730
+ATI Technologies Inc. 128MB ATI Radeon X1300 x86/SSE2
ATI Technologies Inc. 256MB ATI Radeon X1300PRO x86/SSE2
ATI Technologies Inc. AMD 760G
+ATI Technologies Inc. AMD 760G
ATI Technologies Inc. AMD 760G (Microsoft WDDM 1.1)
ATI Technologies Inc. AMD 780L
ATI Technologies Inc. AMD FirePro 2270
ATI Technologies Inc. AMD M860G with ATI Mobility Radeon 4100
+ATI Technologies Inc. AMD M860G with ATI Mobility Radeon 4100
ATI Technologies Inc. AMD M880G with ATI Mobility Radeon HD 4200
+ATI Technologies Inc. AMD M880G with ATI Mobility Radeon HD 4200
+ATI Technologies Inc. AMD M880G with ATI Mobility Radeon HD 4250
ATI Technologies Inc. AMD M880G with ATI Mobility Radeon HD 4250
+ATI Technologies Inc. AMD RADEON HD 6350
+ATI Technologies Inc. AMD RADEON HD 6450
ATI Technologies Inc. AMD RADEON HD 6450
+ATI Technologies Inc. AMD RADEON HD 6670
+ATI Technologies Inc. AMD Radeon 6600M and 6700M Series
ATI Technologies Inc. AMD Radeon HD 6200 series Graphics
+ATI Technologies Inc. AMD Radeon HD 6200 series Graphics
+ATI Technologies Inc. AMD Radeon HD 6250 Graphics
ATI Technologies Inc. AMD Radeon HD 6250 Graphics
+ATI Technologies Inc. AMD Radeon HD 6290 Graphics
+ATI Technologies Inc. AMD Radeon HD 6300 series Graphics
ATI Technologies Inc. AMD Radeon HD 6300 series Graphics
ATI Technologies Inc. AMD Radeon HD 6300M Series
+ATI Technologies Inc. AMD Radeon HD 6300M Series
+ATI Technologies Inc. AMD Radeon HD 6310 Graphics
ATI Technologies Inc. AMD Radeon HD 6310 Graphics
ATI Technologies Inc. AMD Radeon HD 6310M
+ATI Technologies Inc. AMD Radeon HD 6310M
+ATI Technologies Inc. AMD Radeon HD 6330M
ATI Technologies Inc. AMD Radeon HD 6330M
ATI Technologies Inc. AMD Radeon HD 6350
ATI Technologies Inc. AMD Radeon HD 6370M
+ATI Technologies Inc. AMD Radeon HD 6370M
ATI Technologies Inc. AMD Radeon HD 6400M Series
+ATI Technologies Inc. AMD Radeon HD 6400M Series
+ATI Technologies Inc. AMD Radeon HD 6450
ATI Technologies Inc. AMD Radeon HD 6450
ATI Technologies Inc. AMD Radeon HD 6470M
+ATI Technologies Inc. AMD Radeon HD 6470M
ATI Technologies Inc. AMD Radeon HD 6490M
+ATI Technologies Inc. AMD Radeon HD 6490M
+ATI Technologies Inc. AMD Radeon HD 6500 Series
+ATI Technologies Inc. AMD Radeon HD 6500M Series
+ATI Technologies Inc. AMD Radeon HD 6500M/5600/5700 Series
ATI Technologies Inc. AMD Radeon HD 6500M/5600/5700 Series
ATI Technologies Inc. AMD Radeon HD 6530M
+ATI Technologies Inc. AMD Radeon HD 6530M
ATI Technologies Inc. AMD Radeon HD 6550M
+ATI Technologies Inc. AMD Radeon HD 6550M
+ATI Technologies Inc. AMD Radeon HD 6570
ATI Technologies Inc. AMD Radeon HD 6570
ATI Technologies Inc. AMD Radeon HD 6570M
+ATI Technologies Inc. AMD Radeon HD 6570M
+ATI Technologies Inc. AMD Radeon HD 6570M/5700 Series
ATI Technologies Inc. AMD Radeon HD 6570M/5700 Series
+ATI Technologies Inc. AMD Radeon HD 6600 Series
ATI Technologies Inc. AMD Radeon HD 6600M Series
+ATI Technologies Inc. AMD Radeon HD 6630M
+ATI Technologies Inc. AMD Radeon HD 6650M
ATI Technologies Inc. AMD Radeon HD 6650M
ATI Technologies Inc. AMD Radeon HD 6670
+ATI Technologies Inc. AMD Radeon HD 6670
+ATI Technologies Inc. AMD Radeon HD 6700 Series
ATI Technologies Inc. AMD Radeon HD 6700 Series
ATI Technologies Inc. AMD Radeon HD 6750
+ATI Technologies Inc. AMD Radeon HD 6750
ATI Technologies Inc. AMD Radeon HD 6750M
+ATI Technologies Inc. AMD Radeon HD 6750M
+ATI Technologies Inc. AMD Radeon HD 6770
ATI Technologies Inc. AMD Radeon HD 6770
+ATI Technologies Inc. AMD Radeon HD 6770M
+ATI Technologies Inc. AMD Radeon HD 6800 Series
ATI Technologies Inc. AMD Radeon HD 6800 Series
+ATI Technologies Inc. AMD Radeon HD 6800M Series
+ATI Technologies Inc. AMD Radeon HD 6850
ATI Technologies Inc. AMD Radeon HD 6850M
+ATI Technologies Inc. AMD Radeon HD 6850M
+ATI Technologies Inc. AMD Radeon HD 6870
ATI Technologies Inc. AMD Radeon HD 6870
ATI Technologies Inc. AMD Radeon HD 6870M
+ATI Technologies Inc. AMD Radeon HD 6870M
+ATI Technologies Inc. AMD Radeon HD 6900 Series
ATI Technologies Inc. AMD Radeon HD 6900 Series
+ATI Technologies Inc. AMD Radeon HD 6900M Series
+ATI Technologies Inc. AMD Radeon HD 6970M
ATI Technologies Inc. AMD Radeon HD 6970M
ATI Technologies Inc. AMD Radeon HD 6990
+ATI Technologies Inc. AMD Radeon HD 6990
+ATI Technologies Inc. AMD Radeon(TM) HD 6470M
+ATI Technologies Inc. AMD Radeon(TM) HD 6470M
ATI Technologies Inc. AMD Radeon(TM) HD 6470M
+ATI Technologies Inc. AMD Radeon(TM) HD 6480G
+ATI Technologies Inc. AMD Radeon(TM) HD 6520G
+ATI Technologies Inc. AMD Radeon(TM) HD 6620G
+ATI Technologies Inc. AMD Radeon(TM) HD 6630M
ATI Technologies Inc. ASUS 5870 Eyefinity 6
+ATI Technologies Inc. ASUS A9550 Series
ATI Technologies Inc. ASUS AH2600 Series
ATI Technologies Inc. ASUS AH3450 Series
ATI Technologies Inc. ASUS AH3650 Series
+ATI Technologies Inc. ASUS AH3650 Series
ATI Technologies Inc. ASUS AH4650 Series
ATI Technologies Inc. ASUS ARES
+ATI Technologies Inc. ASUS ARES
ATI Technologies Inc. ASUS EAH2900 Series
ATI Technologies Inc. ASUS EAH3450 Series
+ATI Technologies Inc. ASUS EAH3450 Series
ATI Technologies Inc. ASUS EAH3650 Series
+ATI Technologies Inc. ASUS EAH3650 Series
+ATI Technologies Inc. ASUS EAH4350 series
ATI Technologies Inc. ASUS EAH4350 series
ATI Technologies Inc. ASUS EAH4550 series
+ATI Technologies Inc. ASUS EAH4550 series
ATI Technologies Inc. ASUS EAH4650 series
ATI Technologies Inc. ASUS EAH4670 series
+ATI Technologies Inc. ASUS EAH4670 series
ATI Technologies Inc. ASUS EAH4750 Series
ATI Technologies Inc. ASUS EAH4770 Series
+ATI Technologies Inc. ASUS EAH4770 Series
+ATI Technologies Inc. ASUS EAH4770 series
ATI Technologies Inc. ASUS EAH4770 series
ATI Technologies Inc. ASUS EAH4850 series
ATI Technologies Inc. ASUS EAH5450 Series
+ATI Technologies Inc. ASUS EAH5450 Series
+ATI Technologies Inc. ASUS EAH5550 Series
ATI Technologies Inc. ASUS EAH5550 Series
ATI Technologies Inc. ASUS EAH5570 series
+ATI Technologies Inc. ASUS EAH5570 series
+ATI Technologies Inc. ASUS EAH5670 Series
ATI Technologies Inc. ASUS EAH5670 Series
ATI Technologies Inc. ASUS EAH5750 Series
+ATI Technologies Inc. ASUS EAH5750 Series
+ATI Technologies Inc. ASUS EAH5770 Series
ATI Technologies Inc. ASUS EAH5770 Series
ATI Technologies Inc. ASUS EAH5830 Series
ATI Technologies Inc. ASUS EAH5850 Series
+ATI Technologies Inc. ASUS EAH5850 Series
ATI Technologies Inc. ASUS EAH5870 Series
+ATI Technologies Inc. ASUS EAH5870 Series
+ATI Technologies Inc. ASUS EAH5970 Series
ATI Technologies Inc. ASUS EAH5970 Series
+ATI Technologies Inc. ASUS EAH6450 Series
+ATI Technologies Inc. ASUS EAH6570 Series
+ATI Technologies Inc. ASUS EAH6670 Series
+ATI Technologies Inc. ASUS EAH6850 Series
ATI Technologies Inc. ASUS EAH6850 Series
ATI Technologies Inc. ASUS EAH6870 Series
+ATI Technologies Inc. ASUS EAH6870 Series
+ATI Technologies Inc. ASUS EAH6950 Series
ATI Technologies Inc. ASUS EAH6950 Series
ATI Technologies Inc. ASUS EAH6970 Series
+ATI Technologies Inc. ASUS EAH6970 Series
ATI Technologies Inc. ASUS EAHG4670 series
ATI Technologies Inc. ASUS Extreme AX600 Series
+ATI Technologies Inc. ASUS Extreme AX600 Series
+ATI Technologies Inc. ASUS Extreme AX600XT-TD
ATI Technologies Inc. ASUS Extreme AX600XT-TD
ATI Technologies Inc. ASUS X1300 Series x86/SSE2
ATI Technologies Inc. ASUS X1550 Series
ATI Technologies Inc. ASUS X1950 Series x86/SSE2
ATI Technologies Inc. ASUS X800 Series
+ATI Technologies Inc. ASUS X800 Series
ATI Technologies Inc. ASUS X850 Series
ATI Technologies Inc. ATI All-in-Wonder HD
ATI Technologies Inc. ATI FirePro 2260
+ATI Technologies Inc. ATI FirePro 2260
ATI Technologies Inc. ATI FirePro 2450
ATI Technologies Inc. ATI FirePro M5800
+ATI Technologies Inc. ATI FirePro M5800
ATI Technologies Inc. ATI FirePro M7740
+ATI Technologies Inc. ATI FirePro M7740
+ATI Technologies Inc. ATI FirePro M7820
ATI Technologies Inc. ATI FirePro M7820
ATI Technologies Inc. ATI FirePro V3700 (FireGL)
ATI Technologies Inc. ATI FirePro V3800
@@ -230,113 +319,202 @@ ATI Technologies Inc. ATI FirePro V4800
ATI Technologies Inc. ATI FirePro V4800 (FireGL)
ATI Technologies Inc. ATI FirePro V5800
ATI Technologies Inc. ATI FirePro V7800
+ATI Technologies Inc. ATI MOBILITY RADEON 9600/9700 Series
+ATI Technologies Inc. ATI MOBILITY RADEON 9XXX x86/SSE2
ATI Technologies Inc. ATI MOBILITY RADEON 9XXX x86/SSE2
+ATI Technologies Inc. ATI MOBILITY RADEON HD 2300
ATI Technologies Inc. ATI MOBILITY RADEON HD 3450
+ATI Technologies Inc. ATI MOBILITY RADEON HD 3650
ATI Technologies Inc. ATI MOBILITY RADEON X1600
+ATI Technologies Inc. ATI MOBILITY RADEON X1600
+ATI Technologies Inc. ATI MOBILITY RADEON X2300
ATI Technologies Inc. ATI MOBILITY RADEON X2300
ATI Technologies Inc. ATI MOBILITY RADEON X2300 HD x86/SSE2
ATI Technologies Inc. ATI MOBILITY RADEON X2300 x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. ATI MOBILITY RADEON X2300 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI MOBILITY RADEON X2300 x86/SSE2
ATI Technologies Inc. ATI MOBILITY RADEON X300
+ATI Technologies Inc. ATI MOBILITY RADEON X300
ATI Technologies Inc. ATI MOBILITY RADEON X600
+ATI Technologies Inc. ATI MOBILITY RADEON X700
+ATI Technologies Inc. ATI MOBILITY RADEON XPRESS 200
ATI Technologies Inc. ATI MOBILITY RADEON XPRESS 200
ATI Technologies Inc. ATI Mobility FireGL V5700
+ATI Technologies Inc. ATI Mobility FireGL V5700
ATI Technologies Inc. ATI Mobility Radeon 4100
+ATI Technologies Inc. ATI Mobility Radeon 4100
+ATI Technologies Inc. ATI Mobility Radeon Graphics
ATI Technologies Inc. ATI Mobility Radeon Graphics
ATI Technologies Inc. ATI Mobility Radeon HD 2300
+ATI Technologies Inc. ATI Mobility Radeon HD 2300
+ATI Technologies Inc. ATI Mobility Radeon HD 2400
ATI Technologies Inc. ATI Mobility Radeon HD 2400
ATI Technologies Inc. ATI Mobility Radeon HD 2400 XT
+ATI Technologies Inc. ATI Mobility Radeon HD 2400 XT
+ATI Technologies Inc. ATI Mobility Radeon HD 2600
ATI Technologies Inc. ATI Mobility Radeon HD 2600
ATI Technologies Inc. ATI Mobility Radeon HD 2600 XT
ATI Technologies Inc. ATI Mobility Radeon HD 2700
+ATI Technologies Inc. ATI Mobility Radeon HD 2700
+ATI Technologies Inc. ATI Mobility Radeon HD 3400 Series
ATI Technologies Inc. ATI Mobility Radeon HD 3400 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 3410
ATI Technologies Inc. ATI Mobility Radeon HD 3430
+ATI Technologies Inc. ATI Mobility Radeon HD 3430
+ATI Technologies Inc. ATI Mobility Radeon HD 3450
ATI Technologies Inc. ATI Mobility Radeon HD 3450
ATI Technologies Inc. ATI Mobility Radeon HD 3470
+ATI Technologies Inc. ATI Mobility Radeon HD 3470
ATI Technologies Inc. ATI Mobility Radeon HD 3470 Hybrid X2
ATI Technologies Inc. ATI Mobility Radeon HD 3650
+ATI Technologies Inc. ATI Mobility Radeon HD 3650
+ATI Technologies Inc. ATI Mobility Radeon HD 3670
+ATI Technologies Inc. ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4200
ATI Technologies Inc. ATI Mobility Radeon HD 4200 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4200 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4225
ATI Technologies Inc. ATI Mobility Radeon HD 4225 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4225 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4250
ATI Technologies Inc. ATI Mobility Radeon HD 4250
ATI Technologies Inc. ATI Mobility Radeon HD 4250 Graphics
+ATI Technologies Inc. ATI Mobility Radeon HD 4250 Graphics
+ATI Technologies Inc. ATI Mobility Radeon HD 4250 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4270
ATI Technologies Inc. ATI Mobility Radeon HD 4300 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4300 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4300/4500 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4300/4500 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4330
+ATI Technologies Inc. ATI Mobility Radeon HD 4330
ATI Technologies Inc. ATI Mobility Radeon HD 4330 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4350
ATI Technologies Inc. ATI Mobility Radeon HD 4350 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4350 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4500 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4500 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4500/5100 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4500/5100 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4530
ATI Technologies Inc. ATI Mobility Radeon HD 4530
ATI Technologies Inc. ATI Mobility Radeon HD 4530 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4530 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4550
ATI Technologies Inc. ATI Mobility Radeon HD 4550
ATI Technologies Inc. ATI Mobility Radeon HD 4570
+ATI Technologies Inc. ATI Mobility Radeon HD 4570
ATI Technologies Inc. ATI Mobility Radeon HD 4600 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4600 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4650
ATI Technologies Inc. ATI Mobility Radeon HD 4650
ATI Technologies Inc. ATI Mobility Radeon HD 4650 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4650 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 4670
ATI Technologies Inc. ATI Mobility Radeon HD 4670
ATI Technologies Inc. ATI Mobility Radeon HD 4830 Series
ATI Technologies Inc. ATI Mobility Radeon HD 4850
ATI Technologies Inc. ATI Mobility Radeon HD 4870
+ATI Technologies Inc. ATI Mobility Radeon HD 4870
+ATI Technologies Inc. ATI Mobility Radeon HD 5000
ATI Technologies Inc. ATI Mobility Radeon HD 5000
ATI Technologies Inc. ATI Mobility Radeon HD 5000 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5000 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5145
ATI Technologies Inc. ATI Mobility Radeon HD 5145
ATI Technologies Inc. ATI Mobility Radeon HD 5165
+ATI Technologies Inc. ATI Mobility Radeon HD 5165
+ATI Technologies Inc. ATI Mobility Radeon HD 530v
ATI Technologies Inc. ATI Mobility Radeon HD 530v
ATI Technologies Inc. ATI Mobility Radeon HD 5400 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5400 Series
ATI Technologies Inc. ATI Mobility Radeon HD 540v
ATI Technologies Inc. ATI Mobility Radeon HD 5430
+ATI Technologies Inc. ATI Mobility Radeon HD 5430
+ATI Technologies Inc. ATI Mobility Radeon HD 5450
ATI Technologies Inc. ATI Mobility Radeon HD 5450
ATI Technologies Inc. ATI Mobility Radeon HD 5450 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5450 Series
ATI Technologies Inc. ATI Mobility Radeon HD 545v
+ATI Technologies Inc. ATI Mobility Radeon HD 545v
+ATI Technologies Inc. ATI Mobility Radeon HD 5470
ATI Technologies Inc. ATI Mobility Radeon HD 5470
ATI Technologies Inc. ATI Mobility Radeon HD 550v
+ATI Technologies Inc. ATI Mobility Radeon HD 550v
+ATI Technologies Inc. ATI Mobility Radeon HD 5600/5700 Series
ATI Technologies Inc. ATI Mobility Radeon HD 5600/5700 Series
ATI Technologies Inc. ATI Mobility Radeon HD 560v
ATI Technologies Inc. ATI Mobility Radeon HD 5650
+ATI Technologies Inc. ATI Mobility Radeon HD 5650
ATI Technologies Inc. ATI Mobility Radeon HD 5700 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5700 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5730
ATI Technologies Inc. ATI Mobility Radeon HD 5730
ATI Technologies Inc. ATI Mobility Radeon HD 5800 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5800 Series
+ATI Technologies Inc. ATI Mobility Radeon HD 5830 Series
ATI Technologies Inc. ATI Mobility Radeon HD 5850
+ATI Technologies Inc. ATI Mobility Radeon HD 5850
+ATI Technologies Inc. ATI Mobility Radeon HD 5870
ATI Technologies Inc. ATI Mobility Radeon HD 5870
ATI Technologies Inc. ATI Mobility Radeon HD 6300 series
+ATI Technologies Inc. ATI Mobility Radeon HD 6300 series
+ATI Technologies Inc. ATI Mobility Radeon HD 6370
ATI Technologies Inc. ATI Mobility Radeon HD 6370
ATI Technologies Inc. ATI Mobility Radeon HD 6470M
ATI Technologies Inc. ATI Mobility Radeon HD 6550
+ATI Technologies Inc. ATI Mobility Radeon HD 6550
+ATI Technologies Inc. ATI Mobility Radeon HD 6570
ATI Technologies Inc. ATI Mobility Radeon HD 6570
ATI Technologies Inc. ATI Mobility Radeon X1300
+ATI Technologies Inc. ATI Mobility Radeon X1300
ATI Technologies Inc. ATI Mobility Radeon X1300 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Mobility Radeon X1300 x86/SSE2
+ATI Technologies Inc. ATI Mobility Radeon X1300 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X1350
ATI Technologies Inc. ATI Mobility Radeon X1350 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X1400
+ATI Technologies Inc. ATI Mobility Radeon X1400
+ATI Technologies Inc. ATI Mobility Radeon X1400 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X1400 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X1600
+ATI Technologies Inc. ATI Mobility Radeon X1600
+ATI Technologies Inc. ATI Mobility Radeon X1600 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X1600 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X1700 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X2300
+ATI Technologies Inc. ATI Mobility Radeon X2300
ATI Technologies Inc. ATI Mobility Radeon X2300 (Omega 3.8.442)
ATI Technologies Inc. ATI Mobility Radeon X2300 x86
+ATI Technologies Inc. ATI Mobility Radeon X2300 x86
ATI Technologies Inc. ATI Mobility Radeon X2300 x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. ATI Mobility Radeon X2300 x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. ATI Mobility Radeon X2300 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X2300 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon X2500
+ATI Technologies Inc. ATI Mobility Radeon X2500
ATI Technologies Inc. ATI Mobility Radeon X2500 x86/SSE2
ATI Technologies Inc. ATI Mobility Radeon. HD 530v
+ATI Technologies Inc. ATI Mobility Radeon. HD 530v
+ATI Technologies Inc. ATI Mobility Radeon. HD 5470
ATI Technologies Inc. ATI Mobility Radeon. HD 5470
ATI Technologies Inc. ATI RADEON HD 3200 T25XX by CAMILO
ATI Technologies Inc. ATI RADEON XPRESS 1100
+ATI Technologies Inc. ATI RADEON XPRESS 1100 x86/SSE2
+ATI Technologies Inc. ATI RADEON XPRESS 200 Series
ATI Technologies Inc. ATI RADEON XPRESS 200 Series
ATI Technologies Inc. ATI RADEON XPRESS 200 Series x86/SSE2
ATI Technologies Inc. ATI RADEON XPRESS 200M SERIES
ATI Technologies Inc. ATI Radeon
ATI Technologies Inc. ATI Radeon 2100
+ATI Technologies Inc. ATI Radeon 2100
ATI Technologies Inc. ATI Radeon 2100 (Microsoft - WDDM)
ATI Technologies Inc. ATI Radeon 2100 Graphics
ATI Technologies Inc. ATI Radeon 3000
+ATI Technologies Inc. ATI Radeon 3000
ATI Technologies Inc. ATI Radeon 3000 Graphics
+ATI Technologies Inc. ATI Radeon 3000 Graphics
+ATI Technologies Inc. ATI Radeon 3100 Graphics
ATI Technologies Inc. ATI Radeon 3100 Graphics
ATI Technologies Inc. ATI Radeon 5xxx series
ATI Technologies Inc. ATI Radeon 9550 / X1050 Series
@@ -347,143 +525,239 @@ ATI Technologies Inc. ATI Radeon 9600 / X1050 Series
ATI Technologies Inc. ATI Radeon 9600/9550/X1050 Series
ATI Technologies Inc. ATI Radeon BA Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon BB Prototype OpenGL Engine
+ATI Technologies Inc. ATI Radeon Broadway XT Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon Cedar PRO Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon Cypress PRO Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon Graphics Processor
+ATI Technologies Inc. ATI Radeon Graphics Processor
ATI Technologies Inc. ATI Radeon HD 2200 Graphics
ATI Technologies Inc. ATI Radeon HD 2350
ATI Technologies Inc. ATI Radeon HD 2400
+ATI Technologies Inc. ATI Radeon HD 2400
+ATI Technologies Inc. ATI Radeon HD 2400 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 2400 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 2400 PRO
ATI Technologies Inc. ATI Radeon HD 2400 PRO AGP
ATI Technologies Inc. ATI Radeon HD 2400 Pro
+ATI Technologies Inc. ATI Radeon HD 2400 Pro
ATI Technologies Inc. ATI Radeon HD 2400 Series
+ATI Technologies Inc. ATI Radeon HD 2400 Series
+ATI Technologies Inc. ATI Radeon HD 2400 XT
ATI Technologies Inc. ATI Radeon HD 2400 XT
ATI Technologies Inc. ATI Radeon HD 2400 XT OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 2400 XT OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 2600 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 2600 PRO
ATI Technologies Inc. ATI Radeon HD 2600 PRO OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 2600 PRO OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 2600 Pro
ATI Technologies Inc. ATI Radeon HD 2600 Pro
ATI Technologies Inc. ATI Radeon HD 2600 Series
ATI Technologies Inc. ATI Radeon HD 2600 XT
+ATI Technologies Inc. ATI Radeon HD 2600 XT
ATI Technologies Inc. ATI Radeon HD 2900 GT
ATI Technologies Inc. ATI Radeon HD 2900 XT
ATI Technologies Inc. ATI Radeon HD 3200 Graphics
+ATI Technologies Inc. ATI Radeon HD 3200 Graphics
ATI Technologies Inc. ATI Radeon HD 3300 Graphics
ATI Technologies Inc. ATI Radeon HD 3400 Series
+ATI Technologies Inc. ATI Radeon HD 3400 Series
ATI Technologies Inc. ATI Radeon HD 3450
+ATI Technologies Inc. ATI Radeon HD 3450
+ATI Technologies Inc. ATI Radeon HD 3450 - Dell Optiplex
ATI Technologies Inc. ATI Radeon HD 3450 - Dell Optiplex
ATI Technologies Inc. ATI Radeon HD 3470
ATI Technologies Inc. ATI Radeon HD 3470 - Dell Optiplex
ATI Technologies Inc. ATI Radeon HD 3550
+ATI Technologies Inc. ATI Radeon HD 3550
ATI Technologies Inc. ATI Radeon HD 3600 Series
+ATI Technologies Inc. ATI Radeon HD 3600 Series
+ATI Technologies Inc. ATI Radeon HD 3650
ATI Technologies Inc. ATI Radeon HD 3650
ATI Technologies Inc. ATI Radeon HD 3650 AGP
ATI Technologies Inc. ATI Radeon HD 3730
ATI Technologies Inc. ATI Radeon HD 3800 Series
+ATI Technologies Inc. ATI Radeon HD 3800 Series
+ATI Technologies Inc. ATI Radeon HD 3850
ATI Technologies Inc. ATI Radeon HD 3850
ATI Technologies Inc. ATI Radeon HD 3850 AGP
ATI Technologies Inc. ATI Radeon HD 3870
+ATI Technologies Inc. ATI Radeon HD 3870
ATI Technologies Inc. ATI Radeon HD 3870 X2
ATI Technologies Inc. ATI Radeon HD 4200
+ATI Technologies Inc. ATI Radeon HD 4200
+ATI Technologies Inc. ATI Radeon HD 4250
ATI Technologies Inc. ATI Radeon HD 4250
ATI Technologies Inc. ATI Radeon HD 4250 Graphics
+ATI Technologies Inc. ATI Radeon HD 4250 Graphics
+ATI Technologies Inc. ATI Radeon HD 4270
ATI Technologies Inc. ATI Radeon HD 4270
ATI Technologies Inc. ATI Radeon HD 4290
+ATI Technologies Inc. ATI Radeon HD 4290
+ATI Technologies Inc. ATI Radeon HD 4290 (Engineering Sample)
ATI Technologies Inc. ATI Radeon HD 4300 Series
+ATI Technologies Inc. ATI Radeon HD 4300 Series
+ATI Technologies Inc. ATI Radeon HD 4300/4500 Series
ATI Technologies Inc. ATI Radeon HD 4300/4500 Series
ATI Technologies Inc. ATI Radeon HD 4350
+ATI Technologies Inc. ATI Radeon HD 4350
ATI Technologies Inc. ATI Radeon HD 4350 (Microsoft WDDM 1.1)
ATI Technologies Inc. ATI Radeon HD 4450
+ATI Technologies Inc. ATI Radeon HD 4450
ATI Technologies Inc. ATI Radeon HD 4500 Series
ATI Technologies Inc. ATI Radeon HD 4550
+ATI Technologies Inc. ATI Radeon HD 4550
ATI Technologies Inc. ATI Radeon HD 4600 Series
+ATI Technologies Inc. ATI Radeon HD 4600 Series
+ATI Technologies Inc. ATI Radeon HD 4650
ATI Technologies Inc. ATI Radeon HD 4650
ATI Technologies Inc. ATI Radeon HD 4670
+ATI Technologies Inc. ATI Radeon HD 4670
ATI Technologies Inc. ATI Radeon HD 4670 OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 4670 OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 4700 Series
ATI Technologies Inc. ATI Radeon HD 4700 Series
ATI Technologies Inc. ATI Radeon HD 4720
+ATI Technologies Inc. ATI Radeon HD 4720
ATI Technologies Inc. ATI Radeon HD 4730
+ATI Technologies Inc. ATI Radeon HD 4730
+ATI Technologies Inc. ATI Radeon HD 4730 Series
ATI Technologies Inc. ATI Radeon HD 4730 Series
ATI Technologies Inc. ATI Radeon HD 4750
ATI Technologies Inc. ATI Radeon HD 4770
+ATI Technologies Inc. ATI Radeon HD 4770
+ATI Technologies Inc. ATI Radeon HD 4800 Series
ATI Technologies Inc. ATI Radeon HD 4800 Series
ATI Technologies Inc. ATI Radeon HD 4850
+ATI Technologies Inc. ATI Radeon HD 4850
+ATI Technologies Inc. ATI Radeon HD 4850 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 4850 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 4850 Series
ATI Technologies Inc. ATI Radeon HD 4870
+ATI Technologies Inc. ATI Radeon HD 4870
ATI Technologies Inc. ATI Radeon HD 4870 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 4870 X2
+ATI Technologies Inc. ATI Radeon HD 4870 X2
ATI Technologies Inc. ATI Radeon HD 5400 Series
+ATI Technologies Inc. ATI Radeon HD 5400 Series
+ATI Technologies Inc. ATI Radeon HD 5450
ATI Technologies Inc. ATI Radeon HD 5450
+ATI Technologies Inc. ATI Radeon HD 5470
+ATI Technologies Inc. ATI Radeon HD 5500 Series
ATI Technologies Inc. ATI Radeon HD 5500 Series
ATI Technologies Inc. ATI Radeon HD 5570
+ATI Technologies Inc. ATI Radeon HD 5570
+ATI Technologies Inc. ATI Radeon HD 5600 Series
ATI Technologies Inc. ATI Radeon HD 5600 Series
+ATI Technologies Inc. ATI Radeon HD 5600/5700
ATI Technologies Inc. ATI Radeon HD 5630
ATI Technologies Inc. ATI Radeon HD 5670
+ATI Technologies Inc. ATI Radeon HD 5670
+ATI Technologies Inc. ATI Radeon HD 5670 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 5670 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 5700 Series
+ATI Technologies Inc. ATI Radeon HD 5700 Series
ATI Technologies Inc. ATI Radeon HD 5750
+ATI Technologies Inc. ATI Radeon HD 5750
+ATI Technologies Inc. ATI Radeon HD 5750 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 5750 OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 5770
+ATI Technologies Inc. ATI Radeon HD 5770
ATI Technologies Inc. ATI Radeon HD 5770 OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 5770 OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 5800 Series
ATI Technologies Inc. ATI Radeon HD 5800 Series
ATI Technologies Inc. ATI Radeon HD 5850
+ATI Technologies Inc. ATI Radeon HD 5850
ATI Technologies Inc. ATI Radeon HD 5870
ATI Technologies Inc. ATI Radeon HD 5870 OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 5870 OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 5900 Series
ATI Technologies Inc. ATI Radeon HD 5900 Series
ATI Technologies Inc. ATI Radeon HD 5970
ATI Technologies Inc. ATI Radeon HD 6230
+ATI Technologies Inc. ATI Radeon HD 6230
+ATI Technologies Inc. ATI Radeon HD 6250
ATI Technologies Inc. ATI Radeon HD 6250
ATI Technologies Inc. ATI Radeon HD 6350
ATI Technologies Inc. ATI Radeon HD 6390
ATI Technologies Inc. ATI Radeon HD 6490M OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 6490M OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 6510
+ATI Technologies Inc. ATI Radeon HD 6510
+ATI Technologies Inc. ATI Radeon HD 6570M
ATI Technologies Inc. ATI Radeon HD 6570M
+ATI Technologies Inc. ATI Radeon HD 6630M OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 6750
ATI Technologies Inc. ATI Radeon HD 6750M OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 6750M OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 6770
+ATI Technologies Inc. ATI Radeon HD 6770
+ATI Technologies Inc. ATI Radeon HD 6770M OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 6770M OpenGL Engine
ATI Technologies Inc. ATI Radeon HD 6800 Series
ATI Technologies Inc. ATI Radeon HD 6970M OpenGL Engine
+ATI Technologies Inc. ATI Radeon HD 6970M OpenGL Engine
ATI Technologies Inc. ATI Radeon HD3750
ATI Technologies Inc. ATI Radeon HD4300/HD4500 series
+ATI Technologies Inc. ATI Radeon HD4300/HD4500 series
+ATI Technologies Inc. ATI Radeon HD4670
ATI Technologies Inc. ATI Radeon HD4670
ATI Technologies Inc. ATI Radeon Juniper LE Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon RV710 Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon RV730 Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon RV770 Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon RV790 Prototype OpenGL Engine
+ATI Technologies Inc. ATI Radeon RV790 Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon Redwood PRO Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon Redwood XT Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon Whistler PRO/LP Prototype OpenGL Engine
ATI Technologies Inc. ATI Radeon X1050
ATI Technologies Inc. ATI Radeon X1050 Series
ATI Technologies Inc. ATI Radeon X1200
+ATI Technologies Inc. ATI Radeon X1200
+ATI Technologies Inc. ATI Radeon X1200 Series
ATI Technologies Inc. ATI Radeon X1200 Series
ATI Technologies Inc. ATI Radeon X1200 Series x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. ATI Radeon X1200 Series x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. ATI Radeon X1250
ATI Technologies Inc. ATI Radeon X1250
ATI Technologies Inc. ATI Radeon X1250 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Radeon X1270
+ATI Technologies Inc. ATI Radeon X1270
+ATI Technologies Inc. ATI Radeon X1270 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Radeon X1270 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Radeon X1300/X1550 Series
ATI Technologies Inc. ATI Radeon X1550 Series
+ATI Technologies Inc. ATI Radeon X1550 Series
+ATI Technologies Inc. ATI Radeon X1600 OpenGL Engine
ATI Technologies Inc. ATI Radeon X1600 OpenGL Engine
ATI Technologies Inc. ATI Radeon X1900 OpenGL Engine
+ATI Technologies Inc. ATI Radeon X1900 OpenGL Engine
ATI Technologies Inc. ATI Radeon X1950 GT
ATI Technologies Inc. ATI Radeon X300/X550/X1050 Series
+ATI Technologies Inc. ATI Radeon X300/X550/X1050 Series
ATI Technologies Inc. ATI Radeon Xpress 1100
ATI Technologies Inc. ATI Radeon Xpress 1150
+ATI Technologies Inc. ATI Radeon Xpress 1150
ATI Technologies Inc. ATI Radeon Xpress 1150 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Radeon Xpress 1200
+ATI Technologies Inc. ATI Radeon Xpress 1200
+ATI Technologies Inc. ATI Radeon Xpress 1200 Series
ATI Technologies Inc. ATI Radeon Xpress 1200 Series
ATI Technologies Inc. ATI Radeon Xpress 1200 Series x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. ATI Radeon Xpress 1200 Series x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Radeon Xpress 1200 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Radeon Xpress 1250
+ATI Technologies Inc. ATI Radeon Xpress 1250
+ATI Technologies Inc. ATI Radeon Xpress 1250 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Radeon Xpress 1250 x86/SSE2
ATI Technologies Inc. ATI Radeon Xpress Series
+ATI Technologies Inc. ATI Radeon Xpress Series
+ATI Technologies Inc. ATI Radeon Xpress Series x86/MMX/3DNow!/SSE2
ATI Technologies Inc. ATI Yamaha HD 9000
ATI Technologies Inc. ATi RS880M
+ATI Technologies Inc. ATi RS880M
ATI Technologies Inc. Carte graphique VGA standard
ATI Technologies Inc. Diamond Radeon X1550 Series
ATI Technologies Inc. EG JUNIPER
@@ -491,7 +765,9 @@ ATI Technologies Inc. EG PARK
ATI Technologies Inc. FireGL V3100 Pentium 4 (SSE2)
ATI Technologies Inc. FireMV 2400 PCI DDR x86
ATI Technologies Inc. FireMV 2400 PCI DDR x86/SSE2
+ATI Technologies Inc. FireMV 2400 PCI DDR x86/SSE2
ATI Technologies Inc. GeCube Radeon X1550
+ATI Technologies Inc. GeForce 9600 GT x86/SSE2
ATI Technologies Inc. Geforce 9500 GT
ATI Technologies Inc. Geforce 9500GT
ATI Technologies Inc. Geforce 9800 GT
@@ -501,98 +777,153 @@ ATI Technologies Inc. HIGHTECH EXCALIBUR X700 PRO
ATI Technologies Inc. M21 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. M76M
ATI Technologies Inc. MOBILITY RADEON 7500 DDR x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON 7500 DDR x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON 9000 DDR x86/SSE2
ATI Technologies Inc. MOBILITY RADEON 9000 DDR x86/SSE2
ATI Technologies Inc. MOBILITY RADEON 9000 IGPRADEON 9100 IGP DDR x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON 9100 IGP DDR x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON 9600 x86/SSE2
ATI Technologies Inc. MOBILITY RADEON 9600 x86/SSE2
ATI Technologies Inc. MOBILITY RADEON 9700 x86/SSE2
ATI Technologies Inc. MOBILITY RADEON X300 x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON X300 x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON X600 x86/SSE2
ATI Technologies Inc. MOBILITY RADEON X600 x86/SSE2
ATI Technologies Inc. MOBILITY RADEON X700 SE x86
ATI Technologies Inc. MOBILITY RADEON X700 x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON X700 x86/SSE2
+ATI Technologies Inc. MOBILITY RADEON Xpress 200 Series SW TCL x86/MMX/3DNow!/SSE2
ATI Technologies Inc. MSI RX9550SE
+ATI Technologies Inc. MSI Radeon X1550 Series
+ATI Technologies Inc. Mobility Radeon HD 6000 series
ATI Technologies Inc. Mobility Radeon X2300 HD
+ATI Technologies Inc. Mobility Radeon X2300 HD
+ATI Technologies Inc. Mobility Radeon X2300 HD x86/SSE2
ATI Technologies Inc. Mobility Radeon X2300 HD x86/SSE2
ATI Technologies Inc. RADEON 7000 DDR x86/MMX/3DNow!/SSE
ATI Technologies Inc. RADEON 7000 DDR x86/SSE2
ATI Technologies Inc. RADEON 7500 DDR x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON 7500 DDR x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON 7500 DDR x86/SSE2
ATI Technologies Inc. RADEON 9100 IGP DDR x86/SSE2
ATI Technologies Inc. RADEON 9200 DDR x86/MMX/3DNow!/SSE
ATI Technologies Inc. RADEON 9200 DDR x86/SSE2
ATI Technologies Inc. RADEON 9200 PRO DDR x86/MMX/3DNow!/SSE
ATI Technologies Inc. RADEON 9200 Series DDR x86/MMX/3DNow!/SSE
+ATI Technologies Inc. RADEON 9200 Series DDR x86/MMX/3DNow!/SSE
+ATI Technologies Inc. RADEON 9200 Series DDR x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON 9200 Series DDR x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON 9200 Series DDR x86/SSE
+ATI Technologies Inc. RADEON 9200 Series DDR x86/SSE
+ATI Technologies Inc. RADEON 9200 Series DDR x86/SSE2
ATI Technologies Inc. RADEON 9200 Series DDR x86/SSE2
ATI Technologies Inc. RADEON 9200SE DDR x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON 9200SE DDR x86/SSE2
ATI Technologies Inc. RADEON 9250/9200 Series DDR x86/MMX/3DNow!/SSE
+ATI Technologies Inc. RADEON 9250/9200 Series DDR x86/MMX/3DNow!/SSE
ATI Technologies Inc. RADEON 9250/9200 Series DDR x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON 9250/9200 Series DDR x86/SSE2
+ATI Technologies Inc. RADEON 9250/9200 Series DDR x86/SSE2
ATI Technologies Inc. RADEON 9500
ATI Technologies Inc. RADEON 9550 x86/SSE2
ATI Technologies Inc. RADEON 9600 SERIES
ATI Technologies Inc. RADEON 9600 SERIES x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON 9600 SERIES x86/SSE2
+ATI Technologies Inc. RADEON 9600 TX x86/SSE2
ATI Technologies Inc. RADEON 9600 TX x86/SSE2
ATI Technologies Inc. RADEON 9600 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON 9600 x86/SSE2
+ATI Technologies Inc. RADEON 9600 x86/SSE2
ATI Technologies Inc. RADEON 9700 PRO x86/MMX/3DNow!/SSE
ATI Technologies Inc. RADEON 9800 PRO
ATI Technologies Inc. RADEON 9800 x86/SSE2
ATI Technologies Inc. RADEON IGP 340M DDR x86/SSE2
+ATI Technologies Inc. RADEON IGP 340M DDR x86/SSE2
ATI Technologies Inc. RADEON X300 Series x86/SSE2
ATI Technologies Inc. RADEON X300 x86/SSE2
+ATI Technologies Inc. RADEON X300 x86/SSE2
+ATI Technologies Inc. RADEON X300/X550 Series x86/SSE2
ATI Technologies Inc. RADEON X300/X550 Series x86/SSE2
ATI Technologies Inc. RADEON X550 x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON X550 x86/SSE2
ATI Technologies Inc. RADEON X600 Series
ATI Technologies Inc. RADEON X600 x86/SSE2
+ATI Technologies Inc. RADEON X600 x86/SSE2
+ATI Technologies Inc. RADEON X600/X550 Series
ATI Technologies Inc. RADEON X700 PRO x86/SSE2
ATI Technologies Inc. RADEON X800 SE x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON X800 XT
ATI Technologies Inc. RADEON X800GT
ATI Technologies Inc. RADEON XPRESS 200 Series SW TCL x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON XPRESS 200 Series SW TCL x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON XPRESS 200 Series SW TCL x86/SSE2
ATI Technologies Inc. RADEON XPRESS 200 Series SW TCL x86/SSE2
ATI Technologies Inc. RADEON XPRESS 200 Series x86/SSE2
ATI Technologies Inc. RADEON XPRESS 200M Series SW TCL x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON XPRESS 200M Series SW TCL x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON XPRESS 200M Series SW TCL x86/SSE2
+ATI Technologies Inc. RADEON XPRESS 200M Series SW TCL x86/SSE2
+ATI Technologies Inc. RADEON XPRESS 200M Series x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON XPRESS 200M Series x86/MMX/3DNow!/SSE2
ATI Technologies Inc. RADEON XPRESS 200M Series x86/SSE2
ATI Technologies Inc. RADEON XPRESS Series x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON XPRESS Series x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. RADEON XPRESS Series x86/SSE2
ATI Technologies Inc. RADEON XPRESS Series x86/SSE2
ATI Technologies Inc. RS740
ATI Technologies Inc. RS780C
ATI Technologies Inc. RS780M
+ATI Technologies Inc. RS780M
+ATI Technologies Inc. RS880
ATI Technologies Inc. RS880
ATI Technologies Inc. RV410 Pro x86/SSE2
ATI Technologies Inc. RV790
+ATI Technologies Inc. RV790
+ATI Technologies Inc. Radeon (TM) HD 6470M
ATI Technologies Inc. Radeon (TM) HD 6470M
ATI Technologies Inc. Radeon (TM) HD 6490M
+ATI Technologies Inc. Radeon (TM) HD 6490M
+ATI Technologies Inc. Radeon (TM) HD 6750M
ATI Technologies Inc. Radeon (TM) HD 6770M
+ATI Technologies Inc. Radeon (TM) HD 6770M
+ATI Technologies Inc. Radeon (TM) HD 6850M
+ATI Technologies Inc. Radeon 7000 DDR x86/SSE
ATI Technologies Inc. Radeon 7000 DDR x86/SSE2
ATI Technologies Inc. Radeon 7000 SDR x86/SSE2
ATI Technologies Inc. Radeon 7500 DDR x86/SSE2
+ATI Technologies Inc. Radeon 7500 DDR x86/SSE2
ATI Technologies Inc. Radeon 9000 DDR x86/SSE2
ATI Technologies Inc. Radeon DDR x86/MMX/3DNow!/SSE2
ATI Technologies Inc. Radeon DDR x86/SSE
ATI Technologies Inc. Radeon DDR x86/SSE2
ATI Technologies Inc. Radeon HD 6310
+ATI Technologies Inc. Radeon HD 6310
+ATI Technologies Inc. Radeon HD 6470M
+ATI Technologies Inc. Radeon HD 6490M
+ATI Technologies Inc. Radeon HD 6800 Series
ATI Technologies Inc. Radeon HD 6800 Series
ATI Technologies Inc. Radeon SDR x86/SSE2
+ATI Technologies Inc. Radeon SDR x86/SSE2
ATI Technologies Inc. Radeon X1300 Series
ATI Technologies Inc. Radeon X1300 Series x86/MMX/3DNow!/SSE2
ATI Technologies Inc. Radeon X1300 Series x86/SSE2
ATI Technologies Inc. Radeon X1300/X1550 Series
+ATI Technologies Inc. Radeon X1300/X1550 Series
ATI Technologies Inc. Radeon X1300/X1550 Series x86/SSE2
ATI Technologies Inc. Radeon X1550 64-bit (Microsoft - WDDM)
ATI Technologies Inc. Radeon X1550 Series
ATI Technologies Inc. Radeon X1550 Series x86/SSE2
ATI Technologies Inc. Radeon X1600
ATI Technologies Inc. Radeon X1600 Pro / X1300XT x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. Radeon X1600 Series
ATI Technologies Inc. Radeon X1600 Series x86/SSE2
+ATI Technologies Inc. Radeon X1600/1650 Series
ATI Technologies Inc. Radeon X1600/X1650 Series
ATI Technologies Inc. Radeon X1650 Series
+ATI Technologies Inc. Radeon X1650 Series
ATI Technologies Inc. Radeon X1650 Series x86/MMX/3DNow!/SSE2
ATI Technologies Inc. Radeon X1650 Series x86/SSE2
+ATI Technologies Inc. Radeon X1650 Series x86/SSE2
ATI Technologies Inc. Radeon X1900 Series x86/MMX/3DNow!/SSE2
ATI Technologies Inc. Radeon X1950 Pro
ATI Technologies Inc. Radeon X1950 Pro x86/MMX/3DNow!/SSE2
@@ -602,18 +933,24 @@ ATI Technologies Inc. Radeon X300/X550/X1050 Series
ATI Technologies Inc. Radeon X550/X700 Series
ATI Technologies Inc. Radeon X550XTX x86/MMX/3DNow!/SSE2
ATI Technologies Inc. SAPPHIRE RADEON X300SE
+ATI Technologies Inc. SAPPHIRE RADEON X300SE
ATI Technologies Inc. SAPPHIRE RADEON X300SE x86/MMX/3DNow!/SSE2
ATI Technologies Inc. SAPPHIRE RADEON X300SE x86/SSE2
ATI Technologies Inc. SAPPHIRE Radeon X1550 Series
ATI Technologies Inc. SAPPHIRE Radeon X1550 Series x86/MMX/3DNow!/SSE2
+ATI Technologies Inc. SAPPHIRE Radeon X1550 Series x86/SSE2
+ATI Technologies Inc. SAPPHIRE Radeon X1550 x86/SSE2
+ATI Technologies Inc. Sapphire Radeon HD 3730
ATI Technologies Inc. Sapphire Radeon HD 3730
ATI Technologies Inc. Sapphire Radeon HD 3750
ATI Technologies Inc. Standard VGA Graphics Adapter
+ATI Technologies Inc. Standard VGA Graphics Adapter
ATI Technologies Inc. Tul, RADEON X600 PRO
ATI Technologies Inc. Tul, RADEON X600 PRO x86/SSE2
ATI Technologies Inc. Tul, RADEON X700 PRO
ATI Technologies Inc. Tul, RADEON X700 PRO x86/MMX/3DNow!/SSE2
ATI Technologies Inc. VisionTek Radeon 4350
+ATI Technologies Inc. VisionTek Radeon 4350
ATI Technologies Inc. VisionTek Radeon X1550 Series
ATI Technologies Inc. WRESTLER 9802
ATI Technologies Inc. WRESTLER 9803
@@ -630,6 +967,7 @@ Advanced Micro Devices, Inc. Mesa DRI R600 (RV620 95C5) 20090101 x86/MMX+/3DNow!
Advanced Micro Devices, Inc. Mesa DRI R600 (RV620 95C5) 20090101 x86/MMX/SSE2 TCL DRI2
Advanced Micro Devices, Inc. Mesa DRI R600 (RV635 9596) 20090101 x86/MMX+/3DNow!+/SSE TCL DRI2
Advanced Micro Devices, Inc. Mesa DRI R600 (RV670 9505) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
+Advanced Micro Devices, Inc. Mesa DRI R600 (RV670 9505) 20090101 x86/MMX/SSE2 TCL DRI2
Advanced Micro Devices, Inc. Mesa DRI R600 (RV710 9552) 20090101 x86/MMX/SSE2 TCL DRI2
Advanced Micro Devices, Inc. Mesa DRI R600 (RV730 9490) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
Advanced Micro Devices, Inc. Mesa DRI R600 (RV730 9490) 20090101 x86/MMX/SSE2 TCL DRI2
@@ -648,6 +986,7 @@ DRI R300 Project Mesa DRI R300 (RV350 4153) 20090101 AGP 8x x86/MMX+/3DNow!+/SSE
DRI R300 Project Mesa DRI R300 (RV380 3150) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
DRI R300 Project Mesa DRI R300 (RV380 3150) 20090101 x86/MMX/SSE2 TCL DRI2
DRI R300 Project Mesa DRI R300 (RV380 5B60) 20090101 x86/MMX/SSE2 TCL DRI2
+DRI R300 Project Mesa DRI R300 (RV380 5B60) 20090101 x86/MMX/SSE2 TCL DRI2
DRI R300 Project Mesa DRI R300 (RV380 5B62) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
DRI R300 Project Mesa DRI R300 (RV515 7145) 20090101 x86/MMX/SSE2 TCL DRI2
DRI R300 Project Mesa DRI R300 (RV515 7146) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
@@ -657,11 +996,17 @@ DRI R300 Project Mesa DRI R300 (RV515 714A) 20090101 x86/MMX/SSE2 TCL
DRI R300 Project Mesa DRI R300 (RV515 714A) 20090101 x86/MMX/SSE2 TCL DRI2
DRI R300 Project Mesa DRI R300 (RV530 71C4) 20090101 x86/MMX/SSE2 TCL DRI2
GPU_CLASS_UNKNOWN
+Humper 3D-Analyze v2.3 - http://www.tommti-systems.com
Humper Chromium
+Humper Chromium
+Imagination Technologies PowerVR SGX545
Intel
Intel HD Graphics Family
+Intel HD Graphics Family
Intel 3D-Analyze v2.2 - http://www.tommti-systems.com
Intel 3D-Analyze v2.3 - http://www.tommti-systems.com
+Intel 3D-Analyze v2.3 - http://www.tommti-systems.com
+Intel 4 Series Internal Chipset
Intel 4 Series Internal Chipset
Intel 830M
Intel 845G
@@ -674,19 +1019,26 @@ Intel 945GM
Intel 950
Intel 965
Intel B43 Express Chipset
+Intel B43 Express Chipset
Intel Bear Lake
Intel Broadwater
Intel Brookdale
Intel Cantiga
+Intel EMGD on PowerVR SGX535
Intel Eaglelake
Intel Familia Mobile 45 Express Chipset (Microsoft Corporation - WDDM 1.1)
+Intel Familia Mobile 45 Express Chipset (Microsoft Corporation - WDDM 1.1)
Intel G33
Intel G41
Intel G41 Express Chipset
+Intel G41 Express Chipset
Intel G45
Intel G45/G43 Express Chipset
+Intel G45/G43 Express Chipset
+Intel Graphics Media Accelerator HD
Intel Graphics Media Accelerator HD
Intel HD Graphics
+Intel HD Graphics
Intel HD Graphics 100
Intel HD Graphics 200
Intel HD Graphics 200 BR-1101-00SH
@@ -695,6 +1047,7 @@ Intel HD Graphics 200 BR-1101-00SK
Intel HD Graphics 200 BR-1101-01M5
Intel HD Graphics 200 BR-1101-01M6
Intel HD Graphics BR-1004-01Y1
+Intel HD Graphics BR-1004-01Y1
Intel HD Graphics BR-1006-0364
Intel HD Graphics BR-1006-0365
Intel HD Graphics BR-1006-0366
@@ -704,45 +1057,73 @@ Intel HD Graphics BR-1101-04SZ
Intel HD Graphics BR-1101-04T0
Intel HD Graphics BR-1101-04T9
Intel HD Graphics Family
+Intel HD Graphics Family
Intel HD Graphics Family BR-1012-00Y8
Intel HD Graphics Family BR-1012-00YF
Intel HD Graphics Family BR-1012-00ZD
Intel HD Graphics Family BR-1102-00ML
Intel Inc. Intel GMA 900 OpenGL Engine
+Intel Inc. Intel GMA 900 OpenGL Engine
+Intel Inc. Intel GMA 950 OpenGL Engine
Intel Inc. Intel GMA 950 OpenGL Engine
Intel Inc. Intel GMA X3100 OpenGL Engine
+Intel Inc. Intel GMA X3100 OpenGL Engine
+Intel Inc. Intel HD Graphics 3000 OpenGL Engine
Intel Inc. Intel HD Graphics 3000 OpenGL Engine
Intel Inc. Intel HD Graphics OpenGL Engine
+Intel Inc. Intel HD Graphics OpenGL Engine
Intel Inc. Intel HD xxxx OpenGL Engine
Intel Intel 845G
+Intel Intel 845G
+Intel Intel 855GM
Intel Intel 855GM
Intel Intel 865G
+Intel Intel 865G
Intel Intel 915G
+Intel Intel 915G
+Intel Intel 915GM
Intel Intel 915GM
Intel Intel 945G
+Intel Intel 945G
+Intel Intel 945GM
Intel Intel 945GM
Intel Intel 965/963 Graphics Media Accelerator
+Intel Intel 965/963 Graphics Media Accelerator
+Intel Intel Bear Lake B
Intel Intel Bear Lake B
Intel Intel Broadwater G
Intel Intel Brookdale-G
+Intel Intel Brookdale-G
Intel Intel Calistoga
Intel Intel Cantiga
+Intel Intel Cantiga
Intel Intel Eaglelake
+Intel Intel Eaglelake
+Intel Intel Generic Renderer
+Intel Intel Grantsdale-G
Intel Intel Grantsdale-G
Intel Intel HD Graphics 3000
Intel Intel Lakeport
Intel Intel Montara-GM
Intel Intel Pineview Platform
+Intel Intel Pineview Platform
Intel Intel Springdale-G
Intel Mobile - famiglia Express Chipset 45 (Microsoft Corporation - WDDM 1.1)
Intel Mobile 4 Series
Intel Mobile 4 Series Express Chipset Family
+Intel Mobile 4 Series Express Chipset Family
+Intel Mobile 45 Express Chipset Family
+Intel Mobile 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1)
Intel Mobile 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1)
Intel Mobile HD Graphics
+Intel Mobile HD Graphics
+Intel Mobile Intel(R) 4 Series Express Chipset Family
Intel Mobile SandyBridge HD Graphics
Intel Montara
Intel Pineview
Intel Q45/Q43 Express Chipset
+Intel Q45/Q43 Express Chipset
+Intel Royal BNA Driver
Intel Royal BNA Driver
Intel SandyBridge HD Graphics
Intel SandyBridge HD Graphics BR-1006-00V8
@@ -750,14 +1131,18 @@ Intel Springdale
Intel X3100
Intergraph wcgdrv 06.05.06.18
Intergraph wcgdrv 06.06.00.35
+Intergraph wcgdrv 06.06.00.35
LegendgrafiX Mobile 945 Express C/TitaniumGL/GAC/D3D ACCELERATION/6x86/1 THREADs | http://LegendgrafiX.tk
LegendgrafiX NVIDIA GeForce GT 430/TitaniumGL/GAC/D3D ACCELERATION/6x86/1 THREADs | http://LegendgrafiX.tk
Linden Lab Headless
Matrox
Mesa
Mesa Project Software Rasterizer
+Mesa Project Software Rasterizer
+NVIDIA /PCI/SSE2
NVIDIA /PCI/SSE2
NVIDIA /PCI/SSE2/3DNOW!
+NVIDIA /PCI/SSE2/3DNOW!
NVIDIA 205
NVIDIA 210
NVIDIA 310
@@ -766,8 +1151,13 @@ NVIDIA 315
NVIDIA 315M
NVIDIA 320M
NVIDIA C51
+NVIDIA Corporation GeForce GT 230/PCI/SSE2
+NVIDIA Corporation GeForce GTX 285/PCI/SSE2
+NVIDIA D10M2-20/PCI/SSE2
NVIDIA D10M2-20/PCI/SSE2
NVIDIA D10P1-25/PCI/SSE2
+NVIDIA D10P1-25/PCI/SSE2
+NVIDIA D10P1-25/PCI/SSE2/3DNOW!
NVIDIA D10P1-30/PCI/SSE2
NVIDIA D10P2-50/PCI/SSE2
NVIDIA D11M2-30/PCI/SSE2
@@ -775,11 +1165,16 @@ NVIDIA D12-P1-35/PCI/SSE2
NVIDIA D12U-15/PCI/SSE2
NVIDIA D13M1-40/PCI/SSE2
NVIDIA D13P1-40/PCI/SSE2
+NVIDIA D13P1-40/PCI/SSE2
+NVIDIA D13P1-40/PCI/SSE2/3DNOW!
NVIDIA D13U-10/PCI/SSE2
NVIDIA D13U/PCI/SSE2
+NVIDIA D13U/PCI/SSE2
NVIDIA D9M
NVIDIA D9M-20/PCI/SSE2
NVIDIA Entry Graphics/PCI/SSE2
+NVIDIA Entry Graphics/PCI/SSE2
+NVIDIA Entry Graphics/PCI/SSE2/3DNOW!
NVIDIA Entry Graphics/PCI/SSE2/3DNOW!
NVIDIA G 102M
NVIDIA G 103M
@@ -800,7 +1195,10 @@ NVIDIA G92
NVIDIA G92-200/PCI/SSE2
NVIDIA G94
NVIDIA G96/PCI/SSE2
+NVIDIA G96/PCI/SSE2
NVIDIA G98/PCI/SSE2
+NVIDIA G98/PCI/SSE2
+NVIDIA G98/PCI/SSE2/3DNOW!
NVIDIA GT 120
NVIDIA GT 130
NVIDIA GT 130M
@@ -809,6 +1207,8 @@ NVIDIA GT 150
NVIDIA GT 160M
NVIDIA GT 220
NVIDIA GT 220/PCI/SSE2
+NVIDIA GT 220/PCI/SSE2
+NVIDIA GT 220/PCI/SSE2/3DNOW!
NVIDIA GT 220/PCI/SSE2/3DNOW!
NVIDIA GT 230
NVIDIA GT 230M
@@ -859,58 +1259,89 @@ NVIDIA GTX 590
NVIDIA GeForce
NVIDIA GeForce 2
NVIDIA GeForce 205/PCI/SSE2
+NVIDIA GeForce 205/PCI/SSE2
NVIDIA GeForce 210
NVIDIA GeForce 210/PCI/SSE2
+NVIDIA GeForce 210/PCI/SSE2
+NVIDIA GeForce 210/PCI/SSE2/3DNOW!
NVIDIA GeForce 210/PCI/SSE2/3DNOW!
NVIDIA GeForce 3
NVIDIA GeForce 305M/PCI/SSE2
+NVIDIA GeForce 305M/PCI/SSE2
+NVIDIA GeForce 310/PCI/SSE2
NVIDIA GeForce 310/PCI/SSE2
NVIDIA GeForce 310/PCI/SSE2/3DNOW!
+NVIDIA GeForce 310/PCI/SSE2/3DNOW!
+NVIDIA GeForce 310M/PCI/SSE2
NVIDIA GeForce 310M/PCI/SSE2
NVIDIA GeForce 315/PCI/SSE2
+NVIDIA GeForce 315/PCI/SSE2
NVIDIA GeForce 315/PCI/SSE2/3DNOW!
+NVIDIA GeForce 315/PCI/SSE2/3DNOW!
+NVIDIA GeForce 315M/PCI/SSE2
NVIDIA GeForce 315M/PCI/SSE2
NVIDIA GeForce 320M/PCI/SSE2
NVIDIA GeForce 4 Go
NVIDIA GeForce 4 MX
NVIDIA GeForce 4 Ti
NVIDIA GeForce 405/PCI/SSE2
+NVIDIA GeForce 405/PCI/SSE2
+NVIDIA GeForce 410M/PCI/SSE2
NVIDIA GeForce 6100
NVIDIA GeForce 6100 nForce 400/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6100 nForce 400/PCI/SSE2/3DNOW!
NVIDIA GeForce 6100 nForce 405/PCI/SSE2
NVIDIA GeForce 6100 nForce 405/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6100 nForce 405/PCI/SSE2/3DNOW!
NVIDIA GeForce 6100 nForce 420/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6100 nForce 420/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6100 nForce 430/PCI/SSE2/3DNOW!
NVIDIA GeForce 6100 nForce 430/PCI/SSE2/3DNOW!
NVIDIA GeForce 6100/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6100/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6150 LE/PCI/SSE2/3DNOW!
NVIDIA GeForce 6150 LE/PCI/SSE2/3DNOW!
NVIDIA GeForce 6150/PCI/SSE2
NVIDIA GeForce 6150/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6150/PCI/SSE2/3DNOW!
NVIDIA GeForce 6150SE nForce 430/PCI/SSE2
+NVIDIA GeForce 6150SE nForce 430/PCI/SSE2
+NVIDIA GeForce 6150SE nForce 430/PCI/SSE2/3DNOW!
NVIDIA GeForce 6150SE nForce 430/PCI/SSE2/3DNOW!
NVIDIA GeForce 6150SE/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6150SE/PCI/SSE2/3DNOW!
NVIDIA GeForce 6200
NVIDIA GeForce 6200 A-LE/AGP/SSE/3DNOW!
NVIDIA GeForce 6200 A-LE/AGP/SSE2
NVIDIA GeForce 6200 A-LE/AGP/SSE2/3DNOW!
NVIDIA GeForce 6200 LE/PCI/SSE2
+NVIDIA GeForce 6200 LE/PCI/SSE2
NVIDIA GeForce 6200 LE/PCI/SSE2/3DNOW!
NVIDIA GeForce 6200 TurboCache(TM)/PCI/SSE2
+NVIDIA GeForce 6200 TurboCache(TM)/PCI/SSE2
NVIDIA GeForce 6200 TurboCache(TM)/PCI/SSE2/3DNOW!
NVIDIA GeForce 6200/AGP/SSE/3DNOW!
+NVIDIA GeForce 6200/AGP/SSE/3DNOW!
+NVIDIA GeForce 6200/AGP/SSE2
NVIDIA GeForce 6200/AGP/SSE2
NVIDIA GeForce 6200/AGP/SSE2/3DNOW!
NVIDIA GeForce 6200/PCI/SSE/3DNOW!
NVIDIA GeForce 6200/PCI/SSE2
+NVIDIA GeForce 6200/PCI/SSE2
+NVIDIA GeForce 6200/PCI/SSE2/3DNOW!
NVIDIA GeForce 6200/PCI/SSE2/3DNOW!
NVIDIA GeForce 6200SE TurboCache(TM)/PCI/SSE2/3DNOW!
NVIDIA GeForce 6500
NVIDIA GeForce 6500/PCI/SSE2
+NVIDIA GeForce 6500/PCI/SSE2
NVIDIA GeForce 6600
NVIDIA GeForce 6600 GT/AGP/SSE/3DNOW!
NVIDIA GeForce 6600 GT/AGP/SSE2
+NVIDIA GeForce 6600 GT/AGP/SSE2
NVIDIA GeForce 6600 GT/PCI/SSE/3DNOW!
NVIDIA GeForce 6600 GT/PCI/SSE2
NVIDIA GeForce 6600 GT/PCI/SSE2/3DNOW!
+NVIDIA GeForce 6600 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 6600 LE/PCI/SSE2
NVIDIA GeForce 6600/AGP/SSE/3DNOW!
NVIDIA GeForce 6600/AGP/SSE2
@@ -919,49 +1350,77 @@ NVIDIA GeForce 6600/PCI/SSE2
NVIDIA GeForce 6600/PCI/SSE2/3DNOW!
NVIDIA GeForce 6700
NVIDIA GeForce 6800
+NVIDIA GeForce 6800 GS/PCI/SSE2
NVIDIA GeForce 6800 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 6800 GT/AGP/SSE2
NVIDIA GeForce 6800 GT/PCI/SSE2
NVIDIA GeForce 6800 XT/AGP/SSE2
NVIDIA GeForce 6800 XT/PCI/SSE2
+NVIDIA GeForce 6800 XT/PCI/SSE2/3DNOW!
NVIDIA GeForce 6800/PCI/SSE2
NVIDIA GeForce 6800/PCI/SSE2/3DNOW!
NVIDIA GeForce 7000
NVIDIA GeForce 7000M
NVIDIA GeForce 7000M / nForce 610M/PCI/SSE2
NVIDIA GeForce 7000M / nForce 610M/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7000M / nForce 610M/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7025 / NVIDIA nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7025 / NVIDIA nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7025 / nForce 630a/PCI/SSE2
+NVIDIA GeForce 7025 / nForce 630a/PCI/SSE2
+NVIDIA GeForce 7025 / nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7025 / nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7050 / NVIDIA nForce 610i/PCI/SSE2
+NVIDIA GeForce 7050 / NVIDIA nForce 610i/PCI/SSE2
NVIDIA GeForce 7050 / NVIDIA nForce 620i/PCI/SSE2
NVIDIA GeForce 7050 / nForce 610i/PCI/SSE2
+NVIDIA GeForce 7050 / nForce 610i/PCI/SSE2
+NVIDIA GeForce 7050 / nForce 620i/PCI/SSE2
NVIDIA GeForce 7050 / nForce 620i/PCI/SSE2
NVIDIA GeForce 7050 PV / NVIDIA nForce 630a/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7050 PV / NVIDIA nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7050 PV / nForce 630a/PCI/SSE2
NVIDIA GeForce 7050 PV / nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7050 SE / NVIDIA nForce 630a/PCI/SSE2/3DNOW!
NVIDIA GeForce 7100
NVIDIA GeForce 7100 / NVIDIA nForce 620i/PCI/SSE2
+NVIDIA GeForce 7100 / NVIDIA nForce 620i/PCI/SSE2
+NVIDIA GeForce 7100 / NVIDIA nForce 630i/PCI/SSE2
NVIDIA GeForce 7100 / NVIDIA nForce 630i/PCI/SSE2
NVIDIA GeForce 7100 / nForce 630i/PCI/SSE2
+NVIDIA GeForce 7100 / nForce 630i/PCI/SSE2
+NVIDIA GeForce 7100 GS/PCI/SSE2
NVIDIA GeForce 7100 GS/PCI/SSE2
NVIDIA GeForce 7100 GS/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7100 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7150M / nForce 630M/PCI/SSE2
+NVIDIA GeForce 7150M / nForce 630M/PCI/SSE2
+NVIDIA GeForce 7150M / nForce 630M/PCI/SSE2/3DNOW!
NVIDIA GeForce 7150M / nForce 630M/PCI/SSE2/3DNOW!
NVIDIA GeForce 7300
NVIDIA GeForce 7300 GS/PCI/SSE2
+NVIDIA GeForce 7300 GS/PCI/SSE2
+NVIDIA GeForce 7300 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7300 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7300 GT/AGP/SSE2
NVIDIA GeForce 7300 GT/AGP/SSE2/3DNOW!
NVIDIA GeForce 7300 GT/PCI/SSE2
+NVIDIA GeForce 7300 GT/PCI/SSE2
NVIDIA GeForce 7300 GT/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7300 GT/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7300 LE/PCI/SSE2
NVIDIA GeForce 7300 LE/PCI/SSE2
NVIDIA GeForce 7300 LE/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7300 LE/PCI/SSE2/3DNOW!
NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2
+NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2
+NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7300 SE/7200 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7300 SE/PCI/SSE2
+NVIDIA GeForce 7300 SE/PCI/SSE2
NVIDIA GeForce 7300 SE/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7300 SE/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7350 LE/PCI/SSE2
NVIDIA GeForce 7350 LE/PCI/SSE2
NVIDIA GeForce 7500
NVIDIA GeForce 7500 LE/PCI/SSE2
@@ -970,22 +1429,30 @@ NVIDIA GeForce 7600
NVIDIA GeForce 7600 GS/AGP/SSE2
NVIDIA GeForce 7600 GS/AGP/SSE2/3DNOW!
NVIDIA GeForce 7600 GS/PCI/SSE2
+NVIDIA GeForce 7600 GS/PCI/SSE2
+NVIDIA GeForce 7600 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7600 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7600 GT/AGP/SSE/3DNOW!
NVIDIA GeForce 7600 GT/AGP/SSE2
NVIDIA GeForce 7600 GT/PCI/SSE2
+NVIDIA GeForce 7600 GT/PCI/SSE2
NVIDIA GeForce 7600 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 7650 GS/PCI/SSE2
NVIDIA GeForce 7800
NVIDIA GeForce 7800 GS/AGP/SSE2
NVIDIA GeForce 7800 GS/AGP/SSE2/3DNOW!
NVIDIA GeForce 7800 GT/PCI/SSE2
+NVIDIA GeForce 7800 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 7800 GTX/PCI/SSE2
NVIDIA GeForce 7800 GTX/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7800 GTX/PCI/SSE2/3DNOW!
NVIDIA GeForce 7900
NVIDIA GeForce 7900 GS/PCI/SSE2
+NVIDIA GeForce 7900 GS/PCI/SSE2
NVIDIA GeForce 7900 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 7900 GT/GTO/PCI/SSE2
+NVIDIA GeForce 7900 GT/GTO/PCI/SSE2/3DNOW!
+NVIDIA GeForce 7900 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 7900 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 7900 GTX/PCI/SSE2
NVIDIA GeForce 7950 GT/PCI/SSE2
@@ -994,123 +1461,186 @@ NVIDIA GeForce 8100
NVIDIA GeForce 8100 / nForce 720a/PCI/SSE2/3DNOW!
NVIDIA GeForce 8200
NVIDIA GeForce 8200/PCI/SSE2
+NVIDIA GeForce 8200/PCI/SSE2
+NVIDIA GeForce 8200/PCI/SSE2/3DNOW!
NVIDIA GeForce 8200/PCI/SSE2/3DNOW!
NVIDIA GeForce 8200M
NVIDIA GeForce 8200M G/PCI/SSE2
+NVIDIA GeForce 8200M G/PCI/SSE2
+NVIDIA GeForce 8200M G/PCI/SSE2/3DNOW!
NVIDIA GeForce 8200M G/PCI/SSE2/3DNOW!
NVIDIA GeForce 8300
NVIDIA GeForce 8300 GS/PCI/SSE2
+NVIDIA GeForce 8300 GS/PCI/SSE2
NVIDIA GeForce 8400
NVIDIA GeForce 8400 GS/PCI/SSE/3DNOW!
NVIDIA GeForce 8400 GS/PCI/SSE2
+NVIDIA GeForce 8400 GS/PCI/SSE2
+NVIDIA GeForce 8400 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400GS/PCI/SSE2
+NVIDIA GeForce 8400GS/PCI/SSE2
+NVIDIA GeForce 8400GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400M
NVIDIA GeForce 8400M G/PCI/SSE2
+NVIDIA GeForce 8400M G/PCI/SSE2
+NVIDIA GeForce 8400M G/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400M G/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400M GS/PCI/SSE2
+NVIDIA GeForce 8400M GS/PCI/SSE2
+NVIDIA GeForce 8400M GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400M GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8400M GT/PCI/SSE2
+NVIDIA GeForce 8400M GT/PCI/SSE2
NVIDIA GeForce 8500
NVIDIA GeForce 8500 GT/PCI/SSE2
+NVIDIA GeForce 8500 GT/PCI/SSE2
+NVIDIA GeForce 8500 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 8500 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 8600
NVIDIA GeForce 8600 GS/PCI/SSE2
+NVIDIA GeForce 8600 GS/PCI/SSE2
NVIDIA GeForce 8600 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8600 GT/PCI/SSE2
+NVIDIA GeForce 8600 GT/PCI/SSE2
+NVIDIA GeForce 8600 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 8600 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 8600 GTS/PCI/SSE2
NVIDIA GeForce 8600 GTS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8600GS/PCI/SSE2
+NVIDIA GeForce 8600GS/PCI/SSE2
NVIDIA GeForce 8600M
NVIDIA GeForce 8600M GS/PCI/SSE2
NVIDIA GeForce 8600M GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8600M GT/PCI/SSE2
+NVIDIA GeForce 8600M GT/PCI/SSE2
NVIDIA GeForce 8700
NVIDIA GeForce 8700M
NVIDIA GeForce 8700M GT/PCI/SSE2
+NVIDIA GeForce 8700M GT/PCI/SSE2
NVIDIA GeForce 8800
NVIDIA GeForce 8800 GS/PCI/SSE2
NVIDIA GeForce 8800 GT/PCI/SSE2
+NVIDIA GeForce 8800 GT/PCI/SSE2
+NVIDIA GeForce 8800 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 8800 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 8800 GTS 512/PCI/SSE2
NVIDIA GeForce 8800 GTS 512/PCI/SSE2/3DNOW!
NVIDIA GeForce 8800 GTS/PCI/SSE2
+NVIDIA GeForce 8800 GTS/PCI/SSE2
NVIDIA GeForce 8800 GTS/PCI/SSE2/3DNOW!
NVIDIA GeForce 8800 GTX/PCI/SSE2
NVIDIA GeForce 8800 Ultra/PCI/SSE2
NVIDIA GeForce 8800M GTS/PCI/SSE2
+NVIDIA GeForce 8800M GTS/PCI/SSE2
+NVIDIA GeForce 8800M GTX/PCI/SSE2
NVIDIA GeForce 8800M GTX/PCI/SSE2
NVIDIA GeForce 9100
NVIDIA GeForce 9100/PCI/SSE2
+NVIDIA GeForce 9100/PCI/SSE2
NVIDIA GeForce 9100/PCI/SSE2/3DNOW!
NVIDIA GeForce 9100M
NVIDIA GeForce 9100M G/PCI/SSE2
+NVIDIA GeForce 9100M G/PCI/SSE2
NVIDIA GeForce 9100M G/PCI/SSE2/3DNOW!
NVIDIA GeForce 9200
NVIDIA GeForce 9200/PCI/SSE2
+NVIDIA GeForce 9200/PCI/SSE2
NVIDIA GeForce 9200/PCI/SSE2/3DNOW!
+NVIDIA GeForce 9200/PCI/SSE2/3DNOW!
+NVIDIA GeForce 9200M GE/PCI/SSE2
NVIDIA GeForce 9200M GE/PCI/SSE2
NVIDIA GeForce 9200M GS/PCI/SSE2
+NVIDIA GeForce 9200M GS/PCI/SSE2
NVIDIA GeForce 9300
NVIDIA GeForce 9300 / nForce 730i/PCI/SSE2
NVIDIA GeForce 9300 GE/PCI/SSE2
+NVIDIA GeForce 9300 GE/PCI/SSE2
+NVIDIA GeForce 9300 GE/PCI/SSE2/3DNOW!
NVIDIA GeForce 9300 GE/PCI/SSE2/3DNOW!
NVIDIA GeForce 9300 GS/PCI/SSE2
+NVIDIA GeForce 9300 GS/PCI/SSE2
+NVIDIA GeForce 9300 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 9300 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 9300 SE/PCI/SSE2
NVIDIA GeForce 9300M
NVIDIA GeForce 9300M G/PCI/SSE2
+NVIDIA GeForce 9300M G/PCI/SSE2
NVIDIA GeForce 9300M G/PCI/SSE2/3DNOW!
NVIDIA GeForce 9300M GS/PCI/SSE2
+NVIDIA GeForce 9300M GS/PCI/SSE2
NVIDIA GeForce 9300M GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 9400
NVIDIA GeForce 9400 GT/PCI/SSE2
+NVIDIA GeForce 9400 GT/PCI/SSE2
+NVIDIA GeForce 9400 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 9400 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 9400/PCI/SSE2
NVIDIA GeForce 9400M
NVIDIA GeForce 9400M G/PCI/SSE2
+NVIDIA GeForce 9400M G/PCI/SSE2
+NVIDIA GeForce 9400M/PCI/SSE2
NVIDIA GeForce 9400M/PCI/SSE2
NVIDIA GeForce 9500
NVIDIA GeForce 9500 GS/PCI/SSE2
+NVIDIA GeForce 9500 GS/PCI/SSE2
NVIDIA GeForce 9500 GS/PCI/SSE2/3DNOW!
NVIDIA GeForce 9500 GT/PCI/SSE2
+NVIDIA GeForce 9500 GT/PCI/SSE2
+NVIDIA GeForce 9500 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 9500 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 9500M
NVIDIA GeForce 9500M GS/PCI/SSE2
+NVIDIA GeForce 9500M GS/PCI/SSE2
NVIDIA GeForce 9600
NVIDIA GeForce 9600 GS/PCI/SSE2
NVIDIA GeForce 9600 GSO 512/PCI/SSE2
NVIDIA GeForce 9600 GSO/PCI/SSE2
NVIDIA GeForce 9600 GSO/PCI/SSE2/3DNOW!
+NVIDIA GeForce 9600 GSO/PCI/SSE2/3DNOW!
+NVIDIA GeForce 9600 GT/PCI/SSE2
NVIDIA GeForce 9600 GT/PCI/SSE2
NVIDIA GeForce 9600 GT/PCI/SSE2/3DNOW!
+NVIDIA GeForce 9600 GT/PCI/SSE2/3DNOW!
NVIDIA GeForce 9600M
NVIDIA GeForce 9600M GS/PCI/SSE2
+NVIDIA GeForce 9600M GS/PCI/SSE2
+NVIDIA GeForce 9600M GT/PCI/SSE2
NVIDIA GeForce 9600M GT/PCI/SSE2
NVIDIA GeForce 9650M GT/PCI/SSE2
+NVIDIA GeForce 9650M GT/PCI/SSE2
NVIDIA GeForce 9700M
NVIDIA GeForce 9700M GT/PCI/SSE2
NVIDIA GeForce 9700M GTS/PCI/SSE2
+NVIDIA GeForce 9700M GTS/PCI/SSE2
NVIDIA GeForce 9800
NVIDIA GeForce 9800 GT/PCI/SSE2
+NVIDIA GeForce 9800 GT/PCI/SSE2
NVIDIA GeForce 9800 GT/PCI/SSE2/3DNOW!
+NVIDIA GeForce 9800 GT/PCI/SSE2/3DNOW!
+NVIDIA GeForce 9800 GTX+/PCI/SSE2
NVIDIA GeForce 9800 GTX+/PCI/SSE2
NVIDIA GeForce 9800 GTX+/PCI/SSE2/3DNOW!
NVIDIA GeForce 9800 GTX/9800 GTX+/PCI/SSE2
+NVIDIA GeForce 9800 GTX/9800 GTX+/PCI/SSE2
NVIDIA GeForce 9800 GTX/PCI/SSE2
NVIDIA GeForce 9800 GX2/PCI/SSE2
NVIDIA GeForce 9800M
NVIDIA GeForce 9800M GS/PCI/SSE2
+NVIDIA GeForce 9800M GS/PCI/SSE2
+NVIDIA GeForce 9800M GT/PCI/SSE2
NVIDIA GeForce 9800M GT/PCI/SSE2
NVIDIA GeForce 9800M GTS/PCI/SSE2
+NVIDIA GeForce 9800M GTS/PCI/SSE2
NVIDIA GeForce FX 5100
NVIDIA GeForce FX 5100/AGP/SSE/3DNOW!
NVIDIA GeForce FX 5200
NVIDIA GeForce FX 5200/AGP/SSE
NVIDIA GeForce FX 5200/AGP/SSE/3DNOW!
+NVIDIA GeForce FX 5200/AGP/SSE/3DNOW!
+NVIDIA GeForce FX 5200/AGP/SSE2
NVIDIA GeForce FX 5200/AGP/SSE2
NVIDIA GeForce FX 5200/AGP/SSE2/3DNOW!
NVIDIA GeForce FX 5200/PCI/SSE2
@@ -1119,11 +1649,16 @@ NVIDIA GeForce FX 5200LE/AGP/SSE2
NVIDIA GeForce FX 5500
NVIDIA GeForce FX 5500/AGP/SSE/3DNOW!
NVIDIA GeForce FX 5500/AGP/SSE2
+NVIDIA GeForce FX 5500/AGP/SSE2
+NVIDIA GeForce FX 5500/AGP/SSE2/3DNOW!
NVIDIA GeForce FX 5500/AGP/SSE2/3DNOW!
NVIDIA GeForce FX 5500/PCI/SSE2
+NVIDIA GeForce FX 5500/PCI/SSE2
+NVIDIA GeForce FX 5500/PCI/SSE2/3DNOW!
NVIDIA GeForce FX 5500/PCI/SSE2/3DNOW!
NVIDIA GeForce FX 5600
NVIDIA GeForce FX 5600/AGP/SSE2
+NVIDIA GeForce FX 5600/AGP/SSE2
NVIDIA GeForce FX 5600/AGP/SSE2/3DNOW!
NVIDIA GeForce FX 5600XT/AGP/SSE2/3DNOW!
NVIDIA GeForce FX 5700
@@ -1138,136 +1673,239 @@ NVIDIA GeForce FX Go5100
NVIDIA GeForce FX Go5100/AGP/SSE2
NVIDIA GeForce FX Go5200
NVIDIA GeForce FX Go5200/AGP/SSE2
+NVIDIA GeForce FX Go5200/AGP/SSE2
NVIDIA GeForce FX Go5300
NVIDIA GeForce FX Go5600
NVIDIA GeForce FX Go5600/AGP/SSE2
+NVIDIA GeForce FX Go5600/AGP/SSE2
NVIDIA GeForce FX Go5650/AGP/SSE2
NVIDIA GeForce FX Go5700
+NVIDIA GeForce FX Go5700/AGP/SSE2
+NVIDIA GeForce FX Go5xxx/AGP/SSE2
NVIDIA GeForce FX Go5xxx/AGP/SSE2
NVIDIA GeForce G 103M/PCI/SSE2
+NVIDIA GeForce G 103M/PCI/SSE2
+NVIDIA GeForce G 103M/PCI/SSE2/3DNOW!
NVIDIA GeForce G 105M/PCI/SSE2
+NVIDIA GeForce G 105M/PCI/SSE2
+NVIDIA GeForce G 110M/PCI/SSE2
NVIDIA GeForce G 110M/PCI/SSE2
NVIDIA GeForce G100/PCI/SSE2
+NVIDIA GeForce G100/PCI/SSE2
+NVIDIA GeForce G100/PCI/SSE2/3DNOW!
NVIDIA GeForce G100/PCI/SSE2/3DNOW!
NVIDIA GeForce G102M/PCI/SSE2
+NVIDIA GeForce G102M/PCI/SSE2
NVIDIA GeForce G105M/PCI/SSE2
+NVIDIA GeForce G105M/PCI/SSE2
+NVIDIA GeForce G200/PCI/SSE2
NVIDIA GeForce G200/PCI/SSE2
NVIDIA GeForce G205M/PCI/SSE2
+NVIDIA GeForce G205M/PCI/SSE2
NVIDIA GeForce G210/PCI/SSE2
+NVIDIA GeForce G210/PCI/SSE2
+NVIDIA GeForce G210/PCI/SSE2/3DNOW!
NVIDIA GeForce G210/PCI/SSE2/3DNOW!
NVIDIA GeForce G210M/PCI/SSE2
+NVIDIA GeForce G210M/PCI/SSE2
NVIDIA GeForce G310M/PCI/SSE2
NVIDIA GeForce GT 120/PCI/SSE2
+NVIDIA GeForce GT 120/PCI/SSE2
NVIDIA GeForce GT 120/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 120M/PCI/SSE2
NVIDIA GeForce GT 130M/PCI/SSE2
+NVIDIA GeForce GT 130M/PCI/SSE2
NVIDIA GeForce GT 140/PCI/SSE2
+NVIDIA GeForce GT 140/PCI/SSE2
+NVIDIA GeForce GT 220/PCI/SSE2
NVIDIA GeForce GT 220/PCI/SSE2
NVIDIA GeForce GT 220/PCI/SSE2/3DNOW!
+NVIDIA GeForce GT 220/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 220M/PCI/SSE2
+NVIDIA GeForce GT 220M/PCI/SSE2
+NVIDIA GeForce GT 230/PCI/SSE2
NVIDIA GeForce GT 230/PCI/SSE2
NVIDIA GeForce GT 230M/PCI/SSE2
+NVIDIA GeForce GT 230M/PCI/SSE2
NVIDIA GeForce GT 240
NVIDIA GeForce GT 240/PCI/SSE2
+NVIDIA GeForce GT 240/PCI/SSE2
+NVIDIA GeForce GT 240/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 240/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 240M/PCI/SSE2
+NVIDIA GeForce GT 240M/PCI/SSE2
NVIDIA GeForce GT 320/PCI/SSE2
NVIDIA GeForce GT 320M/PCI/SSE2
+NVIDIA GeForce GT 320M/PCI/SSE2
NVIDIA GeForce GT 325M/PCI/SSE2
NVIDIA GeForce GT 330/PCI/SSE2
+NVIDIA GeForce GT 330/PCI/SSE2
NVIDIA GeForce GT 330/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 330M/PCI/SSE2
+NVIDIA GeForce GT 330M/PCI/SSE2
+NVIDIA GeForce GT 335M/PCI/SSE2
NVIDIA GeForce GT 335M/PCI/SSE2
NVIDIA GeForce GT 340/PCI/SSE2
+NVIDIA GeForce GT 340/PCI/SSE2
NVIDIA GeForce GT 340/PCI/SSE2/3DNOW!
+NVIDIA GeForce GT 340/PCI/SSE2/3DNOW!
+NVIDIA GeForce GT 415M/PCI/SSE2
NVIDIA GeForce GT 415M/PCI/SSE2
NVIDIA GeForce GT 420/PCI/SSE2
+NVIDIA GeForce GT 420/PCI/SSE2
NVIDIA GeForce GT 420M/PCI/SSE2
+NVIDIA GeForce GT 420M/PCI/SSE2
+NVIDIA GeForce GT 425M/PCI/SSE2
NVIDIA GeForce GT 425M/PCI/SSE2
NVIDIA GeForce GT 430/PCI/SSE2
+NVIDIA GeForce GT 430/PCI/SSE2
NVIDIA GeForce GT 430/PCI/SSE2/3DNOW!
+NVIDIA GeForce GT 430/PCI/SSE2/3DNOW!
+NVIDIA GeForce GT 435M/PCI/SSE2
NVIDIA GeForce GT 435M/PCI/SSE2
NVIDIA GeForce GT 440/PCI/SSE2
+NVIDIA GeForce GT 440/PCI/SSE2
+NVIDIA GeForce GT 440/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 440/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 445M/PCI/SSE2
+NVIDIA GeForce GT 445M/PCI/SSE2
+NVIDIA GeForce GT 520/PCI/SSE2
+NVIDIA GeForce GT 520/PCI/SSE2/3DNOW!
NVIDIA GeForce GT 520M/PCI/SSE2
+NVIDIA GeForce GT 520M/PCI/SSE2
+NVIDIA GeForce GT 525M/PCI/SSE2
NVIDIA GeForce GT 525M/PCI/SSE2
+NVIDIA GeForce GT 530/PCI/SSE2
+NVIDIA GeForce GT 530/PCI/SSE2/3DNOW!
+NVIDIA GeForce GT 540M/PCI/SSE2
NVIDIA GeForce GT 540M/PCI/SSE2
+NVIDIA GeForce GT 545/PCI/SSE2
NVIDIA GeForce GT 550M/PCI/SSE2
+NVIDIA GeForce GT 550M/PCI/SSE2
+NVIDIA GeForce GT 555M/PCI/SSE2
NVIDIA GeForce GT 555M/PCI/SSE2
NVIDIA GeForce GTS 150/PCI/SSE2
+NVIDIA GeForce GTS 150/PCI/SSE2
NVIDIA GeForce GTS 160M/PCI/SSE2
+NVIDIA GeForce GTS 160M/PCI/SSE2
+NVIDIA GeForce GTS 240/PCI/SSE2
NVIDIA GeForce GTS 240/PCI/SSE2
NVIDIA GeForce GTS 250/PCI/SSE2
+NVIDIA GeForce GTS 250/PCI/SSE2
+NVIDIA GeForce GTS 250/PCI/SSE2/3DNOW!
NVIDIA GeForce GTS 250/PCI/SSE2/3DNOW!
NVIDIA GeForce GTS 250M/PCI/SSE2
NVIDIA GeForce GTS 350M/PCI/SSE2
+NVIDIA GeForce GTS 350M/PCI/SSE2
NVIDIA GeForce GTS 360M/PCI/SSE2
+NVIDIA GeForce GTS 360M/PCI/SSE2
+NVIDIA GeForce GTS 450/PCI/SSE2
NVIDIA GeForce GTS 450/PCI/SSE2
NVIDIA GeForce GTS 450/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTS 450/PCI/SSE2/3DNOW!
NVIDIA GeForce GTS 455/PCI/SSE2
NVIDIA GeForce GTX 260/PCI/SSE2
+NVIDIA GeForce GTX 260/PCI/SSE2
+NVIDIA GeForce GTX 260/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 260/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 260M/PCI/SSE2
+NVIDIA GeForce GTX 260M/PCI/SSE2
+NVIDIA GeForce GTX 275/PCI/SSE2
NVIDIA GeForce GTX 275/PCI/SSE2
+NVIDIA GeForce GTX 275/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 280
NVIDIA GeForce GTX 280/PCI/SSE2
NVIDIA GeForce GTX 280M/PCI/SSE2
+NVIDIA GeForce GTX 285
NVIDIA GeForce GTX 285/PCI/SSE2
+NVIDIA GeForce GTX 285/PCI/SSE2
+NVIDIA GeForce GTX 285/PCI/SSE2
+NVIDIA GeForce GTX 295/PCI/SSE2
NVIDIA GeForce GTX 295/PCI/SSE2
NVIDIA GeForce GTX 460 SE/PCI/SSE2
+NVIDIA GeForce GTX 460 SE/PCI/SSE2
+NVIDIA GeForce GTX 460 SE/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 460 SE/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 460/PCI/SSE2
+NVIDIA GeForce GTX 460/PCI/SSE2
NVIDIA GeForce GTX 460/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 460/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 460M/PCI/SSE2
NVIDIA GeForce GTX 460M/PCI/SSE2
NVIDIA GeForce GTX 465/PCI/SSE2
+NVIDIA GeForce GTX 465/PCI/SSE2
NVIDIA GeForce GTX 465/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 465/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 470/PCI/SSE2
NVIDIA GeForce GTX 470/PCI/SSE2
NVIDIA GeForce GTX 470/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 480/PCI/SSE2
NVIDIA GeForce GTX 550 Ti/PCI/SSE2
+NVIDIA GeForce GTX 550 Ti/PCI/SSE2
+NVIDIA GeForce GTX 550 Ti/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 550 Ti/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 560 Ti/PCI/SSE2
+NVIDIA GeForce GTX 560 Ti/PCI/SSE2
NVIDIA GeForce GTX 560 Ti/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 560 Ti/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 560/PCI/SSE2
NVIDIA GeForce GTX 560/PCI/SSE2
+NVIDIA GeForce GTX 560/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 560M/PCI/SSE2
+NVIDIA GeForce GTX 570/PCI/SSE2
NVIDIA GeForce GTX 570/PCI/SSE2
NVIDIA GeForce GTX 570/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 570/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 580/PCI/SSE2
NVIDIA GeForce GTX 580/PCI/SSE2
NVIDIA GeForce GTX 580/PCI/SSE2/3DNOW!
+NVIDIA GeForce GTX 580/PCI/SSE2/3DNOW!
NVIDIA GeForce GTX 580M/PCI/SSE2
NVIDIA GeForce GTX 590/PCI/SSE2
+NVIDIA GeForce GTX 590/PCI/SSE2
NVIDIA GeForce Go 6
NVIDIA GeForce Go 6100
NVIDIA GeForce Go 6100/PCI/SSE2
NVIDIA GeForce Go 6100/PCI/SSE2/3DNOW!
+NVIDIA GeForce Go 6100/PCI/SSE2/3DNOW!
NVIDIA GeForce Go 6150/PCI/SSE2
NVIDIA GeForce Go 6150/PCI/SSE2/3DNOW!
+NVIDIA GeForce Go 6150/PCI/SSE2/3DNOW!
NVIDIA GeForce Go 6200
NVIDIA GeForce Go 6200/PCI/SSE2
NVIDIA GeForce Go 6400
NVIDIA GeForce Go 6400/PCI/SSE2
+NVIDIA GeForce Go 6400/PCI/SSE2
NVIDIA GeForce Go 6600
NVIDIA GeForce Go 6600/PCI/SSE2
+NVIDIA GeForce Go 6600/PCI/SSE2
NVIDIA GeForce Go 6800
NVIDIA GeForce Go 6800 Ultra/PCI/SSE2
+NVIDIA GeForce Go 6800 Ultra/PCI/SSE2
NVIDIA GeForce Go 6800/PCI/SSE2
NVIDIA GeForce Go 7200
NVIDIA GeForce Go 7200/PCI/SSE2
NVIDIA GeForce Go 7200/PCI/SSE2/3DNOW!
NVIDIA GeForce Go 7300
NVIDIA GeForce Go 7300/PCI/SSE2
+NVIDIA GeForce Go 7300/PCI/SSE2
NVIDIA GeForce Go 7300/PCI/SSE2/3DNOW!
NVIDIA GeForce Go 7400
NVIDIA GeForce Go 7400/PCI/SSE2
+NVIDIA GeForce Go 7400/PCI/SSE2
NVIDIA GeForce Go 7400/PCI/SSE2/3DNOW!
NVIDIA GeForce Go 7600
NVIDIA GeForce Go 7600/PCI/SSE2
+NVIDIA GeForce Go 7600/PCI/SSE2
+NVIDIA GeForce Go 7600/PCI/SSE2/3DNOW!
NVIDIA GeForce Go 7600/PCI/SSE2/3DNOW!
NVIDIA GeForce Go 7700
+NVIDIA GeForce Go 7700/PCI/SSE2
NVIDIA GeForce Go 7800
NVIDIA GeForce Go 7800 GTX/PCI/SSE2
NVIDIA GeForce Go 7900
NVIDIA GeForce Go 7900 GS/PCI/SSE2
+NVIDIA GeForce Go 7900 GS/PCI/SSE2
NVIDIA GeForce Go 7900 GTX/PCI/SSE2
NVIDIA GeForce Go 7950 GTX/PCI/SSE2
NVIDIA GeForce PCX
@@ -1275,15 +1913,20 @@ NVIDIA GeForce2 GTS/AGP/SSE
NVIDIA GeForce2 MX/AGP/3DNOW!
NVIDIA GeForce2 MX/AGP/SSE/3DNOW!
NVIDIA GeForce2 MX/AGP/SSE2
+NVIDIA GeForce2 MX/AGP/SSE2
NVIDIA GeForce2 MX/PCI/SSE2
NVIDIA GeForce3/AGP/SSE/3DNOW!
NVIDIA GeForce3/AGP/SSE2
NVIDIA GeForce4 420 Go 32M/AGP/SSE2
NVIDIA GeForce4 420 Go 32M/AGP/SSE2/3DNOW!
NVIDIA GeForce4 420 Go 32M/PCI/SSE2/3DNOW!
+NVIDIA GeForce4 420 Go/AGP/SSE2
NVIDIA GeForce4 440 Go 64M/AGP/SSE2/3DNOW!
+NVIDIA GeForce4 440 Go/AGP/SSE2
NVIDIA GeForce4 460 Go/AGP/SSE2
NVIDIA GeForce4 MX 4000/AGP/SSE/3DNOW!
+NVIDIA GeForce4 MX 4000/AGP/SSE/3DNOW!
+NVIDIA GeForce4 MX 4000/AGP/SSE2
NVIDIA GeForce4 MX 4000/AGP/SSE2
NVIDIA GeForce4 MX 4000/PCI/3DNOW!
NVIDIA GeForce4 MX 4000/PCI/SSE/3DNOW!
@@ -1291,97 +1934,161 @@ NVIDIA GeForce4 MX 4000/PCI/SSE2
NVIDIA GeForce4 MX 420/AGP/SSE/3DNOW!
NVIDIA GeForce4 MX 420/AGP/SSE2
NVIDIA GeForce4 MX 440 with AGP8X/AGP/SSE2
+NVIDIA GeForce4 MX 440 with AGP8X/AGP/SSE2
+NVIDIA GeForce4 MX 440/AGP/SSE2
NVIDIA GeForce4 MX 440/AGP/SSE2
NVIDIA GeForce4 MX 440/AGP/SSE2/3DNOW!
NVIDIA GeForce4 MX 440SE with AGP8X/AGP/SSE2
+NVIDIA GeForce4 MX 440SE with AGP8X/AGP/SSE2
+NVIDIA GeForce4 MX Integrated GPU/AGP/SSE/3DNOW!
NVIDIA GeForce4 MX Integrated GPU/AGP/SSE/3DNOW!
NVIDIA GeForce4 Ti 4200 with AGP8X/AGP/SSE
NVIDIA GeForce4 Ti 4200/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9M-NS/PCI/SSE2
NVIDIA NB9M-NS/PCI/SSE2
NVIDIA NB9P-GE1/PCI/SSE2
+NVIDIA NB9P-GE1/PCI/SSE2
NVIDIA NB9P-GS/PCI/SSE2
NVIDIA NV17/AGP/3DNOW!
NVIDIA NV17/AGP/SSE2
+NVIDIA NV17/AGP/SSE2
NVIDIA NV34
NVIDIA NV35
NVIDIA NV36/AGP/SSE/3DNOW!
NVIDIA NV36/AGP/SSE2
NVIDIA NV41/PCI/SSE2
NVIDIA NV43
+NVIDIA NV43/PCI/SSE2
NVIDIA NV44
+NVIDIA NV44/AGP/SSE2
+NVIDIA NVIDIA GeForce 210 OpenGL Engine
NVIDIA NVIDIA GeForce 210 OpenGL Engine
NVIDIA NVIDIA GeForce 320M OpenGL Engine
+NVIDIA NVIDIA GeForce 320M OpenGL Engine
+NVIDIA NVIDIA GeForce 7300 GT OpenGL Engine
NVIDIA NVIDIA GeForce 7300 GT OpenGL Engine
NVIDIA NVIDIA GeForce 7600 GT OpenGL Engine
NVIDIA NVIDIA GeForce 8600M GT OpenGL Engine
+NVIDIA NVIDIA GeForce 8600M GT OpenGL Engine
+NVIDIA NVIDIA GeForce 8800 GS OpenGL Engine
NVIDIA NVIDIA GeForce 8800 GS OpenGL Engine
NVIDIA NVIDIA GeForce 8800 GT OpenGL Engine
+NVIDIA NVIDIA GeForce 8800 GT OpenGL Engine
+NVIDIA NVIDIA GeForce 9400 OpenGL Engine
NVIDIA NVIDIA GeForce 9400 OpenGL Engine
NVIDIA NVIDIA GeForce 9400M OpenGL Engine
+NVIDIA NVIDIA GeForce 9400M OpenGL Engine
NVIDIA NVIDIA GeForce 9500 GT OpenGL Engine
NVIDIA NVIDIA GeForce 9600M GT OpenGL Engine
+NVIDIA NVIDIA GeForce 9600M GT OpenGL Engine
+NVIDIA NVIDIA GeForce GT 120 OpenGL Engine
NVIDIA NVIDIA GeForce GT 120 OpenGL Engine
NVIDIA NVIDIA GeForce GT 130 OpenGL Engine
+NVIDIA NVIDIA GeForce GT 130 OpenGL Engine
NVIDIA NVIDIA GeForce GT 220 OpenGL Engine
NVIDIA NVIDIA GeForce GT 230M OpenGL Engine
NVIDIA NVIDIA GeForce GT 240M OpenGL Engine
NVIDIA NVIDIA GeForce GT 330M OpenGL Engine
+NVIDIA NVIDIA GeForce GT 330M OpenGL Engine
NVIDIA NVIDIA GeForce GT 420M OpenGL Engine
NVIDIA NVIDIA GeForce GT 425M OpenGL Engine
NVIDIA NVIDIA GeForce GT 430 OpenGL Engine
+NVIDIA NVIDIA GeForce GT 430 OpenGL Engine
NVIDIA NVIDIA GeForce GT 440 OpenGL Engine
NVIDIA NVIDIA GeForce GT 540M OpenGL Engine
NVIDIA NVIDIA GeForce GTS 240 OpenGL Engine
NVIDIA NVIDIA GeForce GTS 250 OpenGL Engine
+NVIDIA NVIDIA GeForce GTS 250 OpenGL Engine
+NVIDIA NVIDIA GeForce GTS 450 OpenGL Engine
NVIDIA NVIDIA GeForce GTS 450 OpenGL Engine
NVIDIA NVIDIA GeForce GTX 285 OpenGL Engine
NVIDIA NVIDIA GeForce GTX 460 OpenGL Engine
+NVIDIA NVIDIA GeForce GTX 460 OpenGL Engine
NVIDIA NVIDIA GeForce GTX 460M OpenGL Engine
NVIDIA NVIDIA GeForce GTX 465 OpenGL Engine
NVIDIA NVIDIA GeForce GTX 470 OpenGL Engine
NVIDIA NVIDIA GeForce GTX 480 OpenGL Engine
+NVIDIA NVIDIA GeForce GTX 480 OpenGL Engine
+NVIDIA NVIDIA GeForce Pre-Release GF108 ES OpenGL Engine
+NVIDIA NVIDIA GeForce Pre-Release ION OpenGL Engine
NVIDIA NVIDIA GeForce Pre-Release ION OpenGL Engine
+NVIDIA NVIDIA GeForce Pre-Release MCP7A-J-DC OpenGL Engine
NVIDIA NVIDIA GeForce4 OpenGL Engine
NVIDIA NVIDIA NV34MAP OpenGL Engine
NVIDIA NVIDIA Quadro 4000 OpenGL Engine
+NVIDIA NVIDIA Quadro 4000 OpenGL Engine
NVIDIA NVIDIA Quadro FX 4800 OpenGL Engine
NVIDIA NVS 2100M/PCI/SSE2
+NVIDIA NVS 2100M/PCI/SSE2
+NVIDIA NVS 300/PCI/SSE2
NVIDIA NVS 300/PCI/SSE2
NVIDIA NVS 3100M/PCI/SSE2
+NVIDIA NVS 3100M/PCI/SSE2
NVIDIA NVS 4100/PCI/SSE2/3DNOW!
NVIDIA NVS 4200M/PCI/SSE2
+NVIDIA NVS 4200M/PCI/SSE2
+NVIDIA NVS 5100M/PCI/SSE2
NVIDIA NVS 5100M/PCI/SSE2
NVIDIA PCI
+NVIDIA Quadro 1000M/PCI/SSE2
+NVIDIA Quadro 2000/PCI/SSE2
NVIDIA Quadro 2000/PCI/SSE2
+NVIDIA Quadro 2000M/PCI/SSE2
+NVIDIA Quadro 3000M/PCI/SSE2
NVIDIA Quadro 4000
NVIDIA Quadro 4000 OpenGL Engine
NVIDIA Quadro 4000/PCI/SSE2
+NVIDIA Quadro 4000/PCI/SSE2
+NVIDIA Quadro 4000M/PCI/SSE2
+NVIDIA Quadro 5000/PCI/SSE2
NVIDIA Quadro 5000/PCI/SSE2
NVIDIA Quadro 5000M/PCI/SSE2
NVIDIA Quadro 600
NVIDIA Quadro 600/PCI/SSE2
+NVIDIA Quadro 600/PCI/SSE2
NVIDIA Quadro 600/PCI/SSE2/3DNOW!
NVIDIA Quadro 6000
NVIDIA Quadro 6000/PCI/SSE2
@@ -1390,16 +2097,22 @@ NVIDIA Quadro DCC
NVIDIA Quadro FX
NVIDIA Quadro FX 1100/AGP/SSE2
NVIDIA Quadro FX 1400/PCI/SSE2
+NVIDIA Quadro FX 1400/PCI/SSE2
NVIDIA Quadro FX 1500
+NVIDIA Quadro FX 1500/PCI/SSE2
NVIDIA Quadro FX 1500M/PCI/SSE2
NVIDIA Quadro FX 1600M/PCI/SSE2
+NVIDIA Quadro FX 1600M/PCI/SSE2
NVIDIA Quadro FX 1700
NVIDIA Quadro FX 1700M/PCI/SSE2
NVIDIA Quadro FX 1800
NVIDIA Quadro FX 1800/PCI/SSE2
NVIDIA Quadro FX 1800M/PCI/SSE2
NVIDIA Quadro FX 2500M/PCI/SSE2
+NVIDIA Quadro FX 2500M/PCI/SSE2
NVIDIA Quadro FX 2700M/PCI/SSE2
+NVIDIA Quadro FX 2700M/PCI/SSE2
+NVIDIA Quadro FX 2800M/PCI/SSE2
NVIDIA Quadro FX 2800M/PCI/SSE2
NVIDIA Quadro FX 3400
NVIDIA Quadro FX 3450
@@ -1411,75 +2124,125 @@ NVIDIA Quadro FX 370
NVIDIA Quadro FX 370/PCI/SSE2
NVIDIA Quadro FX 3700
NVIDIA Quadro FX 3700M/PCI/SSE2
+NVIDIA Quadro FX 3700M/PCI/SSE2
NVIDIA Quadro FX 370M/PCI/SSE2
NVIDIA Quadro FX 3800
NVIDIA Quadro FX 3800M/PCI/SSE2
+NVIDIA Quadro FX 3800M/PCI/SSE2
NVIDIA Quadro FX 4500
NVIDIA Quadro FX 4600
NVIDIA Quadro FX 4800
NVIDIA Quadro FX 4800/PCI/SSE2
+NVIDIA Quadro FX 540/PCI/SSE2/3DNOW!
NVIDIA Quadro FX 560
+NVIDIA Quadro FX 560/PCI/SSE2
NVIDIA Quadro FX 5600
NVIDIA Quadro FX 570
NVIDIA Quadro FX 570/PCI/SSE2
NVIDIA Quadro FX 570M/PCI/SSE2
NVIDIA Quadro FX 580/PCI/SSE2
+NVIDIA Quadro FX 580/PCI/SSE2
+NVIDIA Quadro FX 770M/PCI/SSE2
NVIDIA Quadro FX 770M/PCI/SSE2
NVIDIA Quadro FX 880M
NVIDIA Quadro FX 880M/PCI/SSE2
+NVIDIA Quadro FX 880M/PCI/SSE2
NVIDIA Quadro FX Go700/AGP/SSE2
NVIDIA Quadro NVS
NVIDIA Quadro NVS 110M/PCI/SSE2
+NVIDIA Quadro NVS 110M/PCI/SSE2
NVIDIA Quadro NVS 130M/PCI/SSE2
NVIDIA Quadro NVS 135M/PCI/SSE2
+NVIDIA Quadro NVS 135M/PCI/SSE2
+NVIDIA Quadro NVS 140M/PCI/SSE2
NVIDIA Quadro NVS 140M/PCI/SSE2
NVIDIA Quadro NVS 150M/PCI/SSE2
+NVIDIA Quadro NVS 150M/PCI/SSE2
+NVIDIA Quadro NVS 160M/PCI/SSE2
NVIDIA Quadro NVS 160M/PCI/SSE2
NVIDIA Quadro NVS 210S/PCI/SSE2/3DNOW!
NVIDIA Quadro NVS 285/PCI/SSE2
+NVIDIA Quadro NVS 285/PCI/SSE2
+NVIDIA Quadro NVS 290/PCI/SSE2
NVIDIA Quadro NVS 290/PCI/SSE2
NVIDIA Quadro NVS 295/PCI/SSE2
NVIDIA Quadro NVS 320M/PCI/SSE2
+NVIDIA Quadro NVS 320M/PCI/SSE2
NVIDIA Quadro NVS 55/280 PCI/PCI/SSE2
NVIDIA Quadro NVS/PCI/SSE2
NVIDIA Quadro PCI-E Series/PCI/SSE2/3DNOW!
NVIDIA Quadro VX 200/PCI/SSE2
+NVIDIA Quadro VX 200/PCI/SSE2
+NVIDIA Quadro/AGP/SSE2
NVIDIA Quadro/AGP/SSE2
NVIDIA Quadro2
NVIDIA Quadro4
+NVIDIA Quadro4 750 XGL/AGP/SSE2
NVIDIA RIVA TNT
NVIDIA RIVA TNT2/AGP/SSE2
NVIDIA RIVA TNT2/PCI/3DNOW!
+NVIDIA Tesla C2050/PCI/SSE2
NVIDIA nForce
+NVIDIA nForce 730a/PCI/SSE2
+NVIDIA nForce 730a/PCI/SSE2/3DNOW!
+NVIDIA nForce 750a SLI/PCI/SSE2
+NVIDIA nForce 750a SLI/PCI/SSE2/3DNOW!
+NVIDIA nForce 760i SLI/PCI/SSE2
+NVIDIA nForce 780a SLI/PCI/SSE2/3DNOW!
+NVIDIA nForce 980a/780a SLI/PCI/SSE2
+NVIDIA nForce 980a/780a SLI/PCI/SSE2/3DNOW!
NVIDIA unknown board/AGP/SSE2
NVIDIA unknown board/PCI/SSE2
NVIDIA unknown board/PCI/SSE2/3DNOW!
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5670 OpenGL Engine
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5670 OpenGL Engine
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5750 OpenGL Engine
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5750 OpenGL Engine
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5770 OpenGL Engine
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 5770 OpenGL Engine
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6490M OpenGL Engine
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6490M OpenGL Engine
Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6750M OpenGL Engine
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6750M OpenGL Engine
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6770M OpenGL Engine
+Parallels and ATI Technologies Inc. Parallels using ATI Radeon HD 6970M OpenGL Engine
Parallels and Intel Inc. 3D-Analyze v2.3 - http://www.tommti-systems.com
Parallels and Intel Inc. Parallels using Intel HD Graphics 3000 OpenGL Engine
+Parallels and Intel Inc. Parallels using Intel HD Graphics 3000 OpenGL Engine
+Parallels and NVIDIA Parallels using NVIDIA GeForce 320M OpenGL Engine
Parallels and NVIDIA Parallels using NVIDIA GeForce 320M OpenGL Engine
Parallels and NVIDIA Parallels using NVIDIA GeForce 9400 OpenGL Engine
Parallels and NVIDIA Parallels using NVIDIA GeForce GT 120 OpenGL Engine
+Parallels and NVIDIA Parallels using NVIDIA GeForce GT 120 OpenGL Engine
+Parallels and NVIDIA Parallels using NVIDIA GeForce GT 330M OpenGL Engine
Parallels and NVIDIA Parallels using NVIDIA GeForce GT 330M OpenGL Engine
Radeon RV350 on Gallium
S3
+S3 Fire GL2
S3 Graphics VIA/S3G UniChrome IGP/MMX/K3D
+S3 Graphics VIA/S3G UniChrome IGP/MMX/SSE
+S3 Graphics VIA/S3G UniChrome Pro IGP/MMX/SSE
S3 Graphics VIA/S3G UniChrome Pro IGP/MMX/SSE
S3 Graphics, Incorporated ProSavage/Twister
S3 Graphics, Incorporated S3 Graphics Chrome9 HC
+S3 Graphics, Incorporated S3 Graphics Chrome9 HC
S3 Graphics, Incorporated S3 Graphics DeltaChrome
+S3 Graphics, Incorporated S3 Graphics DeltaChrome
+S3 Graphics, Incorporated VIA Chrome9 HC IGP
S3 Graphics, Incorporated VIA Chrome9 HC IGP
SiS
+SiS 650/M650 VGA
+SiS 661 VGA
SiS 661 VGA
SiS 662 VGA
SiS 741 VGA
SiS 760 VGA
+SiS 760 VGA
+SiS 761GX VGA
SiS 761GX VGA
SiS Mirage Graphics3
+SiS Mirage Graphics3
+SiS Xabre VGA
Trident
Tungsten Graphics
Tungsten Graphics, Inc Mesa DRI 865G GEM 20091221 2009Q4 x86/MMX/SSE2
@@ -1489,6 +2252,7 @@ Tungsten Graphics, Inc Mesa DRI 915G GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 915GM GEM 20090712 2009Q2 RC3 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 915GM GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 915GM GEM 20100330 DEVELOPMENT x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI 915GM GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945G
Tungsten Graphics, Inc Mesa DRI 945G GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945G GEM 20100330 DEVELOPMENT
@@ -1497,18 +2261,23 @@ Tungsten Graphics, Inc Mesa DRI 945GM GEM 20090712 2009Q2 RC3 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945GM GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945GM GEM 20100328 2010Q1 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945GM GEM 20100330 DEVELOPMENT x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI 945GM GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945GME x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945GME 20061017
Tungsten Graphics, Inc Mesa DRI 945GME GEM 20090712 2009Q2 RC3 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945GME GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 945GME GEM 20100330 DEVELOPMENT x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI 945GME GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 965GM GEM 20090326 2009Q1 RC2 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 965GM GEM 20090712 2009Q2 RC3 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 965GM GEM 20091221 2009Q4 x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI 965GM GEM 20091221 2009Q4 x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI 965GM GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI 965GM GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI G33 20061017 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI G33 GEM 20090712 2009Q2 RC3 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI G33 GEM 20091221 2009Q4 x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI G33 GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI G41 GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI G41 GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI GMA500 20081116 - 5.0.1.0046 x86/MMX/SSE2
@@ -1518,44 +2287,83 @@ Tungsten Graphics, Inc Mesa DRI IGD GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI IGDNG_D GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Ironlake Desktop GEM 20100330 DEVELOPMENT x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Ironlake Mobile GEM 20100330 DEVELOPMENT x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset 20080716 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20090712 2009Q2 RC3 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20091221 2009Q4 x86/MMX/SSE2
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100328 2010Q1
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT
Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
+Tungsten Graphics, Inc Mesa DRI Mobile Intelå¨ GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2
+Tungsten Graphics, Inc. Mesa DRI R200 (RV250 4C66) 20090101 x86/MMX/SSE2 TCL DRI2
Tungsten Graphics, Inc. Mesa DRI R200 (RV280 5964) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
VIA
VMware, Inc. Gallium 0.3 on SVGA3D; build: RELEASE;
+VMware, Inc. Gallium 0.3 on SVGA3D; build: RELEASE;
+VMware, Inc. Gallium 0.4 on SVGA3D; build: DEBUG; mutex: MSVC Intrinsics
+VMware, Inc. Gallium 0.4 on SVGA3D; build: RELEASE;
+VMware, Inc. Gallium 0.4 on i915 (chipset: 945GM)
VMware, Inc. Gallium 0.4 on i915 (chipset: 945GM)
VMware, Inc. Gallium 0.4 on llvmpipe
+VMware, Inc. Gallium 0.4 on llvmpipe
+VMware, Inc. Gallium 0.4 on softpipe
VMware, Inc. Gallium 0.4 on softpipe
X.Org Gallium 0.4 on AMD BARTS
+X.Org Gallium 0.4 on AMD BARTS
+X.Org Gallium 0.4 on AMD CEDAR
X.Org Gallium 0.4 on AMD CEDAR
X.Org Gallium 0.4 on AMD HEMLOCK
X.Org Gallium 0.4 on AMD JUNIPER
+X.Org Gallium 0.4 on AMD JUNIPER
+X.Org Gallium 0.4 on AMD PALM
+X.Org Gallium 0.4 on AMD REDWOOD
X.Org Gallium 0.4 on AMD REDWOOD
X.Org Gallium 0.4 on AMD RS780
+X.Org Gallium 0.4 on AMD RS780
+X.Org Gallium 0.4 on AMD RS880
X.Org Gallium 0.4 on AMD RS880
X.Org Gallium 0.4 on AMD RV610
+X.Org Gallium 0.4 on AMD RV610
+X.Org Gallium 0.4 on AMD RV620
X.Org Gallium 0.4 on AMD RV620
X.Org Gallium 0.4 on AMD RV630
+X.Org Gallium 0.4 on AMD RV630
X.Org Gallium 0.4 on AMD RV635
+X.Org Gallium 0.4 on AMD RV635
+X.Org Gallium 0.4 on AMD RV710
X.Org Gallium 0.4 on AMD RV710
X.Org Gallium 0.4 on AMD RV730
+X.Org Gallium 0.4 on AMD RV730
+X.Org Gallium 0.4 on AMD RV740
X.Org Gallium 0.4 on AMD RV740
X.Org Gallium 0.4 on AMD RV770
X.Org R300 Project Gallium 0.4 on ATI R300
+X.Org R300 Project Gallium 0.4 on ATI R350
+X.Org R300 Project Gallium 0.4 on ATI R420
+X.Org R300 Project Gallium 0.4 on ATI R580
X.Org R300 Project Gallium 0.4 on ATI R580
X.Org R300 Project Gallium 0.4 on ATI RC410
+X.Org R300 Project Gallium 0.4 on ATI RC410
+X.Org R300 Project Gallium 0.4 on ATI RS480
+X.Org R300 Project Gallium 0.4 on ATI RS482
X.Org R300 Project Gallium 0.4 on ATI RS482
X.Org R300 Project Gallium 0.4 on ATI RS600
X.Org R300 Project Gallium 0.4 on ATI RS690
+X.Org R300 Project Gallium 0.4 on ATI RS690
+X.Org R300 Project Gallium 0.4 on ATI RS740
X.Org R300 Project Gallium 0.4 on ATI RV350
+X.Org R300 Project Gallium 0.4 on ATI RV350
+X.Org R300 Project Gallium 0.4 on ATI RV370
X.Org R300 Project Gallium 0.4 on ATI RV370
X.Org R300 Project Gallium 0.4 on ATI RV410
+X.Org R300 Project Gallium 0.4 on ATI RV410
X.Org R300 Project Gallium 0.4 on ATI RV515
+X.Org R300 Project Gallium 0.4 on ATI RV515
+X.Org R300 Project Gallium 0.4 on ATI RV530
X.Org R300 Project Gallium 0.4 on ATI RV530
+X.Org R300 Project Gallium 0.4 on ATI RV560
+X.Org R300 Project Gallium 0.4 on ATI RV570
X.Org R300 Project Gallium 0.4 on ATI RV570
X.Org R300 Project Gallium 0.4 on R420
X.Org R300 Project Gallium 0.4 on R580
@@ -1571,23 +2379,44 @@ X.Org R300 Project Gallium 0.4 on RV410
X.Org R300 Project Gallium 0.4 on RV515
X.Org R300 Project Gallium 0.4 on RV530
XGI
+nouveau Gallium 0.4 on NV31
+nouveau Gallium 0.4 on NV34
nouveau Gallium 0.4 on NV34
nouveau Gallium 0.4 on NV36
+nouveau Gallium 0.4 on NV43
+nouveau Gallium 0.4 on NV44
+nouveau Gallium 0.4 on NV46
nouveau Gallium 0.4 on NV46
nouveau Gallium 0.4 on NV49
nouveau Gallium 0.4 on NV4A
+nouveau Gallium 0.4 on NV4A
nouveau Gallium 0.4 on NV4B
+nouveau Gallium 0.4 on NV4B
+nouveau Gallium 0.4 on NV4C
nouveau Gallium 0.4 on NV4E
nouveau Gallium 0.4 on NV50
+nouveau Gallium 0.4 on NV63
+nouveau Gallium 0.4 on NV67
+nouveau Gallium 0.4 on NV84
nouveau Gallium 0.4 on NV84
nouveau Gallium 0.4 on NV86
+nouveau Gallium 0.4 on NV86
+nouveau Gallium 0.4 on NV92
nouveau Gallium 0.4 on NV92
nouveau Gallium 0.4 on NV94
+nouveau Gallium 0.4 on NV94
nouveau Gallium 0.4 on NV96
+nouveau Gallium 0.4 on NV96
+nouveau Gallium 0.4 on NV98
nouveau Gallium 0.4 on NV98
nouveau Gallium 0.4 on NVA0
+nouveau Gallium 0.4 on NVA0
nouveau Gallium 0.4 on NVA3
nouveau Gallium 0.4 on NVA5
+nouveau Gallium 0.4 on NVA5
+nouveau Gallium 0.4 on NVA8
nouveau Gallium 0.4 on NVA8
nouveau Gallium 0.4 on NVAA
+nouveau Gallium 0.4 on NVAA
+nouveau Gallium 0.4 on NVAC
nouveau Gallium 0.4 on NVAC
diff --git a/indra/newview/tests/lldir_stub.cpp b/indra/newview/tests/lldir_stub.cpp
index 6646860b5e..18cf4e7419 100644
--- a/indra/newview/tests/lldir_stub.cpp
+++ b/indra/newview/tests/lldir_stub.cpp
@@ -2,8 +2,25 @@
* @file lldir_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/llglslshader_stub.cpp b/indra/newview/tests/llglslshader_stub.cpp
index 5333c8a361..8947a632c8 100644
--- a/indra/newview/tests/llglslshader_stub.cpp
+++ b/indra/newview/tests/llglslshader_stub.cpp
@@ -2,8 +2,25 @@
* @file llglslshader_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/llpipeline_stub.cpp b/indra/newview/tests/llpipeline_stub.cpp
index 85bf0ae3fb..ad112cbf6a 100644
--- a/indra/newview/tests/llpipeline_stub.cpp
+++ b/indra/newview/tests/llpipeline_stub.cpp
@@ -2,8 +2,25 @@
* @file llpipeline_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index daa10819fc..0235400976 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -86,6 +86,9 @@ std::string LLControlGroup::getString(const std::string& name)
return "";
}
+// Stub for --no-verify-ssl-cert
+BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
+
LLSD LLCredential::getLoginParams()
{
LLSD result = LLSD::emptyMap();
diff --git a/indra/newview/tests/llsky_stub.cpp b/indra/newview/tests/llsky_stub.cpp
index 35f4944a95..241d740635 100644
--- a/indra/newview/tests/llsky_stub.cpp
+++ b/indra/newview/tests/llsky_stub.cpp
@@ -2,8 +2,25 @@
* @file llsky_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/lltranslate_test.cpp b/indra/newview/tests/lltranslate_test.cpp
new file mode 100644
index 0000000000..10e37fae97
--- /dev/null
+++ b/indra/newview/tests/lltranslate_test.cpp
@@ -0,0 +1,345 @@
+/**
+ * @file lltranslate_test.cpp
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "../test/lltut.h"
+#include "../lltranslate.h"
+#include "../llversioninfo.h"
+#include "../llviewercontrol.h"
+
+#include "llbufferstream.h"
+#include "lltrans.h"
+#include "llui.h"
+
+static const std::string GOOGLE_VALID_RESPONSE1 =
+"{\
+ \"data\": {\
+ \"translations\": [\
+ {\
+ \"translatedText\": \"привет\",\
+ \"detectedSourceLanguage\": \"es\"\
+ }\
+ ]\
+ }\
+}";
+
+static const std::string GOOGLE_VALID_RESPONSE2 =
+"{\
+ \"data\": {\
+ \"translations\": [\
+ {\
+ \"translatedText\": \"привет\"\
+ }\
+ ]\
+ }\
+}\
+";
+
+static const std::string GOOGLE_VALID_RESPONSE3 =
+"{\
+ \"error\": {\
+ \"errors\": [\
+ {\
+ \"domain\": \"global\",\
+ \"reason\": \"invalid\",\
+ \"message\": \"Invalid Value\"\
+ }\
+ ],\
+ \"code\": 400,\
+ \"message\": \"Invalid Value\"\
+ }\
+}";
+
+static const std::string BING_VALID_RESPONSE1 =
+"<string xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/\">Привет</string>";
+
+static const std::string BING_VALID_RESPONSE2 =
+"<html><body><h1>Argument Exception</h1><p>Method: Translate()</p><p>Parameter: </p>\
+<p>Message: 'from' must be a valid language</p><code></code>\
+<p>message id=3743.V2_Rest.Translate.58E8454F</p></body></html>";
+
+static const std::string BING_VALID_RESPONSE3 =
+"<html><body><h1>Argument Exception</h1><p>Method: Translate()</p>\
+<p>Parameter: appId</p><p>Message: Invalid appId&#xD;\nParameter name: appId</p>\
+<code></code><p>message id=3737.V2_Rest.Translate.56016759</p></body></html>";
+
+namespace tut
+{
+ class translate_test
+ {
+ protected:
+ void test_translation(
+ LLTranslationAPIHandler& handler,
+ int status, const std::string& resp,
+ const std::string& exp_trans, const std::string& exp_lang, const std::string& exp_err)
+ {
+ std::string translation, detected_lang, err_msg;
+ bool rc = handler.parseResponse(status, resp, translation, detected_lang, err_msg);
+ ensure_equals("rc", rc, (status == 200));
+ ensure_equals("err_msg", err_msg, exp_err);
+ ensure_equals("translation", translation, exp_trans);
+ ensure_equals("detected_lang", detected_lang, exp_lang);
+ }
+
+ LLGoogleTranslationHandler mGoogle;
+ LLBingTranslationHandler mBing;
+ };
+
+ typedef test_group<translate_test> translate_test_group_t;
+ typedef translate_test_group_t::object translate_test_object_t;
+ tut::translate_test_group_t tut_translate("LLTranslate");
+
+ template<> template<>
+ void translate_test_object_t::test<1>()
+ {
+ test_translation(mGoogle, 200, GOOGLE_VALID_RESPONSE1, "привет", "es", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<2>()
+ {
+ test_translation(mGoogle, 200, GOOGLE_VALID_RESPONSE2, "привет", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<3>()
+ {
+ test_translation(mGoogle, 400, GOOGLE_VALID_RESPONSE3, "", "", "Invalid Value");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<4>()
+ {
+ test_translation(mGoogle, 400,
+ "",
+ "", "", "* Line 1, Column 1\n Syntax error: value, object or array expected.\n");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<5>()
+ {
+ test_translation(mGoogle, 400,
+ "[]",
+ "", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<6>()
+ {
+ test_translation(mGoogle, 400,
+ "{\"oops\": \"invalid\"}",
+ "", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<7>()
+ {
+ test_translation(mGoogle, 400,
+ "{\"data\": {}}",
+ "", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<8>()
+ {
+ test_translation(mGoogle, 400,
+ "{\"data\": { \"translations\": [ {} ] }}",
+ "", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<9>()
+ {
+ test_translation(mGoogle, 400,
+ "{\"data\": { \"translations\": [ { \"translatedTextZZZ\": \"привет\", \"detectedSourceLanguageZZZ\": \"es\" } ] }}",
+ "", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<10>()
+ {
+ test_translation(mBing, 200, BING_VALID_RESPONSE1, "Привет", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<11>()
+ {
+ test_translation(mBing, 400, BING_VALID_RESPONSE2, "", "", "'from' must be a valid language");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<12>()
+ {
+ test_translation(mBing, 400, BING_VALID_RESPONSE3, "", "", "Invalid appId\nParameter name: appId");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<13>()
+ {
+ test_translation(mBing, 200,
+ "Привет</string>",
+ "Привет", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<14>()
+ {
+ test_translation(mBing, 200,
+ "<string xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/\">Привет",
+ "Привет", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<15>()
+ {
+ test_translation(mBing, 200,
+ "Привет",
+ "Привет", "", "");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<16>()
+ {
+ test_translation(mBing, 400,
+ "Message: some error</p>",
+ "", "", "some error");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<17>()
+ {
+ test_translation(mBing, 400,
+ "Message: some error",
+ "", "", "some error");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<18>()
+ {
+ test_translation(mBing, 400,
+ "some error</p>",
+ "", "", "some error");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<19>()
+ {
+ test_translation(mBing, 400,
+ "some error",
+ "", "", "some error");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<20>()
+ {
+ std::string url;
+ mBing.getTranslateURL(url, "en", "es", "hi");
+ ensure_equals("bing URL", url,
+ "http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=dummy&text=hi&to=es&from=en");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<21>()
+ {
+ std::string url;
+ mBing.getTranslateURL(url, "", "es", "hi");
+ ensure_equals("bing URL", url,
+ "http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=dummy&text=hi&to=es");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<22>()
+ {
+ std::string url;
+ mGoogle.getTranslateURL(url, "en", "es", "hi");
+ ensure_equals("google URL", url,
+ "https://www.googleapis.com/language/translate/v2?key=dummy&q=hi&target=es&source=en");
+ }
+
+ template<> template<>
+ void translate_test_object_t::test<23>()
+ {
+ std::string url;
+ mGoogle.getTranslateURL(url, "", "es", "hi");
+ ensure_equals("google URL", url,
+ "https://www.googleapis.com/language/translate/v2?key=dummy&q=hi&target=es");
+ }
+}
+
+//== Misc stubs ===============================================================
+LLControlGroup gSavedSettings("test");
+
+std::string LLUI::getLanguage() { return "en"; }
+std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args) { return "dummy"; }
+
+LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) {}
+std::string LLControlGroup::getString(const std::string& name) { return "dummy"; }
+LLControlGroup::~LLControlGroup() {}
+
+namespace boost {
+ void intrusive_ptr_add_ref(LLCurl::Responder*) {}
+ void intrusive_ptr_release(LLCurl::Responder*) {}
+}
+
+LLCurl::Responder::Responder() {}
+void LLCurl::Responder::completedHeader(U32, std::string const&, LLSD const&) {}
+void LLCurl::Responder::completedRaw(U32, const std::string&, const LLChannelDescriptors&, const LLIOPipe::buffer_ptr_t& buffer) {}
+void LLCurl::Responder::completed(U32, std::string const&, LLSD const&) {}
+void LLCurl::Responder::error(U32, std::string const&) {}
+void LLCurl::Responder::errorWithContent(U32, std::string const&, LLSD const&) {}
+void LLCurl::Responder::result(LLSD const&) {}
+LLCurl::Responder::~Responder() {}
+
+void LLHTTPClient::get(const std::string&, const LLSD&, ResponderPtr, const LLSD&, const F32) {}
+void LLHTTPClient::get(const std::string&, boost::intrusive_ptr<LLCurl::Responder>, const LLSD&, const F32) {}
+
+LLBufferStream::LLBufferStream(const LLChannelDescriptors& channels, LLBufferArray* buffer)
+: std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) {}
+LLBufferStream::~LLBufferStream() {}
+
+LLBufferStreamBuf::LLBufferStreamBuf(const LLChannelDescriptors&, LLBufferArray*) {}
+#if( LL_WINDOWS || __GNUC__ > 2)
+LLBufferStreamBuf::pos_type LLBufferStreamBuf::seekoff(
+ off_type off,
+ std::ios::seekdir way,
+ std::ios::openmode which)
+#else
+streampos LLBufferStreamBuf::seekoff(
+ streamoff off,
+ std::ios::seekdir way,
+ std::ios::openmode which)
+#endif
+{ return 0; }
+int LLBufferStreamBuf::sync() {return 0;}
+int LLBufferStreamBuf::underflow() {return 0;}
+int LLBufferStreamBuf::overflow(int) {return 0;}
+LLBufferStreamBuf::~LLBufferStreamBuf() {}
+
+S32 LLVersionInfo::getBuild() { return 0; }
+const std::string& LLVersionInfo::getChannel() {static std::string dummy; return dummy;}
+S32 LLVersionInfo::getMajor() { return 0; }
+S32 LLVersionInfo::getMinor() { return 0; }
+S32 LLVersionInfo::getPatch() { return 0; }
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index dd7761475e..3c89b64d52 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -164,7 +164,7 @@ namespace tut
std::string("https://secondlife.com/helpers/"));
ensure_equals("Agni login page is correct",
grid[GRID_LOGIN_PAGE_VALUE].asString(),
- std::string("http://secondlife.com/app/login/"));
+ std::string("http://viewer-login.agni.lindenlab.com/"));
ensure("Agni is a favorite",
grid.has(GRID_IS_FAVORITE_VALUE));
ensure("Agni is a system grid",
@@ -208,7 +208,7 @@ namespace tut
std::string("https://secondlife.com/helpers/"));
ensure_equals("Agni login page the same after grid file",
grid[GRID_LOGIN_PAGE_VALUE].asString(),
- std::string("http://secondlife.com/app/login/"));
+ std::string("http://viewer-login.agni.lindenlab.com/"));
ensure("Agni still a favorite after grid file",
grid.has(GRID_IS_FAVORITE_VALUE));
ensure("Agni system grid still set after grid file",
@@ -310,7 +310,7 @@ namespace tut
std::string("http://aditi-secondlife.webdev.lindenlab.com/helpers/"));
ensure_equals("Override known grid login uri: login page is not set",
grid[GRID_LOGIN_PAGE_VALUE].asString(),
- std::string("http://secondlife.com/app/login/"));
+ std::string("http://viewer-login.agni.lindenlab.com/"));
// Override with loginuri
// override custom grid
@@ -359,7 +359,7 @@ namespace tut
std::string("https://my.helper.uri/mycustomhelpers"));
ensure_equals("Override known grid helper uri: login page is not changed",
grid[GRID_LOGIN_PAGE_VALUE].asString(),
- std::string("http://secondlife.com/app/login/"));
+ std::string("http://viewer-login.agni.lindenlab.com/"));
// Override with helperuri
// override custom grid
@@ -451,9 +451,9 @@ namespace tut
ensure_equals("getHelperURI", LLGridManager::getInstance()->getHelperURI(),
std::string("https://secondlife.com/helpers/"));
ensure_equals("getLoginPage", LLGridManager::getInstance()->getLoginPage(),
- std::string("http://secondlife.com/app/login/"));
+ std::string("http://viewer-login.agni.lindenlab.com/"));
ensure_equals("getLoginPage2", LLGridManager::getInstance()->getLoginPage("util.agni.lindenlab.com"),
- std::string("http://secondlife.com/app/login/"));
+ std::string("http://viewer-login.agni.lindenlab.com/"));
ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid());
std::vector<std::string> uris;
LLGridManager::getInstance()->getLoginURIs(uris);
diff --git a/indra/newview/tests/llviewershadermgr_stub.cpp b/indra/newview/tests/llviewershadermgr_stub.cpp
index 0dae527035..18eff72f3c 100644
--- a/indra/newview/tests/llviewershadermgr_stub.cpp
+++ b/indra/newview/tests/llviewershadermgr_stub.cpp
@@ -2,8 +2,25 @@
* @file llglslshader_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/llwlanimator_stub.cpp b/indra/newview/tests/llwlanimator_stub.cpp
index 4d1bb85544..f5e15b2e7b 100644
--- a/indra/newview/tests/llwlanimator_stub.cpp
+++ b/indra/newview/tests/llwlanimator_stub.cpp
@@ -2,8 +2,25 @@
* @file llwlanimator_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/llwldaycycle_stub.cpp b/indra/newview/tests/llwldaycycle_stub.cpp
index d98c9614b4..a7bc9a7b83 100644
--- a/indra/newview/tests/llwldaycycle_stub.cpp
+++ b/indra/newview/tests/llwldaycycle_stub.cpp
@@ -2,8 +2,25 @@
* @file llwldaycycle_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/llwlparammanager_test.cpp b/indra/newview/tests/llwlparammanager_test.cpp
index a6c6a2abf4..be0dc9fd0c 100644
--- a/indra/newview/tests/llwlparammanager_test.cpp
+++ b/indra/newview/tests/llwlparammanager_test.cpp
@@ -2,8 +2,25 @@
* @file llwlparammanager_test.cpp
* @brief LLWLParamManager tests
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/tests/llwlparamset_stub.cpp b/indra/newview/tests/llwlparamset_stub.cpp
index 6ce4b5827d..ccb99db475 100644
--- a/indra/newview/tests/llwlparamset_stub.cpp
+++ b/indra/newview/tests/llwlparamset_stub.cpp
@@ -2,8 +2,25 @@
* @file llwlparamset_stub.cpp
* @brief stub class to allow unit testing
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- * Copyright (c) 2009, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 8aa94616d6..0931c4ec9b 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -31,6 +31,7 @@ import os.path
import re
import tarfile
import time
+import random
viewer_dir = os.path.dirname(__file__)
# add llmanifest library to our path so we don't have to muck with PYTHONPATH
sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
@@ -62,6 +63,32 @@ class ViewerManifest(LLManifest):
# include the entire shaders directory recursively
self.path("shaders")
+ # include the extracted list of contributors
+ contributor_names = self.extract_names("../../doc/contributions.txt")
+ self.put_in_file(contributor_names, "contributors.txt")
+ self.file_list.append(["../../doc/contributions.txt",self.dst_path_of("contributors.txt")])
+ # include the extracted list of translators
+ translator_names = self.extract_names("../../doc/translations.txt")
+ self.put_in_file(translator_names, "translators.txt")
+ self.file_list.append(["../../doc/translations.txt",self.dst_path_of("translators.txt")])
+ # include the list of Lindens (if any)
+ # see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
+ linden_names_path = os.getenv("LINDEN_CREDITS")
+ if linden_names_path :
+ try:
+ linden_file = open(linden_names_path,'r')
+ # all names should be one line, but the join below also converts to a string
+ linden_names = ', '.join(linden_file.readlines())
+ self.put_in_file(linden_names, "lindens.txt")
+ linden_file.close()
+ print "Linden names extracted from '%s'" % linden_names_path
+ self.file_list.append([linden_names_path,self.dst_path_of("lindens.txt")])
+ except IOError:
+ print "No Linden names found at '%s', using built-in list" % linden_names_path
+ pass
+ else :
+ print "No 'LINDEN_CREDITS' specified in environment, using built-in list"
+
# ... and the entire windlight directory
self.path("windlight")
self.end_prefix("app_settings")
@@ -143,6 +170,21 @@ class ViewerManifest(LLManifest):
def channel_lowerword(self):
return self.channel_oneword().lower()
+ def icon_path(self):
+ icon_path="icons/"
+ channel_type=self.channel_lowerword()
+ if channel_type == 'release' \
+ or channel_type == 'development' \
+ :
+ icon_path += channel_type
+ elif channel_type == 'betaviewer' :
+ icon_path += 'beta'
+ elif re.match('project.*',channel_type) :
+ icon_path += 'project'
+ else :
+ icon_path += 'test'
+ return icon_path
+
def flags_list(self):
""" Convenience function that returns the command-line flags
for the grid"""
@@ -174,6 +216,28 @@ class ViewerManifest(LLManifest):
return " ".join((channel_flags, grid_flags, setting_flags)).strip()
+ def extract_names(self,src):
+ try:
+ contrib_file = open(src,'r')
+ except IOError:
+ print "Failed to open '%s'" % src
+ raise
+ lines = contrib_file.readlines()
+ contrib_file.close()
+
+ # All lines up to and including the first blank line are the file header; skip them
+ lines.reverse() # so that pop will pull from first to last line
+ while not re.match("\s*$", lines.pop()) :
+ pass # do nothing
+
+ # A line that starts with a non-whitespace character is a name; all others describe contributions, so collect the names
+ names = []
+ for line in lines :
+ if re.match("\S", line) :
+ names.append(line.rstrip())
+ # It's not fair to always put the same people at the head of the list
+ random.shuffle(names)
+ return ', '.join(names)
class WindowsManifest(ViewerManifest):
def final_exe(self):
@@ -431,8 +495,9 @@ class WindowsManifest(ViewerManifest):
# tag:"crash-logger" here as a cue to the exporter
self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
dst="win_crash_logger.exe")
- self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
- dst="updater.exe")
+# For CHOP-397, windows updater no longer used.
+# self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
+# dst="updater.exe")
if not self.is_packaging_viewer():
self.package_file = "copied_deps"
@@ -509,10 +574,10 @@ class WindowsManifest(ViewerManifest):
grid_vars_template = """
OutFile "%(installer_file)s"
!define INSTFLAGS "%(flags)s"
- !define INSTNAME "SecondLifeViewer2"
- !define SHORTCUT "Second Life Viewer 2"
+ !define INSTNAME "SecondLifeViewer"
+ !define SHORTCUT "Second Life Viewer"
!define URLNAME "secondlife"
- Caption "Second Life ${VERSION}"
+ Caption "Second Life"
"""
else:
# beta grid viewer
@@ -609,12 +674,11 @@ class DarwinManifest(ViewerManifest):
self.path("featuretable_mac.txt")
self.path("SecondLife.nib")
- # If we are not using the default channel, use the 'Firstlook
- # icon' to show that it isn't a stable release.
- if self.default_channel() and self.default_grid():
+ icon_path = self.icon_path()
+ if self.prefix(src=icon_path, dst="") :
self.path("secondlife.icns")
- else:
- self.path("secondlife_firstlook.icns", "secondlife.icns")
+ self.end_prefix(icon_path)
+
self.path("SecondLife.nib")
# Translations
@@ -693,7 +757,7 @@ class DarwinManifest(ViewerManifest):
"libexpat.1.5.2.dylib",
"libexception_handler.dylib",
"libGLOD.dylib",
- "libcollada14dom.dylib"
+ "libcollada14dom.dylib"
):
target_lib = os.path.join('../../..', libfile)
self.run_command("ln -sf %(target)r %(link)r" %
@@ -741,7 +805,7 @@ class DarwinManifest(ViewerManifest):
self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script))
def package_finish(self):
- channel_standin = 'Second Life Viewer 2' # hah, our default channel is not usable on its own
+ channel_standin = 'Second Life Viewer' # hah, our default channel is not usable on its own
if not self.default_channel():
channel_standin = self.channel()
@@ -795,9 +859,7 @@ class DarwinManifest(ViewerManifest):
# will use the release .DS_Store, and will look broken.
# - Ambroff 2008-08-20
dmg_template = os.path.join(
- 'installers',
- 'darwin',
- '%s-dmg' % "".join(self.channel_unique().split()).lower())
+ 'installers', 'darwin', '%s-dmg' % self.channel_lowerword())
if not os.path.exists (self.src_path_of(dmg_template)):
dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
@@ -853,7 +915,6 @@ class LinuxManifest(ViewerManifest):
def construct(self):
super(LinuxManifest, self).construct()
self.path("licenses-linux.txt","licenses.txt")
- self.path("res/ll_icon.png","secondlife_icon.png")
if self.prefix("linux_tools", dst=""):
self.path("client-readme.txt","README-linux.txt")
self.path("client-readme-voice.txt","README-linux-voice.txt")
@@ -879,6 +940,15 @@ class LinuxManifest(ViewerManifest):
# recurse
self.end_prefix("res-sdl")
+ # Get the icons based on the channel
+ icon_path = self.icon_path()
+ if self.prefix(src=icon_path, dst="") :
+ self.path("secondlife_256.png","secondlife_icon.png")
+ if self.prefix(src="",dst="res-sdl") :
+ self.path("secondlife_256.BMP","ll_icon.BMP")
+ self.end_prefix("res-sdl")
+ self.end_prefix(icon_path)
+
self.path("../viewer_components/updater/scripts/linux/update_install", "bin/update_install")
# plugins
@@ -964,15 +1034,15 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libbreakpad_client.so.0.0.0")
self.path("libbreakpad_client.so.0")
self.path("libbreakpad_client.so")
- self.path("libcollada14dom.so")
+ self.path("libcollada14dom.so")
self.path("libdb-5.1.so")
self.path("libdb-5.so")
self.path("libdb.so")
self.path("libcrypto.so.1.0.0")
self.path("libexpat.so.1.5.2")
self.path("libssl.so.1.0.0")
- self.path("libglod.so")
- self.path("libminizip.so")
+ self.path("libglod.so")
+ self.path("libminizip.so")
self.path("libuuid.so")
self.path("libuuid.so.16")
self.path("libuuid.so.16.0.22")
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index e9eb3c1884..328ab4ca51 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -4,7 +4,6 @@ project (test)
include(00-Common)
include(LLCommon)
-include(LLDatabase)
include(LLInventory)
include(LLMath)
include(LLMessage)
@@ -32,7 +31,7 @@ include_directories(
set(test_SOURCE_FILES
io.cpp
-# llapp_tut.cpp # Temporarily removed until thread issues can be solved
+ llapp_tut.cpp
llblowfish_tut.cpp
llbuffer_tut.cpp
lldoubledispatch_tut.cpp
@@ -53,8 +52,6 @@ set(test_SOURCE_FILES
llservicebuilder_tut.cpp
llstreamtools_tut.cpp
lltemplatemessagebuilder_tut.cpp
- lltimestampcache_tut.cpp
- lltranscode_tut.cpp
lltut.cpp
lluuidhashmap_tut.cpp
message_tut.cpp
@@ -76,12 +73,6 @@ if (NOT WINDOWS)
)
endif (NOT WINDOWS)
-if (NOT DARWIN)
- list(APPEND test_SOURCE_FILES
- lldatabase_tut.cpp
- )
-endif (NOT DARWIN)
-
set_source_files_properties(${test_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
@@ -100,7 +91,6 @@ target_link_libraries(test
${LLCOMMON_LIBRARIES}
${EXPAT_LIBRARIES}
${GOOGLEMOCK_LIBRARIES}
- ${APRICONV_LIBRARIES}
${PTHREAD_LIBRARY}
${WINDOWS_LIBRARIES}
${BOOST_PROGRAM_OPTIONS_LIBRARY}
@@ -119,38 +109,28 @@ endif (WINDOWS)
get_target_property(TEST_EXE test LOCATION)
-SET_TEST_PATH(LD_LIBRARY_PATH)
-LL_TEST_COMMAND(command "${LD_LIBRARY_PATH}"
- "${TEST_EXE}" "--output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt" "--touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt")
+SET_TEST_PATH(DYLD_LIBRARY_PATH)
+
+LL_TEST_COMMAND(command
+ "${DYLD_LIBRARY_PATH}"
+ "${TEST_EXE}"
+ "--output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt"
+ "--touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt")
+
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
COMMAND ${command}
DEPENDS test
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "C++ unit tests"
- )
+ )
set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt)
-if (EXISTS /etc/debian_version_FAIL)
- # The Python tests have all kinds of wacky non-portable assumptions
- # built in.
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt
- COMMAND ${PYTHON_EXECUTABLE}
- ARGS
- ${CMAKE_CURRENT_SOURCE_DIR}/test.py
- --mode=static
- --output=${CMAKE_CURRENT_BINARY_DIR}/py_test_results.txt
- --touch=${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt
- --mode=static
- DEPENDS test.py
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMENT "Python unit tests"
- )
-
- list(APPEND test_results ${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt)
-endif (EXISTS /etc/debian_version_FAIL)
-
-add_custom_target(tests_ok ALL DEPENDS ${test_results})
+# This should cause the test executable to be built, but not
+# run if LL_TESTS is disabled. This will hopefully keep the
+# tests up to date with any code changes changes even if
+# developers choose to disable LL_TESTS.
+if (LL_TESTS)
+ add_custom_target(tests_ok ALL DEPENDS ${test_results})
+endif (LL_TESTS)
diff --git a/indra/test/io.cpp b/indra/test/io.cpp
index c06c1b153b..ce747f667d 100644
--- a/indra/test/io.cpp
+++ b/indra/test/io.cpp
@@ -909,7 +909,7 @@ namespace tut
pipe_and_pump_fitness()
{
- LLFrameTimer::updateFrameTime();
+ LLFrameTimer::updateFrameTime();
apr_pool_create(&mPool, NULL);
mPump = new LLPumpIO(mPool);
mSocket = LLSocket::create(
diff --git a/indra/test/llapp_tut.cpp b/indra/test/llapp_tut.cpp
new file mode 100644
index 0000000000..aa5c0672e6
--- /dev/null
+++ b/indra/test/llapp_tut.cpp
@@ -0,0 +1,162 @@
+/**
+ * @file llapp_tut.cpp
+ * @author Phoenix
+ * @date 2006-09-12
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2006-2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include <tut/tut.hpp>
+
+#include "linden_common.h"
+#include "llapp.h"
+#include "lltut.h"
+
+
+namespace tut
+{
+ struct application
+ {
+ class LLTestApp : public LLApp
+ {
+ public:
+ virtual bool init() { return true; }
+ virtual bool cleanup() { return true; }
+ virtual bool mainLoop() { return true; }
+ };
+ LLTestApp* mApp;
+ application()
+ {
+ mApp = new LLTestApp;
+ }
+ ~application()
+ {
+ delete mApp;
+ }
+ };
+
+ typedef test_group<application> application_t;
+ typedef application_t::object application_object_t;
+ tut::application_t tut_application("application");
+
+ template<> template<>
+ void application_object_t::test<1>()
+ {
+ LLSD defaults;
+ defaults["template"] = "../../../scripts/messages/message_template.msg";
+ defaults["configdir"] = ".";
+ defaults["datadir"] = "data";
+ mApp->setOptionData(LLApp::PRIORITY_DEFAULT, defaults);
+
+ LLSD datadir_sd = mApp->getOption("datadir");
+ ensure_equals("data type", datadir_sd.type(), LLSD::TypeString);
+ ensure_equals(
+ "data value", datadir_sd.asString(), std::string("data"));
+ }
+
+ template<> template<>
+ void application_object_t::test<2>()
+ {
+ const int ARGC = 13;
+ const char* ARGV[ARGC] =
+ {
+ "", // argv[0] is usually the application name
+ "-crashcount",
+ "2",
+ "-space",
+ "spaceserver.grid.lindenlab.com",
+ "-db_host",
+ "localhost",
+ "--allowlslhttprequests",
+ "-asset-uri",
+ "http://test.lindenlab.com/assets",
+ "-data",
+ "127.0.0.1",
+ "--smtp"
+ };
+ bool ok = mApp->parseCommandOptions(ARGC, const_cast<char**>(ARGV));
+ ensure("command line parsed", ok);
+ ensure_equals(
+ "crashcount", mApp->getOption("crashcount").asInteger(), 2);
+ ensure_equals(
+ "space",
+ mApp->getOption("space").asString(),
+ std::string("spaceserver.grid.lindenlab.com"));
+ ensure_equals(
+ "db_host",
+ mApp->getOption("db_host").asString(),
+ std::string("localhost"));
+ ensure("allowlshlttprequests", mApp->getOption("smtp"));
+ ensure_equals(
+ "asset-uri",
+ mApp->getOption("asset-uri").asString(),
+ std::string("http://test.lindenlab.com/assets"));
+ ensure_equals(
+ "data",
+ mApp->getOption("data").asString(),
+ std::string("127.0.0.1"));
+ ensure("smtp", mApp->getOption("smtp"));
+ }
+
+ template<> template<>
+ void application_object_t::test<3>()
+ {
+ const int ARGC = 4;
+ const char* ARGV[ARGC] =
+ {
+ "", // argv[0] is usually the application name
+ "crashcount",
+ "2",
+ "--space"
+ };
+ bool ok = mApp->parseCommandOptions(ARGC, const_cast<char**>(ARGV));
+ ensure("command line parse failure", !ok);
+ }
+
+ template<> template<>
+ void application_object_t::test<4>()
+ {
+ const int ARGC = 4;
+ const char* ARGV[ARGC] =
+ {
+ "", // argv[0] is usually the application name
+ "--crashcount",
+ "2",
+ "space"
+ };
+ bool ok = mApp->parseCommandOptions(ARGC, const_cast<char**>(ARGV));
+ ensure("command line parse failure", !ok);
+ }
+
+
+ template<> template<>
+ void application_object_t::test<5>()
+ {
+ LLSD options;
+ options["boolean-test"] = true;
+ mApp->setOptionData(LLApp::PRIORITY_GENERAL_CONFIGURATION, options);
+ ensure("bool set", mApp->getOption("boolean-test").asBoolean());
+ options["boolean-test"] = false;
+ mApp->setOptionData(LLApp::PRIORITY_RUNTIME_OVERRIDE, options);
+ ensure("bool unset", !mApp->getOption("boolean-test").asBoolean());
+ }
+}
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp
index 57e22bbb56..4699bb1827 100644
--- a/indra/test/llevents_tut.cpp
+++ b/indra/test/llevents_tut.cpp
@@ -54,686 +54,730 @@
using boost::assign::list_of;
+#ifdef LL_LINUX
+#define CATCH_MISSED_LINUX_EXCEPTION(exception, threw) \
+catch (const std::runtime_error& ex) \
+{ \
+ /* This clause is needed on Linux, on the viewer side, because the */ \
+ /* exception isn't caught by the clause above. Warn the user... */ \
+ std::cerr << "Failed to catch " << typeid(ex).name() << std::endl; \
+ /* But if the expected exception was thrown, allow the test to */ \
+ /* succeed anyway. Not sure how else to handle this odd case. */ \
+ /* This approach is also used in llsdmessage_test.cpp. */ \
+ if (std::string(typeid(ex).name()) == typeid(exception).name()) \
+ { \
+ threw = ex.what(); \
+ /*std::cout << ex.what() << std::endl;*/ \
+ } \
+ else \
+ { \
+ /* We don't even recognize this exception. Let it propagate */ \
+ /* out to TUT to fail the test. */ \
+ throw; \
+ } \
+} \
+catch (...) \
+{ \
+ std::cerr << "Utterly failed to catch expected exception " << #exception << "!" << \
+ std::endl; \
+ /* This indicates a problem in the test that should be addressed. */ \
+ throw; \
+}
+
+#else // LL_LINUX
+#define CATCH_MISSED_LINUX_EXCEPTION(exception, threw) \
+ /* Not needed on other platforms */
+#endif // LL_LINUX
+
template<typename T>
-T make(const T& value) { return value; }
+T make(const T& value)
+{
+ return value;
+}
/*****************************************************************************
-* tut test group
-*****************************************************************************/
+ * tut test group
+ *****************************************************************************/
namespace tut
{
- struct events_data
- {
- events_data():
- pumps(LLEventPumps::instance()),
- listener0("first"),
- listener1("second")
- {}
- LLEventPumps& pumps;
- Listener listener0;
- Listener listener1;
-
- void check_listener(const std::string& desc, const Listener& listener, LLSD::Integer got)
- {
- ensure_equals(STRINGIZE(listener << ' ' << desc),
- listener.getLastEvent().asInteger(), got);
- }
- };
- typedef test_group<events_data> events_group;
- typedef events_group::object events_object;
- tut::events_group evgr("events");
-
- template<> template<>
- void events_object::test<1>()
- {
- set_test_name("basic operations");
- // Now there's a static constructor in llevents.cpp that registers on
- // the "mainloop" pump to call LLEventPumps::flush().
- // Actually -- having to modify this to track the statically-
- // constructed pumps in other TUT modules in this giant monolithic test
- // executable isn't such a hot idea.
-// ensure_equals("initial pump", pumps.mPumpMap.size(), 1);
- size_t initial_pumps(pumps.mPumpMap.size());
- LLEventPump& per_frame(pumps.obtain("per-frame"));
- ensure_equals("first explicit pump", pumps.mPumpMap.size(), initial_pumps+1);
- // Verify that per_frame was instantiated as an LLEventStream.
- ensure("LLEventStream leaf class", dynamic_cast<LLEventStream*>(&per_frame));
- ensure("enabled", per_frame.enabled());
- // Trivial test, but posting an event to an EventPump with no
- // listeners should not blow up. The test is relevant because defining
- // a boost::signal with a non-void return signature, using the default
- // combiner, blows up if there are no listeners. This is because the
- // default combiner is defined to return the value returned by the
- // last listener, which is meaningless if there were no listeners.
- per_frame.post(0);
- LLBoundListener connection = listener0.listenTo(per_frame);
- ensure("connected", connection.connected());
- ensure("not blocked", ! connection.blocked());
- per_frame.post(1);
- check_listener("received", listener0, 1);
- { // block the connection
- LLEventPump::Blocker block(connection);
- ensure("blocked", connection.blocked());
- per_frame.post(2);
- check_listener("not updated", listener0, 1);
- } // unblock
- ensure("unblocked", ! connection.blocked());
- per_frame.post(3);
- check_listener("unblocked", listener0, 3);
- LLBoundListener sameConnection = per_frame.getListener(listener0.getName());
- ensure("still connected", sameConnection.connected());
- ensure("still not blocked", ! sameConnection.blocked());
- { // block it again
- LLEventPump::Blocker block(sameConnection);
- ensure("re-blocked", sameConnection.blocked());
- per_frame.post(4);
- check_listener("re-blocked", listener0, 3);
- } // unblock
- bool threw = false;
- try
- {
- // NOTE: boost::bind() saves its arguments by VALUE! If you pass
- // an object instance rather than a pointer, you'll end up binding
- // to an internal copy of that instance! Use boost::ref() to
- // capture a reference instead.
- per_frame.listen(listener0.getName(), // note bug, dup name
- boost::bind(&Listener::call, boost::ref(listener1), _1));
- }
- catch (const LLEventPump::DupListenerName& e)
- {
- threw = true;
- ensure_equals(e.what(),
- std::string("DupListenerName: "
- "Attempt to register duplicate listener name '") +
- listener0.getName() +
- "' on " + typeid(per_frame).name() + " '" + per_frame.getName() + "'");
- }
- ensure("threw DupListenerName", threw);
- // do it right this time
- listener1.listenTo(per_frame);
- per_frame.post(5);
- check_listener("got", listener0, 5);
- check_listener("got", listener1, 5);
- per_frame.enable(false);
- per_frame.post(6);
- check_listener("didn't get", listener0, 5);
- check_listener("didn't get", listener1, 5);
- per_frame.enable();
- per_frame.post(7);
- check_listener("got", listener0, 7);
- check_listener("got", listener1, 7);
- per_frame.stopListening(listener0.getName());
- ensure("disconnected 0", ! connection.connected());
- ensure("disconnected 1", ! sameConnection.connected());
- per_frame.post(8);
- check_listener("disconnected", listener0, 7);
- check_listener("still connected", listener1, 8);
- per_frame.stopListening(listener1.getName());
- per_frame.post(9);
- check_listener("disconnected", listener1, 8);
- }
-
- template<> template<>
- void events_object::test<2>()
- {
- set_test_name("callstop() returning true");
- LLEventPump& per_frame(pumps.obtain("per-frame"));
- listener0.reset(0);
- listener1.reset(0);
- LLBoundListener bound0 = listener0.listenTo(per_frame, &Listener::callstop);
- LLBoundListener bound1 = listener1.listenTo(per_frame, &Listener::call,
- // after listener0
- make<LLEventPump::NameList>(list_of(listener0.getName())));
- ensure("enabled", per_frame.enabled());
- ensure("connected 0", bound0.connected());
- ensure("unblocked 0", ! bound0.blocked());
- ensure("connected 1", bound1.connected());
- ensure("unblocked 1", ! bound1.blocked());
- per_frame.post(1);
- check_listener("got", listener0, 1);
- // Because listener0.callstop() returns true, control never reaches listener1.call().
- check_listener("got", listener1, 0);
- }
-
- bool chainEvents(Listener& someListener, const LLSD& event)
- {
- // Make this call so we can watch for side effects for test purposes.
- someListener.call(event);
- // This function represents a recursive event chain -- or some other
- // scenario in which an event handler raises additional events.
- int value = event.asInteger();
- if (value)
- {
- LLEventPumps::instance().obtain("login").post(value - 1);
- }
- return false;
- }
-
- template<> template<>
- void events_object::test<3>()
- {
- set_test_name("LLEventQueue delayed action");
- // This access is NOT legal usage: we can do it only because we're
- // hacking private for test purposes. Normally we'd either compile in
- // a particular name, or (later) edit a config file.
- pumps.mQueueNames.insert("login");
- LLEventPump& login(pumps.obtain("login"));
- // The "mainloop" pump is special: posting on that implicitly calls
- // LLEventPumps::flush(), which in turn should flush our "login"
- // LLEventQueue.
- LLEventPump& mainloop(pumps.obtain("mainloop"));
- ensure("LLEventQueue leaf class", dynamic_cast<LLEventQueue*>(&login));
- listener0.listenTo(login);
- listener0.reset(0);
- login.post(1);
- check_listener("waiting for queued event", listener0, 0);
- mainloop.post(LLSD());
- check_listener("got queued event", listener0, 1);
- login.stopListening(listener0.getName());
- // Verify that when an event handler posts a new event on the same
- // LLEventQueue, it doesn't get processed in the same flush() call --
- // it waits until the next flush() call.
- listener0.reset(17);
- login.listen("chainEvents", boost::bind(chainEvents, boost::ref(listener0), _1));
- login.post(1);
- check_listener("chainEvents(1) not yet called", listener0, 17);
- mainloop.post(LLSD());
- check_listener("chainEvents(1) called", listener0, 1);
- mainloop.post(LLSD());
- check_listener("chainEvents(0) called", listener0, 0);
- mainloop.post(LLSD());
- check_listener("chainEvents(-1) not called", listener0, 0);
- login.stopListening("chainEvents");
- }
-
- template<> template<>
- void events_object::test<4>()
- {
- set_test_name("explicitly-instantiated LLEventStream");
- // Explicitly instantiate an LLEventStream, and verify that it
- // self-registers with LLEventPumps
- size_t registered = pumps.mPumpMap.size();
- size_t owned = pumps.mOurPumps.size();
- LLEventPump* localInstance;
- {
- LLEventStream myEventStream("stream");
- localInstance = &myEventStream;
- LLEventPump& stream(pumps.obtain("stream"));
- ensure("found named LLEventStream instance", &stream == localInstance);
- ensure_equals("registered new instance", pumps.mPumpMap.size(), registered + 1);
- ensure_equals("explicit instance not owned", pumps.mOurPumps.size(), owned);
- } // destroy myEventStream -- should unregister
- ensure_equals("destroyed instance unregistered", pumps.mPumpMap.size(), registered);
- ensure_equals("destroyed instance not owned", pumps.mOurPumps.size(), owned);
- LLEventPump& stream(pumps.obtain("stream"));
- ensure("new LLEventStream instance", &stream != localInstance);
- ensure_equals("obtain()ed instance registered", pumps.mPumpMap.size(), registered + 1);
- ensure_equals("obtain()ed instance owned", pumps.mOurPumps.size(), owned + 1);
- }
-
- template<> template<>
- void events_object::test<5>()
- {
- set_test_name("stopListening()");
- LLEventPump& login(pumps.obtain("login"));
- listener0.listenTo(login);
- login.stopListening(listener0.getName());
- // should not throw because stopListening() should have removed name
- listener0.listenTo(login, &Listener::callstop);
- LLBoundListener wrong = login.getListener("bogus");
- ensure("bogus connection disconnected", ! wrong.connected());
- ensure("bogus connection blocked", wrong.blocked());
- }
-
- template<> template<>
- void events_object::test<6>()
- {
- set_test_name("chaining LLEventPump instances");
- LLEventPump& upstream(pumps.obtain("upstream"));
- // One potentially-useful construct is to chain LLEventPumps together.
- // Among other things, this allows you to turn subsets of listeners on
- // and off in groups.
- LLEventPump& filter0(pumps.obtain("filter0"));
- LLEventPump& filter1(pumps.obtain("filter1"));
- upstream.listen(filter0.getName(),
- boost::bind(&LLEventPump::post, boost::ref(filter0), _1));
- upstream.listen(filter1.getName(),
- boost::bind(&LLEventPump::post, boost::ref(filter1), _1));
- listener0.listenTo(filter0);
- listener1.listenTo(filter1);
- listener0.reset(0);
- listener1.reset(0);
- upstream.post(1);
- check_listener("got unfiltered", listener0, 1);
- check_listener("got unfiltered", listener1, 1);
- filter0.enable(false);
- upstream.post(2);
- check_listener("didn't get filtered", listener0, 1);
- check_listener("got filtered", listener1, 2);
- }
-
- template<> template<>
- void events_object::test<7>()
- {
- set_test_name("listener dependency order");
- typedef LLEventPump::NameList NameList;
- typedef Collect::StringList StringList;
- LLEventPump& button(pumps.obtain("button"));
- Collect collector;
- button.listen("Mary",
- boost::bind(&Collect::add, boost::ref(collector), "Mary", _1),
- // state that "Mary" must come after "checked"
- make<NameList>(list_of("checked")));
- button.listen("checked",
- boost::bind(&Collect::add, boost::ref(collector), "checked", _1),
- // "checked" must come after "spot"
- make<NameList>(list_of("spot")));
- button.listen("spot",
- boost::bind(&Collect::add, boost::ref(collector), "spot", _1));
- button.post(1);
- ensure_equals(collector.result, make<StringList>(list_of("spot")("checked")("Mary")));
- collector.clear();
- button.stopListening("Mary");
- button.listen("Mary",
- boost::bind(&Collect::add, boost::ref(collector), "Mary", _1),
- LLEventPump::empty, // no after dependencies
- // now "Mary" must come before "spot"
- make<NameList>(list_of("spot")));
- button.post(2);
- ensure_equals(collector.result, make<StringList>(list_of("Mary")("spot")("checked")));
- collector.clear();
- button.stopListening("spot");
- std::string threw;
- try
- {
- button.listen("spot",
- boost::bind(&Collect::add, boost::ref(collector), "spot", _1),
- // after "Mary" and "checked" -- whoops!
- make<NameList>(list_of("Mary")("checked")));
- }
- catch (const LLEventPump::Cycle& e)
- {
- threw = e.what();
-// std::cout << "Caught: " << e.what() << '\n';
- }
- // Obviously the specific wording of the exception text can
- // change; go ahead and change the test to match.
- // Establish that it contains:
- // - the name and runtime type of the LLEventPump
- ensure_contains("LLEventPump type", threw, typeid(button).name());
- ensure_contains("LLEventPump name", threw, "'button'");
- // - the name of the new listener that caused the problem
- ensure_contains("new listener name", threw, "'spot'");
- // - a synopsis of the problematic dependencies.
- ensure_contains("cyclic dependencies", threw,
- "\"Mary\" -> before (\"spot\")");
- ensure_contains("cyclic dependencies", threw,
- "after (\"spot\") -> \"checked\"");
- ensure_contains("cyclic dependencies", threw,
- "after (\"Mary\", \"checked\") -> \"spot\"");
- button.listen("yellow",
- boost::bind(&Collect::add, boost::ref(collector), "yellow", _1),
- make<NameList>(list_of("checked")));
- button.listen("shoelaces",
- boost::bind(&Collect::add, boost::ref(collector), "shoelaces", _1),
- make<NameList>(list_of("checked")));
- button.post(3);
- ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces")));
- collector.clear();
- threw.clear();
- try
- {
- button.listen("of",
- boost::bind(&Collect::add, boost::ref(collector), "of", _1),
- make<NameList>(list_of("shoelaces")),
- make<NameList>(list_of("yellow")));
- }
- catch (const LLEventPump::OrderChange& e)
- {
- threw = e.what();
-// std::cout << "Caught: " << e.what() << '\n';
- }
- // Same remarks about the specific wording of the exception. Just
- // ensure that it contains enough information to clarify the
- // problem and what must be done to resolve it.
- ensure_contains("LLEventPump type", threw, typeid(button).name());
- ensure_contains("LLEventPump name", threw, "'button'");
- ensure_contains("new listener name", threw, "'of'");
- ensure_contains("prev listener name", threw, "'yellow'");
- ensure_contains("old order", threw, "was: Mary, checked, yellow, shoelaces");
- ensure_contains("new order", threw, "now: Mary, checked, shoelaces, of, yellow");
- button.post(4);
- ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces")));
- }
-
- template<> template<>
- void events_object::test<8>()
- {
- set_test_name("tweaked and untweaked LLEventPump instance names");
- { // nested scope
- // Hand-instantiate an LLEventStream...
- LLEventStream bob("bob");
- bool threw = false;
- try
- {
- // then another with a duplicate name.
- LLEventStream bob2("bob");
- }
- catch (const LLEventPump::DupPumpName& /*e*/)
- {
- threw = true;
-// std::cout << "Caught: " << e.what() << '\n';
- }
- ensure("Caught DupPumpName", threw);
- } // delete first 'bob'
- LLEventStream bob("bob"); // should work, previous one unregistered
- LLEventStream bob1("bob", true); // allowed to tweak name
- ensure_equals("tweaked LLEventStream name", bob1.getName(), "bob1");
- std::vector< boost::shared_ptr<LLEventStream> > streams;
- for (int i = 2; i <= 10; ++i)
- {
- streams.push_back(boost::shared_ptr<LLEventStream>(new LLEventStream("bob", true)));
- }
- ensure_equals("last tweaked LLEventStream name", streams.back()->getName(), "bob10");
- }
-
- // Define a function that accepts an LLListenerOrPumpName
- void eventSource(const LLListenerOrPumpName& listener)
- {
- // Pretend that some time has elapsed. Call listener immediately.
- listener(17);
- }
-
- template<> template<>
- void events_object::test<9>()
- {
- set_test_name("LLListenerOrPumpName");
- // Passing a boost::bind() expression to LLListenerOrPumpName
- listener0.reset(0);
- eventSource(boost::bind(&Listener::call, boost::ref(listener0), _1));
- check_listener("got by listener", listener0, 17);
- // Passing a string LLEventPump name to LLListenerOrPumpName
- listener0.reset(0);
- LLEventStream random("random");
- listener0.listenTo(random);
- eventSource("random");
- check_listener("got by pump name", listener0, 17);
- bool threw = false;
- try
- {
- LLListenerOrPumpName empty;
- empty(17);
- }
- catch (const LLListenerOrPumpName::Empty&)
- {
- threw = true;
- }
- ensure("threw Empty", threw);
- }
-
- class TempListener: public Listener
- {
- public:
- TempListener(const std::string& name, bool& liveFlag):
- Listener(name),
- mLiveFlag(liveFlag)
- {
- mLiveFlag = true;
- }
-
- virtual ~TempListener()
- {
- mLiveFlag = false;
- }
-
- private:
- bool& mLiveFlag;
- };
-
- template<> template<>
- void events_object::test<10>()
- {
- set_test_name("listen(boost::bind(...TempListener...))");
- // listen() can't do anything about a plain TempListener instance:
- // it's not managed with shared_ptr, nor is it an LLEventTrackable subclass
- bool live = false;
- LLEventPump& heaptest(pumps.obtain("heaptest"));
- LLBoundListener connection;
- {
- TempListener tempListener("temp", live);
- ensure("TempListener constructed", live);
- connection = heaptest.listen(tempListener.getName(),
- boost::bind(&Listener::call,
- boost::ref(tempListener),
- _1));
- heaptest.post(1);
- check_listener("received", tempListener, 1);
- } // presumably this will make newListener go away?
- // verify that
- ensure("TempListener destroyed", ! live);
- // This is the case against which we can't defend. Don't even try to
- // post to heaptest -- that would engage Undefined Behavior.
- // Cautiously inspect connection...
- ensure("misleadingly connected", connection.connected());
- // then disconnect by hand.
- heaptest.stopListening("temp");
- }
-
- template<> template<>
- void events_object::test<11>()
- {
- set_test_name("listen(boost::bind(...weak_ptr...))");
- // listen() detecting weak_ptr<TempListener> in boost::bind() object
- bool live = false;
- LLEventPump& heaptest(pumps.obtain("heaptest"));
- LLBoundListener connection;
- ensure("default state", ! connection.connected());
- {
- boost::shared_ptr<TempListener> newListener(new TempListener("heap", live));
- newListener->reset();
- ensure("TempListener constructed", live);
- connection = heaptest.listen(newListener->getName(),
- boost::bind(&Listener::call, weaken(newListener), _1));
- ensure("new connection", connection.connected());
- heaptest.post(1);
- check_listener("received", *newListener, 1);
- } // presumably this will make newListener go away?
- // verify that
- ensure("TempListener destroyed", ! live);
- ensure("implicit disconnect", ! connection.connected());
- // now just make sure we don't blow up trying to access a freed object!
- heaptest.post(2);
- }
-
- template<> template<>
- void events_object::test<12>()
- {
- set_test_name("listen(boost::bind(...shared_ptr...))");
-/*==========================================================================*|
- // DISABLED because I've made this case produce a compile error.
- // Following the error leads the disappointed dev to a comment
- // instructing her to use the weaken() function to bind a weak_ptr<T>
- // instead of binding a shared_ptr<T>, and explaining why. I know of
- // no way to use TUT to code a repeatable test in which the expected
- // outcome is a compile error. The interested reader is invited to
- // uncomment this block and build to see for herself.
-
- // listen() detecting shared_ptr<TempListener> in boost::bind() object
- bool live = false;
- LLEventPump& heaptest(pumps.obtain("heaptest"));
- LLBoundListener connection;
- std::string listenerName("heap");
- ensure("default state", ! connection.connected());
- {
- boost::shared_ptr<TempListener> newListener(new TempListener(listenerName, live));
- ensure_equals("use_count", newListener.use_count(), 1);
- newListener->reset();
- ensure("TempListener constructed", live);
- connection = heaptest.listen(newListener->getName(),
- boost::bind(&Listener::call, newListener, _1));
- ensure("new connection", connection.connected());
- ensure_equals("use_count", newListener.use_count(), 2);
- heaptest.post(1);
- check_listener("received", *newListener, 1);
- } // this should make newListener go away...
- // Unfortunately, the fact that we've bound a shared_ptr by value into
- // our LLEventPump means that copy will keep the referenced object alive.
- ensure("TempListener still alive", live);
- ensure("still connected", connection.connected());
- // disconnecting explicitly should delete the TempListener...
- heaptest.stopListening(listenerName);
+struct events_data
+{
+ events_data() :
+ pumps(LLEventPumps::instance()),
+ listener0("first"),
+ listener1("second")
+ {
+ }
+ LLEventPumps& pumps;
+ Listener listener0;
+ Listener listener1;
+
+ void check_listener(const std::string& desc, const Listener& listener, LLSD::Integer got)
+ {
+ ensure_equals(STRINGIZE(listener << ' ' << desc),
+ listener.getLastEvent().asInteger(), got);
+ }
+};
+typedef test_group<events_data> events_group;
+typedef events_group::object events_object;
+tut::events_group evgr("events");
+
+template<> template<>
+void events_object::test<1>()
+{
+ set_test_name("basic operations");
+ // Now there's a static constructor in llevents.cpp that registers on
+ // the "mainloop" pump to call LLEventPumps::flush().
+ // Actually -- having to modify this to track the statically-
+ // constructed pumps in other TUT modules in this giant monolithic test
+ // executable isn't such a hot idea.
+ // ensure_equals("initial pump", pumps.mPumpMap.size(), 1);
+ size_t initial_pumps(pumps.mPumpMap.size());
+ LLEventPump& per_frame(pumps.obtain("per-frame"));
+ ensure_equals("first explicit pump", pumps.mPumpMap.size(), initial_pumps + 1);
+ // Verify that per_frame was instantiated as an LLEventStream.
+ ensure("LLEventStream leaf class", dynamic_cast<LLEventStream*> (&per_frame));
+ ensure("enabled", per_frame.enabled());
+ // Trivial test, but posting an event to an EventPump with no
+ // listeners should not blow up. The test is relevant because defining
+ // a boost::signal with a non-void return signature, using the default
+ // combiner, blows up if there are no listeners. This is because the
+ // default combiner is defined to return the value returned by the
+ // last listener, which is meaningless if there were no listeners.
+ per_frame.post(0);
+ LLBoundListener connection = listener0.listenTo(per_frame);
+ ensure("connected", connection.connected());
+ ensure("not blocked", !connection.blocked());
+ per_frame.post(1);
+ check_listener("received", listener0, 1);
+ { // block the connection
+ LLEventPump::Blocker block(connection);
+ ensure("blocked", connection.blocked());
+ per_frame.post(2);
+ check_listener("not updated", listener0, 1);
+ } // unblock
+ ensure("unblocked", !connection.blocked());
+ per_frame.post(3);
+ check_listener("unblocked", listener0, 3);
+ LLBoundListener sameConnection = per_frame.getListener(listener0.getName());
+ ensure("still connected", sameConnection.connected());
+ ensure("still not blocked", !sameConnection.blocked());
+ { // block it again
+ LLEventPump::Blocker block(sameConnection);
+ ensure("re-blocked", sameConnection.blocked());
+ per_frame.post(4);
+ check_listener("re-blocked", listener0, 3);
+ } // unblock
+ std::string threw;
+ try
+ {
+ // NOTE: boost::bind() saves its arguments by VALUE! If you pass
+ // an object instance rather than a pointer, you'll end up binding
+ // to an internal copy of that instance! Use boost::ref() to
+ // capture a reference instead.
+ per_frame.listen(listener0.getName(), // note bug, dup name
+ boost::bind(&Listener::call, boost::ref(listener1), _1));
+ }
+ catch (const LLEventPump::DupListenerName& e)
+ {
+ threw = e.what();
+ }
+ CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::DupListenerName, threw)
+ ensure_equals(threw,
+ std::string("DupListenerName: "
+ "Attempt to register duplicate listener name '") +
+ listener0.getName() + "' on " + typeid(per_frame).name() +
+ " '" + per_frame.getName() + "'");
+ // do it right this time
+ listener1.listenTo(per_frame);
+ per_frame.post(5);
+ check_listener("got", listener0, 5);
+ check_listener("got", listener1, 5);
+ per_frame.enable(false);
+ per_frame.post(6);
+ check_listener("didn't get", listener0, 5);
+ check_listener("didn't get", listener1, 5);
+ per_frame.enable();
+ per_frame.post(7);
+ check_listener("got", listener0, 7);
+ check_listener("got", listener1, 7);
+ per_frame.stopListening(listener0.getName());
+ ensure("disconnected 0", ! connection.connected());
+ ensure("disconnected 1", ! sameConnection.connected());
+ per_frame.post(8);
+ check_listener("disconnected", listener0, 7);
+ check_listener("still connected", listener1, 8);
+ per_frame.stopListening(listener1.getName());
+ per_frame.post(9);
+ check_listener("disconnected", listener1, 8);
+}
+
+template<> template<>
+void events_object::test<2>()
+{
+ set_test_name("callstop() returning true");
+ LLEventPump& per_frame(pumps.obtain("per-frame"));
+ listener0.reset(0);
+ listener1.reset(0);
+ LLBoundListener bound0 = listener0.listenTo(per_frame, &Listener::callstop);
+ LLBoundListener bound1 = listener1.listenTo(per_frame, &Listener::call,
+ // after listener0
+ make<LLEventPump::NameList>(list_of(listener0.getName())));
+ ensure("enabled", per_frame.enabled());
+ ensure("connected 0", bound0.connected());
+ ensure("unblocked 0", !bound0.blocked());
+ ensure("connected 1", bound1.connected());
+ ensure("unblocked 1", !bound1.blocked());
+ per_frame.post(1);
+ check_listener("got", listener0, 1);
+ // Because listener0.callstop() returns true, control never reaches listener1.call().
+ check_listener("got", listener1, 0);
+}
+
+bool chainEvents(Listener& someListener, const LLSD& event)
+{
+ // Make this call so we can watch for side effects for test purposes.
+ someListener.call(event);
+ // This function represents a recursive event chain -- or some other
+ // scenario in which an event handler raises additional events.
+ int value = event.asInteger();
+ if (value)
+ {
+ LLEventPumps::instance().obtain("login").post(value - 1);
+ }
+ return false;
+}
+
+template<> template<>
+void events_object::test<3>()
+{
+ set_test_name("LLEventQueue delayed action");
+ // This access is NOT legal usage: we can do it only because we're
+ // hacking private for test purposes. Normally we'd either compile in
+ // a particular name, or (later) edit a config file.
+ pumps.mQueueNames.insert("login");
+ LLEventPump& login(pumps.obtain("login"));
+ // The "mainloop" pump is special: posting on that implicitly calls
+ // LLEventPumps::flush(), which in turn should flush our "login"
+ // LLEventQueue.
+ LLEventPump& mainloop(pumps.obtain("mainloop"));
+ ensure("LLEventQueue leaf class", dynamic_cast<LLEventQueue*> (&login));
+ listener0.listenTo(login);
+ listener0.reset(0);
+ login.post(1);
+ check_listener("waiting for queued event", listener0, 0);
+ mainloop.post(LLSD());
+ check_listener("got queued event", listener0, 1);
+ login.stopListening(listener0.getName());
+ // Verify that when an event handler posts a new event on the same
+ // LLEventQueue, it doesn't get processed in the same flush() call --
+ // it waits until the next flush() call.
+ listener0.reset(17);
+ login.listen("chainEvents", boost::bind(chainEvents, boost::ref(listener0), _1));
+ login.post(1);
+ check_listener("chainEvents(1) not yet called", listener0, 17);
+ mainloop.post(LLSD());
+ check_listener("chainEvents(1) called", listener0, 1);
+ mainloop.post(LLSD());
+ check_listener("chainEvents(0) called", listener0, 0);
+ mainloop.post(LLSD());
+ check_listener("chainEvents(-1) not called", listener0, 0);
+ login.stopListening("chainEvents");
+}
+
+template<> template<>
+void events_object::test<4>()
+{
+ set_test_name("explicitly-instantiated LLEventStream");
+ // Explicitly instantiate an LLEventStream, and verify that it
+ // self-registers with LLEventPumps
+ size_t registered = pumps.mPumpMap.size();
+ size_t owned = pumps.mOurPumps.size();
+ LLEventPump* localInstance;
+ {
+ LLEventStream myEventStream("stream");
+ localInstance = &myEventStream;
+ LLEventPump& stream(pumps.obtain("stream"));
+ ensure("found named LLEventStream instance", &stream == localInstance);
+ ensure_equals("registered new instance", pumps.mPumpMap.size(), registered + 1);
+ ensure_equals("explicit instance not owned", pumps.mOurPumps.size(), owned);
+ } // destroy myEventStream -- should unregister
+ ensure_equals("destroyed instance unregistered", pumps.mPumpMap.size(), registered);
+ ensure_equals("destroyed instance not owned", pumps.mOurPumps.size(), owned);
+ LLEventPump& stream(pumps.obtain("stream"));
+ ensure("new LLEventStream instance", &stream != localInstance);
+ ensure_equals("obtain()ed instance registered", pumps.mPumpMap.size(), registered + 1);
+ ensure_equals("obtain()ed instance owned", pumps.mOurPumps.size(), owned + 1);
+}
+
+template<> template<>
+void events_object::test<5>()
+{
+ set_test_name("stopListening()");
+ LLEventPump& login(pumps.obtain("login"));
+ listener0.listenTo(login);
+ login.stopListening(listener0.getName());
+ // should not throw because stopListening() should have removed name
+ listener0.listenTo(login, &Listener::callstop);
+ LLBoundListener wrong = login.getListener("bogus");
+ ensure("bogus connection disconnected", !wrong.connected());
+ ensure("bogus connection blocked", wrong.blocked());
+}
+
+template<> template<>
+void events_object::test<6>()
+{
+ set_test_name("chaining LLEventPump instances");
+ LLEventPump& upstream(pumps.obtain("upstream"));
+ // One potentially-useful construct is to chain LLEventPumps together.
+ // Among other things, this allows you to turn subsets of listeners on
+ // and off in groups.
+ LLEventPump& filter0(pumps.obtain("filter0"));
+ LLEventPump& filter1(pumps.obtain("filter1"));
+ upstream.listen(filter0.getName(), boost::bind(&LLEventPump::post, boost::ref(filter0), _1));
+ upstream.listen(filter1.getName(), boost::bind(&LLEventPump::post, boost::ref(filter1), _1));
+ listener0.listenTo(filter0);
+ listener1.listenTo(filter1);
+ listener0.reset(0);
+ listener1.reset(0);
+ upstream.post(1);
+ check_listener("got unfiltered", listener0, 1);
+ check_listener("got unfiltered", listener1, 1);
+ filter0.enable(false);
+ upstream.post(2);
+ check_listener("didn't get filtered", listener0, 1);
+ check_listener("got filtered", listener1, 2);
+}
+
+template<> template<>
+void events_object::test<7>()
+{
+ set_test_name("listener dependency order");
+ typedef LLEventPump::NameList NameList;
+ typedef Collect::StringList StringList;
+ LLEventPump& button(pumps.obtain("button"));
+ Collect collector;
+ button.listen("Mary",
+ boost::bind(&Collect::add, boost::ref(collector), "Mary", _1),
+ // state that "Mary" must come after "checked"
+ make<NameList> (list_of("checked")));
+ button.listen("checked",
+ boost::bind(&Collect::add, boost::ref(collector), "checked", _1),
+ // "checked" must come after "spot"
+ make<NameList> (list_of("spot")));
+ button.listen("spot",
+ boost::bind(&Collect::add, boost::ref(collector), "spot", _1));
+ button.post(1);
+ ensure_equals(collector.result, make<StringList>(list_of("spot")("checked")("Mary")));
+ collector.clear();
+ button.stopListening("Mary");
+ button.listen("Mary",
+ boost::bind(&Collect::add, boost::ref(collector), "Mary", _1),
+ LLEventPump::empty, // no after dependencies
+ // now "Mary" must come before "spot"
+ make<NameList>(list_of("spot")));
+ button.post(2);
+ ensure_equals(collector.result, make<StringList>(list_of("Mary")("spot")("checked")));
+ collector.clear();
+ button.stopListening("spot");
+ std::string threw;
+ try
+ {
+ button.listen("spot",
+ boost::bind(&Collect::add, boost::ref(collector), "spot", _1),
+ // after "Mary" and "checked" -- whoops!
+ make<NameList>(list_of("Mary")("checked")));
+ }
+ catch (const LLEventPump::Cycle& e)
+ {
+ threw = e.what();
+ // std::cout << "Caught: " << e.what() << '\n';
+ }
+ CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::Cycle, threw)
+ // Obviously the specific wording of the exception text can
+ // change; go ahead and change the test to match.
+ // Establish that it contains:
+ // - the name and runtime type of the LLEventPump
+ ensure_contains("LLEventPump type", threw, typeid(button).name());
+ ensure_contains("LLEventPump name", threw, "'button'");
+ // - the name of the new listener that caused the problem
+ ensure_contains("new listener name", threw, "'spot'");
+ // - a synopsis of the problematic dependencies.
+ ensure_contains("cyclic dependencies", threw,
+ "\"Mary\" -> before (\"spot\")");
+ ensure_contains("cyclic dependencies", threw,
+ "after (\"spot\") -> \"checked\"");
+ ensure_contains("cyclic dependencies", threw,
+ "after (\"Mary\", \"checked\") -> \"spot\"");
+ button.listen("yellow",
+ boost::bind(&Collect::add, boost::ref(collector), "yellow", _1),
+ make<NameList>(list_of("checked")));
+ button.listen("shoelaces",
+ boost::bind(&Collect::add, boost::ref(collector), "shoelaces", _1),
+ make<NameList>(list_of("checked")));
+ button.post(3);
+ ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces")));
+ collector.clear();
+ threw.clear();
+ try
+ {
+ button.listen("of",
+ boost::bind(&Collect::add, boost::ref(collector), "of", _1),
+ make<NameList>(list_of("shoelaces")),
+ make<NameList>(list_of("yellow")));
+ }
+ catch (const LLEventPump::OrderChange& e)
+ {
+ threw = e.what();
+ // std::cout << "Caught: " << e.what() << '\n';
+ }
+ CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::OrderChange, threw)
+ // Same remarks about the specific wording of the exception. Just
+ // ensure that it contains enough information to clarify the
+ // problem and what must be done to resolve it.
+ ensure_contains("LLEventPump type", threw, typeid(button).name());
+ ensure_contains("LLEventPump name", threw, "'button'");
+ ensure_contains("new listener name", threw, "'of'");
+ ensure_contains("prev listener name", threw, "'yellow'");
+ // std::cout << "Thrown Exception: " << threw << std::endl;
+ ensure_contains("old order", threw, "was: Mary, checked, yellow, shoelaces");
+ ensure_contains("new order", threw, "now: Mary, checked, shoelaces, of, yellow");
+ button.post(4);
+ ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces")));
+}
+
+template<> template<>
+void events_object::test<8>()
+{
+ set_test_name("tweaked and untweaked LLEventPump instance names");
+ { // nested scope
+ // Hand-instantiate an LLEventStream...
+ LLEventStream bob("bob");
+ std::string threw;
+ try
+ {
+ // then another with a duplicate name.
+ LLEventStream bob2("bob");
+ }
+ catch (const LLEventPump::DupPumpName& e)
+ {
+ threw = e.what();
+ // std::cout << "Caught: " << e.what() << '\n';
+ }
+ CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::DupPumpName, threw)
+ ensure("Caught DupPumpName", !threw.empty());
+ } // delete first 'bob'
+ LLEventStream bob("bob"); // should work, previous one unregistered
+ LLEventStream bob1("bob", true);// allowed to tweak name
+ ensure_equals("tweaked LLEventStream name", bob1.getName(), "bob1");
+ std::vector<boost::shared_ptr<LLEventStream> > streams;
+ for (int i = 2; i <= 10; ++i)
+ {
+ streams.push_back(boost::shared_ptr<LLEventStream>(new LLEventStream("bob", true)));
+ }
+ ensure_equals("last tweaked LLEventStream name", streams.back()->getName(), "bob10");
+}
+
+// Define a function that accepts an LLListenerOrPumpName
+void eventSource(const LLListenerOrPumpName& listener)
+{
+ // Pretend that some time has elapsed. Call listener immediately.
+ listener(17);
+}
+
+template<> template<>
+void events_object::test<9>()
+{
+ set_test_name("LLListenerOrPumpName");
+ // Passing a boost::bind() expression to LLListenerOrPumpName
+ listener0.reset(0);
+ eventSource(boost::bind(&Listener::call, boost::ref(listener0), _1));
+ check_listener("got by listener", listener0, 17);
+ // Passing a string LLEventPump name to LLListenerOrPumpName
+ listener0.reset(0);
+ LLEventStream random("random");
+ listener0.listenTo(random);
+ eventSource("random");
+ check_listener("got by pump name", listener0, 17);
+ std::string threw;
+ try
+ {
+ LLListenerOrPumpName empty;
+ empty(17);
+ }
+ catch (const LLListenerOrPumpName::Empty& e)
+ {
+ threw = e.what();
+ }
+ CATCH_MISSED_LINUX_EXCEPTION(LLListenerOrPumpName::Empty, threw)
+
+ ensure("threw Empty", !threw.empty());
+}
+
+class TempListener: public Listener
+{
+public:
+ TempListener(const std::string& name, bool& liveFlag) :
+ Listener(name), mLiveFlag(liveFlag)
+ {
+ mLiveFlag = true;
+ }
+
+ virtual ~TempListener()
+ {
+ mLiveFlag = false;
+ }
+
+private:
+ bool& mLiveFlag;
+};
+
+template<> template<>
+void events_object::test<10>()
+{
+ set_test_name("listen(boost::bind(...TempListener...))");
+ // listen() can't do anything about a plain TempListener instance:
+ // it's not managed with shared_ptr, nor is it an LLEventTrackable subclass
+ bool live = false;
+ LLEventPump& heaptest(pumps.obtain("heaptest"));
+ LLBoundListener connection;
+ {
+ TempListener tempListener("temp", live);
+ ensure("TempListener constructed", live);
+ connection = heaptest.listen(tempListener.getName(),
+ boost::bind(&Listener::call,
+ boost::ref(tempListener),
+ _1));
+ heaptest.post(1);
+ check_listener("received", tempListener, 1);
+ } // presumably this will make newListener go away?
+ // verify that
+ ensure("TempListener destroyed", !live);
+ // This is the case against which we can't defend. Don't even try to
+ // post to heaptest -- that would engage Undefined Behavior.
+ // Cautiously inspect connection...
+ ensure("misleadingly connected", connection.connected());
+ // then disconnect by hand.
+ heaptest.stopListening("temp");
+}
+
+template<> template<>
+void events_object::test<11>()
+{
+ set_test_name("listen(boost::bind(...weak_ptr...))");
+ // listen() detecting weak_ptr<TempListener> in boost::bind() object
+ bool live = false;
+ LLEventPump& heaptest(pumps.obtain("heaptest"));
+ LLBoundListener connection;
+ ensure("default state", !connection.connected());
+ {
+ boost::shared_ptr<TempListener> newListener(new TempListener("heap", live));
+ newListener->reset();
+ ensure("TempListener constructed", live);
+ connection = heaptest.listen(newListener->getName(),
+ boost::bind(&Listener::call,
+ weaken(newListener),
+ _1));
+ ensure("new connection", connection.connected());
+ heaptest.post(1);
+ check_listener("received", *newListener, 1);
+ } // presumably this will make newListener go away?
+ // verify that
+ ensure("TempListener destroyed", !live);
+ ensure("implicit disconnect", !connection.connected());
+ // now just make sure we don't blow up trying to access a freed object!
+ heaptest.post(2);
+}
+
+template<> template<>
+void events_object::test<12>()
+{
+ set_test_name("listen(boost::bind(...shared_ptr...))");
+ /*==========================================================================*|
+ // DISABLED because I've made this case produce a compile error.
+ // Following the error leads the disappointed dev to a comment
+ // instructing her to use the weaken() function to bind a weak_ptr<T>
+ // instead of binding a shared_ptr<T>, and explaining why. I know of
+ // no way to use TUT to code a repeatable test in which the expected
+ // outcome is a compile error. The interested reader is invited to
+ // uncomment this block and build to see for herself.
+
+ // listen() detecting shared_ptr<TempListener> in boost::bind() object
+ bool live = false;
+ LLEventPump& heaptest(pumps.obtain("heaptest"));
+ LLBoundListener connection;
+ std::string listenerName("heap");
+ ensure("default state", !connection.connected());
+ {
+ boost::shared_ptr<TempListener> newListener(new TempListener(listenerName, live));
+ ensure_equals("use_count", newListener.use_count(), 1);
+ newListener->reset();
+ ensure("TempListener constructed", live);
+ connection = heaptest.listen(newListener->getName(),
+ boost::bind(&Listener::call, newListener, _1));
+ ensure("new connection", connection.connected());
+ ensure_equals("use_count", newListener.use_count(), 2);
+ heaptest.post(1);
+ check_listener("received", *newListener, 1);
+ } // this should make newListener go away...
+ // Unfortunately, the fact that we've bound a shared_ptr by value into
+ // our LLEventPump means that copy will keep the referenced object alive.
+ ensure("TempListener still alive", live);
+ ensure("still connected", connection.connected());
+ // disconnecting explicitly should delete the TempListener...
+ heaptest.stopListening(listenerName);
#if 0 // however, in my experience, it does not. I don't know why not.
- // Ah: on 2009-02-19, Frank Mori Hess, author of the Boost.Signals2
- // library, stated on the boost-users mailing list:
- // http://www.nabble.com/Re%3A--signals2--review--The-review-of-the-signals2-library-(formerly-thread_safe_signals)-begins-today%2C-Nov-1st-p22102367.html
- // "It will get destroyed eventually. The signal cleans up its slot
- // list little by little during connect/invoke. It doesn't immediately
- // remove disconnected slots from the slot list since other threads
- // might be using the same slot list concurrently. It might be
- // possible to make it immediately reset the shared_ptr owning the
- // slot though, leaving an empty shared_ptr in the slot list, since
- // that wouldn't invalidate any iterators."
- ensure("TempListener destroyed", ! live);
- ensure("implicit disconnect", ! connection.connected());
+ // Ah: on 2009-02-19, Frank Mori Hess, author of the Boost.Signals2
+ // library, stated on the boost-users mailing list:
+ // http://www.nabble.com/Re%3A--signals2--review--The-review-of-the-signals2-library-(formerly-thread_safe_signals)-begins-today%2C-Nov-1st-p22102367.html
+ // "It will get destroyed eventually. The signal cleans up its slot
+ // list little by little during connect/invoke. It doesn't immediately
+ // remove disconnected slots from the slot list since other threads
+ // might be using the same slot list concurrently. It might be
+ // possible to make it immediately reset the shared_ptr owning the
+ // slot though, leaving an empty shared_ptr in the slot list, since
+ // that wouldn't invalidate any iterators."
+ ensure("TempListener destroyed", ! live);
+ ensure("implicit disconnect", ! connection.connected());
#endif // 0
- // now just make sure we don't blow up trying to access a freed object!
- heaptest.post(2);
+ // now just make sure we don't blow up trying to access a freed object!
+ heaptest.post(2);
|*==========================================================================*/
- }
-
- class TempTrackableListener: public TempListener, public LLEventTrackable
- {
- public:
- TempTrackableListener(const std::string& name, bool& liveFlag):
- TempListener(name, liveFlag)
- {}
- };
-
- template<> template<>
- void events_object::test<13>()
- {
- set_test_name("listen(boost::bind(...TempTrackableListener ref...))");
- bool live = false;
- LLEventPump& heaptest(pumps.obtain("heaptest"));
- LLBoundListener connection;
- {
- TempTrackableListener tempListener("temp", live);
- ensure("TempTrackableListener constructed", live);
- connection = heaptest.listen(tempListener.getName(),
- boost::bind(&TempTrackableListener::call,
- boost::ref(tempListener), _1));
- heaptest.post(1);
- check_listener("received", tempListener, 1);
- } // presumably this will make tempListener go away?
- // verify that
- ensure("TempTrackableListener destroyed", ! live);
- ensure("implicit disconnect", ! connection.connected());
- // now just make sure we don't blow up trying to access a freed object!
- heaptest.post(2);
- }
-
- template<> template<>
- void events_object::test<14>()
- {
- set_test_name("listen(boost::bind(...TempTrackableListener pointer...))");
- bool live = false;
- LLEventPump& heaptest(pumps.obtain("heaptest"));
- LLBoundListener connection;
- {
- TempTrackableListener* newListener(new TempTrackableListener("temp", live));
- ensure("TempTrackableListener constructed", live);
- connection = heaptest.listen(newListener->getName(),
- boost::bind(&TempTrackableListener::call,
- newListener, _1));
- heaptest.post(1);
- check_listener("received", *newListener, 1);
- // explicitly destroy newListener
- delete newListener;
- }
- // verify that
- ensure("TempTrackableListener destroyed", ! live);
- ensure("implicit disconnect", ! connection.connected());
- // now just make sure we don't blow up trying to access a freed object!
- heaptest.post(2);
- }
-
- template<> template<>
- void events_object::test<15>()
- {
- // This test ensures that using an LLListenerWrapper subclass doesn't
- // block Boost.Signals2 from recognizing a bound LLEventTrackable
- // subclass.
- set_test_name("listen(llwrap<LLLogListener>(boost::bind(...TempTrackableListener ref...)))");
- bool live = false;
- LLEventPump& heaptest(pumps.obtain("heaptest"));
- LLBoundListener connection;
- {
- TempTrackableListener tempListener("temp", live);
- ensure("TempTrackableListener constructed", live);
- connection = heaptest.listen(tempListener.getName(),
- llwrap<LLLogListener>(
- boost::bind(&TempTrackableListener::call,
- boost::ref(tempListener), _1)));
- heaptest.post(1);
- check_listener("received", tempListener, 1);
- } // presumably this will make tempListener go away?
- // verify that
- ensure("TempTrackableListener destroyed", ! live);
- ensure("implicit disconnect", ! connection.connected());
- // now just make sure we don't blow up trying to access a freed object!
- heaptest.post(2);
- }
-
- class TempSharedListener: public TempListener,
- public boost::enable_shared_from_this<TempSharedListener>
- {
- public:
- TempSharedListener(const std::string& name, bool& liveFlag):
- TempListener(name, liveFlag)
- {}
- };
-
- template<> template<>
- void events_object::test<16>()
- {
- set_test_name("listen(boost::bind(...TempSharedListener ref...))");
+}
+
+class TempTrackableListener: public TempListener, public LLEventTrackable
+{
+public:
+TempTrackableListener(const std::string& name, bool& liveFlag):
+ TempListener(name, liveFlag)
+{}
+};
+
+template<> template<>
+void events_object::test<13>()
+{
+set_test_name("listen(boost::bind(...TempTrackableListener ref...))");
+bool live = false;
+LLEventPump& heaptest(pumps.obtain("heaptest"));
+LLBoundListener connection;
+{
+ TempTrackableListener tempListener("temp", live);
+ ensure("TempTrackableListener constructed", live);
+ connection = heaptest.listen(tempListener.getName(),
+ boost::bind(&TempTrackableListener::call,
+ boost::ref(tempListener), _1));
+ heaptest.post(1);
+ check_listener("received", tempListener, 1);
+} // presumably this will make tempListener go away?
+// verify that
+ensure("TempTrackableListener destroyed", ! live);
+ensure("implicit disconnect", ! connection.connected());
+// now just make sure we don't blow up trying to access a freed object!
+heaptest.post(2);
+}
+
+template<> template<>
+void events_object::test<14>()
+{
+set_test_name("listen(boost::bind(...TempTrackableListener pointer...))");
+bool live = false;
+LLEventPump& heaptest(pumps.obtain("heaptest"));
+LLBoundListener connection;
+{
+ TempTrackableListener* newListener(new TempTrackableListener("temp", live));
+ ensure("TempTrackableListener constructed", live);
+ connection = heaptest.listen(newListener->getName(),
+ boost::bind(&TempTrackableListener::call,
+ newListener, _1));
+ heaptest.post(1);
+ check_listener("received", *newListener, 1);
+ // explicitly destroy newListener
+ delete newListener;
+}
+// verify that
+ensure("TempTrackableListener destroyed", ! live);
+ensure("implicit disconnect", ! connection.connected());
+// now just make sure we don't blow up trying to access a freed object!
+heaptest.post(2);
+}
+
+template<> template<>
+void events_object::test<15>()
+{
+// This test ensures that using an LLListenerWrapper subclass doesn't
+// block Boost.Signals2 from recognizing a bound LLEventTrackable
+// subclass.
+set_test_name("listen(llwrap<LLLogListener>(boost::bind(...TempTrackableListener ref...)))");
+bool live = false;
+LLEventPump& heaptest(pumps.obtain("heaptest"));
+LLBoundListener connection;
+{
+ TempTrackableListener tempListener("temp", live);
+ ensure("TempTrackableListener constructed", live);
+ connection = heaptest.listen(tempListener.getName(),
+ llwrap<LLLogListener>(
+ boost::bind(&TempTrackableListener::call,
+ boost::ref(tempListener), _1)));
+ heaptest.post(1);
+ check_listener("received", tempListener, 1);
+} // presumably this will make tempListener go away?
+// verify that
+ensure("TempTrackableListener destroyed", ! live);
+ensure("implicit disconnect", ! connection.connected());
+// now just make sure we don't blow up trying to access a freed object!
+heaptest.post(2);
+}
+
+class TempSharedListener: public TempListener,
+public boost::enable_shared_from_this<TempSharedListener>
+{
+public:
+TempSharedListener(const std::string& name, bool& liveFlag):
+ TempListener(name, liveFlag)
+{}
+};
+
+template<> template<>
+void events_object::test<16>()
+{
+ set_test_name("listen(boost::bind(...TempSharedListener ref...))");
#if 0
- bool live = false;
- LLEventPump& heaptest(pumps.obtain("heaptest"));
- LLBoundListener connection;
- {
- // We MUST have at least one shared_ptr to an
- // enable_shared_from_this subclass object before
- // shared_from_this() can work.
- boost::shared_ptr<TempSharedListener>
- tempListener(new TempSharedListener("temp", live));
- ensure("TempSharedListener constructed", live);
- // However, we're not passing either the shared_ptr or its
- // corresponding weak_ptr -- instead, we're passing a reference to
- // the TempSharedListener.
+bool live = false;
+LLEventPump& heaptest(pumps.obtain("heaptest"));
+LLBoundListener connection;
+{
+ // We MUST have at least one shared_ptr to an
+ // enable_shared_from_this subclass object before
+ // shared_from_this() can work.
+ boost::shared_ptr<TempSharedListener>
+ tempListener(new TempSharedListener("temp", live));
+ ensure("TempSharedListener constructed", live);
+ // However, we're not passing either the shared_ptr or its
+ // corresponding weak_ptr -- instead, we're passing a reference to
+ // the TempSharedListener.
/*==========================================================================*|
- std::cout << "Capturing const ref" << std::endl;
- const boost::enable_shared_from_this<TempSharedListener>& cref(*tempListener);
- std::cout << "Capturing const ptr" << std::endl;
- const boost::enable_shared_from_this<TempSharedListener>* cp(&cref);
- std::cout << "Capturing non-const ptr" << std::endl;
- boost::enable_shared_from_this<TempSharedListener>* p(const_cast<boost::enable_shared_from_this<TempSharedListener>*>(cp));
- std::cout << "Capturing shared_from_this()" << std::endl;
- boost::shared_ptr<TempSharedListener> sp(p->shared_from_this());
- std::cout << "Capturing weak_ptr" << std::endl;
- boost::weak_ptr<TempSharedListener> wp(weaken(sp));
- std::cout << "Binding weak_ptr" << std::endl;
+ std::cout << "Capturing const ref" << std::endl;
+ const boost::enable_shared_from_this<TempSharedListener>& cref(*tempListener);
+ std::cout << "Capturing const ptr" << std::endl;
+ const boost::enable_shared_from_this<TempSharedListener>* cp(&cref);
+ std::cout << "Capturing non-const ptr" << std::endl;
+ boost::enable_shared_from_this<TempSharedListener>* p(const_cast<boost::enable_shared_from_this<TempSharedListener>*>(cp));
+ std::cout << "Capturing shared_from_this()" << std::endl;
+ boost::shared_ptr<TempSharedListener> sp(p->shared_from_this());
+ std::cout << "Capturing weak_ptr" << std::endl;
+ boost::weak_ptr<TempSharedListener> wp(weaken(sp));
+ std::cout << "Binding weak_ptr" << std::endl;
|*==========================================================================*/
- connection = heaptest.listen(tempListener->getName(),
- boost::bind(&TempSharedListener::call, *tempListener, _1));
- heaptest.post(1);
- check_listener("received", *tempListener, 1);
- } // presumably this will make tempListener go away?
- // verify that
- ensure("TempSharedListener destroyed", ! live);
- ensure("implicit disconnect", ! connection.connected());
- // now just make sure we don't blow up trying to access a freed object!
- heaptest.post(2);
+ connection = heaptest.listen(tempListener->getName(),
+ boost::bind(&TempSharedListener::call, *tempListener, _1));
+ heaptest.post(1);
+ check_listener("received", *tempListener, 1);
+} // presumably this will make tempListener go away?
+// verify that
+ensure("TempSharedListener destroyed", ! live);
+ensure("implicit disconnect", ! connection.connected());
+// now just make sure we don't blow up trying to access a freed object!
+heaptest.post(2);
#endif // 0
- }
+}
} // namespace tut
diff --git a/indra/test/llhttpclient_tut.cpp b/indra/test/llhttpclient_tut.cpp
index 03759001ae..4b4046632c 100644
--- a/indra/test/llhttpclient_tut.cpp
+++ b/indra/test/llhttpclient_tut.cpp
@@ -40,6 +40,7 @@
#include "llhttpclient.h"
#include "llformat.h"
#include "llpipeutil.h"
+#include "llproxy.h"
#include "llpumpio.h"
#include "llsdhttpserver.h"
@@ -85,9 +86,10 @@ namespace tut
HTTPClientTestData()
{
apr_pool_create(&mPool, NULL);
+ LLCurl::initClass(false);
mServerPump = new LLPumpIO(mPool);
mClientPump = new LLPumpIO(mPool);
-
+
LLHTTPClient::setPump(*mClientPump);
}
@@ -95,6 +97,7 @@ namespace tut
{
delete mServerPump;
delete mClientPump;
+ LLProxy::cleanupClass();
apr_pool_destroy(mPool);
}
diff --git a/indra/test/llsd_new_tut.cpp b/indra/test/llsd_new_tut.cpp
index dd93b36f04..f928a1bad0 100644
--- a/indra/test/llsd_new_tut.cpp
+++ b/indra/test/llsd_new_tut.cpp
@@ -5,7 +5,7 @@
*
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2006-2011, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,7 @@
* $/LicenseInfo$
*/
+#define LLSD_DEBUG_INFO
#include <tut/tut.hpp>
#include "linden_common.h"
#include "lltut.h"
@@ -32,6 +33,19 @@
#include "llsdtraits.h"
#include "llstring.h"
+#if LL_WINDOWS
+#include <float.h>
+namespace
+{
+ int fpclassify(double x)
+ {
+ return _fpclass(x);
+ }
+}
+#else
+using std::fpclassify;
+#endif
+
namespace tut
{
class SDCleanupCheck
@@ -39,11 +53,11 @@ namespace tut
private:
U32 mOutstandingAtStart;
public:
- SDCleanupCheck() : mOutstandingAtStart(LLSD::outstandingCount()) { }
+ SDCleanupCheck() : mOutstandingAtStart(llsd::outstandingCount()) { }
~SDCleanupCheck()
{
ensure_equals("SDCleanupCheck",
- LLSD::outstandingCount(), mOutstandingAtStart);
+ llsd::outstandingCount(), mOutstandingAtStart);
}
};
@@ -57,12 +71,12 @@ namespace tut
SDAllocationCheck(const std::string& message, int expectedAllocations)
: mMessage(message),
mExpectedAllocations(expectedAllocations),
- mAllocationAtStart(LLSD::allocationCount())
+ mAllocationAtStart(llsd::allocationCount())
{ }
~SDAllocationCheck()
{
ensure_equals(mMessage + " SDAllocationCheck",
- LLSD::allocationCount() - mAllocationAtStart,
+ llsd::allocationCount() - mAllocationAtStart,
mExpectedAllocations);
}
};
@@ -218,19 +232,16 @@ namespace tut
}
else
{
-// TODO: Fix on windows....
-#ifndef LL_WINDOWS
-# if !defined(fpclassify) && __GNUC__ >= 3
-# define FPCLASSIFY_NAMESPACE std::
-# else
-# define FPCLASSIFY_NAMESPACE
-# endif
- int left = FPCLASSIFY_NAMESPACE fpclassify(v.asReal());
- int right = FPCLASSIFY_NAMESPACE fpclassify(eReal);
+ int left = fpclassify(v.asReal());
+ int right = fpclassify(eReal);
ensure_equals(s+" to real", left, right);
- ensure_equals(s+" to string", v.asString(), eString);
-#endif
+ // ensure_equals(s+" to string", v.asString(), eString);
+ // I've commented this check out, since there doesn't
+ // seem to be uniform string representation for NaN on
+ // all platforms. For example, on my Ubuntu 8.10 laptop
+ // with libc 2.11.1, sqrt(-1.0) will return '-nan', not
+ // 'nan'.
}
}
@@ -742,6 +753,78 @@ namespace tut
LLSD w = v;
w = "nice day";
}
+
+ {
+ SDAllocationCheck check("shared values test for threaded work", 9);
+
+ //U32 start_llsd_count = llsd::outstandingCount();
+
+ LLSD m = LLSD::emptyMap();
+
+ m["one"] = 1;
+ m["two"] = 2;
+ m["one_copy"] = m["one"]; // 3 (m, "one" and "two")
+
+ m["undef_one"] = LLSD();
+ m["undef_two"] = LLSD();
+ m["undef_one_copy"] = m["undef_one"];
+
+ { // Ensure first_array gets freed to avoid counting it
+ LLSD first_array = LLSD::emptyArray();
+ first_array.append(1.0f);
+ first_array.append(2.0f);
+ first_array.append(3.0f); // 7
+
+ m["array"] = first_array;
+ m["array_clone"] = first_array;
+ m["array_copy"] = m["array"]; // 7
+ }
+
+ m["string_one"] = "string one value";
+ m["string_two"] = "string two value";
+ m["string_one_copy"] = m["string_one"]; // 9
+
+ //U32 llsd_object_count = llsd::outstandingCount();
+ //std::cout << "Using " << (llsd_object_count - start_llsd_count) << " LLSD objects" << std::endl;
+
+ //m.dumpStats();
+ }
+
+ {
+ SDAllocationCheck check("shared values test for threaded work", 9);
+
+ //U32 start_llsd_count = LLSD::outstandingCount();
+
+ LLSD m = LLSD::emptyMap();
+
+ m["one"] = 1;
+ m["two"] = 2;
+ m["one_copy"] = m["one"]; // 3 (m, "one" and "two")
+
+ m["undef_one"] = LLSD();
+ m["undef_two"] = LLSD();
+ m["undef_one_copy"] = m["undef_one"];
+
+ { // Ensure first_array gets freed to avoid counting it
+ LLSD first_array = LLSD::emptyArray();
+ first_array.append(1.0f);
+ first_array.append(2.0f);
+ first_array.append(3.0f); // 7
+
+ m["array"] = first_array;
+ m["array_clone"] = first_array;
+ m["array_copy"] = m["array"]; // 7
+ }
+
+ m["string_one"] = "string one value";
+ m["string_two"] = "string two value";
+ m["string_one_copy"] = m["string_one"]; // 9
+
+ //U32 llsd_object_count = LLSD::outstandingCount();
+ //std::cout << "Using " << (llsd_object_count - start_llsd_count) << " LLSD objects" << std::endl;
+
+ //m.dumpStats();
+ }
}
template<> template<>
@@ -769,4 +852,3 @@ namespace tut
test serializations
*/
}
-
diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp
index cc6f78decd..be0692557a 100644
--- a/indra/test/llsdmessagebuilder_tut.cpp
+++ b/indra/test/llsdmessagebuilder_tut.cpp
@@ -33,6 +33,7 @@
#include "llsdmessagebuilder.h"
#include "llsdmessagereader.h"
#include "llsdtraits.h"
+#include "llmath.h"
#include "llquaternion.h"
#include "u64.h"
#include "v3dmath.h"
@@ -86,17 +87,17 @@ namespace tut
return createTemplateBlock(_PREHASH_Test0, type, size, block);
}
- static LLMessageBlock* createTemplateBlock(char* name, const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE)
+ static LLMessageBlock* createTemplateBlock(const char* name, const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE)
{
LLMessageBlock* result = new LLMessageBlock(name, block);
if(type != MVT_NULL)
{
- result->addVariable(_PREHASH_Test0, type, size);
+ result->addVariable(const_cast<char*>(_PREHASH_Test0), type, size);
}
return result;
}
- static LLTemplateMessageBuilder* defaultTemplateBuilder(LLMessageTemplate& messageTemplate, char* name = _PREHASH_Test0)
+ static LLTemplateMessageBuilder* defaultTemplateBuilder(LLMessageTemplate& messageTemplate, char* name = const_cast<char*>(_PREHASH_Test0))
{
templateNameMap[_PREHASH_TestMessage] = &messageTemplate;
LLTemplateMessageBuilder* builder = new LLTemplateMessageBuilder(templateNameMap);
diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp
index 09beb53869..6e1c82bb24 100644
--- a/indra/test/lltemplatemessagebuilder_tut.cpp
+++ b/indra/test/lltemplatemessagebuilder_tut.cpp
@@ -31,6 +31,7 @@
#include "llapr.h"
#include "llmessagetemplate.h"
+#include "llmath.h"
#include "llquaternion.h"
#include "lltemplatemessagebuilder.h"
#include "lltemplatemessagereader.h"
@@ -75,7 +76,7 @@ namespace tut
static LLMessageBlock* defaultBlock(const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE)
{
- return createBlock(_PREHASH_Test0, type, size, block);
+ return createBlock(const_cast<char*>(_PREHASH_Test0), type, size, block);
}
static LLMessageBlock* createBlock(char* name, const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE)
@@ -83,12 +84,12 @@ namespace tut
LLMessageBlock* result = new LLMessageBlock(name, block);
if(type != MVT_NULL)
{
- result->addVariable(_PREHASH_Test0, type, size);
+ result->addVariable(const_cast<char*>(_PREHASH_Test0), type, size);
}
return result;
}
- static LLTemplateMessageBuilder* defaultBuilder(LLMessageTemplate& messageTemplate, char* name = _PREHASH_Test0)
+ static LLTemplateMessageBuilder* defaultBuilder(LLMessageTemplate& messageTemplate, char* name = const_cast<char*>(_PREHASH_Test0))
{
nameMap[_PREHASH_TestMessage] = &messageTemplate;
LLTemplateMessageBuilder* builder = new LLTemplateMessageBuilder(nameMap);
@@ -403,11 +404,11 @@ namespace tut
// build template: Test0 before Test1
LLMessageTemplate messageTemplate = defaultTemplate();
- messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE));
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE));
// build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb
- LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, _PREHASH_Test0);
+ LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0));
builder->addU32(_PREHASH_Test0, 0xaaaa);
builder->nextBlock(_PREHASH_Test1);
builder->addU32(_PREHASH_Test0, 0xbbbb);
@@ -416,11 +417,11 @@ namespace tut
// build template: Test1 before Test0
messageTemplate = defaultTemplate();
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE));
- messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE));
// build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb
- builder = defaultBuilder(messageTemplate, _PREHASH_Test1);
+ builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test1));
builder->addU32(_PREHASH_Test0, 0xaaaa);
builder->nextBlock(_PREHASH_Test0);
builder->addU32(_PREHASH_Test0, 0xbbbb);
@@ -443,11 +444,11 @@ namespace tut
// build template: Test0 before Test1
LLMessageTemplate messageTemplate = defaultTemplate();
- messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE));
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE));
// build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb
- LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, _PREHASH_Test0);
+ LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0));
builder->addU32(_PREHASH_Test0, 0xaaaa);
builder->nextBlock(_PREHASH_Test1);
builder->addU32(_PREHASH_Test0, 0xbbbb);
@@ -455,7 +456,7 @@ namespace tut
delete builder;
// build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb
- builder = defaultBuilder(messageTemplate, _PREHASH_Test1);
+ builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test1));
builder->addU32(_PREHASH_Test0, 0xbbbb);
builder->nextBlock(_PREHASH_Test0);
builder->addU32(_PREHASH_Test0, 0xaaaa);
@@ -478,21 +479,21 @@ namespace tut
// Build template: Test0 only
LLMessageTemplate messageTemplate = defaultTemplate();
- messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE));
// Build message
- LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, _PREHASH_Test0);
+ LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0));
builder->addU32(_PREHASH_Test0, 0xaaaa);
bufferSize1 = builder->buildMessage(buffer1, MAX_BUFFER_SIZE, 0);
delete builder;
// Build template: Test0 before Test1
messageTemplate = defaultTemplate();
- messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE));
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE));
// Build message
- builder = defaultBuilder(messageTemplate, _PREHASH_Test0);
+ builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0));
builder->addU32(_PREHASH_Test0, 0xaaaa);
builder->nextBlock(_PREHASH_Test1);
builder->addU32(_PREHASH_Test0, 0xbbbb);
@@ -511,8 +512,8 @@ namespace tut
U32 inTest00 = 0, inTest01 = 1, inTest1 = 2;
U32 outTest00, outTest01, outTest1;
LLMessageTemplate messageTemplate = defaultTemplate();
- messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4));
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4));
LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate);
builder->addU32(_PREHASH_Test0, inTest00);
builder->nextBlock(_PREHASH_Test0);
@@ -536,15 +537,15 @@ namespace tut
U32 inTest = 1, outTest;
LLMessageTemplate messageTemplate = defaultTemplate();
messageTemplate.addBlock(
- createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE));
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4));
+ createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4));
LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate);
builder->addU32(_PREHASH_Test0, inTest);
LLTemplateMessageReader* reader = setReader(messageTemplate, builder);
reader->getU32(_PREHASH_Test0, _PREHASH_Test0, outTest);
- S32 blockCount = reader->getNumberOfBlocks(_PREHASH_Test1);
+ S32 blockCount = reader->getNumberOfBlocks(const_cast<char*>(_PREHASH_Test1));
ensure_equals("Ensure block count", blockCount, 0);
ensure_equals("Ensure Test0", inTest, outTest);
delete reader;
@@ -556,7 +557,7 @@ namespace tut
{
// build template
LLMessageTemplate messageTemplate = defaultTemplate();
- messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4));
// build message
LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate);
@@ -881,7 +882,7 @@ namespace tut
delete builder;
// add block to reader template
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE));
// read message value and default value
numberMap[1] = &messageTemplate;
@@ -914,7 +915,7 @@ namespace tut
delete builder;
// add variable block to reader template
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4));
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4));
// read message value and check block repeat count
numberMap[1] = &messageTemplate;
@@ -947,7 +948,7 @@ namespace tut
delete builder;
// add variable block to reader template
- messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_VARIABLE, 4,
+ messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_VARIABLE, 4,
MBT_SINGLE));
// read message value and default string
diff --git a/indra/test/lltut.cpp b/indra/test/lltut.cpp
index da7031b52a..c43a8f0c7d 100644
--- a/indra/test/lltut.cpp
+++ b/indra/test/lltut.cpp
@@ -34,6 +34,7 @@
#include "llformat.h"
#include "llsd.h"
#include "lluri.h"
+#include "stringize.h"
namespace tut
{
@@ -144,6 +145,10 @@ namespace tut
}
return;
}
+ default:
+ // should never get here, but compiler produces warning if we
+ // don't cover this case, and at Linden warnings are fatal.
+ throw failure(STRINGIZE("invalid type field " << actual.type()));
}
}
diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt
index 0e288bb496..ef82290b47 100644
--- a/indra/viewer_components/updater/CMakeLists.txt
+++ b/indra/viewer_components/updater/CMakeLists.txt
@@ -17,8 +17,8 @@ include_directories(
${LLCOMMON_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
${LLPLUGIN_INCLUDE_DIRS}
- ${LLVFS_INCLUDE_DIRS}
- ${CURL_INCLUDE_DIRS}
+ ${LLVFS_INCLUDE_DIRS}
+ ${CURL_INCLUDE_DIRS}
)
set(updater_service_SOURCE_FILES
@@ -51,7 +51,7 @@ target_link_libraries(llupdaterservice
${LLCOMMON_LIBRARIES}
${LLMESSAGE_LIBRARIES}
${LLPLUGIN_LIBRARIES}
- ${LLVFS_LIBRARIES}
+ ${LLVFS_LIBRARIES}
)
if(LL_TESTS)
diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install
index 6a95f96d86..e7f36dc5a3 100644
--- a/indra/viewer_components/updater/scripts/darwin/update_install
+++ b/indra/viewer_components/updater/scripts/darwin/update_install
@@ -6,5 +6,5 @@
#
cd "$(dirname "$0")"
-(../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2"; if [ $? -ne 0 ]; then echo $3 >> "$2"; fi;) &
+(../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer"; if [ $? -ne 0 ]; then echo $3 >> "$2"; fi;) &
exit 0
diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install
index 88451340ec..e0505a9f72 100644
--- a/indra/viewer_components/updater/scripts/linux/update_install
+++ b/indra/viewer_components/updater/scripts/linux/update_install
@@ -1,7 +1,7 @@
#! /bin/bash
INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd)
export LD_LIBRARY_PATH="$INSTALL_DIR/lib"
-bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer 2" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml"
+bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml"
if [ $? -ne 0 ]
then echo $3 >> "$2"
diff --git a/indra/win_crash_logger/CMakeLists.txt b/indra/win_crash_logger/CMakeLists.txt
index 990dc6783e..5329c89554 100644
--- a/indra/win_crash_logger/CMakeLists.txt
+++ b/indra/win_crash_logger/CMakeLists.txt
@@ -89,4 +89,4 @@ if (WINDOWS)
)
endif (WINDOWS)
-ll_deploy_sharedlibs_command(windows-crash-logger) \ No newline at end of file
+ll_deploy_sharedlibs_command(windows-crash-logger)
diff --git a/indra/win_crash_logger/StdAfx.h b/indra/win_crash_logger/StdAfx.h
index ce70fe2994..35976658ac 100644
--- a/indra/win_crash_logger/StdAfx.h
+++ b/indra/win_crash_logger/StdAfx.h
@@ -38,7 +38,6 @@
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-
// Windows Header Files:
#include <windows.h>
diff --git a/indra/win_crash_logger/llcrashloggerwindows.cpp b/indra/win_crash_logger/llcrashloggerwindows.cpp
index 51ff754c27..36d988ead7 100644
--- a/indra/win_crash_logger/llcrashloggerwindows.cpp
+++ b/indra/win_crash_logger/llcrashloggerwindows.cpp
@@ -296,6 +296,7 @@ void LLCrashLoggerWindows::gatherPlatformSpecificFiles()
bool LLCrashLoggerWindows::mainLoop()
{
+ llinfos << "CrashSubmitBehavior is " << mCrashBehavior << llendl;
// Note: parent hwnd is 0 (the desktop). No dlg proc. See Petzold (5th ed) HexCalc example, Chapter 11, p529
// win_crash_logger.rc has been edited by hand.
@@ -308,6 +309,7 @@ bool LLCrashLoggerWindows::mainLoop()
if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
{
+ llinfos << "Showing crash report submit progress window." << llendl;
ShowWindow(gHwndProgress, SW_SHOW );
sendCrashLogs();
}
@@ -354,7 +356,7 @@ bool LLCrashLoggerWindows::mainLoop()
void LLCrashLoggerWindows::updateApplication(const std::string& message)
{
- LLCrashLogger::updateApplication();
+ LLCrashLogger::updateApplication(message);
if(!message.empty()) show_progress(message);
update_messages();
}
@@ -368,8 +370,6 @@ bool LLCrashLoggerWindows::cleanup()
sleep_and_pump_messages(3);
}
PostQuitMessage(0);
+ commonCleanup();
return true;
}
-
-
-
diff --git a/indra/win_crash_logger/llcrashloggerwindows.h b/indra/win_crash_logger/llcrashloggerwindows.h
index 24c564457c..5c45a998b3 100644
--- a/indra/win_crash_logger/llcrashloggerwindows.h
+++ b/indra/win_crash_logger/llcrashloggerwindows.h
@@ -41,7 +41,6 @@ public:
virtual void updateApplication(const std::string& message = LLStringUtil::null);
virtual bool cleanup();
virtual void gatherPlatformSpecificFiles();
- //void annotateCallStack();
void setHandle(HINSTANCE hInst) { mhInst = hInst; }
private:
void ProcessDlgItemText(HWND hWnd, int nIDDlgItem);
diff --git a/indra/win_crash_logger/win_crash_logger.cpp b/indra/win_crash_logger/win_crash_logger.cpp
index 5c22053317..8e916ae437 100644
--- a/indra/win_crash_logger/win_crash_logger.cpp
+++ b/indra/win_crash_logger/win_crash_logger.cpp
@@ -24,51 +24,30 @@
* $/LicenseInfo$
*/
-// win_crash_logger.cpp : Defines the entry point for the application.
-//
-
-// Must be first include, precompiled headers.
#include "linden_common.h"
-
#include "stdafx.h"
-
#include <stdlib.h>
-
#include "llcrashloggerwindows.h"
-
-
-//
-// Implementation
-//
-
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
- llinfos << "Starting crash reporter" << llendl;
+ llinfos << "Starting crash reporter." << llendl;
LLCrashLoggerWindows app;
app.setHandle(hInstance);
- bool ok = app.init();
- if(!ok)
+ app.parseCommandOptions(__argc, __argv);
+
+ if (! app.init())
{
llwarns << "Unable to initialize application." << llendl;
return -1;
}
- // Run the application main loop
- if(!LLApp::isQuitting()) app.mainLoop();
-
- if (!app.isError())
- {
- //
- // We don't want to do cleanup here if the error handler got called -
- // the assumption is that the error handler is responsible for doing
- // app cleanup if there was a problem.
- //
- app.cleanup();
- }
+ app.mainLoop();
+ app.cleanup();
+ llinfos << "Crash reporter finished normally." << llendl;
return 0;
}