[osg-users] Best method for screencapture in OSG?

haithcoc at gdls.com haithcoc at gdls.com
Tue Sep 23 09:44:39 PDT 2008

I need to update an OSG based app that performs screen capture.  The
existing app used OSG 1.x and readPixels.  It worked but I would like to
move to 2.6+ and improve efficiency.  I am looking into the alternatives,
but don't currently have the target hardware.

Can any give insight into the benefits of the different means of getting a
screen capture that can be transferred back to CPU/main memory?
The app uses OSG to model a camera on the network and streams jpeg images
at a target of 30Hz to client nodes.

I have looked at the old and new prerender example (the existing app is
largely based on the 1.x version of prerender).
I have researched Frame Buffers, FBOs, PBOs, and the traditional
readPixels.  Which of these is likely to be best for the described use?
Is this complicated at all if this is done using MPV which uses OSG with

I have searched Google and the mailing list archives, read the FAQ, and
read "How-to-ask Questions the Smart Way", but have yet to find an answer I

We also have a somewhat different usecase which grabs the depth buffer
(again with readPixels) from an orthographic projection above the current
location on the terrain.  We use the depth buffer image and the linear
scale of the ortho projection to convert to distance/height values.  This
provides image width*height number of samples quite quickly, which we then
have any system memory.  We currently process this on the CPU and send
terrain elevation information to a separate dynamics app (potentially on a
different machine).  I am starting to investigate what could be done on the
GPU to improve this process.

Thanks for any tips.

Stephen Haithcock
General Dynamics Land Systems
38500 Mound Rd.
Sterling Heights, MI 48310
MZ 436-40-15
(586) 825-8573

This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.

More information about the osg-users mailing list