mirror of https://github.com/CGAL/cgal
Merge branch 'CGAL-Qt5_support-GF' of github.com:CGAL/cgal-public-dev into CGAL-Qt5_support-GF
This commit is contained in:
commit
8aee37b711
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue