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.
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.
Long-standing TODO. It is better to have size first, because it is more
significant than type (e.g. because there are Vector4<T> specializations
and not VectorT<4> specializations). It is also IMHO easier for user to
distinguish/read the type than before:
Vector<float, 4> -> Vector4<float> // before
Vector<4, float> -> Vector4<float> // now
Texture now doesn't have it's own redundant copy of target, but uses the
one from AbstractTexture. Subsequently, all DataHelper functions now
accept "untyped" GLenum as target for better flexibility.
CubeMapTexture is not based on Texture2D anymore, all references to cube
map textures were removed from Target enums, so it's now not possible to
create cube map texture other way than using CubeMapTexture class, which
is how it should be done in first place. The wrapping mode fix is thus
now trivial.
* Added asserts for unsupported mipmap and wrapping modes instead of
previous blind behavior, moved more-than-one-liner functions into
*.cpp
* Updated documentation to reflect the rectangle texture inabilities to
user, changed "unusable" to "incomplete" to be consistent with OpenGL
terminology.
* Removed some unneeded rows in documentation.