Commit f854b712 authored by Oliver Bock's avatar Oliver Bock

Render copyright information

parent ca49b148
......@@ -339,7 +339,7 @@ void PulsarAnimationWidget::paintGL()
}
glPopMatrix();
// save current state
// save current state (the following is using parallel projection)
glMatrixMode(GL_PROJECTION);
glPushMatrix();
{
......@@ -401,6 +401,35 @@ void PulsarAnimationWidget::paintGL()
}
glPopMatrix();
}
// 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-2011"), 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