llviewerdisplay.cpp File Reference

LLViewerDisplay class implementation. More...

#include "llviewerprecompiledheaders.h"
#include "llagent.h"
#include "llviewercontrol.h"
#include "llcoord.h"
#include "llcriticaldamp.h"
#include "lldir.h"
#include "lldynamictexture.h"
#include "lldrawpoolalpha.h"
#include "llfeaturemanager.h"
#include "llframestats.h"
#include "llgl.h"
#include "llglheaders.h"
#include "llhudmanager.h"
#include "llimagebmp.h"
#include "llimagegl.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "llstartup.h"
#include "lltoolfocus.h"
#include "lltoolmgr.h"
#include "lltooldraganddrop.h"
#include "lltoolpie.h"
#include "lltracker.h"
#include "llui.h"
#include "llviewercamera.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llvograss.h"
#include "llworld.h"
#include "pipeline.h"
#include "viewer.h"
#include "llfasttimer.h"
#include "llfloatertools.h"
#include "llviewerimagelist.h"
#include "llfocusmgr.h"
#include "llcubemap.h"
#include "llviewerregion.h"
#include "lldrawpoolwater.h"
#include "llwindow.h"

Include dependency graph for llviewerdisplay.cpp:

Go to the source code of this file.

Functions

void pre_show_depth_buffer ()
void post_show_depth_buffer ()
void render_ui_and_swap ()
void render_ui_3d ()
void render_ui_2d ()
void render_disconnected_background ()
void process_keystrokes_async ()
void display_startup ()
void display_update_camera ()
void display (BOOL rebuild, F32 zoom_factor, int subfield)
BOOL setup_hud_matrices (BOOL for_select)
void renderCoordinateAxes ()
void draw_axes ()

Variables

U32 gFrameCount
LLPointer< LLImageGLgStartImageGL
LLPointer< LLImageGLgDisconnectedImagep
BOOL gLogoutRequestSent
LLTimer gLogoutTimer
BOOL gHaveSavedSnapshot
BOOL gDisplaySwapBuffers
const F32 TELEPORT_RENDER_DELAY = 20.f
const F32 TELEPORT_ARRIVAL_DELAY = 2.f
BOOL gTeleportDisplay = FALSE
LLFrameTimer gTeleportDisplayTimer
LLFrameTimer gTeleportArrivalTimer
const F32 RESTORE_GL_TIME = 5.f
BOOL gForceRenderLandFence = FALSE
BOOL gDisplaySwapBuffers = FALSE


Detailed Description

LLViewerDisplay class implementation.

LicenseInfo
firstyear=2004&license=viewergpl

Copyright (c) 2004-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llviewerdisplay.cpp.


Function Documentation

void display ( BOOL  rebuild,
F32  zoom_factor,
int  subfield 
)

Definition at line 158 of file llviewerdisplay.cpp.

