Permalink
Browse files

use esc key like other test programs and use paintGL call to trigger …

…updateGL
  • Loading branch information...
peter karasev
peter karasev committed Mar 22, 2017
1 parent 1356ab5 commit 6a5f8bf278bc5d70f789e33bdbb73d9de6a33885
Showing with 5 additions and 0 deletions.
  1. +1 −0 data/qt-example/shader.frag
  2. +1 −0 source/examples/qtexample/WindowQt.cpp
  3. +3 −0 source/examples/qtexample/main.cpp
@@ -8,4 +8,5 @@ in vec4 color;
void main()
{
fragColor = color;
fragColor = vec4(fragColor.x, 0.0, fragColor.y, 1.0);
}
@@ -170,6 +170,7 @@ void WindowQt::resizeGL(QResizeEvent *)
void WindowQt::paintGL()
{
updateGL();
}
void WindowQt::enterEvent(QEvent *)
@@ -129,6 +129,9 @@ class Window : public WindowQt
m_fragmentShaderSource->reload();
updateGL();
break;
case Qt::Key_Escape:
qApp->quit();
break;
default:
break;
}

0 comments on commit 6a5f8bf

Please sign in to comment.