diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 410 |
1 files changed, 194 insertions, 216 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 1b816b88fb..2bb543f132 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -94,7 +94,7 @@ const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 1; -BOOL gAnimateTextures = TRUE; +bool gAnimateTextures = true; F32 LLVOVolume::sLODFactor = 1.f; F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop @@ -105,7 +105,7 @@ S32 LLVOVolume::mRenderComplexity_current = 0; LLPointer<LLObjectMediaDataClient> LLVOVolume::sObjectMediaClient = NULL; LLPointer<LLObjectMediaNavigateClient> LLVOVolume::sObjectMediaNavigateClient = NULL; -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; // Implementation class of LLMediaDataClientObject. See llmediadataclient.h class LLMediaDataClientObjectImpl : public LLMediaDataClientObject @@ -216,18 +216,18 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mRelativeXform.setIdentity(); mRelativeXformInvTrans.setIdentity(); - mFaceMappingChanged = FALSE; + mFaceMappingChanged = false; mLOD = MIN_LOD; mLODDistance = 0.0f; mLODAdjustedDistance = 0.0f; mLODRadius = 0.0f; mTextureAnimp = NULL; - mVolumeChanged = FALSE; + mVolumeChanged = false; mVObjRadius = LLVector3(1,1,0.5f).length(); mNumFaces = 0; - mLODChanged = FALSE; - mSculptChanged = FALSE; - mColorChanged = FALSE; + mLODChanged = false; + mSculptChanged = false; + mColorChanged = false; mSpotLightPriority = 0.f; mSkinInfoUnavaliable = false; @@ -405,7 +405,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; mTexAnimMode = 0; } } @@ -439,7 +439,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (update_type != OUT_TERSE_IMPROVED) { LLVolumeParams volume_params; - BOOL res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp); + bool res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp); if (!res) { LL_WARNS() << "Bogus volume parameters in object " << getID() << LL_ENDL; @@ -509,7 +509,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; mTexAnimMode = 0; } @@ -600,7 +600,7 @@ void LLVOVolume::animateTextures() { if (!mTexAnimMode) { - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; gPipeline.markTextured(mDrawable); } mTexAnimMode = result | mTextureAnimp->mMode; @@ -696,7 +696,7 @@ void LLVOVolume::animateTextures() } gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; mTexAnimMode = 0; } } @@ -709,11 +709,11 @@ void LLVOVolume::updateTextures() updateTextureVirtualSize(); } -BOOL LLVOVolume::isVisible() const +bool LLVOVolume::isVisible() const { if(mDrawable.notNull() && mDrawable->isVisible()) { - return TRUE ; + return true ; } if(isAttachment()) @@ -727,7 +727,7 @@ BOOL LLVOVolume::isVisible() const return objp && objp->mDrawable.notNull() && objp->mDrawable->isVisible() ; } - return FALSE ; + return false ; } void LLVOVolume::updateTextureVirtualSize(bool forced) @@ -859,7 +859,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) S32 lod = llmin(mLOD, 3); F32 lodf = ((F32)(lod + 1.0f)/4.f); F32 tex_size = lodf * LLViewerTexture::sMaxSculptRez ; - mSculptTexture->addTextureStats(2.f * tex_size * tex_size, FALSE); + mSculptTexture->addTextureStats(2.f * tex_size * tex_size, false); } S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture @@ -870,7 +870,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) current_discard < 0)) //no previous rebuild { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); - mSculptChanged = TRUE; + mSculptChanged = true; } if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED)) @@ -887,7 +887,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) { LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); LLUUID id = params->getLightTexture(); - mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE); if (mLightTexture.notNull()) { F32 rad = getLightRadius(); @@ -917,14 +917,14 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) } } -BOOL LLVOVolume::isActive() const +bool LLVOVolume::isActive() const { return !mStatic; } -BOOL LLVOVolume::setMaterial(const U8 material) +bool LLVOVolume::setMaterial(const U8 material) { - BOOL res = LLViewerObject::setMaterial(material); + bool res = LLViewerObject::setMaterial(material); return res; } @@ -935,7 +935,7 @@ void LLVOVolume::setTexture(const S32 face) gGL.getTexUnit(0)->bind(getTEImage(face)); } -void LLVOVolume::setScale(const LLVector3 &scale, BOOL damped) +void LLVOVolume::setScale(const LLVector3 &scale, bool damped) { if (scale != getScale()) { @@ -994,7 +994,7 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) if (getIsLight()) { // Add it to the pipeline mLightSet - gPipeline.setLight(mDrawable, TRUE); + gPipeline.setLight(mDrawable, true); } if (isReflectionProbe()) @@ -1009,7 +1009,7 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) return mDrawable; } -BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bool unique_volume) +bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bool unique_volume) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; LLVolumeParams volume_params = params_in; @@ -1017,7 +1017,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo S32 last_lod = mVolumep.notNull() ? LLVolumeLODGroup::getVolumeDetailFromScale(mVolumep->getDetail()) : -1; S32 lod = mLOD; - BOOL is404 = FALSE; + bool is404 = false; if (isSculpted()) { @@ -1029,7 +1029,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo lod = gMeshRepo.getActualMeshLOD(volume_params, lod); if (lod == -1) { - is404 = TRUE; + is404 = true; lod = 0; } } @@ -1040,7 +1040,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo bool is_flexible = (volume_params.getPathParams().getCurveType() == LL_PCODE_PATH_FLEXIBLE); if (is_flexible) { - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, TRUE, false); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, true, false); if (!mVolumeImpl) { LLFlexibleObjectData* data = (LLFlexibleObjectData*)getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); @@ -1050,7 +1050,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo else { // Mark the parameter not in use - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, FALSE, false); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, false, false); if (mVolumeImpl) { delete mVolumeImpl; @@ -1058,14 +1058,14 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo if (mDrawable.notNull()) { // Undo the damage we did to this matrix - mDrawable->updateXform(FALSE); + mDrawable->updateXform(false); } } } if (is404) { - setIcon(LLViewerTextureManager::getFetchedTextureFromFile("icons/Inv_Mesh.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + setIcon(LLViewerTextureManager::getFetchedTextureFromFile("icons/Inv_Mesh.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI)); //render prim proxy when mesh loading attempts give up volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_NONE); @@ -1073,7 +1073,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo if ((LLPrimitive::setVolume(volume_params, lod, (mVolumeImpl && mVolumeImpl->isVolumeUnique()))) || mSculptChanged) { - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; if (mVolumeImpl) { @@ -1133,14 +1133,14 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo } } - return TRUE; + return true; } else if (NO_LOD == lod) { LLSculptIDSize::instance().resetSizeSum(volume_params.getSculptID()); } - return FALSE; + return false; } void LLVOVolume::updateSculptTexture() @@ -1153,7 +1153,7 @@ void LLVOVolume::updateSculptTexture() LLUUID id = sculpt_params->getSculptTexture(); if (id.notNull()) { - mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } mSkinInfoUnavaliable = false; @@ -1194,7 +1194,7 @@ void LLVOVolume::updateVisualComplexity() void LLVOVolume::notifyMeshLoaded() { - mSculptChanged = TRUE; + mSculptChanged = true; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); if (!mSkinInfo && !mSkinInfoUnavaliable) @@ -1316,11 +1316,13 @@ void LLVOVolume::sculpt() } } else - { + { + LLImageDataSharedLock lock(raw_image); + sculpt_height = raw_image->getHeight(); sculpt_width = raw_image->getWidth(); sculpt_components = raw_image->getComponents(); - + sculpt_data = raw_image->getData(); if(LLViewerTextureManager::sTesterp) @@ -1398,11 +1400,11 @@ std::string get_debug_object_lod_text(LLVOVolume *rootp) return result; } -BOOL LLVOVolume::calcLOD() +bool LLVOVolume::calcLOD() { if (mDrawable.isNull()) { - return FALSE; + return false; } S32 cur_detail = 0; @@ -1418,7 +1420,7 @@ BOOL LLVOVolume::calcLOD() // Not sure how this can really happen, but alas it does. Better exit here than crashing. if( !avatar || !avatar->mDrawable ) { - return FALSE; + return false; } distance = avatar->mDrawable->mDistanceWRTCamera; @@ -1446,7 +1448,7 @@ BOOL LLVOVolume::calcLOD() if (distance <= 0.f || radius <= 0.f) { LL_DEBUGS("DynamicBox","CalcLOD") << "avatar distance/radius uninitialized, skipping" << LL_ENDL; - return FALSE; + return false; } } else @@ -1456,7 +1458,7 @@ BOOL LLVOVolume::calcLOD() if (distance <= 0.f || radius <= 0.f) { LL_DEBUGS("DynamicBox","CalcLOD") << "non-avatar distance/radius uninitialized, skipping" << LL_ENDL; - return FALSE; + return false; } } @@ -1546,22 +1548,22 @@ BOOL LLVOVolume::calcLOD() mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); mLOD = cur_detail; - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLVOVolume::updateLOD() +bool LLVOVolume::updateLOD() { if (mDrawable.isNull()) { - return FALSE; + return false; } LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; - BOOL lod_changed = FALSE; + bool lod_changed = false; if (!LLSculptIDSize::instance().isUnloaded(getVolume()->getParams().getSculptID())) { @@ -1569,13 +1571,13 @@ BOOL LLVOVolume::updateLOD() } else { - return FALSE; + return false; } if (lod_changed) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); - mLODChanged = TRUE; + mLODChanged = true; } else { @@ -1592,12 +1594,12 @@ BOOL LLVOVolume::updateLOD() return lod_changed; } -BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp) +bool LLVOVolume::setDrawableParent(LLDrawable* parentp) { if (!LLViewerObject::setDrawableParent(parentp)) { // no change in drawable parent - return FALSE; + return false; } if (!mDrawable->isRoot()) @@ -1615,7 +1617,7 @@ BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp) } } - return TRUE; + return true; } void LLVOVolume::updateFaceFlags() @@ -1626,7 +1628,7 @@ void LLVOVolume::updateFaceFlags() LLFace *face = mDrawable->getFace(i); if (face) { - BOOL fullbright = getTE(i)->getFullbright(); + bool fullbright = getTE(i)->getFullbright(); face->clearState(LLFace::FULLBRIGHT | LLFace::HUD_RENDER | LLFace::LIGHT); if (fullbright || (mMaterial == LL_MCODE_LIGHT)) @@ -1645,9 +1647,9 @@ void LLVOVolume::updateFaceFlags() } } -BOOL LLVOVolume::setParent(LLViewerObject* parent) +bool LLVOVolume::setParent(LLViewerObject* parent) { - BOOL ret = FALSE ; + bool ret = false ; LLViewerObject *old_parent = (LLViewerObject*) getParent(); if (parent != old_parent) { @@ -1668,7 +1670,7 @@ void LLVOVolume::regenFaces() { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; // remove existing faces - BOOL count_changed = mNumFaces != getNumTEs(); + bool count_changed = mNumFaces != getNumTEs(); if (count_changed) { @@ -1712,17 +1714,17 @@ void LLVOVolume::regenFaces() } } -BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds) +bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds) { LL_PROFILE_ZONE_SCOPED; - BOOL res = TRUE; + bool res = true; LLVector4a min, max; min.clear(); max.clear(); - BOOL rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED); + bool rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED); if (getRiggedVolume()) { @@ -1758,7 +1760,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds) continue; } - BOOL face_res = face->genVolumeBBoxes(*volume, i, + bool face_res = face->genVolumeBBoxes(*volume, i, mRelativeXform, (mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global); res &= face_res; // note that this result is never used @@ -1952,7 +1954,7 @@ void LLVOVolume::updateRelativeXform(bool force_identity) } } -bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL &should_update_octree_bounds) +bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, bool &compiled, bool &should_update_octree_bounds) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; bool regen_faces = false; @@ -1983,7 +1985,7 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL & updateVisualComplexity(); } - compiled = TRUE; + compiled = true; // new_lod > old_lod breaks a feedback loop between LOD updates and // bounding box updates. should_update_octree_bounds = should_update_octree_bounds || mSculptChanged || new_lod > old_lod; @@ -2019,20 +2021,20 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL & return regen_faces; } -BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) +bool LLVOVolume::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; if (mDrawable->isState(LLDrawable::REBUILD_RIGGED)) { updateRiggedVolume(false); - genBBoxes(FALSE); + genBBoxes(false); mDrawable->clearState(LLDrawable::REBUILD_RIGGED); } if (mVolumeImpl != NULL) { - BOOL res; + bool res; { res = mVolumeImpl->doUpdateGeometry(drawable); } @@ -2050,13 +2052,13 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) if (mDrawable.isNull()) // Not sure why this is happening, but it is... { - return TRUE; // No update to complete + return true; // No update to complete } - BOOL compiled = FALSE; + bool compiled = false; // This should be true in most cases, unless we're sure no octree update is // needed. - BOOL should_update_octree_bounds = bool(getRiggedVolume()) || mDrawable->isState(LLDrawable::REBUILD_POSITION) || !mDrawable->getSpatialExtents()->isFinite3(); + bool should_update_octree_bounds = bool(getRiggedVolume()) || mDrawable->isState(LLDrawable::REBUILD_POSITION) || !mDrawable->getSpatialExtents()->isFinite3(); if (mVolumeChanged || mFaceMappingChanged) { @@ -2072,7 +2074,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) } else if (mSculptChanged || mLODChanged || mColorChanged) { - compiled = TRUE; + compiled = true; was_regen_faces = lodOrSculptChanged(drawable, compiled, should_update_octree_bounds); } @@ -2083,7 +2085,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) else if (mLODChanged || mSculptChanged || mColorChanged) { dirtySpatialGroup(); - compiled = TRUE; + compiled = true; lodOrSculptChanged(drawable, compiled, should_update_octree_bounds); if(drawable->isState(LLDrawable::REBUILD_RIGGED | LLDrawable::RIGGED)) @@ -2094,13 +2096,13 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) // it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local else { - compiled = TRUE; + compiled = true; // All it did was move or we changed the texture coordinate offset } // Generate bounding boxes if needed, and update the object's size in the // octree - genBBoxes(FALSE, should_update_octree_bounds); + genBBoxes(false, should_update_octree_bounds); // Update face flags updateFaceFlags(); @@ -2110,11 +2112,11 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) LLPipeline::sCompiles++; } - mVolumeChanged = FALSE; - mLODChanged = FALSE; - mSculptChanged = FALSE; - mFaceMappingChanged = FALSE; - mColorChanged = FALSE; + mVolumeChanged = false; + mLODChanged = false; + mSculptChanged = false; + mFaceMappingChanged = false; + mColorChanged = false; return LLViewerObject::updateGeometry(drawable); } @@ -2143,13 +2145,13 @@ void LLVOVolume::updateFaceSize(S32 idx) } } -BOOL LLVOVolume::isRootEdit() const +bool LLVOVolume::isRootEdit() const { if (mParent && !((LLViewerObject*)mParent)->isAvatar()) { - return FALSE; + return false; } - return TRUE; + return true; } //virtual @@ -2170,7 +2172,7 @@ void LLVOVolume::setNumTEs(const U8 num_tes) setTE(i, *te) ; mMediaImplList[i] = mMediaImplList[old_num_tes -1] ; } - mMediaImplList[old_num_tes -1]->setUpdated(TRUE) ; + mMediaImplList[old_num_tes -1]->setUpdated(true) ; } } else if(old_num_tes > num_tes && mMediaImplList.size() > num_tes) //old faces removed @@ -2196,23 +2198,23 @@ void LLVOVolume::setNumTEs(const U8 num_tes) //virtual void LLVOVolume::changeTEImage(S32 index, LLViewerTexture* imagep) { - BOOL changed = (mTEImages[index] != imagep); + bool changed = (mTEImages[index] != imagep); LLViewerObject::changeTEImage(index, imagep); if (changed) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } } void LLVOVolume::setTEImage(const U8 te, LLViewerTexture *imagep) { - BOOL changed = (mTEImages[te] != imagep); + bool changed = (mTEImages[te] != imagep); LLViewerObject::setTEImage(te, imagep); if (changed) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } } @@ -2227,7 +2229,7 @@ S32 LLVOVolume::setTETexture(const U8 te, const LLUUID &uuid) shrinkWrap(); gPipeline.markTextured(mDrawable); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2252,14 +2254,14 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color) { gPipeline.markTextured(mDrawable); //treat this alpha change as an LoD update since render batches may need to get rebuilt - mLODChanged = TRUE; + mLODChanged = true; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } retval = LLPrimitive::setTEColor(te, color); if (mDrawable.notNull() && retval) { // These should only happen on updates which are not the initial update. - mColorChanged = TRUE; + mColorChanged = true; mDrawable->setState(LLDrawable::REBUILD_COLOR); shrinkWrap(); dirtyMesh(); @@ -2275,7 +2277,7 @@ S32 LLVOVolume::setTEBumpmap(const U8 te, const U8 bumpmap) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2286,7 +2288,7 @@ S32 LLVOVolume::setTETexGen(const U8 te, const U8 texgen) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2297,7 +2299,7 @@ S32 LLVOVolume::setTEMediaTexGen(const U8 te, const U8 media) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2308,7 +2310,7 @@ S32 LLVOVolume::setTEShiny(const U8 te, const U8 shiny) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2319,7 +2321,7 @@ S32 LLVOVolume::setTEFullbright(const U8 te, const U8 fullbright) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2330,7 +2332,7 @@ S32 LLVOVolume::setTEBumpShinyFullbright(const U8 te, const U8 bump) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2341,7 +2343,7 @@ S32 LLVOVolume::setTEMediaFlags(const U8 te, const U8 media_flags) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2356,7 +2358,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow) gPipeline.markTextured(mDrawable); shrinkWrap(); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2396,7 +2398,7 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) gPipeline.markTextured(mDrawable); gPipeline.markRebuild(mDrawable,LLDrawable::REBUILD_ALL); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2414,7 +2416,7 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa gPipeline.markTextured(mDrawable); gPipeline.markRebuild(mDrawable,LLDrawable::REBUILD_ALL); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; return TEM_CHANGE_TEXTURE; } @@ -2429,7 +2431,7 @@ S32 LLVOVolume::setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat) gPipeline.markTextured(mDrawable); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return retval; @@ -2442,7 +2444,7 @@ S32 LLVOVolume::setTEScale(const U8 te, const F32 s, const F32 t) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2453,7 +2455,7 @@ S32 LLVOVolume::setTEScaleS(const U8 te, const F32 s) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2464,7 +2466,7 @@ S32 LLVOVolume::setTEScaleT(const U8 te, const F32 t) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2923,7 +2925,7 @@ void LLVOVolume::addMediaImpl(LLViewerMediaImpl* media_impl, S32 texture_index) } else //the face is not available now, start media on this face later. { - media_impl->setUpdated(TRUE) ; + media_impl->setUpdated(true) ; } } return ; @@ -2988,7 +2990,7 @@ void LLVOVolume::setLightTextureID(LLUUID id) { if (!hasLightTexture()) { - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, TRUE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, true, true); } else if (old_texturep) { @@ -3016,7 +3018,7 @@ void LLVOVolume::setLightTextureID(LLUUID id) { old_texturep->removeVolume(LLRender::LIGHT_TEX, this); } - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, false, true); parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true); mLightTexture = NULL; } @@ -3032,29 +3034,29 @@ void LLVOVolume::setSpotLightParams(LLVector3 params) } } -void LLVOVolume::setIsLight(BOOL is_light) +void LLVOVolume::setIsLight(bool is_light) { - BOOL was_light = getIsLight(); + bool was_light = getIsLight(); if (is_light != was_light) { if (is_light) { - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, TRUE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, true, true); } else { - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, FALSE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, false, true); } if (is_light) { // Add it to the pipeline mLightSet - gPipeline.setLight(mDrawable, TRUE); + gPipeline.setLight(mDrawable, true); } else { // Not a light. Remove it from the pipeline's light set. - gPipeline.setLight(mDrawable, FALSE); + gPipeline.setLight(mDrawable, false); } } } @@ -3074,7 +3076,7 @@ void LLVOVolume::setLightLinearColor(const LLColor3& color) param_block->setLinearColor(LLColor4(color, param_block->getLinearColor().mV[3])); parameterChanged(LLNetworkData::PARAMS_LIGHT, true); gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } } } @@ -3133,7 +3135,7 @@ void LLVOVolume::setLightCutoff(F32 cutoff) //---------------------------------------------------------------------------- -BOOL LLVOVolume::getIsLight() const +bool LLVOVolume::getIsLight() const { mIsLight = getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT); return mIsLight; @@ -3261,7 +3263,7 @@ LLViewerTexture* LLVOVolume::getLightTexture() { if (mLightTexture.isNull() || id != mLightTexture->getID()) { - mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE); } } else @@ -3324,23 +3326,23 @@ F32 LLVOVolume::getLightCutoff() const } } -BOOL LLVOVolume::isReflectionProbe() const +bool LLVOVolume::isReflectionProbe() const { return getParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE); } -bool LLVOVolume::setIsReflectionProbe(BOOL is_probe) +bool LLVOVolume::setIsReflectionProbe(bool is_probe) { - BOOL was_probe = isReflectionProbe(); + bool was_probe = isReflectionProbe(); if (is_probe != was_probe) { if (is_probe) { - setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, TRUE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, true, true); } else { - setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, FALSE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, false, true); } } @@ -3499,7 +3501,7 @@ U32 LLVOVolume::getVolumeInterfaceID() const return 0; } -BOOL LLVOVolume::isFlexible() const +bool LLVOVolume::isFlexible() const { if (getParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE)) { @@ -3510,25 +3512,25 @@ BOOL LLVOVolume::isFlexible() const U8 profile_and_hole = volume_params.getProfileParams().getCurveType(); volume_params.setType(profile_and_hole, LL_PCODE_PATH_FLEXIBLE); } - return TRUE; + return true; } else { - return FALSE; + return false; } } -BOOL LLVOVolume::isSculpted() const +bool LLVOVolume::isSculpted() const { if (getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLVOVolume::isMesh() const +bool LLVOVolume::isMesh() const { if (isSculpted()) { @@ -3538,21 +3540,21 @@ BOOL LLVOVolume::isMesh() const if ((sculpt_type & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH) // mesh is a mesh { - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL LLVOVolume::hasLightTexture() const +bool LLVOVolume::hasLightTexture() const { if (getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE)) { - return TRUE; + return true; } - return FALSE; + return false; } bool LLVOVolume::isFlexibleFast() const @@ -3580,30 +3582,30 @@ bool LLVOVolume::isAnimatedObjectFast() const return mIsAnimatedObject; } -BOOL LLVOVolume::isVolumeGlobal() const +bool LLVOVolume::isVolumeGlobal() const { if (mVolumeImpl) { - return mVolumeImpl->isVolumeGlobal() ? TRUE : FALSE; + return mVolumeImpl->isVolumeGlobal() ? true : false; } else if (mRiggedVolume.notNull()) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLVOVolume::canBeFlexible() const +bool LLVOVolume::canBeFlexible() const { U8 path = getVolume()->getParams().getPathParams().getCurveType(); return (path == LL_PCODE_PATH_FLEXIBLE || path == LL_PCODE_PATH_LINE); } -BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) +bool LLVOVolume::setIsFlexible(bool is_flexible) { - BOOL res = FALSE; - BOOL was_flexible = isFlexible(); + bool res = false; + bool was_flexible = isFlexible(); LLVolumeParams volume_params; if (is_flexible) { @@ -3612,10 +3614,10 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) volume_params = getVolume()->getParams(); U8 profile_and_hole = volume_params.getProfileParams().getCurveType(); volume_params.setType(profile_and_hole, LL_PCODE_PATH_FLEXIBLE); - res = TRUE; - setFlags(FLAGS_USE_PHYSICS, FALSE); - setFlags(FLAGS_PHANTOM, TRUE); - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, TRUE, true); + res = true; + setFlags(FLAGS_USE_PHYSICS, false); + setFlags(FLAGS_PHANTOM, true); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, true, true); if (mDrawable) { mDrawable->makeActive(); @@ -3629,9 +3631,9 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) volume_params = getVolume()->getParams(); U8 profile_and_hole = volume_params.getProfileParams().getCurveType(); volume_params.setType(profile_and_hole, LL_PCODE_PATH_LINE); - res = TRUE; - setFlags(FLAGS_PHANTOM, FALSE); - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, FALSE, true); + res = true; + setFlags(FLAGS_PHANTOM, false); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, false, true); } } if (res) @@ -3658,7 +3660,7 @@ const LLMeshSkinInfo* LLVOVolume::getSkinInfo() const } // virtual -BOOL LLVOVolume::isRiggedMesh() const +bool LLVOVolume::isRiggedMesh() const { return isMesh() && getSkinInfo(); } @@ -3877,7 +3879,7 @@ void LLVOVolume::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_p volume->generateSilhouetteVertices(nodep->mSilhouetteVertices, nodep->mSilhouetteNormals, view_vector, trans_mat, mRelativeXformInvTrans, nodep->getTESelectMask()); - nodep->mSilhouetteExists = TRUE; + nodep->mSilhouetteExists = true; } } @@ -3904,12 +3906,12 @@ void LLVOVolume::updateRadius() } -BOOL LLVOVolume::isAttachment() const +bool LLVOVolume::isAttachment() const { return mAttachmentState != 0 ; } -BOOL LLVOVolume::isHUDAttachment() const +bool LLVOVolume::isHUDAttachment() const { // *NOTE: we assume hud attachment points are in defined range // since this range is constant for backwards compatibility @@ -4370,7 +4372,7 @@ void LLVOVolume::parameterChanged(U16 param_type, bool local_origin) LLViewerObject::parameterChanged(param_type, local_origin); } -void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin) +void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin) { LLViewerObject::parameterChanged(param_type, data, in_use, local_origin); if (mVolumeImpl) @@ -4394,7 +4396,7 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u } if (mDrawable.notNull()) { - BOOL is_light = getIsLight(); + bool is_light = getIsLight(); if (is_light != mDrawable->isState(LLDrawable::LIGHT)) { gPipeline.setLight(mDrawable, is_light); @@ -4435,7 +4437,7 @@ void LLVOVolume::updateReflectionProbePtr() } } -void LLVOVolume::setSelected(BOOL sel) +void LLVOVolume::setSelected(bool sel) { LLViewerObject::setSelected(sel); if (isAnimatedObject()) @@ -4471,7 +4473,7 @@ F32 LLVOVolume::getBinRadius() //const LLVector4a* ext = mDrawable->getSpatialExtents(); bool shrink_wrap = mShouldShrinkWrap || mDrawable->isAnimating(); - bool alpha_wrap = FALSE; + bool alpha_wrap = false; if (!isHUDAttachment() && mDrawable->mDistanceWRTCamera < alpha_distance_factor[2]) { @@ -4482,14 +4484,14 @@ F32 LLVOVolume::getBinRadius() if (face->isInAlphaPool() && !face->canRenderAsMask()) { - alpha_wrap = TRUE; + alpha_wrap = true; break; } } } else { - shrink_wrap = FALSE; + shrink_wrap = false; } if (alpha_wrap) @@ -4551,7 +4553,7 @@ void LLVOVolume::markForUpdate() } LLViewerObject::markForUpdate(); - mVolumeChanged = TRUE; + mVolumeChanged = true; } LLVector3 LLVOVolume::agentPositionToVolume(const LLVector3& pos) const @@ -4605,31 +4607,31 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const } -BOOL LLVOVolume::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) +bool LLVOVolume::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 (!mbCanSelect || mDrawable->isDead() || !gPipeline.hasRenderType(mDrawable->getRenderType())) { - return FALSE; + return false; } if (!pick_unselectable) { - if (!LLSelectMgr::instance().canSelectObject(this, TRUE)) + if (!LLSelectMgr::instance().canSelectObject(this, true)) { - return FALSE; + return false; } } if (getClickAction() == CLICK_ACTION_IGNORE && !LLFloater::isVisible(gFloaterTools)) { - return FALSE; + return false; } - BOOL ret = FALSE; + bool ret = false; LLVolume* volume = getVolume(); @@ -4645,7 +4647,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& } else { //cannot pick rigged attachments on other avatars or when not in build mode - return FALSE; + return false; } } @@ -4748,8 +4750,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& } } - BOOL no_texture = !face->getTexture() || !face->getTexture()->hasGLTexture(); - BOOL mask = no_texture ? FALSE : face->getTexture()->getMask(face->surfaceToTexture(tc, p, n)); + bool no_texture = !face->getTexture() || !face->getTexture()->hasGLTexture(); + bool mask = no_texture ? false : face->getTexture()->getMask(face->surfaceToTexture(tc, p, n)); if (face && (ignore_alpha || pick_transparent || no_texture || mask)) { @@ -4814,7 +4816,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& *tex_coord = tc; } - ret = TRUE; + ret = true; } } } @@ -5072,21 +5074,21 @@ U32 LLVOVolume::getPartitionType() const } LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, regionp), +: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, true, regionp), LLVolumeGeometryManager() { mLODPeriod = 32; - mDepthMask = FALSE; + mDepthMask = false; mDrawableType = LLPipeline::RENDER_TYPE_VOLUME; mPartitionType = LLViewerRegion::PARTITION_VOLUME; mSlopRatio = 0.25f; } LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp) -: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK, regionp), +: LLSpatialBridge(drawablep, true, LLVOVolume::VERTEX_DATA_MASK, regionp), LLVolumeGeometryManager() { - mDepthMask = FALSE; + mDepthMask = false; mLODPeriod = 32; mDrawableType = LLPipeline::RENDER_TYPE_VOLUME; mPartitionType = LLViewerRegion::PARTITION_BRIDGE; @@ -5108,30 +5110,6 @@ LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regi mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV; } -void LLControlAVBridge::updateSpatialExtents() -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE - - LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0); - - bool rootWasDirty = root->isDirty(); - - super::updateSpatialExtents(); // root becomes non-dirty here - - // SL-18251 "On-screen animesh characters using pelvis offset animations - // disappear when root goes off-screen" - // - // Expand extents to include Control Avatar placed outside of the bounds - LLControlAvatar* controlAvatar = getVObj() ? getVObj()->getControlAvatar() : NULL; - if (controlAvatar - && controlAvatar->mDrawable - && controlAvatar->mDrawable->getEntry() - && (rootWasDirty || controlAvatar->mPlaying)) - { - root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform()); - } -} - bool can_batch_texture(LLFace* facep) { if (facep->getTextureEntry()->getBumpmap()) @@ -5353,7 +5331,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, if (mat) { - BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? TRUE : FALSE; + bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? true : false; if (type == LLRenderPass::PASS_ALPHA) { shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha); @@ -5818,7 +5796,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } } - BOOL force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA); + bool force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA); U32 type = gPipeline.getPoolTypeFromTE(te, tex); if (is_pbr && gltf_mat && gltf_mat->mAlphaMode != LLGLTFMaterial::ALPHA_MODE_BLEND) { @@ -6004,7 +5982,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) pbr_mask = pbr_mask | LLVertexBuffer::MAP_EMISSIVE; } - BOOL batch_textures = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1; + bool batch_textures = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1; // add extra vertex data for deferred rendering (not necessarily for batching textures) if (batch_textures) @@ -6021,22 +5999,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) // generate render batches for static geometry U32 extra_mask = LLVertexBuffer::MAP_TEXTURE_INDEX; - BOOL alpha_sort = TRUE; - BOOL rigged = FALSE; + bool alpha_sort = true; + bool rigged = false; for (int i = 0; i < 2; ++i) //two sets, static and rigged) { - geometryBytes += genDrawInfo(group, simple_mask | extra_mask, sSimpleFaces[i], simple_count[i], FALSE, batch_textures, rigged); - geometryBytes += genDrawInfo(group, fullbright_mask | extra_mask, sFullbrightFaces[i], fullbright_count[i], FALSE, batch_textures, rigged); + geometryBytes += genDrawInfo(group, simple_mask | extra_mask, sSimpleFaces[i], simple_count[i], false, batch_textures, rigged); + geometryBytes += genDrawInfo(group, fullbright_mask | extra_mask, sFullbrightFaces[i], fullbright_count[i], false, batch_textures, rigged); geometryBytes += genDrawInfo(group, alpha_mask | extra_mask, sAlphaFaces[i], alpha_count[i], alpha_sort, batch_textures, rigged); - geometryBytes += genDrawInfo(group, bump_mask | extra_mask, sBumpFaces[i], bump_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, norm_mask | extra_mask, sNormFaces[i], norm_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, spec_mask | extra_mask, sSpecFaces[i], spec_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, normspec_mask | extra_mask, sNormSpecFaces[i], normspec_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, pbr_mask | extra_mask, sPbrFaces[i], pbr_count[i], FALSE, FALSE, rigged); + geometryBytes += genDrawInfo(group, bump_mask | extra_mask, sBumpFaces[i], bump_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, norm_mask | extra_mask, sNormFaces[i], norm_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, spec_mask | extra_mask, sSpecFaces[i], spec_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, normspec_mask | extra_mask, sNormSpecFaces[i], normspec_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, pbr_mask | extra_mask, sPbrFaces[i], pbr_count[i], false, false, rigged); // for rigged set, add weights and disable alpha sorting (rigged items use depth buffer) extra_mask |= LLVertexBuffer::MAP_WEIGHT4; - rigged = TRUE; + rigged = true; } group->mGeometryBytes = geometryBytes; @@ -6206,7 +6184,7 @@ struct CompareBatchBreakerRigged } }; -U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures, BOOL rigged) +U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, bool distance_sort, bool batch_textures, bool rigged) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; @@ -6486,11 +6464,11 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace //append face to appropriate render batch - BOOL force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA; - BOOL fullbright = facep->isState(LLFace::FULLBRIGHT); + bool force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA; + bool fullbright = facep->isState(LLFace::FULLBRIGHT); if ((mask & LLVertexBuffer::MAP_NORMAL) == 0) { //paranoia check to make sure GL doesn't try to read non-existant normals - fullbright = TRUE; + fullbright = true; } const LLTextureEntry* te = facep->getTextureEntry(); @@ -6498,12 +6476,12 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (hud_group && gltf_mat == nullptr) { //all hud attachments are fullbright - fullbright = TRUE; + fullbright = true; } tex = facep->getTexture(); - BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? TRUE : FALSE; + bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? true : false; LLMaterial* mat = nullptr; bool can_be_shiny = false; @@ -6529,7 +6507,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (!gltf_mat) { - is_alpha = (is_alpha || blinn_phong_transparent) ? TRUE : FALSE; + is_alpha = (is_alpha || blinn_phong_transparent) ? true : false; } if (gltf_mat || (mat && !hud_group)) |