diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index 279e942f9..69eb48ce8 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -150,6 +150,13 @@ class GlfwApplication { glfwSetWindowShouldClose(_window, true); } + /** + * @brief Underlying window handle + * + * Use in case you need to call GLFW functionality directly. + */ + GLFWwindow* window() { return _window; } + protected: /* Nobody will need to have (and delete) GlfwApplication*, thus this is faster than public pure virtual destructor */ diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index c15d522d2..4a7e47c68 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -386,6 +386,16 @@ class Sdl2Application { /** @brief Exit application main loop */ void exit(); + #ifndef CORRADE_TARGET_EMSCRIPTEN + /** + * @brief Underlying window handle + * + * Use in case you need to call SDL functionality directly. + * @note Not available in @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". + */ + SDL_Window* window() { return _window; } + #endif + protected: /* Nobody will need to have (and delete) Sdl2Application*, thus this is faster than public pure virtual destructor */