Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qioscontext.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QIOSCONTEXT_H
5#define QIOSCONTEXT_H
6
7#include <QtCore/qloggingcategory.h>
8#include <qpa/qplatformopenglcontext.h>
9
10@class EAGLContext;
11
13
14class QIOSWindow;
15
17{
19
20public:
23
24 QSurfaceFormat format() const override;
25
26 void swapBuffers(QPlatformSurface *surface) override;
27
28 bool makeCurrent(QPlatformSurface *surface) override;
29 void doneCurrent() override;
30
32 QFunctionPointer getProcAddress(const char *procName) override;
33
34 bool isSharing() const override;
35 bool isValid() const override;
36
37private Q_SLOTS:
38 void windowDestroyed(QObject *object);
39
40private:
41 QIOSContext *m_sharedContext;
42 EAGLContext *m_eaglContext;
43 QSurfaceFormat m_format;
44
45 struct FramebufferObject {
47 GLuint colorRenderbuffer;
48 GLuint depthRenderbuffer;
49 GLint renderbufferWidth;
50 GLint renderbufferHeight;
51 bool isComplete;
52 };
53
54 static bool verifyGraphicsHardwareAvailability();
55 static void deleteBuffers(const FramebufferObject &framebufferObject);
56
57 FramebufferObject &backingFramebufferObjectFor(QPlatformSurface *) const;
58 mutable QHash<QPlatformSurface *, FramebufferObject> m_framebufferObjects;
59
60 bool needsRenderbufferResize(QPlatformSurface *) const;
61};
62
64
65#endif // QIOSCONTEXT_H
QSurfaceFormat format() const override
void doneCurrent() override
bool isSharing() const override
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
GLuint defaultFramebufferObject(QPlatformSurface *) const override
Reimplement in subclass if your platform uses framebuffer objects for surfaces.
bool isValid() const override
bool makeCurrent(QPlatformSurface *surface) override
QIOSContext(QOpenGLContext *context)
\inmodule QtCore
Definition qobject.h:103
\inmodule QtGui
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
QOpenGLContext * context() const
The QPlatformSurface class provides an abstraction for a surface.
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
Combined button and popup list for selecting options.
typedef GLint(GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC)(GLuint program
GLuint64 GLenum void * handle
const void * getProcAddress
#define GLuint
#define Q_OBJECT
#define Q_SLOTS