Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtGui/qopenglcontext_platform.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2020 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QOPENGLCONTEXT_PLATFORM_H
0005 #define QOPENGLCONTEXT_PLATFORM_H
0006 
0007 //
0008 //  W A R N I N G
0009 //  -------------
0010 //
0011 // This file is part of the native interface APIs. Usage of
0012 // this API may make your code source and binary incompatible
0013 // with future versions of Qt.
0014 //
0015 
0016 #ifndef QT_NO_OPENGL
0017 
0018 #include <QtGui/qtguiglobal.h>
0019 #include <QtGui/qopenglcontext.h>
0020 #include <QtGui/qwindowdefs.h>
0021 
0022 #include <QtCore/qnativeinterface.h>
0023 
0024 #if defined(Q_OS_MACOS)
0025 Q_FORWARD_DECLARE_OBJC_CLASS(NSOpenGLContext);
0026 #endif
0027 
0028 #if QT_CONFIG(xcb_glx_plugin)
0029 struct __GLXcontextRec; typedef struct __GLXcontextRec *GLXContext;
0030 #endif
0031 #if QT_CONFIG(egl)
0032 typedef void *EGLContext;
0033 typedef void *EGLDisplay;
0034 typedef void *EGLConfig;
0035 #endif
0036 
0037 #if !defined(Q_OS_MACOS) && defined(Q_QDOC)
0038 typedef void *NSOpenGLContext;
0039 #endif
0040 
0041 QT_BEGIN_NAMESPACE
0042 
0043 namespace QNativeInterface {
0044 
0045 #if defined(Q_OS_MACOS) || defined(Q_QDOC)
0046 struct Q_GUI_EXPORT QCocoaGLContext
0047 {
0048     QT_DECLARE_NATIVE_INTERFACE(QCocoaGLContext, 1, QOpenGLContext)
0049     static QOpenGLContext *fromNative(QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *context, QOpenGLContext *shareContext = nullptr);
0050     virtual QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *nativeContext() const = 0;
0051 };
0052 #endif
0053 
0054 #if defined(Q_OS_WIN) || defined(Q_QDOC)
0055 struct Q_GUI_EXPORT QWGLContext
0056 {
0057     QT_DECLARE_NATIVE_INTERFACE(QWGLContext, 1, QOpenGLContext)
0058     static HMODULE openGLModuleHandle();
0059     static QOpenGLContext *fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr);
0060     virtual HGLRC nativeContext() const = 0;
0061 };
0062 #endif
0063 
0064 #if QT_CONFIG(xcb_glx_plugin) || defined(Q_QDOC)
0065 struct Q_GUI_EXPORT QGLXContext
0066 {
0067     QT_DECLARE_NATIVE_INTERFACE(QGLXContext, 1, QOpenGLContext)
0068     static QOpenGLContext *fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext = nullptr);
0069     static QOpenGLContext *fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr);
0070     virtual GLXContext nativeContext() const = 0;
0071 };
0072 #endif
0073 
0074 #if QT_CONFIG(egl) || defined(Q_QDOC)
0075 struct Q_GUI_EXPORT QEGLContext
0076 {
0077     QT_DECLARE_NATIVE_INTERFACE(QEGLContext, 1, QOpenGLContext)
0078     static QOpenGLContext *fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr);
0079     virtual EGLContext nativeContext() const = 0;
0080     virtual EGLConfig config() const = 0;
0081     virtual EGLDisplay display() const = 0;
0082 
0083     virtual void invalidateContext() = 0;
0084 };
0085 #endif
0086 
0087 } // QNativeInterface
0088 
0089 QT_END_NAMESPACE
0090 
0091 #endif // QT_NO_OPENGL
0092 
0093 #endif // QOPENGLCONTEXT_PLATFORM_H