summaryrefslogtreecommitdiff
path: root/indra/newview/llmodelpreview.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-02-21 21:05:14 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-21 23:14:31 +0200
commit60d3dd98a44230c21803c1606552ee098ed9fa7c (patch)
treeaf0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/llmodelpreview.cpp
parent855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff)
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/llmodelpreview.cpp')
-rw-r--r--indra/newview/llmodelpreview.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index ccae1030f1..fde9e18080 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -93,7 +93,7 @@ const F32 SKIN_WEIGHT_CAMERA_DISTANCE = 16.f;
LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& material)
{
- LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_PREVIEW);
+ LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, true, LLGLTexture::BOOST_PREVIEW);
if (texture)
{
@@ -159,7 +159,7 @@ void FindModel(LLModelLoader::scene& scene, const std::string& name_to_match, LL
//-----------------------------------------------------------------------------
LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
- : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex()
+ : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false), LLMutex()
, mLodsQuery()
, mLodsWithParsingError()
, mPelvisZOffset(0.0f)
@@ -173,7 +173,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
, mHasDegenerate(false)
, mImporterDebug(LLCachedControl<bool>(gSavedSettings, "ImporterDebug", false))
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mCameraDistance = 0.f;
mCameraYaw = 0.f;
mCameraPitch = 0.f;
@@ -287,7 +287,7 @@ void LLModelPreview::rebuildUploadData()
F32 max_scale = 0.f;
- BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
+ bool legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
U32 load_state = 0;
for (LLModelLoader::scene::iterator iter = mBaseScene.begin(); iter != mBaseScene.end(); ++iter)
@@ -656,7 +656,7 @@ void LLModelPreview::saveUploadData(const std::string& filename,
save_skinweights,
save_joint_positions,
lock_scale_if_joint_position,
- FALSE, TRUE, instance.mModel->mSubmodelID);
+ false, true, instance.mModel->mSubmodelID);
data["mesh"][instance.mModel->mLocalID] = str.str();
}
@@ -1080,18 +1080,18 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
FindModel(mScene[loaded_lod], DEFAULT_PHYSICS_MESH_NAME + getLodSuffix(loaded_lod), mDefaultPhysicsShapeP, ignored_transform);
mWarnOfUnmatchedPhyicsMeshes = true;
}
- BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
+ bool legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching");
if (!legacyMatching)
{
if (!mBaseModel.empty())
{
- BOOL name_based = FALSE;
- BOOL has_submodels = FALSE;
+ bool name_based = false;
+ bool has_submodels = false;
for (U32 idx = 0; idx < mBaseModel.size(); ++idx)
{
if (mBaseModel[idx]->mSubmodelID)
{ // don't do index-based renaming when the base model has submodels
- has_submodels = TRUE;
+ has_submodels = true;
if (mImporterDebug)
{
std::ostringstream out;
@@ -1112,12 +1112,12 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
FindModel(mBaseScene, loaded_name, found_model, transform);
if (found_model)
{ // don't rename correctly named models (even if they are placed in a wrong order)
- name_based = TRUE;
+ name_based = true;
}
if (mModel[loaded_lod][idx]->mSubmodelID)
{ // don't rename the models when loaded LOD model has submodels
- has_submodels = TRUE;
+ has_submodels = true;
}
}
@@ -2331,7 +2331,7 @@ void LLModelPreview::updateStatusMessages()
//warn if hulls have more than 256 points in them
- BOOL physExceededVertexLimit = FALSE;
+ bool physExceededVertexLimit = false;
for (U32 i = 0; mModelNoErrors && i < mModel[LLModel::LOD_PHYSICS].size(); ++i)
{
LLModel* mdl = mModel[LLModel::LOD_PHYSICS][i];
@@ -2342,7 +2342,7 @@ void LLModelPreview::updateStatusMessages()
{
if (mdl->mPhysics.mHull[j].size() > 256)
{
- physExceededVertexLimit = TRUE;
+ physExceededVertexLimit = true;
LL_INFOS() << "Physical model " << mdl->mLabel << " exceeds vertex per hull limitations." << LL_ENDL;
break;
}
@@ -3058,8 +3058,8 @@ U32 LLModelPreview::loadTextures(LLImportMaterial& material, void* opaque)
material.mOpaqueData = new LLPointer< LLViewerFetchedTexture >;
LLPointer< LLViewerFetchedTexture >& tex = (*reinterpret_cast< LLPointer< LLViewerFetchedTexture > * >(material.mOpaqueData));
- tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + LLURI::unescape(material.mDiffuseMapFilename), FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_PREVIEW);
- tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, opaque, NULL, FALSE);
+ tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + LLURI::unescape(material.mDiffuseMapFilename), FTT_LOCAL_FILE, true, LLGLTexture::BOOST_PREVIEW);
+ tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, true, false, opaque, NULL, false);
tex->forceToSaveRawImage(0, F32_MAX);
material.setDiffuseMap(tex->getID()); // record tex ID
return 1;
@@ -3111,12 +3111,12 @@ void LLModelPreview::addEmptyFace(LLModel* pTarget)
//-----------------------------------------------------------------------------
// Todo: we shouldn't be setting all those UI elements on render.
// Note: Render happens each frame with skinned avatars
-BOOL LLModelPreview::render()
+bool LLModelPreview::render()
{
assert_main_thread();
LLMutexLock lock(this);
- mNeedsUpdate = FALSE;
+ mNeedsUpdate = false;
bool edges = mViewOption["show_edges"];
bool joint_overrides = mViewOption["show_joint_overrides"];
@@ -3326,7 +3326,7 @@ BOOL LLModelPreview::render()
z_near = llclamp(z_far * 0.001f, 0.001f, 0.1f);
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, width, height, FALSE, z_near, z_far);
+ LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, width, height, false, z_near, z_far);
stop_glerror();
@@ -3355,7 +3355,7 @@ BOOL LLModelPreview::render()
else
{
LL_INFOS() << "Vertex Buffer[" << mPreviewLOD << "]" << " is EMPTY!!!" << LL_ENDL;
- regen = TRUE;
+ regen = true;
}
}
@@ -3799,7 +3799,7 @@ BOOL LLModelPreview::render()
gGL.popMatrix();
- return TRUE;
+ return true;
}
void LLModelPreview::renderGroundPlane(float z_offset)
@@ -3829,7 +3829,7 @@ void LLModelPreview::renderGroundPlane(float z_offset)
//-----------------------------------------------------------------------------
void LLModelPreview::refresh()
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
}
//-----------------------------------------------------------------------------
@@ -3898,12 +3898,12 @@ void LLModelPreview::setPreviewLOD(S32 lod)
//static
void LLModelPreview::textureLoadedCallback(
- BOOL success,
+ bool success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* src_aux,
S32 discard_level,
- BOOL final,
+ bool final,
void* userdata)
{
LLModelPreview* preview = (LLModelPreview*)userdata;