diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2008-02-27 18:58:14 +0000 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2008-02-27 18:58:14 +0000 |
commit | 6d52efe452aa8469e0343da1c7d108f3f52ab651 (patch) | |
tree | a87be48e9840d7fc1f7ee514d7c7f994e71fdb3c /indra/newview/llviewerjointattachment.cpp | |
parent | 6027ad2630b8650cabcf00628ee9b0d25bedd67f (diff) |
Merge of windlight into release (QAR-286). This includes all changes in
windlight14 which have passed QA (up through r79932).
svn merge -r 80831:80833 svn+ssh://svn.lindenlab.com/svn/linden/branches/merge_windlight14_r80620
Diffstat (limited to 'indra/newview/llviewerjointattachment.cpp')
-rw-r--r-- | indra/newview/llviewerjointattachment.cpp | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 18c99f7453..8b653b6430 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -38,9 +38,11 @@ #include "llviewercontrol.h" #include "lldrawable.h" #include "llgl.h" +#include "llglimmediate.h" #include "llvoavatar.h" #include "llvolume.h" #include "pipeline.h" +#include "llspatialpartition.h" #include "llinventorymodel.h" #include "llviewerobjectlist.h" #include "llface.h" @@ -56,7 +58,6 @@ extern LLPipeline gPipeline; LLViewerJointAttachment::LLViewerJointAttachment() : mJoint(NULL), mAttachedObject(NULL), -mAttachmentDirty(FALSE), mVisibleInFirst(FALSE), mGroup(0), mIsHUDAttachment(FALSE), @@ -90,36 +91,18 @@ U32 LLViewerJointAttachment::drawShape( F32 pixelArea, BOOL first_pass ) { LLGLDisable cull_face(GL_CULL_FACE); - glColor4f(1.f, 1.f, 1.f, 1.f); - glBegin(GL_QUADS); + gGL.color4f(1.f, 1.f, 1.f, 1.f); + gGL.begin(GL_QUADS); { - glVertex3f(-0.1f, 0.1f, 0.f); - glVertex3f(-0.1f, -0.1f, 0.f); - glVertex3f(0.1f, -0.1f, 0.f); - glVertex3f(0.1f, 0.1f, 0.f); - }glEnd(); + gGL.vertex3f(-0.1f, 0.1f, 0.f); + gGL.vertex3f(-0.1f, -0.1f, 0.f); + gGL.vertex3f(0.1f, -0.1f, 0.f); + gGL.vertex3f(0.1f, 0.1f, 0.f); + }gGL.end(); } return 0; } -//----------------------------------------------------------------------------- -// lazyAttach() -//----------------------------------------------------------------------------- -void LLViewerJointAttachment::lazyAttach() -{ - if (!mAttachedObject) - { - return; - } - LLDrawable *drawablep = mAttachedObject->mDrawable; - - if (mAttachmentDirty && drawablep) - { - setupDrawable(drawablep); - mAttachmentDirty = FALSE; - } -} - void LLViewerJointAttachment::setupDrawable(LLDrawable* drawablep) { drawablep->mXform.setParent(&mXform); // LLViewerJointAttachment::lazyAttach @@ -211,13 +194,14 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) if (drawablep) { + //if object is active, make it static + if(drawablep->isActive()) + { + drawablep->makeStatic() ; + } + setupDrawable(drawablep); } - else - { - // do lazy update once we have a drawable for this object - mAttachmentDirty = TRUE; - } if (mIsHUDAttachment) { @@ -251,6 +235,12 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) if (object->mDrawable.notNull()) { + //if object is active, make it static + if(object->mDrawable->isActive()) + { + object->mDrawable->makeStatic() ; + } + LLVector3 cur_position = object->getRenderPosition(); LLQuaternion cur_rotation = object->getRenderRotation(); |