Hi Sebastian, On Sat, Jul 26, 2008 at 12:05 PM, Sebastian <[EMAIL PROTECTED]> wrote: > Hello, > > I set up an orthographic camera with the OSG::OrthographicCameraPtr and > added it to my viewport. > What i like to do is to get the frame which is rendered through this > camera into some kind of grayscale image-array to do image-processing > like edge-detection. So actually i need the output from the fragment > shader or a part of the framebuffer... > I thought about using glsl to get access to the fragment-shader. Maybe > giving a 2D-texture to the fragment-shader so that i can somehow store > the depth-values into it would work. But i am not sure how this could be > realized. > If there is an easier way to access the framebuffer or someone could > recommend an example how to pass arrays to the fragment shader i would > be glad to get a hint.
Not quite sure what you're looking for, but from what you describe (image processing using shaders) I would suggest you to use FBO's, just render into an FBO and pass it as a texture to the next shader (if you want to do something more complex that requires multipassing). OpenSG supports FBO's (search for "OSGFBOViewport") :-) If you just want to read back the results from your rendering you might also use the GrabForeground class: http://opensg.vrsource.org/trac/wiki/Tutorial/OpenSG1/Windows#GrabForeground Regards, Toni ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
