mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:08:54 +02:00
handle minimize case
This commit is contained in:
parent
2a03cf1bab
commit
a5eb5d6515
2 changed files with 5 additions and 1 deletions
|
@ -19,6 +19,10 @@ GLCanvas::GLCanvas() : QGLWidget(QGLFormat(QGL::NoDepthBuffer)),
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GLCanvas::isThrottleRendering() const {
|
||||||
|
return _throttleRendering || Application::getInstance()->getWindow()->isMinimized();
|
||||||
|
}
|
||||||
|
|
||||||
void GLCanvas::initializeGL() {
|
void GLCanvas::initializeGL() {
|
||||||
Application::getInstance()->initializeGL();
|
Application::getInstance()->initializeGL();
|
||||||
setAttribute(Qt::WA_AcceptTouchEvents);
|
setAttribute(Qt::WA_AcceptTouchEvents);
|
||||||
|
|
|
@ -17,7 +17,7 @@ class GLCanvas : public QGLWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GLCanvas();
|
GLCanvas();
|
||||||
bool isThrottleRendering() const { return _throttleRendering; }
|
bool isThrottleRendering() const;
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
QTimer _frameTimer;
|
QTimer _frameTimer;
|
||||||
|
|
Loading…
Reference in a new issue