References LLViewerWindow::checkSettings(), LLGLState::checkStates(), LLGLState::checkTextureChannels(), LLPipeline::disableLights(), display_startup(), display_update_camera(), f, FALSE, LLFastTimer::FTM_REBUILD, LLFastTimer::FTM_RENDER, LLFastTimer::FTM_WORLD_UPDATE, gAgent, gCamera, gDisconnected, LLViewerWindow::getActive(), LLFocusMgr::getAppHasFocus(), LLVOAvatar::getAttachmentCount(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLFrameTimer::getElapsedTimeF32(), LLTimer::getElapsedTimeF32(), LLWindow::getMinimized(), LLCoordFrame::getOrigin(), LLViewerWindow::getPlatformWindow(), LLPipeline::getRenderTypeMask(), LLControlGroup::getS32(), LLPipeline::getSpatialPartition(), LLStartUp::getStartupState(), LLAgent::getTeleportMessage(), LLAgent::getTeleportState(), LLWindow::getVisible(), gFeatureManagerp, gFocusMgr, gForegroundFrameCount, gFrameCount, gFrameStats, gFrameTimeSeconds, gGLManager, gHandleKeysAsync, gHaveSavedSnapshot, gHUDManager, gImageList, glClear, gLogoutMaxTime, gLogoutRequestSent, gLogoutTimer, glPolygonMode, glPopMatrix, gNoRender, gPipeline, gQuit, gRestoreGL, gRestoreGLTimer, gSavedSettings, gTeleportArrivalTimer, gTeleportDisplay, gTeleportDisplayTimer, gUseWireframe, gViewerWindow, LLPipeline::hasRenderDebugFeatureMask(), LLPipeline::hasRenderType(), LLDrawable::incrementVisible(), LLFeatureList::isFeatureAvailable(), LLViewerWindow::isPickPending(), llmin(), mask, LLPipeline::mBackfaceCull, LLViewerImageList::mForceResetTextureStats, LLGLManager::mHasOcclusionQuery, MIN_NEAR_PLANE, LLFrameStats::MISC_END, LLViewerWindow::mWindow, NULL, LLPipeline::PARTITION_VOLUME, LLViewerWindow::performPick(), LLDrawPool::POOL_ALPHA_POST_WATER, pre_show_depth_buffer(), process_keystrokes_async(), LLSpatialPartition::processImagery(), LLFrameStats::REBUILD, LLPipeline::rebuildPools(), LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES, LLPipeline::RENDER_DEBUG_FEATURE_UI, render_disconnected_background(), LLPipeline::RENDER_TYPE_BUMP, LLPipeline::RENDER_TYPE_HUD, LLPipeline::RENDER_TYPE_SIMPLE, LLPipeline::RENDER_TYPE_VOLUME, LLFrameStats::RENDER_UI, render_ui_and_swap(), LLPipeline::renderGeom(), LLFrameTimer::reset(), LLGLState::resetTextureStates(), RESTORE_GL_TIME, LLViewerCamera::rotateToLeftEye(), LLViewerCamera::rotateToRightEye(), S32, LLCoordFrame::setAxes(), LLControlGroup::setBOOL(), LLCamera::setNear(), LLCoordFrame::setOrigin(), LLViewerWindow::setProgressCancelButtonVisible(), LLViewerWindow::setProgressPercent(), LLViewerWindow::setProgressString(), LLPipeline::setRenderTypeMask(), LLViewerWindow::setShowProgress(), LLAgent::setTeleportMessage(), LLAgent::setTeleportState(), setup_hud_matrices(), LLViewerWindow::setupViewport(), LLViewerCamera::setZoomParameters(), LLVOAvatar::sRenderGroupTitles, LLVOAvatar::sRenderName, LLPipeline::sShowHUDAttachments, LLFrameStats::start(), LLFrameStats::STATE_SORT, STATE_STARTED, LLPipeline::stateSort(), LLAgent::sTeleportProgressMessages, STEREO_MODE_ACTIVE, stop_glerror, LLPipeline::sUseOcclusion, t, TELEPORT_ARRIVAL_DELAY, LLAgent::TELEPORT_ARRIVING, TELEPORT_EXPIRY, TELEPORT_EXPIRY_PER_ATTACHMENT, LLAgent::TELEPORT_MOVING, LLAgent::TELEPORT_NONE, LLAgent::TELEPORT_REQUESTED, LLAgent::TELEPORT_START, LLAgent::TELEPORT_START_ARRIVAL, LLPipeline::toggleRenderDebugFeature(), LLPipeline::toggleRenderType(), TRUE, LLFrameStats::UPDATE_CULL, LLFrameStats::UPDATE_GEOM, LLFrameStats::UPDATE_TEX_STATS, LLHUDObject::updateAll(), LLDynamicTexture::updateAllInstances(), LLPipeline::updateCull(), LLHUDManager::updateEffects(), LLViewerCamera::updateFrustumPlanes(), LLPipeline::updateGeom(), LLImageGL::updateStats(), and LLViewerCamera::updateStereoValues().

Referenced by main_loop(), and LLViewerWindow::rawSnapshot().

void display_startup (  ) 

Definition at line 105 of file llviewerdisplay.cpp.

References LLPipeline::disableLights(), LLViewerWindow::draw(), LLViewerWindow::getActive(), LLWindow::getMinimized(), LLWindow::getVisible(), glClear, gNoRender, gPipeline, gViewerWindow, LLViewerWindow::mWindow, S32, LLViewerWindow::setup2DRender(), LLWindow::swapBuffers(), and LLDynamicTexture::updateAllInstances().

Referenced by display(), and idle_startup().

void display_update_camera (  ) 

Definition at line 134 of file llviewerdisplay.cpp.

References CAMERA_MODE_CUSTOMIZE_AVATAR, f, gAgent, gCamera, LLAgent::getCameraMode(), gViewerWindow, gWorldp, LLAgent::mDrawDistance, LLCamera::setFar(), LLWorld::setLandFarClip(), and LLViewerWindow::setup3DRender().

Referenced by display().

void draw_axes (  ) 

Definition at line 1132 of file llviewerdisplay.cpp.

References f, gAgent, LLAgent::getPositionAgent(), glBegin, glEnd, glPopMatrix, glTranslatef, renderCoordinateAxes(), v, VX, VY, and VZ.

Referenced by render_ui_3d().

void post_show_depth_buffer (  ) 

Definition at line 1109 of file llglsandbox.cpp.

References f, i, llfloor(), stride, and y.

Referenced by render_ui_3d().

void pre_show_depth_buffer (  ) 

Definition at line 1101 of file llglsandbox.cpp.

References glClear, glEnable, and glStencilFunc.

Referenced by display().

void process_keystrokes_async (  ) 

Definition at line 2058 of file viewer.cpp.

References LLFocusMgr::focusLocked(), LLViewerWindow::getActive(), LLWindow::getMinimized(), LLViewerWindow::getShowProgress(), LLStartUp::getStartupState(), LLWindow::getVisible(), gFocusMgr, gKeyboard, gViewerWindow, LLViewerWindow::mWindow, NULL, LLKeyboard::scanKeyboard(), and STATE_STARTED.

Referenced by display().

void render_disconnected_background (  ) 

Definition at line 1151 of file llviewerdisplay.cpp.

References LLViewerImage::bindTexture(), f, FALSE, gDirUtilp, gDisconnected, gDisconnectedImagep, LLDir::getDirDelimiter(), LLViewerWindow::getDisplayScale(), LLDir::getLindenUserDir(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gl_rect_2d_simple_tex(), glColor4f, glPopMatrix, gStartImageGL, gViewerWindow, height, i, llendl, llinfos, LLVector2::mV, NULL, S32, SCREEN_LAST_FILENAME, LLViewerWindow::setup2DRender(), LLImageGL::unbindTexture(), VX, VY, and width.

Referenced by display().

void render_ui_2d (  ) 

Definition at line 1028 of file llviewerdisplay.cpp.

References LLViewerWindow::draw(), LLViewerWindow::drawPickBuffer(), f, FALSE, gAgent, gCamera, gDebugSelect, LLAgent::getAvatarObject(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), LLViewerCamera::getZoomFactor(), LLViewerCamera::getZoomSubRegion(), gl_rect_2d(), glColor4fv, glPolygonMode, glPopMatrix, glTranslatef, gViewerWindow, llceil(), llround(), LLVOAvatar::mHUDCurZoom, LLCoord::mX, LLCoord::mY, S32, LLFontGL::sCurOrigin, LLCoordFont::set(), LLViewerWindow::setup2DRender(), LLUI::sGLScaleFactor, stop_glerror, and LLColor4::white.

Referenced by render_ui_and_swap().

void render_ui_3d (  ) 

Definition at line 987 of file llviewerdisplay.cpp.

References draw_axes(), FALSE, LLControlGroup::getBOOL(), gSavedSettings, gViewerWindow, post_show_depth_buffer(), LLViewerWindow::renderSelections(), stop_glerror, and TRUE.

Referenced by render_ui_and_swap().

void render_ui_and_swap (  ) 

Definition at line 942 of file llviewerdisplay.cpp.

References LLGLState::checkStates(), LLVertexBuffer::clientCopy(), LLPipeline::disableLights(), LLFastTimer::FTM_CLIENT_COPY, LLFastTimer::FTM_RENDER_UI, LLFastTimer::FTM_SWAP, gDisconnected, gDisplaySwapBuffers, gPipeline, gViewerWindow, LLPipeline::hasRenderDebugFeatureMask(), LLViewerWindow::mWindow, LLPipeline::RENDER_DEBUG_FEATURE_UI, render_ui_2d(), render_ui_3d(), LLVertexBuffer::startRender(), LLVertexBuffer::stopRender(), LLWindow::swapBuffers(), and t.

Referenced by display().

void renderCoordinateAxes (  ) 

Definition at line 1083 of file llviewerdisplay.cpp.

References f, glBegin, and glEnd.

Referenced by draw_axes().

BOOL setup_hud_matrices ( BOOL  for_select  ) 

Definition at line 882 of file llviewerdisplay.cpp.

References f, FALSE, gAgent, gCamera, LLCamera::getAspect(), LLAgent::getAvatarObject(), LLBBox::getCenterLocal(), LLBBox::getExtentLocal(), LLVOAvatar::getHUDBBox(), LLCriticalDamp::getInterpolant(), LLViewerCamera::getZoomFactor(), LLViewerCamera::getZoomSubRegion(), glClear, glLoadMatrixf, glOrtho, glTranslatef, gViewerWindow, LLVOAvatar::hasHUDAttachment(), lerp(), llceil(), llclamp(), llmax(), LLVOAvatar::mHUDCurZoom, LLVOAvatar::mHUDTargetZoom, LLVector3::mV, OGL_TO_CFR_ROTATION, LLViewerWindow::setupViewport(), TRUE, and VX.

Referenced by display(), and LLPipeline::renderForSelect().


Variable Documentation

LLPointer<LLImageGL> gDisconnectedImagep

Definition at line 575 of file viewer.cpp.

Referenced by cleanup_app(), and render_disconnected_background().

BOOL gDisplaySwapBuffers = FALSE

Definition at line 93 of file llviewerdisplay.cpp.

BOOL gDisplaySwapBuffers

Definition at line 93 of file llviewerdisplay.cpp.

Referenced by idle_startup(), LLViewerWindow::rawSnapshot(), and render_ui_and_swap().

BOOL gForceRenderLandFence = FALSE

Definition at line 92 of file llviewerdisplay.cpp.

Referenced by LLFloaterAuction::onClickSnapshot(), and render_hud_elements().

U32 gFrameCount

Definition at line 460 of file viewer.cpp.

BOOL gHaveSavedSnapshot

Definition at line 308 of file viewer.cpp.

Referenced by display(), idle(), and save_final_snapshot().

BOOL gLogoutRequestSent

Definition at line 411 of file viewer.cpp.

Referenced by display(), idle(), idle_shutdown(), send_agent_update(), and send_logout_request().

LLTimer gLogoutTimer

Definition at line 412 of file viewer.cpp.

Referenced by app_request_quit(), display(), idle_shutdown(), and send_logout_request().

LLPointer<LLImageGL> gStartImageGL

Definition at line 215 of file llstartup.cpp.

Referenced by LLProgressView::draw(), init_start_screen(), release_start_screen(), and render_disconnected_background().

LLFrameTimer gTeleportArrivalTimer

Definition at line 89 of file llviewerdisplay.cpp.

Referenced by display().

BOOL gTeleportDisplay = FALSE

Definition at line 87 of file llviewerdisplay.cpp.

Referenced by display(), process_teleport_start(), LLAgent::teleportCancel(), and LLAgent::teleportCore().

LLFrameTimer gTeleportDisplayTimer

Definition at line 88 of file llviewerdisplay.cpp.

Referenced by display().

const F32 RESTORE_GL_TIME = 5.f

Definition at line 90 of file llviewerdisplay.cpp.

Referenced by display().

const F32 TELEPORT_ARRIVAL_DELAY = 2.f

Definition at line 86 of file llviewerdisplay.cpp.

Referenced by display().

const F32 TELEPORT_RENDER_DELAY = 20.f

Definition at line 85 of file llviewerdisplay.cpp.


Generated on Thu Jul 1 06:10:46 2010 for Second Life Viewer by  doxygen 1.4.7