From a674008863a9d911d18ade8eafe0aa6fd1f23298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 27 Feb 2018 19:58:35 +0100 Subject: [PATCH] doc: don't assume the user is using Application classes. --- src/Magnum/DefaultFramebuffer.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Magnum/DefaultFramebuffer.h b/src/Magnum/DefaultFramebuffer.h index 0bf874d0f..6c28f237d 100644 --- a/src/Magnum/DefaultFramebuffer.h +++ b/src/Magnum/DefaultFramebuffer.h @@ -43,15 +43,19 @@ variable @ref defaultFramebuffer. @section DefaultFramebuffer-usage Usage When you are using only the default framebuffer, the usage is simple. You -must ensure that it is properly resized when application surface is resized, -i.e. you must pass the new size in your @ref Platform::Sdl2Application::viewportEvent() "viewportEvent()" +must ensure that it is properly resized when window surface is resized. In case +you're using one of the @ref Platform::Sdl2Application "Platform::Application" +classes, pass the new size in your +@ref Platform::Sdl2Application::viewportEvent() "viewportEvent()" implementation, for example: @snippet Magnum-framebuffer.cpp DefaultFramebuffer-usage-viewport Next thing you probably want is to clear all used buffers before performing -any drawing in your @ref Platform::Sdl2Application::drawEvent() "drawEvent()" -implementation, for example: +any drawing. Again, in case you're using one of the +@ref Platform::Sdl2Application "Platform::Application" classes, do it in your +@ref Platform::Sdl2Application::drawEvent() "drawEvent()" implementation, for +example: @snippet Magnum-framebuffer.cpp DefaultFramebuffer-usage-clear