Browse Source

Platform: added AndroidApplication::windowSize().

pull/205/head
Vladimír Vondruš 8 years ago
parent
commit
a69aa12807
  1. 4
      doc/changelog.dox
  2. 5
      src/Magnum/Platform/AndroidApplication.cpp
  3. 3
      src/Magnum/Platform/AndroidApplication.h

4
doc/changelog.dox

@ -59,6 +59,10 @@ See also:
@webgl_extension{WEBGL,color_buffer_float},
@webgl_extension{EXT,color_buffer_float}
@subsubsection changelog-latest-new-platform Platform libraries
- Added @ref Platform::AndroidApplication::windowSize()
@subsubsection changelog-latest-new-primitives Primitives library
- New @ref Primitives::circle3DSolid(), @ref Primitives::circle3DWireframe(),

5
src/Magnum/Platform/AndroidApplication.cpp

@ -148,6 +148,11 @@ bool AndroidApplication::tryCreateContext(const Configuration& configuration) {
return _context->tryCreate();
}
Vector2i AndroidApplication::windowSize() {
return {ANativeWindow_getWidth(_state->window),
ANativeWindow_getHeight(_state->window)};
}
void AndroidApplication::swapBuffers() {
eglSwapBuffers(_display, _surface);
}

3
src/Magnum/Platform/AndroidApplication.h

@ -207,6 +207,9 @@ class AndroidApplication {
/** @{ @name Screen handling */
/** @copydoc Sdl2Application::windowSize() */
Vector2i windowSize();
/**
* @brief Swap buffers
*

Loading…
Cancel
Save