Hi Enrico,

I'll first make some comments on how OpenSG handles rendering in general:
The central is the RenderAction (Source/System/Action/RenderAction) that holds the necessary state and builds the so called DrawTree while it traverses the scenegraph. To allow for high flexibility & extendability the RenderAction more or less knows nothing about the different NodeCore types, but instead these register (in their ::initMethod() usually) Functors with the Action and these are called when a node with a node core of the respective type is encountered. The Functors contain code that "does the right thing" for the type of node core - often it suffices to call some helper methods of the RenderAction. After the scenegraph traversal the built DrawTree (it's intended to minimize state (especially material) changes) is rendered.

Enrico Borrione wrote:
hiya all,
this sunny morning I came up with more questions about OpenSG:

1) is there a callback function that is called every time an object is
displayed? It could be handy to supply the OGL pipeline with some custom
parameters.

Hm, you can register a Functor with the RenderAction, but what do you mean by passing "custom parameters" ? If you want to change some OGL state that's not covered by an existing StateChunk, you could add one of these.

2) how many texture units does OpenSG supports for every material?

3) how may vertex stream does OpenSG supports? I'd like to pass to my
shaders the tangent, normal, binormal stuff and i was trying to find a
*smart* way to do the trick.

sorry, somebody else will have to jump in with answers here.

even if i know I should become soon a pain, i re-post my latest
(unanswered) questions:
1_bis) how many rendering passes supports OpenSG? I mean like the good
ole multi-texturing tecnique that required two different renderings on
the same target with different alphas...

sorry for answering this late. As long as you mean passes over a single object, you can do as many as you like inside the Functor called by RenderAction. If on the other hand, you want multiple passes over a subtree, then there is no direct support with the current Actions and I'm not sure if it can be done with trickery. I'm working on a replacement for the Actions and just added the ability to have multiple passes over a subtree - testing is about to start right away.

2_bis) The rendering pipeline can be customized to satisfy some
application request? For example: i want my app to support dynamic
shadows, for some meshes, so i need to pilot the rendering cycle
depending on the geometry processed.

Hm, I don't think I can answer this without more details on what you mean by "piloting the render cycle". There are a number of ways to influence rendering, but usually there are limitations as well, as the Actions (new and old) should be fast in the general case, while still supporting most corner cases...

        Regards,
                Carsten



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to