QBuffer

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

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QBuffer

Synopsis

Functions

Slots

Signals

Detailed Description

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

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

class PySide2.Qt3DRender.Qt3DRender.QBuffer([parent=None])

PySide2.Qt3DRender.Qt3DRender.QBuffer(ty[, parent=None])

Note

This constructor is deprecated.

param parent:

PySide2.Qt3DCore.Qt3DCore.QNode

param ty:

BufferType

Constructs a new QBuffer with parent .

Constructs a new QBuffer of buffer type ty with parent .

PySide2.Qt3DRender.Qt3DRender.QBuffer.BufferType

The type of the buffer.

Constant

Description

Qt3DRender.QBuffer.VertexBuffer

GL_ARRAY_BUFFER

Qt3DRender.QBuffer.IndexBuffer

GL_ELEMENT_ARRAY_BUFFER

Qt3DRender.QBuffer.PixelPackBuffer

GL_PIXEL_PACK_BUFFER

Qt3DRender.QBuffer.PixelUnpackBuffer

GL_PIXEL_UNPACK_BUFFER

Qt3DRender.QBuffer.UniformBuffer

GL_UNIFORM_BUFFER

Qt3DRender.QBuffer.ShaderStorageBuffer

GL_SHADER_STORAGE_BUFFER

Qt3DRender.QBuffer.DrawIndirectBuffer

GL_DRAW_INDIRECT_BUFFER

PySide2.Qt3DRender.Qt3DRender.QBuffer.UsageType

The type of the usage.

Constant

Description

Qt3DRender.QBuffer.StreamDraw

GL_STREAM_DRAW

Qt3DRender.QBuffer.StreamRead

GL_STREAM_READ

Qt3DRender.QBuffer.StreamCopy

GL_STREAM_COPY

Qt3DRender.QBuffer.StaticDraw

GL_STATIC_DRAW

Qt3DRender.QBuffer.StaticRead

GL_STATIC_READ

Qt3DRender.QBuffer.StaticCopy

GL_STATIC_COPY

Qt3DRender.QBuffer.DynamicDraw

GL_DYNAMIC_DRAW

Qt3DRender.QBuffer.DynamicRead

GL_DYNAMIC_READ

Qt3DRender.QBuffer.DynamicCopy

GL_DYNAMIC_COPY

PySide2.Qt3DRender.Qt3DRender.QBuffer.AccessType

Constant

Description

Qt3DRender.QBuffer.Write

Write access

Qt3DRender.QBuffer.Read

Read access

Qt3DRender.QBuffer.ReadWrite

Write|Read

PySide2.Qt3DRender.Qt3DRender.QBuffer.accessType()
Return type:

AccessType

Returns the AccessType of the buffer.

See also

AccessType

PySide2.Qt3DRender.Qt3DRender.QBuffer.accessTypeChanged(access)
Parameters:

accessAccessType

PySide2.Qt3DRender.Qt3DRender.QBuffer.data()
Return type:

PySide2.QtCore.QByteArray

Returns the data.

See also

setData()

PySide2.Qt3DRender.Qt3DRender.QBuffer.dataAvailable()
PySide2.Qt3DRender.Qt3DRender.QBuffer.dataChanged(bytes)
Parameters:

bytesPySide2.QtCore.QByteArray

PySide2.Qt3DRender.Qt3DRender.QBuffer.dataGenerator()
Return type:

QSharedPointer

Note

This function is deprecated.

Returns the buffer functor.

PySide2.Qt3DRender.Qt3DRender.QBuffer.isSyncData()
Return type:

bool

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

Note

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

PySide2.Qt3DRender.Qt3DRender.QBuffer.setAccessType(access)
Parameters:

accessAccessType

Returns the AccessType of the buffer.

See also

AccessType

PySide2.Qt3DRender.Qt3DRender.QBuffer.setData(bytes)
Parameters:

bytesPySide2.QtCore.QByteArray

Sets bytes as data.

See also

data()

PySide2.Qt3DRender.Qt3DRender.QBuffer.setDataGenerator(functor)
Parameters:

functorQSharedPointer

Note

This function is deprecated.

Sets the buffer functor .

See also

dataGenerator()

PySide2.Qt3DRender.Qt3DRender.QBuffer.setSyncData(syncData)
Parameters:

syncData – bool

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

Note

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

PySide2.Qt3DRender.Qt3DRender.QBuffer.setType(type)
Parameters:

typeBufferType

Note

This function is deprecated.

Holds the buffer type.

PySide2.Qt3DRender.Qt3DRender.QBuffer.setUsage(usage)
Parameters:

usageUsageType

Holds the buffer usage.

PySide2.Qt3DRender.Qt3DRender.QBuffer.syncDataChanged(syncData)
Parameters:

syncData – bool

PySide2.Qt3DRender.Qt3DRender.QBuffer.type()
Return type:

BufferType

Note

This function is deprecated.

Holds the buffer type.

PySide2.Qt3DRender.Qt3DRender.QBuffer.typeChanged(type)
Parameters:

typeBufferType

PySide2.Qt3DRender.Qt3DRender.QBuffer.updateData(offset, bytes)
Parameters:

Updates the data by replacing it with bytes at offset .

PySide2.Qt3DRender.Qt3DRender.QBuffer.usage()
Return type:

UsageType

Holds the buffer usage.

PySide2.Qt3DRender.Qt3DRender.QBuffer.usageChanged(usage)
Parameters:

usageUsageType