本文整理汇总了C++中LLPipeline::markGLRebuild方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPipeline::markGLRebuild方法的具体用法?C++ LLPipeline::markGLRebuild怎么用?C++ LLPipeline::markGLRebuild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPipeline
的用法示例。
在下文中一共展示了LLPipeline::markGLRebuild方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateTexture
BOOL LLSurfacePatch::updateTexture()
{
if (mSTexUpdate) // Update texture as needed
{
F32 meters_per_grid = getSurface()->getMetersPerGrid();
F32 grids_per_patch_edge = (F32)getSurface()->getGridsPerPatchEdge();
if ((!getNeighborPatch(EAST) || getNeighborPatch(EAST)->getHasReceivedData())
&& (!getNeighborPatch(WEST) || getNeighborPatch(WEST)->getHasReceivedData())
&& (!getNeighborPatch(SOUTH) || getNeighborPatch(SOUTH)->getHasReceivedData())
&& (!getNeighborPatch(NORTH) || getNeighborPatch(NORTH)->getHasReceivedData()))
{
LLViewerRegion *regionp = getSurface()->getRegion();
LLVector3d origin_region = getOriginGlobal() - getSurface()->getOriginGlobal();
// Have to figure out a better way to deal with these edge conditions...
LLVLComposition* comp = regionp->getComposition();
if (!mHeightsGenerated)
{
F32 patch_size = meters_per_grid*(grids_per_patch_edge+1);
if (comp->generateHeights((F32)origin_region[VX], (F32)origin_region[VY],
patch_size, patch_size))
{
mHeightsGenerated = TRUE;
}
else
{
return FALSE;
}
}
if (comp->generateComposition())
{
if (mVObjp)
{
mVObjp->dirtyGeom();
gPipeline.markGLRebuild(mVObjp);
return TRUE;
}
}
}
return FALSE;
}
else
{
return TRUE;
}
}