diff --git a/src/Magnum/MeshTools/Test/CMakeLists.txt b/src/Magnum/MeshTools/Test/CMakeLists.txt index 82e45b6ce..103552150 100644 --- a/src/Magnum/MeshTools/Test/CMakeLists.txt +++ b/src/Magnum/MeshTools/Test/CMakeLists.txt @@ -61,10 +61,70 @@ if(WITH_PRIMITIVES) endif() if(BUILD_GL_TESTS) + # Otherwise CMake complains that Corrade::PluginManager is not found + find_package(Corrade REQUIRED PluginManager) + corrade_add_resource(FullScreenTriangleGLTest_RESOURCES resources.conf) set_target_properties(FullScreenTriangleGLTest_RESOURCES-dependencies PROPERTIES FOLDER "Magnum/MeshTools/Test") corrade_add_test(MeshToolsFullScreenTriangleGLTest FullScreenTriangleGLTest.cpp ${FullScreenTriangleGLTest_RESOURCES} LIBRARIES MagnumMeshTools MagnumGL MagnumOpenGLTester) + + if(CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID) + set(COMPILEGLTEST_TEST_DIR ".") + else() + set(COMPILEGLTEST_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/CompileTestFiles) + endif() + + # CMake before 3.8 has broken $ expressions for iOS (see + # https://gitlab.kitware.com/cmake/cmake/merge_requests/404) and since + # Corrade doesn't support dynamic plugins on iOS, this sorta works around + # that. Should be revisited when updating Travis to newer Xcode (current + # has CMake 3.6). + if(NOT BUILD_PLUGINS_STATIC) + if(WITH_ANYIMAGEIMPORTER) + set(ANYIMAGEIMPORTER_PLUGIN_FILENAME $) + endif() + if(WITH_TGAIMPORTER) + set(TGAIMPORTER_PLUGIN_FILENAME $) + endif() + + # First replace ${} variables, then $<> generator expressions + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/configure.h.in) + file(GENERATE OUTPUT $/configure.h + INPUT ${CMAKE_CURRENT_BINARY_DIR}/configure.h.in) + else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/configure.h) + endif() + + corrade_add_test(MeshToolsCompileGLTest CompileGLTest.cpp + LIBRARIES + MagnumDebugTools + MagnumGL + MagnumOpenGLTester + MagnumMeshTools + MagnumShaders + FILES + CompileTestFiles/color2D.tga + CompileTestFiles/color3D.tga + CompileTestFiles/flat2D.tga + CompileTestFiles/flat3D.tga + CompileTestFiles/phong.tga + CompileTestFiles/textured2D.tga + CompileTestFiles/textured3D.tga) + set_target_properties(MeshToolsCompileGLTest PROPERTIES FOLDER "Magnum/MeshTools/Test") + if(NOT BUILD_PLUGINS_STATIC) + target_include_directories(MeshToolsCompileGLTest PRIVATE $) + else() + target_include_directories(MeshToolsCompileGLTest PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + if(WITH_ANYIMAGEIMPORTER) + target_link_libraries(MeshToolsCompileGLTest PRIVATE AnyImageImporter) + endif() + if(WITH_TGAIMPORTER) + target_link_libraries(MeshToolsCompileGLTest PRIVATE TgaImporter) + endif() + endif() endif() diff --git a/src/Magnum/MeshTools/Test/CompileGLTest.cpp b/src/Magnum/MeshTools/Test/CompileGLTest.cpp new file mode 100644 index 000000000..af1e1c94c --- /dev/null +++ b/src/Magnum/MeshTools/Test/CompileGLTest.cpp @@ -0,0 +1,459 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include + +#include "Magnum/Image.h" +#include "Magnum/Mesh.h" +#include "Magnum/PixelFormat.h" +#include "Magnum/DebugTools/CompareImage.h" +#include "Magnum/GL/Mesh.h" +#include "Magnum/GL/OpenGLTester.h" +#include "Magnum/GL/Framebuffer.h" +#include "Magnum/GL/Renderbuffer.h" +#include "Magnum/GL/RenderbufferFormat.h" +#include "Magnum/GL/Texture.h" +#include "Magnum/GL/TextureFormat.h" +#include "Magnum/Math/Matrix4.h" +#include "Magnum/MeshTools/Compile.h" +#include "Magnum/MeshTools/Duplicate.h" +#include "Magnum/Shaders/Flat.h" +#include "Magnum/Shaders/Phong.h" +#include "Magnum/Shaders/VertexColor.h" +#include "Magnum/Trade/AbstractImporter.h" +#include "Magnum/Trade/MeshData2D.h" +#include "Magnum/Trade/MeshData3D.h" + +#include "configure.h" + +namespace Magnum { namespace MeshTools { namespace Test { namespace { + +enum class Flag { + NonIndexed = 1 << 0, + Normals = 1 << 1, + TextureCoordinates2D = 1 << 2, + Colors = 1 << 3 +}; + +typedef Containers::EnumSet Flags; +CORRADE_ENUMSET_OPERATORS(Flags) + +struct CompileGLTest: GL::OpenGLTester { + public: + explicit CompileGLTest(); + + void twoDimensions(); + void threeDimensions(); + + private: + PluginManager::Manager _manager{"nonexistent"}; + + Shaders::Flat2D _flat2D; + Shaders::Flat2D _flatTextured2D{Shaders::Flat2D::Flag::Textured}; + Shaders::Flat3D _flat3D; + Shaders::Flat3D _flatTextured3D{Shaders::Flat3D::Flag::Textured}; + Shaders::VertexColor2D _color2D; + Shaders::VertexColor3D _color3D; + Shaders::Phong _phong; + + GL::Renderbuffer _color; + GL::Framebuffer _framebuffer{{{}, {32, 32}}}; + GL::Texture2D _texture; +}; + +constexpr struct { + const char* name; + Flags flags; +} Data2D[] { + {"positions", {}}, + {"positions, nonindexed", Flag::NonIndexed}, + {"positions + colors", Flag::Colors}, + {"positions + texture coordinates", Flag::TextureCoordinates2D}, + {"positions + texture coordinates + colors", Flag::TextureCoordinates2D|Flag::Colors} +}; + +constexpr struct { + const char* name; + Flags flags; +} Data3D[] { + {"positions", {}}, + {"positions, nonindexed", Flag::NonIndexed}, + {"positions + colors", Flag::Colors}, + {"positions + texcoords", Flag::TextureCoordinates2D}, + {"positions + texcoords + colors", Flag::TextureCoordinates2D|Flag::Colors}, + {"positions + normals", Flag::Normals}, + {"positions + normals + colors", Flag::Normals|Flag::Colors}, + {"positions + normals + texcoords", Flag::Normals|Flag::TextureCoordinates2D}, + {"positions + normals + texcoords + colors", Flag::Normals|Flag::TextureCoordinates2D|Flag::Colors} +}; + +using namespace Math::Literals; + +constexpr Color4ub ImageData[] { + 0xff000000_rgba, 0x80000000_rgba, 0x00008000_rgba, 0x0000ff00_rgba, + 0x80000000_rgba, 0xffffffff_rgba, 0xffffffff_rgba, 0x00008000_rgba, + 0x00800000_rgba, 0xffffffff_rgba, 0xffffffff_rgba, 0x00008000_rgba, + 0x00ff0000_rgba, 0x00800000_rgba, 0x00000080_rgba, 0x000000ff_rgba +}; + +CompileGLTest::CompileGLTest() { + addInstancedTests({&CompileGLTest::twoDimensions}, + Containers::arraySize(Data2D)); + + addInstancedTests({&CompileGLTest::threeDimensions}, + Containers::arraySize(Data3D)); + + /* Load the plugins directly from the build tree. Otherwise they're either + static and already loaded or not present in the build tree */ + #ifdef ANYIMAGEIMPORTER_PLUGIN_FILENAME + CORRADE_INTERNAL_ASSERT(_manager.load(ANYIMAGEIMPORTER_PLUGIN_FILENAME) & PluginManager::LoadState::Loaded); + #endif + #ifdef TGAIMPORTER_PLUGIN_FILENAME + CORRADE_INTERNAL_ASSERT(_manager.load(TGAIMPORTER_PLUGIN_FILENAME) & PluginManager::LoadState::Loaded); + #endif + + /* Set up the rendering */ + _color.setStorage( + #if !defined(MAGNUM_TARGET_GLES2) || !defined(MAGNUM_TARGET_WEBGL) + GL::RenderbufferFormat::RGBA8, + #else + GL::RenderbufferFormat::RGBA4, + #endif + {32, 32}); + _framebuffer.attachRenderbuffer(GL::Framebuffer::ColorAttachment{0}, _color) + .bind(); + _texture + .setMinificationFilter(SamplerFilter::Linear) + .setMagnificationFilter(SamplerFilter::Linear) + .setWrapping(SamplerWrapping::ClampToEdge) + .setStorage(1, + #if !defined(MAGNUM_TARGET_GLES2) || !defined(MAGNUM_TARGET_WEBGL) + GL::TextureFormat::RGBA8, + #else + GL::TextureFormat::RGBA, + #endif + {4, 4}) + .setSubImage(0, {}, ImageView2D{PixelFormat::RGBA8Unorm, {4, 4}, ImageData}); +} + +void CompileGLTest::twoDimensions() { + auto&& data = Data2D[testCaseInstanceId()]; + setTestCaseDescription(data.name); + + /* + 6-----7-----8 + | /| /| + | / | / | + |/ |/ | + 3-----4-----5 + | /| /| + | / | / | + |/ |/ | + 0-----1-----2 + */ + std::vector positions{ + {-0.75f, -0.75f}, + { 0.00f, -0.75f}, + { 0.75f, -0.75f}, + + {-0.75f, 0.0f}, + { 0.00f, 0.0f}, + { 0.75f, 0.0f}, + + {-0.75f, 0.75f}, + { 0.0f, 0.75f}, + { 0.75f, 0.75f} + }; + + std::vector> textureCoordinates2D; + if(data.flags & Flag::TextureCoordinates2D) textureCoordinates2D.push_back(std::vector{ + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f} + }); + + std::vector> colors; + if(data.flags & Flag::Colors) colors.push_back(std::vector { + 0x00ff00_rgbf, + 0x808000_rgbf, + 0xff0000_rgbf, + + 0x00ff80_rgbf, + 0x808080_rgbf, + 0xff0080_rgbf, + + 0x00ffff_rgbf, + 0x8080ff_rgbf, + 0xff00ff_rgbf + }); + + std::vector indices{ + 0, 1, 4, 0, 4, 3, + 1, 2, 5, 1, 5, 4, + 3, 4, 7, 3, 7, 6, + 4, 5, 8, 4, 8, 7 + }; + + /* Duplicate positions if data are non-indexed. Testing only positions + alone ATM, don't bother with other attribs. */ + if(data.flags & Flag::NonIndexed) { + CORRADE_INTERNAL_ASSERT(textureCoordinates2D.empty()); + CORRADE_INTERNAL_ASSERT(colors.empty()); + positions = duplicate(indices, positions); + indices.clear(); + } + + MAGNUM_VERIFY_NO_GL_ERROR(); + + GL::Mesh mesh = compile(Trade::MeshData2D{MeshPrimitive::Triangles, indices, {positions}, textureCoordinates2D, colors}); + + MAGNUM_VERIFY_NO_GL_ERROR(); + + if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) || + !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) + CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); + + /* Check with the flat shader, it should always work */ + { + _framebuffer.clear(GL::FramebufferClear::Color); + _flat2D.setColor(0xff3366_rgbf); + mesh.draw(_flat2D); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE_WITH( + _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), + Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "flat2D.tga"), + (DebugTools::CompareImageToFile{_manager})); + } + + /* Check with the colored shader, if we have colors */ + if(data.flags & Flag::Colors) { + _framebuffer.clear(GL::FramebufferClear::Color); + mesh.draw(_color2D); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE_WITH( + _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), + Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "color2D.tga"), + (DebugTools::CompareImageToFile{_manager})); + } + + /* Check with the textured shader, if we have texture coords */ + if(data.flags & Flag::TextureCoordinates2D) { + _framebuffer.clear(GL::FramebufferClear::Color); + _flatTextured2D.bindTexture(_texture); + mesh.draw(_flatTextured2D); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE_WITH( + _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), + Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured2D.tga"), + /* SwiftShader has some minor off-by-one precision differences */ + (DebugTools::CompareImageToFile{_manager, 0.75f, 0.0906f})); + } +} + +void CompileGLTest::threeDimensions() { + auto&& data = Data3D[testCaseInstanceId()]; + setTestCaseDescription(data.name); + + /* + 6-----7-----8 + | /| /| + | / | / | + |/ |/ | + 3-----4-----5 + | /| /| + | / | / | + |/ |/ | + 0-----1-----2 + */ + std::vector positions{ + {-0.75f, -0.75f, -0.35f}, + { 0.00f, -0.75f, -0.25f}, + { 0.75f, -0.75f, -0.35f}, + + {-0.75f, 0.00f, -0.25f}, + { 0.00f, 0.00f, 0.00f}, + { 0.75f, 0.00f, -0.25f}, + + {-0.75f, 0.75f, -0.35f}, + { 0.0f, 0.75f, -0.25f}, + { 0.75f, 0.75f, -0.35f} + }; + + std::vector> normals; + if(data.flags & Flag::Normals) normals.push_back(std::vector{ + Vector3{-0.5f, -0.5f, 1.0f}.normalized(), + Vector3{ 0.0f, -0.5f, 1.0f}.normalized(), + Vector3{ 0.5f, -0.5f, 1.0f}.normalized(), + + Vector3{-0.5f, 0.0f, 1.0f}.normalized(), + Vector3{ 0.0f, 0.0f, 1.0f}.normalized(), + Vector3{ 0.5f, 0.0f, 1.0f}.normalized(), + + Vector3{-0.5f, 0.5f, 1.0f}.normalized(), + Vector3{ 0.0f, 0.5f, 1.0f}.normalized(), + Vector3{ 0.5f, 0.5f, 1.0f}.normalized(), + }); + + std::vector> textureCoordinates2D; + if(data.flags & Flag::TextureCoordinates2D) textureCoordinates2D.push_back(std::vector{ + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f} + }); + + std::vector> colors; + if(data.flags & Flag::Colors) colors.push_back(std::vector { + 0x00ff00_rgbf, + 0x808000_rgbf, + 0xff0000_rgbf, + + 0x00ff80_rgbf, + 0x808080_rgbf, + 0xff0080_rgbf, + + 0x00ffff_rgbf, + 0x8080ff_rgbf, + 0xff00ff_rgbf + }); + + std::vector indices{ + 0, 1, 4, 0, 4, 3, + 1, 2, 5, 1, 5, 4, + 3, 4, 7, 3, 7, 6, + 4, 5, 8, 4, 8, 7 + }; + + /* Duplicate positions if data are non-indexed. Testing only positions + alone ATM, don't bother with other attribs. */ + if(data.flags & Flag::NonIndexed) { + CORRADE_INTERNAL_ASSERT(normals.empty()); + CORRADE_INTERNAL_ASSERT(textureCoordinates2D.empty()); + CORRADE_INTERNAL_ASSERT(colors.empty()); + positions = duplicate(indices, positions); + indices.clear(); + } + + MAGNUM_VERIFY_NO_GL_ERROR(); + + GL::Mesh mesh = compile(Trade::MeshData3D{MeshPrimitive::Triangles, indices, {positions}, normals, textureCoordinates2D, colors}); + + MAGNUM_VERIFY_NO_GL_ERROR(); + + if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) || + !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) + CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); + + Matrix4 projection = Matrix4::perspectiveProjection(45.0_degf, 1.0f, 0.1f, 10.0f); + Matrix4 transformation = Matrix4::translation(Vector3::zAxis(-2.0f)); + + /* Check with the flat shader, it should always work */ + { + _framebuffer.clear(GL::FramebufferClear::Color); + _flat3D + .setTransformationProjectionMatrix(projection*transformation) + .setColor(0x6633ff_rgbf); + mesh.draw(_flat3D); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE_WITH( + _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), + Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "flat3D.tga"), + (DebugTools::CompareImageToFile{_manager})); + } + + /* Check with the phong shader, if we have normals */ + if(data.flags & Flag::Normals) { + _framebuffer.clear(GL::FramebufferClear::Color); + _phong + .setDiffuseColor(0x33ff66_rgbf) + .setTransformationMatrix(transformation) + .setNormalMatrix(transformation.rotationScaling()) + .setProjectionMatrix(projection); + mesh.draw(_phong); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE_WITH( + _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), + Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "phong.tga"), + /* SwiftShader has some minor off-by-one precision differences */ + (DebugTools::CompareImageToFile{_manager, 0.5f, 0.0113f})); + } + + /* Check with the colored shader, if we have colors */ + if(data.flags & Flag::Colors) { + _framebuffer.clear(GL::FramebufferClear::Color); + _color3D + .setTransformationProjectionMatrix(projection*transformation); + mesh.draw(_color3D); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE_WITH( + _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), + Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "color3D.tga"), + /* SwiftShader has some minor off-by-one precision differences */ + (DebugTools::CompareImageToFile{_manager, 0.5f, 0.0162f})); + } + + /* Check with the textured shader, if we have texture coords */ + if(data.flags & Flag::TextureCoordinates2D) { + _framebuffer.clear(GL::FramebufferClear::Color); + _flatTextured3D + .setTransformationProjectionMatrix(projection*transformation) + .bindTexture(_texture); + mesh.draw(_flatTextured3D); + + MAGNUM_VERIFY_NO_GL_ERROR(); + CORRADE_COMPARE_WITH( + _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), + Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured3D.tga"), + /* SwiftShader has some minor off-by-one precision differences */ + (DebugTools::CompareImageToFile{_manager, 1.0f, 0.0948f})); + } +} + +}}}} + +CORRADE_TEST_MAIN(Magnum::MeshTools::Test::CompileGLTest) diff --git a/src/Magnum/MeshTools/Test/CompileTestFiles/color2D.tga b/src/Magnum/MeshTools/Test/CompileTestFiles/color2D.tga new file mode 100644 index 000000000..66438ccdd Binary files /dev/null and b/src/Magnum/MeshTools/Test/CompileTestFiles/color2D.tga differ diff --git a/src/Magnum/MeshTools/Test/CompileTestFiles/color3D.tga b/src/Magnum/MeshTools/Test/CompileTestFiles/color3D.tga new file mode 100644 index 000000000..005abb233 Binary files /dev/null and b/src/Magnum/MeshTools/Test/CompileTestFiles/color3D.tga differ diff --git a/src/Magnum/MeshTools/Test/CompileTestFiles/flat2D.tga b/src/Magnum/MeshTools/Test/CompileTestFiles/flat2D.tga new file mode 100644 index 000000000..5bcca626c Binary files /dev/null and b/src/Magnum/MeshTools/Test/CompileTestFiles/flat2D.tga differ diff --git a/src/Magnum/MeshTools/Test/CompileTestFiles/flat3D.tga b/src/Magnum/MeshTools/Test/CompileTestFiles/flat3D.tga new file mode 100644 index 000000000..15c9ca6ed Binary files /dev/null and b/src/Magnum/MeshTools/Test/CompileTestFiles/flat3D.tga differ diff --git a/src/Magnum/MeshTools/Test/CompileTestFiles/phong.tga b/src/Magnum/MeshTools/Test/CompileTestFiles/phong.tga new file mode 100644 index 000000000..89dd5beec Binary files /dev/null and b/src/Magnum/MeshTools/Test/CompileTestFiles/phong.tga differ diff --git a/src/Magnum/MeshTools/Test/CompileTestFiles/textured2D.tga b/src/Magnum/MeshTools/Test/CompileTestFiles/textured2D.tga new file mode 100644 index 000000000..59e82e07c Binary files /dev/null and b/src/Magnum/MeshTools/Test/CompileTestFiles/textured2D.tga differ diff --git a/src/Magnum/MeshTools/Test/CompileTestFiles/textured3D.tga b/src/Magnum/MeshTools/Test/CompileTestFiles/textured3D.tga new file mode 100644 index 000000000..fbbbe5d15 Binary files /dev/null and b/src/Magnum/MeshTools/Test/CompileTestFiles/textured3D.tga differ diff --git a/src/Magnum/MeshTools/Test/configure.h.cmake b/src/Magnum/MeshTools/Test/configure.h.cmake new file mode 100644 index 000000000..a20f0d503 --- /dev/null +++ b/src/Magnum/MeshTools/Test/configure.h.cmake @@ -0,0 +1,28 @@ +/* + This file is part of Magnum. + + Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 + Vladimír Vondruš + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#cmakedefine ANYIMAGEIMPORTER_PLUGIN_FILENAME "${ANYIMAGEIMPORTER_PLUGIN_FILENAME}" +#cmakedefine TGAIMPORTER_PLUGIN_FILENAME "${TGAIMPORTER_PLUGIN_FILENAME}" +#define COMPILEGLTEST_TEST_DIR "${COMPILEGLTEST_TEST_DIR}"