I have some issues upgrading my existing QGLWidget to the descent QOpenGLWidget. The application itself is opensource (itom / https://bitbucket.org/itom/) and I am working on the OpenGL designerPlugin. The problems I am facing are the following:
Running on a Win 10 64 Bit, compiled with MsVC2013, Qt 5.5.1:
When the window is docked into the main window the Vertex Buffer / Point Buffer seem to get cleared. At least the beforehand displayed triangles / points are no longer displayed unless they are uploaded again
Running on a debian sid (unstable), compiled with gcc, Qt 5.5.1:
The window turns black after rendering, though everything seems to be rendered correctly, as when I resize the window I can quickly see the correct content while resizing.
Everything worked correctly using QGLWidget, therefore I guess there should be no principle problem regarding Shaders and other OpenGL related issues. Actually the Linux problem seems to be sort of a compositing issue, as the the GLClearColor is not used for the black window. About the problem on windows I have currently no clue. Besides the 'windows' problem seems to be present on Linux as well (as far as I can tell seeing the scene just shortly while resizing), so it seems to be a more general problem.
Any ideas or help is welcome.
Hi again everyone,
Obviously the clearing of the buffers results from a call to initializeGL when docking in the widget into our main window, which QtGLWidget does not do. Is this intentional? Or should I report a bug?
If on one system initializeGL is called during docking and on another it is not, it is certainly a bug.
Also I do not see why it would be called in this case.