Skip to content

Commit

Permalink
Client|libappfw: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Feb 14, 2014
1 parent a383e75 commit 7ffea3d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 1 addition & 2 deletions doomsday/client/src/gl/gl_main.cpp
Expand Up @@ -187,8 +187,7 @@ void GL_DoUpdate()
DD_WaitForOptimalUpdateTime();

// Blit screen to video.
ClientWindow::main().swapBuffers(
vrCfg().needsStereoGLFormat()? gl::SwapStereoBuffers : gl::SwapMonoBuffer);
ClientWindow::main().swapBuffers();

// We will arrive here always at the same time in relation to the displayed
// frame: it is a good time to update the mouse state.
Expand Down
2 changes: 2 additions & 0 deletions doomsday/libappfw/include/de/framework/basewindow.h
Expand Up @@ -83,6 +83,8 @@ class BaseWindow : public PersistentCanvasWindow

void canvasGLDraw(Canvas &);

void swapBuffers();

DENG2_AS_IS_METHODS()

protected:
Expand Down
10 changes: 8 additions & 2 deletions doomsday/libappfw/src/basewindow.cpp
Expand Up @@ -19,8 +19,8 @@
#include "de/BaseWindow"
#include "de/WindowTransform"
#include "de/WindowSystem"

#include <de/GuiApp>
#include "de/BaseGuiApp"
#include "de/VRConfig"

namespace de {

Expand Down Expand Up @@ -146,6 +146,12 @@ void BaseWindow::canvasGLDraw(Canvas &cv)
PersistentCanvasWindow::canvasGLDraw(cv);
}

void BaseWindow::swapBuffers()
{
PersistentCanvasWindow::swapBuffers(DENG2_BASE_GUI_APP->vr().needsStereoGLFormat()?
gl::SwapStereoBuffers : gl::SwapMonoBuffer);
}

void BaseWindow::preDraw()
{}

Expand Down

0 comments on commit 7ffea3d

Please sign in to comment.