6#include <QOpenGLFunctions>
100 if (parts.
size() >= 3) {
102 if (versionParts.
size() >= 2) {
103 major = versionParts.
at(0).toInt(&majorOk);
104 minor = versionParts.
at(1).toInt(&minorOk);
107 if (
int idx = versionParts.
at(1).indexOf(
'V'))
108 minor = versionParts.
at(1).left(idx).toInt(&minorOk);
110 qWarning(
"Unrecognized OpenGL ES version");
114 qWarning(
"Unrecognised OpenGL ES version");
119 if (versionParts.
size() >= 2) {
120 major = versionParts.
at(0).toInt(&majorOk);
121 minor = versionParts.
at(1).toInt(&minorOk);
123 qWarning(
"Unrecognized OpenGL version");
127 if (!majorOk || !minorOk)
128 qWarning(
"Unrecognized OpenGL version");
129 return (majorOk && minorOk);
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays.
bool startsWith(QByteArrayView bv) const
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
QPlatformOpenGLContextPrivate()
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
virtual void initialize()
Called after a new instance is constructed.
virtual ~QPlatformOpenGLContext()
QOpenGLContext * context() const
virtual void endFrame()
Called when the RHI ends rendering a in the context.
virtual GLuint defaultFramebufferObject(QPlatformSurface *surface) const
Reimplement in subclass if your platform uses framebuffer objects for surfaces.
virtual void beginFrame()
Called when the RHI begins rendering a new frame in the context.
static bool parseOpenGLVersion(const QByteArray &versionString, int &major, int &minor)
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)