Files
cgal/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h
T
Sébastien Loriot 0779373835 extra run of the script to remove tabs and trailing whitespaces
right after the  merge of 4.14 release branch

+ manual fix on one line in:
    * Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
    * .travis/generate_travis.sh
2020-03-26 14:16:06 +01:00

33 lines
829 B
C++

// Copyright (c) 2015 GeometryFactory SARL (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Laurent Rineau and Maxime Gimeno
#ifndef CGAL_QT_CREATE_OPENGL_CONTEXT_H
#define CGAL_QT_CREATE_OPENGL_CONTEXT_H
#include <QOpenGLContext>
#include <QGLContext>
namespace CGAL{
namespace Qt{
inline QGLContext* createOpenGLContext()
{
QOpenGLContext *context = new QOpenGLContext();
QSurfaceFormat format;
format.setVersion(2,1);
format.setProfile(QSurfaceFormat::CompatibilityProfile);
context->setFormat(format);
QGLContext *result = QGLContext::fromOpenGLContext(context);
result->create();
return result;
}
} // namespace Qt
} // namespace CGAL
#endif