[osg-users] FrameBufferObjects and multithreading.

2 views
Skip to first unread message

Jim Terhorst

unread,
Mar 9, 2008, 4:15:17 PM3/9/08
to osg-...@lists.openscenegraph.org

I am having some difficulty getting FrameBufferObjects to work with
multithreading. My application is very close to the osgdistortion
example. I noticed that osgdistortion was forcing itself into single
threaded operation. When i run it, multi-threaded I get frame buffer
object errors from RenderStage::drawInner saying that there is an fbo
problem, the FBO status is 0x8cd7, which is
GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT.

Is this a known problem? Does anyone know of a workaround? Does anyone
have experience using FrameBufferObjects with multi-thread'ing?

Thanks in advance,

jim t

jym.vcf

Robert Osfield

unread,
Mar 10, 2008, 5:16:23 AM3/10/08
to OpenSceneGraph Users
HI Jim,

There are limits with the time of threading you can do with cameras
that share the same graphics context - the draw traversals has to be
single threaded for each camera's rendering, this applies to FBO's as
well as normal rendering to a graphics window.

You should be able to still run multi-threaded if you have multiple
graphics contexts, but the osgdistortion example just uses on graphics
context, and multiple FBOs. The example should be able to run
DrawThreadPerContext or CullThreadPerCameraDrawThreadPerContext, if it
can't perhaps there is something about the example that isn't thread
safe, I am the author so "should" know, but alas don't recall the
details off the top of my head.

When I get some time I'll change the osgdistortion example to allow
other threading models and see what happens.

Robert.

> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Pete Carss

unread,
Mar 10, 2008, 9:13:21 AM3/10/08
to OpenSceneGraph Users
Hello Jim,

This sounds like the problem I'm having with osgdistortion - on SMP
kernels I'm getting very bad performance. The performance improves if
you accidentally install a non-SMP kernel. Robert suggested a workaround
using FBOs - this seems to work for models up to a certain complexity only.

I don't know a lot about the internals of OSG or 3D - I come at it from
an application point of view, so it might be a red herring. The fact the
we're both working in domes seems too coincidental...


Pete

Robert Osfield

unread,
Mar 10, 2008, 9:28:34 AM3/10/08
to OpenSceneGraph Users
Hi Pete,

The two problems aren't related, one is a crash in the OSG, the other
(the one you've observed) is poor performance of FBO Cube maps in the
OpenGL driver.

Robert.

Reply all
Reply to author
Forward
0 new messages