Add material definition
This commit is contained in:
@@ -24,6 +24,16 @@ void Material::render(IDirect3DDevice9* pD3DDevice)
|
|||||||
pD3DDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
pD3DDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
||||||
pD3DDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
|
pD3DDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);
|
||||||
pD3DDevice->SetSamplerState(0, D3DSAMP_MAXMIPLEVEL, 0);
|
pD3DDevice->SetSamplerState(0, D3DSAMP_MAXMIPLEVEL, 0);
|
||||||
|
|
||||||
|
// set material
|
||||||
|
D3DMATERIAL9 material = {};
|
||||||
|
material.Ambient = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
|
material.Diffuse = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
|
material.Specular = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
|
material.Power = 100.0f;
|
||||||
|
material.Emissive = { 1.0f, 0.0f, 0.0f, 1.0f };
|
||||||
|
|
||||||
|
pD3DDevice->SetMaterial(&material);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Material::deInit()
|
void Material::deInit()
|
||||||
|
|||||||
Reference in New Issue
Block a user