merge
commit
1b2c082feb
|
|
@ -5762,7 +5762,7 @@ void LLVolumeFace::cacheOptimize()
|
|||
for (U32 i = 0; i < mNumIndices; i++)
|
||||
{ //populate vertex data and triangle data arrays
|
||||
U16 idx = mIndices[i];
|
||||
U16 tri_idx = i/3;
|
||||
U32 tri_idx = i/3;
|
||||
|
||||
vertex_data[idx].mTriangles.push_back(&(triangle_data[tri_idx]));
|
||||
vertex_data[idx].mIdx = idx;
|
||||
|
|
|
|||
|
|
@ -763,7 +763,7 @@ void LLDrawable::updateTexture()
|
|||
|
||||
if (getVOVolume())
|
||||
{
|
||||
if (isActive())
|
||||
/*if (isActive())
|
||||
{
|
||||
if (isRoot())
|
||||
{
|
||||
|
|
@ -773,7 +773,7 @@ void LLDrawable::updateTexture()
|
|||
{
|
||||
getParent()->mQuietCount = 0;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,12 +145,7 @@ void LLStandardBumpmap::addstandard()
|
|||
// llinfos << "Loading bumpmap: " << bump_image_id << " from viewerart" << llendl;
|
||||
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label;
|
||||
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage =
|
||||
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id),
|
||||
TRUE,
|
||||
LLViewerTexture::BOOST_NONE,
|
||||
LLViewerTexture::LOD_TEXTURE,
|
||||
0,
|
||||
0);
|
||||
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));
|
||||
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
|
||||
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL );
|
||||
LLStandardBumpmap::sStandardBumpmapCount++;
|
||||
|
|
|
|||
|
|
@ -2465,7 +2465,6 @@ void renderOctree(LLSpatialGroup* group)
|
|||
{
|
||||
//render solid object bounding box, color
|
||||
//coded by buffer usage and activity
|
||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
|
||||
LLVector4 col;
|
||||
if (group->mBuilt > 0.f)
|
||||
|
|
@ -2557,7 +2556,10 @@ void renderOctree(LLSpatialGroup* group)
|
|||
size.mul(1.01f);
|
||||
size.add(fudge);
|
||||
|
||||
drawBox(group->mObjectBounds[0], fudge);
|
||||
{
|
||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||
drawBox(group->mObjectBounds[0], fudge);
|
||||
}
|
||||
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
|
||||
|
|
|
|||
|
|
@ -755,7 +755,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
{
|
||||
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
||||
LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT);
|
||||
gPipeline.sAllowRebuildPriorityGroup = TRUE ;
|
||||
gPipeline.stateSort(*LLViewerCamera::getInstance(), result);
|
||||
stop_glerror();
|
||||
|
||||
|
|
|
|||
|
|
@ -1422,7 +1422,7 @@ void LLViewerObjectList::updateObjectCost(const LLUUID& object_id, F32 object_co
|
|||
|
||||
void LLViewerObjectList::onObjectCostFetchFailure(const LLUUID& object_id)
|
||||
{
|
||||
llwarns << "Failed to fetch object cost for object: " << object_id << llendl;
|
||||
//llwarns << "Failed to fetch object cost for object: " << object_id << llendl;
|
||||
mPendingObjectCost.erase(object_id);
|
||||
}
|
||||
|
||||
|
|
@ -1461,7 +1461,7 @@ void LLViewerObjectList::updatePhysicsProperties(const LLUUID& object_id,
|
|||
|
||||
void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id)
|
||||
{
|
||||
llwarns << "Failed to fetch physics flags for object: " << object_id << llendl;
|
||||
//llwarns << "Failed to fetch physics flags for object: " << object_id << llendl;
|
||||
mPendingPhysicsFlags.erase(object_id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -857,7 +857,8 @@ void LLVOVolume::updateTextureVirtualSize()
|
|||
|
||||
BOOL LLVOVolume::isActive() const
|
||||
{
|
||||
return !mStatic || mTextureAnimp || (mVolumeImpl && mVolumeImpl->isActive());
|
||||
return !mStatic || mTextureAnimp || (mVolumeImpl && mVolumeImpl->isActive()) ||
|
||||
(mDrawable.notNull() && mDrawable->isActive());
|
||||
}
|
||||
|
||||
BOOL LLVOVolume::setMaterial(const U8 material)
|
||||
|
|
@ -931,9 +932,9 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline)
|
|||
return mDrawable;
|
||||
}
|
||||
|
||||
BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool unique_volume)
|
||||
BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bool unique_volume)
|
||||
{
|
||||
LLVolumeParams volume_params = params;
|
||||
LLVolumeParams volume_params = params_in;
|
||||
|
||||
S32 lod = mLOD;
|
||||
|
||||
|
|
@ -945,7 +946,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool
|
|||
if ((volume_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
|
||||
{ //meshes might not have all LODs, get the force detail to best existing LOD
|
||||
|
||||
LLUUID mesh_id = params.getSculptID();
|
||||
LLUUID mesh_id = volume_params.getSculptID();
|
||||
|
||||
//profile and path params don't matter for meshes
|
||||
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
|
||||
|
|
@ -1019,6 +1020,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool
|
|||
LLPrimitive::setVolume(volume_params, available_lod);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else // otherwise is sculptie
|
||||
{
|
||||
|
|
@ -1031,6 +1033,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -3279,28 +3282,6 @@ F32 LLVOVolume::getBinRadius()
|
|||
|
||||
F32 scale = 1.f;
|
||||
|
||||
if (isSculpted())
|
||||
{
|
||||
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
|
||||
LLUUID id = sculpt_params->getSculptTexture();
|
||||
U8 sculpt_type = sculpt_params->getSculptType();
|
||||
|
||||
if ((sculpt_type & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)
|
||||
// mesh is a mesh
|
||||
{
|
||||
LLVolume* volume = getVolume();
|
||||
U32 vert_count = 0;
|
||||
|
||||
for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
|
||||
{
|
||||
const LLVolumeFace& face = volume->getVolumeFace(i);
|
||||
vert_count += face.mNumVertices;
|
||||
}
|
||||
|
||||
scale = 1.f/llmax(vert_count/1024.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
const LLVector4a* ext = mDrawable->getSpatialExtents();
|
||||
|
||||
BOOL shrink_wrap = mDrawable->isAnimating();
|
||||
|
|
@ -4393,6 +4374,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
|
|||
{
|
||||
LLVOVolume* vobj = drawablep->getVOVolume();
|
||||
vobj->preRebuild();
|
||||
|
||||
LLVolume* volume = vobj->getVolume();
|
||||
for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -284,7 +284,6 @@ BOOL LLPipeline::sRenderFrameTest = FALSE;
|
|||
BOOL LLPipeline::sRenderAttachedLights = TRUE;
|
||||
BOOL LLPipeline::sRenderAttachedParticles = TRUE;
|
||||
BOOL LLPipeline::sRenderDeferred = FALSE;
|
||||
BOOL LLPipeline::sAllowRebuildPriorityGroup = FALSE ;
|
||||
S32 LLPipeline::sVisibleLightCount = 0;
|
||||
F32 LLPipeline::sMinRenderSize = 0.f;
|
||||
|
||||
|
|
@ -2112,12 +2111,6 @@ void LLPipeline::updateGL()
|
|||
|
||||
void LLPipeline::rebuildPriorityGroups()
|
||||
{
|
||||
if(!sAllowRebuildPriorityGroup)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
sAllowRebuildPriorityGroup = FALSE ;
|
||||
|
||||
LLTimer update_timer;
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE);
|
||||
|
||||
|
|
@ -2502,6 +2495,11 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f
|
|||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD);
|
||||
|
||||
if (drawablep)
|
||||
{
|
||||
LLVOVolume* volume = drawablep->getVOVolume();
|
||||
}
|
||||
|
||||
if (drawablep && !drawablep->isDead() && assertInitialized())
|
||||
{
|
||||
if (!drawablep->isState(LLDrawable::BUILT))
|
||||
|
|
@ -2635,7 +2633,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
|
|||
void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
|
||||
if (!sShadowRender && bridge->getSpatialGroup()->changeLOD())
|
||||
if (bridge->getSpatialGroup()->changeLOD())
|
||||
{
|
||||
bool force_update = false;
|
||||
bridge->updateDistance(camera, force_update);
|
||||
|
|
@ -6139,7 +6137,6 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
|
|||
LLGLDisable blend(GL_BLEND);
|
||||
bindDeferredShader(*shader);
|
||||
|
||||
|
||||
//depth of field focal plane calculations
|
||||
|
||||
F32 subject_distance = 16.f;
|
||||
|
|
@ -7978,14 +7975,14 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
|
|||
glLoadMatrixf(proj.m);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadMatrixf(view.m);
|
||||
glLoadMatrixd(gGLModelView);
|
||||
|
||||
stop_glerror();
|
||||
gGLLastMatrix = NULL;
|
||||
|
||||
{
|
||||
LLGLDepthTest depth(GL_TRUE);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
//LLGLDepthTest depth(GL_TRUE);
|
||||
//glClear(GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
|
@ -9018,7 +9015,8 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
|
|||
|
||||
mShadow[j].bindTarget();
|
||||
mShadow[j].getViewport(gGLViewport);
|
||||
|
||||
mShadow[j].clear();
|
||||
|
||||
{
|
||||
static LLCullResult result[4];
|
||||
|
||||
|
|
@ -9159,6 +9157,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
|
|||
|
||||
mShadow[i+4].bindTarget();
|
||||
mShadow[i+4].getViewport(gGLViewport);
|
||||
mShadow[i+4].clear();
|
||||
|
||||
static LLCullResult result[2];
|
||||
|
||||
|
|
|
|||
|
|
@ -506,7 +506,6 @@ public:
|
|||
static BOOL sRenderAttachedLights;
|
||||
static BOOL sRenderAttachedParticles;
|
||||
static BOOL sRenderDeferred;
|
||||
static BOOL sAllowRebuildPriorityGroup;
|
||||
static S32 sVisibleLightCount;
|
||||
static F32 sMinRenderSize;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue