File indexing completed on 2025-02-21 10:12:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef QOPENGLVERSIONFUNCTIONFACTORY_H
0015 #define QOPENGLVERSIONFUNCTIONFACTORY_H
0016
0017 #include <QtOpenGL/qtopenglglobal.h>
0018 #include <QtOpenGL/qopenglversionprofile.h>
0019
0020 QT_BEGIN_NAMESPACE
0021
0022 class QAbstractOpenGLFunctions;
0023 class QOpenGLContext;
0024
0025 class Q_OPENGL_EXPORT QOpenGLVersionFunctionsFactory
0026 {
0027 public:
0028 static QAbstractOpenGLFunctions *get(const QOpenGLVersionProfile &versionProfile = QOpenGLVersionProfile(), QOpenGLContext *context = nullptr);
0029 template<class TYPE>
0030 static TYPE *get(QOpenGLContext *context = nullptr)
0031 {
0032 QOpenGLVersionProfile v = TYPE::versionProfile();
0033 return static_cast<TYPE*>(get(v, context));
0034 }
0035 };
0036
0037 QT_END_NAMESPACE
0038
0039 #endif