QBuffer¶
Provides a data store for raw data to later be used as vertices or uniforms. More…
Synopsis¶
Functions¶
def
accessType
()def
data
()def
dataGenerator
()def
isSyncData
()def
setData
(bytes)def
setDataGenerator
(functor)def
type
()def
updateData
(offset, bytes)def
usage
()
Slots¶
def
setAccessType
(access)def
setSyncData
(syncData)def
setType
(type)def
setUsage
(usage)
Signals¶
def
accessTypeChanged
(access)def
dataAvailable
()def
dataChanged
(bytes)def
syncDataChanged
(syncData)def
typeChanged
(type)def
usageChanged
(usage)
Detailed Description¶
Data can either be provided directly using
setData()
or by specifying a generator withsetDataGenerator()
and providing aQBufferDataGeneratorPtr
.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:
- param ty:
Constructs a new
QBuffer
withparent
.Constructs a new
QBuffer
of buffer typety
withparent
.
- 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:
Returns the
AccessType
of the buffer.See also
AccessType
- PySide2.Qt3DRender.Qt3DRender.QBuffer.accessTypeChanged(access)¶
- Parameters:
access –
AccessType
- PySide2.Qt3DRender.Qt3DRender.QBuffer.data()¶
- Return type:
Returns the data.
See also
- PySide2.Qt3DRender.Qt3DRender.QBuffer.dataAvailable()¶
- PySide2.Qt3DRender.Qt3DRender.QBuffer.dataChanged(bytes)¶
- Parameters:
bytes –
PySide2.QtCore.QByteArray
- PySide2.Qt3DRender.Qt3DRender.QBuffer.dataGenerator()¶
- Return type:
QSharedPointer
Note
This function is deprecated.
Returns the buffer functor.
See also
- 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 frontendQBuffer
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:
access –
AccessType
Returns the
AccessType
of the buffer.See also
AccessType
- PySide2.Qt3DRender.Qt3DRender.QBuffer.setData(bytes)¶
- Parameters:
bytes –
PySide2.QtCore.QByteArray
Sets
bytes
as data.See also
- PySide2.Qt3DRender.Qt3DRender.QBuffer.setDataGenerator(functor)¶
- Parameters:
functor –
QSharedPointer
Note
This function is deprecated.
Sets the buffer
functor
.See also
- 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 frontendQBuffer
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:
type –
BufferType
Note
This function is deprecated.
Holds the buffer type.
- PySide2.Qt3DRender.Qt3DRender.QBuffer.setUsage(usage)¶
- Parameters:
usage –
UsageType
Holds the buffer usage.
- PySide2.Qt3DRender.Qt3DRender.QBuffer.syncDataChanged(syncData)¶
- Parameters:
syncData – bool
- PySide2.Qt3DRender.Qt3DRender.QBuffer.type()¶
- Return type:
Note
This function is deprecated.
Holds the buffer type.
- PySide2.Qt3DRender.Qt3DRender.QBuffer.typeChanged(type)¶
- Parameters:
type –
BufferType
- PySide2.Qt3DRender.Qt3DRender.QBuffer.updateData(offset, bytes)¶
- Parameters:
offset – int
bytes –
PySide2.QtCore.QByteArray
Updates the data by replacing it with
bytes
atoffset
.
© 2022 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.