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
qopenglextensions_p.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 QOPENGL_EXTENSIONS_P_H
5#define QOPENGL_EXTENSIONS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the Qt OpenGL classes. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qtguiglobal_p.h>
20
22
24
25class Q_GUI_EXPORT QOpenGLExtensions : public QOpenGLExtraFunctions
26{
27 Q_DECLARE_PRIVATE(QOpenGLExtensions)
28public:
32
34 TextureRectangle = 0x00000001,
35 GenerateMipmap = 0x00000002,
36 TextureCompression = 0x00000004,
37 MirroredRepeat = 0x00000008,
38 FramebufferMultisample = 0x00000010,
39 StencilTwoSide = 0x00000020,
40 StencilWrap = 0x00000040,
41 PackedDepthStencil = 0x00000080,
42 NVFloatBuffer = 0x00000100,
43 PixelBufferObject = 0x00000200,
44 FramebufferBlit = 0x00000400,
45 BGRATextureFormat = 0x00000800,
46 DDSTextureCompression = 0x00001000,
47 ETC1TextureCompression = 0x00002000,
48 PVRTCTextureCompression = 0x00004000,
49 ElementIndexUint = 0x00008000,
50 Depth24 = 0x00010000,
51 SRGBFrameBuffer = 0x00020000,
52 MapBuffer = 0x00040000,
53 GeometryShaders = 0x00080000,
54 MapBufferRange = 0x00100000,
55 Sized8Formats = 0x00200000,
56 DiscardFramebuffer = 0x00400000,
57 Sized16Formats = 0x00800000,
58 TextureSwizzle = 0x01000000,
59 StandardDerivatives = 0x02000000,
60 ASTCTextureCompression = 0x04000000,
61 ETC2TextureCompression = 0x08000000,
62 HalfFloatVertex = 0x10000000,
63 MultiView = 0x20000000,
64 MultiViewExtended = 0x40000000
65 };
66 Q_DECLARE_FLAGS(OpenGLExtensions, OpenGLExtension)
67
68 OpenGLExtensions openGLExtensions();
69 bool hasOpenGLExtension(QOpenGLExtensions::OpenGLExtension extension) const;
70
71 GLvoid *glMapBuffer(GLenum target, GLenum access);
72 void glGetBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, GLvoid *data);
73
74 void flushShared();
75 void discardFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
76
78
79private:
80 static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != nullptr; }
81};
82
83Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLExtensions::OpenGLExtensions)
84
97
99{
100 return static_cast<QOpenGLExtensionsPrivate *>(d_ptr);
101}
102
104{
106 Q_ASSERT(QOpenGLExtensions::isInitialized(d));
107 GLvoid *result = d->MapBuffer(target, access);
109 return result;
110}
111
113{
115 Q_ASSERT(QOpenGLExtensions::isInitialized(d));
116 d->GetBufferSubData(target, offset, size, data);
118}
119
121
122#endif // QOPENGL_EXTENSIONS_P_H
\inmodule QtGui
GLsizei const GLenum * attachments
GLvoid *QOPENGLF_APIENTRYP MapBuffer(GLenum target, GLenum access)
qopengl_GLintptr qopengl_GLsizeiptr GLvoid * data
QOpenGLExtensionsPrivate * d() const
void glGetBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, GLvoid *data)
GLvoid * glMapBuffer(GLenum target, GLenum access)
The QOpenGLExtraFunctions class provides cross-platform access to the OpenGL ES 3....
QOpenGLFunctionsPrivate * d_ptr
EGLContext ctx
void extension()
[6]
Definition dialogs.cpp:230
Combined button and popup list for selecting options.
static void * context
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
#define QOPENGLF_APIENTRYP
Definition qopengl.h:275
QT_BEGIN_NAMESPACE typedef ptrdiff_t qopengl_GLintptr
Definition qopengl.h:265
ptrdiff_t qopengl_GLsizeiptr
Definition qopengl.h:266
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
typedef GLsizei(GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC)(GLuint target)
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
GLenum access
GLenum target
GLsizei const GLenum * attachments
GLenum GLuint GLintptr offset
GLsizei numAttachments
GLuint64EXT * result
[6]
#define Q_OPENGL_FUNCTIONS_DEBUG
#define Q_ASSERT(cond)
Definition qrandom.cpp:47