1#ifndef MYTHOPENGLPERF_H
2#define MYTHOPENGLPERF_H
6#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
7#include <QOpenGLTimeMonitor>
9#include <QtOpenGL/QOpenGLTimeMonitor>
13#if defined(QT_OPENGL_ES_2) || (QT_FEATURE_opengles2 == 1)
16using GLuint64 = uint64_t;
24class QOpenGLTimeMonitor
27 QOpenGLTimeMonitor() =
default;
28 void setSampleCount(
int ) {};
29 int sampleCount() {
return 0; };
30 bool create() {
return false; };
31 bool isCreated() {
return false; };
32 int recordSample() {
return 0; };
33 bool isResultAvailable() {
return false; };
34 QVector<GLuint64> waitForIntervals() {
return {}; };
47 void RecordSample (
void);
48 void LogSamples (
void);
49 int GetTimersRunning(
void)
const;
53 int m_sampleCount { 0 };
54 int m_totalSamples { 30 };
55 bool m_timersReady {
true };
56 int m_timersRunning { 0 };
57 QVector<GLuint64> m_timerData { 0 };
A simple overload of QOpenGLTimeMonitor to record and log OpenGL execution intervals.
QVector< QString > m_timerNames