IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QBuffer Class

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

This class was introduced in Qt 5.7.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QBuffer Class

  • Header: Qt3DCore/QBuffer

  • Since: Qt 5.7

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3dcore)

    target_link_libraries(mytarget PRIVATE Qt6::3dcore)

  • qmake: QT += 3dcore

  • Inherited By:

  • Instantiated By: qml-qt3d-core-buffer.xml

  • Inherits: Qt3DCore::QNode

  • Inherited By:

Detailed Description

Data can be provided directly using QBuffer::setData().

Member Type Documentation

 

enum QBuffer::AccessType

Constant

Value

Description

Qt3DCore::QBuffer::Write

0x1

Write access

Qt3DCore::QBuffer::Read

0x2

Read access

Qt3DCore::QBuffer::ReadWrite

Write|Read

Write|Read

enum QBuffer::UsageType

The type of the usage.

Constant

Value

Description

Qt3DCore::QBuffer::StreamDraw

0x88E0

GL_STREAM_DRAW

Qt3DCore::QBuffer::StreamRead

0x88E1

GL_STREAM_READ

Qt3DCore::QBuffer::StreamCopy

0x88E2

GL_STREAM_COPY

Qt3DCore::QBuffer::StaticDraw

0x88E4

GL_STATIC_DRAW

Qt3DCore::QBuffer::StaticRead

0x88E5

GL_STATIC_READ

Qt3DCore::QBuffer::StaticCopy

0x88E6

GL_STATIC_COPY

Qt3DCore::QBuffer::DynamicDraw

0x88E8

GL_DYNAMIC_DRAW

Qt3DCore::QBuffer::DynamicRead

0x88E9

GL_DYNAMIC_READ

Qt3DCore::QBuffer::DynamicCopy

0x88EA

GL_DYNAMIC_COPY

Property Documentation

 

accessType : AccessType

Returns the AccessType of the buffer.

Access functions:

  • accessType() const

  • void setAccessType( access)

Notifier signal:

  • void accessTypeChanged( access)

See Also

usage : UsageType

Holds the buffer usage.

Access functions:

  • usage() const

  • void setUsage( usage)

Notifier signal:

  • void usageChanged( usage)

Member Function Documentation

 

[explicit] QBuffer::QBuffer(Qt3DCore::QNode *parent = nullptr)

Constructs a new QBuffer with parent.

QByteArray QBuffer::data() const

Returns the data.

See Also

See also setData()

void QBuffer::dataAvailable()

This signal is emitted when data becomes available.

void QBuffer::dataChanged(const QByteArray &bytes)

This signal is emitted with bytes when data changes.

void QBuffer::setData(const QByteArray &bytes)

Sets bytes as data.

See Also

See also data()

void QBuffer::updateData(int offset, const QByteArray &bytes)

Updates the data by replacing it with bytes at offset.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+