Hi Robert,

On 11/11/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
When you same combining PreciptiionEffect and CameraNode how are you
combining them?  RTT effect?  Multiple window/multiple graphics
contexts?

I tested it using a RTT effect on a single window/graphics context.
Basically, I added the following code to osgprerender in the
createPreRenderSubGraph() function:

osgParticle::PrecipitationEffect *pe = new osgParticle::PrecipitationEffect;
pe->snow(0.5f);
camera->addChild(pe);

You are definitely correct about the driver falling back to a software
path. I did some searching on "the google" and found the following
page which explains the problem:

http://www.gpgpu.org/forums/viewtopic.php?p=10878&sid=7100e1bbc6f4bfb5463fcf15cfe57b96

Here is the relevant text from that page:

"According to OpenGL 2.0 support document, when using point sprite
with FBO/pbuffer, GL_POINT_SPRITE_COORD_ORIGIN should be set to
GL_LOWER_LEFT, otherwise, point sprites will be transformed on the CPU
which may cause many other problems."

Applying the following in drawImplementation() of
PrecipitationDrawable fixes the problem on my end:

glPointParameterf(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT);

Is it ok to enable this by default?

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

Reply via email to