Removed dead code related to 'RenderForSelect'.

This commit is contained in:
Shyotl
2011-08-09 02:11:10 -05:00
parent 9bda97786f
commit 04ea6a967e
27 changed files with 8 additions and 636 deletions

View File

@@ -169,10 +169,7 @@ public:
LLFacePool(const U32 type);
virtual ~LLFacePool();
virtual void renderForSelect() {}; //Override if neded.
BOOL isDead() { return mReferences.empty(); }
virtual void renderFaceSelected(LLFace *facep, LLViewerTexture *image, const LLColor4 &color,
const S32 index_offset = 0, const S32 index_count = 0) {}; //Override if neded.
virtual LLViewerTexture *getTexture();
virtual void dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures);

View File

@@ -1641,83 +1641,6 @@ void LLDrawPoolAvatar::renderRiggedGlow(LLVOAvatar* avatar)
}
#endif //MESH_ENABLED
//-----------------------------------------------------------------------------
// renderForSelect()
//-----------------------------------------------------------------------------
void LLDrawPoolAvatar::renderForSelect()
{
if (!gRenderAvatar)
{
return;
}
if (mDrawFace.empty())
{
return;
}
const LLFace *facep = mDrawFace[0];
if (!facep->getDrawable())
{
return;
}
LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get();
if (avatarp->isDead() || avatarp->mIsDummy || avatarp->mDrawable.isNull())
{
return;
}
S32 curr_shader_level = getVertexShaderLevel();
S32 name = avatarp->mDrawable->getVObj()->mGLName;
LLColor4U color((U8)(name >> 16), (U8)(name >> 8), (U8)name);
BOOL impostor = avatarp->isImpostor();
if (impostor)
{
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_COLOR);
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
avatarp->renderImpostor(color);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
return;
}
sVertexProgram = &gAvatarPickProgram;
if (curr_shader_level > 0)
{
gAvatarMatrixParam = sVertexProgram->mUniform[LLViewerShaderMgr::AVATAR_MATRIX];
}
gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.2f);
gGL.setSceneBlendType(LLRender::BT_REPLACE);
glColor4ubv(color.mV);
if (curr_shader_level > 0) // for hardware blending
{
sRenderingSkinned = TRUE;
sVertexProgram->bind();
enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
}
avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE);
// if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done
if (curr_shader_level > 0)
{
sRenderingSkinned = FALSE;
sVertexProgram->unbind();
disable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);
}
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
// restore texture mode
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
//-----------------------------------------------------------------------------
// getDebugTexture()
//-----------------------------------------------------------------------------

View File

@@ -76,7 +76,6 @@ public:
/*virtual*/ void endRenderPass(S32 pass);
/*virtual*/ void prerender();
/*virtual*/ void render(S32 pass = 0);
/*virtual*/ void renderForSelect();
/*virtual*/ S32 getNumDeferredPasses();
/*virtual*/ void beginDeferredPass(S32 pass);

View File

@@ -905,28 +905,6 @@ void LLDrawPoolTerrain::renderOwnership()
glMatrixMode(GL_MODELVIEW);
}
void LLDrawPoolTerrain::renderForSelect()
{
if (mDrawFace.empty())
{
return;
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
{
LLFace *facep = *iter;
if (!facep->getDrawable()->isDead() && (facep->getDrawable()->getVObj()->mGLName))
{
facep->renderForSelect(LLVertexBuffer::MAP_VERTEX);
}
}
}
void LLDrawPoolTerrain::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures)
{
LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(mTexturep) ;

View File

@@ -74,7 +74,6 @@ public:
/*virtual*/ void prerender();
/*virtual*/ void beginRenderPass( S32 pass );
/*virtual*/ void endRenderPass( S32 pass );
/*virtual*/ void renderForSelect();
/*virtual*/ void dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures);
/*virtual*/ LLViewerTexture *getTexture();
/*virtual*/ LLViewerTexture *getDebugTexture();

View File

