Remove unneeded GL context code

This commit is contained in:
Jeffrey Pfau 2014-10-15 02:38:43 -07:00
parent 1ef3f4256f
commit bd731e8266
2 changed files with 3 additions and 7 deletions

View File

@ -38,7 +38,6 @@ void Display::startDrawing(const uint32_t* buffer, GBAThread* thread) {
}
m_drawThread = new QThread(this);
m_painter = new Painter(this);
m_painter->setGLContext(this);
m_painter->setContext(thread);
m_painter->setBacking(buffer);
m_painter->moveToThread(m_drawThread);
@ -68,7 +67,9 @@ void Display::resizeEvent(QResizeEvent* event) {
}
}
Painter::Painter(Display* parent) {
Painter::Painter(Display* parent)
: m_gl(parent)
{
m_size = parent->size();
}
@ -80,10 +81,6 @@ void Painter::setBacking(const uint32_t* backing) {
m_backing = backing;
}
void Painter::setGLContext(QGLWidget* context) {
m_gl = context;
}
void Painter::resize(const QSize& size) {
m_size = size;
m_gl->makeCurrent();

View File

@ -38,7 +38,6 @@ public:
void setContext(GBAThread*);
void setBacking(const uint32_t*);
void setGLContext(QGLWidget*);
public slots:
void draw();