diff options
Diffstat (limited to 'indra/newview/llvotree.cpp')
-rw-r--r-- | indra/newview/llvotree.cpp | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 8b229ec98b..a981c60ef2 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -135,10 +135,7 @@ void LLVOTree::initClass() LLUUID id; S32 S32_val; - BOOL success = TRUE; - - - + bool success{ true }; S32 species; static LLStdStringHandle species_id_string = LLXmlTree::addAttributeString("species_id"); if (!tree_def->getFastAttributeS32(species_id_string, species)) @@ -250,7 +247,7 @@ void LLVOTree::initClass() } } - BOOL have_all_trees = TRUE; + bool have_all_trees {true}; std::string err; for (S32 i=0;i<sMaxTreeSpecies;++i) @@ -258,7 +255,7 @@ void LLVOTree::initClass() if (!sSpeciesTable.count(i)) { err.append(llformat(" %d",i)); - have_all_trees = FALSE; + have_all_trees = false; } } @@ -322,7 +319,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, // Load Species-Specific data // static const S32 MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 32 ; //frames. - mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mTreeImagep->setMaxVirtualSizeResetInterval(MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); //allow to wait for at most 16 frames to reset virtual size. mBranchLength = sSpeciesTable[mSpecies]->mBranchLength; @@ -473,7 +470,7 @@ void LLVOTree::updateTextures() LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); - mDrawable->setLit(FALSE); + mDrawable->setLit(false); mDrawable->setRenderType(LLPipeline::RENDER_TYPE_TREE); @@ -493,7 +490,7 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) const S32 LEAF_INDICES = 24; const S32 LEAF_VERTICES = 16; -BOOL LLVOTree::updateGeometry(LLDrawable *drawable) +bool LLVOTree::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED; @@ -505,7 +502,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) { facep->setVertexBuffer(NULL); } - return TRUE ; + return true ; } if (mDrawable->getFace(0) && @@ -522,7 +519,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) S32 lod; LLFace *face = drawable->getFace(0); - if (!face) return TRUE; + if (!face) return true; face->mCenterAgent = getPositionAgent(); face->mCenterLocal = face->mCenterAgent; @@ -545,7 +542,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) << max_vertices << " vertices and " << max_indices << " indices" << LL_ENDL; mReferenceBuffer = NULL; //unref - return TRUE; + return true; } LLStrider<LLVector3> vertices; @@ -874,7 +871,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) //generate tree mesh updateMesh(); - return TRUE; + return true; } void LLVOTree::updateMesh() @@ -1174,14 +1171,14 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) mDrawable->setPositionGroup(pos); } -BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp, +bool LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { if (!lineSegmentBoundingBox(start, end)) { - return FALSE; + return false; } const LLVector4a* exta = mDrawable->getSpatialExtents(); @@ -1218,10 +1215,10 @@ BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& e { normal->load3(norm.mV); } - return TRUE; + return true; } - return FALSE; + return false; } U32 LLVOTree::getPartitionType() const @@ -1230,7 +1227,7 @@ U32 LLVOTree::getPartitionType() const } LLTreePartition::LLTreePartition(LLViewerRegion* regionp) -: LLSpatialPartition(0, FALSE, regionp) +: LLSpatialPartition(0, false, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_TREE; mPartitionType = LLViewerRegion::PARTITION_TREE; |