Commit Graph

3225 Commits

Author SHA1 Message Date
Robert Osfield
6c07be375c Clean up of initialization of statics/use of getenv 2010-03-11 16:46:01 +00:00
Robert Osfield
9ab856323d Added export for PerContextShader. 2010-03-11 14:48:54 +00:00
Robert Osfield
1e1c79f257 Updated version 2010-03-10 16:31:15 +00:00
Robert Osfield
950d282f55 From Vincent Bourdier, addition of out of memory read result. 2010-03-10 14:28:18 +00:00
Robert Osfield
e082b01f26 From Wang Rui, "I've initially added the XML support of the new native osg format,
using osgDB::XmlParser. The extension for XML-formatted scenes is
.osgx, corresponding to .osgb for binary and .osgt for ascii. It could
either be rendered in osgviewer or edited by common web browsers and
xml editors because of a range of changes to fit the XML syntax. For
example, the recorded class names are slight modified, from
'osg::Geode' to 'osg--Geode'.

To quickly get an XML file:
# ./osgconv cow.osg cow.osgx

The StreamOperator header, InputStreram and OutputStream classes are
modified to be more portable for triple ascii/binary/XML formats. I
also fixed a bug in readImage()/writeImage() to share image objects if
needed.

The ReaderWriterOSG2 class now supports all three formats and
reading/writing scene objects (not nodes or images), thanks to
Torben's advice before.
"
2010-03-10 13:48:41 +00:00
Robert Osfield
6da42d9cd6 From Wang Rui, QWidgetImage class that enables QWidgets to be used as an interactive osg::Image that can be assigned to textures. 2010-03-10 13:24:53 +00:00
Robert Osfield
6ae2f4c6c6 From Sukender, "Here is my proposal. I fixed what Paul said, added some doxygen comments, added the function I told about, and removed the two "find('/')"-like calls to use only one." 2010-03-10 11:40:17 +00:00
Robert Osfield
bafe1d0b94 Added automatic updating of the OpenThreads version number from the CMake version numbers 2010-03-10 09:37:04 +00:00
Robert Osfield
c765a35650 From Wojcoech Lewandowski, "Attched are aimShadowCastingCamera() call changes, I have described in former post. Basically now MinimalShadowMap overrides first variant and keeps second. So both variants of aimShadowCastingCamera are clearly defined in MinimalShadowMap::ViewData scope. This way compilers have no problem and code looks less obscure. Changes made against the trunk." 2010-03-05 16:17:12 +00:00
Robert Osfield
86f491e649 Replaced use of unsigned int/enum mask combinations with int/enum mask combinations to avoid the need for casting enums to unsigned ints,
and to avoid associated warnings.

Update wrappers to reflect these changes.
2010-03-05 12:55:08 +00:00
Robert Osfield
273420bb1c Updated version and soversion numbers 2010-03-05 12:53:08 +00:00
Robert Osfield
5383297cbe Change Shader::getPCS(..) from protected to public scope to enable isCompiled() method to be accessible in applications.
Updated wrappers
2010-03-05 11:30:50 +00:00
Robert Osfield
4282b284e5 From Mathias Froehlich, Integration of osgText::Font with QFont to enable use of Qt fonts and selectors in osgText. 2010-03-04 12:43:09 +00:00
Robert Osfield
33b28a816e Added Export for new osgQt lib 2010-03-04 12:18:04 +00:00
Robert Osfield
1a1b7bd7a1 Moved QWebViewImage and QGraphicsViewAdapter into new osgQt utility library. 2010-03-04 12:15:35 +00:00
Robert Osfield
9f8a4be2cd Refactored DatabasePager so that it nolonger takes ref_ptr<PagedLOD>, but instead uses a custom version of observer_ptr<>.
This change should make it possible to delete PagedLOD's independantly from the DatabasePager, and also prevent issues of
consistency of the pager when subgraphs when are cached elsewhere in the application such as in the Registry filecache.
2010-03-03 16:40:19 +00:00
Robert Osfield
ba3971bb45 Added a ShadowTechnique::computeOrthogonalVector(const osg::Vec3& direction) const method for helping compute an appropriate
up vector to setViewMatrixAsLookAt(..) codes in osgShadow.  This will addresses previous issues that occured when look vectors
co-incided with the hard coded up vectors.
2010-03-01 13:00:04 +00:00
Robert Osfield
42a050e87c From Wojciech Lewandowski, "Here comes a list of small fixes in StandardShadowMap and derived classes affecting LispSM techniques. Changes made against SVN trunk.
Fixes in StandardShadowMap.cpp & MinimalShadowMap.cpp were made for spotlight issues. There were cases when further located spotlights were not shadowing properly.

