Commit Graph

3583 Commits

Author SHA1 Message Date
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
e79d51713f Added operator ==, != and < to fix VS build 2011-06-24 08:05:54 +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
c617ea0163 Fixed virtual method mismtaches between subclasses and parent classes. 2011-06-23 16:36:36 +00:00
Robert Osfield
ee7668fe6c From Ulrich Hertlein, build fix for OSX. 2011-06-23 15:42:45 +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
389c2e6407 Updated version to 3.1.0 in prep for the first developer release for 3.x series 2011-06-17 16:55:49 +00:00
Robert Osfield
e3710db9d2 Updated version number 2011-06-17 11:47:47 +00:00
Robert Osfield
f04e841933 Updated version number of 3.0.0-rc1 2011-06-17 09:02:22 +00:00
Robert Osfield
17b9cfad02 Improved the handling of compiling vs flushing deleted objects 2011-06-15 18:31:11 +00:00
Robert Osfield
bfe4877b9a Updated version 2011-06-14 15:55:36 +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
e1f5597167 Removed executable permission. 2011-06-14 09:11:58 +00:00
Robert Osfield
18d08e706f Added handling of s/gUserValue() directly on a UserDataContainer. 2011-06-10 11:42:02 +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
9ac24c8e5d Changed the defaults volume setting to not enable the SampleDensityWhenMoving property. 2011-06-09 10:48:19 +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
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
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
52e3f300e8 Add new macro's to help with serialization of new user objects 2011-06-02 22:07:16 +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
4103319059 Updated version 2011-06-02 21:32:03 +00:00
Robert Osfield
e3f7d802e4 Form Jorge Ciges, improved GL version detection code. 2011-05-26 16:52:08 +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
8b06c30691 Fixed Coverity issue.
CID 11666: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _glMultiTexCoord1dv is not initialized in this constructor nor in any functions that it calls.
Non-static class member _glVertexAttrib1dv is not initialized in this constructor nor in any functions that it calls.
2011-05-24 10:14:03 +00:00
Robert Osfield
de7d61978b Added CullVisitor::setCalculatedNearPlane() and setCalculatedFarPlane(() methods to enable 3rd party code to manage the compute of the near/far planes. 2011-05-23 08:17:02 +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
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
de040e44a0 From Rafa Gata, I've been playing around with serializers in order to use it as a
"generic" property mechanism for osg::Object.

The main problem I have found is that InputStream and OutputStream
only takes the stream when you call start method, and in that case it
attaches to the stream buffer some stuff, useful for files but not for
runtime/gui usage. I have added a simple setInputIterator and
setOutputIterator to the classes so now you can easily serialize
values without version and other stuff.

Writing matrix:
osgDB::OutputStream os(0);
std::stringstream sstream;
os.setOutputIterator(new AsciiOutputIterator(&sstream));
os << matrix;
std::string value = sstream.str();

Reading matrix:
osgDB::InputStream is(0);
std::stringstream sstream(value);
is.setInputIterator(new AsciiInputIterator(&sstream));
osg::Matrixf mat2;
is >> mat2;

From Robert Osfield, added doxygen comments to clarify the role of the methods.
2011-05-16 08:50:59 +00:00
Robert Osfield
d4be7a19eb Updated SO version as the osgText and osgQt libraries API have changed, albeit only by a small amount. 2011-05-13 19:19:00 +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
77057d06ab Warning and build fixes 2011-05-12 18:52:18 +00:00
Robert Osfield
f7699a3bfd Added newline to end of file 2011-05-12 18:40:18 +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
5c7b68e63f Removed unused parameter 2011-05-12 13:08:02 +00:00
Robert Osfield
a1e100adbe Removed redundent method 2011-05-12 10:28:47 +00:00
Robert Osfield
e36f617d09 Fixed Coverity reported issue.
CID 11815: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _cosMaxElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMaxFadeElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMinElevation is not initialized in this constructor nor in any functions that it calls.
Non-static class member _cosMinFadeElevation is not initialized in this constructor nor in any functions that it calls.
2011-05-09 10:53:12 +00:00
Robert Osfield
c9f5be090a Updated version number to 2.9.15 after dev release 2011-05-08 12:06:25 +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
7f14e7dac9 Removed trailing spaces 2011-05-06 12:32:23 +00:00
Robert Osfield
de30bf3f1c Fixed Coverity reported issue.
CID 11828: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member distance is not initialized in this constructor nor in any functions that it calls.
Non-static class member maxDistance is not initialized in this constructor nor in any functions that it calls.
Non-static class member numIntersectionPoints is not initialized in this constructor nor in any functions that it calls.
Non-static class member primitiveIndex is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:30:58 +00:00
Robert Osfield
bbfbc75279 Moved constructor implementation into .cpp 2011-05-06 12:30:21 +00:00
Robert Osfield
d054427f90 Fixed Coverity reported issue.
CID 11836: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _fullscreen is not initialized in this constructor nor in any functions that it calls.
2011-05-06 12:22:49 +00:00