If no DSA is available and element array buffer was bound previously
(e.g. because data were uploaded to it), after binding VAO the binding
point is apparently reset to 0. But our state tracking thinks that the
buffer is still bound and thus doesn't bind it explicitly again when
asked for it. It causes crash in the driver, because it tries to read
from zero adress in client memory instead of bound buffer.
Needs to be solved properly, when I found out an clean solution.
Would cause weird issues with state, it's better to just not allow it
and follow KISS principle than trying to implementing it. Also
crosslinked required function calls in documentation.
* Calling *Mesh::draw() with parameter to start on arbitrary vertex
index might give users more freedom than they want to have (e.g.
lines rendered where gaps should be, broken triangle strips...).
* Single-precision floats have meaningful precision of ~6 decimal
places, everything after that would be random garbage anyway, so we
don't need anything "more precise" for icosphere.
* Texture1D can have only one target and it can be used as framebuffer
target.
* Normalization of e.g. color components passed as unsigned byte to
float values is possible.
* BGRA vector component ordering is possible.
* Proper type checking, allowing only GLSL-equivalent types to be used
as attributes.
* Reverted back to typedef'ing shader attributes, as type conversion
can now be specified in constructor.
* Instead of "binding attributes" the user now "adds vertex buffer". It
corresponds better with what OpenGL itself does.
* Vertex buffers now must be managed by the user.
* Shader attributes are now static const members instead of typedefs to
allow more convenient add*VertexBuffer*() calls.
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.
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.
* 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.
* Renamed Type enum to Target to be consistent with OpenGL naming
* Strongly typed enums
* Ability to specify different type when binding/setting data
* Added missing buffer targets