From 390764f795c0b7b8aad3de386fd3674ee73d6732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Jun 2014 14:45:31 +0200 Subject: [PATCH 1/5] package: removed MinGW32 Jenkins CI configuration. Can't test it on my system anymore and it would only be getting stale and more useless over time. --- doc/building.dox | 9 +-- package/ci/jenkins-mingw32.xml | 129 --------------------------------- 2 files changed, 4 insertions(+), 134 deletions(-) delete mode 100644 package/ci/jenkins-mingw32.xml diff --git a/doc/building.dox b/doc/building.dox index ff3a6dfe3..1d8bc605c 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -504,12 +504,11 @@ library with every combination of them. You can add/remove the axes in Magnum-GLTests depend on active X11 session, thus they should be run from Jenkins instance running on graphical user session. -There is also MinGW32, MinGW-w64, Emscripten and NaCl configuration, add or -update them with the commands below. See @ref building-crosscompiling for more -information about setting up the crosscompilers and `toolchains/` submodule. -For Emscripten you need also **Node.js** installed to run the tests. +There is also MinGW-w64, Emscripten and NaCl configuration, add or update them +with the commands below. See @ref building-crosscompiling for more information +about setting up the crosscompilers and `toolchains/` submodule. For Emscripten +you need also **Node.js** installed to run the tests. - java -jar jenkins-cli.jar -s http://your-jenkins-server Magnum-MinGW32 < jenkins-mingw32.xml java -jar jenkins-cli.jar -s http://your-jenkins-server Magnum-MinGW-w64 < jenkins-mingw-w64.xml java -jar jenkins-cli.jar -s http://your-jenkins-server Magnum-Emscripten < jenkins-emscripten.xml java -jar jenkins-cli.jar -s http://your-jenkins-server Magnum-NaCl < jenkins-nacl.xml diff --git a/package/ci/jenkins-mingw32.xml b/package/ci/jenkins-mingw32.xml deleted file mode 100644 index 9cf01d7de..000000000 --- a/package/ci/jenkins-mingw32.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - -1 - 10 - -1 - -1 - - false - - - 2 - - - git://github.com/mosra/magnum.git - - - - - */master - - - false - - - - true - - - - - true - false - false - false - - false - Magnum - - - libraries - - static - dynamic - - - - compatibility - - - deprecated - - - - - - - - - - - - - Errors while running CTest - false - true - true - - - - - true - - - - - UNSTABLE - 1 - YELLOW - true - - - . - From ee21b75b15b45febe1e3139a2a929a62bb40b3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Jun 2014 14:52:38 +0200 Subject: [PATCH 2/5] Shaders: fix build on ES3. I'm starting to hate these rushed prerelease fixes. --- src/Magnum/Shaders/MeshVisualizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Shaders/MeshVisualizer.cpp b/src/Magnum/Shaders/MeshVisualizer.cpp index f0d3a900f..25155fc73 100644 --- a/src/Magnum/Shaders/MeshVisualizer.cpp +++ b/src/Magnum/Shaders/MeshVisualizer.cpp @@ -63,7 +63,7 @@ MeshVisualizer::MeshVisualizer(const Flags flags): flags(flags), transformationP .addSource(flags & Flag::NoGeometryShader ? "#define NO_GEOMETRY_SHADER\n" : "") #ifdef MAGNUM_TARGET_WEBGL .addSource("#define SUBSCRIPTING_WORKAROUND\n") - #elif defined(MAGNUM_TARGET_GLES) + #elif defined(MAGNUM_TARGET_GLES2) .addSource(Context::current()->detectedDriver() & Context::DetectedDriver::ProbablyAngle ? "#define SUBSCRIPTING_WORKAROUND\n" : "") #endif From 87c411f841b98e818c6c422d25bf5bf1165d1cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Jun 2014 15:07:43 +0200 Subject: [PATCH 3/5] ObjImporter: fix compilation on Android. --- src/MagnumPlugins/ObjImporter/ObjImporter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/MagnumPlugins/ObjImporter/ObjImporter.cpp b/src/MagnumPlugins/ObjImporter/ObjImporter.cpp index d412d98c5..ec93527a8 100644 --- a/src/MagnumPlugins/ObjImporter/ObjImporter.cpp +++ b/src/MagnumPlugins/ObjImporter/ObjImporter.cpp @@ -38,7 +38,7 @@ #include "Magnum/Math/Vector3.h" #include "Magnum/Trade/MeshData3D.h" -#ifdef CORRADE_TARGET_NACL_NEWLIB +#if defined(CORRADE_TARGET_NACL_NEWLIB) || defined(CORRADE_TARGET_ANDROID) #include #endif @@ -66,12 +66,12 @@ template Math::Vector extractFloatData(std::strin Math::Vector output; - #ifdef CORRADE_TARGET_NACL_NEWLIB + #if defined(CORRADE_TARGET_NACL_NEWLIB) || defined(CORRADE_TARGET_ANDROID) std::istringstream in; #endif for(std::size_t i = 0; i != size; ++i) { - #ifndef CORRADE_TARGET_NACL_NEWLIB + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) output[i] = std::stof(data[i]); #else in.str(data[i]); @@ -80,7 +80,7 @@ template Math::Vector extractFloatData(std::strin } if(data.size() == size+1) { - #ifndef CORRADE_TARGET_NACL_NEWLIB + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) *extra = std::stof(data.back()); #else in.str(data.back()); @@ -369,7 +369,7 @@ std::optional ObjImporter::doMesh3D(UnsignedInt id) { } /* Position indices */ - #ifndef CORRADE_TARGET_NACL_NEWLIB + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) positionIndices.push_back(std::stoul(indices[0]) - positionIndexOffset); #else std::istringstream in(indices[0]); @@ -380,7 +380,7 @@ std::optional ObjImporter::doMesh3D(UnsignedInt id) { /* Texture coordinates */ if(indices.size() == 2 || (indices.size() == 3 && !indices[1].empty())) { - #ifndef CORRADE_TARGET_NACL_NEWLIB + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) textureCoordinateIndices.push_back(std::stoul(indices[1]) - textureCoordinateIndexOffset); #else in.str(indices[1]); @@ -391,7 +391,7 @@ std::optional ObjImporter::doMesh3D(UnsignedInt id) { /* Normal indices */ if(indices.size() == 3) { - #ifndef CORRADE_TARGET_NACL_NEWLIB + #if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) normalIndices.push_back(std::stoul(indices[2]) - normalIndexOffset); #else in.str(indices[2]); From c74ccc22f3289240347ed8846806c0b83aed1bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Jun 2014 15:07:56 +0200 Subject: [PATCH 4/5] Platform: fix AndroidApplication compilation. Using type before it was defined. Blind changes FTW! --- src/Magnum/Platform/AndroidApplication.cpp | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Magnum/Platform/AndroidApplication.cpp b/src/Magnum/Platform/AndroidApplication.cpp index e9ede0982..cd03be2d0 100644 --- a/src/Magnum/Platform/AndroidApplication.cpp +++ b/src/Magnum/Platform/AndroidApplication.cpp @@ -34,19 +34,6 @@ namespace Magnum { namespace Platform { -#ifndef DOXYGEN_GENERATING_OUTPUT -AndroidApplication::AndroidApplication(const Arguments& arguments): AndroidApplication{arguments, Configuration{}} {} -#endif - -AndroidApplication::AndroidApplication(const Arguments& arguments, const Configuration& configuration): AndroidApplication{arguments, nullptr} { - createContext(configuration); -} - -AndroidApplication::AndroidApplication(const Arguments& arguments, std::nullptr_t): _state(arguments) { - /* Redirect debug output to Android log */ - _logOutput.reset(new LogOutput); -} - AndroidApplication::~AndroidApplication() { eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(_display, _context); @@ -61,6 +48,19 @@ struct AndroidApplication::LogOutput { std::ostream debugStream, warningStream, errorStream; }; +#ifndef DOXYGEN_GENERATING_OUTPUT +AndroidApplication::AndroidApplication(const Arguments& arguments): AndroidApplication{arguments, Configuration{}} {} +#endif + +AndroidApplication::AndroidApplication(const Arguments& arguments, const Configuration& configuration): AndroidApplication{arguments, nullptr} { + createContext(configuration); +} + +AndroidApplication::AndroidApplication(const Arguments& arguments, std::nullptr_t): _state(arguments) { + /* Redirect debug output to Android log */ + _logOutput.reset(new LogOutput); +} + AndroidApplication::LogOutput::LogOutput(): debugBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Info, "magnum"), warningBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Warning, "magnum"), From 3df0d63a1ac404d9b39644fcb1dd6bf42678b292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Jun 2014 15:41:34 +0200 Subject: [PATCH 5/5] Platform: oh god what have I done. --- src/Magnum/Platform/AndroidApplication.cpp | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Magnum/Platform/AndroidApplication.cpp b/src/Magnum/Platform/AndroidApplication.cpp index cd03be2d0..57b511687 100644 --- a/src/Magnum/Platform/AndroidApplication.cpp +++ b/src/Magnum/Platform/AndroidApplication.cpp @@ -34,13 +34,6 @@ namespace Magnum { namespace Platform { -AndroidApplication::~AndroidApplication() { - eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(_display, _context); - eglDestroySurface(_display, _surface); - eglTerminate(_display); -} - struct AndroidApplication::LogOutput { LogOutput(); @@ -48,6 +41,17 @@ struct AndroidApplication::LogOutput { std::ostream debugStream, warningStream, errorStream; }; +AndroidApplication::LogOutput::LogOutput(): + debugBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Info, "magnum"), + warningBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Warning, "magnum"), + errorBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Error, "magnum"), + debugStream(&debugBuffer), warningStream(&warningBuffer), errorStream(&errorBuffer) +{ + Debug::setOutput(&debugStream); + Warning::setOutput(&warningStream); + Error::setOutput(&errorStream); +} + #ifndef DOXYGEN_GENERATING_OUTPUT AndroidApplication::AndroidApplication(const Arguments& arguments): AndroidApplication{arguments, Configuration{}} {} #endif @@ -61,15 +65,11 @@ AndroidApplication::AndroidApplication(const Arguments& arguments, std::nullptr_ _logOutput.reset(new LogOutput); } -AndroidApplication::LogOutput::LogOutput(): - debugBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Info, "magnum"), - warningBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Warning, "magnum"), - errorBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Error, "magnum"), - debugStream(&debugBuffer), warningStream(&warningBuffer), errorStream(&errorBuffer) -{ - Debug::setOutput(&debugStream); - Warning::setOutput(&warningStream); - Error::setOutput(&errorStream); +AndroidApplication::~AndroidApplication() { + eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroyContext(_display, _context); + eglDestroySurface(_display, _surface); + eglTerminate(_display); } void AndroidApplication::createContext() { createContext({}); }