The only places where they aren't absolute are:
- when header is included from corresponding source file
- when including headers which are not part of final installation (e.g.
test-specific configuration, headers from Implementation/)
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.
Calling functions directly on Object will result in non-virtual calls,
calling functions on AbstractObject will result in virtual calls. Also
removed now unneeded "hacks" like `sceneObject()` and properly hiding
unsafe functions taking `AbstractObject*` with safe functions taking
`Object*`. Also hide `isScene()` from public documentation, as it is
sort-of hack too.
It prevents unwanted implicit conversions from e.g. nullptr to Camera,
Vector2 to Physics::Point etc. By making all the constructors explicit
it is easier to routinely add the keyword to all new classes instead of
thinking about cases when to add and when not to.
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.