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;
19class QOpenGLTimeMonitor
22 QOpenGLTimeMonitor() {};
23 void setSampleCount(
int) {};
24 int sampleCount()
const {
return 0; };
25 bool create() {
return false; };
26 bool isCreated()
const {
return false; };
27 int recordSample() {
return 0; };
28 bool isResultAvailable()
const {
return false; };
29 QVector<GLuint64> waitForIntervals()
const {
return QVector<GLuint64>(); };
41 void RecordSample (
void);
42 void LogSamples (
void);
43 int GetTimersRunning(
void)
const;
47 int m_sampleCount { 0 };
48 int m_totalSamples { 30 };
49 bool m_timersReady {
true };
50 int m_timersRunning { 0 };
51 QVector<GLuint64> m_timerData { 0 };
A simple overload of QOpenGLTimeMonitor to record and log OpenGL execution intervals.
QVector< QString > m_timerNames