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/qsgcustomparticle.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/qsgcustomparticle.cpp')
-rw-r--r-- | src/declarative/particles/qsgcustomparticle.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/particles/qsgcustomparticle.cpp b/src/declarative/particles/qsgcustomparticle.cpp index 373d050627..eb6f45e2f0 100644 --- a/src/declarative/particles/qsgcustomparticle.cpp +++ b/src/declarative/particles/qsgcustomparticle.cpp @@ -83,11 +83,11 @@ static const char qt_particles_default_fragment_code[] =//TODO: Default frag req "}"; static QSGGeometry::Attribute PlainParticle_Attributes[] = { - { 0, 2, GL_FLOAT }, // Position - { 1, 2, GL_FLOAT }, // TexCoord - { 2, 4, GL_FLOAT }, // Data - { 3, 4, GL_FLOAT }, // Vectors - { 4, 1, GL_FLOAT } // r + 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, 1, GL_FLOAT) // r }; static QSGGeometry::AttributeSet PlainParticle_AttributeSet = |