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
qopenglcontext_platform.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QOPENGLCONTEXT_PLATFORM_H
5#define QOPENGLCONTEXT_PLATFORM_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the native interface APIs. Usage of
12// this API may make your code source and binary incompatible
13// with future versions of Qt.
14//
15
16#ifndef QT_NO_OPENGL
17
18#include <QtGui/qtguiglobal.h>
19#include <QtGui/qopenglcontext.h>
20#include <QtGui/qwindowdefs.h>
21
22#include <QtCore/qnativeinterface.h>
23
24#if defined(Q_OS_MACOS)
25Q_FORWARD_DECLARE_OBJC_CLASS(NSOpenGLContext);
26#endif
27
28#if QT_CONFIG(xcb_glx_plugin)
29struct __GLXcontextRec; typedef struct __GLXcontextRec *GLXContext;
30#endif
31#if QT_CONFIG(egl)
32typedef void *EGLContext;
33typedef void *EGLDisplay;
34typedef void *EGLConfig;
35#endif
36
37#if !defined(Q_OS_MACOS) && defined(Q_QDOC)
38typedef void *NSOpenGLContext;
39#endif
40
42
43namespace QNativeInterface {
44
45#if defined(Q_OS_MACOS) || defined(Q_QDOC)
46struct Q_GUI_EXPORT QCocoaGLContext
47{
49 static QOpenGLContext *fromNative(QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *context, QOpenGLContext *shareContext = nullptr);
50 virtual QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *nativeContext() const = 0;
51};
52#endif
53
54#if defined(Q_OS_WIN) || defined(Q_QDOC)
55struct Q_GUI_EXPORT QWGLContext
56{
58 static HMODULE openGLModuleHandle();
59 static QOpenGLContext *fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr);
60 virtual HGLRC nativeContext() const = 0;
61};
62#endif
63
64#if QT_CONFIG(xcb_glx_plugin) || defined(Q_QDOC)
65struct Q_GUI_EXPORT QGLXContext
66{
68 static QOpenGLContext *fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext = nullptr);
69 static QOpenGLContext *fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr);
70 virtual GLXContext nativeContext() const = 0;
71};
72#endif
73
74#if QT_CONFIG(egl) || defined(Q_QDOC)
75struct Q_GUI_EXPORT QEGLContext
76{
78 static QOpenGLContext *fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr);
79 virtual EGLContext nativeContext() const = 0;
80 virtual EGLConfig config() const = 0;
81 virtual EGLDisplay display() const = 0;
82
83 virtual void invalidateContext() = 0;
84};
85#endif
86
87} // QNativeInterface
88
90
91#endif // QT_NO_OPENGL
92
93#endif // QOPENGLCONTEXT_PLATFORM_H
\inheaderfile QOpenGLContext
\inmodule QtGui
struct wl_display * display
Definition linuxdmabuf.h:41
T fromNative(const T &value, qreal scaleFactor, QPoint origin=QPoint(0, 0))
Combined button and popup list for selecting options.
static void * context
#define QT_IGNORE_DEPRECATIONS(statement)
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
EGLConfig config
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
#define QT_DECLARE_NATIVE_INTERFACE(...)
HINSTANCE HMODULE
aWidget window() -> setWindowTitle("New Window Title")
[2]