Upcios / PyQtSamples

Some examples written in PyQt, the Python binding for Qt application framework.
MIT License
30 stars 6 forks source link

SEGFAULT: createFramebufferObject vs. createFrameBufferObject #2

Open vfrenkel opened 4 years ago

vfrenkel commented 4 years ago

Fun fact.. in the opengl/opengl_under_qml_fbo example, squircle.py. There is a typo that prevents the program from segfaulting, because it never runs the "createFramebufferObject" with an override. This code has "createFrameBufferObject", capital B, and this is never actually executed.

https://github.com/Upcios/PyQtSamples/blob/master/PyQt5/opengl/opengl_under_qml_fbo/squircle.py#L17

vfrenkel commented 4 years ago

For others finding this issue, two fixes: (1) the fbo needs to be stored on the derived Renderer object before returning from the (2) createFramebufferObject method (lowercase b).

Pull request sent.