Split off of #560, because it uncovered a deeper problem in how *TestLib libraries are built.
FooTestLib is mostly the same as Foo, except that it has CORRADE_GRACEFUL_ASSERT defined in order to be able to test assertion messages -- then an assert won't abort, but instead gracefully return, allowing the message to be captured.
MagnumGL has a global "current context" pointer, and then there's MagnumGLTestLib which has also a global "current context" pointer. To avoid having two copies of the same, a GL test should then link to either one or the other and never both.
To avoid duplication, there's also MagnumOpenGLTesterTestLib, which links to MagnumGLTestLib instead of MagnumGL. Unfortunately it does so only on Windows, which has to be fixed.
And because we're now using DebugTools::bufferData() to query buffer contents, there also needs to be (a subset of) DebugTools that links to MagnumGLTestLib instead of MagnumGL.
Things to do:
[x] Test buffer contents on GLES3 (fix all cases of /** @todo How to verify the contents in ES? */)
[ ] Make MagnumOpenGLTesterTestLib link against MagnumGLTestLib everywhere, not just on Windows
[x] Make a MagnumDebugToolsGLTestLibSubset linking to MagnumGLTestLib
[ ] Remove now-outdated info from the commit message
Split off of #560, because it uncovered a deeper problem in how
*TestLib
libraries are built.FooTestLib
is mostly the same asFoo
, except that it hasCORRADE_GRACEFUL_ASSERT
defined in order to be able to test assertion messages -- then an assert won't abort, but instead gracefully return, allowing the message to be captured.MagnumGL
has a global "current context" pointer, and then there'sMagnumGLTestLib
which has also a global "current context" pointer. To avoid having two copies of the same, a GL test should then link to either one or the other and never both.MagnumOpenGLTesterTestLib
, which links toMagnumGLTestLib
instead ofMagnumGL
. Unfortunately it does so only on Windows, which has to be fixed.DebugTools::bufferData()
to query buffer contents, there also needs to be (a subset of)DebugTools
that links toMagnumGLTestLib
instead ofMagnumGL
.Things to do:
/** @todo How to verify the contents in ES? */
)MagnumOpenGLTesterTestLib
link againstMagnumGLTestLib
everywhere, not just on WindowsMagnumDebugToolsGLTestLibSubset
linking toMagnumGLTestLib