we don't need a GLShim.

blarg.

I don't understand this anymore.
This commit is contained in:
Arisotura 2020-05-27 21:40:02 +02:00
parent ef2802ae31
commit e8849db78a
3 changed files with 3 additions and 28 deletions

View File

@ -199,7 +199,6 @@ bool Init()
glEnable(GL_DEPTH_TEST);
glEnable(GL_STENCIL_TEST);
glDepthRange(0, 1);
glClearDepth(1.0);

View File

@ -268,7 +268,7 @@ void EmuThread::initOpenGL()
QOpenGLContext* windowctx = mainWindow->getOGLContext();
QSurfaceFormat format = windowctx->format();
/*oglSurface = new QOffscreenSurface();
oglSurface = new QOffscreenSurface();
oglSurface->setFormat(format);
oglSurface->create();
if (!oglSurface->isValid())
@ -277,8 +277,7 @@ void EmuThread::initOpenGL()
printf("oglSurface shat itself :(\n");
delete oglSurface;
return;
}*/
oglSurface = new GLShim(format);
}
oglContext = new QOpenGLContext();//oglSurface);
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)
{
setWindowTitle("melonDS " MELONDS_VERSION);

View File

@ -75,7 +75,7 @@ private:
int PrevEmuStatus;
int EmuRunning;
QSurface* oglSurface;
QOffscreenSurface* oglSurface;
QOpenGLContext* oglContext;
};
@ -163,16 +163,6 @@ private:
};
class GLShim : public QWindow
{
Q_OBJECT
public:
explicit GLShim(QSurfaceFormat& format);
~GLShim();
};
class MainWindow : public QMainWindow
{
Q_OBJECT