|
|
|
@ -128,6 +128,15 @@ If no other application header is included, this class is also aliased to |
|
|
|
@cpp Platform::Application @ce and the macro is aliased to @cpp MAGNUM_APPLICATION_MAIN() @ce |
|
|
|
@cpp Platform::Application @ce and the macro is aliased to @cpp MAGNUM_APPLICATION_MAIN() @ce |
|
|
|
to simplify porting. |
|
|
|
to simplify porting. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@section Platform-AndroidApplication-resizing Responding to viewport events |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Unlike in desktop application implementations, where this is controlled via |
|
|
|
|
|
|
|
@ref Sdl2Application::Configuration::WindowFlag::Resizable, for example, on |
|
|
|
|
|
|
|
Android you have to describe this in the `AndroidManifest.xml` file, as by |
|
|
|
|
|
|
|
default the application gets killed and relaunched on screen orientation |
|
|
|
|
|
|
|
change. See the @ref platforms-android-apps-manifest-screen-resize "manifest file docs" |
|
|
|
|
|
|
|
for more information. |
|
|
|
|
|
|
|
|
|
|
|
@section Platform-AndroidApplication-output-redirection Redirecting output to Android log buffer |
|
|
|
@section Platform-AndroidApplication-output-redirection Redirecting output to Android log buffer |
|
|
|
|
|
|
|
|
|
|
|
The application by default redirects @ref Corrade::Utility::Debug "Debug", |
|
|
|
The application by default redirects @ref Corrade::Utility::Debug "Debug", |
|
|
|
@ -361,7 +370,32 @@ class AndroidApplication { |
|
|
|
#else |
|
|
|
#else |
|
|
|
private: |
|
|
|
private: |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
/** @copydoc GlfwApplication::viewportEvent(ViewportEvent&) */ |
|
|
|
/**
|
|
|
|
|
|
|
|
* @brief Viewport event |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Called when window size changes, for example after device |
|
|
|
|
|
|
|
* orientation change. The default implementation does nothing. If you |
|
|
|
|
|
|
|
* want to respond to size changes, you should pass the new size to |
|
|
|
|
|
|
|
* @ref GL::DefaultFramebuffer::setViewport() (if using OpenGL) and |
|
|
|
|
|
|
|
* possibly elsewhere (to @ref SceneGraph::Camera::setViewport(), other |
|
|
|
|
|
|
|
* framebuffers...). |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @attention Android by default kills and fully recreates the |
|
|
|
|
|
|
|
* application on device orientation change instead of calling the |
|
|
|
|
|
|
|
* viewport event. To prevent that, you need to modify the |
|
|
|
|
|
|
|
* `AndroidManifest.xml` file. See the |
|
|
|
|
|
|
|
* @ref platforms-android-apps-manifest-screen-resize "manifest file docs" |
|
|
|
|
|
|
|
* for more information. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* Note that this function might not get called at all if the window |
|
|
|
|
|
|
|
* size doesn't change. You should configure the initial state of your |
|
|
|
|
|
|
|
* cameras, framebuffers etc. in application constructor rather than |
|
|
|
|
|
|
|
* relying on this function to be called. Size of the window can be |
|
|
|
|
|
|
|
* retrieved using @ref windowSize(), size of the backing framebuffer |
|
|
|
|
|
|
|
* via @ref framebufferSize() and DPI scaling using @ref dpiScaling(). |
|
|
|
|
|
|
|
* See @ref Platform-GlfwApplication-dpi for detailed info about these |
|
|
|
|
|
|
|
* values. |
|
|
|
|
|
|
|
*/ |
|
|
|
virtual void viewportEvent(ViewportEvent& event); |
|
|
|
virtual void viewportEvent(ViewportEvent& event); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef MAGNUM_BUILD_DEPRECATED |
|
|
|
#ifdef MAGNUM_BUILD_DEPRECATED |
|
|
|
|