summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llgl.cpp36
-rw-r--r--indra/newview/llvoavatar.cpp4
-rw-r--r--indra/newview/pipeline.cpp36
3 files changed, 39 insertions, 37 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 97019d48c4..2ee7b16cf3 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1039,23 +1039,8 @@ void flush_glerror()
glGetError();
}
-void assert_glerror()
+void do_assert_glerror()
{
- if (!gGLActive)
- {
- //llwarns << "GL used while not active!" << llendl;
-
- if (gDebugSession)
- {
- //ll_fail("GL used while not active");
- }
- }
-
- if (gNoRender || !gDebugGL)
- {
- return;
- }
-
if (!gGLManager.mInited)
{
LL_ERRS("RenderInit") << "GL not initialized" << LL_ENDL;
@@ -1107,6 +1092,25 @@ void assert_glerror()
}
}
+void assert_glerror()
+{
+ if (!gGLActive)
+ {
+ //llwarns << "GL used while not active!" << llendl;
+
+ if (gDebugSession)
+ {
+ //ll_fail("GL used while not active");
+ }
+ }
+
+ if (!gNoRender && gDebugGL)
+ {
+ do_assert_glerror();
+ }
+}
+
+
void clear_glerror()
{
// Create or update texture to be used with this data
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8c1546d47f..51a78fc125 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3779,9 +3779,9 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
LLFace* face = mDrawable->getFace(0);
- bool needs_rebuild = !face || face->mVertexBuffer.isNull();
+ bool needs_rebuild = !face || face->mVertexBuffer.isNull() || mDrawable->isState(LLDrawable::REBUILD_GEOMETRY);
- if (needs_rebuild || mDirtyMesh || mDrawable->isState(LLDrawable::REBUILD_GEOMETRY))
+ if (needs_rebuild || mDirtyMesh)
{ //LOD changed or new mesh created, allocate new vertex buffer if needed
if (needs_rebuild || mDirtyMesh >= 2 || mVisibilityRank <= 4)
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 02dc013ca4..cb656b4fbc 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1973,31 +1973,29 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE);
- if(!drawablep || drawablep->isDead())
+ if(drawablep && !drawablep->isDead())
{
- return;
- }
-
- if (drawablep->isSpatialBridge())
- {
- LLDrawable* root = ((LLSpatialBridge*) drawablep)->mDrawable;
-
- if (root && root->getParent() && root->getVObj() && root->getVObj()->isAttachment())
+ if (drawablep->isSpatialBridge())
{
- LLVOAvatar* av = root->getParent()->getVObj()->asAvatar();
- if (av && av->isImpostor())
+ LLDrawable* root = ((LLSpatialBridge*) drawablep)->mDrawable;
+
+ if (root->getVObj()->isAttachment())
{
- return;
+ LLVOAvatar* av = root->getParent()->getVObj()->asAvatar();
+ if (av && av->isImpostor())
+ {
+ return;
+ }
}
+ sCull->pushBridge((LLSpatialBridge*) drawablep);
+ }
+ else
+ {
+ sCull->pushDrawable(drawablep);
}
- sCull->pushBridge((LLSpatialBridge*) drawablep);
- }
- else
- {
- sCull->pushDrawable(drawablep);
- }
- drawablep->setVisible(camera);
+ drawablep->setVisible(camera);
+ }
}
void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)