Code comments, log strings and some variable spell fixes.
This commit is contained in:
committed by
Robert Osfield
parent
300ba7aa02
commit
2ade061ced
@@ -229,7 +229,7 @@ private:
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Print information related to thread schduling parameters.
|
||||
// Print information related to thread scheduling parameters.
|
||||
//
|
||||
static void PrintThreadSchedulingInfo(Thread *thread) {
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ int Condition::wait(Mutex *mutex, unsigned long int ms) {
|
||||
static_cast<PThreadMutexPrivateData *>(mutex->_prvData);
|
||||
|
||||
|
||||
// wait time is now in ms milliseconds, so need to convert to seconds and nanoseconds for timespec strucuture.
|
||||
// wait time is now in ms milliseconds, so need to convert to seconds and nanoseconds for timespec structure.
|
||||
unsigned int sec = ms / 1000;
|
||||
unsigned int nsec = (ms % 1000) * 1000000;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace OpenThreads {
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Print information related to thread schduling parameters.
|
||||
// Print information related to thread scheduling parameters.
|
||||
//
|
||||
static void PrintThreadSchedulingInfo(Thread *thread) {
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ void ApplicationUsage::getFormattedString(std::string& str, const UsageMap& um,u
|
||||
std::string::size_type slashn_pos = explanation.find('\n',pos);
|
||||
|
||||
unsigned int extraSkip = 0;
|
||||
bool concatinated = false;
|
||||
bool concatenated = false;
|
||||
if (slashn_pos!=std::string::npos)
|
||||
{
|
||||
if (slashn_pos<pos+width)
|
||||
@@ -227,13 +227,13 @@ void ApplicationUsage::getFormattedString(std::string& str, const UsageMap& um,u
|
||||
// word must be longer than a whole line so will need
|
||||
// to concatenate it.
|
||||
width = explanationWidth-1;
|
||||
concatinated = true;
|
||||
concatenated = true;
|
||||
}
|
||||
}
|
||||
|
||||
line.replace(explanationPos+offset,explanationWidth, explanation, pos, width);
|
||||
|
||||
if (concatinated) { str += line; str += "-\n"; }
|
||||
if (concatenated) { str += line; str += "-\n"; }
|
||||
else { str += line; str += "\n"; }
|
||||
|
||||
// move to the next line of output.
|
||||
|
||||
@@ -815,7 +815,7 @@ void GLBufferObjectSet::remove(GLBufferObject* to)
|
||||
}
|
||||
else
|
||||
{
|
||||
// 'to' was tail so assing tail to the previous in list
|
||||
// 'to' was tail so assign tail to the previous in list
|
||||
_tail = to->_previous;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ bool Group::removeChildren(unsigned int pos,unsigned int numChildrenToRemove)
|
||||
if (endOfRemoveRange>_children.size())
|
||||
{
|
||||
OSG_DEBUG<<"Warning: Group::removeChild(i,numChildrenToRemove) has been passed an excessive number"<<std::endl;
|
||||
OSG_DEBUG<<" of chilren to remove, trimming just to end of child list."<<std::endl;
|
||||
OSG_DEBUG<<" of children to remove, trimming just to end of child list."<<std::endl;
|
||||
endOfRemoveRange=_children.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -749,7 +749,7 @@ unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type)
|
||||
// which raises the question of how to actually query for these sizes...
|
||||
// will need to revisit this issue, for now just report an error.
|
||||
// this is possible a bit of mute point though as since the ARB compressed formats
|
||||
// aren't yet used for storing images to disk, so its likely that users wont have
|
||||
// aren't yet used for storing images to disk, so its likely that users won't have
|
||||
// osg::Image's for pixel formats set the ARB compressed formats, just using these
|
||||
// compressed formats as internal texture modes. This is very much speculation though
|
||||
// if get the below error then its time to revist this issue :-)
|
||||
|
||||
@@ -78,7 +78,7 @@ void DrawElementsIndirectUInt::draw(State& state, bool /*useVertexBufferObjects*
|
||||
|
||||
state.get<GLExtensions>()-> glDrawElementsIndirect(mode, GL_UNSIGNED_INT,
|
||||
(const GLvoid *)(dibo->getOffset(_indirectCommandArray->getBufferIndex()) //command array address
|
||||
+_firstCommand* _indirectCommandArray->getElementSize())// runtime offset computaion can be sizeof(*_indirectCommandArray->begin())
|
||||
+_firstCommand* _indirectCommandArray->getElementSize())// runtime offset computation can be sizeof(*_indirectCommandArray->begin())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -780,7 +780,7 @@ void Shader::_parseShaderDefines(const std::string& str, ShaderDefines& defines)
|
||||
std::string::size_type start_of_parameter = 0;
|
||||
do
|
||||
{
|
||||
// skip spaces, tabs, commans
|
||||
// skip spaces, tabs, commands
|
||||
start_of_parameter = find_first(str, NoneOf(" \t,"), start_of_parameter);
|
||||
if (start_of_parameter==std::string::npos) break;
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ osg::Program* ShaderComposer::getOrCreateProgram(const ShaderComponents& shaderC
|
||||
computeShaders.push_back(shader);
|
||||
break;
|
||||
case(Shader::UNDEFINED):
|
||||
OSG_WARN<<"Warning: ShaderCompose::getOrCreateProgam(ShaderComponts) encounterd invalid Shader::Type."<<std::endl;
|
||||
OSG_WARN<<"Warning: ShaderCompose::getOrCreateProgam(ShaderComponts) encountered invalid Shader::Type."<<std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ State::State():
|
||||
_shaderComposer = new ShaderComposer;
|
||||
_currentShaderCompositionProgram = 0L;
|
||||
|
||||
_drawBuffer = GL_INVALID_ENUM; // avoid the lazy state mechanism from ignoreing the first call to State::glDrawBuffer() to make sure it's always passed to OpenGL
|
||||
_readBuffer = GL_INVALID_ENUM; // avoid the lazy state mechanism from ignoreing the first call to State::glReadBuffer() to make sure it's always passed to OpenGL
|
||||
_drawBuffer = GL_INVALID_ENUM; // avoid the lazy state mechanism from ignoring the first call to State::glDrawBuffer() to make sure it's always passed to OpenGL
|
||||
_readBuffer = GL_INVALID_ENUM; // avoid the lazy state mechanism from ignoring the first call to State::glReadBuffer() to make sure it's always passed to OpenGL
|
||||
|
||||
_identity = new osg::RefMatrix(); // default RefMatrix constructs to identity.
|
||||
_initialViewMatrix = _identity;
|
||||
@@ -811,7 +811,7 @@ void State::applyShaderComposition()
|
||||
{
|
||||
// if (isNotifyEnabled(osg::INFO)) print(notify(osg::INFO));
|
||||
|
||||
// build lits of current ShaderComponents
|
||||
// build list of current ShaderComponents
|
||||
ShaderComponents shaderComponents;
|
||||
|
||||
// OSG_NOTICE<<"State::applyShaderComposition() : _attributeMap.size()=="<<_attributeMap.size()<<std::endl;
|
||||
|
||||
@@ -921,7 +921,7 @@ void TextureObjectSet::remove(Texture::TextureObject* to)
|
||||
}
|
||||
else
|
||||
{
|
||||
// 'to' was tail so assing tail to the previous in list
|
||||
// 'to' was tail so assign tail to the previous in list
|
||||
_tail = to->_previous;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ void Texture1D::apply(State& state) const
|
||||
|
||||
textureObject->setAllocated(_numMipmapLevels,_internalFormat,_textureWidth,1,1,0);
|
||||
|
||||
// in theory the following line is redundent, but in practice
|
||||
// in theory the following line is redundant, but in practice
|
||||
// have found that the first frame drawn doesn't apply the textures
|
||||
// unless a second bind is called?!!
|
||||
// perhaps it is the first glBind which is not required...
|
||||
|
||||
@@ -233,7 +233,7 @@ void Texture2D::apply(State& state) const
|
||||
|
||||
textureObject->setAllocated(_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,_borderWidth);
|
||||
|
||||
// in theory the following line is redundent, but in practice
|
||||
// in theory the following line is redundant, but in practice
|
||||
// have found that the first frame drawn doesn't apply the textures
|
||||
// unless a second bind is called?!!
|
||||
// perhaps it is the first glBind which is not required...
|
||||
@@ -288,7 +288,7 @@ void Texture2D::apply(State& state) const
|
||||
non_const_this->_image = NULL;
|
||||
}
|
||||
|
||||
// in theory the following line is redundent, but in practice
|
||||
// in theory the following line is redundant, but in practice
|
||||
// have found that the first frame drawn doesn't apply the textures
|
||||
// unless a second bind is called?!!
|
||||
// perhaps it is the first glBind which is not required...
|
||||
|
||||
@@ -276,7 +276,7 @@ void Texture3D::apply(State& state) const
|
||||
|
||||
textureObject->setAllocated(_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,_textureDepth,0);
|
||||
|
||||
// in theory the following line is redundent, but in practice
|
||||
// in theory the following line is redundant, but in practice
|
||||
// have found that the first frame drawn doesn't apply the textures
|
||||
// unless a second bind is called?!!
|
||||
// perhaps it is the first glBind which is not required...
|
||||
|
||||
@@ -271,7 +271,7 @@ void TextureCubeMap::apply(State& state) const
|
||||
|
||||
_subloadCallback->load(*this,state);
|
||||
|
||||
// in theory the following line is redundent, but in practice
|
||||
// in theory the following line is redundant, but in practice
|
||||
// have found that the first frame drawn doesn't apply the textures
|
||||
// unless a second bind is called?!!
|
||||
// perhaps it is the first glBind which is not required...
|
||||
|
||||
@@ -275,16 +275,16 @@ bool osgDB::setCurrentWorkingDirectory( const std::string &newCurrentWorkingDire
|
||||
void osgDB::convertStringPathIntoFilePathList(const std::string& paths,FilePathList& filepath)
|
||||
{
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
char delimitor = ';';
|
||||
char delimiter = ';';
|
||||
#else
|
||||
char delimitor = ':';
|
||||
char delimiter = ':';
|
||||
#endif
|
||||
|
||||
if (!paths.empty())
|
||||
{
|
||||
std::string::size_type start = 0;
|
||||
std::string::size_type end;
|
||||
while ((end = paths.find_first_of(delimitor,start))!=std::string::npos)
|
||||
while ((end = paths.find_first_of(delimiter,start))!=std::string::npos)
|
||||
{
|
||||
filepath.push_back(std::string(paths,start,end-start));
|
||||
start = end+1;
|
||||
@@ -988,7 +988,7 @@ bool osgDB::containsCurrentWorkingDirectoryReference(const FilePathList& paths)
|
||||
// The Carbon version is noticeably longer.
|
||||
// Unfortunately, the Cocoa version requires -lobjc to be
|
||||
// linked in when creating an executable.
|
||||
// Rumor is that this will be done autmatically in gcc 3.5/Tiger,
|
||||
// Rumor is that this will be done automatically in gcc 3.5/Tiger,
|
||||
// but for now, this will cause a lot of headaches for people
|
||||
// who aren't familiar with this concept, so the Carbon version
|
||||
// is preferable.
|
||||
|
||||
@@ -576,7 +576,7 @@ void OutputStream::writeImage( const osg::Image* img )
|
||||
std::string encodedData;
|
||||
e.encode((char*)img_itr.data(), img_itr.size(), encodedData);
|
||||
// Each set of data is written into a separate string so we can
|
||||
// distiguish between main data and all mipmap levels, so writing
|
||||
// distinguish between main data and all mipmap levels, so writing
|
||||
// mipmap size is not required for ASCII mode.
|
||||
writeWrappedString(encodedData);
|
||||
}
|
||||
@@ -781,7 +781,7 @@ void OutputStream::start( OutputIterator* outIterator, OutputStream::WriteType t
|
||||
}
|
||||
|
||||
// From SOVERSION 98, start to support binary begin/end brackets so we can easily ignore
|
||||
// errors and unsupport classes, enabling the attribute bit
|
||||
// errors and unsupported classes, enabling the attribute bit
|
||||
if ( _useRobustBinaryFormat )
|
||||
{
|
||||
outIterator->setSupportBinaryBrackets( true );
|
||||
|
||||
@@ -434,7 +434,7 @@ Registry::Registry()
|
||||
addFileExtensionAlias("fnt", "freetype"); // Windows bitmap fonts
|
||||
addFileExtensionAlias("text3d", "freetype"); // use 3D Font instead of 2D Font
|
||||
|
||||
// wont't add type1 and type2 until resolve extension collision with Performer binary and ascii files.
|
||||
// won't add type1 and type2 until resolve extension collision with Performer binary and ascii files.
|
||||
// addFileExtensionAlias("pfb", "freetype"); // type1 binary
|
||||
// addFileExtensionAlias("pfa", "freetype"); // type2 ascii
|
||||
|
||||
|
||||
@@ -49,14 +49,14 @@ void WriterCompareTriangle::cutscene(int nbVertices, const osg::BoundingBox & sc
|
||||
int nbVerticesY = static_cast<int>( (nbVertices * k) / (length.z() * length.x()) );
|
||||
int nbVerticesZ = static_cast<int>( (nbVertices * k) / (length.x() * length.y()) );
|
||||
|
||||
setMaxMin (nbVerticesX, nbVerticesY, nbVerticesZ); // This function prevent from cutting the scene in too many blocs
|
||||
setMaxMin (nbVerticesX, nbVerticesY, nbVerticesZ); // This function prevent from cutting the scene in too many blocks
|
||||
|
||||
OSG_INFO
|
||||
<< "Cutting x by " << nbVerticesX << std::endl
|
||||
<< "Cutting y by " << nbVerticesY << std::endl
|
||||
<< "Cutting z by " << nbVerticesZ << std::endl;
|
||||
|
||||
osg::BoundingBox::value_type blocX = length.x() / nbVerticesX; // These 3 lines set the size of a bloc in x, y and z
|
||||
osg::BoundingBox::value_type blocX = length.x() / nbVerticesX; // These 3 lines set the size of a block in x, y and z
|
||||
osg::BoundingBox::value_type blocY = length.y() / nbVerticesY;
|
||||
osg::BoundingBox::value_type blocZ = length.z() / nbVerticesZ;
|
||||
|
||||
@@ -95,7 +95,7 @@ void WriterCompareTriangle::cutscene(int nbVertices, const osg::BoundingBox & sc
|
||||
if (z == nbVerticesZ - 1) //to prevent from mesh with no case
|
||||
zMax += 10;
|
||||
|
||||
boxList.push_back(osg::BoundingBox(xMin, // Add a bloc to the list
|
||||
boxList.push_back(osg::BoundingBox(xMin, // Add a block to the list
|
||||
yMin,
|
||||
zMin,
|
||||
xMax,
|
||||
@@ -129,7 +129,7 @@ WriterCompareTriangle::inWhichBox(const osg::BoundingBox::value_type x,
|
||||
return i;
|
||||
}
|
||||
}
|
||||
assert(false && "Point is not in any blocs");
|
||||
assert(false && "Point is not in any blocks");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ osgDB::ReaderWriter::WriteResult ReaderWritterOpenCASCADE::writeNode(const osg::
|
||||
/// \detail http://www.opencascade.org/org/forum/thread_12716/?forum=3
|
||||
/// Usually IGES files suffer from precision problems (when transferring from
|
||||
/// one CAD system to another).It might be the case that faces are not sewed
|
||||
/// properly, or do not have the right precision, and so the tesselator does
|
||||
/// properly, or do not have the right precision, and so the tessellator does
|
||||
/// not treat them like "sewed". this needs to be done for sewing
|
||||
/// \param shape opencascade shape to be healed
|
||||
void ReaderWritterOpenCASCADE::OCCTKReader::_healShape(TopoDS_Shape& shape)
|
||||
@@ -386,7 +386,7 @@ void ReaderWritterOpenCASCADE::OCCTKReader::_traverse(const TDF_Label &shapeTree
|
||||
}
|
||||
|
||||
/// if referred shape has children traverse them first else
|
||||
/// travese the shape itself
|
||||
/// traverse the shape itself
|
||||
if(referredShape.HasChild())
|
||||
{
|
||||
TDF_ChildIterator it;
|
||||
|
||||
@@ -150,7 +150,7 @@ ExportOptions::parseOptionsString()
|
||||
else
|
||||
pos += (count+1);
|
||||
|
||||
// See if it's a Boolen/toggle
|
||||
// See if it's a Boolean/toggle
|
||||
if ( token == _validateOption )
|
||||
{
|
||||
OSG_INFO << "fltexp: Found: " << token << std::endl;
|
||||
|
||||
@@ -87,7 +87,7 @@ class ReaderWriterQTKit : public osgDB::ReaderWriter
|
||||
if (ext=="QTKit")
|
||||
{
|
||||
fileName = osgDB::getNameLessExtension(fileName);
|
||||
OSG_INFO<<"ReaderWriterQTKit stipped filename = "<<fileName<<std::endl;
|
||||
OSG_INFO<<"ReaderWriterQTKit stripped filename = "<<fileName<<std::endl;
|
||||
}
|
||||
if (!osgDB::containsServerAddress(fileName))
|
||||
{
|
||||
|
||||
@@ -110,7 +110,7 @@ class ReaderWriterRestHttp : public osgDB::ReaderWriter
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
OSG_WARN << "ReaderWriterRestHttpDevice : could not create http-server, unknown excpetion thrown " << std::endl;
|
||||
OSG_WARN << "ReaderWriterRestHttpDevice : could not create http-server, unknown exception thrown " << std::endl;
|
||||
return ReadResult::ERROR_IN_READING_FILE;
|
||||
}
|
||||
|
||||
|
||||
@@ -715,7 +715,7 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset)
|
||||
int iNumMaterials = 0;
|
||||
const osg::StateSet::RefAttributePair* pRAP=NULL;
|
||||
// Let ac3d optimise the file
|
||||
// whiz round and get a list of materails
|
||||
// whiz round and get a list of materials
|
||||
// write them out
|
||||
// write out an object for each drawable.
|
||||
// Write out world object
|
||||
@@ -764,7 +764,7 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset)
|
||||
fout << "OBJECT poly" << std::endl;
|
||||
fout << "name \"" << getName() << "\"" << std::endl;
|
||||
|
||||
// Use zero offset co-ordinate as location IS OPTIONAL
|
||||
// Use zero offset coordinate as location IS OPTIONAL
|
||||
// fout << "loc " << "0 0 0" << std::endl;
|
||||
/* you could have an offset for the coordinates; it was suggested that the first coord would do.
|
||||
if((*pVertexArray).getType()==osg::Array::Vec3ArrayType) {
|
||||
|
||||
@@ -1355,7 +1355,7 @@ readObject(std::istream& stream, FileData& fileData, const osg::Matrix& parentTr
|
||||
return group.release();
|
||||
}
|
||||
|
||||
// Read the texture corrdinates
|
||||
// Read the texture coordinates
|
||||
osg::Vec2 texCoord;
|
||||
stream >> texCoord[0] >> texCoord[1];
|
||||
if (!stream) {
|
||||
|
||||
@@ -52,7 +52,7 @@ class ReaderWriterAVFoundation : public osgDB::ReaderWriter
|
||||
if (ext=="avfoundation")
|
||||
{
|
||||
fileName = osgDB::getNameLessExtension(fileName);
|
||||
OSG_INFO<<"AVFoundation stipped filename = "<<fileName<<std::endl;
|
||||
OSG_INFO<<"AVFoundation stripped filename = "<<fileName<<std::endl;
|
||||
}
|
||||
if (!osgDB::containsServerAddress(fileName))
|
||||
{
|
||||
|
||||
@@ -769,7 +769,7 @@ struct VertexIndices
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Templated getter for memebers, used for createGeometryArray()
|
||||
/// Templated getter for members, used for createGeometryArray()
|
||||
enum ValueType { POSITION, COLOR, NORMAL, TEXCOORD };
|
||||
template <int Value>
|
||||
inline int get() const;
|
||||
|
||||
@@ -768,7 +768,7 @@ bool daeReader::GetFloat4Param(xsNCName Reference, domFloat4 &f4) const
|
||||
size_t NumberOfSetParams = SetParamArray.getCount();
|
||||
for (size_t i = 0; i < NumberOfSetParams; i++)
|
||||
{
|
||||
// Just do a simple comaprison of the ref strings for the time being
|
||||
// Just do a simple comparison of the ref strings for the time being
|
||||
if (0 == strcmp(SetParamArray[i]->getRef(), Reference))
|
||||
{
|
||||
if (NULL != SetParamArray[i]->getFx_basic_type_common() && (NULL != SetParamArray[i]->getFx_basic_type_common()->getFloat4()))
|
||||
@@ -815,7 +815,7 @@ bool daeReader::GetFloatParam(xsNCName Reference, domFloat &f) const
|
||||
size_t NumberOfSetParams = SetParamArray.getCount();
|
||||
for (size_t i = 0; i < NumberOfSetParams; i++)
|
||||
{
|
||||
// Just do a simple comaprison of the ref strings for the time being
|
||||
// Just do a simple comparison of the ref strings for the time being
|
||||
if (0 == strcmp(SetParamArray[i]->getRef(), Reference))
|
||||
{
|
||||
if (NULL != SetParamArray[i]->getFx_basic_type_common() && (NULL != SetParamArray[i]->getFx_basic_type_common()->getFloat()))
|
||||
|
||||
@@ -112,7 +112,7 @@ void daeWriter::processMaterial( osg::StateSet *ss, domBind_material *pDomBindMa
|
||||
std::string fileURI;
|
||||
if (_pluginOptions.linkOrignialTextures)
|
||||
{
|
||||
// We link to orignial images (not the ones in memory).
|
||||
// We link to original images (not the ones in memory).
|
||||
fileURI = osgDB::findDataFile(osgimg->getFileName());
|
||||
if (fileURI=="" && _pluginOptions.forceTexture)
|
||||
{
|
||||
|
||||
@@ -129,7 +129,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
|
||||
|
||||
if ((*itr)[0]=='.')
|
||||
{
|
||||
info()<<"Ignoring tempory file "<<*itr<<std::endl;
|
||||
info()<<"Ignoring temporary file "<<*itr<<std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -837,11 +837,11 @@ struct ListDeviceAvailable
|
||||
_listDevice[i]._device->Release();
|
||||
}
|
||||
|
||||
void displayDevicesFound(const std::string& prefixForMessage, osg::NotifySeverity serverity = osg::NOTICE) const
|
||||
void displayDevicesFound(const std::string& prefixForMessage, osg::NotifySeverity severity = osg::NOTICE) const
|
||||
{
|
||||
for (int i = 0; i < (int)_listDevice.size(); i++)
|
||||
{
|
||||
OSG_NOTIFY(serverity) << prefixForMessage << " device \"" << _listDevice[i]._name << "\" clsid " << _listDevice[i]._clsid << std::endl;
|
||||
OSG_NOTIFY(severity) << prefixForMessage << " device \"" << _listDevice[i]._name << "\" clsid " << _listDevice[i]._clsid << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
supportsOption("UTF8", "Assuming UTF8 encoding of dxf text");
|
||||
supportsOption("UTF16", "Assuming UTF16 encoding of dxf text");
|
||||
supportsOption("UTF32", "Assuming UTF32 encoding of dxf text");
|
||||
supportsOption("SIGNATURE", "Detrmine encoding of dxf text from it's signative");
|
||||
supportsOption("WideChar | CurrentCodePage", "Detrmine encoding of dxf text using CurrentCodePage (Windows only.)");
|
||||
supportsOption("SIGNATURE", "Determine encoding of dxf text from it's signative");
|
||||
supportsOption("WideChar | CurrentCodePage", "Determine encoding of dxf text using CurrentCodePage (Windows only.)");
|
||||
supportsOption("FontFile=<fontfile>", "Set the font file for dxf text");
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ void AnimationCleanerVisitor::cleanInvalidMorphGeometries() {
|
||||
|
||||
void AnimationCleanerVisitor::cleanInvalidRigGeometries() {
|
||||
// Replace rig geometries by static geometries if:
|
||||
// * empty or inexistant vertex influence map
|
||||
// * empty or inexistent vertex influence map
|
||||
// * no *strictly* positive influence coefficient
|
||||
for(RigGeometryList::iterator iterator = _rigGeometries.begin() ; iterator != _rigGeometries.end() ; ) {
|
||||
osg::ref_ptr<osgAnimation::RigGeometry> rigGeometry = *iterator;
|
||||
|
||||
@@ -24,7 +24,7 @@ void TangentSpaceVisitor::process(osg::Geometry& geometry) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
OSG_WARN << "Anomaly: [TangentSpaceVisitor] Missing tangent array at specificied index." << std::endl;
|
||||
OSG_WARN << "Anomaly: [TangentSpaceVisitor] Missing tangent array at specified index." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
developed by Greg Ward. It handles the conversions between rgbe and
|
||||
pixels consisting of floats. The data is assumed to be an array of floats.
|
||||
By default there are three floats per pixel in the order red, green, blue.
|
||||
(RGBE_DATA_??? values control this.) Only the mimimal header reading and
|
||||
(RGBE_DATA_??? values control this.) Only the minimal header reading and
|
||||
writing is implemented. Each routine does error checking and will return
|
||||
a status value as defined below. This code is intended as a skeleton so
|
||||
feel free to modify it to suit your needs.
|
||||
|
||||
@@ -53,7 +53,7 @@ void VolumeTransferFunctionProperty::write(DataOutputStream* out)
|
||||
// write out the num of colours
|
||||
out->writeUInt(numColours);
|
||||
|
||||
// write out the colour map entires
|
||||
// write out the colour map entries
|
||||
for(osg::TransferFunction1D::ColorMap::const_iterator itr = colourMap.begin();
|
||||
itr != colourMap.end();
|
||||
++itr)
|
||||
|
||||
@@ -140,7 +140,7 @@ int EXIF_Orientation (j_decompress_ptr cinfo)
|
||||
a pointer to the actual value, are packed into these 12 byte entries. */
|
||||
if ((i + tags * 12) > exif_marker->data_length)
|
||||
{
|
||||
OSG_INFO<<"Not enough length for requied tags"<<std::endl;
|
||||
OSG_INFO<<"Not enough length for required tags"<<std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class ReaderWriterLAS : public osgDB::ReaderWriter
|
||||
supportsExtension("las", "LAS point cloud format");
|
||||
supportsExtension("laz", "compressed LAS point cloud format");
|
||||
supportsOption("v", "Verbose output");
|
||||
supportsOption("noScale", "don't scale vertices according to las haeder - put schale in matixTransform");
|
||||
supportsOption("noScale", "don't scale vertices according to las header - put scale in matrixTransform");
|
||||
supportsOption("noReCenter", "don't transform vertex coords to re-center the pointcloud");
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
{
|
||||
supportsExtension("obj","Alias Wavefront OBJ format");
|
||||
supportsOption("noRotation","Do not do the default rotate about X axis");
|
||||
supportsOption("noTesselateLargePolygons","Do not do the default tesselation of large polygons");
|
||||
supportsOption("noTesselateLargePolygons","Do not do the default tessellation of large polygons");
|
||||
supportsOption("noTriStripPolygons","Do not do the default tri stripping of polygons");
|
||||
supportsOption("generateFacetNormals","generate facet normals for vertices without normals");
|
||||
supportsOption("noReverseFaces","avoid to reverse faces when normals and triangles orientation are reversed");
|
||||
|
||||
@@ -351,7 +351,7 @@ bool OSGA_Archive::open(const std::string& filename, ArchiveStatus status, unsig
|
||||
_input.seekg( 0, std::ios_base::end );
|
||||
file_size = ARCHIVE_POS( _input.tellg() );
|
||||
if( _input.is_open() && file_size <= 0 )
|
||||
{ // compute end of file postition manually ...
|
||||
{ // compute end of file position manually ...
|
||||
// seekp( 0, ios::end ), tellp( ) fails in 32 bit windows with files > 4 GiB
|
||||
size_t BlockHeaderSize =
|
||||
sizeof( unsigned int /*_blockSize*/ ) +
|
||||
|
||||
@@ -535,7 +535,7 @@ osg::Node* VertexData::readPlyFile( const char* filename, const bool ignoreColor
|
||||
osgUtil::SmoothingVisitor::smooth((*geom), osg::PI/2);
|
||||
}
|
||||
|
||||
// set flage true to activate the vertex buffer object of drawable
|
||||
// set flags true to activate the vertex buffer object of drawable
|
||||
geom->setUseVertexBufferObjects(true);
|
||||
|
||||
osg::ref_ptr<osg::Image> image;
|
||||
|
||||
@@ -54,7 +54,7 @@ static bool getFilenameAndParams(const std::string& input, std::string& filename
|
||||
return false;
|
||||
}
|
||||
|
||||
// clear the params sting of any brackets.
|
||||
// clear the params string of any brackets.
|
||||
std::string::size_type params_pos = params.size();
|
||||
for(; params_pos>0; )
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ static bool getFilenameAndParams(const std::string& input, std::string& filename
|
||||
return false;
|
||||
}
|
||||
|
||||
// clear the params sting of any brackets.
|
||||
// clear the params string of any brackets.
|
||||
std::string::size_type params_pos = params.size();
|
||||
for(; params_pos>0; )
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ static bool getFilenameAndParams(const std::string& input, std::string& filename
|
||||
return false;
|
||||
}
|
||||
|
||||
// clear the params sting of any brackets.
|
||||
// clear the params string of any brackets.
|
||||
std::string::size_type params_pos = params.size();
|
||||
for(; params_pos>0; )
|
||||
{
|
||||
|
||||
@@ -311,7 +311,7 @@ class ReaderWriterTRK : public osgDB::ReaderWriter
|
||||
vertices->push_back(osg::Vec3(vptr[0],vptr[1],vptr[2]));
|
||||
}
|
||||
|
||||
// add the line segmenets for track
|
||||
// add the line segments for track
|
||||
for(int pi=0; pi<n_points-1; ++pi, ++vi)
|
||||
{
|
||||
lines->push_back(vi);
|
||||
|
||||
@@ -182,7 +182,7 @@ TXFFont::loadFont(std::istream& stream)
|
||||
stream.read(reinterpret_cast<std::istream::char_type*>(image->data()), ntexels);
|
||||
if (!stream)
|
||||
{
|
||||
OSG_FATAL << "osgdb_txf: unxpected end of file in txf file \"" << _filename << "\"!" << std::endl;
|
||||
OSG_FATAL << "osgdb_txf: unexpected end of file in txf file \"" << _filename << "\"!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ TXFFont::loadFont(std::istream& stream)
|
||||
if (!stream)
|
||||
{
|
||||
delete [] texbitmap;
|
||||
OSG_FATAL << "osgdb_txf: unxpected end of file in txf file \"" << _filename << "\"!" << std::endl;
|
||||
OSG_FATAL << "osgdb_txf: unexpected end of file in txf file \"" << _filename << "\"!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ TXFFont::loadFont(std::istream& stream)
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_FATAL << "osgdb_txf: unxpected txf file!" << std::endl;
|
||||
OSG_FATAL << "osgdb_txf: unexpected txf file!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ void TXPPagedLOD::traverse(osg::NodeVisitor& nv)
|
||||
// modify the priority according to the child's priority offset and scale.
|
||||
priority = _perRangeDataList[numChildren]._priorityOffset + priority * _perRangeDataList[numChildren]._priorityScale;
|
||||
|
||||
//std::cout<<" requesting child "<<_fileNameList[numChildren]<<" priotity = "<<priority<<std::endl;
|
||||
//std::cout<<" requesting child "<<_fileNameList[numChildren]<<" priority = "<<priority<<std::endl;
|
||||
nv.getDatabaseRequestHandler()->requestNodeFile(_perRangeDataList[numChildren]._filename,
|
||||
nv.getNodePath(),
|
||||
priority,
|
||||
|
||||
@@ -154,7 +154,7 @@ bool TileMapper::isTileNeighbourALowerLODLevel(const TileIdentifier& tid, int dx
|
||||
{
|
||||
if (_tileMap.count(TileIdentifier(tid.x+dx,tid.y+dy,tid.lod))!=0)
|
||||
{
|
||||
// we have a neightbour at the same lod level.
|
||||
// we have a neighbour at the same lod level.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ using namespace osgShadow;
|
||||
|
||||
#if defined( DEBUG ) || defined( _DEBUG ) || defined( _DEBUG_ )
|
||||
// ConvexPolyhedron may produce tons of warnings when it becomes non convex.
|
||||
// Unfortuantely this condition often happens in daily routine of shadow usage
|
||||
// Unfortunately this condition often happens in daily routine of shadow usage
|
||||
// due precision errors mixed with repeating frustum cuts performed by MinimalShadowClasses.
|
||||
// However, in most of above cases this condition is not fatal
|
||||
// because polyhedron becomes concave by very small margin (measuring deep the hole).
|
||||
@@ -301,7 +301,7 @@ void ConvexPolyhedron::transform(const osg::Matrix& matrix, const osg::Matrix& i
|
||||
}
|
||||
|
||||
// Perpective transforms and lack of precision
|
||||
// occasionaly cause removal of some points
|
||||
// occasionally cause removal of some points
|
||||
|
||||
removeDuplicateVertices( );
|
||||
|
||||
@@ -637,7 +637,7 @@ void ConvexPolyhedron::transformClip(const osg::Matrix& matrix, const osg::Matri
|
||||
}
|
||||
|
||||
// Perpective transforms and lack of precision
|
||||
// occasionaly cause removal of some points
|
||||
// occasionally cause removal of some points
|
||||
|
||||
removeDuplicateVertices( );
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
using namespace osgShadow;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// There are two slightly differing implemetations available on
|
||||
// There are two slightly differing implementations available on
|
||||
// "Light Space Perspective Shadow Maps" page. One from 2004 and other from 2006.
|
||||
// Our implementation is written in two versions based on these solutions.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -372,7 +372,7 @@ void LightSpacePerspectiveShadowMapAlgorithm::operator()
|
||||
double n = (z_n+sqrt(z_f*z_n))/sinGamma;
|
||||
|
||||
#if ROBERTS_TEST_CHANGES
|
||||
// clamp the localtion of p so that it isn't too close to the eye as to cause problems
|
||||
// clamp the location of p so that it isn't too close to the eye as to cause problems
|
||||
float minRatio=0.02;
|
||||
if (n<d*minRatio)
|
||||
{
|
||||
|
||||
@@ -1854,7 +1854,7 @@ struct RenderLeafBounds
|
||||
else
|
||||
{
|
||||
// no modelview matrix (such as when LightPointNode is in the scene graph) so assume
|
||||
// that modelview matrix is indentity.
|
||||
// that modelview matrix is identity.
|
||||
light_mvp = light_p;
|
||||
}
|
||||
// OSG_INFO<<"Computing new light_mvp "<<light_mvp<<std::endl;
|
||||
|
||||
@@ -175,7 +175,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
{
|
||||
if (typeid(*object)==typeid(LightPointDrawable))
|
||||
{
|
||||
// resuse the user data attached to the render graph.
|
||||
// reuse the user data attached to the render graph.
|
||||
drawable = static_cast<LightPointDrawable*>(object);
|
||||
|
||||
}
|
||||
@@ -260,7 +260,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
|
||||
const osg::Vec3& position = lp._position;
|
||||
|
||||
// skip light point if it is not contianed in the view frustum.
|
||||
// skip light point if it is not contained in the view frustum.
|
||||
if (computeClipping && !clipvol.contains(position)) continue;
|
||||
|
||||
// delta vector between eyepoint and light point.
|
||||
|
||||
@@ -2491,7 +2491,7 @@ void SphereSegment::updatePrimitives()
|
||||
{
|
||||
unsigned int rowSize = _density+1;
|
||||
|
||||
// add primitve set
|
||||
// add primitive set
|
||||
osg::ref_ptr<osg::DrawElementsUShort> elements = new osg::DrawElementsUShort(GL_TRIANGLES);
|
||||
elements->reserve(2*rowSize*rowSize);
|
||||
_surfaceGeometry->getPrimitiveSetList().clear();
|
||||
@@ -2557,7 +2557,7 @@ void SphereSegment::updatePrimitives()
|
||||
{
|
||||
unsigned int rowSize = _density+1;
|
||||
|
||||
// add primitve set
|
||||
// add primitive set
|
||||
osg::ref_ptr<osg::DrawElementsUShort> elements = new osg::DrawElementsUShort(GL_LINES);
|
||||
elements->reserve(8);
|
||||
_spokesGeometry->getPrimitiveSetList().clear();
|
||||
@@ -2581,7 +2581,7 @@ void SphereSegment::updatePrimitives()
|
||||
{
|
||||
unsigned int rowSize = _density+1;
|
||||
|
||||
// add primitve set
|
||||
// add primitive set
|
||||
osg::ref_ptr<osg::DrawElementsUShort> elements = new osg::DrawElementsUShort(GL_LINE_STRIP);
|
||||
elements->reserve((rowSize-1)*4+1);
|
||||
_edgeLineGeometry->getPrimitiveSetList().clear();
|
||||
@@ -2618,7 +2618,7 @@ void SphereSegment::updatePrimitives()
|
||||
{
|
||||
unsigned int rowSize = _density+1;
|
||||
|
||||
// add primitve set
|
||||
// add primitive set
|
||||
osg::ref_ptr<osg::DrawElementsUShort> elements = new osg::DrawElementsUShort(GL_TRIANGLE_FAN);
|
||||
elements->reserve((rowSize-1)*4+2);
|
||||
_sidesGeometry->getPrimitiveSetList().clear();
|
||||
|
||||
@@ -441,7 +441,7 @@ bool Widget::computeIntersections(osgGA::EventVisitor* ev, osgGA::GUIEventAdapte
|
||||
typedef std::vector<const osgUtil::LineSegmentIntersector::Intersection*> IntersectionPointerList;
|
||||
IntersectionPointerList intersectionsToSort;
|
||||
|
||||
// populate the temporay vector of poiners to the original intersection pointers.
|
||||
// populate the temporary vector of pointers to the original intersection pointers.
|
||||
for(osgUtil::LineSegmentIntersector::Intersections::iterator itr = source_intersections.begin();
|
||||
itr != source_intersections.end();
|
||||
++itr)
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace osgUtil
|
||||
// glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_RESIDENT, &p);
|
||||
// #endif
|
||||
|
||||
static osg::ApplicationUsageProxy ICO_e1(osg::ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MINIMUM_COMPILE_TIME_PER_FRAME <float>","minimum compile time alloted to compiling OpenGL objects per frame in database pager.");
|
||||
static osg::ApplicationUsageProxy ICO_e1(osg::ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MINIMUM_COMPILE_TIME_PER_FRAME <float>","minimum compile time allotted to compiling OpenGL objects per frame in database pager.");
|
||||
static osg::ApplicationUsageProxy UCO_e2(osg::ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MAXIMUM_OBJECTS_TO_COMPILE_PER_FRAME <int>","maximum number of OpenGL objects to compile per frame in database pager.");
|
||||
static osg::ApplicationUsageProxy UCO_e3(osg::ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_FORCE_TEXTURE_DOWNLOAD <ON/OFF>","should the texture compiles be forced to download using a dummy Geometry.");
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ void RenderBin::sortFrontToBack()
|
||||
{
|
||||
copyLeavesFromStateGraphListToRenderLeafList();
|
||||
|
||||
// now sort the list into acending depth order.
|
||||
// now sort the list into ascending depth order.
|
||||
std::sort(_renderLeafList.begin(),_renderLeafList.end(),FrontToBackSortFunctor());
|
||||
|
||||
// cout << "sort front to back"<<endl;
|
||||
@@ -323,7 +323,7 @@ void RenderBin::sortBackToFront()
|
||||
{
|
||||
copyLeavesFromStateGraphListToRenderLeafList();
|
||||
|
||||
// now sort the list into acending depth order.
|
||||
// now sort the list into ascending depth order.
|
||||
std::sort(_renderLeafList.begin(),_renderLeafList.end(),BackToFrontSortFunctor());
|
||||
|
||||
// cout << "sort back to front"<<endl;
|
||||
@@ -342,7 +342,7 @@ void RenderBin::sortTraversalOrder()
|
||||
{
|
||||
copyLeavesFromStateGraphListToRenderLeafList();
|
||||
|
||||
// now sort the list into acending depth order.
|
||||
// now sort the list into ascending depth order.
|
||||
std::sort(_renderLeafList.begin(),_renderLeafList.end(),TraversalOrderFunctor());
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ void ShaderGenVisitor::remapStateSet(osg::StateSet* stateSet)
|
||||
{
|
||||
if (!stateSet) return;
|
||||
|
||||
// remove any modes that won't be appropriate when using shaders, and remap them to the apppropriate Uniform/Define combination
|
||||
// remove any modes that won't be appropriate when using shaders, and remap them to the appropriate Uniform/Define combination
|
||||
|
||||
|
||||
osg::StateSet::ModeList& modes = stateSet->getModeList();
|
||||
|
||||
@@ -753,7 +753,7 @@ public:
|
||||
EdgeSet::iterator itr = _edgeSet.find(edge);
|
||||
if (itr!=_edgeSet.end())
|
||||
{
|
||||
// remove the edge from the list, as its positoin in the list
|
||||
// remove the edge from the list, as its position in the list
|
||||
// may need to change once its values have been amended
|
||||
_edgeSet.erase(itr);
|
||||
}
|
||||
@@ -883,7 +883,7 @@ public:
|
||||
|
||||
//OSG_NOTICE<<" pNew="<<pNew<<"\tedge_p1"<<edge_p1.get()<<"\tedge_p2"<<edge_p2.get()<<std::endl;
|
||||
|
||||
// we copy the edge's _triangles and interate the copy of the triangle set to avoid invalidating iterators.
|
||||
// we copy the edge's _triangles and iterate the copy of the triangle set to avoid invalidating iterators.
|
||||
TriangleSet trianglesToRemove = edge->_triangles;
|
||||
for(TriangleSet::iterator teitr=trianglesToRemove.begin();
|
||||
teitr!=trianglesToRemove.end();
|
||||
|
||||
@@ -1459,7 +1459,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
{
|
||||
case(osg::DisplaySettings::QUAD_BUFFER):
|
||||
{
|
||||
// disconect the camera from the graphics context.
|
||||
// disconnect the camera from the graphics context.
|
||||
camera->setGraphicsContext(0);
|
||||
|
||||
// left Camera left buffer
|
||||
@@ -1546,7 +1546,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
}
|
||||
case(osg::DisplaySettings::ANAGLYPHIC):
|
||||
{
|
||||
// disconect the camera from the graphics context.
|
||||
// disconnect the camera from the graphics context.
|
||||
camera->setGraphicsContext(0);
|
||||
|
||||
// left Camera red
|
||||
@@ -1679,7 +1679,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
}
|
||||
case(osg::DisplaySettings::HORIZONTAL_SPLIT):
|
||||
{
|
||||
// disconect the camera from the graphics context.
|
||||
// disconnect the camera from the graphics context.
|
||||
camera->setGraphicsContext(0);
|
||||
|
||||
bool left_eye_left_viewport = ds->getSplitStereoHorizontalEyeMapping()==osg::DisplaySettings::LEFT_EYE_LEFT_VIEWPORT;
|
||||
@@ -1771,7 +1771,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
}
|
||||
case(osg::DisplaySettings::VERTICAL_SPLIT):
|
||||
{
|
||||
// disconect the camera from the graphics context.
|
||||
// disconnect the camera from the graphics context.
|
||||
camera->setGraphicsContext(0);
|
||||
|
||||
bool left_eye_bottom_viewport = ds->getSplitStereoVerticalEyeMapping()==osg::DisplaySettings::LEFT_EYE_BOTTOM_VIEWPORT;
|
||||
@@ -1783,7 +1783,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
0, left_start, traits->width, traits->height/2, traits->doubleBuffer ? GL_BACK : GL_FRONT,
|
||||
-1.0);
|
||||
|
||||
// top vieport camera
|
||||
// top viewport camera
|
||||
osg::ref_ptr<osg::Camera> right_camera = assignStereoCamera(ds, gc.get(),
|
||||
0, right_start, traits->width, traits->height/2, traits->doubleBuffer ? GL_BACK : GL_FRONT,
|
||||
1.0);
|
||||
@@ -1870,7 +1870,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
}
|
||||
case(osg::DisplaySettings::LEFT_EYE):
|
||||
{
|
||||
// disconect the camera from the graphics context.
|
||||
// disconnect the camera from the graphics context.
|
||||
camera->setGraphicsContext(0);
|
||||
|
||||
// single window, whole window, just left eye offsets
|
||||
@@ -1921,7 +1921,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
}
|
||||
case(osg::DisplaySettings::RIGHT_EYE):
|
||||
{
|
||||
// disconect the camera from the graphics context.
|
||||
// disconnect the camera from the graphics context.
|
||||
camera->setGraphicsContext(0);
|
||||
|
||||
// single window, whole window, just right eye offsets
|
||||
@@ -1973,7 +1973,7 @@ void View::assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySetti
|
||||
case(osg::DisplaySettings::VERTICAL_INTERLACE):
|
||||
case(osg::DisplaySettings::CHECKERBOARD):
|
||||
{
|
||||
// disconect the camera from the graphics context.
|
||||
// disconnect the camera from the graphics context.
|
||||
camera->setGraphicsContext(0);
|
||||
|
||||
// set up the stencil buffer
|
||||
|
||||
@@ -688,7 +688,7 @@ void Viewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEventAdapte
|
||||
if (!gw) return;
|
||||
|
||||
// What type of Camera is it?
|
||||
// 1) Master Camera : do nothin extra
|
||||
// 1) Master Camera : do nothing extra
|
||||
// 2) Slave Camera, Relative RF, Same scene graph as master : transform coords into Master Camera and add to PointerData list
|
||||
// 3) Slave Camera, Relative RF, Different scene graph from master : do nothing extra?
|
||||
// 4) Slave Camera, Absolute RF, Same scene graph as master : do nothing extra?
|
||||
|
||||
@@ -106,7 +106,7 @@ void FixedFunctionTechnique::init()
|
||||
|
||||
if (_volumeTile->getLayer()==0)
|
||||
{
|
||||
OSG_NOTICE<<"FixedFunctionTechnique::init(), error no layer assigend to volume tile."<<std::endl;
|
||||
OSG_NOTICE<<"FixedFunctionTechnique::init(), error no layer assigned to volume tile."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ void MultipassTechnique::init()
|
||||
|
||||
if (_volumeTile->getLayer()==0)
|
||||
{
|
||||
OSG_NOTICE<<"MultipassTechnique::init(), error no layer assigend to volume tile."<<std::endl;
|
||||
OSG_NOTICE<<"MultipassTechnique::init(), error no layer assigned to volume tile."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1066,15 +1066,15 @@ void MultipassTechnique::cull(osgUtil::CullVisitor* cv)
|
||||
switch(renderingMode)
|
||||
{
|
||||
case(CUBE):
|
||||
// OSG_NOTICE<<"Travering Transform for CUBE rendering"<<std::endl;
|
||||
// OSG_NOTICE<<"Traversing Transform for CUBE rendering"<<std::endl;
|
||||
_transform->accept(*cv);
|
||||
break;
|
||||
case(HULL):
|
||||
// OSG_NOTICE<<"Travering children for HULL rendering"<<std::endl;
|
||||
// OSG_NOTICE<<"Traversing children for HULL rendering"<<std::endl;
|
||||
getVolumeTile()->osg::Group::traverse(*cv);
|
||||
break;
|
||||
case(CUBE_AND_HULL):
|
||||
// OSG_NOTICE<<"Travering Transform for CUBE_AND_HULL rendering"<<std::endl;
|
||||
// OSG_NOTICE<<"Traversing Transform for CUBE_AND_HULL rendering"<<std::endl;
|
||||
_transform->accept(*cv);
|
||||
//getVolumeTile()->osg::Group::traverse(*cv);
|
||||
break;
|
||||
|
||||
@@ -63,7 +63,7 @@ void RayTracedTechnique::init()
|
||||
|
||||
if (_volumeTile->getLayer()==0)
|
||||
{
|
||||
OSG_NOTICE<<"RayTracedTechnique::init(), error no layer assigend to volume tile."<<std::endl;
|
||||
OSG_NOTICE<<"RayTracedTechnique::init(), error no layer assigned to volume tile."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ char volume_multipass_cube_and_hull_frag[] = "#version 110\n"
|
||||
" fragColor = mix(scene_color, fragColor, fragColor.a);\n"
|
||||
" if (fragColor.a>=1.0) return fragColor;\n"
|
||||
"\n"
|
||||
" // compute rear segement color and blend with accumulated_color\n"
|
||||
" // compute rear segment color and blend with accumulated_color\n"
|
||||
" return mix( fragColor, computeRayColor(fragColor, px, py, depth_start, scene_depth), transparencyFactor);\n"
|
||||
" }\n"
|
||||
" else\n"
|
||||
@@ -39,7 +39,7 @@ char volume_multipass_cube_and_hull_frag[] = "#version 110\n"
|
||||
" fragColor = mix(scene_color, fragColor, fragColor.a);\n"
|
||||
" if (fragColor.a>=1.0) return fragColor;\n"
|
||||
"\n"
|
||||
" // compute rear segement color and blend with accumulated_color\n"
|
||||
" // compute rear segment color and blend with accumulated_color\n"
|
||||
" return computeRayColor(fragColor, px, py, depth_start, scene_depth) * transparencyFactor;\n"
|
||||
" }\n"
|
||||
" else\n"
|
||||
@@ -78,7 +78,7 @@ char volume_multipass_cube_and_hull_frag[] = "#version 110\n"
|
||||
"\n"
|
||||
" if (back_depth<gl_FragCoord.z)\n"
|
||||
" {\n"
|
||||
" // segment front_depth to 0.0, exterior transparancy\n"
|
||||
" // segment front_depth to 0.0, exterior transparency\n"
|
||||
" // segment back_depth to front_depth, interior transparency\n"
|
||||
" // segment gl_FragCoord.z to back_depth, exterior transparency\n"
|
||||
" fragColor = computeSegment(fragColor, gl_FragCoord.x, gl_FragCoord.y, front_depth, 0.0, ExteriorTransparencyFactorValue, color, texture_depth);\n"
|
||||
@@ -93,8 +93,8 @@ char volume_multipass_cube_and_hull_frag[] = "#version 110\n"
|
||||
" }\n"
|
||||
" else if (front_depth<gl_FragCoord.z)\n"
|
||||
" {\n"
|
||||
" // segment front_depth to 0, exterior transparancy\n"
|
||||
" // segement gl_FragCoord.z to front_depth, interior transparancy\n"
|
||||
" // segment front_depth to 0, exterior transparency\n"
|
||||
" // segment gl_FragCoord.z to front_depth, interior transparency\n"
|
||||
" // back_depth behind gl_FragCoord.z so clipped out by cube and not required.\n"
|
||||
" fragColor = computeSegment(fragColor, gl_FragCoord.x, gl_FragCoord.y, front_depth, 0.0, ExteriorTransparencyFactorValue, color, texture_depth);\n"
|
||||
" if (fragColor.a<1.0)\n"
|
||||
|
||||
@@ -35,7 +35,7 @@ static bool writeKeyManipMap( osgDB::OutputStream& os, const osgGA::KeySwitchMat
|
||||
const osgGA::KeySwitchMatrixManipulator::KeyManipMap& kmm = kwmm.getKeyManipMap();
|
||||
unsigned int size = kmm.size();
|
||||
|
||||
// find out what num the acive camera manipulator is
|
||||
// find out what num the active camera manipulator is
|
||||
const osgGA::CameraManipulator* cm = kwmm.getCurrentMatrixManipulator();
|
||||
int index = 0;
|
||||
int activeCameraManipulatorIndex = -1;
|
||||
|
||||
Reference in New Issue
Block a user