Commit Graph

13545 Commits

Author SHA1 Message Date
Robert Osfield
ba309bf38b Refactored the make tag-test, tag-run, branch-test, branch-run and ChangeLog features of the CMakeLists build system so it now supports working off git instead of subversion 2016-03-01 19:50:05 +00:00
Robert Osfield
60a7b8ce02 Within the #pragmatic shader composition code added platform specific line endings for WIN32 vs all other platforms to "\r\n" and "\n" respectively. 2016-03-01 11:47:33 +00:00
Robert Osfield
3a15c66290 Merged improved parsing of #pragma from master. 2016-02-29 15:57:01 +00:00
Robert Osfield
577d161303 Fixed debug build 2016-02-24 16:00:12 +00:00
Robert Osfield
6011bc4307 From Jannik Heller, osgParticle freeze on cull fix, ammended by Robert Osfield to make if statements a little more readable. 2016-02-23 10:14:21 +00:00
Robert Osfield
40caedc7cd From Anish Thomas, "Underflow bug in BufferObject pool usage" 2016-02-22 09:22:06 +00:00
Robert Osfield
4371512dd2 From Bjorn Blissing, "I stumbled upon a strange ifdef-case inside Geometry.cpp
Currently the code looks like this:

Code:
    DrawElementsUByte* elems = new DrawElementsUByte(PrimitiveSet::TRIANGLES);
    elems->push_back(0);
    elems->push_back(1);
    elems->push_back(2);

    elems->push_back(2);
    elems->push_back(3);
    elems->push_back(0);
    geom->addPrimitiveSet(elems);
    geom->addPrimitiveSet(new DrawArrays(PrimitiveSet::QUADS,0,4));

The second condition looked really strange (note the ! sign), and results in pretty much all code paths uses the first code. The correct version should probably be that only people with GLES1 or GLES2 should use GL_TRIANGLES to simulate quads. And all others should use the native support for GL_QUADS.
"
2016-02-19 15:04:14 +00:00
Robert Osfield
9132d98785 To the COLLADA_INCLUDE_DIR search paths added the directories:
/usr/local/include/collada-dom2.4
    /usr/local/include/collada-dom2.2
    /opt/local/include/collada-dom2.4
    /opt/local/include/collada-dom2.2
    /usr/include/collada-dom2.4
    /usr/include/collada-dom2.2

To enable recent versions of the DOM to be found in their new install locations.
2016-02-19 12:21:36 +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
4704621c39 Replaced (long int) with more portable (GLint64) 2016-02-18 10:58:26 +00:00
Robert Osfield
0244b234ca From Tony Vasile, "This is a fix for the handling of OpenFlight files with switches whose children have a transformation matrix on them. It may break other things and I have only tested this with one of my models." 2016-02-18 10:07:29 +00:00
Robert Osfield
09fd75dcf4 From Mourad Boufarguine, "This submission fixes typos in Uniform::getTypename() method in Uniform.cpp (missing "r" in usampler names)." 2016-02-18 09:28:33 +00:00
Robert Osfield
c3d45732a1 Renamed zero and one to transparentCount and opaqueCount to avoid confusion in their meaning and usage. 2016-02-18 08:59:26 +00:00
Robert Osfield
89f74b1a56 Fixed warning 2016-02-17 17:36:10 +00:00
Robert Osfield
6089257d3c Commented out unused functions and variable. 2016-02-17 17:08:07 +00:00
Robert Osfield
97336b89ac Introduced a separate GLuint64 one variable to get around a 32bit build timer issue under Windows. 2016-02-17 16:03:26 +00:00
Robert Osfield
229b833a5a Fixed check against Drawable::isCullingActive().
Removed old code intended to check the Geode parent of a Drawable to see if it's CullingActive is true as this was broken by the change osg::Drawable being derived from osg::Node rather than osg::Object.
2016-01-27 10:10:01 +00:00
Robert Osfield
7ae1421864 Added .gitignore to queiten down git status reports 2016-01-25 19:44: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
e798db04c8 From John Farrier, "Best I can tell, there is an enumeration for NEVER_CHECK_GL_ERRORS in CheckForGLErrors, defined in State. State.cpp does check to see if you want MORE error checking, but there is no way to turn OFF error checking. This change allows disabling of OpenGL error checking." 2016-01-25 10:49:23 +00:00
Robert Osfield
adbadd66be From Patrick Neary, "In ShaderComposer::getOrCreateProgram(), tesselation control and evaluation shaders are processed but not added to the shader program." 2016-01-25 10:26:52 +00:00
Robert Osfield
bd0cf5e47d Changed the prototype from NULL to osg::DummyObject to address a bug in reading .osgt + .osgx where an image is written out but fails to read the file causes subsequent parts of the file to be mis-read 2016-01-22 10:14:35 +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
845bb6aceb From Ravi Mathur, OSX/Clang 7.0.0 build fix 2016-01-19 15:43:47 +00:00
Robert Osfield
3e23c5b22d From Wojciech Lewandowski, Visual Studio 2008 compatibility fix
Two fixed files:

