diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 99f31f33df..c1079ba12b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5739,7 +5739,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) continue; } - LLFetchedGLTFMaterial *gltf_mat = (LLFetchedGLTFMaterial*) facep->getTextureEntry()->getGLTFRenderMaterial(); + LLFetchedGLTFMaterial* gltf_mat = nullptr; + const LLTextureEntry* te = facep->getTextureEntry(); + if (te) + { + gltf_mat = (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial(); + } // if not te, continue? bool is_pbr = gltf_mat != nullptr; if (is_pbr) @@ -5801,10 +5806,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { cur_total += facep->getGeomCount(); - const LLTextureEntry* te = facep->getTextureEntry(); LLViewerTexture* tex = facep->getTexture(); - if (te->getGlow() > 0.f) + if (te && te->getGlow() > 0.f) { emissive = true; } @@ -5899,6 +5903,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) facep->mLastUpdateTime = gFrameTimeSeconds; } + if (te) { LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial(); @@ -5963,6 +5968,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) add_face(sFullbrightFaces, fullbright_count, facep); } } + else // no texture entry + { + facep->setState(LLFace::FULLBRIGHT); + add_face(sFullbrightFaces, fullbright_count, facep); + } } } else |