Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qopenvgcontext_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 QOPENVGCONTEXT_H
5#define QOPENVGCONTEXT_H
6
7#include <QtGui/QWindow>
8#include <QtGui/QImage>
9
10#include <EGL/egl.h>
11#include <VG/openvg.h>
12
13QT_BEGIN_NAMESPACE
14
15class QOpenVGContext
16{
17public:
18 QOpenVGContext(QWindow *window);
19 ~QOpenVGContext();
20
21 void makeCurrent();
22 void makeCurrent(EGLSurface surface);
23 void doneCurrent();
24 void swapBuffers();
25 void swapBuffers(EGLSurface surface);
26
27
28 QWindow *window() const;
29
30 EGLDisplay eglDisplay() { return m_display; }
31 EGLConfig eglConfig() { return m_config; }
32 EGLContext eglContext() { return m_context; }
33
34 QImage readFramebuffer(const QSize &size);
35
36 void getConfigs();
37
38 static void checkErrors();
39
40private:
41 EGLSurface m_surface;
42 EGLDisplay m_display;
43 EGLConfig m_config;
44 EGLContext m_context;
45
46 QWindow *m_window;
47
48};
49
51
52#endif // QOPENVGCONTEXT_H
\inmodule QtGui
Definition qwindow.h:63