Hi Glen,

Thanks for the explanation about Scaleform.  Given that it's doing
OpenGL calls for you you'll need to be mindful of the effect of OSG
state on Scalform and visa-versa.  The issues of integration of 3rd
party OpenGL codes with the OSG is something that has been disucssed a
number of times on osg-users so I recommend look into these
discussions.

I would also recommend getting the integration working in just the
main window to start with, you can use osg::Camera in scene as a
render to texture camera or just a Camera that just renders directly
as part of the main view so you can toggle to use of RTT camera later.
 Once the simple Camera usage works fine then enabling RTT by assigned
a Texture as a colour attachment as set the Camera::RenderOrder to
PRE_RENDER.  Use of FBO's shouldn't be something you need to worry
about too much - you just enable the Camera to use it if you want, as
per the osgprerender example.

For rendering multiple cameras on different frames you can simply have
a Switch above these Camera in the scene graph and toggle them off as
you need them.  Alternatively you can use a NodeMask on the Camera's
to switch them off. Finally a custom CullCallback attached to the
parent of the Camera's would enable you to decide whether to visit its
children (the Camera) or not.   Switching off a RTT Camera only
switches off the rendering traversal for that camera, any texture that
it renders to will still be valid for any geometry that is rendered
with it in the main scene.  When toggling on/off cameras you'll need
to careful to make sure that a RTT Camera renders to a texture before
the first time it's need in the scene graph - this is an obvious
requirement, but will need a little planning to make sure it all works
coherently.

Robert.

On Mon, Jun 6, 2011 at 3:56 PM, Glen Swanger <glen.swan...@jhuapl.edu> wrote:
> Thanks Robert for taking the time to reply.  Also, I want to say thanks to 
> you and other main developers of OSG, because I have found OSG quite easy to 
> work with so far.  I haven’t had to post to the forum thus far because of the 
> learning environment that the forum content has provided, along with all the 
> various code examples and tutorials available.  I hope as my knowledge builds 
> that I can provide additional useful forum and example content.  Back to the 
> post’s thread.
>
> Scaleform does convert Flash swf files to OpenGL calls.  One of the other 
> important reasons that we chose to use Scaleform was that it has a C++ code 
> interface to Action Script (Flash programming language) so we can talk 
> directly to the Flash content to update state information and we have 
> significant amounts of Flash content that we can reuse in our project.  Here 
> is a bit more background on Scaleform for reference.  Scaleform is a product 
> that was recently taken over by Autodesk.  It has been used in many games for 
> rendering interactive flash screens into a 3D world, but more often for 
> developing the game setup/information HUD.  It is a third party vendor 
> product so there is a cost involve for our project, but it has the 
> capabilities we need.  The product has SDK builds for OpenGL, Direct3D, PS2, 
> and several other game platforms so we are able to integrate Scaleform into 
> OSG with the OpenGL build.  Scaleform also manages thread synchronization 
> between the render thread and
>  the thread that updates the Flash content state through its own snapshot 
> buffer, so we can easily hook in our network interface to the simulation 
> program that provides system state content updates.
>
> I would appreciate it if you would review my previous description on the use 
> of the FBO camera and provide any suggestions you might have.
>
> Thanks!
> Glen
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=40117#40117
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to