Hi Michael,

On 2/03/12 3:41 , Michael Schanne wrote:
> I am trying to create a scene which contains a texture displaying a live 
> video image.
> The image is sent as a buffer of raw data from an attached camera. I was able 
> to get
> something working but the performance is terrible: about 1.42 frames per 
> second. I need to
> get to at least 20 fps. I am dealing with an image that is 640x480 pixels 
> with 32 bits per
> pixel. I have stripped down my scene to contain only a geode with a quad 
> geometry, and an
> attached texture, and I still see the performance problem. The texture has an 
> attached
> StateAttributeCallback, in which I fetch the buffer of data for the next 
> video frame, and
> then call setImage:

Make sure that the image is not scaled to a power-of-two, by setting the 
appropriate hint.
 This can absolutely kill texture upload performance.

/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to