Re: [Interest] QImage from ShaderEffectSource

2014-09-15 Thread manish sharma
Thanks Gunnar, I might need this to be portable. I will figure out a way to convert texture to fbo and as suggested will do something similar in qt_gl_read_framebuffer. Regards, Manish On Mon, Sep 15, 2014 at 11:49 AM, Gunnar Sletta wrote: > > On 13 Sep 2014, at 16:28, manish sharma <83.man...@

Re: [Interest] QImage from ShaderEffectSource

2014-09-14 Thread Gunnar Sletta
On 13 Sep 2014, at 16:28, manish sharma <83.man...@gmail.com> wrote: > void getImage() > { > qDebug() << "taking snapshot..!"; > disconnect(this, SIGNAL(afterRendering()), this, SLOT(getImage())); > QSGTexture *texture = m_snapshotItem->textureProvider()->texture();

Re: [Interest] QImage from ShaderEffectSource

2014-09-14 Thread manish sharma
Thanks for reply Gunnar, I can safely use this technique now. Regards, Manish On Sun, Sep 14, 2014 at 1:28 PM, Gunnar Sletta wrote: > Yeah, it looks like this will work quite well :) > > Using either ShaderEffectSource or turning the item into a texture > provider using Item::layer::enabled is

Re: [Interest] QImage from ShaderEffectSource

2014-09-14 Thread Gunnar Sletta
Yeah, it looks like this will work quite well :) Using either ShaderEffectSource or turning the item into a texture provider using Item::layer::enabled is the way to do this prior to Qt 5.4. cheers, Gunnar www.sletta.org On 13 Sep 2014, at 16:28, manish sharma <83.man...@gmail.com> wrote: > H

[Interest] QImage from ShaderEffectSource

2014-09-13 Thread manish sharma
Hi, I found a way to get the QImage of an QQuickItem, I am aware of QQuickWindow::grabImage and QQuickItem::grabToImage will be available in Qt5.4. So far i am getting correct QImage and it seems to work quite well. I want to know what i am doing is correct. Flow:- - create ShaderEffectSource - o