Materials

Kwang1imsa

15-03-2011 18:26:40

How do we apply materials to an object in MOGRE?
Is ent.GetSubEntity(0).SetMaterialName("wire.material"); incorrect?

Jo0oker

15-03-2011 21:00:30

Why do you use "GetSubEntity", or do you don't want to applay the material to the howle Enity?

If you want to applay the material to the howle Enity, use: ent.SetMaterialName("wire.material");

Greets,
Jo0oker

smiley80

16-03-2011 08:35:31

Also, "wire.material" looks like a filename, but you have to use the name of the material instead.
I.e. the string after 'material', e.g.:
material RedQuad
{
technique
{
pass
{
[...]