summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llmessage/llsdappservices.cpp2
-rw-r--r--indra/newview/llselectmgr.cpp12
-rw-r--r--indra/newview/llselectmgr.h2
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/pipeline.cpp70
5 files changed, 46 insertions, 42 deletions
diff --git a/indra/llmessage/llsdappservices.cpp b/indra/llmessage/llsdappservices.cpp
index c10e9bd113..7b8e678847 100644
--- a/indra/llmessage/llsdappservices.cpp
+++ b/indra/llmessage/llsdappservices.cpp
@@ -242,7 +242,7 @@ public:
llinfos << "LLHTTPLiveConfigSingleService::validate(" << name
<< ")" << llendl;
LLSD option = LLApp::instance()->getOption(name);
- if(option) return true;
+ if(option.isDefined()) return true;
else return false;
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 3eddc04259..4b2445459f 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -231,6 +231,9 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
{
llassert( object );
+ //remember primary object
+ mSelectedObjects->mPrimaryObject = object;
+
// Don't add an object that is already in the list
if (object->isSelected() ) {
// make sure point at position is updated
@@ -291,6 +294,9 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
{
llassert( obj );
+ //remember primary object
+ mSelectedObjects->mPrimaryObject = obj;
+
// This may be incorrect if things weren't family selected before... - djs 07/08/02
// Don't add an object that is already in the list
if (obj->isSelected() )
@@ -372,6 +378,9 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const LLDynamicArray<
LLViewerObject *object;
S32 i;
+ //clear primary object (no primary object)
+ mSelectedObjects->mPrimaryObject = NULL;
+
if (object_list.count() < 1) return NULL;
// NOTE -- we add the objects in REVERSE ORDER
@@ -842,6 +851,9 @@ LLObjectSelectionHandle LLSelectMgr::selectHighlightedObjects()
return NULL;
}
+ //clear primary object
+ mSelectedObjects->mPrimaryObject = NULL;
+
LLSelectNode *nodep;
for (nodep = mHighlightedObjects->getFirstNode();
nodep;
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index c0ddad41eb..04d55dcf7d 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -125,6 +125,7 @@ public:
LLViewerObject* getFirstCopyableObject(BOOL get_root = FALSE);
LLViewerObject* getFirstDeleteableObject(BOOL get_root = FALSE);
LLViewerObject* getFirstMoveableObject(BOOL get_root = FALSE);
+ LLViewerObject* getPrimaryObject() { return mPrimaryObject; }
// iterate through texture entries
void getPrimaryTE(LLViewerObject* *object, S32 *te);
@@ -161,6 +162,7 @@ public:
private:
const LLObjectSelection &operator=(const LLObjectSelection &);
+ LLPointer<LLViewerObject> mPrimaryObject;
std::list<LLSelectNode*>::iterator mCurrentNode;
S32 mCurrentTE;
std::map<LLViewerObject*, LLSelectNode*> mSelectNodeMap;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 64560efd67..9ac566b02b 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6096,7 +6096,7 @@ void complete_give_money(S32 option, void* user_data)
LLObjectSelectionHandle handle(*(LLObjectSelectionHandle*)user_data);
delete (LLObjectSelectionHandle*)user_data;
- LLViewerObject *objectp = handle->getFirstRootObject();
+ LLViewerObject* objectp = handle->getPrimaryObject();
// Show avatar's name if paying attachment
if (objectp && objectp->isAttachment())
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d7abae32c8..c7ecb225fb 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4763,57 +4763,47 @@ void LLPipeline::generateReflectionMap(LLCubeMap* cube_map, LLCamera& cube_cam,
//send cube map vertices and texture coordinates
void render_cube_map()
{
- if (gPipeline.mCubeList == 0)
- {
- gPipeline.mCubeList = glGenLists(1);
- glNewList(gPipeline.mCubeList, GL_COMPILE);
-
- U32 idx[36];
+
+ U32 idx[36];
- idx[0] = 1; idx[1] = 0; idx[2] = 2; //front
- idx[3] = 3; idx[4] = 2; idx[5] = 0;
+ idx[0] = 1; idx[1] = 0; idx[2] = 2; //front
+ idx[3] = 3; idx[4] = 2; idx[5] = 0;
- idx[6] = 4; idx[7] = 5; idx[8] = 1; //top
- idx[9] = 0; idx[10] = 1; idx[11] = 5;
+ idx[6] = 4; idx[7] = 5; idx[8] = 1; //top
+ idx[9] = 0; idx[10] = 1; idx[11] = 5;
- idx[12] = 5; idx[13] = 4; idx[14] = 6; //back
- idx[15] = 7; idx[16] = 6; idx[17] = 4;
+ idx[12] = 5; idx[13] = 4; idx[14] = 6; //back
+ idx[15] = 7; idx[16] = 6; idx[17] = 4;
- idx[18] = 6; idx[19] = 7; idx[20] = 3; //bottom
- idx[21] = 2; idx[22] = 3; idx[23] = 7;
+ idx[18] = 6; idx[19] = 7; idx[20] = 3; //bottom
+ idx[21] = 2; idx[22] = 3; idx[23] = 7;
- idx[24] = 0; idx[25] = 5; idx[26] = 3; //left
- idx[27] = 6; idx[28] = 3; idx[29] = 5;
+ idx[24] = 0; idx[25] = 5; idx[26] = 3; //left
+ idx[27] = 6; idx[28] = 3; idx[29] = 5;
- idx[30] = 4; idx[31] = 1; idx[32] = 7; //right
- idx[33] = 2; idx[34] = 7; idx[35] = 1;
+ idx[30] = 4; idx[31] = 1; idx[32] = 7; //right
+ idx[33] = 2; idx[34] = 7; idx[35] = 1;
- LLVector3 vert[8];
- LLVector3 r = LLVector3(1,1,1);
+ LLVector3 vert[8];
+ LLVector3 r = LLVector3(1,1,1);
- vert[0] = r.scaledVec(LLVector3(-1,1,1)); // 0 - left top front
- vert[1] = r.scaledVec(LLVector3(1,1,1)); // 1 - right top front
- vert[2] = r.scaledVec(LLVector3(1,-1,1)); // 2 - right bottom front
- vert[3] = r.scaledVec(LLVector3(-1,-1,1)); // 3 - left bottom front
+ vert[0] = r.scaledVec(LLVector3(-1,1,1)); // 0 - left top front
+ vert[1] = r.scaledVec(LLVector3(1,1,1)); // 1 - right top front
+ vert[2] = r.scaledVec(LLVector3(1,-1,1)); // 2 - right bottom front
+ vert[3] = r.scaledVec(LLVector3(-1,-1,1)); // 3 - left bottom front
- vert[4] = r.scaledVec(LLVector3(1,1,-1)); // 4 - left top back
- vert[5] = r.scaledVec(LLVector3(-1,1,-1)); // 5 - right top back
- vert[6] = r.scaledVec(LLVector3(-1,-1,-1)); // 6 - right bottom back
- vert[7] = r.scaledVec(LLVector3(1,-1,-1)); // 7 -left bottom back
+ vert[4] = r.scaledVec(LLVector3(1,1,-1)); // 4 - left top back
+ vert[5] = r.scaledVec(LLVector3(-1,1,-1)); // 5 - right top back
+ vert[6] = r.scaledVec(LLVector3(-1,-1,-1)); // 6 - right bottom back
+ vert[7] = r.scaledVec(LLVector3(1,-1,-1)); // 7 -left bottom back
- glBegin(GL_TRIANGLES);
- for (U32 i = 0; i < 36; i++)
- {
- glTexCoord3fv(vert[idx[i]].mV);
- glVertex3fv(vert[idx[i]].mV);
- }
- glEnd();
-
- glEndList();
+ glBegin(GL_TRIANGLES);
+ for (U32 i = 0; i < 36; i++)
+ {
+ glTexCoord3fv(vert[idx[i]].mV);
+ glVertex3fv(vert[idx[i]].mV);
}
-
- glCallList(gPipeline.mCubeList);
-
+ glEnd();
}
void LLPipeline::blurReflectionMap(LLCubeMap* cube_in, LLCubeMap* cube_out, U32 res)