@ -273,6 +273,12 @@ bool Sdl2Application::tryCreateContext(const Configuration& configuration) {
return true;
}
Vector2i Sdl2Application::windowSize() {
Vector2i size;
SDL_GetWindowSize(_window, &size.x(), &size.y());
return size;
void Sdl2Application::swapBuffers() {
#ifndef CORRADE_TARGET_EMSCRIPTEN
SDL_GL_SwapWindow(_window);
@ -421,6 +421,15 @@ class Sdl2Application {
/** @{ @name Screen handling */
/**
* @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();
* @brief Swap buffers