|
|
|
@ -23,6 +23,7 @@ |
|
|
|
DEALINGS IN THE SOFTWARE. |
|
|
|
DEALINGS IN THE SOFTWARE. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <Corrade/Containers/Optional.h> |
|
|
|
#include <Corrade/PluginManager/Manager.h> |
|
|
|
#include <Corrade/PluginManager/Manager.h> |
|
|
|
#include <Corrade/Utility/Directory.h> |
|
|
|
#include <Corrade/Utility/Directory.h> |
|
|
|
|
|
|
|
|
|
|
|
@ -43,6 +44,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "configure.h" |
|
|
|
#include "configure.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_ANDROID |
|
|
|
|
|
|
|
#include "Magnum/GL/Context.h" |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
namespace Magnum { namespace DebugTools { namespace Test { namespace { |
|
|
|
namespace Magnum { namespace DebugTools { namespace Test { namespace { |
|
|
|
|
|
|
|
|
|
|
|
struct ObjectRendererGLTest: GL::OpenGLTester { |
|
|
|
struct ObjectRendererGLTest: GL::OpenGLTester { |
|
|
|
@ -153,11 +158,21 @@ void ObjectRendererGLTest::render3D() { |
|
|
|
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) |
|
|
|
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) |
|
|
|
CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); |
|
|
|
CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Intel Windows drivers misplace one pixel here. Nothing serious.
|
|
|
|
|
|
|
|
ARM Mali G71 (Huawei P10) has some rounding differences causing the |
|
|
|
|
|
|
|
the bottom blue line to be on a different place (but the rest is |
|
|
|
|
|
|
|
okay and the 2D case matches exactly), however to avoid false negatives |
|
|
|
|
|
|
|
elsewhere I'm making it conditional. */ |
|
|
|
|
|
|
|
Containers::Optional<CompareImageToFile> comparator{Containers::InPlaceInit, _manager, 71.6f, 0.018f}; |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_ANDROID |
|
|
|
|
|
|
|
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::ArmMali) |
|
|
|
|
|
|
|
comparator.emplace(_manager, 127.6f, 0.54f); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_WITH( |
|
|
|
CORRADE_COMPARE_WITH( |
|
|
|
framebuffer.read({{}, {64, 64}}, {PixelFormat::RGBA8Unorm}), |
|
|
|
framebuffer.read({{}, {64, 64}}, {PixelFormat::RGBA8Unorm}), |
|
|
|
Utility::Directory::join(DEBUGTOOLS_TEST_DIR, "ObjectRenderer3D.tga"), |
|
|
|
Utility::Directory::join(DEBUGTOOLS_TEST_DIR, "ObjectRenderer3D.tga"), |
|
|
|
/* Intel Windows drivers misplace one pixel here. Nothing serious. */ |
|
|
|
*comparator); |
|
|
|
(CompareImageToFile{_manager, 71.6f, 0.018f})); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}}}} |
|
|
|
}}}} |
|
|
|
|