Unverified Commit 9dad0b41 authored by OpenSceneGraph git repository's avatar OpenSceneGraph git repository Committed by GitHub
Browse files

Merge pull request #990 from aluaces/code-spell-3

Code comments, log strings and some variable spell fixes.
parents e0d5e4b0 d64ad2e6
......@@ -305,7 +305,7 @@ bool Receiver::init( void )
if (result)
{
OSG_NOTICE<<"Warning: Reciever::init() setsockopt(..) failed, errno="<<errno<<std::endl;
OSG_NOTICE<<"Warning: Receiver::init() setsockopt(..) failed, errno="<<errno<<std::endl;
return false;
}
......
......@@ -508,7 +508,7 @@ int main( int argc, char **argv )
viewer.addEventHandler( new osgViewer::WindowSizeHandler() );
// neeed to address.
// need to address.
// viewer.getScene()->getUpdateVisitor()->setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
......@@ -558,7 +558,7 @@ int main( int argc, char **argv )
while (arguments.read("--loop")) loopPresentation = true;
{
// set update hte default traversal mode settings for update visitor
// set update the default traversal mode settings for update visitor
// default to osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN.
osg::NodeVisitor::TraversalMode updateTraversalMode = osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN; // viewer.getUpdateVisitor()->getTraversalMode();
......@@ -690,7 +690,7 @@ int main( int argc, char **argv )
// any option left unread are converted into errors to write out later.
//arguments.reportRemainingOptionsAsUnrecognized();
// report any errors if they have ocured when parsing the program aguments.
// report any errors if they have ocured when parsing the program arguments.
if (arguments.errors())
{
arguments.writeErrorMessages(osg::notify(osg::INFO));
......
......@@ -312,7 +312,7 @@ int main( int argc, char **argv )
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(loadedModel.get());
if(!csn) return 1;
// Compute eye point in world coordiantes
// Compute eye point in world coordinates
osg::Vec3d eye;
csn->getEllipsoidModel()->convertLatLongHeightToXYZ(lat, lon, alt, eye.x(), eye.y(), eye.z());
......
......@@ -150,7 +150,7 @@ std::string fragShader =
"} \n"
;
///This class provides a basic wraper for a Uniform Buffer Object
///This class provides a basic wrapper for a Uniform Buffer Object
///or UBO, and provides the storage for the texture handles
class BindlessBuffer: public osg::Referenced{
public:
......
......@@ -184,7 +184,7 @@ int main( int argc, char **argv )
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);
// set the osgDB::Registy read file callback to catch all requests for reading files.
// set the osgDB::Registry read file callback to catch all requests for reading files.
osgDB::Registry::instance()->setReadFileCallback(new MyReadFileCallback());
// initialize the viewer.
......
......@@ -211,7 +211,7 @@ int main( int argc, char **argv )
// ------------- Start of copy specific code -------------------------------------------------------
// do a deep copy, using MyCopyOp to reveal whats going on under the hood,
// do a deep copy, using MyCopyOp to reveal what's going on under the hood,
// in your own code you'd typically just use the basic osg::CopyOp something like
osg::ref_ptr<osg::Node> mycopy = dynamic_cast<osg::Node*>(rootnode->clone(osg::CopyOp::DEEP_COPY_ALL));
std::cout << "Doing a deep copy of scene graph"<<std::endl;
......
......@@ -77,7 +77,7 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->addCommandLineOption("-o <filename>","Base output filename of the images, recommended to use something like Images/image.png");
arguments.getApplicationUsage()->addCommandLineOption("--cs <filename>","Load pre-generated configuration file for run.");
arguments.getApplicationUsage()->addCommandLineOption("--ouput-cs <filename>","Output configuration file with settings provided on commandline.");
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Use specificied camera path file to control camera position.");
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Use specified camera path file to control camera position.");
arguments.getApplicationUsage()->addCommandLineOption("--offscreen","Use an pbuffer to render the images offscreen.");
arguments.getApplicationUsage()->addCommandLineOption("--screen","Use an window to render the images.");
arguments.getApplicationUsage()->addCommandLineOption("--width <width>","Window/output image width.");
......
......@@ -148,7 +148,7 @@ osg::Node* createScene()
// create a Vec3Array and add to it all my coordinates.
// Like all the *Array variants (see include/osg/Array) , Vec3Array is derived from both osg::Array
// and std::vector<>. osg::Array's are reference counted and hence sharable,
// and std::vector<>. osg::Array's are reference counted and hence shareable,
// which std::vector<> provides all the convenience, flexibility and robustness
// of the most popular of all STL containers.
osg::Vec3Array* vertices = new osg::Vec3Array;
......
......@@ -64,7 +64,7 @@ void KeyboardModel::keyChange(int key, int virtualKey, int value)
{
osg::notify(osg::INFO) << "key value change, code="<<std::hex << key << "\t value="<< value << std::dec << std::endl;
// toggle the keys graphical representation on or off via osg::Swithc
// toggle the keys graphical representation on or off via osg::Switch
KeyModelMap::iterator itr = _keyModelMap.find(virtualKey);
if (itr!=_keyModelMap.end())
{
......
......@@ -167,7 +167,7 @@ public:
{
osg::notify(osg::NOTICE)<<"Using window coordinates for picking"<<std::endl;
} else {
osg::notify(osg::NOTICE)<<"Using projection coordiates for picking"<<std::endl;
osg::notify(osg::NOTICE)<<"Using projection coordinates for picking"<<std::endl;
}
}
else if (ea.getKey()=='a')
......@@ -401,7 +401,7 @@ public:
if (cmtsv._group->getNumChildren()>0)
{
std::cout<<"Writing selected compoents to 'selected_model.osgt'"<<std::endl;
std::cout<<"Writing selected components to 'selected_model.osgt'"<<std::endl;
osgDB::writeNodeFile(*cmtsv._group, "selected_model.osgt");
}
}
......
......@@ -175,7 +175,7 @@ int main( int argc, char** argv )
// A floating error of delta-time should be explained here:
// The particles emitter, program and updater all use a 'dt' to compute the time value in every frame.
// Because the 'dt' is a double value, it is not suitable to keep three copies of it separately, which
// is the previous implementation. The small error makes some opeartors unable to work correctly, e.g.
// is the previous implementation. The small error makes some operators unable to work correctly, e.g.
// the BounceOperator.
// Now we make use of the getDeltaTime() of ParticleSystem to maintain and dispatch the delta time. But..
// it is not the best solution so far, since there are still very few particles acting unexpectedly.
......
......@@ -98,7 +98,7 @@ int main( int, char** )
vAry->push_back( osg::Vec4(1,0,1,1) );
osg::ref_ptr<osg::VertexBufferObject> vbo = new osg::VertexBufferObject;
vbo->setDataVariance(osg::Object::STATIC);
vbo->setUsage(GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT ); // enable persistant bufferStorage
vbo->setUsage(GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT ); // enable persistent bufferStorage
vbo->setMappingBitfield(GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT| GL_MAP_FLUSH_EXPLICIT_BIT );// set mapping flags
vAry->setBufferObject(vbo);
......
......@@ -76,7 +76,7 @@ void computeViewMatrixOnEarth( osg::Camera* camera, osg::Node* scene,
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(scene);
if ( !csn ) return;
// Compute eye point in world coordiantes
// Compute eye point in world coordinates
osg::Vec3d eye;
csn->getEllipsoidModel()->convertLatLongHeightToXYZ(
latLongHeight.x(), latLongHeight.y(), latLongHeight.z(), eye.x(), eye.y(), eye.z() );
......
......@@ -39,7 +39,7 @@
//
// A simple demo demonstrating planar reflections using multiple renderings
// of a subgraph, overriding of state attribures and use of the stencil buffer.
// of a subgraph, overriding of state attributes and use of the stencil buffer.
//
// The multipass system implemented here is a variation of Mark Kilgard's
// paper "Improving Shadows and Reflections via the Stencil Buffer" which
......
......@@ -99,19 +99,19 @@ class WindowCaptureCallback : public osg::Camera::DrawCallback
switch(_mode)
{
case(READ_PIXELS):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with out PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with out PixelBufferObject."<<std::endl;
break;
case(SINGLE_PBO):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a single PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with a single PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
break;
case(DOUBLE_PBO):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
break;
case(TRIPLE_PBO):
osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
osg::notify(osg::NOTICE)<<"Reading window using glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
......
......@@ -69,7 +69,7 @@ osg::Node* createTextGroup(const char** text)
// loop through all children
seq->setInterval(osg::Sequence::LOOP, 0,-1);
// real-time playback, repeat indefinitively
// real-time playback, repeat indefinitely
seq->setDuration(1.0f, -1);
// must be started explicitly
......@@ -157,7 +157,7 @@ osg::Sequence* createSequence(osg::ArgumentParser& arguments)
// loop through all children
seq->setInterval(osg::Sequence::LOOP, 0,-1);
// real-time playback, repeat indefinitively
// real-time playback, repeat indefinitely
seq->setDuration(1.0f, -1);
seq->setMode(osg::Sequence::START);
......@@ -244,7 +244,7 @@ int main( int argc, char **argv )
"- is subclassed from osg::Switch",
"- assigns a display duration to each child",
"- can loop or swing through an interval of it's children",
"- can repeat the interval a number of times or indefinitively",
"- can repeat the interval a number of times or indefinitely",
"- press 's' to start/pause/resume",
"- press 'l' to toggle loop/swing mode",
NULL
......
......@@ -99,7 +99,7 @@ osg::Node* createOldShaderCompositionScene(osg::ArgumentParser& arguments)
group->addChild(pat);
}
// resuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
// reuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
{
osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform;
pat->setPosition(position);
......@@ -119,7 +119,7 @@ osg::Node* createOldShaderCompositionScene(osg::ArgumentParser& arguments)
}
// resuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
// reuse the first ShaderAttribute's type and ShaderComponent, just use new uniform
{
osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform;
pat->setPosition(position);
......
......@@ -314,7 +314,7 @@ int main(int, char **)
osg::ref_ptr<TestSupportOperation> testSupportOperation = new TestSupportOperation;
#if 0
// temporily commenting out as its causing the viewer to crash... no clue yet to why
// temporarily commenting out as its causing the viewer to crash... no clue yet to why
viewer.setRealizeOperation(testSupportOperation.get());
#endif
// create the windows and run the threads.
......
......@@ -470,7 +470,7 @@ osg::Geometry *makePols (void) {
gtess->setStateSet( stateset );
int nstart=0;
// the contours accepoted are polygons; quads & tris. Trifans can bve added later.
// the contours accepted are polygons; quads & tris. Trifans can be added later.
gtess->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,nstart,12));nstart+=12;
gtess->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,nstart,12));nstart+=12;
gtess->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON,nstart,16));nstart+=16;
......
/* A demonstration of Tessellation Shaders in OpenScenegraph.
*
* Instructions:
* Press plus to increase tesselation and minus to decrease it.
* Press right arrow to increase inner tesselation and left arrow to decrease it.
* Press up arrow to increase outer tesselation and down arrow to decrease it.
* Press plus to increase tessellation and minus to decrease it.
* Press right arrow to increase inner tessellation and left arrow to decrease it.
* Press up arrow to increase outer tessellation and down arrow to decrease it.
*
* Original code by Philip Rideout
* Adapted to OpenScenegraph by John Kaniarz
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment