Dominik Rau wrote: > Hi all. > > For a current project, we need a lot of image processing and similar > stuff that has to be done on the depthbuffer image of a particular > model. The current solution works for displaying it, but if I try to > save the image it's always black... > > What's wrong about this approach? As the image is black, I assume that > the depth buffer is already cleared again. Is there a way to avoid > this? I tried to use a passive background on the fboviewport, but that > doesn't work either. Any ideas?
My bet is that the OSG::Image (in system memory) never gets updated from it's corresponding buffer on the gfx-card (which you write to using FBOViewport). To do so would require a glReadPixels() or glGetTexImage() (or whatever the latter is called) to download data to the OSG::Image. AFAIK, the various GrabForegrounds only grab the color buffer, although you might try to add an Image with a depth-component pixel format. I'd really like an 'update' call on a texturechunk, that downloads texture data to the chunk's images. Cheers, /Marcus ------------------------------------------------------------------------- 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
