From 9453ce548002c0e367b8d9dbf6a780c662cb940f Mon Sep 17 00:00:00 2001 From: Hannes Weisbach Date: Thu, 10 Jan 2019 22:17:49 +0100 Subject: [PATCH] Use OpenGL commands only in paintGL() See documentation of QOpenGLWidget --- src/widgets/glwidget.cpp | 5 ----- src/widgets/glwidget.h | 4 ---- 2 files changed, 9 deletions(-) diff --git a/src/widgets/glwidget.cpp b/src/widgets/glwidget.cpp index 1c310abf..9aa958d6 100644 --- a/src/widgets/glwidget.cpp +++ b/src/widgets/glwidget.cpp @@ -412,12 +412,7 @@ void GLWidget::updateView() m_viewMatrix.rotate(-90, 1.0, 0.0, 0.0); } -#ifdef GLES void GLWidget::paintGL() { -#else -void GLWidget::paintEvent(QPaintEvent *pe) { - Q_UNUSED(pe) -#endif QPainter painter(this); // Segment counter diff --git a/src/widgets/glwidget.h b/src/widgets/glwidget.h index a04fa41e..655a1e1d 100644 --- a/src/widgets/glwidget.h +++ b/src/widgets/glwidget.h @@ -138,11 +138,7 @@ private slots: void resizeGL(int width, int height); void updateProjection(); void updateView(); -#ifdef GLES void paintGL(); -#else - void paintEvent(QPaintEvent *pe); -#endif void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event);