Merge branch 'master' of https://github.com/Shyotl/SingularityViewer
This commit is contained in:
@@ -1085,8 +1085,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::strin
|
||||
U8 packed_buffer[MAX_TE_BUFFER];
|
||||
U8 *cur_ptr = packed_buffer;
|
||||
|
||||
|
||||
S32 last_face_index = getNumTEs() - 1;
|
||||
S32 last_face_index = llmin((U32) getNumTEs(), MAX_TES) - 1;
|
||||
|
||||
if (client_str == "c228d1cf-4b5d-4ba8-84f4-899a0796aa97") shield = 0;
|
||||
|
||||
@@ -1380,7 +1379,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
|
||||
return retval;
|
||||
}
|
||||
|
||||
face_count = getNumTEs();
|
||||
face_count = llmin((U32) getNumTEs(), MAX_TES);
|
||||
U32 i;
|
||||
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_data, 16, face_count, MVT_LLUUID);
|
||||
|
||||
@@ -70,7 +70,7 @@ hasGamma(false), hasLighting(false), calculatesAtmospherics(false)
|
||||
// LLGLSL Shader implementation
|
||||
//===============================
|
||||
LLGLSLShader::LLGLSLShader(S32 shader_class)
|
||||
: mProgramObject(0), mShaderClass(shader_class), mShaderLevel(0), mShaderGroup(SG_DEFAULT)
|
||||
: mProgramObject(0), mShaderClass(shader_class), mActiveTextureChannels(0), mShaderLevel(0), mShaderGroup(SG_DEFAULT), mUniformsDirty(FALSE)
|
||||
{
|
||||
LLShaderMgr::getGlobalShaderList().push_back(this);
|
||||
}
|
||||
|
||||
@@ -238,9 +238,11 @@ public:
|
||||
class LLGLSSpecular
|
||||
{
|
||||
public:
|
||||
F32 mShininess;
|
||||
LLGLSSpecular(const LLColor4& color, F32 shininess)
|
||||
{
|
||||
if (shininess > 0.0f)
|
||||
mShininess = shininess;
|
||||
if (mShininess > 0.0f)
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color.mV);
|
||||
S32 shiny = (S32)(shininess*128.f);
|
||||
@@ -250,8 +252,11 @@ public:
|
||||
}
|
||||
~LLGLSSpecular()
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
|
||||
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
|
||||
if (mShininess > 0.f)
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
|
||||
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -795,15 +795,21 @@ void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB
|
||||
{
|
||||
flush();
|
||||
|
||||
mCurrColorMask[0] = writeColorR;
|
||||
mCurrColorMask[1] = writeColorG;
|
||||
mCurrColorMask[2] = writeColorB;
|
||||
if (mCurrColorMask[0] != writeColorR ||
|
||||
mCurrColorMask[1] != writeColorG ||
|
||||
mCurrColorMask[2] != writeColorB ||
|
||||
mCurrColorMask[3] != writeAlpha)
|
||||
{
|
||||
mCurrColorMask[0] = writeColorR;
|
||||
mCurrColorMask[1] = writeColorG;
|
||||
mCurrColorMask[2] = writeColorB;
|
||||
mCurrColorMask[3] = writeAlpha;
|
||||
|
||||
glColorMask(writeColorR ? GL_TRUE : GL_FALSE,
|
||||
writeColorG ? GL_TRUE : GL_FALSE,
|
||||
writeColorB ? GL_TRUE : GL_FALSE,
|
||||
writeAlpha ? GL_TRUE : GL_FALSE);
|
||||
writeColorB ? GL_TRUE : GL_FALSE,
|
||||
writeAlpha ? GL_TRUE : GL_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLRender::setSceneBlendType(eBlendType type)
|
||||
@@ -841,15 +847,19 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
|
||||
{
|
||||
flush();
|
||||
|
||||
mCurrAlphaFunc = func;
|
||||
mCurrAlphaFuncVal = value;
|
||||
if (func == CF_DEFAULT)
|
||||
if (mCurrAlphaFunc != func ||
|
||||
mCurrAlphaFuncVal != value)
|
||||
{
|
||||
glAlphaFunc(GL_GREATER, 0.01f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glAlphaFunc(sGLCompareFunc[func], value);
|
||||
mCurrAlphaFunc = func;
|
||||
mCurrAlphaFuncVal = value;
|
||||
if (func == CF_DEFAULT)
|
||||
{
|
||||
glAlphaFunc(GL_GREATER, 0.01f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glAlphaFunc(sGLCompareFunc[func], value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -302,6 +302,8 @@ NVIDIA GeForce 6700 .*NVIDIA.*GeForce 67.* 2 1
|
||||
NVIDIA GeForce 6800 .*NVIDIA.*GeForce 68.* 2 1
|
||||
NVIDIA GeForce 7000M .*NVIDIA.*GeForce 7000M.* 0 1
|
||||
NVIDIA GeForce 7100M .*NVIDIA.*GeForce 7100M.* 0 1
|
||||
NVIDIA GeForce 7000 .*NVIDIA.*GeForce 70.* 0 1
|
||||
NVIDIA GeForce 7100 .*NVIDIA.*GeForce 71.* 0 1
|
||||
NVIDIA GeForce 7200 .*NVIDIA.*GeForce 72.* 1 1
|
||||
NVIDIA GeForce 7300 .*NVIDIA.*GeForce 73.* 1 1
|
||||
NVIDIA GeForce 7500 .*NVIDIA.*GeForce 75.* 1 1
|
||||
@@ -389,8 +391,39 @@ NVIDIA MCP78 .*NVIDIA.*MCP78.* 1 1
|
||||
NVIDIA Quadro2 .*Quadro2.* 0 1
|
||||
NVIDIA Quadro4 .*Quadro4.* 0 1
|
||||
NVIDIA Quadro DCC .*Quadro DCC.* 0 1
|
||||
NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 3 1
|
||||
NVIDIA Quadro FX 1400 .*Quadro.*FX.*1400.* 1 1
|
||||
NVIDIA Quadro FX 1500 .*Quadro.*FX.*1500.* 1 1
|
||||
NVIDIA Quadro FX 1700 .*Quadro.*FX.*1700.* 2 1
|
||||
NVIDIA Quadro FX 1800 .*Quadro.*FX.*1800.* 2 1
|
||||
NVIDIA Quadro FX 3400 .*Quadro.*FX.*3400.* 1 1
|
||||
NVIDIA Quadro FX 3450 .*Quadro.*FX.*3450.* 1 1
|
||||
NVIDIA Quadro FX 3500 .*Quadro.*FX.*3500.* 1 1
|
||||
NVIDIA Quadro FX 3700 .*Quadro.*FX.*3700.* 2 1
|
||||
NVIDIA Quadro FX 3800 .*Quadro.*FX.*3800.* 2 1
|
||||
NVIDIA Quadro FX 370 .*Quadro.*FX.*370.* 2 1
|
||||
NVIDIA Quadro FX 380 .*Quadro.*FX.*380.* 2 1
|
||||
NVIDIA Quadro FX 4000 .*Quadro.*FX.*4000.* 1 1
|
||||
NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 1 1
|
||||
NVIDIA Quadro FX 4600 .*Quadro.*FX.*4600.* 2 1
|
||||
NVIDIA Quadro FX 4700 .*Quadro.*FX.*4700.* 2 1
|
||||
NVIDIA Quadro FX 4800 .*Quadro.*FX.*4800.* 2 1
|
||||
NVIDIA Quadro FX 470 .*Quadro.*FX.*470.* 2 1
|
||||
NVIDIA Quadro FX 5500 .*Quadro.*FX.*5500.* 1 1
|
||||
NVIDIA Quadro FX 5600 .*Quadro.*FX.*5600.* 2 1
|
||||
NVIDIA Quadro FX 5700 .*Quadro.*FX.*5700.* 2 1
|
||||
NVIDIA Quadro FX 5800 .*Quadro.*FX.*5800.* 2 1
|
||||
NVIDIA Quadro FX 540 .*Quadro.*FX.*540.* 1 1
|
||||
NVIDIA Quadro FX 550 .*Quadro.*FX.*550.* 1 1
|
||||
NVIDIA Quadro FX 560 .*Quadro.*FX.*560.* 1 1
|
||||
NVIDIA Quadro FX 570 .*Quadro.*FX.*570.* 2 1
|
||||
NVIDIA Quadro FX 580 .*Quadro.*FX.*580.* 2 1
|
||||
NVIDIA Quadro FX .*Quadro FX.* 1 1
|
||||
NVIDIA Quadro VX 200 .*Quadro VX.*200.* 2 1
|
||||
NVIDIA Quadro 2000 .*Quadro.*2000.* 2 1
|
||||
NVIDIA Quadro 4000 .*Quadro.*4000.* 2 1
|
||||
NVIDIA Quadro 5000 .*Quadro.*5000.* 2 1
|
||||
NVIDIA Quadro 6000 .*Quadro.*6000.* 2 1
|
||||
NVIDIA Quadro 600 .*Quadro.*600.* 2 1
|
||||
NVIDIA Quadro NVS .*Quadro NVS.* 0 1
|
||||
NVIDIA RIVA TNT .*RIVA TNT.* 0 0
|
||||
NVIDIA PCI .*NVIDIA.*/PCI/SSE2 0 0
|
||||
|
||||
@@ -596,23 +596,26 @@ void LLFace::printDebugInfo() const
|
||||
llinfos << "II: " << mIndicesIndex << " Count:" << mIndicesCount << llendl;
|
||||
llinfos << llendl;
|
||||
|
||||
poolp->printDebugInfo();
|
||||
|
||||
S32 pool_references = 0;
|
||||
for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin();
|
||||
iter != poolp->mReferences.end(); iter++)
|
||||
if (poolp)
|
||||
{
|
||||
LLFace *facep = *iter;
|
||||
if (facep == this)
|
||||
poolp->printDebugInfo();
|
||||
|
||||
S32 pool_references = 0;
|
||||
for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin();
|
||||
iter != poolp->mReferences.end(); iter++)
|
||||
{
|
||||
llinfos << "Pool reference: " << pool_references << llendl;
|
||||
pool_references++;
|
||||
LLFace *facep = *iter;
|
||||
if (facep == this)
|
||||
{
|
||||
llinfos << "Pool reference: " << pool_references << llendl;
|
||||
pool_references++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pool_references != 1)
|
||||
{
|
||||
llinfos << "Incorrect number of pool references!" << llendl;
|
||||
if (pool_references != 1)
|
||||
{
|
||||
llinfos << "Incorrect number of pool references!" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterblacklist.h"
|
||||
|
||||
static const size_t num_collision_sounds = 28;
|
||||
static const size_t num_collision_sounds = 29;
|
||||
const LLUUID collision_sounds[num_collision_sounds] =
|
||||
{
|
||||
LLUUID("dce5fdd4-afe4-4ea1-822f-dd52cac46b08"),
|
||||
@@ -42,7 +42,8 @@ const LLUUID collision_sounds[num_collision_sounds] =
|
||||
LLUUID("be582e5d-b123-41a2-a150-454c39e961c8"),
|
||||
LLUUID("c70141d4-ba06-41ea-bcbc-35ea81cb8335"),
|
||||
LLUUID("7d1826f4-24c4-4aac-8c2e-eff45df37783"),
|
||||
LLUUID("063c97d3-033a-4e9b-98d8-05c8074922cb")
|
||||
LLUUID("063c97d3-033a-4e9b-98d8-05c8074922cb"),
|
||||
LLUUID("e8af4a28-aa83-4310-a7c4-c047e15ea0df") //Step sound
|
||||
};
|
||||
|
||||
LLFloaterExploreSounds* LLFloaterExploreSounds::sInstance;
|
||||
|
||||
@@ -809,13 +809,14 @@ void LLHUDText::updateVisibility()
|
||||
return;
|
||||
}
|
||||
|
||||
if (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= LLViewerCamera::getInstance()->getNear() + 0.1f + mSourceObject->getVObjRadius())
|
||||
F32 object_radius = llmin(mSourceObject->getVObjRadius(), 26.f); //~15x15x15 prim : sqrt((15^2) * 3) = 25.9807621. getVObjRadius is diam.
|
||||
if (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= LLViewerCamera::getInstance()->getNear() + 0.1f + object_radius)
|
||||
{
|
||||
mPositionAgent = LLViewerCamera::getInstance()->getOrigin() + vec_from_camera * ((LLViewerCamera::getInstance()->getNear() + 0.1f) / (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis()));
|
||||
}
|
||||
else
|
||||
{
|
||||
mPositionAgent -= dir_from_camera * mSourceObject->getVObjRadius();
|
||||
mPositionAgent -= dir_from_camera * object_radius;
|
||||
}
|
||||
|
||||
mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec();
|
||||
|
||||
@@ -116,78 +116,6 @@ void validate_drawable(LLDrawable* drawablep)
|
||||
#define validate_drawable(x)
|
||||
#endif
|
||||
|
||||
class LLOctreeStateCheck : public LLOctreeTraveler<LLDrawable>
|
||||
{
|
||||
public:
|
||||
U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
LLOctreeStateCheck()
|
||||
{
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void traverse(const LLSpatialGroup::OctreeNode* node)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
|
||||
|
||||
node->accept(this);
|
||||
|
||||
|
||||
U32 temp[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
temp[i] = mInheritedMask[i];
|
||||
mInheritedMask[i] |= group->mOcclusionState[i] & LLSpatialGroup::OCCLUDED;
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < node->getChildCount(); i++)
|
||||
{
|
||||
traverse(node->getChild(i));
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = temp[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual void visit(const LLOctreeNode<LLDrawable>* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i]))
|
||||
{
|
||||
llerrs << "Spatial group failed inherited mask test." << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
if (group->isState(LLSpatialGroup::DIRTY))
|
||||
{
|
||||
assert_parent_state(group, LLSpatialGroup::DIRTY);
|
||||
}
|
||||
}
|
||||
|
||||
void assert_parent_state(LLSpatialGroup* group, LLSpatialGroup::eSpatialState state)
|
||||
{
|
||||
LLSpatialGroup* parent = group->getParent();
|
||||
while (parent)
|
||||
{
|
||||
if (!parent->isState(state))
|
||||
{
|
||||
llerrs << "Spatial group failed parent state check." << llendl;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad)
|
||||
{
|
||||
@@ -3069,6 +2997,79 @@ void LLSpatialPartition::renderIntersectingBBoxes(LLCamera* camera)
|
||||
pusher.traverse(mOctree);
|
||||
}
|
||||
|
||||
class LLOctreeStateCheck : public LLOctreeTraveler<LLDrawable>
|
||||
{
|
||||
public:
|
||||
U32 mInheritedMask[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
LLOctreeStateCheck()
|
||||
{
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void traverse(const LLSpatialGroup::OctreeNode* node)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) node->getListener(0);
|
||||
|
||||
node->accept(this);
|
||||
|
||||
|
||||
U32 temp[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
temp[i] = mInheritedMask[i];
|
||||
mInheritedMask[i] |= group->mOcclusionState[i] & LLSpatialGroup::OCCLUDED;
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < node->getChildCount(); i++)
|
||||
{
|
||||
traverse(node->getChild(i));
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
mInheritedMask[i] = temp[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual void visit(const LLOctreeNode<LLDrawable>* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
|
||||
for (U32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
|
||||
{
|
||||
if (mInheritedMask[i] && !(group->mOcclusionState[i] & mInheritedMask[i]))
|
||||
{
|
||||
llerrs << "Spatial group failed inherited mask test." << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
if (group->isState(LLSpatialGroup::DIRTY))
|
||||
{
|
||||
assert_parent_state(group, LLSpatialGroup::DIRTY);
|
||||
}
|
||||
}
|
||||
|
||||
void assert_parent_state(LLSpatialGroup* group, LLSpatialGroup::eSpatialState state)
|
||||
{
|
||||
LLSpatialGroup* parent = group->getParent();
|
||||
while (parent)
|
||||
{
|
||||
if (!parent->isState(state))
|
||||
{
|
||||
llerrs << "Spatial group failed parent state check." << llendl;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void LLSpatialPartition::renderDebug()
|
||||
{
|
||||
if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCTREE |
|
||||
|
||||
@@ -5882,8 +5882,8 @@ std::string LLVOAvatar::getIdleTime()
|
||||
// animations.
|
||||
LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
|
||||
{
|
||||
LLCachedControl<bool> use_new_walk_run("UseNewWalkRun",true);
|
||||
LLCachedControl<bool> use_cross_walk_run("UseCrossWalkRun",false);
|
||||
static const LLCachedControl<bool> use_new_walk_run("UseNewWalkRun",true);
|
||||
static const LLCachedControl<bool> use_cross_walk_run("UseCrossWalkRun",false);
|
||||
LLUUID result = id;
|
||||
|
||||
// start special case female walk for female avatars
|
||||
|
||||
Reference in New Issue
Block a user