Instead of having pair of functions for depth/stencil and color
attachments this is now solved using specialized class. It is now more
descriptive, as specifying color attachment is now done explicitly using
Framebuffer::ColorAttachment(2) instead of just `2`. Specifying "no
attachment" is now also done explicitly using
Framebuffer::DrawAttachment::None instead of `-1`.
Also updated related documentation.
Framebuffer::attach*() doesn't need the target at all (meaning the
attachment will be used for both reading and drawing), another
misunderstanding on my side.
Now the extension is used on all places where it can be used (except for
unimplemented features).
Viewport position and size is managed separately for each framebuffer
and glViewport() is called in bind() (and also from setViewport(), if
the framebuffer is currently bound) if the viewport differs from
current state. If used only one framebuffer size through whole
application lifetime, glViewport() doesn't need to be called at all.
Default framebuffer is now accessible throught defaultFramebuffer global
variable, named framebuffers are handled the same way as before. All
operations (clear, setViewport, blit, read) now are member functions
so they cannot be mistakenly used when unwanted framebuffer is bound.
Further rework (DSA, state tracking...) is on the way.
Buffered* hinted that it has something to do with caching, streaming or
whatever. "Buffer texture" is now also consistent with naming in
specification.
Some target platforms supply their own OpenGL headers, thus we cannot
use our own from ES 3.0 and compilation fails.
On the other hand, this will be better for users as usage of unsupported
features will be catched right during compilation and not at runtime.
Magnum.h now doesn't include anything except OpenGL headers, thus
changes in Math library don't trigger recompilation of everything, but
only of things really depending on it.
Math constants moved to separate file for similar reasons, de-inlined
some functions to remove the need for some #includes.
Automatic behavior could cause harm, as the stencil/depth test could be
temporarily disabled for some parts of the scene (but enabled for the
rest), causing clear() to leave stencil/depth buffer untouched.
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.
* Framebuffer related functions moved to Framebuffer class, thus
simplifying the data setting functions - removed setDimensions(),
more flexible setData() function.
* Allow to set data with explicit format specification, reorganized
function parameters to make these two setData() more similar.
* Now using new AbstractType::ComponentType enum instead of basic Type,
updated TypeTraits to return the new enum from imageType() function.