blob: fdd48fc8425065cbc452559cd389ca4c06da1a81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QXCBEGLNATIVEINTERFACEHANDLER_H
#define QXCBEGLNATIVEINTERFACEHANDLER_H
#include "qxcbnativeinterfacehandler.h"
QT_BEGIN_NAMESPACE
class QXcbEglNativeInterfaceHandler : public QXcbNativeInterfaceHandler
{
public:
enum ResourceType {
EglDisplay,
EglContext,
EglConfig
};
QXcbEglNativeInterfaceHandler(QXcbNativeInterface *nativeInterface);
QPlatformNativeInterface::NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) const override;
QPlatformNativeInterface::NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) const override;
QPlatformNativeInterface::NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource) const override;
private:
static void *eglDisplay();
static void *eglDisplayForWindow(QWindow *window);
static void *eglContextForContext(QOpenGLContext *context);
static void *eglConfigForContext(QOpenGLContext *context);
};
QT_END_NAMESPACE
#endif //QXCBEGLNATIVEINTERFACEHANDLER_H
|