Futher changes to remove unitialized variables/reordering of initialization to
prevent unitialized warnings.
This commit is contained in:
@@ -9,7 +9,8 @@ CullStack::CullStack()
|
||||
_LODBias = 1.0f;
|
||||
_smallFeatureCullingPixelSize = 2.0f;
|
||||
_frustumVolume=-1.0f;
|
||||
|
||||
_bbCornerNear = 0;
|
||||
_bbCornerFar = 7;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ GeoSet::GeoSet()
|
||||
_primLengths = (int *)0;
|
||||
|
||||
_numcoords = 0;
|
||||
_numnormals = 0;
|
||||
_numcolors = 0;
|
||||
_numtcoords = 0;
|
||||
|
||||
_normal_binding = BIND_OFF;
|
||||
_color_binding = BIND_OFF;
|
||||
@@ -49,6 +52,9 @@ GeoSet::GeoSet()
|
||||
|
||||
_fast_path = 1;
|
||||
|
||||
_primlength = 0;
|
||||
_flat_shaded_skip = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -133,16 +133,15 @@ void ImpostorSprite::accept(PrimitiveFunctor& functor)
|
||||
// Helper class for managing the reuse of ImpostorSprite resources.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ImpostorSpriteManager::ImpostorSpriteManager()
|
||||
ImpostorSpriteManager::ImpostorSpriteManager():
|
||||
_first(NULL),
|
||||
_last(NULL)
|
||||
{
|
||||
_texenv = osgNew TexEnv;
|
||||
_texenv->setMode(TexEnv::REPLACE);
|
||||
|
||||
_alphafunc = osgNew osg::AlphaFunc;
|
||||
_alphafunc->setFunction( AlphaFunc::GREATER, 0.000f );
|
||||
|
||||
_first = NULL;
|
||||
_last = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
using namespace osg;
|
||||
|
||||
LightSource::LightSource()
|
||||
LightSource::LightSource():
|
||||
_value(StateAttribute::ON)
|
||||
{
|
||||
// switch off culling of light source nodes by default.
|
||||
setCullingActive(false);
|
||||
_dstate = osgNew StateSet;
|
||||
_value = StateAttribute::ON;
|
||||
_light = osgNew Light;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
using namespace osg;
|
||||
|
||||
MatrixTransform::MatrixTransform()
|
||||
MatrixTransform::MatrixTransform():
|
||||
_inverseDirty(false)
|
||||
{
|
||||
_matrix = osgNew Matrix;
|
||||
_inverse = osgNew Matrix;
|
||||
_inverseDirty = false;
|
||||
}
|
||||
|
||||
MatrixTransform::MatrixTransform(const MatrixTransform& transform,const CopyOp& copyop):
|
||||
|
||||
@@ -505,8 +505,8 @@ sMStats m_getMemoryStatistics()
|
||||
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;
|
||||
printf("Warning: possible uninitilized memory numMatching=%d numNotMatching=%d\n",numMatching,numNotMatching);
|
||||
printf(" allocationNumber=%d sourceFile '%s' sourceLine=%d\n",allocUnit->allocationNumber,allocUnit->sourceFile,allocUnit->sourceLine);
|
||||
|
||||
allocUnit->printedOutUnintializedInfo=true;
|
||||
|
||||
|
||||
@@ -18,33 +18,28 @@ using namespace osg;
|
||||
|
||||
Texture::DeletedTextureObjectCache Texture::s_deletedTextureObjectCache;
|
||||
|
||||
Texture::Texture()
|
||||
Texture::Texture():
|
||||
_target(GL_TEXTURE_2D),
|
||||
_wrap_s(CLAMP),
|
||||
_wrap_t(CLAMP),
|
||||
_wrap_r(CLAMP),
|
||||
_min_filter(LINEAR_MIPMAP_LINEAR), // trilinear
|
||||
_mag_filter(LINEAR),
|
||||
_texParamtersDirty(true),
|
||||
_internalFormatMode(USE_IMAGE_DATA_FORMAT),
|
||||
_internalFormatValue(0),
|
||||
_borderColor(0.0, 0.0, 0.0, 0.0),
|
||||
_textureWidth(0),
|
||||
_textureHeight(0),
|
||||
_subloadMode(OFF),
|
||||
_subloadOffsX(0),
|
||||
_subloadOffsY(0),
|
||||
_subloadWidth(0),
|
||||
_subloadHeight(0)
|
||||
{
|
||||
_handleList.resize(DisplaySettings::instance()->getMaxNumberOfGraphicsContexts(),0);
|
||||
_modifiedTag.resize(DisplaySettings::instance()->getMaxNumberOfGraphicsContexts(),0);
|
||||
|
||||
_target = GL_TEXTURE_2D;
|
||||
|
||||
_wrap_s = CLAMP;
|
||||
_wrap_t = CLAMP;
|
||||
_wrap_r = CLAMP;
|
||||
_min_filter = LINEAR_MIPMAP_LINEAR; // trilinear
|
||||
//_min_filter = LINEAR_MIPMAP_NEAREST; // bilinear
|
||||
//_min_filter = NEAREST_MIPMAP_LINEAR; // OpenGL default
|
||||
_mag_filter = LINEAR;
|
||||
|
||||
_internalFormatMode = USE_IMAGE_DATA_FORMAT;
|
||||
_internalFormatValue = 0;
|
||||
|
||||
_textureWidth = _textureHeight = 0;
|
||||
|
||||
_subloadMode = OFF;
|
||||
_subloadOffsX = _subloadOffsY = 0;
|
||||
_subloadWidth = _subloadHeight = 0;
|
||||
|
||||
_borderColor.set(0.0, 0.0, 0.0, 0.0);//OpenGL default
|
||||
|
||||
_texParamtersDirty = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ static GLenum faceTarget[6] =
|
||||
#endif
|
||||
|
||||
|
||||
TextureCubeMap::TextureCubeMap()
|
||||
TextureCubeMap::TextureCubeMap():Texture()
|
||||
{
|
||||
_target = GL_TEXTURE_CUBE_MAP; // default to ARB extension
|
||||
}
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
using namespace osg;
|
||||
|
||||
Transform::Transform()
|
||||
#ifdef USE_DEPRECATED_API
|
||||
:_deprecated_inverseDirty(false)
|
||||
#endif
|
||||
{
|
||||
_referenceFrame = RELATIVE_TO_PARENTS;
|
||||
|
||||
#ifdef USE_DEPRECATED_API
|
||||
_deprecated_matrix = osgNew Matrix;
|
||||
_deprecated_inverse = osgNew Matrix;
|
||||
_deprecated_inverseDirty = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user