@@ -191,71 +191,6 @@ void LLDrawPoolTree::endShadowPass(S32 pass)
//gDeferredShadowProgram.unbind();
}
void LLDrawPoolTree::renderForSelect()
{
if (mDrawFace.empty())
{
return;
}
LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f);
LLGLSObjectSelectAlpha gls_alpha;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.setSceneBlendType(LLRender::BT_REPLACE);
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
static const LLCachedControl<bool> render_animate_trees("RenderAnimateTrees",false);
if (render_animate_trees)
{
renderTree(TRUE);
}
else
{
gGL.getTexUnit(sDiffTex)->bind(mTexturep);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
{
LLFace *face = *iter;
LLDrawable *drawablep = face->getDrawable();
if (drawablep->isDead() || face->getVertexBuffer())
{
continue;
}
// Render each of the trees
LLVOTree *treep = (LLVOTree *)drawablep->getVObj().get();
LLColor4U color(255,255,255,255);
if (treep->mGLName != 0)
{
S32 name = treep->mGLName;
color = LLColor4U((U8)(name >> 16), (U8)(name >> 8), (U8)name, 255);
LLFacePool::LLOverrideFaceColor col(this, color);
LLVertexBuffer *buff = face->getVertexBuffer();
buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
buff->drawRange(LLRender::TRIANGLES, 0, buff->getRequestedVerts()-1, buff->getRequestedIndices(), 0);
gPipeline.addTrianglesDrawn(buff->getRequestedIndices()/3);
}
}
}
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
void LLDrawPoolTree::renderTree(BOOL selecting)
{
LLGLState normalize(GL_NORMALIZE, TRUE);

View File

@@ -68,7 +68,6 @@ public:
/*virtual*/ void render(S32 pass = 0);
/*virtual*/ void endRenderPass( S32 pass );
/*virtual*/ S32 getNumPasses() { return 1; }
/*virtual*/ void renderForSelect();
/*virtual*/ BOOL verify() const;
/*virtual*/ LLViewerTexture *getTexture();
/*virtual*/ LLViewerTexture *getDebugTexture();

View File

@@ -478,83 +478,6 @@ void LLFace::updateCenterAgent()
}
}
void LLFace::renderForSelect(U32 data_mask)
{
if(mDrawablep.isNull() || mVertexBuffer.isNull())
{
return;
}
LLSpatialGroup* group = mDrawablep->getSpatialGroup();
if (!group || group->isState(LLSpatialGroup::GEOM_DIRTY))
{
return;
}
if (mVObjp->mGLName)
{
S32 name = mVObjp->mGLName;
LLColor4U color((U8)(name >> 16), (U8)(name >> 8), (U8)name);
#if 0 // *FIX: Postponing this fix until we have texcoord pick info...
if (mTEOffset != -1)
{
color.mV[VALPHA] = (U8)(getTextureEntry()->getColor().mV[VALPHA] * 255.f);
}
#endif
glColor4ubv(color.mV);
if (!getPool())
{
switch (getPoolType())
{
case LLDrawPool::POOL_ALPHA:
gGL.getTexUnit(0)->bind(getTexture());
break;
default:
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
break;
}
}
mVertexBuffer->setBuffer(data_mask);
#if !LL_RELEASE_FOR_DOWNLOAD
LLGLState::checkClientArrays("", data_mask);
#endif
if (mTEOffset != -1)
{
// mask off high 4 bits (16 total possible faces)
color.mV[0] &= 0x0f;
color.mV[0] |= (mTEOffset & 0x0f) << 4;
glColor4ubv(color.mV);
}
if (mIndicesCount)
{
if (isState(GLOBAL))
{
if (mDrawablep->getVOVolume())
{
glPushMatrix();
glMultMatrixf((float*) mDrawablep->getRegion()->mRenderMatrix.mMatrix);
mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
glPopMatrix();
}
else
{
mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
}
}
else
{
glPushMatrix();
glMultMatrixf((float*)getRenderMatrix().mMatrix);
mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
glPopMatrix();
}
}
}
}
void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
{
if (mDrawablep->getSpatialGroup() == NULL)

View File

@@ -196,7 +196,6 @@ public:
void updateCenterAgent(); // Update center when xform has changed.
void renderSelectedUV();
void renderForSelect(U32 data_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0);
void renderSelected(LLViewerTexture *image, const LLColor4 &color);
F32 getKey() const { return mDistance; }

View File

@@ -1137,8 +1137,6 @@ LLViewerWindow::ESnapshotType LLFloaterSnapshot::Impl::getLayerType(LLFloaterSna
type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
else if (id == "depth")
type = LLViewerWindow::SNAPSHOT_TYPE_DEPTH;
else if (id == "objects")
type = LLViewerWindow::SNAPSHOT_TYPE_OBJECT_ID;
return type;
}

View File

@@ -819,12 +819,6 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
x2 = x1 + PARCEL_GRID_STEP_METERS;
y2 = y1;
if (gRenderForSelect)
{
LLColor4U color((U8)(GL_NAME_PARCEL_WALL >> 16), (U8)(GL_NAME_PARCEL_WALL >> 8), (U8)GL_NAME_PARCEL_WALL);
gGL.color4ubv(color.mV);
}
else
{
dy = (pos_y - y1) + DIST_OFFSET;
@@ -865,12 +859,6 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
x2 = x1;
y2 = y1 + PARCEL_GRID_STEP_METERS;
if (gRenderForSelect)
{
LLColor4U color((U8)(GL_NAME_PARCEL_WALL >> 16), (U8)(GL_NAME_PARCEL_WALL >> 8), (U8)GL_NAME_PARCEL_WALL);
gGL.color4ubv(color.mV);
}
else
{
dx = (pos_x - x1) + DIST_OFFSET;

View File

@@ -208,11 +208,6 @@ void LLHUDIcon::render()
renderIcon(FALSE);
}
void LLHUDIcon::renderForSelect()
{
renderIcon(TRUE);
}
BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& end, LLVector3* intersection)
{
if (mHidden)

View File

@@ -58,7 +58,6 @@ friend class LLHUDObject;
public:
/*virtual*/ void render();
/*virtual*/ void renderForSelect();
/*virtual*/ void markDead();
/*virtual*/ F32 getDistance() const { return mDistance; }

View File

@@ -286,26 +286,6 @@ void LLHUDObject::renderAll()
LLVertexBuffer::unbind();
}
// static
void LLHUDObject::renderAllForSelect()
{
LLHUDObject *hud_objp;
hud_object_list_t::iterator object_it;
for (object_it = sHUDObjects.begin(); object_it != sHUDObjects.end(); )
{
hud_object_list_t::iterator cur_it = object_it++;
hud_objp = (*cur_it);
if (hud_objp->getNumRefs() == 1)
{
sHUDObjects.erase(cur_it);
}
else if (hud_objp->isVisible())
{
hud_objp->renderForSelect();
}
}
}
// static
void LLHUDObject::renderAllForTimer()
{

View File

@@ -74,7 +74,6 @@ public:
static LLHUDEffect *addHUDEffect(const U8 type);
static void updateAll();
static void renderAll();
static void renderAllForSelect();
static void renderAllForTimer();
static void cleanupHUDObjects();
@@ -106,7 +105,6 @@ protected:
~LLHUDObject();
virtual void render() = 0;
virtual void renderForSelect() {} //Only override when needed.
virtual void renderForTimer() {};
protected:

View File

@@ -239,15 +239,6 @@ void LLHUDText::render()
}
}
void LLHUDText::renderForSelect()
{
if (!mOnHUDAttachment)
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
renderText(TRUE);
}
}
void LLHUDText::renderText(BOOL for_select)
{
if (!mVisible || mHidden)

View File

@@ -146,7 +146,6 @@ protected:
LLHUDText(const U8 type);
/*virtual*/ void render();
/*virtual*/ void renderForSelect();
void renderText(BOOL for_select);
static void updateAll();
void setLOD(S32 lod);

View File

@@ -263,7 +263,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
// if object is transparent, defer it, otherwise
// give the joint subclass a chance to draw itself
//----------------------------------------------------------------
if ( gRenderForSelect || is_dummy )
if ( is_dummy )
{
triangle_count += drawShape( pixelArea, first_pass, is_dummy );
}

View File

@@ -68,7 +68,6 @@ extern PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB;
extern PFNGLWEIGHTFVARBPROC glWeightfvARB;
extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB;
#endif
extern BOOL gRenderForSelect;
static LLPointer<LLVertexBuffer> sRenderBuffer = NULL;
static const U32 sRenderMask = LLVertexBuffer::MAP_VERTEX |
@@ -533,17 +532,14 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
//----------------------------------------------------------------
// setup current color
//----------------------------------------------------------------
if (!gRenderForSelect)
{
if (is_dummy)
glColor4fv(LLVOAvatar::getDummyColor().mV);
else
glColor4fv(mColor.mV);
}
if (is_dummy)
glColor4fv(LLVOAvatar::getDummyColor().mV);
else
glColor4fv(mColor.mV);
stop_glerror();
LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), (mFace->getPool()->getVertexShaderLevel() > 0 && !gRenderForSelect) ? 0.f : mShiny);
LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), (mFace->getPool()->getVertexShaderLevel() > 0) ? 0.f : mShiny);
//----------------------------------------------------------------
// setup current texture
@@ -598,19 +594,6 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
gGL.getTexUnit(diffuse_channel)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR));
}
if (gRenderForSelect)
{
if (isTransparent())
{
gGL.getTexUnit(diffuse_channel)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
gGL.getTexUnit(diffuse_channel)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_CONST_ALPHA);
}
else
{
gGL.getTexUnit(diffuse_channel)->unbind(LLTexUnit::TT_TEXTURE);
}
}
mFace->getVertexBuffer()->setBuffer(sRenderMask);
U32 start = mMesh->mFaceVertexOffset;

