From Jannik Heller, typo fixes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14832 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -43,7 +43,7 @@ private:
|
||||
|
||||
volatile int cnt; // number of waiting threads
|
||||
|
||||
volatile int phase; // flag to seperate two barriers
|
||||
volatile int phase; // flag to separate two barriers
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace osg
|
||||
//#define ENFORCE_THREADSAFE
|
||||
//#define DEBUG_OBJECT_ALLOCATION_DESTRUCTION
|
||||
|
||||
// specialized 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 resetting itself to 0.
|
||||
template<typename T>
|
||||
struct ResetPointer
|
||||
{
|
||||
|
||||
@@ -215,13 +215,13 @@ void Shader::discardDeletedGlShaders(unsigned int contextID)
|
||||
|
||||
Shader::Shader(Type type) :
|
||||
_type(type),
|
||||
_shaderDefinesMode(USE_SHADER_PRAGAMA)
|
||||
_shaderDefinesMode(USE_SHADER_PRAGMA)
|
||||
{
|
||||
}
|
||||
|
||||
Shader::Shader(Type type, const std::string& source) :
|
||||
_type(type),
|
||||
_shaderDefinesMode(USE_SHADER_PRAGAMA)
|
||||
_shaderDefinesMode(USE_SHADER_PRAGMA)
|
||||
{
|
||||
setShaderSource( source);
|
||||
}
|
||||
@@ -229,7 +229,7 @@ Shader::Shader(Type type, const std::string& source) :
|
||||
Shader::Shader(Type type, ShaderBinary* shaderBinary) :
|
||||
_type(type),
|
||||
_shaderBinary(shaderBinary),
|
||||
_shaderDefinesMode(USE_SHADER_PRAGAMA)
|
||||
_shaderDefinesMode(USE_SHADER_PRAGMA)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ void State::reset()
|
||||
_lastAppliedProgramObject = 0;
|
||||
|
||||
// what about uniforms??? need to clear them too...
|
||||
// go through all active Unfirom's, setting to change to force update,
|
||||
// go through all active Uniform's, setting to change to force update,
|
||||
// the idea is to leave only the global defaults left.
|
||||
for(UniformMap::iterator uitr=_uniformMap.begin();
|
||||
uitr!=_uniformMap.end();
|
||||
@@ -945,7 +945,7 @@ void State::setInterleavedArrays( GLenum format, GLsizei stride, const GLvoid* p
|
||||
OSG_NOTICE<<"Warning: State::setInterleavedArrays(..) not implemented."<<std::endl;
|
||||
#endif
|
||||
|
||||
// the crude way, assume that all arrays have been effected so dirty them and
|
||||
// the crude way, assume that all arrays have been affected so dirty them and
|
||||
// disable them...
|
||||
dirtyAllVertexArrays();
|
||||
}
|
||||
|
||||
@@ -985,7 +985,7 @@ unsigned int Uniform::getNameID(const std::string& name)
|
||||
return id;
|
||||
}
|
||||
|
||||
// Use a proxy to force the initialization of the static variables in the Unifrom::getNameID() method during static initialization
|
||||
// Use a proxy to force the initialization of the static variables in the Uniform::getNameID() method during static initialization
|
||||
OSG_INIT_SINGLETON_PROXY(UniformNameIDStaticInitializationProxy, Uniform::getNameID(std::string()))
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ void CameraManipulator::computeHomePosition(const osg::Camera *camera, bool useB
|
||||
if (camera)
|
||||
{
|
||||
|
||||
// try to compute dist from frustrum
|
||||
// try to compute dist from frustum
|
||||
double left,right,bottom,top,zNear,zFar;
|
||||
if (camera->getProjectionMatrixAsFrustum(left,right,bottom,top,zNear,zFar))
|
||||
{
|
||||
|
||||
@@ -138,13 +138,13 @@ public:
|
||||
bool GetTileOriginType(trpgTileType &) const;
|
||||
/* Group IDs are used by TerraPage to hook level of detail structures together.
|
||||
A TerraPage database can have an arbitrary number of terrain LODs, each stored
|
||||
seperately. To hook them together we use trpgAttach nodes and number each group &
|
||||
separately. To hook them together we use trpgAttach nodes and number each group &
|
||||
LOD node. This returns the maximum group ID in the file, which is important
|
||||
to know if you're keeping an array of them. */
|
||||
bool GetMaxGroupID(int &) const;
|
||||
|
||||
/* A TerraPage archive can contain any number of terrain LODs (a typical number is 4).
|
||||
Each of these terrain LODs is accessed seperately (as are the tiles within them).
|
||||
Each of these terrain LODs is accessed separately (as are the tiles within them).
|
||||
This returns the number of terrain LODs in the file. It will be at least 1.
|
||||
See trpgAttach for instructions on how to hook the terrain LODs together.
|
||||
|
||||
@@ -2551,14 +2551,14 @@ public:
|
||||
this node rotates around the center in the way specified by GetMode. (2) Individual - This
|
||||
is a little weirder. Basically, it's here for trees. It's assumed that
|
||||
there will be one or more trpgGeometry nodes below this node. Each single
|
||||
primitive is supposed to rotate "seperately". That is, you must take into
|
||||
primitive is supposed to rotate "separately". That is, you must take into
|
||||
account the unique center of each one and rotate it around that. If you have
|
||||
some optimization scheme where you can deal with groups of billboards (ala Performer)
|
||||
it is valid to do so in the Individual case. */
|
||||
bool GetType(int &) const;
|
||||
/* Center of the thing to be rotated. For Group this does the obvious thing.
|
||||
For Individual it should be the center of the group of things you want to rotate.
|
||||
This has no use if you're going to rotate each primitive seperately, but if you've
|
||||
This has no use if you're going to rotate each primitive separately, but if you've
|
||||
got some sort of optimized scheme for doing so (ala Performer) this information is useful.
|
||||
*/
|
||||
bool GetCenter(trpg3dPoint &) const;
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
// This will recursivelly call itself up until
|
||||
// all the tiule are done
|
||||
// This will recursively call itself up until
|
||||
// all the tiles are done
|
||||
void printBuf(int lod, int x, int y, trpgr_Archive *archive, trpgPrintGraphParser& parser, trpgMemReadBuffer &buf, trpgPrintBuffer &pBuf)
|
||||
{
|
||||
char ls[1024];
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
int stripStat[15]; // Strip length stats
|
||||
int fanStat[15]; // Fan length stats
|
||||
|
||||
int stripGeom; // Number of seperate trpgGeometry nodes for strips
|
||||
int stripGeom; // Number of separate trpgGeometry nodes for strips
|
||||
int fanGeom; // Same for fans
|
||||
int bagGeom; // Same for bags
|
||||
|
||||
|
||||
@@ -557,7 +557,7 @@ ActiveOperators::~ActiveOperators()
|
||||
{
|
||||
}
|
||||
|
||||
void ActiveOperators::collect(osg::Node* incommingNode, osg::NodeVisitor::TraversalMode tm)
|
||||
void ActiveOperators::collect(osg::Node* incomingNode, osg::NodeVisitor::TraversalMode tm)
|
||||
{
|
||||
_previous.swap(_current);
|
||||
|
||||
@@ -565,21 +565,21 @@ void ActiveOperators::collect(osg::Node* incommingNode, osg::NodeVisitor::Traver
|
||||
|
||||
FindOperatorsVisitor fov(_current, tm);
|
||||
|
||||
if (incommingNode)
|
||||
if (incomingNode)
|
||||
{
|
||||
incommingNode->accept(fov);
|
||||
incomingNode->accept(fov);
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_NOTICE<<"ActiveOperators::collect() incommingNode="<<incommingNode<<std::endl;
|
||||
OSG_NOTICE<<"ActiveOperators::collect() incomingNode="<<incomingNode<<std::endl;
|
||||
}
|
||||
|
||||
OSG_INFO<<"ActiveOperators::collect("<<incommingNode<<")"<<std::endl;
|
||||
OSG_INFO<<"ActiveOperators::collect("<<incomingNode<<")"<<std::endl;
|
||||
OSG_INFO<<" _previous.size()="<<_previous.size()<<std::endl;
|
||||
OSG_INFO<<" _current.size()="<<_current.size()<<std::endl;
|
||||
|
||||
_outgoing.clear();
|
||||
_incomming.clear();
|
||||
_incoming.clear();
|
||||
_maintained.clear();
|
||||
|
||||
for(OperatorList::iterator itr = _previous.begin();
|
||||
@@ -596,7 +596,7 @@ void ActiveOperators::collect(osg::Node* incommingNode, osg::NodeVisitor::Traver
|
||||
++itr)
|
||||
{
|
||||
ObjectOperator* curr = itr->get();
|
||||
if (_previous.count(curr)==0) _incomming.insert(curr);
|
||||
if (_previous.count(curr)==0) _incoming.insert(curr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ void ActiveOperators::process(SlideEventHandler* seh)
|
||||
{
|
||||
processOutgoing(seh);
|
||||
processMaintained(seh);
|
||||
processIncomming(seh);
|
||||
processIncoming(seh);
|
||||
}
|
||||
|
||||
void ActiveOperators::processOutgoing(SlideEventHandler* seh)
|
||||
@@ -661,11 +661,11 @@ void ActiveOperators::processMaintained(SlideEventHandler* seh)
|
||||
}
|
||||
}
|
||||
|
||||
void ActiveOperators::processIncomming(SlideEventHandler* seh)
|
||||
void ActiveOperators::processIncoming(SlideEventHandler* seh)
|
||||
{
|
||||
OSG_INFO<<" incomming.size()="<<_incomming.size()<<std::endl;
|
||||
for(OperatorList::iterator itr = _incomming.begin();
|
||||
itr != _incomming.end();
|
||||
OSG_INFO<<" incoming.size()="<<_incoming.size()<<std::endl;
|
||||
for(OperatorList::iterator itr = _incoming.begin();
|
||||
itr != _incoming.end();
|
||||
++itr)
|
||||
{
|
||||
(*itr)->enter(seh);
|
||||
|
||||
@@ -1603,7 +1603,7 @@ void ConvexPolyhedron::extrude( const osg::Vec3d & offset )
|
||||
double dotOffset0 = edgeFaces[0]->plane.getNormal() * offset;
|
||||
double dotOffset1 = edgeFaces[1]->plane.getNormal() * offset;
|
||||
#endif
|
||||
//Select orthogonal faces and vertices appropriate for offseting
|
||||
//Select orthogonal faces and vertices appropriate for offsetting
|
||||
if( (dotOffset0 == 0.0 && dotOffset1 < 0.0) ||
|
||||
(dotOffset1 == 0.0 && dotOffset0 < 0.0) )
|
||||
{
|
||||
|
||||
@@ -49,9 +49,9 @@ DebugShadowMap::DebugShadowMap():
|
||||
// Why this fancy 24 bit depth to 24 bit rainbow colors shader ?
|
||||
//
|
||||
// Depth values cannot be easily cast on color component because they are:
|
||||
// a) 24 or 32 bit and we loose lots of precision when cast on 8 bit
|
||||
// a) 24 or 32 bit and we lose lots of precision when cast on 8 bit
|
||||
// b) depth value distribution is non linear due to projection division
|
||||
// when cast on componenent color there is usually very minor shade variety
|
||||
// when cast on component color there is usually very minor shade variety
|
||||
// and its often difficult to notice that there is anything in the buffer
|
||||
//
|
||||
// Shader looks complex but it is used only for debug head-up rectangle
|
||||
|
||||
@@ -50,26 +50,26 @@ ShadowTechnique::~ShadowTechnique()
|
||||
|
||||
void ShadowTechnique::init()
|
||||
{
|
||||
OSG_NOTICE<<className()<<"::init() not implemened yet"<<std::endl;
|
||||
OSG_NOTICE<<className()<<"::init() not implemented yet"<<std::endl;
|
||||
|
||||
_dirty = false;
|
||||
}
|
||||
|
||||
void ShadowTechnique::update(osg::NodeVisitor& nv)
|
||||
{
|
||||
OSG_NOTICE<<className()<<"::update(osg::NodeVisitor&) not implemened yet."<<std::endl;
|
||||
OSG_NOTICE<<className()<<"::update(osg::NodeVisitor&) not implemented yet."<<std::endl;
|
||||
_shadowedScene->osg::Group::traverse(nv);
|
||||
}
|
||||
|
||||
void ShadowTechnique::cull(osgUtil::CullVisitor& cv)
|
||||
{
|
||||
OSG_NOTICE<<className()<<"::cull(osgUtl::CullVisitor&) not implemened yet."<<std::endl;
|
||||
OSG_NOTICE<<className()<<"::cull(osgUtl::CullVisitor&) not implemented yet."<<std::endl;
|
||||
_shadowedScene->osg::Group::traverse(cv);
|
||||
}
|
||||
|
||||
void ShadowTechnique::cleanSceneGraph()
|
||||
{
|
||||
OSG_NOTICE<<className()<<"::cleanSceneGraph()) not implemened yet."<<std::endl;
|
||||
OSG_NOTICE<<className()<<"::cleanSceneGraph()) not implemented yet."<<std::endl;
|
||||
}
|
||||
|
||||
void ShadowTechnique::traverse(osg::NodeVisitor& nv)
|
||||
|
||||
@@ -111,7 +111,7 @@ void ShadowVolume::init()
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_NOTICE<<"STENCIL_TWO_PASSES selecteted"<<std::endl;
|
||||
OSG_NOTICE<<"STENCIL_TWO_PASSES selected"<<std::endl;
|
||||
|
||||
osg::StateSet* ss_sv1 = geode->getOrCreateStateSet();
|
||||
ss_sv1->setRenderBinDetails(shadowVolumeBin, "RenderBin");
|
||||
@@ -351,6 +351,6 @@ void ShadowVolume::cull(osgUtil::CullVisitor& cv)
|
||||
|
||||
void ShadowVolume::cleanSceneGraph()
|
||||
{
|
||||
OSG_NOTICE<<className()<<"::cleanSceneGraph()) not implemened yet, but almost."<<std::endl;
|
||||
OSG_NOTICE<<className()<<"::cleanSceneGraph()) not implemented yet, but almost."<<std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -1164,7 +1164,7 @@ void ViewDependentShadowMap::createShaders()
|
||||
|
||||
unsigned int _baseTextureUnit = 0;
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_accessUnfiromsAndProgramMutex);
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_accessUniformsAndProgramMutex);
|
||||
|
||||
_shadowCastingStateSet = new osg::StateSet;
|
||||
|
||||
@@ -2346,7 +2346,7 @@ osg::StateSet* ViewDependentShadowMap::selectStateSetForRenderingShadow(ViewDepe
|
||||
|
||||
osg::ref_ptr<osg::StateSet> stateset = vdd.getStateSet();
|
||||
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_accessUnfiromsAndProgramMutex);
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_accessUniformsAndProgramMutex);
|
||||
|
||||
vdd.getStateSet()->clear();
|
||||
|
||||
|
||||
@@ -656,7 +656,7 @@ Cameras getActiveCameras(osg::View& view)
|
||||
|
||||
}
|
||||
|
||||
bool View::setUpDepthPartitionForCamera(osg::Camera* cameraToPartition, DepthPartitionSettings* incomming_dps)
|
||||
bool View::setUpDepthPartitionForCamera(osg::Camera* cameraToPartition, DepthPartitionSettings* incoming_dps)
|
||||
{
|
||||
osg::ref_ptr<osg::GraphicsContext> context = cameraToPartition->getGraphicsContext();
|
||||
if (!context) return false;
|
||||
@@ -664,7 +664,7 @@ bool View::setUpDepthPartitionForCamera(osg::Camera* cameraToPartition, DepthPar
|
||||
osg::ref_ptr<osg::Viewport> viewport = cameraToPartition->getViewport();
|
||||
if (!viewport) return false;
|
||||
|
||||
osg::ref_ptr<DepthPartitionSettings> dps = incomming_dps;
|
||||
osg::ref_ptr<DepthPartitionSettings> dps = incoming_dps;
|
||||
if (!dps) dps = new DepthPartitionSettings;
|
||||
|
||||
bool useMastersSceneData = true;
|
||||
|
||||
@@ -73,7 +73,7 @@ REGISTER_OBJECT_WRAPPER( osgManipulator_Dragger,
|
||||
osgManipulator::Dragger,
|
||||
"osg::Object osg::Node osg::Transform osg::MatrixTransform osgManipulator::Dragger" )
|
||||
{
|
||||
// Dragger should not record children seperately, so ignore the osg::Group class wrapper
|
||||
// Dragger should not record children separately, so ignore the osg::Group class wrapper
|
||||
|
||||
ADD_BOOL_SERIALIZER( HandleEvents, false ); // _handleEvents
|
||||
ADD_BOOL_SERIALIZER( DraggerActive, false ); // _draggerActive
|
||||
|
||||
Reference in New Issue
Block a user