Refactored original UserData and Descriptions strings to be managed alongside the new user object suppport within
a single osg::Object::UserDataContainer.
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"
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.
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.
"
- 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.
"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.
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.
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.
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.
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.
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.
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.
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
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."
/** 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
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.
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."
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..."
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
"
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.
"
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."
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.
"