Defines common attributes which are shared by majority of the shaders,
allowing mesh to be configured for the generic shader to be used with any
of them.
Unlike Matrix3/Matrix4 these don't have any transformation-related
functions. Deprecated the old Matrix2 typedef, which is now replaced
with Matrix2x2 and will be removed in future release.
The geometry shader implementation somehow expects GLSL 1.50 and is not
working on GLSL 1.40 (probably inconsistent variable naming in
extension and core specification). Added checks for that. Might fix this
properly someday when there is need for geometry shader in GL 3.1.
Even if the extension specification describes the minimum required
version as GL 2.1 (or doesn't mention it at all), most compilers can't
handle `layout(...)` before input/output declaration. These drivers mark
the extensions as supported on GL < 3.1, but then can't handle them at
all: Mesa fails to compile it with GLSL 1.20, NVidia fails with GLSL
1.30.
Also updated `EXPLICIT_*` defines in Shaders/compatibility.glsl to
reflect this change.
In 1.8.5 it is now possible to reference directly to enum member.
Hooray! Also added explicit @ref here and there, fixing some referencing
bugs along the way.
Makes some cases less consistent (and some convenience shortcuts
impossible), but goes well with the attitude "don't use pointer when it
can't be null".
Currently the most used scene graph transformation implementation are
dual quaternions, which don't allow any scaling. The original code
normalized the rotation matrix, involving three dot products and one
sqrt, even if it wasn't needed in most cases -- even if using scene
graph with matrices mostly you don't scale at all and thus the shader
internally renormalized already normalized vectors for _each object_ in
each frame.
This _will_ break things, don't forget to update the code and call
`setNormalMatrix()` along with `setTransformationMatrix()`.
Inspired in STL, base templated class is renamed to BasicColor{3,4} and
typedef'd with Float type to Color{3, 4}. It is much nicer to write
this:
Color3(1.0f)
Color3::fromHSV(25.0_degf, 0.5f, 0.9f);
instead of this:
Color3<>(1.0f);
Color3<>::fromHSV(25.0_degf, 0.5f, 0.9f);
1.0 is taken as shape center (white), 0.0 as shape surroundings (black).
It was unintuitive to have it reverted, updated documentation to make it
right.