Vladimír Vondruš
ba0f56fa51
No need to use Double type in tests so extensively.
...
Makes porting to OpenGL ES easier.
13 years ago
Vladimír Vondruš
7b140db3ed
Properly test swizzle() constexpr.
...
Removed constExpressions() test case and merged it to others, reducing
duplicate code.
13 years ago
Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
231f3277ab
Adapted to Corrade changes.
...
Allowing to instantiate Trade::AbstractImporter subclasses directly
without plugin manager.
13 years ago
Vladimír Vondruš
2d2d1c07f4
Using new type aliases in whole root Magnum namespace.
13 years ago
Vladimír Vondruš
fcb8a7b768
Got rid of header files in tests.
...
They have no practical use and they only bloat codebase size and add
maintenance burden.
14 years ago
Vladimír Vondruš
ef779e50b2
Split out lightweight base of swizzle() function to Math namespace.
...
Will make use of SIMD instructions and can be used elsewhere in Math.
14 years ago
Vladimír Vondruš
dd8eb6bc02
Removed one swizzle() overload.
...
It is less efficient because of all that runtime computation and can't
be made to use SIMD operations so why bother with it at all.
14 years ago
Vladimír Vondruš
0f889369f4
No `using namespace std` anywhere.
...
Also added missing std:: prefix to remaining cases of std::size_t,
std::[u]int[0-9]+_t, std::sin() etc., std::exit().
14 years ago
Vladimír Vondruš
43f6dbc72d
Using integer vector aliases all over the place.
14 years ago
Vladimír Vondruš
c1cf94fb46
Using fixed-size integer types also everywhere else.
...
It solves issues with int/long int/long long int ambiguity, which is
good.
14 years ago
Vladimír Vondruš
949b092a60
Support for '0' and '1' constants in swizzle() functions.
...
Also deconfused related documentation a bit.
14 years ago
Vladimír Vondruš
4d46fd12cf
Returning references from vector component accessors.
...
Before it has to be done with overly verbose and cumbersome Java-style:
Vector4 vec;
vec.setX(vec.x() + 5);
vec = Vector4(vec.xyz()*2, vec.w());
Now it can be done this way:
vec.x() += 5;
vec.xyz() *= 2;
14 years ago
Vladimír Vondruš
fa774370aa
GCC 4.6 doesn't support template aliases.
14 years ago
Vladimír Vondruš
0177ec8b5d
Moved swizzle() functions to root namespace.
...
They aren't much useful in Math namespace and here it allows to handle
also Color3/Color4 types. Moreover all RGBA component names were removed
from Math namespace, so it would be inconsistent to have them there only
in swizzle() functions.
14 years ago
Vladimír Vondruš
c23022d47f
Another, more convenient way to swizzle.
...
On the other hand everything of this is done at runtime, so it's less
performant than the previous version, mainly when used in loops. When
the result is declared as constexpr, it is done at compile time, just
like the previous version.
I don't know which version to keep, so there will be both until a good
decision.
14 years ago
Vladimír Vondruš
fff22d0822
New function for vector component swizzling.
14 years ago