
5 Dec
2006
5 Dec
'06
5:28 a.m.
On 12/4/06, Michael Marcin <mike@mikemarcin.com> wrote:
How about red.xxxw().data()?
Are we just trying to avoid a temporary being made? Even if we manage to hide it behind a member function, a temporary of some sort will still need to be made since it's really a vec4<float &> that's returned, so there's no special knowledge the class has that will enable it to implement data() any better than: float4 white = red.xxxw(); The other option is to remove the write mask functionality and just return a vec4<float> by value, but I really like being able to specify write masks. --Michael Fawcett