Attempt to turn on apple GL refresh

This commit is contained in:
Mark Watkins 2011-08-20 16:27:06 +10:00
parent 4e7ccde8e3
commit 8ed0015279

View File

@ -8,6 +8,11 @@
#include <QDebug>
#include <QLabel>
#include <QMouseEvent>
#ifdef __APPLE__
#include <AGL/agl.h>
#endif
#include "SleepLib/profiles.h"
#include "graphwindow.h"
#include "gTitle.h"
@ -808,6 +813,7 @@ void gGraphWindow::initializeGL()
}
bool first_draw_event=true;
void gGraphWindow::resizeGL(int w, int h)
{
m_scrX=w;
@ -868,11 +874,16 @@ void gGraphWindow::Render(int w, int h)
void gGraphWindow::paintGL()
{
if (m_scrX<=0) m_scrX=width();
if (m_scrY<=0) m_scrY=height();
if (m_scrX<=0) return;
if (m_scrY<=0) return;
#ifdef __APPLE__
AGLContext aglContext;
aglContext=aglGetCurrentContext();
GLint swapInt=1;
aglSetInteger(aglContext, AGL_SWAP_INTERVAL, &swapInt);
#endif
//glDisable(GL_DEPTH_TEST);
Render(m_scrX,m_scrY);