Various fixes to constructors to ensure that all variables are initialized.
This commit is contained in:
@@ -168,16 +168,18 @@ int main( int argc, char **argv )
|
||||
for(int i=1;i<argc;++i) commandLine.push_back(argv[i]);
|
||||
|
||||
// create the viewer and the model to it.
|
||||
osgGLUT::Viewer viewer;
|
||||
osgGLUT::Viewer& viewer = *(osgNew osgGLUT::Viewer);
|
||||
|
||||
viewer.setWindowTitle(argv[0]);
|
||||
|
||||
|
||||
// configure the viewer from the commandline arguments, and eat any
|
||||
// parameters that have been matched.
|
||||
viewer.readCommandLine(commandLine);
|
||||
|
||||
osg::MatrixTransform* myTransform = new osg::MatrixTransform();
|
||||
myTransform->addChild( createGeometryCube() );
|
||||
|
||||
|
||||
// move node in a circle at 90 degrees a sec.
|
||||
myTransform->setAppCallback(new MyTransformCallback(myTransform,osg::inDegrees(90.0f)));
|
||||
|
||||
|
||||
@@ -502,12 +502,14 @@ sMStats m_getMemoryStatistics()
|
||||
else ++numNotMatching;
|
||||
}
|
||||
|
||||
if (numMatching>0)
|
||||
if (numMatching>0 && !allocUnit->printedOutUnintializedInfo)
|
||||
{
|
||||
// possible unitialized data?
|
||||
std::cout<<"possible uninitilized memory numMatching="<<numMatching<<" numNotMatching="<<numNotMatching<<std::endl;
|
||||
std::cout<<" allocationNumber="<<allocUnit->allocationNumber<<" sourceFile '"<<allocUnit->sourceFile<<"' sourceLine="<<allocUnit->sourceLine<<std::endl;
|
||||
|
||||
allocUnit->printedOutUnintializedInfo=true;
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -117,7 +117,8 @@ Viewer::Viewer()
|
||||
|
||||
_initialTick = _timer.tick();
|
||||
_frameTick = _initialTick;
|
||||
frRate=0; // added by gwm to display fram Rate smoothed
|
||||
_lastFrameTick = _initialTick;
|
||||
frRate=0;
|
||||
|
||||
_focusedViewport = 0; // The viewport with mouse/keyboard focus
|
||||
|
||||
@@ -125,6 +126,19 @@ Viewer::Viewer()
|
||||
_frameStamp = osgNew osg::FrameStamp;
|
||||
|
||||
_displaySettings = osgNew osg::DisplaySettings;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ CullVisitor::CullVisitor()
|
||||
//_tsm = LOOK_VECTOR_DISTANCE;
|
||||
_tsm = OBJECT_EYE_POINT_DISTANCE;
|
||||
|
||||
|
||||
_computeNearFar = COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES;
|
||||
_computed_znear = FLT_MAX;
|
||||
_computed_zfar = -FLT_MAX;
|
||||
@@ -93,6 +92,11 @@ CullVisitor::CullVisitor()
|
||||
_numFramesToKeepImpostorSprites = 10;
|
||||
_impostorSpriteManager = osgNew ImpostorSpriteManager;
|
||||
|
||||
_currentRenderGraph = NULL;
|
||||
_currentRenderBin = NULL;
|
||||
|
||||
_currentReuseRenderLeafIndex=0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user