|
|
|
|
@ -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({}); } |
|
|
|
|
|