QBuffer Class

(Qt3DRender::QBuffer)
Header: #include <QBuffer>
qmake: QT += 3drender
Instantiated By: Buffer
Inherits: Qt3DRender::QAbstractBuffer

Public Types

enum BufferType { VertexBuffer, IndexBuffer, PixelPackBuffer, PixelUnpackBuffer }
enum UsageType { StreamDraw, StreamRead, StreamCopy, StaticDraw, ..., DynamicCopy }

Properties

Public Functions

QBuffer(BufferType ty = QBuffer::VertexBuffer, Qt3DCore::QNode *parent = Q_NULLPTR)
~QBuffer()
QBufferFunctorPtr bufferFunctor() const
bool isSync() const
void setBufferFunctor(const QBufferFunctorPtr &functor)
BufferType type() const
UsageType usage() const

Public Slots

void setSync(bool sync)
void setType(BufferType type)
void setUsage(UsageType usage)

Signals

void syncChanged(bool sync)
void typeChanged(BufferType type)
void usageChanged(UsageType usage)

Protected Functions

QBuffer(QBufferPrivate &dd, QBuffer::BufferType ty, Qt3DCore::QNode *parent = Q_NULLPTR)
void copy(const Qt3DCore::QNode *ref)
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)

Additional Inherited Members

Detailed Description

Member Type Documentation

enum QBuffer::BufferType

The type of the buffer.

ConstantValueDescription
Qt3DRender::QBuffer::VertexBuffer0x8892GL_ARRAY_BUFFER
Qt3DRender::QBuffer::IndexBuffer0x8893GL_ELEMENT_ARRAY_BUFFER
Qt3DRender::QBuffer::PixelPackBuffer0x88EBGL_PIXEL_PACK_BUFFER
Qt3DRender::QBuffer::PixelUnpackBuffer0x88ECGL_PIXEL_UNPACK_BUFFER

enum QBuffer::UsageType

The type of the usage.

ConstantValueDescription
Qt3DRender::QBuffer::StreamDraw0x88E0GL_STREAM_DRAW
Qt3DRender::QBuffer::StreamRead0x88E1GL_STREAM_READ
Qt3DRender::QBuffer::StreamCopy0x88E2GL_STREAM_COPY
Qt3DRender::QBuffer::StaticDraw0x88E4GL_STATIC_DRAW
Qt3DRender::QBuffer::StaticRead0x88E5GL_STATIC_READ
Qt3DRender::QBuffer::StaticCopy0x88E6GL_STATIC_COPY
Qt3DRender::QBuffer::DynamicDraw0x88E8GL_DYNAMIC_DRAW
Qt3DRender::QBuffer::DynamicRead0x88E9GL_DYNAMIC_READ
Qt3DRender::QBuffer::DynamicCopy0x88EAGL_DYNAMIC_COPY

Property Documentation

sync : bool

Holds the sync flag. When sync is true, this will force data created by a Qt3DRender::QBufferFunctor to also be updated on the frontend Qt3DRender::QBuffer node. By default sync is false.

Note: : This has no effect if the buffer's data was set directly using the data property.

Access functions:

bool isSync() const
void setSync(bool sync)

Notifier signal:

void syncChanged(bool sync)

type : BufferType

Holds the buffer type.

Access functions:

BufferType type() const
void setType(BufferType type)

Notifier signal:

void typeChanged(BufferType type)

usage : UsageType

Holds the buffer usage.

Access functions:

UsageType usage() const
void setUsage(UsageType usage)

Notifier signal:

void usageChanged(UsageType usage)

Member Function Documentation

QBuffer::QBuffer(BufferType ty = QBuffer::VertexBuffer, Qt3DCore::QNode *parent = Q_NULLPTR)

Default constructs an instance of QBuffer.

[protected] QBuffer::QBuffer(QBufferPrivate &dd, QBuffer::BufferType ty, Qt3DCore::QNode *parent = Q_NULLPTR)

Copy constructor.

QBuffer::~QBuffer()

Destroys this buffer.

QBufferFunctorPtr QBuffer::bufferFunctor() const

Returns the buffer functor.

See also setBufferFunctor().

[protected] void QBuffer::copy(const Qt3DCore::QNode *ref)

[protected] void QBuffer::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)

void QBuffer::setBufferFunctor(const QBufferFunctorPtr &functor)

Sets the buffer functor.

See also bufferFunctor().

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.