Hello Johannes,

On 10/05/2011 09:47 AM, Johannes Brunen wrote:
> currently, I'm working on line render algorithms. I do need to render
> lines of my geometry with and without hidden lines and with silhouettes.
> My first approach was to add structure for rendering of these cases into
> GroupingStages to my scene. For the hidden line cases I need to
> manipulate the depth buffer and the silhouette case does involve
> manipulation of the viewport. This is both problematic in my initial
> setup. The first case does lead to z-fighting problems and for the
> second case, I do not have a solution at all, since the algorithm I have
> at hand uses viewport manipulation during multiple rendering passes.
>
> 1.       Is this infrastructure appropriate for handling cases like my
> line rendering problem?

uhm, probably, it's a bit hard to say, because the only things you have 
mentioned about your algorithms are depth buffer and viewport 
manipulation ;) In any case it is fairly flexible when it comes to 
rendering to different render targets or performing multiple passes, so 
hopefully should be able to do what you need.
The basic idea is to have a means to direct rendering to a different 
render target (i.e. and FBO), but you can also render to the application 
framebuffer.

> 2.       Could someone give me an overview explanation about the Stage
> rendering and its derived classes? A'm I correct that deriving from
> SimpleStage is the correct entry point?

for simple/common cases: yes. If you don't need viewport settings or a 
camera that differs from what is used to render into

> 3.       How and when should the transfer of the color information from
> the FBO inside of a SimpleStage derived class into the GL color buffer
> take place?

it does not happen automatically. A common case is that the color 
attachment(s) of the FBO is a TextureBuffer and the generated texture is 
then used by a material elsewhere in the scene. You can do a framebuffer 
blit from the post render callback or issue a pass that renders a full 
screen quad with the color attachments content as texture.

> 4.       Is it correct that I have to setup a Texture but no associated
> Image in the Stage class?

TextureBuffers have TextureObjChunks with Images, but those images have 
no data in CPU memory (i.e. they are created with Image::set() where 
data == NULL and allocMem == false).

> 5.       Is the a simple example available for this kind of problems?

Line rendering? No, sorry I don't think we have anything for that. 
testSimpleStage.cpp shows how to render a scene into an FBO and then use 
that as a texture. The HDRStage implements some post processing and 
shows how to run multiple passes from a stage.

        Cheers,
                Carsten

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to