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
qt_egl_p.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 QT_EGL_P_H
5#define QT_EGL_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 purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18// q(data/text)stream.h must be included before any header file that defines Status
19#include <QtCore/qdatastream.h>
20#include <QtCore/qtextstream.h>
21#include <QtCore/private/qglobal_p.h>
22
23#ifdef QT_EGL_NO_X11
24# ifndef EGL_NO_X11
25# define EGL_NO_X11
26# endif
27# ifndef MESA_EGL_NO_X11_HEADERS
28# define MESA_EGL_NO_X11_HEADERS // MESA
29# endif
30# if !defined(Q_OS_INTEGRITY)
31# define WIN_INTERFACE_CUSTOM // NV
32# endif // Q_OS_INTEGRITY
33#else // QT_EGL_NO_X11
34// If one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
35// that needs USE_X11 to be defined.
36# define USE_X11
37#endif
38
39#ifdef QT_EGL_WAYLAND
40# define WAYLAND // NV
41#endif // QT_EGL_WAYLAND
42
43#include <EGL/egl.h>
44#include <EGL/eglext.h>
45
46#include <stdint.h>
47
49
50namespace QtInternal {
51
52template <class FromType, class ToType>
54{
55 static inline ToType convert(FromType v)
56 { return v; }
57};
58
59template <>
60struct QtEglConverter<uint32_t, uintptr_t>
61{
62 static inline uintptr_t convert(uint32_t v)
63 { return v; }
64};
65
66#if QT_POINTER_SIZE > 4
67template <>
68struct QtEglConverter<uintptr_t, uint32_t>
69{
70 static inline uint32_t convert(uintptr_t v)
71 { return uint32_t(v); }
72};
73#endif
74
75template <>
76struct QtEglConverter<uint32_t, void *>
77{
78 static inline void *convert(uint32_t v)
79 { return reinterpret_cast<void *>(uintptr_t(v)); }
80};
81
82template <>
83struct QtEglConverter<void *, uint32_t>
84{
85 static inline uint32_t convert(void *v)
86 { return uintptr_t(v); }
87};
88
89} // QtInternal
90
91template <class ToType, class FromType>
92static inline ToType qt_egl_cast(FromType from)
94
96
97#endif // QT_EGL_P_H
Combined button and popup list for selecting options.
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
GLsizei const GLfloat * v
[13]
static ToType qt_egl_cast(FromType from)
Definition qt_egl_p.h:92
static ToType convert(FromType v)
Definition qt_egl_p.h:55