OpenSceneGraph/src/osgUtil
Robert Osfield af5685bf28 From Tim George, "Currently there is a problem with using a camera with a viewport with a non 0 offset and also using an FBO. The problem is that only area made up of the viewports width and height is drawn based on an offset of 0,0 instead of using the viewports offset.
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
2014-08-08 16:34:12 +00:00
..
tristripper Fixed author name error introduced by xxdiff 2013-06-21 14:37:35 +00:00
CMakeLists.txt From Jan Peciva, RayIntersector implementation 2013-10-03 08:45:57 +00:00
CubeMapGenerator.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
CullVisitor.cpp Added NodeVisitor::INTERSECTION_VISITOR VisitorType 2014-07-31 18:29:31 +00:00
DelaunayTriangulator.cpp Removed unused method. 2014-06-27 15:55:05 +00:00
DisplayRequirementsVisitor.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
DrawElementTypeSimplifier.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
EdgeCollector.cpp Clean up up osg::Geometry, removing long deprecated support for array indices and BIND_PER_PRIMITIVE binding that forced OpenGL slow paths. osg::Geometry is now smaller and only supports OpenGL fasts paths. 2013-06-18 11:18:28 +00:00
GLObjectsVisitor.cpp From Farshid Lashkari, "As discussed, I've added the ability to handle Drawable objects within the NodeVisitor class. Here is an overview of the changes: 2014-05-12 12:10:35 +00:00
HalfWayMapGenerator.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
HighlightMapGenerator.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
IncrementalCompileOperation.cpp From Farshid Lashkari, "As discussed, I've added the ability to handle Drawable objects within the NodeVisitor class. Here is an overview of the changes: 2014-05-12 12:10:35 +00:00
IntersectionVisitor.cpp Added NodeVisitor::INTERSECTION_VISITOR VisitorType 2014-07-31 18:29:31 +00:00
IntersectVisitor.cpp Added NodeVisitor::INTERSECTION_VISITOR VisitorType 2014-07-31 18:29:31 +00:00
LineSegmentIntersector.cpp Further work on Bound class/Node::getBound() and Drawable::getBound() and usage in OSG codebase 2014-05-14 16:01:40 +00:00
MeshOptimizers.cpp From Marc Helbling, "please find a fix for the vertex pretransform visitor (VertexAccessOrderVisitor). 2014-08-08 16:09:39 +00:00
Optimizer.cpp Added catch for NULL Transform pointers getting into the _transformMap. 2014-07-29 15:47:55 +00:00
PerlinNoise.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
PlaneIntersector.cpp 2014-05-14 10:19:43 +00:00
PolytopeIntersector.cpp 2014-05-14 10:19:43 +00:00
PositionalStateContainer.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
PrintVisitor.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
RayIntersector.cpp Further work on Bound class/Node::getBound() and Drawable::getBound() and usage in OSG codebase 2014-05-14 16:01:40 +00:00
RenderBin.cpp Added osg::RenderInfo::pushRenderBin()/popRenderBin() and RenderInfo::getRenderBinStack() and getCameraStack() access methods for getting access to the current RenderBin/RenderStage. 2013-08-01 07:19:45 +00:00
RenderLeaf.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
RenderStage.cpp From Tim George, "Currently there is a problem with using a camera with a viewport with a non 0 offset and also using an FBO. The problem is that only area made up of the viewports width and height is drawn based on an offset of 0,0 instead of using the viewports offset. 2014-08-08 16:34:12 +00:00
ReversePrimitiveFunctor.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
SceneGraphBuilder.cpp From David Callu, warning fixes and removal of spaces at end of lines. 2013-06-28 12:00:43 +00:00
SceneView.cpp Removed State::AppliedProgramObjectSet container and Obsever usage from osg::State to address threading bug crash. 2014-07-22 16:02:33 +00:00
ShaderGen.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
Simplifier.cpp Removed deprecated usage of osg::Geometry::get*Binding() 2013-06-27 10:58:26 +00:00
SmoothingVisitor.cpp From David Callu, warning fixes and removal of spaces at end of lines. 2013-06-28 12:00:43 +00:00
StateGraph.cpp From Mikhail Izmestev, "Attached fix to avoid vector usage in StateGraph::prune and reduce heap allocations." 2014-06-25 10:45:18 +00:00
Statistics.cpp From Farshid Lashkari, "As discussed, I've added the ability to handle Drawable objects within the NodeVisitor class. Here is an overview of the changes: 2014-05-12 12:10:35 +00:00
TangentSpaceGenerator.cpp Removed deprecated usage of osg::Geometry::get*Binding() 2013-06-27 10:58:26 +00:00
Tessellator.cpp From Laurens Voerman, "attached is a modified version of src/osgUtil/Tessellator.cpp 2014-06-27 15:48:38 +00:00
TransformAttributeFunctor.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
TransformCallback.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00
TriStripVisitor.cpp Removed deprecated usage of osg::Geometry::get*Binding() 2013-06-27 10:58:26 +00:00
UpdateVisitor.cpp Added NodeVisitor::INTERSECTION_VISITOR VisitorType 2014-07-31 18:29:31 +00:00
Version.cpp Ran script to remove trailing spaces and tabs 2012-03-21 17:36:20 +00:00