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 "llglimmediate.h"
#include "llagent.h"
#include "lldrawable.h"
#include "lldrawpoolalpha.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolground.h"
#include "lldrawpoolbump.h"
#include "lldrawpooltree.h"
#include "lldrawpoolwater.h"
#include "llface.h"
#include "llfeaturemanager.h"
#include "llfloatertelehub.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 "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 "llcubemap.h"
#include "lldebugmessagebox.h"
#include "llglslshader.h"
#include "llviewerjoystick.h"
#include "llviewerdisplay.h"
#include "llwlparammanager.h"
#include "llwaterparammanager.h"
#include "llspatialpartition.h"
#include "llmutelist.h"

Go to the source code of this file.

Classes

class  LLOctreeDirtyTexture

Defines

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

Functions

void render_ui_and_swap_if_needed ()
U32 nhpo2 (U32 v)
glh::matrix4f glh_copy_matrix (GLdouble *src)
glh::matrix4f glh_get_current_modelview ()
glh::matrix4f glh_get_current_projection ()
void glh_copy_matrix (const glh::matrix4f &src, GLdouble *dst)
void glh_set_current_modelview (const glh::matrix4f &mat)
void glh_set_current_projection (glh::matrix4f &mat)
glh::matrix4f gl_ortho (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat znear, GLfloat zfar)
void validate_framebuffer_object ()
void forAllDrawables (LLCullResult::sg_list_t::iterator begin, LLCullResult::sg_list_t::iterator end, void(*func)(LLDrawable *))
void renderScriptedBeacons (LLDrawable *drawablep)
void renderScriptedTouchBeacons (LLDrawable *drawablep)
void renderPhysicalBeacons (LLDrawable *drawablep)
void renderParticleBeacons (LLDrawable *drawablep)
void renderSoundHighlights (LLDrawable *drawablep)
void render_hud_elements ()
static F32 calc_light_dist (LLVOVolume *light, const LLVector3 &cam_pos, F32 max_dist)
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 ()
float sgn (float a)

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 U32 REFLECTION_MAP_RES = 128
const S32 MAX_OCCLUDER_COUNT = 2
S32 gBoxFrame
BOOL gRenderLightGlows
BOOL gHideSelectedObjects
BOOL gDisplaySwapBuffers
BOOL gDebugGL
static S32 sDelayedVBOEnable = 0
BOOL gAvatarBacklight = FALSE
BOOL gRenderForSelect = FALSE
BOOL gDebugPipeline = FALSE
LLPipeline gPipeline
const LLMatrix4gGLLastMatrix = NULL
static LLCullResultsCull = NULL
static const U32 gl_cube_face []


Detailed Description

Rendering pipeline.

LicenseInfo
firstyear=2005&license=viewergpl

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


Define Documentation

#define IR (  )     ((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 3642 of file pipeline.cpp.

Referenced by LLRayAABB().


Function Documentation

void apply_cube_face_rotation ( U32  face  ) 

Definition at line 4081 of file pipeline.cpp.

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

Here is the caller graph for this function:

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

void forAllDrawables ( LLCullResult::sg_list_t::iterator  begin,
LLCullResult::sg_list_t::iterator  end,
void(*)(LLDrawable *)  func 
)

Definition at line 1824 of file pipeline.cpp.

References i, and j.

Referenced by LLPipeline::forAllVisibleDrawables().

Here is the caller graph for this function:

glh::matrix4f gl_ortho ( GLfloat  left,
GLfloat  right,
GLfloat  bottom,
GLfloat  top,
GLfloat  znear,
GLfloat  zfar 
)

Definition at line 191 of file pipeline.cpp.

Referenced by setup_hud_matrices().

Here is the caller graph for this function:

void glh_copy_matrix ( const glh::matrix4f &  src,
GLdouble *  dst 
)

Definition at line 173 of file pipeline.cpp.

References i.

glh::matrix4f glh_copy_matrix ( GLdouble *  src  ) 

Definition at line 153 of file pipeline.cpp.

References i.

Referenced by glh_get_current_modelview(), glh_get_current_projection(), glh_set_current_modelview(), glh_set_current_projection(), and render_ui_and_swap().

Here is the caller graph for this function:

glh::matrix4f glh_get_current_modelview (  ) 

Definition at line 163 of file pipeline.cpp.

References gGLModelView, and glh_copy_matrix().

Referenced by display(), LLPipeline::generateWaterReflection(), render_hud_attachments(), render_ui_and_swap(), and LLPipeline::renderForSelect().

