Commit Graph

4257 Commits

Author SHA1 Message Date
Denys Koch
ec86072533 Fix flawed BoundingSphere inequality operator 2017-08-28 16:53:20 +01:00
Robert Osfield
ec89d96114 Fixed underflow issue 2017-08-23 15:26:52 +01:00
OpenSceneGraph git repository
e5cccefafe Merge pull request #291 from eligovision/OpenSceneGraph-3.4_animation
osgAnimation: classes UpdateVec2fUniform and UpdateVec4fUniform added
2017-07-31 16:47:09 +01:00
konstantin.matveyev
700dd2b9a7 [+] Two classes added: osgAnimation::UpdateVec2fUniform, osgAnimation::UpdateVec4fUniform 2017-07-31 17:50:08 +03:00
OpenSceneGraph git repository
c1585d3c17 Merge pull request #289 from eligovision/OpenSceneGraph-3.4_apple
IMAGEIO plugin tweak
2017-07-31 15:06:57 +01:00
konstantin.matveyev
60eb458c47 [*] imageio changed: more methods of storing image supported; tested on macOS (compatibility profile) and iOS(GLES2/3) 2017-07-31 15:37:55 +03:00
konstantin.matveyev
23edfad1fd [**] pragma(tic) fix: 'defineMap.changed flag' condition changed in State::push/popDefineList 2017-07-31 13:40:00 +03:00
James Turner
eabd08ef25 Attempt to fix broken DLL exports from osgDB
Only export the osgDB method implementations, instead of the entire
class, and hence avoid exporting symbols from the base class, which
then conflict with other compilation units when linking.

This avoids the need for /FORCE:MULTIPLE linker option with MSVC.
2017-07-27 16:52:22 +01:00
Robert Osfield
8b433f8364 Replaced osg::DrawElementeUInt usage for a more flexible DrawElements base class approach with the default set to DrawElementUShort to ensure compatibility with GLES2 implementes that don't support uint for glDrawElements. 2017-05-25 10:41:12 +01:00
Robert Osfield
46df1fd141 Fixed crash in handling of osg::Callback attached as Drawable update callback.
Added handling of osg::Callback as a Drawable cull callback
2016-11-23 19:18:14 +00:00
Robert Osfield
8af48d369c Added Dragger::applyAppropriateFrontFace(StateSet*) to make it easy to handle inverted matrices by toggling the FrontFace to sure the correct face is visible. 2016-11-11 17:16:40 +00:00
Robert Osfield
b58048e43b Fixed handling of Locator's with negative extents 2016-11-11 13:54:15 +00:00
Pjotr Svetachov
a4c9cac2a8 small optimization to the osgb/t serializers. 2016-05-31 11:28:27 +01:00
Jannik Heller
5c46d9de3e Fixed typo of method name 2016-05-30 13:43:09 +01:00
Robert Osfield
4a1f033dbe Added non const releaseGLObjects(osg::State* state) for backwards compatibility 2016-04-27 08:40:35 +01:00
Robert Osfield
653af27d02 Fixed ShaderComposer::releaseGLObjects(State*) const method as it's const was missing.
Rewrote the ShaderComposer::releaseGLObjects() const method to pass on the releaseGLObjects() calls to any associated Program or Shader objects.
2016-04-18 20:49:02 +01:00
Robert Osfield
879a8bd020 Changed the default value paramter to be consistent with the non templated version of StateSet::setTextureAttributeAndModes(..) 2016-04-01 11:47:02 +01:00
Robert Osfield
f044bc6b45 From Joe Thompson, "OpenSceneGraph cannot be built with Visual Studio 2008.
The file osg-OpenSceneGraph-3.4.0\include\osg\Types
typedefs int8_t, int16_t, int32_t and int64_t
These are typedefed as signed __intX in several other places.
With VS2008, this causes an error "int8_t redifined, different basic types"
Explicitly declaring them signed fixes the error."
2016-03-02 09:21:15 +00:00
Robert Osfield
47c531cc37 Updated the AuthenticationDetails::HttpAuthentication enum to reflect current libcurl values 2016-02-18 19:55:58 +00:00
Robert Osfield
bf1aa5088e Revert "From Jannik Heller and Robert Osfield, introduced ReadResult/WriteResult::statusMessage() method that creates a std::string from the stutus value and message string."
as this submission was meant for the master only, not the binary compatible 3.4 branch.

