If ARB_invalidate_subdata is not available, these functions do nothing,
instead of crashing on null pointer dereference. It results in more
convenient usage, enabling users to call them whenever they want,
improving performance on implementations which supports that.
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.
Buffered* hinted that it has something to do with caching, streaming or
whatever. "Buffer texture" is now also consistent with naming in
specification.
Now whole Magnum, Magnum::SceneGraph and Magnum::Math namespaces are
fully documented -- each class has at least "getting started"
documentation, larger modules are documented on separate pages.
Allows simple and convenient call with one value for all axes instead of
that unholy mess:
texture.setWrapping(Texture2D::Wrapping::ClampToEdge);
Previous way (for entertainment purposes):
textute.setWrapping(Math::Vector2<Texture2D::Wrapping>(
Texture2D::Wrapping::ClampToEdge));
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
According to OpenGL specification the sampler uniform takes only texture
layer and not any particular texture. In OpenGL 4.2 it is possible to
explicitly specify desired texture layer in the uniform, so I suppose
it's desired to have shader with fixed texture layers and on the other
hand be able to bind texture to any layer, not only one -- the exact
opposite of how it was in Magnum before.
The shader should now specify in its public API which texture is on
which layer and explicitly set the layer uniforms upon construction. All
setUniform() functions taking textures as argument were thus removed, as
they confuse things a lot.
The textures now have bind() function which takes layer as argument, so
it's now sufficient to only bind the texture before drawing the mesh
without messing with sampler uniform.
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.
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.