Small tweak in DebugShadowMap & StandardShadowMap.cpp to not limit shadow maps to texture2D (which should also allow texture2D arrays and cube maps). I simply replaced ptr to osg::Texture2D with pointer to osg::Texture. Interpretation of this member could be now changed with change of shaders in derived classes. This may be useful for guys who override LispSM or MinimalBoundsShadowMaps techniques. Could be useful for implementation of PerspectiveCascadedShadowMaps technique for example.

ConvexPolyhedron.cpp & DebugShadowMap.cpp contain debug HUD tweaks.

Change in ConvexPolyhedron.cpp overcomes the regression problem with color per primitive binding which caused that shadow volume outlines stopped to draw. I simply changed PER_PRIMITIVE to PER_PRIMITIVE_SET and it works again.

Other adition is dump method I added to DebugShadowMap which can be used in shadow debugging mode to dump current frame shadow volumes & scene to osg file. It could be then loaded into viewer and freely examined from different angles (which is difficult inside the application if shadow adopts to view and projection). "
2010-03-01 11:52:44 +00:00
Robert Osfield
56c54958a3 Added spaces between < > template parts of macros to prevent compile problems when templates as use as macro parameters 2010-02-26 15:54:37 +00:00
Robert Osfield
bbca791251 From Michael Platings, "Here's the all-new, all-dancing DAE plugin, with support for reading
osgAnimation. It's been tested with the majority of the samples in the
COLLADA test repository and works with all of them either as well as, or
better than, the version of the plugin currently in SVN.

Known issue: vertex animation (AKA morphing) doesn't work at present,
but that's a relatively unpopular method of animating so it's not high
on my priority list."

Follow up email:
"I've been informed that the previous DAE submission didn't build on
unix, so here's the submission again with the fixes.  Thanks to Gregory Potdevin and Benjamin Bozou.
Also, my apologies to Roland for not crediting his part in making DAE
animation happen, my work was indeed built on top of his work. Thanks
also to Marius Heise and of course Cedric Pinson."

Changes by Robert Osfield, fixed compile issues when compile without C* automatic conversion enabled in ref_ptr<>
and constructor initialization fixes to address some warnings under gcc.
2010-02-26 14:41:50 +00:00
Robert Osfield
d50eacd07e From Paul Martz, "The changes are very similar to Magne's, except they now take the near plane into account. The changes are:
* Change OcclusionQueryNode::getPassed to take a NodeVisitor rather than the distance from BS center to the eye point. Change where CullVisitor calls this method to use the new parameters.
 * getPassed now exits early and returns true to avoid blinking / blink-in of geometry for the first frame or for out-of-range LOD children coming back into view.
 * getPassed now considers the distance from the near plane to the bounding sphere (rather than eye point to bounding sphere) when determining if the viewer is "inside" the bounding sphere or not."
2010-02-26 10:13:28 +00:00
Robert Osfield
8059c4a745 From Chris Hanson, comment fix. 2010-02-25 18:03:14 +00:00
Robert Osfield
605ad76691 From Wang Rui, "Attached is the osgTerrain wrappers, based on the latest SVN version
of OSG. I modified the osgDB::InputStream and OutputStream and the
PagedLOD wrapper as well. Now all seems to work fine with paged
scenes. I've tested with the puget terrain data and the osgdem
application from VPB:
# osgdem --xx 10 --yy 10 -t ps_texture_4k.tif --xx 10 --yy 10 -d
ps_height_4k.tif -l 8 -v 0.1 -o puget.osgb