This reverts commit df97a18a5754ed39ac43044ad9557e8409790ff3.
2016-01-25 12:18:32 +00:00
Robert Osfield
7239050c5b Fixed typo View::setImagePager(..) template method 2016-01-21 08:32:57 +00:00
Robert Osfield
55bb474c3b From Jannik Heller, "This submission fixes a bug introduced in commit 5b17e3bc2a "Introduced CMake option OSG_PROVIDE_READFILE option...". The added overload for StateSet::setAttributeAndModes was ignoring the mode setting.
"
2016-01-20 14:24:06 +00:00
Robert Osfield
ff1051a6fd From Jannik Heller and Robert Osfield, introduced ReadResult/WriteResult::statusMessage() method that creates a std::string from the stutus value and message string. 2016-01-19 17:39:03 +00:00
Robert Osfield
6a67be2e32 Introduced CMake option OSG_PROVIDE_READFILE option that defaults to ON, but when switched to OFF disables the building of the osgDB::read*File() methods,
forcing users to use osgDB::readRef*File() methods.  The later is preferable as it closes a potential threading bug when using paging databases in conjunction
with the osgDB::Registry Object Cache.  This threading bug occurs when one thread gets an object from the Cache via an osgDB::read*File() call where only
a pointer to the object is passed back, so taking a reference to the object is delayed till it gets reassigned to a ref_ptr<>, but at the same time another
thread calls a flush of the Object Cache deleting this object as it's referenceCount is now zero.  Using osgDB::readREf*File() makes sure the a ref_ptr<> is
passed back and the referenceCount never goes to zero.

To ensure the OSG builds when OSG_PROVIDE_READFILE is to OFF the many cases of osgDB::read*File() usage had to be replaced with a ref_ptr<> osgDB::readRef*File()
usage.  The avoid this change causing lots of other client code to be rewritten to handle the use of ref_ptr<> in place of C pointer I introduced a serious of
templte methods in various class to adapt ref_ptr<> to the underly C pointer to be passed to old OSG API's, example of this is found in include/osg/Group:

    bool addChild(Node* child); // old method which can only be used with a Node*

    tempalte<class T> bool addChild(const osg::ref_ptr<T>& child) { return addChild(child.get()); } // adapter template method

These changes together cover 149 modified files, so it's a large submission. This extent of changes are warrent to make use of the Object Cache
and multi-threaded loaded more robust.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15165 16af8721-9629-0410-8352-f15c8da7e697
2015-10-22 14:14:53 +00:00
Robert Osfield
61d317b0b8 From Kristofer Tingdahl, "we had a minor shadow problem with the osg-3.4 that pollutes our continuous integration"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15144 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 15:20:32 +00:00
Robert Osfield
0567ce316d From Laurens Voerman, "I found that using an ImageSequence with mode PAGE_AND_DISCARD_USED_IMAGES triggers the (3) imageThreads to run and never stop, even when no more work is to be done. This is due to a bug in the stop condition currently setting the thread to stop and wait for a signal only when no work needs to be done AND the databasepager is paused.
It should stop and wait for a signal on either of those two. Due to a few logical inversions it boils down to replacing || with &&

OLD _block->set((!_requestList.empty() || !_pager->_databasePagerThreadPaused));
NEW _block->set((!_requestList.empty() && !_pager->_databasePagerThreadPaused));//release the threads to run IF (work_to_be_done && not_paused)

This bug is present since svn rev 8663 (just before 2.6.0 release)


