Implemented aliased attributes support
TRAC #11092
Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@177 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/geometry/VertexDataManager.cpp b/src/libGLESv2/geometry/VertexDataManager.cpp
index 78f1958..4eb6199 100644
--- a/src/libGLESv2/geometry/VertexDataManager.cpp
+++ b/src/libGLESv2/geometry/VertexDataManager.cpp
@@ -70,12 +70,11 @@
 {
     std::bitset<MAX_VERTEX_ATTRIBS> active;
 
-    Program *p = mContext->getCurrentProgram();
+    Program *program = mContext->getCurrentProgram();
 
-    for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++)
+    for (int attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; attributeIndex++)
     {
-        if (p->isActiveAttribute(i))
-            active[i] = true;
+        active[attributeIndex] = (program->getSemanticIndex(attributeIndex) != -1);
     }
 
     return active;
@@ -83,7 +82,6 @@
 
 GLenum VertexDataManager::preRenderValidate(GLint start, GLsizei count,
                                             TranslatedAttribute *outAttribs)
-
 {
     ArrayTranslationHelper translationHelper(start, count);
 
@@ -92,7 +90,6 @@
 
 GLenum VertexDataManager::preRenderValidate(const TranslatedIndexData &indexInfo,
                                             TranslatedAttribute *outAttribs)
-
 {
     IndexedTranslationHelper translationHelper(indexInfo.indices, indexInfo.minIndex, indexInfo.count);