Hi,

I'm trying to create a buffer of osg :: image, which will be shared between 2 
threads. 

The problem is that when I try to remove an image from the buffer (list) 
my application terminated. 


Post here a simple code: 



Code:

Qlist<osg::ref_prt<Osg::Image> > m_ListImage; 

m_QImage = QImage(m_MatImage.data,m_MatImage.cols, m_MatImage.rows, 
(int)(*m_MatImage.step.p),QImage::Format_RGB888); 

m_QGLImage = QGLWidget::convertToGLFormat(m_QImage); 
unsigned char* data = m_QGLImage.bits(); 

m_OsgImage = new osg::Image; 
m_OsgImage->setImage(m_QGLImage.width(), m_QGLImage.height(), 1, 4, GL_RGBA, 
GL_UNSIGNED_BYTE,  data,  osg::Image::NO_DELETE, 1); 

m_ListImage.append(m_OsgImage); 

while (m_ListImage.count() > 10) 
{ 
m_ListImage.removeFirst();
} 




Thank you!

Cheers,
Filippo[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=55147#55147





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

Reply via email to