Hi Ben,

Ben Cain wrote:
Thanks J.P.

You say that I can call myim->dirty() or myim->setImage(), but
wouldn't calling myim->setImage() cause a slow update?  That's what I
seem to be experiencing.  I need to update based on the sensor around
30Hz.

I rechecked our code and we are using setImage without problem for 5 simult 1360x1024 cameras each at 20Hz. The texture needs to get uploaded to the GPU in some way. When PBO is attached it seems to be fast enough. What hardware and OS are you using? What is the bus to the GPU? Uploads to GPU on PCIe should be 1GB/s+.


The imagery data (from sensor) is in system memory ... just trying to
get a view that shows it without dropping so many frames.

We also have this case and we just try to not copy anything around in system memory, so just point the Image directly at the data. We also use a ring buffer for acquisition.

Only other thing I can think of is to make sure that you are not changing pixel formats during the upload. This might switch to software code in the driver.

rgds
jp


Thanks again,
   Ben

On Fri, Feb 26, 2010 at 12:23 AM, J.P. Delport <jpdelp...@csir.co.za> wrote:
Hi Ben,

we also pump data from cameras into the GPU. To enable PBOs is simple:

// make image
osg::ref_ptr<osg::Image> myim = new osg::Image();
// attach pbo
myim->setPixelBufferObject(new osg::PixelBufferObject(myim.get()));

// point im to data, avoid copying (mod format here for your app)
myim->setImage(ImageFormat_[i].getWidth(),

ImageFormat_[i].getHeight(),
                                                         1, 1, GL_LUMINANCE,
GL_UNSIGNED_BYTE,
                                                         my_data_pointer,

osg::Image::NO_DELETE);

// assign to texture
mytexture->setImage(myim.get());

Now, when the data update, just call myim->dirty() and all should update.
You can also call setImage again.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to