Commit Graph

8032 Commits

Author SHA1 Message Date
Robert Osfield
6128300bc5 In the RecordCameraPathhandler fixed the handling of pressing 'Z' before 'z' which was causing the view
to be reset to 0,0,0 by AnimationPathManipualtor with an empty AnimationPath.
2011-07-22 08:25:29 +00:00
Robert Osfield
9f4fee5fd3 From Mathias Froehlich, "I have attached an updated version of the VRML2 loader.
That change is the result of the '[osgPlugins] VRML plugin - "file" url'
discussion on osg-users.

The attached change avoids rewriting file names into some kind of file urls
and then use the url for opening an fstream. Instead just use the given file
name to open the stream.
Also this change adds some Notify output for the error paths.
"
2011-07-21 09:07:22 +00:00
Robert Osfield
f07a1a91c8 From Claus Scheiblauer, fixed handling of horizontal mouse wheel events. 2011-07-20 10:17:19 +00:00
Robert Osfield
1838707627 Introduced workaround for problem of text that is scaled in screen coords, but hasn't been rendered yet
so doesn't have knowledge of screen space yet, so assume that scaling is 1 rather than 0 as was previously
assumed in the previous handling of screen space text.
2011-07-20 09:10:32 +00:00
Robert Osfield
09b5e95d65 Changed the HAVE_CONFIG_H guard so that it uses #ifndef _MSC_VER rather than _WIN32 to avoid problems with Mingw and Cygwin builds of DCMTK. 2011-07-18 09:40:58 +00:00
Robert Osfield
b59ab789a3 From Alberto Luacas, typo fixes 2011-07-17 16:24:47 +00:00
Robert Osfield
9c876964a5 From Wang Rui, improved the handling of the _preReadString within the readWrappedString method by factoring the
reading of the next character into a dedicated getCharacter(..) method.
2011-07-17 10:30:40 +00:00
Robert Osfield
f0bdbea926 From Wang Rui, "I've found that the latest ffmpeg made some functions and macros
deprecated, which led to compilation errors in the OSG plugin. I tried
fixing them and tested with the version ffmpeg-git-5d4fd1d (ffmpeg
version > 0.8, libavcodec = 53.7.0) under Windows.
"
2011-07-15 10:24:23 +00:00
Robert Osfield
fb29f83255 From Wang Rui,"The files attached should be separately put into the directories
src/osgPlugins/osg and src/osgWrappers/serializers/osgSim. They fix a
serious infinite loop problem that may be caused by the stream buffer
mechanism under Windows and some osgSim wrapper bugs pointed by
Andreas. I've asked the community to help test them and hope now we
can solve these recent .osgt file reading issues."
2011-07-15 09:14:16 +00:00
Robert Osfield
5bfa112183 From Ryan Pavlik, "Fix inventor state copy constructor.
Clang warning:
    In file included from src/osgPlugins/Inventor/ConvertToInventor.cpp:80:
    src/osgPlugins/Inventor/ConvertToInventor.h:117:71: warning: field is uninitialized when used here [-Wuninitialized]
            osgTexGenS(s.osgTexGenS), osgTexGenT(s.osgTexGenT), osgTexGen(osgTexGen),
                                                                          ^"
