Commit Graph

11345 Commits

Author SHA1 Message Date
Robert Osfield
b507858240 Fixed indentation 2011-05-26 16:13:04 +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
5df298f475 Updated ChangeLog 2011-05-25 09:34:53 +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
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
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
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
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
b1d3763510 Renamed example from osgviewerQtContext to osgviewerQt. 2011-05-16 09:17:30 +00:00
Robert Osfield
b4b0e4f069 Updated example to use new GraphicsWindowQt::getGLWidget() method instead of deprecated getGraphWidget() method 2011-05-16 09:16:22 +00:00
Robert Osfield
b3a1b30ab3 Added support for setting threading model from command line and changed default threading model to
CullDrawThreadPerContext.  New command line options are:

   osgviewerQtContext --SingleThreaded
   osgviewerQtContext --CullDrawThreadPerContext
   osgviewerQtContext --DrawThreadPerContext
   osgviewerQtContext --CullDrawThreadPerContext
2011-05-16 09:15:02 +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
c4dff10cb4 From Wang Rui, build fix 2011-05-15 08:27:04 +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
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
f7699a3bfd Added newline to end of file 2011-05-12 18:40: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
5c7b68e63f Removed unused parameter 2011-05-12 13:08:02 +00:00
Robert Osfield
9bbf71b53a From Wang Rui, "A Chinese engineer (named Beilei Geng) reports a possible bug in the
osg2cpp application to me today. The conversion result may become
incorrect if there are quotation marks ( " ) in the shader file, which
will mostly appear in comment lines.

Replace all " into \" before writing to cpp files will solve the
problem, as the attached file shows."
2011-05-12 12:28:43 +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
a1e100adbe Removed redundent method 2011-05-12 10:28:47 +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
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