osgPlugins/osgjs/JSON_Objects
osgPlugins/stl/ReaderWriterSTL.cpp.

They did not compile with VS 2008 (recent master from Github). It looks like they defined stdint types  (missing in VS 2008) but code using them also included <osg/Types> header. Errors were caused by minor differences in signed int definitions. I just removed own definitions and added include<osg/Types> instead. It solves the problem and makes the code clearer now.
2015-12-14 18:47:09 +00:00
Robert Osfield
5675d86c9b From Jordi Torres, Fix for missing header file in distribution
osg/TriangleLinePointIndexFunctor was not being installed because it was not added to the CMakeLists.txt
2015-11-23 13:17:06 +00:00
Robert Osfield
5405d9c465 Added support for copying include/osgViewer/config headers on make install. 2015-11-23 12:29:25 +00:00
Robert Osfield
3b17418031 Fixed warning message
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15179 16af8721-9629-0410-8352-f15c8da7e697
2015-11-09 15:14:07 +00:00
Robert Osfield
9fc6850962 From Jannik Heller, fixed typo of OSG_COMPIlE_CONTEXTS env var
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15175 16af8721-9629-0410-8352-f15c8da7e697
2015-11-08 11:59:23 +00:00
Robert Osfield
46904ff67a From Mathias Froehlich, "Avoid per frame X11 roundtrips"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15174 16af8721-9629-0410-8352-f15c8da7e697
2015-11-05 14:38:19 +00:00
Robert Osfield
636d595912 From Alberto Luaces, "here are two minimal capitalization fixes for mingw cross-compilation, where case sensitivity matters."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15172 16af8721-9629-0410-8352-f15c8da7e697
2015-10-26 11:43:28 +00:00
Robert Osfield
5310a96c73 Restructed the setting of the RenderStage ClearColor/ClearMask to make the code more readable and to avoid double setting of the ClearMask.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15170 16af8721-9629-0410-8352-f15c8da7e697
2015-10-26 11:41:44 +00:00
Robert Osfield
5dc251a5c1 From Sebastian Messershmidt, "The uncommented pointer type QTimerEvent */*event*/ leads to a compiler error under visual studio 2010"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15168 16af8721-9629-0410-8352-f15c8da7e697
2015-10-23 11:07:30 +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
74f1838960 Added osg::flushAllDeletedGLObjects to clean up of graphics context after the existing osg::deleteAllGLObjects() to catch any cases where delete doesn't flush GL objects.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15149 16af8721-9629-0410-8352-f15c8da7e697
2015-10-08 15:58:22 +00:00
Robert Osfield
f4e71bad3a OSG_INIT_SINGLETON_PROXY into DatabasePager::prototype() and Registry::instance(), removing the InitRegistry proxy object in src/osgViewer/ViewerBase.cpp.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15148 16af8721-9629-0410-8352-f15c8da7e697
2015-10-05 11:18:46 +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
05f3e038d8 Added fix for case when Renderer is assigned to a Camera that has now View
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15142 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 11:15:09 +00:00
Robert Osfield
1a9a74216b Refactored osgViewer::Renderer's handled of FrameStamp to avoid threading conflicts
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15139 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 10:10:10 +00:00
Robert Osfield
6344d4430d From John Hedström,"Texture2DArray support for the .osg serializer"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15137 16af8721-9629-0410-8352-f15c8da7e697
2015-09-24 14:14:43 +00:00
Robert Osfield
3c7bf7ec8a Fixed line endings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15133 16af8721-9629-0410-8352-f15c8da7e697
2015-09-24 09:29:15 +00:00
Robert Osfield
87e5c54ee7 From Jannik Heller, "I've hit what I believe to be a bug (or at the very least, an unintuitive behaviour) in the osg::Geometry copy constructor. I noticed it when using osg::clone on a Geometry with vertex buffer objects, and the copy flags DEEP_COPY_ARRAYS. To be precise, I add a Geometry to an osgUtil::IncrementalCompileOperation, then osg::clone the Geometry. I was getting reports from users of random crashes happening.
I believe the offending lines are in the osg::Geometry copy constructor:

    if ((copyop.getCopyFlags() & osg::CopyOp::DEEP_COPY_ARRAYS))
    {
        if (_useVertexBufferObjects)
        {
            // copying of arrays doesn't set up buffer objects so we'll need to force
            // Geometry to assign these, we'll do this by switching off VBO's then renabling them.
            setUseVertexBufferObjects(false);
            setUseVertexBufferObjects(true);
        }
    }