2011-07-15 08:43:47 +00:00
Robert Osfield
a53dd7d744 From Philip Lamp, submitted by Stephan Huber, "Modify the ReaderWriteImageIO_IOS to correctly handle relative paths
when reading from a file. This means that no longer do all image files
have to live at the root of the Resources folder inside the app bundle,
but can now be organized inside folders. Also improved error handling
and fixed a potential leak of a CGColorSpaceRef each once per image load."
2011-07-15 08:32:04 +00:00
Robert Osfield
b6fa087fe2 Converted tabs to four spaces 2011-07-15 08:16:58 +00:00
Robert Osfield
ae2b8c4130 Added #if lib curl version check around #include <curl/types.h> as this header was deprecated and now
removed entirely from libcurl-7.21.7.
2011-06-28 07:23:52 +00:00
Robert Osfield
2de3f08fd3 From Wang Rui, "I've found a small problem which causes crashes in the 3ds plugin
while trying to load a model. The fix here will ensure that the
texture map is valid and everything could work well then."
2011-06-28 07:22:09 +00:00
Robert Osfield
e1bae2701a Tweaked the comments 2011-06-27 21:33:38 +00:00
Robert Osfield
0f9f891f72 From Jean-Sebestien Guay, workaround for bug under windows with the seek implementation when handling ascii files with unix file endings. 2011-06-27 21:32:20 +00:00
Robert Osfield
3979eb7755 From Andreas Eskland, "I found that a binary PNM file couldn't be read by the PNM plugin in the 3.0 branch. Attached is a small fix in ReaderWriterPNM.cpp, simply opening the file in binary mode." 2011-06-25 20:51:58 +00:00
Robert Osfield
eed9e9f7e1 Fixed memory growth issue when using Texture2D::SubloadCallbacks that don't set the TextureObjects sizes. 2011-06-25 11:00:33 +00:00
Robert Osfield
a9658dbd4d Removed redundent assert and associated variables to fix warnings. 2011-06-24 16:15:47 +00:00
Robert Osfield
d6a3ac647b Implemented missing writeShader 2011-06-24 15:04:16 +00:00
Robert Osfield
f68c2246fc From Martin Innus, fixed erroneous change of INTEGER to UNKNOWN, reverting back to INTEGER. 2011-06-24 13:35:20 +00:00
Robert Osfield
5fd1ece440 Implemented missing Archive::readShader/writeShader, and added searching of the archive list in Registr::read() so that files
that are stored in the archives can be found.
2011-06-24 12:40:18 +00:00
Robert Osfield
0a48e99a25 From Ulrich Hertlein, "While we're on osgSim/ShapeAttribute, here's a fix that fixes the 'UNKNOW' typo and some
doxygen"
2011-06-24 08:32:25 +00:00
Robert Osfield
41a6d949c2 From Wang Rui, "I've modified the code to handle -1.#IND and other kinds of infinite
values. Please see the attachments for details"
2011-06-24 08:13:58 +00:00
Robert Osfield
8e2857905f Fixed warnings generated by clang,
src/osgAnimation/Skeleton.cpp:25:87: warning: addition of default argument on redeclaration makes this constructor a copy constructor [-Wdefault-arg-special-member]
Skeleton::UpdateSkeleton::UpdateSkeleton(const UpdateSkeleton& us, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : osg::Object(us, copyop), osg::NodeCallback(us, copyop)

/src/OpenThreads/pthreads/PThread.cpp:1024:15: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (cpunum<0) return -1;

src/osgDB/ExternalFileWriter.cpp:221:122: warning: expression result unused [-Wunused-value]
    _objects.insert(ObjectsSet::value_type(&obj, ObjectData(absoluteDestinationPath, relativeDestinationPath, written))).first;

src/osgManipulator/Dragger.cpp:175:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if (*itr = constraint) return;

src/osgManipulator/Dragger.cpp:187:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if (*itr = constraint)
2011-06-23 19:58:52 +00:00
Robert Osfield
fa40366ae4 Warning fixes for:
OpenSceneGraph/src/osgPlugins/Inventor/ConvertFromInventor.cpp: In member function ?virtual SbBool SoVRMLImageTextureOsg::readInstance(SoInput*, short unsigned int)?:
OpenSceneGraph/src/osgPlugins/Inventor/ConvertFromInventor.cpp:1264:16: warning: variable ?retval? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp: In member function ?void ac3d::Geode::ProcessGeometry(std::ostream&, unsigned int)?:
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:806:35: warning: variable ?fRep_s? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:806:43: warning: variable ?fRep_t? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:807:35: warning: variable ?fOffset_s? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgPlugins/ac/Geode.cpp:807:46: warning: variable ?fOffset_t? set but not used [-Wunused-but-set-variable]
OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp: In member function ?virtual void osgViewer::GraphicsWindowX11::checkEvents()?:
OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp:1181:10: warning: variable ?destroyWindowRequested? set but not used [-Wunused-but-set-variable]
2011-06-23 18:24:07 +00:00
Robert Osfield
c617ea0163 Fixed virtual method mismtaches between subclasses and parent classes. 2011-06-23 16:36:36 +00:00
Robert Osfield
00cf10be35 Added better handling of archives in ReaderWriterZip::readNode() so that if there is no master file definition it
loads all the available nodes in the zip archive and returns an osg::Group containing all the nodes if there is more
than one, or just returns the node if there is just one.  Also implemented this functionality for ReaderWriterZip::readImage().
2011-06-23 15:37:35 +00:00
Robert Osfield
7455f6265c Fixed warnings.
OpenSceneGraph/src/osgGA/NodeTrackerManipulator.cpp:32:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgGA/TerrainManipulator.cpp:31:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgSim/ShapeAttribute:99:9: warning: base class ?class std::vector<osgSim::ShapeAttribute>? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::gi?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::byte_before_the_zipfile?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::num_file?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pos_in_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::current_file_ok?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::central_pos?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::size_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::offset_central_dir?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::cur_file_info_internal?
OpenSceneGraph/src/osgPlugins/zip/unzip.cpp:3102:14: warning: missing initializer for member ?unz_s::pfile_in_zip_read?
OpenSceneGraph/src/osgViewer/CompositeViewer.cpp:30:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/View.cpp:159:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
OpenSceneGraph/src/osgViewer/Viewer.cpp:196:1: warning: base class ?class osgViewer::ViewerBase? should be explicitly initialized in the copy constructor
OpenSceneGraph/include/osgManipulator/Dragger:47:9: warning: base class ?class osg::Object? should be explicitly initialized in the copy constructor
2011-06-23 11:09:49 +00:00
Robert Osfield
8570c37ed5 From Ryan Pavlik, "I have successfully compiled OpenSceneGraph trunk using the Clang compiler (using a recent trunk build of llvm and clang, haven't tested an older release). The attached files contain the change shown in the diff below, which was required to finish the build with Clang. It fixes an issue with two-phase name lookup - there's more information here http://blog.llvm.org/2009/12/dreaded-two-phase-name-lookup.html
"
2011-06-23 09:26:27 +00:00
Robert Osfield
5ee864ff25 From Dimi Christopoulos, "I attach a fixed version of mipmap.cpp which produced a lot of warning on my gcc
compiler."
2011-06-23 09:22:23 +00:00
Robert Osfield
fa26facba9 Converted tabs to four spaces 2011-06-23 07:13:13 +00:00
Robert Osfield
30becd5ed3 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]
2011-06-22 12:30:01 +00:00
Robert Osfield
6783dcff17 Fixed regression in --run-on-demand feature 2011-06-22 09:12:12 +00:00
Robert Osfield
99b9eff9f4 Removed assert() that always evaluated to true. 2011-06-21 17:26:40 +00:00
Robert Osfield
111a4a9274 Added returns to end of files 2011-06-21 09:54:57 +00:00
Robert Osfield
e3c89d7f60 Added return to end of file 2011-06-21 09:54:23 +00:00
Robert Osfield
f38a855a73 Conveted tabs to four spaces and added a return to end of file 2011-06-21 09:53:34 +00:00
Michael PLATINGS
dc123461c7 Fixed redundant "enumeration not handled in switch" warnings.
Fixed a warning about a comparison between different enums - EUnifiedMappingType was being compared with EMappingType. In general the FBX SDK is moving away from Get & Set functions to giving direct access to properties, so I have changed GetMappingType() to CurrentMappingType.Get()
2011-06-21 09:29:32 +00:00
Robert Osfield
90a88488d3 Disabled VisualStudio warning warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable 2011-06-21 09:00:01 +00:00
Robert Osfield
7f9e1c5a6f Fixed a range of issues reported by cppcheck:
[examples/osgphotoalbum/PhotoArchive.cpp:56]: (error) Memory leak: fileIndentifier
[examples/osgphotoalbum/PhotoArchive.cpp:257]: (error) Deallocating a deallocated pointer: newData
[examples/osgphotoalbum/PhotoArchive.cpp:318]: (error) Deallocating a deallocated pointer: newData
[src/osg/ImageUtils.cpp:116]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:307]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:312]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:367]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:399]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:400]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:482]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:483]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:484]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:519]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/ImageUtils.cpp:536]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:71]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:74]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:77]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:82]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:102]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:107]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:599]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:600]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:601]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:602]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:603]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:604]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:605]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osg/OcclusionQueryNode.cpp:606]: (portability) Extra qualification 'osg::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:134]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:135]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:136]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:137]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:139]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:177]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:178]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:195]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:198]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:203]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:205]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/ExternalFileWriter.cpp:253]: (portability) Extra qualification 'osgDB::' unnecessary and considered an error by many compilers.
[src/osgDB/InputStream.cpp:553]: (error) Memory leak: data
[src/osgDB/OutputStream.cpp:393]: (error) Memory leak: data
[src/osgPlugins/Inventor/ConvertToInventor.cpp:656]: (error) Mismatching allocation and deallocation: tmpArray
[src/osgPlugins/Inventor/ReaderWriterIV.cpp:237]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure
[src/osgPlugins/OpenFlight/expGeometryRecords.cpp:167]: (portability) Extra qualification 'flt::' unnecessary and considered an error by many compilers.
[src/osgPlugins/OpenFlight/expGeometryRecords.cpp:373]: (portability) Extra qualification 'flt::' unnecessary and considered an error by many compilers.
[src/osgPlugins/cfg/CameraConfig.cpp:635]: (error) Unusual pointer arithmetic
[src/osgPlugins/freetype/FreeTypeLibrary.cpp:122]: (error) Memory leak: buffer
[src/osgPlugins/geo/ReaderWriterGEO.cpp:210]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 211
[src/osgPlugins/geo/ReaderWriterGEO.cpp:227]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 228
[src/osgPlugins/geo/ReaderWriterGEO.cpp:903]: (error) Possible null pointer dereference: gfd - otherwise it is redundant to check if gfd is null at line 904
[src/osgPlugins/geo/osgGeoNodes.h:180]: (error) Memory leak: geoHeaderGeo::intVars
[src/osgPlugins/geo/osgGeoNodes.h:181]: (error) Memory leak: geoHeaderGeo::useVars
[src/osgPlugins/geo/osgGeoNodes.h:182]: (error) Memory leak: geoHeaderGeo::extVars
[src/osgPlugins/md2/ReaderWriterMD2.cpp:180]: (error) Memory leak: mapbase
[src/osgPlugins/md2/ReaderWriterMD2.cpp:166]: (error) Resource leak: file_fd
[src/osgPlugins/pic/ReaderWriterPIC.cpp:152]: (error) Mismatching allocation and deallocation: tmpbuf
[src/osgPlugins/pic/ReaderWriterPIC.cpp:153]: (error) Mismatching allocation and deallocation: buffer
[src/osgPlugins/ply/plyfile.cpp:843]: (error) Memory leak: plyfile
[src/osgPlugins/pvr/ReaderWriterPVR.cpp:179]: (error) Memory leak: imageData
[src/osgPlugins/shp/ESRIShapeParser.cpp:29]: (error) Resource leak: fd
[src/osgPlugins/shp/XBaseParser.cpp:96]: (error) Resource leak: fd
[src/osgPlugins/zip/unzip.cpp:3158]: (error) Possible null pointer dereference: s - otherwise it is redundant to check if s is null at line 3159
[src/osgPlugins/zip/unzip.cpp:4155]: (error) Dangerous usage of 'rd' (strncpy doesn't always 0-terminate it)
[src/osgShadow/MinimalCullBoundsShadowMap.cpp:334]: (error) Possible null pointer dereference: rl - otherwise it is redundant to check if rl is null at line 331
[src/osgViewer/ScreenCaptureHandler.cpp:617]: (error) Possible null pointer dereference: camera - otherwise it is redundant to check if camera is null at line 611
[src/osgViewer/ScreenCaptureHandler.cpp:632]: (error) Possible null pointer dereference: camera - otherwise it is redundant to check if camera is null at line 626
[src/osgVolume/Locator.cpp:209]: (error) Dangerous iterator usage after erase()-method.
[src/osgVolume/RayTracedTechnique.cpp:274]: (error) Possible null pointer dereference: imageLayer - otherwise it is redundant to check if imageLayer is null at line 259
[src/osgVolume/RayTracedTechnique.cpp:275]: (error) Possible null pointer dereference: imageLayer - otherwise it is redundant to check if imageLayer is null at line 259
[src/osgWrappers/serializers/osg/ShaderBinary.cpp:28]: (error) Mismatching allocation and deallocation: data
2011-06-20 19:15:53 +00:00
Robert Osfield
20f334b6f8 Removed unneccesary namespace qualifiers, and issue picked out by cppcheck. 2011-06-20 14:09:49 +00:00
Robert Osfield
9781fe55ea From Farshid Lashkari, BGR write support for BMP, PNG and TGA 2011-06-20 12:36:53 +00:00
Robert Osfield
0392efafea Added catch for window manager doesn't set the window size to full screen. 2011-06-20 11:25:52 +00:00
Robert Osfield
0ff97d1350 Added check against Traits::overrideRedirct to prevent the fullscreen workaround being run when overrideRedirect
is on as overrideRedirect switches off the window managers ability to manage the fullscreen so the problem doesn't
need working around.
2011-06-20 09:28:39 +00:00
Robert Osfield
47146017ae Introduced a workaround for fullscreen toggle issues under modern X11 window managers. 2011-06-20 09:22:57 +00:00
Robert Osfield
8c37336fdc Added sleep before window resizing to make it less likely that the previous frames rendering traversal is still
running when the window(s) is resized, something that creates what looks like a glitch in rendering.
2011-06-20 09:20:39 +00:00
Robert Osfield
c6f4c26e31 Added extern "C" to fix build issues under OSX 2011-06-17 12:57:31 +00:00
Robert Osfield
9fee243b36 Updated OpenThreads version number for stable release 2011-06-17 11:02:40 +00:00
Robert Osfield
fde8b03b5c From Jan Peciva, "sending updated version of StencilTwoSided.
It supports now even GL_ATI_separate_stencil extension and there are more
OSG_INFOs to see, which API is used."
2011-06-17 09:05:48 +00:00
Robert Osfield
6881983562 Added GLES version checks to prevent build problems under GLES1 and GLES2 2011-06-17 08:47:36 +00:00
Robert Osfield
058123cd50 Refined the version checking 2011-06-17 08:42:54 +00:00
Robert Osfield
4c6cc601c2 Build fix 2011-06-17 08:41:56 +00:00
Robert Osfield
5a7f0b1f7d From Ulrich Hertlein, "the OS X/Cocoa implementation logs some debug junk on every key stroke. The attached
patch removes this."
2011-06-17 08:26:51 +00:00
Robert Osfield
c547172c24 Fixed warning 2011-06-17 06:22:01 +00:00
Robert Osfield
52aeb306d0 Fixed warnings 2011-06-17 06:09:25 +00:00
Robert Osfield
d5fa4dd272 Added disabling of VisualStudio warning C4324 : structure was padded due to __declspec(align()) 2011-06-17 05:57:29 +00:00
Robert Osfield
4dd0782549 Fixed warnings. 2011-06-16 18:43:58 +00:00
Robert Osfield
d970b9fa5f Added support for new InternalTextureFormatModes 2011-06-16 18:25:46 +00:00
Robert Osfield
7821968342 Added wider file extension support to ExternalFileWriter::generateObjectName 2011-06-16 18:12:55 +00:00
Robert Osfield
22dd032faa From Farshid Lashkari, "Attached is a small patch that adds support for writing BGR images to the DDS plugin." 2011-06-16 16:02:27 +00:00
Robert Osfield
27d4d5e4b9 From John Cummings, "While testing recent OSG developer releases and the subversion trunk, I
have noticed that on my 64-bit Linux machines, all of the OSG libraries
get installed into the "lib64" directory as I would expect. However, the
OpenThreads library gets installed into the "lib" directory when
selecting "Build OpenThreads with Qt threading support." That is, with
the BUILD_OPENTHREADS_WITH_QT set to ON.

I am attaching the a fix for this issue in the file:

src/OpenThreads/qt/CMakeLists.txt

It simply adds ${LIB_POSTFIX} to the destination as in done with all
other CMakeLists.txt with libraries in OSG. I have tested it on both
32-bit and 64-bit Linux."
2011-06-16 16:00:33 +00:00
Robert Osfield
38a807ae6e Windows warning fixes 2011-06-16 15:57:40 +00:00
Robert Osfield
93d1fedd0b Fixed indentation issues 2011-06-16 13:00:28 +00:00
Robert Osfield
375c1456f6 Improved indentation. 2011-06-16 10:05:49 +00:00
Robert Osfield
d0ccbf8219 Replaced tabs with four spaces 2011-06-16 08:59:48 +00:00
Robert Osfield
17b9cfad02 Improved the handling of compiling vs flushing deleted objects 2011-06-15 18:31:11 +00:00
Robert Osfield
e36f239917 Changed the key handling code to use EventQueue::getTime() rather then the theEvent timestamp. 2011-06-15 17:00:44 +00:00
Robert Osfield
f1c7e81eb3 Fixed blitting of FBO's with multiple render targets. 2011-06-15 09:36:34 +00:00
Robert Osfield
b6a15b2ef8 Added support osg::State::drawQuad(..) for number of vertices in quads to uint range rather than just ushort range. 2011-06-14 15:48:27 +00:00
Robert Osfield
5b3eed5dce Fixed issue with events having a negative delta of time between them. 2011-06-14 12:44:44 +00:00
Robert Osfield
6a6c5bccda Added GLBufferObject::computeBufferAlignment(..) method to enable buffer entries to be aligned along specified buffer alignment boundaries, currently defaulting to 4. 2011-06-14 10:15:12 +00:00
Robert Osfield
529ea4c94f From Stephan Huber, "attached you'll find a fix for the non-working useCursor()-method for
Windows. With the old code you can switch off the cursor, but not back on."
2011-06-14 09:16:44 +00:00
Robert Osfield
e1f5597167 Removed executable permission. 2011-06-14 09:11:58 +00:00
Robert Osfield
7f05605c16 Fixed wild card search when wild card filename includes a path. 2011-06-13 15:20:48 +00:00
Robert Osfield
c034333400 From Jeremy Moles, fixed style == operator. 2011-06-13 08:52:11 +00:00
Robert Osfield
0dbb4004d7 From Stephan Huber, build fix for IOS 2011-06-13 08:45:25 +00:00
Robert Osfield
22bc0391c7 Refactored the UserDataContainer so that the osg::UserDataContainer is now a pure virtual base class,
with a osg::DefaultUserDataContainer subclassed from this.  The user object access methods have now all
been moved from osg::Object into the UserDataContainer class, except for the set/getUserData() methods
that are left in osg::Object for backwards compatibility, and the description list access methods have
been moved back into osg::Node.

main UserObject access methods are now all def
2011-06-09 12:57:14 +00:00
Robert Osfield
1016092720 From Mathias Froehlich, "the attached patch adds an additional null pointer check" 2011-06-09 11:07:27 +00:00
Robert Osfield
2ddd53730e From Mathias Froehlich, "The attached patch adds the polygon primitive to the TangentSpace computation.
As far as I understand, this should just work for the polygon as well as with
the tristrip primitive.
"
2011-06-09 11:05:36 +00:00
Robert Osfield
86439123b4 Added support for creating a 3D Image from an image list.
Added support for reading a list of images in the Present3D <volume> tag.
2011-06-08 16:10:46 +00:00
Robert Osfield
973a9dee09 Introduced a less conservative near ratio. 2011-06-08 09:24:50 +00:00
Robert Osfield
9aa7010ded Added support for reading .osg, .osgb, .osgx, .osgt and .ive models that contain volumes from within the volume tag. 2011-06-07 20:24:49 +00:00
Robert Osfield
537272b98f Added support for .osgt, .osgb and .osgx plugins to osgvolume example 2011-06-07 16:17:35 +00:00
Robert Osfield
1f33e65c2a From Sukender, "Lastest change (update to FBX 2012.1) introduced a regression. It didn't take materials' order into consideration. The line
lMaterialLayer->GetDirectArray().SetAt(it->second.getIndex(), lMaterial);
has been replaced by
   _curFbxNode->AddMaterial(lMaterial);
because KFbxLayerElementMaterial::GetDirectArray() is now private and we can't access to it.
However, pushing back the material at the end of the vector is wrong.
We can use the (now) public attribute KFbxLayerElementMaterial::mDirectArray, as in this submission.
"
2011-06-07 14:28:58 +00:00
Robert Osfield
4f7903f732 From Mathias Froehlich, build fixes for legacy unix systems 2011-06-07 14:26:13 +00:00
Robert Osfield
7f9a6aa49d Added ability to subclass from osg::Object to provide custom user data functionality. A new UserDataContainer provides the
default implementation of the user data functionality.
2011-06-07 13:02:20 +00:00
Robert Osfield
848ec5e770 Added the return of the index position of the added UserObject 2011-06-07 09:28:38 +00:00
Robert Osfield
71a961ccc3 Added support for searching for user objects from a given startPosition in the UserDataContainer object. 2011-06-07 08:53:03 +00:00
Robert Osfield
3a5ef17ca7 From Frida Schlaug, "Imageio for ios had a poorly implemented function for reading from streams (always returning null). In this patch I copied some code from the non-ios imageio file and adjusted it to work on ios. " 2011-06-06 11:48:32 +00:00
Robert Osfield
985fdc8965 Added support for using the sampleDensityWhenMoving tag with all techniques 2011-06-03 13:47:59 +00:00
Robert Osfield
deed0a89fe Added extra check to make sure that _userDataContainer was available before copying it 2011-06-02 22:49:29 +00:00
Robert Osfield
b5d00a1450 Added support for new osg::Object user objects. 2011-06-02 22:05:10 +00:00
Robert Osfield
c703f39459 Introduced new user object support into osg::Object that allows assignment of a list of user objects to an osg::Object.
Refactored original UserData and Descriptions strings to be managed alongside the new user object suppport within
a single osg::Object::UserDataContainer.
2011-06-02 22:04:08 +00:00
Robert Osfield
2e03f53778 Added ref_ptr<> usage to avoid possible memory leak. 2011-06-02 20:38:13 +00:00
Robert Osfield
594b4bf873 From Dimi Christop, build fix for RHEL 4. 2011-05-30 13:02:13 +00:00
Robert Osfield
0201480582 Added closing of the _eventDisplay on failure of initializing the context properly. 2011-05-30 09:26:24 +00:00
Robert Osfield
4d09574ccd Fixed X11 related crash that occured when GraphicsWindow::setCursor was called right after viewer.realize();
The fix was to simply move the setting of the thread that has done the makeCurrent to right before the makeCurrent()
rather than right after.
2011-05-30 09:25:11 +00:00
Robert Osfield
60eaa68122 From Terry Welsh, "I was having a small culling problem with osgText... new TextBase.cpp that fixes it." 2011-05-30 08:24:34 +00:00
Robert Osfield
40fd093fb1 Reverted part of revision r12294 that introduced threading related problems under X11 due to checking the _display
Display member variable assigned to the graphics thread from the main thread.
2011-05-27 16:04:18 +00:00
Robert Osfield
0820be93d2 From Eric Sokolowsky, "Attached is an updated PNM plugin for inclusion in both the trunk and for release version 2.8.5. The attached file fixes numerous bugs in reading 8-bit and 16-bit images, including loading the images upside-down. This file also incorporates trunk patch r12220 which updated the plugin for reading and writing images through streams instead of C-style FILE I/O."
Note from Robert Osfield, previous revision was in error due to an incomplete merge, this revision completes the job.
2011-05-27 09:05:20 +00:00
Robert Osfield
fcd3150b12 From Laurens Voerman, "While working on the osg exporter for 3dsmax I found a bug in the TriStripVisitor. I created a small example (attached), and a modified version of
src\osgUtil\TriStripVisitor.cpp where the problem is removed."
2011-05-27 09:00:53 +00:00
Robert Osfield
ba2fd0316b From Eric Sokolowsky, "Attached is an updated PNM plugin for inclusion in both the trunk and for release version 2.8.5. The attached file fixes numerous bugs in reading 8-bit and 16-bit images, including loading the images upside-down. This file also incorporates trunk patch r12220 which updated the plugin for reading and writing images through streams instead of C-style FILE I/O." 2011-05-27 08:55:37 +00:00
Robert Osfield
0acce47d97 Reverted Bryce Eldrige submission. 2011-05-27 08:22:16 +00:00
Robert Osfield
e3f7d802e4 Form Jorge Ciges, improved GL version detection code. 2011-05-26 16:52:08 +00:00
Robert Osfield
3fa1f2ed5a From Dietmar Funck, "I've noticed an issue when writing arrays of type Vec2D and Vec3D to a .osgb file. A number is written to the output stream to identify the array type. In case of Vec2D and Vec3D arrays Vec4D is written as array type - I guess this is a copy and paste mistake.
Writing the correct array types fixes the issue - in my case it fixes writing and afterwards reading geometry instances."
2011-05-26 16:34:33 +00:00
Robert Osfield
b8b368dc7c From Bryce Eldridge, "Here is an update for the TIFF plugin that includes the following features when writing out TIFF files:
- Support for writing unsigned 16-bit images (GL_UNSIGNED_SHORT)
- Code to parse the options string for the following options:
-- Flag to turn off the compression. The PACKBITS compression type causes issues for me with some programs on Windows (Picasa for example).
-- Options to set the XRESOLUTION and YRESOLUTION tags (DPI) in the TIFF file.

Existing behavior (PACKBITS compression, DPI tags left at default) is preserved if the options string is not set.
"
2011-05-26 16:26:50 +00:00
Robert Osfield
909a4d1603 Fixed default setting of texture_no_tile to match the flags seet in lib3ds_material.cpp initialize_texture_map(..). 2011-05-26 16:19:54 +00:00
Robert Osfield
0a1ecd3272 From Oliver Neumann,
"I checked your solution and found one missing point which makes it still produce the tif error:
The very first seek_set on the empty stream with zero offset."

"This means that the empty stream is seeked again resulting in the fail bit to be set. Your code does not check this case, furthermore you use t_off instead of std::ostream::streampos for the tellp() calls. In this special case (empty stream) tellp() returns -1 which is cast to 0xFFFFFFFFFF as t_off is unsigned. I suggest this addition to your code (within the switch statement)"
2011-05-26 16:16:11 +00:00
Robert Osfield
52146aa1b6 Fixed handling of changes in gl buffer object size so that when a gl buffer object is resized all the buffer data
is recompiled.
2011-05-26 15:47:20 +00:00
Robert Osfield
d137c26191 From Bradley Anderegg, "Ok, I am re-submitting this with the changes we discussed. That is, there is a default implementation of osgDB::Archive::getDirectoryContents() that uses getFileNames(), and the osgDB::ArchiveExtended header was removed as it is now unnecessary.
Here is a quick list of the modified files:

Archive - getDirectoryContents() no longer pure virtual
Archive.cpp - default getDirectoryContents() implementation
unzip.cpp - modified to fix a bug where the same file will not load twice in a row
ZipArchive.h / ZipArchive.cpp - extends osgDB::Archive and provides support for random access loading within a .zip file
ReaderWriterZip.cpp - modified to use the ZipArchive class"
2011-05-25 12:41:49 +00:00
Robert Osfield
bf7759829e From Olaf Flebbe, fixes for OSX AGL build 2011-05-25 09:34:02 +00:00
Robert Osfield
e0f4fa453c Removed now redundent local implementation of getDirectoryContexts() 2011-05-25 09:13:26 +00:00
Robert Osfield
76b6cd6fa3 From Bradley Anderegg, "Ok, I am re-submitting this with the changes we discussed. That is, there is a default implementation of osgDB::Archive::getDirectoryContents() that uses getFileNames(), and the osgDB::ArchiveExtended header was removed as it is now unnecessary.
Here is a quick list of the modified files:

Archive - getDirectoryContents() no longer pure virtual
Archive.cpp - default getDirectoryContents() implementation
unzip.cpp - modified to fix a bug where the same file will not load twice in a row
ZipArchive.h / ZipArchive.cpp - extends osgDB::Archive and provides support for random access loading within a .zip file
ReaderWriterZip.cpp - modified to use the ZipArchive class"
2011-05-25 09:04:44 +00:00
Robert Osfield
51a9e63c55 From Olaf Flebbe, "build out-of-the box on MacOSX. The default windowing system is carbon and it needs the AGL OpenGL Windowing binding framework, which is missing. osgViewer does not link therefore. Cocoa does not use AGL.
The fix adds the AGL Framework to the Carbon link line for osgViewer"
2011-05-24 13:05:44 +00:00
Robert Osfield
245e023164 Fixed Coverity issues.
CID 11669: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glAttachShader is not initialized in this constructor nor in any functions that it calls.
Non-static class member _glBindAttribLocation is not initialized in this constructor nor in any functions that it calls.
...


CID 11699: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _areTessellationShadersSupported is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:20:36 +00:00
Robert Osfield
6ce53fb7b0 Fixed Coverity issue.
CID 12328: Resource leak (RESOURCE_LEAK)
Calling allocation function "osg::KdTree::cloneType() const". (The virtual call resolves to "osg::Object * osg::KdTree::cloneType() const".) [show details]
Failing to save storage allocated by "this->_kdTreePrototype->cloneType()" leaks it.
2011-05-24 10:19:22 +00:00
Robert Osfield
e7ee4c1f79 Fixed Coverity issue.
CID 11692: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _allocationMode is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:18:47 +00:00
Robert Osfield
65d2ddd325 Fixed Coverity issue.
CID 11668: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveMode is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:18:05 +00:00
Robert Osfield
3357cc0717 Fixed 3 Coverity issues.
CID 11697: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _type is not initialized in this constructor nor in any functions that it calls.

CID 11698: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _type is not initialized in this constructor nor in any functions that it calls.

CID 12329: Resource leak (RESOURCE_LEAK)
Calling allocation function "osg::Object::clone(osg::CopyOp const &) const". (The virtual call resolves to "osg::Object * GDALPlugin::DataSetLayer::clone(osg::CopyOp const &) const".) [show details]
Failing to save storage allocated by "this->getVertexArray()->clone(struct osg::CopyOp const(128U))" leaks it.
2011-05-24 10:16:12 +00:00
Robert Osfield
da058c0ffa Fixed Coverity issue.
CID 11696: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _simulationTime is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:15:39 +00:00
Robert Osfield
f2674b2911 Fixed Coverity issue.
CID 11695: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _ximpl is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:15:17 +00:00
Robert Osfield
930f3e4974 Fixed Coverity issue.
CID 11694: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _isARBOcclusionQuerySupported is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:14:45 +00:00
Robert Osfield
fa11d7b6fa Fixed Coverity issue.
CID 11691: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _isPBOSupported is not initialized in this constructor nor in any functions that it calls.
Non-static class member _isUniformBufferObjectSupported is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:13:07 +00:00
Robert Osfield
1b6700b4c7 Fixed build error 2011-05-24 10:08:40 +00:00
Robert Osfield
ec00c25274 Removed unused numX, numY member variables, and added initializer for firstHeaderWrite. 2011-05-23 16:58:49 +00:00
Robert Osfield
335bcf66f8 Uppded the default acceleration as it was too slow for reasonable sized models 2011-05-19 13:25:03 +00:00
Robert Osfield
1d1d3ab50b From Sukender, "There was a stupid parameter inversion in ExternalFileWriter.cpp.
Sorry for this. Here is the fix."
2011-05-17 12:57:46 +00:00
Robert Osfield
d4eceb0b90 From Wang Rui, added close button hint 2011-05-17 09:21:32 +00:00
Robert Osfield
cd2eaf2826 From Stephan Huber, "proposed changes allows the user to add a osgGraphicsWindowIOS as an
UIView, respecting the sizes via GraphicsContext::Traits.
This helps users, who want to integrate osg into an existing ios-app
with multiple UIViews. Additinally a view-controller gets only created
if needed, set IGNORE_ORIENTATION via the WindowData-struct.
"
2011-05-16 12:44:39 +00:00
Robert Osfield
c44ef1bfd9 From Sukender, I wrapped my change about non-empty texture units in an off-by-default option, so that it doesn't break any existing code. But AFAIK, other readers (except OSGx) generate contiguous texture units, so I guess this option to be useful for users.
Other changes in this sumbission include the added ability to tessellate polygons in Collada reader, with appropriate options.
 - No tessellation
 - Tessellate as triangle fan (previous behaviour, kept as default for backward-compatibility)
 - Full tessellation

I also put auto_ptr<> for RAII of DAE structure (as discussed), and moved reader options in a structure, as for the writer.

Code also make use of osgDB::ExternalFileWriter I submitted, so please merge this submission after the PluginImageWriter one.
2011-05-16 10:07:20 +00:00
Robert Osfield
a287d85585 From Jan Peciva, I have improved GraphicsWindowQt:
- renamed osgQt::GraphWidget to osgQt::GLWidget
as it better fits to Qt naming (osgQt::GLWidget is derived from QGLWidget
while recent GraphWidget... it is unclear, maybe QGraphicsView,
QGraphicsScene,....)
- added the code to properly manage ON_DEMAND rendering scheme
(involves osgQt::setViewer() and internal HeartBeat class)
- added forward key events functionality. It allows to not eat the key events
by GLWidget, but it forwards them to Qt processing as well.
- destroying GLWidget before GraphicsWindowQt and vice versa does not crash
the application
- it is possible to request particular QGLFormat in GLWidget constructor
- added QtWindowingSystem class
- multithread OSG rendering improvements/fixes

--

From Robert Osfield, added back in getGraphWidget() method for backwards compatibility.
2011-05-16 09:06:06 +00:00
Robert Osfield
0875b19ab8 Fixed traling spaces 2011-05-16 08:59:10 +00:00
Robert Osfield
c4dff10cb4 From Wang Rui, build fix 2011-05-15 08:27:04 +00:00
Robert Osfield
fe1c75aa8a Fixed handling of Font implementations that don't handle multiple font resolutions. 2011-05-13 19:08:04 +00:00
Robert Osfield
460f433ca7 Improved the size, advance and bearing settings 2011-05-13 11:20:48 +00:00
Robert Osfield
77057d06ab Warning and build fixes 2011-05-12 18:52:18 +00:00
Robert Osfield
5cbe74fbc1 From Sukender, ported across to use the new osgDB::ExternalFileWriter 2011-05-12 14:07:15 +00:00
Robert Osfield
066a1f6e72 From Sukender, new ExternalFileWriter helper class that helps the management of writing out external files to disk
avoid writing out of duplicates.
2011-05-12 13:27:14 +00:00
Robert Osfield
b380387f53 From Sukender, "Here is a tiny fix which adds missing virtual methods in osgUtil::TransformAttributeFunctor, to handle Vec3d." 2011-05-12 13:12:07 +00:00
Robert Osfield
48dad2d171 From Rene Molenaar, "I have found a problem regarding manifest in the plugins,
see http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/CMakeLists.txt
the option OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS is set to ON only after the subdirectories are added,
this causes /MANIFEST:NO while the option is ON after the first configure, generate.

if this option is moved (i.e. above the ADD_SUBDIRECTORY statement) results are as expected.

attached you will find the correct CMakeLists.txt
"
2011-05-12 11:45:29 +00:00
Robert Osfield
3a4ff98883 Added setting of size. 2011-05-12 10:10:49 +00:00
Robert Osfield
74dab1fe8d Fixed Coverity reported issue.
CID 11812: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _lastFrameUsed is not initialized in this constructor nor in any functions that it calls.
Non-static class member _s is not initialized in this constructor nor in any functions that it calls.
Non-static class member _t is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:54:50 +00:00
Robert Osfield
07a29e39e0 Fixed Coverity reported issue.
CID 11813: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _endian is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:54:10 +00:00
Robert Osfield
01b80e4f66 Fixed Coverity reported issue.
CID 11814: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _updateCamera is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:53:38 +00:00
Robert Osfield
5b0ab95e41 Fixed 6 Coverity reported issues.
CID 11820: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _azAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _elevAngle is not initialized in this constructor nor in any functions that it calls.

CID 11819: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _BoundaryAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _planeOrientation is not initialized in this constructor nor in any functions that it calls.

CID 11818: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _BoundaryAngle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _planeOrientation is not initialized in this constructor nor in any functions that it calls.

CID 11817: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _distance is not initialized in this constructor nor in any functions that it calls.

CID 11817: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _distance is not initialized in this constructor nor in any functions that it calls.

CID 11816: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _leftRightSurfaces is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:52:34 +00:00
Robert Osfield
7b4d44b2f5 Fixed 2 Coverty reported issues.
CID 11821: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _traversalNumber is not initialized in this constructor nor in any functions that it calls.

CID 11822: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _traversalNumber is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:51:52 +00:00
Robert Osfield
b4b88e9549 Added osg::ref_ptr<osgDB::Archive> osgDB::Registry::getRefFromArchiveCache() and osg::ref_ptr<osgDB::Object> osgDB::Registry::getRefFromObjectCache(). 2011-05-06 16:46:13 +00:00
Robert Osfield
7eda51abd2 Fixed Coverity reported issue.
CID 11838: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _alphaFuncKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleBackwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cyleForwardKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _sampleDensityKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _transparencyKey is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateAlphaCutOff is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateSampleDensity is not initialized in this constructor nor in any functions that it calls.
Non-static class member _updateTransparency is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:27:19 +00:00
Robert Osfield
b37a58e051 Fixed Coverity reported issue.
CID 11827: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _plane_mask is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:26:13 +00:00
Robert Osfield
21ca6a0475 Fixed Coverity reported issue.
CID 11826: Uninitialized scalar field (UNINIT_CTOR)
Class member declaration for _recordHeightsAsAttributes.
2011-05-06 12:25:34 +00:00
Robert Osfield
24974462f6 Fixed Coverity reported issue.
CID 11830: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _geometry is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:25:02 +00:00
Robert Osfield
c5c2080dd3 Fixed Coverity reported issue.
CID 11825: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.

CID 11824: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _hit is not initialized in this constructor nor in any functions that it calls.
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
Non-static class member _length is not initialized in this constructor nor in any functions that it calls.
Non-static class member _ratio is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:24:19 +00:00
Robert Osfield
ea29adba87 Fixed Coverity reported issue.
CID 11829: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _primitiveMode is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:23:45 +00:00
Robert Osfield
456d351a33 Fixed Coverity reported issue.
CID 11831: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _context is not initialized in this constructor nor in any functions that it calls.
Non-static class member _dc is not initialized in this constructor nor in any functions that it calls.
Non-static class member _handle is not initialized in this constructor nor in any functions that it calls.
Non-static class member _instance is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:22:10 +00:00
Robert Osfield
37f63e033a Fixed Coverity reported issue.
CID 11835: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _startTick is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:21:11 +00:00
Robert Osfield
0e56247cd0 Fixed Coverity reported issues.
CID 11834: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _tickLastUpdated is not initialized in this constructor nor in any functions that it calls.
Non-static class member _tmpText is not initialized in this constructor nor in any functions that it calls.

CID 11833: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _tmpText is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:20:48 +00:00
Robert Osfield
4f5152152d Fixed Coverity reported issues.
WindowManager.cpp
CID 11841: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _lastEvent is not initialized in this constructor nor in any functions that it calls.
Non-static class member _lastPush is not initialized in this constructor nor in any functions that it calls.
Non-static class member _view is not initialized in this constructor nor in any functions that it calls.

Frame.cpp
CID 11840: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _flags is not initialized in this constructor nor in any functions that it calls.

Window.cpp
CID 11839: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
2011-05-06 10:29:47 +00:00
Robert Osfield
3d300c38d0 Fixed Coverity reported issue
CID 11441: Non-array delete for scalars (DELETE_ARRAY)
"_dwobj::readOpenings(_iobuf *, int)" allocates "obj.fc1". [show details]

"_dwobj::~_dwobj()" uses delete on "obj.fc1" which is an array. It should be deleted with operator delete[]. [show details]
2011-05-06 10:28:24 +00:00
Robert Osfield
07bed106af Fixed Covertiy reported issues.
CID 11394: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->colorindices" = "new osg::IntArray".
The constructor allocates field "colorindices" of "struct vertexInfo" but there is no destructor.

CID 11395: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->coordindices" = "new osg::IntArray".
The constructor allocates field "coordindices" of "struct vertexInfo" but there is no destructor.

CID 11396: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->normindices" = "new osg::IntArray".
The constructor allocates field "normindices" of "struct vertexInfo" but there is no destructor.

CID 11397: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::IntArray".
Assigning: "this->txindices" = "new osg::IntArray".
The constructor allocates field "txindices" of "struct vertexInfo" but there is no destructor.

CID 11398: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec2Array".
Assigning: "this->txcoords" = "new osg::Vec2Array".
The constructor allocates field "txcoords" of "struct vertexInfo" but there is no destructor.

CID 11399: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->norms" = "new osg::Vec3Array".
The constructor allocates field "norms" of "struct vertexInfo" but there is no destructor.

CID 11400: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->coords" = "new osg::Vec3Array".
The constructor allocates field "coords" of "struct vertexInfo" but there is no destructor.

CID 11401: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec4Array".
Assigning: "this->colors" = "new osg::Vec4Array".
The constructor allocates field "colors" of "struct vertexInfo" but there is no destructor.

CID 11402: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec4Array".
Assigning: "this->polycols" = "new osg::Vec4Array".
The constructor allocates field "polycols" of "struct vertexInfo" but there is no destructor.
2011-05-06 10:27:59 +00:00
Robert Osfield
e6217e3f82 Fixed Coverity reported issue.
CID 12263: Missing break in switch (MISSING_BREAK)
This case (value 8) is not terminated by a 'break' statement.

CID 12262: Missing break in switch (MISSING_BREAK)
This case (value 7) is not terminated by a 'break' statement.

CID 12261: Missing break in switch (MISSING_BREAK)
This case (value 6) is not terminated by a 'break' statement.
2011-05-06 09:21:40 +00:00
Robert Osfield
31aa1cdfee Fixed Coverity reported issues.
CID 11389: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new bsp::VBSPData".
Assigning: "this->bsp_data" = "new bsp::VBSPData".
The constructor allocates field "bsp_data" of "struct bsp::VBSPReader" but the destructor and whatever functions it calls do not free it.
2011-05-06 09:20:06 +00:00
Robert Osfield
67c12b14b0 Fixed Coverity reported issues by using ref_ptr<> for object.
ID 11390: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->vertices" = "new osg::Vec3Array".
The constructor allocates field "vertices" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11391: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->normals" = "new osg::Vec3Array".
The constructor allocates field "normals" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11392: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->txc" = "new osg::Vec3Array".
The constructor allocates field "txc" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11393: Resource leak in object (CTOR_DTOR_LEAK)
Allocating memory by calling "new osg::Vec3Array".
Assigning: "this->txcoords" = "new osg::Vec3Array".
The constructor allocates field "txcoords" of "struct prims" but the destructor and whatever functions it calls do not free it.

CID 11747: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member gset is not initialized in this constructor nor in any functions that it calls.
2011-05-06 09:19:27 +00:00
Robert Osfield
bf9cc20ef0 Fixed Coverity reported issue.
CID 11845: Structurally dead code (UNREACHABLE)
This code cannot be reached: "<temporary>.basic_string("");".
2011-05-05 12:40:03 +00:00
Robert Osfield
b0f6783631 Fixed Coverity reported issue.
CID 11855: Use after free (USE_AFTER_FREE)
"operator delete[](void *)" frees "buffer".
2011-05-05 12:39:35 +00:00
Robert Osfield
9a8edde316 Fixed Coverity reported issue. This fix addresses a memory leak.
CID 11847: Unused pointer value (UNUSED_VALUE)
Pointer "node" returned by "lib3ds_node_new(LIB3DS_NODE_CAMERA)" is never used.
2011-05-05 12:38:48 +00:00
Robert Osfield
f0b0a8788b Fixed warning 2011-05-05 11:31:12 +00:00
Robert Osfield
69e205b8a1 Fixed Coverity reported issue.
CID 11864: Wrapper object use after free (WRAPPER_ESCAPE)
Assigning: "szFilename" = "path.c_str()", which extracts wrapped state from local "path".
2011-05-05 11:27:34 +00:00
Robert Osfield
ee9db5e5ba Fixed 4 Coverity reported issues
CID 11851: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(26)" is never used.

CID 11850: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(80)" is never used.

CID 11849: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "gr->getField(3)" is never used.

CID 11848: Unused pointer value (UNUSED_VALUE)
Pointer "gfd" returned by "grec->getField(3)" is never used.
2011-05-05 10:31:34 +00:00
Robert Osfield
47f1133c25 From Mathias Froehlich, build fix for gcc 4.6 2011-05-04 16:36:35 +00:00
Robert Osfield
da1a354502 From Stephan Huber, "attached you'll find a small enhancement for GraphicsWindowCocoa to
implement the recently introduced setSyncToVBlank-method.

Additionally I added a ToggleSyncToVBlank-eventhandler to osgViewer. I
used it to test the code, perhaps you'll find it useful and include it
in the distribution."
2011-05-04 16:01:21 +00:00
Robert Osfield
f0baf6abba Removed unncessary references to FREETYPE 2011-05-04 09:53:11 +00:00
Robert Osfield
ff99fd07f7 Added OSGVIEWER_EXPORT 2011-05-03 12:43:00 +00:00
Robert Osfield
81a0eed67f Added missing break; 2011-05-03 10:14:34 +00:00
Michael PLATINGS
c7814cf50a Updated to use FBX SDK 2012.1 2011-05-03 09:11:04 +00:00
Robert Osfield
b78ad29429 Improved the handling of different combinations of slashes and dirNames. 2011-04-29 16:50:45 +00:00
Robert Osfield
b4353c1a8e Added following methods to osgDB::Archive in support of work by Fradley Anderegg on .zip archive support:
/** Get the file name which represents the archived file.*/
       virtual std::string getArchiveFileName() const = 0;

       /** return type of file. */
       virtual FileType getFileType(const std::string& filename) const = 0;

       /** return the contents of a directory.
       * returns an empty array on any error.*/
       virtual DirectoryContents getDirectoryContents(const std::string& dirName) const = 0;

Added implementations of these new methods into src/osgPlugins/osga/OSGA_Archive.h src/osgPlugins/osga/OSGA_Archive.cpp
2011-04-29 16:34:26 +00:00
Robert Osfield
fb09d0e553 Refactored the libtiffOStreamSeekProc function so that it extendeds the stream when the
requested file position is beyond the current end of the stream.  This fix addresses
a bug that occurred when writting to a streamstream.
2011-04-29 14:31:45 +00:00
Robert Osfield
41eb850578 Fixed Coverity reported issue.
CID 11447: Unchecked dynamic_cast (FORWARD_NULL)
Dynamic cast to pointer "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))" can return null.
Assigning null: "first" = "dynamic_cast <struct osg::NodeCallback *>(nc->clone(this))".

The clone() implementation is written using macro's so that it always returns the type of Object
being cloned so it's normally safe to assume that a dynamic_cast<> will always return a valid pointer as long
as the new T that involves creates a valid object.  However, if the class being cloned doesn't correctly
implement the clone() method then their potential for the dynamic_cast to fail and will return a NULL and will
result in a memory leak of the object of paraent class that the clone would have defaulted to.

I've tightened up the CopyOp.cpp code to check the return type and added better handling of the clone in the
osg::clone() methods so thay don't have any potential mememory leaks and report warnings to OSG_WARN when
problems are encountered.  It may be more apporpriate to throw an exception so will need to ponder this
issue further.
2011-04-28 16:33:14 +00:00
Robert Osfield
c379431be3 Fixed Coverity reported issue.
CID 11403: Logically dead code (DEADCODE)
After this line, the value of "needspace" is equal to 0.
Assigning: "needspace" = "false".

Technically the report is correct, but the code is just debugging code that was there just in case
the code needed to be reviewed. This code is long since through it's debugging stage so the code
is no longer really worth keeping so I've removed it for cleanness sake.
2011-04-28 10:23:50 +00:00
Robert Osfield
f9d217ea07 Fixed Coverity reported issue.
ID 11667: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _useVertexAttribAlias is not initialized in this constructor nor in any functions that it calls.

Member variable should have been initialized but this varaible will have always been initialized in later code
before it was used anyway so wouldn't have resulted in a runtime bug.
2011-04-28 10:23:28 +00:00
Robert Osfield
bef8dedce0 Fixed Coverity reported issue.
CID 11414: Logically dead code (DEADCODE)
After this line, the value of "vboMemory" is equal to 0.
Assigning: "vboMemory" = "NULL".

Another case of debugging code paths being picked out. I have chosen to just delete these paths as the code
looks to be working fine and less code is better than more code when it comes to maintenance.
2011-04-28 10:22:20 +00:00
Robert Osfield
c32b72e8c5 Fixed Coverity reported issue. Issue is benign as all the member variables are initialized in after construction,
but I've moved this initialization into the constructor to make the code more managable.

CID 11686: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member cnt is not initialized in this constructor nor in any functions that it calls.
Non-static class member maxcnt is not initialized in this constructor nor in any functions that it calls.
Non-static class member phase is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:37:25 +00:00
Robert Osfield
718fa5b679 Fixed 2 Coverity reported issues. Both issues are benign, but I've addressed then as with the changes the
code is clean and more mantainable.

CID 11676: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member cancelMode is not initialized in this constructor nor in any functions that it calls.
Non-static class member cpunum is not initialized in this constructor nor in any functions that it calls.
Non-static class member detached is not initialized in this constructor nor in any functions that it calls.
Non-static class member isRunning is not initialized in this constructor nor in any functions that it calls.
Non-static class member stackSize is not initialized in this constructor nor in any functions that it calls.
Non-static class member threadPolicy is not initialized in this constructor nor in any functions that it calls.
Non-static class member threadPriority is not initialized in this constructor nor in any functions that it calls.
Non-static class member uniqueId is not initialized in this constructor nor in any functions that it calls.

CID 11564: Unsigned compared against 0 (NO_EFFECT)
This less-than-zero comparison of an unsigned value is never true. "cpunum < 0U".
2011-04-27 16:35:34 +00:00
Robert Osfield
91430e9c54 Fixed Coverity reported issue.
CID 11677: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _minimumNumberAccumAlphaBits is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minimumNumberAccumBlueBits is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minimumNumberAccumGreenBits is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minimumNumberAccumRedBits is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:06:32 +00:00
Robert Osfield
688b1614ad Fixed Coverity reported issue.
CID 11690: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _frameLastUsed is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:06:10 +00:00
Robert Osfield
e962eda7d5 Fixed Coverity reported issue.
CID 11689: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glBlendColor is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:05:37 +00:00
Robert Osfield
4751f03529 Fixed 2 Coverity reported issues.
CID 11681: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _previousHeight is not initialized in this constructor nor in any functions that it calls.
Non-static class member _previousWidth is not initialized in this constructor nor in any functions that it calls.

CID 11688: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _previousHeight is not initialized in this constructor nor in any functions that it calls.
Non-static class member _previousWidth is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:05:13 +00:00
Robert Osfield
7e6f05b864 Fixed Coverity reported issue, in this case it's a unused member variable so could just be deleted.
CID 11687: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glBeginEndAdapter is not initialized in this constructor nor in any functions that it calls.
2011-04-27 16:04:37 +00:00
Robert Osfield
d20d2202a4 Fixed 3 Coverity reported issues. CID 11622 is a bit of false positive as for valid settings no leak would happen.
CID 11810: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _setMaxFarDistance is not initialized in this constructor nor in any functions that it calls.

CID 11811: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _displayTexturesGroupingNode is not initialized in this constructor nor in any functions that it calls.

CID 11622: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new(unsigned long long)".
Variable "<storage from new>" is not freed or pointed-to in function "osg::StateSet::StateSet()". [show details]
Assigning: "sharedStateSet" = storage returned from "new osg::StateSet".
 282    osg::StateSet* sharedStateSet = new osg::StateSet;
Variable "sharedStateSet" is not freed or pointed-to in function "osg::Object::setDataVariance(osg::Object::DataVariance)". [show details]
2011-04-27 16:03:37 +00:00
Robert Osfield
63ee77a63d Fixed Coverity reported issue.
CID 11588: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new[](unsigned long long)".
Assigning: "dataPtr" = storage returned from "new unsigned char[newTotalSize]".
2011-04-27 16:02:10 +00:00
Robert Osfield
501008f256 Fixed 2 Coverity reported issues.
Following are both false positives as the the scope they are in will always assign the object to a ref counted
structure.  I've modified the code to use ref_ptr<> to just make it clear that it's underscope, although
this is not strictly neccessary as the code is OK, I introduced this for clarity and robustness in
presence of exceptions.

CID 11586: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new(unsigned long long)".
Variable "<storage from new>" is not freed or pointed-to in function "osg::VertexBufferObject::VertexBufferObject()". [show details]
Assigning: "vbo" = storage returned from "new osg::VertexBufferObject".


CID 11587: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new(unsigned long long)".
Variable "<storage from new>" is not freed or pointed-to in function "osg::ElementBufferObject::ElementBufferObject()". [show details]
Assigning: "ebo" = storage returned from "new osg::ElementBufferObject".
2011-04-27 16:01:43 +00:00
Robert Osfield
9a4c277592 Fixed Coverity reported issue.
CID 11636: Allocation size mismatch (SIZECHECK)
"my_alloc(sizeof (struct PlyProperty) /*36*/ * elem->nprops, 1292, "..\\..\\..\\..\\src\\osgPlugins\\ply\\plyfile.cpp")" allocates memory. [show details]
Allocating a multiple of 36 bytes to pointer "other->props", which needs 8 bytes.
2011-04-27 16:00:32 +00:00
Robert Osfield
e345a7bacd Fixed 1 Coverity Low Impact issue "Unused pointer value (UNUSED_VALUE)
Pointer "indices" returned by "this->_vertexAttribList[0ULL].indices.get()" is never used."

Report highlighted the fact that later code wasn't using the indices variable when it should have been, so
potentially a higher impact that the severity suggested by Coverity.
2011-04-26 19:31:04 +00:00
Robert Osfield
c19fcd6d44 Fixed 3 Coverity Low Impact performance issues relating to "Big parameter passed by value". 2011-04-26 19:29:22 +00:00
Robert Osfield
d416ebc78c From Craig Bosma,"Please find attached a fix for shared contexts on OS X, with the Cocoa backend. The NSOpenGLContext* _context member of GraphicsHandleCocoa was never set on successfully creation, so even if the dynamic_cast to GraphicsHandleCocoa succeeds, we get a bogus (NULL) pointer on retrieving the actual NSOpenGLContext* (line 1013).
This should fix the problem, as well as cause GraphicsWindowCocoa to report the correct name "GraphicsWindowCarbon" -> "GraphicsWindowCocoa".
"
2011-04-26 12:05:57 +00:00
Robert Osfield
0d97aab94f From Farshid Lashkari, "I believe their is small error in how OutputStream handles the WriteImageHint. In the "writeImage" method, it converts the WriteImageHint to an internal "decision" flag. During this conversion, it seems to be swapping the behavior for WRITE_EXTERNAL_FILE and WRITE_USE_EXTERNAL. I've attached what I believe to be the correct conversion." 2011-04-26 11:51:21 +00:00
Robert Osfield
8d323fcdea From Mattias Helsing, "Fixes installation of the osgViewer headers that got broken with rev
12208 and 12231.

The windowing system specific headers under
include/osgViewer/api/<system> are again installed under
include/osgViewer/api/<system>

Works in recent ubuntu with cmake-2.8.4 and msvc2010 with cmake-2.8.2"
2011-04-21 17:16:27 +00:00
Robert Osfield
a793958836 From Johannes Baeuerele, "I have extended the pvr reader plugin to support etc1 compression(GL_ETC1_RGB8_OES). The changes attached to this submission are based on today's trunk.
The pvr format which can be used as a wrapper for different compressed and uncompressed formats supports this compression algorithm. The original pvr compression uses the pvrtc format. The handling of pvrtc is already implemented in the pvr plugin. PVR provides wrapper functionality for some formats, e.g. etc or even dxt/dds.

Our target system (gles2) is able to use the etc compression format. With minor changes in the submitted files, there is no need to write a separate plugin. However the original pvr texture compression formats are not supported on our target, which is the reason for this extension.

The changes mainly consist in the definition on new enum values in the classes and headers of ReaderWriterPVR,Image and Texture. I also found some locations where the handling of the original pvr textures was not implemented. These are also part of this submission."
2011-04-21 17:04:50 +00:00
Robert Osfield
634344aef5 From Marius Heise, "here is a patch that implements Win32 HW-synced swapping using wglJoinSwapGroupNV, wglBindSwapBarrierNV and the existing traits. It was tested with multiple ATI FirePro S400 cards.
I also fixed the vsync implementation introduced with rev.11357 that was crashing with the Windows Error #170. So I removed your temporary /* */ around the vsync condition..."
2011-04-21 13:34:03 +00:00
Robert Osfield
02081af4f8 From Fred Smith, "GraphicsWindowWin32::setWindow currently creates a context with no regards to the Traits, like createWindow does.
That is, it calls ::wglCreateContext to create a context, not the member method createContextImplementation(), which takes into an account the Traits.

In my situation, this prevents a GL 3.x context from being created.
"
2011-04-21 13:01:11 +00:00
Robert Osfield
478e0f3ebf From Jorge Ciges, "1rst - Changes in Cmake: They make possible "make install" with the android building.
2nd - Script to use a 3rd party directory with basic libraries: libjpeg,libpng,libtiff,giflib,freetype,curl,gdal.

3rd - Change in the GLES library loading for Android. That should make GLES2 work properly.

4rth- Included two defines RGB8_OES and RGBA8_OES as a substitute in GLES for RGB8 and RGBA8

5th - OpenGL and GLSL version identification changed to recognize GLES  versions properly
"
2011-04-21 12:53:22 +00:00
Robert Osfield
cd44e63b90 From Cedric Pinson, "I have tried some model that produces crashes in the dae plugin because
of empty node:

if (GetFloat4Param(cot->getParam()->getRef(), f4)) {...}

in the model I have tested cot->getParam()->getRef() return 0x0 and make
it crahes inside GetFloat4Param.

I have added a test before calling GetFloat4Param
if (cot->getParam()->getRef() != 0 &&
GetFloat4Param(cot->getParam()->getRef(), f4)) {...}
"
2011-04-21 12:12:40 +00:00
Robert Osfield
9bfb043a16 From Tomas Hogarth, "Attached are the complete changed files GraphicsWindowIOS and GraphicsWindowIOS.mm. The change is in regard to the ability to adapt to device orientation. We did just have a bool indicating the window would adapt to all orientations. I have changed this to a bit mask allowing the user to specify individual orientations or combinations.
enum DeviceOrientation{

                    PORTRAIT_ORIENTATION = 1<<0,

                    PORTRAIT_UPSIDEDOWN_ORIENTATION  = 1<<1,

                    LANDSCAPE_LEFT_ORIENTATION  = 1<<2,

                    LANDSCAPE_RIGHT_ORIENTATION  = 1<<3,

                    ALL_ORIENTATIONS = PORTRAIT_ORIENTATION  | PORTRAIT_UPSIDEDOWN_ORIENTATION  | LANDSCAPE_LEFT_ORIENTATION  | LANDSCAPE_RIGHT_ORIENTATION

                };

                typedef unsigned int DeviceOrientationFlags;

The main motivation for this is to easily allow the user to specifiy that the device is in a horizontal orientation rather then having to rotate the view matrix. All flags have been tested individually as well as in combinations. The default is ALL_ORIENTATIONS to keep the exiting functionality for anyone who hasn't specified WindowData for their context traits.
"
2011-04-21 12:06:06 +00:00
Robert Osfield
4d0b96c074 From Sukender, Here is a tiny update to FileNameUtils. It brings getPathRoot() and isAbsolutePath() to the public side of the lib. 2011-04-20 19:20:28 +00:00
Robert Osfield
63cfbadc95 From Guillaume Taze, "This is a fix for the error popups which appeared when reading a corrupted file on windows. Errors are redirected to std::err instead."
Note from Robert Osfield, changed jpeg error report output from stderr to standard OSG notification system using OSG_WARN.
2011-04-20 17:15:58 +00:00
Robert Osfield
70aa087f6e Added releaseGLObjects(State*) support into osg::FrameBufferObject, osg::RenderBin and osg::RenderStage
to ensure proper clean up of FBO's on closing a graphics context.
2011-04-20 11:45:01 +00:00
Robert Osfield
f564926570 From Magnus Kessler, "A few minor fixes in the documentation strings of ReaderWriterFLT.cpp" 2011-04-19 14:19:06 +00:00
Robert Osfield
cfb19182e6 From Bradley Anderegg, "The first change just exposes the archive extension list so that
external applications can determine if an archive extension is valid.

The second change is a bug fix in Registry::read(const ReadFunctor&)
where if you pass in valid options they get wiped out after the archive
is loaded but before being passed along to the plugin."
2011-04-19 14:11:13 +00:00
Robert Osfield
c13b7d26b7 From Jan Peciva, "please find attached proposed fix for ON_DEMAND rendering. The biggest issue was
that the windows did not act on repaint request (WM_PAINT, EXPOSE,...)

Detailed explanation:
- I implemented requestRedraw using the push approach (not using
GraphicsWindow::_requestRedraw flag that I was considering) as there may be
multiple viewers reading the flag and fighting to reset it after the paint
request, while some viewers may not spot the request to redraw
- I made windows call GraphicsWindow::requestRedraw when they receive
appropriate message (WM_PAINT, EXPOSE, RESIZE,...)
- There were issues on Linux that windows did not want to close using x
button. Resolved by moving the test for DeleteWindow event from
swapBuffersImplementation() to GraphicsWindowX11::checkEvents(). The difficulty
was that DeleteWindow event is not coming using _eventDisplay, but through
_display.
- The last difficulty was that it is necessary to call
ViewerBase::checkWindowStatus() to set _done to true when all windows are
closed. This did not happened recently in ON_DEMAND run scheme. I put the call
to checkWindowStatus() to eventTraversal.
"
2011-04-19 12:01:38 +00:00
Robert Osfield
efec8a13a1 Removed spaces from end of lines 2011-04-19 11:46:05 +00:00
Robert Osfield
581e6fb630 Ran svn propset -R svn:eol-style native . on the OpenSceneGraph 2011-04-19 11:40:22 +00:00
Robert Osfield
c70e7bda86 Improved the handling of unitialized bounding box 2011-04-19 09:54:14 +00:00
Robert Osfield
8ffa50a88e Added IncrementalCompileOperation::compileAllForNextFrame(uint) method and supporting
functionality that  tell the IncrementalCompileOperation to compile all pending objects during next draw traversal,
for specified number of frames.
2011-04-18 12:35:19 +00:00
Robert Osfield
2648723c83 Cleaned up DXT1 support 2011-04-14 15:22:43 +00:00
Robert Osfield
7c004aeebc Added osgDB::Option string entries:
supportsOption("dds_dxt1_rgb","set the pixel format of DXT1 encoded images to be RGB");
        supportsOption("dds_dxt1_rgba","set the pixel format of DXT1 encoded images to be RGBA");
        supportsOption("dds_dxt1_detect_rgba","For DXT1 encode images set the pixel format according to presence of transparent pixels.");

And set the default not to modify and detect the RGB or RGBA pixel format for DXT images.
2011-04-14 10:44:37 +00:00
Robert Osfield
fc38d5b6e7 Added setting of the internal texture format 2011-04-14 09:16:09 +00:00
Robert Osfield
76445d07b0 quitened down debug output 2011-04-13 19:28:30 +00:00
Robert Osfield
b1692f1f31 Introduced new code for detecting DXT1 images catogoriesed as RGB that actually have a 1 bit alpha,
therefore re-interpreting these as RGBA.
2011-04-13 19:26:35 +00:00
Robert Osfield
b62f927eff Added handling of DXT1 in osg::Image::isImageTranslucent() 2011-04-13 10:44:36 +00:00
Robert Osfield
e7e860b742 Added support for explitly requesting DXT1a and DXT1c compression 2011-04-11 19:11:25 +00:00
Robert Osfield
f0f31e4a8c From Stephan Huber, "Attached you'll find a fixed
GraphicsWindowCocoa-implementation which should fix the reported bugs.

the osgkeyboard-example works now, but not the numbers of the keypad, as
they hilight only for KEY_KP_Left, KEY_KP_Right, KEY_KP_Up, KEY_KP_DOWN
etc and not for KEY_KP_0 - KEY_KP_9."
2011-04-04 10:16:46 +00:00
Robert Osfield
70dfd11531 From Tim Moore,
Fixes to race in DatabasePager where a parent PagedLOD
of newly loaded subgraph has been expired.

Clean up of visitor naming to make it clearer what role it has.
2011-03-30 15:15:07 +00:00
Robert Osfield
5625c0cd8b Added m4v as a handled movie file extension 2011-03-23 14:01:58 +00:00
Robert Osfield
f4110a7d84 Improved handling of RGB data. 2011-03-21 21:28:02 +00:00
Robert Osfield
11007a03ee Added .get() to fix build 2011-03-19 16:25:01 +00:00
Robert Osfield
923b658e65 Adde an isFileADicom(..) method to enable the loader to automatically identifier dicom files without making any assumptions about the file extension 2011-03-18 12:21:58 +00:00
Robert Osfield
6b67320190 Added support for new SampleDensityWhenMovingProperty into .p3d format, with it default to 0.02.
One can override this value via the sampleDensityWhenMoving="value" property in the volume tag, i.e.

         <volume sampleDensityWhenMoving="0.01">CardiacCT</volume>

To switch the feature off set the value to 0, i.e.

         <volume sampleDensityWhenMoving="0">CardiacCT</volume>
2011-03-17 17:33:02 +00:00
Robert Osfield
89eadcfe82 Added SampleDensityWhenMovingProperty to control LOD property of osgVolume. 2011-03-17 15:37:39 +00:00
Robert Osfield
79cb22eb06 Changed the view movement detection code so that it uses the
new CullVisitor::Identifier to indentifier cull traversals,
this enables the code to properly detect movement when
osgViewer::Renderer uses double buffering of SceneView.
2011-03-17 13:56:27 +00:00
Robert Osfield
6e182e7c17 Added set up of CulLVisitor::Identifier so that the double buffered SceneView/CullVisitor
share the same Identifier.
2011-03-17 13:54:54 +00:00
Robert Osfield
e28f9a7d32 Added CullVisitor::Identifier to help with cull operations that require a consistent identifier for
cull traveresals when osgViewer::Renderer uses double buffering.
2011-03-17 13:54:14 +00:00
Robert Osfield
307bf7002f First cut at LOD support in RayTracedTechnique, which lowers the number of samples taken when the view of the volume is changing. 2011-03-17 11:49:22 +00:00
Robert Osfield
256da4879e Added hud and billboard support to image, stereo_image, pdf, browser and vnc image placement 2011-03-16 10:51:42 +00:00
Robert Osfield
f2ce2f19a9 Added support hud property for title, bullets and paragraph tags 2011-03-15 19:54:57 +00:00
Robert Osfield
bdd4a67d7c From Sukender, "Fixed a case where getUniqueName() does not work properly" 2011-03-15 14:04:50 +00:00
Robert Osfield
39b8aa45bc Added checked against GL version number for enabled _isTexture3DSupported. 2011-03-15 13:53:59 +00:00
Robert Osfield
f8f6a9fedf Fixed warning 2011-03-15 13:40:13 +00:00
Robert Osfield
0870d4c997 Re-enabled the fallback compute of bounding volume. 2011-03-15 12:48:40 +00:00
Robert Osfield
fbc8c9ffce Fixed updating of text position when PositionData.position is not modified by tag but other elements of PositionData are - such as when billboarding 2011-03-15 12:26:16 +00:00
Robert Osfield
52ff51e0eb Implemented billboard="on" option for image, bullet and paragraph tags 2011-03-14 21:36:32 +00:00
Robert Osfield
74cf1168e0 Added support for placing comments at end of each line. 2011-03-14 11:29:08 +00:00
Robert Osfield
7cd74f0282 From Farshid Lashkari, "Another update. I added a LIMIT_NEAREST enum which implements your previous suggestion of rejecting bounding volumes further from the nearest existing intersection. I only implemented this for LineSegmentIntersector. I'd appreciate it if you could double check the math I added to LineSegmentIntersector::intersects() for checking if the bounding sphere is further away. The results of this are promising. I'm getting noticeable performance increase for line intersections with scenes containing many drawables.
"
2011-03-14 10:07:15 +00:00
Robert Osfield
76dea3d0f4 From Torben Dannhauer, warning fix for a false positive warning generated by VS about "not all control pathes return a value". 2011-03-14 09:59:32 +00:00
Robert Osfield
f7718d2b7b From Farshid Lashkari, removal of redundent spaces at the end of lines. 2011-03-11 17:20:24 +00:00
Robert Osfield
50366ccb91 From Benjamin Wasty and David Guthrie, "currently, non-alpha-numeric keys are not recognized (except as modifiers) in osgQt, so I added the mapping code from my Qt integration to GraphicsWindowQt (which is based on Delta3D code from David Guthrie - he gave me permission to submit it under OSGPL)." 2011-03-11 16:31:01 +00:00
Robert Osfield
9da669cbd8 From Sukender, "Added support for texcoords scale and offset (UV scaling and offset in Lib3DS Materials), for texture unit 0." 2011-03-11 11:25:19 +00:00
Robert Osfield
a81b2341c6 Fixed the case insenstive search under unices 2011-03-11 11:20:30 +00:00
Robert Osfield
339fe794b0 From Mourad Boufarguine,
"There is a redundant cmake code at the end of osgViewer cmake script. The install command is issued in SETUP_LIBRARY macro."
"I spotted this when i tried a make install on the android port :) I saw some weird copy commands of osgViewer headers.
I managed to get all osg headers copied to cmake_install_prefix/include upon make install, but i can't (yet) get the libraries to be copied to cmake_install_prefix/lib (see attached files)"
2011-03-11 10:24:12 +00:00
Robert Osfield
6055e3492a From Mourad Boufarguine, "I gave osg android port a try on Windows using cygwin, and it worked like a charm (only a tiny problem with osgViewer, when cross compiling for android using cygwin, the windows path in osgViewer/CMakeLists.txt is used rather than the android one, fix attached).
"
2011-03-10 14:53:39 +00:00