Here is the call graph for this function:

Here is the caller graph for this function:

glh::matrix4f glh_get_current_projection (  ) 

Definition at line 168 of file pipeline.cpp.

References gGLProjection, and glh_copy_matrix().

Referenced by display(), LLPipeline::generateWaterReflection(), LLDrawPoolWLSky::render(), LLDrawPoolSky::render(), LLDrawPoolGround::render(), render_hud_attachments(), LLPipeline::renderForSelect(), and LLDrawPoolWater::shade().

Here is the call graph for this function:

Here is the caller graph for this function:

void glh_set_current_modelview ( const glh::matrix4f &  mat  ) 

Definition at line 181 of file pipeline.cpp.

References gGLModelView, and glh_copy_matrix().

Referenced by display(), LLPipeline::generateImpostor(), LLPipeline::generateWaterReflection(), render_hud_attachments(), render_ui_and_swap(), LLPipeline::renderForSelect(), and setup_hud_matrices().

Here is the call graph for this function:

Here is the caller graph for this function:

void glh_set_current_projection ( glh::matrix4f &  mat  ) 

Definition at line 186 of file pipeline.cpp.

References gGLProjection, and glh_copy_matrix().

Referenced by display(), LLPipeline::generateImpostor(), render_hud_attachments(), LLPipeline::renderForSelect(), and setup_hud_matrices().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 3644 of file pipeline.cpp.

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

U32 nhpo2 ( U32  v  ) 

Definition at line 144 of file pipeline.cpp.

References r.

Referenced by LLPipeline::generateImpostor().

Here is the caller graph for this function:

void render_cube_map (  ) 

Definition at line 4250 of file pipeline.cpp.

References r, and LLVector3::scaledVec().

Referenced by LLPipeline::blurReflectionMap().

Here is the call graph for this function:

Here is the caller graph for this function:

void render_hud_elements (  ) 

void render_ui_and_swap_if_needed (  ) 

void renderParticleBeacons ( LLDrawable drawablep  ) 

void renderPhysicalBeacons ( LLDrawable drawablep  ) 

void renderScriptedBeacons ( LLDrawable drawablep  ) 

void renderScriptedTouchBeacons ( LLDrawable drawablep  ) 

void renderSoundHighlights ( LLDrawable drawablep  ) 

Definition at line 1945 of file pipeline.cpp.

References LLDrawable::getFace(), LLDrawable::getNumFaces(), LLDrawable::getVObj(), LLViewerObject::isAudioSource(), LLPipeline::mHighlightFaces, S32, and LLPipeline::sRenderHighlight.

Referenced by LLPipeline::postSort().

Here is the call graph for this function:

Here is the caller graph for this function:

float sgn ( float  a  )  [inline]

Definition at line 4834 of file pipeline.cpp.

References F.

void validate_framebuffer_object (  ) 

Definition at line 4294 of file pipeline.cpp.

References llendl, llerrs, and indra::ipc::saranwrap::status().

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

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 113 of file pipeline.cpp.

Definition at line 115 of file pipeline.cpp.

Referenced by LLPipeline::setupAvatarLights().

Definition at line 114 of file pipeline.cpp.

Definition at line 116 of file pipeline.cpp.

Referenced by LLPipeline::setupAvatarLights().

Definition at line 134 of file pipeline.cpp.

Referenced by LLPipeline::setupAvatarLights().

const LLMatrix4* gGLLastMatrix = NULL

const U32 gl_cube_face[] [static]

Initial value:

 
{
        GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,
        GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
        GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,
        GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,
        GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,
        GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,
}

Definition at line 233 of file pipeline.cpp.

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

Definition at line 139 of file pipeline.cpp.

