StelMainView.cpp   StelMainView.cpp 
skipping to change at line 102 skipping to change at line 102
initialized(false) initialized(false)
{ {
qDebug()<<"StelGLWidget constructor"; qDebug()<<"StelGLWidget constructor";
#ifndef USE_OLD_QGLWIDGET #ifndef USE_OLD_QGLWIDGET
setFormat(fmt); setFormat(fmt);
#endif #endif
//because we always draw the full background, //because we always draw the full background,
//lets skip drawing the system background //lets skip drawing the system background
setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_OpaquePaintEvent);
setAttribute(Qt::WA_AcceptTouchEvents);
setAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents);
setAutoFillBackground(false); setAutoFillBackground(false);
} }
~StelGLWidget() ~StelGLWidget()
{ {
qDebug()<<"StelGLWidget destroyed"; qDebug()<<"StelGLWidget destroyed";
} }
virtual void initializeGL() Q_DECL_OVERRIDE virtual void initializeGL() Q_DECL_OVERRIDE
{ {
skipping to change at line 556 skipping to change at line 558
gui(Q_NULLPTR), gui(Q_NULLPTR),
stelApp(Q_NULLPTR), stelApp(Q_NULLPTR),
updateQueued(false), updateQueued(false),
flagInvertScreenShotColors(false), flagInvertScreenShotColors(false),
flagOverwriteScreenshots(false), flagOverwriteScreenshots(false),
screenShotPrefix("stellarium-"), screenShotPrefix("stellarium-"),
screenShotDir(""), screenShotDir(""),
cursorTimeout(-1.f), flagCursorTimeout(false), maxfps(10000.f) cursorTimeout(-1.f), flagCursorTimeout(false), maxfps(10000.f)
{ {
setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_OpaquePaintEvent);
setAttribute(Qt::WA_AcceptTouchEvents);
setAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents);
setAutoFillBackground(false); setAutoFillBackground(false);
configuration = settings; configuration = settings;
StelApp::initStatic(); StelApp::initStatic();
minFpsTimer = new QTimer(this); minFpsTimer = new QTimer(this);
minFpsTimer->setTimerType(Qt::PreciseTimer); minFpsTimer->setTimerType(Qt::PreciseTimer);
minFpsTimer->setInterval(1000/minfps); minFpsTimer->setInterval(1000/minfps);
connect(minFpsTimer,SIGNAL(timeout()),this,SLOT(minFPSUpdate())); connect(minFpsTimer,SIGNAL(timeout()),this,SLOT(minFPSUpdate()));
skipping to change at line 592 skipping to change at line 596
lastEventTimeSec = 0; lastEventTimeSec = 0;
#ifdef OPENGL_DEBUG_LOGGING #ifdef OPENGL_DEBUG_LOGGING
glLogger = new QOpenGLDebugLogger(this); glLogger = new QOpenGLDebugLogger(this);
connect(glLogger, SIGNAL(messageLogged(QOpenGLDebugMessage)), this, SLOT(logGLMessage(QOpenGLDebugMessage))); connect(glLogger, SIGNAL(messageLogged(QOpenGLDebugMessage)), this, SLOT(logGLMessage(QOpenGLDebugMessage)));
#endif #endif
//get the desired opengl format parameters //get the desired opengl format parameters
QSurfaceFormat glFormat = getDesiredGLFormat(); QSurfaceFormat glFormat = getDesiredGLFormat();
// VSync control // VSync control
QVariant vsync = configuration->value("video/vsync"); bool vsdef = true;
if(vsync.isValid() && vsync.canConvert<bool>()) // if the config par #ifdef Q_OS_OSX
ameter is not set we use system default (which should be true) // FIXME: workaround for bug LP:#1705832 (https://bugs.launchpad.net
glFormat.setSwapInterval(vsync.toBool()); /stellarium/+bug/1705832)
// Qt: https://bugreports.qt.io/browse/QTBUG-53273
vsdef = false; // use vsync=false by default on macOS
#endif
if (configuration->value("video/vsync", vsdef).toBool())
glFormat.setSwapInterval(1);
else
glFormat.setSwapInterval(0);
qDebug()<<"Desired surface format: "<<glFormat; qDebug()<<"Desired surface format: "<<glFormat;
#if QT_VERSION >= QT_VERSION_CHECK(5,4,0) #if QT_VERSION >= QT_VERSION_CHECK(5,4,0)
//we set the default format to our required format, if possible //we set the default format to our required format, if possible
//this only works with Qt 5.4+ //this only works with Qt 5.4+
QSurfaceFormat defFmt = glFormat; QSurfaceFormat defFmt = glFormat;
//we don't need these buffers in the background //we don't need these buffers in the background
defFmt.setAlphaBufferSize(0); defFmt.setAlphaBufferSize(0);
defFmt.setStencilBufferSize(0); defFmt.setStencilBufferSize(0);
 End of changes. 3 change blocks. 
4 lines changed or deleted 15 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/