Now it is possible to render without using any Object, Scene or Camera
classes. Framebuffer class now manages features, clearing and setting
viewport. Added position parameter to setViewport(), ability to clear
specified features in clear().
Desktop OpenGL and OpenGL ES 2 support can be switched using CMake
TARGET_GLES option. All functionality not supported in ES is marked in
documentation.
If targetting OpenGL ES, GLES2/gl2.h is included instead of GLEW.
Mesh class now uses VAOs only in desktop OpenGL, in ES the buffers are
bound on each draw call.
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.
Now it is exposed as protected function, so it can be called from
subclasses. It now clears() only set features, so when stencil or depth
test is not enables, it doesn't clear their buffers.
Fixed a few typos in extension names, fixed BPTC texture compression
typos. Removed redundant EXT_framebuffer_object from functions as the
Framebuffer class itself has it.
Reusing macros MAGNUM_EXPORT and friends already used for Windows
builds. For exported classes added MAGNUM_LOCAL to private members which
are not referenced from any inline function. Added explicit
MAGNUM_EXPORT to private members which are referenced. CMake provides
its own macro <target>_EXPORTS, using that instead of
set_target_properties().
* 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.
Object::setClean() now computes absolute transformation while traversing
through object parents and passes it as parameter to clean(), which is
now virtual a meant to be reimplemented instead of setClean().
Updated and greatly improved unit test.
All HTML code and Doxygen shortcuts such as @c, @b and @em are now
rewritten using Markdown syntax, which makes it more readable.
Also updated Doxyfile. Doxygen 1.8 at least is required to generate
the documentation now.
With C++11, objects can be passed nearly as easy as without these
convenience functions, for example:
Matrix4::scaling({0.5f, 1.0f, 0.5f});
which is nearly the same as the following, using convenience function:
Matrix4::scaling(0.5f, 1.0f, 0.5f);
Convenience functions can also be pretty confusing, for example:
Matrix4::rotation(1.0f, -1.0f, 2.0f, 2.0f); // wtf?
Matrix4::rotation(1.0f, {-1.0f, 2.0f, 2.0f}); // ah, okay!
There are also a few neat tricks, which cannot be done using convenience
functions, for example:
Matrix4::translate(Vector3::xAxis(3.0f)); // {3.0f, 0.0f, 0.0f}
Camera::setClearColor({0.1f, 0.1f, 0.1f}); // default 1.0f for alpha
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.