Deprecated dirtyDisplayLists(), use established dirtyGLObjects() instead

This commit is contained in:
Robert Osfield
2017-12-18 13:54:08 +00:00
parent 3bb327e93f
commit d2bfde30f0
11 changed files with 42 additions and 43 deletions

View File

@@ -257,7 +257,7 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
Drawable::~Drawable()
{
dirtyDisplayList();
dirtyGLObjects();
}
osg::MatrixList Drawable::getWorldMatrices(const osg::Node* haltTraversalAtNode) const
@@ -358,7 +358,7 @@ void Drawable::setSupportsDisplayList(bool flag)
{
// used to support display lists and display lists switched
// on so now delete them and turn useDisplayList off.
dirtyDisplayList();
dirtyGLObjects();
_useDisplayList = false;
}
}
@@ -380,7 +380,7 @@ void Drawable::setUseDisplayList(bool flag)
if (_useDisplayList)
{
dirtyDisplayList();
dirtyGLObjects();
}
if (_supportsDisplayList)
@@ -433,11 +433,6 @@ void Drawable::setUseVertexBufferObjects(bool flag)
_useVertexBufferObjects = flag;
}
void Drawable::dirtyDisplayList()
{
dirtyGLObjects();
}
void Drawable::dirtyGLObjects()
{
unsigned int i;

View File

@@ -83,7 +83,7 @@ Geometry::Geometry(const Geometry& geometry,const CopyOp& copyop):
Geometry::~Geometry()
{
// do dirty here to keep the getGLObjectSizeHint() estimate on the ball
dirtyDisplayList();
dirtyGLObjects();
// no need to delete, all automatically handled by ref_ptr :-)
}
@@ -159,7 +159,7 @@ void Geometry::setVertexArray(Array* array)
_vertexArray = array;
dirtyDisplayList();
dirtyGLObjects();
dirtyBound();
if (/*_useVertexBufferObjects && */array) addVertexBufferObjectIfRequired(array);
@@ -171,7 +171,7 @@ void Geometry::setNormalArray(Array* array, osg::Array::Binding binding)
_normalArray = array;
dirtyDisplayList();
dirtyGLObjects();
if (/*_useVertexBufferObjects && */array) addVertexBufferObjectIfRequired(array);
}
@@ -182,7 +182,7 @@ void Geometry::setColorArray(Array* array, osg::Array::Binding binding)
_colorArray = array;
dirtyDisplayList();
dirtyGLObjects();
if (/*_useVertexBufferObjects && */array) addVertexBufferObjectIfRequired(array);
}
@@ -193,7 +193,7 @@ void Geometry::setSecondaryColorArray(Array* array, osg::Array::Binding binding)
_secondaryColorArray = array;
dirtyDisplayList();
dirtyGLObjects();
if (/*_useVertexBufferObjects && */array) addVertexBufferObjectIfRequired(array);
}
@@ -204,7 +204,7 @@ void Geometry::setFogCoordArray(Array* array, osg::Array::Binding binding)
_fogCoordArray = array;
dirtyDisplayList();
dirtyGLObjects();
if (/*_useVertexBufferObjects && */array) addVertexBufferObjectIfRequired(array);
}
@@ -224,7 +224,7 @@ void Geometry::setTexCoordArray(unsigned int index,Array* array, osg::Array::Bin
_texCoordList[index] = array;
dirtyDisplayList();
dirtyGLObjects();
if (/*_useVertexBufferObjects && */array)
{
@@ -248,7 +248,7 @@ void Geometry::setTexCoordArrayList(const ArrayList& arrayList)
{
_texCoordList = arrayList;
dirtyDisplayList();
dirtyGLObjects();
/*if (_useVertexBufferObjects)*/
{
@@ -270,7 +270,7 @@ void Geometry::setVertexAttribArray(unsigned int index, Array* array, osg::Array
_vertexAttribList[index] = array;
dirtyDisplayList();
dirtyGLObjects();
if (/*_useVertexBufferObjects && */array) addVertexBufferObjectIfRequired(array);
}
@@ -291,7 +291,7 @@ void Geometry::setVertexAttribArrayList(const ArrayList& arrayList)
{
_vertexAttribList = arrayList;
dirtyDisplayList();
dirtyGLObjects();
/*if (_useVertexBufferObjects)*/
{
@@ -312,7 +312,7 @@ bool Geometry::addPrimitiveSet(PrimitiveSet* primitiveset)
/*if (_useVertexBufferObjects)*/ addElementBufferObjectIfRequired(primitiveset);
_primitives.push_back(primitiveset);
dirtyDisplayList();
dirtyGLObjects();
dirtyBound();
return true;
}
@@ -328,7 +328,7 @@ bool Geometry::setPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset)
/*if (_useVertexBufferObjects)*/ addElementBufferObjectIfRequired(primitiveset);
_primitives[i] = primitiveset;
dirtyDisplayList();
dirtyGLObjects();
dirtyBound();
return true;
}
@@ -346,7 +346,7 @@ bool Geometry::insertPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset)
if (i<_primitives.size())
{
_primitives.insert(_primitives.begin()+i,primitiveset);
dirtyDisplayList();
dirtyGLObjects();
dirtyBound();
return true;
}
@@ -371,7 +371,7 @@ void Geometry::setPrimitiveSetList(const PrimitiveSetList& primitives)
}
}
dirtyDisplayList(); dirtyBound();
dirtyGLObjects(); dirtyBound();
}
bool Geometry::removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove)
@@ -393,7 +393,7 @@ bool Geometry::removePrimitiveSet(unsigned int i, unsigned int numElementsToRemo
_primitives.erase(_primitives.begin()+i,_primitives.end());
}
dirtyDisplayList();
dirtyGLObjects();
dirtyBound();
return true;
}
@@ -1180,7 +1180,7 @@ Geometry* osg::createTexturedQuadGeometry(const Vec3& corner,const Vec3& widthVe
if (array->getBinding() == binding) return; \
array->setBinding(binding);\
if (ab==3 /*osg::Geometry::BIND_PER_PRIMITIVE*/) _containsDeprecatedData = true; \
dirtyDisplayList();
dirtyGLObjects();
#define GET_BINDING(array) (array!=0 ? static_cast<AttributeBinding>(array->getBinding()) : BIND_OFF)
@@ -1217,7 +1217,7 @@ void Geometry::setVertexAttribBinding(unsigned int index,AttributeBinding ab)
_vertexAttribList[index]->setBinding(binding);
dirtyDisplayList();
dirtyGLObjects();
}
else
{
@@ -1231,7 +1231,7 @@ void Geometry::setVertexAttribNormalize(unsigned int index,GLboolean norm)
{
_vertexAttribList[index]->setNormalize(norm!=GL_FALSE);
dirtyDisplayList();
dirtyGLObjects();
}
}

