HI Harash,

If you have a separate card for the frame grabber then your system will be
needing to copy the data from the frame grabber card into main memory then
copy it back to the graphics card. this will need to be done regardless of
whether you use the frame grabber API or configure via the OSG,  The OSG
itself has full support for efficiently downloading textures so it's very
unlikely the frame grabber API will be more efficient.

All you should need to do is enable the use of PixelBufferObject's when
setting up the osg::Image.  The osg::ImageStream subclass from osg::Image
is written to support video and by default uses PBO's so you could just
construct a ImageStream in stead, though, the play/rewind/pause etc. method
are a bit inappropriate for a frame grabber so it's not an ideal fit.  Just
setting up the PBO directly in your own code should be straight forward -
have a look at places where PixelBufferObject is used in the OSG codebase
for inspiration.


Robert.


On 8 July 2014 20:38, Harash Sharma <[email protected]> wrote:

> Dear Mr. Robert,
>
> I have a frame grabber card. The accompanying APIs allow me to grab the
> image frames. I had been using these APIs to grab the video frames and then
> display the video using a textured quad. The display works fine but the
> procedure consumes CPU and is a bit slow. One of the provided APIs also
> allows the frame to be directly rendered to an OpenGL Texture with a given
> ID. This would be very helpful in offloading the processor. I have seen a
> couple of earlier posts on the topic. I tried to get the textureID from the
> TextureObject and draw the grabbed image to it. But It does not work.
>
> I would be very thankful if you can suggest a suitable solution.
>
> Regards
>
> Harash Kumar Sharma
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to