When in 2D mode, I create a quad as the mesh and create a 2D texture, that works fine, when in 3D mode, I create a cube as the mesh and create a cube texture, but I can't see anything in the scene?
Why is that?
any clues?
Thanks
Jack
void TestProceduralTexture::Render()
{
d3d::GetInstance().GetDevice()->SetTransform(D3DTS_WORLD, &m_World);
D3DMATERIAL9 mat;
mat.Ambient = D3DXCOLOR(1.0, 1.0, 1.0, 1.0);
mat.Diffuse = mat.Ambient;
mat.Emissive = mat.Ambient;
mat.Specular = mat.Ambient;
mat.Power = 5.0f;
d3d::GetInstance().GetDevice()->SetMaterial(&mat);
if (m_2D)
{
d3d::GetInstance().GetDevice()->SetTexture(0, m_2DTex);
}
else
{
d3d::GetInstance().GetDevice()->SetTexture(0, m_3DTex);
}
m_mesh->DrawSubset(0);
}
↧