Hi,
I've encountered an issue with rendering to texture and then displaying that
texture with a viewport that doesn't start at 0,0. I'm using osgPPU for this,
but I believe the issue is in OSG.
In osgUtil/RenderStage.cpp, in RenderStage::runCameraSetUp the width and height
are calculated as:
int width = static_cast<int>(_viewport->x() + _viewport->width());
int height = static_cast<int>(_viewport->y() + _viewport->height());
This width and height is then used to create RenderBuffers for the missing
attachments. If the viewport starts at non-zero values, this means the created
RenderBuffers will not have dimensions (vp->width, vp->height) whereas the
attached texture likely will have those dimenstions. Thus the FBO will then
generate FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT error.
Removing the additions of _viewport->x()/y() fixes my issue. I was wondering if
there was a good reason for doing it the way it's done.
Kind regards,
Rick
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9797#9797
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org