mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix logged error when starting on Mac
This commit is contained in:
parent
d5b66cc7e7
commit
ac8c371219
|
@ -83,6 +83,7 @@ void mGLWidget::initializeGL() {
|
||||||
m_positionLocation = m_program->attributeLocation("position");
|
m_positionLocation = m_program->attributeLocation("position");
|
||||||
|
|
||||||
m_vaoDone = false;
|
m_vaoDone = false;
|
||||||
|
m_tex = 0;
|
||||||
|
|
||||||
connect(&m_refresh, &QTimer::timeout, this, static_cast<void (QWidget::*)()>(&QWidget::update));
|
connect(&m_refresh, &QTimer::timeout, this, static_cast<void (QWidget::*)()>(&QWidget::update));
|
||||||
}
|
}
|
||||||
|
@ -115,6 +116,10 @@ void mGLWidget::paintGL() {
|
||||||
if (!m_vaoDone && !finalizeVAO()) {
|
if (!m_vaoDone && !finalizeVAO()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!m_tex) {
|
||||||
|
m_refresh.start(10);
|
||||||
|
return;
|
||||||
|
}
|
||||||
QOpenGLFunctions_Baseline* fn = context()->versionFunctions<QOpenGLFunctions_Baseline>();
|
QOpenGLFunctions_Baseline* fn = context()->versionFunctions<QOpenGLFunctions_Baseline>();
|
||||||
m_program->bind();
|
m_program->bind();
|
||||||
m_vao->bind();
|
m_vao->bind();
|
||||||
|
@ -520,7 +525,6 @@ void PainterGL::create() {
|
||||||
|
|
||||||
m_finalTexIdx = 0;
|
m_finalTexIdx = 0;
|
||||||
gl2Backend->finalShader.tex = m_finalTex[m_finalTexIdx];
|
gl2Backend->finalShader.tex = m_finalTex[m_finalTexIdx];
|
||||||
m_widget->setTex(m_finalTex[m_finalTexIdx]);
|
|
||||||
}
|
}
|
||||||
m_shader.preprocessShader = static_cast<void*>(&reinterpret_cast<mGLES2Context*>(m_backend)->initialShader);
|
m_shader.preprocessShader = static_cast<void*>(&reinterpret_cast<mGLES2Context*>(m_backend)->initialShader);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue