Fixed warnings
This commit is contained in:
@@ -190,7 +190,16 @@ void FragmentProgram::apply(State& state) const
|
||||
|
||||
void FragmentProgram::releaseGLObjects(State* state) const
|
||||
{
|
||||
const_cast<FragmentProgram*>(this)->dirtyFragmentProgramObject();
|
||||
if (!state) const_cast<FragmentProgram*>(this)->dirtyFragmentProgramObject();
|
||||
else
|
||||
{
|
||||
unsigned int contextID = state->getContextID();
|
||||
if (_fragmentProgramIDList[contextID] != 0)
|
||||
{
|
||||
FragmentProgram::deleteFragmentProgramObject(contextID,_fragmentProgramIDList[contextID]);
|
||||
_fragmentProgramIDList[contextID] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -185,8 +185,9 @@ void PagedLOD::removeExpiredChildren(double expiryTime,NodeList& removedChildren
|
||||
{
|
||||
if (!_perRangeDataList[_children.size()-1]._filename.empty() && _perRangeDataList[_children.size()-1]._timeStamp<expiryTime)
|
||||
{
|
||||
//removedChildren.push_back(_children[_children.size()-1].get());
|
||||
Group::removeChild(_children[_children.size()-1].get());
|
||||
osg::Node* nodeToRemove = _children[_children.size()-1].get();
|
||||
removedChildren.push_back(nodeToRemove);
|
||||
Group::removeChild(nodeToRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,12 @@ using namespace osg;
|
||||
|
||||
int PointSprite::compare(const StateAttribute& sa) const
|
||||
{
|
||||
// check the types are equal and then create the rhs variable
|
||||
// used by the COMPARE_StateAttribute_Paramter macro's below.
|
||||
COMPARE_StateAttribute_Types(PointSprite,sa)
|
||||
if (this==&sa) return 0;\
|
||||
const std::type_info* type_lhs = &typeid(*this);\
|
||||
const std::type_info* type_rhs = &typeid(sa);\
|
||||
if (type_lhs->before(*type_rhs)) return -1;\
|
||||
if (*type_lhs != *type_rhs) return 1;\
|
||||
|
||||
return 0; // passed all the above comparison macro's, must be equal.
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,11 @@ static std::auto_ptr<DeleteHandler> s_deleteHandler(0);
|
||||
|
||||
void Referenced::setDeleteHandler(DeleteHandler* handler)
|
||||
{
|
||||
// s_deleteHandler.reset(handler);
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200) // 1200 == VC++ 6.0
|
||||
s_deleteHandler = handler;
|
||||
#else
|
||||
s_deleteHandler.reset(handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
DeleteHandler* Referenced::getDeleteHandler()
|
||||
|
||||
@@ -1070,7 +1070,18 @@ void Texture::compileGLObjects(State& state) const
|
||||
|
||||
void Texture::releaseGLObjects(State* state) const
|
||||
{
|
||||
const_cast<Texture*>(this)->dirtyTextureObject();
|
||||
if (!state) const_cast<Texture*>(this)->dirtyTextureObject();
|
||||
else
|
||||
{
|
||||
unsigned int contextID = state->getContextID();
|
||||
if (_textureObjectBuffer[contextID].valid())
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(getTextureObjectManager()->_mutex);
|
||||
|
||||
getTextureObjectManager()->_textureObjectListMap[contextID].push_back(_textureObjectBuffer[contextID]);
|
||||
_textureObjectBuffer[contextID] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef buffered_value< ref_ptr<Texture::Extensions> > BufferedExtensions;
|
||||
|
||||
@@ -191,7 +191,16 @@ void VertexProgram::apply(State& state) const
|
||||
|
||||
void VertexProgram::releaseGLObjects(State* state) const
|
||||
{
|
||||
const_cast<VertexProgram*>(this)->dirtyVertexProgramObject();
|
||||
if (!state) const_cast<VertexProgram*>(this)->dirtyVertexProgramObject();
|
||||
else
|
||||
{
|
||||
unsigned int contextID = state->getContextID();
|
||||
if (_vertexProgramIDList[contextID] != 0)
|
||||
{
|
||||
VertexProgram::deleteVertexProgramObject(contextID,_vertexProgramIDList[contextID]);
|
||||
_vertexProgramIDList[contextID] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user