From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)."
This commit is contained in:
@@ -65,7 +65,7 @@ bool AnimationPath::getInterpolatedControlPoint(double time,ControlPoint& contro
|
||||
|
||||
// we have both a lower bound and the next item.
|
||||
|
||||
// deta_time = second.time - first.time
|
||||
// delta_time = second.time - first.time
|
||||
double delta_time = second->first - first->first;
|
||||
|
||||
if (delta_time==0.0)
|
||||
|
||||
@@ -164,7 +164,7 @@ void ApplicationUsage::getFormattedString(std::string& str, const UsageMap& um,u
|
||||
if (width==0)
|
||||
{
|
||||
// word must be longer than a whole line so will need
|
||||
// to concatinate it.
|
||||
// to concatenate it.
|
||||
width = explanationWidth-1;
|
||||
concatinated = true;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ bool ClipNode::addClipPlane(ClipPlane* clipplane)
|
||||
|
||||
if (std::find(_planes.begin(),_planes.end(),clipplane)==_planes.end())
|
||||
{
|
||||
// cliplane doesn't exist in list so add it.
|
||||
// clipplane doesn't exist in list so add it.
|
||||
_planes.push_back(clipplane);
|
||||
setLocalStateSetModes(_value);
|
||||
return true;
|
||||
@@ -82,7 +82,7 @@ bool ClipNode::removeClipPlane(ClipPlane* clipplane)
|
||||
ClipPlaneList::iterator itr = std::find(_planes.begin(),_planes.end(),clipplane);
|
||||
if (itr!=_planes.end())
|
||||
{
|
||||
// cliplane exist in list so erase it.
|
||||
// clipplane exist in list so erase it.
|
||||
_planes.erase(itr);
|
||||
setLocalStateSetModes(_value);
|
||||
return true;
|
||||
|
||||
@@ -57,7 +57,7 @@ void CullingSet::popOccludersCurrentMask(NodePath& nodePath)
|
||||
{
|
||||
//std::cout<<" popping occluder "<<itr<<std::endl;
|
||||
// we have trapped for the case an occlude potentially occluding itself,
|
||||
// to prevent this we disable the results mask so that no subsequnt
|
||||
// to prevent this we disable the results mask so that no subsequent
|
||||
// when the next pushCurrentMask calls happens this occluder is switched off.
|
||||
itr->popCurrentMask();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
namespace osg
|
||||
{
|
||||
|
||||
// specialzed smart pointer, used to get round auto_ptr<>'s lack of the destructor reseting itself to 0.
|
||||
// specialized smart pointer, used to get round auto_ptr<>'s lack of the destructor reseting itself to 0.
|
||||
struct DeleteHandlerPointer
|
||||
{
|
||||
DeleteHandlerPointer():
|
||||
|
||||
@@ -71,7 +71,7 @@ void DrawPixels::getSubImageDimensions(unsigned int& offsetX,unsigned int& offse
|
||||
|
||||
BoundingBox DrawPixels::computeBound() const
|
||||
{
|
||||
// really needs to be dependant of view poistion and projection... will implement simple version right now.
|
||||
// really needs to be dependent of view position and projection... will implement simple version right now.
|
||||
BoundingBox bbox;
|
||||
float diagonal = 0.0f;
|
||||
if (_useSubImage)
|
||||
|
||||
@@ -206,7 +206,7 @@ void Drawable::deleteVertexBufferObject(unsigned int contextID,GLuint globj)
|
||||
}
|
||||
}
|
||||
|
||||
/** flush all the cached display list which need to be deleted
|
||||
/** flush all the cached display lists which need to be deleted
|
||||
* in the OpenGL context related to contextID.*/
|
||||
void Drawable::flushDeletedVertexBufferObjects(unsigned int contextID,double /*currentTime*/, double& availableTime)
|
||||
{
|
||||
@@ -415,7 +415,7 @@ void Drawable::setNumChildrenRequiringUpdateTraversal(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -450,7 +450,7 @@ void Drawable::setNumChildrenRequiringEventTraversal(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -500,7 +500,7 @@ void Drawable::compileGLObjects(RenderInfo& renderInfo) const
|
||||
// get the globj for the current contextID.
|
||||
GLuint& globj = _globjList[contextID];
|
||||
|
||||
// call the globj if already set otherwise comple and execute.
|
||||
// call the globj if already set otherwise compile and execute.
|
||||
if( globj != 0 )
|
||||
{
|
||||
glDeleteLists( globj, 1 );
|
||||
@@ -557,7 +557,7 @@ void Drawable::releaseGLObjects(State* state) const
|
||||
// get the globj for the current contextID.
|
||||
GLuint& globj = _globjList[contextID];
|
||||
|
||||
// call the globj if already set otherwise comple and execute.
|
||||
// call the globj if already set otherwise compile and execute.
|
||||
if( globj != 0 )
|
||||
{
|
||||
Drawable::deleteDisplayList(contextID,globj, getGLObjectSizeHint());
|
||||
|
||||
@@ -191,7 +191,7 @@ GLuint RenderBuffer::getObjectID(unsigned int contextID, const FBOExtensions *ex
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* FrameBufferAttachement
|
||||
* FrameBufferAttachment
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X
|
||||
@@ -593,7 +593,7 @@ void FrameBufferObject::apply(State &state) const
|
||||
|
||||
if (dirtyAttachmentList)
|
||||
{
|
||||
// the set of of attachements appears to be thread sensitive, it shouldn't be because
|
||||
// the set of of attachments appears to be thread sensitive, it shouldn't be because
|
||||
// OpenGL FBO handles osg::FrameBufferObject has are multi-buffered...
|
||||
// so as a temporary fix will stick in a mutex to ensure that only one thread passes through here
|
||||
// at one time.
|
||||
|
||||
@@ -98,7 +98,7 @@ bool Geode::removeDrawables(unsigned int pos,unsigned int numDrawablesToRemove)
|
||||
{
|
||||
// remove this Geode from the child parent list.
|
||||
_drawables[i]->removeParent(this);
|
||||
// update the number of app calbacks removed
|
||||
// update the number of app callbacks removed
|
||||
if (_drawables[i]->requiresUpdateTraversal()) ++updateCallbackRemoved;
|
||||
if (_drawables[i]->requiresEventTraversal()) ++eventCallbackRemoved;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ bool Geode::setDrawable( unsigned int i, Drawable* newDrawable )
|
||||
origDrawable->removeParent(this);
|
||||
|
||||
// note ref_ptr<> automatically handles decrementing origGset's reference count,
|
||||
// and inccrementing newGset's reference count.
|
||||
// and incrementing newGset's reference count.
|
||||
_drawables[i] = newDrawable;
|
||||
|
||||
// register as parent of child.
|
||||
|
||||
@@ -1707,7 +1707,7 @@ void Geometry::drawImplementation(RenderInfo& renderInfo) const
|
||||
}
|
||||
|
||||
|
||||
// draw primtives by the more flexible "slow" path,
|
||||
// draw primitives by the more flexible "slow" path,
|
||||
// sending OpenGL glBegin/glVertex.../glEnd().
|
||||
switch(primitiveset->getType())
|
||||
{
|
||||
@@ -2207,7 +2207,7 @@ void Geometry::accept(PrimitiveFunctor& functor) const
|
||||
functor.setVertexArray(_vertexData.array->getNumElements(),static_cast<const Vec4d*>(_vertexData.array->getDataPointer()));
|
||||
break;
|
||||
default:
|
||||
notify(WARN)<<"Warning: Geometry::accept(PrimtiveFunctor&) cannot handle Vertex Array type"<<_vertexData.array->getType()<<std::endl;
|
||||
notify(WARN)<<"Warning: Geometry::accept(PrimitiveFunctor&) cannot handle Vertex Array type"<<_vertexData.array->getType()<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2248,7 +2248,7 @@ void Geometry::accept(PrimitiveFunctor& functor) const
|
||||
vec4dArray = static_cast<const Vec4dArray*>(_vertexData.array.get());
|
||||
break;
|
||||
default:
|
||||
notify(WARN)<<"Warning: Geometry::accept(PrimtiveFunctor&) cannot handle Vertex Array type"<<_vertexData.array->getType()<<std::endl;
|
||||
notify(WARN)<<"Warning: Geometry::accept(PrimitiveFunctor&) cannot handle Vertex Array type"<<_vertexData.array->getType()<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2495,7 +2495,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const
|
||||
functor.setVertexArray(_vertexData.array->getNumElements(),static_cast<const Vec4d*>(_vertexData.array->getDataPointer()));
|
||||
break;
|
||||
default:
|
||||
notify(WARN)<<"Warning: Geometry::accept(PrimtiveIndexFunctor&) cannot handle Vertex Array type"<<_vertexData.array->getType()<<std::endl;
|
||||
notify(WARN)<<"Warning: Geometry::accept(PrimitiveIndexFunctor&) cannot handle Vertex Array type"<<_vertexData.array->getType()<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2616,7 +2616,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int _computeNumberOfPrimtives(const osg::Geometry& geom)
|
||||
unsigned int _computeNumberOfPrimitives(const osg::Geometry& geom)
|
||||
{
|
||||
|
||||
unsigned int totalNumberOfPrimitives = 0;
|
||||
@@ -2638,7 +2638,7 @@ unsigned int _computeNumberOfPrimtives(const osg::Geometry& geom)
|
||||
default: primLength=0; osg::notify(osg::INFO)<<"prim="<<std::hex<<mode<<std::dec<<std::endl; break; // compute later when =0.
|
||||
}
|
||||
|
||||
// draw primtives by the more flexible "slow" path,
|
||||
// draw primitives by the more flexible "slow" path,
|
||||
// sending OpenGL glBegin/glVertex.../glEnd().
|
||||
switch(primitiveset->getType())
|
||||
{
|
||||
@@ -2685,7 +2685,7 @@ bool _verifyBindings(const osg::Geometry& geom, const A& arrayData)
|
||||
if (numElements!=geom.getPrimitiveSetList().size()) return false;
|
||||
break;
|
||||
case(osg::Geometry::BIND_PER_PRIMITIVE):
|
||||
if (numElements!=_computeNumberOfPrimtives(geom)) return false;
|
||||
if (numElements!=_computeNumberOfPrimitives(geom)) return false;
|
||||
break;
|
||||
case(osg::Geometry::BIND_PER_VERTEX):
|
||||
{
|
||||
@@ -2776,7 +2776,7 @@ void _computeCorrectBindingsAndArraySizes(std::ostream& out, const osg::Geometry
|
||||
}
|
||||
|
||||
// check to see if binding might be per primitive
|
||||
unsigned int numPrimitives = _computeNumberOfPrimtives(geom);
|
||||
unsigned int numPrimitives = _computeNumberOfPrimitives(geom);
|
||||
if (numElements==numPrimitives)
|
||||
{
|
||||
if (arrayData.binding != osg::Geometry::BIND_PER_PRIMITIVE)
|
||||
|
||||
@@ -337,7 +337,7 @@ GraphicsContext* GraphicsContext::getOrCreateCompileContext(unsigned int context
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_contextIDMapMutex);
|
||||
s_contextIDMap[contextID]._compileContext = gc;
|
||||
osg::notify(osg::INFO)<<" succeded GraphicsContext::createCompileContext."<<std::endl;
|
||||
osg::notify(osg::INFO)<<" succeeded GraphicsContext::createCompileContext."<<std::endl;
|
||||
return gc.release();
|
||||
}
|
||||
else
|
||||
@@ -436,7 +436,7 @@ void GraphicsContext::close(bool callCloseImplementation)
|
||||
if (s_contextIDMap[_state->getContextID()]._numContexts>1) sharedContextExists = true;
|
||||
}
|
||||
|
||||
// release all the OpenGL objects in the scene graphs associted with this
|
||||
// release all the OpenGL objects in the scene graphs associated with this
|
||||
for(Cameras::iterator itr = _cameras.begin();
|
||||
itr != _cameras.end();
|
||||
++itr)
|
||||
@@ -504,7 +504,7 @@ bool GraphicsContext::makeCurrent()
|
||||
{
|
||||
_threadOfLastMakeCurrent = OpenThreads::Thread::CurrentThread();
|
||||
|
||||
// initialize extension process, note, only initializes on first
|
||||
// initialize extension process, not only initializes on first
|
||||
// call, will be a non-op on subsequent calls.
|
||||
getState()->initializeExtensionProcs();
|
||||
}
|
||||
@@ -520,7 +520,7 @@ bool GraphicsContext::makeContextCurrent(GraphicsContext* readContext)
|
||||
{
|
||||
_threadOfLastMakeCurrent = OpenThreads::Thread::CurrentThread();
|
||||
|
||||
// initialize extension proces, not only initializes on first
|
||||
// initialize extension process, not only initializes on first
|
||||
// call, will be a non-op on subsequent calls.
|
||||
getState()->initializeExtensionProcs();
|
||||
}
|
||||
@@ -590,7 +590,7 @@ void GraphicsContext::add(Operation* operation)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Doing add"<<std::endl;
|
||||
|
||||
// aquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
|
||||
|
||||
// add the operation to the end of the list
|
||||
@@ -603,7 +603,7 @@ void GraphicsContext::remove(Operation* operation)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Doing remove operation"<<std::endl;
|
||||
|
||||
// aquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
|
||||
|
||||
for(OperationQueue::iterator itr = _operations.begin();
|
||||
@@ -623,10 +623,10 @@ void GraphicsContext::remove(const std::string& name)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Doing remove named operation"<<std::endl;
|
||||
|
||||
// aquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
|
||||
|
||||
// find the remove all operations with specificed name
|
||||
// find the remove all operations with specified name
|
||||
for(OperationQueue::iterator itr = _operations.begin();
|
||||
itr!=_operations.end();)
|
||||
{
|
||||
|
||||
@@ -86,10 +86,10 @@ void ReleaseContext_Block_MakeCurrentOperation::operator () (GraphicsContext* co
|
||||
// reset the block so that it the next call to block()
|
||||
reset();
|
||||
|
||||
// block this thread, untill the block is released externally.
|
||||
// block this thread, until the block is released externally.
|
||||
block();
|
||||
|
||||
// re aquire the graphcis context.
|
||||
// re acquire the graphics context.
|
||||
context->makeCurrent();
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ void Node::setUpdateCallback(NodeCallback* nc)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -275,7 +275,7 @@ void Node::setNumChildrenRequiringUpdateTraversal(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -317,7 +317,7 @@ void Node::setEventCallback(NodeCallback* nc)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -353,7 +353,7 @@ void Node::setNumChildrenRequiringEventTraversal(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -393,7 +393,7 @@ void Node::setCullingActive(bool active)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -428,7 +428,7 @@ void Node::setNumChildrenWithCullingDisabled(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -465,7 +465,7 @@ void Node::setNumChildrenWithOccluderNodes(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
|
||||
@@ -68,7 +68,7 @@ ref_ptr<Operation> OperationQueue::getNextOperation(bool blockIfEmpty)
|
||||
|
||||
if (_currentOperationIterator == _operations.end())
|
||||
{
|
||||
// iterator at end of operations so reset to begining.
|
||||
// iterator at end of operations so reset to beginning.
|
||||
_currentOperationIterator = _operations.begin();
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ void OperationQueue::add(Operation* operation)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Doing add"<<std::endl;
|
||||
|
||||
// aquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
|
||||
|
||||
// add the operation to the end of the list
|
||||
@@ -117,7 +117,7 @@ void OperationQueue::remove(Operation* operation)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Doing remove operation"<<std::endl;
|
||||
|
||||
// aquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
|
||||
|
||||
for(Operations::iterator itr = _operations.begin();
|
||||
@@ -140,10 +140,10 @@ void OperationQueue::remove(const std::string& name)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Doing remove named operation"<<std::endl;
|
||||
|
||||
// aquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
|
||||
|
||||
// find the remove all operations with specificed name
|
||||
// find the remove all operations with specified name
|
||||
for(Operations::iterator itr = _operations.begin();
|
||||
itr!=_operations.end();)
|
||||
{
|
||||
@@ -185,7 +185,7 @@ void OperationQueue::runOperations(Object* callingObject)
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
|
||||
|
||||
// reset current operation iterator to begining if at end.
|
||||
// reset current operation iterator to beginning if at end.
|
||||
if (_currentOperationIterator==_operations.end()) _currentOperationIterator = _operations.begin();
|
||||
|
||||
for(;
|
||||
@@ -421,7 +421,7 @@ void OperationThread::run()
|
||||
if (firstTime)
|
||||
{
|
||||
// do a yield to get round a peculiar thread hang when testCancel() is called
|
||||
// in certain cirumstances - of which there is no particular pattern.
|
||||
// in certain circumstances - of which there is no particular pattern.
|
||||
YieldCurrentThread();
|
||||
firstTime = false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ void PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver()
|
||||
if (renderer)
|
||||
{
|
||||
if ((strstr((const char*)renderer,"Radeon")!=0) ||
|
||||
(strstr((const char*)renderer,"RADEON")!=0))
|
||||
(strstr((const char*)renderer,"RADEON")!=0) ||
|
||||
(strstr((const char*)renderer,"ALL-IN-WONDER")!=0))
|
||||
{
|
||||
setFactorMultiplier(1.0f);
|
||||
setUnitsMultiplier(128.0f);
|
||||
|
||||
@@ -56,7 +56,7 @@ PolygonStipple::~PolygonStipple()
|
||||
int PolygonStipple::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.
|
||||
// used by the COMPARE_StateAttribute_Parameter macro's below.
|
||||
COMPARE_StateAttribute_Types(PolygonStipple,sa)
|
||||
|
||||
// compare each parameter in turn against the rhs.
|
||||
|
||||
@@ -2007,7 +2007,7 @@ Program::~Program()
|
||||
int Program::compare(const osg::StateAttribute& sa) const
|
||||
{
|
||||
// check the types are equal and then create the rhs variable
|
||||
// used by the COMPARE_StateAttribute_Paramter macro's below.
|
||||
// used by the COMPARE_StateAttribute_Parameter macro's below.
|
||||
COMPARE_StateAttribute_Types(Program,sa)
|
||||
|
||||
if( _shaderList.size() < rhs._shaderList.size() ) return -1;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
namespace osg
|
||||
{
|
||||
|
||||
// specialzed smart pointer, used to get round auto_ptr<>'s lack of the destructor reseting itself to 0.
|
||||
// specialized smart pointer, used to get round auto_ptr<>'s lack of the destructor reseting itself to 0.
|
||||
struct DeleteHandlerPointer
|
||||
{
|
||||
DeleteHandlerPointer():
|
||||
@@ -178,7 +178,7 @@ void Referenced::setThreadSafeRefUnref(bool threadSafe)
|
||||
{
|
||||
if (!_refMutex)
|
||||
{
|
||||
// we want thread safe ref()/unref() so assing a mutex
|
||||
// we want thread safe ref()/unref() so assign a mutex
|
||||
_refMutex = new OpenThreads::Mutex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -959,7 +959,7 @@ void DrawShapeVisitor::apply(const HeightField& field)
|
||||
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
|
||||
// draw skirt at begining if required.
|
||||
// draw skirt at beginning if required.
|
||||
if (field.getSkirtHeight()!=0.0f)
|
||||
{
|
||||
vertTop.set(0.0f,dy*(float)(row+1),field.getHeight(0,row+1)-field.getSkirtHeight());
|
||||
@@ -1294,7 +1294,7 @@ void ComputeBoundShapeVisitor::apply(const CompositeShape& group)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accept a primtive functor for each of the shapes.
|
||||
// Accept a primitive functor for each of the shapes.
|
||||
//
|
||||
|
||||
class PrimitiveShapeVisitor : public ConstShapeVisitor
|
||||
|
||||
@@ -110,7 +110,7 @@ void State::reset()
|
||||
as.changed = true;
|
||||
}
|
||||
|
||||
// we can do a straight clear, we arn't intrested in GL_DEPTH_TEST defaults in texture modes.
|
||||
// we can do a straight clear, we arn't interested in GL_DEPTH_TEST defaults in texture modes.
|
||||
for(TextureModeMapList::iterator tmmItr=_textureModeMapList.begin();
|
||||
tmmItr!=_textureModeMapList.end();
|
||||
++tmmItr)
|
||||
@@ -147,7 +147,7 @@ void State::reset()
|
||||
// reset active texture unit values and call OpenGL
|
||||
// note, this OpenGL op precludes the use of State::reset() without a
|
||||
// valid graphics context, therefore the new implementation below
|
||||
// is prefered.
|
||||
// is preferred.
|
||||
setActiveTextureUnit(0);
|
||||
#else
|
||||
// reset active texture unit values without calling OpenGL
|
||||
@@ -365,7 +365,7 @@ void State::apply(const StateSet* dstate)
|
||||
{
|
||||
if (_checkGLErrors==ONCE_PER_ATTRIBUTE) checkGLErrors("start of State::apply(StateSet*)");
|
||||
|
||||
// equivilant to:
|
||||
// equivalent to:
|
||||
//pushStateSet(dstate);
|
||||
//apply();
|
||||
//popStateSet();
|
||||
@@ -428,7 +428,7 @@ void State::apply(const StateSet* dstate)
|
||||
}
|
||||
else
|
||||
{
|
||||
// no incomming stateset, so simply apply state.
|
||||
// no incoming stateset, so simply apply state.
|
||||
apply();
|
||||
}
|
||||
|
||||
|
||||
@@ -611,7 +611,7 @@ void StateSet::merge(const StateSet& rhs)
|
||||
if (!(lhs_mitr->second & StateAttribute::OVERRIDE ) ||
|
||||
(rhs_mitr->second & StateAttribute::PROTECTED))
|
||||
{
|
||||
// override isn't on in rhs, so overrite it with incomming
|
||||
// override isn't on in rhs, so override it with incoming
|
||||
// value.
|
||||
lhs_mitr->second = rhs_mitr->second;
|
||||
}
|
||||
@@ -636,14 +636,14 @@ void StateSet::merge(const StateSet& rhs)
|
||||
if (!(lhs_aitr->second.second & StateAttribute::OVERRIDE) ||
|
||||
(rhs_aitr->second.second & StateAttribute::PROTECTED))
|
||||
{
|
||||
// override isn't on in rhs, so overrite it with incomming
|
||||
// override isn't on in rhs, so override it with incoming
|
||||
// value.
|
||||
if (lhs_aitr->second.first!=rhs_aitr->second.first)
|
||||
{
|
||||
// new attribute so need to remove self from outgoing attribute
|
||||
lhs_aitr->second.first->removeParent(this);
|
||||
|
||||
// override isn't on in rhs, so overrite it with incomming
|
||||
// override isn't on in rhs, so override it with incoming
|
||||
// value.
|
||||
lhs_aitr->second = rhs_aitr->second;
|
||||
lhs_aitr->second.first->addParent(this);
|
||||
@@ -683,7 +683,7 @@ void StateSet::merge(const StateSet& rhs)
|
||||
if (!(lhs_mitr->second & StateAttribute::OVERRIDE) ||
|
||||
(rhs_mitr->second & StateAttribute::PROTECTED))
|
||||
{
|
||||
// override isn't on in rhs, so overrite it with incomming
|
||||
// override isn't on in rhs, so override it with incoming
|
||||
// value.
|
||||
lhs_mitr->second = rhs_mitr->second;
|
||||
}
|
||||
@@ -715,7 +715,7 @@ void StateSet::merge(const StateSet& rhs)
|
||||
if (!(lhs_aitr->second.second & StateAttribute::OVERRIDE) ||
|
||||
(rhs_aitr->second.second & StateAttribute::PROTECTED))
|
||||
{
|
||||
// override isn't on in rhs, so overrite it with incomming
|
||||
// override isn't on in rhs, so override it with incoming
|
||||
// value.
|
||||
|
||||
if (lhs_aitr->second.first!=rhs_aitr->second.first)
|
||||
@@ -751,7 +751,7 @@ void StateSet::merge(const StateSet& rhs)
|
||||
if (!(lhs_uitr->second.second & StateAttribute::OVERRIDE) ||
|
||||
(rhs_uitr->second.second & StateAttribute::PROTECTED))
|
||||
{
|
||||
// override isn't on in rhs, so overrite it with incomming
|
||||
// override isn't on in rhs, so override it with incoming
|
||||
// value.
|
||||
|
||||
if (lhs_uitr->second.first!=rhs_uitr->second.first)
|
||||
@@ -1753,7 +1753,7 @@ void StateSet::setNumChildrenRequiringUpdateTraversal(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
@@ -1798,7 +1798,7 @@ void StateSet::setNumChildrenRequiringEventTraversal(unsigned int num)
|
||||
{
|
||||
// the number of callbacks has changed, need to pass this
|
||||
// on to parents so they know whether app traversal is
|
||||
// reqired on this subgraph.
|
||||
// required on this subgraph.
|
||||
for(ParentList::iterator itr =_parents.begin();
|
||||
itr != _parents.end();
|
||||
++itr)
|
||||
|
||||
@@ -510,7 +510,7 @@ void Texture::takeTextureObjects(Texture::TextureObjectListMap& toblm)
|
||||
{
|
||||
if (_textureObjectBuffer[i].valid())
|
||||
{
|
||||
//notify(INFO) << "releasing texure "<<toblm[i].size()<<std::endl;
|
||||
//notify(INFO) << "releasing texture "<<toblm[i].size()<<std::endl;
|
||||
toblm[i].push_back(_textureObjectBuffer[i]);
|
||||
}
|
||||
}
|
||||
@@ -542,7 +542,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
|
||||
else
|
||||
{
|
||||
|
||||
const unsigned int contextID = 0; // state.getContextID(); // set to 0 right now, assume same paramters for each graphics context...
|
||||
const unsigned int contextID = 0; // state.getContextID(); // set to 0 right now, assume same parameters for each graphics context...
|
||||
const Extensions* extensions = getExtensions(contextID,true);
|
||||
|
||||
switch(_internalFormatMode)
|
||||
|
||||
@@ -41,7 +41,7 @@ Texture1D::~Texture1D()
|
||||
int Texture1D::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.
|
||||
// used by the COMPARE_StateAttribute_Parameter macro's below.
|
||||
COMPARE_StateAttribute_Types(Texture1D,sa)
|
||||
|
||||
if (_image!=rhs._image) // smart pointer comparison.
|
||||
@@ -78,7 +78,7 @@ int Texture1D::compare(const StateAttribute& sa) const
|
||||
int result = compareTexture(rhs);
|
||||
if (result!=0) return result;
|
||||
|
||||
// compare each paramter in turn against the rhs.
|
||||
// compare each parameter in turn against the rhs.
|
||||
COMPARE_StateAttribute_Parameter(_textureWidth)
|
||||
COMPARE_StateAttribute_Parameter(_subloadCallback)
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Texture2D::~Texture2D()
|
||||
int Texture2D::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.
|
||||
// used by the COMPARE_StateAttribute_Parameter macro's below.
|
||||
COMPARE_StateAttribute_Types(Texture2D,sa)
|
||||
|
||||
if (_image!=rhs._image) // smart pointer comparison.
|
||||
@@ -90,7 +90,7 @@ int Texture2D::compare(const StateAttribute& sa) const
|
||||
int result = compareTexture(rhs);
|
||||
if (result!=0) return result;
|
||||
|
||||
// compare each paramter in turn against the rhs.
|
||||
// compare each parameter in turn against the rhs.
|
||||
#if 1
|
||||
if (_textureWidth != 0 && rhs._textureWidth != 0)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ Texture2DArray::~Texture2DArray()
|
||||
int Texture2DArray::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.
|
||||
// used by the COMPARE_StateAttribute_Parameter macro's below.
|
||||
COMPARE_StateAttribute_Types(Texture2DArray,sa)
|
||||
|
||||
bool noImages = true;
|
||||
@@ -91,7 +91,7 @@ int Texture2DArray::compare(const StateAttribute& sa) const
|
||||
int result = compareTexture(rhs);
|
||||
if (result!=0) return result;
|
||||
|
||||
// compare each paramter in turn against the rhs.
|
||||
// compare each parameter in turn against the rhs.
|
||||
COMPARE_StateAttribute_Parameter(_textureWidth)
|
||||
COMPARE_StateAttribute_Parameter(_textureHeight)
|
||||
COMPARE_StateAttribute_Parameter(_textureDepth)
|
||||
@@ -546,9 +546,7 @@ void Texture2DArray::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_isTexture2DArraySupported = isGLExtensionSupported(contextID,"GL_EXT_texture_array");
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_max2DSize);
|
||||
_maxLayerCount = 0;
|
||||
if (_isTexture2DArraySupported)
|
||||
glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS_EXT, &_maxLayerCount);
|
||||
glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS_EXT, &_maxLayerCount);
|
||||
|
||||
setGLExtensionFuncPtr(_glTexImage3D, "glTexImage3D","glTexImage3DEXT");
|
||||
setGLExtensionFuncPtr(_glTexSubImage3D, "glTexSubImage3D","glTexSubImage3DEXT");
|
||||
|
||||
@@ -48,7 +48,7 @@ Texture3D::~Texture3D()
|
||||
int Texture3D::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.
|
||||
// used by the COMPARE_StateAttribute_Parameter macro's below.
|
||||
COMPARE_StateAttribute_Types(Texture3D,sa)
|
||||
|
||||
if (_image!=rhs._image) // smart pointer comparison.
|
||||
@@ -85,7 +85,7 @@ int Texture3D::compare(const StateAttribute& sa) const
|
||||
int result = compareTexture(rhs);
|
||||
if (result!=0) return result;
|
||||
|
||||
// compare each paramter in turn against the rhs.
|
||||
// compare each parameter in turn against the rhs.
|
||||
COMPARE_StateAttribute_Parameter(_textureWidth)
|
||||
COMPARE_StateAttribute_Parameter(_textureHeight)
|
||||
COMPARE_StateAttribute_Parameter(_textureDepth)
|
||||
|
||||
@@ -76,7 +76,7 @@ TextureRectangle::~TextureRectangle()
|
||||
int TextureRectangle::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.
|
||||
// used by the COMPARE_StateAttribute_Parameter macro's below.
|
||||
COMPARE_StateAttribute_Types(TextureRectangle,sa)
|
||||
|
||||
if (_image!=rhs._image) // smart pointer comparison.
|
||||
@@ -113,7 +113,7 @@ int TextureRectangle::compare(const StateAttribute& sa) const
|
||||
int result = compareTexture(rhs);
|
||||
if (result!=0) return result;
|
||||
|
||||
// compare each paramter in turn against the rhs.
|
||||
// compare each parameter in turn against the rhs.
|
||||
COMPARE_StateAttribute_Parameter(_textureWidth)
|
||||
COMPARE_StateAttribute_Parameter(_textureHeight)
|
||||
COMPARE_StateAttribute_Parameter(_subloadCallback)
|
||||
|
||||
@@ -60,7 +60,7 @@ View::~View()
|
||||
_camera->setCullCallback(0);
|
||||
}
|
||||
|
||||
// detatch the cameras from this View to prevent dangling pointers
|
||||
// detach the cameras from this View to prevent dangling pointers
|
||||
for(Slaves::iterator itr = _slaves.begin();
|
||||
itr != _slaves.end();
|
||||
++itr)
|
||||
|
||||
@@ -49,7 +49,7 @@ bool dxtc_pixels::OpenGLSize() const
|
||||
|
||||
bool dxtc_pixels::VFlip() const
|
||||
{
|
||||
// Check that the given dimentions are 2^x, 2^y
|
||||
// Check that the given dimensions are 2^x, 2^y
|
||||
if (! OpenGLSize())
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user