Managed Direct3D: Locking the entire vertex buffer

I have an object Meshreturned from Mesh::TextFromFontand I'm trying to set the color of each vertex. I call the vertex buffer function Lockas follows:

mesh-> VertexBuffer-> Lock (0, LockFlags :: None);

However, this call throws an exception. Another overload Lockseems to work fine, however I need to pass the rank of the returned vertex array. What is the solution here? How to lock vertex buffer of grid returned from TextFromFont?

+3
source share
1 answer

Perhaps the answer could be here :

, , , .

MSDN .

0

Source: https://habr.com/ru/post/1739123/


All Articles