In a mesh you have a Vertex Buffer and an Index Buffer
Each vertex in the Buffer is defined with a FVF (flexible vertex format)
So sometime you only have x,y,z value
Most of the time it comes with u,v value for the texture coordinate
and with a color value (diffuse color)
Some time you get a normal vector also
You need to know the FVF of your mesh
Then when you lock a pointer to the buffer you can use your structure to access Those value and set them
struct MyStructFVF{
float x,y,z;
float u,v;
}
MyStructFVF myBuffer;
Lock this ptr on your vertex buffer and you can access each vertex to change u,v
coordinate for the texture...
|