Vladimír Vondruš
4cda770f4f
Physics: fixed cyclic header dependency.
13 years ago
Vladimír Vondruš
29806b9415
Doc++
13 years ago
Vladimír Vondruš
ee73267665
Physics: convenience overload for ObjectShape::setShape().
...
Will allow for more convenient usage of e.g. ShapeGroup operators:
Physics::ObjectShape3D* shape;
shape->setShape(Physics::Sphere3D({}, 0.75f) ||
Physics::AxisAlignedBox3D({}, {3.0f, 1.5f, 2.0f}));
13 years ago
Vladimír Vondruš
5707a138d1
Print also resource key when attempting to overwrite final resource.
13 years ago
Vladimír Vondruš
f8d71941fd
DebugTools: assertions for non-empty resource key when it is needed.
...
Shape renderer can specify empty resource key if index buffer won't be
used.
13 years ago
Vladimír Vondruš
604c5f35ee
DebugTools: oops, swapped order of parameters.
13 years ago
Vladimír Vondruš
540c322f5b
DebugTools: support for Point shape in ShapeRenderer.
13 years ago
Vladimír Vondruš
79f77ca665
DebugTools: added point size to ShapeRendererOptions.
13 years ago
Vladimír Vondruš
cd148cb3ff
Primitives: added crosshair primitive.
13 years ago
Vladimír Vondruš
bdeb1d7ac1
Another #include cleanup.
...
This will break some stuff.
13 years ago
Vladimír Vondruš
6cbf3439c8
Doc++
13 years ago
Vladimír Vondruš
12e539ff12
DebugTools: missing break in switch.
...
I don't know why this didn't crash or fail miserably before.
13 years ago
Vladimír Vondruš
7d830a17aa
DebugTools: simplified and optimized internal shape rendering.
...
All rendering code computed the transformation/projection matrix the
same way, resulting in redundant calculations. Also the
`transformationMatrix` parameter of internal draw() function was never
used.
13 years ago
Vladimír Vondruš
25da008f9b
DebugTools: don't set resource key for unused index buffer for 2D box.
13 years ago
Vladimír Vondruš
4139f70146
DebugTools: minor code cleanup.
13 years ago
Vladimír Vondruš
22750b262d
Minor #include cleanup.
13 years ago
Vladimír Vondruš
99efc0cb62
DebugTools: common mesh building implementation for all shape renderers.
13 years ago
Vladimír Vondruš
96884d5ac7
DebugTools: render also non-axis-aligned boxes with proper size.
...
Yay for this convoluted mess (but hey, it's generic code working for
both 2D and 3D!).
13 years ago
Vladimír Vondruš
377170212c
DebugTools: render boxes with proper size.
...
Cube and Square primitives have 2x2(x2) size, thus to render box with
size 1x1(x1) we have to set scale to 0.5.
13 years ago
Vladimír Vondruš
b69f729e75
SceneGraph: thinko in FeatureGroup destructor.
...
FeatureGroup shouldn't delete the features, as all features are deleted
in Object destructor anyway and no feature can be created without
explicitly attaching it to some Object (and it also cannot be detached).
Moreover, when the group contains two features belogning to one object
and one feature is added using multiple inheritance, on group
destruction the object gets deleted along with the feature, removing
also the other feature, which breaks the for cycle in group destructor.
13 years ago
Vladimír Vondruš
c3bbf03917
DebugTools: using wireframe primitives in ShapeRenderer.
13 years ago
Vladimír Vondruš
0f27fb536f
Primitives: Square can be now solid or wireframe.
13 years ago
Vladimír Vondruš
25b752a311
Primitives: Plane can be now solid or wireframe.
13 years ago
Vladimír Vondruš
ac6182b329
Primitives: Cube can be now solid or wireframe.
13 years ago
Vladimír Vondruš
547c8a24da
Trade: defaulted move constructor/assignment.
...
Hope they will work as expected. Copying is still forbidden, as it
brings serious performance impact for no useful reason.
13 years ago
Vladimír Vondruš
85b715e115
Trade: added forward declaration header.
13 years ago
Vladimír Vondruš
59a3a7029d
SceneGraph: allow duplicate occurences in Object::transformations().
...
Fixes common case where one Object has multiple Drawable features
attached (one for regular mesh and one e.g. debug renderer).
13 years ago
Vladimír Vondruš
b86f107396
SceneGraph: split object transformations test into more functions.
13 years ago
Vladimír Vondruš
177898f93c
SceneGraph: code cleanup, documentation, fixed assertions.
...
The original assertion didn't actually check anything, because the list
was always empty. Moved/copied it to relevant places.
13 years ago
Vladimír Vondruš
2267627242
Text: return rendered rectangle from TextRenderer::render().
13 years ago
Vladimír Vondruš
5e8625bd98
SceneGraph: don't pass duration in Animable constructor.
...
It gets lost in the whole parameter list, using protected function
setDuration() instead. Default is `0.0f`, which means infinite duration.
13 years ago
Vladimír Vondruš
58f936386f
Doc++
13 years ago
Vladimír Vondruš
09b115679b
MeshTools: making use of index range in compressIndices().
13 years ago
Vladimír Vondruš
f07e4743f9
Ability to specify index range in Mesh::setIndexBuffer().
13 years ago
Vladimír Vondruš
d20682f3e5
Mesh: don't allow specifying index data from client memory.
13 years ago
Vladimír Vondruš
a1c37258d6
Added missing const.
13 years ago
Vladimír Vondruš
b9513d28cb
Merged index type setting to Mesh::setIndexBuffer() and added offset.
...
Now addVertexBuffer() etc. and setIndexBuffer() are even more similar.
13 years ago
Vladimír Vondruš
ea2faa91b7
Explicit offset also in Mesh::addVertexBuffer().
...
The offset is present in all other functions, adding it just for
consistency (although it is redundant here).
13 years ago
Vladimír Vondruš
e29b608632
Proper passing of image data to textures.
...
Explicitly unbinding pixel unpack buffer when passing data from client
memory and binding it when passing data from BufferImage.
13 years ago
Vladimír Vondruš
82f3b948af
Trade: debug output for ObjectData*D::InstanceType enum.
13 years ago
Vladimír Vondruš
80661e4e61
Trade: resource names are handled by importer, not *Data classes.
...
In most cases the names aren't even supported/used and thus it is
wasteful to have them in all *Data classes. If the importer wants to
support them, it would reimplement *name() functions instead.
13 years ago
Vladimír Vondruš
0cba8db268
Shaders: added missing 3D version of text shader.
13 years ago
Vladimír Vondruš
55477b98fe
DebugTools: don't use CORRADE_INTERNAL_ASSERT() for user-triggered error.
...
What was I thinking... Also updated the documentation to warn about it.
13 years ago
Vladimír Vondruš
fecb5eec29
DebugTools: simplified renderers example code.
...
ResourceManager::set() can autodetect the type passed and it now has
also more convenient overload.
13 years ago
Vladimír Vondruš
1415f70a7f
Doc++
13 years ago
Vladimír Vondruš
c52f64b381
SceneGraph: testing everything in transformations.
13 years ago
Vladimír Vondruš
64a0645724
DebugTools: ObjectShape must contain shape when creating renderer.
13 years ago
Vladimír Vondruš
dc798b7320
Shaders: added missing 3D version of FlatShader vertex shader.
...
Fragment shader is common for both 2D and 3D.
13 years ago
Vladimír Vondruš
196c68ccf1
DebugTools: added missing 3D alternatives.
...
They are implemented internally, but I somehow forgot to add them to the
switch.
13 years ago
Vladimír Vondruš
389ed07806
SceneGraph: initial per-transformation unit tests.
13 years ago