Made the more of the OSG's referenced object desctructors protected to ensure
that they arn't created on the stack inappropriately. Split the implemention of Matrix up so that it is a simple no referenced counted class and can be safefly created on the stack. To support referenced counting a seperate subclass now exists, this is RefMatrix which inherits from both Matrix and Object.
This commit is contained in:
@@ -25,7 +25,7 @@ namespace osg {
|
||||
* each trifan or tristrip = (length-2) triangles and so on.
|
||||
*/
|
||||
|
||||
class Statistics : public osg::Referenced, public osg::Drawable::PrimitiveFunctor{
|
||||
class Statistics : public osg::Drawable::PrimitiveFunctor{
|
||||
public:
|
||||
|
||||
typedef std::pair<unsigned int,unsigned int> PrimitivePair;
|
||||
@@ -37,8 +37,6 @@ class Statistics : public osg::Referenced, public osg::Drawable::PrimitiveFuncto
|
||||
reset();
|
||||
};
|
||||
|
||||
~Statistics() {}; // no dynamic allocations, so no need to free
|
||||
|
||||
enum statsType
|
||||
{
|
||||
STAT_NONE, // default
|
||||
@@ -86,7 +84,7 @@ class Statistics : public osg::Referenced, public osg::Drawable::PrimitiveFuncto
|
||||
|
||||
void setBinNo(int n) { _binNo=n;}
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
int numDrawables, nummat, nbins;
|
||||
int nlights;
|
||||
@@ -99,6 +97,7 @@ public:
|
||||
PrimtiveValueMap _primitiveCount;
|
||||
GLenum _currentPrimtiveFunctorMode;
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user