Browse Source

Platform: added GlfwApplication::windowSize().

pull/193/head
Vladimír Vondruš 9 years ago
parent
commit
9aa4e69db0
  1. 6
      src/Magnum/Platform/GlfwApplication.cpp
  2. 11
      src/Magnum/Platform/GlfwApplication.h

6
src/Magnum/Platform/GlfwApplication.cpp

@ -150,6 +150,12 @@ GlfwApplication::~GlfwApplication() {
glfwTerminate();
}
Vector2i GlfwApplication::windowSize() {
Vector2i size;
glfwGetWindowSize(_window, &size.x(), &size.y());
return size;
}
void GlfwApplication::setSwapInterval(const Int interval) {
glfwSwapInterval(interval);
}

11
src/Magnum/Platform/GlfwApplication.h

@ -167,6 +167,17 @@ class GlfwApplication {
/** @{ @name Screen handling */
#ifndef CORRADE_TARGET_EMSCRIPTEN
/**
* @brief Window size
*
* Window size to which all input event coordinates can be related.
* Note that especially on HiDPI systems the reported window size might
* not be the same as framebuffer size.
*/
Vector2i windowSize();
#endif
/**
* @brief Swap buffers
*

Loading…
Cancel
Save