pipeline.cpp File Reference

Rendering pipeline. More...

#include "llviewerprecompiledheaders.h"
#include "pipeline.h"
#include "audioengine.h"
#include "imageids.h"
#include "llerror.h"
#include "llviewercontrol.h"
#include "llfasttimer.h"
#include "llfontgl.h"
#include "llmemory.h"
#include "llmemtype.h"
#include "llnamevalue.h"
#include "llprimitive.h"
#include "llvolume.h"
#include "material_codes.h"
#include "timing.h"
#include "v3color.h"
#include "llui.h"
#include "llglheaders.h"
#include "llagent.h"
#include "lldrawable.h"
#include "lldrawpoolalpha.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolground.h"
#include "lldrawpoolsimple.h"
#include "lldrawpoolbump.h"
#include "lldrawpooltree.h"
#include "lldrawpoolwater.h"
#include "llface.h"
#include "llfeaturemanager.h"
#include "llfloatertelehub.h"
#include "llfloatereventlog.h"
#include "llframestats.h"
#include "llgldbg.h"
#include "llhudmanager.h"
#include "lllightconstants.h"
#include "llresmgr.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "lltracker.h"
#include "lltool.h"
#include "lltoolmgr.h"
#include "llviewercamera.h"
#include "llviewerimagelist.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerpartsource.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llvoground.h"
#include "llvosky.h"
#include "llvotree.h"
#include "llvovolume.h"
#include "llvosurfacepatch.h"
#include "llvowater.h"
#include "llvopartgroup.h"
#include "llworld.h"
#include "viewer.h"
#include "llcubemap.h"
#include "llfloateravatarlist.h"
#include "lldebugmessagebox.h"
#include "llglslshader.h"
#include "llviewerjoystick.h"

Include dependency graph for pipeline.cpp:

Go to the source code of this file.

Classes

class  LLOctreeDirtyTexture

Defines

#define AGGRESSIVE_OCCLUSION   0
#define IR(x)   ((U32&)x)

Functions

void stamp (F32 x, F32 y, F32 xs, F32 ys)
U32 nhpo2 (U32 v)
void renderScriptedBeacons (LLDrawable *drawablep)
void renderScriptedTouchBeacons (LLDrawable *drawablep)
void renderPhysicalBeacons (LLDrawable *drawablep)
void addSourcesToEventLog (LLDrawable *drawablep)
void renderParticleBeacons (LLDrawable *drawablep)
void addParticleSourcesToList (LLDrawable *drawablep)
 Add particle sources to avatar list This tells the avatar list floater who is emitting particles.
static void render_hud_elements ()
static F32 calc_light_dist (LLVOVolume *light, const LLVector3 &cam_pos, F32 max_dist)
void scale_stamp (const F32 x, const F32 y, const F32 xs, const F32 ys)
void drawBars (const F32 begin, const F32 end, const F32 height=1.f)
bool LLRayAABB (const LLVector3 &center, const LLVector3 &size, const LLVector3 &origin, const LLVector3 &dir, LLVector3 &coord, F32 epsilon)
void apply_cube_face_rotation (U32 face)
void render_cube_map ()

Variables

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_ACTIVE_OBJECT_QUIET_FRAMES = 40
const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10
const S32 ESTIMATED_VISIBLE_OBJECT_COUNT = 8192
const F32 OCCLUDE_SCALE_SUM_THRESHOLD = 8.f
const S32 MAX_OCCLUDER_COUNT = 2
S32 gBoxFrame
BOOL gRenderLightGlows
BOOL gHideSelectedObjects
BOOL gAvatarBacklight = FALSE
S32 gTrivialAccepts = 0
BOOL gRenderForSelect = FALSE


Detailed Description

Rendering pipeline.

LicenseInfo
firstyear=2005&license=viewergpl

Copyright (c) 2005-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 pipeline.cpp.


Define Documentation

#define AGGRESSIVE_OCCLUSION   0

Definition at line 110 of file pipeline.cpp.

#define IR ( x   )     ((U32&)x)

A method to compute a ray-AABB intersection. Original code by Andrew Woo, from "Graphics Gems", Academic Press, 1990 Optimized code by Pierre Terdiman, 2000 (~20-30% faster on my Celeron 500) Epsilon value added by Klaus Hartmann. (discarding it saves a few cycles only)

