White material components

1 view
Skip to first unread message

Intercyber

unread,
Jun 22, 2009, 4:33:22 AM6/22/09
to G3D Users
Hi,

I've been having a problem whereby I cannot change a Material's
component constant _from_ white and I've modified
Material::Component::similarTo() to fix this by changing the final
return to check the constant:

// Two components are similar if they both have/do not have texture
// maps and constants.
return map.isNull() == other.map.isNull() &&
constant == other.constant;

This works for me but I guess it would also be possible to change
Material::isWhite() to not include the null map condition in the same
way as isBlack(). I'm not sure of the implications of that though.

---
Martin Pitt
http://hothouse3d.com

Morgan McGuire

unread,
Jun 22, 2009, 10:35:47 AM6/22/09
to g3d-...@googlegroups.com
Hi Martin,

Thanks.  Is this in G3D 7.01 or 8.0 beta?

-m

Intercyber

unread,
Jun 22, 2009, 10:50:00 AM6/22/09
to G3D Users
This is in 7.01, although I'm looking forwards to playing with 8.0
once it's released.

Morgan McGuire

unread,
Jun 22, 2009, 10:50:53 AM6/22/09
to g3d-...@googlegroups.com
We're going to put out a beta in a few days.  The Material::Component class was completely rewritten and fixes a lot of little bugs like this.

-m

Intercyber

unread,
Jun 22, 2009, 11:05:42 AM6/22/09
to G3D Users

As soon as it's out I'll give it a go and let you know whether it's
still a problem.
Thanks a lot.
Reply all
Reply to author
Forward
0 new messages