QBuffer¶

PyQt5.Qt3DRender.QBuffer

Inherits from QNode.

Description¶

Provides a data store for raw data to later be used as vertices or uniforms.

Data can either be provided directly using setData() or by specifying a generator with QBuffer::setDataGenerator() and providing a Qt3DRender::QBufferDataGeneratorPtr.

When using a generator the data will be loaded asynchronously in a job. The loaded data can be read back if the QBuffer::syncData flag is set to true.

Enums¶

AccessType

TODO

Member

Value

Description

Read

TODO

TODO

ReadWrite

TODO

TODO

Write

TODO

TODO


BufferType

The type of the buffer.

Member

Value

Description

DrawIndirectBuffer

0x8F3F

GL_DRAW_INDIRECT_BUFFER

IndexBuffer

0x8893

GL_ELEMENT_ARRAY_BUFFER

PixelPackBuffer

0x88EB

GL_PIXEL_PACK_BUFFER

PixelUnpackBuffer

0x88EC

GL_PIXEL_UNPACK_BUFFER

ShaderStorageBuffer

0x90D2

GL_SHADER_STORAGE_BUFFER

UniformBuffer

0x8A11

GL_UNIFORM_BUFFER

VertexBuffer

0x8892

GL_ARRAY_BUFFER


UsageType

The type of the usage.

Member

Value

Description

DynamicCopy

0x88EA

GL_DYNAMIC_COPY

DynamicDraw

0x88E8

GL_DYNAMIC_DRAW

DynamicRead

0x88E9

GL_DYNAMIC_READ

StaticCopy

0x88E6

GL_STATIC_COPY

StaticDraw

0x88E4

GL_STATIC_DRAW

StaticRead

0x88E5

GL_STATIC_READ

StreamCopy

0x88E2

GL_STREAM_COPY

StreamDraw

0x88E0

GL_STREAM_DRAW

StreamRead

0x88E1

GL_STREAM_READ

Methods¶

__init__(parent: QNode = None)

Constructs a new QBuffer with parent.


__init__(BufferType, parent: QNode = None)

Constructs a new QBuffer of buffer type ty with parent.


accessType() → AccessType

See also

setAccessType().


data() → QByteArray

Returns the data.

See also

setData().


dataGenerator() → QBufferDataGenerator

Returns the buffer functor.

See also

setDataGenerator().


isSyncData() → bool

TODO


sceneChangeEvent(QSceneChange)

TODO


setAccessType(AccessType)

See also

accessType().


setData(Union[QByteArray, bytes, bytearray])

Sets bytes as data.

See also

data().


setDataGenerator(QBufferDataGenerator)

Sets the buffer functor.

See also

dataGenerator().


setSyncData(bool)

See also

isSyncData().


setType(BufferType)

See also

type().


setUsage(UsageType)

See also

usage().


type() → BufferType

See also

setType().


updateData(int, Union[QByteArray, bytes, bytearray])

Updates the data by replacing it with bytes at offset.


usage() → UsageType

See also

setUsage().

Signals¶

accessTypeChanged(AccessType)

TODO


dataAvailable()

TODO


dataChanged(Union[QByteArray, bytes, bytearray])

TODO


syncDataChanged(bool)

TODO


typeChanged(BufferType)

TODO


usageChanged(UsageType)

TODO