Hence this version is faster as well as more robust than the original one.

Should work provided: 1) the integer representation of 0.0f is 0x00000000 2) the sign bit of the float is the most significant one

Report bugs: p.terdiman@codercorner.com

Parameters:
aabb [in] the axis-aligned bounding box
origin [in] ray origin
dir [in] ray direction
coord [out] impact coordinates
Returns:
true if ray intersects AABB

Definition at line 3401 of file pipeline.cpp.

Referenced by LLRayAABB().


Function Documentation

void addParticleSourcesToList ( LLDrawable drawablep  ) 

Add particle sources to avatar list This tells the avatar list floater who is emitting particles.

Definition at line 1610 of file pipeline.cpp.

References ACTIVITY_PARTICLES, LLFloaterAvatarList::getAvatarEntry(), LLDrawable::getVObj(), gFloaterAvatarList, LLViewerObject::isParticleSource(), LLViewerObject::mPartSourcep, NULL, and LLAvatarListEntry::setActivity().

Referenced by LLPipeline::postSort().

void addSourcesToEventLog ( LLDrawable drawablep  ) 

Definition at line 1567 of file pipeline.cpp.

References LLDrawable::getVObj(), gFloaterEventLog, LLFloaterEventLog::logObject(), and NULL.

Referenced by LLPipeline::postSort().

void apply_cube_face_rotation ( U32  face  ) 

Definition at line 3804 of file pipeline.cpp.

References f, and glRotatef.

Referenced by LLPipeline::blurReflectionMap(), and LLPipeline::generateReflectionMap().

static F32 calc_light_dist ( LLVOVolume light,
const LLVector3 cam_pos,
F32  max_dist 
) [static]

Definition at line 2874 of file pipeline.cpp.

References LLDrawable::ACTIVE, f, fsqrtf, light, and LLVector3::magVecSquared().

Referenced by LLPipeline::calcNearbyLights().

void drawBars ( const F32  begin,
const F32  end,
const F32  height = 1.f 
)

Definition at line 3275 of file pipeline.cpp.

References f, height, S32, and scale_stamp().

bool LLRayAABB ( const LLVector3 center,
const LLVector3 size,
const LLVector3 origin,
const LLVector3 dir,
LLVector3 coord,
F32  epsilon 
)

Definition at line 3403 of file pipeline.cpp.

References coord, FALSE, i, IR, LLVector3::mV, size, TRUE, VX, VY, and VZ.

Referenced by LLRelightPainter::traverse().

U32 nhpo2 ( U32  v  ) 

Definition at line 157 of file pipeline.cpp.

References r.

Referenced by LLPipeline::bindScreenToTexture(), and LLPipeline::renderGeom().

void render_cube_map (  ) 

Definition at line 3996 of file pipeline.cpp.

References glBegin, glEnd, i, and r.

Referenced by LLPipeline::blurReflectionMap().

static void render_hud_elements (  )  [static]

Definition at line 1883 of file pipeline.cpp.

References LLPipeline::disableLights(), FALSE, LLFastTimer::FTM_RENDER_UI, gForceRenderLandFence, gObjectList, gParcelMgr, gPipeline, gViewerWindow, gWorldp, LLPipeline::hasRenderDebugFeatureMask(), LLPipeline::hasRenderType(), LLViewerParcelMgr::render(), LLTracker::render3D(), LLPipeline::RENDER_DEBUG_FEATURE_UI, LLPipeline::RENDER_TYPE_HUD, LLHUDObject::renderAll(), LLHUDText::renderAllHUD(), LLPipeline::renderDebug(), LLViewerObjectList::renderObjectBeacons(), LLViewerParcelMgr::renderParcelCollision(), LLWorld::renderPropertyLines(), LLViewerWindow::renderSelections(), LLViewerObjectList::resetObjectBeacons(), and t.

Referenced by LLPipeline::renderGeom().

void renderParticleBeacons ( LLDrawable drawablep  ) 

Definition at line 1582 of file pipeline.cpp.

References LLViewerObjectList::addDebugBeacon(), f, LLDrawable::getFace(), LLDrawable::getNumFaces(), LLViewerObject::getPositionAgent(), LLControlGroup::getS32(), LLDrawable::getVObj(), gObjectList, gPipeline, gSavedSettings, LLViewerObject::isParticleSource(), LLPipeline::mHighlightFaces, S32, LLPipeline::sRenderBeacons, and LLPipeline::sRenderHighlight.

