Hi Raymond, Changing image size on the fly could be a bit problematic w.r.t the threading - i.e. one threading is reading the image assuming a certain size, then you change the size delete memory and reallocate leading at the same time so you'd need to introduce a mutex on read and write access to the osg::Image, we made need to modify osg::Image or osg::ImageStream to achieve this.
Double buffering would be one way around this - the writing thread writes to its own image, and the reading thread reads from its own image, then onces both are finished you can swap. This would still need mutexing. Robert. On 8/9/06, Raymond de Vries <[EMAIL PROTECTED]> wrote:
Hi, I have my streaming video texture plugin ready, so thanks Robert for your support. For this I have followed the strategy in ReaderWriterXine.cpp where: - allocateImage() is done in the open() routine (so once) - setImage()/setData() for each new frame Now I am working on changing the image size during streaming. I've skipped the image allocation in the open() routine and now trying to allocate a new image for the imagestream (allocateImage()) in my_render_frame() (just before setImage(), line 180 in ReaderWriterXine.cpp). This does not work, however. Anyone thought where should I allocate a new image with different size? thanks a lot Raymond _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
