move QuarterWidget to QOpenGLWidget
This commit is contained in:
@@ -38,11 +38,6 @@
|
||||
# include <QMessageLogContext>
|
||||
#endif
|
||||
# include <QPointer>
|
||||
# include <QGLFormat>
|
||||
# include <QGLPixelBuffer>
|
||||
#if QT_VERSION >= 0x040200
|
||||
# include <QGLFramebufferObject>
|
||||
#endif
|
||||
# include <QSessionManager>
|
||||
# include <QStatusBar>
|
||||
# include <QTextStream>
|
||||
@@ -50,6 +45,7 @@
|
||||
#endif
|
||||
|
||||
#include <boost/interprocess/sync/file_lock.hpp>
|
||||
#include <QtOpenGL.h>
|
||||
|
||||
|
||||
// FreeCAD Base header
|
||||
@@ -1553,26 +1549,26 @@ void Application::runApplication(void)
|
||||
ActionStyleEvent::EventType = QEvent::registerEventType(QEvent::User + 1);
|
||||
|
||||
// check for OpenGL
|
||||
#if !defined(HAVE_QT5_OPENGL)
|
||||
if (!QGLFormat::hasOpenGL()) {
|
||||
QMessageBox::critical(0, QObject::tr("No OpenGL"), QObject::tr("This system does not support OpenGL"));
|
||||
throw Base::Exception("This system does not support OpenGL");
|
||||
}
|
||||
#if QT_VERSION >= 0x040200
|
||||
if (!QGLFramebufferObject::hasOpenGLFramebufferObjects()) {
|
||||
Base::Console().Log("This system does not support framebuffer objects\n");
|
||||
}
|
||||
#endif
|
||||
if (!QGLPixelBuffer::hasOpenGLPbuffers()) {
|
||||
Base::Console().Log("This system does not support pbuffers\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_QT5_OPENGL)
|
||||
// FIXME: HAVE_QT5_OPENGL
|
||||
#else
|
||||
QGLFormat::OpenGLVersionFlags version = QGLFormat::openGLVersionFlags ();
|
||||
#if QT_VERSION >= 0x040500
|
||||
if (version & QGLFormat::OpenGL_Version_3_0)
|
||||
Base::Console().Log("OpenGL version 3.0 or higher is present\n");
|
||||
else
|
||||
#endif
|
||||
if (version & QGLFormat::OpenGL_Version_2_1)
|
||||
else if (version & QGLFormat::OpenGL_Version_2_1)
|
||||
Base::Console().Log("OpenGL version 2.1 or higher is present\n");
|
||||
else if (version & QGLFormat::OpenGL_Version_2_0)
|
||||
Base::Console().Log("OpenGL version 2.0 or higher is present\n");
|
||||
@@ -1588,6 +1584,7 @@ void Application::runApplication(void)
|
||||
Base::Console().Log("OpenGL version 1.1 or higher is present\n");
|
||||
else if (version & QGLFormat::OpenGL_Version_None)
|
||||
Base::Console().Log("No OpenGL is present or no OpenGL context is current\n");
|
||||
#endif
|
||||
|
||||
#if !defined(Q_OS_LINUX)
|
||||
QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << QString::fromLatin1(":/icons/FreeCAD-default"));
|
||||
|
||||
Reference in New Issue
Block a user