Toggling the vertex buffer objects off then on again actually touches not only the arrays controlled by DEEP_COPY_ARRAYS, but also the PrimitiveSets which are controlled by DEEP_COPY_PRIMITIVES. This means if the user has copyflags of only DEEP_COPY_ARRAYS, we are modifying arrays that belong to the original const Geometry& we are copying from. I believe this shouldn't be allowed to happen because we are using a const& specifier for the original Geometry.

In my case the osgUtil::IncrementalCompileOperation was trying to compile the geometry, while in the main thread a clone operation toggled the VBO's off and on, a crash ensues.

In the attached patch, you will find a more efficient handling of VBO's in the osg::Geometry copy constructor, so that only the Arrays that were actually deep copied have their VBO assigned, and no changes are made to Arrays that already had a valid VBO assigned. In addition, the DEEP_COPY_PRIMITIVES flag is now honored so that VBO's are set up correctly should a user copy a Geometry with only that flag.
"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15128 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 15:35:14 +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
5cbd785f78 From Laurens Voerman, "I crashed osgconv while compressing textures:
osgconv --compressed-dxt1 cow.osg cow.ive

due to different handling of the extentions in osg 3.4 and up.

attached is a zip with the files:

OpenSceneGraph\applications\osgconv\osgconv.cpp



This file is valid for svn branch and stable3.4."




git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15123 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:50:27 +00:00
Robert Osfield
4ee38248a2 From Julien Valentin, "Serializing custom geometry i ran into a crash due to a
setVertexAttribArrayList(array) with array containing NULL vertexAttrib.
I added a test in order to avoid it


Code:
void Geometry::setVertexAttribArrayList(const ArrayList& arrayList)
{
    _vertexAttribList = arrayList;

    dirtyDisplayList();

    if (_useVertexBufferObjects)
    {
        for(ArrayList::iterator itr = _vertexAttribList.begin();
            itr != _vertexAttribList.end();
            ++itr)
        {
if(itr->get())//ADDED
            addVertexBufferObjectIfRequired(itr->get());
        }
    }
}
"

and

"The bug i ran into is a crash reading osgt Geometry with null vertexattribs.
The only thing i added is a not nul check on array passed to setVertexAttribArrayList."




git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15122 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:35:03 +00:00
Robert Osfield
f4013a68da Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15114 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 11:13:17 +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
c1d5b6992c Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15112 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 10:30:18 +00:00