   Texture problem..
  ..when rendering a 3DXMESH and an indexed primitive. If I just render the indexed primitive then it renders fine and the texture is correct. If I then render the 3DXMESH as well as the indexed primitive, then the indexed primitive texture is all messed up. Anybody have any ideas?Thanks in advanceHund 
  did you remember to set the texture for the indexed primitive after you rendered the mesh?   Get busy livin'' or get busy dyin''... - Shawshank RedemptionAltered Vision;  I did do that Syrillix. The problem was that I had to convert the D3DXMESH to correspond to my FVF of the indexed primitive.HOWEVER  Although the indexed primitive is rendering together with the mesh I still have a problem.With full abient light all textures are displayed correctly. However, when I just use D3DLIGHT_POINT sources, the Indexed primitive renders fine with lighting on the textures but the D3DXMESH is black. I have tried :- D3DXComputeNormals (pOriginalMesh, NULL );after the CloneMeshFVF but it still doesn''t work.Am I correct in thinking that if the MESH displays under full ambient then the normals are OK? I would appreciate any help you can give.;quote:Original post by hund   With full abient light all textures are displayed correctly. However, when I just use D3DLIGHT_POINT sources, the Indexed primitive renders fine with lighting on the textures but the D3DXMESH is black. I have tried :- D3DXComputeNormals (pOriginalMesh, NULL );after the CloneMeshFVF but it still doesn't work.D3DXComputeNormals works if your mesh FVF has a D3DFVF_NORMAL in it. Be sure to specify that when you clone the original mesh.If you did, and it still doesn't work, then you've got something else wrong.- Link "d3dx9d.lib"- Check all HRESULTs- Build a debug version- Switch to the debug Direct3D runtime from the control panel- Run it and watch the debug output- Run it on REFquote:Am I correct in thinking that if the MESH displays under full ambient then the normals are OK? No, normals have nothing to do with ambient light.Peace,Muhammad Haggag   [edited by - Coder on August 4, 2003 8:25:39 AM]