Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QIOSCONTEXT_H
6
#
define
QIOSCONTEXT_H
7
8
#
include
<
QtCore
/
qloggingcategory
.
h
>
9
#
include
<
qpa
/
qplatformopenglcontext
.
h
>
10
11
@
class
EAGLContext;
12
13
QT_BEGIN_NAMESPACE
14
15
class
QIOSWindow;
16
17
class
QIOSContext
:
public
QObject
,
public
QPlatformOpenGLContext
18
{
19
Q_OBJECT
20
21
public
:
22
QIOSContext
(
QOpenGLContext
*
context
);
23
~
QIOSContext
();
24
25
QSurfaceFormat
format
()
const
override
;
26
27
void
swapBuffers
(QPlatformSurface *surface)
override
;
28
29
bool
makeCurrent
(QPlatformSurface *surface)
override
;
30
void
doneCurrent
()
override
;
31
32
GLuint
defaultFramebufferObject
(QPlatformSurface *)
const
override
;
33
QFunctionPointer
getProcAddress
(
const
char
*procName)
override
;
34
35
bool
isSharing
()
const
override
;
36
bool
isValid
()
const
override
;
37
38
private
Q_SLOTS
:
39
void
windowDestroyed
(
QObject
*
object
);
40
41
private
:
42
QIOSContext
*m_sharedContext;
43
EAGLContext *m_eaglContext;
44
QSurfaceFormat m_format;
45
46
struct
FramebufferObject {
47
GLuint handle;
48
GLuint colorRenderbuffer;
49
GLuint depthRenderbuffer;
50
GLint renderbufferWidth;
51
GLint renderbufferHeight;
52
bool
isComplete;
53
};
54
55
static
bool
verifyGraphicsHardwareAvailability();
56
static
void
deleteBuffers(
const
FramebufferObject &framebufferObject);
57
58
FramebufferObject &backingFramebufferObjectFor(QPlatformSurface *)
const
;
59
mutable
QHash<QPlatformSurface *, FramebufferObject> m_framebufferObjects;
60
61
bool
needsRenderbufferResize(QPlatformSurface *)
const
;
62
};
63
64
QT_END_NAMESPACE
65
66
#
endif
// QIOSCONTEXT_H
QIOSContext
Definition
qioscontext.h:18
QIOSContext::format
QSurfaceFormat format() const override
Definition
qioscontext.mm:83
QIOSContext::doneCurrent
void doneCurrent() override
Definition
qioscontext.mm:181
QIOSContext::isSharing
bool isSharing() const override
Definition
qioscontext.mm:337
QIOSContext::swapBuffers
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
Definition
qioscontext.mm:186
QIOSContext::defaultFramebufferObject
GLuint defaultFramebufferObject(QPlatformSurface *) const override
Reimplement in subclass if your platform uses framebuffer objects for surfaces.
Definition
qioscontext.mm:230
QIOSContext::isValid
bool isValid() const override
Definition
qioscontext.mm:332
QIOSContext::getProcAddress
QFunctionPointer getProcAddress(const char *procName) override
Reimplement in subclass to allow dynamic querying of OpenGL symbols.
Definition
qioscontext.mm:327
QIOSContext::makeCurrent
bool makeCurrent(QPlatformSurface *surface) override
Definition
qioscontext.mm:105
QIOSContext::~QIOSContext
~QIOSContext()
Definition
qioscontext.mm:62
QIOSIntegration
Definition
qiosintegration.h:38
QIOSIntegration::instance
static QIOSIntegration * instance()
Definition
qiosintegration.mm:53
Q_LOGGING_CATEGORY
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
Q_ASSERT_IS_GL_SURFACE
#define Q_ASSERT_IS_GL_SURFACE(surface)
Definition
qioscontext.mm:102
QT_IOS_GL_STATUS_CASE
#define QT_IOS_GL_STATUS_CASE(val)
Definition
qioscontext.mm:88
fboStatusString
static QString fboStatusString(GLenum status)
Definition
qioscontext.mm:90
qtbase
src
plugins
platforms
ios
qioscontext.h
Generated on
for Qt by
1.18.0