This will later enable conditional compilation of APIs that depend on
the GL library (for example the Text library directly producing compiled
meshes instead of just plain vertex data).
Minimal updates (just the include guards) so Git is hopefully able to
detect the rename and track the history properly.
Everything except Magnum::GL doesn't compile now.
This was not caught by Travis CI, because there an older CMake version
is used and in that version I'm enabling C because otherwise nothing
works at all.
Sorry.
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.
Currently just does per-pixel comparison and calculates absolute delta,
failing the comparison if max/mean delta threshold is above specified
values. Useful enough for the case I have right now, might fail in other
case -- but still better than whatever else I was using before :)
MeshTools and Shaders dependencies are needed only if either the Shapes
or SceneGraph library is compiled, Primitives are needed only if the
Shapes library is compiled.
I found a way how to hack cmake_dependent_option() beyond just
specifying a list of things AND-ed togeter -- if one uses spaces instead
of `;`, all the contents are passed to a single if() statement and it's
possible to use parentheses, AND, OR and all other stuff.
Now, WindowlessEglApplication is implicitly enabled if targeting
non-desktop ES and magnum-info utility is enabled, because magnum-info
depends on it in that case. In all other cases it is implicitly disabled
with ability to enable it.
WindowlessGlxApplication is now available only when targeting desktop GL
or desktop GLES and is implicitly enabled when magnum-info or any other
GL utility is enabled.
In particular it is now possible to override the MAGNUM_PLUGINS_DIR
variables and even specify them relative, which will make them relative
to executable location.
It's nice when everything clicks together :)
Added a new enabled-by-default BUILD_AL_TESTS CMake option. The test
cases that actually require OpenAL context were split to new tests with
`*ALTest` suffix so they can be executed selectively.
Enabled by default, makes the current Magnum context a thread-local
variable instead of a global one, so it's possible to have multiple
thread-local contexts. Might have some performance implications, that's
why it's possible to disable it (but enabled by default is the safer
option).
GCC 4.7 and Apple platforms don't support thread_local, but __thread
does the job too (though on iOS not until Xcode 7.3). Also had to move
it to file-local because MSVC doesn't like having thread local variables
as part of DLL interface. (And there is *of course* no way to disable
exporting one particular member. F' that.)