How to initialize static array member variable?

Frank Miller frankmiller at jhmi.edu
Fri Oct 1 13:04:58 PDT 2010


> What would swizzled setters look like?
> 
> vec.yx = vec.xy ?

Yes.

> vec.xy = [1,0] ?

Maybe. Or like

vec.xy = Vector!2(1,0);

> vec.xxx = [0,1,2];

No. To be an lvalue the swizzling must not contain duplicate components.

For more information see p65 in the GLSL Spec.

http://www.opengl.org/registry/doc/GLSLangSpec.4.00.8.clean.pdf

Frank





More information about the Digitalmars-d-learn mailing list