#include "llviewerprecompiledheaders.h"
#include "llappviewer.h"
#include "llprimitive.h"
#include "llversionviewer.h"
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "llalertdialog.h"
#include "llerrorcontrol.h"
#include "llviewerimagelist.h"
#include "llgroupmgr.h"
#include "llagent.h"
#include "llwindow.h"
#include "llviewerstats.h"
#include "llmd5.h"
#include "llpumpio.h"
#include "llimpanel.h"
#include "llmimetypes.h"
#include "llstartup.h"
#include "llfocusmgr.h"
#include "llviewerjoystick.h"
#include "llfloaterjoystick.h"
#include "llares.h"
#include "llcurl.h"
#include "llfloatersnapshot.h"
#include "llviewerwindow.h"
#include "llviewerdisplay.h"
#include "llviewermessage.h"
#include "llviewerobjectlist.h"
#include "llworldmap.h"
#include "llmutelist.h"
#include "llurldispatcher.h"
#include "llurlhistory.h"
#include "llfirstuse.h"
#include "llglimmediate.h"
#include "llweb.h"
#include "llsecondlifeurls.h"
#include <boost/bind.hpp>
#include <sys/file.h>
#include "llnotify.h"
#include "llviewerkeyboard.h"
#include "lllfsthread.h"
#include "llworkerthread.h"
#include "lltexturecache.h"
#include "lltexturefetch.h"
#include "llimageworker.h"
#include "llkeyframemotion.h"
#include "llhudmanager.h"
#include "lltoolmgr.h"
#include "llassetstorage.h"
#include "llpolymesh.h"
#include "llcachename.h"
#include "audioengine.h"
#include "llviewermenu.h"
#include "llselectmgr.h"
#include "lltrans.h"
#include "lltracker.h"
#include "llviewerparcelmgr.h"
#include "llworldmapview.h"
#include "llpostprocess.h"
#include "llwlparammanager.h"
#include "llwaterparammanager.h"
#include "lldebugview.h"
#include "llconsole.h"
#include "llcontainerview.h"
#include "llfloaterstats.h"
#include "llhoverview.h"
#include "llsdserialize.h"
#include "llworld.h"
#include "llhudeffecttrail.h"
#include "llvectorperfoptions.h"
#include "llurlsimstring.h"
#include "llwatchdog.h"
#include "llbutton.h"
#include "llcombobox.h"
#include "llstatusbar.h"
#include "llsurface.h"
#include "llvosky.h"
#include "llvotree.h"
#include "llvoavatar.h"
#include "llfolderview.h"
#include "lltoolbar.h"
#include "llframestats.h"
#include "llagentpilot.h"
#include "llsrv.h"
#include "llvovolume.h"
#include "llflexibleobject.h"
#include "llvosurfacepatch.h"
#include "llviewercontrol.h"
#include "lleventnotifier.h"
#include "llcallbacklist.h"
#include "pipeline.h"
#include "llgesturemgr.h"
#include "llsky.h"
#include "llvlmanager.h"
#include "llviewercamera.h"
#include "lldrawpoolbump.h"
#include "llvieweraudio.h"
#include "llimview.h"
#include "llviewerthrottle.h"
#include "llparcel.h"
#include "llinventoryview.h"
#include "llcommandlineparser.h"
#include "llviewernetwork.h"
Go to the source code of this file.
Copyright (c) 2007-2008, Linden Research, Inc.
Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.
ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$
Definition in file llappviewer.cpp.
#define CHECK_MESSAGES_DEFAULT_MAX_TIME .020f |
#define LL_DYNAMIC_FONT_DISCOVERY 0 |
Definition at line 169 of file llappviewer.cpp.
#define TIME_THROTTLE_MESSAGES |
Definition at line 3524 of file llappviewer.cpp.
void disable_win_error_reporting | ( | ) |
void errorCallback | ( | const std::string & | error_string | ) |
Definition at line 1419 of file llappviewer.cpp.
References LLError::crashAndLoop(), gLLErrorActivated, OSMB_OK, and OSMessageBox().
Referenced by LLAppViewer::initLogging().
void finish_disconnect | ( | S32 | option, | |
void * | userdata | |||
) |
Definition at line 2880 of file llappviewer.cpp.
References LLAppViewer::forceQuit(), and LLAppViewer::instance().
Referenced by LLAppViewer::forceDisconnect().
static void finish_early_exit | ( | S32 | option, | |
void * | userdata | |||
) | [static] |
Definition at line 2551 of file llappviewer.cpp.
References LLAppViewer::forceQuit(), and LLAppViewer::instance().
Referenced by LLAppViewer::earlyExit().
void finish_forced_disconnect | ( | S32 | , | |
void * | ||||
) |
Definition at line 2889 of file llappviewer.cpp.
References LLAppViewer::forceQuit(), and LLAppViewer::instance().
Referenced by LLAppViewer::forceDisconnect().
static void finish_quit | ( | S32 | option, | |
void * | userdata | |||
) | [static] |
Definition at line 2538 of file llappviewer.cpp.
References LLAppViewer::instance(), and LLAppViewer::requestQuit().
Referenced by LLAppViewer::userQuit().
void idle_afk_check | ( | ) |
Definition at line 332 of file llappviewer.cpp.
References gAgent, gAllowIdleAFK, gAwayTriggerTimer, LLFrameTimer::getElapsedTimeF32(), LLControlGroup::getF32(), gSavedSettings, and LLAgent::setAFK().
Referenced by LLAppViewer::idle().
void initGridChoice | ( | ) |
Definition at line 467 of file llappviewer.cpp.
References LLStringBase< char >::compareInsensitive(), LLControlGroup::getS32(), LLControlGroup::getString(), gGridChoice, gGridInfo, gGridName, GRID_INFO_COUNT, GRID_INFO_LOCAL, GRID_INFO_NONE, GRID_INFO_OTHER, GridDefaultChoice, gSavedSettings, llclamp(), llformat(), LOOPBACK_ADDRESS_STRING, LLGridData::mName, S32, and LLControlGroup::setString().
Referenced by LLAppViewer::initConfiguration().
void request_initial_instant_messages | ( | ) |
Definition at line 351 of file llappviewer.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_RetrieveInstantMessages, _PREHASH_SessionID, LLMessageSystem::addUUIDFast(), FALSE, gAgent, LLAgent::getAvatarObject(), LLAgent::getID(), LLMuteList::getInstance(), LLAgent::getSessionID(), gMessageSystem, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLAgent::sendReliableMessage(), and TRUE.
Referenced by LLAppViewer::idle().
bool send_url_to_other_instance | ( | const std::string & | url | ) |
Definition at line 536 of file llappviewer.cpp.
References lldebugs, llendl, NULL, and S32.
Referenced by LLAppViewer::initConfiguration().
static void settings_modify | ( | ) | [static] |
Definition at line 420 of file llappviewer.cpp.
References FALSE, gDebugGL, gDebugPipeline, LLControlGroup::getBOOL(), LLControlGroup::getF32(), gSavedSettings, gSysCPU, LLCPUInfo::hasAltivec(), LLCPUInfo::hasSSE(), LLCPUInfo::hasSSE2(), LLControlGroup::setBOOL(), LLControlGroup::setU32(), LLVOSurfacePatch::sLODFactor, LLRenderTarget::sUseFBO, LLVOAvatar::sUseImpostors, and TRUE.
Referenced by LLAppViewer::init().
static void settings_to_globals | ( | ) | [static] |
Definition at line 374 of file llappviewer.cpp.
References BTN_HEIGHT, BTN_HEIGHT_SMALL, gAgent, gAgentPilot, gAllowIdleAFK, gAllowTapTapHoldRun, gDebugWindowProc, LLControlGroup::getBOOL(), LLControlGroup::getF32(), LLControlGroup::getS32(), LLControlGroup::getU32(), gFrameStats, gHandleKeysAsync, gMapScale, gMiniMapScale, gSavedSettings, gShowObjectUpdates, LLBUTTON_H_PAD, LLBUTTON_V_PAD, LLCOMBOBOX_HEIGHT, LLCOMBOBOX_WIDTH, llmax(), MENU_BAR_HEIGHT, MENU_BAR_WIDTH, LLAgent::mHideGroupTitle, LLAgentPilot::mNumRuns, LLAgentPilot::mQuitAfterRuns, LLFolderView::sAutoOpenTime, LLVOVolume::sDistanceFactor, LLSurface::setTextureSize(), LLFrameStats::setTrackStats(), LLImageGL::sGlobalUseAnisotropic, LLToolBar::sInventoryAutoOpenTime, LLVOAvatar::sLODFactor, LLVOVolume::sLODFactor, LLVOAvatar::sMaxVisible, LLSelectMgr::sRectSelectInclusive, LLSelectMgr::sRenderHiddenSelections, LLSelectMgr::sRenderLightRadius, LLHoverView::sShowHoverTips, STATUS_BAR_HEIGHT, LLVOTree::sTreeFactor, LLVolumeImplFlexible::sUpdateFactor, and LLVOAvatar::sVisibleInFirstPerson.
Referenced by LLAppViewer::init().
static void ui_audio_callback | ( | const LLUUID & | uuid | ) | [static] |
Definition at line 342 of file llappviewer.cpp.
References gAgent, gAudiop, LLControlGroup::getBOOL(), LLControlGroup::getF32(), LLAgent::getID(), gSavedSettings, and LLAudioEngine::triggerSound().
Referenced by LLAppViewer::init().
F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME [static] |
Definition at line 3528 of file llappviewer.cpp.
const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f |
Definition at line 232 of file llappviewer.cpp.
const char* ERROR_MARKER_FILE_NAME = "SecondLife.error_marker" |
Definition at line 311 of file llappviewer.cpp.
Referenced by LLAppViewer::handleViewerCrash(), and LLAppViewer::initMarkerFile().
BOOL gAcceptCriticalMessage = FALSE |
Definition at line 247 of file llappviewer.cpp.
Referenced by idle_startup(), and LLFloaterTOS::onContinue().
BOOL gAcceptTOS = FALSE |
Definition at line 246 of file llappviewer.cpp.
Referenced by idle_startup(), and LLFloaterTOS::onContinue().
BOOL gAllowIdleAFK = TRUE |
Definition at line 241 of file llappviewer.cpp.
Referenced by LLAppViewer::cleanupSavedSettings(), LLViewerWindow::handleActivate(), idle_afk_check(), init_debug_avatar_menu(), and settings_to_globals().
BOOL gAllowTapTapHoldRun = TRUE |
Definition at line 242 of file llappviewer.cpp.
Referenced by agent_handle_doubletap_run(), LLAppViewer::cleanupSavedSettings(), init_debug_avatar_menu(), and settings_to_globals().
Definition at line 308 of file llappviewer.cpp.
BOOL gCrashOnStartup = FALSE |
Definition at line 303 of file llappviewer.cpp.
Referenced by LLAppViewer::initConfiguration(), and LLAppViewer::initWindow().
BOOL gDisconnected = FALSE |
Definition at line 275 of file llappviewer.cpp.
Referenced by LLInventoryModel::backgroundFetch(), LLInventoryModel::bulkFetch(), LLAgent::cameraZoomIn(), LLAppViewer::disconnectViewer(), display(), handle_focus(), LLViewerWindow::handleMouseDown(), LLNetMap::handleToolTip(), LLAppViewer::idle(), render_disconnected_background(), render_hud_attachments(), render_ui_and_swap(), send_agent_update(), LLAgent::sendMessage(), LLAgent::sendReliableMessage(), LLInventoryView::showAgentInventory(), and LLVoiceClient::stateMachine().
BOOL gDoDisconnect = FALSE [static] |
Definition at line 314 of file llappviewer.cpp.
Referenced by LLAppViewer::earlyExit(), LLAppViewer::forceDisconnect(), LLAppViewer::idleNetwork(), and LLAppViewer::mainLoop().
Definition at line 267 of file llappviewer.cpp.
Referenced by LLViewerWindow::handleFocus(), LLViewerWindow::handleFocusLost(), idle_startup(), and send_stats().
F32 gFPSClamped = 10.f |
Definition at line 262 of file llappviewer.cpp.
Referenced by LLAgent::autoPilot(), LLManipTranslate::handleHover(), LLToolGrab::handleHoverActive(), LLToolGrab::handleHoverInactive(), LLAppViewer::idle(), LLToolBrushLand::modifyLandAtPointGlobal(), LLAgent::updateCamera(), and LLVOAvatar::updateHeadOffset().
U32 gFrameCount = 0 |
Definition at line 253 of file llappviewer.cpp.
Referenced by display(), LLAppViewer::idle(), idle_startup(), LLAppViewer::idleNetwork(), LLAppViewer::init(), LLAppViewer::mainLoop(), send_stats(), and LLViewerStats::updateFrameStats().
F32 gFrameDTClamped = 0.f |
Definition at line 263 of file llappviewer.cpp.
Referenced by LLAgent::ageChat(), LLAppViewer::idle(), and LLViewerObject::processUpdateMessage().
F32 gFrameIntervalSeconds = 0.f |
Definition at line 261 of file llappviewer.cpp.
Referenced by LLPipeline::calcNearbyLights(), display(), LLFloaterJoystick::draw(), LLFastTimerView::draw(), LLViewerWindow::handlePerFrameHover(), idle_startup(), LLViewerJoystick::moveAvatar(), LLViewerJoystick::moveFlycam(), LLViewerJoystick::moveObjects(), renderOctree(), LLPipeline::setupHWLights(), LLViewerObjectList::update(), update_statistics(), LLViewerImageList::updateImages(), LLViewerImageList::updateImagesDecodePriorities(), and LLViewerImageList::updateImagesFetchTextures().
U64 gFrameTime = 0 |
Definition at line 259 of file llappviewer.cpp.
Referenced by LLSurfacePatch::dirtyZ(), LLViewerWindow::draw(), idle_startup(), and LLViewerObjectList::update().
F32 gFrameTimeSeconds = 0.f |
Definition at line 260 of file llappviewer.cpp.
Referenced by LLSpatialGroup::destroyGL(), display(), LLFace::getGeometryVolume(), idle_startup(), LLFace::init(), LLAppViewer::mainLoop(), LLVolumeGeometryManager::rebuildGeom(), LLSpatialPartition::rebuildGeom(), LLWorld::removeRegion(), LLDrawPoolWater::render(), renderBoundingBox(), renderOctree(), LLDebugText::update(), and LLViewerObjectList::update().
BOOL gHandleKeysAsync = FALSE |
Definition at line 230 of file llappviewer.cpp.
Referenced by LLAppViewer::cleanupSavedSettings(), display(), init_debug_ui_menu(), and settings_to_globals().
std::string gHelperURI [static] |
Definition at line 330 of file llappviewer.cpp.
Referenced by LLAppViewer::getHelperURI(), LLAppViewer::resetURIs(), and LLAppViewer::setHelperURI().
BOOL gHideLinks = FALSE |
Definition at line 239 of file llappviewer.cpp.
Referenced by LLFloaterBuyCurrency::buyCurrency(), idle_startup(), LLAppViewer::initConfiguration(), LLPanelLogin::onClickNewAccount(), and update_dialog_callback().
Definition at line 273 of file llappviewer.cpp.
Referenced by LLFolderView::addFolder(), handle_take(), LLFolderViewItem::handleHover(), idle_startup(), and LLInventoryModel::startBackgroundFetch().
eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL |
Definition at line 249 of file llappviewer.cpp.
Referenced by idle_startup(), LLAppViewer::initConfiguration(), and LLAppViewer::initMarkerFile().
Definition at line 291 of file llappviewer.cpp.
Referenced by LLFloaterReleaseMsg::checkVersion(), LLFloaterAbout::LLFloaterAbout(), and LLFloaterReleaseMsg::show().
LLString gLaunchFileOnQuit [static] |
Definition at line 315 of file llappviewer.cpp.
BOOL gLLErrorActivated = FALSE |
Definition at line 304 of file llappviewer.cpp.
Referenced by errorCallback(), and LLAppViewer::handleViewerCrash().
std::string gLoginPage |
Definition at line 328 of file llappviewer.cpp.
std::vector<std::string> gLoginURIs |
Definition at line 329 of file llappviewer.cpp.
Referenced by LLAppViewer::addLoginURI(), LLAppViewer::getLoginURIs(), and LLAppViewer::resetURIs().
BOOL gLogoutInProgress = FALSE |
Definition at line 305 of file llappviewer.cpp.
Referenced by LLAppViewer::handleViewerCrash(), and LLAppViewer::sendLogoutRequest().
Definition at line 270 of file llappviewer.cpp.
Referenced by display(), LLAppViewer::idleShutdown(), and LLAppViewer::sendLogoutRequest().
Definition at line 278 of file llappviewer.cpp.
Referenced by LLAppViewer::cleanupSavedSettings(), LLWorldMapView::draw(), LLWorldMapView::drawAgents(), LLWorldMapView::drawFrustum(), LLWorldMapView::LLWorldMapView(), LLFloaterWorldMap::postBuild(), LLWorldMapView::setScale(), settings_to_globals(), LLWorldMapView::updateVisibleBlocks(), and LLWorldMapView::viewPosToGlobal().
F32 gMiniMapScale = 128.f |
Definition at line 279 of file llappviewer.cpp.
Referenced by LLAppViewer::cleanupSavedSettings(), LLNetMap::createObjectImage(), LLNetMap::draw(), LLNetMap::handleScrollWheel(), LLNetMap::LLNetMap(), LLNetMap::setScale(), settings_to_globals(), and LLNetMap::viewPosToGlobal().
BOOL gPacificDaylightTime = FALSE |
Definition at line 257 of file llappviewer.cpp.
Referenced by LLFloaterBump::add(), LLViewerTextEditor::appendTime(), idle_startup(), LLEventInfo::LLEventInfo(), LLPanelDirEvents::performQueryOrDelete(), LLWorldMap::processMapItemReply(), LLStatusBar::refresh(), LLPanelDirEvents::setDay(), and LLLogChat::timestamp().
U32 gPacketsIn = 0 |
Definition at line 296 of file llappviewer.cpp.
Referenced by LLAppViewer::idleNetwork(), and LLFloaterAbout::LLFloaterAbout().
BOOL gPeriodicSlowFrame = FALSE |
Definition at line 301 of file llappviewer.cpp.
Referenced by init_debug_rendering_menu(), and LLAppViewer::mainLoop().
BOOL gPrintMessagesThisFrame = FALSE |
BOOL gRandomizeFramerate = FALSE |
Definition at line 300 of file llappviewer.cpp.
Referenced by init_debug_rendering_menu(), and LLAppViewer::mainLoop().
LLVector3 gRelativeWindVec(0.0, 0.0, 0.0) |
Referenced by audio_update_wind(), and LLDebugText::update().
Definition at line 266 of file llappviewer.cpp.
Referenced by idle_startup(), LLTracker::renderBeacon(), send_stats(), and LLViewerStats::updateFrameStats().
BOOL gRestoreGL = FALSE |
Definition at line 283 of file llappviewer.cpp.
Referenced by display(), and LLViewerWindow::restoreGL().
Definition at line 282 of file llappviewer.cpp.
Referenced by display(), and LLViewerWindow::restoreGL().
EGridInfo GridDefaultChoice = GRID_INFO_NONE [static] |
LLString gSecondLife [static] |
Definition at line 322 of file llappviewer.cpp.
LLPumpIO* gServicePump = NULL |
Definition at line 255 of file llappviewer.cpp.
BOOL gShowObjectUpdates = FALSE |
Definition at line 243 of file llappviewer.cpp.
Referenced by LLAppViewer::cleanupSavedSettings(), init_client_menu(), process_kill_object(), LLViewerObject::processUpdateMessage(), and settings_to_globals().
Definition at line 235 of file llappviewer.cpp.
Referenced by LLAppViewer::init(), and send_stats().
Definition at line 234 of file llappviewer.cpp.
Referenced by LLAppViewer::init(), and send_stats().
U64 gStartTime = 0 |
Definition at line 264 of file llappviewer.cpp.
Referenced by idle_startup(), LLAppViewer::initConfiguration(), and LLViewerObjectList::update().
LLVFS* gStaticVFS = NULL |
Definition at line 289 of file llappviewer.cpp.
Referenced by LLViewerImageList::getMaxVideoRamSetting(), send_stats(), and LLViewerImage::updateClass().
BOOL gUseQuickTime = TRUE |
Definition at line 244 of file llappviewer.cpp.
BOOL gUseWireframe = FALSE |
Definition at line 284 of file llappviewer.cpp.
Referenced by display(), handleUseOcclusionChanged(), init_debug_rendering_menu(), and LLPipeline::renderBloom().
LLString gWindowTitle [static] |
Definition at line 323 of file llappviewer.cpp.
Referenced by audio_update_wind(), LLAppViewer::idle(), and LLDebugText::update().
const char* LLERROR_MARKER_FILE_NAME = "SecondLife.llerror_marker" |
Definition at line 312 of file llappviewer.cpp.
Referenced by LLAppViewer::handleViewerCrash(), and LLAppViewer::initMarkerFile().
const char* LOGOUT_MARKER_FILE_NAME = "SecondLife.logout_marker" |
Definition at line 313 of file llappviewer.cpp.
Referenced by LLAppViewer::initMarkerFile(), and LLAppViewer::sendLogoutRequest().
const F32 LOGOUT_REQUEST_TIME = 6.f [static] |
const char* MARKER_FILE_NAME = "SecondLife.exec_marker" |
Definition at line 310 of file llappviewer.cpp.
Referenced by LLAppViewer::anotherInstanceRunning(), and LLAppViewer::initMarkerFile().
const char* VFS_DATA_FILE_BASE = "data.db2.x." |
const char* VFS_INDEX_FILE_BASE = "index.db2.x." |