+ // now draw the logo
+ if (fgGetBool("/sim/startup/splash-screen", true)) {
+ glEnable(GL_TEXTURE_2D);
+ splash.bind();
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
+ glColor4f( 1.0, 1.0, 1.0, alpha );
+ glBegin(GL_POLYGON);
+ glTexCoord2f(0.0, 0.0); glVertex2f(xmin, ymin);
+ glTexCoord2f(1.0, 0.0); glVertex2f(xmax, ymin);
+ glTexCoord2f(1.0, 1.0); glVertex2f(xmax, ymax);
+ glTexCoord2f(0.0, 1.0); glVertex2f(xmin, ymax);
+ glEnd();
+ }
+
+ if (info.getFont() && progress_text && fgGetBool("/sim/startup/splash-progress", true)) {
+ glEnable(GL_ALPHA_TEST);
+ glEnable(GL_BLEND);
+ glAlphaFunc(GL_GREATER, 0.1f);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glDisable(GL_CULL_FACE);
+
+ float left, right, bot, top;
+
+ info.begin();
+ FGColor c(1.0, 0.9, 0.0);
+ c.merge(fgGetNode("/sim/gui/colors/splash-font"));
+ glColor4f(c.red(), c.green(), c.blue(), alpha);
+
+ font.getBBox(progress_text, fontsize, 0, &left, &right, &bot, &top);
+ info.start2f((screen_width - right) / 2.0, 10.0 - bot);
+ info.puts(progress_text);
+
+ const char *s = fgGetString("/sim/startup/splash-title", "");
+ font.getBBox(s, fontsize, 0, &left, &right, &bot, &top);
+ info.start2f((screen_width - right) / 2.0, screen_height - top - bot - 10.0);
+ info.puts(s);
+ info.end();
+ }
+
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_LIGHTING);
+ glDisable(GL_TEXTURE_2D);
+
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();