
5 Nov
2008
5 Nov
'08
5:42 p.m.
Christophe Riccio wrote:
"Also, I read on your site you require anonymous unions for some things. Why is that?" These could be used but are disabled by default. Half floating numbers have become widely used on GPU first for 64 bits HDR textures and now even for geometry data. This imply that GLM provides vector and matrix types based on half floating point number. However, such type doesn't exist in C++ so GLM provide the a half. This type is used for vectors and matrices of half numbers using a template argument. GLSL specification specify that we can access to a vec4 using x,y,z,w but also r,g,b,a and s,t,p,q. I use union for this.
You could perfectly use member functions, that will only add "()" at the end.