Resolved warnings reported by g++ 4.6's -Wunused-but-set-variable.
Warnings were: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp: In member function ‘void PrimitiveShapeVisitor::createHalfSphere(unsigned int, unsigned int, float, int, float, const Matrix&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp:1409:11: warning: variable ‘nzBase’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osg/ShapeDrawable.cpp:1410:11: warning: variable ‘nRatioBase’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp: In function ‘osgUtil::Triangle_list osgUtil::fillHole(osg::Vec3Array*, std::vector<unsigned int, std::allocator<unsigned int> >)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp:569:27: warning: variable ‘ptest’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp: In member function ‘bool osgUtil::DelaunayTriangulator::triangulate()’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/DelaunayTriangulator.cpp:979:45: warning: variable ‘curp’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/RenderStage.cpp: In member function ‘void osgUtil::RenderStage::runCameraSetUp(osg::RenderInfo&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgUtil/RenderStage.cpp:631:18: warning: variable ‘stencilAttached’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp: In member function ‘void FadeTextPolytopeData::buildPolytope()’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp:74:20: warning: variable ‘edge23’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/FadeText.cpp:75:20: warning: variable ‘edge30’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/Text.cpp: In member function ‘void osgText::Text::computeBackdropPositions(unsigned int) const’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgText/Text.cpp:747:10: warning: variable ‘is_valid_size’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp: In member function ‘virtual bool osgGA::NodeTrackerManipulator::performMovementLeftMouseButton(double, double, double)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp:257:21: warning: variable ‘lookVector’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/NodeTrackerManipulator.cpp:259:21: warning: variable ‘upVector’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp: In member function ‘virtual bool osgGA::TerrainManipulator::performMovementMiddleMouseButton(double, double, double)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp:217:11: warning: variable ‘lookVector’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgGA/TerrainManipulator.cpp:219:11: warning: variable ‘upVector’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgVolume/FixedFunctionTechnique.cpp: In member function ‘virtual void osgVolume::FixedFunctionTechnique::init()’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgVolume/FixedFunctionTechnique.cpp:124:30: warning: variable ‘tf’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgParticle/FluidProgram.cpp: In member function ‘virtual void osgParticle::FluidProgram::execute(double)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgParticle/FluidProgram.cpp:38:23: warning: variable ‘velBefore’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgShadow/ParallelSplitShadowMap.cpp: In member function ‘virtual void osgShadow::ParallelSplitShadowMap::cull(osgUtil::CullVisitor&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgShadow/ParallelSplitShadowMap.cpp:593:22: warning: variable ‘bb’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp: In member function ‘virtual void osgTerrain::GeometryTechnique::generateGeometry(osgTerrain::GeometryTechnique::BufferData&, osgTerrain::Locator*, const osg::Vec3d&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp:777:12: warning: variable ‘i_sampleFactor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgTerrain/GeometryTechnique.cpp:778:12: warning: variable ‘j_sampleFactor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp: In function ‘osg::Image* ReadDDSFile(std::istream&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp:314:10: warning: variable ‘is3dImage’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp: In function ‘bool WriteDDSFile(const osg::Image*, std::ostream&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/dds/ReaderWriterDDS.cpp:721:10: warning: variable ‘is3dImage’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/hdr/hdrloader.cpp: In static member function ‘static bool HDRLoader::load(const char*, bool, HDRLoaderResult&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/hdr/hdrloader.cpp:101:10: warning: variable ‘cmd’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/vtf/ReaderWriterVTF.cpp: In function ‘osg::Image* ReadVTFFile(std::istream&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/vtf/ReaderWriterVTF.cpp:360:23: warning: variable ‘base’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/jp2/ReaderWriterJP2.cpp: In function ‘int putdata(jas_stream_t*, jas_image_t*, int)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/jp2/ReaderWriterJP2.cpp:41:13: warning: variable ‘linelen’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertToInventor.cpp: In member function ‘void ConvertToInventor::processGeometry(const osg::Geometry*, ConvertToInventor::InventorState*)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertToInventor.cpp:1639:10: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertFromInventor.cpp: In member function ‘virtual SbBool SoVRMLImageTextureOsg::readInstance(SoInput*, short unsigned int)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/Inventor/ConvertFromInventor.cpp:1264:16: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp: In member function ‘virtual void flt::Face::readRecord(flt::RecordInputStream&, flt::Document&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp:369:19: warning: variable ‘secondaryPackedColor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp: In member function ‘virtual void flt::Mesh::readRecord(flt::RecordInputStream&, flt::Document&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/GeometryRecords.cpp:942:19: warning: variable ‘secondaryPackedColor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp: In member function ‘virtual osgDB::ReaderWriter::ReadResult FLTReaderWriter::readNode(std::istream&, const Options*) const’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp:427:40: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ive/ShapeAttributeList.cpp: In member function ‘void ive::ShapeAttributeList::write(ive::DataOutputStream*)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ive/ShapeAttributeList.cpp:31:48: warning: variable ‘it’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp: In member function ‘void ac3d::Geode::ProcessGeometry(std::ostream&, unsigned int)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:806:35: warning: variable ‘fRep_s’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:806:43: warning: variable ‘fRep_t’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:807:35: warning: variable ‘fOffset_s’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:807:46: warning: variable ‘fOffset_t’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/ac/Geode.cpp:932:38: warning: variable ‘primLength’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_geom.cpp: In member function ‘virtual bool trpgGeometry::Write(trpgWriteBuffer&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_geom.cpp:615:19: warning: variable ‘u’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_material.cpp: In member function ‘int trpgMatTable::AddMaterial(const trpgMaterial&, bool)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_material.cpp:103:10: warning: variable ‘spaceInTable’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_rarchive.cpp: In member function ‘virtual bool trpgr_Archive::ReadHeader(bool)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/txp/trpage_rarchive.cpp:261:14: warning: variable ‘headerHasTexTable’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp: In member function ‘ZRESULT TUnzip::Get(int, ZIPENTRY*)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:8: warning: variable ‘hidden’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:22: warning: variable ‘system’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/unzip.cpp:4055:36: warning: variable ‘archive’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/ZipArchive.cpp: In member function ‘virtual bool ZipArchive::getFileNames(osgDB::Archive::FileNameList&) const’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/zip/ZipArchive.cpp:91:37: warning: variable ‘iterEnd’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/pvr/ReaderWriterPVR.cpp: In member function ‘osgDB::ReaderWriter::ReadResult ReaderWriterPVR::readPVRStream(std::istream&) const’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/pvr/ReaderWriterPVR.cpp:155:14: warning: variable ‘hasAlpha’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp: In function ‘osg::Geometry* create3DSphericalDisplayDistortionMesh(const Vec3&, const Vec3&, const Vec3&, double, double, osg::Image*, const Matrix&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:737:15: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp: In function ‘osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const Vec3&, const Vec3&, const Vec3&, double, double, osg::Image*, const Matrix&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:1130:19: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/View.cpp:1118:15: warning: variable ‘dx’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/GraphicsWindowX11.cpp: In member function ‘virtual void osgViewer::GraphicsWindowX11::checkEvents()’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgViewer/GraphicsWindowX11.cpp:1181:10: warning: variable ‘destroyWindowRequested’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/cfg/ConfigParser.cpp: In member function ‘bool osgProducer::CameraConfig::parseFile(const string&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/cfg/ConfigParser.cpp:2247:13: warning: variable ‘result’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgQt/QGraphicsViewAdapter.cpp: In member function ‘bool osgQt::QGraphicsViewAdapter::handlePointerEvent(int, int, int)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgQt/QGraphicsViewAdapter.cpp:344:17: warning: variable ‘viewportGeometry’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp: In function ‘osg::Node* createDistortionSubgraph(osg::Node*, const Vec4&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:125:19: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:126:19: warning: variable ‘texcoord’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp: In function ‘osg::Geometry* createDomeDistortionMesh(const Vec3&, const Vec3&, const Vec3&, osg::ArgumentParser&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgdistortion/osgdistortion.cpp:358:15: warning: variable ‘cursor’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgposter/osgposter.cpp: In function ‘int main(int, char**)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgposter/osgposter.cpp:253:31: warning: variable ‘outputTiles’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgthreadedterrain/osgthreadedterrain.cpp: In function ‘int main(int, char**)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgthreadedterrain/osgthreadedterrain.cpp:669:10: warning: variable ‘readParameter’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgtext3D/TextNode.cpp: In member function ‘virtual void osgText::Layout::layout(osgText::TextNode&) const’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgtext3D/TextNode.cpp:80:11: warning: variable ‘characterHeightScale’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgvolume/osgvolume.cpp: In function ‘int main(int, char**)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgvolume/osgvolume.cpp:678:38: warning: variable ‘internalFormatMode’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ‘bool windowMouseOver(osgWidget::Event&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp:27:24: warning: variable ‘xy’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp: In function ‘bool widgetMouseOver(osgWidget::Event&)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/examples/osgwidgetcanvas/osgwidgetcanvas.cpp:35:24: warning: variable ‘xy’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/p3d/ReaderWriterP3D.cpp: In member function ‘osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode*, bool, osgDB::Options*) const’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/src/osgPlugins/p3d/ReaderWriterP3D.cpp:2121:10: warning: variable ‘readSlide’ set but not used [-Wunused-but-set-variable] /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/applications/present3D/present3D.cpp: In function ‘int main(int, char**)’: /home/stephan/Dev/LibSources/OpenSceneGraph-3.0.0-rc2/applications/present3D/present3D.cpp:639:10: warning: variable ‘sizesSpecified’ set but not used [-Wunused-but-set-variable]
This commit is contained in:
parent
6783dcff17
commit
30becd5ed3
@ -636,11 +636,8 @@ int main( int argc, char **argv )
|
||||
float width = osg::DisplaySettings::instance()->getScreenWidth();
|
||||
float height = osg::DisplaySettings::instance()->getScreenHeight();
|
||||
float distance = osg::DisplaySettings::instance()->getScreenDistance();
|
||||
bool sizesSpecified = false;
|
||||
while (arguments.read("-s", width, height, distance))
|
||||
{
|
||||
sizesSpecified = true;
|
||||
|
||||
osg::DisplaySettings::instance()->setScreenDistance(distance);
|
||||
osg::DisplaySettings::instance()->setScreenHeight(height);
|
||||
osg::DisplaySettings::instance()->setScreenWidth(width);
|
||||
|
@ -122,8 +122,6 @@ osg::Node* createDistortionSubgraph(osg::Node* subgraph, const osg::Vec4& clearC
|
||||
osg::Vec2 dx_texcoord(1.0f/(float)(noSteps-1),0.0f);
|
||||
osg::Vec2 dy_texcoord(0.0f,1.0f/(float)(noSteps-1));
|
||||
|
||||
osg::Vec3 cursor = bottom;
|
||||
osg::Vec2 texcoord = bottom_texcoord;
|
||||
int i,j;
|
||||
for(i=0;i<noSteps;++i)
|
||||
{
|
||||
@ -355,10 +353,7 @@ osg::Geometry* createDomeDistortionMesh(const osg::Vec3& origin, const osg::Vec3
|
||||
osg::Vec3d screenCenter = origin + widthVector*0.5f + heightVector*0.5f;
|
||||
float screenRadius = heightVector.length() * 0.5f;
|
||||
|
||||
osg::Vec3 cursor = bottom;
|
||||
int i,j;
|
||||
|
||||
|
||||
if (centerProjection)
|
||||
{
|
||||
for(i=0;i<noSteps;++i)
|
||||
|
@ -231,8 +231,8 @@ int main( int argc, char** argv )
|
||||
usage->addCommandLineOption( "--finalsize <w> <h>", "Size of the poster (Default: 6400 4800)." );
|
||||
usage->addCommandLineOption( "--enable-output-poster", "Output the final poster file (Default)." );
|
||||
usage->addCommandLineOption( "--disable-output-poster", "Don't output the final poster file." );
|
||||
usage->addCommandLineOption( "--enable-output-tiles", "Output all tile files." );
|
||||
usage->addCommandLineOption( "--disable-output-tiles", "Don't output all tile files (Default)." );
|
||||
//usage->addCommandLineOption( "--enable-output-tiles", "Output all tile files." );
|
||||
//usage->addCommandLineOption( "--disable-output-tiles", "Don't output all tile files (Default)." );
|
||||
usage->addCommandLineOption( "--use-fb", "Use Frame Buffer for rendering tiles (Default, recommended).");
|
||||
usage->addCommandLineOption( "--use-fbo", "Use Frame Buffer Object for rendering tiles.");
|
||||
usage->addCommandLineOption( "--use-pbuffer","Use Pixel Buffer for rendering tiles.");
|
||||
@ -250,7 +250,8 @@ int main( int argc, char** argv )
|
||||
|
||||
// Poster arguments
|
||||
bool activeMode = true;
|
||||
bool outputPoster = true, outputTiles = false;
|
||||
bool outputPoster = true;
|
||||
//bool outputTiles = false;
|
||||
int tileWidth = 640, tileHeight = 480;
|
||||
int posterWidth = 640*2, posterHeight = 480*2;
|
||||
std::string posterName = "poster.bmp", extName = "bmp";
|
||||
@ -265,8 +266,8 @@ int main( int argc, char** argv )
|
||||
while ( arguments.read("--ext", extName) ) {}
|
||||
while ( arguments.read("--enable-output-poster") ) { outputPoster = true; }
|
||||
while ( arguments.read("--disable-output-poster") ) { outputPoster = false; }
|
||||
while ( arguments.read("--enable-output-tiles") ) { outputTiles = true; }
|
||||
while ( arguments.read("--disable-output-tiles") ) { outputTiles = false; }
|
||||
//while ( arguments.read("--enable-output-tiles") ) { outputTiles = true; }
|
||||
//while ( arguments.read("--disable-output-tiles") ) { outputTiles = false; }
|
||||
while ( arguments.read("--use-fbo")) { renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; }
|
||||
while ( arguments.read("--use-pbuffer")) { renderImplementation = osg::Camera::PIXEL_BUFFER; }
|
||||
while ( arguments.read("--use-pbuffer-rtt")) { renderImplementation = osg::Camera::PIXEL_BUFFER_RTT; }
|
||||
|
@ -77,13 +77,11 @@ void Layout::layout(TextNode& text) const
|
||||
}
|
||||
|
||||
float characterWidthScale = 1.0f;
|
||||
float characterHeightScale = 1.0f;
|
||||
|
||||
bool textIs3D = (style && style->getThicknessRatio()!=0.0);
|
||||
if (!textIs3D)
|
||||
{
|
||||
characterWidthScale = 1.0f/static_cast<float>(resolution.first);
|
||||
characterHeightScale = 1.0f/static_cast<float>(resolution.second);
|
||||
}
|
||||
|
||||
osgText::KerningType kerningType = osgText::KERNING_DEFAULT;
|
||||
|
@ -666,7 +666,6 @@ int main(int argc, char** argv)
|
||||
|
||||
osg::Texture::FilterMode filter = osg::Texture::LINEAR;
|
||||
|
||||
bool readParameter = false;
|
||||
float minValue, maxValue;
|
||||
float scale = 1.0f;
|
||||
float offset = 0.0f;
|
||||
@ -674,13 +673,11 @@ int main(int argc, char** argv)
|
||||
int pos = 1;
|
||||
while(pos<arguments.argc())
|
||||
{
|
||||
readParameter = false;
|
||||
std::string filename;
|
||||
|
||||
if (arguments.read(pos, "--layer",layerNum))
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Set layer number to "<<layerNum<<std::endl;
|
||||
readParameter = true;
|
||||
}
|
||||
|
||||
else if (arguments.read(pos, "-b"))
|
||||
@ -693,13 +690,11 @@ int main(int argc, char** argv)
|
||||
// define the extents.
|
||||
locator->setCoordinateSystemType(osgTerrain::Locator::GEOCENTRIC);
|
||||
locator->setTransformAsExtents(x,y,x+w,y+h);
|
||||
readParameter = true;
|
||||
}
|
||||
|
||||
else if (arguments.read(pos, "--transform",offset, scale) || arguments.read(pos, "-t",offset, scale))
|
||||
{
|
||||
// define the extents.
|
||||
readParameter = true;
|
||||
}
|
||||
|
||||
else if (arguments.read(pos, "--cartesian",x,y,w,h))
|
||||
@ -711,8 +706,6 @@ int main(int argc, char** argv)
|
||||
|
||||
else if (arguments.read(pos, "--hf",filename))
|
||||
{
|
||||
readParameter = true;
|
||||
|
||||
osg::notify(osg::NOTICE)<<"--hf "<<filename<<std::endl;
|
||||
|
||||
osg::ref_ptr<osg::HeightField> hf = osgDB::readHeightFieldFile(filename);
|
||||
@ -748,7 +741,6 @@ int main(int argc, char** argv)
|
||||
|
||||
else if (arguments.read(pos, "-d",filename) || arguments.read(pos, "--elevation-image",filename))
|
||||
{
|
||||
readParameter = true;
|
||||
osg::notify(osg::NOTICE)<<"--elevation-image "<<filename<<std::endl;
|
||||
|
||||
osg::ref_ptr<osg::Image> image = osgDB::readImageFile(filename);
|
||||
@ -783,7 +775,6 @@ int main(int argc, char** argv)
|
||||
|
||||
else if (arguments.read(pos, "-c",filename) || arguments.read(pos, "--image",filename))
|
||||
{
|
||||
readParameter = true;
|
||||
osg::notify(osg::NOTICE)<<"--image "<<filename<<" x="<<x<<" y="<<y<<" w="<<w<<" h="<<h<<std::endl;
|
||||
|
||||
osg::ref_ptr<osg::Image> image = osgDB::readImageFile(filename);
|
||||
@ -818,8 +809,6 @@ int main(int argc, char** argv)
|
||||
|
||||
else if (arguments.read(pos, "--filter",filterName))
|
||||
{
|
||||
readParameter = true;
|
||||
|
||||
if (filterName=="NEAREST")
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"--filter "<<filterName<<std::endl;
|
||||
@ -844,8 +833,6 @@ int main(int argc, char** argv)
|
||||
|
||||
else if (arguments.read(pos, "--tf",minValue, maxValue))
|
||||
{
|
||||
readParameter = true;
|
||||
|
||||
osg::ref_ptr<osg::TransferFunction1D> tf = new osg::TransferFunction1D;
|
||||
|
||||
unsigned int numCells = 6;
|
||||
|
@ -533,11 +533,6 @@ int main( int argc, char **argv )
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--s_maxTextureSize <size>","Set the texture maximum resolution in the s (x) dimension.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--t_maxTextureSize <size>","Set the texture maximum resolution in the t (y) dimension.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--r_maxTextureSize <size>","Set the texture maximum resolution in the r (z) dimension.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--compressed","Enable the usage of compressed textures.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--compressed-arb","Enable the usage of OpenGL ARB compressed textures.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt1","Enable the usage of S3TC DXT1 compressed textures.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt3","Enable the usage of S3TC DXT3 compressed textures.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--compressed-dxt5","Enable the usage of S3TC DXT5 compressed textures.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--modulate-alpha-by-luminance","For each pixel multiply the alpha value by the luminance.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--replace-alpha-with-luminance","For each pixel set the alpha value to the luminance.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--replace-rgb-with-luminance","For each rgb pixel convert to the luminance.");
|
||||
@ -675,14 +670,6 @@ int main( int argc, char **argv )
|
||||
while(arguments.read("--t_maxTextureSize",t_maximumTextureSize)) {}
|
||||
while(arguments.read("--r_maxTextureSize",r_maximumTextureSize)) {}
|
||||
|
||||
osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;
|
||||
while(arguments.read("--compressed") || arguments.read("--compressed-arb")) { internalFormatMode = osg::Texture::USE_ARB_COMPRESSION; }
|
||||
|
||||
while(arguments.read("--compressed-dxt1")) { internalFormatMode = osg::Texture::USE_S3TC_DXT1_COMPRESSION; }
|
||||
while(arguments.read("--compressed-dxt3")) { internalFormatMode = osg::Texture::USE_S3TC_DXT3_COMPRESSION; }
|
||||
while(arguments.read("--compressed-dxt5")) { internalFormatMode = osg::Texture::USE_S3TC_DXT5_COMPRESSION; }
|
||||
|
||||
|
||||
// set up colour space operation.
|
||||
ColourSpaceOperation colourSpaceOperation = NO_COLOUR_SPACE_OPERATION;
|
||||
osg::Vec4 colourModulate(0.25f,0.25f,0.25f,0.25f);
|
||||
|
@ -23,17 +23,15 @@ bool colorWidgetLeave(osgWidget::Event& event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool windowMouseOver(osgWidget::Event& event) {
|
||||
osgWidget::XYCoord xy = event.getWindow()->localXY(event.x, event.y);
|
||||
|
||||
bool windowMouseOver(osgWidget::Event& /*event*/) {
|
||||
//osgWidget::XYCoord xy = event.getWindow()->localXY(event.x, event.y);
|
||||
// osgWidget::warn() << "WINDOW " << xy.x() << " - " << xy.y() << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool widgetMouseOver(osgWidget::Event& event) {
|
||||
osgWidget::XYCoord xy = event.getWidget()->localXY(event.x, event.y);
|
||||
|
||||
bool widgetMouseOver(osgWidget::Event& /*event*/) {
|
||||
// osgWidget::XYCoord xy = event.getWidget()->localXY(event.x, event.y);
|
||||
// osgWidget::warn() << "WIDGET mouseOver " << xy.x() << " - " << xy.y() << std::endl;
|
||||
|
||||
return true;
|
||||
|
@ -1406,8 +1406,6 @@ void PrimitiveShapeVisitor::createHalfSphere(unsigned int numSegments, unsigned
|
||||
float rBase=(top?(cosf(lBase)*radius):0.0f);
|
||||
float zBase=(top?(sinf(lBase)*radius):-radius);
|
||||
float vBase=(top?(vDelta*(numRows/2)):0.0f);
|
||||
float nzBase=(top?(sinf(lBase)):-1.0f);
|
||||
float nRatioBase=(top?(cosf(lBase)):0.0f);
|
||||
|
||||
unsigned int rowbegin = top?numRows/2:0;
|
||||
unsigned int rowend = top?numRows:numRows/2;
|
||||
@ -1419,8 +1417,6 @@ void PrimitiveShapeVisitor::createHalfSphere(unsigned int numSegments, unsigned
|
||||
float rTop = cosf(lTop)*radius;
|
||||
float zTop = sinf(lTop)*radius;
|
||||
float vTop = vBase+vDelta;
|
||||
float nzTop= sinf(lTop);
|
||||
float nRatioTop= cosf(lTop);
|
||||
|
||||
_functor.begin(GL_QUAD_STRIP);
|
||||
|
||||
@ -1449,9 +1445,6 @@ void PrimitiveShapeVisitor::createHalfSphere(unsigned int numSegments, unsigned
|
||||
rBase=rTop;
|
||||
zBase=zTop;
|
||||
vBase=vTop;
|
||||
nzBase=nzTop;
|
||||
nRatioBase=nRatioTop;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -254,10 +254,7 @@ bool NodeTrackerManipulator::performMovementLeftMouseButton( const double eventT
|
||||
osg::Matrix rotation_matrix;
|
||||
rotation_matrix.makeRotate(_rotation);
|
||||
|
||||
osg::Vec3d lookVector = -getUpVector(rotation_matrix);
|
||||
osg::Vec3d sideVector = getSideVector(rotation_matrix);
|
||||
osg::Vec3d upVector = getFrontVector(rotation_matrix);
|
||||
|
||||
osg::Vec3d localUp(0.0f,0.0f,1.0f);
|
||||
|
||||
osg::Vec3d forwardVector = localUp^sideVector;
|
||||
|
@ -214,9 +214,7 @@ bool TerrainManipulator::performMovementMiddleMouseButton( const double eventTim
|
||||
|
||||
|
||||
// compute look vector.
|
||||
Vec3d lookVector = -getUpVector(rotation_matrix);
|
||||
Vec3d sideVector = getSideVector(rotation_matrix);
|
||||
Vec3d upVector = getFrontVector(rotation_matrix);
|
||||
|
||||
// CoordinateFrame coordinateFrame = getCoordinateFrame(_center);
|
||||
// Vec3d localUp = getUpVector(coordinateFrame);
|
||||
|
@ -35,7 +35,6 @@ void osgParticle::FluidProgram::execute(double dt)
|
||||
osg::Vec3 accel_gravity = _acceleration * ((particle->getMass() - _density*Volume) * particle->getMassInv());
|
||||
|
||||
// compute force due to friction
|
||||
osg::Vec3 velBefore = particle->getVelocity();
|
||||
osg::Vec3 relative_wind = particle->getVelocity()-_wind;
|
||||
osg::Vec3 wind_force = - relative_wind * Area * (_viscosityCoefficient + _densityCoefficient*relative_wind.length());
|
||||
osg::Vec3 wind_accel = wind_force * particle->getMassInv();
|
||||
|
@ -1653,6 +1653,10 @@ void ConvertToInventor::processGeometry(const osg::Geometry *g, InventorState *i
|
||||
startIndex, stopIndex, normalIndex, colorIndex,
|
||||
coords, normals, ivMaterial, texCoords,
|
||||
ivState->ivTexture, shape, indexedRoot, nonIndexedRoot);
|
||||
if (!ok)
|
||||
{
|
||||
OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<<std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1667,6 +1671,10 @@ void ConvertToInventor::processGeometry(const osg::Geometry *g, InventorState *i
|
||||
-1, primSize, startIndex, -1, normalIndex, colorIndex,
|
||||
coords, normals, ivMaterial, texCoords,
|
||||
ivState->ivTexture, shape, indexedRoot, nonIndexedRoot);
|
||||
if (!ok)
|
||||
{
|
||||
OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<<std::endl;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -1716,6 +1724,10 @@ void ConvertToInventor::processGeometry(const osg::Geometry *g, InventorState *i
|
||||
0, drawElemIndices->getNumElements(), normalIndex, colorIndex,
|
||||
coords, normals, ivMaterial, texCoords,
|
||||
ivState->ivTexture, shape, indexedRoot, nonIndexedRoot);
|
||||
if (!ok)
|
||||
{
|
||||
OSG_WARN<<"Inventor plugin, ConvertToInventor processPrimitiveSet() failed."<<std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,7 @@ protected:
|
||||
_lightMode = in.readUInt8(FACE_COLOR);
|
||||
in.forward(7);
|
||||
osg::Vec4 primaryPackedColor = in.readColor32();
|
||||
osg::Vec4 secondaryPackedColor = in.readColor32();
|
||||
/*osg::Vec4 secondaryPackedColor =*/ in.readColor32();
|
||||
// version >= VERSION_15_1
|
||||
/*int textureMappingIndex =*/ in.readInt16(-1);
|
||||
in.forward(2);
|
||||
@ -939,7 +939,7 @@ protected:
|
||||
_lightMode = in.readUInt8(FACE_COLOR);
|
||||
in.forward(7);
|
||||
osg::Vec4 primaryPackedColor = in.readColor32();
|
||||
osg::Vec4 secondaryPackedColor = in.readColor32();
|
||||
/*osg::Vec4 secondaryPackedColor =*/ in.readColor32();
|
||||
// version >= VERSION_15_1
|
||||
/*int textureMappingIndex =*/ in.readInt16(-1);
|
||||
in.forward(2);
|
||||
|
@ -423,9 +423,6 @@ class FLTReaderWriter : public ReaderWriter
|
||||
{
|
||||
// The continuation record complicates things a bit.
|
||||
|
||||
// Get current read position in stream.
|
||||
std::istream::pos_type pos = fin.tellg();
|
||||
|
||||
// get opcode and size
|
||||
flt::DataInputStream dataStream(fin.rdbuf());
|
||||
opcode_type opcode = (opcode_type)dataStream.readUInt16();
|
||||
|
@ -929,27 +929,21 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset)
|
||||
const osg::PrimitiveSet* primitiveset = pItr->get();
|
||||
GLenum mode=primitiveset->getMode();
|
||||
|
||||
unsigned int primLength;
|
||||
unsigned int surfaceFlags = 0x00;
|
||||
|
||||
switch(mode)
|
||||
{
|
||||
case(osg::PrimitiveSet::POINTS):
|
||||
primLength = 1;
|
||||
surfaceFlags = 0x02;
|
||||
break;
|
||||
case(osg::PrimitiveSet::LINES):
|
||||
primLength = 2;
|
||||
surfaceFlags = 0x02;
|
||||
break;
|
||||
case(osg::PrimitiveSet::TRIANGLES):
|
||||
primLength = 3;
|
||||
break;
|
||||
case(osg::PrimitiveSet::QUADS):
|
||||
primLength = 4;
|
||||
break;
|
||||
default:
|
||||
primLength = 0;
|
||||
break; // compute later when =0.
|
||||
}
|
||||
|
||||
@ -1027,25 +1021,6 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset)
|
||||
default:
|
||||
break; // unknown shape
|
||||
}
|
||||
/* const osg::DrawArrayLengths* drawArrayLengths = static_cast<const osg::DrawArrayLengths*>(primitiveset);
|
||||
unsigned int vindex = drawArrayLengths->getFirst();
|
||||
for(osg::DrawArrayLengths::const_iterator primItr = drawArrayLengths->begin(); primItr !=drawArrayLengths->end(); ++primItr)
|
||||
{
|
||||
unsigned int localPrimLength;
|
||||
if (primLength == 0) localPrimLength = *primItr;
|
||||
else localPrimLength = primLength;
|
||||
|
||||
for(GLsizei primCount = 0; primCount < *primItr; ++primCount)
|
||||
{
|
||||
if ((primCount%localPrimLength)==0)
|
||||
{
|
||||
OutputSurfHead(iCurrentMaterial,surfaceFlags,localPrimLength, fout);
|
||||
}
|
||||
OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);
|
||||
++vindex;
|
||||
}
|
||||
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
case(osg::PrimitiveSet::DrawElementsUBytePrimitiveType):
|
||||
@ -1074,24 +1049,6 @@ void Geode::ProcessGeometry(ostream& fout, const unsigned int ioffset)
|
||||
default:
|
||||
break; // unknown shape
|
||||
}
|
||||
/* if (primLength == 0)
|
||||
primLength = primitiveset->getNumIndices();
|
||||
|
||||
const osg::DrawElementsUByte* drawElements = static_cast<const osg::DrawElementsUByte*>(primitiveset);
|
||||
|
||||
unsigned int primCount = 0;
|
||||
for(osg::DrawElementsUByte::const_iterator primItr=drawElements->begin(); primItr!=drawElements->end(); ++primCount,++primItr)
|
||||
{
|
||||
|
||||
if ((primCount%primLength) == 0)
|
||||
{
|
||||
OutputSurfHead(iCurrentMaterial,surfaceFlags,primLength, fout);
|
||||
}
|
||||
|
||||
unsigned int vindex=*primItr;
|
||||
OutputVertex(vindex, pVertexIndices, pTexCoords, pTexIndices, fout);
|
||||
}
|
||||
*/
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -225,6 +225,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string>
|
||||
|
||||
#include "FlexLexer.h"
|
||||
@ -2245,6 +2246,11 @@ bool CameraConfig::parseFile( const std::string &file )
|
||||
|
||||
int pd[2];
|
||||
int result = pipe( pd );
|
||||
if (result<0)
|
||||
{
|
||||
fprintf( stderr, "CameraConfig::parseFile() - pipe() failed, errno= \"%d\".\n", errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
flexer = new yyFlexLexer;
|
||||
if( fork() == 0 )
|
||||
@ -2252,7 +2258,12 @@ bool CameraConfig::parseFile( const std::string &file )
|
||||
// we don't want to read from the pipe in the child, so close it.
|
||||
close( pd[0] );
|
||||
close( 1 );
|
||||
result = dup( pd[1] );
|
||||
int result = dup( pd[1] );
|
||||
if (result<0)
|
||||
{
|
||||
fprintf( stderr, "CameraConfig::parseFile() - dup() failed, errno= \"%d\".\n", errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* This was here to allow reading a config file from stdin.
|
||||
@ -2270,7 +2281,12 @@ bool CameraConfig::parseFile( const std::string &file )
|
||||
{
|
||||
close( pd[1]);
|
||||
close( 0 );
|
||||
result = dup( pd[0] );
|
||||
int result = dup( pd[0] );
|
||||
if (result<0)
|
||||
{
|
||||
fprintf( stderr, "CameraConfig::parseFile() - dup() failed, errno= \"%d\".\n", errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
cfg = this;
|
||||
|
||||
|
@ -311,13 +311,11 @@ osg::Image* ReadDDSFile(std::istream& _istream)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool is3dImage = false;
|
||||
int depth = 1;
|
||||
|
||||
// Check for volume image
|
||||
if( ddsd.dwDepth > 0 && (ddsd.dwFlags & DDSD_DEPTH))
|
||||
{
|
||||
is3dImage = true;
|
||||
depth = ddsd.dwDepth;
|
||||
}
|
||||
|
||||
@ -718,7 +716,6 @@ bool WriteDDSFile(const osg::Image *img, std::ostream& fout)
|
||||
//unsigned int components = osg::Image::computeNumComponents(pixelFormat);
|
||||
unsigned int pixelSize = osg::Image::computePixelSizeInBits(pixelFormat, dataType);
|
||||
unsigned int imageSize = img->getImageSizeInBytes();
|
||||
bool is3dImage = false;
|
||||
|
||||
ddsd.dwWidth = img->s();
|
||||
ddsd.dwHeight = img->t();
|
||||
@ -726,7 +723,6 @@ bool WriteDDSFile(const osg::Image *img, std::ostream& fout)
|
||||
|
||||
if(r > 1) /* check for 3d image */
|
||||
{
|
||||
is3dImage = true;
|
||||
ddsd.dwDepth = r;
|
||||
SD_flags |= DDSD_DEPTH;
|
||||
CAPS_flags |= DDSCAPS_COMPLEX;
|
||||
|
@ -98,7 +98,7 @@ bool HDRLoader::load(const char *_fileName, const bool _rawRGBE, HDRLoaderResult
|
||||
}
|
||||
fseek(file, 1, SEEK_CUR);
|
||||
|
||||
char cmd[2000];
|
||||
//char cmd[2000];
|
||||
i = 0;
|
||||
char c = 0, oldc;
|
||||
while(true) {
|
||||
@ -106,7 +106,7 @@ bool HDRLoader::load(const char *_fileName, const bool _rawRGBE, HDRLoaderResult
|
||||
c = fgetc(file);
|
||||
if (c == 0xa && oldc == 0xa)
|
||||
break;
|
||||
cmd[i++] = c;
|
||||
//cmd[i++] = c;
|
||||
}
|
||||
|
||||
char reso[2000];
|
||||
|
@ -28,7 +28,6 @@ void ShapeAttributeList::write(DataOutputStream* out)
|
||||
out->writeUInt(size());
|
||||
|
||||
// Write elements of the list
|
||||
osgSim::ShapeAttributeList::const_iterator it = begin();
|
||||
for (const_iterator it = begin(); it != end(); it++)
|
||||
{
|
||||
write(out, *it);
|
||||
|
@ -38,7 +38,6 @@ extern "C" {
|
||||
jas_matrix_t *data[4];
|
||||
jas_seqent_t *d[4];
|
||||
jas_seqent_t v;
|
||||
int linelen;
|
||||
int width, height;
|
||||
|
||||
width = jas_image_cmptwidth(image, 0);
|
||||
@ -64,7 +63,6 @@ extern "C" {
|
||||
}
|
||||
d[cmptno] = jas_matrix_getref(data[cmptno], 0, 0);
|
||||
}
|
||||
linelen = 0;
|
||||
for (x = 0; x < width; ++x) {
|
||||
for (cmptno = 0; cmptno < numcmpts; ++cmptno) {
|
||||
v = *d[cmptno];
|
||||
|
@ -2118,8 +2118,6 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly
|
||||
|
||||
osgDB::FilePathList previousPaths = osgDB::getDataFilePathList();
|
||||
|
||||
bool readSlide = false;
|
||||
|
||||
for(osgDB::XmlNode::Children::iterator itr = root->children.begin();
|
||||
itr != root->children.end();
|
||||
++itr)
|
||||
@ -2242,13 +2240,11 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly
|
||||
}
|
||||
else if (readOnlyHoldingPage && cur->name == "holding_slide")
|
||||
{
|
||||
readSlide = true;
|
||||
constructor.addSlide();
|
||||
parseSlide (constructor, cur);
|
||||
}
|
||||
else if (!readOnlyHoldingPage && cur->name == "slide")
|
||||
{
|
||||
readSlide = true;
|
||||
constructor.addSlide();
|
||||
|
||||
std::string inherit;
|
||||
@ -2266,7 +2262,6 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly
|
||||
}
|
||||
else if (!readOnlyHoldingPage && cur->name == "modify_slide")
|
||||
{
|
||||
readSlide = true;
|
||||
int slideNum;
|
||||
if (getProperty(cur, "slide", slideNum))
|
||||
{
|
||||
@ -2280,17 +2275,14 @@ osg::Node* ReaderWriterP3DXML::parseXmlGraph(osgDB::XmlNode* root, bool readOnly
|
||||
}
|
||||
else if (!readOnlyHoldingPage && cur->name == "page")
|
||||
{
|
||||
readSlide = true;
|
||||
parsePage (constructor, cur);
|
||||
}
|
||||
else if (!readOnlyHoldingPage && cur->name == "pdf_document")
|
||||
{
|
||||
readSlide = true;
|
||||
parsePdfDocument(constructor, cur);
|
||||
}
|
||||
else if (!readOnlyHoldingPage && cur->name == "template_slide")
|
||||
{
|
||||
readSlide = true;
|
||||
std::string name;
|
||||
if (getProperty(cur, "name", name))
|
||||
{
|
||||
|
@ -152,7 +152,6 @@ public:
|
||||
uint32_t formatFlags = header.flags & PVR_TEXTURE_FLAG_TYPE_MASK;
|
||||
GLenum internalFormat = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
|
||||
uint32_t width, height;
|
||||
bool hasAlpha;
|
||||
|
||||
if(formatFlags == kPVRTextureFlagTypePVRTC_4 || formatFlags == kPVRTextureFlagTypePVRTC_2 ||
|
||||
formatFlags == kPVRTextureFlagTypeOGLPVRTC_4 || formatFlags == kPVRTextureFlagTypeOGLPVRTC_2 ||
|
||||
@ -166,12 +165,7 @@ public:
|
||||
|
||||
width = header.width;
|
||||
height = header.height;
|
||||
|
||||
if(header.bitmaskAlpha)
|
||||
hasAlpha = true;
|
||||
else
|
||||
hasAlpha = false;
|
||||
|
||||
|
||||
osg::ref_ptr<osg::Image> image = new osg::Image;
|
||||
if (!image) return ReadResult::INSUFFICIENT_MEMORY_TO_LOAD;
|
||||
|
||||
|
@ -611,10 +611,6 @@ bool trpgGeometry::Write(trpgWriteBuffer &buf)
|
||||
for (j=0;j<(unsigned int)num*2;j++)
|
||||
buf.Add(td.doubleData[j]);
|
||||
buf.End();
|
||||
|
||||
float u;
|
||||
for (j=0;j<(unsigned int)num*2;j++)
|
||||
u = (float)td.doubleData[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ int trpgMatTable::AddMaterial(const trpgMaterial &mat,bool lookForExisting)
|
||||
if (cmat.shadeModel>100) cmat.shadeModel=trpgMaterial::Smooth;
|
||||
|
||||
int baseMat=0;
|
||||
bool spaceInTable=false;
|
||||
//bool spaceInTable=false;
|
||||
//int offset=baseMat;
|
||||
|
||||
if (lookForExisting) {
|
||||
@ -112,7 +112,7 @@ int trpgMatTable::AddMaterial(const trpgMaterial &mat,bool lookForExisting)
|
||||
const trpgMaterial &bm = itr->second;
|
||||
if (bm.shadeModel==999) {
|
||||
// this is an 'empty' entry. Means we won't find it, either.
|
||||
spaceInTable=true;
|
||||
//spaceInTable=true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -258,13 +258,9 @@ bool trpgr_Archive::ReadHeader(bool readAllBlocks)
|
||||
if(header.GetIsMaster())
|
||||
{
|
||||
// bool firstBlock = true;
|
||||
bool headerHasTexTable = false;
|
||||
//if the master has textures, we want to use them instead of the tables in the
|
||||
//block archives
|
||||
int numTex = 0;
|
||||
texTable.GetNumTextures(numTex);
|
||||
if(numTex)
|
||||
headerHasTexTable = true;
|
||||
|
||||
// int numTiles = 0;
|
||||
//tileTable.
|
||||
int totalrows,totalcols;
|
||||
|
@ -357,7 +357,6 @@ osg::Image* ReadVTFFile(std::istream& _istream)
|
||||
int s, t, r;
|
||||
unsigned int lrSize;
|
||||
unsigned char * imageData;
|
||||
unsigned int base;
|
||||
unsigned int size;
|
||||
int mip;
|
||||
int mipSize;
|
||||
@ -498,7 +497,7 @@ osg::Image* ReadVTFFile(std::istream& _istream)
|
||||
}
|
||||
|
||||
// Compute the base position of the high-res image data
|
||||
base = vtf_header.header_size + lrSize;
|
||||
// unsigned int base = vtf_header.header_size + lrSize;
|
||||
|
||||
// Now, get the internal format, pixel format, and data type from the
|
||||
// full-size image format, and check whether the format is supported
|
||||
|
@ -88,7 +88,6 @@ bool ZipArchive::getFileNames(osgDB::Archive::FileNameList& fileNameList) const
|
||||
if(mZipLoaded)
|
||||
{
|
||||
ZipEntryMap::const_iterator iter = mZipIndex.begin();
|
||||
ZipEntryMap::const_iterator iterEnd = mZipIndex.end();
|
||||
|
||||
for(;iter != mZipIndex.end(); ++iter)
|
||||
{
|
||||
|
@ -4042,8 +4042,6 @@ ZRESULT TUnzip::Get(int index,ZIPENTRY *ze)
|
||||
_tcsncpy_s(ze->name,MAX_PATH, sfn,MAX_PATH);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
unsigned long a = ufi.external_fa;
|
||||
// zip has an 'attribute' 32bit value. Its lower half is windows stuff
|
||||
// its upper half is standard unix stat.st_mode. We'll start trying
|
||||
@ -4052,15 +4050,11 @@ ZRESULT TUnzip::Get(int index,ZIPENTRY *ze)
|
||||
bool readonly= (a&0x00800000)==0;
|
||||
//bool readable= (a&0x01000000)!=0; // unused
|
||||
//bool executable=(a&0x00400000)!=0; // unused
|
||||
bool hidden=false, system=false, archive=true;
|
||||
// but in normal hostmodes these are overridden by the lower half...
|
||||
int host = ufi.version>>8;
|
||||
if (host==0 || host==7 || host==11 || host==14)
|
||||
{ readonly= (a&0x00000001)!=0;
|
||||
hidden= (a&0x00000002)!=0;
|
||||
system= (a&0x00000004)!=0;
|
||||
isdir= (a&0x00000010)!=0;
|
||||
archive= (a&0x00000020)!=0;
|
||||
}
|
||||
// readonly; hidden; system; isdir; archive;
|
||||
ze->attr=0;
|
||||
@ -4069,10 +4063,18 @@ ZRESULT TUnzip::Get(int index,ZIPENTRY *ze)
|
||||
if (isdir) ze->attr |= S_IFDIR;
|
||||
if (readonly) ze->attr &= ~S_IWUSR;
|
||||
#else
|
||||
bool hidden=false, system=false, archive=true;
|
||||
if (host==0 || host==7 || host==11 || host==14)
|
||||
{
|
||||
hidden= (a&0x00000002)!=0;
|
||||
system= (a&0x00000004)!=0;
|
||||
archive= (a&0x00000020)!=0;
|
||||
}
|
||||
|
||||
if (isdir) ze->attr |= FILE_ATTRIBUTE_DIRECTORY;
|
||||
if (readonly) ze->attr|=FILE_ATTRIBUTE_READONLY;
|
||||
if (archive) ze->attr|=FILE_ATTRIBUTE_ARCHIVE;
|
||||
if (hidden) ze->attr|=FILE_ATTRIBUTE_HIDDEN;
|
||||
if (readonly) ze->attr|=FILE_ATTRIBUTE_READONLY;
|
||||
if (system) ze->attr|=FILE_ATTRIBUTE_SYSTEM;
|
||||
#endif
|
||||
ze->comp_size = ufi.compressed_size;
|
||||
|
@ -341,10 +341,7 @@ bool QGraphicsViewAdapter::handlePointerEvent(int x, int y, int buttonMask)
|
||||
(middleButtonPressed ? Qt::MidButton : Qt::NoButton) |
|
||||
(rightButtonPressed ? Qt::RightButton : Qt::NoButton);
|
||||
|
||||
const QRect viewportGeometry = _graphicsView->viewport()->geometry();
|
||||
const QPoint globalPos(x, y);
|
||||
|
||||
|
||||
|
||||
if (buttonMask != _previousButtonMask)
|
||||
{
|
||||
|
@ -590,7 +590,7 @@ void ParallelSplitShadowMap::cull(osgUtil::CullVisitor& cv){
|
||||
osg::ComputeBoundsVisitor cbbv(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
|
||||
cbbv.setTraversalMask(getShadowedScene()->getCastsShadowTraversalMask());
|
||||
_shadowedScene->osg::Group::traverse(cbbv);
|
||||
osg::BoundingBox bb = cbbv.getBoundingBox();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
const osg::Light* selectLight = 0;
|
||||
|
||||
|
@ -774,9 +774,6 @@ void GeometryTechnique::generateGeometry(BufferData& buffer, Locator* masterLoca
|
||||
|
||||
float sampleRatio = terrain ? terrain->getSampleRatio() : 1.0f;
|
||||
|
||||
double i_sampleFactor = 1.0;
|
||||
double j_sampleFactor = 1.0;
|
||||
|
||||
// OSG_NOTICE<<"Sample ratio="<<sampleRatio<<std::endl;
|
||||
|
||||
unsigned int minimumNumColumns = 16u;
|
||||
@ -789,9 +786,6 @@ void GeometryTechnique::generateGeometry(BufferData& buffer, Locator* masterLoca
|
||||
|
||||
numColumns = std::max((unsigned int) (float(originalNumColumns)*sqrtf(sampleRatio)), minimumNumColumns);
|
||||
numRows = std::max((unsigned int) (float(originalNumRows)*sqrtf(sampleRatio)),minimumNumRows);
|
||||
|
||||
i_sampleFactor = double(originalNumColumns-1)/double(numColumns-1);
|
||||
j_sampleFactor = double(originalNumRows-1)/double(numRows-1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,8 +71,6 @@ struct FadeTextPolytopeData : public FadeTextData, public osg::Polytope
|
||||
{
|
||||
osg::Vec3d edge01 = _vertices[1] - _vertices[0];
|
||||
osg::Vec3d edge12 = _vertices[2] - _vertices[1];
|
||||
osg::Vec3d edge23 = _vertices[3] - _vertices[2];
|
||||
osg::Vec3d edge30 = _vertices[0] - _vertices[3];
|
||||
|
||||
osg::Vec3d normalFrontFace = edge01 ^ edge12;
|
||||
bool needToFlip = normalFrontFace.z()>0.0f;
|
||||
@ -89,7 +87,6 @@ struct FadeTextPolytopeData : public FadeTextData, public osg::Polytope
|
||||
OSG_NOTICE<<" normalFrontFace = "<<normalFrontFace<<std::endl;
|
||||
OSG_NOTICE<<" edge01 = "<<edge01<<std::endl;
|
||||
OSG_NOTICE<<" edge12 = "<<edge12<<std::endl;
|
||||
OSG_NOTICE<<" edge23 = "<<edge23<<std::endl;
|
||||
OSG_NOTICE<<" _vertices[0]= "<<_vertices[0]<<std::endl;
|
||||
OSG_NOTICE<<" _vertices[1]= "<<_vertices[1]<<std::endl;
|
||||
OSG_NOTICE<<" _vertices[2]= "<<_vertices[2]<<std::endl;
|
||||
|
@ -753,6 +753,8 @@ void Text::computeBackdropPositions(unsigned int contextID) const
|
||||
// Since we tend to loop over contextID, we should cache this value some how
|
||||
// instead of recomputing it each time.
|
||||
is_valid_size = computeAverageGlyphWidthAndHeight(avg_width, avg_height);
|
||||
|
||||
if (!is_valid_size) return;
|
||||
|
||||
// now apply matrix to the glyphs.
|
||||
for(TextureGlyphQuadMap::iterator titr=_textureGlyphQuadMap.begin();
|
||||
|
@ -566,7 +566,6 @@ Triangle_list fillHole(osg::Vec3Array *points, std::vector<unsigned int> vind
|
||||
|
||||
case osg::PrimitiveSet::TRIANGLE_FAN:
|
||||
{
|
||||
osg::Vec3 ptest=(*constraintverts)[prset->index(0)];
|
||||
if (prset->index(0)>=npts)
|
||||
{
|
||||
// this is an added point.
|
||||
@ -976,7 +975,6 @@ bool DelaunayTriangulator::triangulate()
|
||||
// 2 points on the constraint
|
||||
bool edgused=false;// first check for exact edge indices are used.
|
||||
Triangle_list::iterator titr;
|
||||
const osg::Vec3 curp=(*vercon)[prset->index(i)];
|
||||
int it=0;
|
||||
for (titr=triangles.begin(); titr!=triangles.end() && !edgused; ++titr)
|
||||
{
|
||||
|
@ -628,7 +628,6 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
|
||||
bool colorAttached = false;
|
||||
bool depthAttached = false;
|
||||
bool stencilAttached = false;
|
||||
for(osg::Camera::BufferAttachmentMap::iterator itr = bufferAttachments.begin();
|
||||
itr != bufferAttachments.end();
|
||||
++itr)
|
||||
@ -647,7 +646,6 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
case(osg::Camera::STENCIL_BUFFER):
|
||||
{
|
||||
traits->stencil = 8;
|
||||
stencilAttached = true;
|
||||
break;
|
||||
}
|
||||
case(osg::Camera::PACKED_DEPTH_STENCIL_BUFFER):
|
||||
@ -655,7 +653,6 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
traits->depth = 24;
|
||||
depthAttached = true;
|
||||
traits->stencil = 8;
|
||||
stencilAttached = true;
|
||||
}
|
||||
case(osg::Camera::COLOR_BUFFER):
|
||||
{
|
||||
|
@ -734,7 +734,6 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
|
||||
osg::Vec3d screenCenter = origin + widthVector*0.5f + heightVector*0.5f;
|
||||
float screenRadius = heightVector.length() * 0.5f;
|
||||
|
||||
osg::Vec3 cursor = bottom;
|
||||
int i,j;
|
||||
|
||||
if (centerProjection)
|
||||
@ -1114,10 +1113,6 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const osg::V
|
||||
osg::Vec2Array* texcoords1 = intensityMap==0 ? new osg::Vec2Array : 0;
|
||||
osg::Vec4Array* colors = new osg::Vec4Array;
|
||||
|
||||
osg::Vec3 bottom = origin;
|
||||
osg::Vec3 dx = xAxis*(width/((float)(noSteps-2)));
|
||||
osg::Vec3 dy = yAxis*(height/((float)(noSteps-1)));
|
||||
|
||||
osg::Vec3 top = origin + yAxis*height;
|
||||
|
||||
osg::Vec3 screenCenter = origin + widthVector*0.5f + heightVector*0.5f;
|
||||
@ -1127,7 +1122,6 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const osg::V
|
||||
|
||||
for(int i=0;i<noSteps;++i)
|
||||
{
|
||||
osg::Vec3 cursor = bottom+dy*(float)i;
|
||||
for(int j=0;j<noSteps;++j)
|
||||
{
|
||||
osg::Vec2 texcoord(double(i)/double(noSteps-1), double(j)/double(noSteps-1));
|
||||
|
@ -121,7 +121,6 @@ void FixedFunctionTechnique::init()
|
||||
float alphaFuncValue = 0.1;
|
||||
|
||||
osg::Image* image_3d = 0;
|
||||
osg::TransferFunction1D* tf = 0;
|
||||
osgVolume::Locator* masterLocator = _volumeTile->getLocator();
|
||||
osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;
|
||||
|
||||
@ -138,11 +137,6 @@ void FixedFunctionTechnique::init()
|
||||
alphaFuncValue = cpv._isoProperty->getValue();
|
||||
}
|
||||
|
||||
if (cpv._tfProperty.valid())
|
||||
{
|
||||
tf = dynamic_cast<osg::TransferFunction1D*>(cpv._tfProperty->getTransferFunction());
|
||||
}
|
||||
|
||||
if (cpv._afProperty.valid())
|
||||
{
|
||||
alphaFuncValue = cpv._afProperty->getValue();
|
||||
|
Loading…
Reference in New Issue
Block a user