From 13b08a53ac1f4f5cca72f83caed86840ec395f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Tue, 25 Apr 2017 07:34:31 +0300 Subject: [PATCH] libgui|GLWindow: Querying the current frame count --- doomsday/sdk/libgui/include/de/gui/glwindow.h | 1 + doomsday/sdk/libgui/src/glwindow.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/doomsday/sdk/libgui/include/de/gui/glwindow.h b/doomsday/sdk/libgui/include/de/gui/glwindow.h index 448ac66320..7a3852a258 100644 --- a/doomsday/sdk/libgui/include/de/gui/glwindow.h +++ b/doomsday/sdk/libgui/include/de/gui/glwindow.h @@ -78,6 +78,7 @@ class LIBGUI_PUBLIC GLWindow : public QOpenGLWindow, public Asset bool isHidden() const; float frameRate() const; + uint frameCount() const; /** * Determines the current top left corner (origin) of the window. diff --git a/doomsday/sdk/libgui/src/glwindow.cpp b/doomsday/sdk/libgui/src/glwindow.cpp index 06da0e58c6..0a9e99134b 100644 --- a/doomsday/sdk/libgui/src/glwindow.cpp +++ b/doomsday/sdk/libgui/src/glwindow.cpp @@ -237,6 +237,11 @@ float GLWindow::frameRate() const return d->fps; } +uint GLWindow::frameCount() const +{ + return d->frameCount; +} + GLWindow::Size GLWindow::pointSize() const { return Size(duint(de::max(0, QOpenGLWindow::width())),