OpenGL < 4.0 only supports integer based viewports and internally we
have a mixture of code using floats and integers for viewports. This
patch switches all viewports throughout clutter and cogl to be
represented using floats considering that in the future we may want to
take advantage of floating point viewports with modern hardware/drivers.
Since using addresses that might change is something that finally
the FSF acknowledge as a plausible scenario (after changing address
twice), the license blurb in the source files should use the URI
for getting the license in case the library did not come with it.
Not that URIs cannot possibly change, but at least it's easier to
set up a redirection at the same place.
As a side note: this commit closes the oldes bug in Clutter's bug
report tool.
http://bugzilla.openedhand.com/show_bug.cgi?id=521
The imported Mesa matrix code has some documentation annotations
that make gtk-doc very angry. Since it's all private anyway we
can safely make gtk-doc ignore the offending stuff.
This pulls in code from Mesa to improve our matrix manipulation support. It
includes support for calculating the inverse of matrices based on top of a
matrix categorizing system that allows optimizing certain matrix types.
(the main thing we were after) but also adds some optimisations for
rotations.
Changes compared to the original code from Mesa:
- Coding style is consistent with the rest of Cogl
- Instead of allocating matrix->m and matrix->inv using malloc, our public
CoglMatrix typedef is large enough to directly contain the matrix, its
inverse, a type and a set of flags.
- Instead of having a _math_matrix_analyse which updates the type, flags and
inverse, we have _math_matrix_update_inverse which essentially does the
same thing (internally making use of _math_matrix_update_type_and_flags())
but with additional guards in place to bail out when the inverse matrix is
still valid.
- When initializing a matrix with the identity matrix we don't immediately
initialize the inverse matrix; rather we just set the dirty flag for the
inverse (since it's likely the user won't request the inverse of the
identity matrix)