View File

@@ -21,7 +21,7 @@ void deprecated_osg::Geometry::setVertexAttribBinding(unsigned int index,Attribu
_vertexAttribList[index]->setBinding(static_cast<osg::Array::Binding>(ab));
dirtyDisplayList();
dirtyGLObjects();
}
else
{
@@ -37,7 +37,7 @@ void deprecated_osg::Geometry::setVertexAttribNormalize(unsigned int index,GLboo
{
_vertexAttribList[index]->setNormalize(norm!=GL_FALSE);
dirtyDisplayList();
dirtyGLObjects();
}
}

View File

@@ -484,7 +484,7 @@ namespace glesUtil {
// deduplicate UVs array that were only shared within the geometry
deduplicator.deduplicateUVs(geom);
geom.dirtyDisplayList();
geom.dirtyGLObjects();
}
};
} // glesUtil namespace

View File

@@ -59,7 +59,7 @@ class Logos: public osg::Drawable
vp->height() != logos->getViewport()->height() )
{
logos->getViewport()->setViewport( vp->x(), vp->y(), vp->width(), vp->height() );
logos->dirtyDisplayList();
logos->dirtyGLObjects();
}
}
return false;

View File

@@ -314,7 +314,7 @@ void OccluderGeometry::setUpInternalStructures()
dirtyBound();
dirtyDisplayList();
dirtyGLObjects();
}
struct IndexVec3PtrPair
@@ -860,7 +860,7 @@ void OccluderGeometry::computeShadowVolumeGeometry(const osg::Vec4& lightpos, Sh
}
svg.dirtyDisplayList();
svg.dirtyGLObjects();
svg.dirtyBound();
// osg::Timer_t t1 = osg::Timer::instance()->tick();

View File

@@ -735,7 +735,7 @@ void VertexCacheVisitor::optimizeVertices(Geometry& geom)
else
cout << "0.0\n";
#endif
geom.dirtyDisplayList();
geom.dirtyGLObjects();
}
// The main optimization loop
@@ -1176,7 +1176,7 @@ void VertexAccessOrderVisitor::optimizeOrder(Geometry& geom)
// deduplicate UVs array that were only shared within the geometry
deduplicator.deduplicateUVs(geom);
geom.dirtyDisplayList();
geom.dirtyGLObjects();
}
void SharedArrayOptimizer::findDuplicatedUVs(const osg::Geometry& geometry)

View File

@@ -884,7 +884,7 @@ void CollectLowestTransformsVisitor::doTransform(osg::Object* obj,osg::Matrix& m
osgUtil::TransformAttributeFunctor tf(matrix);
drawable->accept(tf);
drawable->dirtyBound();
drawable->dirtyDisplayList();
drawable->dirtyGLObjects();
return;
}
@@ -2444,7 +2444,7 @@ bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry& lhs,osg::Geom
}
lhs.dirtyBound();
lhs.dirtyDisplayList();
lhs.dirtyGLObjects();
return true;
}
@@ -4511,7 +4511,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::transf
}
geometry->dirtyBound();
geometry->dirtyDisplayList();
geometry->dirtyGLObjects();
}
}

View File

@@ -141,7 +141,7 @@ static void smooth_old(osg::Geometry& geom)
}
geom.setNormalArray( normals, osg::Array::BIND_PER_VERTEX);
geom.dirtyDisplayList();
geom.dirtyGLObjects();
}