   coloring mesh creating with D3DXCreateText
  Hello all,For many hours now I am stuck on the following problem:Drawing white 3D letters is no problem, but I want to give my 3D letters another color than white.I do not want to use lighting or textures, as this will slow down my application because I don't need it in the rest of my application.I use D3DXCreateText to get a mesh.I already tried to get the VertexBuffer of it, but it doesn't seem that it returns the right values. This may be because of the vertex format, but that doesn't seem likely as the size is OK (24 bytes) and if I debug through the vertices, they all seem to have strange values.Does anyone of you guys has an explicit example to create a 3D text with another color than white?This is really driving me nuts.Hope that someone can help me!   
  Cant you create and set a material (D3DMATERIAL9) before rendering?!   ;  No, I already tried that. I tried it once again, both right before invoking D3DXCreateText and before rendering, but it really doesn't work. I think the material doesn't matter because I don't use lighting, therefore I mentioned it at the beginning of my email. I have to mention that I am not very experienced yet with DirectX.I would be grateful if someone can help me.   ;  Oh sorry, you don't want to use lights. Then you should not use materials . . .As the documentation says the D3DXCreateText function returns a mesh with a fvf D3DFVF_XYZ | D3DFVF_NORMAL . Try calling ID3DXMesh::CloneMeshFVF() passing in a fvf code like D3DFVF_XYZ|D3DFVF_DIFFUSE and then lock the vertex buffer of the cloned mesh. Something like this:struct VERTEX{    float x, y, z;    DWORD color;};...//clone the mesh here//textMesh is the mesh create through D3DXCreateText()ID3DXMesh* cloneMesh = 0;textMesh->CloneMeshFVF(D3DXMESH_MANAGED, D3DFVF_XYZ|D3DFVF_DIFFUSE, d3dDevice, &cloneMesh);//now lock the vertex buffer of the cloned meshVERTEX* pv;cloneMesh->LockVertexBuffer(0, (BYTE**)&pv);//set all the colors to some customcolorDWORD numVert = cloneMesh->GetNumVertices();for(DWORD i = 0; i<numVert; ++i)    pv.color = 0xff3f6ba4;//release the textMesh and use the cloneMesh as your text mesh...Well, its pretty much that. You need to convert the vertex format and then just change the colors.   ;  Oh, I'm back here :) just to complete .. . if the casting to BYTE** doesn't work try casting to void**. And don't forget to unlock the vertex buffer of the cloneMesh and release the textMesh in the example above. Hope this helps.   ;  Many thanks!I already noticed and corrected the erroneous cast.B.t.w. I overlooked this thread:http://www.gamedev.net/community/forums/topic.asp?topic_id=251447It is interesting as well.   