I have a Mesh
object returned from Mesh::TextFromFont
and I am trying to set the color of each vertex. I am calling the vertex buffer's Lock
function like this:
mesh->VertexBuffer->Lock(0, LockFlags::None);
However, this call throws an exception. Another overload of Lock
seems to work fine, however it requires me to pass the rank of the returned vertex array. What is the solution here? How do I lock the vertex buffer of a mesh returned from TextFromFont
?