Hello Vincenzo,

Vincenzo Marafioti wrote:
> I need to get occlusion query result from a render to an FBOViewport using
> a shader attached to a polygonForeground (in other words i need to get the
> number of "discard" in the fragment shader). In OpenGL i can do it but i
> am looking for a simple way to realize it in OpenSG. I know how to run
> custom OpenGL code in a renderAction but in the same action i should run
> also default render action (for rendering fboviewport). Example:

hm, can you just put the OC query code around the call to:

> ...
> fbo->render(customRenderAction);
> ....

> the customRenderAction is registered as follow:
> 
> enterRenderAction(..){
>    beginOcclusionQuery in OPENGL
>    run default render enter action for fbo rendering ???
> }
> 
> leaveRenderAction(..){
>    run default render leaving action for fbo rendering  ???
>    endOcclusionQuery in OPNEGL
>    get occlusionQueryResult
> }
> 
> This kind of solution is possible? If yes, how can I render defaul action?

The behaviour of viewports can only be customized by deriving and 
overriding functions, the callback registration for the actions is only 
for different types of NodeCores, but Viewport is not a NodeCore.

> Does the OcclusionCulling could help me?

uhm, I don't know, whether OC is a win or not depends on the depth 
complexity of what you are rendering.

        Cheers,
                Carsten


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to