Everything what was in src/ is now in src/Corrade, everything from
src/Plugins is now in src/MagnumPlugins, everything from external/ is in
src/MagnumExternal. Added new CMakeLists.txt file and updated the other
ones for the moves, no other change was made. If MAGNUM_BUILD_DEPRECATED
is set, everything compiles and installs like previously except for the
plugins, which are now in MagnumPlugins and not in Magnum/Plugins.
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.
Use AbstractFeature<dimensions, T>, AbstractGroupedFeature<...>,
AbstractFeatureGroup<...>, FeatureGroup<...> like before and add two
kinds of aliases instead of only one, one with *Basic* for abstract type
and one for Float type.
Partially reverts commit 572efce3f7.
Use AbstractObject<dimensions, T> like before and add two kinds of
aliases instead of only one:
AbstractBasicObject2D<T>/AbstractBasicObject3D<T> for abstract type and
AbstractObject2D/AbstractObject2D for Float.
Makes it easier to use AbstractObject in templates of fixed dimensions
(e.g. Bullet integration, where it can now be written as
`AbstractBasicObject2D<btScalar>` instead of potentially confusing
`AbstractBasicObject<2, btScalar>`).
Partially reverts commit cfd405c32c.
Constructor, destructor and all virtual functions are moved into
implementation file, so they don't need to be recreated and add into
binary on every usage. Should save a bit on resulting file size.
Created less-templated base for FeatureGroup and moved its
implementation into *.hpp file, allowing to remove <algorithm> header
from FeatureGroup.h (and meanwhile removing forgotten one also from
AbstractGroupedFeature.h). Saved another ~10 seconds of compilation time
(previously ~4:21, now ~4:11).
Functionality present in Object is now split into three main components:
* Object itself, handling parent/children relationships
* Transformation implementation and interfaces for common functionality
* Object features, providing transformation caching and base for
cameras, collision shapes, rigid bodies etc.
Some functionality depending on former implementation is temporarily
disabled and will be reworked later.
Previously the scene was its own parent, which was good sometimes back
then, but it became so ugly and complicated hack ("my friend has access
to my privates"-style) that it needed to be replaced with something less
ugly.
Now there is an function isScene() which is overloaded in Scene. Yes,
it's possible to overload it anywhere else, but you better shouldn't
even think about it.
It only caused another maintenance burden and was confusing to users.
Now when scene graph is in SceneGraph namespace there is no need for
another grouping. Namespaces are (and should be) sufficient.
This reverts commit 79945ab6fc.
Conflicts:
src/BufferedImage.h
src/BufferedTexture.h
src/Framebuffer.h
src/Query.h
src/SceneGraph/Scene.h
While namespaces act for hierarchy, modules are something like "tags" -
usable when you want to check related classes of e.g. CubeMapTexture.
Not sure how to name module for Math and Physics namespaces and
Contexts/Trade, though.
* Moved the enum and setter function to Camera, made it static, because
it doesn't depend on any particular scene and is camera (rendering)
related.
* Function features() didn't actually work, because setFeature() didn't
update private variable at all. Removed it altogether, because the
values are not stored anywhere, the enum now holds right values
(GL_*), which makes setFeature() function so much simpler.
* Scene class now doesn't have any non-inline functions, removed *.cpp.
* All attribute pointers and buffer binding is now stored in each
mesh own vertex array object, thus each mesh drawing now needs
only three OpenGL calls.
* Removed default VAO from Scene, which fixes unit test crashes.
Improved parenting test, added test for transformation. Moved deleted
functions to public section, so the compiler prints error about deleted
functions, not about private functions.
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.
According to OpenGL specifications no default VAO is bound
automatically, so without that it shouldn't work. The reason why it was
working for me on NVidia was a driver bug, which is now fixed in recent
drivers (280.xx, maybe) if using Core OpenGL.