Hi Daniel,

On 8/9/06, Daniel Larimer <[EMAIL PROTECTED]> wrote:
Perhaps having a boolean flag the user sets
to control this
behavior would make the API the easiest to use without trying to
"guess" at what the
user wants.

I think what you are actually after is explictly support for the
behavior you want. I haven't looked at how this might be implemented
or the complexities involved.

Right now I'm focused on bug fixes for 1.1.1  and other projects.
Stuff like the above I'm simply don't have time to look at it.


        In our code base switching to pbuffer causes our application to
crash.  Our theory
behind this is that we are not using Producer for our windows.  I
notice in your code that
you call osg::GraphicsContext::createGraphicsContext() to create a
new pbuffer graphics
context.  For each new context, do you need a new context ID (ie:
call osg::GraphicsContext::createNewContextID()?


The intention of the design is that you shoud implement your own
create context callback.  See
src/osgProducer/CreateContextImplementation.cpp for an example of
this.  This is how the core OSG remains decoupled from the actually
Window specific work recreate to create and manage contexts.

The problem with osg::GraphicsContext::createNewContextID() is that
it will dynamically update the
MaxNumberOfGraphicsContexts().   For my application, using pbuffers
could result in more than 32 total context IDs.  Hopefully they can
share textures/display lists.

Well there is always OSG_MAX_NUMBER_OF_GRAPHICS_CONTEXTS if you do
think you'll exceed this.  However, you have to be careful about just
how many FBO/Pbuffer you need anyway, as you could quickly produce
memory problems.

My questions for you are:

1) What must I do to let Qt allocate the pbuffer instead of producer?

See above.

2) Are there any potential pit falls with using pbuffers and multi-pipe?

Shouldn't be.  However, osgprerender --pbufer cow.osg does just work
multipipe while
osgprerender  --fbo cow.osg works.  Note sure of the cause yet.

3) Say I don't want to use pbuffers, but use the Frame Buffer
technique without any patches to OSG, how could I render the current
value of the texture to the frame buffer at the beginning of my draw
phase?  Patrick has tried multiple techniques yet the texture is
always black.

Use a RenderBinDetails set to a negative number of the RTT CameraNode
and then draw what you need in this.  See osghangglider's earth sky
model for hints on this.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to