for(DWORD i=0; i < pMesh->m_NumMaterials; i++)
{
//set the material and texture
m_pDevice->SetMaterial(&pMesh->m_pMaterialList[i]);
m_pDevice->SetTexture(0,pMesh->m_pTextureList[i]);
//Draw mesh subset
pMesh->m_pMesh->DrawSubset(i);
}
Materials on .x models
For some reason materials arent being shown on my loaded models, does anyone know why?
The materials are actually loaded...ive stepped through in the debugger and drawn as follows
quote:
For some reason materials arent being shown on my loaded models, does anyone know why?
I recommend that you verify that you have lighting enabled and that your light source is pointing at the object. Also, you can verify that your mesh displayable using DirectX Mesh viewer.
Understanding is a three edged sword...
[edited by - Sean Doherty on October 11, 2003 12:13:38 PM]
quote:Original post by Anonymous Poster
You have to copy the ambient colour into the diffuse.
Why do you think that''ll help?
Ambient and diffuse are independent, and .x has capability to store them independently as exported.
-Nik
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement