Merge branch 'CGAL-Qt5_support-GF' of github.com:CGAL/cgal-public-dev into CGAL-Qt5_support-GF

This commit is contained in:
Andreas Fabri 2015-07-07 15:43:14 +02:00
commit 8aee37b711
2 changed files with 10 additions and 9 deletions

View File

@ -2,15 +2,6 @@
#include "Scene.h"
#include <QMouseEvent>
#include <QGLFunctions>
QGLContext* createContext()
{
QOpenGLContext *context = new QOpenGLContext();
QSurfaceFormat format;
format.setVersion(3,3);
format.setProfile(QSurfaceFormat::CompatibilityProfile);
context->setFormat(format);
return QGLContext::fromOpenGLContext(context);
}
Viewer::Viewer(QWidget* parent)
: QGLViewer(createContext(),parent),

View File

@ -25,6 +25,16 @@ protected:
virtual void mouseReleaseEvent(QMouseEvent* e);
private:
static QGLContext* createContext()
{
QOpenGLContext *context = new QOpenGLContext();
QSurfaceFormat format;
format.setVersion(3,3);
format.setProfile(QSurfaceFormat::CompatibilityProfile);
context->setFormat(format);
return QGLContext::fromOpenGLContext(context);
}
Scene* m_pScene;
bool m_custom_mouse;
QOpenGLContext *oglContext_;