Server occlusion prep.
This commit is contained in:
@@ -1080,20 +1080,27 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
|
||||
retval = gPipeline.getSpatialPartition((LLViewerObject*) mVObjp);
|
||||
}
|
||||
else if (isRoot())
|
||||
{ //must be an active volume
|
||||
{
|
||||
if (mSpatialBridge && (mSpatialBridge->asPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) != mVObjp->isHUDAttachment())
|
||||
{
|
||||
// remove obsolete bridge
|
||||
mSpatialBridge->markDead();
|
||||
setSpatialBridge(NULL);
|
||||
}
|
||||
//must be an active volume
|
||||
if (!mSpatialBridge)
|
||||
{
|
||||
if (mVObjp->isHUDAttachment())
|
||||
{
|
||||
setSpatialBridge(new LLHUDBridge(this));
|
||||
setSpatialBridge(new LLHUDBridge(this, getRegion()));
|
||||
}
|
||||
else if (mVObjp->isAttachment())
|
||||
{
|
||||
setSpatialBridge(new LLAttachmentBridge(this));
|
||||
setSpatialBridge(new LLAttachmentBridge(this, getRegion()));
|
||||
}
|
||||
else
|
||||
{
|
||||
setSpatialBridge(new LLVolumeBridge(this));
|
||||
setSpatialBridge(new LLVolumeBridge(this, getRegion()));
|
||||
}
|
||||
}
|
||||
return mSpatialBridge->asPartition();
|
||||
@@ -1116,9 +1123,9 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
|
||||
// Spatial Partition Bridging Drawable
|
||||
//=======================================
|
||||
|
||||
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask) :
|
||||
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp) :
|
||||
LLDrawable(root->getVObj()),
|
||||
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
|
||||
LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB, regionp)
|
||||
{
|
||||
mBridge = this;
|
||||
mDrawable = root;
|
||||
@@ -1627,8 +1634,8 @@ void LLDrawable::updateFaceSize(S32 idx)
|
||||
}
|
||||
}
|
||||
|
||||
LLBridgePartition::LLBridgePartition()
|
||||
: LLSpatialPartition(0, FALSE, 0)
|
||||
LLBridgePartition::LLBridgePartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(0, FALSE, 0, regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_VOLUME;
|
||||
mPartitionType = LLViewerRegion::PARTITION_BRIDGE;
|
||||
@@ -1636,14 +1643,14 @@ LLBridgePartition::LLBridgePartition()
|
||||
mSlopRatio = 0.25f;
|
||||
}
|
||||
|
||||
LLAttachmentPartition::LLAttachmentPartition()
|
||||
: LLBridgePartition()
|
||||
LLAttachmentPartition::LLAttachmentPartition(LLViewerRegion* regionp)
|
||||
: LLBridgePartition(regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_AVATAR;
|
||||
}
|
||||
|
||||
LLHUDBridge::LLHUDBridge(LLDrawable* drawablep)
|
||||
: LLVolumeBridge(drawablep)
|
||||
LLHUDBridge::LLHUDBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
|
||||
: LLVolumeBridge(drawablep, regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_HUD;
|
||||
mPartitionType = LLViewerRegion::PARTITION_HUD;
|
||||
|
||||
@@ -821,9 +821,10 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion)
|
||||
|
||||
//==============================================
|
||||
|
||||
LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage)
|
||||
LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage, LLViewerRegion* regionp)
|
||||
: mRenderByGroup(render_by_group), mBridge(NULL)
|
||||
{
|
||||
mRegionp = regionp;
|
||||
mPartitionType = LLViewerRegion::PARTITION_NONE;
|
||||
mVertexDataMask = data_mask;
|
||||
mBufferUsage = buffer_usage;
|
||||
|
||||
@@ -386,7 +386,7 @@ class LLSpatialPartition: public LLViewerOctreePartition, public LLGeometryManag
|
||||
{
|
||||
public:
|
||||
//static BOOL sFreezeState; //if true, no spatialgroup state updates will be made
|
||||
LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mBufferUsage);
|
||||
LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mBufferUsage, LLViewerRegion* regionp);
|
||||
virtual ~LLSpatialPartition();
|
||||
|
||||
LLSpatialGroup *put(LLDrawable *drawablep, BOOL was_visible = FALSE);
|
||||
@@ -451,7 +451,7 @@ protected:
|
||||
public:
|
||||
typedef std::vector<LLPointer<LLSpatialBridge> > bridge_vector_t;
|
||||
|
||||
LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask);
|
||||
LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp);
|
||||
|
||||
void destroyTree();
|
||||
|
||||
@@ -540,7 +540,7 @@ private:
|
||||
class LLWaterPartition : public LLSpatialPartition
|
||||
{
|
||||
public:
|
||||
LLWaterPartition();
|
||||
LLWaterPartition(LLViewerRegion* regionp);
|
||||
virtual void getGeometry(LLSpatialGroup* group) { }
|
||||
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
|
||||
};
|
||||
@@ -549,14 +549,14 @@ public:
|
||||
class LLVoidWaterPartition : public LLWaterPartition
|
||||
{
|
||||
public:
|
||||
LLVoidWaterPartition();
|
||||
LLVoidWaterPartition(LLViewerRegion* regionp);
|
||||
};
|
||||
|
||||
//spatial partition for terrain (impelmented in LLVOSurfacePatch.cpp)
|
||||
class LLTerrainPartition : public LLSpatialPartition
|
||||
{
|
||||
public:
|
||||
LLTerrainPartition();
|
||||
LLTerrainPartition(LLViewerRegion* regionp);
|
||||
virtual void getGeometry(LLSpatialGroup* group);
|
||||
virtual LLVertexBuffer* createVertexBuffer(U32 type_mask, U32 usage);
|
||||
};
|
||||
@@ -565,7 +565,7 @@ public:
|
||||
class LLTreePartition : public LLSpatialPartition
|
||||
{
|
||||
public:
|
||||
LLTreePartition();
|
||||
LLTreePartition(LLViewerRegion* regionp);
|
||||
virtual void getGeometry(LLSpatialGroup* group) { }
|
||||
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
|
||||
|
||||
@@ -575,7 +575,7 @@ public:
|
||||
class LLParticlePartition : public LLSpatialPartition
|
||||
{
|
||||
public:
|
||||
LLParticlePartition();
|
||||
LLParticlePartition(LLViewerRegion* regionp);
|
||||
virtual void rebuildGeom(LLSpatialGroup* group);
|
||||
virtual void getGeometry(LLSpatialGroup* group);
|
||||
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count);
|
||||
@@ -587,14 +587,14 @@ protected:
|
||||
class LLHUDParticlePartition : public LLParticlePartition
|
||||
{
|
||||
public:
|
||||
LLHUDParticlePartition();
|
||||
LLHUDParticlePartition(LLViewerRegion* regionp);
|
||||
};
|
||||
|
||||
//spatial partition for grass (implemented in LLVOGrass.cpp)
|
||||
class LLGrassPartition : public LLSpatialPartition
|
||||
{
|
||||
public:
|
||||
LLGrassPartition();
|
||||
LLGrassPartition(LLViewerRegion* regionp);
|
||||
virtual void getGeometry(LLSpatialGroup* group);
|
||||
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count);
|
||||
protected:
|
||||
@@ -606,7 +606,7 @@ protected:
|
||||
class LLCloudPartition : public LLParticlePartition
|
||||
{
|
||||
public:
|
||||
LLCloudPartition();
|
||||
LLCloudPartition(LLViewerRegion* regionp);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -632,7 +632,7 @@ class LLVolumeGeometryManager: public LLGeometryManager
|
||||
class LLVolumePartition : public LLSpatialPartition, public LLVolumeGeometryManager
|
||||
{
|
||||
public:
|
||||
LLVolumePartition();
|
||||
LLVolumePartition(LLViewerRegion* regionp);
|
||||
virtual void rebuildGeom(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildGeom(group); }
|
||||
virtual void getGeometry(LLSpatialGroup* group) { LLVolumeGeometryManager::getGeometry(group); }
|
||||
virtual void rebuildMesh(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildMesh(group); }
|
||||
@@ -643,7 +643,7 @@ public:
|
||||
class LLVolumeBridge : public LLSpatialBridge, public LLVolumeGeometryManager
|
||||
{
|
||||
public:
|
||||
LLVolumeBridge(LLDrawable* drawable);
|
||||
LLVolumeBridge(LLDrawable* drawable, LLViewerRegion* regionp);
|
||||
virtual void rebuildGeom(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildGeom(group); }
|
||||
virtual void getGeometry(LLSpatialGroup* group) { LLVolumeGeometryManager::getGeometry(group); }
|
||||
virtual void rebuildMesh(LLSpatialGroup* group) { LLVolumeGeometryManager::rebuildMesh(group); }
|
||||
@@ -653,13 +653,13 @@ public:
|
||||
class LLAttachmentBridge : public LLVolumeBridge
|
||||
{
|
||||
public:
|
||||
LLAttachmentBridge(LLDrawable* drawable);
|
||||
LLAttachmentBridge(LLDrawable* drawable, LLViewerRegion* regionp);
|
||||
};
|
||||
|
||||
class LLHUDBridge : public LLVolumeBridge
|
||||
{
|
||||
public:
|
||||
LLHUDBridge(LLDrawable* drawablep);
|
||||
LLHUDBridge(LLDrawable* drawablep, LLViewerRegion* regionp);
|
||||
virtual void shiftPos(const LLVector4a& vec);
|
||||
virtual F32 calcPixelArea(LLSpatialGroup* group, LLCamera& camera);
|
||||
};
|
||||
@@ -668,7 +668,7 @@ public:
|
||||
class LLBridgePartition : public LLSpatialPartition
|
||||
{
|
||||
public:
|
||||
LLBridgePartition();
|
||||
LLBridgePartition(LLViewerRegion* regionp);
|
||||
virtual void getGeometry(LLSpatialGroup* group) { }
|
||||
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
|
||||
};
|
||||
@@ -677,13 +677,13 @@ public:
|
||||
class LLAttachmentPartition : public LLBridgePartition
|
||||
{
|
||||
public:
|
||||
LLAttachmentPartition();
|
||||
LLAttachmentPartition(LLViewerRegion* regionp);
|
||||
};
|
||||
|
||||
class LLHUDPartition : public LLBridgePartition
|
||||
{
|
||||
public:
|
||||
LLHUDPartition();
|
||||
LLHUDPartition(LLViewerRegion* regionp);
|
||||
virtual void shift(const LLVector4a &offset) { } //HUD objects don't shift with region crossing. That would be silly.
|
||||
};
|
||||
|
||||
|
||||
@@ -455,6 +455,7 @@ LLViewerOctreeGroup::~LLViewerOctreeGroup()
|
||||
|
||||
LLViewerOctreeGroup::LLViewerOctreeGroup(OctreeNode* node) :
|
||||
mOctreeNode(node),
|
||||
mAnyVisible(0),
|
||||
mState(CLEAN)
|
||||
{
|
||||
LLVector4a tmp;
|
||||
@@ -760,6 +761,11 @@ BOOL LLViewerOctreeGroup::isRecentlyVisible() const
|
||||
void LLViewerOctreeGroup::setVisible()
|
||||
{
|
||||
mVisible[LLViewerCamera::sCurCameraID] = LLViewerOctreeEntryData::getCurrentFrame();
|
||||
|
||||
if(LLViewerCamera::sCurCameraID < LLViewerCamera::CAMERA_WATER0)
|
||||
{
|
||||
mAnyVisible = LLViewerOctreeEntryData::getCurrentFrame();
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerOctreeGroup::checkStates()
|
||||
@@ -882,6 +888,12 @@ BOOL LLOcclusionCullingGroup::isRecentlyVisible() const
|
||||
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < MIN_VIS_FRAME_RANGE ;
|
||||
}
|
||||
|
||||
BOOL LLOcclusionCullingGroup::isAnyRecentlyVisible() const
|
||||
{
|
||||
const S32 MIN_VIS_FRAME_RANGE = 2;
|
||||
return (LLDrawable::getCurrentFrame() - mAnyVisible) < MIN_VIS_FRAME_RANGE ;
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLOcclusionCullingGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
|
||||
{
|
||||
@@ -1293,7 +1305,8 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
|
||||
//-----------------------------------------------------------------------------------
|
||||
//class LLViewerOctreePartition definitions
|
||||
//-----------------------------------------------------------------------------------
|
||||
LLViewerOctreePartition::LLViewerOctreePartition() :
|
||||
LLViewerOctreePartition::LLViewerOctreePartition() :
|
||||
mRegionp(NULL),
|
||||
mOcclusionEnabled(TRUE),
|
||||
mDrawableType(0),
|
||||
mLODSeed(0),
|
||||
@@ -1453,21 +1466,21 @@ bool LLViewerOctreeCull::checkProjectionArea(const LLVector4a& center, const LLV
|
||||
//virtual
|
||||
bool LLViewerOctreeCull::checkObjects(const OctreeNode* branch, const LLViewerOctreeGroup* group)
|
||||
{
|
||||
if (branch->getElementCount() == 0) //no elements
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (branch->getChildCount() == 0) //leaf state, already checked tightest bounding box
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (mRes == 1 && !frustumCheckObjects(group)) //no objects in frustum
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (branch->getElementCount() == 0) //no elements
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (branch->getChildCount() == 0) //leaf state, already checked tightest bounding box
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (mRes == 1 && !frustumCheckObjects(group)) //no objects in frustum
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLViewerOctreeCull::preprocess(LLViewerOctreeGroup* group)
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
typedef enum
|
||||
{
|
||||
LLDRAWABLE = 0,
|
||||
LLVOCACHEENTRY,
|
||||
NUM_DATA_TYPE
|
||||
}eEntryDataType_t;
|
||||
|
||||
@@ -92,6 +93,9 @@ public:
|
||||
|
||||
LLViewerOctreeEntryData* getDrawable() const {return mData[LLDRAWABLE];}
|
||||
bool hasDrawable() const {return mData[LLDRAWABLE] != NULL;}
|
||||
LLViewerOctreeEntryData* getVOCacheEntry() const {return mData[LLVOCACHEENTRY];}
|
||||
bool hasVOCacheEntry() const {return mData[LLVOCACHEENTRY] != NULL;}
|
||||
|
||||
const LLVector4a* getSpatialExtents() const {return mExtents;}
|
||||
const LLVector4a& getPositionGroup() const {return mPositionGroup;}
|
||||
LLViewerOctreeGroup* getGroup()const {return mGroup;}
|
||||
@@ -208,6 +212,7 @@ public:
|
||||
BOOL isVisible() const;
|
||||
virtual BOOL isRecentlyVisible() const;
|
||||
S32 getVisible(LLViewerCamera::eCameraID id) const {return mVisible[id];}
|
||||
S32 getAnyVisible() const {return mAnyVisible;}
|
||||
bool isEmpty() const { return mOctreeNode->isEmpty(); }
|
||||
|
||||
U32 getState() {return mState; }
|
||||
@@ -233,7 +238,7 @@ public:
|
||||
const LLVector4a* getObjectExtents() const {return mObjectExtents;}
|
||||
|
||||
//octree wrappers to make code more readable
|
||||
//element_list& getData() { return mOctreeNode->getData(); } //unused
|
||||
//element_list& getData() { return mOctreeNode->getData(); }
|
||||
element_iter getDataBegin() { return mOctreeNode->getDataBegin(); }
|
||||
element_iter getDataEnd() { return mOctreeNode->getDataEnd(); }
|
||||
U32 getElementCount() const { return mOctreeNode->getElementCount(); }
|
||||
@@ -253,6 +258,7 @@ protected:
|
||||
LL_ALIGN_16(LLVector4a mExtents[2]); // extents (min, max) of this node and all its children
|
||||
LL_ALIGN_16(LLVector4a mObjectExtents[2]); // extents (min, max) of objects in this node
|
||||
|
||||
S32 mAnyVisible; //latest visible to any camera
|
||||
S32 mVisible[LLViewerCamera::NUM_CAMERAS];
|
||||
|
||||
};
|
||||
@@ -307,6 +313,7 @@ public:
|
||||
//virtual
|
||||
BOOL isRecentlyVisible() const;
|
||||
LLViewerOctreePartition* getSpatialPartition()const {return mSpatialPartition;}
|
||||
BOOL isAnyRecentlyVisible() const;
|
||||
|
||||
static U32 getNewOcclusionQueryObjectName();
|
||||
static void releaseOcclusionQueryObjectName(U32 name);
|
||||
@@ -342,11 +349,12 @@ public:
|
||||
|
||||
public:
|
||||
U32 mPartitionType;
|
||||
U32 mDrawableType;
|
||||
OctreeNode* mOctree;
|
||||
BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
|
||||
U32 mLODSeed;
|
||||
U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
|
||||
U32 mDrawableType;
|
||||
OctreeNode* mOctree;
|
||||
LLViewerRegion* mRegionp; // the region this partition belongs to.
|
||||
BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
|
||||
U32 mLODSeed;
|
||||
U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
|
||||
};
|
||||
|
||||
class LLViewerOctreeCull : public OctreeTraveler
|
||||
|
||||
@@ -474,20 +474,20 @@ void LLViewerRegion::initPartitions()
|
||||
{
|
||||
//create object partitions
|
||||
//MUST MATCH declaration of eObjectPartitions
|
||||
mImpl->mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD
|
||||
mImpl->mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN
|
||||
mImpl->mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER
|
||||
mImpl->mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER
|
||||
mImpl->mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE
|
||||
mImpl->mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE
|
||||
mImpl->mObjectPartition.push_back(new LLHUDPartition(this)); //PARTITION_HUD
|
||||
mImpl->mObjectPartition.push_back(new LLTerrainPartition(this)); //PARTITION_TERRAIN
|
||||
mImpl->mObjectPartition.push_back(new LLVoidWaterPartition(this)); //PARTITION_VOIDWATER
|
||||
mImpl->mObjectPartition.push_back(new LLWaterPartition(this)); //PARTITION_WATER
|
||||
mImpl->mObjectPartition.push_back(new LLTreePartition(this)); //PARTITION_TREE
|
||||
mImpl->mObjectPartition.push_back(new LLParticlePartition(this)); //PARTITION_PARTICLE
|
||||
#if ENABLE_CLASSIC_CLOUDS
|
||||
mImpl->mObjectPartition.push_back(new LLCloudPartition()); //PARTITION_CLOUD
|
||||
mImpl->mObjectPartition.push_back(new LLCloudPartition(this)); //PARTITION_CLOUD
|
||||
#endif
|
||||
mImpl->mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS
|
||||
mImpl->mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME
|
||||
mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE
|
||||
mImpl->mObjectPartition.push_back(new LLAttachmentPartition()); //PARTITION_ATTACHMENT
|
||||
mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE
|
||||
mImpl->mObjectPartition.push_back(new LLGrassPartition(this)); //PARTITION_GRASS
|
||||
mImpl->mObjectPartition.push_back(new LLVolumePartition(this)); //PARTITION_VOLUME
|
||||
mImpl->mObjectPartition.push_back(new LLBridgePartition(this)); //PARTITION_BRIDGE
|
||||
mImpl->mObjectPartition.push_back(new LLAttachmentPartition(this)); //PARTITION_ATTACHMENT
|
||||
mImpl->mObjectPartition.push_back(new LLHUDParticlePartition(this));//PARTITION_HUD_PARTICLE
|
||||
mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
|
||||
}
|
||||
|
||||
|
||||
@@ -295,7 +295,8 @@ void LLVOClouds::updateDrawable(BOOL force_damped)
|
||||
clearChanged(SHIFTED);
|
||||
}
|
||||
|
||||
LLCloudPartition::LLCloudPartition()
|
||||
LLCloudPartition::LLCloudPartition(LLViewerRegion* region)
|
||||
: LLParticlePartition(region)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS;
|
||||
mPartitionType = LLViewerRegion::PARTITION_CLOUD;
|
||||
|
||||
@@ -626,8 +626,8 @@ U32 LLVOGrass::getPartitionType() const
|
||||
return LLViewerRegion::PARTITION_GRASS;
|
||||
}
|
||||
|
||||
LLGrassPartition::LLGrassPartition()
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB)
|
||||
LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_GRASS;
|
||||
mPartitionType = LLViewerRegion::PARTITION_GRASS;
|
||||
|
||||
@@ -739,8 +739,8 @@ U32 LLVOPartGroup::getPartitionType() const
|
||||
return LLViewerRegion::PARTITION_PARTICLE;
|
||||
}
|
||||
|
||||
LLParticlePartition::LLParticlePartition()
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB)
|
||||
LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp)
|
||||
{
|
||||
mRenderPass = LLRenderPass::PASS_ALPHA;
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES;
|
||||
@@ -749,8 +749,8 @@ LLParticlePartition::LLParticlePartition()
|
||||
mLODPeriod = 1;
|
||||
}
|
||||
|
||||
LLHUDParticlePartition::LLHUDParticlePartition() :
|
||||
LLParticlePartition()
|
||||
LLHUDParticlePartition::LLHUDParticlePartition(LLViewerRegion* regionp) :
|
||||
LLParticlePartition(regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_HUD_PARTICLES;
|
||||
mPartitionType = LLViewerRegion::PARTITION_HUD_PARTICLE;
|
||||
|
||||
@@ -1062,8 +1062,8 @@ U32 LLVOSurfacePatch::getPartitionType() const
|
||||
return LLViewerRegion::PARTITION_TERRAIN;
|
||||
}
|
||||
|
||||
LLTerrainPartition::LLTerrainPartition()
|
||||
: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB)
|
||||
LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
|
||||
{
|
||||
mOcclusionEnabled = FALSE;
|
||||
mInfiniteFarClip = TRUE;
|
||||
|
||||
@@ -1260,8 +1260,8 @@ U32 LLVOTree::getPartitionType() const
|
||||
return LLViewerRegion::PARTITION_TREE;
|
||||
}
|
||||
|
||||
LLTreePartition::LLTreePartition()
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB)
|
||||
LLTreePartition::LLTreePartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
|
||||
{
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_TREE;
|
||||
mPartitionType = LLViewerRegion::PARTITION_TREE;
|
||||
|
||||
@@ -4008,8 +4008,8 @@ U32 LLVOVolume::getPartitionType() const
|
||||
return LLViewerRegion::PARTITION_VOLUME;
|
||||
}
|
||||
|
||||
LLVolumePartition::LLVolumePartition()
|
||||
: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB)
|
||||
LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, GL_DYNAMIC_DRAW_ARB, regionp)
|
||||
{
|
||||
mLODPeriod = 32;
|
||||
mDepthMask = FALSE;
|
||||
@@ -4019,8 +4019,8 @@ LLVolumePartition::LLVolumePartition()
|
||||
mBufferUsage = GL_DYNAMIC_DRAW_ARB;
|
||||
}
|
||||
|
||||
LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep)
|
||||
: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK)
|
||||
LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
|
||||
: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK, regionp)
|
||||
{
|
||||
mDepthMask = FALSE;
|
||||
mLODPeriod = 32;
|
||||
@@ -4032,8 +4032,8 @@ LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep)
|
||||
mSlopRatio = 0.25f;
|
||||
}
|
||||
|
||||
LLAttachmentBridge::LLAttachmentBridge(LLDrawable* drawablep)
|
||||
: LLVolumeBridge(drawablep)
|
||||
LLAttachmentBridge::LLAttachmentBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
|
||||
: LLVolumeBridge(drawablep, regionp)
|
||||
{
|
||||
mPartitionType = LLViewerRegion::PARTITION_ATTACHMENT;
|
||||
}
|
||||
@@ -6385,7 +6385,8 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun
|
||||
group->mBufferUsage = usage;
|
||||
}
|
||||
|
||||
LLHUDPartition::LLHUDPartition()
|
||||
LLHUDPartition::LLHUDPartition(LLViewerRegion* regionp)
|
||||
: LLBridgePartition(regionp)
|
||||
{
|
||||
mPartitionType = LLViewerRegion::PARTITION_HUD;
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_HUD;
|
||||
|
||||
@@ -307,15 +307,16 @@ U32 LLVOVoidWater::getPartitionType() const
|
||||
return LLViewerRegion::PARTITION_VOIDWATER;
|
||||
}
|
||||
|
||||
LLWaterPartition::LLWaterPartition()
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB)
|
||||
LLWaterPartition::LLWaterPartition(LLViewerRegion* regionp)
|
||||
: LLSpatialPartition(0, FALSE, GL_DYNAMIC_DRAW_ARB, regionp)
|
||||
{
|
||||
mInfiniteFarClip = TRUE;
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_WATER;
|
||||
mPartitionType = LLViewerRegion::PARTITION_WATER;
|
||||
}
|
||||
|
||||
LLVoidWaterPartition::LLVoidWaterPartition()
|
||||
LLVoidWaterPartition::LLVoidWaterPartition(LLViewerRegion* regionp)
|
||||
: LLWaterPartition(regionp)
|
||||
{
|
||||
//mOcclusionEnabled = FALSE;
|
||||
mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER;
|
||||
|
||||
Reference in New Issue
Block a user