Hi Robert,

Thank you for your comment. I will give it a try.

Thanks,
Daniel

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Monday, June 25, 2007 8:54 PM
To: osg users
Subject: Re: [osg-users] osgViewer
equivalenttoProducer::RenderSurface::shareAllGLContexts(true)

Hi Daniel,

The plugins are designed not to use graphics contexts so by doing the
compression using OpenGL in your own plugin you are breaking this -
not using graphics contexts in a plugin aids portability, something
you've been hit by here - your plugin makes very specific assumptions
about how the whole app is written.

In the case of texture compression, why do it in the plugin, why not
just set the internal format to a compressed format and let the core
OSG compress the texture on download, the only difference is the time
at which its compressed.  If you wish you could run a pre compile
traversal on the loaded subgraph to do the compression, or even use a
pbuffer to do this precompile and set the pbuffer up so its shares
contexts.  This approach will be much more flexible.

Robert.

On 6/25/07, Kallfass, Daniel, SDGE1 <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> my problem is that I'm using texture compression in an osg plugin dll
> which is then displayed using osgviewer, but no textures are
displayed.
>
> Our solution with Producer in the past was to shareAllGLContexts as
> there is no way the osg plugin dll may know about an existing context
of
> the osgviewer and be able to share its context when performing the
> texture compression (we are using a similar code as in osgconv).
> Is there a better way to solve this problem?
>
> Thanks,
> Daniel
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Robert
> Osfield
> Sent: Monday, June 25, 2007 6:28 PM
> To: osg users
> Subject: Re: [osg-users] osgViewer equivalent
> toProducer::RenderSurface::shareAllGLContexts(true)
>
> Hi Daniel,
>
> On 6/25/07, Kallfass, Daniel, SDGE1 <[EMAIL PROTECTED]> wrote:
> > is there something similar to
> > Producer::RenderSurface::shareAllGLContexts(true) in
> > osgViewer?
>
> There isn't a global flag like in Producer, but
> osgViewer::GraphicsWindow* do support sharing of graphics contexts by
> just setting the Traits::sharedContext.
>
> We could possible add a similar mechansim as the static
> shareAllGLContexts() for picking defaults, although its not the most
> subtle of tools to deploy i.e. it doesn't offer very specific control
> of sharing.
>
> > Or how can I force OSG to reload a subgraph to GPU memory (reload
> textures,
> > displaylists... to current context)?
>
> I'm a bit confused, how is this related to the above?  The OSG will
> automatically created and update textures and display lists for each
> new graphics context - as long as the osg::State::ContexID for each
> context is managed correctly - as it should be by osgViewer.
>
> > This would also solve my problem with missing textures after using
> texture
> > compression in an
>
> Its seems like a rather orthogonal issue, sharing graphics contexts
> won't solve any bugs, it might just mask one though.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
> _______________________________________________
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to