Automated merge with ssh://hg.lindenlab.com/dessie/viewer-public
commit
28d4fe68f8
|
|
@ -365,6 +365,13 @@ U32 LLCurl::Easy::report(CURLcode code)
|
|||
responseReason = strerror(code) + " : " + mErrorBuffer;
|
||||
}
|
||||
|
||||
if(responseCode >= 300 && responseCode < 400) //redirect
|
||||
{
|
||||
char new_url[512] ;
|
||||
curl_easy_getinfo(mCurlEasyHandle, CURLINFO_REDIRECT_URL, new_url);
|
||||
responseReason = new_url ; //get the new URL.
|
||||
}
|
||||
|
||||
if (mResponder)
|
||||
{
|
||||
mResponder->completedRaw(responseCode, responseReason, mChannels, mOutput);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
<RenderAvatarCloth value="FALSE"/>
|
||||
<!--Default for now-->
|
||||
<RenderAvatarLODFactor value="0.5"/>
|
||||
<!--Default for now-->
|
||||
<RenderAvatarMaxVisible value="3"/>
|
||||
<!--NO SHADERS-->
|
||||
<RenderAvatarVP value="FALSE"/>
|
||||
<!--Short Range-->
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ list Low
|
|||
RenderAnisotropic 1 0
|
||||
RenderAvatarCloth 1 0
|
||||
RenderAvatarLODFactor 1 0.5
|
||||
RenderAvatarMaxVisible 1 3
|
||||
RenderAvatarVP 1 0
|
||||
RenderFarClip 1 64
|
||||
RenderFlexTimeFactor 1 0.5
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ list Low
|
|||
RenderAnisotropic 1 0
|
||||
RenderAvatarCloth 1 0
|
||||
RenderAvatarLODFactor 1 0.5
|
||||
RenderAvatarMaxVisible 1 3
|
||||
RenderAvatarVP 1 0
|
||||
RenderFarClip 1 64
|
||||
RenderFlexTimeFactor 1 0.5
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ list Low
|
|||
RenderAnisotropic 1 0
|
||||
RenderAvatarCloth 1 0
|
||||
RenderAvatarLODFactor 1 0.5
|
||||
RenderAvatarMaxVisible 1 3
|
||||
RenderAvatarVP 1 0
|
||||
RenderFarClip 1 64
|
||||
RenderFlexTimeFactor 1 0.5
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ UseOcclusion 0 0
|
|||
list low
|
||||
RenderVBO 1 0
|
||||
RenderAniso 1 0
|
||||
RenderAvatarMaxVisible 1 3
|
||||
RenderLighting 1 0
|
||||
|
||||
list medium
|
||||
|
|
|
|||
|
|
@ -113,9 +113,12 @@ void LLDrawPoolTree::render(S32 pass)
|
|||
iter != mDrawFace.end(); iter++)
|
||||
{
|
||||
LLFace *face = *iter;
|
||||
face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
|
||||
face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0);
|
||||
gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices());
|
||||
if(face->mVertexBuffer.notNull())
|
||||
{
|
||||
face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
|
||||
face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0);
|
||||
gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -333,7 +336,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
|
|||
S32 stop_depth = 0;
|
||||
F32 app_angle = treep->getAppAngle()*LLVOTree::sTreeFactor;
|
||||
F32 alpha = 1.0;
|
||||
S32 trunk_LOD = 0;
|
||||
S32 trunk_LOD = LLVOTree::sMAX_NUM_TREE_LOD_LEVELS;
|
||||
|
||||
for (S32 j = 0; j < 4; j++)
|
||||
{
|
||||
|
|
@ -344,6 +347,10 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(trunk_LOD >= LLVOTree::sMAX_NUM_TREE_LOD_LEVELS)
|
||||
{
|
||||
continue ; //do not render.
|
||||
}
|
||||
|
||||
if (app_angle < (THRESH_ANGLE_FOR_BILLBOARD - BLEND_RANGE_FOR_BILLBOARD))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -328,11 +328,7 @@ public:
|
|||
partial = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
worker->setGetStatus(status, reason);
|
||||
// llwarns << status << ": " << reason << llendl;
|
||||
}
|
||||
|
||||
if (!success)
|
||||
{
|
||||
worker->setGetStatus(status, reason);
|
||||
|
|
@ -904,7 +900,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
if (mGetStatus == HTTP_NOT_FOUND)
|
||||
{
|
||||
mHTTPFailCount = max_attempts = 1; // Don't retry
|
||||
//llinfos << "Texture missing from server (404): " << mUrl << llendl;
|
||||
llwarns << "Texture missing from server (404): " << mUrl << llendl;
|
||||
|
||||
//roll back to try UDP
|
||||
mState = INIT ;
|
||||
|
|
@ -921,6 +917,17 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
max_attempts = mHTTPFailCount+1; // Keep retrying
|
||||
LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL;
|
||||
}
|
||||
else if(mGetStatus >= HTTP_MULTIPLE_CHOICES && mGetStatus < HTTP_BAD_REQUEST) //http re-direct
|
||||
{
|
||||
++mHTTPFailCount;
|
||||
max_attempts = 5 ; //try at most 5 times to avoid infinite redirection loop.
|
||||
|
||||
llwarns << "HTTP GET failed because of redirection: " << mUrl
|
||||
<< " Status: " << mGetStatus << " Reason: '" << mGetReason << llendl ;
|
||||
|
||||
//assign to the new url
|
||||
mUrl = mGetReason ;
|
||||
}
|
||||
else
|
||||
{
|
||||
const S32 HTTP_MAX_RETRY_COUNT = 3;
|
||||
|
|
@ -930,6 +937,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
|||
<< " Status: " << mGetStatus << " Reason: '" << mGetReason << "'"
|
||||
<< " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl;
|
||||
}
|
||||
|
||||
if (mHTTPFailCount >= max_attempts)
|
||||
{
|
||||
if (cur_size > 0)
|
||||
|
|
|
|||
|
|
@ -66,12 +66,14 @@ const F32 LEAF_TOP = 1.0f;
|
|||
const F32 LEAF_BOTTOM = 0.52f;
|
||||
const F32 LEAF_WIDTH = 1.f;
|
||||
|
||||
S32 LLVOTree::sLODVertexOffset[4];
|
||||
S32 LLVOTree::sLODVertexCount[4];
|
||||
S32 LLVOTree::sLODIndexOffset[4];
|
||||
S32 LLVOTree::sLODIndexCount[4];
|
||||
S32 LLVOTree::sLODSlices[4] = {10, 5, 4, 3};
|
||||
F32 LLVOTree::sLODAngles[4] = {30.f, 20.f, 15.f, 0.f};
|
||||
const S32 LLVOTree::sMAX_NUM_TREE_LOD_LEVELS = 4 ;
|
||||
|
||||
S32 LLVOTree::sLODVertexOffset[sMAX_NUM_TREE_LOD_LEVELS];
|
||||
S32 LLVOTree::sLODVertexCount[sMAX_NUM_TREE_LOD_LEVELS];
|
||||
S32 LLVOTree::sLODIndexOffset[sMAX_NUM_TREE_LOD_LEVELS];
|
||||
S32 LLVOTree::sLODIndexCount[sMAX_NUM_TREE_LOD_LEVELS];
|
||||
S32 LLVOTree::sLODSlices[sMAX_NUM_TREE_LOD_LEVELS] = {10, 5, 4, 3};
|
||||
F32 LLVOTree::sLODAngles[sMAX_NUM_TREE_LOD_LEVELS] = {30.f, 20.f, 15.f, 0.00001f};
|
||||
|
||||
F32 LLVOTree::sTreeFactor = 1.f;
|
||||
|
||||
|
|
@ -373,12 +375,11 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
|||
}
|
||||
}
|
||||
|
||||
S32 trunk_LOD = 0;
|
||||
S32 trunk_LOD = sMAX_NUM_TREE_LOD_LEVELS ;
|
||||
F32 app_angle = getAppAngle()*LLVOTree::sTreeFactor;
|
||||
|
||||
for (S32 j = 0; j < 4; j++)
|
||||
for (S32 j = 0; j < sMAX_NUM_TREE_LOD_LEVELS; j++)
|
||||
{
|
||||
|
||||
if (app_angle > LLVOTree::sLODAngles[j])
|
||||
{
|
||||
trunk_LOD = j;
|
||||
|
|
@ -445,16 +446,15 @@ void LLVOTree::setPixelAreaAndAngle(LLAgent &agent)
|
|||
|
||||
// This should be the camera's center, as soon as we move to all region-local.
|
||||
LLVector3 relative_position = getPositionAgent() - gAgentCamera.getCameraPositionAgent();
|
||||
F32 range = relative_position.length(); // ugh, square root
|
||||
F32 range_squared = relative_position.lengthSquared() ;
|
||||
|
||||
F32 max_scale = mBillboardScale * getMaxScale();
|
||||
F32 area = max_scale * (max_scale*mBillboardRatio);
|
||||
|
||||
// Compute pixels per meter at the given range
|
||||
F32 pixels_per_meter = LLViewerCamera::getInstance()->getViewHeightInPixels() /
|
||||
(tan(LLViewerCamera::getInstance()->getView()) * range);
|
||||
F32 pixels_per_meter = LLViewerCamera::getInstance()->getViewHeightInPixels() / tan(LLViewerCamera::getInstance()->getView());
|
||||
|
||||
mPixelArea = (pixels_per_meter) * (pixels_per_meter) * area;
|
||||
mPixelArea = (pixels_per_meter) * (pixels_per_meter) * area / range_squared;
|
||||
#if 0
|
||||
// mAppAngle is a bit of voodoo;
|
||||
// use the one calculated LLViewerObject::setPixelAreaAndAngle above
|
||||
|
|
@ -506,6 +506,13 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
|
|||
{
|
||||
LLFastTimer ftm(FTM_UPDATE_TREE);
|
||||
|
||||
if(mTrunkLOD >= sMAX_NUM_TREE_LOD_LEVELS) //do not display the tree.
|
||||
{
|
||||
mReferenceBuffer = NULL ;
|
||||
mDrawable->getFace(0)->mVertexBuffer = NULL ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
if (mReferenceBuffer.isNull() || mDrawable->getFace(0)->mVertexBuffer.isNull())
|
||||
{
|
||||
const F32 SRR3 = 0.577350269f; // sqrt(1/3)
|
||||
|
|
@ -523,7 +530,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
|
|||
face->mCenterAgent = getPositionAgent();
|
||||
face->mCenterLocal = face->mCenterAgent;
|
||||
|
||||
for (lod = 0; lod < 4; lod++)
|
||||
for (lod = 0; lod < sMAX_NUM_TREE_LOD_LEVELS; lod++)
|
||||
{
|
||||
slices = sLODSlices[lod];
|
||||
sLODVertexOffset[lod] = max_vertices;
|
||||
|
|
@ -700,7 +707,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
|
|||
// Generate the vertices
|
||||
// Generate the indices
|
||||
|
||||
for (lod = 0; lod < 4; lod++)
|
||||
for (lod = 0; lod < sMAX_NUM_TREE_LOD_LEVELS; lod++)
|
||||
{
|
||||
slices = sLODSlices[lod];
|
||||
F32 base_radius = 0.65f;
|
||||
|
|
@ -892,7 +899,6 @@ void LLVOTree::updateMesh()
|
|||
S32 stop_depth = 0;
|
||||
F32 alpha = 1.0;
|
||||
|
||||
|
||||
U32 vert_count = 0;
|
||||
U32 index_count = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ public:
|
|||
};
|
||||
|
||||
static F32 sTreeFactor; // Tree level of detail factor
|
||||
static const S32 sMAX_NUM_TREE_LOD_LEVELS ;
|
||||
|
||||
friend class LLDrawPoolTree;
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@
|
|||
layout="topleft"
|
||||
left="5"
|
||||
name="CustomGraphics Panel"
|
||||
top="124"
|
||||
top="76"
|
||||
width="485">
|
||||
<text
|
||||
type="string"
|
||||
|
|
@ -351,7 +351,7 @@
|
|||
top_delta="0"
|
||||
width="128">
|
||||
m
|
||||
</text>
|
||||
</text>
|
||||
<slider
|
||||
control_name="RenderMaxPartCount"
|
||||
decimal_digits="0"
|
||||
|
|
@ -367,6 +367,34 @@
|
|||
name="MaxParticleCount"
|
||||
top_pad="7"
|
||||
width="303" />
|
||||
<slider
|
||||
control_name="RenderAvatarMaxVisible"
|
||||
decimal_digits="0"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
increment="2"
|
||||
initial_value="35"
|
||||
label="Max. avatar draw distance:"
|
||||
label_width="185"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
max_val="65"
|
||||
min_val="1"
|
||||
name="MaxAvatarDrawDistance"
|
||||
top_pad="4"
|
||||
width="290" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="12"
|
||||
layout="topleft"
|
||||
left_delta="291"
|
||||
name="DrawDistanceMeterText2"
|
||||
top_delta="0"
|
||||
width="128">
|
||||
m
|
||||
</text>
|
||||
<slider
|
||||
control_name="RenderGlowResolutionPow"
|
||||
decimal_digits="0"
|
||||
|
|
@ -377,7 +405,7 @@
|
|||
label="Post process quality:"
|
||||
label_width="185"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
left="200"
|
||||
max_val="9"
|
||||
min_val="8"
|
||||
name="RenderPostProcess"
|
||||
|
|
@ -522,7 +550,7 @@
|
|||
layout="topleft"
|
||||
left="469"
|
||||
name="PostProcessText"
|
||||
top="305"
|
||||
top="60"
|
||||
width="128">
|
||||
Low
|
||||
</text>
|
||||
|
|
@ -607,7 +635,7 @@
|
|||
layout="topleft"
|
||||
left="200"
|
||||
name="LightingDetailText"
|
||||
top_pad="8"
|
||||
top_pad="18"
|
||||
width="140">
|
||||
Lighting detail:
|
||||
</text>
|
||||
|
|
@ -644,7 +672,7 @@
|
|||
layout="topleft"
|
||||
left_pad="-30"
|
||||
name="TerrainDetailText"
|
||||
top="465"
|
||||
top="226"
|
||||
width="155">
|
||||
Terrain detail:
|
||||
</text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue