[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Implementation of the QQuickFramebufferObject
From: Rostyslav Lyulinetskyy <info () rostik ! de>
Date: 2015-09-24 8:58:33
Message-ID: 5603BB39.8050506 () rostik ! de
[Download RAW message or body]
On 22.09.2015 18:06, Phil Thompson wrote:
> On 21 Sep 2015, at 11:44 am, Rostyslav Lyulinetskyy <info@rostik.de> wrote:
> > On 18.09.2015 19:03, Phil Thompson wrote:
> > > On 15 Sep 2015, at 12:14 pm, Rostyslav Lyulinetskyy <info@rostik.de> wrote:
> > > > Hi,
> > > >
> > > > I am trying to port my c++ code to python and I am integrating a custom OpenGL \
> > > > rendering with Qt Quick via QQuickFramebufferObject (as described here: \
> > > > https://blog.qt.io/blog/2015/05/11/integrating-custom-opengl-rendering-with-qt-quick-via-qquickframebufferobject/)
> > > > Everything works well in c++, but for various reasons I need to port this to python \
> > > > and it doesn't seem to work. The virtual function createRenderer() in the \
> > > > QQuickFramebufferObject must be overridden so one can return a new renderer, but for \
> > > > some reason this function is not even called when using PyQt.
> > > > Is it even possible to override this virtual function from python? Am I missing \
> > > > something?
> > > > Here is a small example to replicate that the createRenderer() function is not called:
> > > > https://gist.github.com/rostikL/7876e4c47fc8dd8ce02f
> > > Tonight's snapshot will make sure createRenderer() is called. However there may well be \
> > > issues with the ownership of the returned renderer. Please test and let me know.
> > > Phil
> > Hi,
> >
> > Thanks for the implementation. I have tested it and createRenderer() function is being \
> > called now. I have now extended the example \
> > (https://gist.github.com/rostikL/7876e4c47fc8dd8ce02f) to get a new Renderer object which \
> > inherits from the QQuickFramebufferObject.Renderer class and the application crashes with \
> > "Segmentation fault" as error message.
> > The same thing happens in c++ when the following 3 functions are not implemented in the new \
> > Renderer:
> > - createFrameBufferObject(self, size)
> > - render () (is called when something changes)
> > - synchronize(self, item) (called as a result of QQuickFramebufferObject::update())
> >
> > So I assume these methods are not properly implemented in PyQt and can not be overridden at \
> > the moment?
> No, as suspected I hadn't got the ownership issues correct. Try tonight's snapshot.
>
> Phil
Thanks, Phil! It works now.
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic