It seems like a bad idea, but it will:
* Improve portability, as `Int` will be always 32bit.
* Improve readability, as `std::int32_t` is just plain ugly and too
complicated to write.
* Improve consistency and reduce confusion, as it's not good to mix
`int`, `std::int32_t`, `GLint`, `khronos_int_t` and whatnot in one
codebase.
* Possibly reduce compilation time, because including all ~35k lines
worth of GL headers just for one GLfloat typedef is even worse than
now forbidden #include <iostream> in headers.
The library uses FreeType for glyph pre-rendering and basic glyph
geometry and HarfBuzz for text layouting (i.e. ligatures, kerning, ...).
Currently all used glyphs must be prerendered into texture atlas, other
glyphs are simply not rendered (although the layouting code handles them
like if they are there).
Text rendering supports UTF-8, although glyph pre-rendering is currently
ASCII only, as I couldn't find any working implementation of Unicode
STL function in recent GCC versions. Will be fixed later.
* The light didn't catch camera transformation changes, so it was
returning wrong position for most of the time.
* The multiplication was in wrong order, it should be multiplied with
camera matrix from the left.
I need to find an solution for this, because now it is one redundant
matrix*vector multiplication per object per frame again.
This reverts commit 0443bbe286.
Conflicts:
src/Light.cpp
src/Test/LightTest.cpp
Object::setClean() now computes absolute transformation while traversing
through object parents and passes it as parameter to clean(), which is
now virtual a meant to be reimplemented instead of setClean().
Updated and greatly improved unit test.
Saves one matrix*vector multiplication per object per frame. The
position can be now Vector3 like before, because it won't be multiplied
with anything on draw call. Added unit test.
Removed functions at(), set() and add(), everything (and more) can be
now done using operator[]. Accessing matrix elements is now done through
column vectors, e.g.:
Matrix4 a;
a.at(row, col); // before
a[col][row]; // now
Note that because operator[] on Matrix returns column vector (there is
nothing like row vector), the parameter "order" is now swapped.
It was overengineered and unnecessarily complicated. Now the camera is
specified only in Scene::draw(), which eliminates all the needs for
recalculating absolute object transformations on each camera
transformation change. Absolute object transformation is now computed
relative to root object or relative to camera object passed as
parameter. Because of that it is now also possible to draw the scene
using multiple cameras at once.