Referenced by LLPipeline::postSort().

void renderPhysicalBeacons ( LLDrawable drawablep  ) 

Definition at line 1543 of file pipeline.cpp.

References LLViewerObjectList::addDebugBeacon(), f, LLDrawable::getFace(), LLDrawable::getNumFaces(), LLXform::getParent(), LLViewerObject::getPositionAgent(), LLControlGroup::getS32(), LLDrawable::getVObj(), gObjectList, gPipeline, gSavedSettings, LLPrimitive::isAvatar(), LLPipeline::mHighlightFaces, S32, LLPipeline::sRenderBeacons, LLPipeline::sRenderHighlight, and LLViewerObject::usePhysics().

Referenced by LLPipeline::postSort().

void renderScriptedBeacons ( LLDrawable drawablep  ) 

Definition at line 1494 of file pipeline.cpp.

References LLViewerObjectList::addDebugBeacon(), f, LLViewerObject::flagScripted(), LLDrawable::getFace(), LLDrawable::getNumFaces(), LLXform::getParent(), LLViewerObject::getPositionAgent(), LLControlGroup::getS32(), LLDrawable::getVObj(), gObjectList, gPipeline, gSavedSettings, LLPrimitive::isAvatar(), LLPipeline::mHighlightFaces, S32, LLPipeline::sRenderBeacons, and LLPipeline::sRenderHighlight.

Referenced by LLPipeline::postSort().

void renderScriptedTouchBeacons ( LLDrawable drawablep  ) 

Definition at line 1518 of file pipeline.cpp.

References LLViewerObjectList::addDebugBeacon(), f, LLViewerObject::flagHandleTouch(), LLViewerObject::flagScripted(), LLDrawable::getFace(), LLDrawable::getNumFaces(), LLXform::getParent(), LLViewerObject::getPositionAgent(), LLControlGroup::getS32(), LLDrawable::getVObj(), gObjectList, gPipeline, gSavedSettings, LLPrimitive::isAvatar(), LLPipeline::mHighlightFaces, S32, LLPipeline::sRenderBeacons, and LLPipeline::sRenderHighlight.

Referenced by LLPipeline::postSort().

void scale_stamp ( const F32  x,
const F32  y,
const F32  xs,
const F32  ys 
)

Definition at line 3267 of file pipeline.cpp.

References f, and stamp().

Referenced by drawBars().

void stamp ( F32  x,
F32  y,
F32  xs,
F32  ys 
)

Definition at line 143 of file pipeline.cpp.

References f, glBegin, and glEnd.

Referenced by scale_stamp().


Variable Documentation

const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f

Definition at line 112 of file pipeline.cpp.

const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f

Definition at line 114 of file pipeline.cpp.

Referenced by LLPipeline::setupAvatarLights().

const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f

Definition at line 113 of file pipeline.cpp.

const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f

Definition at line 115 of file pipeline.cpp.

Referenced by LLPipeline::setupAvatarLights().

const S32 ESTIMATED_VISIBLE_OBJECT_COUNT = 8192

Definition at line 121 of file pipeline.cpp.

BOOL gAvatarBacklight = FALSE

Definition at line 135 of file pipeline.cpp.

Referenced by LLPipeline::setupAvatarLights().

S32 gBoxFrame

BOOL gHideSelectedObjects

Definition at line 107 of file llselectmgr.cpp.

Referenced by init_debug_rendering_menu(), LLVolumeGeometryManager::registerFace(), LLPipeline::renderForSelect(), and LLPipeline::stateSort().

BOOL gRenderForSelect = FALSE

Definition at line 139 of file pipeline.cpp.

BOOL gRenderLightGlows

S32 gTrivialAccepts = 0

Definition at line 137 of file pipeline.cpp.

Referenced by LLPipeline::updateCull().

const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40

Definition at line 116 of file pipeline.cpp.

Referenced by LLPipeline::updateMove().

const S32 MAX_OCCLUDER_COUNT = 2

Definition at line 129 of file pipeline.cpp.

const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10

Definition at line 117 of file pipeline.cpp.

const F32 OCCLUDE_SCALE_SUM_THRESHOLD = 8.f

Definition at line 126 of file pipeline.cpp.


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