Re: [osg-users] texture download to mapped memory

2008-12-01 Thread J.P. Delport
Hi, osg::Image can be created with already allocated memory. snippet, modify as needed: OSGImages_.push_back(new osg::Image()); OSGImages_[i]-setImage(ImageFormat_.getWidth(), ImageFormat_.getHeight(), 1, 1, GL_LUMINANCE,

[osg-users] texture download to mapped memory

2008-12-01 Thread Ferdi Smit
What would be the best way to download an osg texture into a region of memory mapped host memory (i.e. at a fixed memory location)? I can bind an osg::Image to a texture for the download, but as far as I know I can not force an Image object to use a specific region of memory; it does its own

Re: [osg-users] texture download to mapped memory

2008-12-01 Thread J.P. Delport
Hi, Ferdi Smit wrote: Ok, thanks. I think that will work for now. There is an additional problem that the location to write to changes each frame. I think I can solve this by just binding a different image to the texture in the scene graph (set to a different mem location) in an update

Re: [osg-users] texture download to mapped memory

2008-12-01 Thread Ferdi Smit
Ok, thanks. I think that will work for now. There is an additional problem that the location to write to changes each frame. I think I can solve this by just binding a different image to the texture in the scene graph (set to a different mem location) in an update callback, prior to rendering,