1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
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 QT3DCORE_QBUFFER_P_H
5#define QT3DCORE_QBUFFER_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 for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <Qt3DCore/private/qnode_p.h>
19#include <Qt3DCore/qbuffer.h>
20#include <Qt3DCore/qt3dcore_global.h>
21#include <private/qnode_p.h>
22#include <QByteArray>
23
24QT_BEGIN_NAMESPACE
25
26namespace Qt3DCore {
27
28class Q_3DCORESHARED_EXPORT QBufferPrivate : public Qt3DCore::QNodePrivate
29{
30public:
31 Q_DECLARE_PUBLIC(QBuffer)
32
33 QBufferPrivate();
34
35 static QBufferPrivate *get(QBuffer *q);
36
37 QByteArray m_data;
38 QBuffer::UsageType m_usage;
39 QBuffer::AccessType m_access;
40 bool m_dirty;
41
42 void update() override;
43 void setData(const QByteArray &data);
44
45 static const char *UpdateDataPropertyName;
46};
47
48struct QBufferUpdate
49{
50 qsizetype offset;
51 QByteArray data;
52};
53
54} // namespace Qt3DCore
55
56QT_END_NAMESPACE
57Q_DECLARE_METATYPE(Qt3DCore::QBufferUpdate) // LCOV_EXCL_LINE
58
59#endif // QT3DCORE_QBUFFER_P_H
60

source code of qt3d/src/core/geometry/qbuffer_p.h