mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-21 21:20:45 +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 <QDebug>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <AGL/agl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SleepLib/profiles.h"
|
#include "SleepLib/profiles.h"
|
||||||
#include "graphwindow.h"
|
#include "graphwindow.h"
|
||||||
#include "gTitle.h"
|
#include "gTitle.h"
|
||||||
@ -808,6 +813,7 @@ void gGraphWindow::initializeGL()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool first_draw_event=true;
|
||||||
void gGraphWindow::resizeGL(int w, int h)
|
void gGraphWindow::resizeGL(int w, int h)
|
||||||
{
|
{
|
||||||
m_scrX=w;
|
m_scrX=w;
|
||||||
@ -868,11 +874,16 @@ void gGraphWindow::Render(int w, int h)
|
|||||||
|
|
||||||
void gGraphWindow::paintGL()
|
void gGraphWindow::paintGL()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_scrX<=0) m_scrX=width();
|
if (m_scrX<=0) m_scrX=width();
|
||||||
if (m_scrY<=0) m_scrY=height();
|
if (m_scrY<=0) m_scrY=height();
|
||||||
if (m_scrX<=0) return;
|
if (m_scrX<=0) return;
|
||||||
if (m_scrY<=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);
|
//glDisable(GL_DEPTH_TEST);
|
||||||
Render(m_scrX,m_scrY);
|
Render(m_scrX,m_scrY);
|
||||||
|
Loading…
Reference in New Issue
Block a user