we don't need a GLShim.
blarg. I don't understand this anymore.
This commit is contained in:
parent
ef2802ae31
commit
e8849db78a
|
@ -199,7 +199,6 @@ bool Init()
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
glEnable(GL_STENCIL_TEST);
|
glEnable(GL_STENCIL_TEST);
|
||||||
|
|
||||||
|
|
||||||
glDepthRange(0, 1);
|
glDepthRange(0, 1);
|
||||||
glClearDepth(1.0);
|
glClearDepth(1.0);
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ void EmuThread::initOpenGL()
|
||||||
QOpenGLContext* windowctx = mainWindow->getOGLContext();
|
QOpenGLContext* windowctx = mainWindow->getOGLContext();
|
||||||
QSurfaceFormat format = windowctx->format();
|
QSurfaceFormat format = windowctx->format();
|
||||||
|
|
||||||
/*oglSurface = new QOffscreenSurface();
|
oglSurface = new QOffscreenSurface();
|
||||||
oglSurface->setFormat(format);
|
oglSurface->setFormat(format);
|
||||||
oglSurface->create();
|
oglSurface->create();
|
||||||
if (!oglSurface->isValid())
|
if (!oglSurface->isValid())
|
||||||
|
@ -277,8 +277,7 @@ void EmuThread::initOpenGL()
|
||||||
printf("oglSurface shat itself :(\n");
|
printf("oglSurface shat itself :(\n");
|
||||||
delete oglSurface;
|
delete oglSurface;
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
oglSurface = new GLShim(format);
|
|
||||||
|
|
||||||
oglContext = new QOpenGLContext();//oglSurface);
|
oglContext = new QOpenGLContext();//oglSurface);
|
||||||
oglContext->setFormat(oglSurface->format());
|
oglContext->setFormat(oglSurface->format());
|
||||||
|
@ -958,19 +957,6 @@ void ScreenPanelGL::onScreenLayoutChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GLShim::GLShim(QSurfaceFormat& format) : QWindow()
|
|
||||||
{
|
|
||||||
setSurfaceType(QSurface::OpenGLSurface);
|
|
||||||
setFormat(format);
|
|
||||||
create();
|
|
||||||
hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
GLShim::~GLShim()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
|
MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
|
||||||
{
|
{
|
||||||
setWindowTitle("melonDS " MELONDS_VERSION);
|
setWindowTitle("melonDS " MELONDS_VERSION);
|
||||||
|
|
|
@ -75,7 +75,7 @@ private:
|
||||||
int PrevEmuStatus;
|
int PrevEmuStatus;
|
||||||
int EmuRunning;
|
int EmuRunning;
|
||||||
|
|
||||||
QSurface* oglSurface;
|
QOffscreenSurface* oglSurface;
|
||||||
QOpenGLContext* oglContext;
|
QOpenGLContext* oglContext;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -163,16 +163,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class GLShim : public QWindow
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit GLShim(QSurfaceFormat& format);
|
|
||||||
~GLShim();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
Loading…
Reference in New Issue