This approach unifies much of the code handling the clean up of OpenGL graphics data, avoids lots of local mutexes and static variables that were previously required,
and enables the clean up scheme to be easily extended by users providing their own GraphicsObjectManager subclasses.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15130 16af8721-9629-0410-8352-f15c8da7e697
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/trunk@15129 16af8721-9629-0410-8352-f15c8da7e697
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/trunk@15125 16af8721-9629-0410-8352-f15c8da7e697
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/trunk@15124 16af8721-9629-0410-8352-f15c8da7e697
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."
--------------------This line, and those below, will be ignored--
M src/osg/Geometry.cpp
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15121 16af8721-9629-0410-8352-f15c8da7e697
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/trunk@15041 16af8721-9629-0410-8352-f15c8da7e697
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/trunk@15036 16af8721-9629-0410-8352-f15c8da7e697
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/trunk@15035 16af8721-9629-0410-8352-f15c8da7e697