g-truc/glm — pull request #239 by Jaxan (2014-09-19 16:58:04+00:00)
Title: ADL support

We moved from our own math library to glm and noticed some difference. For example we had something like this in our codebase:

```
using vec3 = ourlib::vec3;

vec3 a(1,0,0);
auto b = normalize(a);
```

Note that this works as long as ```normalize``` is defined in the same namespace as the vectortype (this is how ADL works). I was hoping that we could change to glm by just changing the typedefs. However in this case ```normalize``` could not be found, as ```normalize``` is not in the namespace ```glm::detail```.

In order to let this work I made this header (as an extension of course), which injects all glsl functions in the ```glm::detail``` namespace.

Pros:
- Switching between math libraries is easier.
- Still better than ```using namespace glm;```.

Cons:
- Different functions might be called depending on which headers are included.

Fun fact: there is a one-line trick to inject the detail namespace into the glm namespace: http://ideone.com/ZqUiHX (the hack is on line 20). But this is just weird ;).

Any thoughts?