Add missing key events and also try to glFinish after swapping
This commit is contained in:
parent
68052de8a0
commit
86f203e6e8
@ -8,6 +8,7 @@
|
|||||||
#include <QOffscreenSurface>
|
#include <QOffscreenSurface>
|
||||||
#include <QOpenGLContext>
|
#include <QOpenGLContext>
|
||||||
#include <QOpenGLFunctions>
|
#include <QOpenGLFunctions>
|
||||||
|
#include <QOpenGLFunctions_3_3_Core>
|
||||||
#include <QOpenGLWindow>
|
#include <QOpenGLWindow>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
@ -104,6 +105,8 @@ void OpenGLWindow::Present() {
|
|||||||
context->makeCurrent(this);
|
context->makeCurrent(this);
|
||||||
VideoCore::g_renderer->TryPresent(100);
|
VideoCore::g_renderer->TryPresent(100);
|
||||||
context->swapBuffers(this);
|
context->swapBuffers(this);
|
||||||
|
auto f = context->versionFunctions<QOpenGLFunctions_3_3_Core>();
|
||||||
|
f->glFinish();
|
||||||
QWindow::requestUpdate();
|
QWindow::requestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,6 +119,8 @@ bool OpenGLWindow::event(QEvent* event) {
|
|||||||
case QEvent::MouseButtonRelease:
|
case QEvent::MouseButtonRelease:
|
||||||
case QEvent::MouseButtonDblClick:
|
case QEvent::MouseButtonDblClick:
|
||||||
case QEvent::MouseMove:
|
case QEvent::MouseMove:
|
||||||
|
case QEvent::KeyPress:
|
||||||
|
case QEvent::KeyRelease:
|
||||||
case QEvent::FocusIn:
|
case QEvent::FocusIn:
|
||||||
case QEvent::FocusOut:
|
case QEvent::FocusOut:
|
||||||
case QEvent::FocusAboutToChange:
|
case QEvent::FocusAboutToChange:
|
||||||
|
Loading…
Reference in New Issue
Block a user