Qt3DRender.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

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

See also

setAccessType()

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

accessAccessType

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

QByteArray

Returns the data.

See also

setData()

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

bytesQByteArray

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

QSharedPointer

Returns the buffer functor.

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

bool

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

accessAccessType

See also

accessType()

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

bytesQByteArray

Sets bytes as data.

See also

data()

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

functorQSharedPointer

Sets the buffer functor .

See also

dataGenerator()

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

syncDatabool

See also

isSyncData()

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

typeBufferType

Note

This function is deprecated.

See also

type()

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

usageUsageType

See also

usage()

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

syncDatabool

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

BufferType

Note

This function is deprecated.

See also

setType()

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

typeBufferType

PySide2.Qt3DRender.Qt3DRender.QBuffer.updateData(offset, bytes)
Parameters
  • offsetint

  • bytesQByteArray

Updates the data by replacing it with bytes at offset .

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

UsageType

See also

setUsage()

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

usageUsageType