Vladimír Vondruš
c534a71401
DebugTools: preparation for ability to render also solid shapes.
13 years ago
Vladimír Vondruš
3f696533ff
Math: algorithm for computing intersection of two lines in 2D.
13 years ago
Vladimír Vondruš
6385ae1478
Math: more Intersection test cleanup.
13 years ago
Vladimír Vondruš
fd531b5101
Math: cleaned up plane/line intersection.
...
The function now accepts starting point and direction of the line (not
starting and ending point). Also improved the documentation and test a
bit.
13 years ago
Vladimír Vondruš
00a17e3699
DebugTools: saner default color.
...
Default framebuffer clear color is black, thus having black debug
renderers by default isn't much useful.
13 years ago
Vladimír Vondruš
2a6c52c97b
Platform: fix WindowlessGlxApplication context creation and destruction.
...
The variable wasn't initialized so it exited with assertion failure,
moreover the context wasn't deleted on destruction, causing memory leak.
13 years ago
Vladimír Vondruš
71c7480299
Fixed one-value AbstractShaderProgram::setUniform().
...
The original workaround for enums didn't work (all enums were treated as
UnsignedInt even though they had Int as underlying type), moreover the
solution didn't scale for other possible types with implicit
conversions. Now explicitly listing all scalar types and templated
vectors/matrices, it should work for most cases.
13 years ago
Vladimír Vondruš
70ba2bd77c
Primitives: reworked remaining classes to have the same API as the rest.
...
Now every primitive can be created using `solid()` or `wireframe()`
function returning directly Trade::MeshData.
13 years ago
Vladimír Vondruš
3bf9dbc3f7
Trade: properly implement move constructor and assignment in MeshData.
...
Default implementation of move constructor won't set pointer to indices
to `nullptr` in `other` object, thus implementing it explicitly. Not
sure what will happen in move assignment, implementing it explicitly
too.
13 years ago
Vladimír Vondruš
f0958647c1
Platform: more intuitive argc/argv Arguments structure.
13 years ago
Vladimír Vondruš
61e1ec0082
No need to have `const` also in function declarations.
13 years ago
Vladimír Vondruš
1e383e3d70
Physics: very minor code cleanup.
13 years ago
Vladimír Vondruš
62ecc2470f
Made some constructors constexpr.
13 years ago
Vladimír Vondruš
8923f2debb
Added support for uniform arrays.
...
Also not including Math/Matrix.h in AbstractShaderProgram.cpp and using
just RectangularMatrix everywhere.
13 years ago
Vladimír Vondruš
4ab3ab6534
Math: added Vector::lengthInverted().
...
Also because there are SIMD instructions for that.
13 years ago
Vladimír Vondruš
6124ad3c27
Math: added sqrtInverted() function.
...
There are SIMD instructions for that, so why not have it in place.
13 years ago
Vladimír Vondruš
7c3cb652bd
Math: doc++
13 years ago
Vladimír Vondruš
bf58bb3cb1
Math: rework of component-wise matrix and vector functions.
...
First, removed functions which can be done with Vector's member
functions and functions from Functions.h. More flexibility and less
redundant code which leads to easier SIMD implementation later.
Vector4 a;
Float b = a.maxAbs(); // before
Float b = Math::abs(a).max(); // now
Second, removed all functions from RectangularMatrix which are
implemented in Vector and added conversion from RectangularMatrix to
Vector and back. Also for more flexibility and less redundant code (i.e.
reusing SIMD-optimized Vector::max() instead of writing it again).
Matrix4x3 a;
Float b = a.max(); // before
Float b = a.toVector().max(); // now
13 years ago
Vladimír Vondruš
5a377a568e
Physics: default constructors for shapes.
13 years ago
Vladimír Vondruš
a80b4b146d
Math: write Vector2::cross() in terms of perpendicular() and dot().
13 years ago
Vladimír Vondruš
ef0efecc9c
Platform: fixed Sdl2Application::tryCreateContext().
...
It seems that the context is negotiated when creating the window, thus
it fails there and not later when actually creating the context.
13 years ago
Vladimír Vondruš
bb39338008
Platform: better diagnostic in Sdl2Application::tryCreateContext().
13 years ago
Vladimír Vondruš
49154f30c4
Math: added Vector2::perpendicular().
...
Also updated and crosslinked related documentation.
13 years ago
Vladimír Vondruš
218a4c142c
SceneGraph: fixed Object::setClean().
...
Now also all non-clean parent objects are cleaned.
13 years ago
Vladimír Vondruš
9ecb8b5b8d
SceneGraph: fully test also Object::setClean() for list of objects.
...
The test fails (it doesn't clean parent objects).
13 years ago
Vladimír Vondruš
d85c15bca9
SceneGraph: this was fixed in 59a3a7029d.
13 years ago
Vladimír Vondruš
e69693e87f
Use `std::` prefix everywhere.
13 years ago
Vladimír Vondruš
82ca09a4ed
Minor documentation fixes.
...
It's not needed to have empty `()` after class name in this type
of expressions:
(new Object())
->setFoo(a)
->setBar(b);
13 years ago
Vladimír Vondruš
bba3755da1
GCC 4.8 compilation fixes.
13 years ago
Vladimír Vondruš
fe0f5dc438
Use `nullptr` instead of `0`.
13 years ago
Vladimír Vondruš
b7aeccad4c
Clang compilation fixes.
13 years ago
Vladimír Vondruš
45cbf1669f
DebugTools: 2D and 3D LineSegment support in ShapeRenderer.
13 years ago
Vladimír Vondruš
c4073c0874
Primitives: added 2D/3D Line primitive.
...
No shit. This is usable mainly if some common code expects the
mesh wrapped in MeshData and thus it is better to just have this tiny
class instead of doing it manually.
13 years ago
Vladimír Vondruš
8d5f6037c7
Doc++
13 years ago
Vladimír Vondruš
0cd98456da
Math: Added Vector2::cross().
13 years ago
Vladimír Vondruš
5c89c89ff8
Platform: added window flags to Sdl2Application.
...
Making resizable window the default to be consistent with GLUT and
others.
13 years ago
Vladimír Vondruš
b0883f8d6b
Doc++
13 years ago
Vladimír Vondruš
bda6202d42
Platform: ability to negotiate context in {Glut,NaCl,Sdl2}Application.
13 years ago
Vladimír Vondruš
df5630225d
Platform: minor code cleanup in Sdl2Application.
...
* Explicitly set multisample attributes in all cases (so the attributes
are always properly set when creating another context).
* Do both assign and test in `if` statement.
13 years ago
Vladimír Vondruš
daffbdce0c
Platform: some const fascism.
13 years ago
Vladimír Vondruš
7a12cbe8b1
DebugTools: use proper sphere parameters in ShapeRenderer.
13 years ago
Vladimír Vondruš
5e8606a755
Math: added sign() function.
13 years ago
Vladimír Vondruš
56139ae365
Math: no need to provide implementation just for Doxygen.
13 years ago
Vladimír Vondruš
4000ef571b
DebugTools: support color alpha in ForceRenderer and ShapeRenderer.
13 years ago
Vladimír Vondruš
40a69636bd
Shaders: support color alpha in FlatShader.
13 years ago
Vladimír Vondruš
ad8f35c89e
Platform: multisampling support in NaClApplication.
13 years ago
Vladimír Vondruš
11daec1df6
Platform: forgot to initialize variable. Twice.
13 years ago
Vladimír Vondruš
dfdec44b01
Platform: portable application arguments specification.
...
Last PITA when porting to NaCl removed. Yay!
13 years ago
Vladimír Vondruš
2f4bcd1455
Added files for automatic resource importing from static libraries.
...
Not documented yet, because I am ashamed of this way of doing things.
With shared libraries the resources are imported automatically, with
static ones the user must explicitly include these files in some
non-static library or executable to have them imported.
13 years ago
Vladimír Vondruš
8c75f6e8c2
Expose MAGNUM_BUILD_STATIC in magnumConfigure.h.
13 years ago