Move swap control to the host specific GLInterface files.

This commit is contained in:
Ryan Houdek
2013-01-24 10:31:08 -06:00
parent 2db0c4270e
commit 73eb98ed8e
11 changed files with 45 additions and 34 deletions

View File

@ -23,6 +23,19 @@
#include "../GLInterface.h"
#include "WX.h"
void cInterfaceWX::SwapInterval(int Interval)
{
// WX interface only used on Apple
#ifdef __APPLE__
#if defined USE_WX && USE_WX
NSOpenGLContext *ctx = GLWin.glCtxt->GetWXGLContext();
#else
NSOpenGLContext *ctx = GLWin.cocoaCtx;
#endif
[ctx setValues: &Interval forParameter: NSOpenGLCPSwapInterval];
#endif
}
void cInterfaceWX::Swap()
{
GLWin.glCanvas->SwapBuffers();