View File

@@ -1660,12 +1660,6 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 &center)
{
}
void LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent)
{
generatePickList(camera);
renderPickList(screen_rect, pick_parcel_wall, render_transparent);
}
void LLViewerObjectList::generatePickList(LLCamera &camera)
{
LLViewerObject *objectp;
@@ -1789,34 +1783,6 @@ void LLViewerObjectList::generatePickList(LLCamera &camera)
}
}
void LLViewerObjectList::renderPickList(const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent)
{
gRenderForSelect = TRUE;
gPipeline.renderForSelect(mSelectPickList, render_transparent, screen_rect);
//
// Render pass for selected objects
//
gGL.color4f(1,1,1,1);
gViewerWindow->renderSelections( TRUE, pick_parcel_wall, FALSE );
//fix for DEV-19335. Don't pick hud objects when customizing avatar (camera mode doesn't play nice with nametags).
if (!gAgentCamera.cameraCustomizeAvatar())
{
// render pickable ui elements, like names, etc.
LLHUDObject::renderAllForSelect();
}
gGL.flush();
LLVertexBuffer::unbind();
gRenderForSelect = FALSE;
//llinfos << "Rendered " << count << " for select" << llendl;
//llinfos << "Took " << pick_timer.getElapsedTimeF32()*1000.f << "ms to pick" << llendl;
}
LLViewerObject *LLViewerObjectList::getSelectedObject(const U32 object_id)
{
std::set<LLViewerObject*>::iterator pick_it;

View File

@@ -135,9 +135,7 @@ public:
void updateAvatarVisibility();
// Selection related stuff
void renderObjectsForSelect(LLCamera &camera, const LLRect& screen_rect, BOOL pick_parcel_wall = FALSE, BOOL render_transparent = TRUE);
void generatePickList(LLCamera &camera);
void renderPickList(const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent);
LLViewerObject *getSelectedObject(const U32 object_id);

View File

@@ -3586,77 +3586,6 @@ void LLViewerWindow::schedulePick(LLPickInfo& pick_info)
}
llassert_always(pick_info.mScreenRegion.notEmpty());
mPicks.push_back(pick_info);
/*S32 scaled_x = llround((F32)pick_info.mMousePt.mX * mDisplayScale.mV[VX]);
S32 scaled_y = llround((F32)pick_info.mMousePt.mY * mDisplayScale.mV[VY]);
// Default to not hitting anything
LLCamera pick_camera;
pick_camera.setOrigin(LLViewerCamera::getInstance()->getOrigin());
pick_camera.setOriginAndLookAt(LLViewerCamera::getInstance()->getOrigin(),
LLViewerCamera::getInstance()->getUpAxis(),
LLViewerCamera::getInstance()->getOrigin() + mouseDirectionGlobal(pick_info.mMousePt.mX, pick_info.mMousePt.mY));
pick_camera.setView(0.5f*DEG_TO_RAD);
pick_camera.setNear(LLViewerCamera::getInstance()->getNear());
pick_camera.setFar(LLViewerCamera::getInstance()->getFar());
pick_camera.setAspect(1.f);
// save our drawing state
// *TODO: should we be saving using the new method here using
// glh_get_current_projection/glh_set_current_projection? -brad
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
// clear work area
{
LLGLState scissor_state(GL_SCISSOR_TEST);
scissor_state.enable();
glScissor(pick_info.mScreenRegion.mLeft, pick_info.mScreenRegion.mBottom, pick_info.mScreenRegion.getWidth(), pick_info.mScreenRegion.getHeight());
glClearColor(0.f, 0.f, 0.f, 0.f);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
//glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
// build perspective transform and picking viewport
// Perform pick on a PICK_DIAMETER x PICK_DIAMETER pixel region around cursor point.
// Don't limit the select distance for this pick.
LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION, scaled_x - PICK_HALF_WIDTH, scaled_y - PICK_HALF_WIDTH, PICK_DIAMETER, PICK_DIAMETER, FALSE);
// render for object picking
// make viewport big enough to handle antialiased frame buffers
gGLViewport[0] = pick_info.mScreenRegion.mLeft;
gGLViewport[1] = pick_info.mScreenRegion.mBottom;
gGLViewport[2] = pick_info.mScreenRegion.getWidth();
gGLViewport[3] = pick_info.mScreenRegion.getHeight();
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
LLViewerCamera::updateFrustumPlanes(pick_camera);
stop_glerror();
// Draw the objects so the user can select them.
// The starting ID is 1, since land is zero.
LLRect pick_region;
pick_region.setOriginAndSize(pick_info.mMousePt.mX - PICK_HALF_WIDTH,
pick_info.mMousePt.mY - PICK_HALF_WIDTH, PICK_DIAMETER, PICK_DIAMETER);
gObjectList.renderObjectsForSelect(pick_camera, pick_region, FALSE, pick_info.mPickTransparent);
stop_glerror();
// restore drawing state
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
setup3DRender();
setup2DRender();
setupViewport();*/
// delay further event processing until we receive results of pick
mWindow->delayInputProcessing();
@@ -4524,17 +4453,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
{
gDisplaySwapBuffers = FALSE;
gDepthDirty = TRUE;
if (type == SNAPSHOT_TYPE_OBJECT_ID)
{
glClearColor(0.f, 0.f, 0.f, 0.f);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
LLViewerCamera::getInstance()->setZoomParameters(scale_factor, subimage_x+(subimage_y*llceil(scale_factor)));
setup3DRender();
setupViewport();
gObjectList.renderPickList(gViewerWindow->getVirtualWindowRect(), FALSE, FALSE);
}
else
{
const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor));
display(do_rebuild, scale_factor, subfield, TRUE, is_tiling);
@@ -4563,7 +4481,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
LLAppViewer::instance()->pingMainloopTimeout("LLViewerWindow::rawSnapshot");
}
if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR)
if (type == SNAPSHOT_TYPE_COLOR)
{
glReadPixels(
subimage_x_offset,

View File

@@ -287,7 +287,6 @@ public:
{
SNAPSHOT_TYPE_COLOR,
SNAPSHOT_TYPE_DEPTH,
SNAPSHOT_TYPE_OBJECT_ID
};
BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR);
BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,

View File

@@ -5224,7 +5224,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
// *NOTE: this is disabled (there is no UI for enabling sShowFootPlane) due
// to DEV-14477. the code is left here to aid in tracking down the cause
// of the crash in the future. -brad
if (!gRenderForSelect && sShowFootPlane && mDrawable.notNull())
if (sShowFootPlane && mDrawable.notNull())
{
LLVector3 slaved_pos = mDrawable->getPositionAgent();
LLVector3 foot_plane_normal(mFootPlane.mV[VX], mFootPlane.mV[VY], mFootPlane.mV[VZ]);

View File

@@ -160,8 +160,6 @@ static S32 sDelayedVBOEnable = 0;
BOOL gAvatarBacklight = FALSE;
BOOL gRenderForSelect = FALSE;
BOOL gDebugPipeline = FALSE;
LLPipeline gPipeline;
const LLMatrix4* gGLLastMatrix = NULL;
@@ -3409,12 +3407,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
}
}
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING))
{
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect");
gObjectList.renderObjectsForSelect(camera, gViewerWindow->getVirtualWindowRect());
}
else
{
LLFastTimer t(LLFastTimer::FTM_POOLS);
@@ -4141,185 +4133,6 @@ void LLPipeline::renderDebug()
gGL.flush();
}
void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects, BOOL render_transparent, const LLRect& screen_rect)
{
assertInitialized();
gGL.setColorMask(true, false);
gPipeline.resetDrawOrders();
for (std::set<LLViewerObject*>::iterator iter = objects.begin(); iter != objects.end(); ++iter)
{
stateSort((*iter)->mDrawable, *LLViewerCamera::getInstance());
}
LLMemType mt(LLMemType::MTYPE_PIPELINE);
glMatrixMode(GL_MODELVIEW);
LLGLSDefault gls_default;
LLGLSObjectSelect gls_object_select;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLGLDepthTest gls_depth(GL_TRUE,GL_TRUE);
disableLights();
LLVertexBuffer::unbind();
//for each drawpool
LLGLState::checkStates();
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
U32 last_type = 0;
// If we don't do this, we crash something on changing graphics settings
// from Medium -> Low, because we unload all the shaders and the
// draw pools aren't aware. I don't know if this has to be a separate
// loop before actual rendering. JC
for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter)
{
LLDrawPool *poolp = *iter;
if (poolp->isFacePool() && hasRenderType(poolp->getType()))
{
poolp->prerender();
}
}
for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter)
{
LLDrawPool *poolp = *iter;
if (poolp->isFacePool() && hasRenderType(poolp->getType()))
{
LLFacePool* face_pool = (LLFacePool*) poolp;
face_pool->renderForSelect();
LLVertexBuffer::unbind();
gGLLastMatrix = NULL;
glLoadMatrixd(gGLModelView);
if (poolp->getType() != last_type)
{
last_type = poolp->getType();
LLGLState::checkStates();
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
}
}
}
LLGLEnable alpha_test(GL_ALPHA_TEST);
if (render_transparent)
{
gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f);
}
else
{
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.2f);
}
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_VERT_COLOR);
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
U32 prim_mask = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0;
for (std::set<LLViewerObject*>::iterator i = objects.begin(); i != objects.end(); ++i)
{
LLViewerObject* vobj = *i;
LLDrawable* drawable = vobj->mDrawable;
if (vobj->isDead() ||
vobj->isHUDAttachment() ||
(LLSelectMgr::getInstance()->mHideSelectedObjects && vobj->isSelected()) ||
drawable->isDead() ||
!hasRenderType(drawable->getRenderType()))
{
continue;
}
for (S32 j = 0; j < drawable->getNumFaces(); ++j)
{
LLFace* facep = drawable->getFace(j);
if (!facep->getPool())
{
facep->renderForSelect(prim_mask);
}
}
}
// pick HUD objects
LLVOAvatar* avatarp = gAgent.getAvatarObject();
if (avatarp && sShowHUDAttachments)
{
glh::matrix4f save_proj(glh_get_current_projection());
glh::matrix4f save_model(glh_get_current_modelview());
setup_hud_matrices(screen_rect);
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
iter != avatarp->mAttachmentPoints.end(); )
{
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
LLViewerJointAttachment* attachmentp = curiter->second;
if (attachmentp->getIsHUDAttachment())
{
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachmentp->mAttachedObjects.begin();
attachment_iter != attachmentp->mAttachedObjects.end();
++attachment_iter)
{
if (LLViewerObject* objectp = (*attachment_iter))
{
LLDrawable* drawable = objectp->mDrawable;
if (drawable->isDead())
{
continue;
}
for (S32 j = 0; j < drawable->getNumFaces(); ++j)
{
LLFace* facep = drawable->getFace(j);
if (!facep->getPool())
{
facep->renderForSelect(prim_mask);
}
}
//render child faces
LLViewerObject::const_child_list_t& child_list = objectp->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
{
LLViewerObject* child = *iter;
LLDrawable* child_drawable = child->mDrawable;
for (S32 l = 0; l < child_drawable->getNumFaces(); ++l)
{
LLFace* facep = child_drawable->getFace(l);
if (!facep->getPool())
{
facep->renderForSelect(prim_mask);
}
}
}
}
}
}
}
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(save_proj.m);
glh_set_current_projection(save_proj);
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(save_model.m);
glh_set_current_modelview(save_model);
}
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
LLVertexBuffer::unbind();
gGL.setColorMask(true, true);
}
void LLPipeline::rebuildPools()
{
LLMemType mt(LLMemType::MTYPE_PIPELINE);

View File

@@ -237,7 +237,6 @@ public:
void renderHighlights();
void renderDebug();
void renderForSelect(std::set<LLViewerObject*>& objects, BOOL render_transparent, const LLRect& screen_rect);
void rebuildPools(); // Rebuild pools
void findReferences(LLDrawable *drawablep); // Find the lists which have references to this object
@@ -680,7 +679,6 @@ void render_bbox(const LLVector3 &min, const LLVector3 &max);
void render_hud_elements();
extern LLPipeline gPipeline;
extern BOOL gRenderForSelect;
extern BOOL gDebugPipeline;
extern const LLMatrix4* gGLLastMatrix;

View File

@@ -151,9 +151,6 @@
<combo_item name="Depth" value="depth">
Depth
</combo_item>
<combo_item name="ObjectMattes" value="objects">
Object Mattes
</combo_item>
</combo_box>
<check_box bottom_delta="-20" follows="left|top" label="Show interface in snapshot"
left="10" name="ui_check" />