Referenced by LLDrawable::addFace(), LLFrameStats::addFrameData(), LLViewerPartGroup::addPart(), LLViewerWindow::analyzeHit(), LLVOVolume::animateTextures(), LLRenderPass::applyModelMatrix(), LLDrawPoolBump::beginBump(), LLDrawPoolAvatar::beginFootShadow(), LLDrawPoolBump::beginFullbrightShiny(), LLDrawPoolTree::beginRenderPass(), LLDrawPoolAlpha::beginRenderPass(), LLDrawPoolAvatar::beginRigid(), LLDrawPoolBump::beginShiny(), LLDrawPoolAvatar::beginSkinned(), LLAgent::calcFocusPositionTargetGlobal(), LLVOSky::calcSkyColorInDir(), LLVOSky::calcSkyColorWLFrag(), LLDrawable::cleanupReferences(), LLVOWLSky::createDrawable(), LLVOWater::createDrawable(), LLVOVolume::createDrawable(), LLVOSky::createDrawable(), LLVOGround::createDrawable(), LLVOAvatar::createDrawable(), LLVOSky::createDummyVertexBuffer(), LLVOSurfacePatch::dirtyGeom(), LLDrawPoolTerrain::dirtyTextures(), display(), display_startup(), LLVolumeImplFlexible::doIdleUpdate(), LLVOWLSky::drawDome(), LLViewerJointMesh::drawShape(), LLOctreeCull::earlyFail(), LLDrawPoolBump::endBump(), LLDrawPoolAvatar::endFootShadow(), LLDrawPoolBump::endFullbrightShiny(), LLDrawPoolTree::endRenderPass(), LLDrawPoolAlpha::endRenderPass(), LLDrawPoolBump::endShiny(), LLDrawPoolAvatar::endSkinned(), LLViewerWindow::getObjectUnderCursor(), LLVOAvatar::getOffObject(), LLVOSurfacePatch::getPool(), LLDrawable::getSpatialPartition(), LLViewerWindow::handlePerFrameHover(), handleReleaseGLBufferChanged(), handleRenderLightingDetailChanged(), handleRenderUseFBOChanged(), handleRenderUseVBOChanged(), handleResetVertexBuffersChanged(), LLManipTranslate::highlightIntersection(), LLAppViewer::idle(), LLVOTextBubble::idleUpdate(), LLVOGround::idleUpdate(), LLVOGrass::idleUpdate(), LLVOClouds::idleUpdate(), LLVOAvatar::idleUpdate(), LLSky::init(), init_stat_view(), LLAppViewer::initWindow(), LLImagePreviewAvatar::LLImagePreviewAvatar(), LLPreviewAnimation::LLPreviewAnimation(), LLViewerPartGroup::LLViewerPartGroup(), LLShaderMgr::loadBasicShaders(), LLDrawable::makeActive(), LLDrawable::makeStatic(), LLViewerObject::markForUpdate(), LLSpatialBridge::move(), output_statistics(), LLVOVolume::parameterChanged(), LLDrawPoolClouds::prerender(), process_kill_object(), LLOctreeCull::processGroup(), LLSpatialPartition::processImagery(), LLVOVolume::processUpdateMessage(), LLVOGrass::processUpdateMessage(), LLViewerObject::processUpdateMessage(), LLWLParamManager::propagateParameters(), LLWaterParamManager::propagateParameters(), LLDrawPoolBump::pushBatch(), LLRenderPass::pushBatch(), LLRenderPass::pushBatches(), LLFace::pushVertices(), LLViewerWindow::rawSnapshot(), LLManip::rebuild(), LLVolumeGeometryManager::rebuildGeom(), LLFloaterHardwareSettings::refreshEnabledState(), LLViewerObject::removeChild(), LLTexLayerParamAlpha::render(), LLTexLayer::render(), LLImagePreviewSculpted::render(), LLDrawPoolWLSky::render(), LLDrawPoolWater::render(), LLDrawPoolTerrain::render(), LLDrawPoolSky::render(), LLDrawPoolSimple::render(), LLDrawPoolGlow::render(), LLDrawPoolGround::render(), LLDrawPoolClouds::render(), LLDrawPoolInvisible::render(), LLDrawPoolBump::render(), LLDrawPoolAlpha::render(), render_hud_attachments(), render_ui_and_swap(), LLDrawPoolAlpha::renderAlpha(), LLDrawPoolAlpha::renderAlphaHighlight(), LLDrawPoolAvatar::renderAvatars(), LLDrawPoolBump::renderBump(), LLSpatialPartition::renderDebug(), LLDrawPoolBump::renderFullbrightShiny(), LLDrawPoolBump::renderGroup(), LLDrawPoolAlpha::renderGroupAlpha(), LLRenderPass::renderGroups(), LLDrawPoolWLSky::renderHeavenlyBodies(), LLDrawPoolBump::renderShiny(), LLDrawPoolWLSky::renderSkyClouds(), LLDrawPoolWLSky::renderSkyHaze(), LLDrawPoolWLSky::renderStars(), reset_statistics(), LLVOAvatar::resetHUDAttachments(), LLVOWLSky::resetVertexBuffers(), LLSky::resetVertexBuffers(), LLVOWLSky::restoreGL(), LLVOSky::restoreGL(), LLViewerWindow::restoreGL(), LLVOAvatar::restoreMeshData(), LLSelectMgr::selectionMove(), LLSelectMgr::selectionResetRotation(), LLSelectMgr::selectionRotateAroundZ(), LLVOVolume::setDrawableParent(), LLViewerObject::setDrawableParent(), LLVOVolume::setIsLight(), LLVOVolume::setLightColor(), LLViewerObject::setNumTEs(), LLVOVolume::setParent(), LLFace::setPool(), LLViewerObject::setPositionAbsoluteGlobal(), LLVOVolume::setScale(), LLShaderMgr::setShaders(), LLVOVolume::setTEBumpmap(), LLViewerObject::setTEBumpmap(), LLVOVolume::setTEColor(), LLViewerObject::setTEColor(), LLVOVolume::setTEFullbright(), LLViewerObject::setTEFullbright(), LLVOVolume::setTEGlow(), LLViewerObject::setTEGlow(), LLVOVolume::setTEImage(), LLViewerObject::setTEImage(), LLVOVolume::setTEMediaFlags(), LLViewerObject::setTEMediaFlags(), LLViewerObject::setTEOffset(), LLViewerObject::setTEOffsetS(), LLViewerObject::setTEOffsetT(), LLViewerObject::setTERotation(), LLVOVolume::setTEScale(), LLViewerObject::setTEScale(), LLVOVolume::setTEScaleS(), LLViewerObject::setTEScaleS(), LLVOVolume::setTEScaleT(), LLViewerObject::setTEScaleT(), LLVOVolume::setTEShiny(), LLVOVolume::setTETexGen(), LLVOVolume::setTETexture(), LLViewerObject::setTETextureCore(), LLSpatialBridge::setVisible(), LLVOTextBubble::setVolume(), LLDrawPoolWater::shade(), LLVOAvatar::shame(), LLDrawable::shiftPos(), LLVOAvatar::sitOnObject(), LLVOAvatar::slamPosition(), LLViewerWindow::stopGL(), LLFloaterEnvSettings::syncMenu(), LLAgent::teleportCore(), LLViewerWindow::thumbnailSnapshot(), LLOctreeRenderNonOccluded::traverse(), LLShaderMgr::unloadShaders(), LLWLParamManager::update(), LLWaterParamManager::update(), LLDebugText::update(), LLViewerPartSourceScript::update(), LLAgent::updateCamera(), LLVOGrass::updateDrawable(), LLVOClouds::updateDrawable(), LLStaticViewerObject::updateDrawable(), LLViewerObject::updateDrawable(), LLSelectMgr::updateEffects(), LLVOSky::updateFog(), LLVOWater::updateGeometry(), LLVOTextBubble::updateGeometry(), LLVOSky::updateGeometry(), LLVOPartGroup::updateGeometry(), LLVOGround::updateGeometry(), LLVOClouds::updateGeometry(), LLVOAvatar::updateGeometry(), LLViewerImageList::updateImages(), LLVOAvatar::updateImpostors(), LLVOVolume::updateLOD(), LLVOGrass::updateLOD(), LLViewerPartGroup::updateParticles(), LLDrawable::updatePartition(), LLWLParamManager::updateShaderUniforms(), LLViewerPartSim::updateSimulation(), LLVOSky::updateSky(), LLSky::updateSky(), LLVOVolume::updateTEData(), LLDrawable::updateTexture(), LLVOVolume::updateTextures(), LLVOGrass::updateTextures(), LLVOAvatar::updateTextures(), LLWorld::updateWaterObjects(), LLDrawable::updateXform(), LLOctreeRenderNonOccluded::visit(), LLOctreeDirty::visit(), LLOctreeMarkNotCulled::visit(), LLDrawPoolTerrain::~LLDrawPoolTerrain(), and LLViewerWindow::~LLViewerWindow().

Definition at line 117 of file pipeline.cpp.

Referenced by LLPipeline::updateMove().

Definition at line 122 of file pipeline.cpp.

Definition at line 118 of file pipeline.cpp.

const U32 REFLECTION_MAP_RES = 128

Definition at line 119 of file pipeline.cpp.

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

LLCullResult* sCull = NULL [static]

Definition at line 231 of file pipeline.cpp.

S32 sDelayedVBOEnable = 0 [static]

Definition at line 132 of file pipeline.cpp.

Referenced by LLPipeline::destroyGL(), and LLPipeline::updateGeom().


Generated on Fri May 16 08:38:12 2008 for SecondLife by  doxygen 1.5.5