Robert Osfield
67fb0b3530
From Patrick Neary, "To the tiff plugin, add the capability to write tiff images with unsigned short data"
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14969 16af8721-9629-0410-8352-f15c8da7e697
2015-07-17 08:12:38 +00:00
Robert Osfield
7a94ce8585
From Patrick Neary, "Added some lesser used tokens that we use from GL_ARB_texture_rg to computeFormatDataType(), and computeNumComponents() in src/osg/Image.cpp"
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14967 16af8721-9629-0410-8352-f15c8da7e697
2015-07-16 19:17:01 +00:00
Robert Osfield
0f918ee5c9
From Cory Slep and Robert Osfield, "When using Open Scene Graph and Qt on Android, the resulting thread that an application developer’s Q*Application is run on is different than what Qt considers the “main” thread, which can cause subtle problems. This is because Qt loads native libraries in one thread, and later runs the application in a different thread. They delay running in the second thread as long as possible as they have a nontrivial bootstrapping process. The motivation for Qt having this second thread is to allow them to remain responsive to both Java and native events, and capture events that would otherwise be “missed”.
...
This gives arise to the requirement that a static initialization of a QObject cannot occur for the Android platform, as Qt incorrectly considers that first thread the “main” one before a client application has even begun executing in its second thread.
The HeartBeat in GraphicsWindowQt.cpp is a QObject static global initialized at load time, causing the above issue. This changeset changes it to be a singleton that is constructed upon first access to its “instance” method.
I have:
- added the static method “instance”,
- moved its constructor to be private, and
- changed the one place it is accessed to access it through the “instance” method.
"
Changes by Robert are to adopt QPointer<HeartBeat> rather than use a C pointer to ensure that the HeartBeat object will be cleaned up automatically rather than leaked.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14963 16af8721-9629-0410-8352-f15c8da7e697
2015-07-16 15:49:32 +00:00
Robert Osfield
b908ced20c
Added check to catch cases where the backdrop coordinate cache is too small for the number of contexts being computed.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14961 16af8721-9629-0410-8352-f15c8da7e697
2015-07-16 11:01:35 +00:00
Robert Osfield
229477c35c
Added initializers and reverted OSX workaround from 2013.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14959 16af8721-9629-0410-8352-f15c8da7e697
2015-07-15 10:00:55 +00:00
Robert Osfield
423105c299
Added _defineList into the osg::StateSet::compare() implementation to address issues with osgUtil::Optimizer ignoring defines.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14948 16af8721-9629-0410-8352-f15c8da7e697
2015-07-14 08:25:17 +00:00
Robert Osfield
c4fdc93053
Added Text::GlyphQuads::release/resizeGLObjects() and handling of inconsistent contextID sizes to avoid crashes when viewers and scene graphs aren't initialized correctly to the right number of contexts.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14947 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 16:09:45 +00:00
Robert Osfield
e94c3334f9
Standardize the call to setUpThreading() in CompositeViewer/Viewer::realize().
...
Standardize the call to scene->resizeGLObjects().
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14944 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 16:03:51 +00:00
Robert Osfield
98ebacdcbb
Fixed repeated name in SETUP_PLUGIN.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14936 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 11:58:49 +00:00
Robert Osfield
f0ac1a16f9
Build fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14934 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 08:57:08 +00:00
Robert Osfield
74ddaeaf50
From Mathias Froehlich, added seriliazers for new osg::ClipControl
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14930 16af8721-9629-0410-8352-f15c8da7e697
2015-07-01 05:10:20 +00:00
Robert Osfield
b4cd40cf7c
From Mathias Froehlich, "Attached a new state attribute implementing the glClipControl that appeared with GL4.5."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14928 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 09:11:00 +00:00
Robert Osfield
5cd478e4bb
Quitened down debug for ViewConfig argument parsing
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14927 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 08:39:33 +00:00
Robert Osfield
d3baf9d311
Build fix for GLDAL>=2
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14925 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 08:38:01 +00:00
Robert Osfield
b5a3a58076
From Jannik Heller, fixed clearReferencesToDependentCameras() calls
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14922 16af8721-9629-0410-8352-f15c8da7e697
2015-06-19 09:51:30 +00:00
Robert Osfield
3bcfad833c
Fixed handling of use GLObjectsVisitor for modifying scene graph state without compiling to OpenGL so that the visitor can be run safely without a graphics context being current.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14921 16af8721-9629-0410-8352-f15c8da7e697
2015-06-17 16:25:47 +00:00
Robert Osfield
6f00eb2548
Small tidy up to make script more readable.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14920 16af8721-9629-0410-8352-f15c8da7e697
2015-06-16 17:18:11 +00:00
Robert Osfield
4ec0e76c0b
Added QT_QTCORE_INCLUDE_DIR entry to qfont plugin build to fix Qt4 build under Linux
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14919 16af8721-9629-0410-8352-f15c8da7e697
2015-06-16 17:17:50 +00:00
Robert Osfield
1e0d682979
From Jannik Heller, "I've added the check for Qt version mismatches into osgQt as suggested in http://forum.openscenegraph.org/viewtopic.php?t=14999 .
...
When an application is built with Qt4, but osgQt was built with Qt5 (or vice versa), upon #includeing osgQt users will receive an #error aborting the build.
This at least provides a proper error message rather than a crash, while we are working on better fixes for the problem."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14918 16af8721-9629-0410-8352-f15c8da7e697
2015-06-15 19:59:01 +00:00
Robert Osfield
1e78098967
From Farshid Lashkari, "I've modified some setter methods of TextBase to avoid unnecessary calls to computeGlyphRepresentation() if the value has not changed."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14912 16af8721-9629-0410-8352-f15c8da7e697
2015-06-12 08:04:42 +00:00
Robert Osfield
e76c91ed78
From Colin McDonald, "An earlier fix in OSG 3.2 has been inadvertently lost in 3.3.x. The glGenerateMipMap function is part of the GL_EXT_framebuffer_object extension. Just checking if the function is present before using it for texture mipmaps is not sufficient, as on remote X-windows displays the client side capability may be different from the display server. This can lead to mipmapped textures failing to render. I've restored a fbo extension check. I've also tided up the GL version checking a little."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14907 16af8721-9629-0410-8352-f15c8da7e697
2015-06-10 16:47:15 +00:00
Robert Osfield
d2e0081690
From Philippe Renon, "Fixed potential divide by zero in NodeTrackerManipulator : The divide by zero happens when throwing a NodeTrackerManipulator.
...
The infinite result trickles down and later causes NaN in culling.
The fix was to use getThrowScale() as done everywhere else."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14905 16af8721-9629-0410-8352-f15c8da7e697
2015-06-10 10:00:27 +00:00
Robert Osfield
11a55ea6de
Added supoort for osg::CullSettings/Camera::InheritanceMaskActionOnAttributeSetting and InheritanceMask properties.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14904 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 16:49:20 +00:00
Robert Osfield
7e05d2fd54
Introduce osg::Object::asNode(), asNodeVisitor(), asStateAttribute() and asUniform() to replace dynamic_cast<> usage in Callback.cpp.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14902 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 10:49:34 +00:00
Robert Osfield
4073910ce8
From Mike Connell, "Give ReadFileCallback access to parent location : These small changes to the database pager allow user code in the ReadFileCallback to safely determine where the file being loaded is destined to be inserted into the scenegraph.
...
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14899 16af8721-9629-0410-8352-f15c8da7e697
2015-06-08 11:18:24 +00:00
Robert Osfield
ceabbdb8d9
Addressed race condition where SceneView::setLightingMode() was setting a shread Master Camera's StateSet.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14898 16af8721-9629-0410-8352-f15c8da7e697
2015-06-08 10:20:53 +00:00
Robert Osfield
f7f1487fca
Fixed setReferenceTime() bug where a * eather than the correct / was being used. Bug and fix suggested Benjamin Richter.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14896 16af8721-9629-0410-8352-f15c8da7e697
2015-06-07 11:13:02 +00:00
Robert Osfield
32b60cd2d7
From Jannik Heller, Transform::computeBound() optimization.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14894 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:13:05 +00:00
Robert Osfield
fd46645ade
From KOS, "New classes for osgAnimation presented: UpdateFloatUniform, UpdateVec3fUniform and UpdateMatrixfUniform (based on UpdateUniform template)
...
Classes operate like osgAnimation::UpdateMaterial for Material's diffuse component, but change Uniform."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14890 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 09:14:35 +00:00
Robert Osfield
e7244e654a
Build fix for when Uniform::Callback isn't defined
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14887 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 08:38:18 +00:00
Robert Osfield
da73723949
From Konstantin Matveyev, serializer support for UniformCallback
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14886 16af8721-9629-0410-8352-f15c8da7e697
2015-06-02 10:25:13 +00:00
Robert Osfield
e3f0876e87
From Konstantin Matveyev, "I've changed osg::Uniform::Callback to osg::UniformCallback.
...
osg::UniformCallback inherits osg::Callback now.
I don't really now if this class should be inside osgWrappers/serializers
because StateAttributeCallback is not presented there, but i've included it in the patch.
Please see archive in the attachment.
PS
DEEP_COPY_UNIFORMS works for me.
"
Note from Robert Osfield, added typedef UniformCallback Callback for backwards compatibility.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14885 16af8721-9629-0410-8352-f15c8da7e697
2015-06-02 09:33:22 +00:00
Robert Osfield
ba9dfb2ff6
From Albert Luaces, typo fixes.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14883 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:40:20 +00:00
Robert Osfield
d14a602a59
From Jannik Heller, typo fixes
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14882 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:11:49 +00:00
Robert Osfield
e0028bef6e
From Jannik Heller, "This patch adds a missing initialization of osgParticle::ParticleProcessor::_frameNumber in the copy constructor.
...
I noticed this because valgrind was complaining about use of uninitialized memory."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14881 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 12:14:53 +00:00
Robert Osfield
120bf699b2
From Frashud Lashkari, "I was getting "Unsupported wrapper class..." error messages when attempting to load osgb models simultaneously from multiple threads. I believe the problem is caused by un-synchronized access to the global osgDB::ObjectWrapperManager class. I've attached a change that adds a mutex to the class and uses it when accessing the internal wrapper/compress maps. This appears to fix the issues I was having."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14880 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 12:07:04 +00:00
Robert Osfield
78a01ce2a5
From Jannik Heller, "I have added new functions Texture::generateAndAssignTextureObject mirroring the Texture::generateTextureObject functions.
...
I have left the Texture::generateTextureObject functions intact as I'm not sure if/how it's used outside the core OSG. If you feel that compatibility isn't important in that area feel free to drop it.
While testing the build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF I found a compile error in GlyphGeometry.cpp that was entirely unrelated to the changes I've made. The fix is included in the patch.
There is one thing left to fix and that is Texture2D::SubloadCallback:
class OSG_EXPORT SubloadCallback : public Referenced
{
public:
....
virtual TextureObject* generateTextureObject(const Texture2D& texture, State& state) const
{
return osg::Texture::generateTextureObject(&texture, state.getContextID(), GL_TEXTURE_2D);
}
...
}"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14879 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 10:50:44 +00:00
Robert Osfield
44c406e167
From Jannik Heller, build fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14878 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 10:41:43 +00:00
Robert Osfield
f72b62a065
From Jannik Heller, fix for race condition in orphanded BufferObject handling.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14877 16af8721-9629-0410-8352-f15c8da7e697
2015-05-29 07:52:27 +00:00
Robert Osfield
4f423ff66b
From Colin McDonald, "rc/osgUtl/MeshOptimizers.cpp won't compile on some systems due to a missing std:: namespace prefix."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14876 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:24:48 +00:00
Robert Osfield
906bb27fa0
From Farshid Lashkari, "attached a small change to osgUtil::SceneView that prevents unnecessary calls to glClear when the split stereo separation is 0."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14875 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:22:05 +00:00
Robert Osfield
0f35f31d72
From Thomas Hogarth, "Little fix for ClassInterface::getSupportedProperties, before if you set searchAssociates to false then it would return the same BaseSerialiser::Type for every entry in the PropertyMap as i was not being incremented on line 539. Fix attached."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14874 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:17:26 +00:00
Robert Osfield
ddda9a6a0d
From We See, "I found a small bug in osgUtil::RenderStage::draw() (osg 3.3.7), which crashes osg. The problem was caused by an access to the object _camera without checking whether the object is valid. So I changed the line:
...
Code:
if (_cameraRequiresSetUp || (_cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount()))
to
Code:
if (_cameraRequiresSetUp || (_camera.valid() && _cameraAttachmentMapModifiedCount!=_camera->getAttachmentMapModifiedCount()))
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14873 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:12:05 +00:00
Robert Osfield
01e87939a4
From Farshid Lashkari and Robert Osfield, "a small change to the CullVisitor class, which will use cloneType() on the root render stage when creating children render stages. This allows us to pass a custom RenderStage object to the SceneView and have it used for all sub-stages."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14872 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 17:09:25 +00:00
Robert Osfield
820166b49d
Rewrote the Text3D bevel implementation to automatically adjust bevel thickness to avoid overalapping and erronous tesselation.
...
Added osgText::Bevel::s/getRoundedConcaveJunctions(bool) to control how the bevel should be tessellated around concave junctions on the glyph boundary.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14871 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 10:05:47 +00:00
Robert Osfield
05841d7c00
Added use of ref_ptr<>
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14870 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 08:48:33 +00:00
Robert Osfield
95a507299b
Changed the EventQueue::frame() event generation to use the generatePointerData/reprojectPointerData() methods in the same way that other events are handled.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14869 16af8721-9629-0410-8352-f15c8da7e697
2015-05-25 12:39:18 +00:00
Robert Osfield
d5b615a4e1
Added osgGA::GUIEventAdapter* returns from various EventQueue event generation methods.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14868 16af8721-9629-0410-8352-f15c8da7e697
2015-05-25 11:33:04 +00:00
Robert Osfield
2e11113072
Fixed memory error associated with reading over the end of container due to an unbounded while loop.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14866 16af8721-9629-0410-8352-f15c8da7e697
2015-05-21 14:11:32 +00:00
Robert Osfield
eb5791e5e2
From Dmitriy Ogalcev, fix for crash when calling setCursor from a non GUI thread
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14861 16af8721-9629-0410-8352-f15c8da7e697
2015-04-30 13:59:24 +00:00