Commit Graph

3573 Commits

Author SHA1 Message Date
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
Robert Osfield
4a3aa2680d Fixed Coverity reported issues.
CID 11843: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _inexp is not initialized in this constructor nor in any functions that it calls.
Non-static class member _outexp is not initialized in this constructor nor in any functions that it calls.

CID 11842: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _inexp is not initialized in this constructor nor in any functions that it calls.
Non-static class member _outexp is not initialized in this constructor nor in any functions that it calls.
2011-05-06 10:30:23 +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
cb5a8495a7 Updated SO version number for dev release 2011-05-06 09:26:14 +00:00
Robert Osfield
12b56726d2 Fixed Coverity reported issues.
CID 10392: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.

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

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

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

CID 10920: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _maxIndex is not initialized in this constructor nor in any functions that it calls.
Non-static class member _minIndex is not initialized in this constructor nor in any functions that it calls.
2011-05-06 09:21:04 +00:00
Robert Osfield
02e97c0f79 Fixed build problem 2011-05-06 09:00:46 +00:00
Robert Osfield
fbfc19d3ec Fixed Coverity reported issue.
CID 11844: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _defaultValue is not initialized in this constructor nor in any functions that it calls.
Index: ../include/osgDB/Serializer
2011-05-05 12:37:00 +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
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
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
7c49e69042 Updated version after 2.9.13 dev release 2011-04-26 15:24:21 +00:00