Tomorrow would be today then. Best get cracking. :)

I tried to find it, but the sourceforge mail-list archive (along with 
some others) seems to have abandoned it. :-/ Perhaps someone else on the 
list has the FBO-zip available?

Here is at least a post by Oliver with his attempts to get it to work. 
Perhaps a suitable starting point?

http://www.mail-archive.com/[email protected]/msg03620.html

I put the FBO-code in a new (small) DLL which depends on OSGSystem and 
is dependee of my own code. You can put it into your own code as long as 
you call osgInit from main(). (I don't do that, for various reasons.)

If all else fails:

The FBO-Viewport isn't hard to use, really (we are talking my 
modification of it here, which supports rendering to depth textures, 
Yvonne's original support a depth buffer, but not as user-settable 
texture).

You attach it the FBOViewport to a window, give it a background, node & 
camera (as usual), then add two textures, one RGBA and one DEPTH_COMPONENT.

I set the FBOViewport's size to "0 0 1279 1023" and storagewidth/height 
to 1280/1024 to match my target-texture size, but I don't think it has 
to be that way. (storage width/height is probalby only used if you are 
using a buffer which is not a texture.)

To set up each of these textures properly:

Set the TextureChunk's format (I set both internal and external) to 
either GL_RGBA or GL_DEPTH_COMPONENT. And set the target explicitly to 
GL_TEXTURE_2D to be safe (I think I coded around that, however). Then 
create an Image without content, set it's size to what you want 
(1280x1024 or so) and add it to the TextureChunk.

Hope it helps, as I'll be away for the rest of the day.

Cheers,
/Marcus

Tiago Coelho skrev:
> I'm sorry to be annoying... i can't find the example, can you give me a 
> link to the post?
> 
> also another question: in order to build the class together with the 
> system library what kind of modifications do i need to make?
> 
> sorry again for such questions :S i need to deliver my project for 
> university tomorrow :p
> 
> Thanks a lot
> 
> 2006/7/16, Marcus Lindblom <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
> 
>     No problemo. ;)
> 
>     The example should be in a zip-file in the mail-list archives, if you
>     search for FBOViewport.
> 
>     I have it on my work-computer, but am on vacation currently. If I drop
>     by there this week (I might need to do that, not sure) I'll send you the
>     file, but I'd recommend to try to search for it.
> 
>     /Marcus
> 
>     Tiago Coelho skrev:
>      > Hi Marcus
>      > that's good news, thank you for your help.
>      >
>      > by the way where can i get an example of the fbo? i saw someone
>      > referencing a test file, but i don't know where to get it.
>      >
>      > tanks in advance.
>      >
>      > 2006/7/16, Marcus Lindblom <[EMAIL PROTECTED] <mailto:[EMAIL 
> PROTECTED]>
>     <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>:
>      >
>      >     You need render to texture to do what you want. See the
>     FBOViewport
>      >     class I posted a few weeks ago (It's a modification of Yvonne's
>      >     excellent creation.)
>      >
>      >     It allows you to render to textures, both for color and
>     depth. You can
>      >     then take those textures and use them as input for a second
>     pass which
>      >     compose stuff to the visible framebuffer. (You need to set up
>     several
>      >     viewport for this, FBOViewports for texture targets and regular
>      >     viewports for the final pass.)
>      >
>      >     Such functionality is not covered by MultiPassMaterial. It
>     only helps
>      >     when you combine several materials with the GL blend function.
>      >
>      >     Cheers,
>      >     /Marcus
>      >
>      >     Tiago Coelho skrev:
>      >      > Hi,
>      >      > I'm developing a splat renderer using glsl with opensg and
>     i need
>      >     to run
>      >      > it in a cluster.
>      >      > I need to have two passes, one to calculate visibility and
>     depth
>      >     values,
>      >      > and another for shading.
>      >      > the problem is in the middle, i don't know how to use the
>     output from
>      >      > one shader and make it an input in the second one.
>      >      >
>      >      > I found the MultiPassMaterial Class and saw an example
>     using various
>      >      > simple materials, but still lost...
>      >      >
>      >      > any help is very wellcome :)
>      >      >
>      >      > should i render the first pass depth values to the
>     framebuffer (using
>      >      > gl_FragColor) ? then how would i "redirect" that to a
>     texture to
>      >     be the
>      >      > input of the second pass shader?
>      >
>      >     --
>      >     _________________________________
>      >     Pedro Tiago Cruz Coelho
>      >
>      >
>      >
>     ------------------------------------------------------------------------
> 
>      >
>      >
>      >
>     -------------------------------------------------------------------------
>      > Using Tomcat but need to do more? Need to support web services,
>     security?
>      > Get stuff done quickly with pre-integrated technology to make
>     your job easier
>      > Download IBM WebSphere Application Server v.1.0.1 based on Apache
>     Geronimo
>      >
>     http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>     <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Opensg-users mailing list
>      > [email protected]
>     <mailto:[email protected]>
>      > https://lists.sourceforge.net/lists/listinfo/opensg-users
> 
> 
> 
>     -------------------------------------------------------------------------
> 
>     Using Tomcat but need to do more? Need to support web services,
>     security?
>     Get stuff done quickly with pre-integrated technology to make your
>     job easier
>     Download IBM WebSphere Application Server v.1.0.1 based on Apache
>     Geronimo
>     http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>     <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
>     _______________________________________________
>     Opensg-users mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/opensg-users
>     <https://lists.sourceforge.net/lists/listinfo/opensg-users>
> 
> 
> 
> 
> -- 
> _________________________________
> Pedro Tiago Cruz Coelho
> 
> 
> ------------------------------------------------------------------------
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to