mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 20:50:43 +00:00
Attempt to turn on apple GL refresh
This commit is contained in:
parent
4e7ccde8e3
commit
8ed0015279
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user