Commit Graph

13409 Commits

Author SHA1 Message Date
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
Robert Osfield
b92c3f1455 Merged shaders from svn/trunk that refactor the workaround to the NVidia driver bug
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15111 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 10:19:15 +00:00
Robert Osfield
9975e15a97 Update ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15108 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 10:06:58 +00:00
Robert Osfield
5b242d22ff Change RC number to 0 for 3.4.0 stable release.
Updated ChangeLog
Updated the release data in the README


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15099 16af8721-9629-0410-8352-f15c8da7e697
2015-08-12 06:38:59 +00:00
Robert Osfield
814a885a6c Updated ChangeLog and RC nubmer to 13, and added GL1 to the docs on the GL_PROFILE usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15098 16af8721-9629-0410-8352-f15c8da7e697
2015-08-11 20:12:02 +00:00
Robert Osfield
471b256d30 Refactored workaround of NVidia nan length bug.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15097 16af8721-9629-0410-8352-f15c8da7e697
2015-08-11 20:08:07 +00:00
Robert Osfield
8f73ddc27d Moved the FIND_PACKAGE(Boost) from the root CMakeLists.txt into the local Find scripts to avoid Boost check when not neccessary.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15094 16af8721-9629-0410-8352-f15c8da7e697
2015-08-11 08:44:46 +00:00
Robert Osfield
0874f126c0 Updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15090 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:58:22 +00:00
Robert Osfield
697128a11d From svn/trunk merged support for passing the GL_VENDOR string into the #pragma(tic) shader compositions defines
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15089 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:56:53 +00:00
Robert Osfield
96d247aa7e Update RC number to 12, and updated ChangeLog
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15086 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:46:19 +00:00
Robert Osfield
c0ac503123 Fixed line endings
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15084 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:40:25 +00:00
Robert Osfield
b74924fab4 Updated built-in shaders from OpenSceneGraph-Data vesion that introduce #pragma(tic) shaders that resolve the NVidia loop iteration bug.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15082 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:39:18 +00:00
Robert Osfield
75217a2ed5 Quietened down #pragma(tic) shader composition messages
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15080 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 19:19:03 +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
af8b11a391 Update ChangeLog and AUTHORS for rc11
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15074 16af8721-9629-0410-8352-f15c8da7e697
2015-08-09 10:20:51 +00:00
Robert Osfield
27f080159e Updated RC number to 11.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15073 16af8721-9629-0410-8352-f15c8da7e697
2015-08-09 10:16:48 +00:00
Robert Osfield
e8722e76ea Changed GLint64 and GLuint64 to use int64_t and uint64_t (pulled in via include/osg/Types) to avoid conflict with Qt5 definitions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15072 16af8721-9629-0410-8352-f15c8da7e697
2015-08-09 10:16:03 +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
559da06ffa From Glenn Waldron, fix error in ZIP plugin handling of memory buffer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15068 16af8721-9629-0410-8352-f15c8da7e697
2015-08-08 08:49:53 +00:00
Robert Osfield
5c40e9bf81 Updated rc number and ChangeLog for 3.4.0-rc10
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15063 16af8721-9629-0410-8352-f15c8da7e697
2015-08-06 15:10:55 +00:00
Robert Osfield
1186143571 Merged workaround for NVidia driver/GPU bug by updating shaders from svn/trunk that change float to int usage.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15062 16af8721-9629-0410-8352-f15c8da7e697
2015-08-06 15:04:36 +00:00
Robert Osfield
732364d49b Added checks for the validity of chached coordinate arrays.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15061 16af8721-9629-0410-8352-f15c8da7e697
2015-08-06 15:03:50 +00:00
Robert Osfield
0153c3e7e2 Updated rc number to 9, and updated ChangeLog and AUTHORS.txt
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15043 16af8721-9629-0410-8352-f15c8da7e697
2015-08-03 19:38:37 +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
e9b75e0ded Update ChangeLog and AUTHORS
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15039 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 15:12:10 +00:00
Robert Osfield
803677e03c Updated rc number to 8 for 3.4.9-rc8
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15038 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 15:01:34 +00:00
Robert Osfield
0f97a42e17 From Terry Welsh, "I downloaded the Android 3rdparty deps from here
http://www.openscenegraph.org/index.php/download-section/dependencies
but was not able to use them for a while. Attached are changes to
OsgAndroidMacroUtils.cmake that allow the deps to be found by cmake.

Specifically, all FIND_PATH commands require the
NO_CMAKE_FIND_ROOT_PATH option to actually find paths. This is odd
because if you inspect CMAKE_FIND_ROOT_PATH it appears to be empty. I
would expect it to have no effect at all.

I also needed to remove quotes from this line in order for headers to be found:

set(FREETYPE_INCLUDE_DIRS "${FREETYPE_DIR}/include
${FREETYPE_DIR}/include/freetype/config")

Assuming this script worked in the past, it seems like cmake behavior
may have changed at some point. I'm using cmake version 2.8.12.2."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15037 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 13:47:03 +00:00
Robert Osfield
91fd245d7c From Jannik Heller, "Here is a patch for the S3TC capability check.
On a Intel HD graphics Linux system with Mesa 10.1.3, I found that osg's Extensions::isTextureCompressionS3TCSupported() returned false, even though S3TC compressed textures *are* in fact working. I tested this by loading and rendering various DXT1, DXT3 and DXT5 compressed textures in the OSG.

"glxinfo | grep s3tc" gives:
    GL_S3_s3tc

Note, if I install the package "libtxc-dxtn-s2tc0", I get in addition:

glxinfo | grep s3tc
    GL_EXT_texture_compression_s3tc
    GL_S3_s3tc

However, S3TC compressed textures worked correctly within the OSG even without libtxc-dxtn-s2tc0 installed.

I'm not sure what the differences between these extensions are, but based on the description at https://www.opengl.org/registry/specs/S3/s3tc.txt I would assume that both will work for OSG's purposes. The attached patch changes isTextureCompressionS3TCSupported() to accept either extension."



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15034 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 13:44:36 +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
8e9f688809 From Kristofer Tingdahl, warning fixes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15031 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 10:54:17 +00:00
Robert Osfield
6c1c179c62 Compile fix for Mingw.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15028 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 10:27:08 +00:00
Robert Osfield
cfe3e621ad Update version and rc number of 3.4.0-rc7.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15026 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 21:32:17 +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
0a56f65077 Fixed indentation
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15019 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 14:30:39 +00:00
Robert Osfield
3339395071 git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15018 16af8721-9629-0410-8352-f15c8da7e697 2015-07-23 14:03:15 +00:00
Robert Osfield
34e53a37e0 Warning fixes for Clang-3.6
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4@15017 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 11:14:00 +00:00