Hi,

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);



instead

Also line 1010 appears to have the same problem.

Thanks,
Tim[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=60506#60506





_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to