attached is a zip with the files:

OpenSceneGraph\include\osgDB\ImagePager



This file is valid for svn branch and stable 3.2 and 3.4
branches 2.6 - 3.0 have the same bug, but other differences in the file."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15126 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 15:05:06 +00:00
Robert Osfield
2ad1e661e0 Added initializer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15113 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 10:44:20 +00:00
Robert Osfield
2bed348da1 Build fix for VS and installing TYpes
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15076 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 05:04:39 +00:00
Robert Osfield
8b4ff0f50a Added #idef guards for SGIX usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15070 16af8721-9629-0410-8352-f15c8da7e697
2015-08-09 09:40:59 +00:00
Robert Osfield
5e8d5b50db From Andy Skinner, "Someone was using our code on a system that does not seem to have the SGIX symbols used in osgViewer.cpp.
I used osgSetGLExtensionsFuncPtr to remove the symbols.  I don't know how to test this path, but it did remove the symbols from libosgViewer.so.  I have also not been able yet to see if that was sufficient for our customer.

 

I did this by looking at other cases, and I tried to follow some of the same practices in PixelBufferX11, like using _useSGIX in a similar way to the previous _useGLX1_3."




git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15042 16af8721-9629-0410-8352-f15c8da7e697
2015-08-03 19:14:11 +00:00
Robert Osfield
eb90d9aa34 Warning fix
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15033 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 10:59:23 +00:00
Robert Osfield
761cf52bb7 Added explicit initialization of osg::Referenced(true) to osg::Operation subclasses as it uses virtual inhertiance from osg::Referenced.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15024 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 15:46:39 +00:00
Robert Osfield
42efcf24fb From Pjotr Svetachov, buid fixes for VS2015.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15022 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 14:37:24 +00:00
Robert Osfield
3d69d46e3e Moved from svn/trunk, moved GL_ALPHA_TEST from AlphaFunc to GLDefines
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15004 16af8721-9629-0410-8352-f15c8da7e697
2015-07-22 14:30:01 +00:00
Robert Osfield
2264c3b7e2 Fixed typo
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@14996 16af8721-9629-0410-8352-f15c8da7e697
2015-07-21 13:42:22 +00:00
Robert Osfield
222871aade 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/branches/OpenSceneGraph-3.4@14946 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 16:09:40 +00:00
Robert Osfield
2eff96d1a4 From Terry Welsh, "fThis fixes problem where new glClipControl feature would not compile for GLES2 profile"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@14942 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 08:48:41 +00:00
Robert Osfield
08893c7fcc Moved the defination of GL_MAX_VARYING_COMPONENTS to GL_3_0 block to avoid warnings of redefinition.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14933 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 08:52:55 +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
fe09ebfbdb From Christian Kehl, added Vec2::set(const Vec2) method
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14924 16af8721-9629-0410-8352-f15c8da7e697
2015-06-26 09:40:37 +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
824cc95518 Experiment with how to define GLsizeiptr.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14917 16af8721-9629-0410-8352-f15c8da7e697
2015-06-15 13:51:29 +00:00
Robert Osfield
75891924bb Removed old and unused windows code path to avoid confusion
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14915 16af8721-9629-0410-8352-f15c8da7e697
2015-06-12 20:23:15 +00:00
Robert Osfield
fc9848ff19 Reverted the typdef GLfloat GLdouble for Andoid as this was causing conflicts.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14910 16af8721-9629-0410-8352-f15c8da7e697
2015-06-11 08:44:26 +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
bd9bd3f8b2 Added namespace around typedef to avoid conflict issues
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14903 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 12:51:38 +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
ff42ff2a11 From Jannik Heller, Removed unused StatsHandler::_keyEventToggleVsync
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14893 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:05:24 +00:00
Robert Osfield
23cd6d2ba3 From Jannik Heller, "In the attachment you will find a build fix for the latest trunk. osgAnimation failed to compile when using OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF ."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14892 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:00:17 +00:00