As the ive plugin does, The PagedLOD wrapper now automatically add the
latest file path to PagedLODs' databasePath member, to help them find
correct child positions. I also changed the image storage strategy of
the OutputStream class, to store them inline by default. The osgt
extension should also work, in case the image files are also written
to the disk.
"
2010-02-25 17:53:51 +00:00
Robert Osfield
590bf9070d From Michael Platings, "There is a function, convertStringFromCurrentCodePageToUTF8() that would be useful outside the FBX plugin so it belongs in osgDB. I've attached ConvertUTF and ConvertUTF.cpp with the function added for you to commit at your convenience.
"
2010-02-25 17:07:34 +00:00
Robert Osfield
9a45538db9 Added an empty() method 2010-02-22 17:41:35 +00:00
Robert Osfield
c16d55fa9b From Trajce Nicklov, fixes to warnings 2010-02-22 09:50:37 +00:00
Robert Osfield
bb21136d92 Added missing _ptr = rp._ptr to constructor. 2010-02-22 08:39:33 +00:00
Robert Osfield
7f454bef3e Converted View across to use ObserverNodePath. 2010-02-20 17:36:55 +00:00
Robert Osfield
b1001c2a9c Moved implementation of Observer destructor and constructor from header into .cpp to avoid possible issues with imports/exports under Windows build. 2010-02-19 20:18:48 +00:00
Robert Osfield
8b67830f6e Added check against OSG_GL3_AVAILABLE to avoid issues with GL3 build under linux 2010-02-19 20:14:12 +00:00
Robert Osfield
eca4361c4a Clean up observer_ptr<> and removed the eronous casting of ptr in objectDeleted. 2010-02-19 19:50:55 +00:00
Robert Osfield
43f9b13199 Removed the uncessary subclassing from osg::Object as this base class is already pullled via ViewerBase 2010-02-19 18:56:21 +00:00
Robert Osfield
b807fc83fe Added mutex lock to destructor. 2010-02-19 16:04:33 +00:00
Robert Osfield
8f11af8d3e Replaced local mutex with getObserverMutex(). 2010-02-19 15:41:42 +00:00
Robert Osfield
88474271e3 From Fabien Lavignotte, "In order to compile on Windows with Wrappers ON, some exports are still missing on osgPresentation::AnimationMaterialCallback and osgUtil::IncrementalCompileOperation::CompileSet." 2010-02-19 14:30:01 +00:00
Robert Osfield
dc728aa184 Removed no longer defined methods and updated wrappers 2010-02-19 14:05:49 +00:00
Robert Osfield
530c947c94 Added an InitGlobalMutexes to enforce early construction and hence late destruction of singleton mutexes. 2010-02-19 09:02:24 +00:00
Robert Osfield
b5c5ae7185 Added newline. 2010-02-18 22:53:15 +00:00
Robert Osfield
bff9b565df Completed usage of ObserverNodePath to fix longstanding crash that occurred when nodes in parental chain of a newly loaded node had been deleted. 2010-02-18 21:21:59 +00:00
Robert Osfield
b09757bdb8 Refactored the osg::Referenced observerset code so that it now uses a dedicated ObserverSet class,
which utilises a global recursive mutex that is dedicated to manage Observer and ObserverSet.

The new global mutex for observers avoids problems with deadlocks that were occurring previously when
an osg::Refenced object was being deleted at the same time as on osg::ObserverNodePath.
2010-02-18 21:21:12 +00:00
Robert Osfield
6196652ef0 Replaced use of observer_ptr<> with straight C pointer to avoid thrashing of an observer_ptr<> every frame.
Changed include to point to new Observer header
2010-02-18 21:18:49 +00:00
Robert Osfield
649319ccaa Added className() to assist with debugging 2010-02-18 21:17:36 +00:00
Robert Osfield
787daeeb93 Refactored the ReentrantMutex support so that it utilises the underling thread implementation for recusive mutex support. 2010-02-18 20:14:41 +00:00
Robert Osfield
ab66740fb0 Added new setNodePathTo() method 2010-02-18 09:00:37 +00:00
Robert Osfield
9404abfef5 Added className() implementation to help wiht debugging. 2010-02-16 17:38:49 +00:00
Robert Osfield
26a9e499a4 Fixed crash 2010-02-16 14:05:49 +00:00
Robert Osfield
a8e26f3a0c Threads safety fixes based on suggestions from Tim Moore. 2010-02-16 11:10:49 +00:00
Cedric Pinson
63064c64cb From Jeremy Moles, add new EaseMotion and add example osganimationeasemotion to demonstrate them 2010-02-15 23:47:12 +00:00
Robert Osfield
ff38da1290 Refactor various NodeTracker and MatrixManipulator classes to use the osg::ObserverNodePath and osg::oberserver_ptr<> classes 2010-02-15 20:15:32 +00:00
Robert Osfield
4a567d9954 Introduced new osg::ObserverNodePath class that robustly manages a NodePath in a thread safe manner,
making it easier for users to track a NodePath even when nodes in the path get deleted.
2010-02-15 20:14:32 +00:00