diff --git a/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h b/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h index 429e04db216..a624c79fe24 100644 --- a/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h +++ b/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h @@ -30,8 +30,10 @@ inline QGLContext* createOpenGLContext() format.setVersion(2,1); format.setProfile(QSurfaceFormat::CompatibilityProfile); context->setFormat(format); + context->create(); QGLContext *result = QGLContext::fromOpenGLContext(context); result->create(); + delete context; return result; } } // namespace Qt