From e5a93d6ea1c9eb9982e98a6a5b1f52719fe446e6 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 5 Sep 2011 07:50:58 +0200 Subject: Added QSGGeometry::Attribute::isPosition to give a hint about vertex data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also added a QSGGeomtry::sizeOfIndex() function for convenience Change-Id: If1f13afd4c1c5295dcfb00254144ef6b8b8b7878 Reviewed-on: http://codereview.qt.nokia.com/4307 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- src/declarative/particles/qsgcustomparticle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/declarative/particles/qsgcustomparticle.cpp') 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 = -- cgit v1.2.3