I'm using the C# bindings and this method is missing in VertexElement class. I've searched for it but I found an old post (https://www.ogre3d.org/addonforums/3/t-2626.html) and it didn't helped me.
Is it the SHAREDPTR issue?
Code: Select all
VertexElement posElem = vertex_data.vertexDeclaration.findElementBySemantic(VertexElementSemantic.VES_POSITION);
HardwareVertexBufferPtr vbuf =vertex_data.vertexBufferBinding.getBuffer(posElem.getSource());
byte* vertex = (byte*)vbuf.lock_(HardwareBuffer.LockOptions.HBL_READ_ONLY);
float* pReal;
for (ulong j = 0; j < vertex_data.vertexCount; ++j, vertex += vbuf.getVertexSize())
{
posElem.BaseVertexPointerToElement(vertex, &pReal); // Missing
Vector3 pt = new Vector3(pReal[0], pReal[1], pReal[2]);
vMeshInf.vertices[current_offset_Vertices + j] = (nodeParentOrientation * (pt * nodeParentScale)) + nodeParentPosition;
}
vbuf.Unlock();