Commit f0c1773c authored by Oliver Bock's avatar Oliver Bock

Move copyright info to the end of render chain again (it's the foremost object)

parent 323e37d0
......@@ -268,17 +268,7 @@ void PulsarAnimationWidget::paintGL()
{
glLoadIdentity();
// draw copyright info
glColor4f(1.0f, 1.0f, 1.0f, 0.5f);
QFont font;
font.setPointSize(11);
font.setBold(true);
font.setFamily("Arial");
font.setStyleStrategy((QFont::StyleStrategy) (QFont::OpenGLCompatible | QFont::PreferQuality));
renderText(10, 25, -100, QString::fromLocal8Bit("Copyright © 2009-2010"), font);
renderText(10, 10, -100, QString::fromLocal8Bit("Max-Planck-Insitut für Gravitationsphysik"), font);
// draw backdrop
// draw backdrop first so that foreground alpha blending works correctly
glColor3f(1.0f, 1.0f, 1.0f);
glTranslatef(0.0, 0.0, -501.0);
drawTexture(QPointF(0.0, 0.0), m_backgroundTexture);
......@@ -514,7 +504,34 @@ void PulsarAnimationWidget::paintGL()
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
// save current state (the following is using parallel projection)
glMatrixMode(GL_PROJECTION);
glPushMatrix();
{
glLoadIdentity();
glOrtho(0, width(), 0, height(), 0.1, 501.0);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
{
glLoadIdentity();
// draw copyright info last (appears in front of everything)
glColor4f(1.0f, 1.0f, 1.0f, 0.5f);
QFont font;
font.setPointSize(11);
font.setBold(true);
font.setFamily("Arial");
font.setStyleStrategy((QFont::StyleStrategy) (QFont::OpenGLCompatible | QFont::PreferQuality));
renderText(10, 25, -100, QString::fromLocal8Bit("Copyright © 2009-2010"), font);
renderText(10, 10, -100, QString::fromLocal8Bit("Max-Planck-Insitut für Gravitationsphysik"), font);
// restore original state
glMatrixMode(GL_PROJECTION);
}
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
}
glPopMatrix();
}
void PulsarAnimationWidget::runAnimation()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment