[osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Yurii Monakov
Hi all! In my OSG application I need to continuously update small parts of 2D texture. So I use osg::Texture2D::SubloadCallback: class MyCallback : public osg::Texture2D::SubloadCallback { /* initialize texture */ void load(const Texture2D texture,State state) const {

Re: [osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Mikhail I. Izmestev
01.04.2011 11:41, Yurii Monakov wrote: And everything works fine until the cleanup stage. In the code above I've allocated a Pixel Buffer Object. Where should I place it's deletion function (something like ext-glDeleteBuffers(1,m_pbo))? Or I should generate/delete it on every subload call with

Re: [osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Yurii Monakov
Hi Mikhail, Thank you for your answer. So I should inherit from osg::BufferObject class and implement compileObject() method? Yurii 2011/4/1 Mikhail I. Izmestev izmmish...@gmail.com: 01.04.2011 11:41, Yurii Monakov wrote: And everything works fine until the cleanup stage. In the code above

Re: [osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Mikhail I. Izmestev
On 04/01/11 12:02, Yurii Monakov wrote: Hi Mikhail, Thank you for your answer. So I should inherit from osg::BufferObject class and implement compileObject() method? I think in your case you can try to use osg::PixelDataBufferObject as it is. Mikhail.

Re: [osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Yurii Monakov
Thank you! Yurii. 2011/4/1 Mikhail I. Izmestev izmmish...@gmail.com: On 04/01/11 12:02, Yurii Monakov wrote: Hi Mikhail, Thank you for your answer. So I should inherit from osg::BufferObject class and implement compileObject() method? I think in your case you can try to use