Vladimír Vondruš
1697f459a9
GCC 4.4 compatibility: copy constructor ambiguity in matrix/vector classes.
...
Our own "copy" constructor accepting base class conflicts with the
default one, which for some reason gets added too. Newer versions don't
have this issue.
13 years ago
Vladimír Vondruš
541e5e0d83
Merge branch 'master' into compatibility
13 years ago
Vladimír Vondruš
a4bd5b8aa8
Added thoughts about unit tests to Coding Style.
13 years ago
Vladimír Vondruš
59808c364e
Math: minor test code reorganization.
13 years ago
Vladimír Vondruš
bd00adc437
Math: test copy construction from base classes.
...
Copy construction from the same class should just work.
13 years ago
Vladimír Vondruš
7427292173
Math: test "implicitness" of value constructors.
13 years ago
Vladimír Vondruš
8669907346
Math: merge constexpr test of BoolVector into other test cases.
13 years ago
Vladimír Vondruš
bcdd0920fd
Trade: no comma at the end of enumeration list.
...
It visually punishes me.
13 years ago
Vladimír Vondruš
fe243504a7
GCC 4.4 compatibility: cannot default some move constructors.
...
I don't know why.
13 years ago
Vladimír Vondruš
9d0c6b44de
GCC 4.5 compatibility: no unrestricted unions.
13 years ago
Vladimír Vondruš
115e73f967
GCC 4.5 compatibility: cannot default some move operators.
...
I don't know why.
13 years ago
Vladimír Vondruš
22355a6e7d
GCC 4.5 compatibility: cannot default protected members in class body.
13 years ago
Vladimír Vondruš
8410de02cb
Merge branch 'master' into compatibility
...
Conflicts:
src/AbstractFramebuffer.h
src/AbstractImage.h
src/AbstractTexture.cpp
src/DebugTools/ShapeRenderer.cpp
src/Primitives/Icosphere.cpp
src/Primitives/Icosphere.h
src/ResourceManager.h
src/SceneGraph/AbstractFeature.hpp
src/SceneGraph/AbstractTransformation.h
src/SceneGraph/FeatureGroup.h
src/SceneGraph/FeatureGroup.hpp
src/Shader.cpp
src/Shapes/Implementation/CollisionDispatch.cpp
src/Text/AbstractFontConverter.cpp
13 years ago
Vladimír Vondruš
1102232a24
GCC 4.6 compatibility: no delegating constructors.
13 years ago
Vladimír Vondruš
7eec63afd0
Build fix.
...
I have NO IDEA how this did compile and work.
13 years ago
Vladimír Vondruš
41fd952e4a
OpenGL ES build fixes.
13 years ago
Vladimír Vondruš
2287e3d73e
Doc++
13 years ago
Vladimír Vondruš
6ff4b06095
SceneGraph: add just-to-be-sure assertion.
...
Now we have references all over the place, let's trust pointers even
less.
13 years ago
Vladimír Vondruš
d44f6ee94e
Add pointer conversion operator to Resource.
...
Unlike reference conversion this doesn't fire assertion when resource is
not loaded.
13 years ago
Vladimír Vondruš
a962262b61
Reducing pointer chasings, part 3g: less pointer passing in Text.
...
The testing is now slightly more sloppy due to inability to not pass any
Font or GlyphCache object. But it is actually better from user point of
view, as it is now impossible to do that by accident.
13 years ago
Vladimír Vondruš
8a8b9aca5e
Reducing pointer chasings, part 3f: less pointer passing in TextureTools.
13 years ago
Vladimír Vondruš
141a3df456
Reducing pointer chasings, part 3e: less pointer passing in DebugTools.
...
In most cases just adapted to changes in root namespace and SceneGraph.
ForceRenderer now takes const reference to force vector and additionally
disallows passing rvalue to it.
13 years ago
Vladimír Vondruš
f669dd7c23
Reducing pointer chasings, part 3d: less pointer passing in Shapes.
...
Mostly just adapted to SceneGraph changes, functions not expecting
nullptr are now taking/returning reference.
13 years ago
Vladimír Vondruš
0d3bfd4044
Reducing pointer chasings, part 3c: less pointer passing in SceneGraph.
...
Main change is that features take reference to containing object instead
of pointer, as the feature must always belong to some object. Feature
groups now return references to features and features return reference
to containing object, as these cannot be null.
Passing `*this` to AbstractFeature (and Camera[23]D) constructor might
now clash with deleted copy constructor, added templated constructor to
catch and resolve these ambiguous cases.
13 years ago
Vladimír Vondruš
2ea5b4c9ce
Reducing pointer chasings, part 3b: less pointer passing in MeshTools.
...
MeshTools::interleave() might cause porting problems, as the error is
now much more verbose if you accidentally pass Mesh* instead of Mesh&.
13 years ago
Vladimír Vondruš
e19154be5e
Reducing pointer chasings, part 3a: less pointer passing in root namespace.
...
Passing pointer as function parameter will now mean that it is possible
to pass `nullptr`. Some code examples now look like the parameter is
copied instead of referenced, which is misleading. Updated the
documentation to reflect that more clearly.
13 years ago
Vladimír Vondruš
845b8982e5
Reducing pointer chasings, part 2: don't use `this->` so often.
...
It clarifies some things (e.g. from what base given member is). Not
changed where it would be too long to write.
13 years ago
Vladimír Vondruš
d04b308aa3
Reducing pointer chasings, part 1: method chaining via references.
...
Makes some cases less consistent (and some convenience shortcuts
impossible), but goes well with the attitude "don't use pointer when it
can't be null".
13 years ago
Vladimír Vondruš
c3a5c77f1c
Documentation clarification and fixes.
13 years ago
Vladimír Vondruš
41f7784dc5
Shaders: ambient, diffuse and specular texture support in Phong.
13 years ago
Vladimír Vondruš
7b497160cb
Added TODO.
13 years ago
Vladimír Vondruš
546ce9d613
Minor cleanup.
13 years ago
Vladimír Vondruš
f3b6abc997
Minor documentation fix.
13 years ago
Vladimír Vondruš
a65cef08cd
MeshTools: added TODO.
13 years ago
Vladimír Vondruš
8afb661f6d
Ability to retrieve first two components from Array3D.
13 years ago
Vladimír Vondruš
62bc46ea78
Various Array-related cleanup.
13 years ago
Vladimír Vondruš
de96fad678
Constexpr Array from one value constructor, improved test.
...
Merged constexpr test cases into other ones to remove duplicate code.
Copied the constructors from Math::Vector as I don't feel reinventing
all that again.
13 years ago
Vladimír Vondruš
261e7cbdc5
Trade: improved documentation, removed redundancy.
13 years ago
Vladimír Vondruš
4937b51713
Trade: use instance() instead of instanceId() for consistency.
...
Nowhere else is `Id` suffix.
13 years ago
Vladimír Vondruš
c1c4788e88
Ability to force cleanup of ResourceManager.
...
Assumes that no resources of given type are referenced. The test case
for this is awful, as I can't think of a way to test which would work
without trying to decrement reference counter on already deleted
resource. Added just-to-be-sure assertion to make it fail early and not
somewhere deep in STL.
13 years ago
Vladimír Vondruš
a31badc570
Minor cleanup in ResourceManagerTest.
13 years ago
Vladimír Vondruš
b32c39aa44
Added convience AbstractResourceLoader::set() overload.
...
Similar to ResourceManager::set() one.
13 years ago
Vladimír Vondruš
655f069221
Simplified ResourceManager::set() convenience function.
13 years ago
Vladimír Vondruš
8bce5114da
Deleting all resource loaders before unloading any resource data.
...
Previously was done per type (i.e. for each type delete loader and then
the data), wasn't usable when the loader stored different resource type
(which is the only case where it is useful).
13 years ago
Vladimír Vondruš
b7bcf0dc59
Simplified internal ResourceManager::free() implementation.
...
No need to explicitly create all the pointers and then juggle with
`std::common_type<>` and whatnot.
13 years ago
Vladimír Vondruš
26504480b2
Test whole AbstractResourceLoader API.
13 years ago
Vladimír Vondruš
77dca430c3
Make virtual AbstractResourceLoader functions private.
...
Removes the need to call AbstractResourceLoader::load() from
reimplementation.
13 years ago
Vladimír Vondruš
92e7797823
Fix example code in documentation, added TODO.
13 years ago
Vladimír Vondruš
091efebaa1
Make explicit `std::hash` specialization for ResourceKey.
...
Allows users to use ResourceKey in `std::unordered_map` more
conveniently.
13 years ago
Vladimír Vondruš
8a2d769dd1
Added some C++14 TODOs.
13 years ago