Browse Source

Platform: added {Sdl2,Glfw}Application::window().

pull/193/head
Vladimír Vondruš 9 years ago
parent
commit
b14927aa61
  1. 7
      src/Magnum/Platform/GlfwApplication.h
  2. 10
      src/Magnum/Platform/Sdl2Application.h

7
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 */

10
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 */

Loading…
Cancel
Save