diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-07-27 15:17:57 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-07-28 08:24:59 +0800 |
commit | 96a81b5ecbe3bffb582ded930752c0523df5e80a (patch) | |
tree | a87a0bd09fd980562e88150dbfea3819d28d9f12 /indra/newview/lldrawpool.cpp | |
parent | 06e8f0c443c1ba7858d000c6d695b7e988e02053 (diff) | |
parent | ed73208eb96b862b97fa285036edea1e792ca3c6 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r-- | indra/newview/lldrawpool.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 7532b1fc85..ba7d17cf21 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -269,20 +269,20 @@ void LLFacePool::enqueue(LLFace* facep) } // virtual -BOOL LLFacePool::addFace(LLFace *facep) +bool LLFacePool::addFace(LLFace *facep) { addFaceReference(facep); - return TRUE; + return true; } // virtual -BOOL LLFacePool::removeFace(LLFace *facep) +bool LLFacePool::removeFace(LLFace *facep) { removeFaceReference(facep); vector_replace_with_last(mDrawFace, facep); - return TRUE; + return true; } // Not absolutely sure if we should be resetting all of the chained pools as well - djs @@ -315,7 +315,7 @@ void LLFacePool::addFaceReference(LLFace *facep) { if (-1 == facep->getReferenceIndex()) { - facep->setReferenceIndex(mReferences.size()); + facep->setReferenceIndex(static_cast<S32>(mReferences.size())); mReferences.push_back(facep); } } @@ -328,9 +328,9 @@ void LLFacePool::pushFaceGeometry() } } -BOOL LLFacePool::verify() const +bool LLFacePool::verify() const { - BOOL ok = TRUE; + bool ok = true; for (std::vector<LLFace*>::const_iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++) @@ -340,11 +340,11 @@ BOOL LLFacePool::verify() const { LL_INFOS() << "Face in wrong pool!" << LL_ENDL; facep->printDebugInfo(); - ok = FALSE; + ok = false; } else if (!facep->verify()) { - ok = FALSE; + ok = false; } } @@ -356,7 +356,7 @@ void LLFacePool::printDebugInfo() const LL_INFOS() << "Pool " << this << " Type: " << getType() << LL_ENDL; } -BOOL LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = FALSE; +bool LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = false; void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4& color) { @@ -674,7 +674,7 @@ bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinI return false; } const LLVOAvatar::MatrixPaletteCache& mpc = avatar->updateSkinInfoMatrixPalette(skinInfo); - U32 count = mpc.mMatrixPalette.size(); + U32 count = static_cast<U32>(mpc.mMatrixPalette.size()); if (count == 0) { @@ -684,7 +684,7 @@ bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinI LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX, count, - FALSE, + false, (GLfloat*)&(mpc.mGLMp[0])); return true; @@ -758,9 +758,12 @@ void LLRenderPass::pushGLTFBatch(LLDrawInfo& params) { auto& mat = params.mGLTFMaterial; - mat->bind(params.mTexture); + if (mat.notNull()) + { + mat->bind(params.mTexture); + } - LLGLDisable cull_face(mat->mDoubleSided ? GL_CULL_FACE : 0); + LLGLDisable cull_face(mat.notNull() && mat->mDoubleSided ? GL_CULL_FACE : 0); setup_texture_matrix(params); |