Followup to previous commit -- links to opengl.org are now redirected to
khronos.org and the extension links have the same format for both GL and
GLES. That allows me to remove some of the Doxygen aliases and use just
a single set of the functions for both GL and GLES.
In order to have a seamless transition for all the plugins and potential
user code the original constructor was marked as deprecated and there is
a new constructor taking also the colors.
There will be numerous additions to this one so it made sense to make it
a static library instead of a header-only library. That also allows
CMake users to just link to Magnum::OpenGLTester instead of going
through the pain of a huge branching in order to find a correct
windowless application just to run their tests. It could have been done
even without the static library using a INTERFACE target, but that
wouldn't work on CMake < 3.0 (which, unfortunately, quite a few people
are still stuck with).
Unfortunately it's already heavily used elsewhere so I had to go through
the pain of deprecating the old implementation. The old implementation
was header-only so it can't be just typedef'd to the new one as there
would be linker failures. So the old header is just kept as it was, with
only the macros reduced.
The string stream solution that was used in case of NaCl and Android
wasn't working at all, thus I discarded it in favor of less overhead-y C
functions. While strtoul() and others *are* defined in the std::
namespace, strtof() isn't. What a pile of crap. I also had to emulate
C++ exception behavior in order to match the std::stoul() and
std::stof() behavior.
This plugin needs a zero-copy rewrite anyway, but at least the test is
green now on all platforms.
I discarded the NaCl version because currently there's no toolchain for
it and I'm not going to guess whether stof() and friends are even there.
If they are, then it's just a matter of enabling the Android code path
also for NaCl.
As with Corrade, this is not exactly backwards compatible, but for
common use case without OBJECT libraries this should not be a problem.
In any case, recreate the build dir and update your copy of all
Find*.cmake modules to avoid weird things happening.
User-facing changes:
* Documentation of all Find*.cmake modules converted to
reStructuredText to follow official CMake guidelines.
* The newfangled way to use the libraries is to link to Magnum::Shaders
instead of adding ${MAGNUM_SHADERS_INCLUDE_DIRS} to include path and
linking to ${MAGNUM_SHADERS_LIBRARIES}.
* The old ${MAGNUM_*_LIBRARIES} are deprecated and now just expand to
Magnum::* target. Use the target directly. These are also enabled
only when building with MAGNUM_BUILD_DEPRECATED.
* The old ${MAGNUM_*_INCLUDE_DIRS} are removed as the Magnum::* targets
cover these too.
Internal changes:
* Global state such as include_directories() was replaced with
target-specific settings.
103% of use cases use the returned value directly without checking, so
we might as well do the check ourselves. Added new function hasCurrent()
and added deprecated backward-compatibility conversion and -> operators.
Wow, that creeped to a lot of places.
Last dinosaur from the pointer age.
In the particular case of AnyImageConverter the function needs to access
manager and load/instantiate plugin using it, which is non-const
operation. More generally, it puts unnecessary restrictions on what the
plugin can and cannot do.
I would set the alignment to 1 every time, but 99% of image data has sane
dimensions and this would only bring needless state changes.
Note that this setting is not yet respected when uploading the texture
data, that will be done in later "pixel storage support" commits.