Introduced a new Widget::computeExtentsPositionInLocalCoordinates() method that intersects with a ray through mouse pointer and the extents of the widget.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14429 16af8721-9629-0410-8352-f15c8da7e697
- the issue here is that the plugin is removing group nodes if
that group node only has one child. becuase transforms are also
group nodes, there were cases when the transform would have only
one child under it and would cause it to remove the translation
portion. this would cause all the vertex data to be loaded around
the last matrix operation, which in our case was the origin (0,0,0).
We work off of OSG 2.8.1 but see that this has not been addressed on latest yet. I’ve tested this against 2.8.1 and have cleanly applied it to my local repository off of latest."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14407 16af8721-9629-0410-8352-f15c8da7e697
It is caused by line 991 in RenderStage.cpp:
Code:
fbo_ext->glBlitFramebuffer(
0, 0, static_cast<GLint>(_viewport->width()), static_cast<GLint>(_viewport->height()),
0, 0, static_cast<GLint>(_viewport->width()), static_cast<GLint>(_viewport->height()),
blitMask, GL_NEAREST);
which is not taking into account the viewport x and y when performing the blit. It probably should be:
Code:
fbo_ext->glBlitFramebuffer(
static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->y()),
static_cast<GLint>(_viewport->width()) + static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->height()) + static_cast<GLint>(_viewport->y()),
static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->y()),
static_cast<GLint>(_viewport->width()) + static_cast<GLint>(_viewport->x()), static_cast<GLint>(_viewport->height()) + static_cast<GLint>(_viewport->y()),
blitMask, GL_NEAREST);
"
Note from Robert Osfield, made small tweak to above on merge, changing the width+x to x+width to make it read more naturally.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14405 16af8721-9629-0410-8352-f15c8da7e697
The issue with current code is that arrays are collected *before* duplicating shared arrays which leads to arrays that are correctly duplicated but that are not reordered.
Also the submitted patch contains a small cleaning in GeometryArrayGathrer as the _useDrawElements variable is not used; it is only set in the GeometryArrayGathrer constructor and VertexAccessOrderVisitor already checks that primitives have indexed type."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14403 16af8721-9629-0410-8352-f15c8da7e697
The State::AppliedProgramObjectSet wasn't ever being used actively in the current rev of the OSG so populating and clearing was no longer neccessary, allowing the code to be removed completely.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14377 16af8721-9629-0410-8352-f15c8da7e697
pushModelViewMatrix or pushProjectionMatrix will already keep the
reference when adding it to the MatrixStack. In CullVisitor::apply
methods for the billboard and the camera you already take a pointer
instead of a ref_ptr."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14375 16af8721-9629-0410-8352-f15c8da7e697
the scene tree contains (large) 2D textures from images with STRIDE.
============================================================================
#0 0x00007fffe8ea4350 in __memmove_ssse3 () from /lib64/libc.so.6
#1 0x00007fffe52ced76 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#2 0x00007fffe52d8e86 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#3 0x00007fffe53dd8be in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#4 0x00007fffe53c2643 in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#5 0x00007fffe53c7fdd in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#6 0x00007fffe53cbabf in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#7 0x00007fffe53cc1fa in ?? () from /usr/lib64/libnvidia-glcore.so.310.44
#8 0x00007ffff30092fd in osgText::GlyphTexture::apply (this=0x1bb8cf0, state=
...)
at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/src/osgText/Glyph.cpp:234
#9 0x00007ffff56c30b6 in osg::State::applyAttributeOnTexUnit (this=0x125f180,
unit=0, attribute=0x1bb8cf0, as=...)
at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:1713
#10 0x00007ffff56c2f3f in osg::State::applyTextureAttribute (this=0x125f180,
unit=0, attribute=0x1bb8cf0)
at /d43/jaap/dev/jaapOSG/build/OpenSceneGraph3.3.1/include/osg/State:411
#11 0x00007ffff30204da in osgText::Text::drawTextWithBackdrop (this=0x1baed70,
state=..., colorMultiplier=...)
==============================================================================
The crash disappears if I either (1) disable the use of images with stride
in the (public) osgGeo-library, or (2) add the following bugfix to Glyph.cpp.
This combination gives me the confidence that I understand where this problem
originates from, without trying to understand the full OpenGL details.
===============================================================================
@@ -221,7 +223,12 @@
imageData[i] = 0;
}
+ glPixelStorei(GL_UNPACK_ALIGNMENT,1);
+ #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
+ glPixelStorei(GL_UNPACK_ROW_LENGTH,getTextureWidth());
+ #endif
+
// allocate the texture memory.
glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA,
getTextureWidth(), getTextureHeight(), 0,
================================================================================
I have copied (and adapted) the added lines above from the same source file,
where they were used in front of a similar call to glTexSubImage2D(.) around
line 515.
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14372 16af8721-9629-0410-8352-f15c8da7e697