Browse Source

Platform: oh god what have I done.

pull/55/merge
Vladimír Vondruš 12 years ago
parent
commit
3df0d63a1a
  1. 32
      src/Magnum/Platform/AndroidApplication.cpp

32
src/Magnum/Platform/AndroidApplication.cpp

@ -34,13 +34,6 @@
namespace Magnum { namespace Platform { 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 { struct AndroidApplication::LogOutput {
LogOutput(); LogOutput();
@ -48,6 +41,17 @@ struct AndroidApplication::LogOutput {
std::ostream debugStream, warningStream, errorStream; 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 #ifndef DOXYGEN_GENERATING_OUTPUT
AndroidApplication::AndroidApplication(const Arguments& arguments): AndroidApplication{arguments, Configuration{}} {} AndroidApplication::AndroidApplication(const Arguments& arguments): AndroidApplication{arguments, Configuration{}} {}
#endif #endif
@ -61,15 +65,11 @@ AndroidApplication::AndroidApplication(const Arguments& arguments, std::nullptr_
_logOutput.reset(new LogOutput); _logOutput.reset(new LogOutput);
} }
AndroidApplication::LogOutput::LogOutput(): AndroidApplication::~AndroidApplication() {
debugBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Info, "magnum"), eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
warningBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Warning, "magnum"), eglDestroyContext(_display, _context);
errorBuffer(Utility::AndroidLogStreamBuffer::LogPriority::Error, "magnum"), eglDestroySurface(_display, _surface);
debugStream(&debugBuffer), warningStream(&warningBuffer), errorStream(&errorBuffer) eglTerminate(_display);
{
Debug::setOutput(&debugStream);
Warning::setOutput(&warningStream);
Error::setOutput(&errorStream);
} }
void AndroidApplication::createContext() { createContext({}); } void AndroidApplication::createContext() { createContext({}); }

Loading…
Cancel
Save