Quote:Original post by Claudio
-where the initial vertex data are loaded from the D3DMesh ? with "CreateVertexBuffer" ?
In that code, you have two completely unrelated classes - the vertex buffer, D3DVB and the mesh, D3DMesh. The mesh contains a vertex buffer, which is loaded when the mesh is loaded.
Quote:Original post by Claudio
-are the vertex data contained in "pVertices" at the fine ?!
I don't understand this question, sorry. You're not checking if Lock() succeeds though, so if it's failing, pVertices will be a null or invalid pointer and accessing it will crash your application with an access violation.
Quote:Original post by Claudio
-how can I access to the filed of the final data ? because I can't access to "pVertices" at the same manner of "vertex"
-if I wan't print the data contained in "vertex", I've to use simple "vertex" ? because the pronted data are not correct.
Locking a vertex buffer gives you access to the vertices in that buffer. If you lock a buffer with no flags, then it assumes you want read/write access to it. If you lock a buffer with the D3DLOCK_READONLY flag, you can only read from the buffer and writing to it will in the best case crash, and in the worst case lead to undefined behaviour.
If the contents of the vertex buffer are not as you expect, then you should check that:
1. You're creating the vertex buffer successfully
2. You're locking the vertex buffer successfully
3. That the vertices in the buffer are actually written in at some point
4. That the vertices in the buffer are written in no more than once.