Code: Select all
Ogre::Vector3* vertices;
...
vertices = new Ogre::Vector3[vertex_data->vertexCount];
...
for (size_t j = 0; j < vertex_data->vertexCount; ++j, vertex += vbuf->getVertexSize())
{
...
vertices[current_offset + j] = (orient * (pt * scale)) + position;
}
...
vbuf->writeData(0, vertex_count, vertices, true);
The code compiles fine but obviously there is only 1 triangle rendered. The iterator runs as expected, and j iterates, in this case vertexCount is 72.
Has anyone run into a similar problem? Any help would be much appreciated.