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
qssgrenderinstancetable_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
5#ifndef QSSGRENDERINDEXTABLE_P_H
6#define QSSGRENDERINDEXTABLE_P_H
7
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtQuick3DRuntimeRender/private/qssgrendergraphobject_p.h>
21
22#include <QtGui/qvectornd.h>
23#include <QtGui/qmatrix4x4.h>
24
26
34
35struct Q_QUICK3DRUNTIMERENDER_EXPORT QSSGRenderInstanceTable : public QSSGRenderGraphObject
36{
38
39 int count() const { return instanceCount; }
40 qsizetype dataSize() const { return table.size(); }
41 const void *constData() const { return table.constData(); }
42 void setData(const QByteArray &data, int count, int stride) { table = data; instanceCount = count; instanceStride = stride; ++instanceSerial; }
44 int serial() const { return instanceSerial; }
45 int stride() const { return instanceStride; }
46 bool hasTransparency() { return transparency; }
47 void setHasTransparency( bool t) { transparency = t; }
48 void setDepthSorting(bool enable) { depthSorting = enable; }
49 bool isDepthSortingEnabled() { return depthSorting; }
50 QMatrix4x4 getTransform(int index) const;
51
52private:
53 int instanceCount = 0;
54 int instanceSerial = 0;
55 int instanceStride = 0;
56 bool transparency = false;
57 bool depthSorting = false;
59};
60
62
63#endif // QSSGRENDERINDEXTABLE_P_H
\inmodule QtCore
Definition qbytearray.h:57
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
The QVector4D class represents a vector or vertex in 4D space.
Definition qvectornd.h:330
Combined button and popup list for selecting options.
static int instanceCount
GLuint index
[2]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
const void GLsizei GLsizei stride
GLboolean enable
GLdouble GLdouble t
Definition qopenglext.h:243
GLenum GLenum GLsizei void * table
ptrdiff_t qsizetype
Definition qtypes.h:165
void setData(const QByteArray &data, int count, int stride)
Definition moc.h:23