+ if(DALI_UNLIKELY(Dali::Shader::GetShaderLanguageVersion() < MINIMUM_SHADER_VERSION_SUPPORT_VERTEX_ID && !raw.mAttribs.empty()))
+ {
+ auto numElements = raw.mAttribs[0].mNumElements;
+
+ // gl_VertexID not support. We should add buffer hard.
+ Property::Map attribMap;
+ attribMap["aVertexID"] = Property::FLOAT;
+
+ VertexBuffer attribBuffer = VertexBuffer::New(attribMap);
+
+ std::vector<uint8_t> buffer(numElements * sizeof(float));
+ auto ids = reinterpret_cast<float*>(buffer.data());
+
+ for(uint32_t i = 0; i < numElements; i++)
+ {
+ ids[i] = static_cast<float>(i);
+ }
+
+ attribBuffer.SetData(buffer.data(), numElements);
+
+ meshGeometry.geometry.AddVertexBuffer(attribBuffer);
+ }
+