Hey Robert, 

I have classes that I instantiate that use GLSL, but are not
automatically enabled on the scene graph.

Is there a way to use RTT and PIXEL_BUFFER setup that won't break
osg::Fog? What I mean is, if I don't instantiate the GLSL objects, will
osg::Fog remain intact in this type of setup?

If you think so, what would you guess might happen if I create and then
destroy these objects, assuming proper cleanup?

Thanks pal,
John

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, June 19, 2008 12:14 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Question about osg::Fog and RTT setups

Hi John,

If you are using GLSL then osg::Fog/glFog will only provide the inbult
fog uniform values will be available to the shader, but no fog will be
applied unless you do something with them nothing will happen.

If Fog is being applied when you are expect to that a subgraph is using
GLSL then it suggests that GLSL is not being used for some reason.  In
you case you suggest the RTT Pbuffer you are seeing Fog, so perhaps the
Pbuffer context doesn't support GLSL, or perhaps the contexts aren't
being extension/manged correctly on the OSG side so that shaders aren't
being applied correctly.  It may also be easily a driver bug, trying
your setup on different machines/drivers would help test this.

Having never tried your particular usage combination I can't really
provide any insight to way it's not working.  As in my previously reply,
I can't really do anything without a bit of code to test that reproduces
the problem.

Robert.


On Thu, Jun 19, 2008 at 4:59 PM, Argentieri, John-P63223
<[EMAIL PROTECTED]> wrote:
> All,
>
> Why is it that osg::Fog, and maybe glFog(), work as expected in RTT 
> setups if FRAME_BUFFER_OBJECT is chosen as the 
> RenderTargetImplementation on your Camera, but if PIXEL_BUFFER/_RTT
are chosen, you must re-load the scene?
>
> I think that people are under the impression that when GLSL shaders 
> are used, glFog is broken, but that's not true.
>
> I think that if the osg::Fog is applied ( with Fog options ) to the 
> Scene before setSceneData() is called, you will get fog, even in 
> PIXEL_BUFFER type setups.
>
> BTW I have a GeForce 6 series on my box.
>
> John
>
> _______________________________________________
> 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.or
g
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to