Tearing occurring in my openGL window when using QOpenGLWidget
-
I have been working on this problem pretty much all day. I have set up a QOpenGLWidget that serves as a simple openGL viewport to render to. Even if I don't draw content, about 50% of the time when I run the app, the screen will flicker like this:
!http://i.imgur.com/YhNDr0V.png(OpenGL viewport tearing)!
Other times, it comes up fine. Has anyone ever seen this?
At first I thought it was my content drawing. So I turned off drawing everything and it still does it about 50% of the time. I'm setting up the QOpenGLWidget like this:
@
QSurfaceFormat format;
format.setProfile( QSurfaceFormat::CoreProfile );
format.setDepthBufferSize(24);
format.setVersion(3,3);
format.setRenderableType(QSurfaceFormat::OpenGL);
format.setSwapBehavior(QSurfaceFormat::DefaultSwapBehavior);
QSurfaceFormat::setDefaultFormat(format);..
..GLView widget;
widget.show();
@This is running on a mac.
-
could be graphics driver bug if it doesn't repro on other machines.
-
The heart of this problem turned out to be QOpenGLWidget. When I switched back to QGLWidget, the problem went away. I pretty certain QOpenGLWidget isn't 100% bug free.
The trouble I have been having is more related to compiling my application to run on Mac and IOS--which use different shaders. The OpenGL surface has to be configured different to accommodate whichever platform is compiling. It doesn't appear that the QOpenGLWidget is compatible with IOS yet
-
in that case, could you please file a Qt bug? http://bugreports.qt-project.org/
thank you so much!