diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-05 07:50:58 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-09-07 09:00:27 +0200 |
commit | e5a93d6ea1c9eb9982e98a6a5b1f52719fe446e6 (patch) | |
tree | f7692ce697142ce10a6ebf088aa7bf1e4277a012 /src/declarative/particles/qsgimageparticle.cpp | |
parent | f696ddad0eaab53104f2f2ed85979ecd2c1a9259 (diff) |
Added QSGGeometry::Attribute::isPosition to give a hint about vertex data
Also added a QSGGeomtry::sizeOfIndex() function for convenience
Change-Id: If1f13afd4c1c5295dcfb00254144ef6b8b8b7878
Reviewed-on: http://codereview.qt.nokia.com/4307
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/declarative/particles/qsgimageparticle.cpp')
-rw-r--r-- | src/declarative/particles/qsgimageparticle.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/declarative/particles/qsgimageparticle.cpp b/src/declarative/particles/qsgimageparticle.cpp index 1e410ad1b9..89e9a7db8c 100644 --- a/src/declarative/particles/qsgimageparticle.cpp +++ b/src/declarative/particles/qsgimageparticle.cpp @@ -783,9 +783,9 @@ void QSGImageParticle::createEngine() } static QSGGeometry::Attribute SimpleParticle_Attributes[] = { - { 0, 2, GL_FLOAT }, // Position - { 1, 4, GL_FLOAT }, // Data - { 2, 4, GL_FLOAT } // Vectors + QSGGeometry::Attribute::create(0, 2, GL_FLOAT, true), // Position + QSGGeometry::Attribute::create(1, 4, GL_FLOAT), // Data + QSGGeometry::Attribute::create(2, 4, GL_FLOAT) // Vectors }; static QSGGeometry::AttributeSet SimpleParticle_AttributeSet = @@ -796,10 +796,10 @@ static QSGGeometry::AttributeSet SimpleParticle_AttributeSet = }; static QSGGeometry::Attribute ColoredParticle_Attributes[] = { - { 0, 2, GL_FLOAT }, // Position - { 1, 4, GL_FLOAT }, // Data - { 2, 4, GL_FLOAT }, // Vectors - { 3, 4, GL_UNSIGNED_BYTE }, // Colors + QSGGeometry::Attribute::create(0, 2, GL_FLOAT, true), // Position + QSGGeometry::Attribute::create(1, 4, GL_FLOAT), // Data + QSGGeometry::Attribute::create(2, 4, GL_FLOAT), // Vectors + QSGGeometry::Attribute::create(3, 4, GL_UNSIGNED_BYTE), // Colors }; static QSGGeometry::AttributeSet ColoredParticle_AttributeSet = @@ -810,13 +810,13 @@ static QSGGeometry::AttributeSet ColoredParticle_AttributeSet = }; static QSGGeometry::Attribute DeformableParticle_Attributes[] = { - { 0, 2, GL_FLOAT }, // Position - { 1, 2, GL_FLOAT }, // TexCoord - { 2, 4, GL_FLOAT }, // Data - { 3, 4, GL_FLOAT }, // Vectors - { 4, 4, GL_UNSIGNED_BYTE }, // Colors - { 5, 4, GL_FLOAT }, // DeformationVectors - { 6, 3, GL_FLOAT }, // Rotation + QSGGeometry::Attribute::create(0, 2, GL_FLOAT, true), // Position + QSGGeometry::Attribute::create(1, 2, GL_FLOAT), // TexCoord + QSGGeometry::Attribute::create(2, 4, GL_FLOAT), // Data + QSGGeometry::Attribute::create(3, 4, GL_FLOAT), // Vectors + QSGGeometry::Attribute::create(4, 4, GL_UNSIGNED_BYTE), // Colors + QSGGeometry::Attribute::create(5, 4, GL_FLOAT), // DeformationVectors + QSGGeometry::Attribute::create(6, 3, GL_FLOAT), // Rotation }; static QSGGeometry::AttributeSet DeformableParticle_AttributeSet = @@ -827,14 +827,14 @@ static QSGGeometry::AttributeSet DeformableParticle_AttributeSet = }; static QSGGeometry::Attribute SpriteParticle_Attributes[] = { - { 0, 2, GL_FLOAT }, // Position - { 1, 2, GL_FLOAT }, // TexCoord - { 2, 4, GL_FLOAT }, // Data - { 3, 4, GL_FLOAT }, // Vectors - { 4, 4, GL_UNSIGNED_BYTE }, // Colors - { 5, 4, GL_FLOAT }, // DeformationVectors - { 6, 3, GL_FLOAT }, // Rotation - { 7, 4, GL_FLOAT } // Anim Data + QSGGeometry::Attribute::create(0, 2, GL_FLOAT, true), // Position + QSGGeometry::Attribute::create(1, 2, GL_FLOAT), // TexCoord + QSGGeometry::Attribute::create(2, 4, GL_FLOAT), // Data + QSGGeometry::Attribute::create(3, 4, GL_FLOAT), // Vectors + QSGGeometry::Attribute::create(4, 4, GL_UNSIGNED_BYTE), // Colors + QSGGeometry::Attribute::create(5, 4, GL_FLOAT), // DeformationVectors + QSGGeometry::Attribute::create(6, 3, GL_FLOAT), // Rotation + QSGGeometry::Attribute::create(7, 4, GL_FLOAT) // Anim Data }; static QSGGeometry::AttributeSet SpriteParticle_AttributeSet = |