5#ifndef QPLATFORMOPENGLCONTEXT_H
6#define QPLATFORMOPENGLCONTEXT_H
17#include <QtGui/qtguiglobal.h>
18#include <QtCore/qnamespace.h>
22#include <QtGui/qsurfaceformat.h>
23#include <QtGui/qwindow.h>
24#include <QtGui/qopengl.h>
25#include <QtGui/qopenglcontext.h>
27#include <QtCore/qnativeinterface.h>
32class QPlatformOpenGLContextPrivate;
36 Q_DECLARE_PRIVATE(QPlatformOpenGLContext)
38 QPlatformOpenGLContext();
39 virtual ~QPlatformOpenGLContext();
56 virtual bool isValid()
const {
return true; }
62 static bool parseOpenGLVersion(
const QByteArray &versionString,
int &major,
int &minor);
65 friend class QOpenGLContext;
68 QScopedPointer<QPlatformOpenGLContextPrivate> d_ptr;
70 void setContext(QOpenGLContext *context);
75namespace QNativeInterface::
Private {
77#if defined(Q_OS_MACOS)
94#if QT_CONFIG(xcb_glx_plugin)
QByteArray format() const
Returns the format QImageReader uses for reading images.
QPlatformOpenGLContextPrivate()
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
friend class QOpenGLContextPrivate
virtual void initialize()
Called after a new instance is constructed.
virtual QFunctionPointer getProcAddress(const char *procName)=0
Reimplement in subclass to allow dynamic querying of OpenGL symbols.
virtual void swapBuffers(QPlatformSurface *surface)=0
Reimplement in subclass to native swap buffers calls.
virtual bool makeCurrent(QPlatformSurface *surface)=0
virtual bool isSharing() const
virtual void doneCurrent()=0
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.
virtual bool isValid() const
static bool parseOpenGLVersion(const QByteArray &versionString, int &major, int &minor)
Combined button and popup list for selecting options.