本文整理汇总了C++中LLViewerObject::boostTexturePriority方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerObject::boostTexturePriority方法的具体用法?C++ LLViewerObject::boostTexturePriority怎么用?C++ LLViewerObject::boostTexturePriority使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerObject
的用法示例。
在下文中一共展示了LLViewerObject::boostTexturePriority方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
virtual bool apply(LLViewerObject* objectp)
{
objectp->boostTexturePriority();
return true;
}
示例2: updateApparentAngles
void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
{
S32 i;
S32 num_objects = 0;
LLViewerObject *objectp;
S32 num_updates, max_value;
if (NUM_BINS - 1 == mCurBin)
{
num_updates = mObjects.count() - mCurLazyUpdateIndex;
max_value = mObjects.count();
gImageList.setUpdateStats(TRUE);
}
else
{
num_updates = (mObjects.count() / NUM_BINS) + 1;
max_value = llmin(mObjects.count(), mCurLazyUpdateIndex + num_updates);
}
if (!gNoRender)
{
// Slam priorities for textures that we care about (hovered, selected, and focused)
// Hovered
// Assumes only one level deep of parenting
objectp = gHoverView->getLastHoverObject();
if (objectp)
{
objectp->boostTexturePriority();
}
}
// Focused
objectp = gAgent.getFocusObject();
if (objectp)
{
objectp->boostTexturePriority();
}
// Selected
struct f : public LLSelectedObjectFunctor
{
virtual bool apply(LLViewerObject* objectp)
{
objectp->boostTexturePriority();
return true;
}
} func;
gSelectMgr->getSelection()->applyToRootObjects(&func);
// Iterate through some of the objects and lazy update their texture priorities
for (i = mCurLazyUpdateIndex; i < max_value; i++)
{
objectp = mObjects[i];
if (!objectp->isDead())
{
num_objects++;
// Update distance & gpw
objectp->setPixelAreaAndAngle(agent); // Also sets the approx. pixel area
objectp->updateTextures(agent); // Update the image levels of textures for this object.
}
}
mCurLazyUpdateIndex = max_value;
if (mCurLazyUpdateIndex == mObjects.count())
{
mCurLazyUpdateIndex = 0;
}
mCurBin = (++mCurBin) % NUM_BINS;
LLVOAvatar::cullAvatarsByPixelArea();
}