diff options
author | Oz Linden <oz@lindenlab.com> | 2011-02-11 11:38:27 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-02-11 11:38:27 -0500 |
commit | 924be3f25c2fca57a8d6f5f902eaeca5c2dd91e1 (patch) | |
tree | 3ba82720ba6b24830637999bfa605e786d814ced /indra/newview/pipeline.cpp | |
parent | 40abc0fe1e6edd2f018fcdc35ffccdb5475a5fe0 (diff) | |
parent | 547b40bfc8b0139789a2d9c5dcd1591343a2c60b (diff) |
pull back release tag from viewer-beta
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 61 |
1 files changed, 34 insertions, 27 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 15477e0a80..39bc354250 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1967,12 +1967,12 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) if(drawablep && !drawablep->isDead()) { - if (drawablep->isSpatialBridge()) - { + if (drawablep->isSpatialBridge()) + { const LLDrawable* root = ((LLSpatialBridge*) drawablep)->mDrawable; llassert(root); // trying to catch a bad assumption if (root && // // this test may not be needed, see above - root->getVObj()->isAttachment()) + root->getVObj()->isAttachment()) { LLDrawable* rootparent = root->getParent(); if (rootparent) // this IS sometimes NULL @@ -1980,24 +1980,24 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) LLViewerObject *vobj = rootparent->getVObj(); llassert(vobj); // trying to catch a bad assumption if (vobj) // this test may not be needed, see above - { + { const LLVOAvatar* av = vobj->asAvatar(); - if (av && av->isImpostor()) - { - return; - } - } + if (av && av->isImpostor()) + { + return; + } + } } } - sCull->pushBridge((LLSpatialBridge*) drawablep); - } - else - { - sCull->pushDrawable(drawablep); - } + sCull->pushBridge((LLSpatialBridge*) drawablep); + } + else + { + sCull->pushDrawable(drawablep); + } - drawablep->setVisible(camera); -} + drawablep->setVisible(camera); + } } void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) @@ -5432,7 +5432,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) gGL.setColorMask(true, true); glClearColor(0,0,0,0); - if (for_snapshot) + /*if (for_snapshot) { gGL.getTexUnit(0)->bind(&mGlow[1]); { @@ -5443,14 +5443,21 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) // If the snapshot is constructed from tiles, calculate which // tile we're in. - const S32 num_horizontal_tiles = llceil(zoom_factor); - const LLVector2 tile(subfield % num_horizontal_tiles, - (S32)(subfield / num_horizontal_tiles)); - llassert(zoom_factor > 0.0); // Non-zero, non-negative. - const F32 tile_size = 1.0/zoom_factor; - - tc1 = tile*tile_size; // Top left texture coordinates - tc2 = (tile+LLVector2(1,1))*tile_size; // Bottom right texture coordinates + + //from LLViewerCamera::setPerpsective + if (zoom_factor > 1.f) + { + int pos_y = subfield / llceil(zoom_factor); + int pos_x = subfield - (pos_y*llceil(zoom_factor)); + F32 size = 1.f/zoom_factor; + + tc1.set(pos_x*size, pos_y*size); + tc2 = tc1 + LLVector2(size,size); + } + else + { + tc2.set(1,1); + } LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_ADD); @@ -5483,7 +5490,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) glPopMatrix(); return; - } + }*/ { { |